Revision: 201003 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 23:07:29 +0200
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
Revision: 201003 Kit: 201007
contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h
contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp
contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiusbhandler.cpp
contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp
homescreenpluginsrv/hspsdom/bwins/hspsdomdocumentu.def
homescreenpluginsrv/hspsdom/eabi/hspsdomdocumentu.def
homescreenpluginsrv/hspsdom/src/hspsdomnode.cpp
homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h
homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h
homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp
homescreensrv_plat/ai_content_model_api/group/bld.inf
homescreensrv_plat/ai_content_model_api/inc/aicontentmodel.h
homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.h
homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.inl
homescreensrv_plat/ai_content_model_api/inc/aicontentrequest.h
homescreensrv_plat/ai_plugin_management_api/group/bld.inf
homescreensrv_plat/ai_plugin_management_api/inc/aiprofilepluginuids.hrh
homescreensrv_plat/ai_plugin_management_api/inc/aiscutappuids.hrh
homescreensrv_plat/ai_plugin_management_api/inc/aiscutcontentmodel.h
homescreensrv_plat/ai_plugin_management_api/inc/aiscutdefs.h
homescreensrv_plat/ai_plugin_management_api/inc/aiscutuids.hrh
homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisher.h
homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisher.inl
homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisheruid.hrh
homescreensrv_plat/ai_plugin_management_api/inc/hspublisherinfo.h
homescreensrv_plat/ai_plugin_management_api/inc/hspublisherinfo.inl
homescreensrv_plat/ai_shortcut_command_api/ai_shortcut_command_api.metaxml
homescreensrv_plat/ai_shortcut_command_api/group/bld.inf
homescreensrv_plat/ai_shortcut_command_api/inc/aiscutplugindomaincrkeys.h
homescreensrv_plat/ai_utilities_api/inc/aiplugintool.h
homescreensrv_plat/group/bld.inf
homescreensrv_plat/hs_settings_api/inc/hspluginsettings.h
homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp
homescreensrv_plat/idlefw_api/group/bld.inf
homescreensrv_plat/idlefw_api/inc/aifwdefs.h
homescreensrv_plat/idlefw_api/inc/aifweventhandler.h
homescreensrv_plat/idlefw_api/inc/aifwstatehandler.h
homescreensrv_plat/idlefw_api/inc/aiuicontroller.h
homescreensrv_plat/idlefw_api/inc/aiuiframeworkobserver.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.der
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.key
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_armv5.pkg
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_winscw.pkg
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_customization_1.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget/widgetconfiguration_customized.xml
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/hs_logo.jpg
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/locale.dtd
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/widget.bmp
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/hs_logo.jpg
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/locale.dtd
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/widget.bmp
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/hs_logo.jpg
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/locale.dtd
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/widget.bmp
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/manifest.dat
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/plugin_0998_101FB657_2000B133_2.0.dat
homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/widgetconfiguration.xml
homescreensrv_plat/shortcutplugin_extension_api/group/bld.inf
homescreensrv_plat/shortcutplugin_extension_api/inc/aiscutextdefs.h
homescreensrv_plat/shortcutplugin_extension_api/inc/aiscutextserv.h
homescreensrv_plat/shortcutplugin_extension_api/shortcutplugin_extension_api.metaxml
homescreensrv_plat/xcfw_api/inc/xcfwengine.h
idlefw/group/aifw.mmp
idlefw/group/bld.inf
idlefw/inc/framework/aibackuprestorestatusobserver.h
idlefw/inc/framework/aicallstatusobserver.h
idlefw/inc/framework/aicontentpluginmanager.h
idlefw/inc/framework/aidevicestatusobserver.h
idlefw/inc/framework/aiecomobserver.h
idlefw/inc/framework/aienvironmentchangeobserver.h
idlefw/inc/framework/aieventhandler.h
idlefw/inc/framework/aifocusobserver.h
idlefw/inc/framework/aifw.h
idlefw/inc/framework/aifwstartupscheduler.h
idlefw/inc/framework/aikeylockobserver.h
idlefw/inc/framework/ailightstatusobserver.h
idlefw/inc/framework/ainetworklistener.h
idlefw/inc/framework/ainetworkobserver.h
idlefw/inc/framework/ainwsdlgcontroller.h
idlefw/inc/framework/aipluginactivitypstool.h
idlefw/inc/framework/aipluginfactory.h
idlefw/inc/framework/aipluginlifecycleobserver.h
idlefw/inc/framework/aipluginstate.h
idlefw/inc/framework/aipluginstatemachine.h
idlefw/inc/framework/aipluginstatemachineimpl.h
idlefw/inc/framework/aipluginstatemanager.h
idlefw/inc/framework/aipsstatusobserver.h
idlefw/inc/framework/aissaverstatusobserver.h
idlefw/inc/framework/aistatealive.h
idlefw/inc/framework/aistateidle.h
idlefw/inc/framework/aistatemanager.h
idlefw/inc/framework/aistateobserver.h
idlefw/inc/framework/aistateprovider.h
idlefw/inc/framework/aistatesuspended.h
idlefw/inc/framework/aiuicontrollermanager.h
idlefw/inc/framework/aiuiframeworkobserverimpl.h
idlefw/inc/utility/caiplugintool.h
idlefw/plugins/devicestatus/data/aidevstaplg.rss
idlefw/plugins/devicestatus/data/aidevstaplgres.rss
idlefw/plugins/devicestatus/group/aidevstaplg.mmp
idlefw/plugins/devicestatus/group/bld.inf
idlefw/plugins/devicestatus/inc/aibtsappublisher.h
idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h
idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h
idlefw/plugins/devicestatus/inc/aicugpublisher.h
idlefw/plugins/devicestatus/inc/aidatepublisher.h
idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h
idlefw/plugins/devicestatus/inc/aidevicestatuspluginengine.h
idlefw/plugins/devicestatus/inc/aidevicestatuspublisher.h
idlefw/plugins/devicestatus/inc/aimcnpublisher.h
idlefw/plugins/devicestatus/inc/aimulticontentobserver.h
idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h
idlefw/plugins/devicestatus/inc/ainwspublisher.h
idlefw/plugins/devicestatus/inc/aioperatorlogopublisher.h
idlefw/plugins/devicestatus/inc/aioperatornamepublisher.h
idlefw/plugins/devicestatus/inc/aipublisherfactory.h
idlefw/plugins/devicestatus/inc/aipublishprioritizer.h
idlefw/plugins/devicestatus/inc/aisimregpublisher.h
idlefw/plugins/devicestatus/inc/aivhzpublisher.h
idlefw/plugins/devicestatus/rom/aidevicestatusplugin.iby
idlefw/plugins/devicestatus/rom/aidevicestatusplugin_resources.iby
idlefw/plugins/devicestatus/src/aibtsappublisher.cpp
idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp
idlefw/plugins/devicestatus/src/aicugmcnpublisher.cpp
idlefw/plugins/devicestatus/src/aicugpublisher.cpp
idlefw/plugins/devicestatus/src/aidatepublisher.cpp
idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp
idlefw/plugins/devicestatus/src/aidevicestatuspluginengine.cpp
idlefw/plugins/devicestatus/src/aidevstaplg.rss
idlefw/plugins/devicestatus/src/aidevstaplgres.rss
idlefw/plugins/devicestatus/src/aimcnpublisher.cpp
idlefw/plugins/devicestatus/src/aimulticontentobserver.cpp
idlefw/plugins/devicestatus/src/ainwspublisher.cpp
idlefw/plugins/devicestatus/src/aioperatorlogopublisher.cpp
idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp
idlefw/plugins/devicestatus/src/aipublisherfactory.cpp
idlefw/plugins/devicestatus/src/aipublishprioritizer.cpp
idlefw/plugins/devicestatus/src/aisimregpublisher.cpp
idlefw/plugins/devicestatus/src/aivhzpublisher.cpp
idlefw/plugins/group/aidevstaplg.mmp
idlefw/plugins/group/aiwsplugin.mmp
idlefw/plugins/group/bld.inf
idlefw/plugins/mcsplugin/data/mcsplugin.rss
idlefw/plugins/mcsplugin/data/mcspluginres.rss
idlefw/plugins/mcsplugin/data/mcspluginuids.hrh
idlefw/plugins/mcsplugin/group/mcsplugin.mmp
idlefw/plugins/mcsplugin/group/mcspluginhandler.mmp
idlefw/plugins/mcsplugin/handler/inc/mcspluginhandler.h
idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp
idlefw/plugins/mcsplugin/loc/mcsplugin.loc
idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h
idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h
idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp
idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp
idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp
idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h
idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp
idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp
idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp
idlefw/plugins/profileplugin/data/aiprofileplugin.rss
idlefw/plugins/profileplugin/data/aiprofilepluginres.rss
idlefw/plugins/profileplugin/group/aiprofileplugin.mmp
idlefw/plugins/profileplugin/inc/caiprofileengine.h
idlefw/plugins/profileplugin/inc/caiprofileplugin.h
idlefw/plugins/profileplugin/inc/maiprofilepluginnotifier.h
idlefw/plugins/profileplugin/src/caiprofileengine.cpp
idlefw/plugins/profileplugin/src/caiprofileplugin.cpp
idlefw/plugins/pslnactiveidleplugin/data/pslnactiveidleplugin.rss
idlefw/plugins/pslnactiveidleplugin/data/pslnactiveidlepluginrsc.rss
idlefw/plugins/pslnactiveidleplugin/group/bld.inf
idlefw/plugins/pslnactiveidleplugin/group/pslnactiveidleplugin.mmp
idlefw/plugins/pslnactiveidleplugin/group/pslnactiveidlepluginicons.mk
idlefw/plugins/pslnactiveidleplugin/inc/gsactiveidleplugin.h
idlefw/plugins/pslnactiveidleplugin/inc/gsactiveidleplugincontainer.h
idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugin.h
idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugin.hrh
idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugincontainer.h
idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidlepluginengine.h
idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidlepluginuids.h
idlefw/plugins/pslnactiveidleplugin/inc/pslnconst.h
idlefw/plugins/pslnactiveidleplugin/loc/pslnactiveidle3plugin.loc
idlefw/plugins/pslnactiveidleplugin/rom/pslnactiveidleplugin.iby
idlefw/plugins/pslnactiveidleplugin/rom/pslnactiveidleplugin_resources.iby
idlefw/plugins/pslnactiveidleplugin/src/gsactiveidleplugin.cpp
idlefw/plugins/pslnactiveidleplugin/src/gsactiveidleplugincontainer.cpp
idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidleplugin.cpp
idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidleplugincontainer.cpp
idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidlepluginengine.cpp
idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidlepluginimplementationtable.cpp
idlefw/plugins/sapidataplugin/data/sapidataplugin.rss
idlefw/plugins/sapidataplugin/inc/sapidata.h
idlefw/plugins/sapidataplugin/inc/sapidataobserver.h
idlefw/plugins/sapidataplugin/inc/sapidataplugin.h
idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h
idlefw/plugins/sapidataplugin/inc/sapidatapluginuids.hrh
idlefw/plugins/sapidataplugin/src/sapidata.cpp
idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp
idlefw/plugins/shortcutplugin/BWINS/aiscutextservu.def
idlefw/plugins/shortcutplugin/EABI/aiscutextservu.def
idlefw/plugins/shortcutplugin/cenrep/keys_scutplugin.xls
idlefw/plugins/shortcutplugin/conf/scutplugin.confml
idlefw/plugins/shortcutplugin/conf/scutplugin_10275104.crml
idlefw/plugins/shortcutplugin/group/aiscutextserv.mmp
idlefw/plugins/shortcutplugin/group/aiscutplugin.mmp
idlefw/plugins/shortcutplugin/group/aiscutsettings.mmp
idlefw/plugins/shortcutplugin/group/backup_registration.xml
idlefw/plugins/shortcutplugin/group/bld.inf
idlefw/plugins/shortcutplugin/inc/aidefaultshortcut.h
idlefw/plugins/shortcutplugin/inc/aiscutapptitle.rh
idlefw/plugins/shortcutplugin/inc/aiscutappuidparser.h
idlefw/plugins/shortcutplugin/inc/aiscutfactory.h
idlefw/plugins/shortcutplugin/inc/aiscutpluginprivatecrkeys.h
idlefw/plugins/shortcutplugin/inc/aiscutrepositorywatcher.h
idlefw/plugins/shortcutplugin/inc/aiscutsettings.hrh
idlefw/plugins/shortcutplugin/inc/aiscuttargetshutter.h
idlefw/plugins/shortcutplugin/inc/caiscutengine.h
idlefw/plugins/shortcutplugin/inc/caiscutengine.inl
idlefw/plugins/shortcutplugin/inc/caiscutengineext.h
idlefw/plugins/shortcutplugin/inc/caiscutextdata.h
idlefw/plugins/shortcutplugin/inc/caiscutextdatamodel.h
idlefw/plugins/shortcutplugin/inc/caiscutextserver.h
idlefw/plugins/shortcutplugin/inc/caiscutextsession.h
idlefw/plugins/shortcutplugin/inc/caiscutplugin.h
idlefw/plugins/shortcutplugin/inc/caiscutsettings.h
idlefw/plugins/shortcutplugin/inc/caiscutsettingsapplist.h
idlefw/plugins/shortcutplugin/inc/caiscutsettingsbkmlist.h
idlefw/plugins/shortcutplugin/inc/caiscutsettingscontainer.h
idlefw/plugins/shortcutplugin/inc/caiscutsettingsitem.h
idlefw/plugins/shortcutplugin/inc/caiscutsettingsitem.inl
idlefw/plugins/shortcutplugin/inc/caiscutsettingsmodel.h
idlefw/plugins/shortcutplugin/inc/caiscutshortcut.h
idlefw/plugins/shortcutplugin/inc/caiscutshortcutext.h
idlefw/plugins/shortcutplugin/inc/caiscutshortcutinfo.h
idlefw/plugins/shortcutplugin/inc/caiscuttarget.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetapp.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetbkm.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetempty.h
idlefw/plugins/shortcutplugin/inc/caiscuttargethttp.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetkeylock.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetmessagingview.h
idlefw/plugins/shortcutplugin/inc/caiscuttargetnewmsg.h
idlefw/plugins/shortcutplugin/inc/cpopupeventhandler.h
idlefw/plugins/shortcutplugin/inc/maiscutextdata.h
idlefw/plugins/shortcutplugin/inc/maiscutextmessagehandler.h
idlefw/plugins/shortcutplugin/inc/mpopupeventhandleractions.h
idlefw/plugins/shortcutplugin/inc/taiscutparser.h
idlefw/plugins/shortcutplugin/loc/ai3scutplugin.loc
idlefw/plugins/shortcutplugin/loc/ai3scutsettings.loc
idlefw/plugins/shortcutplugin/rom/aiscutplugin.iby
idlefw/plugins/shortcutplugin/rom/aiscutplugin_resources.iby
idlefw/plugins/shortcutplugin/src/GenPopupFSM.py
idlefw/plugins/shortcutplugin/src/MPopupFSMActions.h
idlefw/plugins/shortcutplugin/src/PopupFSM.cpp
idlefw/plugins/shortcutplugin/src/PopupFSM.h
idlefw/plugins/shortcutplugin/src/PopupTrace.h
idlefw/plugins/shortcutplugin/src/aidefaultshortcut.cpp
idlefw/plugins/shortcutplugin/src/aiscutappuidparser.cpp
idlefw/plugins/shortcutplugin/src/aiscutextserv.cpp
idlefw/plugins/shortcutplugin/src/aiscutfactory.cpp
idlefw/plugins/shortcutplugin/src/aiscutfactoryext.cpp
idlefw/plugins/shortcutplugin/src/aiscutplugin.rss
idlefw/plugins/shortcutplugin/src/aiscutpluginres.rss
idlefw/plugins/shortcutplugin/src/aiscutrepositorywatcher.cpp
idlefw/plugins/shortcutplugin/src/aiscutsettings.rss
idlefw/plugins/shortcutplugin/src/aiscutsettingsres.rss
idlefw/plugins/shortcutplugin/src/aiscuttargetshutter.cpp
idlefw/plugins/shortcutplugin/src/aiscuttexts.rss
idlefw/plugins/shortcutplugin/src/caiscutengine.cpp
idlefw/plugins/shortcutplugin/src/caiscutengineext.cpp
idlefw/plugins/shortcutplugin/src/caiscutextdata.cpp
idlefw/plugins/shortcutplugin/src/caiscutextdatamodel.cpp
idlefw/plugins/shortcutplugin/src/caiscutextserver.cpp
idlefw/plugins/shortcutplugin/src/caiscutextsession.cpp
idlefw/plugins/shortcutplugin/src/caiscutplugin.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettings.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingsapplist.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingsbkmlist.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingscontainer.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingsimplementationtable.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingsitem.cpp
idlefw/plugins/shortcutplugin/src/caiscutsettingsmodel.cpp
idlefw/plugins/shortcutplugin/src/caiscutshortcut.cpp
idlefw/plugins/shortcutplugin/src/caiscutshortcutext.cpp
idlefw/plugins/shortcutplugin/src/caiscutshortcutinfo.cpp
idlefw/plugins/shortcutplugin/src/caiscuttarget.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetapp.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetbkm.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetempty.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargethttp.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetkeylock.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetmessagingview.cpp
idlefw/plugins/shortcutplugin/src/caiscuttargetnewmsg.cpp
idlefw/plugins/shortcutplugin/src/cpopupeventhandler.cpp
idlefw/plugins/shortcutplugin/src/taiscutparser.cpp
idlefw/plugins/wrtdataplugin/data/wrtdataplugin.rss
idlefw/plugins/wrtdataplugin/inc/wrtdata.h
idlefw/plugins/wrtdataplugin/inc/wrtdataobserver.h
idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h
idlefw/plugins/wrtdataplugin/inc/wrtdatapluginuids.hrh
idlefw/plugins/wrtdataplugin/src/wrtdata.cpp
idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp
idlefw/plugins/wsplugin/group/aiwsplugin.mmp
idlefw/plugins/wsplugin/group/bld.inf
idlefw/plugins/wsplugin/inc/keyhandlertimer.h
idlefw/plugins/wsplugin/inc/keylockcontrol.h
idlefw/plugins/wsplugin/inc/keylockhandler.h
idlefw/plugins/wsplugin/inc/keylockstates.h
idlefw/plugins/wsplugin/inc/keypadsettings.h
idlefw/plugins/wsplugin/inc/logslaunchhandler.h
idlefw/plugins/wsplugin/inc/numerickeyhandler.h
idlefw/plugins/wsplugin/inc/sindlaunchhandler.h
idlefw/plugins/wsplugin/src/aiwspluginanim.cpp
idlefw/plugins/wsplugin/src/keyhandlertimer.cpp
idlefw/plugins/wsplugin/src/keylockhandler.cpp
idlefw/plugins/wsplugin/src/keylockstates.cpp
idlefw/plugins/wsplugin/src/keypadsettings.cpp
idlefw/plugins/wsplugin/src/logslaunchhandler.cpp
idlefw/plugins/wsplugin/src/sindlaunchhandler.cpp
idlefw/rom/idlefw.iby
idlefw/rom/idlefw_resources.iby
idlefw/src/framework/aibackuprestorestatusobserver.cpp
idlefw/src/framework/aicallstatusobserver.cpp
idlefw/src/framework/aicontentpluginmanager.cpp
idlefw/src/framework/aiecomobserver.cpp
idlefw/src/framework/aienvironmentchangeobserver.cpp
idlefw/src/framework/aieventhandler.cpp
idlefw/src/framework/aifocusobserver.cpp
idlefw/src/framework/aifw.cpp
idlefw/src/framework/aifwstartupscheduler.cpp
idlefw/src/framework/aikeylockobserver.cpp
idlefw/src/framework/ailightstatusobserver.cpp
idlefw/src/framework/ainetworklistener.cpp
idlefw/src/framework/ainwsdlgcontroller.cpp
idlefw/src/framework/aipluginactivitypstool.cpp
idlefw/src/framework/aipluginfactory.cpp
idlefw/src/framework/aipluginstatemachineimpl.cpp
idlefw/src/framework/aipluginstatemanager.cpp
idlefw/src/framework/aipsstatusobserver.cpp
idlefw/src/framework/aissaverstatusobserver.cpp
idlefw/src/framework/aistatealive.cpp
idlefw/src/framework/aistateidle.cpp
idlefw/src/framework/aistatemanager.cpp
idlefw/src/framework/aistateprovider.cpp
idlefw/src/framework/aistatesuspended.cpp
idlefw/src/framework/aiuicontrollermanager.cpp
idlefw/src/framework/aiuiframeworkobserverimpl.cpp
idlefw/src/idleint/aiuiidleintegration.cpp
idlefw/src/utility/caiplugintool.cpp
menucontentsrv/srvsrc/mcsrunningappswgmonitor.cpp
--- a/contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -94,10 +94,10 @@
 	/** 
 	 * Removes single widget.
 	 * @param aType Widget type.
-	 * @param aContentId Widget UID.
+	 * @param aPublisherId Widget UID.
 	 */
 	void RemoveWidgetL( const TDesC& aType, 
-        const TDesC& aContentId );
+        const TDesC& aPublisherId );
 	
 
 private:
--- a/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -21,14 +21,13 @@
 
 #include <ecom/implementationproxy.h>
 #include <contentharvesterpluginuids.hrh>
-#include <LiwServiceHandler.h>
+#include <liwservicehandler.h>
 
 #include "cpglobals.h"
 #include "chswiusbhandler.h"
 #include "chswiusbobserver.h"
 
-_LIT( KHsWidgetPublisher, "hswidgetpublisher");
-_LIT( KHsPublisher, "ai3templatedwidget" );
+_LIT( KHSTemplate, "hstemplate" );
 _LIT8( KWidgetUid, "widget_uid");
 
 const TInt KWidgetArrayGran = 8;
@@ -162,8 +161,7 @@
 	inparam->AppendL( TLiwGenericParam( KType, TLiwVariant( KPublisher ) ) );
 	CLiwDefaultMap* filter = CLiwDefaultMap::NewLC();
 	
-	filter->InsertL( KPublisherId, TLiwVariant( KHsWidgetPublisher ));
-	filter->InsertL( KContentType, TLiwVariant( KHsPublisher ));
+	filter->InsertL( KContentType, TLiwVariant( KHSTemplate ));
 	inparam->AppendL( TLiwGenericParam( KFilter, TLiwVariant( filter ) ) );
 	
 	iCPSInterface->ExecuteCmdL( KGetList, *inparam, *outparam );
@@ -210,7 +208,7 @@
                     if( KErrNotFound == iApaLsSession.GetAppInfo( 
                             appInfo, TUid::Uid( variant.AsTInt32() ) ) )
                         {
-                        if( map->FindL( KContentId, variant ) )
+                        if( map->FindL( KPublisherId, variant ) )
                             {
                             notFoundWidgets->AppendL( variant.AsDes() );
                             }
@@ -248,16 +246,14 @@
 // ----------------------------------------------------------------------------
 //
 void CCHSwiPlugin::RemoveWidgetL( const TDesC& aType, 
-        const TDesC& aContentId )
+        const TDesC& aPublisherId )
     {
     CLiwGenericParamList* inparam = CLiwGenericParamList::NewLC( );
     CLiwGenericParamList* outparam = CLiwGenericParamList::NewLC( );
     inparam->AppendL( TLiwGenericParam( KType, TLiwVariant( aType ) ) );
     CLiwDefaultMap* filter = CLiwDefaultMap::NewLC();
     
-    filter->InsertL( KPublisherId, TLiwVariant( KHsWidgetPublisher ));
-    filter->InsertL( KContentType, TLiwVariant( KHsPublisher ));
-    filter->InsertL( KContentId, TLiwVariant( aContentId ));
+    filter->InsertL( KPublisherId, TLiwVariant( aPublisherId ));
     inparam->AppendL( TLiwGenericParam( KFilter, TLiwVariant( filter ) ) );
     
     iCPSInterface->ExecuteCmdL( KDelete, *inparam, *outparam );
--- a/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiusbhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiusbhandler.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -21,7 +21,7 @@
 #include "chswiusbhandler.h"
 #include "chswiplugin.h"
 #include "chswimassmodeobserver.h"
-#include <DriveInfo.h>
+#include <driveinfo.h>
 
 // CONSTANTS
 const TInt KCallBackDelay = 5000000;
--- a/contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -241,13 +241,10 @@
 void CCpStorageEngine::CreateNewDbL()
     {
     TSecureId id( KServerUid ); // Uid of CP Server - only this process has access rights
-    TSecurityPolicy defaultPolicy;
-    TSecurityPolicy securityPolicy(id);
+    TSecurityPolicy defaultPolicy( id );
     RSqlSecurityPolicy sqlSecurityPolicy;
     CleanupClosePushL( sqlSecurityPolicy );
     User::LeaveIfError( sqlSecurityPolicy.Create( defaultPolicy ) );
-    User::LeaveIfError( sqlSecurityPolicy.SetDbPolicy(
-        RSqlSecurityPolicy::ESchemaPolicy, securityPolicy ) );
 #ifdef CONTENT_PUBLISHER_STORAGE_MT
     iSqlDb.CreateL( KCPpathdatabase, &KMdsSqlDbaConfig );
 #else
--- a/homescreenpluginsrv/hspsdom/bwins/hspsdomdocumentu.def	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsdom/bwins/hspsdomdocumentu.def	Fri Feb 19 23:07:29 2010 +0200
@@ -1,74 +1,73 @@
 EXPORTS
-	??1ChspsDomAttribute@@UAE@XZ @ 1 NONAME ; ChspsDomAttribute::~ChspsDomAttribute(void)
-	??1ChspsDomDepthIterator@@UAE@XZ @ 2 NONAME ; ChspsDomDepthIterator::~ChspsDomDepthIterator(void)
-	??1ChspsDomDocument@@UAE@XZ @ 3 NONAME ; ChspsDomDocument::~ChspsDomDocument(void)
-	?AddChildL@ChspsDomNode@@QAEXPAV1@@Z @ 4 NONAME ; void ChspsDomNode::AddChildL(class ChspsDomNode *)
-	?AddChildL@ChspsDomNode@@QAEXPAV1@H@Z @ 5 NONAME ; void ChspsDomNode::AddChildL(class ChspsDomNode *, int)
-	?AddItemL@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 6 NONAME ; void ChspsDomList::AddItemL(class MhspsDomListItem *)
-	?AddItemL@ChspsDomList@@QAEXPAVMhspsDomListItem@@H@Z @ 7 NONAME ; void ChspsDomList::AddItemL(class MhspsDomListItem *, int)
-	?AddStringL@ChspsDomStringPool@@QAEHABVTDesC8@@@Z @ 8 NONAME ; int ChspsDomStringPool::AddStringL(class TDesC8 const &)
-	?AppendPCDataL@ChspsDomNode@@QAEXABVTDesC8@@@Z @ 9 NONAME ; void ChspsDomNode::AppendPCDataL(class TDesC8 const &)
-	?AttributeList@ChspsDomNode@@QBEAAVChspsDomList@@XZ @ 10 NONAME ; class ChspsDomList & ChspsDomNode::AttributeList(void) const
-	?AttributeValue@ChspsDomNode@@QBEABVTDesC8@@ABV2@@Z @ 11 NONAME ; class TDesC8 const & ChspsDomNode::AttributeValue(class TDesC8 const &) const
-	?ChildNodes@ChspsDomNode@@QAEAAVChspsDomList@@XZ @ 12 NONAME ; class ChspsDomList & ChspsDomNode::ChildNodes(void)
-	?CloneL@ChspsDomAttribute@@QAEPAV1@XZ @ 13 NONAME ; class ChspsDomAttribute * ChspsDomAttribute::CloneL(void)
-	?CloneL@ChspsDomDocument@@QAEPAV1@XZ @ 14 NONAME ; class ChspsDomDocument * ChspsDomDocument::CloneL(void)
-	?CloneL@ChspsDomNode@@QAEPAV1@AAVChspsDomStringPool@@@Z @ 15 NONAME ; class ChspsDomNode * ChspsDomNode::CloneL(class ChspsDomStringPool &)
-	?CloneWithoutKidsL@ChspsDomNode@@QAEPAV1@AAVChspsDomStringPool@@@Z @ 16 NONAME ; class ChspsDomNode * ChspsDomNode::CloneWithoutKidsL(class ChspsDomStringPool &)
-	?ContentType@ChspsDomNode@@QAEABW4TContentType@@XZ @ 17 NONAME ; enum TContentType const & ChspsDomNode::ContentType(void)
-	?CreateElementNSL@ChspsDomDocument@@QAEPAVChspsDomNode@@ABVTDesC8@@0@Z @ 18 NONAME ; class ChspsDomNode * ChspsDomDocument::CreateElementNSL(class TDesC8 const &, class TDesC8 const &)
-	?CreateRefNodeL@ChspsDomNode@@QAEPAV1@XZ @ 19 NONAME ; class ChspsDomNode * ChspsDomNode::CreateRefNodeL(void)
-	?DeleteAttributeList@ChspsDomNode@@QAEXXZ @ 20 NONAME ; void ChspsDomNode::DeleteAttributeList(void)
-	?DeleteChild@ChspsDomNode@@QAEXPAV1@@Z @ 21 NONAME ; void ChspsDomNode::DeleteChild(class ChspsDomNode *)
-	?DeleteItem@ChspsDomList@@QAEXH@Z @ 22 NONAME ; void ChspsDomList::DeleteItem(int)
-	?DeleteItem@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 23 NONAME ; void ChspsDomList::DeleteItem(class MhspsDomListItem *)
-	?DescendantCount@ChspsDomNode@@QBEHXZ @ 24 NONAME ; int ChspsDomNode::DescendantCount(void) const
-	?DomNodeCount@ChspsDomDocument@@QBEHXZ @ 25 NONAME ; int ChspsDomDocument::DomNodeCount(void) const
-	?ExternalizeL@ChspsDomDocument@@QBEXAAVRWriteStream@@@Z @ 26 NONAME ; void ChspsDomDocument::ExternalizeL(class RWriteStream &) const
-	?FindByName@ChspsDomList@@QAEPAVMhspsDomListItem@@ABVTDesC8@@@Z @ 27 NONAME ; class MhspsDomListItem * ChspsDomList::FindByName(class TDesC8 const &)
-	?First@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@XZ @ 28 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::First(void)
-	?First@ChspsDomList@@QAEPAVMhspsDomListItem@@XZ @ 29 NONAME ; class MhspsDomListItem * ChspsDomList::First(void)
-	?InternalizeL@ChspsDomDocument@@QAEXAAVRReadStream@@@Z @ 30 NONAME ; void ChspsDomDocument::InternalizeL(class RReadStream &)
-	?IsRefNode@ChspsDomNode@@QBEHXZ @ 31 NONAME ; int ChspsDomNode::IsRefNode(void) const
-	?Item@ChspsDomList@@QBEPAVMhspsDomListItem@@H@Z @ 32 NONAME ; class MhspsDomListItem * ChspsDomList::Item(int) const
-	?ItemIndex@ChspsDomList@@QBEHABVMhspsDomListItem@@@Z @ 33 NONAME ; int ChspsDomList::ItemIndex(class MhspsDomListItem const &) const
-	?ItemIndex@ChspsDomNode@@QBEHABVMhspsDomListItem@@@Z @ 34 NONAME ; int ChspsDomNode::ItemIndex(class MhspsDomListItem const &) const
-	?Last@ChspsDomList@@QAEPAVMhspsDomListItem@@XZ @ 35 NONAME ; class MhspsDomListItem * ChspsDomList::Last(void)
-	?LastNode@ChspsDomDocument@@QBEPAVChspsDomNode@@XZ @ 36 NONAME ; class ChspsDomNode * ChspsDomDocument::LastNode(void) const
-	?LayoutNode@ChspsDomNode@@QAEPAVChspsNode@@XZ @ 37 NONAME ; class ChspsNode * ChspsDomNode::LayoutNode(void)
-	?Length@ChspsDomList@@QBEHXZ @ 38 NONAME ; int ChspsDomList::Length(void) const
-	?MarshallL@ChspsDomDocument@@QAEPAVHBufC8@@XZ @ 39 NONAME ; class HBufC8 * ChspsDomDocument::MarshallL(void)
-	?Name@ChspsDomAttribute@@UAEABVTDesC8@@XZ @ 40 NONAME ; class TDesC8 const & ChspsDomAttribute::Name(void)
-	?Name@ChspsDomNode@@UAEABVTDesC8@@XZ @ 41 NONAME ; class TDesC8 const & ChspsDomNode::Name(void)
-	?NameStringPoolIndex@ChspsDomAttribute@@QBEFXZ @ 42 NONAME ; short ChspsDomAttribute::NameStringPoolIndex(void) const
-	?Namespace@ChspsDomNode@@QAEABVTDesC8@@XZ @ 43 NONAME ; class TDesC8 const & ChspsDomNode::Namespace(void)
-	?NewL@ChspsDomAttribute@@SAPAV1@ABVTDesC8@@AAVChspsDomStringPool@@@Z @ 44 NONAME ; class ChspsDomAttribute * ChspsDomAttribute::NewL(class TDesC8 const &, class ChspsDomStringPool &)
-	?NewL@ChspsDomDepthIterator@@SAPAV1@AAVChspsDomNode@@@Z @ 45 NONAME ; class ChspsDomDepthIterator * ChspsDomDepthIterator::NewL(class ChspsDomNode &)
-	?NewL@ChspsDomDocument@@SAPAV1@AAVRReadStream@@@Z @ 46 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(class RReadStream &)
-	?NewL@ChspsDomDocument@@SAPAV1@PBVHBufC8@@@Z @ 47 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(class HBufC8 const *)
-	?NewL@ChspsDomDocument@@SAPAV1@XZ @ 48 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(void)
-	?NextL@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@XZ @ 49 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::NextL(void)
-	?NextSibling@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@AAV2@@Z @ 50 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::NextSibling(class ChspsDomNode &)
-	?NodeId@ChspsDomNode@@QBEHXZ @ 51 NONAME ; int ChspsDomNode::NodeId(void) const
-	?PCData@ChspsDomNode@@QAEABVTDesC8@@XZ @ 52 NONAME ; class TDesC8 const & ChspsDomNode::PCData(void)
-	?Parent@ChspsDomNode@@QBEPAV1@XZ @ 53 NONAME ; class ChspsDomNode * ChspsDomNode::Parent(void) const
-	?RemoveItem@ChspsDomList@@QAEXH@Z @ 54 NONAME ; void ChspsDomList::RemoveItem(int)
-	?RemoveItem@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 55 NONAME ; void ChspsDomList::RemoveItem(class MhspsDomListItem *)
-	?ReplaceChildL@ChspsDomNode@@QAEXPAV1@0@Z @ 56 NONAME ; void ChspsDomNode::ReplaceChildL(class ChspsDomNode *, class ChspsDomNode *)
-	?Reset@ChspsDomList@@QAEXXZ @ 57 NONAME ; void ChspsDomList::Reset(void)
-	?RootNode@ChspsDomDocument@@QBEPAVChspsDomNode@@XZ @ 58 NONAME ; class ChspsDomNode * ChspsDomDocument::RootNode(void) const
-	?SetContentType@ChspsDomNode@@QAEXABW4TContentType@@@Z @ 59 NONAME ; void ChspsDomNode::SetContentType(enum TContentType const &)
-	?SetLayoutNode@ChspsDomNode@@QAEXPAVChspsNode@@@Z @ 60 NONAME ; void ChspsDomNode::SetLayoutNode(class ChspsNode *)
-	?SetNodeId@ChspsDomNode@@QAEXH@Z @ 61 NONAME ; void ChspsDomNode::SetNodeId(int)
-	?SetPCDataL@ChspsDomNode@@QAEXABVTDesC8@@@Z @ 62 NONAME ; void ChspsDomNode::SetPCDataL(class TDesC8 const &)
-	?SetParent@ChspsDomNode@@QAEXPAV1@@Z @ 63 NONAME ; void ChspsDomNode::SetParent(class ChspsDomNode *)
-	?SetRefNode@ChspsDomNode@@QAEXH@Z @ 64 NONAME ; void ChspsDomNode::SetRefNode(int)
-	?SetRootNode@ChspsDomDocument@@QAEXPAVChspsDomNode@@@Z @ 65 NONAME ; void ChspsDomDocument::SetRootNode(class ChspsDomNode *)
-	?SetValueL@ChspsDomAttribute@@QAEXABVTDesC8@@@Z @ 66 NONAME ; void ChspsDomAttribute::SetValueL(class TDesC8 const &)
-	?Size@ChspsDomDocument@@QBEHXZ @ 67 NONAME ; int ChspsDomDocument::Size(void) const
-	?StringPool@ChspsDomDocument@@QBEAAVChspsDomStringPool@@XZ @ 68 NONAME ; class ChspsDomStringPool & ChspsDomDocument::StringPool(void) const
-	?StringPool@ChspsDomList@@QBEAAVChspsDomStringPool@@XZ @ 69 NONAME ; class ChspsDomStringPool & ChspsDomList::StringPool(void) const
-	?StringPool@ChspsDomNode@@QBEAAVChspsDomStringPool@@XZ @ 70 NONAME ; class ChspsDomStringPool & ChspsDomNode::StringPool(void) const
-	?Value@ChspsDomAttribute@@QAEABVTDesC8@@XZ @ 71 NONAME ; class TDesC8 const & ChspsDomAttribute::Value(void)
-	?ValueStringPoolIndex@ChspsDomAttribute@@QBEFXZ @ 72 NONAME ; short ChspsDomAttribute::ValueStringPoolIndex(void) const
+	?MarshallL@ChspsDomDocument@@QAEPAVHBufC8@@XZ @ 1 NONAME ; class HBufC8 * ChspsDomDocument::MarshallL(void)
+	?NewL@ChspsDomDepthIterator@@SAPAV1@AAVChspsDomNode@@@Z @ 2 NONAME ; class ChspsDomDepthIterator * ChspsDomDepthIterator::NewL(class ChspsDomNode &)
+	?RemoveItem@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 3 NONAME ; void ChspsDomList::RemoveItem(class MhspsDomListItem *)
+	?LayoutNode@ChspsDomNode@@QAEPAVChspsNode@@XZ @ 4 NONAME ; class ChspsNode * ChspsDomNode::LayoutNode(void)
+	?First@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@XZ @ 5 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::First(void)
+	?Length@ChspsDomList@@QBEHXZ @ 6 NONAME ; int ChspsDomList::Length(void) const
+	?ExternalizeL@ChspsDomDocument@@QBEXAAVRWriteStream@@@Z @ 7 NONAME ; void ChspsDomDocument::ExternalizeL(class RWriteStream &) const
+	?SetLayoutNode@ChspsDomNode@@QAEXPAVChspsNode@@@Z @ 8 NONAME ; void ChspsDomNode::SetLayoutNode(class ChspsNode *)
+	?ChildNodes@ChspsDomNode@@QAEAAVChspsDomList@@XZ @ 9 NONAME ; class ChspsDomList & ChspsDomNode::ChildNodes(void)
+	?FindByName@ChspsDomList@@QAEPAVMhspsDomListItem@@ABVTDesC8@@@Z @ 10 NONAME ; class MhspsDomListItem * ChspsDomList::FindByName(class TDesC8 const &)
+	?Last@ChspsDomList@@QAEPAVMhspsDomListItem@@XZ @ 11 NONAME ; class MhspsDomListItem * ChspsDomList::Last(void)
+	?RemoveItem@ChspsDomList@@QAEXH@Z @ 12 NONAME ; void ChspsDomList::RemoveItem(int)
+	?InternalizeL@ChspsDomDocument@@QAEXAAVRReadStream@@@Z @ 13 NONAME ; void ChspsDomDocument::InternalizeL(class RReadStream &)
+	?PCData@ChspsDomNode@@QAEABVTDesC8@@XZ @ 14 NONAME ; class TDesC8 const & ChspsDomNode::PCData(void)
+	?CloneWithoutKidsL@ChspsDomNode@@QAEPAV1@AAVChspsDomStringPool@@@Z @ 15 NONAME ; class ChspsDomNode * ChspsDomNode::CloneWithoutKidsL(class ChspsDomStringPool &)
+	?AddStringL@ChspsDomStringPool@@QAEHABVTDesC8@@@Z @ 16 NONAME ; int ChspsDomStringPool::AddStringL(class TDesC8 const &)
+	?DeleteItem@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 17 NONAME ; void ChspsDomList::DeleteItem(class MhspsDomListItem *)
+	?Size@ChspsDomDocument@@QBEHXZ @ 18 NONAME ; int ChspsDomDocument::Size(void) const
+	?StringPool@ChspsDomList@@QBEAAVChspsDomStringPool@@XZ @ 19 NONAME ; class ChspsDomStringPool & ChspsDomList::StringPool(void) const
+	?SetValueL@ChspsDomAttribute@@QAEXABVTDesC8@@@Z @ 20 NONAME ; void ChspsDomAttribute::SetValueL(class TDesC8 const &)
+	?NewL@ChspsDomAttribute@@SAPAV1@ABVTDesC8@@AAVChspsDomStringPool@@@Z @ 21 NONAME ; class ChspsDomAttribute * ChspsDomAttribute::NewL(class TDesC8 const &, class ChspsDomStringPool &)
+	?ItemIndex@ChspsDomNode@@QBEHABVMhspsDomListItem@@@Z @ 22 NONAME ; int ChspsDomNode::ItemIndex(class MhspsDomListItem const &) const
+	?AddChildL@ChspsDomNode@@QAEXPAV1@H@Z @ 23 NONAME ; void ChspsDomNode::AddChildL(class ChspsDomNode *, int)
+	?NodeId@ChspsDomNode@@QBEHXZ @ 24 NONAME ; int ChspsDomNode::NodeId(void) const
+	?SetNodeId@ChspsDomNode@@QAEXH@Z @ 25 NONAME ; void ChspsDomNode::SetNodeId(int)
+	?Item@ChspsDomList@@QBEPAVMhspsDomListItem@@H@Z @ 26 NONAME ; class MhspsDomListItem * ChspsDomList::Item(int) const
+	?ItemIndex@ChspsDomList@@QBEHABVMhspsDomListItem@@@Z @ 27 NONAME ; int ChspsDomList::ItemIndex(class MhspsDomListItem const &) const
+	?NextSibling@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@AAV2@@Z @ 28 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::NextSibling(class ChspsDomNode &)
+	?ValueStringPoolIndex@ChspsDomAttribute@@QBEFXZ @ 29 NONAME ; short ChspsDomAttribute::ValueStringPoolIndex(void) const
+	?CreateElementNSL@ChspsDomDocument@@QAEPAVChspsDomNode@@ABVTDesC8@@0@Z @ 30 NONAME ; class ChspsDomNode * ChspsDomDocument::CreateElementNSL(class TDesC8 const &, class TDesC8 const &)
+	?DeleteChild@ChspsDomNode@@QAEXPAV1@@Z @ 31 NONAME ; void ChspsDomNode::DeleteChild(class ChspsDomNode *)
+	?SetRootNode@ChspsDomDocument@@QAEXPAVChspsDomNode@@@Z @ 32 NONAME ; void ChspsDomDocument::SetRootNode(class ChspsDomNode *)
+	?ContentType@ChspsDomNode@@QAEABW4TContentType@@XZ @ 33 NONAME ; enum TContentType const & ChspsDomNode::ContentType(void)
+	?Namespace@ChspsDomNode@@QAEABVTDesC8@@XZ @ 34 NONAME ; class TDesC8 const & ChspsDomNode::Namespace(void)
+	?CloneL@ChspsDomAttribute@@QAEPAV1@XZ @ 35 NONAME ; class ChspsDomAttribute * ChspsDomAttribute::CloneL(void)
+	?AddChildL@ChspsDomNode@@QAEXPAV1@@Z @ 36 NONAME ; void ChspsDomNode::AddChildL(class ChspsDomNode *)
+	?NewL@ChspsDomDocument@@SAPAV1@XZ @ 37 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(void)
+	?IsRefNode@ChspsDomNode@@QBEHXZ @ 38 NONAME ; int ChspsDomNode::IsRefNode(void) const
+	?SetPCDataL@ChspsDomNode@@QAEXABVTDesC8@@@Z @ 39 NONAME ; void ChspsDomNode::SetPCDataL(class TDesC8 const &)
+	?Value@ChspsDomAttribute@@QAEABVTDesC8@@XZ @ 40 NONAME ; class TDesC8 const & ChspsDomAttribute::Value(void)
+	??1ChspsDomDepthIterator@@UAE@XZ @ 41 NONAME ; ChspsDomDepthIterator::~ChspsDomDepthIterator(void)
+	?CreateRefNodeL@ChspsDomNode@@QAEPAV1@XZ @ 42 NONAME ; class ChspsDomNode * ChspsDomNode::CreateRefNodeL(void)
+	?Reset@ChspsDomList@@QAEXXZ @ 43 NONAME ; void ChspsDomList::Reset(void)
+	?StringPool@ChspsDomNode@@QBEAAVChspsDomStringPool@@XZ @ 44 NONAME ; class ChspsDomStringPool & ChspsDomNode::StringPool(void) const
+	?AttributeValue@ChspsDomNode@@QBEABVTDesC8@@ABV2@@Z @ 45 NONAME ; class TDesC8 const & ChspsDomNode::AttributeValue(class TDesC8 const &) const
+	?SetContentType@ChspsDomNode@@QAEXABW4TContentType@@@Z @ 46 NONAME ; void ChspsDomNode::SetContentType(enum TContentType const &)
+	?NextL@ChspsDomDepthIterator@@UAEPAVChspsDomNode@@XZ @ 47 NONAME ; class ChspsDomNode * ChspsDomDepthIterator::NextL(void)
+	?CloneL@ChspsDomDocument@@QAEPAV1@XZ @ 48 NONAME ; class ChspsDomDocument * ChspsDomDocument::CloneL(void)
+	?AttributeList@ChspsDomNode@@QBEAAVChspsDomList@@XZ @ 49 NONAME ; class ChspsDomList & ChspsDomNode::AttributeList(void) const
+	?LastNode@ChspsDomDocument@@QBEPAVChspsDomNode@@XZ @ 50 NONAME ; class ChspsDomNode * ChspsDomDocument::LastNode(void) const
+	??1ChspsDomAttribute@@UAE@XZ @ 51 NONAME ; ChspsDomAttribute::~ChspsDomAttribute(void)
+	?NewL@ChspsDomDocument@@SAPAV1@AAVRReadStream@@@Z @ 52 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(class RReadStream &)
+	?SetParent@ChspsDomNode@@QAEXPAV1@@Z @ 53 NONAME ; void ChspsDomNode::SetParent(class ChspsDomNode *)
+	?RootNode@ChspsDomDocument@@QBEPAVChspsDomNode@@XZ @ 54 NONAME ; class ChspsDomNode * ChspsDomDocument::RootNode(void) const
+	?Name@ChspsDomNode@@UAEABVTDesC8@@XZ @ 55 NONAME ; class TDesC8 const & ChspsDomNode::Name(void)
+	?First@ChspsDomList@@QAEPAVMhspsDomListItem@@XZ @ 56 NONAME ; class MhspsDomListItem * ChspsDomList::First(void)
+	?NameStringPoolIndex@ChspsDomAttribute@@QBEFXZ @ 57 NONAME ; short ChspsDomAttribute::NameStringPoolIndex(void) const
+	?Name@ChspsDomAttribute@@UAEABVTDesC8@@XZ @ 58 NONAME ; class TDesC8 const & ChspsDomAttribute::Name(void)
+	?NewL@ChspsDomDocument@@SAPAV1@PBVHBufC8@@@Z @ 59 NONAME ; class ChspsDomDocument * ChspsDomDocument::NewL(class HBufC8 const *)
+	?ReplaceChildL@ChspsDomNode@@QAEXPAV1@0@Z @ 60 NONAME ; void ChspsDomNode::ReplaceChildL(class ChspsDomNode *, class ChspsDomNode *)
+	?AddItemL@ChspsDomList@@QAEXPAVMhspsDomListItem@@@Z @ 61 NONAME ; void ChspsDomList::AddItemL(class MhspsDomListItem *)
+	?AppendPCDataL@ChspsDomNode@@QAEXABVTDesC8@@@Z @ 62 NONAME ; void ChspsDomNode::AppendPCDataL(class TDesC8 const &)
+	?SetRefNode@ChspsDomNode@@QAEXH@Z @ 63 NONAME ; void ChspsDomNode::SetRefNode(int)
+	?AddItemL@ChspsDomList@@QAEXPAVMhspsDomListItem@@H@Z @ 64 NONAME ; void ChspsDomList::AddItemL(class MhspsDomListItem *, int)
+	?Parent@ChspsDomNode@@QBEPAV1@XZ @ 65 NONAME ; class ChspsDomNode * ChspsDomNode::Parent(void) const
+	?StringPool@ChspsDomDocument@@QBEAAVChspsDomStringPool@@XZ @ 66 NONAME ; class ChspsDomStringPool & ChspsDomDocument::StringPool(void) const
+	??1ChspsDomDocument@@UAE@XZ @ 67 NONAME ; ChspsDomDocument::~ChspsDomDocument(void)
+	?CloneL@ChspsDomNode@@QAEPAV1@AAVChspsDomStringPool@@@Z @ 68 NONAME ; class ChspsDomNode * ChspsDomNode::CloneL(class ChspsDomStringPool &)
+	?DeleteItem@ChspsDomList@@QAEXH@Z @ 69 NONAME ; void ChspsDomList::DeleteItem(int)
+	?DescendantCount@ChspsDomNode@@QBEHXZ @ 70 NONAME ; int ChspsDomNode::DescendantCount(void) const
+	?DomNodeCount@ChspsDomDocument@@QBEHXZ @ 71 NONAME ; int ChspsDomDocument::DomNodeCount(void) const
 
--- a/homescreenpluginsrv/hspsdom/eabi/hspsdomdocumentu.def	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsdom/eabi/hspsdomdocumentu.def	Fri Feb 19 23:07:29 2010 +0200
@@ -21,81 +21,80 @@
 	_ZN12ChspsDomNode14CreateRefNodeLEv @ 20 NONAME
 	_ZN12ChspsDomNode14SetContentTypeERK12TContentType @ 21 NONAME
 	_ZN12ChspsDomNode17CloneWithoutKidsLER18ChspsDomStringPool @ 22 NONAME
-	_ZN12ChspsDomNode19DeleteAttributeListEv @ 23 NONAME
-	_ZN12ChspsDomNode4NameEv @ 24 NONAME
-	_ZN12ChspsDomNode6CloneLER18ChspsDomStringPool @ 25 NONAME
-	_ZN12ChspsDomNode6PCDataEv @ 26 NONAME
-	_ZN12ChspsDomNode9AddChildLEPS_ @ 27 NONAME
-	_ZN12ChspsDomNode9AddChildLEPS_i @ 28 NONAME
-	_ZN12ChspsDomNode9NamespaceEv @ 29 NONAME
-	_ZN12ChspsDomNode9SetNodeIdEi @ 30 NONAME
-	_ZN12ChspsDomNode9SetParentEPS_ @ 31 NONAME
-	_ZN16ChspsDomDocument11SetRootNodeEP12ChspsDomNode @ 32 NONAME
-	_ZN16ChspsDomDocument12InternalizeLER11RReadStream @ 33 NONAME
-	_ZN16ChspsDomDocument16CreateElementNSLERK6TDesC8S2_ @ 34 NONAME
-	_ZN16ChspsDomDocument4NewLEPK6HBufC8 @ 35 NONAME
-	_ZN16ChspsDomDocument4NewLER11RReadStream @ 36 NONAME
-	_ZN16ChspsDomDocument4NewLEv @ 37 NONAME
-	_ZN16ChspsDomDocument6CloneLEv @ 38 NONAME
-	_ZN16ChspsDomDocument9MarshallLEv @ 39 NONAME
-	_ZN16ChspsDomDocumentD0Ev @ 40 NONAME
-	_ZN16ChspsDomDocumentD1Ev @ 41 NONAME
-	_ZN16ChspsDomDocumentD2Ev @ 42 NONAME
-	_ZN17ChspsDomAttribute4NameEv @ 43 NONAME
-	_ZN17ChspsDomAttribute4NewLERK6TDesC8R18ChspsDomStringPool @ 44 NONAME
-	_ZN17ChspsDomAttribute5ValueEv @ 45 NONAME
-	_ZN17ChspsDomAttribute6CloneLEv @ 46 NONAME
-	_ZN17ChspsDomAttribute9SetValueLERK6TDesC8 @ 47 NONAME
-	_ZN17ChspsDomAttributeD0Ev @ 48 NONAME
-	_ZN17ChspsDomAttributeD1Ev @ 49 NONAME
-	_ZN17ChspsDomAttributeD2Ev @ 50 NONAME
-	_ZN18ChspsDomStringPool10AddStringLERK6TDesC8 @ 51 NONAME
-	_ZN21ChspsDomDepthIterator11NextSiblingER12ChspsDomNode @ 52 NONAME
-	_ZN21ChspsDomDepthIterator4NewLER12ChspsDomNode @ 53 NONAME
-	_ZN21ChspsDomDepthIterator5FirstEv @ 54 NONAME
-	_ZN21ChspsDomDepthIterator5NextLEv @ 55 NONAME
-	_ZN21ChspsDomDepthIteratorD0Ev @ 56 NONAME
-	_ZN21ChspsDomDepthIteratorD1Ev @ 57 NONAME
-	_ZN21ChspsDomDepthIteratorD2Ev @ 58 NONAME
-	_ZNK12ChspsDomList10StringPoolEv @ 59 NONAME
-	_ZNK12ChspsDomList4ItemEi @ 60 NONAME
-	_ZNK12ChspsDomList6LengthEv @ 61 NONAME
-	_ZNK12ChspsDomList9ItemIndexERK16MhspsDomListItem @ 62 NONAME
-	_ZNK12ChspsDomNode10StringPoolEv @ 63 NONAME
-	_ZNK12ChspsDomNode13AttributeListEv @ 64 NONAME
-	_ZNK12ChspsDomNode14AttributeValueERK6TDesC8 @ 65 NONAME
-	_ZNK12ChspsDomNode15DescendantCountEv @ 66 NONAME
-	_ZNK12ChspsDomNode6NodeIdEv @ 67 NONAME
-	_ZNK12ChspsDomNode6ParentEv @ 68 NONAME
-	_ZNK12ChspsDomNode9IsRefNodeEv @ 69 NONAME
-	_ZNK12ChspsDomNode9ItemIndexERK16MhspsDomListItem @ 70 NONAME
-	_ZNK16ChspsDomDocument10StringPoolEv @ 71 NONAME
-	_ZNK16ChspsDomDocument12DomNodeCountEv @ 72 NONAME
-	_ZNK16ChspsDomDocument12ExternalizeLER12RWriteStream @ 73 NONAME
-	_ZNK16ChspsDomDocument4SizeEv @ 74 NONAME
-	_ZNK16ChspsDomDocument8LastNodeEv @ 75 NONAME
-	_ZNK16ChspsDomDocument8RootNodeEv @ 76 NONAME
-	_ZNK17ChspsDomAttribute19NameStringPoolIndexEv @ 77 NONAME
-	_ZNK17ChspsDomAttribute20ValueStringPoolIndexEv @ 78 NONAME
-	_ZTI12ChspsDomList @ 79 NONAME ; #<TI>#
-	_ZTI12ChspsDomNode @ 80 NONAME ; #<TI>#
-	_ZTI16ChspsDomDocument @ 81 NONAME ; #<TI>#
-	_ZTI17ChspsDomAttribute @ 82 NONAME ; #<TI>#
-	_ZTI18ChspsDomStringPool @ 83 NONAME ; #<TI>#
-	_ZTI21ChspsDomDepthIterator @ 84 NONAME ; #<TI>#
-	_ZTV12ChspsDomList @ 85 NONAME ; #<VT>#
-	_ZTV12ChspsDomNode @ 86 NONAME ; #<VT>#
-	_ZTV16ChspsDomDocument @ 87 NONAME ; #<VT>#
-	_ZTV17ChspsDomAttribute @ 88 NONAME ; #<VT>#
-	_ZTV18ChspsDomStringPool @ 89 NONAME ; #<VT>#
-	_ZTV21ChspsDomDepthIterator @ 90 NONAME ; #<VT>#
-	_ZThn4_N12ChspsDomNode4NameEv @ 91 NONAME ; #<thunk>#
-	_ZThn4_N17ChspsDomAttribute4NameEv @ 92 NONAME ; #<thunk>#
-	_ZThn4_N17ChspsDomAttributeD0Ev @ 93 NONAME ; #<thunk>#
-	_ZThn4_N17ChspsDomAttributeD1Ev @ 94 NONAME ; #<thunk>#
-	_ZThn4_N21ChspsDomDepthIterator11NextSiblingER12ChspsDomNode @ 95 NONAME ; #<thunk>#
-	_ZThn4_N21ChspsDomDepthIterator5FirstEv @ 96 NONAME ; #<thunk>#
-	_ZThn4_N21ChspsDomDepthIterator5NextLEv @ 97 NONAME ; #<thunk>#
-	_ZThn4_N21ChspsDomDepthIteratorD0Ev @ 98 NONAME ; #<thunk>#
-	_ZThn4_N21ChspsDomDepthIteratorD1Ev @ 99 NONAME ; #<thunk>#
+	_ZN12ChspsDomNode4NameEv @ 23 NONAME
+	_ZN12ChspsDomNode6CloneLER18ChspsDomStringPool @ 24 NONAME
+	_ZN12ChspsDomNode6PCDataEv @ 25 NONAME
+	_ZN12ChspsDomNode9AddChildLEPS_ @ 26 NONAME
+	_ZN12ChspsDomNode9AddChildLEPS_i @ 27 NONAME
+	_ZN12ChspsDomNode9NamespaceEv @ 28 NONAME
+	_ZN12ChspsDomNode9SetNodeIdEi @ 29 NONAME
+	_ZN12ChspsDomNode9SetParentEPS_ @ 30 NONAME
+	_ZN16ChspsDomDocument11SetRootNodeEP12ChspsDomNode @ 31 NONAME
+	_ZN16ChspsDomDocument12InternalizeLER11RReadStream @ 32 NONAME
+	_ZN16ChspsDomDocument16CreateElementNSLERK6TDesC8S2_ @ 33 NONAME
+	_ZN16ChspsDomDocument4NewLEPK6HBufC8 @ 34 NONAME
+	_ZN16ChspsDomDocument4NewLER11RReadStream @ 35 NONAME
+	_ZN16ChspsDomDocument4NewLEv @ 36 NONAME
+	_ZN16ChspsDomDocument6CloneLEv @ 37 NONAME
+	_ZN16ChspsDomDocument9MarshallLEv @ 38 NONAME
+	_ZN16ChspsDomDocumentD0Ev @ 39 NONAME
+	_ZN16ChspsDomDocumentD1Ev @ 40 NONAME
+	_ZN16ChspsDomDocumentD2Ev @ 41 NONAME
+	_ZN17ChspsDomAttribute4NameEv @ 42 NONAME
+	_ZN17ChspsDomAttribute4NewLERK6TDesC8R18ChspsDomStringPool @ 43 NONAME
+	_ZN17ChspsDomAttribute5ValueEv @ 44 NONAME
+	_ZN17ChspsDomAttribute6CloneLEv @ 45 NONAME
+	_ZN17ChspsDomAttribute9SetValueLERK6TDesC8 @ 46 NONAME
+	_ZN17ChspsDomAttributeD0Ev @ 47 NONAME
+	_ZN17ChspsDomAttributeD1Ev @ 48 NONAME
+	_ZN17ChspsDomAttributeD2Ev @ 49 NONAME
+	_ZN18ChspsDomStringPool10AddStringLERK6TDesC8 @ 50 NONAME
+	_ZN21ChspsDomDepthIterator11NextSiblingER12ChspsDomNode @ 51 NONAME
+	_ZN21ChspsDomDepthIterator4NewLER12ChspsDomNode @ 52 NONAME
+	_ZN21ChspsDomDepthIterator5FirstEv @ 53 NONAME
+	_ZN21ChspsDomDepthIterator5NextLEv @ 54 NONAME
+	_ZN21ChspsDomDepthIteratorD0Ev @ 55 NONAME
+	_ZN21ChspsDomDepthIteratorD1Ev @ 56 NONAME
+	_ZN21ChspsDomDepthIteratorD2Ev @ 57 NONAME
+	_ZNK12ChspsDomList10StringPoolEv @ 58 NONAME
+	_ZNK12ChspsDomList4ItemEi @ 59 NONAME
+	_ZNK12ChspsDomList6LengthEv @ 60 NONAME
+	_ZNK12ChspsDomList9ItemIndexERK16MhspsDomListItem @ 61 NONAME
+	_ZNK12ChspsDomNode10StringPoolEv @ 62 NONAME
+	_ZNK12ChspsDomNode13AttributeListEv @ 63 NONAME
+	_ZNK12ChspsDomNode14AttributeValueERK6TDesC8 @ 64 NONAME
+	_ZNK12ChspsDomNode15DescendantCountEv @ 65 NONAME
+	_ZNK12ChspsDomNode6NodeIdEv @ 66 NONAME
+	_ZNK12ChspsDomNode6ParentEv @ 67 NONAME
+	_ZNK12ChspsDomNode9IsRefNodeEv @ 68 NONAME
+	_ZNK12ChspsDomNode9ItemIndexERK16MhspsDomListItem @ 69 NONAME
+	_ZNK16ChspsDomDocument10StringPoolEv @ 70 NONAME
+	_ZNK16ChspsDomDocument12DomNodeCountEv @ 71 NONAME
+	_ZNK16ChspsDomDocument12ExternalizeLER12RWriteStream @ 72 NONAME
+	_ZNK16ChspsDomDocument4SizeEv @ 73 NONAME
+	_ZNK16ChspsDomDocument8LastNodeEv @ 74 NONAME
+	_ZNK16ChspsDomDocument8RootNodeEv @ 75 NONAME
+	_ZNK17ChspsDomAttribute19NameStringPoolIndexEv @ 76 NONAME
+	_ZNK17ChspsDomAttribute20ValueStringPoolIndexEv @ 77 NONAME
+	_ZTI12ChspsDomList @ 78 NONAME
+	_ZTI12ChspsDomNode @ 79 NONAME
+	_ZTI16ChspsDomDocument @ 80 NONAME
+	_ZTI17ChspsDomAttribute @ 81 NONAME
+	_ZTI18ChspsDomStringPool @ 82 NONAME
+	_ZTI21ChspsDomDepthIterator @ 83 NONAME
+	_ZTV12ChspsDomList @ 84 NONAME
+	_ZTV12ChspsDomNode @ 85 NONAME
+	_ZTV16ChspsDomDocument @ 86 NONAME
+	_ZTV17ChspsDomAttribute @ 87 NONAME
+	_ZTV18ChspsDomStringPool @ 88 NONAME
+	_ZTV21ChspsDomDepthIterator @ 89 NONAME
+	_ZThn4_N12ChspsDomNode4NameEv @ 90 NONAME
+	_ZThn4_N17ChspsDomAttribute4NameEv @ 91 NONAME
+	_ZThn4_N17ChspsDomAttributeD0Ev @ 92 NONAME
+	_ZThn4_N17ChspsDomAttributeD1Ev @ 93 NONAME
+	_ZThn4_N21ChspsDomDepthIterator11NextSiblingER12ChspsDomNode @ 94 NONAME
+	_ZThn4_N21ChspsDomDepthIterator5FirstEv @ 95 NONAME
+	_ZThn4_N21ChspsDomDepthIterator5NextLEv @ 96 NONAME
+	_ZThn4_N21ChspsDomDepthIteratorD0Ev @ 97 NONAME
+	_ZThn4_N21ChspsDomDepthIteratorD1Ev @ 98 NONAME
 
--- a/homescreenpluginsrv/hspsdom/src/hspsdomnode.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsdom/src/hspsdomnode.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -571,19 +571,6 @@
      
     return count;
     }                  
-
- 
-// -----------------------------------------------------------------------------
-// ChspsDomNode::DeleteAttributeList
-// Deletes the attribute list
-// -----------------------------------------------------------------------------
-//   
-EXPORT_C void ChspsDomNode::DeleteAttributeList()
-    {
-    delete iAttributeList;
-    iAttributeList = NULL;
-    
-    }
     
 // -----------------------------------------------------------------------------
 // ChspsDomNode::AttributeValue
--- a/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -641,6 +641,23 @@
                 const TDesC8& aTag,
                 HBufC*& aResultString );
         
+        /**
+         * Enabler for customization where the input is
+         * searched from all unremovable drives (eclipsing).
+         * Drives are searched in descending alphabetical order, 
+         * from Y: to A:, and ending with the Z: drive. 
+         * All drives which end-user can freely modify/crack 
+         * are skipped from the search.         
+         * @since S60 5.2
+         * @param aPath Path to the resource file (input)
+         * @param aFilename Name and extension of the file (input)
+         * @param aDrivePathName Full path with a drive letter to the 
+         *                       resource file (output)
+         */
+        void FindFile(                
+                const TDesC& aPath,
+                const TDesC& aFilename,
+                TFileName& aDrivePathName );
     public: 
         
         ChspsResult* iResult;
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -981,6 +981,12 @@
     void RestoreConfigurationL(
         ChspsODT& aOdt );
     
+    /**
+     * Install all widgets from uda
+     * @since S60 5.2
+     */
+    void InstallUDAWidgetsL();
+    
 #if defined(WINSCW) || defined(__WINS__)    
 
     /**
--- a/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -703,61 +703,70 @@
             {
             // Check parent element
             parentNode = node->Parent();
-            const TDesC8& parentName = parentNode->Name();
-            
+            const TDesC8& parentName = parentNode->Name();            
             if( parentName == KPluginElement )
                 { 
-                ChspsDomList& initial_settings_childList = node->ChildNodes(); 
-                                             
-                ChspsDomNode* initialSettingsNode = static_cast<ChspsDomNode*>(initial_settings_childList.FindByName( KSettingsElement ));
-                
-                ChspsDomList& initial_items = initialSettingsNode->ChildNodes();
-                                
-                ChspsDomNode* controlNode = hspsServerUtil::FindNodeByTagL(KControlElement, *parentNode ); 
-                      
-                if( controlNode )
+                ChspsDomList& initial_settings_childList = node->ChildNodes();                                              
+                ChspsDomNode* initialSettingsNode = 
+                        static_cast<ChspsDomNode*>(initial_settings_childList.FindByName( KSettingsElement ));
+                if( initialSettingsNode )
                     {
-                    ChspsDomList& controlNode_childList = controlNode->ChildNodes();
-                
-                    ChspsDomNode* settingsNode = static_cast<ChspsDomNode*>(controlNode_childList.FindByName( KSettingsElement ));
-                
-                    if( settingsNode )
+                        
+                    ChspsDomList& initial_items = initialSettingsNode->ChildNodes();                                    
+                    ChspsDomNode* controlNode = hspsServerUtil::FindNodeByTagL(KControlElement, *parentNode ); 
+                          
+                    if( controlNode )
                         {
-                        ChspsDomList& items = settingsNode->ChildNodes();
-                                
-                        if( items.Length() == initial_items.Length() )                    
+                        ChspsDomList& controlNode_childList = controlNode->ChildNodes();
+                    
+                        ChspsDomNode* settingsNode = static_cast<ChspsDomNode*>(controlNode_childList.FindByName( KSettingsElement ));
+                    
+                        if( settingsNode )
                             {
-                            TInt index = controlNode->ItemIndex( *settingsNode );
-                            controlNode->DeleteChild(settingsNode);    
-                            ChspsDomNode* clone = initialSettingsNode->CloneL( aAppODT.DomDocument().StringPool() );
-                            CleanupStack::PushL( clone  );
-                            controlNode->AddChildL( clone, index );
-                            clone->SetParent( controlNode );             
-                            CleanupStack::Pop( clone );
-                            }
-                        else if( items.Length() > initial_items.Length() )
-                            {
-                            error = ParseInitialSettingsItemsL(*initialSettingsNode,*settingsNode);        
+                            ChspsDomList& items = settingsNode->ChildNodes();
+                                    
+                            if( items.Length() == initial_items.Length() )                    
+                                {
+                                TInt index = controlNode->ItemIndex( *settingsNode );
+                                controlNode->DeleteChild(settingsNode);    
+                                ChspsDomNode* clone = initialSettingsNode->CloneL( aAppODT.DomDocument().StringPool() );
+                                CleanupStack::PushL( clone  );
+                                controlNode->AddChildL( clone, index );
+                                clone->SetParent( controlNode );             
+                                CleanupStack::Pop( clone );
+                                }
+                            else if( items.Length() > initial_items.Length() )
+                                {
+                                error = ParseInitialSettingsItemsL(*initialSettingsNode,*settingsNode);        
+                                }
+                            else
+                                {
+                                error = KErrCorrupt;
+                                }
                             }
                         else
                             {
-                            error = KErrCorrupt;
+                            error = KErrNotFound;
                             }
                         }
                     else
                         {
-                        error = KErrNotFound;
+                        error = KErrCorrupt;
                         }
-                    }
+                        
+                    // clean settings under initialsettings
+                    node->ChildNodes().RemoveItem( initialSettingsNode );
+                    delete initialSettingsNode;
+                    initialSettingsNode = NULL;                    
+                        
+                    } 
                 else
                     {
+                    // initialSettingsNode (KSettingsElement) not found
                     error = KErrCorrupt;
                     }
-                // clean settings under initialsettings
-                node->ChildNodes().RemoveItem( initialSettingsNode );
-                delete initialSettingsNode;
-                initialSettingsNode = NULL; 
-                }
+                   
+                }                   
             }
         
         prevNode = node;    
@@ -955,11 +964,14 @@
             
             ChspsDomAttribute* attr = static_cast<ChspsDomAttribute*>( 
                                           attrList.FindByName( KItemAttrId ));
-            const TDesC8& value = attr->Value();
-            if( value.Compare( aNodeIdentifier ) == 0 )
-                {
-                found = ETrue;
-                targetNode = node;
+            if( attr )
+                {                                          
+                const TDesC8& value = attr->Value();
+                if( value.CompareF( aNodeIdentifier ) == 0 )
+                    {
+                    found = ETrue;
+                    targetNode = node;
+                    }
                 }
             }
         node = iter->NextL();
--- a/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -1739,7 +1739,54 @@
         iMultiInstance = KMultiInstanceDefaultValue;
         }
     }
-
+ 
+ // -----------------------------------------------------------------------------
+ // ChspsInstallationHandler::FindFile
+ // Eclipsing support for customization 
+ // -----------------------------------------------------------------------------
+ //
+ void ChspsInstallationHandler::FindFile(
+         const TDesC& aPath,
+         const TDesC& aFilename,         
+         TFileName& aDrivePathName )
+     {                   
+     TParsePtrC parser( aPath );
+     const TPath path = parser.Path();              
+               
+     // Find the input file, search from the user area (UDA) first, 
+     // exclude external/remote drives from the search - otherwise end-users  
+     // could introduce fixed configurations (e.g. operator locks wouldn't work)
+     TFindFile fileFinder( iFsSession );
+     fileFinder.SetFindMask( 
+         KDriveAttExclude|KDriveAttRemovable|KDriveAttRemote|KDriveAttSubsted );
+     iFsSession.SetSessionToPrivate( EDriveZ );
+     TInt err = fileFinder.FindByDir( aFilename, path );
+     iFsSession.SetSessionToPrivate( EDriveC );
+     if( !err )          
+         {         
+         // Return the path with a drive reference 
+         aDrivePathName = fileFinder.File();        
+         TParsePtrC drvParser( aDrivePathName );
+         if( !drvParser.DrivePresent() )
+             {             
+             err = KErrNotFound;
+             }
+         }
+     
+     if( err )
+         {
+         // Not found from C nor Z drives
+#ifdef HSPS_LOG_ACTIVE  
+         if( iLogBus )
+             {
+             iLogBus->LogText( 
+                     _L( "ChspsInstallationHandler::FindFile(): - couldnt' find file '%S'" ),
+                     &aDrivePathName );
+             }
+    #endif
+         }
+     }
+ 
 // -----------------------------------------------------------------------------
 // Parsing of the manifest elements.
 // -----------------------------------------------------------------------------
@@ -1934,28 +1981,27 @@
         }
     else if ( localName == KFileXML )
         {
-        delete iXmlFile;
-        iXmlFile = NULL;
-        iXmlFile = HBufC::NewL( KMaxFileName );
-        TPtr fileDes( iXmlFile->Des() );
-    
-        fileDes.Copy( iThemeFilePath );
-        HBufC* data = CnvUtfConverter::ConvertToUnicodeFromUtf8L( *iContent );
-        fileDes.Append( *data );
-        delete data;
-        
-        if( !BaflUtils::FileExists( iFsSession, fileDes ) )
+        if( iContent )
             {
-#ifdef HSPS_LOG_ACTIVE  
-            if( iLogBus )
+            // Convert from 8 to 16bit string
+            HBufC* nameBuf = CnvUtfConverter::ConvertToUnicodeFromUtf8L( *iContent );                        
+            // Find full path to the file 
+            TFileName fullName;
+            FindFile( 
+                iThemeFilePath, 
+                nameBuf->Des(),
+                fullName );
+            delete nameBuf;
+            nameBuf = NULL;
+            if( !fullName.Length() )
                 {
-                iLogBus->LogText( _L( "ChspsInstallationHandler::OnEndElementL(): - XML file does not exist '%S'" ),
-                        &fileDes );
+                iFileNotFound = ETrue;
+                iResult->iXuikonError = KErrXmlFileNotFound;
+                User::Leave( KErrNotFound );
                 }
-#endif    
-            
-            iFileNotFound = ETrue;
-            iResult->iXuikonError = KErrXmlFileNotFound;
+            delete iXmlFile;
+            iXmlFile = NULL;
+            iXmlFile = fullName.AllocL();
             }
         }
     else if ( localName == KFileDTD )
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -55,8 +55,6 @@
 // Directory for the SISX installation files
 _LIT( KImportDirectoryC, "c:\\private\\200159c0\\import\\" );
 
-// Directory for the ROM based installation files
-
 // Directories for backup folders
 _LIT( KBackupThemesDirectoryC, "c:\\private\\200159c0\\backup\\themes\\" );
 
@@ -2580,6 +2578,47 @@
 	}
 
 // -----------------------------------------------------------------------------
+// ChspsThemeServer::InstallUDAWidgetsL()
+// -----------------------------------------------------------------------------
+//
+void ChspsThemeServer::InstallUDAWidgetsL()
+    {
+    //Get list of uda dir's
+    TPtrC filter( KFilterAllPluginImportsV1 );
+    CDir* importDir( NULL );           
+    TFindFile fileFinder( iFsSession );
+    fileFinder.FindWildByDir( filter, KImportDirectoryC, importDir );    
+    CleanupStack::PushL( importDir );
+    
+    if ( importDir && importDir->Count() > 0 )
+        {
+        CHSPSInstaller* installer = CHSPSInstaller::NewL( *this );
+        CleanupStack::PushL( installer );
+        
+        for ( TInt i = 0; i < importDir->Count(); i++ )
+            {
+            TPtrC udaName( (*importDir)[i].iName );
+            // Get manifest path
+            HBufC* manifestBuf = GetManifestFromImportLC( 
+                    udaName, 
+                    KImportDirectoryC );
+            
+            //install
+            TRAPD( err, installer->InstallConfigurationL( *manifestBuf ) );
+#ifdef HSPS_LOG_ACTIVE            
+            if ( err != KErrNone )
+                {
+                iLogBus->LogText( _L( "ChspsThemeServer::InstallUDAWidgetsL(): - Installation failed" ) );
+                }
+#endif
+            CleanupStack::PopAndDestroy( manifestBuf );
+            }
+        CleanupStack::PopAndDestroy( installer );
+        }
+    CleanupStack::PopAndDestroy( importDir ); 
+    }
+
+// -----------------------------------------------------------------------------
 // ChspsThemeServer::HandleRomInstallationsL()
 // -----------------------------------------------------------------------------
 //
@@ -2615,6 +2654,9 @@
         // Install manifest files from ROM
         InstallManifestsFromRomDriveL();
 
+        // install widgets from UDA image
+        InstallUDAWidgetsL();
+        
         // Post RFS installations have been done, prevent re-installations at next startup
         // by reading firmware version and saving it to cenrep.
         GetFWVersion( fwVersion );
--- a/homescreensrv_plat/ai_content_model_api/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_content_model_api/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -26,8 +26,10 @@
 
 ../inc/aicontentobserver.inl     MW_LAYER_PLATFORM_EXPORT_PATH(aicontentobserver.inl)
 ../inc/aicontentobserver.h     MW_LAYER_PLATFORM_EXPORT_PATH(aicontentobserver.h)
-../inc/aipropertyextension.h     MW_LAYER_PLATFORM_EXPORT_PATH(aipropertyextension.h)
-../inc/aieventhandlerextension.h     MW_LAYER_PLATFORM_EXPORT_PATH(aieventhandlerextension.h)
-../inc/aipropertyextension.inl     MW_LAYER_PLATFORM_EXPORT_PATH(aipropertyextension.inl)
 ../inc/aicontentmodel.h     MW_LAYER_PLATFORM_EXPORT_PATH(aicontentmodel.h)
 ../inc/aicontentrequest.h   MW_LAYER_PLATFORM_EXPORT_PATH(aicontentrequest.h)
+
+// Deprecated
+../inc/aipropertyextension.h     MW_LAYER_PLATFORM_EXPORT_PATH(aipropertyextension.h)
+../inc/aipropertyextension.inl     MW_LAYER_PLATFORM_EXPORT_PATH(aipropertyextension.inl)
+../inc/aieventhandlerextension.h     MW_LAYER_PLATFORM_EXPORT_PATH(aieventhandlerextension.h)
--- a/homescreensrv_plat/ai_content_model_api/inc/aicontentmodel.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_content_model_api/inc/aicontentmodel.h	Fri Feb 19 23:07:29 2010 +0200
@@ -123,6 +123,12 @@
 const char KAiContentTypeText[] = "text/plain";
  
 
+/** MIME type for passing raw data.
+ *
+ * @see MAiContentObserver::PublishPtr
+ */
+const char KAiContentTypeData[] = "data/stream";
+ 
 /**
  *  Abstract interface which provides services to iterate content items
  *  supported by the plug-in. Only used by the Active Idle Framework.
--- a/homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,13 +19,15 @@
 #ifndef M_AICONTENTOBSERVER_H
 #define M_AICONTENTOBSERVER_H
 
+// System includes
 #include <e32std.h>
 
-class MAiPropertyExtension;
+// User includes
+
+// Forward declarations
+class CHsContentPublisher;
+class THsPublisherInfo;
 class RFile;
-class TDesC8;
-class TDesC16;
-struct TAiPublisherInfo;
 
 /**
  *  Used by AI Plug-in to give notification about modifications in
@@ -35,9 +37,13 @@
  */
 class MAiContentObserver
     {
-public: // New Enumeration
+public: 
+    // data types
+    
     /**
-    * CSS Primitive value type
+    * Value type for SetProperty
+    *
+    * @since S60 5.2
     */
     enum TValueType
         {
@@ -57,7 +63,8 @@
         EValueUnitValue
         };
     
-public:  // New functions
+public:  
+    // new functions
 
     /**
      * Invoked by the plug-in to inform that it initiates content publishing
@@ -107,21 +114,21 @@
     /**
      * Invoked by plug-in to test if the specified content can be published.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
      * @param  aIndex - index of the content item.
      * @return ETrue - if content could be published; EFalse otherwise.
      */
-    virtual TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex ) = 0;
+    virtual TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ) = 0;
 
     /**
      * Invoked by the plug-in to inform that content identified by reference
      * aResource must be published to UI control\element identified by selector
      * aContent.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -137,14 +144,14 @@
      *         - KErrNotFound - if content reference is not found in current
      *         UI definition.
      */
-    virtual TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aResource, TInt aIndex ) = 0;
+    virtual TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex ) = 0;
 
     /**
      * Invoked by the plug-in to inform that textual content provided within 
      * parameter aText must be published to UI control\element identified by 
      * selector aContent.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -159,14 +166,14 @@
      *         - KErrArgument - if content cannot be published to UI element,
      *         e.g. MIME type mismatch.
      */
-    virtual TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex ) = 0;
+    virtual TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex ) = 0;
 
     /**
      * Invoked by the plug-in to inform that content provided within buffer
      * aBuf must be published to UI control\element identified by selector
      * aContent.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -181,7 +188,7 @@
      *         - KErrArgument - if content cannot be published to UI element,
      *         e.g. MIME type mismatch.
      */ 
-    virtual TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ) = 0;
+    virtual TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ) = 0;
     
     /**
      * Invoked by the plug-in to inform that an object provided by pointer aPtr
@@ -189,7 +196,7 @@
      * The implementation packages the pointer to a buffer and delegates to 
      * buffer publishing method Publish(MAiPropertyExtension&, TInt, const TDesC8&, TInt).
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -207,7 +214,7 @@
      *         e.g. MIME type mismatch.
      * @see KAiContentTypeBitmap
      */ 
-    inline TInt PublishPtr( MAiPropertyExtension& aPlugin, TInt aContent, TAny* aPtr, TInt aIndex );
+    inline TInt PublishPtr( CHsContentPublisher& aPlugin, TInt aContent, TAny* aPtr, TInt aIndex );
 
     /**
      * Helper function for unpacking a pointer that has been published with
@@ -221,7 +228,7 @@
      * Invoked by the plug-in to inform that content from file handle aFile
      * must be published to UI control\element identified by selector aContent.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -237,13 +244,13 @@
      *         - KErrArgument - if content cannot be published to UI element,
      *         e.g. MIME type mismatch.
      */
-    virtual TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ) = 0;
+    virtual TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ) = 0;
 
     /**
      * Invoked by the plug-in to inform that content must be cleaned in UI
      * control\element identified by selector aContent.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aContent - identification of content selector, MUST correspond
      *         single content selector supported by plug-in. The framework
      *         utilizes the selector id to match for cid and MIME type.
@@ -255,7 +262,7 @@
      *         - KErrNotFound - if content reference is not found in current
      *         UI definition.
      */
-    virtual TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex ) = 0;
+    virtual TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ) = 0;
 
     /**
      * Returns interface extension. Not used in S60 3.2 release.
@@ -267,17 +274,17 @@
     virtual TAny* Extension( TUid aUid ) = 0;
 
     /**
-	 * Invoked by the plugin factory
-	 *
-	 * @param aPublsiherInfo Publisher which requires subscription
-	 * @return ETrue if subsription is needed, EFalse otherwise
-	 */	
-    virtual TBool RequiresSubscription( const TAiPublisherInfo& aPublisherInfo ) const = 0;
+     * Invoked by the plugin factory
+     *
+     * @param aPublsiherInfo Publisher which requires subscription
+     * @return ETrue if subsription is needed, EFalse otherwise
+     */ 
+    virtual TBool RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const = 0;     
     
     /**
      * Invoked by the plug-in to change the property value of a specific content.
      * value type must be string.
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aElementId - id of content selector, MUST correspond
      *         single content supported by plug-in. The framework
      *         utilizes the id to find in the plugin xml defintion.
@@ -290,7 +297,7 @@
      *         - KErrNotSupported - if content selector is not supported by
      *         current plugin definition.         
      */
-    virtual TInt SetProperty( MAiPropertyExtension& aPlugin,
+    virtual TInt SetProperty( CHsContentPublisher& aPlugin,
             const TDesC8& aElementId,
             const TDesC8& aPropertyName,
             const TDesC8& aPropertyValue ) = 0;
@@ -298,7 +305,7 @@
     /**
      * Invoked by the plug-in to change the property value of a specific content.
      *
-     * @param  aPlugin - Plug-in property extension interface implementation.
+     * @param  aPlugin - Plug-in interface implementation.
      * @param  aElementId - id of content selector, MUST correspond
      *         single content supported by plug-in. The framework
      *         utilizes the id to find in the plugin xml defintion.
@@ -312,7 +319,7 @@
      *         - KErrNotSupported - if content selector is not supported by
      *         current plugin definition.         
      */
-    virtual TInt SetProperty( MAiPropertyExtension& aPlugin,
+    virtual TInt SetProperty( CHsContentPublisher& aPlugin,
             const TDesC8& aElementId,
             const TDesC8& aPropertyName,
             const TDesC8& aPropertyValue,  
--- a/homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.inl	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_content_model_api/inc/aicontentobserver.inl	Fri Feb 19 23:07:29 2010 +0200
@@ -15,23 +15,40 @@
 *
 */
 
+#ifndef _AICONTENTOBSERVER_INL
+#define _AICONTENTOBSERVER_INL
 
-inline TInt MAiContentObserver::PublishPtr
-        (MAiPropertyExtension& aPlugin, TInt aContent, TAny* aPtr, TInt aIndex)
+// ---------------------------------------------------------------------------
+// MAiContentObserver::PublishPtr
+//
+// ---------------------------------------------------------------------------
+//
+inline TInt MAiContentObserver::PublishPtr( CHsContentPublisher& aPlugin, 
+    TInt aContent, TAny* aPtr, TInt aIndex )        
     {
     // Package the pointer to a buffer and delegate to buffer publish method
-    return this->Publish(aPlugin, aContent, TPckgC<TAny*>(aPtr), aIndex);
+    return this->Publish( aPlugin, aContent, TPckgC<TAny*>( aPtr ), aIndex );
     }
 
-template<class PtrT> inline 
-PtrT* MAiContentObserver::UnpackPtr(const TDesC8& aBuf)
+// ---------------------------------------------------------------------------
+// MAiContentObserver::UnpackPtr
+//
+// ---------------------------------------------------------------------------
+//
+template< class PtrT > inline PtrT* MAiContentObserver::UnpackPtr( 
+    const TDesC8& aBuf )
     {
-    TAny* result = NULL;
+    TAny* result( NULL );
+    
     if ( aBuf.Size() == sizeof( TAny* ) )
         {
-        TPckg<TAny*>(result).Copy(aBuf); // Effectively writes aBuf contents to result
+        // Effectively writes aBuf contents to result
+        TPckg< TAny* >( result ).Copy( aBuf ); 
         }
-    return static_cast<PtrT*>(result);
+        
+    return static_cast< PtrT* >( result );
     }
 
-// End of file    
\ No newline at end of file
+#endif // _AICONTENTOBSERVER_INL
+
+// End of file    
--- a/homescreensrv_plat/ai_content_model_api/inc/aicontentrequest.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_content_model_api/inc/aicontentrequest.h	Fri Feb 19 23:07:29 2010 +0200
@@ -37,6 +37,15 @@
      *         content observer, EFalse otherwise.
      */
     virtual TBool RefreshContent( TInt aContentId ) = 0;
+   
+    /**
+     * Requests AI content publisher to suspend specific content item.
+     *
+     * @param aContentId content identifier in target plug-ins content model.
+     * @return ETrue if the plugin will suspend the content by calling its 
+     *         content observer, EFalse otherwise.
+     */    
+    virtual TBool SuspendContent( TInt aContentId ) = 0;
     
 protected:
     /**
--- a/homescreensrv_plat/ai_plugin_management_api/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_plugin_management_api/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -24,12 +24,16 @@
 
 PRJ_EXPORTS
 
-../inc/aicontentpublisheruid.hrh     MW_LAYER_PLATFORM_EXPORT_PATH(aicontentpublisheruid.hrh)
 ../inc/aiprofilepluginuids.hrh       MW_LAYER_PLATFORM_EXPORT_PATH(aiprofilepluginuids.hrh)
-../inc/aiscutuids.hrh                MW_LAYER_PLATFORM_EXPORT_PATH(aiscutuids.hrh)
-../inc/aicontentpublisher.h          MW_LAYER_PLATFORM_EXPORT_PATH(aicontentpublisher.h)
 ../inc/aidevicestatuscontentmodel.h  MW_LAYER_PLATFORM_EXPORT_PATH(aidevicestatuscontentmodel.h)
-../inc/aiscutcontentmodel.h          MW_LAYER_PLATFORM_EXPORT_PATH(aiscutcontentmodel.h)
-../inc/aiscutdefs.h                  MW_LAYER_PLATFORM_EXPORT_PATH(aiscutdefs.h)
 ../inc/aiprofileplugincontentmodel.h MW_LAYER_PLATFORM_EXPORT_PATH(aiprofileplugincontentmodel.h)
-../inc/aiscutappuids.hrh             MW_LAYER_PLATFORM_EXPORT_PATH(aiscutappuids.hrh)
+
+../inc/hscontentpublisheruid.hrh     MW_LAYER_PLATFORM_EXPORT_PATH(hscontentpublisheruid.hrh)
+../inc/hscontentpublisher.h          MW_LAYER_PLATFORM_EXPORT_PATH(hscontentpublisher.h)
+../inc/hscontentpublisher.inl        MW_LAYER_PLATFORM_EXPORT_PATH(hscontentpublisher.inl)
+../inc/hspublisherinfo.h             MW_LAYER_PLATFORM_EXPORT_PATH(hspublisherinfo.h)
+../inc/hspublisherinfo.inl           MW_LAYER_PLATFORM_EXPORT_PATH(hspublisherinfo.inl)
+
+// Deprecated
+../inc/aicontentpublisheruid.hrh     MW_LAYER_PLATFORM_EXPORT_PATH(aicontentpublisheruid.hrh)
+../inc/aicontentpublisher.h          MW_LAYER_PLATFORM_EXPORT_PATH(aicontentpublisher.h)
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aiprofilepluginuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/aiprofilepluginuids.hrh	Fri Feb 19 23:07:29 2010 +0200
@@ -19,8 +19,6 @@
 #ifndef AIPROFILEPLUGINUIDS_HRH
 #define AIPROFILEPLUGINUIDS_HRH
 
-#include <platform/mw/aicontentpublisheruid.hrh>
-
 /**
  * Ecom dll uid for AI Profile plug-in.
  */
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aiscutappuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  App uids for shortcut plug-in
-*
-*/
-
-
-#ifndef AISCUTAPPUIDS_HRH
-#define AISCUTAPPUIDS_HRH
-
-#define KScutExchangeMailUidValue           0x10282480 //
-#define KScutFlashPlayerUidValue            0x101fd693 //
-#define KScutOperatorMenuUidValue           0x10008D5E // !!
-#define KScutVideoServicesUidValue          0x10281893 // !!
-#define KScutVoiceDialUidValue              0x101F8543 // aivoicedialui
-
-#define KScutAmsEditorUidValue              0x1020745A //
-#define KScutEmailEditorUidValue            0x101F4CD6 //
-#define KScutMmsEditorUidValue              0x100058DE //
-#define KScutPostcardEditorUidValue         0x10207247 //
-#define KScutUnifiedEditorUidValue          0x102072D8 //
-#define KScutSyncMlEmailUidValue            0x101F7C5C //
-
-#define KScutAboutUidValue                  0x10005A22 //
-#define KScutApplicationManagerUidValue     0x101F8512 //
-#define KScutApplicationShellUidValue       0x101F4CD2 //
-#define KScutBluetoothUidValue              0x10005951 //
-#define KScutBrowserUidValue                0x10008D39 //
-#define KScutCalculatorUidValue             0x10005902 //
-#define KScutCalendarUidValue               0x10005901 //
-#define KScutCamcorderUidValue              0x101F857A //
-#define KScutChineseDictionaryUidValue      0x101F9CFE //
-#define KScutClockUidValue                  0x10005903 //
-#define KScutConnectionManagerUidValue      0x101F84D0 //
-#define KScutConverterUidValue              0x101F4668 //
-#define KScutDiallerUidValue                0x100058B3 //
-#define KScutDRMRightsManagerUidValue       0x101F85C7 //
-#define KScutDeviceManagerUidValue          0x101F6DE5 //
-#define KScutFMRadioUidValue                0x10207A89 //
-#define KScutFMTXRadioUidValue              0x10282BEF //
-#define KScutFaxModemUidValue               0x1000594E //
-#define KScutFileManagerUidValue            0x101F84EB //
-#define KScutGeneralSettingsUidValue        0x100058EC //
-#define KScutControlPanelUidValue           0          // not yet!
-#define KScutHelpUidValue                   0x10005234 //
-#define KScutIRUidValue                     0x1000594D //
-#define KScutInstantMessagingUidValue       0x101F4673 //
-#define KScutLandmarksUidValue              0x101F85A2 //
-#define KScutLogsUidValue                   0x101F4CD5 //
-#define KScutMediaGallery2UidValue          0x101F8599 //
-#define KScutMediaPlayerUidValue            0x200159B2 //
-#define KScutMemoryCardUidValue             0x101F4666 //
-#define KScutMessagingCenterUidValue        0x100058C5 //
-#define KScutMusicPlayerUidValue            0x102072C3 //
-#define KScutNavigatorUidValue              0x101F85A0 //
-#define KScutNotepadUidValue                0x10005907 //
-#define KScutPersonalisationUidValue        0x10005A32 //
-#define KScutPhoneUidValue                  0x100058B3 //
-#define KScutPhonebookUidValue              0x101F4CCE //
-#define KScutPocUidValue                    0x101FD63D //
-#define KScutProfilesUidValue               0x100058F8 //
-#define KScutSatUiUidValue                  0x101F4CE0 //
-#define KScutSearchUidValue                 0x10282411 //
-#define KScutSmlSyncUidValue                0x101F6DE4 //
-#define KScutSpeedDialUidValue              0x1000590A //
-#define KScutUSBUidValue                    0x102068E2 //
-#define KScutUserDictionaryUidValue         0x101F8645 //
-#define KScutVoIPUidValue                   0x10202871 //
-#define KScutVoiceCommandsUidValue          0x101F8555 //
-#define KScutVoiceMailboxUidValue           0x100058F5 //
-#define KScutVoiceRecorderUidValue          0x100058CA //
-
-#define KScutInstallationViewIdValue        0x10283321
-#define KScutChangeThemeViewIdValue         0x102750A7
-#define KScutDiallerViewIdValue             0x10282D81
-#define KScutRemoteMailboxViewIdValue       0x2
-#define KScutConnectivityStatusViewIdValue  0x10207250
-
-#endif // AISCUTAPPUIDS_HRH
-
-// End of File.
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aiscutcontentmodel.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Content model for shortcut plug-in.
-*
-*/
-
-
-#ifndef AISCUTCONTENTMODEL_H
-#define AISCUTCONTENTMODEL_H
-
-#include <aicontentmodel.h>
-
-#include <platform/mw/aiscutuids.hrh>
-
-// AI Shortcut Plug-in ECOM implementation UID.
-const TInt KImplUidScutPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SCUTPLUGIN;
-const TUid KUidScutPlugin = { KImplUidScutPlugin };
-
-// ================================= CONTENT ===================================
-
-/**
- * Content Ids.
- */
-enum TAiScutContentIds
-{
-    EAiScutContentShortcutIcon,
-    EAiScutContentShortcutCaption,
-    EAiScutContentShortcutShortCaption,
-    EAiScutContentShortcutMskCaption,
-    EAiScutContentShortcutSkCaption,
-    EAiScutContentShortcutSkIcon,
-    EAiScutContentShortcutToolbarCaption,
-    EAiScutContentShortcutToolbarIcon,
-    EAiScutContentPopupTextCaptionLine,
-    EAiScutContentPopupTextFirstLine,
-    EAiScutContentPopupTextSecondLine,
-    EAiScutContentPopupTextThirdLine
-};
-
-/**
- * Content that the plug-in will publish.
- */
-const TAiContentItem KAiScutContent[] =
-{
-    // Shortcut icon as CFbsBitmap.
-    { EAiScutContentShortcutIcon,         L"ShortcutIcon",         KAiContentTypeBitmap }
-    ,
-    // Shortcut caption as plain text (used for long application titles).
-    { EAiScutContentShortcutCaption,      L"ShortcutCaption",      "text/plain" }
-    ,
-    // Shortcut short caption as plain text (used for short application titles in softkeys).
-    { EAiScutContentShortcutShortCaption, L"ShortcutShortCaption", "text/plain" }
-    ,
-    // Shortcut msk caption as plain text (used for short application titles in MSK).
-    { EAiScutContentShortcutMskCaption,   L"ShortcutMskCaption",   "text/plain" }
-       ,
-    // Shortcut sk caption as plain text (used for short application titles in SK).
-    { EAiScutContentShortcutSkCaption,   L"ShortcutSkCaption",   "text/plain" }
-   ,
-    // Shortcut sk icon as bitmap (used for application icons in SK).
-    { EAiScutContentShortcutSkIcon,   L"ShortcutSkIcon",   KAiContentTypeBitmap }
-   ,
-    // Shortcut sk caption as plain text (used for short application titles in SK).
-    { EAiScutContentShortcutToolbarCaption,   L"ShortcutToolbarCaption",   "text/plain" }
-   ,
-     // Shortcut toolbar icon as bitmap (used for application icons in toolbar).
-    { EAiScutContentShortcutToolbarIcon,   L"ShortcutToolbarIcon",   KAiContentTypeBitmap }
-    ,
-    // Caption line of Popup as plain text.
-    { EAiScutContentPopupTextCaptionLine,  L"ShortcutPopupCaptionLine", "text/plain" }
-    ,
-    // 1st actual line of Popup as plain text.
-    { EAiScutContentPopupTextFirstLine,  L"ShortcutPopup1stLine", "text/plain" }
-    ,
-    // 2nd actual line of Popupn as plain text.
-    { EAiScutContentPopupTextSecondLine, L"ShortcutPopup2ndLine", "text/plain" }
-    ,
-    // 3rd actual line of Popup as plain text.
-    { EAiScutContentPopupTextThirdLine,  L"ShortcutPopup3rdLine", "text/plain" }
-};
-
-const TInt KAiScutContentCount = sizeof( KAiScutContent ) / 
-                                            sizeof( KAiScutContent[0] );
-
-
-// ================================ RESOURCES ==================================
-
-/**
- * Resource Ids.
- */
-enum TAiScutPluginResourceIds
-{
-    EAiScutResourceDefaultIcon,
-    EAiScutResourceEmptyIcon,
-    EAiScutResourceBackCaption,
-    EAiScutResourceEmptyCaption,
-    EAiScutResourceNewMsgCaption,
-    EAiScutResourceNewEmailCaption,
-    EAiScutResourceNewSyncMLMailCaption,
-    EAiScutResourceNewPostcardCaption,
-    EAiScutResourceNewAudioMsgCaption,
-    EAiScutResourceSelectMsgTypeCaption,
-    EAiScutResourceChangeThemeCaption,
-    EAiScutResourceNewMsgShortCaption,
-    EAiScutResourceNewEmailShortCaption,
-    EAiScutResourceNewSyncMLMailShortCaption,
-    EAiScutResourceNewPostcardShortCaption,
-    EAiScutResourceNewAudioMsgShortCaption,
-    EAiScutResourceSelectMsgTypeShortCaption,
-    EAiScutResourceChangeThemeShortCaption
-};
-
-/**
- * Resources that the plug-in will publish.
- */
-const TAiContentItem KAiScutResources[] =
-{
-    // Default shortcut icon.
-    { EAiScutResourceDefaultIcon,            L"DefaultIcon",            "image/*" }
-    ,
-    // Empty shortcut icon, used when shortcut target is unknown.
-    { EAiScutResourceEmptyIcon,              L"EmptyIcon",              "image/*" }
-    ,
-    // Localizable caption for the back shortcut
-    { EAiScutResourceBackCaption,            L"BackCaption",            "text/plain" }
-    ,
-    // Localizable caption for the empty shortcut.
-    { EAiScutResourceEmptyCaption,           L"EmptyCaption",           "text/plain" }
-    ,
-    // Localizable caption for the "new message" shortcut.
-    { EAiScutResourceNewMsgCaption,          L"NewMessageCaption",      "text/plain" }
-    ,
-    // Localizable caption for the "new email" shortcut.
-    { EAiScutResourceNewEmailCaption,        L"NewEmailCaption",        "text/plain" }
-    ,
-    // Localizable caption for the "new syncml mail" shortcut.
-    { EAiScutResourceNewSyncMLMailCaption,   L"NewSyncMLMailCaption",   "text/plain" }
-    ,
-    // Localizable caption for the "new postcard" shortcut.
-    { EAiScutResourceNewPostcardCaption,     L"NewPostcardCaption",     "text/plain" }
-    ,
-    // Localizable caption for the "new audio message" shortcut.
-    { EAiScutResourceNewAudioMsgCaption,     L"NewAudioMsgCaption",     "text/plain" }
-    ,
-    // Localizable caption for the "select message type" shortcut.
-    { EAiScutResourceSelectMsgTypeCaption,   L"SelectMsgTypeCaption",   "text/plain" }
-    ,
-    // Localizable caption for the "change theme" shortcut.
-    { EAiScutResourceChangeThemeCaption,     L"ChangeThemeCaption",     "text/plain" }
-    ,
-    // Localizable short caption for the "new message" shortcut.
-    { EAiScutResourceNewMsgShortCaption,          L"NewMessageShortCaption",      "text/plain" }
-    ,
-    // Localizable short caption for the "new email" shortcut.
-    { EAiScutResourceNewEmailShortCaption,        L"NewEmailShortCaption",        "text/plain" }
-    ,
-    // Localizable short caption for the "new syncml mail" shortcut.
-    { EAiScutResourceNewSyncMLMailShortCaption,   L"NewSyncMLMailShortCaption",   "text/plain" }
-    ,
-    // Localizable short caption for the "new postcard" shortcut.
-    { EAiScutResourceNewPostcardShortCaption,     L"NewPostcardShortCaption",     "text/plain" }
-    ,
-    // Localizable short caption for the "new audio message" shortcut.
-    { EAiScutResourceNewAudioMsgShortCaption,     L"NewAudioMsgShortCaption",     "text/plain" }
-    ,
-    // Localizable short caption for the "new message" shortcut.
-    { EAiScutResourceSelectMsgTypeShortCaption,   L"SelectMsgTypeShortCaption",   "text/plain" }
-    ,
-    // Localizable short caption for the "change theme" shortcut.
-    { EAiScutResourceChangeThemeShortCaption,     L"ChangeThemeShortCaption",     "text/plain" }
-
-};
-
-const TInt KAiScutResourceCount = sizeof( KAiScutResources ) / 
-                                            sizeof( KAiScutResources[0] );
-
-
-// ============================ SERVICES (Events) ==============================
-
-/**
- * Event Ids.
- */
-enum TAiScutEventIds
-{
-    EAiScutEventLaunchByIndex,
-    EAiScutEventLaunchByValue,
-    EAiScutEventShowSettings,
-    EAiScutEventShowSetting,
-    EAiScutEventLaunchFastswap,
-    EAiScutEventLaunchByIndexAlternate,
-    EAiScutEventLoseFocus,
-    EAiScutEventGainFocus
-};
-
-/**
- * Services that the plug-in can perform.
- */
-const TAiContentItem KAiScutEvents[] =
-{
-    // Launches a shortcut by its index that is delivered as an integer.
-    { EAiScutEventLaunchByIndex, L"LaunchByIndex", "int" }
-    ,
-    // Launches a shortcut by its value that is delivered in a descriptor.
-    { EAiScutEventLaunchByValue, L"LaunchByValue", "str" }
-    ,
-    // Shows the shortcut plug-in settings dialog.
-    { EAiScutEventShowSettings,  L"ShowSettings",  "" }
-    ,
-    // Shows the shortcut plug-in setting.
-    { EAiScutEventShowSetting,  L"ShowSetting",  "" }    
-    ,
-    // Opens the fast swap window    
-    { EAiScutEventLaunchFastswap, L"LaunchFastSwap", "" }
-    ,
-    // Special launching. If the index points to appshell
-    // fastswap is opened. Other special cases can be added to the engine
-    { EAiScutEventLaunchByIndexAlternate, L"LaunchByIndexAlternate", "int" }
-	,
-    // Used when we move out of a SC button (Needed for Popup-functionality).
-    // index of shortcut is delivered as an integer
-    { EAiScutEventLoseFocus, L"LoseFocus", "int" }
-    ,
-    // Used when we move into a SC button (Needed for Popup-functionality).
-    // index of shortcut is delivered as an integer.
-    { EAiScutEventGainFocus, L"GainFocus", "int" }
-
-};
-
-#endif // AISCUTCONTENTMODEL_H
-
-// End of File.
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aiscutdefs.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in definitions.
-*
-*/
-
-
-#ifndef AISCUTDEFS_H
-#define AISCUTDEFS_H
-
-#include <e32std.h>
-#include <platform/mw/aiscutuids.hrh>
-#include "aiscutappuids.hrh"
-
-// =============================================================================
-// =============== UIDs and view ids to external applications ==================
-// =============================================================================
-
-// Active Idle UID.
-const TUid KScutActiveIdleUid       = { 0x102750F0 };
-
-// Shortcut Settings DLL UID.
-const TUid KScutSettingsDllUid      = { AI_UID_ECOM_DLL_SETTINGS_SCUTPLUGIN };
-
-// Keypad lock UID
-const TUid KScutKeyLockUid          = { 0x10000000 };
-
-// Web Browser application UID.
-const TUid KScutBrowserUid          = { KScutBrowserUidValue };
-
-// General Settings application UID.
-const TUid KScutGeneralSettingsUid  = { KScutGeneralSettingsUidValue };
-
-// Message Centre application UID.
-const TUid KScutMessagingUid        = { KScutMessagingCenterUidValue };
-
-// Remote mailbox view id. Message list view id (0x2) defined in MceIds.hrh.
-const TUid KScutRemoteMailboxViewId = { KScutRemoteMailboxViewIdValue };
-
-// Personalisation application UID.
-const TUid KScutPersonalisationUid  = { KScutPersonalisationUidValue };
-
-// Change-Theme view id in the Personalisation application.
-const TUid KScutChangeThemeViewId   = { KScutChangeThemeViewIdValue };
-
-// Installation view id in the Control Panel.
-const TUid KScutInstallationViewId  = { KScutInstallationViewIdValue };
-
-// Connectivity view id in the Control Panel.
-const TUid KScutConnectivityViewId  = { KScutConnectivityStatusViewIdValue };
-// Voice dialer UID
-const TUid KScutVoiceDialUid        = { KScutVoiceDialUidValue };
-
-// Logs UID
-const TUid KScutLogsUid             = { KScutLogsUidValue };
-
-// AppShell UID
-const TUid KScutAppShellUid         = { KScutApplicationShellUidValue };
-
-// Telephony UID
-const TUid KScutDiallerUid          = { KScutDiallerUidValue };
-
-// Postcard editor UID
-const TUid KScutPostcardEditorUid   = { KScutPostcardEditorUidValue };
-
-// On-Screen Dialler view id in the Telephony application.
-const TUid KScutDiallerViewId       = { KScutDiallerViewIdValue };
-
-// On-Screen Dialler view command
-const TUid KScutDiallerViewCommand  = { 0x1 };
-// AppMngr
-const TUid KScutAppMngrUid			= { 0x101F8512 };
-
-// EasyVoip Application UID
-const TUid KScutEasyVoIPApplicationUid = { 0x1020E566 };
-
-// VoIP launcher UID
-const TUid KScutVoIPLauncherUid        = { 0x10275424 };
-
-// EasyVoip Central Repository UID
-const TUid KUidEasyVoIPRepository      = { 0x1020E593 };
-
-// EasyVoIP shortcut startup flag
-const TUint32 KEasyVoIPShortcutStartup = 0x00000004;
-
-// Logs views
-_LIT8( KLogsMissedCallsView         ,  "missed"   );
-_LIT8( KLogsDialledCallsView        ,  "dialled"  );
-_LIT8( KLogsReceivedCallsView       ,  "received" );
-_LIT8( KLogsMainView                ,  "counters" );
-
-// Softkeys
-_LIT( KLeftSoftkey                  ,  "0x01000100" );
-_LIT( KRightSoftkey                 ,  "0x01000101" );
-
-const TUint32 KLeftSoftkeyId        = { 0x01000100 };
-const TUint32 KRightSoftkeyId       = { 0x01000101 };
-
-/**
- * Bit fields for content items that the observers support.
- */
-enum TSupportedContentItems
-{
-    ESupportIcon         = 0x1,
-    ESupportCaption      = 0x2,
-    ESupportShortCaption = 0x4
-};
-
-class CAiScutShortcut;
-class CAiScutShortcutInfo;
-typedef RPointerArray<CAiScutShortcut> RAiShortcutArray;
-typedef RPointerArray<CAiScutShortcutInfo> RAiShortcutInfoArray;
-
-/**
- * Definitions for application titles.
- */
-enum TAiScutAppTitleType
-{
-    EAiScutLongTitle,
-    EAiScutShortTitle,
-    EAiScutSkeyTitle,
-    EAiScutMskTitle
-};
-
-class TAiScutAppTitleEntry
-{
-public:
-    TUid    iAppUid;
-    TUid    iViewId;
-    HBufC*  iLongTitle;
-    HBufC*  iShortTitle;
-    HBufC*  iSkeyTitle;
-    HBufC*  iMskTitle;
-};
-
-/**
- * Localized send ui resource for error note.
- */
-_LIT( KSendNormResource, "sendnorm.rsc" );
-
-/**
- * Shortcut menu strings
- */
-_LIT( KSettings, "widgetsettings" );
-#endif // AISCUTDEFS_H
-
-// End of File.
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aiscutuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Uids for shortcut plug-in
-*
-*/
-
-
-#ifndef AISCUTUIDS_HRH
-#define AISCUTUIDS_HRH
-
-#include <platform/mw/aicontentpublisheruid.hrh>
-
-/**
- * Ecom dll uid for AI Shortcut plug-in.
- */
-#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_SCUTPLUGIN 0x102750F9
-
-/**
- * Ecom implementation uid for AI Shortcut plug-in.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SCUTPLUGIN 0x102750FA
-
-/**
- * Ecom dll uid for AI Shortcut Settings plug-in.
- */
-#define AI_UID_ECOM_DLL_SETTINGS_SCUTPLUGIN 0x102750FB
-
-/**
- * Ecom implementation uid for AI Shortcut Settings plug-in.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_SETTINGS_SCUTPLUGIN 0x102750FC
-
-#endif // AISCUTUIDS_HRH
-
-// End of File.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,486 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Interface for Homescreen content publisher plug-ins.
+*
+*/
+
+#ifndef _HSCONTENTPUBLISHER_H
+#define _HSCONTENTPUBLISHER_H
+
+// System includes
+#include <e32base.h>
+#include <ecom/ecom.h>
+
+// User includes
+#include <hscontentpublisheruid.hrh>
+#include <hspublisherinfo.h>
+
+// Constants
+/**
+ * ECom plugin interface UID
+ *
+ * @since S60 5.2 
+ */
+const TUid KInterfaceUidHsContentPlugin = { HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER }; 
+
+// Forward declarations
+class MAiContentObserver;
+class MAiPluginSettings;
+
+// Type definitions
+typedef RPointerArray< MAiPluginSettings > RAiSettingsItemArray;
+
+/**
+ *  ECom plug-in interface that Homescreen plug-ins must implement.
+ *  It is used to control plug-in life cycle: load/destroy plug-ins;
+ *  suspend/resume plug-in execution.
+ *
+ *  @since S60 5.2
+ */
+class CHsContentPublisher : public CBase
+    {
+public:
+    // Data types
+
+    /**
+     * CHsContentPublisher start-up reason.
+     * 
+     * @since S60 5.2
+     * @see CHsContentPublisher::Start()
+     */
+    enum TStartReason
+        {
+        ESystemStartup = 1,
+        EPageStartup,
+        EPluginStartup
+        };
+    
+    /**
+     * CHsContentPublisher shutdown reason.
+     * 
+     * @since S60 5.2
+     * @see CHsContentPublisher::Stop()
+     */
+    enum TStopReason
+        {
+        ESystemShutdown = 1,
+        EPageShutdown,
+        EPluginShutdown
+        };
+    
+    /**
+     * CHsContentPublisher resume reason.
+     * 
+     * @since S60 5.2
+     * @see CHsContentPublisher::Resume()
+     */
+    enum TResumeReason
+        {
+        /**
+         * Homescreen is visible.
+         */
+        EForeground = 1
+        };
+    
+    /**
+     * CHsContentPublisher suspend reason.
+     * 
+     * @since S60 5.2
+     * @see CHsContentPublisher::Suspend()
+     */
+    enum TSuspendReason
+        {
+        /**
+         * Homescreen is invisible.
+         */        
+        EBackground = 1,
+        /**
+         * Backup/Restore is ongoing.
+         *
+         * The plug-in must realease all its resources 
+         * which affects to backup/restore operation.
+         */        
+        EBackupRestore,        
+        /**
+         * General Theme is changed.
+         *
+         * The plug-in must re-create any data which is themeable.
+         */
+        EGeneralThemeChange
+        };
+    
+    /**
+     * CHsContentPublisher properties.
+     * 
+     * @since S60 5.2
+     * @see CHsContentPublisher::SetProperty()
+     * @see CHsContentPublisher::GetProperty() 
+     */
+    enum TProperty
+        {
+        /**
+         * Enables read-only access to iterator of content selectors. GetProperty
+         * must return instance of MAiContentItemIterator for content selectors.
+         */        
+        EPublisherContent = 1,
+        
+        /**
+         * Enables read-only access to iterator of content references. GetProperty
+         * must return instance of MAiContentItemIterator for content references.
+         */    
+        EPublisherResources,
+        
+        /**
+         * Enables read-only access to iterator of events supported by plug-in.
+         * GetProperty must return instance of MAiContentItemIterator for events.
+         */    
+        EPublisherEvents,
+        
+        /**
+         * Provides access to MAiContentRequest interface for refreshing a content
+         * item.
+         * @see EPublisherContent
+         */    
+        EContentRequest,
+        
+        /**
+         * Provides access to MAiContentRequest interface for refreshing a resource
+         * item.
+         * @see EPublisherResources
+         */    
+        EResourceRequest,
+        
+        /**
+         * Provides access to localized plugin name if supported. HBufC*
+         * @see EPublisherResources
+         */    
+        EPluginName
+        };
+
+public:
+    // Constructor and destructor
+
+    /**
+     * Creates a new plug-in instance based on implementation UID.
+     *     
+     * @param aPublisherInfo This plug-in's publisher info.
+     * @return pointer to the instantiated interface implementation.
+     * @pre Interface implementation exists by uid aImpUid.
+     */
+    inline static CHsContentPublisher* NewL( 
+        const THsPublisherInfo& aPublisherInfo );
+
+    /**
+     * Destroys instance of the plug-in. Called by the framework during plug-in
+     * destruction phase.
+     */
+    inline ~CHsContentPublisher();
+
+public:  
+    // new functions
+        
+    /**
+     * This method transits the plug-in into "Idle" state.
+     * Parameter aReason explains the plug-in's startup reason.
+     * Based on THsStartReason plug-in may decide its startup behavior.
+     *
+     * This method is called by the framework after plugin is constructed and configured.
+     *
+     * @since S60 5.2
+     * @param aReason startup reason, see TStartReason.
+     * @pre None
+     * @post Plugin is in Idle state.     
+     */
+    virtual void Start( TStartReason aReason ) = 0;
+    
+    /**
+     * This method transits the plug-in into its final state.
+     * Parameter aReason explains the plug-in's shutdwon reason.
+     * Based on THsStopReason plug-in may prepare itself for next startup.
+     * 
+     * This method is called by the framework before plugin is destroyed.
+     *
+     * @since S60 5.2
+     * @param aReason reason for state change, see TStopReason.
+     * @pre None
+     * @post Plugin is ready to be destroyed.
+     */
+    virtual void Stop( TStopReason aReason ) = 0;
+
+    /**
+     * This method transits the plug-in into "Alive" state.
+     *     
+     * In this state the plug-in is allowed to actively publish data 
+     * to its observers, and it can consume memory and CPU resources.
+     *
+     * @since S60 5.2
+     * @param aReason reason for state change, see TResumeReason.
+     * @pre None
+     * @post Plugin is in "Alive" state and actively publishes its data.
+     *
+     * Short example what a typical resume implementation does.
+     * @code
+     * if( !MyEngineCreated() )
+     *      {
+     *      CreateEngine();
+     *      StartEngine();
+     *      }
+     *  else
+     *      {
+     *      // Publish only changed data!
+     *      RefreshData();
+     *      }          
+     * @endcode
+     */    
+    virtual void Resume( TResumeReason aReason ) = 0;
+    
+    /**
+     * This method transits the plug-in into "Suspended" state.
+     * 
+     * In this state the plug-in is not allowed to publish data 
+     * to its observers. CPU resource usage must be minimal, e.g.
+     * timers must be stopped, outstanding asynchronous operations must
+     * be canceled, etc.
+     *
+     * @since S60 5.2
+     * @param aReason reason for state change, see TSuspendReason.
+     * @pre None
+     * @post Plugin suspends publishing data and free resources (timers etc).
+     *
+     * Short example what a typical suspend implementation does.
+     * @code
+     * SuspendEngine();
+     * @endcode
+     */    
+    virtual void Suspend( TSuspendReason aReason ) = 0;
+    
+    /**
+    * This method transits the plug-in into "Online" sub-state.
+    * In this state plugin is allowed to use network connections.
+    *
+    * @since S60 5.2
+    */            
+    inline virtual void SetOnline();
+
+    /**
+    * This method transits the plug-in into "Offline" sub-state. 
+    * In this state plugin is not allowed to use network connections.
+    *
+    * @since S60 5.2
+    */                
+    inline virtual void SetOffline();
+    
+    /**
+     * Adds the content observer / subscriber to the plug-in. The plug-in must
+     * maintain a registry of subscribers and publish data to all of them
+     * when new content is available in "Alive" state.
+     *
+     * @since S60 5.2
+     * @param aObserver content observer to register.
+     * @pre None
+     * @post Plugin publishes its data to the subscribed observer.
+     *
+     * Short example what a typical subscribe implementation does and
+     * one alternative how observers are used.
+     * @code
+     * if( !ObserverAlreadyAdded( aObserver ) )
+     *     {
+     *     iMyContentObservers.AppendL( aObserver );
+     *     }
+     *
+     * ...
+     *
+     * // Engine reports data changed in "Alive" state
+     *
+     * const TDesC& data = iEngine->LatestData();
+     * for( TInt i = 0; i < iMyContentObservers.Count(); ++i )
+     *     {
+     *     iMyContentObservers[i].Publish( data );
+     *     }
+     * @endcode
+     */    
+    virtual void SubscribeL( MAiContentObserver& aObserver ) = 0;
+    
+    /**
+     * Configures the plug-in.
+     *
+     * @since S60 5.2
+     * @param aSettings setting items defined in the UI definition.
+     *                  This plugin takes ownership of the
+     *                  MAiPluginSettings objects in the array.
+     *                  If this method leaves the caller will handle the cleanup.
+     * @pre None
+     * @post Plugin has set its state according to relevant settings.
+     *
+     * Short example how to read plugin settings.
+     * @code
+     * for( TInt i = 0; i < aSettings.Count(); ++i )
+     *     {
+     *     MAiPluginSettingsItem& item = (aSettings[i])->AiPluginSettingsItem();
+     *     TInt32 value = 0;
+     *     if( ParseInt( value, item.Value() ) != KErrNone )
+     *         {
+     *         continue;
+     *         }
+     *     if( value < 0 )
+     *         {
+     *         continue; // All our settings are counts, skip bad settings
+     *         }
+     *     if( item.Key() == EMySettingMaxUsers )
+     *         {
+     *         iEngine->SetMaxUsers( value );
+     *         continue;
+     *         }
+     *     else if( item.Key() == EMySettingNumItems )
+     *         {
+     *         iNumItems = value;
+     *         continue;
+     *         }
+     *     }
+     * // aSettings ownership is passed to the plug-in, destroy array.
+     * aSettings.ResetAndDestroy();
+     * @endcode
+     */    
+    virtual void ConfigureL( RAiSettingsItemArray& aSettings ) = 0;
+           
+    /**
+     * Sets property value.
+     *
+     * @since S60 5.2
+     * @param aProperty - identification of property.
+     * @param aValue - contains pointer to property value.
+     * @see TProperty.
+     *     
+     * An example of setting a property
+     * @code               
+     * void CMyPlugin::SetPropertyL( TInt TProperty, TAny* aValue )
+     *     {
+     *     if( !aValue ) 
+     *         {
+     *         return;
+     *         }
+     *
+     *     // Save the property here to a member variable
+     *     }
+     * @endcode
+     */    
+    inline virtual void SetProperty( TProperty aProperty, TAny* aAny );
+    
+    /**
+     * Gets property value.
+     *
+     * @since S60 5.2
+     * @param aProperty - identification of property.
+     * @return Pointer to property value.
+     * @see TProperty.
+     *
+     * An example of getting a property
+     * @code          
+     * void CMyPlugin::ConstructL()
+     *     {     
+     *     iContent = AiUtility::CreateContentItemArrayIteratorL( KMyPluginContent );
+     *     iResources = AiUtility::CreateContentItemArrayIteratorL( KMyPluginResources );
+     *     iEvents = AiUtility::CreateContentItemArrayIteratorL( KMyPluginEvents );
+     *     }
+     *
+     * TAny* CMyPlugin::GetPropertyL( TProperty aProperty )
+     *     {
+     *     switch( aProperty )
+     *         {
+     *         case EPublisherContent:
+     *             return iContent;
+     * 
+     *         case EPublisherResources:
+     *             return iResources;
+     * 
+     *         case EPublisherEvents:
+     *             return iEvents;
+     *         }
+     *     return NULL;
+     *     }
+     * @endcode
+     */    
+    inline virtual TAny* GetProperty( TProperty aProperty );
+    
+    /**
+     * Invoked by the framework when the plug-in must handle an event.
+     *
+     * @since S60 5.2
+     * @param aEvent - unique identifier of event from plug-in content model.
+     * @param aParam - parameters associated with event. Each UI Definition
+     *        declares events in the format: <event name>(<event params>),
+     *        where <event name> is mapped by the framework to unique
+     *        identifier supplied in aEvent, <event params> are provided to
+     *        plug-in as-is in the descriptor.
+     */    
+    inline virtual void HandleEvent( TInt aEvent, const TDesC& aParam );
+    
+    /**
+    * Invoked by the framework when the plug-in must handle an event.
+    *
+    * @since S60 5.2
+    * @param aEventName - name of the event from plug-in content model.
+    * @param aParam - parameters associated with event. Each UI Definition
+    *        declares events in the format: <event name>(<event params>),
+    *        where  <event name> mapping to unique identifier supplied by event 
+    *        is failed by the frame work then the  <event name> and  
+    *        <event params>  are provied to plug-in as-is in the descriptor.
+    */    
+    inline virtual void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
+    
+    /**
+    * Invoked by the framework to query whether the plug-in has a menu item.
+    *
+    * @since S60 5.2
+    * @param aMenuItem menu item name
+    * @return ETrue if plugin has specific menu item, EFalse otherwise
+    */        
+    inline virtual TBool HasMenuItem( const TDesC& aMenuItem );
+            
+    /**
+     * Returns interface extension. In S60 5.2 extensions are not provided. 
+     *
+     * @param  aUid - UID of the extension interface to access.
+     * @return the extension interface. Actual type depends on the passed aUid 
+     *         argument.
+     *
+     * Example on how to properly return an extension.
+     * @code
+     * return NULL; // Requested extension not supported
+     * @endcode
+     */    
+    inline virtual TAny* Extension( TUid aUid );
+    
+    /**
+     * Gets plug-in's publisher info.
+     *
+     * @since S60 5.2
+     * @return PublisherInfo 
+     */        
+    inline const THsPublisherInfo& PublisherInfo() const;
+    
+private:     
+    // data
+    
+    /** An identifier used during destruction. */
+    TUid iDestructKey;
+    /** Publisher info. */
+    mutable THsPublisherInfo iPublisherInfo;
+    };
+
+#include <hscontentpublisher.inl>
+
+#endif // _HSCONTENTPUBLISHER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisher.inl	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Inline function implementations for hscontentpublisher.h
+*
+*/
+
+
+#ifndef _HSCONTENTPUBLISHER_INL
+#define _HSCONTENTPUBLISHER_INL
+
+// ---------------------------------------------------------------------------
+// CHsContentPublisher::NewL
+//
+// ---------------------------------------------------------------------------
+//
+inline CHsContentPublisher* CHsContentPublisher::NewL( 
+    const THsPublisherInfo& aPublisherInfo )
+    {
+    TAny* ptr = REComSession::CreateImplementationL( aPublisherInfo.Uid(),
+        _FOFF( CHsContentPublisher, iDestructKey ) );
+
+    CHsContentPublisher* self =  
+        reinterpret_cast< CHsContentPublisher*>( ptr );
+    
+    self->iPublisherInfo = aPublisherInfo;
+    
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::~CHsContentPublisher
+//
+// ----------------------------------------------------------------------------
+//
+inline CHsContentPublisher::~CHsContentPublisher()
+    {
+    REComSession::DestroyedImplementation( iDestructKey );
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::SetOnline
+//
+// ----------------------------------------------------------------------------
+//
+inline void CHsContentPublisher::SetOnline()
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::SetOffline
+//
+// ----------------------------------------------------------------------------
+//
+inline void CHsContentPublisher::SetOffline()
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::SetProperty
+//
+// ----------------------------------------------------------------------------
+//
+inline void CHsContentPublisher::SetProperty( TProperty /*aProperty*/, 
+    TAny* /*aAny*/ )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::GetProperty
+//
+// ----------------------------------------------------------------------------
+//
+inline TAny* CHsContentPublisher::GetProperty( 
+    TProperty /*aProperty*/ )
+    {
+    return NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::HandleEvent
+//
+// ----------------------------------------------------------------------------
+//
+inline void CHsContentPublisher::HandleEvent( TInt /*aEvent*/, 
+    const TDesC& /*aParam*/ )
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::HandleEvent
+//
+// ----------------------------------------------------------------------------
+//
+inline void CHsContentPublisher::HandleEvent( const TDesC& /*aEventName*/, 
+    const TDesC& /*aParam*/ )
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::HasMenuItem
+//
+// ----------------------------------------------------------------------------
+//
+inline TBool CHsContentPublisher::HasMenuItem( const TDesC& /*aMenuItem*/ )
+    {
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::Extension
+//
+// ----------------------------------------------------------------------------
+//
+inline TAny* CHsContentPublisher::Extension( TUid /*aUid*/ )
+    {
+    return NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CHsContentPublisher::PublisherInfo
+//
+// ----------------------------------------------------------------------------
+//
+inline const THsPublisherInfo& CHsContentPublisher::PublisherInfo() const
+    {
+    return iPublisherInfo;
+    }
+
+#endif // _HSCONTENTPUBLISHER_INL
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/hscontentpublisheruid.hrh	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Resource headers for HS Content Publisher
+*
+*/
+
+
+#ifndef _HSCONTENTPUBLISHERUID_HRH
+#define _HSCONTENTPUBLISHERUID_HRH
+
+/**
+ * Ecom interface uid for CHsContentPublisher.
+ *
+ * Example resource of a plugin that implements HS content publisher interface.
+ * @code
+ * #include <hscontentpublisheruid.hrh>
+ * #include <ecom/registryinfov2.rh>
+ *
+ * #define MY_DLL_UID                   0xFFEEDDCC
+ * #define MY_PLUGIN_IMPLEMENTATION_UID 0xBBAA9988
+ *
+ * RESOURCE REGISTRY_INFO registry_info
+ * {
+ *     resource_format_version = RESOURCE_FORMAT_VERSION_2;
+ *     dll_uid = MY_DLL_UID;
+ * 
+ *     // Interface info array
+ *     interfaces = 
+ *     {
+ *         INTERFACE_INFO
+ *         {
+ *             // UID of the implemented interface
+ *             interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER;
+ * 
+ *             implementations = 
+ *             {
+ *                 IMPLEMENTATION_INFO
+ *                 {
+ *                     implementation_uid = MY_PLUGIN_IMPLEMENTATION_UID;
+ *                     version_no         = 1;
+ *                     display_name       = "My plugin";
+ *                 }
+ *             };
+ *         }
+ *     };
+ * }
+ * @endcode
+ */
+#define HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER 0x200286E1
+
+#endif // _HSCONTENTPUBLISHERUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/hspublisherinfo.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: HS Publisher info
+*
+*/
+
+
+#ifndef _HSPUBLISHERINFO_H
+#define _HSPUBLISHERINFO_H
+
+// System includes
+#include <e32std.h>
+
+// User includes
+
+// Forward declarations
+
+// Constants
+
+/**
+ * Maximum length for Content publisher name.
+ * 
+ * @since S60 5.2
+ */
+const TInt KHsPublisherNameMaxLength( 128 );
+
+/**
+ * Maximum length for Content publisher namespace.
+ * 
+ * @since S60 5.2
+ */
+const TInt KHsPublisherNamespaceMaxLength( 32 );
+
+// Types
+
+/**
+ * Content publisher name buffer.
+ * 
+ * @since S60 5.2 
+ */
+typedef TBuf< KHsPublisherNameMaxLength > THsPublisherName;
+
+/**
+ * Content publisher namespace buffer.
+ *
+ * @since S60 5.2 
+ */
+typedef TBuf8< KHsPublisherNamespaceMaxLength > THsPublisherNamespace;
+
+/**
+ * Content publisher information
+ *
+ * @since S60 5.2
+ */
+
+/**
+ * Holds content publisher plug-in information.
+ * 
+ * @since S60 5.2
+ */
+class THsPublisherInfo
+    {
+public:
+    // Constructors
+    
+    /**
+     * C++ default contrutor
+     */    
+    inline THsPublisherInfo(); 
+
+    /**
+     * C++ contrutor
+     */        
+    inline THsPublisherInfo( const TUid& aUid, 
+        const TDesC& aName, const TDesC8& aNamespace );
+    
+public:
+    // new functions
+    
+    /**
+     * Assigment operator
+     * 
+     * @since S60 5.2
+     * @param aInfo Publisher info to assign.
+     */
+    inline THsPublisherInfo& operator= ( const THsPublisherInfo& aInfo );
+    
+    /**
+     * Equals operator
+     * 
+     * @since S60 5.2
+     * @param aInfo Publisher info  to compare
+     * @return ETrue if this and aInfo equals, EFalse otherwise.
+     */
+    inline TBool operator== ( const THsPublisherInfo& aInfo ) const;
+            
+    /**
+     * Gets Uid
+     * 
+     * @since S60 5.2
+     * @return Uid 
+     */
+    inline TUid Uid() const;
+
+    /**
+     * Gets Name
+     * 
+     * @since S60 5.2
+     * @return Name 
+     */    
+    inline const TDesC& Name() const;
+
+    /**
+     * Gets Namespace
+     * 
+     * @since S60 5.2
+     * @return Namespace
+     */        
+    inline const TDesC8& Namespace() const;
+        
+private:
+    // data
+
+    /** Publisher implementation UID */
+    TUid iUid;
+    /** Publisher name */
+    THsPublisherName iName;
+    /** Publisher namespace */
+    THsPublisherNamespace iNamespace;
+    
+private:
+    // friend classes
+    
+    friend class CAiPluginFactory;
+
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_HsPublisherInfo;
+#endif
+    };
+
+#include <hspublisherinfo.inl>
+
+#endif  // _HSPUBLISHERINFO_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/hspublisherinfo.inl	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Inline function implementations for hspublisherinfo.h
+*
+*/
+
+
+#ifndef _HSPUBLISHERINFO_INL
+#define _HSPUBLISHERINFO_INL
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::THsPublisherInfo
+//
+// ---------------------------------------------------------------------------
+//
+inline THsPublisherInfo::THsPublisherInfo()
+    : iUid( TUid::Null() ), iName( KNullDesC ), iNamespace( KNullDesC8 )             
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::THsPublisherInfo
+//
+// ---------------------------------------------------------------------------
+//
+inline THsPublisherInfo::THsPublisherInfo( const TUid& aUid, 
+    const TDesC& aName, const TDesC8& aNamespace )
+    {    
+    iUid = TUid::Uid( aUid.iUid );
+    iName.Copy( aName );
+    iNamespace.Copy( aNamespace );    
+    }
+    
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::operator=
+//
+// ---------------------------------------------------------------------------
+//
+inline THsPublisherInfo& THsPublisherInfo::operator= ( 
+    const THsPublisherInfo& aInfo )
+    {
+    iUid = TUid::Uid( aInfo.iUid.iUid );
+    iName.Copy( aInfo.iName );
+    iNamespace.Copy( aInfo.iNamespace );   
+
+    return *this;  
+    }
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::operator==
+//
+// ---------------------------------------------------------------------------
+//
+inline TBool THsPublisherInfo::operator== ( 
+    const THsPublisherInfo& aInfo ) const
+    {
+    if( iUid == aInfo.iUid && 
+        iName == aInfo.iName &&
+        iNamespace == aInfo.iNamespace )
+        {
+        return ETrue;
+        }
+        
+    return EFalse;                                       
+    }
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::Uid
+//
+// ---------------------------------------------------------------------------
+//
+inline TUid THsPublisherInfo::Uid() const
+    {
+    return iUid;
+    }
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::Name
+//
+// ---------------------------------------------------------------------------
+//
+inline const TDesC& THsPublisherInfo::Name() const
+    {
+    return iName;
+    }
+
+// ---------------------------------------------------------------------------
+// THsPublisherInfo::Namespace
+//
+// ---------------------------------------------------------------------------
+//
+inline const TDesC8& THsPublisherInfo::Namespace() const
+    {
+    return iNamespace;
+    }
+
+#endif  // _HSPUBLISHERINFO_INL
+
+// End of file
--- a/homescreensrv_plat/ai_shortcut_command_api/ai_shortcut_command_api.metaxml	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<api id="178473c941d92ff1095ae98ebd827b68" dataversion="1.0">
-  <name>AI Shortcut Command API</name>
-  <description>Gives possibility to execute shortcuts defined by localapp URL</description>
-  <type>c++</type>
-  <subsystem>activeidle</subsystem>
-  <libs>
-  </libs>
-  <release category="domain"/>
-  <attributes>
-     <!-- This indicates wether the api provedes separate html documentation -->
-     <!-- or is the additional documentation generated from headers. -->
-     <!-- If you are unsuere then the value is "no" -->
-     <htmldocprovided>yes</htmldocprovided>
-     <adaptation>no</adaptation>
-  </attributes>
-</api>
--- a/homescreensrv_plat/ai_shortcut_command_api/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  File that exports the files belonging to 
-:                AI Shortcut Command API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/aiscutplugindomaincrkeys.h     MW_LAYER_PLATFORM_EXPORT_PATH(aiscutplugindomaincrkeys.h)
--- a/homescreensrv_plat/ai_shortcut_command_api/inc/aiscutplugindomaincrkeys.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut Plug-in CenRep keys.
-*
-*/
-
-
-#ifndef AISCUTPLUGINDOMAINCRKEYS_H
-#define AISCUTPLUGINDOMAINCRKEYS_H
-
-/**
- * Uid for central repository file that holds shortcut plug-in settings.
- */
-const TUid KCRUidShortcutItems = { 0x10275104 };
-
-/**                                           
- * Flag bit 31                                  
- * Theme-default shortcuts.                     1000 0000 0000 0000 0000 0000 0000 0000
- */
-const TUint32 KScutFlagBitThemeDefault        = 0x80000000;
-
-/**                                             
- * Mask to unset the theme-default flag.        0111 1111 1111 1111 1111 1111 1111 1111
- */
-const TUint32 KScutBitMaskThemeDefault        = 0x7FFFFFFF;
-
-/**
- * Flag bit 30
- * Locked shortcuts.                            0100 0000 0000 0000 0000 0000 0000 0000
- */
-const TUint32 KScutFlagBitLocked              = 0x40000000;
-
-/**
- * Mask to unset the locked flag.               1011 1111 1111 1111 1111 1111 1111 1111
- */
-const TUint32 KScutBitMaskLocked              = 0xBFFFFFFF;
-                                                
-/**
- * Flag bit 24
- * Optionally visible shortcut (softkeys).      0000 0001 0000 0000 0000 0000 0000 0000
- */
-const TUint32 KScutFlagBitOptionallyVisible   = 0x01000000;
-
-/**
- * Flag bit 25
- * Non-visible shortcut (key press).            0000 0010 0000 0000 0000 0000 0000 0000
- */
-const TUint32 KScutFlagBitNonVisible          = 0x02000000;
-
-/**
-* Flag bits 26-31                               //0000 0001 0000 0000 0000 0001 0000 0000
-* Icon ovverides                                0010 0000 0000 0000 0000 0000 0000 0000
-*/
-const TUint32 KScutFlagBitIconOverride        = 0x20000000;
-
-/**
- * Flag bit for toolbar shortcuts
- */
-const TUint32 KScutFlagBitToolbarShortcut     = 0x10000000;
-
-/**
- * Mask for additional settings. 
- */
-const TUint32 KScutMaskAdditionalSetting      = 0xFFFFFFFF ^ (KScutFlagBitIconOverride + KScutFlagBitToolbarShortcut);
-
-/**
- * Partial key for theme-default shortcut ids.
- */
-const TUint32 KScutCenRepKeyThemeDefault      = KScutFlagBitThemeDefault;
-
-/**
- * Partial key for user defined shortcut ids.
- */
-const TUint32 KScutCenRepKeyUserDefined       = 0x0;
-
-/**
- * Mask used to separate theme-default ids from user defined ids.
- */
-const TUint32 KScutCenRepKeyMask              = KScutFlagBitThemeDefault;
-
-/**
- * Shortcut count for the active theme
- */
-const TUint32 KScutCenRepShorcutCount         = 0xFFFFFFF0;
-
-/**
- * A key which contains a space-separated list of application UIDs
- * identifying the applications that should not show the xSP tip message.
- */
-const TUint32 KAIxSPNoTipAppsList             = 0x0001FFFF;
-
-/**
- * Shortcut plug-in keycodes for optionally visible shortcuts.
- */
-enum TAiScutKeyCodes
-{
-    // Navigation keys.
-    EAiScutScrollKeyLeft  = 0x0000,
-    EAiScutScrollKeyRight = 0x0001,
-    EAiScutScrollKeyUp    = 0x0002,
-    EAiScutScrollKeyDown  = 0x0003,
-    EAiScutSelectionKey   = 0x0004,
-
-    // Soft keys.
-    EAiScutSoftKeyLeft    = 0x0100,
-    EAiScutSoftKeyRight   = 0x0101,
-    
-    // Touch toolbar
-    EAiScutToolbarFirst   = 0x1000,
-    EAiScutToolbarSecond  = 0x1001,
-    EAiScutToolbarThird   = 0x1002
-};
-
-#endif // AISCUTPLUGINDOMAINCRKEYS_H
-
-// End of File.
--- a/homescreensrv_plat/ai_utilities_api/inc/aiplugintool.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/ai_utilities_api/inc/aiplugintool.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,14 +19,15 @@
 #ifndef M_AIPLUGINTOOL_H
 #define M_AIPLUGINTOOL_H
 
+// System includes
 #include <e32base.h>
-#include <aipropertyextension.h>
 
-class TAiPublisherInfo;
-class CAiContentPublisher;
+// User incldues
+#include <hscontentpublisher.h>
+
+// Forward declarations
+class THsPublisherInfo;
 class MAiContentItemIterator;
-class MAiPropertyExtension;
-class MAiEventHandlerExtension;
 
 /**
 *  Plugin tool.
@@ -39,44 +40,15 @@
 public:
 
     /**
-     * Get the publisher info of the passed publisher.
-     *
-     * @since S60 3.2
-     * @param reference to content publisher
-     * @return pointer to publisher info 
-     */
-    virtual const TAiPublisherInfo* PublisherInfoL(
-                                CAiContentPublisher& aContentPublisher ) = 0;
-
-    /**
      * Get the content item iterator for the passed publisher.
      *
      * @param reference to content publisher
      * @param content type indication
      * @return pointer to content iterator 
      */
-    virtual MAiContentItemIterator* ContentItemIteratorL(
-                                CAiContentPublisher& aContentPublisher,
-                                TInt aContentType = EAiPublisherContent ) = 0;
-
-
-    /**
-     * Get the property extension for passed publisher.
-     *
-     * @param reference to content publisher
-     * @return property extension pointer
-     */
-    virtual MAiPropertyExtension* PropertyExt(
-                                CAiContentPublisher& aContentPublisher ) = 0;
-
-    /**
-     * Get the event handler extension for passed publisher.
-     *
-     * @param reference to content publisher
-     * @return event handler extension pointer
-     */                                
-    virtual MAiEventHandlerExtension* EventHandlerExt(
-                                CAiContentPublisher& aContentPublisher ) = 0;
+    virtual MAiContentItemIterator* ContentItemIterator(
+        CHsContentPublisher& aContentPublisher,
+        CHsContentPublisher::TProperty aType = CHsContentPublisher::EPublisherContent ) = 0;
 
     /**
      * Release the tool.
@@ -85,8 +57,7 @@
 	    
 protected:
 	    
-	MAiPluginTool() { }
-    
+	MAiPluginTool() { }    
     };
 
 inline void Release( MAiPluginTool* aSelf )
--- a/homescreensrv_plat/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -22,7 +22,6 @@
 #include "../ai_utilities_api/group/bld.inf"
 #include "../ai_plugin_management_api/group/bld.inf"
 #include "../ai_plugin_information_api/group/bld.inf"
-#include "../ai_shortcut_command_api/group/bld.inf"
 #include "../ai_variation_api/group/bld.inf"
 #include "../action_handler_plugin_api/group/bld.inf"
 #include "../content_harvester_plugin_api/group/bld.inf"
@@ -35,7 +34,6 @@
 #include "../sapi_actionhandler/group/bld.inf"
 #include "../sapi_homescreenplugin/group/bld.inf"
 #include "../sapi_menucontent/group/bld.inf"
-#include "../shortcutplugin_extension_api/group/bld.inf"
 #include "../xcfw_api/group/bld.inf"
 #include "../idlefw_api/group/bld.inf"
 #include "../hs_widget_publisher_api/group/bld.inf"
--- a/homescreensrv_plat/hs_settings_api/inc/hspluginsettings.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/hs_settings_api/inc/hspluginsettings.h	Fri Feb 19 23:07:29 2010 +0200
@@ -18,7 +18,7 @@
 #define C_CHomeScreenSettingsIf_H
 
 #include <e32base.h>
-#include <LiwCommon.h>      // for MLiwNotifyCallback
+#include <liwcommon.h>      // for MLiwNotifyCallback
 #include <mhomescreensettingsif.h>
 #include <mhomescreensettingsobserver.h>
 
--- a/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -809,6 +809,9 @@
 	aDataMap->InsertL( KWidgetName, TLiwVariant( *widgetName ) );
     aDataMap->InsertL( KWidgetMaxInstance, TLiwVariant( 1 ) );
     
+    // this is needed by chswiplugin:
+    aDataMap->InsertL( KWidgetUid, TLiwVariant( iWidgetUid ));
+    
     const std::string& widgetDescriptionStd = aWidget.getDescription();
     if ( widgetDescriptionStd.length() )
         {
--- a/homescreensrv_plat/idlefw_api/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/idlefw_api/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -25,8 +25,8 @@
 ../inc/aiuicontrolleruid.hrh     MW_LAYER_PLATFORM_EXPORT_PATH(aiuicontrolleruid.hrh)
 ../inc/aiconsts.h                MW_LAYER_PLATFORM_EXPORT_PATH(aiconsts.h)
 ../inc/aifweventhandler.h        MW_LAYER_PLATFORM_EXPORT_PATH(aifweventhandler.h)
+../inc/aifwstatehandler.h        MW_LAYER_PLATFORM_EXPORT_PATH(aifwstatehandler.h)
 ../inc/aiuicontroller.h          MW_LAYER_PLATFORM_EXPORT_PATH(aiuicontroller.h)
-../inc/aiuiframeworkobserver.h   MW_LAYER_PLATFORM_EXPORT_PATH(aiuiframeworkobserver.h)
 ../inc/aiuiidleintegration.h     MW_LAYER_PLATFORM_EXPORT_PATH(aiuiidleintegration.h)
 ../inc/debug.h                   MW_LAYER_PLATFORM_EXPORT_PATH(debug.h) // needed?
 ../inc/aifwdefs.h                MW_LAYER_PLATFORM_EXPORT_PATH(aifwdefs.h)
--- a/homescreensrv_plat/idlefw_api/inc/aifwdefs.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/idlefw_api/inc/aifwdefs.h	Fri Feb 19 23:07:29 2010 +0200
@@ -16,25 +16,59 @@
 */
 
 
-#ifndef AIFWDEFS_H
-#define AIFWDEFS_H
+#ifndef _AIFWDEFS_H
+#define _AIFWDEFS_H
 
+// System inclides
 
-#include <e32std.h>
-#include <aipropertyextension.h>
+// User includes
+
+// Type definitions
 
 /**
- * Array of publisher Content publisher info records.
+ * AiFw State definitions.
+ *
+ * @since S60 5.2
  */
-typedef RArray<TAiPublisherInfo> RAiPublisherInfoArray;
-
-_LIT(KOnline_Offline, "online_offline");
+enum TAiFwState
+    {
+    EAiFwBacklightOn = 1,
+    EAiFwBacklightOff,
+    EAiFwForeground,
+    EAiFwBackground,
+    EAiFwBackupRestoreStart,
+    EAiFwBackupRestoreEnd,
+    EAiFwGeneralThemeChange,    
+    EAiFwUiStartup,
+    EAiFwUiShutdown,
+    EAiFwOnline,
+    EAiFwOffline
+    };
 
-enum TAifwStates
-	{
-	EAifwOffline,
-	EAifwOnline,
-	EAifwPageSwitch
-	};
+/**
+ * AiFw data plugin load reasons.
+ *
+ * @since S60 5.2
+ */    
+enum TAiFwLoadReason
+    {
+    EAiFwSystemStartup = 1,
+    EAiFwPageStartup,
+    EAiFwPluginStartup
+    };    
 
-#endif // AIFWDEFS_H
+/**
+ * AiFw data plugin destroy reasons.
+ *
+ * @since S60 5.2
+ */        
+enum TAiFwDestroyReason
+    {
+    EAiFwSystemShutdown = 1,
+    EAiFwPageShutdown,
+    EAiFwPluginShutdown
+    };
+
+#endif // _AIFWDEFS_H
+
+// End of file
--- a/homescreensrv_plat/idlefw_api/inc/aifweventhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/idlefw_api/inc/aifweventhandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,11 +19,15 @@
 #ifndef M_AIFWEVENTHANDLER_H
 #define M_AIFWEVENTHANDLER_H
 
+// System includes
 #include <e32cmn.h>
-#include <aifwdefs.h>
+
+// User includes
 
+// Forward declarations
 class CAiUiController;
-class CAiContentPublisher;
+class CHsContentPublisher;
+class THsPublisherInfo;
 
 /**
  * Active Idle Framework internal event handling interface. 
@@ -33,56 +37,50 @@
  * @since S60 3.2
  */
 class MAiFwEventHandler
-{
+    {
 public:
+    // new functions
+    
     /**
      * Application environment ready callback. Main UI controller calls this 
      * method when application framework is initialized.
+     *
+     * @since S60 3.2
      */
     virtual void AppEnvReadyL() = 0;
 
     /**
      * UI ready event handler.
      *
+     * @since S60 3.2
      * @param aUiController Active Idle UI Controller which manages the UI 
-     *                      that is ready.
+     *                      that is ready.     
      */
     virtual void HandleUiReadyEventL( CAiUiController& aUiController ) = 0;
 
     /**
      * UI activation event handler.
-     *     
+     *
+     * @since S60 3.2     
      */
     virtual void HandleActivateUI() = 0;
     
     /**
      * UI shutdown event handler.
      *
+     * @since S60 3.2
      * @param aUiController Active Idle UI Controller which manages the UI 
-     *                      that was shut down.
+     *                      that was shut down.     
      */
     virtual void HandleUiShutdown( CAiUiController& aUiController ) = 0;
 
     /**
-     * UI has changed, load data plugin.
-     *
-     * @param aPublisherInfo Publisher info describing plugin to load.
-     */    
-    virtual void HandleLoadPluginL( const TAiPublisherInfo& aPublisherInfo ) = 0;
-    
-    /**
-     * UI has changed, destroy data plugin.
-     *
-     * @param aPublisherInfo Publisher info describing plugin to destroy.
-     */    
-    virtual void HandleDestroyPluginL( const TAiPublisherInfo& aPublisherInfo ) = 0;    
-
-    /**
      * Active Idle Framework Plug-in event handler. UI controllers forward
      * events that are targeted to Active Idle Content Publisher Plug-ins
      * to this method.
      *
-     * @param aParam event parameters from the UI model.     
+     * @since S60 3.2
+     * @param aParam event parameters from the UI model.          
      */
     virtual void HandlePluginEvent( const TDesC& aParam ) = 0;
 
@@ -91,50 +89,77 @@
      * events that are targeted to Active Idle Content Publisher Plug-ins
      * to this method.
      *
+     * @since S60 5.2
      * @param aPublisherInfo publisher info.
      * @param aParam event parameters from the UI model.
      */
-    virtual void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam ) = 0;
+    virtual void HandlePluginEventL( 
+        const THsPublisherInfo& aPublisherInfo, 
+        const TDesC& aParam ) = 0;
 
     /**
      * Queries if a Content Publiseher Plug-in has settings     
      *
+     * @since S60 5.2
      * @param aPublisherInfo publisher info.
      * @param aMenuItem menuitem type.
      */          
-    virtual TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem ) = 0;
+    virtual TBool HasMenuItemL( 
+        const THsPublisherInfo& aPublisherInfo, 
+        const TDesC& aMenuItem ) = 0;
+
+    /**
+     * Refresh content request. UI controller can use this interface to request
+     * a content publisher plug-in to refresh (re-publish) a specific content 
+     * item.
+     *
+     * @since S60 3.2
+     * @param aContentCid Textual identifier of the content to refresh.
+     * @return True if the content publisher plug-in is found and the plugin 
+     *         will refresh the content by calling its content observer. 
+     *         False otherwise.
+     */
+    virtual TBool RefreshContent( const TDesC& aContentCid ) = 0;
 
     /**
      * Refresh content request. UI controller can use this interface to request
      * a content publisher plug-in to refresh (re-publish) a specific content 
      * item.
      *
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
      * @param aContentCid Textual identifier of the content to refresh.
      * @return True if the content publisher plug-in is found and the plugin 
      *         will refresh the content by calling its content observer. 
      *         False otherwise.
      */
-     virtual TBool RefreshContent( const TDesC& aContentCid ) = 0;
+    virtual TBool RefreshContent( const THsPublisherInfo& aPublisherInfo,
+        const TDesC& aContentCid ) = 0;
 
     /**
+     * Suspend content request. UI controller can use this interface to request
+     * a content publisher plug-in to suspend a specific content 
+     * item.
+     *
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
+     * @param aContentCid Textual identifier of the content to refresh.
+     * @return True if the content publisher plug-in is found and the plugin 
+     *         will refresh the content by calling its content observer. 
+     *         False otherwise.
+     */    
+    virtual TBool SuspendContent( const THsPublisherInfo& aPublisherInfo,
+        const TDesC& aContentCid ) = 0;
+        
+    /**
      * Service to check if menu is open.
      *
+     * @since S60 3.2
      * @return ETrue if menu is open, EFalse otherwise
      */
-    virtual TBool QueryIsMenuOpen() = 0;
-
-    /**
-     * Service to process the state changes
-     *
-     * @param aState changed state
-     */    
-    virtual void ProcessStateChange( TAifwStates aState ) = 0;
-                  
-protected:
-    /**
-     * Protected destructor prevents deletion through this interface.
-     */
-    ~MAiFwEventHandler() { }
+    virtual TBool QueryIsMenuOpen() = 0;                  
     };
 
 #endif // M_AIEVENTHANDLEREXTENSION_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/idlefw_api/inc/aifwstatehandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Active Idle Framework internal state handling interface.
+*
+*/
+
+
+#ifndef M_AIFWSTATEHANDLER_H
+#define M_AIFWSTATEHANDLER_H
+
+// System includes
+
+// User includes
+#include <aifwdefs.h>
+
+// Forward declarations
+class THsPublisherInfo;
+
+/**
+ * Active Idle Framework internal state handling interface. 
+ * Events from UI controllers are forwarded to this interface for processing 
+ * on the Active Idle Framework side.
+ *
+ * @since S60 5.2
+ */
+class MAiFwStateHandler
+    {
+public:
+    // new functions
+    
+    /** 
+     * Instructs to load plugin
+     * 
+     * @since S60 5.2
+     * @param aPublisherInfo plugin to load
+     * @param aReason startup reason 
+     * @return Error code, KErrNone if loaded succesfully.
+     */    
+    virtual TInt LoadPlugin( const THsPublisherInfo& aPublisherInfo,
+        TAiFwLoadReason aReason ) = 0;
+    
+    /** 
+     * Instructs to destroy plugin
+     * 
+     * @since S60 5.2
+     * @param aPublisherInfo plugin to destroy
+     * @param aReason shutdown reason
+     */
+    virtual void DestroyPlugin( const THsPublisherInfo& aPublisherInfo,
+        TAiFwDestroyReason aReason ) = 0;
+    
+    /**
+     * Instructs to change all plugins' state
+     * 
+     * @since S60 5.2
+     * @param aState State to change
+     */
+    virtual void ChangePluginState( TAiFwState aState ) = 0;
+    
+    /**
+     * Queries whether online state is in use
+     * by any of the currently loaded plugin.
+     * 
+     * @since S60 5.2
+     * @return ETrue if online/offline state needed, EFalse otherwise
+     */
+    virtual TBool OnlineStateInUse() const = 0;
+    };
+
+#endif // M_AIFWSTATEHANDLER_H
+
+// End of file
--- a/homescreensrv_plat/idlefw_api/inc/aiuicontroller.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/idlefw_api/inc/aiuicontroller.h	Fri Feb 19 23:07:29 2010 +0200
@@ -16,22 +16,25 @@
 */
 
 
-#ifndef C_AIUICONTROLLER_H
-#define C_AIUICONTROLLER_H
+#ifndef _AIUICONTROLLER_H
+#define _AIUICONTROLLER_H
 
+// System includes
 #include <ecom/ecom.h>
+
+// User includes
 #include "aicontentmodel.h"
-#include "aifwdefs.h"
 #include "aiuicontrolleruid.hrh"
 #include "aipluginsettings.h"
 
+// Forward declarations
 class MAiContentObserver;
 class MAiFwEventHandler;
-class MAiUiFrameworkObserver;
-class CCoeEnv;
-class CAiContentPublisher;
+class MAiFwStateHandler;
 class MAiMainUiController;
 class MAiSecondaryUiController;
+class THsPublisherInfo;
+class CCoeEnv;
 
 /**
  * ECom interface UID for CAiUiContoller
@@ -46,8 +49,7 @@
 class CAiUiController : public CBase
     {
 public:
-
-// Constructors and destructor
+    // Constructors and destructor
 
     /**
      * Static factory method.
@@ -56,7 +58,7 @@
      * @param ECom implementatoin uid
      * @return class instance
      */
-    inline static CAiUiController* NewL(TUid aImpUid);
+    inline static CAiUiController* NewL( TUid aImpUid );
 
     /**
      * Static factory method.
@@ -65,14 +67,15 @@
      * @param mimetype
      * @return class instance
      */
-    inline static CAiUiController* NewL(const TDesC8& aMime);
+    inline static CAiUiController* NewL( const TDesC8& aMime );
 
     /**
      * Destructor.
      */
-    inline virtual ~CAiUiController();
+    inline ~CAiUiController();
 
-// New functions
+public:
+    // New functions
 
     /**
      * Instructs this UI controller to load its UI definition.
@@ -82,22 +85,15 @@
     virtual void LoadUIDefinitionL() = 0;
 
     /**
-     * Retrieves the Content Publisher Plug-in list defined in this UI 
-     * controller's UI model.
-     *
-     * @since Series 60 3.2
-     */
-    virtual void GetPluginsL(RAiPublisherInfoArray& aPlugins) = 0;
-
-    /**
      * Retrieves plug-in settings specified in this UI controller's UI definition.
      *
-     * @param aPubInfo      Publisher info of the plug-in for which to 
-     *                      retrieve settings for.
+     * @param aPublisherInfo Publisher info of the plug-in for which to 
+     *                       retrieve settings for.
      * @param aSettings array to get settings items to.
      */
-    virtual void GetSettingsL(const TAiPublisherInfo& aPubInfo, 
-    							RAiSettingsItemArray& aSettings) = 0;
+    virtual void GetSettingsL( 
+        const THsPublisherInfo& aPublisherInfo, 
+        RAiSettingsItemArray& aSettings ) = 0;
 
     /**
      * Activate UI managed by this UI controller.
@@ -122,15 +118,16 @@
      *                      Set to NULL to disable event callbacks from this
      *                      UI Controller.
      */
-    virtual void SetEventHandler(MAiFwEventHandler& aEventHandler) = 0;
+    virtual void SetEventHandler( MAiFwEventHandler& aEventHandler ) = 0;
     
     /**
-     * Remove specified plugin from the UI.
-     *
-     * @param aPlugin plugin that is removed.
-     */     
-    virtual void RemovePluginFromUI( MAiPropertyExtension& aPlugin ) = 0;
-
+     * Sets plugin state handler
+     * 
+     * @since S60 5.2
+     * @param aHandler Plugin State Handler     
+     */
+    virtual void SetStateHandler( MAiFwStateHandler& aStateHandler ) = 0; 
+    
     /**
      * Returns the main UI Controller interface, or NULL if this is not the 
      * main UI controller.
@@ -143,32 +140,49 @@
      */
     virtual MAiSecondaryUiController* SecondaryInterface() = 0;   
     
-private:     // Data
+private:
+    // data
 
-    TUid iDestructKey; // An identifier used during destruction
-
+    /** An identifier used during destruction */
+    TUid iDestructKey; 
     };
 
-inline CAiUiController* CAiUiController::NewL(TUid aImplUid)
+// ----------------------------------------------------------------------------
+// CAiUiController::NewL
+//
+// ----------------------------------------------------------------------------
+//
+inline CAiUiController* CAiUiController::NewL( TUid aImplUid )
     {
-    TAny* ptr = REComSession::CreateImplementationL(aImplUid,
-        _FOFF(CAiUiController, iDestructKey));
+    TAny* ptr = REComSession::CreateImplementationL( aImplUid,
+        _FOFF( CAiUiController, iDestructKey ) );
 
-    return reinterpret_cast<CAiUiController*> (ptr);
+    return reinterpret_cast< CAiUiController* >( ptr );
     }
 
-inline CAiUiController* CAiUiController::NewL(const TDesC8& aMime)
+// ----------------------------------------------------------------------------
+// CAiUiController::NewL
+//
+// ----------------------------------------------------------------------------
+//
+inline CAiUiController* CAiUiController::NewL( const TDesC8& aMime )
     {
     TEComResolverParams params;
-    params.SetDataType(aMime);
-    TAny* ptr = REComSession::CreateImplementationL(KInterfaceUidUiController,
-        _FOFF(CAiUiController, iDestructKey), params);
-    return reinterpret_cast<CAiUiController*> (ptr);
+    params.SetDataType( aMime );
+    TAny* ptr = REComSession::CreateImplementationL( KInterfaceUidUiController,
+        _FOFF( CAiUiController, iDestructKey ), params );
+    
+    return reinterpret_cast< CAiUiController* >( ptr );
     }
 
+// ----------------------------------------------------------------------------
+// CAiUiController::~CAiUiController
+//
+// ----------------------------------------------------------------------------
+//
 inline CAiUiController::~CAiUiController()
     {
-    REComSession::DestroyedImplementation(iDestructKey);
+    REComSession::DestroyedImplementation( iDestructKey );
     }
 
 
@@ -181,6 +195,8 @@
 class MAiMainUiController
     {
 public:
+    // new functions
+    
     /**
      * Starts application framework and application event loop.
      * This function returns only when the application is shut down.
@@ -194,12 +210,7 @@
      * Returns the CONE environment object this main UI controller uses.
      */
     virtual CCoeEnv& CoeEnv() = 0;
-    
-    /**
-     * Sets UI framework observer for this main UI controller.
-     */
-    virtual void SetUiFrameworkObserver( MAiUiFrameworkObserver& aObserver ) = 0; 
-    
+        
     /**
     * Exits the main ui controller
     **/
@@ -220,21 +231,16 @@
 class MAiSecondaryUiController
     {
 public:
+    // new functions
+    
     /**
      * Sets the CONE environment object for this secondary UI controller to use.
      *
      * @param aCoeEnv the CONE environment object to use.
      */
-    virtual void SetCoeEnv( CCoeEnv& aCoeEnv ) = 0;
-    
-    /**
-     * Returns the UI framework observer of this secondary UI controller.
-     *
-     * @return The UI framework observer, or NULL if observer is not supported.
-     */
-    virtual MAiUiFrameworkObserver* UiFrameworkObserver() = 0; 
+    virtual void SetCoeEnv( CCoeEnv& aCoeEnv ) = 0;    
     };
 
-#endif // C_AIUICONTROLLER_H
+#endif // _AIUICONTROLLER_H
 
 // End of File.
--- a/homescreensrv_plat/idlefw_api/inc/aiuiframeworkobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Observer interface for UI framework events
-*
-*/
-
-
-#ifndef M_AIUIFRAMEWORKOBSERVER_H
-#define M_AIUIFRAMEWORKOBSERVER_H
-
-#include <e32def.h>
-
-/**
- *  MAiUiFrameworkObserver observes UI framework events.
- *
- *  @since S60 v3.2
- */
-class MAiUiFrameworkObserver
-    {
-
-public:
-
-    /**
-     * Event handler for resource change in UI framework.
-     *
-     * @param aType resource change type.
-     */
-    virtual void HandleResourceChange( TInt aType ) = 0;
-    
-    /**
-     * Event handler for focus change event.
-     *
-     * @param aForeground ETrue if UI is foreground.
-     */
-    virtual void HandleForegroundEvent( TBool aForeground ) = 0;
-
-protected:
-
-    virtual ~MAiUiFrameworkObserver() {};
-
-    };
-
-
-#endif // M_AIUIFRAMEWORKOBSERVER_H
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.der has changed
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.key	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn
-uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO
-vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB
-AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo
-REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss
-/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J
-s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut
-sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/
-pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp
-VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ
-P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK
-1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT
-1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x
------END RSA PRIVATE KEY-----
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_armv5.pkg	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_armv5.pkg	Fri Feb 19 23:07:29 2010 +0200
@@ -117,6 +117,7 @@
 "../testthemes/installed_widget/manifest.dat"-"c:/data/mt_hsps/installed_widget/manifest.dat"
 "../testthemes/installed_widget/plugin_0998_101FB657_2000B133_1.0.dat"-"c:/data/mt_hsps/installed_widget/plugin_0998_101FB657_2000B133_1.0.dat"
 "../testthemes/installed_widget/widgetconfiguration.xml"-"c:/data/mt_hsps/installed_widget/widgetconfiguration.xml"
+"../testthemes/installed_widget/widgetconfiguration_customized.xml"-"c:/data/mt_hsps/installed_widget/widgetconfiguration_customized.xml"
 "../testthemes/installed_widget/0/locale.dtd"-"c:/data/mt_hsps/installed_widget/0/locale.dtd"
 "../testthemes/installed_widget/0/hs_logo.jpg"-"c:/data/mt_hsps/installed_widget/0/hs_logo.jpg"
 "../testthemes/installed_widget/0/widget.bmp"-"c:/data/mt_hsps/installed_widget/0/widget.bmp"
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_winscw.pkg	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/mt_sapi_homescreenplugin_winscw.pkg	Fri Feb 19 23:07:29 2010 +0200
@@ -117,6 +117,7 @@
 "../testthemes/installed_widget/manifest.dat"-"c:/data/mt_hsps/installed_widget/manifest.dat"
 "../testthemes/installed_widget/plugin_0998_101FB657_2000B133_1.0.dat"-"c:/data/mt_hsps/installed_widget/plugin_0998_101FB657_2000B133_1.0.dat"
 "../testthemes/installed_widget/widgetconfiguration.xml"-"c:/data/mt_hsps/installed_widget/widgetconfiguration.xml"
+"../testthemes/installed_widget/widgetconfiguration_customized.xml"-"c:/data/mt_hsps/installed_widget/widgetconfiguration_customized.xml"
 "../testthemes/installed_widget/0/locale.dtd"-"c:/data/mt_hsps/installed_widget/0/locale.dtd"
 "../testthemes/installed_widget/0/hs_logo.jpg"-"c:/data/mt_hsps/installed_widget/0/hs_logo.jpg"
 "../testthemes/installed_widget/0/widget.bmp"-"c:/data/mt_hsps/installed_widget/0/widget.bmp"
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd	Fri Feb 19 23:07:29 2010 +0200
@@ -20,4 +20,4 @@
  
 if exist \epoc32\winscw\c\sys\bin\mt_*.dll del \epoc32\winscw\c\sys\bin\mt_*.dll
 if exist \epoc32\winscw\c\sys\hash\mt_*.dll del \epoc32\winscw\c\sys\hash\mt_*.dll
-copy \epoc32\release\winscw\udeb\mt_*.dll \epoc32\release\winscw\udeb\z\sys\bin
\ No newline at end of file
+copy \epoc32\release\winscw\udeb\mt_*.dll \epoc32\winscw\c\sys\bin
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_customization_1.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,127 @@
+/*
+* 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:  Test case Customizations(1) test data
+*
+*/
+
+#ifndef MT_HSPS_CUSTOMIZATION_1_H_
+#define MT_HSPS_CUSTOMIZATION_1_H_
+
+/* 
+Customizations(1)
+----------------
+ 
+Test purpose
+
+Verify that customized configurations are shadowing similar files 
+in ROM drive. Customized content can written to similar folder
+structure, to any internal drive which users cannot hack (too easily). 
+HSPS's ROM installer should then utilize ecplised files from the 
+customization folders instead.
+This test utilizes a copy of the orginal xml file, with an 
+exception that all the default settings have been removed.
+
+Pre-conditions
+•   There must be installed test themes for Active Idle application and 
+    Minimal configuration must be set as active. Installed_widget with 
+    an 2000B133 UID must be available. Customized configuration file is 
+    written to the C's install folder for shadowing purposes.     
+
+Test steps
+
+Test step 1:
+•   Input:
+    InstallConfigurationL( KHSPSInstallInstalledWidgetConf );
+•   Expected output:
+    "Installed_widget" is installed successfully.
+
+Test step 2:
+•   Input:
+    GetPluginSettings(“plugin uid”)
+•   Expected output:
+    All settings, which were there by default, are now gone.
+        
+*/
+
+// Test step 2 method:
+const TUint8 customization_1_ts_2_method[] = "GetPluginSettings";
+
+// Test step 2 input:
+const TUint8 customization_1_ts_2_input[] = {
+// GetPluginSettings(Input)
+// - Version 1.0
+// - Item count (LE)
+10,
+1,0,0,0,
+// - GetPluginSettings(Input)::pluginUid
+//   - Variant name
+//     - Version 1.0
+//     - Semantic ID (LE)    
+//     - Variant name length (LE)
+//     - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+//     - Variant name
+10,
+12,0,0,0,
+9,0,0,0,
+38,
+'p','l','u','g','i','n','U','i','d',
+// - GetPluginSettings(Input)::pluginUid
+//   - Variant value
+//     - Version 1.0
+//     - Variant value type, EVariantTypeDesC
+//     - Variant value length (LE)
+//     - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+//     - Variant value
+10,
+5,
+10,0,0,0,
+42,
+'0','x','2','0','0','0','B','1','3','3'
+};
+
+// Test step 2 output:
+const TUint8 customization_1_ts_2_output[] =  {
+// GetPluginSettings(Output)
+// - Version 1.0
+// - Item count (LE)
+10,
+1,0,0,0,
+// - GetPluginSettings::settings
+//   - Variant name
+//     - Version 1.0
+//     - Semantic ID (LE)    
+//     - Variant name length (LE)
+//     - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+//     - Variant name
+10,
+12,0,0,0,
+8,0,0,0,
+34,
+'s','e','t','t','i','n','g','s',
+// - GetPluginSettings::settings
+//   - Variant value
+//     - Version 1.0
+//     - Variant value type, EVariantTypeList
+10,
+7,
+// - GetPluginSettings::settings
+//   - Version 1.0
+//   - Item count (LE)
+10,
+0,0,0,0,
+};
+
+
+
+#endif /*MT_HSPS_CUSTOMIZATION_1_H_*/
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h	Fri Feb 19 23:07:29 2010 +0200
@@ -448,6 +448,11 @@
          * See HSPS module test specification
          */
         void RestoreConfigurations_1_L();
+        /**
+         * Test case function for test case Customization(1)
+         * See HSPS module test specification
+         */
+        void Customization_1_L();
         
     private:    // Data
 
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -116,6 +116,8 @@
 #include "mt_hsps_setactiveplugin_6.h"
 // restore configurations
 #include "mt_hsps_restoreconfigurations_1.h"
+// customizations
+#include "mt_hsps_customization_1.h"
 
 // ======== LOCAL CONSTANTS ====================================================
 
@@ -222,11 +224,12 @@
     installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSFinnishWidgetConf );
     installationService->UninstallConfigurationL( KHSPSMTInterfaceUid, KHSPSInstalledWidgetConf );
 
-    // Remove test configurations from import folder
+    // Remove test configurations from import & install folder at C drive
     CFileMan* fileManager = CFileMan::NewL( iFileserver );
     CleanupStack::PushL( fileManager );
     fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ) );     
     fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) );
+    fileManager->RmDir( _L( "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ) );    
     CleanupStack::PopAndDestroy( fileManager );
     
     // Install test configurations    
@@ -2944,6 +2947,51 @@
     }
 
 //------------------------------------------------------------------------------
+// Test case: Customization(1)
+//------------------------------------------------------------------------------
+void MT_CHSPSConfigurationIf::Customization_1_L()
+    {        
+    // Pre conditions
+        
+    EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) );
+    SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal );    
+        
+    EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) );
+    AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid );
+            
+    // Simulate customization by copying configuration files to D drive ("ROM" stuff is on C)
+    CFileMan* fileManager = CFileMan::NewL( iFileserver );
+    CleanupStack::PushL( fileManager );
+    User::LeaveIfError( 
+        fileManager->Copy(
+            _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration_customized.xml" ),
+            _L( "d:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ),
+            CFileMan::ERecurse|CFileMan::EOverWrite 
+            )             
+        );    
+    CleanupStack::PopAndDestroy( fileManager );
+                
+    MT_CHspsInstallationService* installationService = MT_CHspsInstallationService::NewL();    
+    CleanupStack::PushL( installationService );
+        
+    // Test step 1: install installed_widget which has customized content in D drive
+    EUNIT_PRINT( _L8( "Test step 1" ) );        
+    installationService->InstallConfigurationL( KHSPSInstallInstalledWidgetConf );
+    EUNIT_PRINT( _L8( "Test step passed" ) );    
+            
+    // Test step 2: check settings from the installed_widget, it should hold
+    // settings from the widgetconfiguration_customized.xml file    
+    EUNIT_PRINT( _L8( "Test step 2" ) );             
+    RunTestStepSyncL(
+        ( TUint8* )customization_1_ts_2_method,
+        ( TUint8* )customization_1_ts_2_input,
+        ( TUint8* )customization_1_ts_2_output );             
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+                
+    CleanupStack::PopAndDestroy( installationService );    
+    }
+
+//------------------------------------------------------------------------------
 // Test case table
 //------------------------------------------------------------------------------
 EUNIT_BEGIN_TEST_TABLE(
@@ -3470,7 +3518,14 @@
        "SetActivePlugin",
        "FUNCTIONALITY",
        SetupL, RestoreConfigurations_1_L, Teardown )
-       
+
+    EUNIT_TEST(   
+       "Customization(1)",
+       "IConfiguration",
+       "SetActivePlugin",
+       "FUNCTIONALITY",
+       SetupL, Customization_1_L, Teardown )
+
        
     EUNIT_END_TEST_TABLE
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget/widgetconfiguration_customized.xml	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,13 @@
+<configuration>
+
+	<control>
+
+		<settings>			
+		</settings>
+
+	</control>
+
+  <resources>  	
+	</resources>
+
+</configuration>
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/hs_logo.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/locale.dtd	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============================================================================
+<FileName: "locale.dtd">
+<PartOf  : "HSPS - ELangTest">
+
+<FileDescription: "Localization strings for HSPS">
+<FileVersion    : >
+
+<Copyright:
+"Copyright © 2005 Nokia Corporation.
+This material, including documentation and any related 
+computer programs, is protected by copyright controlled by 
+Nokia Corporation. All rights are reserved. Copying, 
+including reproducing, storing,  adapting or translating, any 
+or all of this material requires the prior written consent of 
+Nokia Corporation. This material also contains confidential 
+information which may not be disclosed to others without the 
+prior written consent of Nokia Corporation.">
+============================================================================
+-->
+
+<!--  LOCALISATION STRINGS  -->
+
+<!ENTITY qtn_2000B133_configuration_name "Installed - Widget V2">
+<!ENTITY qtn_2000B133_size "Size">
+
+
+
+<!-- End of File-->
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/0/widget.bmp has changed
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/hs_logo.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/locale.dtd	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============================================================================
+<FileName: "locale.dtd">
+<PartOf  : "HSPS - ELangEnglish">
+
+<FileDescription: "Localization strings for HSPS">
+<FileVersion    : >
+
+<Copyright:
+"Copyright © 2005 Nokia Corporation.
+This material, including documentation and any related 
+computer programs, is protected by copyright controlled by 
+Nokia Corporation. All rights are reserved. Copying, 
+including reproducing, storing,  adapting or translating, any 
+or all of this material requires the prior written consent of 
+Nokia Corporation. This material also contains confidential 
+information which may not be disclosed to others without the 
+prior written consent of Nokia Corporation.">
+============================================================================
+-->
+
+<!--  LOCALISATION STRINGS  -->
+
+<!ENTITY qtn_2000B133_configuration_name "Installed - Widget V2">
+<!ENTITY qtn_2000B133_size "Size">
+
+
+
+<!-- End of File-->
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/1/widget.bmp has changed
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/hs_logo.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/locale.dtd	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============================================================================
+<FileName: "locale.dtd">
+<PartOf  : "HSPS - ELangFinnish">
+
+<FileDescription: "Localization strings for HSPS">
+<FileVersion    : >
+
+<Copyright:
+"Copyright © 2008 Nokia Corporation.
+This material, including documentation and any related 
+computer programs, is protected by copyright controlled by 
+Nokia Corporation. All rights are reserved. Copying, 
+including reproducing, storing,  adapting or translating, any 
+or all of this material requires the prior written consent of 
+Nokia Corporation. This material also contains confidential 
+information which may not be disclosed to others without the 
+prior written consent of Nokia Corporation.">
+============================================================================
+-->
+
+<!--  LOCALISATION STRINGS  -->
+
+<!ENTITY qtn_2000B133_configuration_name "Installoitu - Widget V2">
+<!ENTITY qtn_2000B133_size "Koko">
+
+<!-- End of File-->
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/9/widget.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/manifest.dat	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<package version="0.3">
+  
+  <!-- application|view|widget|template -->
+  <type>widget</type>
+  
+  <!-- Interface Uid -->
+	<interfaceuid>0998</interfaceuid>
+	
+	<!-- Vendor UID -->
+	<provideruid>101FB657</provideruid>
+	
+	<!-- UID -->
+	<configurationuid>2000B133</configurationuid>	
+	
+	<!-- statusmakeactive|statuslicenceedefault|statuslicenceerestorable|statusoperatordefault|statususerdefault -->
+	
+	<!-- Description -->
+	<fullname>&amp;qtn_2000B133_configuration_name;</fullname>
+	<shortname>InstallWidgetConf</shortname>
+	<version>2.0</version>
+	
+	<!-- Configuration -->
+	<filexml>widgetconfiguration.xml</filexml>	
+	
+	<!-- Name of the localization files -->
+	<filedtd>locale.dtd</filedtd>
+	
+	<!-- Locale independent/common resources -->		
+	<localization>
+	    <fileresource>hs_logo.jpg</fileresource>
+	    <fileresource>widget.bmp</fileresource>
+	</localization>
+  
+</package>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/testthemes/installed_widget_v2/widgetconfiguration.xml	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,18 @@
+<configuration>
+
+	<control>
+
+		<settings>
+			<item id="size" name="" _name="&amp;qtn_s60shortcut_size;">
+		    <property name="heigth" value="20"/>
+		    <property name="width" value="240"/>
+		    <property name="locked" value="yes"/>
+		  </item> 
+		</settings>
+
+	</control>
+
+  <resources>  	
+	</resources>
+
+</configuration>
--- a/homescreensrv_plat/shortcutplugin_extension_api/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  File that exports the files belonging to 
-:                AI Shortcut xSP Extension API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/aiscutextserv.h                MW_LAYER_PLATFORM_EXPORT_PATH(aiscutextserv.h)
-../inc/aiscutextdefs.h                MW_LAYER_PLATFORM_EXPORT_PATH(aiscutextdefs.h)
--- a/homescreensrv_plat/shortcutplugin_extension_api/inc/aiscutextdefs.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Common client/server definitions for Shortcut plug-in
-*
-*/
-
-
-#ifndef AISCUTEXTDEFS_H
-#define AISCUTEXTDEFS_H
-
-_LIT( KAiScutExtServerName, "AiScutExtServer" );
-
-const TUint KAiScutExtServMajorVersionNumber = 1;
-const TUint KAiScutExtServMinorVersionNumber = 0;
-const TUint KAiScutExtServBuildVersionNumber = 0;
-
-const TUint KMaxPopupTextLines = 3;
-
-/**
- * xSP extension server requests
- */
-enum TAiScutExtServRequest
-    {
-    EAiScutExtServSetTargetDefinition = 1,
-    EAiScutExtServSetPopupText,
-    EAiScutExtServResetPopupText,
-    EAiScutExtServSetIcon,
-    EAiScutExtServResetIcon,
-    EAiScutExtServIsInShortcuts,
-    EAiScutExtServIssuePutInShortcuts
-    };
-
-/**
- * AiScutExtServer client panic codes
- */
-enum TAiScutExtServerPanic
-    {
-    EBadRequest = 1
-    };
-
-#endif // AISCUTEXTDEFS_H
-
-// End of File.
--- a/homescreensrv_plat/shortcutplugin_extension_api/inc/aiscutextserv.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AI Shortcut xSP Extension API
-*
-*/
-
-
-#ifndef RAISCUTEXTSERV_H
-#define RAISCUTEXTSERV_H
-
-#include <e32std.h>
-#include <bamdesca.h>
-
-class CGulIcon;
-
-/**
- *  Active Idle Shortcut Plugin extension client side API.
- *  @since S60 v3.2
- */
-class RAiScutExtServ : public RSessionBase
-{
-    public:
-        /**
-         * Connects a client to the AiScut extension server.
-         * Target definition is generated automatically from process' uid 3.
-         * @return KErrNone, if successful, otherwise one of the other
-         * system-wide error codes.
-         */
-        IMPORT_C TInt Connect();
-
-        /**
-         * Connects a client to the AiScut extension server.
-         * @param aTargetDefinition Target definition string.
-         * @return KErrNone, if successful, otherwise one of the other
-         * system-wide error codes.
-         */
-        IMPORT_C TInt Connect( const TDesC& aTargetDefinition );
-
-        /**
-         * @return The client side version number.
-         */
-        IMPORT_C TVersion Version() const;
-
-        /**
-         * Updates a pop-up text box.
-         * @param aPopupTextLines Array of lines displayed in pop-up text box.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt UpdatePopupTextL( const MDesCArray& aPopupTextLines );
-
-        /**
-         * Resets a pop-up text box.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt ResetPopupText();
-
-        /**
-         * Updates a shortcut icon.
-         * @param aIcon Icon to be shown in shortcut.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt UpdateIconL( const CGulIcon& aIcon );
-
-        /**
-         * Resets a shortcut icon. Default icon will be shown.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt ResetIcon();
-
-        /**
-         * @return ETrue if the shortcut is in shortcuts bar.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt IsInShortcuts( TBool& aIsInShortcuts ) const;
-
-        /**
-         * Launches AiScutPlugin General Settings view.
-         * @return KErrNone, if successful, otherwise one of the other system-wide error codes.
-         */
-        IMPORT_C TInt IssuePutInShortcuts();
-};
-
-#endif // RAISCUTEXTSERV_H
-
-// End of File.
--- a/homescreensrv_plat/shortcutplugin_extension_api/shortcutplugin_extension_api.metaxml	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="c7c71e536333cd0f359b87036b8beea7" dataversion="1.0">
-  <name>AI Shortcut xSP Extension API</name>
-  <description>Enables client applications to publish dynamic shortcut graphics and tooltips</description>
-  <type>c++</type>
-  <subsystem>activeidle</subsystem>
-  <libs>
-    <lib name="aiscutextserv.lib" />
-  </libs>
-  <release category="domain"/>
-  <attributes>
-     <!-- This indicates wether the api provedes separate html documentation -->
-     <!-- or is the additional documentation generated from headers. -->
-     <!-- If you are unsuere then the value is "no" -->
-     <htmldocprovided>no</htmldocprovided>
-     <adaptation>no</adaptation>
-  </attributes>
-</api>
--- a/homescreensrv_plat/xcfw_api/inc/xcfwengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/homescreensrv_plat/xcfw_api/inc/xcfwengine.h	Fri Feb 19 23:07:29 2010 +0200
@@ -22,7 +22,7 @@
 
 //  INCLUDES
 #include <s32std.h>
-#include <GMXMLParser.h>
+#include <gmxmlparser.h>
 #include <gmxmlcomposer.h>
 #include "gecodefaultobjectfactory.h"
 
--- a/idlefw/group/aifw.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/group/aifw.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -28,23 +28,12 @@
 // Framework sources
 SOURCEPATH      ../src/framework
 SOURCE          aifw.cpp
-SOURCE          aicontentpluginmanager.cpp
+SOURCE          aieventhandler.cpp 
+SOURCE          aipluginfactory.cpp
 SOURCE          aiuicontrollermanager.cpp
-SOURCE          aicallstatusobserver.cpp
-SOURCE          ailightstatusobserver.cpp
-SOURCE          aibackuprestorestatusobserver.cpp
-SOURCE          aienvironmentchangeobserver.cpp
-SOURCE          aifocusobserver.cpp
-SOURCE          aikeylockobserver.cpp
-SOURCE          aipsstatusobserver.cpp
-SOURCE          aipluginstatemanager.cpp
-SOURCE          aipluginstatemachineimpl.cpp
-SOURCE          aistatealive.cpp
-SOURCE          aistatesuspended.cpp
-SOURCE          aistateidle.cpp
-SOURCE          aipluginfactory.cpp
-SOURCE          aiuiframeworkobserverimpl.cpp
-SOURCE          ainetworklistener.cpp
+SOURCE          aistatemanager.cpp
+SOURCE          aistateprovider.cpp
+SOURCE          aiecomobserver.cpp
 
 // Active Idle Framework shared sources
 SOURCEPATH      ../src/common
@@ -71,17 +60,13 @@
 LIBRARY         featmgr.lib
 LIBRARY         eikcore.lib
 LIBRARY         hwrmlightclient.lib
-LIBRARY         networkhandling.lib
+LIBRARY         aknskinsrv.lib
 
 // Active Idle internal dependencies
-LIBRARY     aiutils.lib aiidleint.lib
+LIBRARY         aiutils.lib 
+LIBRARY         aiidleint.lib
 
 // Debugging dependencies
-LIBRARY    flogger.lib
-
-//++HV
-LIBRARY akntransitionutils.lib
-//--HV
+LIBRARY         flogger.lib
 
 DEFFILE         aifwu.def
-
--- a/idlefw/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -25,15 +25,14 @@
 
 
 PRJ_EXPORTS
-../plugins/devicestatus/loc/aidevstaplgres.loc          MW_LAYER_LOC_EXPORT_PATH(aidevstaplgres.loc)
-../loc/aifw.loc                                       MW_LAYER_LOC_EXPORT_PATH(aifw.loc)
+../loc/aifw.loc                             MW_LAYER_LOC_EXPORT_PATH(aifw.loc)
 
 // Generic configuration interface for component cenrep settings
 ../conf/activeidle2.confml                  APP_LAYER_CONFML(activeidle2.confml)
 ../conf/activeidle2_10275102.crml           APP_LAYER_CRML(activeidle2_10275102.crml)
 
-../rom/idlefw.iby                                  CORE_MW_LAYER_IBY_EXPORT_PATH(idlefw.iby)
-../rom/idlefw_resources.iby                        LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(idlefw_resources.iby)
+../rom/idlefw.iby                           CORE_MW_LAYER_IBY_EXPORT_PATH(idlefw.iby)
+../rom/idlefw_resources.iby                 LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(idlefw_resources.iby)
 
 PRJ_MMPFILES
 aiutils.mmp
--- a/idlefw/inc/framework/aibackuprestorestatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Backup / Restore status observer
-*
-*/
-
-
-#ifndef C_AIBACKUPRESTORESTATUSOBSERVER_H
-#define C_AIBACKUPRESTORESTATUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include "aipsstatusobserver.h"
-
-class MAiPSPropertyObserver;
-
-/**
- * @ingroup group_aifw
- * 
- *  Publish and subscribe key observer
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiBackupRestoreStatusObserver ) : public CAiPSStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiBackupRestoreStatusObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiBackupRestoreStatusObserver();
-
-// functions from base class CAiPSStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiBackupRestoreStatusObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// new functions
-
-    static TInt HandleBackupOperationEvent( TAny* aPtr );
-    
-    };
-
-#endif // C_AIBACKUPRESTORESTATUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/aicallstatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Call status observer
-*
-*/
-
-
-#ifndef C_AICALLSTATUSOBSERVER_H
-#define C_AICALLSTATUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include "aipsstatusobserver.h"
-
-class MAiPSPropertyObserver;
-
-/**
- * @ingroup group_aifw
- * 
- *  Publish and subscribe key observer
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiCallStatusObserver ) : public CAiPSStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiCallStatusObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiCallStatusObserver();
-
-// functions from base class CAiPSStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiCallStatusObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// new functions
-
-    static TInt HandleCallStateChange( TAny* aPtr );
-
-    };
-
-#endif // C_AICALLSTATUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/aicontentpluginmanager.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Content plugin manager class for Active idle framework.
-*
-*/
-
-
-
-#ifndef C_AICONTENTPLUGINMANAGER_H
-#define C_AICONTENTPLUGINMANAGER_H
-
-#include <e32base.h>
-#include "aicontentmodel.h"
-#include "aicontentpublisher.h"
-#include "aifwdefs.h"
-#include "aipluginsettings.h"
-#include "aipluginfactory.h"
-
-class MAiContentObserver;
-class MAiEventHandlerExtension;
-class MAiPluginTool;
-class CAiContentPublisher;
-class CAiPluginStateManager;
-class CAiUiController;
-class CImplementationInformation;
-
-/**
- * @ingroup group_aifw
- * 
- *  Content plugin manager class for Active idle framework.
- *
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CAiContentPluginManager ) : public CBase
-                                               
-	{
-public: // Constructor and destructor	        	
-		
-    static CAiContentPluginManager* NewL();
-                                              
-    virtual ~CAiContentPluginManager();
-		    
-public: // New functions
-    
-    /**
-     * Forward plugin event to plugins.
-     *
-     * @since S60 3.2
-     * @param aParam event string.
-     */
-    void HandlePluginEvent( const TDesC& aParam );
-
-    /**
-     * Forward plugin event to plugins.
-     *
-     * @since S60 5.0
-     * @param aPublisherInfo publisher info.
-     * @param aParam event string.
-     */
-    void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam ); 
-            
-    /**
-     * Queries wheter a plugin has settigns or not.
-     */
-    TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem );
-
-    /**
-     * Requests a Content publisher plug-in to refresh a content item.
-     */
-    TBool RefreshContent( const TDesC& aContentCid );
-
-    /**
-     * Sets plugins to online/offline
-     * 
-     * @since S60 5.0
-     * @param aOnline ETrue to set plugins online, EFalse to offline
-     * @paran aPublishers List of publishers
-     */    
-    void ProcessOnlineState( TBool aOnline );
-            
-    /**
-     * Gets plugin state manager.     
-     *
-     * @since S60 5.0
-     * @return plugin state manager.
-     */        
-    CAiPluginStateManager& StateManager() const;
-
-    /**
-     * Gets plugin factory.     
-     *
-     * @since S60 5.0
-     * @return plugin factory.
-     */        
-    CAiPluginFactory& PluginFactory() const;
-    
-    
-private: // Constructors
-
-    CAiContentPluginManager();
-                             
-    void ConstructL();
-
-private: // New functions
-                                        
-    void GetIdL( CAiContentPublisher& aContentPublisher,
-                 TAiPublisherProperty aProperty,            
-                 const TDesC& aName, TInt& aId ); 
-            
-    TInt RefreshContentL( const TDesC& aContentCid );
-
-private: // Data
-
-    /**
-     * Plugins array.
-     * Owned. 
-     */
-    RPointerArray< CAiContentPublisher > iPlugins;
-
-    /**
-     * Plugin factory.
-     * Owned.
-     */
-    CAiPluginFactory* iPluginFactory;
-    
-    /**
-     * System state observer.
-     * Owned.
-     */    
-    CAiPluginStateManager* iStateManager;
-    
-    /**
-     * Plugin tool from utility lib.
-     * Owned.
-     */
-    MAiPluginTool* iPluginTool;     
-    };
-
-#endif // C_AICONTENTPLUGINMANAGER_H
-
-// End of File.
--- a/idlefw/inc/framework/aidevicestatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Device status observer
-*
-*/
-
-
-#ifndef M_AIDEVICESTATUSOBSERVER_H
-#define M_AIDEVICESTATUSOBSERVER_H
-
-#include "aipluginstatemachine.h"
-
-/**
- *  description
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-class MAiDeviceStatusObserver
-    {
-
-public:
-
-    virtual ~MAiDeviceStatusObserver(){}
-
-    virtual TAiStateChanges Status() = 0;
-
-    };
-
-#endif // M_AIDEVICESTATUSOBSERVER_H
-
-// End of File.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/inc/framework/aiecomobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CAiEcomObserver class implementation.
+ *
+*/
+
+
+#ifndef AIECOMOBSERVER_H
+#define AIECOMOBSERVER_H
+
+// System includes
+#include <e32base.h>	
+#include <e32std.h>		
+#include <ecom/ecom.h>
+
+// User includes
+
+
+// Class declaration
+/**
+ * 
+ * Active Idle ECom observer
+ *
+ * @ingroup group_aifw
+ * @lib aifw.lib 
+ * @since S60 5.2 
+ */
+class MAiEcomObserver
+    {
+public:
+    
+    /**    
+    * This is called when the IdleFw detects a change in ECom
+    * plugin registrations (adding, removing or upgrading ECOM-plugins).
+    * 
+    * @since S60 5.2   
+    */
+    virtual void NotifyEcomRegistryChanged() = 0;    
+    };
+
+
+// Class declaration
+/**
+ * 
+ * Active Idle ECom observer
+ * 
+ * @ingroup group_aifw
+ * @lib aifw.lib 
+ * @since S60 5.2 
+ */
+NONSHARABLE_CLASS( CAiEcomObserver ) : public CActive
+    {
+public:
+    // constructors and destructor
+    
+    // Two-phased constructor.
+    static CAiEcomObserver* NewL();
+
+    // Two-phased constructor.
+    static CAiEcomObserver* NewLC();
+
+    // Cancel and destroy
+    ~CAiEcomObserver();
+
+public: 
+    // New functions
+
+    /**
+     * Adds a new observer for plugin notifications.
+     * @param aObserver Observer pointer.
+     */
+    void AddObserverL( MAiEcomObserver* aObserver );
+
+private:
+    // new functions
+
+    // Start observing ecom notification
+    void StartObserving();
+
+    // Notifies observers
+    void NotifyObservers();
+
+private:
+    // constructors
+    
+    /**
+     * C++ default constructor
+     */
+    CAiEcomObserver();
+    
+    /**
+     * 2nd phase constructor
+     */
+    void ConstructL();
+
+private: 
+    // from CActive
+
+    /**
+     * @see CActive
+     */
+    void RunL();
+
+    /**
+     * @see CActive
+     */
+    void DoCancel();
+    
+private:
+    // data
+
+    /** ECom session handle (must be closed, not deleted), Own */
+    REComSession iEComSession;
+
+    /** Own: Array of Observers - pointer not owned */
+    RPointerArray< MAiEcomObserver > iObservers;
+    
+private:
+    // friend classes
+    
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_AiEcomObserver;
+#endif
+    };
+
+#endif // AIECOMOBSERVER_H
+
+// End of file
--- a/idlefw/inc/framework/aienvironmentchangeobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Environment observer
-*
-*/
-
-
-#ifndef C_AIENVIROMENTCHANGEOBSERVER_H
-#define C_AIENVIROMENTCHANGEOBSERVER_H
-
-#include <e32base.h>
-#include "aidevicestatusobserver.h"
-#include "aiuiframeworkobserver.h"
-
-class MAiStateManager;
-class CEnvironmentChangeNotifier;
-
-/**
- * @ingroup group_aifw
- * 
- *  System enviroment change observer.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CAiEnvironmentChangeObserver ) : public CBase,
-                                                   public MAiDeviceStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiEnvironmentChangeObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiEnvironmentChangeObserver();
-
-// functions from base class CAiEnvironmentChangeObserver
-
-    TAiStateChanges Status();
-
-// new functions
-
-    static TInt EnvironmentChangeCallBack(TAny* aPtr);
-    
-private:
-
-// Construction
-    
-    CAiEnvironmentChangeObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-
-protected: // Data
-
-    /**
-     * State manager.
-     * Not own.
-     */
-    MAiStateManager*   iStateManager;
-
-    /**
-     * Enviroment change notifier: time, locale and midnight crossover
-     * Own.
-     */
-    CEnvironmentChangeNotifier*                 iEnvironmentChangeNotifier;
-    };
-
-#endif // C_AIENVIROMENTCHANGEOBSERVER_H
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/inc/framework/aieventhandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Content plugin event handler class for Active idle framework.
+*
+*/
+
+
+
+#ifndef _AIEVENTHANDLER_H
+#define _AIEVENTHANDLER_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+#include <hscontentpublisher.h>
+
+// Forward declarations
+class MAiPluginTool;
+class CAiPluginFactory;
+class CHsContentPublisher;
+class THsPublisherInfo;
+
+// Class declaration
+/**
+ * @ingroup group_aifw
+ * 
+ *  Content plugin eventhandler class for Active idle framework.
+ *
+ *  @lib aifw
+ *  @since S60 5.2
+ */
+NONSHARABLE_CLASS( CAiEventHandler ) : public CBase                                              
+	{
+public: // Constructor and destructor	        	
+		
+    static CAiEventHandler* NewL( CAiPluginFactory& aFactory );
+                                              
+    ~CAiEventHandler();
+		    
+public: // New functions
+    
+    /**
+     * Forward plugin event to plugins.
+     *
+     * @since S60 5.2
+     * @param aParam event string.
+     */
+    void HandlePluginEvent( const TDesC& aParam );
+
+    /**
+     * Forward plugin event to plugins.
+     *
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
+     * @param aParam event string.
+     */
+    void HandlePluginEventL( 
+        const THsPublisherInfo& aPublisherInfo, const TDesC& aParam ); 
+            
+    /**
+     * Queries wheter a plugin has a menuitem or not.
+     * 
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
+     * @param aMenuItem menuitem to query. 
+     * @return ETrue if exists, EFalse otherwise
+     */
+    TBool HasMenuItemL( 
+        const THsPublisherInfo& aPublisherInfo, const TDesC& aMenuItem );
+
+    /**
+     * Requests a Content publisher plug-in to refresh a content item.
+     * 
+     * @since S60 5.2
+     * @param aContentCid Content id to refresh     
+     * @return ETrue if succesful, EFalse otherwise      
+     */
+    TBool RefreshContent( const TDesC& aContentCid );
+
+    /**
+     * Requests a Content publisher plug-in to refresh a content item.
+     * 
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
+     * @param aContentCid Content id to refresh              
+     * @return ETrue if succesful, EFalse otherwise      
+     */    
+    TBool RefreshContent( 
+        const THsPublisherInfo& aPublisherInfo, const TDesC& aContentCid );
+        
+    /**
+     * Requests a Content publisher plug-in to suspend a content item.
+     * 
+     * @since S60 5.2
+     * @param aPublisherInfo publisher info.
+     * @param aContentCid Content id to suspend
+     * @return ETrue if succesful, EFalse otherwise      
+     */        
+    TBool SuspendContent( 
+        const THsPublisherInfo& aPublisherInfo, const TDesC& aContentCid );
+            
+private: 
+    // Constructors
+
+    /**
+     * C++ default contructor
+     */
+    CAiEventHandler( CAiPluginFactory& aFactory );
+                             
+    /**
+     * 2nd phase contructor
+     */
+    void ConstructL();
+
+private: 
+    // new functions
+                                        
+    void GetIdL( CHsContentPublisher& aContentPublisher,
+        CHsContentPublisher::TProperty aProperty, const TDesC& aName, TInt& aId );            
+                              
+    TInt RefreshContentL( const TDesC& aContentCid );
+
+private: 
+    // data
+
+    /** Plugin factory, Not owned */
+    CAiPluginFactory& iFactory;
+    /** Plugin tool from utility lib, Owned */
+    MAiPluginTool* iPluginTool;     
+
+private:
+    // friend classes
+    
+#ifdef _AIFW_UNIT_TEST
+    class UT_AiEventHandler;
+#endif
+	};
+
+#endif // _AIEVENTHANDLER_H
+
+// End of File.
--- a/idlefw/inc/framework/aifocusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AI2 focus observer.
-*
-*/
-
-
-#ifndef C_AIFOCUSOBSERVER_H
-#define C_AIFOCUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-//++HV 
-#include <akntransitionutils.h>
-//--HV 
-#include "aipsstatusobserver.h"
-
-class MAiPSPropertyObserver;
-
-/**
- * @ingroup group_aifw
- * 
- *  Focus change observer. Using telephony idle visiblity PS.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiFocusObserver ) : public CAiPSStatusObserver
-										//++HV    
-    									,public MAknTransitionUtilsObserver
-										//--HV    
-    {
-public:
-
-// Construction
-
-    static CAiFocusObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiFocusObserver();
-
-// functions from base class CAiPSStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiFocusObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// new functions
-
-    //++HV
-    
-    static TInt StaticHandleFocusChangeEvent( TAny* aPtr );
-    TInt HandleFocusChangeEvent();
-
-    
-	// From MAknTransitionUtilsObserver
-	TInt AknTransitionCallback(TInt aEvent, TInt aState = 0, const TDesC8* aParams = NULL);
-		
-        
-private:
-	TBool iTfxEffectActive;
-
-
-	//--HV 
-    };
-
-#endif // C_AIFOCUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/aifw.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/inc/framework/aifw.h	Fri Feb 19 23:07:29 2010 +0200
@@ -16,38 +16,37 @@
 */
 
 
-#ifndef C_AIFW_H
-#define C_AIFW_H
+#ifndef _AIFW_H
+#define _AIFW_H
 
+// System includes
 #include <e32base.h>
-#include <aicontentpublisher.h>
-#include <centralrepository.h>
 #include <cenrepnotifyhandler.h>
 
-#include "aifwdefs.h"
-#include "aicontentmodel.h"
-#include "aifweventhandler.h"
+// User includes
+#include <aifweventhandler.h>
 
+// Forward declarations
 class CAiUiControllerManager;
-class CAiContentPluginManager;
+class CAiStateManager;
+class CAiStateProvider;
+class CAiPluginFactory;
+class CAiEventHandler;
 class CAiWsPluginManager;
-class CAiPluginStateManager;
-class RConeResourceLoader;
-class CAiContentPublisher;
 class MAiPSPropertyObserver;
-class CAiNetworkListener;
+class THsPublisherInfo;
 
+// Class declaration
 /**
  * @ingroup group_aifw
  * 
  * Active Idle Framework main class.
  */
-NONSHARABLE_CLASS( CAiFw ) : 
-        public CBase,
-        public MAiFwEventHandler,
-        public MCenRepNotifyHandlerCallback        
+NONSHARABLE_CLASS( CAiFw ) : public CBase, public MAiFwEventHandler,                
+    public MCenRepNotifyHandlerCallback        
     {
-public: // Constructors and destructors    
+public: 
+    // constructors and destructor    
 
     /**
      * Creates and returns a new Active Idle Framework object.
@@ -59,6 +58,9 @@
      */
     IMPORT_C static CAiFw* NewLC();
   
+    /**
+     * Destructor
+     */
     ~CAiFw();
   
 public: // New functions
@@ -72,11 +74,21 @@
      */
     IMPORT_C void RunL();
         
-private: // Constructors      
+private: 
+    // constructors
+    
+    /**
+     * Default C++ constructor
+     */
     CAiFw();
+    
+    /**
+     * 2nd phase constructor
+     */
     void ConstructL();
   
-private: // From MAiFwEventHandler    
+private: 
+    // from MAiFwEventHandler    
         
     /**
      * @see MAiFwEventHandler
@@ -97,17 +109,7 @@
      * @see MAiFwEventHandler
      */    
     void HandleUiShutdown( CAiUiController& aUiController );
-    
-    /**
-     * @see MAiFwEventHandler
-     */        
-    void HandleLoadPluginL( const TAiPublisherInfo& aPublisherInfo );
-    
-    /**
-     * @see MAiFwEventHandler
-     */        
-    void HandleDestroyPluginL( const TAiPublisherInfo& aPublisherInfo );            
-    
+        
     /**
      * @see MAiFwEventHandler
      */        
@@ -116,76 +118,88 @@
     /**
      * @see MAiFwEventHandler
      */        
-    void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam );
+    void HandlePluginEventL( 
+        const THsPublisherInfo& aPublisherInfo, 
+        const TDesC& aParam );
 
     /**
      * @see MAiFwEventHandler
      */    
-    TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem );        
+    TBool HasMenuItemL( 
+        const THsPublisherInfo& aPublisherInfo, 
+        const TDesC& aMenuItem );        
 
     /**
      * @see MAiFwEventHandler
      */        
     TBool RefreshContent( const TDesC& aContentCid );
+
+    /**
+     * @see MAiFwEventHandler
+     */            
+    TBool RefreshContent( 
+        const THsPublisherInfo& aPublisherInfo,
+        const TDesC& aContentCid );
+
+    /**
+     * @see MAiFwEventHandler
+     */            
+    TBool SuspendContent( 
+        const THsPublisherInfo& aPublisherInfo,
+        const TDesC& aContentCid );
     
     /**
      * @see MAiFwEventHandler
      */        
     TBool QueryIsMenuOpen();
-
-    /**
-     * @see MAiFwEventHandler
-     */            
-    void ProcessStateChange( TAifwStates aState );    
         
-private: // From MCenRepNotifyHandlerCallback
+private: 
+    // from MCenRepNotifyHandlerCallback
 
     /**
      * @see MCenRepNotifyHandlerCallback
      */
     void HandleNotifyInt( TUint32 aId, TInt aNewValue );
     
-private: // New functions        
-                 
-    static TInt HandleFocusChangeEvent( TAny* aSelf );
+public:
+    // new functions
+    
+    /**
+     * Get repository
+     * 
+     * @since S60 5.2
+     * @return Repositury
+     */
+    CRepository& Repository() const;
+    
+private: 
+    // new functions        
+                     
     static TInt HandleRestartEvent( TAny* aSelf );
     void SwapUiControllerL( TBool aToExtHS );
 
-private: // Data     
+private: 
+    // data     
     
-    /**
-     * UI Controller manager, Owned.     
-     */
+    /** UI Controller manager, Owned. */
     CAiUiControllerManager* iUiControllerManager;
-
-    /**
-     * Content plugin manager, Owned.     
-     */
-    CAiContentPluginManager* iPluginManager;
-
-    /**
-     * Window server plug-in manager, Owned.
-     */
+    /** Plugin factory, Owned */
+    CAiPluginFactory* iFactory;
+    /** State manager, Owned */
+    CAiStateManager* iStateManager;
+    /** State provider, Owned */
+    CAiStateProvider* iStateProvider;
+    /** Plugin event handler, Owned. */
+    CAiEventHandler* iEventHandler;
+    /** Window server plug-in manager, Owned. */
     CAiWsPluginManager* iWsPluginManager;
-
-    /**
-     * Notify handler for cenrep, Owned.     
-     */
-    CCenRepNotifyHandler* iNotifyHandler;
-    
-    /**
-     * Notify handler for cenrep, Owned.     
-     */    
+    /** Notify handler for cenrep, Owned. */
+    CCenRepNotifyHandler* iNotifyHandler;    
+    /** Notify handler for cenrep, Owned. */
     CCenRepNotifyHandler* iNotifyHandlerESS;
-
-    /**
-     * Idle repository, Owned.
-     */
-    CRepository* iAIRepository;
-    
-    /**
-     * Idle restart PS observer, Owned.
-     */
+    /** Idle repository, Owned. */
+    CRepository* iRepository;    
+    /** Idle restart PS observer, Owned. */
     MAiPSPropertyObserver* iIdleRestartObserver;
     
     TBool iLibrariesLoaded;
@@ -195,5 +209,5 @@
     RLibrary iLibrary3;       
     };
 
-#endif // C_AIFW_H
+#endif // _AIFW_H
 
--- a/idlefw/inc/framework/aifwstartupscheduler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Custom active scheduler for Active Idle Framework startup.
-*
-*/
-
-
-#ifndef C_AIFWSTARTUPSCHEDULER_H
-#define C_AIFWSTARTUPSCHEDULER_H
-
-
-#include <e32base.h>
-
-/**
- *  Custom active scheduler for Active Idle Framework startup.
- */
-NONSHARABLE_CLASS( CAiFwStartupScheduler ) : public CActiveScheduler
-    {
-public:
-    static CAiFwStartupScheduler* NewLC();
-
-    ~CAiFwStartupScheduler();
-
-    /**
-     * Returns result code from this scheduler's execution.
-     *
-     * @return - KErrNone if the scheduler loop executed succesfully
-     *         - Any of the system-wide error codes in case of an error.
-     */
-    TInt Result();
-
-private:    
-// from base class CActiveScheduler
-    void Error(TInt aError) const;
-
-// Construction
-    CAiFwStartupScheduler();
-private: // data
-
-    /**
-     * Result code returned by Result().
-     */
-    mutable TInt iResult;
-    };
-
-
-#endif // ? C_AIFWSTARTUPSCHEDULER_H
-
--- a/idlefw/inc/framework/aikeylockobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AI2 keylock status observer.
-*
-*/
-
-
-#ifndef C_AIKEYLOCKOBSERVER_H
-#define C_AIKEYLOCKOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include "aipsstatusobserver.h"
-
-class MAiPSPropertyObserver;
-
-/**
- * @ingroup group_aifw
- * 
- *  Keylock status change observer.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiKeylockObserver ) : public CAiPSStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiKeylockObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiKeylockObserver();
-
-// functions from base class CAiPSStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiKeylockObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// new functions
-
-    static TInt HandleKeylockStatusEvent( TAny* aPtr );
-
-    };
-
-#endif // C_AIKEYLOCKOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/ailightstatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Light status observer
-*
-*/
-
-
-#ifndef C_AILIGHTSTATUSOBSERVER_H
-#define C_AILIGHTSTATUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include <hwrmlight.h>
-#include "aidevicestatusobserver.h"
-
-class MAiStateManager;
-
-/**
- * @ingroup group_aifw
- * 
- *  Publish and subscribe key observer
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiLightStatusObserver ) : public CBase,
-                                              public MHWRMLightObserver,
-                                              public MAiDeviceStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiLightStatusObserver* NewL( MAiStateManager* aStateManager );
-
-    ~CAiLightStatusObserver();
-
-// functions from base class MAiDeviceStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiLightStatusObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// from MHWRMLightObserver
-
-    void LightStatusChanged( TInt aTarget, CHWRMLight::TLightStatus aStatus );
-    
-protected: // Data
-
-    /**
-     * Light client.
-     * Own.
-     */
-    CHWRMLight* iLight;
-
-    /**
-     * State manager.
-     * Not own.
-     */
-    MAiStateManager* iStateManager;
-
-    };
-
-#endif // C_AILIGHTSTATUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/ainetworklistener.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Network info listener
-*
-*/
-
-#ifndef C_NETWORKLISTENER_H
-#define C_NETWORKLISTENER_H
-
-#include <e32base.h>
-#include <NWHandlingEngine.h>
-#include "ainetworkobserver.h"
-
-class MAiNetworkObserver;
-class CNWSession;
-
-/**
- *  @ingroup group_xmluicontroller
- *
- *  Network info listener.
- *
- *  Client can use this object to listen network state changes. Client must implement
- *  MAiNetworkObserver interface to retrieve network state changes
- *
- *  @since S60 5.0
- */
-NONSHARABLE_CLASS(CAiNetworkListener) : public CBase, 
-                           public MNWMessageObserver
-    {
-public:
-
-    static CAiNetworkListener* CAiNetworkListener::NewL(MAiNetworkObserver& aNetworkObserver);
- 
-    virtual ~CAiNetworkListener();
-    
-    /**
-     * Get current network status
-     * @return TNetworkState
-     */
-    MAiNetworkObserver::TNetworkState NetworkState();
-
-// from base class MNWMessageObserver
-
-    /**
-     * From MNWMessageObserver.
-     * Called by network handling engine when network info changes.
-     *
-     * @since S60 5.0
-     * @param aMessage is type of the change.
-     */
-    void HandleNetworkMessage( const TNWMessages aMessage );
-
-    /**
-     * From MNWMessageObserver.
-     * Called if network handling engine fails.
-     *
-     * @since S60 5.0
-     * @param aOperation is failed operation.
-     * @param aErrorCode is fail reason.
-     */
-    void HandleNetworkError( const TNWOperation aOperation, TInt aErrorCode );
-
-private:
-    TBool HasNetworkInfoChanged( const TNWMessages aMessage );
-
-    MAiNetworkObserver::TNetworkState InterpretNWMessage(const TNWMessages aMessage, const TNWInfo);
-
-    CAiNetworkListener(MAiNetworkObserver& aNetworkObserver);
-
-    void ConstructL();
-
- 
-private: // data
-
-     /**
-     * Session to network handling engine.
-     * Own.
-     */
-    CNWSession* iSession;
-
-    /**
-     * Cached network info structure.
-     */
-    TNWInfo iInfo;
-    
-    /**
-     * Previous network information.
-     */
-    TNWInfo iOldInfo;
-
-    /**
-      * Reference to client observing
-      */
-      MAiNetworkObserver& iObserver;
-
-
-    /**
-     * Network related message flags
-     */
-     
-    enum TNetInfoFlags 
-        {
-        ENetworkProviderNameReceived      = 0x00000001,
-        ENetworkProviderNameOk            = 0x00000002,
-        EServiceProviderNameReceived      = 0x00000004,
-        EServiceProviderNameOk            = 0x00000008,
-        ERegistrationStatusReceived       = 0x00000010,
-        ENetworkInfoChangeReceived        = 0x00000020,
-        EProgrammableOperatorInfoReceived = 0x00000040,
-        EProgrammableOperatorInfoReceivedOk = 0x00000080
-        };
-        
-    /**
-     * Subset of sum of TNetInfoFlags.
-     */    
-    TUint iReceivedMessageFlags;
-    
-    /**
-     * Subset of sum of old TNetInfoFlags.
-     */    
-    TUint iOldReceivedMessageFlags;
-    
-    /**
-     * current state of network
-     */    
-    MAiNetworkObserver::TNetworkState iCurrentNwState;
-     };
-//}    
-
-#endif // C_AINETWORKINFOLISTENER_H
--- a/idlefw/inc/framework/ainetworkobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Network info observer
-*
-*/
-
-#ifndef M_NETWORKOBSERVER_H
-#define M_NETWORKOBSERVER_H
-
-#include <e32std.h>
-#include <NWHandlingEngine.h>
-
-/**
- *  @ingroup group_xmluicontroller
- *
- *  Network info observer.
- *
- *  Client gets network state changes through this interface.
- *
- *  @since S60 5.0
- */
-class MAiNetworkObserver
-        {
-    
-public:
-    enum TNetworkState
-        {
-        ENone = 0,
-        EHomeNetwork,
-        ERoaming
-        };
-
-protected:
-
-    /**
-     * Virtual destructor.
-     * Cannot be used to destruct the object.
-     */
-    virtual ~MAiNetworkObserver() {};
-
-public:
-
-    /**
-     * Called when network info changes.
-     *
-     * @since S60 5.0
-     * @param aNewState new network state
-      */
-    virtual void HandleNetworkStateChange( TNetworkState aNewState ) = 0;
-    
-    };
-
-#endif // M_AINETWORKINFOOBSERVER_H
--- a/idlefw/inc/framework/ainwsdlgcontroller.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Network selection dialog controller
-*
-*/
-
-
-#ifndef C_AINWSDLGCONTROLLER_H
-#define C_AINWSDLGCONTROLLER_H
-
-#include <e32base.h>
-#include <AknSoftNotifier.h>
-#include <NWHandlingEngine.h>
-
-class CNWSession;
-
-/**
- * Network Selection Dialog controller.
- */
-NONSHARABLE_CLASS( CAiNwSDlgController ) : 
-        public CBase,
-        public MNWMessageObserver
-	{
-public:
-
-// Constructors and destructors
-
-    /**
-     * Creates a new instance of the class.
-     *
-     * @return    A new instance of the class.
-	 * @exception Any of the system-wide error codes if instance creation
-	 *            fails due to an unrecoverable error.
-     */
-    static CAiNwSDlgController* NewL();
-
-    ~CAiNwSDlgController();
-	
-// from MNWMessageObserver
-
-	void HandleNetworkMessage( const TNWMessages aMessage );
-    void HandleNetworkError( const TNWOperation aOperation, TInt aErrorCode );
-		
-private:
-
-// Constructors
-	
-    CAiNwSDlgController();
-	
-	void ConstructL();
-	
-private:
-    
-// New functions
-    
-    /**
-     * Take action according to current state change.
-     */
-    void HandleStateChange();
-
-    /**
-     * 
-     */
-    void HandleNetworkFound();
-
-    /**
-     * 
-     */
-    void HandleNetworkLost();
-
-    /**
-     * Opens the network selection dialog.
-     */
-    void LaunchDialog();
-
-    /**
-     * Cancels the network selection dialog.
-     */
-    void CancelDialog();
-
-    /**
-     * Tests if offline mode is engaged.
-     *
-     * @return ETrue if offline mode is currently active
-     */
-    TBool IsOffLineMode() const;
-
-    /**
-     * Tests if Bluetooth SAP is in connected mode.
-     *
-     * @return ETrue if Bluetooth SAP is active.
-     */
-    TBool IsBluetoothSAPConnected() const;
-
-    static TInt DelayCallBack(TAny* aParam);
-
-private:
-    
-// Data
-
-    /**
-     * Notifier service
-     * Own
-     */
-    CAknSoftNotifier* iSoftNotifier;
-    
-    /**
-     * Session to network handling engine.
-     * Own.
-     */
-    CNWSession* iSession;
-
-    /**
-     * Cached network info structure.
-     */
-    TNWInfo iInfo;
-
-    /**
-     * A true value if registered to network.
-     */
-    TBool iRegistered;
-
-    /**
-     * Profile API.
-     */
-    CRepository* iProfileApi;
-
-    /**
-     * Timer object for 1-minute delay
-     */
-    CPeriodic* iPeriodic;
-    };
-
-#endif // C_AINWSDLGCONTROLLER_H
-
-// End of file.
--- a/idlefw/inc/framework/aipluginactivitypstool.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin activity PS tool
-*
-*/
-
-
-#ifndef AIPLUGINACTIVITYPSTOOL_H
-#define AIPLUGINACTIVITYPSTOOL_H
-
-#include <e32base.h> // TUid
-#include <e32property.h> // RProperty
-
-struct TAiPublisherInfo;
-
-NONSHARABLE_CLASS(CAiPluginActivityRegistry) : public CBase
-    {
-    public:
-    
-        static CAiPluginActivityRegistry* NewL();
-    
-        TInt SetPluginActive( const TAiPublisherInfo& aPubInfo );
-                               
-        void CleanRegistry(); 
-                              
-        ~CAiPluginActivityRegistry();
-        
-    private:
-    
-    // construction
-    
-        void ConstructL();
-    
-        CAiPluginActivityRegistry();
-        
-    // new methods
-    
-        /**
-         * Update PS registry count register.
-         */
-        TInt UpdateCountRegister();
-        
-        /**
-         * Update PS registry ordinal register.
-         */
-        TInt UpdateOrdinalRegister( TInt aPluginUid );
-
-        /**
-         * Update plugins name register.
-         */
-        TInt UpdateNameRegister( TInt aPluginUid,
-                                 const TDesC& aName );
-        
-        /**
-         * Clean last added entry. In case of failure.
-         */
-        void CleanLastEntry( TInt aPluginUid,
-                             TInt aOrdinal,
-                             TInt aLastCount );
-    
-    private: // Members
-    
-        /**
-         * Ordinal in registry. Ascending.
-         */
-        TInt iRegistryOrdinal;
-
-        /**
-         * Plugin count in registry.
-         */
-        TInt iPluginCount;
-        
-        /**
-         * PS property that is updated.
-         */
-        RProperty iProperty;
-        
-    };
-
-#endif // AIPLUGINACTIVITYPSTOOL_H
-
--- a/idlefw/inc/framework/aipluginfactory.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/inc/framework/aipluginfactory.h	Fri Feb 19 23:07:29 2010 +0200
@@ -11,134 +11,152 @@
 *
 * Contributors:
 *
-* Description:  Content plugin manager class for Active idle framework.
+* Description:  Plugin factory class for Active idle framework.
 *
 */
 
 
 
-#ifndef C_AIPLUGINASYNCFACTORY_H
-#define C_AIPLUGINASYNCFACTORY_H
+#ifndef _AIPLUGINCFACTORY_H
+#define _AIPLUGINCFACTORY_H
 
-#include "aicontentpublisher.h"
-#include "aipropertyextension.h"
-#include "aifwdefs.h"
+// System includes
 #include <e32base.h>
+#include <ecom/implementationinformation.h>
 
-class MAiContentObserver;
-class MAiEventHandlerExtension;
-class MAiContentItemIterator;
-class CAiContentPublisher;
-class CAiUiController;
-class CAiPluginActivityRegistry;
-class CImplementationInformation;
-class CAiContentPluginManager;
-class MAiPluginTool;
-class MAiPluginLifecycleObserver;
+// User includes
 
+// Forward declarations
+class CAiUiControllerManager;
+class CAiStateManager;
+class CHsContentPublisher;
+class THsPublisherInfo;
+
+// Class declaration
 /**
  * @ingroup group_aifw
  * 
- *  Content plugin factory class for Active idle framework.
+ *  Plugin factory class for Active idle framework.
  *
  *  @lib aifw
- *  @since S60 3.2
+ *  @since S60 5.2
  */
 NONSHARABLE_CLASS( CAiPluginFactory ) : public CBase
 	{
-	public:
+public:
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */	
+    static CAiPluginFactory* NewL( CAiUiControllerManager& aManager );
 	
-// Constructor and destructor
-		
-		static CAiPluginFactory* NewL( RPointerArray<CAiContentPublisher>& aPlugins,
-		                                    CAiContentPluginManager& aManager );
-		
-		virtual ~CAiPluginFactory();
+    /**
+     * Destructor
+     */    
+    ~CAiPluginFactory();
 
-// New functions
+public:
+    // new functions
 		
-        /**
-         * Create plugin
-         *
-         * @since S60 5.0
-         * @param aPublisherInfo plugin to load.
-         * @param aControllerArray array of active UI controllers.
-         */
-		void CreatePluginL( const TAiPublisherInfo& aPublisherInfo,						
-						     RPointerArray<CAiUiController>& aControllerArray );						
-
-        /**
-         * Destroy plugin
-         *
-         * @since S60 5.0
-         * @param aPublisherInfo plugin to destroy.
-         * @param aControllerArray array of active UI controllers.
-         */
-		void DestroyPluginL( const TAiPublisherInfo& aPublisherInfo,		    
-                             RPointerArray<CAiUiController>& aControllerArray );
-
-        /**
-         * Destroys all plugins
-         * 
-         * @since S60 5.0         
-         */
-		void DestroyPlugins();
-		
-		
-        void AddLifecycleObserverL( MAiPluginLifecycleObserver& aObserver );
+    /**
+     * Create plugin
+     *
+     * @since S60 5.2
+     * @param aPublisherInfo plugin to create. Factory keeps plugin's ownership. 
+     * @return KErrNone if plugin is created succesfully, otherwise system wide error code.      
+     */
+    TInt CreatePlugin( 
+        const THsPublisherInfo& aPublisherInfo );						
+                         						
+    /**
+     * Destroy plugin
+     *
+     * @since S60 5.2
+     * @param aPublisherInfo plugin to destroy.      
+     */
+    void DestroyPlugin( 
+        const THsPublisherInfo& aPublisherInfo );		    
+                         
+    /**
+     * Finds plugin by publisher info.
+     *
+     * @since S60 5.2
+     * @param aInfo publisher info.
+     * @return Pointer to plugin, NULL if not found. Factory keeps plugin's ownership.
+     */        
+    CHsContentPublisher* PluginByInfo( 
+        const THsPublisherInfo& aPublisherInfo ) const;
 
-        /**
-         * Finds plugin by publisher info.
-         *
-         * @since S60 5.0
-         * @param aInfo publisher info.
-         * @return Pointer to plugin, NULL if not found.
-         */        
-        CAiContentPublisher* PluginByInfoL( const TAiPublisherInfo& aInfo ) const;
+    /**
+     * Finds plugin by uid.
+     *
+     * @since S60 5.2
+     * @param aInfo publisher uid.
+     * @return Pointer to plugin, NULL if not found. Factory keeps plugin's ownership.
+     */            
+    CHsContentPublisher* PluginByUid( const TUid& aUid ) const;
+    
+    /**
+     * Finds plugin by name.
+     *
+     * @since S60 5.2
+     * @param aInfo publisher info.
+     * @return Pointer to plugin, NULL if not found. Factory keeps plugin's ownership.
+     */                
+    CHsContentPublisher* PluginByName( const TDesC& aName ) const;
+            
+private:	
+    // private constructors
 
-        /**
-         * Finds plugin by name.
-         *
-         * @since S60 5.0
-         * @param aInfo publisher info.
-         * @return Pointer to plugin, NULL if not found.
-         */                
-        CAiContentPublisher* PluginByNameL( const TDesC& aName ) const;
-						
-	private:	
-
-// Constructors
-		
-		CAiPluginFactory( RPointerArray<CAiContentPublisher>& aPlugins,
-		                       CAiContentPluginManager& aManager );
+    /**
+     * Leaving constructor
+     */
+    void ConstructL();
+    
+    /**
+     * C++ default constructor
+     */	
+    CAiPluginFactory( CAiUiControllerManager& aManager );
 		
-		void ConstructL();
-										
-// New functions
-		
-		CAiContentPublisher* CreatePluginLC( const TAiPublisherInfo& aPluginInfo );
-								
-		void SubscribeContentObserversL( CAiContentPublisher& aContentPublisher,		    
-            const TAiPublisherInfo& aPublisherInfo,
-		    RPointerArray<CAiUiController>& aControllerArray );
-		                              
-        void ConfigurePluginL( RPointerArray<CAiUiController>& aControllerArray,
-                               CAiContentPublisher& aContentPublisher,
-                               const TAiPublisherInfo& aPubInfo );		                           
-        
-	private:     // Data	
-	    // Array of loaded data plugins, Not owned
-	    RPointerArray<CAiContentPublisher>& iPlugins;
-	    // Content plugin manager, Not owned	    		
-        CAiContentPluginManager& iManager;
-        // Ecom implementation info, Owned
-		RImplInfoPtrArray iEComPlugins;		
-		// Plugin tool from utility lib, Owned
-		MAiPluginTool* iPluginTool;      
-        // Life cycle observers, Owned
-		RPointerArray<MAiPluginLifecycleObserver> iLifecycleObservers;		
+private:    								
+    // new functions
+	       
+    void CreatePluginL( 
+        const THsPublisherInfo& aPublisherInfo );
+                            
+    void SubscribeContentObserversL( 
+        CHsContentPublisher& aContentPublisher,		    
+        const THsPublisherInfo& aPublisherInfo );
+                                         
+    void ConfigurePluginL(         
+        CHsContentPublisher& aContentPublisher,
+        const THsPublisherInfo& aPublisherInfo );		                           
+    
+    RPointerArray< CHsContentPublisher >& Publishers() const;
+    
+    void ResolvePluginsToUpgradeL( 
+        RArray< THsPublisherInfo >& aArray );
+    
+private:     
+    // data	
+
+    /** UI Controller Manager, Not owned */
+    CAiUiControllerManager& iUiControllerManager;
+    /** Array of loaded data plugins, Owned */
+    mutable RPointerArray< CHsContentPublisher > iPublishers;
+    /** Ecom implementation info, Owned */
+    RImplInfoPtrArray iEComPlugins;		          
+    
+private: 
+    // friend classes
+    friend class CAiStateManager;
+    
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_AiPluginFactory;
+#endif
     };
 
-#endif // C_AIPLUGINASYNCFACTORY_H
+#endif // _AIPLUGINCFACTORY_H
 
 // End of File.
--- a/idlefw/inc/framework/aipluginlifecycleobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin lifecycle observer
-*
-*/
-
-
-
-#ifndef M_AIPLUGINLIFECYCLEOBSERVER_H
-#define M_AIPLUGINLIFECYCLEOBSERVER_H
-
-#include "aipropertyextension.h"
-#include <aisystemuids.hrh>
-
-class CAiContentPublisher;
-
-// Unnamed namespace for local definitions
-namespace
-    {       
-    const TInt KAIUidDevStaPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN;
-    
-    const TInt KAIUidShortCutPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SHORTCUTPLUGIN;
-    
-    const TInt KAIUidProfilePlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PROFILEPLUGIN;
-    
-    const TInt KAIUidSATPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN;
-    }
-
-/**
- *  Plugin lifecycle observer base class.
- *
- *  @lib aifw
- *  @since S60 3.2
- */
-class MAiPluginLifecycleObserver
-    {
-public:
-    
-    /**
-     * Report plugin created.
-     * @param aPlugin reference to the created plugin.
-     */
-    virtual void PluginCreatedL( CAiContentPublisher& aPlugin ) = 0;
-
-    /**
-     * Report plugin destroyed.
-     * @param aPlugin reference to the dtored plugin.
-     */
-    virtual void PluginDestroyed( CAiContentPublisher& aPlugin ) = 0;
-
-    /**
-     * Report all plugins created.
-     */
-    virtual void AllPluginsCreated() = 0;
-
-    /**
-     * Report all plugins destroyed.
-     */
-    virtual void AllPluginsDestroyed() = 0;
-    	
-protected:
-
-    /**
-     * Protected destructor prevents deletion through this interface.
-     */
-    ~MAiPluginLifecycleObserver() { };               
-    };
-
-#endif // M_AIPLUGINSTATEMANAGER_H
-
-// End of File.
--- a/idlefw/inc/framework/aipluginstate.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin state main class
-*
-*/
-
-
-#ifndef M_AIPLUGINSTATE_H
-#define M_AIPLUGINSTATE_H
-
-#include "aipluginstatemachine.h"
-
-/**
- * Plugin state interface.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-class MAiPluginState
-    {
-public:
-    
-    /**
-     * This method is called when state is entered.
-     * 
-     * @param aStateMachine reference to the owning state machine.
-     * @param aStateChange the system state variable change that caused this 
-     *        state change.
-     */
-    virtual void Enter( MAiPluginStateMachine& aStateMachine,
-                        TAiStateChanges aStateChange ) = 0;
-    
-    /**
-     * This method handles system state variable state changes
-     * handles events in the current state.
-     * 
-     * @param aStateMachine reference to the owning state machine.
-     * @param aStateChange the system state variable change that is the cause
-     *        of this event.
-     * @return TBool did the state handle the event.
-     */
-    virtual TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                              TAiStateChanges aStateChange ) = 0;
-    
-    /**
-     * This method is called when state is exited.
-     * 
-     * @param aStateMachine reference to the owning state machine.
-     * @param aStateChange the system state variable change that caused this 
-     *        state change.
-     */
-    virtual void Exit( MAiPluginStateMachine& aStateMachine,
-                       TAiStateChanges aStateChange ) = 0;
-
-protected:
-
-    ~MAiPluginState()
-        {
-        };
-    
-    };
-
-#endif // M_AIPLUGINSTATE_H
--- a/idlefw/inc/framework/aipluginstatemachine.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin state mmchine base class
-*
-*/
-
-
-#ifndef M_AIPLUGINSTATEMACHINE_H
-#define M_AIPLUGINSTATEMACHINE_H
-
-#include <aicontentpublisher.h>
-
-class MAiPluginState;
-
-/**
- * TAiStateChanges state change enumeration for each separate monitored state.
- */
-enum TAiStateChanges
-	{
-	ESMAIInCall,
-	ESMAINoCall,
-    ESMAIBacklightOn,
-    ESMAIBacklightOff,
-    ESMAIBackupOn,
-    ESMAIBackupOff,
-    ESMAIIdleForeground,
-    ESMAIIdleBackground,
-    ESMAISystemBoot,
-    ESMAISystemShutdown,
-    ESMAILocaleChanged,
-    ESMAITimeChanged,
-    ESMAIMidnightCrossover,
-    ESMAIReportThemeChangeStarted,
-    ESMAIReportThemeChangeReady,
-    ESMAIRelayoutScreen,
-    ESMAIGeneralThemeChanged,
-    ESMAIT1Timeout,
-    ESMAIKeylockEnabled,
-    ESMAIKeylockDisabled,
-    ESMAIUnknownState,
-    ESMAIEnterEditMode,
-    ESMAIExitEditMode,
-    ESMAIOffLine,
-    ESMAIOnLine,
-    ESMAIPageSwitch
-	};
-	
-/**
- * Sate variable enumeration for querying the status of the monitored item.
- */
-enum TAiStateVariable
-	{
-	ESMAICallStatus,
-	ESMAILightStatus,
-    ESMAIBackupRestoreStatus,
-    ESMAIIdleFocusStatus
-	};
-	
-/**
- * Possible states of the state machine (and plugin).
- */
-enum TAiState
-	{
-	EAiIdle = 1,
-	EAiSuspended,
-	EAiAlive,
-	EAiAliveActive,
-	EAiAliveIncall,
-	EAiAliveInactive
-	};
-
-/**
- * Sub states of idle state.
- */
-enum TAiIdleSubState
-    {
-	EAiIdleCreatingPlugins = EAiAliveInactive + 1,
-	EAiIdleBackupRestore
-    };
-	
-/**
- * @ingroup group_aifw
- * 
- * Plugin state resource interface.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-class MAiPluginStateResources
-    {
-public:
-    
-    /*
-     * Check whether the specified state variable is active or not.
-     *
-     * @param aStateVariable system variable state change that is to be checked.
-     */
-    virtual TBool StateVariable( TAiStateVariable aStateVariable ) = 0;
-    
-    /**
-     * Translates system state change reason to plugin state state reason.
-     *
-     * @param aStateChange the system state variable change to be translated.
-     * @return TAiTransitionReason plugin state transition reason.
-     */    
-    virtual TAiTransitionReason TranslateReason( TAiStateChanges aStateChange ) = 0;
-    
-    /**
-     * Restart plugin suspend timer.
-     */    
-    virtual void RestartSuspendTimer() = 0;
-
-protected:
-    ~MAiPluginStateResources() {}    
-    };
-    
-/**
- * Plugin state machine interface.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-class MAiPluginStateMachine : public MAiPluginStateResources
-    {
-public:
-    
-    /*
-     * Method that changes this state machine to a state.
-     *
-     * @param aState state to change to.
-     * @param aStateChange system variable state change that is the cause for this call.
-     */
-    virtual void SwitchToState( TAiState aState,
-                                TAiStateChanges aStateChange ) = 0;
-    
-    /*
-     * Reference to the plugin that is managed by this state machine.
-     *
-     * @return CAiContentPublisher reference to the plugin.
-     */
-    virtual CAiContentPublisher& Plugin() const = 0;
-
-    /**
-     * Change plugin states.
-     *
-     * @param aReason for transition
-     * @param aStateChangeMethod state change method to call
-     * @param aLogOpCode operation code for logging
-     */
-    virtual void ChangePluginState(
-                TAiTransitionReason aReason, 
-                void (CAiContentPublisher::*aStateChangeMethod)(TAiTransitionReason) ) = 0;
-    
-protected:
-    ~MAiPluginStateMachine() {}
-    };
-
-#endif // M_AIPLUGINSTATEMACHINE_H
--- a/idlefw/inc/framework/aipluginstatemachineimpl.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin state machine implementation
-*
-*/
-
-
-#ifndef C_AIPLUGINSTATEMACHINEIMPL_H
-#define C_AIPLUGINSTATEMACHINEIMPL_H
-
-#include <e32base.h>
-#include <aicontentpublisher.h>
-#include "aipluginstatemachine.h"
-#include "aistatealive.h"
-#include "aistatesuspended.h"
-#include "aistateidle.h"
-
-class MAiPluginStateControl;
-class MAiPluginState;
-
-/**
- * Plugin state machine implementation.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CAiPluginStateMachine ) : public CBase,
-                                             public MAiPluginStateMachine
-    {
-public: // Constructor 
-       
-    CAiPluginStateMachine( MAiPluginStateResources& aPluginStateResource,                           
-                           CAiContentPublisher& aPlugin );
-    
-public: // from MAiPluginStateMachine
-                                  
-    TBool StateVariable( TAiStateVariable aStateVariable );
-    
-    TAiTransitionReason TranslateReason( TAiStateChanges aStateChange );
-    
-    void RestartSuspendTimer();
-    
-    void SwitchToState( TAiState aState, TAiStateChanges aStateChange );
-    
-    CAiContentPublisher& Plugin() const;
-              
-    void ChangePluginState( TAiTransitionReason aReason,                
-                            void (CAiContentPublisher::*aStateChangeMethod)(TAiTransitionReason) );
-                
-public: // new methods
-
-    TBool HandleEvent( TAiStateChanges aStateChange );
-        
-private: // data
-
-    /**
-     * Alive master state.
-     */
-    TAiStateAlive iAlive;
-
-    /**
-     * Suspended state.
-     */
-    TAiStateSuspended iSuspended;
-
-    /**
-     * Idle master state.
-     */
-    TAiStateIdle iIdle;
-
-    /**
-     * Pointer to current state.
-     * Not owned.
-     */
-    MAiPluginState* iCurrentState;
-
-    /**
-     * Pointer to parent state machine.
-     * Not owned.
-     */
-    MAiPluginStateResources& iPluginStateResource;
-    
-    /**
-     * Pointer to managed plugin.
-     * Not owned.
-     */
-    CAiContentPublisher& iPlugin;    
-
-    /**
-     * Online sub-state     
-     */    
-    TBool iOnline;
-    };
-
-#endif // C_AIPLUGINSTATEMACHINEIMPL_H
--- a/idlefw/inc/framework/aipluginstatemanager.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin state manager
-*
-*/
-
-
-#ifndef C_AIPLUGINSTATEMANAGER_H
-#define C_AIPLUGINSTATEMANAGER_H
-
-#include <e32base.h>
-#include "aistatemanager.h"
-#include "aipluginstatemachine.h"
-#include "aipluginlifecycleobserver.h"
-
-#include "aistatealive.h"
-#include "aistatesuspended.h"
-#include "aistateidle.h"
-#include "aifwdefs.h"
-
-class MAiPSPropertyObserver;
-class MAiDeviceStatusObserver;
-class CAiPluginStateManager;
-class CAiContentPluginManager;
-class CAiPluginStateMachine;
-class CAiUiFrameworkObserverImpl;
-class MAiUiFrameworkObserver;
-
-/**
- *  Plugin state manager implementation.
- *
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CAiPluginStateManager ) : public CBase,
-                                             public MAiStateManager,
-                                             public MAiPluginStateResources,
-                                             public MAiPluginLifecycleObserver
-    {
-    
-public: // Constructor and destructor
-
-    static CAiPluginStateManager* NewL();
-
-    virtual ~CAiPluginStateManager();
-
-public: // From MAiStateManager
-
-    void ReportStateChange( TAiStateChanges aState );
-
-public: // From MAiPluginStateMachine
-
-    TBool StateVariable( TAiStateVariable aStateVariable );
-
-    TAiTransitionReason TranslateReason( TAiStateChanges aStateChange );
-
-    void RestartSuspendTimer();
-
-public: // From MAiPluginLifecycleObserver
-
-    void PluginCreatedL( CAiContentPublisher& aPlugin );
-
-    void PluginDestroyed( CAiContentPublisher& aPlugin );
-    
-    void AllPluginsCreated();
-
-    void AllPluginsDestroyed();
-              
-public: // new methods
-
-    /**
-     * Create system status observers (lights/backup/restore etc.).
-     */
-    void CreateSystemStateObserversL();
-
-    /**
-     * Destroy system status observers.
-     */
-    void DestroySystemStateObservers();
-
-    /**
-     * Provide accessor for fw observer.
-     * @return MAiUiFrameworkObserver pointer to fw observer.
-     */
-    MAiUiFrameworkObserver* UiFwObserver() const;
-    
-    /**
-     * Process online state change for a plugin
-     * @param aPlugin plugin     
-     */
-    void ProcessOnlineState( CAiContentPublisher& aPlugin ); 
-
-    /**
-     * Process offline state change for a plugin
-     * @param aPlugin plugin     
-     */    
-    void ProcessOfflineState( CAiContentPublisher& aPlugin );
-    
-private: // Constructors
-
-    CAiPluginStateManager();
-
-    void ConstructL();
-
-private: // New functions
-    
-    /**
-     * Handles Statemachine event event and error array update.
-     * @param aState new state.
-     * @param aMachine reference to single state machine.
-     */
-    void ProcessStateChange( TAiStateChanges aState,
-                             CAiPluginStateMachine& aMachine );
-
-    /**
-     * Handles Statemachine event event and error array update
-     * for all state machines.
-     * @param aState new state.
-     */
-    void ProcessStateChangeForAll( TAiStateChanges aState );
-
-    /**
-     * Helper to check idle focus status.
-     * @return ETrue if idle is focused / foreground app.
-     */
-    TBool IdleFocused() const;
-
-    /**
-     * Helper to check backup (or restore) status.
-     * @return ETrue if backup (or restore) is ongoing.
-     */
-    TBool BackupOngoing() const;
-
-    /**
-     * Helper to check phone lights status.
-     * @return ETrue if lights are on.
-     */
-    TBool LightsOn() const;
-
-    /**
-     * Helper to check phone call status.
-     * @return ETrue if call is ongoing.
-     */
-    TBool CallOngoing() const;
-
-    /**
-     * Standard callback for CPeriodic ie. T1 timer.
-     */
-    static TInt T1TimerCallback( TAny* aPtr );
-        
-private:     // Data
-
-    /**
-     * Backup operation state observer.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iBackupOperationObserver;
-
-    /**
-     * Call state observer.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iCallStateObserver;
-
-    /**
-     * Light state observer.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iLightStateObserver;
-
-    /**
-     * Enviroment change observer.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iEnvironmentObserver;
-
-    /**
-     * Focus change observer. Using telephony idle visiblity PS.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iFocusObserver;
-
-    /**
-     * Keylock observer.
-     * Own.
-     */
-    MAiDeviceStatusObserver* iKeylockObserver;
-
-    /**
-     * Enviroment change observer. Full class type is used because
-     * we need to provide accessor for implemented type MAiUiFrameworkObserver.
-     * Own.
-     */
-    CAiUiFrameworkObserverImpl* iFrameworkObserver;
-
-    /**
-     * Timer for suspend, screensaver timout + light fadeout.
-     * Own.
-     */
-    CPeriodic* iT1Timer;
-
-    /**
-     * Timer for suspend, screensaver timout + light fadeout.
-     */
-    TInt iT1Delay;
-
-    /**
-     * New state to be timed.
-     */
-    TAiState iTimedState;
-
-    /**
-     * Reason for timers activity.
-     */
-    TAiTransitionReason iTimedReason;
-
-    /**
-     * Indicates whether the device has been properly started.
-     */
-    TBool iIsDeviceStarted;
-
-    /**
-     * State machines for plugins.
-     * Own.
-     */
-    RPointerArray<CAiPluginStateMachine> iStateMachines;
-    };
-
-#endif // C_AIPLUGINSTATEMANAGER_H
-
-// End of File.
--- a/idlefw/inc/framework/aipsstatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  PS status observer
-*
-*/
-
-
-#ifndef C_AIPSSTATUSOBSERVER_H
-#define C_AIPSSTATUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include "aidevicestatusobserver.h"
-
-class MAiPSPropertyObserver;
-class MAiStateManager;
-
-/**
- *  description
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiPSStatusObserver ) : public CBase,
-                                           public MAiDeviceStatusObserver
-    {
-
-public:
-
-// Construction
-
-    virtual ~CAiPSStatusObserver();
-
-// New functions
-
-    virtual TAiStateChanges Status();
-
-protected:
-
-// Construction
-    
-    CAiPSStatusObserver();
-    
-    void BaseConstructL( TCallBack aCallBack,
-                         TUid aCategory,
-                         TInt aKey, 
-                         MAiStateManager* aStateManager );
-    
-protected: // Data
-
-    MAiPSPropertyObserver* iObserver;
-    
-    MAiStateManager* iStateManager;
-    
-    };
-
-#endif // C_AIPSSTATUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/aissaverstatusobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef C_AISSAVERSTATUSOBSERVER_H
-#define C_AISSAVERSTATUSOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include "aipsstatusobserver.h"
-
-class MAiPSPropertyObserver;
-
-/**
- *  Publish and subscribe key observer
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
- 
-NONSHARABLE_CLASS( CAiSSaverStatusObserver ) : public CAiPSStatusObserver
-    {
-public:
-
-// Construction
-
-    static CAiSSaverStatusObserver* NewL( MAiStateManager* aStateManager );
-
-    virtual ~CAiSSaverStatusObserver();
-
-// functions from base class CAiSSaverStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-// Construction
-    
-    CAiSSaverStatusObserver();
-    
-    void ConstructL( MAiStateManager* aStateManager );
-    
-// new functions
-
-    static TInt HandleScreenSaverStateChanged( TAny* aPtr );
-
-    };
-
-#endif // C_AISSAVERSTATUSOBSERVER_H
-
-// End of File.
--- a/idlefw/inc/framework/aistatealive.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State alive
-*
-*/
-
-
-#ifndef T_AISTATEALIVE_H
-#define T_AISTATEALIVE_H
-
-#include "aipluginstate.h"
-#include "aipluginstatemachine.h"
-
-/**
- * @ingroup group_aifw
- * 
- * Alive active state
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateAliveActive ) : public MAiPluginState
-    {
-public: // Constructor
-    
-    TAiStateAliveActive();
-    
-public: // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                      TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );
-    
-    };
-
-/**
- * Alive inactive state
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateAliveInactive ) : public MAiPluginState
-    {
-public: // Constructor    
-    
-    TAiStateAliveInactive();
-    
-public: // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                      TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );    
-    };
-
-/**
- * Alive incall state
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateAliveIncall ) : public MAiPluginState
-    {
-public: // Constructor
-    
-    TAiStateAliveIncall();
-    
-public: // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                      TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );    
-    };
-
-/**
- * Alive switch state
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateAlive ) : public MAiPluginState,
-                                     public MAiPluginStateMachine
-    {
-public: // Constructor
-        
-    TAiStateAlive( MAiPluginStateMachine& aParentStateMachine );
-    
-public: // from MAiPluginStateMachine
-    
-    TBool StateVariable( TAiStateVariable aStateVariable );
-    
-    TAiTransitionReason TranslateReason( TAiStateChanges aStateChange );
-    
-    void RestartSuspendTimer();
-    
-    void SwitchToState( TAiState aState, TAiStateChanges aStateChange );
-                                  
-    CAiContentPublisher& Plugin() const;
-                 
-    void ChangePluginState( TAiTransitionReason aReason,                
-                            void (CAiContentPublisher::*aStateChangeMethod)(TAiTransitionReason) );
-
-public: // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                       TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );
-               
-private: // data
-
-    /**
-     * Pointer to current state.
-     * Not owned.
-     */
-    MAiPluginState* iCurrentState;
-
-    /**
-     * Pointer to parent state machine.
-     * Not owned.
-     */
-    MAiPluginStateMachine* iParentStateMachine;
-
-    /**
-     * Alive active state.
-     */
-    TAiStateAliveActive iStateAliveActive;
-
-    /**
-     * Alive incall state.
-     */
-    TAiStateAliveIncall iStateAliveIncall;
-
-    /**
-     * Alive inactive state.
-     */
-    TAiStateAliveInactive iStateAliveInactive;    
-    };
-
-#endif // T_AISTATEALIVE_H
--- a/idlefw/inc/framework/aistateidle.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State idle
-*
-*/
-
-
-#ifndef T_AISTATEIDLE_H
-#define T_AISTATEIDLE_H
-
-#include "aipluginstate.h"
-#include "aipluginstatemachine.h"
-
-/**
- * @ingroup group_aifw
- * 
- * Idle state.
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateIdle ) : public MAiPluginState
-    {
-public:
-    // Construction
-    
-    TAiStateIdle();
-    
-    // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                      TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );
-    
-    };
-
-#endif // T_AISTATEIDLE_H
--- a/idlefw/inc/framework/aistatemanager.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/inc/framework/aistatemanager.h	Fri Feb 19 23:07:29 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,41 +11,204 @@
 *
 * Contributors:
 *
-* Description:  State manager base class
+* Description:  State Manager
 *
 */
 
 
-#ifndef M_AISTATEMANAGER_H
-#define M_AISTATEMANAGER_H
+#ifndef _AISTATEMANAGER_H
+#define _AISTATEMANAGER_H
+
+// System includes
+#include <e32base.h>
+#include <babitflags.h>
 
-#include "aipluginstatemachine.h"
+// User includes
+#include <aifwdefs.h>
+#include "aistateobserver.h"
+
+// Forward declarations
+class CAiPluginFactory;
+class CHsContentPublisher;
+class THsPublisherInfo;
 
 /**
- *  description
+ * State Manager
  * 
- *  @lib aifw
- *  @since S60 3.2
+ * @ingroup group_aifw
+ * @lib aifw.lib
+ * @since S60 5.0
  */
-class MAiStateManager
+NONSHARABLE_CLASS( CAiStateManager ) : public CBase,
+    public MAiStateObserver
     {
+private:
+    // Data types
+    enum TState
+        {
+        ESuspended = 0,        
+        EAlive,                
+        };
     
-    public:
+    enum TFlags
+        {
+        EIsForeground = 0,
+        EIsLightsOn,        
+        EIsOnline,
+        EShutdown
+        };
+    
+public:    
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */
+    static CAiStateManager* NewL( CAiPluginFactory& aFactory );
+
+    /**
+     * Two-phased constructor. Leaving on stack
+     */
+    static CAiStateManager* NewLC( CAiPluginFactory& aFactory );
+
+    /**
+     * Destructor
+     */
+    ~CAiStateManager();
+
+private:
+    // private constructors
+
+    /**
+     * Leaving constructor
+     */
+    void ConstructL();
+    
+    /**
+     * C++ default constructor
+     */
+    CAiStateManager( CAiPluginFactory& aFactory );
+
+private:
+    // from MAiStateObserver
+    
+    /**
+     * @see MAiStateObserver
+     */
+    void NotifyStateChange( 
+        TAiFwState aReason );
+
+    /**
+     * @see MAiStateObserver
+     */    
+    TInt NotifyLoadPlugin( const THsPublisherInfo& aInfo, 
+        TAiFwLoadReason aReason );
+    
+    /**
+     * @see MAiStateObserver
+     */    
+    void NotifyDestroyPlugin( const THsPublisherInfo& aInfo,
+        TAiFwDestroyReason aReason );
+
+    /**
+     * @see MAiStateObserver
+     */        
+    void NotifyUpdatePlugins();
     
-        /**
-         * System status observers use this method to report status variable 
-         * changes to state manager.
-         *
-         * @param TAiStateChanges aState the state that has changed.
-         */
-        virtual void ReportStateChange( TAiStateChanges aState ) = 0;
+    /**
+     * @see MAiStateObserver
+     */            
+    TBool OnlineStateInUse() const;
+            
+private:
+    // new functions
+        
+    /**
+     * Evaluates next state 
+     * 
+     * @since S60 5.2
+     * @return Next state
+     */
+    TState EvaluateNextState() const;
+    
+    /**
+     * Process state change for all plugins
+     * 
+     * @since S60 5.2
+     * @param aNextState Next state where plugins are driven
+     */
+    void ProcessStateChange( TState aNextState );
+    
+    /**
+     * Process general theme state change for all plugins
+     * 
+     * @since S60 5.2     
+     */    
+    void ProcessGeneralThemeChange();
+
+    /**
+     * Process backup/restore state change for all plugins
+     * 
+     * @since S60 5.2     
+     * @param aStarted ETrue when backup started
+     */        
+    void ProcessBackupRestore( TBool aStarted );
+
+    /**
+     * Process online / offline state change for all plugins
+     * 
+     * @since S60 5.2
+     */
+    void ProcessOnlineStateChange();
     
-    protected:
+    /** 
+     * Runs plugin startup sequence
+     * 
+     * @since S60 5.2     
+     * @param aPlugin Plugin to start
+     * @param aReason Start reason
+     */
+    void StartPlugin( CHsContentPublisher& aPlugin, 
+        CHsContentPublisher::TStartReason aReason );
+
+    /** 
+     * Runs plugin shutdown sequence
+     * 
+     * @since S60 5.2     
+     * @param aPlugin Plugin to stop
+     * @param aReason Stop reason
+     */    
+    void StopPlugin( CHsContentPublisher& aPlugin,
+        CHsContentPublisher::TStopReason aReason );
+        
+    /**
+     * Destroys all plugins from plugin factory
+     * 
+     * @since S60 5.2
+     */
+    void DestroyPlugins();
+                           
+private:
+    // data
     
-        ~MAiStateManager(){}
+    /** Plugin Factory, Not owned */
+    CAiPluginFactory& iFactory;
+    /** Current state */
+    TState iCurrentState;    
+    /** Flags */
+    TBitFlags32 iFlags;
+    /** Halted flag */
+    TBool iHalt;
     
+private:
+    // friend classes
+    
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_AiStateManager;
+#endif        
     };
- 
-#endif // M_AISTATEMANAGER_H
+
+#endif // _AISTATEMANAGER_H
 
-// End of File.
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/inc/framework/aistateobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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:  State Observer
+*
+*/
+
+
+#ifndef _AISTATEOBSERVER_H
+#define _AISTATEOBSERVER_H
+
+// System includes
+
+// User includes
+#include <aifwdefs.h>
+
+// Forward declarations
+class THsPublisherInfo;
+
+/**
+ * State Observer
+ * 
+ * @ingroup group_aifw
+ * @lib aifw.lib
+ * @since S60 5.2
+ */
+class MAiStateObserver
+    {
+public:
+    /**
+     * State change notification.
+     * 
+     * @since S60 5.2
+     * @param aReason State change.
+     */
+    virtual void NotifyStateChange( TAiFwState aState ) = 0;
+    
+    /**
+     * Content publisher load request.
+     * 
+     * @since S60 5.2
+     * @param aInfo Publisher Info, which describes the plugin to be loaded.
+     * @param aReason Startup reason, which will be forwarded to the plugin.
+     * @return Error code, KErrNone if succesfully loaded. 
+     */
+    virtual TInt NotifyLoadPlugin( const THsPublisherInfo& aInfo,
+        TAiFwLoadReason aReason ) = 0;
+
+    /**
+     * Content publisher destroy request.
+     * 
+     * @since S60 5.2
+     * @param aInfo Publisher Info, which describes the plugin to be destroyed.
+     * @param aReason Shutdown reason, which will be forwarded to the plugin.
+     */    
+    virtual void NotifyDestroyPlugin( const THsPublisherInfo& aInfo,
+        TAiFwDestroyReason aReason ) = 0;
+    
+    /**
+     * Notifies to update content publishers after Ecom registry change.
+     * 
+     * @since S60 5.2
+     */    
+    virtual void NotifyUpdatePlugins() = 0;
+    
+    /**
+     * Queries whether online state is in use
+     * by any of the currently loaded plugin.
+     * 
+     * @since S60 5.2
+     * @return ETrue if online/offline state needed, EFalse otherwise
+     */
+    virtual TBool OnlineStateInUse() const = 0;    
+    };
+    
+#endif // _AISTATEOBSERVER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/inc/framework/aistateprovider.h	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,189 @@
+/*
+* 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:  State Provider
+*
+*/
+
+
+#ifndef _AISTATEPROVIDER_H
+#define _AISTATEPROVIDER_H
+
+// System includes
+#include <e32base.h>
+#include <coemain.h>
+#include <hwrmlight.h>
+#include <AknSSrvClient.h>
+
+// User includes
+#include <aifwstatehandler.h>
+#include "aiecomobserver.h"
+
+// Forward declarations
+class MAiPSPropertyObserver;
+class MAiStateObserver;
+class THsPublisherInfo;
+
+// Class declaration
+
+/**
+ * State Provider
+ * 
+ * @ingroup group_aifw
+ * @lib aifw.lib
+ * @since S60 5.2
+ */
+NONSHARABLE_CLASS( CAiStateProvider ) : public CBase,
+    public MCoeMessageMonitorObserver,
+    public MHWRMLightObserver,
+    public MAknsSkinChangeObserver,
+    public MAiEcomObserver,
+    public MAiFwStateHandler
+    {
+public:    
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */
+    static CAiStateProvider* NewL( 
+        MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
+
+    /**
+     * Two-phased constructor. Leaving on stack
+     */
+    static CAiStateProvider* NewLC( 
+        MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
+
+    /**
+     * Destructor
+     */
+    ~CAiStateProvider();
+
+private:
+    // private constructors
+
+    /**
+     * 2nd phase constructor
+     */
+    void ConstructL();
+    
+    /**
+     * C++ default constructor
+     */
+    CAiStateProvider( 
+        MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
+        
+private:
+    // from MCoeMessageMonitorObserver
+    
+    /**
+     * @see MCoeMessageMonitorObserver
+     */
+    void MonitorWsMessage( const TWsEvent& aEvent );
+    
+private:
+    // from MHWRMLightObserver
+    
+    /**
+     * @see MHWRMLightObserver
+     */
+    void LightStatusChanged( TInt aTarget, 
+        CHWRMLight::TLightStatus aStatus );
+    
+private:
+    // from MAknsSkinChangeObserver
+    
+    /**
+     * @see MAknsSkinChangeObserver
+     */
+    void SkinContentChanged();
+
+    /**
+     * @see MAknsSkinChangeObserver
+     */    
+    void SkinConfigurationChanged(
+        const TAknsSkinStatusConfigurationChangeReason aReason );
+    
+    /**
+     * @see MAknsSkinChangeObserver
+     */    
+    void SkinPackageChanged(
+        const TAknsSkinStatusPackageChangeReason aReason );
+    
+private:
+    // from MAiEcomObserver
+    
+    /**
+     * @see MAiEcomObserver
+     */
+    void NotifyEcomRegistryChanged();
+    
+private:
+    // from MAiFwStateHandler
+
+    /**
+     * @see MAiFwStateHandler
+     */
+    TInt LoadPlugin( const THsPublisherInfo& aPublisherInfo, 
+        TAiFwLoadReason aReason );
+    
+    /**
+     * @see MAiFwStateHandler
+     */
+    void DestroyPlugin( const THsPublisherInfo& aPublisherInfo,
+        TAiFwDestroyReason aReason );
+    
+    /**
+     * @see MAiFwStateHandler
+     */
+    void ChangePluginState( TAiFwState aState );
+
+    /**
+     * @see MAiFwStateHandler
+     */    
+    TBool OnlineStateInUse() const;
+
+private:
+    // new functions
+    
+    static TInt BackupRestoreEvent( TAny* aAny );
+    
+private:
+    // data
+
+    /** ECom observer, owned */
+    CAiEcomObserver* iEcomObserver;        
+    /** State observer, Not owned */
+    MAiStateObserver& iObserver;        
+    /** Control environment, Not owned */
+    CCoeEnv& iCoeEnv;
+    /** Light status observer, Owned */
+    CHWRMLight* iLightObserver;
+    /** Skin server session, Owned */
+    RAknsSrvSession iSkinSrv;
+    /** Backup Restore observer, Owned */
+    MAiPSPropertyObserver* iBackupRestoreObserver;
+    
+private:
+    // friend classes
+    
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_AiStateProvider;
+#endif    
+    };
+
+#endif // _AISTATEPROVIDER_H
+
+// End of file
+
--- a/idlefw/inc/framework/aistatesuspended.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State suspended
-*
-*/
-
-
-#ifndef T_AISTATESUSPENDED_H
-#define T_AISTATESUSPENDED_H
-
-#include "aipluginstate.h"
-
-/**
- * @ingroup group_aifw
- * 
- * Suspended state
- * 
- *  @lib aifw
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( TAiStateSuspended ) : public MAiPluginState
-    {
-public:
-    // Construction
-    
-    TAiStateSuspended();
-    
-    // from MAiPluginState
-    
-    void Enter( MAiPluginStateMachine& aStateMachine,
-                TAiStateChanges aStateChange );
-    
-    TBool HandleEvent( MAiPluginStateMachine& aStateMachine,
-                      TAiStateChanges aStateChange );
-    
-    void Exit( MAiPluginStateMachine& aStateMachine,
-               TAiStateChanges aStateChange );
-    
-    };
-
-#endif // T_AISTATESUSPENDED_H
--- a/idlefw/inc/framework/aiuicontrollermanager.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/inc/framework/aiuicontrollermanager.h	Fri Feb 19 23:07:29 2010 +0200
@@ -16,141 +16,160 @@
 */
 
 
-#ifndef C_AIUICONTROLLERMANAGER_H
-#define C_AIUICONTROLLERMANAGER_H
+#ifndef _AIUICONTROLLERMANAGER_H
+#define _AIUICONTROLLERMANAGER_H
 
-
+// System includes
 #include <e32base.h>
-#include "aiuiframeworkobserver.h"
-#include "aicontentmodel.h"
-#include "aifwdefs.h"
 
+// User includes
+
+// Forward declarations
 class CAiUiController;
 class CAiContentPublisher;
 class MAiMainUiController;
-class MAiFwEventHandler;
 class CRepository;
 class CCoeEnv;
+class CAiFw;
+class MAiFwStateHandler;
 
+// Class declaration
 /**
  * @ingroup group_aifw
  * 
  *  Active Idle UI Controller manager.
  *
- *  @since S60 3.2
+ *  @since S60 5.2
  */
-NONSHARABLE_CLASS( CAiUiControllerManager ) : public CBase,
-                                              public MAiUiFrameworkObserver
+NONSHARABLE_CLASS( CAiUiControllerManager ) : public CBase                             
 	{
-	public: // Constructors and destructor		
+public: 		
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */ 
+    static CAiUiControllerManager* NewL( CAiFw* aAiFw );
+    
+    /**
+     * Destructor
+     */        
+    ~CAiUiControllerManager();
+    
+public: 
+    // new functions
+    
+    /**
+     * Gets UI controllers
+     * 
+     * @since S60 5.2
+     * @return Array of UI controllers
+     */
+    RPointerArray< CAiUiController >& UiControllers() const;
+    
+    /**
+     * Actives UI by calling ActivateUI() for each UI controller 
+     * 
+     * @since S60 5.2
+     */
+    void ActivateUI();
+    
+    /**
+     * Gets the main UI controller
+     * 
+     * @since S60 5.2
+     * @return Main UI controller
+     */
+    MAiMainUiController& MainUiController() const;
+    
+    /**
+     * Queries whether aUiController is the main UI controller
+     * 
+     * @since S60 5.2
+     * @return ETrue if main UI controller, EFalse otherwise
+     */
+    TBool IsMainUiController( CAiUiController& aUiController ) const;
+            
+    /**
+     * Calls RunApplicationL for the main UI controller.
+     * 
+     * @since S60 5.2
+     */
+    void RunApplicationL();
+    
+    /**
+     * Calls LoadUIDefinitionL for each UI controller.
+     * 
+     * @since S60 5.2
+     */
+    void LoadUIDefinition();
+    
+    /**
+     * Returns the main UI Controller's CONE environment object.
+     * 
+     * @since S60 5.2
+     * @return Control Environment
+     */
+    CCoeEnv& CoeEnv() const;
+    
+    /**
+     * Destroys all UI controllers except the main controller.
+     * 
+     * @since S60 5.2
+     */
+    void DestroySecondaryUiControllers();
+        
+    /**
+     * Exits main UI controller
+     * 
+     * @since S60 5.2
+     */		
+    void ExitMainController();
+    
+    /** 
+     * Sets Fw state handler for each UI conttroller
+     * 
+     * @since S60 5.2
+     * @param aHandler State handler to set
+     */
+    void SetStateHandler( MAiFwStateHandler& aHandler );    
+                    
+private: 
+    // private constructors
 
-		static CAiUiControllerManager* NewL();
-		~CAiUiControllerManager();
-		
-	public: // New functions
-		
-        /**
-         * Returns all UI controllers in an array.
-         */
-		RPointerArray< CAiUiController >& UiControllers() const;
-		
-		/**
-		 * Calls ActivateUI() for all UI controllers.
-		 */
-		void ActivateUI();
-		
-        /**
-         * Returns the main ui controller object.
-         */
-		MAiMainUiController& MainUiController() const;
-		
-        /**
-         * Returns true if aUiController is the main UI controller.
-         */
-		TBool IsMainUiController(CAiUiController& aUiController) const;
-		    
-        /**
-         * Sets framework event handler for all UI controllers.
-         */
-		void SetEventHandler(MAiFwEventHandler& aEventHandler);
-		
-        /**
-         * Calls RunApplicationL for the main UI controller.
-         */
-		void RunApplicationL();
-		
-        /**
-         * Calls LoadUIDefinitionL for all UI controllers.
-         */
-		void LoadUIDefinition();
-		
-		/**
-		 * Returns the main UI Controller's CONE environment object.
-		 */
-		CCoeEnv& CoeEnv() const;
-		
-        /**
-         * Destroys all UI controllers except the main controller.
-         */
-		void DestroySecondaryUiControllers();
-		
-		/**
-		 * Adds an UI Framework observer. No duplicates are allowed.
-		 */
-		void AddObserverL( MAiUiFrameworkObserver& aUiFwObserver );
-
-		/**
-		 * Removes an UI Framework observer.
-		 */
-		void RemoveObserver( MAiUiFrameworkObserver& aUiFwObserver );
-		
-		/**
-		 * Removes plugin from UI.
-		 */
-		void RemovePluginFromUI( CAiContentPublisher& aPlugin );
-
-        /**
-         * Exits main UI controller
-         */		
-        void ExitMainController();
-        
-    private:  // From MAiUiFrameworkObserver
+    /**
+     * Leaving constructor
+     */    
+    void ConstructL( CAiFw* aAiFw );
+    
+    /**
+     * C++ default constructor
+     */     
+    CAiUiControllerManager();
+    
+private: 
+    // new functions
+    
+    void LoadMainControllerL( CRepository& aRepository );
+    void LoadSecondaryControllersL( CRepository& aRepository );
     
-        void HandleResourceChange( TInt aType );
-        void HandleForegroundEvent( TBool aForeground );
-                 	
-    private: // Constructors
-
-		CAiUiControllerManager();
-		void ConstructL();
-        
-    private: // new functions
-        
-		void LoadMainControllerL(CRepository& aCenRepConfig);
-        void LoadSecondaryControllersL(CRepository& aCenRepConfig);
-		
-	private: // data
-    	/**
-		 * UI controller array.
-		 * Own.
-		 */
-		mutable RPointerArray<CAiUiController> iUiControllerArray;
-		
-    	/**
-		 * Main UI controller for app session. Owned in above array.
-		 */
-		MAiMainUiController*  iMainUiController;
-		
-		/**
-		 * List of UI framework observers to delegate events
-		 */
-		RPointerArray<MAiUiFrameworkObserver> iUiFrameworkObservers;
-		
-		/**
-		 * List to check for duplicated creations.
-		 */
-		RArray<TInt> iCreatedUICList;
+private: 
+    // data
+    
+    /** UI controllers, Owned */
+    mutable RPointerArray< CAiUiController > iUiControllerArray;    
+    /** Main UI controller, Owned by the above array */
+    MAiMainUiController* iMainUiController;        
+    /** List of created UI controllers */
+    RArray< TInt > iCreatedUICList;
+    
+private:
+    // friend class
+    
+#ifdef _AIFW_UNIT_TEST
+    friend class UT_AiUiControllerManager;
+#endif
 	};
 
-#endif // C_AIUICONTROLLERMANAGER_H
+#endif // _AIUICONTROLLERMANAGER_H
 
--- a/idlefw/inc/framework/aiuiframeworkobserverimpl.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  UI Framework observer for Active Idle
-*
-*/
-
-
-#ifndef C_AIUIFRAMEWORKOBSERVERIMPL_H
-#define C_AIUIFRAMEWORKOBSERVERIMPL_H
-
-
-#include <e32base.h>
-#include "aistatemanager.h"
-#include "aiuiframeworkobserver.h"
-#include "aidevicestatusobserver.h"
-
-/**
- * CAiUiFrameworkObserverImpl implements MAiUiFrameworkObserver for
- * Active Idle framework. It is also a bridge between MAiUiFrameworkObserver
- * and Active Idle system state manager.
- *
- *  @lib aifw.lib
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CAiUiFrameworkObserverImpl )
-    : public CBase,
-      public MAiUiFrameworkObserver,
-      public MAiDeviceStatusObserver
-    {
-public:
-
-    static CAiUiFrameworkObserverImpl* NewL( MAiStateManager& aManager );
-
-    virtual ~CAiUiFrameworkObserverImpl();
-
-// from base class MAiDeviceStatusObserver
-
-    TAiStateChanges Status();
-
-private:
-
-    CAiUiFrameworkObserverImpl( MAiStateManager& aManager );
-
-    void ConstructL();
-
-// from base class MAiUiFrameworkObserver
-    
-    void HandleResourceChange( TInt aType );
-
-    void HandleForegroundEvent( TBool aForeground );
-    
-private: // data
-
-    /**
-     * State manager.
-     */
-    MAiStateManager& iManager;
-
-    };
-
-#endif // C_AIUIFRAMEWORKOBSERVERIMPL_H
--- a/idlefw/inc/utility/caiplugintool.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/inc/utility/caiplugintool.h	Fri Feb 19 23:07:29 2010 +0200
@@ -15,18 +15,19 @@
 *
 */
 
-
 #ifndef C_AIPLUGINTOOL_H
 #define C_AIPLUGINTOOL_H
 
+// System includes
 #include <e32base.h>
+
+// User includes
 #include "aiplugintool.h"
 
-class TAiPublisherInfo;
-class CAiContentPublisher;
+// Forward declarations
+class THsPublisherInfo;
+class CHsContentPublisher;
 class MAiContentItemIterator;
-class MAiPropertyExtension;
-class MAiEventHandlerExtension;
 
 /**
 *  @ingroup group_aiutils
@@ -39,35 +40,34 @@
     public CBase, public MAiPluginTool
 	{
 public:
+    // Constructor
 	
     static CAiPluginTool* NewL();
     
 private:
-
+    // Constructors
+    
+    /**
+     * C++ default contructor
+     */
     CAiPluginTool();
     
+    /**
+     * 2nd phase constructor
+     */
     void ConstructL();
     
+private:
+    // from MAiPluginTool
+
+    MAiContentItemIterator* ContentItemIterator( 
+        CHsContentPublisher& aContentPublisher,        
+        CHsContentPublisher::TProperty aType = CHsContentPublisher::EPublisherContent );
+    
     void Release();
-
-    const TAiPublisherInfo* PublisherInfoL(
-                                CAiContentPublisher& aContentPublisher );
-
-    MAiContentItemIterator* ContentItemIteratorL(
-                                CAiContentPublisher& aContentPublisher,
-                                TInt aContentType = EAiPublisherContent );
-
-    MAiPropertyExtension* PropertyExt(
-                                CAiContentPublisher& aContentPublisher );
-
-    MAiEventHandlerExtension* EventHandlerExt(
-                                CAiContentPublisher& aContentPublisher );
-
     };
 
 #endif // M_AIPLUGINTOOL_H
 
-
+// End of file
 
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/data/aidevstaplg.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+//  INCLUDES
+#include <ecom/registryinfov2.rh>
+#include <hscontentpublisheruid.hrh>
+
+
+//  RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// ?resource_name
+// 
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO registry_info
+{
+    resource_format_version = RESOURCE_FORMAT_VERSION_2;
+    // UID for the DLL
+    dll_uid = 0x102750F7;
+
+    // Interface info array
+    interfaces =
+    {
+        INTERFACE_INFO
+        {
+            // UID of the implemented interface
+            interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER;
+
+            implementations =
+            {
+                IMPLEMENTATION_INFO
+                {
+                    implementation_uid  =  0x102750F8;
+                    version_no          =  1;
+                    display_name        =  "DeviceStatus";
+                    default_data        =  "";
+                    opaque_data         =  "";
+                    rom_only            =  1;
+                }
+            };
+        }
+    };
+}
+
+// End of File.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/data/aidevstaplgres.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Resource definitions for project ?myapp
+*
+*/
+
+
+
+NAME AIDP
+
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <eikon.rh>
+#include <eikcore.rsg>
+
+#include <aidevstaplgres.loc>
+
+RESOURCE RSS_SIGNATURE { }
+RESOURCE TBUF { buf=""; }
+
+// ---------------------------------------------------------------------------
+// ?resource_name
+// 
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF r_activeidle_time_format
+    {
+    buf = qtn_idle_time_format; 
+    }
+
+RESOURCE TBUF r_activeidle_bt_sim_access_profile_string
+    {
+    buf = qtn_mode_sap;
+    }
+    
+RESOURCE TBUF r_activeidle_cug_indicator_format
+    {
+    buf = qtn_cug_indic_group;
+    }
+
+RESOURCE TBUF r_ai_opn_spn_separator_format
+    {
+    buf = qtn_ai_opn_spn_separator;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/group/aidevstaplg.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Project definition file for project Devicestatus plugin	
+*
+*/
+
+
+#include        <platform_paths.hrh>
+#include        <data_caging_paths.hrh>
+
+TARGET          aidevstaplg.dll
+TARGETTYPE      PLUGIN
+UID             0x10009D8D 0x102750F7
+
+VENDORID        VID_DEFAULT
+CAPABILITY      CAP_ECOM_PLUGIN
+
+SOURCEPATH      ../src
+SOURCE          aidevicestatusplugin.cpp
+SOURCE          aidevicestatuspluginengine.cpp
+SOURCE          aimulticontentobserver.cpp
+SOURCE          aidatepublisher.cpp
+SOURCE          aipublisherfactory.cpp
+SOURCE          ainetworkinfolistener.cpp
+SOURCE          aioperatornamepublisher.cpp
+SOURCE          aibtsappublisher.cpp
+SOURCE          aisimregpublisher.cpp
+SOURCE          aimcnpublisher.cpp
+SOURCE          aicugpublisher.cpp
+SOURCE          aicugmcnpublisher.cpp
+SOURCE          aivhzpublisher.cpp
+SOURCE          aipublishprioritizer.cpp 
+SOURCE          aicontentobserveroptimizer.cpp 
+SOURCE          aioperatorlogopublisher.cpp
+SOURCE          ainwspublisher.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../loc
+USERINCLUDE     ../../../inc/common
+USERINCLUDE     ../../../cenrep
+
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../data
+START RESOURCE  aidevstaplg.rss
+TARGET          aidevstaplg.rsc
+END
+
+START RESOURCE  aidevstaplgres.rss
+HEADER
+TARGETPATH      RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END
+
+LIBRARY         euser.lib
+LIBRARY         ecom.lib
+LIBRARY         avkon.lib
+LIBRARY         sssettings.lib
+LIBRARY         profileeng.lib
+LIBRARY         networkhandling.lib
+LIBRARY         phoneclient.lib
+LIBRARY         fbscli.lib
+LIBRARY         cone.lib
+LIBRARY         commonengine.lib 
+LIBRARY         featmgr.lib
+LIBRARY         centralrepository.lib
+LIBRARY         cenrepnotifhandler.lib
+LIBRARY         egul.lib
+LIBRARY         aknlayout2scalable.lib
+LIBRARY         cdlengine.lib
+LIBRARY         gdi.lib
+LIBRARY         bitgdi.lib
+LIBRARY         aiutils.lib
+LIBRARY         flogger.lib
+LIBRARY         bafl.lib
+
+// End of file
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The build information file of Devicestatus Plugin
+*
+*/
+
+
+#ifdef RD_CUSTOMIZABLE_AI
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../loc/aidevstaplgres.loc                      MW_LAYER_LOC_EXPORT_PATH(aidevstaplgres.loc)
+
+../rom/aidevicestatusplugin_resources.iby      LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(aidevicestatusplugin_resources.iby)
+../rom/aidevicestatusplugin.iby                CORE_MW_LAYER_IBY_EXPORT_PATH(aidevicestatusplugin.iby)
+
+PRJ_MMPFILES
+aidevstaplg.mmp
+
+#endif // RD_CUSTOMIZABLE_AI
+
+// End of File.
--- a/idlefw/plugins/devicestatus/inc/aibtsappublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aibtsappublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -20,17 +20,20 @@
 #ifndef C_AIBTSAPPUBLISHER_H
 #define C_AIBTSAPPUBLISHER_H
 
-
+// System includes
 #include <e32base.h>
 #include <coemain.h>
 #include <RSSSettings.h>
 #include <MSSSettingsObserver.h>
 #include <MProfileChangeObserver.h>
+
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -41,7 +44,8 @@
  *
  *  @since S60 3.2
  */
-class CAiBTSAPPublisher : public CActive, public MAiDeviceStatusPublisher
+NONSHARABLE_CLASS( CAiBTSAPPublisher ) : public CActive, 
+    public MAiDeviceStatusPublisher
     {
 public:
 
@@ -53,11 +57,12 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
     TBool RefreshL( TInt aContentId, TBool aClean );
+    TBool SuspendL( TInt aContentId, TBool aClean );
     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
     
 protected:
@@ -78,39 +83,22 @@
 
 private: // data
 
-    /**
-     * Property extension.
-     * Not own.
-     */
-    MAiPropertyExtension* iExtension;
-    
-	/**
-	 * Content prioritizer.
-	 * Not own.
-	 */
-	MAiPublishPrioritizer* iPrioritizer;
-    
-	/**
-	 * Publish broadcaster.
-	 * Not own.
-	 */
-	MAiPublisherBroadcaster* iBroadcaster;
-	
-    /**
-     * Publish-subscribe client used to observer BT SAP activation.
-     */
+    /** Property extension, not owned */
+    CHsContentPublisher* iExtension;    
+	/** Content prioritizer, not owned */
+	MAiPublishPrioritizer* iPrioritizer;    
+	/**  Publish broadcaster, not owned */
+	MAiPublisherBroadcaster* iBroadcaster;	
+    /** Publish-subscribe client used to observer BT SAP activation */
     RProperty iPubSub;
-
-    /**
-     * Variable which tells if publisher has published previously or not.
-     */
+    /** Variable which tells if publisher has published previously or not */
     TBool iFirstPublish;
-
-    /**
-     * True if publish was successful.
-     */
-    TBool iSuccess;
+    /**  True if publish was successful */
+    TBool iSuccess;    
+    /** True if publisher content is suspended */
+    TBool iSuspended;
     };
 
+#endif // C_AIBTSAPPUBLISHER_H
 
-#endif // C_AIBTSAPPUBLISHER_H
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,10 +19,15 @@
 #ifndef C_AIMULTICONTENTOBSERVEROPTIMIZER_H
 #define C_AIMULTICONTENTOBSERVEROPTIMIZER_H
 
-
+// System includes
 #include <e32base.h>
+
+// User includes
 #include "aicontentobserver.h"
 
+// Forward declarations
+class CHsContentPublisher;
+
 /**
  *  @ingroup group_devicestatusplugin
  *
@@ -34,9 +39,8 @@
  * @see MAiContentObserver
  * @since S60 3.2
  */
-class CAiContentObserverOptimizer : public CBase      
+NONSHARABLE_CLASS( CAiContentObserverOptimizer ) : public CBase      
     {
-
 private:
     struct TAiPublishBlackList
         {
@@ -80,34 +84,34 @@
     /*
      * @see MAiContentObserver
      */
-    TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
+    TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
     
     /**
      * @see MAiContentObserver
      */
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   TInt aResource, TInt aIndex );
 
     /**
      * @see MAiContentObserver
      */
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   const TDesC16& aText, TInt aIndex );
     /**
      * @see MAiContentObserver
      */
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   const TDesC8& aBuf, TInt aIndex );
 
     /**
      * @see MAiContentObserver
      */
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   RFile& aFile, TInt aIndex );
     /**
      * @see MAiContentObserver
      */
-    TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
+    TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
 
     /**
      * Returns the actual content observer.
--- a/idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,19 +19,23 @@
 #ifndef C_AICUGMCNPUBLISHER_H
 #define C_AICUGMCNPUBLISHER_H
 
-
+// System includes
 #include <e32base.h>
 #include <RSSSettings.h>
 #include <MSSSettingsObserver.h>
+
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 #include "ainetworkinfoobserver.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CAiNetworkInfoListener;
 
-const TInt KAnimDelay = 2000000;
+// Constants
+const TInt KAnimDelay( 2000000 );
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -40,8 +44,10 @@
  *
  *  @since S60 3.2
  */
-class CAiCUGMCNPublisher : public CBase, public MAiDeviceStatusPublisher,
-                        public MSSSettingsObserver, public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiCUGMCNPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MSSSettingsObserver, 
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -55,7 +61,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -115,7 +121,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * SS Settings client. Used to observer CUGMCN changes.
--- a/idlefw/plugins/devicestatus/inc/aicugpublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aicugpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,15 +19,18 @@
 #ifndef C_AICUGPUBLISHER_H
 #define C_AICUGPUBLISHER_H
 
-
+// System includes
 #include <e32base.h>
 #include <RSSSettings.h>
 #include <MSSSettingsObserver.h>
+
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -36,8 +39,9 @@
  *
  *  @since S60 3.2
  */
-class CAiCUGPublisher : public CBase, public MAiDeviceStatusPublisher,
-                        public MSSSettingsObserver
+NONSHARABLE_CLASS( CAiCUGPublisher ): public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MSSSettingsObserver
     {
 public:
 
@@ -52,7 +56,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -87,7 +91,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * SS Settings client. Used to observer CUG changes.
--- a/idlefw/plugins/devicestatus/inc/aidatepublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aidatepublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,13 +19,17 @@
 #ifndef C_AIDATEPUBLISHER_H
 #define C_AIDATEPUBLISHER_H
 
+// System includes
 #include <e32base.h>
 #include <coemain.h>
+
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CEnvironmentChangeNotifier;
 
 /**
@@ -38,7 +42,8 @@
  *
  *  @since S60 3.2
  */
-class CAiDatePublisher : public CBase, public MAiDeviceStatusPublisher
+NONSHARABLE_CLASS( CAiDatePublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher
     {
 public:
 
@@ -52,7 +57,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -90,7 +95,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
  
 	/**
 	 * Content prioritizer.
--- a/idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,11 +19,13 @@
 #ifndef C_AIDEVICESTATUSPLUGIN_H
 #define C_AIDEVICESTATUSPLUGIN_H
 
+// System includes
 
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
+// User includes
+#include <hscontentpublisher.h>
 #include <aicontentrequest.h>
 
+// Forward declarations
 class MAiDeviceStatusPublisher;
 class CAiContentItemArrayIterator;
 class CAiDeviceStatusPluginEngine;
@@ -40,100 +42,110 @@
  *
  *  @since S60 3.2
  */
-class CAiDeviceStatusPlugin : public CAiContentPublisher, 
-                                public MAiPropertyExtension, 
-                                public MAiContentRequest
+NONSHARABLE_CLASS( CAiDeviceStatusPlugin ) : public CHsContentPublisher, 
+    public MAiContentRequest                                 
     {
 public:
-
+    // constructors and destructor
     static CAiDeviceStatusPlugin* NewL();
     static CAiDeviceStatusPlugin* NewLC();
 
     virtual ~CAiDeviceStatusPlugin();
 
 protected:
-
-// from base class CAiContentPublisher
-    void Resume( TAiTransitionReason aReason );
-    void Suspend( TAiTransitionReason aReason );
-    void Stop( TAiTransitionReason aReason );
-    void SubscribeL(MAiContentObserver& aObserver);
-    TAny* Extension(TUid aUid);
-    void ConfigureL(RAiSettingsItemArray& aSettings);
+    // from CHsContentPublisher
+    
+    /**
+     * @see CHsContentPublisher
+     */
+    void Start( CHsContentPublisher::TStartReason aReason );
 
-protected:
-
-// from base class MAiPropertyExtension
-    TAny* GetPropertyL(TInt aProperty);
-    void SetPropertyL(TInt aProperty, TAny* aValue);
-
-// from base class MAiContentRequest
-    TBool RefreshContent( TInt aContentId );
-
-
-private:
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Stop( CHsContentPublisher::TStopReason aReason );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Resume( CHsContentPublisher::TResumeReason aReason );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Suspend( CHsContentPublisher::TSuspendReason aReason );
 
-    CAiDeviceStatusPlugin();
-    void ConstructL();
-
-    void AllocateResourcesL();
-    void FreeResources();
-    void DoResumeL( TAiTransitionReason aReason );
-    TBool IgnoreReason( TAiTransitionReason aReason );
-
-     /**
-     * Add device status publisher.
+    /**
+     * @see CHsContentPublisher
+     */    
+    void SubscribeL( MAiContentObserver& aObserver );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void ConfigureL( RAiSettingsItemArray& aSettings );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    TAny* GetProperty( CHsContentPublisher::TProperty aProperty );
+    
+protected:
+    // from MAiContentRequest
+    
+    /**
+     * @see MAiContentRequest
      */
-    void AddPublisherL( MAiDeviceStatusPublisher* aPublisher );
-
-private: // data
-
-	/**
-	 * Device Status Plug-in Engine.
-	 * Own.
-	 */
-	 CAiDeviceStatusPluginEngine* iEngine;
+    TBool RefreshContent( TInt aContentId );
 
     /**
-     * Content observers.
-     * Own.
-     */
-    CAiMultiContentObserver* iContentObservers;
-
-	/**
-	 * Device Status Plug-in content prioritizer.
-	 * Own.
-	 */
-	 CAiPublishPrioritizer* iPrioritizer;
-
+     * @see MAiContentRequest
+     */    
+    TBool SuspendContent( TInt aContentId );
+    
+private:
+    // constructors
+    
     /**
-     * Content item array iterator.
-     * Own.
+     * C++ default constructor
      */
-    MAiContentItemIterator* iContent;
-
-    /**
-     * Content item array iterator for resources.
-     * Own.
-     */
-    MAiContentItemIterator* iResources;
-
-    /**
-     * Publisher info.
-     */
-    TAiPublisherInfo iInfo;
-
-    /**
-     * Offset of the loaded resource file.
-     */
-    TInt iResourceOffset;
+    CAiDeviceStatusPlugin();
     
     /**
-     * Network info listener.
-     * Own.
+     * 2nd phase constructor
      */
+    void ConstructL();
+
+private:
+    // new functions
+    
+    void AllocateResourcesL();
+    void FreeResources();
+    void DoResumeL();
+    
+    void AddPublisherL( MAiDeviceStatusPublisher* aPublisher );
+
+private: 
+    // data
+
+	/** Device Status Plug-in Engine, owned */
+	 CAiDeviceStatusPluginEngine* iEngine;
+    /** Content observers, owned */
+    CAiMultiContentObserver* iContentObservers;
+	/** Device Status Plug-in content prioritizer, owned */
+	 CAiPublishPrioritizer* iPrioritizer;
+    /** Content item array iterator, owned */
+    MAiContentItemIterator* iContent;
+    /** Content item array iterator for resources, owned */
+    MAiContentItemIterator* iResources;
+    /** Offset of the loaded resource file */
+    TInt iResourceOffset;    
+    /** Network info listener, owned */
     CAiNetworkInfoListener* iListener;    
+    /** Flag to indicate republish need */
+    TBool iRequirePublish;
     };
 
+#endif // C_AIDEVICESTATUSPLUGIN_H
 
-#endif // C_AIDEVICESTATUSPLUGIN_H
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aidevicestatuspluginengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aidevicestatuspluginengine.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,19 +19,23 @@
 #ifndef AIDEVICESTATUSPLUGINENGINE_H
 #define AIDEVICESTATUSPLUGINENGINE_H
 
+// System includes
 #include <e32base.h>
+
+// User includes
 #include <aisystemuids.hrh>
-
 #include "aipublisherbroadcaster.h"
 #include "aidevicestatuspublisher.h"
 
+// Forward declarations
+class CHsContentPublisher;
+class MAiContentObserver;
+class MAiPublishPrioritizer;
+
+// Constants
 //device status plugin UI
 const TInt KImplUidDevStaPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN;
 
-class MAiContentObserver;
-class MAiPropertyExtension;
-class MAiPublishPrioritizer;
-
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -44,17 +48,20 @@
  *
  *  @since S60 v3.2
  */
-class CAiDeviceStatusPluginEngine : public CBase, public MAiPublisherBroadcaster
+NONSHARABLE_CLASS( CAiDeviceStatusPluginEngine ) : public CBase, 
+    public MAiPublisherBroadcaster
     {
+public:
+    // constructor and destructor
+    
+    static CAiDeviceStatusPluginEngine* NewL( MAiContentObserver& aObserver, 
+        CHsContentPublisher& aExtension, MAiPublishPrioritizer& aPrioritizer );
+                                                
+    virtual ~CAiDeviceStatusPluginEngine();
 
 public:
-
-    static CAiDeviceStatusPluginEngine* NewL( MAiContentObserver& aObserver, 
-                                                MAiPropertyExtension& aExtension,
-                                                MAiPublishPrioritizer& aPrioritizer);
-
-    virtual ~CAiDeviceStatusPluginEngine();
-
+    // new functions
+    
     /**
      * Resumes all publishers.
      */
@@ -77,27 +84,41 @@
      */    
     TBool RefreshPublishersL( TInt aContentId, TBool aClean );
 
+    /**
+     * Suspends specific publishers.
+     * @param aContentId Indicates which publishers should suspend their 
+     *                  content.
+     * @param aClean Indicates if publishers should clean their content before
+     *                  suspend.
+     * @return ETrue if publisher informed that publish was successful.
+     */    
+    TBool SuspendPublishersL( TInt aContentId, TBool aClean );
+    
 
-public: // from MAiPublisherBroadcaster
+public: 
+    // from MAiPublisherBroadcaster
     
     TBool RefreshPriorizedPublishersL( TInt aContentId, TInt aPriority );
 
 
 private:
+    // constructors
 
     CAiDeviceStatusPluginEngine( MAiContentObserver& aObserver, 
-								    MAiPropertyExtension& aExtension,
-                                    MAiPublishPrioritizer& aPrioritizer);
-
+        CHsContentPublisher& aExtension, MAiPublishPrioritizer& aPrioritizer );
+                                    
     void ConstructL();
 
+private:
+    // new functions
+    
      /**
       * Add Device Status publisher.
       */
     void AddPublisherL( MAiDeviceStatusPublisher* aPublisher );
 
-
-private: // data
+private: 
+    // data
 
     /**
      * Array of publishers.
@@ -115,7 +136,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
 	/**
 	 * Content prioritizer.
@@ -125,3 +146,5 @@
     };
 
 #endif // AIDEVICESTATUSPLUGINENGINE_H
+
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aidevicestatuspublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aidevicestatuspublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,9 +19,14 @@
 #ifndef M_AIDEVICESTATUSPUBLISHER_H
 #define M_AIDEVICESTATUSPUBLISHER_H
 
+// System includes
 #include <e32std.h>
-#include "aicontentobserver.h"
+
+// User includes
 
+// Forward declarations
+class CHsContentPublisher;
+class MAiContentObserver;
 class MAiPublishPrioritizer;
 class MAiPublisherBroadcaster;
 
@@ -52,7 +57,7 @@
      * @param aBroadcaster is reference for publisher broadcaster.
      */
     virtual void Subscribe( MAiContentObserver& aObserver, 
-                            MAiPropertyExtension& aExtension,
+                            CHsContentPublisher& aExtension,
                             MAiPublishPrioritizer& aPrioritizer,
                             MAiPublisherBroadcaster& aBroadcaster ) = 0;
 
@@ -84,6 +89,16 @@
     virtual TBool RefreshL( TInt /*aContentId*/, TBool /*aClean*/ ) { return EFalse; }
 
     /**
+     * Suspends specific content.
+     *     
+     * Publisher suspends content publishing specified by aContentId.
+     * @param aContentId Id of the content item that is requested to suspend.
+     * @param aClean ETrue if current content needs to be cleaned.
+     * @return true if content was suspended.
+     */    
+    virtual TBool SuspendL( TInt /*aContentId*/, TBool /*aClean*/ ) { return EFalse; }
+    
+    /**
      * Refresh specific content with specific priority.
      *
      * This has the same effect as the publisher would get content update from system.
@@ -95,5 +110,6 @@
     virtual TBool RefreshContentWithPriorityL( TInt /*aContentId*/, TInt /*aPriority*/ ) { return EFalse; }
     };
 
+#endif // M_AIDEVICESTATUSPUBLISHER_H
 
-#endif // M_AIDEVICESTATUSPUBLISHER_H
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aimcnpublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aimcnpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,14 +19,17 @@
 #ifndef C_AIMCNPUBLISHER_H
 #define C_AIMCNPUBLISHER_H
 
+// System includes
+#include <e32base.h>
 
-#include <e32base.h>
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 #include "ainetworkinfoobserver.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CAiNetworkInfoListener;
 
 /**
@@ -39,8 +42,9 @@
  *
  *  @since S60 3.2
  */
-class CAiMCNPublisher : public CBase, public MAiDeviceStatusPublisher,
-                                public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiMCNPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -54,7 +58,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -87,7 +91,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * Network info listener.
--- a/idlefw/plugins/devicestatus/inc/aimulticontentobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aimulticontentobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,13 +19,16 @@
 #ifndef C_AIMULTICONTENTOBSERVER_H
 #define C_AIMULTICONTENTOBSERVER_H
 
-
+// System includes
 #include <e32base.h>
+
+// User includes
 #include "aicontentobserver.h"
 
-
 // Forward declarations
 class CAiContentObserverOptimizer;
+class CHsContentPublisher;
+
 /**
  *  @ingroup group_devicestatusplugin
  *
@@ -34,9 +37,8 @@
  * @see MAiContentObserver
  * @since S60 3.2
  */
-class CAiMultiContentObserver : 
-        public CBase,
-        public MAiContentObserver
+NONSHARABLE_CLASS( CAiMultiContentObserver ) : public CBase,         
+    public MAiContentObserver
     {
 public:
     static CAiMultiContentObserver* NewL();
@@ -51,25 +53,25 @@
     TInt StartTransaction( TInt aTxId );
     TInt Commit( TInt aTxId );
     TInt CancelTransaction( TInt aTxId );
-    TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   TInt aResource, TInt aIndex );
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   const TDesC16& aText, TInt aIndex );
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   const TDesC8& aBuf, TInt aIndex );
-    TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
+    TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
                   RFile& aFile, TInt aIndex );
-    TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
+    TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
     TAny* Extension( TUid aUid );
-    TBool RequiresSubscription( const TAiPublisherInfo& aPublisherInfo ) const;
+    TBool RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const;
 
-    TInt SetProperty( MAiPropertyExtension& aPlugin,
+    TInt SetProperty( CHsContentPublisher& aPlugin,
                const TDesC8& aElementId,
                const TDesC8& aPropertyName,
                const TDesC8& aPropertyValue );
        
-    TInt SetProperty( MAiPropertyExtension& aPlugin,
+    TInt SetProperty( CHsContentPublisher& aPlugin,
                const TDesC8& aElementId,
                const TDesC8& aPropertyName,
                const TDesC8& aPropertyValue,  
--- a/idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,14 +19,17 @@
 #ifndef C_AINETWORKINFOLISTENER_H
 #define C_AINETWORKINFOLISTENER_H
 
-
+// System includes
 #include <e32base.h>
 #include <NWHandlingEngine.h>
 
+// User includes
 
+// Forward declarations
 class MAiNetworkInfoObserver;
 class CNWSession;
 
+
 /**
  *  @ingroup group_devicestatusplugin
  *
@@ -37,7 +40,8 @@
  *
  *  @since S60 3.2
  */
-class CAiNetworkInfoListener : public CBase, public MNWMessageObserver
+NONSHARABLE_CLASS( CAiNetworkInfoListener ) : public CBase, 
+    public MNWMessageObserver
     {
 public:
 
--- a/idlefw/plugins/devicestatus/inc/ainwspublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/ainwspublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,15 +19,17 @@
 #ifndef C_AINWSPUBLISHER_H
 #define C_AINWSPUBLISHER_H
 
+// System includes
+#include <e32base.h>
 
-#include <e32base.h>
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 #include "ainetworkinfoobserver.h"
 
-
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CAiNetworkInfoListener;
 class CRepository;
 
@@ -38,8 +40,9 @@
  *
  *  @since S60 3.2
  */
-class CAiNwsPublisher : public CBase, public MAiDeviceStatusPublisher,
-                                public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiNwsPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -52,7 +55,7 @@
     void ResumeL();
 
     void Subscribe( MAiContentObserver& aObserver,
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
 
@@ -108,7 +111,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * Network info listener.
--- a/idlefw/plugins/devicestatus/inc/aioperatorlogopublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aioperatorlogopublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,20 +19,24 @@
 #ifndef C_AIOPERATORLOGOPUBLISHER_H
 #define C_AIOPERATORLOGOPUBLISHER_H
 
-
+// System includes
 #include <e32base.h>
 #include <e32property.h>
 #include <cenrepnotifyhandler.h>
+
+// User includes
 #include <aiutility.h>
 #include "aidevicestatuspublisher.h"
 #include "ainetworkinfoobserver.h"
 
+// Forward declarations
 class CAiNetworkInfoListener;
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CGulIcon;
 class CCenRepNotifyHandler;
 
+
 /**
  *  @ingroup group_devicestatusplugin
  *
@@ -43,9 +47,10 @@
  *
  *  @since S60 3.2
  */
-class CAiOperatorLogoPublisher : public CBase, public MAiDeviceStatusPublisher,
-                               public MAiNetworkInfoObserver, /*public MAiCenRepNotifierCallBack*/
-                               public MCenRepNotifyHandlerCallback
+NONSHARABLE_CLASS( CAiOperatorLogoPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver, 
+    public MCenRepNotifyHandlerCallback
     {
 public:
 
@@ -59,11 +64,12 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
     TBool RefreshL( TInt aContentId, TBool aClean );
+    TBool SuspendL( TInt aContentId, TBool aClean );
     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
 
 
@@ -149,77 +155,39 @@
 
 private: // data
 
-    /**
-     * Network info listener.
-     * Own.
-     */
+    /** Network info listener, owned */     
     CAiNetworkInfoListener* iListener;
-
-    /**
-     * Operator logo bitmap and mask.
-     * Own.
-     */
+    /** Operator logo bitmap and mask, owned */     
     CGulIcon* iIcon;
-
-    /**
-     * Content observer.
-     * Not own.
-     */
+    /** Content observer, not owned */
     MAiContentObserver* iContentObserver;
-
-    /**
-     * Property extension.
-     * Not own.
-     */
-    MAiPropertyExtension* iExtension;
-
-	/**
-	 * Content prioritizer.
-	 * Not own.
-	 */
-	MAiPublishPrioritizer* iPrioritizer;
-    
-	/**
-	 * Publish broadcaster.
-	 * Not own.
-	 */
-	MAiPublisherBroadcaster* iBroadcaster;
-    
-    /**
-     * Publish-subscribe client.
-     */
+    /** Property extension, not owned */
+    CHsContentPublisher* iExtension;
+	/** Content prioritizer, not owned */
+	MAiPublishPrioritizer* iPrioritizer;    
+	/** Publish broadcaster, not owned */
+	MAiPublisherBroadcaster* iBroadcaster;    
+    /** Publish-subscribe client, owned */
     MAiPSPropertyObserver* iOperatorLogoObserver;
-
-    /**
-     * Central repository client.
-     * Own.
-     */
+    /** Central repository client, owned */
     CRepository* iCenRep;
-
-    /**
-     * Central repository notifier.
-     * Own.
-     */
+    /** Central repository notifier, owned */
     CCenRepNotifyHandler* iCenRepNotify;
-
-    /**
-     * Operator logo priority, can have one of the following values:
+    /** Operator logo priority, can have one of the following values:
+     * 
      * 1) EAiOTAOperatorLogo
      * 2) EAiProgOperatorLogo
      * 3) EAiInvalidPriority
      */
     TInt iPriority;
-
-    /**
-     * True if publish was successful.
-     */
-    TBool iSuccess;
-    
-    /**
-     * Show operator indicator.
-     */
+    /** True if publish was successful. */
+    TBool iSuccess;    
+    /** Flag to indicate if the content is suspended */
+     TBool iSuspended;    
+    /** Show operator indicator */
     TBool iShowOpInd;
     };
 
+#endif // C_AIOPERATORLOGOPUBLISHER_H
 
-#endif // C_AIOPERATORLOGOPUBLISHER_H
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aioperatornamepublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aioperatornamepublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,15 +19,19 @@
 #ifndef C_AIOPERATORPROVIDERNAMEPUBLISHER_H
 #define C_AIOPERATORPROVIDERNAMEPUBLISHER_H
 
-
+// System includes
 #include <e32base.h>
 #include <AknUtils.h>
+
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "ainetworkinfoobserver.h"
 
+// Forward declarations
 class CAiNetworkInfoListener;
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
+
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -39,8 +43,9 @@
  *
  *  @since S60 3.2
  */
-class CAiOperatorNamePublisher : public CBase, public MAiDeviceStatusPublisher,
-                               public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiOperatorNamePublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -52,11 +57,12 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
     TBool RefreshL( TInt aContentId, TBool aClean );
+    TBool SuspendL( TInt aContentId, TBool aClean );
     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
 
 
@@ -141,56 +147,28 @@
 
 private: // data
 
-    /**
-     * Network info listener.
-     * Own.
-     */
+    /** Network info listener, not owned */
     CAiNetworkInfoListener* iListener;
-
-    /**
-     * Property extension.
-     * Not own.
-     */
-    MAiPropertyExtension* iExtension;
-
-	/**
-	 * Content prioritizer.
-	 * Not own.
-	 */
-	MAiPublishPrioritizer* iPrioritizer;
-    
-	/**
-	 * Publish broadcaster.
-	 * Not own.
-	 */
-	MAiPublisherBroadcaster* iBroadcaster;
-    
-    /**
-     * Used to do delayed clean operation.
-     * Own.
-     */
-    CPeriodic* iPeriodic;
-    
-    /**
-     * True if publish was successful.
-     */
-    TBool iSuccess;
-    
-    /**
-     * Operator name priority
-     */
-    TInt iPriority;
-    
-    /**
-     * Show operator indicator.
-     */
-    TBool iShowOpInd;
-    
-    /**
-     * Network identity name
-     */
-    TPtrC iNetworkIdentityName;
+    /** Property extension, not owned */
+    CHsContentPublisher* iExtension;
+	/** Content prioritizer, not owned */
+	MAiPublishPrioritizer* iPrioritizer;    
+	/** Publish broadcaster, not owned */
+	MAiPublisherBroadcaster* iBroadcaster;    
+    /** Used to do delayed clean operation, owned */
+    CPeriodic* iPeriodic;    
+    /** True if publish was successful */
+    TBool iSuccess;    
+    /** Operator name priority */
+    TInt iPriority;    
+    /** Show operator indicator */
+    TBool iShowOpInd;    
+    /** Network identity name */
+    TPtrC iNetworkIdentityName;    
+    /** Flag to indicate if the content is suspended */ 
+    TBool iSuspended;
     };
 
+#endif // C_AIOPERATORPROVIDERNAMEPUBLISHER_H
 
-#endif // C_AIOPERATORPROVIDERNAMEPUBLISHER_H
+// End of file
--- a/idlefw/plugins/devicestatus/inc/aipublisherfactory.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aipublisherfactory.h	Fri Feb 19 23:07:29 2010 +0200
@@ -34,15 +34,6 @@
 public:
 
     /**
-     * Create profile publisher.
-     *
-     * @since S60 3.2
-     * @return pointer to publisher or NULL if publisher is not supported
-     *         by platform.
-     */
-    static MAiDeviceStatusPublisher* CreateProfilePublisherL();
-
-    /**
      * Create date profile publisher.
      *
      * @since S60 3.2
--- a/idlefw/plugins/devicestatus/inc/aipublishprioritizer.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aipublishprioritizer.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,10 +19,16 @@
 #ifndef C_AIPUBLISHPRIORITIZER_H
 #define C_AIPUBLISHPRIORITIZER_H
 
+// System includes
 #include <e32def.h>
+
+// User includes
 #include "ainwidpriorities.h"
 #include "aiprioritizer.h"
-#include "aipropertyextension.h"
+
+// Forward declarations
+class CHsContentPublisher;
+
 
 /**
  *  @ingroup group_devicestatusplugin
@@ -37,13 +43,13 @@
  *  @since S60 3.2
  */
  
-class CAiPublishPrioritizer : public CBase, public MAiPublishPrioritizer
+NONSHARABLE_CLASS( CAiPublishPrioritizer ) : public CBase, 
+    public MAiPublishPrioritizer
     {
-
 public:
 
     static CAiPublishPrioritizer* NewL( MAiContentObserver& aContentObserver,
-                                        MAiPropertyExtension& aPropertyExtension );
+                                        CHsContentPublisher& aPropertyExtension );
 
     virtual ~CAiPublishPrioritizer();
 
@@ -75,7 +81,7 @@
 private:
 
     CAiPublishPrioritizer( MAiContentObserver& aContentObserver,
-                            MAiPropertyExtension& aPropertyExtension );
+                            CHsContentPublisher& aPropertyExtension );
 
 
 private: // data
@@ -88,7 +94,7 @@
     /**
      * Property extension.
      */
-    MAiPropertyExtension& iPropertyExtension;
+    CHsContentPublisher& iPropertyExtension;
 
     /// Current priority
     TInt iPriority;
--- a/idlefw/plugins/devicestatus/inc/aisimregpublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aisimregpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,17 +19,20 @@
 #ifndef C_AISIMREGFAILPUBLISHER_H
 #define C_AISIMREGFAILPUBLISHER_H
 
+// System includes
+#include <e32base.h>
 
-#include <e32base.h>
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 #include "ainetworkinfoobserver.h"
 
-
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CAiNetworkInfoListener;
 
+
 /**
  *  @ingroup group_devicestatusplugin
  *
@@ -37,8 +40,9 @@
  *
  *  @since S60 3.2
  */
-class CAiSimRegPublisher : public CBase, public MAiDeviceStatusPublisher,
-                                public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiSimRegPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -50,7 +54,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -84,7 +88,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * Network info listener.
--- a/idlefw/plugins/devicestatus/inc/aivhzpublisher.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aivhzpublisher.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,14 +19,17 @@
 #ifndef C_AIVHZPUBLISHER_H
 #define C_AIVHZPUBLISHER_H
 
+// System includes
+#include <e32base.h>
 
-#include <e32base.h>
+// User includes
 #include "aidevicestatuspublisher.h"
 #include "aidevicestatuscontentmodel.h"
 #include "ainetworkinfoobserver.h"
 
+// Forward declarations
 class MAiDeviceStatusContentObserver;
-class MAiPropertyExtension;
+class CHsContentPublisher;
 class CAiNetworkInfoListener;
 
 /**
@@ -39,8 +42,9 @@
  *
  *  @since S60 3.2
  */
-class CAiVHZPublisher : public CBase, public MAiDeviceStatusPublisher,
-                                public MAiNetworkInfoObserver
+NONSHARABLE_CLASS( CAiVHZPublisher ) : public CBase, 
+    public MAiDeviceStatusPublisher,
+    public MAiNetworkInfoObserver
     {
 public:
 
@@ -54,7 +58,7 @@
 
     void ResumeL();
     void Subscribe( MAiContentObserver& aObserver, 
-                    MAiPropertyExtension& aExtension,
+                    CHsContentPublisher& aExtension,
                     MAiPublishPrioritizer& aPrioritizer,
                     MAiPublisherBroadcaster& aBroadcaster );
     void RefreshL( TBool aClean );
@@ -85,7 +89,7 @@
      * Property extension.
      * Not own.
      */
-    MAiPropertyExtension* iExtension;
+    CHsContentPublisher* iExtension;
 
     /**
      * Network info listener.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/rom/aidevicestatusplugin.iby	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  IBY file for Devicestatus plug-in
+*
+*/
+
+
+#ifndef AIDEVICESTATUSPLUGIN_IBY
+#define AIDEVICESTATUSPLUGIN_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef RD_CUSTOMIZABLE_AI
+
+ECOM_PLUGIN( aidevstaplg.dll, aidevstaplg.rsc )
+
+#endif // RD_CUSTOMIZABLE_AI
+
+#endif // AIDEVICESTATUSPLUGIN_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/rom/aidevicestatusplugin_resources.iby	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  IBY file for Devicestatus plug-in
+*
+*/
+
+
+#ifndef AIDEVICESTATUS_RESOURCES_IBY
+#define AIDEVICESTATUS_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+#ifdef RD_CUSTOMIZABLE_AI
+
+// AI devicestatus plug-in localizable resources
+data=DATAZ_\RESOURCE_FILES_DIR\aidevstaplgres.rsc      RESOURCE_FILES_DIR\aidevstaplgres.rsc
+
+#endif // RD_CUSTOMIZABLE_AI
+
+#endif // AIDEVICESTATUS_RESOURCES_IBY
--- a/idlefw/plugins/devicestatus/src/aibtsappublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aibtsappublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -82,7 +82,7 @@
 
 
 void CAiBTSAPPublisher::Subscribe( MAiContentObserver& /*aObserver*/,
-								    MAiPropertyExtension& aExtension,
+								    CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& aPrioritizer,
                                     MAiPublisherBroadcaster& aBroadcaster )
     {
@@ -95,6 +95,12 @@
 void CAiBTSAPPublisher::RefreshL( TBool aClean )
     {
     iSuccess = EFalse;
+    
+    if ( iSuspended )
+        {
+        return;
+        }
+    
     if( aClean )
         {
         iPrioritizer->TryToCleanL( *iBroadcaster,
@@ -165,17 +171,32 @@
 
 TBool CAiBTSAPPublisher::RefreshL( TInt aContentId, TBool aClean )
 	{
-    if( aContentId == EAiDeviceStatusContentNetworkIdentity )
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
         {
+        iSuspended = EFalse;
+        
    	    RefreshL( aClean );
-        if( iSuccess )
+        
+   	    if ( iSuccess )
 	        {
 	        return ETrue;
 	        }
         }
+    
     return EFalse;
 	}
 
+TBool CAiBTSAPPublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
+    {
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
+        {
+        iSuspended = ETrue;
+        
+        return ETrue;
+        }
+    
+    return EFalse;
+    }
 
 TBool CAiBTSAPPublisher::RefreshContentWithPriorityL( TInt aContentId,
                                                         TInt aPriority )
--- a/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -78,14 +78,14 @@
     }
     
     
-TBool CAiContentObserverOptimizer::CanPublish( MAiPropertyExtension& aPlugin,
+TBool CAiContentObserverOptimizer::CanPublish( CHsContentPublisher& aPlugin,
                                            TInt aContent,
                                            TInt aIndex )
     {
     return iObserver.CanPublish( aPlugin, aContent, aIndex );
     }
   
-TInt CAiContentObserverOptimizer::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiContentObserverOptimizer::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        TInt aResource,
                                        TInt aIndex )
@@ -111,7 +111,7 @@
     }
     
     
-TInt CAiContentObserverOptimizer::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiContentObserverOptimizer::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        const TDesC16& aText,
                                        TInt aIndex )
@@ -137,7 +137,7 @@
     }
     
     
-TInt CAiContentObserverOptimizer::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiContentObserverOptimizer::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        const TDesC8& aBuf,
                                        TInt aIndex )
@@ -164,7 +164,7 @@
     }
     
     
-TInt CAiContentObserverOptimizer::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiContentObserverOptimizer::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        RFile& aFile,
                                        TInt aIndex )
@@ -190,7 +190,7 @@
     }
     
     
-TInt CAiContentObserverOptimizer::Clean( MAiPropertyExtension& aPlugin,
+TInt CAiContentObserverOptimizer::Clean( CHsContentPublisher& aPlugin,
                                      TInt aContent,
                                      TInt aIndex )
     {
--- a/idlefw/plugins/devicestatus/src/aicugmcnpublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aicugmcnpublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -18,8 +18,8 @@
 
 #include <aidevstaplgres.rsg>
 #include <StringLoader.h>
+#include <aicontentobserver.h>
 #include "aicugmcnpublisher.h"
-#include "aicontentobserver.h"
 #include "ainetworkinfolistener.h"
 
 // ======== MEMBER FUNCTIONS ========
@@ -117,7 +117,7 @@
 
 
 void CAiCUGMCNPublisher::Subscribe( MAiContentObserver& aObserver, 
-							        MAiPropertyExtension& aExtension,
+							        CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aicugpublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aicugpublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -18,8 +18,8 @@
 
 #include <aidevstaplgres.rsg>
 #include <StringLoader.h>
+#include <aicontentobserver.h>
 #include "aicugpublisher.h"
-#include "aicontentobserver.h"
 #include "ainetworkinfolistener.h"
 
 
@@ -72,7 +72,7 @@
 
 
 void CAiCUGPublisher::Subscribe( MAiContentObserver& aObserver, 
-							        MAiPropertyExtension& aExtension,
+							        CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aidatepublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aidatepublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -21,8 +21,9 @@
 #include <AknUtils.h>
 #include <aidevstaplgres.rsg>
 #include <bacntf.h>
+#include <aicontentobserver.h>
+
 #include "aidatepublisher.h"
-#include "aicontentobserver.h"
 
 const TInt KMaxDateStringLength = 100;
 
@@ -68,7 +69,7 @@
 
 
 void CAiDatePublisher::Subscribe( MAiContentObserver& aObserver, 
-								    MAiPropertyExtension& aExtension,
+								    CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-
+// System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationproxy.h>
 #include <coemain.h>
@@ -23,6 +23,8 @@
 #include <bautils.h>
 #include <aiutility.h>
 #include <featmgr.h>
+
+// User includes
 #include "aidevicestatusplugin.h"
 #include "aidevicestatuspluginengine.h"
 #include "aipublishprioritizer.h"
@@ -31,9 +33,11 @@
 #include "aipluginsettings.h"
 #include "ainetworkinfolistener.h"
 
+// Constants
 _LIT( KResourceDrive, "Z:" );
 _LIT( KResourceFile, "aidevstaplgres.rsc" );
-#define KResourcePath KDC_APP_RESOURCE_DIR
+
+#define KResourcePath KDC_RESOURCE_FILES_DIR
 
 // ECOM implementation table
 const TImplementationProxy KImplementationTable[] =
@@ -43,17 +47,23 @@
 
 
 // ======== MEMBER FUNCTIONS ========
-
-CAiDeviceStatusPlugin::CAiDeviceStatusPlugin() :
-   	iResourceOffset( KErrNotFound )
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::CAiDeviceStatusPlugin
+//
+// ----------------------------------------------------------------------------
+//
+CAiDeviceStatusPlugin::CAiDeviceStatusPlugin() 
+    : iResourceOffset( KErrNotFound )   	
     {
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::ConstructL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPlugin::ConstructL()
-    {
-    iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN; 
-
+    {     
     FeatureManager::InitializeLibL();
     
     // Create master instance to prevent deletion on Stop()
@@ -62,11 +72,17 @@
 	//Create content here since this is needed in optimization phase.
     iContent = AiUtility::CreateContentItemArrayIteratorL( KAiDeviceStatusContent );
     iResources = AiUtility::CreateContentItemArrayIteratorL( KAiDeviceStatusResources );
+    
     iContentObservers = CAiMultiContentObserver::NewL();
+    
     iPrioritizer = CAiPublishPrioritizer::NewL( *iContentObservers, *this );
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::NewL
+//
+// ----------------------------------------------------------------------------
+//
 CAiDeviceStatusPlugin* CAiDeviceStatusPlugin::NewL()
     {
     CAiDeviceStatusPlugin* self = CAiDeviceStatusPlugin::NewLC();
@@ -74,7 +90,11 @@
     return self;
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::NewLC
+//
+// ----------------------------------------------------------------------------
+//
 CAiDeviceStatusPlugin* CAiDeviceStatusPlugin::NewLC()
     {
     CAiDeviceStatusPlugin* self = new( ELeave ) CAiDeviceStatusPlugin;
@@ -83,57 +103,65 @@
     return self;
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::~CAiDeviceStatusPlugin
+//
+// ----------------------------------------------------------------------------
+//
 CAiDeviceStatusPlugin::~CAiDeviceStatusPlugin()
     {
     delete iPrioritizer;
+    
     FreeResources();
+    
     delete iContentObservers;
+    
     Release( iResources );
     Release( iContent );
+    
     FeatureManager::UnInitializeLib();
+    
     if( iListener )
         {
         iListener->Release();
         }
     }
 
-
-/**
- * Allocates all resourcers required for plug-in operation.
- */
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::AllocateResourcesL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPlugin::AllocateResourcesL()
     {
     //create engine
     if( !iEngine )
     	{
-   	    iEngine = CAiDeviceStatusPluginEngine::NewL( *iContentObservers,
-   	                                                    *this,
-   	                                                    *iPrioritizer);
+   	    iEngine = CAiDeviceStatusPluginEngine::NewL( 
+            *iContentObservers, *this, *iPrioritizer );   	                                                      	                                                  
     	}
 
 	if( iResourceOffset < 0 )
 		{
-		CCoeEnv* coe = CCoeEnv::Static();
-
-		if( !coe )
-		    {
-		    User::Leave( KErrNotReady );
-		    }
+		CCoeEnv* coe( CCoeEnv::Static() );
 
-		//Add resource file to cone
-		TFullName resourceFile( KResourceDrive );
-		resourceFile.Append( KResourcePath );
-		resourceFile.Append( KResourceFile );
-		BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), resourceFile );
-		iResourceOffset = coe->AddResourceFileL( resourceFile );
+		if ( coe )
+		    {
+	        //Add resource file to cone
+	        TFullName resourceFile( KResourceDrive );
+	        resourceFile.Append( KResourcePath );
+	        resourceFile.Append( KResourceFile );
+	        BaflUtils::NearestLanguageFile( coe->FsSession(), resourceFile );
+	        iResourceOffset = coe->AddResourceFileL( resourceFile );		    
+		    }
 		}
     }
 
-
-/**
- * Frees all allocated resources.
- */
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::FreeResources
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPlugin::FreeResources()
     {
 	if( iResourceOffset >= 0 )
@@ -153,155 +181,151 @@
 	iEngine = NULL;
     }
 
-
-void CAiDeviceStatusPlugin::Resume(TAiTransitionReason aReason)
-    {
-    if( IgnoreReason( aReason ) )
-        {
-        return;
-        }
-    // resume all publishers only in startup
-    if( iEngine )
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::Start
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::Start( TStartReason aReason )     
+    {    
+    if ( aReason == EPageStartup || aReason == ESystemStartup )
         {
-        if (  aReason == EAiIdleForeground || aReason == EAiKeylockDisabled )
-        	{
-        	// not much can be done if some publisher cannot be refreshed
-        	TRAP_IGNORE( iEngine->RefreshPublishersL( 
-        	                EAiDeviceStatusContentNetworkIdentity, ETrue ) );
-        	
-        	TRAP_IGNORE( iEngine->RefreshPublishersL( 
-        					EAiDeviceStatusContentCUGMCNIndicator, ETrue ) );
-        	}
-        // if layout changed republish some information
-        else if ( aReason == EAiScreenLayoutChanged )
-            {
-            TRAP_IGNORE( iEngine->RefreshPublishersL( EAiDeviceStatusContentDate, ETrue )); 
-            TRAP_IGNORE( iEngine->RefreshPublishersL( EAiDeviceStatusContentCUGMCNIndicator, ETrue ));
-            TRAP_IGNORE( iEngine->RefreshPublishersL( EAiDeviceStatusContentVHZText, ETrue ));
-            TRAP_IGNORE( iEngine->RefreshPublishersL( EAiDeviceStatusContentNetworkIdentity, ETrue ));
-            }
-        return;
-        }
-    // If engine has been deleted. create it again.
-    else
-        {
-        iContentObservers->StartTransaction( KImplUidDevStaPlugin );
-
-        TRAPD( err, DoResumeL(aReason) );
-
-        if( err == KErrNone )
-            {
-            iContentObservers->Commit( KImplUidDevStaPlugin );
-            }
-        else
-            {
-            iContentObservers->CancelTransaction( KImplUidDevStaPlugin );
-            }
+        iRequirePublish = ETrue;
         }
     }
 
-
-void CAiDeviceStatusPlugin::DoResumeL(TAiTransitionReason /*aReason*/)
-    {
-    AllocateResourcesL( );
-    iEngine->ResumePublishersL();
-    iEngine->RefreshPublishersL( EFalse );
-    }
-    
-
-TBool CAiDeviceStatusPlugin::IgnoreReason( TAiTransitionReason aReason )
-    {
-    switch( aReason )
-        {
-        case EAiBacklightOff:
-            return ETrue;
-        }
-    return EFalse;
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::Stop
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::Stop( TStopReason /*aReason*/ )     
+    {    
     }
 
-
-void CAiDeviceStatusPlugin::Stop(TAiTransitionReason /*aReason*/)
-    {
-    FreeResources();
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::Resume
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::Resume( TResumeReason aReason )     
+    {          
+    if ( aReason == EForeground )
+        {
+        if ( iRequirePublish )
+            {
+            TRAP_IGNORE( DoResumeL() );
+            
+            iRequirePublish = EFalse;
+            }          
+        }
     }
-
-
-void CAiDeviceStatusPlugin::Suspend(TAiTransitionReason /*aReason*/)
+  
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::Suspend
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::Suspend( TSuspendReason /*aReason*/ )    
     {
     }
 
-
-void CAiDeviceStatusPlugin::SubscribeL(MAiContentObserver& aObserver)
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::SubscribeL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::SubscribeL( MAiContentObserver& aObserver )
     {
     iContentObservers->AddObserverL( aObserver );
     }
 
-
-TAny* CAiDeviceStatusPlugin::Extension(TUid aUid)
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::ConfigureL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
     {
-	//Access to extensions
-    if( aUid == KExtensionUidProperty )
+	aSettings.ResetAndDestroy();
+	
+	AllocateResourcesL();
+    }
+
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::GetProperty
+//
+// ----------------------------------------------------------------------------
+//
+TAny* CAiDeviceStatusPlugin::GetProperty( TProperty aProperty )     
+    {
+    if ( aProperty == EPublisherContent )
         {
-        return static_cast<MAiPropertyExtension*>(this);
+        return static_cast< MAiContentItemIterator* >( iContent );
+        }
+    else if ( aProperty ==  EPublisherResources )
+        {
+        return static_cast< MAiContentItemIterator* >( iResources );
         }
-
+    else if ( aProperty == EContentRequest )
+        {
+        return static_cast< MAiContentRequest* >( this );
+        }
+    
     return NULL;
     }
 
-
-void CAiDeviceStatusPlugin::ConfigureL(RAiSettingsItemArray& aSettings)
-    {
-	aSettings.ResetAndDestroy();
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::DoResumeL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPlugin::DoResumeL()
+    {    
+    iEngine->ResumePublishersL();
+    iEngine->RefreshPublishersL( EFalse );
     }
 
-TAny* CAiDeviceStatusPlugin::GetPropertyL(TInt aProperty)
-    {
-	//Return properties.
-    switch (aProperty)
-        {
-        case EAiPublisherInfo:
-                return &iInfo;
-
-        case EAiPublisherContent:
-            return static_cast<MAiContentItemIterator*>(iContent);
-
-        case EAiPublisherResources:
-            return static_cast<MAiContentItemIterator*>(iResources);
-
-        case EAiContentRequest:
-            return static_cast<MAiContentRequest*>(this);
-        }
-
-    return NULL;
-    }
-
-void CAiDeviceStatusPlugin::SetPropertyL(TInt aProperty, TAny* aValue)
-    {
-    if( aProperty == EAiPublisherInfo )
-        {
-        ASSERT( aValue );
-        
-        const TAiPublisherInfo* info( 
-                static_cast<const TAiPublisherInfo*>( aValue ) );
-        
-        iInfo = *info;
-        }
-    }
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::RefreshContent
+//
+// ----------------------------------------------------------------------------
+//
 TBool CAiDeviceStatusPlugin::RefreshContent( TInt aContentId )
     {
-    TBool result = EFalse;
+    TBool result( EFalse );
 
     TRAP_IGNORE( result = iEngine->RefreshPublishersL( aContentId, EFalse ) );
+    
     return result;
     }
 
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPlugin::SuspendContent
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiDeviceStatusPlugin::SuspendContent( TInt aContentId )
+    {
+    TBool result( EFalse );
+    
+    TRAP_IGNORE( result = iEngine->SuspendPublishersL( aContentId, EFalse ) );
+    
+    return result;
+    }
 
-/**
- * ECom component entry point.
- */
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+// ======== GLOBAL FUNCTIONS ========
+// ----------------------------------------------------------------------------
+// ImplementationGroupProxy
+//
+// ----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
+    TInt& aTableCount )
     {
-    aTableCount = sizeof(KImplementationTable) / sizeof(TImplementationProxy);
+    aTableCount = sizeof(KImplementationTable) / sizeof( TImplementationProxy );
+
     return KImplementationTable;
     }
+
+// End of file
--- a/idlefw/plugins/devicestatus/src/aidevicestatuspluginengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aidevicestatuspluginengine.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,31 +15,37 @@
 *
 */
 
+// System includes
 
+// User includes
+#include <aicontentobserver.h>
 #include "aidevicestatuspluginengine.h"
 #include "aipublisherfactory.h"
 #include "aidevicestatuspublisher.h"
 
+// ======== MEMBER FUNCTIONS ========
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::CAiDeviceStatusPluginEngine
+//
+// ----------------------------------------------------------------------------
+//
 CAiDeviceStatusPluginEngine::CAiDeviceStatusPluginEngine( 
-                                            MAiContentObserver& aObserver, 
-											MAiPropertyExtension& aExtension,
-                                            MAiPublishPrioritizer& aPrioritizer )
-    : iContentObserver( &aObserver ), 
-        iExtension( &aExtension ), 
-        iPrioritizer( &aPrioritizer )
+    MAiContentObserver& aObserver, CHsContentPublisher& aExtension,
+    MAiPublishPrioritizer& aPrioritizer )
+    : iContentObserver( &aObserver ), iExtension( &aExtension ),          
+      iPrioritizer( &aPrioritizer )
 	{	
 	}
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::ConstructL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPluginEngine::ConstructL()
     {
     // Instantiate all publishers via factory
-    MAiDeviceStatusPublisher* publisher = AiPublisherFactory::CreateProfilePublisherL();
-    CleanupStack::PushL( publisher );
-    AddPublisherL( publisher );
-    CleanupStack::Pop( publisher );
-
-    publisher = AiPublisherFactory::CreateDatePublisherL();
+    MAiDeviceStatusPublisher* publisher = AiPublisherFactory::CreateDatePublisherL();
     CleanupStack::PushL( publisher );
     AddPublisherL( publisher );
     CleanupStack::Pop( publisher );
@@ -90,44 +96,54 @@
     CleanupStack::Pop( publisher );
 
     // Subscribe all publishers once they are instantiated
-    const TInt count = iPublishers.Count();
+    const TInt count( iPublishers.Count() );
 
-    for( TInt i( 0 ); i < count; i++ )
+    for ( TInt i( 0 ); i < count; i++ )
         {
-        iPublishers[i]->Subscribe( *iContentObserver, 
-                                    *iExtension, 
-                                    *iPrioritizer, 
-                                    *this );
+        iPublishers[i]->Subscribe( 
+            *iContentObserver, *iExtension, *iPrioritizer, *this );
         }    
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::NewL
+//
+// ----------------------------------------------------------------------------
+//
 CAiDeviceStatusPluginEngine* CAiDeviceStatusPluginEngine::NewL( 
-                                            MAiContentObserver& aObserver, 
-											MAiPropertyExtension& aExtension,
-                                            MAiPublishPrioritizer& aPrioritizer)
+    MAiContentObserver& aObserver, CHsContentPublisher& aExtension,
+    MAiPublishPrioritizer& aPrioritizer )											                                           
     {
     CAiDeviceStatusPluginEngine* self = 
-    	new( ELeave ) CAiDeviceStatusPluginEngine( aObserver, 
-											        aExtension,
-                                                    aPrioritizer);
+    	new( ELeave ) CAiDeviceStatusPluginEngine( aObserver, aExtension, aPrioritizer ); 
+    	        											                                                          
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
     return self;
     }
 
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::~CAiDeviceStatusPluginEngine
+//
+// ----------------------------------------------------------------------------
+//
 
 CAiDeviceStatusPluginEngine::~CAiDeviceStatusPluginEngine()
     {
     iPublishers.ResetAndDestroy();
     }
 
-
-void CAiDeviceStatusPluginEngine::AddPublisherL( MAiDeviceStatusPublisher* aPublisher )
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::AddPublisherL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiDeviceStatusPluginEngine::AddPublisherL( 
+    MAiDeviceStatusPublisher* aPublisher )
     {
 	//Add publisher to list.
-    if( aPublisher )
+    if ( aPublisher )
         {
         CleanupDeletePushL( aPublisher );
         User::LeaveIfError( iPublishers.Append( aPublisher ) );
@@ -135,25 +151,33 @@
         }
     }
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::ResumePublishersL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPluginEngine::ResumePublishersL()
 	{
-    const TInt count = iPublishers.Count();
+    const TInt count( iPublishers.Count() );
 
-    for( TInt i( 0 ); i < count; i++ )
+    for ( TInt i( 0 ); i < count; i++ )
         {
         iPublishers[i]->ResumeL();
         }    
 	}
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::RefreshPublishersL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiDeviceStatusPluginEngine::RefreshPublishersL( TBool aClean )
 	{
 	iContentObserver->StartTransaction( KImplUidDevStaPlugin );
 
-    const TInt count = iPublishers.Count();
+    const TInt count( iPublishers.Count() );
 
-    for( TInt i( 0 ); i < count; i++ )
+    for ( TInt i( 0 ); i < count; i++ )
         {
         iPublishers[i]->RefreshL( aClean );
         }    
@@ -161,19 +185,23 @@
 	iContentObserver->Commit( KImplUidDevStaPlugin );
 	}
 
-
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::RefreshPublishersL
+//
+// ----------------------------------------------------------------------------
+//
 TBool CAiDeviceStatusPluginEngine::RefreshPublishersL( TInt aContentId, 
-                                                        TBool aClean )
+    TBool aClean )
 	{
-	TBool success = EFalse;
+	TBool success( EFalse );
 	
 	iContentObserver->StartTransaction( KImplUidDevStaPlugin );
 
-    const TInt count = iPublishers.Count();
+    const TInt count( iPublishers.Count() );
 
-    for( TInt i( 0 ); i < count; i++ )
+    for ( TInt i( 0 ); i < count; i++ )
         {
-        if( iPublishers[i]->RefreshL( aContentId, aClean ) )
+        if ( iPublishers[i]->RefreshL( aContentId, aClean ) )
             {
             success = ETrue;
             }
@@ -191,23 +219,54 @@
     return success;
 	}
 
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::SuspendPublishersL
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiDeviceStatusPluginEngine::SuspendPublishersL( TInt aContentId, 
+    TBool aClean )
+    {
+    TBool success( EFalse );
+    
+    const TInt count( iPublishers.Count() );
+    
+    for ( TInt i( 0 ); i < count; i++ )
+        {
+        if ( iPublishers[i]->SuspendL( aContentId, aClean ) )
+            {
+            success = ETrue;
+            }
+        }
+    
+    return success;
+    }
 
+// ----------------------------------------------------------------------------
+// CAiDeviceStatusPluginEngine::RefreshPriorizedPublishersL
+//
+// ----------------------------------------------------------------------------
+//
 TBool CAiDeviceStatusPluginEngine::RefreshPriorizedPublishersL( TInt aContentId,
-                                                                TInt aPriority )
+    TInt aPriority )
 	{
 	iContentObserver->StartTransaction( KImplUidDevStaPlugin );
-	TBool success = EFalse;
-    const TInt count = iPublishers.Count();
+	
+	TBool success( EFalse );
+    
+	const TInt count( iPublishers.Count() );
 
-    for( TInt i( 0 ); i < count; i++ )
+    for ( TInt i( 0 ); i < count; i++ )
         {
-        if( iPublishers[i]->RefreshContentWithPriorityL( aContentId,
-                                                            aPriority ) )
+        MAiDeviceStatusPublisher* publisher( iPublishers[i] );
+        
+        if( publisher->RefreshContentWithPriorityL( aContentId, aPriority ) )                                                                           
             {
             success = ETrue;
             break;
             }
         }
+    
     if ( success )
         {
         iContentObserver->Commit( KImplUidDevStaPlugin );
@@ -216,6 +275,8 @@
         {
         iContentObserver->CancelTransaction( KImplUidDevStaPlugin );
         }
+    
     return success;
 	}
 
+// End of file
--- a/idlefw/plugins/devicestatus/src/aidevstaplg.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-//  INCLUDES
-#include <ecom/registryinfov2.rh>
-
-
-//  RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// ?resource_name
-// 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO registry_info
-{
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    // UID for the DLL
-    dll_uid = 0x102750F7;
-
-    // Interface info array
-    interfaces =
-    {
-        INTERFACE_INFO
-        {
-            // UID of the implemented interface
-            interface_uid = 0x102750ED;
-
-            implementations =
-            {
-                IMPLEMENTATION_INFO
-                {
-                    implementation_uid  =  0x102750F8;
-                    version_no          =  1;
-                    display_name        =  "DeviceStatus";
-                    default_data        =  "";
-                    opaque_data         =  "";
-                    rom_only            =  1;
-                }
-            };
-        }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/devicestatus/src/aidevstaplgres.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Resource definitions for project ?myapp
-*
-*/
-
-
-
-NAME AIDP
-
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.mbg>
-#include <eikon.rh>
-#include <eikcore.rsg>
-
-#include <aidevstaplgres.loc>
-
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF { buf=""; }
-
-// ---------------------------------------------------------------------------
-// ?resource_name
-// 
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_activeidle_time_format
-    {
-    buf = qtn_idle_time_format; 
-    }
-
-RESOURCE TBUF r_activeidle_bt_sim_access_profile_string
-    {
-    buf = qtn_mode_sap;
-    }
-    
-RESOURCE TBUF r_activeidle_cug_indicator_format
-    {
-    buf = qtn_cug_indic_group;
-    }
-
-RESOURCE TBUF r_ai_opn_spn_separator_format
-    {
-    buf = qtn_ai_opn_spn_separator;
-    }
--- a/idlefw/plugins/devicestatus/src/aimcnpublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aimcnpublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,9 +15,8 @@
 *
 */
 
-
+#include <aicontentobserver.h>
 #include "aimcnpublisher.h"
-#include "aicontentobserver.h"
 #include "ainetworkinfolistener.h"
 
 
@@ -61,7 +60,7 @@
 
 
 void CAiMCNPublisher::Subscribe( MAiContentObserver& aObserver, 
-							        MAiPropertyExtension& aExtension,
+							        CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aimulticontentobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aimulticontentobserver.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -16,7 +16,6 @@
 *
 */
 
-
 #include "aimulticontentobserver.h"
 #include "aicontentobserveroptimizer.h"
 
@@ -103,7 +102,7 @@
     }
     
     
-TBool CAiMultiContentObserver::CanPublish( MAiPropertyExtension& aPlugin,
+TBool CAiMultiContentObserver::CanPublish( CHsContentPublisher& aPlugin,
                                            TInt aContent,
                                            TInt aIndex )
     {
@@ -119,7 +118,7 @@
     }
     
     
-TInt CAiMultiContentObserver::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiMultiContentObserver::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        TInt aResource,
                                        TInt aIndex )
@@ -138,7 +137,7 @@
     }
     
     
-TInt CAiMultiContentObserver::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiMultiContentObserver::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        const TDesC16& aText,
                                        TInt aIndex )
@@ -157,7 +156,7 @@
     }
     
     
-TInt CAiMultiContentObserver::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiMultiContentObserver::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        const TDesC8& aBuf,
                                        TInt aIndex )
@@ -176,7 +175,7 @@
     }
     
     
-TInt CAiMultiContentObserver::Publish( MAiPropertyExtension& aPlugin,
+TInt CAiMultiContentObserver::Publish( CHsContentPublisher& aPlugin,
                                        TInt aContent,
                                        RFile& aFile,
                                        TInt aIndex )
@@ -195,7 +194,7 @@
     }
     
     
-TInt CAiMultiContentObserver::Clean( MAiPropertyExtension& aPlugin,
+TInt CAiMultiContentObserver::Clean( CHsContentPublisher& aPlugin,
                                      TInt aContent,
                                      TInt aIndex )
     {
@@ -219,12 +218,12 @@
     }
 
 TBool CAiMultiContentObserver::RequiresSubscription( 
-    const TAiPublisherInfo& /*aPublisherInfo*/ ) const
+    const THsPublisherInfo& /*aPublisherInfo*/ ) const
     {
     return ETrue;
     }
 
-TInt CAiMultiContentObserver::SetProperty( MAiPropertyExtension& /*aPlugin*/,
+TInt CAiMultiContentObserver::SetProperty( CHsContentPublisher& /*aPlugin*/,
            const TDesC8& /*aElementId*/,
            const TDesC8& /*aPropertyName*/,
            const TDesC8& /*aPropertyValue*/ )
@@ -232,7 +231,7 @@
         return KErrNotSupported;
     }
    
-TInt CAiMultiContentObserver::SetProperty( MAiPropertyExtension& /*aPlugin*/,
+TInt CAiMultiContentObserver::SetProperty( CHsContentPublisher& /*aPlugin*/,
            const TDesC8& /*aElementId*/,
            const TDesC8& /*aPropertyName*/,
            const TDesC8& /*aPropertyValue*/,  
--- a/idlefw/plugins/devicestatus/src/ainwspublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/ainwspublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -17,7 +17,7 @@
 
 
 #include "ainwspublisher.h"
-#include "aicontentobserver.h"
+#include <aicontentobserver.h>
 #include "ainetworkinfolistener.h"
 
 #include <activeidle2domainpskeys.h>
@@ -73,7 +73,7 @@
 
 
 void CAiNwsPublisher::Subscribe( MAiContentObserver& aObserver,
-								    MAiPropertyExtension& aExtension,
+								    CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aioperatorlogopublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aioperatorlogopublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -127,16 +127,23 @@
 							const TBool aShowOpInd )
     {
     __PRINT(__DBG_FORMAT("CAiOperatorLogoPublisher:: HandleNetworkInfoChange >> aShowOpInd %d "), aShowOpInd);
-        if( aShowOpInd )
-        	{
-        	TRAP_IGNORE(UpdateOperatorLogoL( ETrue ));
-        	}
-        else
-        	{
-        	TRAP_IGNORE (iPrioritizer->TryToCleanL( *iBroadcaster,
-            							EAiDeviceStatusContentNetworkIdentity,
-            							iPriority ));
-        	}
+
+    if ( iSuspended )
+        {
+        __PRINTS("CAiOperatorLogoPublisher:: HandleNetworkInfoChange - suspended <<");
+        return;
+        }
+    
+    if( aShowOpInd )
+        {
+        TRAP_IGNORE( UpdateOperatorLogoL( ETrue ) );
+        }
+    else
+        {
+        TRAP_IGNORE (iPrioritizer->TryToCleanL( *iBroadcaster,
+                                    EAiDeviceStatusContentNetworkIdentity,
+                                    iPriority ));
+        }
         
     __PRINTS("CAiOperatorLogoPublisher:: HandleNetworkInfoChange <<");
     }
@@ -154,7 +161,7 @@
 	
 	
 void CAiOperatorLogoPublisher::Subscribe( MAiContentObserver& aObserver, 
-									        MAiPropertyExtension& aExtension,
+									        CHsContentPublisher& aExtension,
                                             MAiPublishPrioritizer& aPrioritizer,
                                             MAiPublisherBroadcaster& aBroadcaster )
     {
@@ -172,7 +179,6 @@
     __PRINTS("CAiOperatorLogoPublisher:: RefresL << ");
     }
 
-
 CFbsBitmap* CAiOperatorLogoPublisher::LoadLogoL( TInt aMCC, 
                                                  TInt aMNC )
     {
@@ -233,6 +239,15 @@
     {
     __PRINT(__DBG_FORMAT("CAiOperatorLogoPublisher:: UpdateOperatorLogoL >> aClean %d"), aClean);
     iSuccess = EFalse;
+    
+    if ( iSuspended )
+        {
+        // EAiDeviceStatusContentNetworkIdentity is suspended
+        
+        __PRINTS("CAiOperatorLogoPublisher:: UpdateOperatorLogoL - suspended <<");
+        return;
+        }
+    
     if( aClean )
         {
         iPrioritizer->TryToCleanL( *iBroadcaster,
@@ -493,10 +508,11 @@
 
 
 TBool CAiOperatorLogoPublisher::RefreshL( TInt aContentId, TBool aClean )
-	{
-	
-    if(aContentId == EAiDeviceStatusContentNetworkIdentity )
+	{	
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
         {
+        iSuspended = EFalse;
+        
         __PRINTS("CAiOperatorLogoPublisher:: RefreshL >> ");
    	    RefreshL( aClean );
    	    if( iSuccess )
@@ -506,9 +522,21 @@
    	        }   
    	    __PRINTS("CAiOperatorLogoPublisher:: RefreshL << failed ");	    
     	}    	
+    
     return EFalse;
 	}
 
+TBool CAiOperatorLogoPublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
+    {
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
+        {
+        iSuspended = ETrue;
+        
+        return ETrue;
+        }
+    
+    return EFalse;
+    }
 
 TInt CAiOperatorLogoPublisher::HandleOperatorLogoUpdateL( TAny *aPtr )
 	{
--- a/idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -20,6 +20,7 @@
 #include <centralrepository.h>
 #include <avkondomainpskeys.h>
 #include <e32property.h>
+
 #include <aidevstaplgres.rsg>
 #include "aioperatornamepublisher.h"
 #include "ainetworkinfolistener.h"
@@ -113,23 +114,27 @@
                 const TNWInfo& /*aInfo*/,
                 const TBool aShowOpInd )
     {
-        if( aShowOpInd )
-        	{
-        	TRAP_IGNORE  ( RefreshL( ETrue ));
-        	}
-        else
-        	{
-        	TRAP_IGNORE (
-        		iPrioritizer->TryToCleanL( *iBroadcaster,
-            							EAiDeviceStatusContentNetworkIdentity,
-            							iPriority ));
-        	}
-        
+    if ( iSuspended )
+        {
+        return;
+        }
+    
+    if( aShowOpInd )
+        {
+        TRAP_IGNORE  ( RefreshL( ETrue ));
+        }
+    else
+        {
+        TRAP_IGNORE (
+            iPrioritizer->TryToCleanL( *iBroadcaster,
+                                    EAiDeviceStatusContentNetworkIdentity,
+                                    iPriority ));
+        }    
     }
 
 
 void CAiOperatorNamePublisher::Subscribe( MAiContentObserver& /*aObserver*/,
-									                MAiPropertyExtension& aExtension,
+									                CHsContentPublisher& aExtension,
                                                     MAiPublishPrioritizer& aPrioritizer,
                                                     MAiPublisherBroadcaster& aBroadcaster )
     {
@@ -143,6 +148,11 @@
     {
     iSuccess = EFalse;
 
+    if ( iSuspended )
+        {
+        return;
+        }
+    
     if( aClean )
         {
         iPrioritizer->TryToCleanL( *iBroadcaster,
@@ -610,10 +620,13 @@
 
 TBool CAiOperatorNamePublisher::RefreshL( TInt aContentId, TBool aClean )
 	{
-    if( aContentId == EAiDeviceStatusContentNetworkIdentity )
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
         {
+        iSuspended = EFalse;
+        
    	    RefreshL( aClean );
-   	    if( iSuccess )
+   	    
+   	    if ( iSuccess )
    	        {
    	        return ETrue;
    	        }
@@ -622,6 +635,17 @@
     return EFalse;
 	}
 
+TBool CAiOperatorNamePublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
+    {
+    if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
+        {
+        iSuspended = ETrue;
+        
+        return ETrue;
+        }
+
+    return EFalse;    
+    }
 
 TBool CAiOperatorNamePublisher::RefreshContentWithPriorityL(
                                             TInt aContentId,
--- a/idlefw/plugins/devicestatus/src/aipublisherfactory.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aipublisherfactory.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -19,7 +19,6 @@
 #include "aipublisherfactory.h"
 
 // Publishers
-#include "aiprofilepublisher.h"
 #include "aidatepublisher.h"
 #include "aioperatorlogopublisher.h"
 #include "aioperatornamepublisher.h"
@@ -54,14 +53,6 @@
         }
     };
 
-
-MAiDeviceStatusPublisher* AiPublisherFactory::CreateProfilePublisherL()
-    {
-    TPublisherFactory<CAiProfilePublisher> factory;
-    return factory.CreatePublisherL();
-    }
-
-
 MAiDeviceStatusPublisher* AiPublisherFactory::CreateDatePublisherL()
     {
     TPublisherFactory<CAiDatePublisher> factory;
--- a/idlefw/plugins/devicestatus/src/aipublishprioritizer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aipublishprioritizer.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -20,14 +20,14 @@
 #include "ainwidpriorities.h"
 #include "aidevicestatuscontentmodel.h"
 #include <aicontentrequest.h>
-#include "aipropertyextension.h"
+
 #include "aipublisherbroadcaster.h"
 #include "debug.h"
 
 
 CAiPublishPrioritizer::CAiPublishPrioritizer( 
                                         MAiContentObserver& aContentObserver,
-                                        MAiPropertyExtension& aPropertyExtension )
+                                        CHsContentPublisher& aPropertyExtension )
     : iContentObserver( aContentObserver ),
         iPropertyExtension( aPropertyExtension ),
         iPriority( EAiInvalidPriority )
@@ -37,7 +37,7 @@
 
 CAiPublishPrioritizer* CAiPublishPrioritizer::NewL( 
                                         MAiContentObserver& aContentObserver,
-                                        MAiPropertyExtension& aPropertyExtension )
+                                        CHsContentPublisher& aPropertyExtension )
     {
     return new( ELeave ) CAiPublishPrioritizer( aContentObserver, 
                                                 aPropertyExtension );
--- a/idlefw/plugins/devicestatus/src/aisimregpublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aisimregpublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -17,7 +17,7 @@
 
 
 #include "aisimregpublisher.h"
-#include "aicontentobserver.h"
+#include <aicontentobserver.h>
 #include "ainetworkinfolistener.h"
 #include <activeidle2domainpskeys.h>
 #include <e32property.h>
@@ -80,7 +80,7 @@
 
 
 void CAiSimRegPublisher::Subscribe( MAiContentObserver& aObserver,
-								    MAiPropertyExtension& aExtension,
+								    CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/devicestatus/src/aivhzpublisher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aivhzpublisher.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -19,7 +19,7 @@
 #include <centralrepository.h>
 #include "activeidle2domaincrkeys.h"
 #include "aivhzpublisher.h"
-#include "aicontentobserver.h"
+#include <aicontentobserver.h>
 #include "ainetworkinfolistener.h"
 
 
@@ -74,7 +74,7 @@
 
 
 void CAiVHZPublisher::Subscribe( MAiContentObserver& aObserver, 
-							        MAiPropertyExtension& aExtension,
+							        CHsContentPublisher& aExtension,
                                     MAiPublishPrioritizer& /*aPrioritizer*/,
                                     MAiPublisherBroadcaster& /*aBroadcaster*/ )
     {
--- a/idlefw/plugins/group/aidevstaplg.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include        <platform_paths.hrh>
-#include        <data_caging_paths.hrh>
-
-TARGET          aidevstaplg.dll
-TARGETTYPE      PLUGIN
-UID             0x10009D8D 0x102750F7
-VENDORID        VID_DEFAULT
-CAPABILITY      CAP_ECOM_PLUGIN
-
-SOURCEPATH      ../devicestatus/src
-SOURCE          aidevicestatusplugin.cpp
-SOURCE          aidevicestatuspluginengine.cpp
-SOURCE          aimulticontentobserver.cpp
-SOURCE          aiprofilepublisher.cpp
-SOURCE          aidatepublisher.cpp
-SOURCE          aipublisherfactory.cpp
-SOURCE          ainetworkinfolistener.cpp
-SOURCE          aioperatornamepublisher.cpp
-SOURCE          aibtsappublisher.cpp
-SOURCE          aisimregpublisher.cpp
-SOURCE          aimcnpublisher.cpp
-SOURCE          aicugpublisher.cpp
-SOURCE		      aicugmcnpublisher.cpp
-SOURCE          aivhzpublisher.cpp
-SOURCE          aipublishprioritizer.cpp 
-SOURCE          aicontentobserveroptimizer.cpp 
-SOURCE          aioperatorlogopublisher.cpp
-SOURCE          ainwspublisher.cpp
-
-START RESOURCE  aidevstaplg.rss
-TARGET          aidevstaplg.rsc
-END
-
-START RESOURCE  aidevstaplgres.rss
-HEADER
-TARGET          aidevstaplgres.rsc
-TARGETPATH      APP_RESOURCE_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE     .
-
-USERINCLUDE     ../devicestatus/inc
-USERINCLUDE     ../devicestatus/loc
-USERINCLUDE     ../../inc/common
-USERINCLUDE     ../../cenrep
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY         euser.lib
-LIBRARY         ecom.lib
-LIBRARY         avkon.lib
-LIBRARY         sssettings.lib
-LIBRARY         profileeng.lib
-LIBRARY         networkhandling.lib
-LIBRARY         phoneclient.lib
-LIBRARY         fbscli.lib
-LIBRARY         cone.lib
-LIBRARY         commonengine.lib 
-LIBRARY         featmgr.lib
-LIBRARY         centralrepository.lib
-LIBRARY         cenrepnotifhandler.lib
-LIBRARY         egul.lib
-LIBRARY         aknlayout2scalable.lib
-LIBRARY         cdlengine.lib
-LIBRARY         gdi.lib
-LIBRARY         bitgdi.lib
-LIBRARY         aiutils.lib
-LIBRARY         flogger.lib
-LIBRARY         bafl.lib
-
--- a/idlefw/plugins/group/aiwsplugin.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This is project specification for idle window server plug-
-*                in. The plug-in provides service for routing of numeric key
-*                events to Phone application and activation of key lock.
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET          aiwsplugin.dll
-TARGETTYPE      ANI
-UID             0x10003B22 0x10207206
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-USERINCLUDE     ../wsplugin/inc
-USERINCLUDE     ../../inc/common
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH      ../wsplugin/src
-SOURCE			aiwspluginanimdll.cpp
-SOURCE			aiwspluginanim.cpp
-SOURCE          modifierkeytracker.cpp
-SOURCE          keylockhandler.cpp
-SOURCE          keylockstates.cpp
-SOURCE          keypadsettings.cpp
-SOURCE          numerickeyhandler.cpp
-SOURCE          logslaunchhandler.cpp
-SOURCE          sindlaunchhandler.cpp
-SOURCE          keyhandlertimer.cpp
-SOURCE          panic.cpp
-
-
-LIBRARY         euser.lib
-LIBRARY         cone.lib
-LIBRARY			ws32.lib
-LIBRARY			apgrfx.lib
-LIBRARY			centralrepository.lib
-LIBRARY			flogger.lib
-
-LIBRARY			featmgr.lib
-LIBRARY         cenrepnotifhandler.lib
-LIBRARY         ptiengine.lib
-LIBRARY         keylockpolicyapi.lib
-
-LIBRARY			aiutils.lib
-
-// End of File
--- a/idlefw/plugins/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Bld.inf for all plugins under ActiveIdle2 project.
+* Description:  Bld.inf for all plugins under idlefw project.
 *
 */
 
@@ -22,20 +22,17 @@
 DEFAULT
 
 PRJ_MMPFILES
-aidevstaplg.mmp
-aiwsplugin.mmp
 
 PRJ_EXPORTS
-../wsplugin/rom/aiwsplugin.iby        CORE_MW_LAYER_IBY_EXPORT_PATH(aiwsplugin.iby)
 
 // Include bld.inf-files of new plugins here
 
-#include "../shortcutplugin/group/bld.inf"
-//#include "../pslnactiveidleplugin/group/bld.inf"
+#include "../devicestatus/group/bld.inf"
 #include "../profileplugin/group/bld.inf"
 #include "../sapidataplugin/group/bld.inf"
 #include "../wrtdataplugin/group/bld.inf"
 #include "../mcsplugin/group/bld.inf"
+#include "../wsplugin/group/bld.inf"
 
 #endif // RD_CUSTOMIZABLE_AI
 
--- a/idlefw/plugins/mcsplugin/data/mcsplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/data/mcsplugin.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -18,6 +18,7 @@
 
 // INCLUDES
 #include <ecom/registryinfov2.rh>
+#include <hscontentpublisheruid.hrh>
 #include "mcspluginuids.hrh"
 
 
@@ -41,7 +42,7 @@
         INTERFACE_INFO
         {
             // UID of interface that is implemented
-            interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
+            interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
 
             implementations = 
             {
--- a/idlefw/plugins/mcsplugin/data/mcspluginres.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/data/mcspluginres.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -42,7 +42,8 @@
 
 //----------------------------------------------------
 // R_MCS_DISABLE_OPEN_ITEM
-// Contains application information.
+// Dialog text: Item cannot be run because of backup
+// state
 //----------------------------------------------------
 //
 RESOURCE TBUF r_mcs_disable_open_item
@@ -51,6 +52,18 @@
 }
 
 //----------------------------------------------------
+// R_MCS_DISABLE_OPEN_ITEM_MISSING
+// Dialog text: Item cannot be opened because of it is
+// missing
+//----------------------------------------------------
+//
+RESOURCE TBUF r_mcs_disable_open_item_missing
+{
+    buf = qtn_mcs_disable_open_item_missing;
+}
+
+
+//----------------------------------------------------
 // R_MCS_DISABLE_OPEN_ITEM_DLG
 // Contains application information.
 //----------------------------------------------------
--- a/idlefw/plugins/mcsplugin/data/mcspluginuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/data/mcspluginuids.hrh	Fri Feb 19 23:07:29 2010 +0200
@@ -19,8 +19,6 @@
 #ifndef MCSPLUGINUIDS_HRH
 #define MCSPLUGINUIDS_HRH
 
-#include <platform/mw/aicontentpublisheruid.hrh>
-
 /**
  * Ecom dll uid for MCS plug-in.
  */
--- a/idlefw/plugins/mcsplugin/group/mcsplugin.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/group/mcsplugin.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -41,15 +41,15 @@
 
 APP_LAYER_SYSTEMINCLUDE
 
-SOURCEPATH            ../data
-START RESOURCE          mcsplugin.rss
-TARGET                  mcsplugin.rsc
+SOURCEPATH      ../data
+START RESOURCE  mcsplugin.rss
+TARGET          mcsplugin.rsc
 END
 
-START RESOURCE          mcspluginres.rss
+START RESOURCE  mcspluginres.rss
 HEADER
-TARGET                  mcspluginres.rsc
-TARGETPATH              RESOURCE_FILES_DIR
+TARGET          mcspluginres.rsc
+TARGETPATH      RESOURCE_FILES_DIR
 LANGUAGE_IDS
 END
 LIBRARY         euser.lib
@@ -77,10 +77,7 @@
 LIBRARY         gslauncher.lib
 LIBRARY         eikdlg.lib
 LIBRARY         commonengine.lib 
-LIBRARY         favouritesengine.lib
 
 LIBRARY         gfxtrans.lib 
-LIBRARY         centralrepository.lib
-
 
 // End of File
--- a/idlefw/plugins/mcsplugin/group/mcspluginhandler.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/group/mcspluginhandler.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -45,6 +45,7 @@
 LIBRARY         viewcli.lib
 LIBRARY         apparc.lib
 LIBRARY         apgrfx.lib
+LIBRARY         msgs.lib
 
 SOURCEPATH      ../data
 START RESOURCE  mcspluginhandler.rss
--- a/idlefw/plugins/mcsplugin/handler/inc/mcspluginhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/handler/inc/mcspluginhandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -20,8 +20,10 @@
 
 #include <mcsmenuhandlerplugin.h>
 
+
 #include <e32base.h>
 #include <viewcli.h> // For CVwsSessionWrapper
+#include <msvapi.h>  // For MMsvSessionObserver
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <viewclipartner.h>
 #endif
@@ -31,6 +33,7 @@
 
 class CEikonEnv;
 class CVwsSessionWrapper;
+class CMsvSession;
 
 /**
  *  @ingroup group_mcsplugin
@@ -39,7 +42,7 @@
  *
  *  @since S60 9.1
 */
-NONSHARABLE_CLASS( CMCSPluginHandler ): public CMenuHandlerPlugin
+NONSHARABLE_CLASS( CMCSPluginHandler ): public CMenuHandlerPlugin, public MMsvSessionObserver
     {
 
 public:     // construction
@@ -92,10 +95,29 @@
         const TDesC8& aCommand,
         const TDesC8& aParams,
         TRequestStatus& aStatus );
-        
+
+public:     // from MMsvSessionObserver
+
+    /**
+     * Handles an event from the message server.
+     * Not used, but must be defined to be able to use the messaging server.
+     *
+     * @since S60 v3.2
+     * @param aEvent Indicates the event type.
+     * @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 );
+
+    
+    
 private:    // internal
 
     void LaunchShortcutL( CMenuItem& aItem );
+    
+    TInt GetEmailAccountCountL();
 
 private:    // data
     
@@ -107,6 +129,12 @@
      */
     CVwsSessionWrapper* iVwsSession;
 
+    /**
+     * Message server session
+     * Own.
+     */
+    CMsvSession* iMsvSession;
+
     };
 
 #endif // __MCSPLUGINHANDLER_H__
--- a/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,36 +15,38 @@
 *
 */
 
+// System includes
 #include <ecom/implementationproxy.h>
 #include <eikenv.h>
 #include <sendui.h>
 #include <SendUiConsts.h>
-
-#include <mcsmenuutils.h>
-#include <mcsmenuitem.h>
-
 #include <viewcli.h>                // For CVwsSessionWrapper
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <viewclipartner.h>
 #endif
 
 #include <vwsdef.h>                 // For TVwsViewId
+#include <mcsmenuutils.h>
+#include <mcsmenuitem.h>
 #include <mcspluginparamval.h>
 #include <LogsUiCmdStarter.h>
 
+// User includes
 #include "mcsplugincompletedoperation.h"
 #include "mcspluginhandler.h"
 #include "mcspluginuids.hrh"
 
-#include "aiscutdefs.h"
-class CVwsSessionWrapper;
-
+// Constants
 _LIT( KMenuTypeShortcut, "menu:shortcut" ); ///< Menu folder type.
 _LIT( KMenuAttrParamLogs, "logs:dialed" );
 
 /** Argument value for parameter*/
 _LIT( KMenuAttrParam, "param" );
 
+#define KMCSCmailUidValue 0x2001E277
+#define KMCSCmailMailboxViewIdValue 0x2
+#define KMCSCmailMtmUidValue 0x2001F406
+
 const TInt KImplUidMCSPluginHandler = AI_UID_ECOM_IMPLEMENTATION_MCSPLUGIN_HANDLER;
 
 const TImplementationProxy ImplementationTable[] = 
@@ -61,6 +63,7 @@
 CMCSPluginHandler::~CMCSPluginHandler()
     {
     delete iVwsSession;
+    delete iMsvSession;
     }
 
 // ---------------------------------------------------------
@@ -94,6 +97,7 @@
     {
     BaseConstructL();
     iVwsSession = CVwsSessionWrapper::NewL();
+    iMsvSession = CMsvSession::OpenAsObserverL(*this);
     }
 
 // ---------------------------------------------------------
@@ -150,6 +154,20 @@
     return NULL;
     }
 
+// ---------------------------------------------------------------------------
+// From class MMsvSessionObserver.
+// Handles an event from the message server.
+// ---------------------------------------------------------------------------
+//
+void CMCSPluginHandler::HandleSessionEventL(
+          TMsvSessionEvent /*aEvent*/, 
+          TAny* /*aArg1*/, 
+          TAny* /*aArg2*/,
+          TAny* /*aArg3*/ )
+    {
+    // No event handling
+    }
+
 // ---------------------------------------------------------
 // Handles menu:shortcut specific commands
 // Must be extended to launch e.g. MailBoxes
@@ -187,7 +205,15 @@
         }
     else if ( param == KParamValueEmail ) // New email
         {
-        sendUi->CreateAndSendMessageL( KSenduiMtmSmtpUid, NULL, KNullUid, EFalse );
+        if ( GetEmailAccountCountL() > 0 )
+            {
+            sendUi->CreateAndSendMessageL( KSenduiMtmSmtpUid, NULL, KNullUid, EFalse );
+            }
+        else
+            {
+            iVwsSession->StartApp( TUid::Uid( KMCSCmailUidValue ) );
+            }
+
         }
 #ifdef __SYNCML_DS_EMAIL
     else if ( param == KParamValueSyncMLMail ) // New SyncML mail
@@ -215,7 +241,7 @@
             TLex16 lextmp( mailboxId );
             lextmp.Val( number );
             TUid uId = TUid::Uid( number );
-            const TVwsViewId viewId( KScutMessagingUid, KScutRemoteMailboxViewId );
+            const TVwsViewId viewId( TUid::Uid( KMCSCmailUidValue ), TUid::Uid( KMCSCmailMailboxViewIdValue ) );
             iVwsSession->CreateActivateViewEvent( viewId, uId, KNullDesC8() );
             }
         }
@@ -226,6 +252,37 @@
     CleanupStack::PopAndDestroy( sendUi );
     }
 
+// ---------------------------------------------------------------------------
+// Returns count of Email accounts
+// ---------------------------------------------------------------------------
+//
+TInt CMCSPluginHandler::GetEmailAccountCountL()
+    {
+    CMsvEntry* rootEntry = iMsvSession->GetEntryL( KMsvRootIndexEntryIdValue );
+    CleanupStack::PushL(rootEntry);
+    
+    TInt cnt = rootEntry->Count();
+    if ( cnt > 0 )
+        {
+        cnt = 0;
+        rootEntry->SetSortTypeL( TMsvSelectionOrdering( 
+            KMsvGroupByType | KMsvGroupByStandardFolders, 
+            EMsvSortByDetailsReverse, ETrue ) );
+    
+        for ( TInt i = rootEntry->Count(); --i >= 0; )
+            {
+            const TMsvEntry& tentry = (*rootEntry)[i];
+    
+            if (tentry.iMtm.iUid == KMCSCmailMtmUidValue )
+                {
+                cnt++;
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy(rootEntry);
+    return cnt;
+    }
+
 // ============================ GLOBAL FUNCTIONS ===============================
 
 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
--- a/idlefw/plugins/mcsplugin/loc/mcsplugin.loc	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/loc/mcsplugin.loc	Fri Feb 19 23:07:29 2010 +0200
@@ -23,4 +23,12 @@
 //
 #define qtn_mcs_disable_open_item "Application cannot be opened during backup"
 
+// d: A dialog which is shown to user when (s)he is trying to 
+// d: launch shortcut item which is missing from menu.
+// l: popup_note_window
+// w:
+// r: tb9.2
+//
+#define qtn_mcs_disable_open_item_missing "Shortcut cannot be opened because item is missing. Try to insert memory card which contains the item or reinstall the application."
+
 //End file
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,277 +19,137 @@
 #ifndef CMCSPLUGIN_H
 #define CMCSPLUGIN_H
 
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
+// System includes
+
+// User includes
+#include <hscontentpublisher.h>
 #include <aicontentmodel.h>
-#include <aieventhandlerextension.h>
-#include <centralrepository.h>
-#include "mcspluginwatcher.h"
 
+// Forward declarations
 class MAiContentObserver;
 class MAiContentItemIterator;
 class CMCSPluginEngine;
 class TMCSData;
-//class CMCSPluginData;
-
-//class RAiSettingsItemArray;
 
 /**
- *  @ingroup group_mcsplugin
+ * @ingroup group_mcsplugin
  *
- *  Plug-in main class
+ * MCS Plug-in main class
  *
- *  @since S60 v3.2
+ * @since S60 5.2
  */
-class CMCSPlugin : public CAiContentPublisher,
-                   public MAiPropertyExtension,
-                   public MAiEventHandlerExtension,
-                   public MMCSPluginWatcherObserver
+NONSHARABLE_CLASS( CMCSPlugin ) : public CHsContentPublisher    
+    {
+public:
+    // constructor and destructor
 
-
-    {
-
-public:
-
-    /**
-    * Part of the two phased constuction
-    *
-    * @param none
-    * @return none
-    */
     static CMCSPlugin* NewL();
 
+    ~CMCSPlugin();
+
+private:
+    // constructors
+    
     /**
-     * CompareItems
-     * 
-     * @param aFirst
-     * @param aSecond
-     */
-    static TInt CompareItems(const MAiPluginSettings& aFirst,
-        const MAiPluginSettings& aSecond );
-    /**
-    * Constructor
-    *
-    * @param none
-    * @return none
+    * C++ default constructor
     */
     CMCSPlugin();
-    
-    /**
-    * Destructor
-    *
-    * @param none
-    * @return none
-    */
-    ~CMCSPlugin();
-    
-    /**
-    * Publishes profile names
-    *
-    * @param void
-    * @return void
-    */
-    void PublishL();
 
     /**
-    * From base class MMCSPluginWatcherObserver
-    * .a method for Skin UID cenrep key change handeling
+    * 2nd phase constructor
     */
-    void HandleNotifyL();
-
-// from base class CAiContentPublisher
+    void ConstructL();
+    
+public:
+    // from CHsContentPublisher
   
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to request the plug-in free all
-    * memory and CPU resources and close all its open files, e.g. the plug-in 
-    * should unload its engines due backup operation. The method transits the 
-    * plug-in to "Idle" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Stop( TAiTransitionReason aReason );
+     * @see CHsContentPublisher
+     */
+    void Start( TStartReason aReason );
 
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * allowed to consume CPU resources, e.g plug-in is able to run timers,
-    * perform asynchronous operations, etc. The method transits the plug-in
-    * to "Alive" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Resume( TAiTransitionReason aReason );
+     * @see CHsContentPublisher
+     */
+    void Stop( TStopReason aReason );
 
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * not allowed to consume CPU resources, e.g plug-in MUST stop each
-    * timers, cancel outstanding asynchronous operations, etc. The method
-    * transits the plug-in to "Suspendend" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Suspend( TAiTransitionReason aReason );
+     * @see CHsContentPublisher
+     */    
+    void Resume( TResumeReason aReason );
 
     /**
-    * From CAiContentPublisher
-    * Adds the content observer / subscriber to plug-in. The plug-in MUST
-    * maintain a registry of subscribers and send notification to all them
-    * whenever the plug-in changes state or new content available.
-    *
-    * @param aObserver content observer to register.
-    * @return void
-    */
-    void SubscribeL( MAiContentObserver& aObserver );
-    
+     * @see CHsContentPublisher
+     */    
+    void Suspend( TSuspendReason aReason );
+
     /**
-    * From CAiContentPublisher
-    * Configures the plug-in.
-    * Plug-ins take ownership of the settings array, so it must either
-    * store it in a member or free it. Framework has put the array in cleanup
-    * stack so the plugin shouldn't do that.
-    * If this leaves, the plug-in will be destroyed by AI FW.
-    * Plug-in must support LaunchByValue-event even if normal shortcuts don't
-    * work. The only allowed serious enough leave is KErrNotFound from CenRep.
-    *
-    * @param aSettings setting items defined in the UI definition.
-    * @return void
-    */
+     * @see CHsContentPublisher
+     */    
+    void SubscribeL( MAiContentObserver& aObserver );
+
+    /**
+     * @see CHsContentPublisher
+     */    
     void ConfigureL( RAiSettingsItemArray& aSettings );
 
     /**
-    * From CAiContentPublisher
-    * Returns interface extension. In Series 60 3.1 only event & property
-    * extensions are supported. See MAiEventExtension & MAiPropertyExtension
-    * interfaces.
-    *
-    * @param  aUid - UID of the extension interface to access.
-    * @return the extension interface. Actual type depends on the passed aUid 
-    *         argument.
-    */
-    TAny* Extension( TUid aUid );  
-
-// from base class MAiPropertyExtension
+     * @see CHsContentPublisher
+     */    
+    TAny* GetProperty( TProperty aProperty );
 
     /**
-    * From MAiPropertyExtension.
-    * Read property of publisher plug-in.
-    *
-    * @param aProperty - identification of property.
-    * @return pointer to property value.
-    */
-    TAny* GetPropertyL( TInt aProperty );
+     * @see CHsContentPublisher
+     */   
+    void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
+    
+public:
+    // new functions
 
     /**
-    * From MAiPropertyExtension.
-    * Write property value.
-    *
-    * @param aProperty - identification of property.
-    * @param aValue - contains pointer to property value.
+    * Publishes data
     */
-    void SetPropertyL( TInt aProperty, TAny* aValue );
-  
- // from base class MAiEventHandlerExtension
-   
-     /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     *
-     * @param aEvent - unique identifier of event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where <event name> is mapped by the framework to unique
-     *        identifier supplied in aEvent, <event params> are provided to
-     *        plug-in as-is in the descriptor.
-     * @since S60 3.2
-     */
-    void HandleEvent(TInt aEvent, const TDesC& aParam);
+    void PublishL();
+    
+private:
+    // new functions
     
     /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     *
-     * @param aEventName - name of the event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where  <event name> mapping to unique identifier supplied by event 
-     *        is failed by the frame work then the  <event name> and  
-     *        <event params>  are provided to plug-in as-is in the descriptor.
+     * CompareItems
      */
-     void HandleEvent(const TDesC& aEventName, const TDesC& aParam);
-
-protected:
-
-private:
-
-    /**
-    * Part of the two phased construction
-    *
-    * @param void
-    * @return void
-    */
-    void ConstructL();
-    
-    /**
-    * Resume the plug-in.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */    
-    void DoResumeL(TAiTransitionReason aReason);
-    
+    static TInt CompareItems( const MAiPluginSettings& aFirst,
+        const MAiPluginSettings& aSecond );
+          
     /**
      * Publishes content for one menu item
      */
     void PublishLItemL( MAiContentObserver& aObserver, TMCSData& aDataItem, TInt aIndex );
         
     /**
-    * Free the engine
-    *
-    * @param void
-    * @return void
-    */  
-    void FreeEngine();
-
-    /**
     * Delete content model
     */  
     void DeleteContentModel();    
     
-private: // data
-
-    // Iterator for plugin content
-    // Own
-    MAiContentItemIterator* iContent;
-
-    // Number of data in the content model.
-    TInt iDataCount;
-
-    // Dynamic content model
-    // Own.
-    TAiContentItem* iContentModel;
+    /**
+     * Determines if dirty items exists
+     */
+    TBool PublishRequired() const; 
+    
+private: 
+    // data
 
-    // Plugin engine
-    // Own
+    /** Iterator for plugin content, owned */    
+    MAiContentItemIterator* iContent;
+    /** Number of data in the content model */
+    TInt iDataCount;
+    /** Dynamic content model, owned */    
+    TAiContentItem* iContentModel;
+    /** Plugin engine, owned */    
     CMCSPluginEngine* iEngine;
-
-    // Array of content observers
-    // not own
+    /** Array of content observers, not owned */    
     RPointerArray<MAiContentObserver> iObservers;
-
-    // Information about the content publisher (this plug-in)
-    TAiPublisherInfo iInfo;
-
-    // For accessing central repository keys
-    CRepository* iRepository;
-
-    // For observing central repository Skin UID key change 
-    CMCSPluginWatcher* iRepositoryWatcher;
-
     };
 
 #endif // CMCSPLUGIN_H
+
+// End of file
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,43 +19,35 @@
 #ifndef CMCSPLUGINENGINE_H
 #define CMCSPLUGINENGINE_H
 
-// INCLUDE FILES
+// System includes
 #include <e32base.h>
 #include <mcsmenu.h>
 #include <mcsmenunotifier.h>
-#include <favouritesdbobserver.h>   // For MFavouritesDbObserver
-#include <favouritesdb.h>           // For RFavouritesDb
-#include <msvapi.h>                 // For MMsvSessionObserver
+#include <mcsmenuitem.h>
+#include <msvapi.h>
 
+// User includes
 #include "mcspluginwatcher.h"
 
+// Forward declarations
 class CGulIcon;
 class CMCSPluginData;
 class TMCSData;
 class CMCSPlugin;
-class CActiveFavouritesDbNotifier;
 
 /**
- *  @ingroup group_mcsplugin
+ * @ingroup group_mcsplugin
  *
- *  MCSPluginEngine class
+ * MCSPluginEngine class
  *
- *  @since S60 9.1
+ * @since S60 5.2
  */
-class CMCSPluginEngine : public CBase, public MMCSPluginWatcherObserver,
-    public MFavouritesDbObserver, public MMsvSessionObserver
-{
-
-public:  // Constructors and destructor
-
-    /**
-     * Constructor to use in the object creation. Initializes the necessary 
-     * data.
-     *
-     * @param aPlugin
-     * @param aInstanceUid
-     */
-    CMCSPluginEngine( CMCSPlugin& aPlugin, const TDesC8& aInstanceUid );
+NONSHARABLE_CLASS( CMCSPluginEngine ) : public CBase, 
+    public MMCSPluginWatcherObserver,
+    public MMsvSessionObserver
+    {
+public:  
+    // constructor and destructor
 
     /**
     * Part of the two phased constuction
@@ -75,6 +67,29 @@
     */
     ~CMCSPluginEngine();
 
+private:
+    // constructors
+    
+    /**
+     * C++ default constructor 
+     */
+    CMCSPluginEngine( CMCSPlugin& aPlugin, const TDesC8& aInstanceUid );
+
+    /*
+     * 2nd phase constructor
+     */
+    void ConstructL();
+    
+public:
+    // new functions
+    
+    /**
+    * Called during plugin desctruction
+    * Decrements reference counters of all run-time generated items
+    * and deletes those which have reference counter == 0
+    */
+    void CleanMCSItemsL();
+    
     /**
      * Gets the menu data.
      * 
@@ -130,64 +145,37 @@
     void LaunchItemL( const TInt& aIndex );
 
     /**
-    * Resumes the engine
+    * Set backup/restore state
     *
-    * @param void
+    * @param aBackupRestore ETrue if backup/restore is ongoing 
     * @return void
     */
-    void ResumeL();
-
-    /**
-    * Suspends the engine
-    *
-    * @param void
-    * @return void
-    */
-    void Suspend();
+    void SetBackupRestore( TBool aBackupRestore );
 
     /**
      * ShowSettingsL
      */
     void ShowSettingsL();
 
+private:
+    // from MMCSPluginWatcherObserver
+    
     /**
-     * From MMCSPluginWatcherObserver
+     * @see MMCSPluginWatcherObserver 
      */
     void HandleNotifyL();
 
-    // From MFavouritesDbObserver
-    /**
-     * Handles database event.
-     * @param aEvent Database event.
-     */
-    void HandleFavouritesDbEventL( RDbNotifier::TEvent aEvent );
+private:    
+    // from MMsvSessionObserver
 
-    // from base class MMsvSessionObserver
     /**
-     * Handles an event from the message server.
-     * Not used, but must be defined to be able to use the messaging server.
-     *
-     * @since S60 v3.2
-     * @param aEvent Indicates the event type.
-     * @param aArg1 Event type-specific argument value
-     * @param aArg2 Event type-specific argument value
-     * @param aArg3 Event type-specific argument value
-     */
+     * @see MMsvSessionObserver
+     */    
     void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,
         TAny* aArg2, TAny* aArg3 );
 
-    /**
-    * Called during plugin desctruction
-    * Decrements reference counters of all run-time generated items
-    * and deletes those which have reference counter == 0
-    */
-    void CleanMCSItemsL();
-
 private:
-    /*
-     * Part of the two phased construction
-     */
-    void ConstructL();
+    // new functions
 
     /**
      * InitL
@@ -195,16 +183,14 @@
     void InitL();
 
     /**
-     * Tells the settings container to start observing for changes in favorites
-     * database and mailbox db.
-     *
+     * Tells the settings container to start observing 
+     * for changes in mailbox db.     
      */
     void StartObservingL();
 
     /**
-     * Tells the settings container to stop observing for changes in favorites
-     * database and mailbox db.
-     *
+     * Tells the settings container to stop observing 
+     * for changes in mailbox db.     
      */
     void StopObserving();
 
@@ -215,7 +201,8 @@
      * @param aMenuItem
      * @return TBool
      */
-    TBool ConstructMenuItemForIconL( const TDesC& aPath, CMenuItem& aMenuItem );
+    TBool ConstructMenuItemForIconL( 
+        const TDesC& aPath, CMenuItem& aMenuItem );
 
     /**
     * Helper method. Adds a given constant to a value of reference counter
@@ -224,62 +211,39 @@
     * @param aValueToAdd A constant to add 
     * @return The actual value of updated reference count
     */
-    TInt UpdateMenuItemsRefCountL( CMenuItem* aItem, const TInt aValueToAdd );
-
-protected:
-
+    TInt UpdateMenuItemsRefCountL( 
+        CMenuItem* aItem, const TInt aValueToAdd );
+    
 private:
-
-    /* Plugin data
-    * Own
-    */
+    // data
+    
+    /** Plugin data, owned */
     CMCSPluginData* iPluginData;
-
-    // MCS resource
+    /** MCS resource handle, owned */
     RMenu iMenu;
-
-    // MCS change notifier
+    /** MCS change notifier handle, owned */
     RMenuNotifier iNotifier;
-
-    // MCS asynchronous operation watcher
+    /** MCS asynchronous operation watcher, owned */
     CMCSPluginWatcher* iWatcher;
-
-    // MCS change notifier watcher
+    /** MCS change notifier watcher, owned */
     CMCSPluginWatcher* iNotifyWatcher;
-
-    //
+    /** MCS plugin, not owned */
     CMCSPlugin& iPlugin;
-
-    // Reference to plugin owned instanceUid
+    /** Reference to plugin owned instanceUid */
     const TDesC8& iInstanceUid;
-    // Indicating that backup is in progress
-    TBool iSuspend;
-    //Offset of resource file.
+    /** Flag Indicating that backup/restore is in progress */
+    TBool iBackupRestore;
+    /** Offset of resource file */
     TInt iResourceOffset;
-
-    /**
-     * Bookmark database change observer.
-     * Own.
-     */
-    CActiveFavouritesDbNotifier* iBookmarkDbObserver;
-
-    /**
-     * Bookmark database.
-     */
-    RFavouritesDb iBookmarkDb;
-
-    /**
-     * Bookmark database session.
-     */
-    RFavouritesSession iBookmarkSession;
-
-    /**
-     * Message server session
-     * Own.
-     */
-    CMsvSession* iMsvSession;
-};
+    /** Message server session, owned */
+    CMsvSession* iMsvSession;        
+    /** "Undefined" menu item, owned */
+    CMenuItem* iUndefinedItem;
+    /** "Undefined" menu item header */
+    TMenuItem iUndefinedItemHeader;    
+    };
 
 #endif // CMCSPLUGINENGINE_H
 
+// End of file
 
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,50 +15,48 @@
 *
 */
 
-
+// System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationproxy.h>
 #include <gulicon.h>
+#include <mcsmenuitem.h>
+
+// User includes
 #include <aicontentobserver.h>
 #include <aiutility.h>
 #include <aistrcnv.h>
-#include <mcsmenuitem.h>
-
-#include <aknskinsinternalcrkeys.h> // For working with settings API
-#include <centralrepository.h> // Headers Used for CRepository
-
 #include "mcspluginuids.hrh"
 #include "mcsplugin.h"
 #include "mcsplugindata.h"
 #include "mcspluginengine.h"
 #include "aipluginsettings.h"
 
-
+// Constants
 const TUint KPluginNameSeprator =  '/';
 
 const TInt KImplUidMCSPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_MCSPLUGIN;
-// CONST CLASS VARIABLES
-const TImplementationProxy KImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( KImplUidMCSPlugin, CMCSPlugin::NewL ) 
-    };
 
 _LIT( KEventNameLaunchByIndex,  "LaunchByIndex" );
 _LIT( KEventNameShowSettings,   "ShowSettings" );
 _LIT( KContentItemTypeText, "text" );
 _LIT( KContentItemTypeImage, "image" );
 
+const TImplementationProxy KImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KImplUidMCSPlugin, CMCSPlugin::NewL ) 
+    };
+
 // ======== LOCAL FUNCTIONS ========
 
 // ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::NewL
+//
+// ----------------------------------------------------------------------------
 //
 CMCSPlugin* CMCSPlugin::NewL()
     {
-    CMCSPlugin* self = new (ELeave) CMCSPlugin;
+    CMCSPlugin* self = new ( ELeave ) CMCSPlugin;
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -66,60 +64,28 @@
     return self;
     }
     
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::CMCSPlugin
+//
+// ----------------------------------------------------------------------------
 //
 CMCSPlugin::CMCSPlugin()
     {
     }
     
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::ConstructL
+// 
+// ----------------------------------------------------------------------------
 //
 void CMCSPlugin::ConstructL()
-    { 
-    iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_MCSPLUGIN; 
-    // We need to Query Central Repository
-    iRepository  = CRepository::NewL( KCRUidPersonalisation );
-
-    // Setting up watcher which calls HandleNotifyL method 
-    // everytime the SkinUID changes in central repository
-    iRepositoryWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::ENotify );
-    iRepository->NotifyRequest( KPslnActiveSkinUid, iRepositoryWatcher->iStatus );
-    iRepositoryWatcher->WatchNotify( this );
-    }
-
-// ---------------------------------------------------------------------------
-// Handle Skin UID change
-// ---------------------------------------------------------------------------
-//
-void CMCSPlugin::HandleNotifyL()
-    {
-
-    // Skin ID has changed. Set all MenuItems on Widget dirty
-    // and re-publish to update icons
-    if ( iEngine )
-        {
-        TInt dataCount = iEngine->MenuItemCount();
-        for ( TInt i = 0; i < dataCount; i++ )
-            {
-            iEngine->MenuDataL( i ).SetDirty( ETrue );
-            }
-        PublishL();
-        }
-
-    // Skin ID Notification must be activated again
-    iRepositoryWatcher->Cancel();
-    iRepository->NotifyRequest( KPslnActiveSkinUid, iRepositoryWatcher->iStatus );
-    iRepositoryWatcher->WatchNotify( this );
+    {         
     }
     
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 // Destructor
 // Deletes all data created to heap
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
 CMCSPlugin::~CMCSPlugin()
     {
@@ -134,55 +100,41 @@
     iObservers.Close();
     
     DeleteContentModel();
-
-    if ( iRepository )
-        {
-        delete iRepository;
-        iRepository = NULL;
-        }
-
-    if ( iRepositoryWatcher )
-        {
-        iRepositoryWatcher->Cancel();
-        delete iRepositoryWatcher;
-        iRepositoryWatcher = NULL;
-        }
     }
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::PublishL
 // Publishes the all the items
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
 void CMCSPlugin::PublishL()
-    {
-    
-    if ( !iEngine )
-        {
-        iEngine = CMCSPluginEngine::NewL( *this, iInfo.iNamespace );
-        }
-
+    {    
     TInt err( KErrNone );
     TInt observers( iObservers.Count() );
-    TInt transactionId = reinterpret_cast<TInt>( this );
+    TInt transactionId( reinterpret_cast<TInt>( this ) );
     TInt menuItems ( iEngine->MenuItemCount() );
 
     for ( TInt i = 0; i < observers; i++ )
         {
-        MAiContentObserver* observer = iObservers[ i ];
+        MAiContentObserver* observer( iObservers[ i ] );
         err = observer->StartTransaction( transactionId );
+        
         if ( err == KErrNotSupported )
             {
             return;
             }
+        
         // Publish content to all items
         for ( TInt j = 0; j < menuItems; j++ )
             {
             // Index has to start from 1 ( j + 1 )
             PublishLItemL( *observer, iEngine->MenuDataL( j ), ( j + 1 ) );
             }// shortcut count
+        
         if ( err == KErrNone )
             {
             err = observer->Commit( transactionId );
+            
             if ( err == KErrNotSupported )
                 {
                 return;
@@ -197,20 +149,22 @@
         }
     }
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::PublishLItemL
 // Publishes one item to given index
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
-void CMCSPlugin::PublishLItemL( MAiContentObserver& aObserver, TMCSData& aData, TInt aIndex )
+void CMCSPlugin::PublishLItemL( MAiContentObserver& aObserver, 
+    TMCSData& aData, TInt aIndex )
     {
-
     if( !aData.IsDirty() )
         {
         return;
         }
 
-    CMenuItem* item = iEngine->FetchMenuItemL( aData.MenuItem() );
+    CMenuItem* item( iEngine->FetchMenuItemL( aData.MenuItem() ) );
     CleanupStack::PushL( item );
+    
     // One widget item has iDataCount number of elements
     for ( TInt i = 0; i < iDataCount; i++ )
         {
@@ -219,137 +173,140 @@
             //Publish image
             if ( aObserver.CanPublish( *this, i, aIndex ) )
                 {
-                CGulIcon* icon = iEngine->ItemIconL( *item, TPtrC16( ( const TText16* ) iContentModel[ i ].cid ) );
+                CGulIcon* icon( iEngine->ItemIconL( *item, 
+                    TPtrC16( ( const TText16* ) iContentModel[ i ].cid ) ) );
+                
                 aObserver.PublishPtr( *this, i, icon , aIndex );
                 }
             }
-        else if ( iContentModel[ i ].type == KAiContentTypeText )
+        else if ( iContentModel[i].type == KAiContentTypeText )
             {
             //Publish  text
             if ( aObserver.CanPublish( *this, i, aIndex ) )
                 {
-                TPtrC name = iEngine->ItemTextL( *item, TPtrC16( ( const TText16* ) iContentModel[ i ].cid ) );
+                TPtrC name( iEngine->ItemTextL( *item, 
+                    TPtrC16( ( const TText16* ) iContentModel[ i ].cid ) ) );
+                
                 aObserver.Publish( *this, i, name, aIndex );
                 }
             }
         }//content items
 
     CleanupStack::PopAndDestroy( item );
-
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is requested to unload its engines due backup operation
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::Start
+// 
+// ----------------------------------------------------------------------------
 //
-void CMCSPlugin::Stop( TAiTransitionReason aReason )
-    {
-    
-    if ( aReason == EAiBackupRestoreStarted )
-        {
-        Suspend( aReason );
-        }
-
+void CMCSPlugin::Start( TStartReason /*aReason*/ )
+    {    
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::Stop
+// 
+// ----------------------------------------------------------------------------
 //
-void CMCSPlugin::Resume( TAiTransitionReason aReason )
+void CMCSPlugin::Stop( TStopReason /*aReason*/ )
     {
-    if( aReason == EAiIdleBackground )
-        {
-        return;
-        }
-
-    if ( aReason == EAiBackupRestoreEnded )
-        {
-        if ( iEngine )
-            {
-            TRAP_IGNORE( iEngine->ResumeL() );
-            }
-        }
-
-    TRAP_IGNORE( DoResumeL( aReason ) );
-    return;
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is not allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::Resume
+// 
+// ----------------------------------------------------------------------------
 //
-void CMCSPlugin::Suspend( TAiTransitionReason aReason )
-    {
-    if ( aReason == EAiBackupRestoreStarted && iEngine )
+void CMCSPlugin::Resume( TResumeReason aReason )
+    {       
+    if ( aReason == EForeground )
         {
-        iEngine->Suspend();
+        iEngine->SetBackupRestore( EFalse );
+        
+        if ( PublishRequired() )
+            {
+            TRAP_IGNORE( PublishL() );
+            }        
         }
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// The plug-in MUST maintain a registry of subscribers and send 
-// notification to all of them whenever the state changes or new content
-// is available
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::Suspend
+// 
+// ----------------------------------------------------------------------------
+//
+void CMCSPlugin::Suspend( TSuspendReason aReason )
+    {    
+    if ( aReason == EGeneralThemeChange )
+        {                   
+        TInt dataCount( iEngine->MenuItemCount() );
+        
+        for ( TInt i = 0; i < dataCount; i++ )
+            {
+            TRAP_IGNORE( iEngine->MenuDataL( i ).SetDirty( ETrue ) );
+            }                
+        }
+    else if ( aReason == EBackupRestore )
+        {
+        // Prevent item launching during backup / restore 
+        iEngine->SetBackupRestore( ETrue );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CMCSPlugin::SubscribeL
+//
+// ----------------------------------------------------------------------------
 //
 void CMCSPlugin::SubscribeL( MAiContentObserver& aObserver )
     { 
     iObservers.AppendL( &aObserver );
     }
    
-// ---------------------------------------------------------------------------
-// Compare method to exclude the similar content items from array.
-// ---------------------------------------------------------------------------
-//
-TInt CMCSPlugin::CompareItems( const MAiPluginSettings& aFirst,
-        const MAiPluginSettings& aSecond )
-    {
-    MAiPluginSettings& first = const_cast<MAiPluginSettings&>(aFirst);
-    MAiPluginSettings& second = const_cast<MAiPluginSettings&>(aSecond);
-    return first.AiPluginContentItem().Name().CompareC(second.AiPluginContentItem().Name());    
-    }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-ins take ownership of the settings array, so it must either
-// store it in a member or free it.
-// Creates dynamic content model.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::ConfigureL
+// 
+// ----------------------------------------------------------------------------
 //
 void CMCSPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
-    {
+    {    
+    iEngine = CMCSPluginEngine::NewL( *this, PublisherInfo().Namespace() );
     
     TLinearOrder<MAiPluginSettings> sortMethod( CMCSPlugin::CompareItems );
     RAiSettingsItemArray contentItemsArr;
 
-    TInt count = aSettings.Count();
+    TInt count( aSettings.Count() );
+    
     for ( TInt i = 0; i < count; i++ )
        {
-       MAiPluginSettings* pluginSetting = aSettings[ i ];
-       if( pluginSetting->AiPluginItemType() == EAiPluginContentItem )
+       MAiPluginSettings* setting( aSettings[ i ] );
+       
+       if( setting->AiPluginItemType() == EAiPluginContentItem )
            {
-           MAiPluginContentItem& contItem = pluginSetting->AiPluginContentItem();
-           TPtrC name = contItem.Name();
-           TPtrC type = contItem.Type();
-           contentItemsArr.InsertInOrder( pluginSetting, sortMethod );
+           MAiPluginContentItem& contItem( setting->AiPluginContentItem() );
+           TPtrC name( contItem.Name() );
+           TPtrC type( contItem.Type() );
+           
+           contentItemsArr.InsertInOrder( setting, sortMethod );
            }
-
        }
+    
     iDataCount = contentItemsArr.Count();
+    
     if ( iDataCount > 0 )
         {
         // Create the dynamic content Model
         DeleteContentModel();
+        
         iContentModel = new ( ELeave ) TAiContentItem[ iDataCount ];
+        
         for ( TInt i = 0; i < iDataCount; i++ )
             {
             iContentModel[i].id = i;
-            MAiPluginContentItem& contentItem = ( contentItemsArr[ i ] )->AiPluginContentItem();
+        
+            MAiPluginContentItem& contentItem( 
+                contentItemsArr[ i ]->AiPluginContentItem() );
 
             if( contentItem.Type() == KContentItemTypeText )
                 {
@@ -361,153 +318,87 @@
                 // image
                 iContentModel[i].type = KAiContentTypeBitmap;
                 }
-            TInt pos = contentItem.Name().Locate( KPluginNameSeprator );
+            
+            TInt pos( contentItem.Name().Locate( KPluginNameSeprator ) );
             
             HBufC* contentId = HBufC::NewL( contentItem.Name().Length() );
             CleanupStack::PushL( contentId );
-            TPtr ptr = contentId->Des();
+            
+            TPtr ptr( contentId->Des() ); 
             ptr = contentItem.Name().Mid( pos + 1 );
-            TInt sizeOfContentId = ptr.Size() +sizeof( wchar_t );
-            iContentModel[i].cid = static_cast<const wchar_t*>( User::AllocL( sizeOfContentId ) );
-            Mem::Copy((TAny*)iContentModel[i].cid, ptr.PtrZ(), sizeOfContentId);
+            
+            TInt sizeOfContentId( ptr.Size() + sizeof( wchar_t ) );
+            
+            iContentModel[i].cid = 
+                static_cast<const wchar_t*>( User::AllocL( sizeOfContentId ) );
+                
+            Mem::Copy( ( TAny* )iContentModel[i].cid, 
+                ptr.PtrZ(), sizeOfContentId );
+            
             CleanupStack::PopAndDestroy( contentId );
             }
-        iContent = AiUtility::CreateContentItemArrayIteratorL( iContentModel, iDataCount );
+        
+        iContent = AiUtility::CreateContentItemArrayIteratorL( 
+                iContentModel, iDataCount );
         }
+    
     contentItemsArr.Reset();
     // We own the array so destroy it
     aSettings.ResetAndDestroy();
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Returns the extension interface. Actual type depends on the passed 
-// aUid argument.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::GetProperty
+// 
+// ----------------------------------------------------------------------------
 //
-TAny* CMCSPlugin::Extension( TUid aUid )
-    {    
-    if (aUid == KExtensionUidProperty)
-           {
-        return static_cast<MAiPropertyExtension*>(this);
+TAny* CMCSPlugin::GetProperty( TProperty aProperty )
+    {
+    if( aProperty == EPublisherContent )
+        {
+        return static_cast< MAiContentItemIterator* >( iContent );        
         }
-    else if (aUid == KExtensionUidEventHandler)
-        {
-        return static_cast<MAiEventHandlerExtension*>(this);
-        }
-    else
-        {    
-        return NULL;
-        }
+        
+    return NULL;
     }
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Read property of publisher plug-in.
-// ---------------------------------------------------------------------------
+ 
+// ----------------------------------------------------------------------------
+// CMCSPlugin::HandleEvent
+// 
+// ----------------------------------------------------------------------------
 //
-TAny* CMCSPlugin::GetPropertyL( TInt aProperty )
-    {
-    TAny* property = NULL;
-    
-    switch ( aProperty )
+void CMCSPlugin::HandleEvent( const TDesC& aEventName, const TDesC& aParam )
+    {       
+    if( aEventName == KEventNameLaunchByIndex )
+        {        
+        TInt32 index;
+        AiUtility::ParseInt( index, aParam );
+        
+        TRAP_IGNORE( iEngine->LaunchItemL( index - 1 ) );
+        }
+    else if( aEventName == KEventNameShowSettings )
         {
-        case EAiPublisherInfo:
-            {
-             property = static_cast<TAiPublisherInfo*>( &iInfo );
-            break;  
-            }       
-    
-        case EAiPublisherContent:
-            {
-            property = static_cast<MAiContentItemIterator*>( iContent );
-            break;    
-            }
-        }
-    return property;
+        TRAP_IGNORE( iEngine->ShowSettingsL() );
+        }    
     }
 
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Write property value to optimize the content model.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::CompareItems
+//
+// ----------------------------------------------------------------------------
 //
-void CMCSPlugin::SetPropertyL( TInt aProperty, TAny* aValue )
-    {  
-    switch ( aProperty )
-        {
-		case EAiPublisherInfo:
-			{
-			if( aValue )
-			    {
-    		    const TAiPublisherInfo* info = static_cast<const TAiPublisherInfo*>( aValue );
-	    	    iInfo.iName.Copy(info->iName);
-	    	    iInfo.iNamespace.Copy(info->iNamespace);
-			    }
-		    break;
-		    }
-		default:
-		    break;         
-        }
-    }
- 
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CMCSPlugin::HandleEvent( TInt /*aEvent*/, const TDesC& /*aParam*/ )
+TInt CMCSPlugin::CompareItems( const MAiPluginSettings& aFirst,
+    const MAiPluginSettings& aSecond )
     {
-    // We have no way of reporting errors to framework so just ignore them.
-    //TRAP_IGNORE( iEngine->HandleEventL(aEvent, aParam ));
-    } 
-
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CMCSPlugin::HandleEvent( const TDesC& aEventName, const TDesC& aParam )
-    {
-    if ( iEngine )
-        {
-        if( aEventName == KEventNameLaunchByIndex )
-            {
-            // We have no way of reporting errors to framework so just ignore them.
-            TInt32 index;
-            AiUtility::ParseInt( index, aParam );
-            TRAP_IGNORE( iEngine->LaunchItemL( index - 1 ));
-            }
-        else if( aEventName == KEventNameShowSettings )
-            {
-            TRAP_IGNORE( iEngine->ShowSettingsL() );
-            }
-        }
+    MAiPluginSettings& first = const_cast<MAiPluginSettings&>(aFirst);
+    MAiPluginSettings& second = const_cast<MAiPluginSettings&>(aSecond);
+    return first.AiPluginContentItem().Name().CompareC(second.AiPluginContentItem().Name());    
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// framework instructs plug-in that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPlugin::DeleteContentModel
 //
-void CMCSPlugin::DoResumeL( TAiTransitionReason /*aReason*/ )
-    {
-    PublishL();
-    }
-    
-// ---------------------------------------------------------------------------
-// Frees engine resources
-// ---------------------------------------------------------------------------
-//    
-void CMCSPlugin::FreeEngine()
-    {
-    delete iEngine;
-    iEngine = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// Delete content model
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //    
 void CMCSPlugin::DeleteContentModel()
     {
@@ -528,11 +419,31 @@
         iContentModel = NULL;        
         }    
     }
-  
+
+// ----------------------------------------------------------------------------
+// CMCSPlugin::PublishRequired
+//
+// ----------------------------------------------------------------------------
+//    
+TBool CMCSPlugin::PublishRequired() const
+    {
+    TInt count( iEngine->MenuItemCount() );
+    
+    TBool retval( EFalse );
+    
+    for ( TInt i = 0; !retval && i < count; i++ )
+        {               
+        TRAP_IGNORE( retval = iEngine->MenuDataL( i ).IsDirty() );       
+        }
+        
+    
+    return retval;
+    }
+
 // ======== GLOBAL FUNCTIONS ========
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 // Constructs and returns an application object.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
     TInt& aTableCount )
@@ -541,3 +452,5 @@
         sizeof( TImplementationProxy );
     return KImplementationTable;
     }
+
+// End of file
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -123,22 +123,32 @@
     CleanupStack::PushL( settingsCleanupItem );
     iPluginSettings->GetSettingsL( iInstanceUid, settings );
     TInt count = settings.Count();
-    for( TInt i = 0; i < count; i++ )
+    TBool wasEmpty = !iData.Count();
+    
+    for ( TInt i = 0; i < count; i++ )
        {
-        CItemMap* itemMap = settings[i];
+        CItemMap* itemMap = settings[ i ];
         RPointerArray<HSPluginSettingsIf::CPropertyMap>& properties
             = itemMap->Properties();
         TMenuItem item = CreateMenuItemL( properties );
         TMCSData data;
-        TInt id = -1;
-        
-        if ( count == iData.Count() )
+
+        if ( wasEmpty )
             {
-            id = iData[i].MenuItem().Id();
+            // list of shortcut slot was empty
+            // we append the shortcut data slots one-by-one to the list
+            data.SetMenuItem( item );
+            data.SetDirty( ETrue );
+            iData.AppendL( data );
             }
-                   
-        if ( id > 0 )
+        else 
             {
+            // check for updates in existing shortcut data slot
+            // if menuitem id has changed, replace the item and 
+            // set as dirty
+            TInt id = -1;
+            id = iData[ i ].MenuItem().Id();
+            
             if ( item.Id() != id )
                 {
                 data.SetMenuItem( item );
@@ -146,18 +156,13 @@
                 iData.Remove( i );
                 iData.InsertL( data, i );
                 }
-        	}
-        else
-            {
-            data.SetMenuItem( item );
-            data.SetDirty( ETrue );
-            iData.AppendL( data );
-        	}
+            }
         }
     
-        CleanupStack::PopAndDestroy(); // settingsCleanupItem
+        CleanupStack::PopAndDestroy(); // settingsCleanupItem 
     }
 
+
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
--- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -16,37 +16,36 @@
 */
 
 
-// INCLUDE FILES
-#include "mcspluginengine.h"
-
+// System includes
 #include <gulicon.h>
 #include <AknsItemID.h>
 #include <gslauncher.h>
-#include <aisystemuids.hrh>
-
 #include <mcsmenuitem.h>
 #include <mcsmenufilter.h>
 #include <mcsmenuoperation.h>
 #include <mcsmenuiconutility.h>
 #include <activefavouritesdbnotifier.h>
 #include <favouritesitemlist.h>
-
 #include <bautils.h>
 #include <StringLoader.h>
 #include <aknnotedialog.h>
+#include <AknsConstants.h>
 #include <avkon.rsg>
 #include <mcspluginres.rsg>
+#include <apgtask.h>
+#include <apgcli.h> 
+#include <apacmdln.h>
+#include <gfxtranseffect/gfxtranseffect.h>      
+#include <akntranseffect.h>
+
+// User includes
+#include <aisystemuids.hrh>
+#include "mcspluginengine.h"
 #include "mcsplugin.h"
 #include "mcsplugindata.h"
 #include "mcspluginuids.hrh"
 
-#include <apgtask.h>
-#include <apgcli.h> 
-#include <apacmdln.h>
-#include <gfxtranseffect/gfxtranseffect.h>      // For Transition effect
-#include <akntranseffect.h>
-
-#include <AknsConstants.h>
+// Constants
 _LIT( KMyMenuData, "matrixmenudata" );
 _LIT( KSkin,         "skin" );
 _LIT( KMif,          "mif" );
@@ -65,37 +64,47 @@
 const TUid KMMUid = { 0x101F4CD2 };
 
 // ======== LOCAL FUNCTIONS ========
-
+// ----------------------------------------------------------------------------
+// NextIdToken
+//
+// ----------------------------------------------------------------------------
+//
 static TPtrC NextIdToken( TLex& aLexer )
    {
    aLexer.SkipSpace();
    aLexer.Mark();
+  
    while( !aLexer.Eos() && !aLexer.Peek().IsSpace() && aLexer.Peek() != ')' )
        {
        aLexer.Inc();
        }
+   
    return aLexer.MarkedToken();
    }
 
 // ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPluginEngine::CMCSPluginEngine
 //
-CMCSPluginEngine::CMCSPluginEngine( CMCSPlugin& aPlugin, const TDesC8& aInstanceUid ) 
-    : iPlugin( aPlugin ), iInstanceUid( aInstanceUid ),
-      iSuspend( EFalse )
+// ----------------------------------------------------------------------------
+//
+CMCSPluginEngine::CMCSPluginEngine( CMCSPlugin& aPlugin, 
+    const TDesC8& aInstanceUid ) 
+    : iPlugin( aPlugin ), iInstanceUid( aInstanceUid )    
     {
     }
     
-// ---------------------------------------------------------
-// Two-phased constructor.
-// Create instance of concrete ECOM interface implementation
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPluginEngine::NewL
+// 
+// ----------------------------------------------------------------------------
 //
-CMCSPluginEngine* CMCSPluginEngine::NewL( CMCSPlugin& aPlugin, const TDesC8& aInstanceUid )
+CMCSPluginEngine* CMCSPluginEngine::NewL( CMCSPlugin& aPlugin, 
+    const TDesC8& aInstanceUid )
     {
-    CMCSPluginEngine* self = new( ELeave ) CMCSPluginEngine( aPlugin, aInstanceUid );
+    CMCSPluginEngine* self = 
+        new( ELeave ) CMCSPluginEngine( aPlugin, aInstanceUid );
+    
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -103,9 +112,10 @@
     return self;
     }
 
-// ---------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPluginEngine::ConstructL
+//
+// ----------------------------------------------------------------------------
 //
 void CMCSPluginEngine::ConstructL()
     {
@@ -119,12 +129,21 @@
         CCoeEnv::Static()->AddResourceFileL( resourceFile );
     InitL();
     StartObservingL();
+    
+    // Get "Undefined" item
+    CMenuFilter* filter = CMenuFilter::NewL();
+    CleanupStack::PushL( filter );
+    filter->HaveAttributeL( KMenuAttrUid, KMenuAttrUndefUid );
+    iUndefinedItemHeader = FindMenuItemL( *filter );
+    CleanupStack::PopAndDestroy( filter );
+    filter = NULL;
+    iUndefinedItem = CMenuItem::OpenL( iMenu, iUndefinedItemHeader );    
     }
     
-
-// ---------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CMCSPluginEngine::~CMCSPluginEngine
+//
+// ----------------------------------------------------------------------------
 //
 CMCSPluginEngine::~CMCSPluginEngine()
     {
@@ -136,12 +155,19 @@
     //iWatcher->Cancel();
     delete iWatcher;
     delete iNotifyWatcher;
+
     CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
+        
+    if ( iUndefinedItem )
+        {
+        delete iUndefinedItem;
+        iUndefinedItem = NULL;
+        }    
     }
 
-
 // ---------------------------------------------------------------------------
-// 
+// CMCSPluginEngine::InitL
+//
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::InitL()
@@ -149,60 +175,48 @@
     iMenu.OpenL( KMyMenuData );
     iPluginData = CMCSPluginData::NewL( *this, iInstanceUid );
     iWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
-    TInt err = iNotifier.Open( iMenu ); 
+    
+    TInt err( iNotifier.Open( iMenu ) ); 
+    
     if ( err == KErrNone )
         {
         iNotifyWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::ENotify );
+        
         iNotifier.Notify( 0,
             RMenuNotifier::EItemsAddedRemoved |
             RMenuNotifier::EItemsReordered |
             RMenuNotifier::EItemAttributeChanged,
             iNotifyWatcher->iStatus );
+        
         iNotifyWatcher->WatchNotify( this );
         }
     }
 
 // ---------------------------------------------------------------------------
-// Tells the settings container to start observing for changes
+// CMCSPluginEngine::StartObservingL
+//
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::StartObservingL()
     {
-    // registering to bookmarks db. changes observing
-    User::LeaveIfError( iBookmarkSession.Connect() );
-    User::LeaveIfError( iBookmarkDb.Open( iBookmarkSession, KBrowserBookmarks ) );
-
-    iBookmarkDbObserver = new (ELeave) CActiveFavouritesDbNotifier(
-                                        iBookmarkDb, *this );
-    iBookmarkDbObserver->Start();
-
     // registering to mailbox db. changes observing
-    iMsvSession = CMsvSession::OpenAsObserverL( *this) ;
+    iMsvSession = CMsvSession::OpenAsObserverL( *this );
     }
 
 // ---------------------------------------------------------------------------
-// Tells the settings container to stop observing for changes
+// CMCSPluginEngine::StopObserving
+//
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::StopObserving()
-    {
-    if ( iBookmarkDbObserver )
-        {
-        delete iBookmarkDbObserver;
-        iBookmarkDbObserver = NULL;
-        }
-    iBookmarkDb.Close();
-    iBookmarkSession.Close();
-
-    if ( iMsvSession )
-        {
-        delete iMsvSession;
-        iMsvSession = NULL;
-        }
+    {       
+    delete iMsvSession;
+    iMsvSession = NULL;    
     }
 
 // ---------------------------------------------------------------------------
-// 
+// CMCSPluginEngine::MenuDataL
+//
 // ---------------------------------------------------------------------------
 //
 TMCSData& CMCSPluginEngine::MenuDataL( const TInt& aIndex )
@@ -211,7 +225,8 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+// CMCSPluginEngine::MenuItemCount
+//
 // ---------------------------------------------------------------------------
 //
 TInt CMCSPluginEngine::MenuItemCount()
@@ -220,27 +235,32 @@
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::FindMenuItemL
 // Returns the menu item header, which matches the given filter.
 // ---------------------------------------------------------------------------
 //
 TMenuItem CMCSPluginEngine::FindMenuItemL( CMenuFilter& aFilter )
     {    
     TMenuItem item;
-    const TInt root = iMenu.RootFolderL();
+    const TInt root( iMenu.RootFolderL() );
+    
     RArray<TMenuItem> items;
     CleanupClosePushL( items );
+    
     iMenu.GetItemsL( items, root, &aFilter, ETrue );
-    if( items.Count() > 0 )
+    
+    if ( items.Count() > 0 )
         {
-
         item = items[0];
         }
 
     CleanupStack::PopAndDestroy( &items );
+    
     return item;
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::FetchMenuItemL
 // Returns the actual menu item for the given header.
 // ---------------------------------------------------------------------------
 //
@@ -250,66 +270,123 @@
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::ItemIconL
 // Returns MCS default icon if attribute is 'icon' else parses the
 // skin definition from attribute and sets attributes to aMenuItem.
 // ---------------------------------------------------------------------------
 //
-CGulIcon* CMCSPluginEngine::ItemIconL( CMenuItem& aMenuItem, const TDesC& aAttr )
+CGulIcon* CMCSPluginEngine::ItemIconL( CMenuItem& aMenuItem, 
+    const TDesC& aAttr )
     {
+    CMenuItem* menuItem;
+
+    TInt id = aMenuItem.Id();
+
+    // because the flags might have changed, we have
+    // to get a fresh copy of menu item from Menu Server
+    CMenuItem* mi = CMenuItem::OpenL( iMenu, id );
+    TUint32 flags = mi->Flags();
+    delete mi;
+
+    TUint32 isHidden = flags & TMenuItem::EHidden;
+    TUint32 isMissing = flags & TMenuItem::EMissing;
+
+    if ( iUndefinedItem && ( isHidden || isMissing ) )
+        {
+        menuItem = iUndefinedItem;
+        }
+    else
+        {
+        menuItem = &aMenuItem;
+        }
+
     CAknIcon* icon( NULL );
     CGulIcon* gIcon( NULL );
     TBool exists( ETrue );
-    if( aAttr != KIcon )
+    
+    if ( aAttr != KIcon )
         {
         // Resolve secondary icon definition from attribute
-        TPtrC iconDef = aMenuItem.GetAttributeL( aAttr, exists );
-        if( exists )
+        TPtrC iconDef( menuItem->GetAttributeL( aAttr, exists ) );
+    
+        if ( exists )
             {
-            exists = ConstructMenuItemForIconL( iconDef, aMenuItem );
+            exists = ConstructMenuItemForIconL( iconDef, *menuItem );
             }
         }
-    if( exists )
+    
+    if ( exists )
         {
-        icon = MenuIconUtility::GetItemIconL( aMenuItem );
-        if( icon )
+        icon = MenuIconUtility::GetItemIconL( *menuItem );
+    
+        if ( icon )
             {
             CleanupStack::PushL( icon );
-            gIcon = CGulIcon::NewL(icon->Bitmap(), icon->Mask());
+            
+            gIcon = CGulIcon::NewL( icon->Bitmap(), icon->Mask() );
+            
             // Detach and delete
             icon->SetBitmap( NULL );
             icon->SetMask( NULL );    
+            
             CleanupStack::PopAndDestroy( icon );
             }
         }
+    
     return gIcon;
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::ItemTextL
 // Returns text string for the given attribute
 // ---------------------------------------------------------------------------
 //
-TPtrC CMCSPluginEngine::ItemTextL( CMenuItem& aMenuItem, const TDesC& aAttr  )
+TPtrC CMCSPluginEngine::ItemTextL( CMenuItem& aMenuItem, const TDesC& aAttr )
     {    
+    // if item is hidden or missing (mmc card removed)
+    // use "Undefined" text instead
+    CMenuItem* menuItem;
+
+    TInt id = aMenuItem.Id();
+
+    // because the flags might have changed, we have
+    // to get a fresh copy of the menu item from Menu Server
+    CMenuItem* mi = CMenuItem::OpenL( iMenu, id );
+    TUint32 flags = mi->Flags();
+    delete mi;
+
+    TUint32 isHidden = flags & TMenuItem::EHidden;
+    TUint32 isMissing = flags & TMenuItem::EMissing;
+
+    if ( iUndefinedItem && ( isHidden || isMissing ) )
+        {
+        menuItem = iUndefinedItem;
+        }
+    else
+        {
+        menuItem = &aMenuItem;
+        }
+        
     TBool exists( KErrNotFound );
-    TPtrC name = aMenuItem.GetAttributeL( aAttr, exists );
-    if( exists )
+    
+    TPtrC name( menuItem->GetAttributeL( aAttr, exists ) );
+    
+    if ( exists )
         {
         return name;
         }
-    else
-        {
-        return KNullDesC();
-        }
+
+    return KNullDesC();
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::LaunchItemL
 // Calls the open command for the given menu item header
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::LaunchItemL( const TInt& aIndex )
     {
-
-    if ( iSuspend )
+    if ( iBackupRestore )
         {
         HBufC* temp = StringLoader::LoadLC( R_MCS_DISABLE_OPEN_ITEM );
 
@@ -318,36 +395,71 @@
             CAknNoteDialog::ENoTimeout );
         dialog->SetTextL( temp->Des() );
         dialog->ExecuteDlgLD( R_MCS_DISABLE_OPEN_ITEM_DLG );
-        CleanupStack::PopAndDestroy( temp );
+        
+        CleanupStack::PopAndDestroy( temp );        
         return;
         }
+    
     if( iWatcher->IsActive())
         {
         return;
         }
 
+    TMCSData& dataItem( iPluginData->DataItemL( aIndex ) );
+    
+    CMenuItem* item( CMenuItem::OpenL( iMenu, dataItem.MenuItem().Id() ) );
+    CleanupStack::PushL( item );
+    
 
-    TMCSData& dataItem = iPluginData->DataItemL( aIndex );
-    CMenuItem* item = CMenuItem::OpenL( iMenu, dataItem.MenuItem());
-    CleanupStack::PushL( item );
-    TPtrC type = item->Type();
+    TBool attrExists = ETrue;
+
+    TPtrC uid = item->GetAttributeL( KMenuAttrUid, attrExists );
+
+    // trying to run non-existing application ( that was replaced by "Undefined" app )
+    // OR trying to run hidden or missing application (e.g. unistalled app 
+    // or app on MMC which was removed )
+    // -> We display a note for a user that this is not possible¨
+    TUint32 isHidden = item->Flags() & TMenuItem::EHidden;
+    TUint32 isMissing = item->Flags() & TMenuItem::EMissing;
+
+    if ( ( attrExists && uid == KMenuAttrUndefUid ) || isHidden || isMissing )
+        {
+        CleanupStack::PopAndDestroy( item );
+
+        HBufC* temp = StringLoader::LoadLC( R_MCS_DISABLE_OPEN_ITEM_MISSING );
+
+        CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog(
+            CAknNoteDialog::EConfirmationTone,
+            CAknNoteDialog::ENoTimeout );
+        dialog->SetTextL( temp->Des() );
+        dialog->ExecuteDlgLD( R_MCS_DISABLE_OPEN_ITEM_DLG );
+        CleanupStack::PopAndDestroy( temp );
+        temp = NULL;
+
+        return;
+        }
+
+    // run item based on its type
+    TPtrC type( item->Type() );
 
     // run folder
     if ( type == KMenuTypeFolder )
         {
-
         // message for MM application
         HBufC8* message; 
 
         // prepare message for launching folder
-        TBool hasApplicationGroupName = EFalse;
-        TPtrC applicationGroupName = item->GetAttributeL( KApplicationGroupName, 
-                                                          hasApplicationGroupName );
+        TBool hasApplicationGroupName( EFalse );
+        
+        TPtrC applicationGroupName( item->GetAttributeL(  
+            KApplicationGroupName, hasApplicationGroupName ) );
+                                                          
         if ( !hasApplicationGroupName )
             {
             CleanupStack::PopAndDestroy( item );
             return;
             }
+        
         message = HBufC8::NewLC( KMMApplication().Length() + 
                                  KSetFocusString().Length() +
                                  applicationGroupName.Length() + 
@@ -360,21 +472,25 @@
 
         // find MM application
         TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
-        TApaTask task = taskList.FindApp( KMMUid );
+        TApaTask task( taskList.FindApp( KMMUid ) );
 
         if ( task.Exists() )
             {
             // MM is already running in background - send APA Message
-            task.SendMessage( TUid::Uid( KUidApaMessageSwitchOpenFileValue ), *message );
+            task.SendMessage( 
+                TUid::Uid( KUidApaMessageSwitchOpenFileValue ), *message );
             }
         else
             { 
             // MM not running yet - use Command Line Tail
             RApaLsSession appArcSession;
             CleanupClosePushL( appArcSession );
+            
             User::LeaveIfError( appArcSession.Connect() );
+            
             TApaAppInfo appInfo;
-            TInt err = appArcSession.GetAppInfo( appInfo, KMMUid );
+            TInt err( appArcSession.GetAppInfo( appInfo, KMMUid ) );
+            
             if ( err == KErrNone )
                 {
                 CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
@@ -384,26 +500,31 @@
                 appArcSession.StartApp( *cmdLine );
                 CleanupStack::PopAndDestroy( cmdLine );
                 }
+            
             CleanupStack::PopAndDestroy( &appArcSession ); 
             }
+        
         CleanupStack::PopAndDestroy( message );
         }
     else
         {
         TBool exists( EFalse );
+        
         TPtrC desc( item->GetAttributeL( KMenuAttrUid, exists ) );
         
-        if( exists )
+        if ( exists )
             {      
             _LIT( KPrefix, "0x" );
+            
             const TInt pos( desc.FindF( KPrefix ) );
             
-            if( pos != KErrNotFound )
+            if ( pos != KErrNotFound )
                 {
                 TLex lex( desc.Mid( pos + KPrefix().Length() ) );
+                
                 // Hex parsing needs unsigned int
-                TUint32 value = 0;
-                const TInt parseResult = lex.Val( value, EHex );
+                TUint32 value( 0 );
+                const TInt parseResult( lex.Val( value, EHex ) );
                 
                 if ( parseResult == KErrNone )
                     {
@@ -411,173 +532,94 @@
                     TInt32 value32( value );
                     uid.iUid = value32;   
                     
-                    if( uid != KNullUid )
+                    if ( uid != KNullUid )
                         {
                         //start a full screen effect
                         GfxTransEffect::BeginFullScreen( 
-                        AknTransEffect::EApplicationStart,
-                        TRect(0,0,0,0), 
-                        AknTransEffect::EParameterType, 
-                        AknTransEffect::GfxTransParam( uid,
-                        AknTransEffect::TParameter::EActivateExplicitContinue ));
+                            AknTransEffect::EApplicationStart,
+                            TRect(), 
+                            AknTransEffect::EParameterType, 
+                            AknTransEffect::GfxTransParam( uid,
+                            AknTransEffect::TParameter::EActivateExplicitContinue ) );
                         }
                     }
                 }
             }
 
         // run application/shortcut/bookmark
-        CMenuOperation* operation = item->HandleCommandL(
-            KMenuCmdOpen, KNullDesC8, iWatcher->iStatus );
+        CMenuOperation* operation( item->HandleCommandL(
+            KMenuCmdOpen, KNullDesC8, iWatcher->iStatus ) );
+        
         iWatcher->Watch( operation );  
         }
+    
     CleanupStack::PopAndDestroy( item );
     }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::HandleNotifyL
 // Handle the change in Menu Content
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::HandleNotifyL()
     {
-    TInt count( iPluginData->DataCount());
-    for( TInt i = 0; i < count; i++ )
+    TInt count( iPluginData->DataCount() );
+    
+    for ( TInt i = 0; i < count; i++ )
         {
-        TMCSData& data = iPluginData->DataItemL(i);
+        TMCSData& data( iPluginData->DataItemL(i) );
+        data.SetDirty( ETrue );
+        
         // Check that all the data still exist is MCS, if flag is hidden or
         // missing, we have to remove data from UI
-        CMenuItem* menuItem = CMenuItem::OpenL( iMenu, data.MenuItem().Id() );
-        CleanupStack::PushL( menuItem );
-        if ( !menuItem || 
-             ( menuItem->Flags() & TMenuItem::EHidden ) ||
-             ( menuItem->Flags() & TMenuItem::EMissing ) )
+        CMenuItem* menuItem = NULL; 
+
+        TRAP_IGNORE (
+                menuItem = CMenuItem::OpenL( iMenu, data.MenuItem().Id() );
+        )
+
+        // item not found. Use "Undefined" item as a replacement
+        if ( !menuItem )
             {
-            // Get the replacement for hidden data
-            CMenuFilter* filter = CMenuFilter::NewL();
-            CleanupStack::PushL( filter );
-            // 'Undefined' item
-            filter->HaveAttributeL( KMenuAttrUid, KMenuAttrUndefUid );
-            TMenuItem undefItem = FindMenuItemL( *filter );
-            iPluginData->ReplaceMenuItemL( i, undefItem );
-            iPluginData->SaveSettingsL( i, *FetchMenuItemL(undefItem) );
-            CleanupStack::PopAndDestroy( filter );
+            CleanupStack::PushL( menuItem );
+            iPluginData->ReplaceMenuItemL( i, iUndefinedItemHeader );
+            iPluginData->SaveSettingsL( i, *iUndefinedItem );
+            CleanupStack::Pop( menuItem );
             }
-        CleanupStack::PopAndDestroy( menuItem );
+
+        delete menuItem;
         menuItem = NULL;
         }
+
     // Notification must be activated again
     iNotifyWatcher->Cancel();
+    
     iNotifier.Notify( 0,
-                RMenuNotifier::EItemsAddedRemoved |
-                RMenuNotifier::EItemsReordered |
-                RMenuNotifier::EItemAttributeChanged,
-                iNotifyWatcher->iStatus );
+        RMenuNotifier::EItemsAddedRemoved |
+        RMenuNotifier::EItemsReordered |
+        RMenuNotifier::EItemAttributeChanged,
+        iNotifyWatcher->iStatus );
 
     iNotifyWatcher->WatchNotify( this );
+    
     // Publish changed data
     iPlugin.PublishL();
     }
 
 // ---------------------------------------------------------------------------
-// From class MMsvSessionObserver.
+// CMCSPluginEngine::HandleSessionEventL
 // Handles an event from the message server.
 // ---------------------------------------------------------------------------
 //
-void CMCSPluginEngine::HandleSessionEventL(
-    TMsvSessionEvent aEvent, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
-    {
-    switch ( aEvent )
-        {
-    case EMsvEntriesDeleted:
-        // fall-through intended here
-    case EMsvEntriesChanged:
-        {
-
-        }
-        break;
-    default:
-        break;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// From class MFavouritesDbObserver.
-// Handles database event.
-// -----------------------------------------------------------------------------
-//
-void CMCSPluginEngine::HandleFavouritesDbEventL( RDbNotifier::TEvent aEvent )
+void CMCSPluginEngine::HandleSessionEventL( TMsvSessionEvent aEvent, 
+    TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
     {
     switch ( aEvent )
         {
-        case RDbNotifier::ERollback:
-            // fall-through intended here
-        case RDbNotifier::ERecover:
-            // fall-through intended here
-        case RDbNotifier::ECommit:
+        case EMsvEntriesDeleted:
+        // fall-through intended here
+        case EMsvEntriesChanged:
             {
-            // Get list of favourites bookmarks
-            CFavouritesItemList* favItems =
-                    new (ELeave) CFavouritesItemList();
-            CleanupStack::PushL( favItems );
-            TInt err = iBookmarkDb.GetAll( *favItems, KFavouritesNullUid,
-                    CFavouritesItem::EItem );
-            if ( err != KErrNone )
-                {
-                ASSERT(0);
-                }
-            TInt count_fav = favItems->Count();
-
-            // Do for each plugin data (4x times)
-            TInt count_data( iPluginData->DataCount() );
-            for ( TInt item_index = 0; item_index < count_data; item_index++ )
-                {
-                // Get item ID and open its menu related item
-                TMCSData& data = iPluginData->DataItemL( item_index );
-                TInt itemID( data.MenuItem().Id() );
-                CMenuItem* menuItem = CMenuItem::OpenL( iMenu, itemID );
-                CleanupStack::PushL( menuItem );
-
-                // Get URL aatribute
-                TBool attrExists = EFalse;
-                TPtrC url = menuItem->GetAttributeL( _L("url"), attrExists );
-                // If bookmark...
-                if ( attrExists )
-                    {
-                    // Get bookmark UID
-                    TPtrC uid_item_ptr = menuItem->GetAttributeL(
-                            KMenuAttrUid, attrExists );
-
-                    // Compare with each item in fav. bookmarks list
-                    TBool itemExists = EFalse;
-                    for ( TInt fav_index = count_fav - 1; fav_index >= 0; fav_index-- ) // newest on top
-                        {
-                        // Get list item UID 
-                        TUid uid_fav = TUid::Uid( favItems->At( fav_index )->Uid() );
-                        if ( uid_fav.Name() == uid_item_ptr )
-                            {
-                            // Bookmark still exist in fav. bookmarks list
-                            itemExists = ETrue;
-                            break;
-                            }
-                        }
-
-                    if ( !itemExists )
-                        {
-                        // If item not axist any more, replace it by undefined icon
-                        CMenuFilter* filter = CMenuFilter::NewL();
-                        CleanupStack::PushL( filter );
-                        // 'Undefined' item
-                        filter->HaveAttributeL( KMenuAttrUid,
-                                KMenuAttrUndefUid );
-                        TMenuItem undefItem = FindMenuItemL( *filter );
-                        iPluginData->ReplaceMenuItemL( item_index, undefItem );
-                        iPluginData->SaveSettingsL( item_index, *FetchMenuItemL(
-                                undefItem ) );
-                        CleanupStack::PopAndDestroy( filter );
-                        }
-                    }
-                CleanupStack::PopAndDestroy( menuItem );
-                }
-            CleanupStack::PopAndDestroy( favItems );
             }
             break;
         default:
@@ -586,91 +628,103 @@
     }
 
 // ---------------------------------------------------------------------------
-// Resumes the engine
+// CMCSPluginEngine::SetBackupRestore
+//
 // ---------------------------------------------------------------------------
 //
-void CMCSPluginEngine::ResumeL()
+void CMCSPluginEngine::SetBackupRestore( TBool aBackupRestore )
     {
-    iSuspend = EFalse;
+    iBackupRestore = aBackupRestore;
     }
 
 // ---------------------------------------------------------------------------
-// Suspends the engine
-// ---------------------------------------------------------------------------
-//
-void CMCSPluginEngine::Suspend()
-    {
-    iSuspend = ETrue;
-    }
-
-// ---------------------------------------------------------------------------
+// CMCSPluginEngine::ShowSettingsL
 // Launch General Settings plugin
 // ---------------------------------------------------------------------------
 //
 void CMCSPluginEngine::ShowSettingsL()
     { 
     TUid uid = {AI_UID_ECOM_IMPLEMENTATION_SETTINGS_MCSPLUGIN};
-    CGSLauncher* l = CGSLauncher::NewLC();
-    l->LaunchGSViewL ( uid,
-                       KHomescreenUid,
-                       iInstanceUid );            
-    CleanupStack::PopAndDestroy( l );
+    
+    CGSLauncher* launcher = CGSLauncher::NewLC();
+    
+    launcher->LaunchGSViewL ( uid, KHomescreenUid, iInstanceUid );
+                                                        
+    CleanupStack::PopAndDestroy( launcher );
+    }
 
-    }
 // ---------------------------------------------------------------------------
-// ResolveSkinItemId
+// CMCSPluginEngine::ConstructMenuItemForIconL
 // Syntax: skin(major minor):mif(filename bimapId maskId)
 // ---------------------------------------------------------------------------
 //
-TBool CMCSPluginEngine::ConstructMenuItemForIconL( const TDesC& aPath, CMenuItem& aMenuItem )
+TBool CMCSPluginEngine::ConstructMenuItemForIconL( const TDesC& aPath, 
+    CMenuItem& aMenuItem )
    {
-   TInt pos = aPath.Locate( ':' );
-   if( pos == KErrNotFound )
+   TInt pos( aPath.Locate( ':' ) );
+   
+   if ( pos == KErrNotFound )
        {
        pos = aPath.Length();
        }
-   TPtrC skin = aPath.Left( pos );
-   TInt sf = skin.FindF( KSkin );
-   if( sf == KErrNotFound )
+   
+   TPtrC skin( aPath.Left( pos ) );
+   TInt sf( skin.FindF( KSkin ) );
+   
+   if ( sf == KErrNotFound )
        {
        return EFalse;
        }
-   TPtrC temp = skin.Mid( sf + KSkin().Length());
-   TLex input( temp );
+   
+   TPtrC temp( skin.Mid( sf + KSkin().Length() ) );
+   
+   TLex input( temp );   
    input.SkipSpace();
-   if( !input.Eos() && input.Peek() == '(')
+   
+   if ( !input.Eos() && input.Peek() == '(' )
        {
        input.Inc();
        }
-   TPtrC majorId = NextIdToken( input );
-   TPtrC minorId = NextIdToken( input );
+   
+   TPtrC majorId( NextIdToken( input ) );
+   TPtrC minorId( NextIdToken( input ) );
+   
    aMenuItem.SetAttributeL( KMenuAttrIconSkinMajorId, majorId );
    aMenuItem.SetAttributeL( KMenuAttrIconSkinMinorId, minorId );
       
    //TPtrC mif = aPath.Mid( pos + 1 );
    //TInt mf = mif.FindF( KMif );
-   if( aPath.Length() > pos && (aPath.Mid( pos + 1 ).FindF( KMif ) != KErrNotFound ))
+   
+   if ( aPath.Length() > pos && 
+      ( aPath.Mid( pos + 1 ).FindF( KMif ) != KErrNotFound ) )
        {
-       TPtrC mif = aPath.Mid( pos + 1 );
-       TInt mf = mif.FindF( KMif );
+       TPtrC mif( aPath.Mid( pos + 1 ) );
+       TInt mf( mif.FindF( KMif ) );
+       
        //TPtrC temp1 = mif.Mid( mf+ KMif().Length());
-       TLex input1( mif.Mid( mf+ KMif().Length()) );
+       
+       TLex input1( mif.Mid( mf + KMif().Length() ) );
        input1.SkipSpace();
-       if( !input1.Eos() && input1.Peek() == '(')
+       
+       if ( !input1.Eos() && input1.Peek() == '(' )
           {
           input1.Inc();
           }
-       TPtrC file = NextIdToken( input1 );
-       TPtrC bitmapId = NextIdToken( input1 );
-       TPtrC maskId = NextIdToken( input1 );
+       
+       TPtrC file( NextIdToken( input1 ) );
+       TPtrC bitmapId( NextIdToken( input1 ) );
+       TPtrC maskId( NextIdToken( input1 ) );
+       
        aMenuItem.SetAttributeL( KMenuAttrIconFile, file );
        aMenuItem.SetAttributeL( KMenuAttrIconId, bitmapId );
        aMenuItem.SetAttributeL( KMenuAttrMaskId, maskId );
        }
+   
    return ETrue;
    }
 
 // ---------------------------------------------------------------------------
+// CMCSPluginEngine::CleanMCSItemsL
 // Called during plugin desctruction
 // Decrements reference counters of all run-time generated items
 // and deletes those which have reference counter == 0
@@ -679,26 +733,32 @@
 void CMCSPluginEngine::CleanMCSItemsL()
     {
     const TInt count( iPluginData->DataCount() );
+    
     for( TInt i = 0; i < count; i++ )
         {
-        TMCSData& data = iPluginData->DataItemL(i);
+        TMCSData& data( iPluginData->DataItemL(i) );
         
         CMenuItem* menuItem = CMenuItem::OpenL( iMenu, data.MenuItem().Id() );        
-        if( !menuItem )
+        
+        if ( !menuItem )
             {
             continue;
-            }        
+            }
+        
         CleanupStack::PushL( menuItem );
         
         // check if ref_count attribute exists
-        TBool exists = EFalse;
-        TPtrC param = menuItem->GetAttributeL( KMenuAttrRefcount, exists );
+        TBool exists( EFalse );
+        
+        TPtrC param( menuItem->GetAttributeL( KMenuAttrRefcount, exists ) );
+        
         if( exists )
             {                
-            const TInt references = UpdateMenuItemsRefCountL( menuItem, -1 );
+            const TInt references( UpdateMenuItemsRefCountL( menuItem, -1 ) );
             
             // Create a nested loop inside CActiveScheduler.
-            CActiveSchedulerWait* wait = new (ELeave) CActiveSchedulerWait;
+            CActiveSchedulerWait* wait = 
+                new ( ELeave ) CActiveSchedulerWait;
             CleanupStack::PushL( wait );
             
             if( references > 0 )
@@ -716,7 +776,8 @@
                  // so remove it from MCS
                  if( !iWatcher->IsActive() )
                      {
-                     CMenuOperation* op = iMenu.RemoveL( menuItem->Id(), iWatcher->iStatus );
+                     CMenuOperation* op = 
+                         iMenu.RemoveL( menuItem->Id(), iWatcher->iStatus );
                      iWatcher->StopAndWatch( op, wait );
                      
                       // Start the nested scheduler loop.
@@ -735,16 +796,18 @@
 
 
 // ---------------------------------------------------------------------------
-// Helper method. Adds a given constant to a value of reference counter  
+// CMCSPluginEngine::UpdateMenuItemsRefCountL
+// Adds a given constant to a value of reference counter  
 // ---------------------------------------------------------------------------
 //
 TInt CMCSPluginEngine::UpdateMenuItemsRefCountL( CMenuItem* aItem, 
-                                                 const TInt aValueToAdd )
+    const TInt aValueToAdd )
     {
-    TBool exists = EFalse;
+    TBool exists( EFalse );
     CleanupStack::PushL( aItem ); 
-    TPtrC param = aItem->GetAttributeL( KMenuAttrRefcount, exists );
+    TPtrC param( aItem->GetAttributeL( KMenuAttrRefcount, exists ) );
     CleanupStack::Pop( aItem );
+    
     if ( exists )
         {
         TInt references;
@@ -758,8 +821,13 @@
         CleanupStack::PushL( aItem ); 
         aItem->SetAttributeL( KMenuAttrRefcount, buf);
         CleanupStack::Pop( aItem );
+    
         // return new ref_count
         return references;
         }
+    
     return -1;
     }
+
+// End of file
+
--- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsapplist.h	Fri Feb 19 23:07:29 2010 +0200
@@ -277,6 +277,12 @@
      * iMCSPluginFolderId
      */
     TInt iMCSPluginFolderId;
+
+public:
+    /**
+     * Name of "Undefined" application
+     */
+    HBufC* iUndefinedText;
 };
 
 #endif // CMCSPLUGINSETTINGSAPPLIST_H
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -43,6 +43,10 @@
 _LIT( KMCSFolder, "mcsplugin_folder" );
 _LIT8( KItemLocked, "locked");
 _LIT8( KProperValueFolder, "folder" );
+_LIT( KMenuAttrUndefUid, "0x99999991" );
+_LIT( KMenuItemLongName, "long_name" );
+
+#define KMCSCmailMtmUidValue 0x2001F406
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -67,6 +71,48 @@
     iSaveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
     iUpdateWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
     iRemoveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
+    
+    // Get "Undefined" icon and text
+    CMenuFilter* filter = CMenuFilter::NewL();
+    CleanupStack::PushL( filter );
+
+    // 'Undefined' item
+    filter->HaveAttributeL( KMenuAttrUid, KMenuAttrUndefUid );
+
+    TMenuItem item;
+    const TInt root = iMenu.RootFolderL();
+    RArray<TMenuItem> items;
+    CleanupClosePushL( items );
+    iMenu.GetItemsL( items, root, filter, ETrue );
+    TMenuItem undefItem;
+
+    if ( items.Count() > 0 )
+        {
+        undefItem = items[ 0 ];
+        CMenuItem* undefinedItem = CMenuItem::OpenL( iMenu, undefItem );
+        iUndefinedText = NULL;
+
+        if ( undefinedItem )
+            {
+            TBool exists( KErrNotFound );
+            CleanupStack::PushL( undefinedItem );
+            TPtrC undefined = undefinedItem->GetAttributeL( KMenuItemLongName, exists );
+
+            if ( exists )
+                {
+                iUndefinedText = HBufC::NewMaxL( undefined.Length() );
+                iUndefinedText->Des().Copy( undefined );
+                }
+            else
+                {
+                iUndefinedText = KNullDesC().Alloc();
+                }
+            CleanupStack::PopAndDestroy( undefinedItem );
+            }
+        }
+
+    CleanupStack::PopAndDestroy( &items );
+    CleanupStack::PopAndDestroy( filter );
     }
 
 // ---------------------------------------------------------------------------
@@ -96,6 +142,11 @@
     delete iUpdateWatcher;
     delete iRemoveWatcher;
     
+    if ( iUndefinedText )
+        {
+        delete iUndefinedText;
+        iUndefinedText = NULL;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -115,14 +166,15 @@
 //
 TPtrC CMCSPluginSettingsAppList::MdcaPoint( TInt aIndex ) const
     {
-    if (aIndex < 0 || aIndex >= iListItems.Count())
+    if ( aIndex < 0 || aIndex >= iListItems.Count() )
         {
-        TPtrC ret(KNullDesC);
+        TPtrC ret( KNullDesC );
         return ret;
         }
-    CMenuItem* item = iListItems[aIndex];
+    CMenuItem* item = iListItems[ aIndex ];
+
     TBool attrExists;
-    TPtrC itm; 
+    TPtrC itm;
     TRAP_IGNORE( 
         itm.Set( item->GetAttributeL( KMenuAttrLongName, attrExists ) );
         )
@@ -366,15 +418,16 @@
         TPtrC type = itemArray[ i ].Type();
         
         // we add applications, shortcuts and folders to the list
-        if ( type == KMenuTypeApp || type == KMenuTypeShortcut || 
+        if ( type == KMenuTypeApp || 
+             type == KMenuTypeShortcut || 
              type == KMenuTypeFolder )
             {
             CMenuItem* menuItem = CMenuItem::OpenL( iMenu, itemArray[ i ] );
             CleanupStack::PushL( menuItem );
 
             // only non-hidden and non-missing items should be offered to the user
-            if ( ( menuItem->Flags() & TMenuItem::EHidden ) == EFalse &&
-                 ( menuItem->Flags() & TMenuItem::EMissing ) == EFalse )
+            if ( ( menuItem->Flags() & TMenuItem::EHidden ) == 0 &&
+                 ( menuItem->Flags() & TMenuItem::EMissing ) == 0 )
                 {
                 User::LeaveIfError( iListItems.InsertInOrderAllowRepeats( menuItem, sortMethod ) );
                 CleanupStack::Pop( menuItem );
@@ -398,7 +451,7 @@
 //
 CMsvEntry* CMCSPluginSettingsAppList::GetRootEntryL()
     {
-    return iMsvSession->GetEntryL(KMsvRootIndexEntryIdValue);
+    return iMsvSession->GetEntryL( KMsvRootIndexEntryIdValue );
     }
 
 // ---------------------------------------------------------------------------
@@ -413,14 +466,22 @@
     CleanupStack::PushL(rootEntry);
     TBuf<255> mailboxId;
     
-    for ( TInt i = rootEntry->Count() - 1; i >= 0; --i )
+    TInt cnt = rootEntry->Count();
+    if ( cnt > 0 )
         {
-        const TMsvEntry& tentry = (*rootEntry)[i];
-
-        if (tentry.iMtm == KSenduiMtmImap4Uid || tentry.iMtm == KSenduiMtmPop3Uid)
+        rootEntry->SetSortTypeL( TMsvSelectionOrdering( 
+            KMsvGroupByType | KMsvGroupByStandardFolders, 
+            EMsvSortByDetailsReverse, ETrue ) );
+    
+        for ( TInt i = rootEntry->Count(); --i >= 0; )
             {
-            mailboxId.Num( tentry.Id() );  
-            AddMailboxL( tentry.iDetails, mailboxId );
+            const TMsvEntry& tentry = (*rootEntry)[i];
+    
+            if (tentry.iMtm.iUid == KMCSCmailMtmUidValue )
+                {
+                mailboxId.Num( tentry.Id() );  
+                AddMailboxL( tentry.iDetails, mailboxId );
+                }
             }
         }
     CleanupStack::PopAndDestroy(rootEntry);
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -88,7 +88,9 @@
         {
         iNotifyWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::ENotify );
         iNotifier.Notify( 0,
-            RMenuNotifier::EItemsAddedRemoved | RMenuNotifier::EItemsReordered,
+            RMenuNotifier::EItemsAddedRemoved | 
+            RMenuNotifier::EItemsReordered |
+            RMenuNotifier::EItemAttributeChanged,
         iNotifyWatcher->iStatus );
         iNotifyWatcher->WatchNotify( this );
         }
@@ -496,7 +498,9 @@
     // Notification must be activated again
     iNotifyWatcher->Cancel();
     iNotifier.Notify( 0,
-        RMenuNotifier::EItemsAddedRemoved | RMenuNotifier::EItemsReordered,
+        RMenuNotifier::EItemsAddedRemoved | 
+        RMenuNotifier::EItemsReordered |
+        RMenuNotifier::EItemAttributeChanged,
         iNotifyWatcher->iStatus );
     iNotifyWatcher->WatchNotify( this );
     }
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -84,7 +84,9 @@
    TInt formatLength = KSettingListboxLineFormat().Length();
 
    HBufC* listBoxLine =
-       HBufC::NewLC(title->Length() + caption.Length() + formatLength);
+       HBufC::NewLC( title->Length() + 
+                     caption.Length() + 
+                     formatLength );
 
    TPtr ptr = listBoxLine->Des();
    ptr.Format(KSettingListboxLineFormat, title, &caption);
@@ -198,11 +200,11 @@
     TSettingItem setting = { KErrNotFound, EApplication , EFalse };
 
     TSettingType type = SettingTypeL( aProperties );
-    if( type == EApplication )
+    if ( type == EApplication )
         {
         setting = iAppList->FindItemL( aProperties );
         }
-    else if( type == EBookmark )
+    else if ( type == EBookmark )
         {
         setting = iBkmList->FindItemL( aProperties );
         }
@@ -394,7 +396,7 @@
                 }
             }
         }
- // ETrue tells that modified settings are stored also to plugin reference
+    // ETrue tells that modified settings are stored also to plugin reference
     iPluginSettings->SetSettingsL( *iPluginId, settingItems, ETrue );
     CleanupStack::Pop( &settingItems );
     settingItems.ResetAndDestroy();
@@ -459,10 +461,23 @@
     }
     if ( iSettings[aIndex].type == EApplication )
         {
-        const TDesC& caption = iAppList->MdcaPoint( iSettings[aIndex].id );
-        TPtrC line; 
-        TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
-        return line; 
+        // first, we need to check if the item is missing 
+        // (application unistaled or mmc card removed)
+        // If it is, we return "Undefined" application name instead
+        if ( iSettings[ aIndex ].id == KErrNotFound )
+            {
+            const TDesC& caption = iAppList->iUndefinedText->Des();
+            TPtrC line; 
+            TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
+            return line; 
+            }
+        else
+            {
+            const TDesC& caption = iAppList->MdcaPoint( iSettings[ aIndex ].id );
+            TPtrC line; 
+            TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
+            return line; 
+            }
         }
     else
         {
--- a/idlefw/plugins/profileplugin/data/aiprofileplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/data/aiprofileplugin.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -19,6 +19,7 @@
 // INCLUDES
 #include <ecom/registryinfov2.rh>
 #include <platform/mw/aiprofilepluginuids.hrh>
+#include <hscontentpublisheruid.hrh>
 
 
 // -----------------------------------------------------------------------------
@@ -41,7 +42,7 @@
         INTERFACE_INFO
         {
             // UID of interface that is implemented
-            interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
+            interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
 
             implementations = 
             {
--- a/idlefw/plugins/profileplugin/data/aiprofilepluginres.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/data/aiprofilepluginres.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -93,4 +93,15 @@
          };
      }
  
+// -----------------------------------------------------------------------------
+//
+// "Insert SIM card and restart"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_su_note_insert_sim_and_restart
+    {
+    buf = qtn_su_note_insert_sim_and_restart;
+    }
+
 // End of File.
--- a/idlefw/plugins/profileplugin/group/aiprofileplugin.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/group/aiprofileplugin.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -51,6 +51,7 @@
 LIBRARY         ecom.lib
 LIBRARY         aiutils.lib
 LIBRARY         sssettings.lib
+LIBRARY         profileengine.lib 
 LIBRARY         profileeng.lib
 LIBRARY         bafl.lib
 LIBRARY         avkon.lib
--- a/idlefw/plugins/profileplugin/inc/caiprofileengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/inc/caiprofileengine.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,17 +19,23 @@
 #ifndef CAIPROFILEENGINE_H
 #define CAIPROFILEENGINE_H
 
-// INCLUDE FILES
+// System includes
 #include <e32base.h>
 #include <badesca.h>
 #include <ConeResLoader.h>
 #include <MSSSettingsObserver.h>
-#include <MProfileChangeObserver.h>
+#include <MProEngActiveProfileObserver.h>
+#include <MProEngProfileNameArrayObserver.h>
+#include <MProEngProfileActivationObserver.h>
+
+// User includes
 #include "maiprofilepluginnotifier.h"
 
-class MProfileEngine;
-class CProfileChangeNotifyHandler;
-class MProfilesNamesArray;
+// Forward declarations
+class MProEngEngine;
+class MProEngNotifyHandler;
+class MProEngProfileNameArray;
+
 class RSSSettings;
 
 /**
@@ -39,21 +45,14 @@
  *
  *  @since S60 v3.2
  */
-class CAiProfileEngine : public CBase, 
-						 public MSSSettingsObserver,
-						 public MProfileChangeObserver					 
-{
-
-public:  // Constructors and destructor
-
-    /**
-    * Constructor to use in the object creation. Initializes the necessary data.
-    *
-    * @param MAiProfilePluginNotifier* aNotifier a pointer to a object implementing MAiProfilePluginNotifier
-            (the object ordering a notification of the content status change)
-    * @return none
-    */
-    CAiProfileEngine( MAiProfilePluginNotifier* aProfilePluginNotifier );
+NONSHARABLE_CLASS( CAiProfileEngine ) : public CBase, 
+    public MSSSettingsObserver,
+    public MProEngActiveProfileObserver,
+    public MProEngProfileNameArrayObserver,
+    public MProEngProfileActivationObserver     						
+    {
+public:  
+    // constructors and destructor
 
     /**
     * Part of the two phased constuction
@@ -71,30 +70,32 @@
     * @return none
     */
     ~CAiProfileEngine();
+
+private:
+    // constructors
     
     /**
-    * Resumes the engine
+    * Constructor to use in the object creation. Initializes the necessary data.
     *
-    * @param void
-    * @return void
+    * @param MAiProfilePluginNotifier* aNotifier a pointer to a object implementing MAiProfilePluginNotifier
+            (the object ordering a notification of the content status change)
+    * @return none
     */
-    void ResumeL();
-
+    CAiProfileEngine( MAiProfilePluginNotifier* aProfilePluginNotifier );
+    
     /**
-    * Suspends the engine
-    *
-    * @param void
-    * @return void
-    */
-    void Suspend();
-
+     * 2nd phase constructor
+     */
+    void ConstructL();
+    
 public:
-
+    // New functions
+    
 	const TDesC& ActiveProfileName() const;
 	
 	const TDesC& SwapProfileName() const;
 		
-	TInt NumberOfProfiles();
+	TInt NumberOfProfiles() const;
 	
 	const TDesC& ProfileNameByIndex( TInt aIndex ) const;
 	
@@ -102,23 +103,22 @@
 	
 	void SetActiveProfileL( const TInt aProfileId );
 	
-	TBool IsActiveProfileSilentL();
+	TBool IsActiveProfileSilentL() const;
 	
-	TBool IsActiveProfileTimedL();
+	TBool IsActiveProfileTimedL() const;
 	
 	void UpdateProfileNamesL();
 	
-	TBool IsOffline();
+	TBool IsOffline() const;
    
-private:
-
-    void ConstructL();
+private:   
+    // new functions
     
     void SetActiveProfileNameL( const TDesC& aName );
     
     void SetSwapProfileNameL( const TDesC& aName );
     
-    void SetProfileNameListL( const MProfilesNamesArray& aArray );
+    void SetProfileNameListL( const MProEngProfileNameArray& aArray );
     
     void HandleSwitchByNameL( const TDesC& aParam );
     
@@ -130,72 +130,62 @@
     
     TBool ShowOfflineMessageL();
            
+    void NotifyContentUpdate();
   
-protected:
-
-// from base class MSSSettingsObserver
-
-    /**
-     * Called when SS Settings changes.
-     */
-    void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue );
-
-
-// from base class MProfileChangeObserver
+private:
+    // from MSSSettingsObserver
 
     /**
-     * Called when active profile changes.
+     * @see MSSSettingsObserver
      */
-    void HandleActiveProfileEventL( TProfileEvent aProfileEvent, TInt aProfileId );
-    
+    void PhoneSettingChanged( 
+        TSSSettingsSetting aSetting, TInt aNewValue );
+        
 private:
-    /**
-     * Pointer to the class implementing the MAiProfilePluginNotifier interface
-     */
-    MAiProfilePluginNotifier* iProfilePluginNotifier;
-    
-    /**
-     * Client to listen SS setting changes.
-     */
-    RSSSettings iSSSettings;
+    // from MProEngActiveProfileObserver
 
     /**
-     * Profile engine.
-     * Own.
-     */
-    MProfileEngine* iProfileEngine;
-
-    /**
-     * Profile change notifier.
-     * Own
-     */
-    CProfileChangeNotifyHandler* iProfileNotifier;
+     * @see MProEngActiveProfileObserver    
+     */        
+    void HandleActiveProfileModifiedL();
+    
+private:
+    // from MProEngProfileNameArrayObserver
     
-    /*
-     * Active profile name
-     * Own
-     */    
-    HBufC* iActiveProfileName;
+    /**
+     * @see MProEngProfileNameArrayObserver    
+     */        
+    void HandleProfileNameArrayModificationL();
     
-    /*
-     * Swap profile name
-     * Own
-     */    
-    HBufC* iSwapProfileName;
+private:
+    // from MProEngProfileActivationObserver
     
     /**
-     * Array of Profile Name Pointer.
-     * Own.
-     */
-    RPointerArray<HBufC> iProfileNamePointerArray;
+     * @see MProEngProfileActivationObserver    
+     */    
+    void HandleProfileActivatedL( TInt aProfileId ); 
+    
+private:
+    // data
     
-    /**
-     * Resource loader for own resources.
-     */
+    /** MAiProfilePluginNotifier interface, not owned */ 
+    MAiProfilePluginNotifier* iProfilePluginNotifier;    
+    /** Client to listen SS setting changes, owned */
+    RSSSettings iSSSettings;
+    /** Profile engine, owned */
+    MProEngEngine* iProfileEngine;
+    /** Profile change notifier, owned */
+    MProEngNotifyHandler* iProfileNotifier;    
+    /** Active profile name, owned */
+    HBufC* iActiveProfileName;    
+    /** Swap profile name, owned */
+    HBufC* iSwapProfileName;    
+    /** Array of Profile Names, owned */
+    RPointerArray< HBufC > iProfileNamePointerArray;    
+    /** Resource loader, owned */
     RConeResourceLoader iResourceLoader;
-
-};
+    };
 
 #endif // CAIPROFILEENGINE_H
 
-
+// End of file
--- a/idlefw/plugins/profileplugin/inc/caiprofileplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/inc/caiprofileplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,12 +19,14 @@
 #ifndef CAIPROFILEPLUGIN_H
 #define CAIPROFILEPLUGIN_H
 
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
+// System includes
+
+// User includes
+#include <hscontentpublisher.h>
 #include <aicontentmodel.h>
-#include <aieventhandlerextension.h>
 #include "maiprofilepluginnotifier.h"
 
+// Forward declarations
 class MAiContentObserver;
 class MAiContentItemIterator;
 class CAiProfileEngine;
@@ -36,16 +38,12 @@
  *
  *  @since S60 v3.2
  */
-class CAiProfilePlugin : public CAiContentPublisher,
-                     	 public MAiPropertyExtension,
-                     	 public MAiProfilePluginNotifier,
-                     	 public MAiEventHandlerExtension
-                     	 
-                    
+NONSHARABLE_CLASS( CAiProfilePlugin ) : public CHsContentPublisher,
+    public MAiProfilePluginNotifier                     	                     
     {
-
 public:
-
+    // constructors and destructor
+    
     /**
     * Part of the two phased constuction
     *
@@ -53,7 +51,18 @@
     * @return none
     */
     static CAiProfilePlugin* NewL();
-    
+        
+    /**
+    * Destructor
+    *
+    * @param none
+    * @return none
+    */
+    ~CAiProfilePlugin();
+
+private:
+    // constructors
+
     /**
     * Constructor
     *
@@ -63,12 +72,63 @@
     CAiProfilePlugin();
     
     /**
-    * Destructor
-    *
-    * @param none
-    * @return none
+    * 2nd phase constructor
     */
-    ~CAiProfilePlugin();
+    void ConstructL();
+    
+public:    
+    // from CHsContentPublisher
+  
+    /**
+     * @see CHsContentPublisher
+     */
+    void Start( TStartReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void Stop( TStopReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void Resume( TResumeReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void Suspend( TSuspendReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void SubscribeL( MAiContentObserver& aObserver );
+    
+    /**
+     * @see CHsContentPublisher
+     */
+    void ConfigureL( RAiSettingsItemArray& aSettings );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    TAny* GetProperty( TProperty aProperty );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void HandleEvent( TInt aEvent, const TDesC& aParam );
+
+private:    
+    // from MAiProfilePluginNotifier  
+  
+    /**
+    * @see MAiProfilePluginNotifier
+    */
+	void NotifyContentUpdate();
+	
+public:
+    // new functions
     
     /**
     * Publishes profile names
@@ -77,158 +137,19 @@
     * @return void
     */
     void PublishL();
-
-// from base class CAiContentPublisher
-  
-    /**
-    * From CAiContentPublisher
-    * The method is called by the framework to request the plug-in free all
-    * memory and CPU resources and close all its open files, e.g. the plug-in 
-    * should unload its engines due backup operation. The method transits the 
-    * plug-in to "Idle" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Stop( TAiTransitionReason aReason );
-
-    /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * allowed to consume CPU resources, e.g plug-in is able to run timers,
-    * perform asynchronous operations, etc. The method transits the plug-in
-    * to "Alive" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Resume( TAiTransitionReason aReason );
-
-    /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * not allowed to consume CPU resources, e.g plug-in MUST stop each
-    * timers, cancel outstanding asynchronous operations, etc. The method
-    * transits the plug-in to "Suspendend" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Suspend( TAiTransitionReason aReason );
-
-    /**
-    * From CAiContentPublisher
-    * Adds the content observer / subscriber to plug-in. The plug-in MUST
-    * maintain a registry of subscribers and send notification to all them
-    * whenever the plug-in changes state or new content available.
-    *
-    * @param aObserver content observer to register.
-    * @return void
-    */
-    void SubscribeL( MAiContentObserver& aObserver );
-    
-    /**
-    * From CAiContentPublisher
-    * Configures the plug-in.
-    * Plug-ins take ownership of the settings array, so it must either
-    * store it in a member or free it. Framework has put the array in cleanup
-    * stack so the plugin shouldn't do that.
-    * If this leaves, the plug-in will be destroyed by AI FW.
-    * Plug-in must support LaunchByValue-event even if normal shortcuts don't
-    * work. The only allowed serious enough leave is KErrNotFound from CenRep.
-    *
-    * @param aSettings setting items defined in the UI definition.
-    * @return void
-    */
-    void ConfigureL( RAiSettingsItemArray& aSettings );
-
-    /**
-    * From CAiContentPublisher
-    * Returns interface extension. In Series 60 3.1 only event & property
-    * extensions are supported. See MAiEventExtension & MAiPropertyExtension
-    * interfaces.
-    *
-    * @param  aUid - UID of the extension interface to access.
-    * @return the extension interface. Actual type depends on the passed aUid 
-    *         argument.
-    */
-    TAny* Extension( TUid aUid );  
-
-// from base class MAiPropertyExtension
-
-    /**
-    * From MAiPropertyExtension.
-    * Read property of publisher plug-in.
-    *
-    * @param aProperty - identification of property.
-    * @return pointer to property value.
-    */
-    TAny* GetPropertyL( TInt aProperty );
-
-    /**
-    * From MAiPropertyExtension.
-    * Write property value.
-    *
-    * @param aProperty - identification of property.
-    * @param aValue - contains pointer to property value.
-    */
-    void SetPropertyL( TInt aProperty, TAny* aValue );
-  
- // from base class MAiEventHandlerExtension
-   
-     /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     *
-     * @param aEvent - unique identifier of event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where <event name> is mapped by the framework to unique
-     *        identifier supplied in aEvent, <event params> are provided to
-     *        plug-in as-is in the descriptor.
-     * @since S60 3.2
-     */
-    void HandleEvent(TInt aEvent, const TDesC& aParam);
- 
-// from base class MAiProfilePluginNotifier  
-  
-    /**
-    * Receives a notification of the content update event
-    *
-    * @param void
-    * @return void
-    */
-	void NotifyContentUpdate();
 	
-protected:
-
 private:
-
-    /**
-    * Part of the two phased construction
-    *
-    * @param void
-    * @return void
-    */
-    void ConstructL();
+    // new functions
     
     /**
     * Resume the plug-in.
     *
-    * @param aReason reason for state change, see TAiTransitionChange.
+    * @param void
     * @return void
     */    
-    void DoResumeL(TAiTransitionReason aReason);
+    void DoResumeL();
     
     /**
-    * Free the engine
-    *
-    * @param void
-    * @return void
-    */  
-    void FreeEngine();
-
-    /**
     * Clean profile names from published content
     *
     * @param void
@@ -236,48 +157,31 @@
     */  
     void CleanPublishedProfileNames();
 
-private: // data
-
-    // Iterator for plugin content
-    // Own
-    MAiContentItemIterator* iContent;
-
-    // Iterator for plugin events
-    // Own
-    MAiContentItemIterator* iEvents;
-    
-    // Iterator for plug-in resources.
-    // Own
-    MAiContentItemIterator* iResources;
-     
-    // Plugin engine
-    // Own
-    CAiProfileEngine* iEngine;
+private: 
+    // data
 
-    // Array of content observers
-    // Own
-    RPointerArray<MAiContentObserver> iObservers;
-    
-    // Information about the content publisher (this plug-in)
-    TAiPublisherInfo iInfo;
-    
-    // Current profile count
+    /** Iterator for plugin content, owned */    
+    MAiContentItemIterator* iContent;
+    /** Iterator for plugin events, owned */    
+    MAiContentItemIterator* iEvents;    
+    /** Iterator for plug-in resources, owned */    
+    MAiContentItemIterator* iResources;    
+    /** Plugin engine, owned */    
+    CAiProfileEngine* iEngine;
+    /** Array of content observers */    
+    RPointerArray<MAiContentObserver> iObservers;    
+    /** Current profile count */
     TInt iCurrentCount;
-
-    // Profile count that is used as reference when profile list is updated
-    TInt iPreviousCount;
-	
-	//Plug-in state, suspended or alive. 
-    TBool iAlive;
-	
-	// Boolean, which expresses whether the content has been updated
-	TBool iIsUpdated;
-	
-	HBufC *iActiveProfileAndChar;
-	
-	HBufC *iPreviousProfileNameAndChar;
+    /** Profile count that is used as reference when profile list is updated */
+    TInt iPreviousCount;			
+	/** Active profile, owned */
+    HBufC* iActiveProfileAndChar;
+	/** Previous profile, owned */
+	HBufC* iPreviousProfileNameAndChar;
     };
 
 #endif // CAIPROFILEPLUGIN_H
 
+// End of file
 
+
--- a/idlefw/plugins/profileplugin/inc/maiprofilepluginnotifier.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/inc/maiprofilepluginnotifier.h	Fri Feb 19 23:07:29 2010 +0200
@@ -30,15 +30,16 @@
 */
 class MAiProfilePluginNotifier 
     {
-    public: 
+public: 
 
-        /**
-        * Virtual method, which the plugin class has to implement.
-		* Method is used to send notification of P&S data's change event
-		* from engine to plugin.
-        *
-        */
-	inline virtual void NotifyContentUpdate() = 0;  
+    /**
+    * Virtual method, which the plugin class has to implement.
+    * Method is used to send notification of P&S data's change event
+    * from engine to plugin.
+    */
+	virtual void NotifyContentUpdate() = 0;  
     };
 
-#endif //MAIPROFILEPLUGINNOTIFIER_H  
\ No newline at end of file
+#endif // MAIPROFILEPLUGINNOTIFIER_H
+
+// End of file
--- a/idlefw/plugins/profileplugin/src/caiprofileengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/src/caiprofileengine.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -16,16 +16,15 @@
 */
 
 
-// INCLUDE FILES
-#include "caiprofileengine.h"
-#include "maiprofilepluginnotifier.h"
-#include "aiprofileplugincontentmodel.h"
-
+// System includes
 #include <w32std.h> 
+#include <ProEngFactory.h>
 #include <MProfileEngine.h>
-#include <MProfile.h>
-#include <MProfilesNamesArray.h>
-#include <MProfileName.h>
+#include <MProEngEngine.h>
+#include <MProEngProfile.h>
+#include <MProEngProfileName.h>
+#include <MProEngProfileNameArray.h>
+#include <MProEngNotifyHandler.h>
 #include <Profile.hrh>
 #include <CProfileChangeNotifyHandler.h>
 #include <PUAcodes.hrh> 
@@ -36,12 +35,15 @@
 #include <AknQueryDialog.h>
 #include <aknnotewrappers.h>
 #include <RSSSettings.h>
-
-
-#include <aiprofilepluginres.rsg>
-
 #include <startupdomainpskeys.h>
 
+// User includes
+#include <aiprofilepluginres.rsg>
+#include "caiprofileengine.h"
+#include "maiprofilepluginnotifier.h"
+#include "aiprofileplugincontentmodel.h"
+
+// Constants
 const TInt KMaxProfileNameLength( 64 );
 const TInt KGeneralProfileId( 0 );
 const TInt KSilentProfileId( 1 );
@@ -53,35 +55,41 @@
 
 _LIT( KAiProfilePluginResourceFileName, "z:aiprofilepluginres.rsc");
 
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::CAiProfileEngine
 //
-CAiProfileEngine::CAiProfileEngine( MAiProfilePluginNotifier* aProfilePluginNotifier ) :
-    iProfilePluginNotifier ( aProfilePluginNotifier ),
+// ----------------------------------------------------------------------------
+//
+CAiProfileEngine::CAiProfileEngine( 
+    MAiProfilePluginNotifier* aProfilePluginNotifier )
+    : iProfilePluginNotifier ( aProfilePluginNotifier ),    
     iResourceLoader( *CCoeEnv::Static() )
     {
     }
     
-// ---------------------------------------------------------
-// Two-phased constructor.
-// Create instance of concrete ECOM interface implementation
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::NewL
+// 
+// ----------------------------------------------------------------------------
 //
-CAiProfileEngine* CAiProfileEngine::NewL( MAiProfilePluginNotifier* aProfilePluginNotifier )
+CAiProfileEngine* CAiProfileEngine::NewL( 
+    MAiProfilePluginNotifier* aProfilePluginNotifier )
     {
-    CAiProfileEngine* self = new( ELeave ) CAiProfileEngine( aProfilePluginNotifier );
+    CAiProfileEngine* self = 
+        new( ELeave ) CAiProfileEngine( aProfilePluginNotifier );
     CleanupStack::PushL( self );
+    
     self->ConstructL();
     CleanupStack::Pop( self );
 
     return self;
     }
 
-// ---------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::ConstructL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::ConstructL()
     {
@@ -97,87 +105,120 @@
     
     User::LeaveIfError( iSSSettings.Open() );
 
-    iProfileEngine = CreateProfileEngineL();    
-   }
-    
+    // Register to listen ALS activation, if ALS status changes,
+    // profile must be republished.
+    TInt err( iSSSettings.Register( ESSSettingsAls, *this ) );
+        
+    if( err == KErrNotSupported || err == KErrAlreadyExists )
+        {
+        // ALS not supported or already registered, that's fine
+        err = KErrNone;
+        }
+
+    User::LeaveIfError( err );
     
-// ---------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------
+    iProfileEngine = ProEngFactory::NewEngineL();
+    
+    // Start to listen profile changes.
+    iProfileNotifier = ProEngFactory::NewNotifyHandlerL();
+    
+    iProfileNotifier->RequestActiveProfileNotificationsL( *this );
+    iProfileNotifier->RequestProfileNameArrayNotificationsL( *this );
+    iProfileNotifier->RequestProfileActivationNotificationsL( *this ); 
+    }
+    
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::~CAiProfileEngine
+//
+// ----------------------------------------------------------------------------
 //
 CAiProfileEngine::~CAiProfileEngine()
     {
     iSSSettings.CancelAll( *this );
     iSSSettings.Close();
-    delete iProfileNotifier;
+    
 	delete iActiveProfileName;
 	delete iSwapProfileName;
 	
-	if( iProfileNamePointerArray.Count() )
-    	{
-        iProfileNamePointerArray.ResetAndDestroy();
-        }
-
+	iProfileNamePointerArray.ResetAndDestroy();
+	
+	if ( iProfileNotifier )
+	    {
+        iProfileNotifier->CancelAll();
+	    }
+	
+	delete iProfileNotifier;
+	
     if( iProfileEngine )
         {
         iProfileEngine->Release();
         }
-    
-    iResourceLoader.Close();            	 
+            
+    iResourceLoader.Close();
     }
     
-// ---------------------------------------------------------
-// Updates profiles
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::UpdateProfileNamesL()
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::UpdateProfileNamesL()
 	{
-	//update active profile name
-	HBufC* activeProfileName = NULL;
+    // Update active profile name
+    MProEngProfile* profile( iProfileEngine->ActiveProfileLC() );	
 	
-	MProfile* profile = iProfileEngine->ActiveProfileLC();	
-	const MProfileName& name = profile->ProfileName();	
-	activeProfileName = name.Name().AllocLC();
+	const MProEngProfileName& name( profile->ProfileName() );	
+
+	HBufC* activeProfileName( name.Name().AllocLC() );
 
 	SetActiveProfileNameL( *activeProfileName );
       
-    //update profile name list	
-	MProfilesNamesArray* profileNamesArray = iProfileEngine->ProfilesNamesArrayLC();
+    // Update profile name list	
+	MProEngProfileNameArray* profileNamesArray( 
+        iProfileEngine->ProfileNameArrayLC() );
     
     SetProfileNameListL( *profileNamesArray );
     
-    //update swap profile name
-    HBufC* swapProfileName = NULL;
+    // Update swap profile name
+    HBufC* swapProfileName( NULL );
     
-    TInt activeProfileId = iProfileEngine->ActiveProfileId();
+    TInt activeProfileId( iProfileEngine->ActiveProfileId() );
     
     if( activeProfileId == KSilentProfileId )
     	{
-        const MProfileName* generalProfileName = profileNamesArray->ProfileName( KGeneralProfileId );	
-		swapProfileName = generalProfileName->Name().AllocLC();	
+        TInt generalProfileIndex( 
+            profileNamesArray->FindById( KGeneralProfileId ) );
+        
+		swapProfileName = 
+            profileNamesArray->MdcaPoint( generalProfileIndex ).AllocLC() ;		        
     	}
     else
         {
-        const MProfileName* silentProfileName = profileNamesArray->ProfileName( KSilentProfileId );	
-		swapProfileName = silentProfileName->Name().AllocLC();	
+        TInt silentProfileIndex( 
+            profileNamesArray->FindById( KSilentProfileId ) );	
+		
+        swapProfileName = 
+            profileNamesArray->MdcaPoint( silentProfileIndex ).AllocLC() ;                
         }
     
     TPtrC swapProfileNamePtr( *swapProfileName );
-	HBufC* activateProfileString = NULL;
-    activateProfileString = StringLoader::LoadLC( R_AI_PERS_PROF_TOGGLE, swapProfileNamePtr );    	
+	   
+	HBufC* activateProfileString( StringLoader::LoadLC( 
+        R_AI_PERS_PROF_TOGGLE, swapProfileNamePtr ) );    	
     
     SetSwapProfileNameL( *activateProfileString );
 
-    CleanupStack::PopAndDestroy( 5 ); //profile, profileName, profileNamesArray, swapProfileName, activateProfileString 
+    CleanupStack::PopAndDestroy( 5 ); //profile, profileName, // profileNamesArray, swapProfileName, activateProfileString           
 	}
 
-// ---------------------------------------------------------
-// Checks SIM card status
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::ShowOfflineMessageL
+//
+// ----------------------------------------------------------------------------
 //
 TBool CAiProfileEngine::ShowOfflineMessageL()
 	{
-	TInt result = ETrue;
+	TInt result( ETrue );
 	
     TInt simCardStatus( ESimNotPresent );
         
@@ -186,42 +227,51 @@
     User::LeaveIfError( simStatus.Get( simCardStatus ) );
     simStatus.Close();
 
- 	if( simCardStatus == ESimNotPresent )
+ 	if ( simCardStatus == ESimNotPresent )
 		{
 		// SIM card does not exist.
-	    HBufC* infoNoteText = StringLoader::LoadLC( R_SU_NOTE_INSERT_SIM );
+	    HBufC* infoNoteText = StringLoader::LoadLC( R_SU_NOTE_INSERT_SIM_AND_RESTART );
+		
 	    CAknInformationNote* note = new( ELeave ) CAknInformationNote( ETrue );
 	    note->ExecuteLD( *infoNoteText );
+	    
 	    CleanupStack::PopAndDestroy( infoNoteText );
+	    
 	    result = EFalse;	
 		}
 	else
 		{
 		CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+		
 		result = dlg->ExecuteLD( R_AI_LEAVE_OFFLINE_MODE_QUERY );	
 		}
        
 	return result;
 	}
-
-									  
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+								  
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::SetActiveProfileNameL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::SetActiveProfileNameL( const TDesC& aName )
     {
-    HBufC* temp = aName.AllocL();
+    HBufC* temp( aName.AllocL() );
+    
+    TPtr profileNamePtr( temp->Des() );
+    
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr );
+    
     delete iActiveProfileName;
     iActiveProfileName = NULL;
-    TPtr profileNamePtr = temp->Des();
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr );
+    
     iActiveProfileName = temp;  
     }
     
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::ActiveProfileName
+//
+// ----------------------------------------------------------------------------
 //
 const TDesC& CAiProfileEngine::ActiveProfileName() const
     {
@@ -233,23 +283,29 @@
     return KNullDesC();
     }
 
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::SetSwapProfileNameL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::SetSwapProfileNameL( const TDesC& aName )
     {
-    HBufC* temp = aName.AllocL();
-    delete iSwapProfileName;
+    HBufC* temp( aName.AllocL() );
+        
+    TPtr profileNamePtr( temp->Des() );
+    
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr );
+    
+    delete iSwapProfileName;    
     iSwapProfileName = NULL;
-    TPtr profileNamePtr = temp->Des();
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr );
+
     iSwapProfileName = temp;  
     }
     
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::SwapProfileName
+//
+// ----------------------------------------------------------------------------
 //
 const TDesC& CAiProfileEngine::SwapProfileName() const
     {
@@ -261,82 +317,101 @@
     return KNullDesC();
     }
 
-
-// ---------------------------------------------------------
-// Set profile names
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::SetProfileNameListL
 //
-void CAiProfileEngine::SetProfileNameListL( const MProfilesNamesArray& aArray )
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::SetProfileNameListL( 
+    const MProEngProfileNameArray& aArray )
     {
-    if( iProfileNamePointerArray.Count() )
-    	{
-        iProfileNamePointerArray.ResetAndDestroy();
-        }
-      
-    const TInt count = aArray.MdcaCount();
+    iProfileNamePointerArray.ResetAndDestroy();
+
+    const TInt count( aArray.MdcaCount() );
+    
     TBufC<KMaxProfileNameLength> profileName;
          
-    for( TInt i = 0; i < count; i++ )
+    for ( TInt i = 0; i < count; i++ )
     	{
     	profileName = aArray.MdcaPoint( i );
-    	TPtr profileNamePtr = profileName.Des();
-    	AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr );
-    	HBufC* profile = profileNamePtr.AllocLC();
-    	User::LeaveIfError( iProfileNamePointerArray.Append( profile ));
+    	
+    	TPtr profileNamePtr( profileName.Des() );
+    	
+    	AknTextUtils::DisplayTextLanguageSpecificNumberConversion( 
+    	        profileNamePtr );
+    	
+    	HBufC* profile( profileNamePtr.AllocLC() );
+    	
+    	iProfileNamePointerArray.AppendL( profile );    	
     	CleanupStack::Pop( profile );
     	}
     }
     
-
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::ProfileNameByIndex
+//
+// ----------------------------------------------------------------------------
 //
 const TDesC& CAiProfileEngine::ProfileNameByIndex( TInt aIndex ) const
     {
- 	if( iProfileNamePointerArray.Count() )
+    TInt count( iProfileNamePointerArray.Count() );
+    
+ 	if(  aIndex < count && aIndex >= 0 )
  		{
- 		return *iProfileNamePointerArray[aIndex];
+ 		return *iProfileNamePointerArray[ aIndex ];
  		}
  	
  	return KNullDesC();
     }
 
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::IsActiveProfileSilentL
 //
-TBool CAiProfileEngine::IsActiveProfileSilentL()
+// ----------------------------------------------------------------------------
+//
+TBool CAiProfileEngine::IsActiveProfileSilentL() const
 	{
-	TBool isSilent = EFalse;
-	MProfile* profile = iProfileEngine->ActiveProfileLC();
-	isSilent = profile->IsSilent();
+    MProEngProfile* profile( iProfileEngine->ActiveProfileLC() );
+    	
+	TBool silent( profile->IsSilent() );
+	
 	CleanupStack::PopAndDestroy();
-	return isSilent; 
+	
+	return silent; 
 	}
 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::IsActiveProfileTimedL
 // 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
-TBool CAiProfileEngine::IsActiveProfileTimedL()
-	{
-	return iProfileEngine->IsActiveProfileTimedL();
+TBool CAiProfileEngine::IsActiveProfileTimedL() const
+	{    
+    MProfileEngine* engine = CreateProfileEngineL();
+        
+    TBool retval( EFalse );
+    
+    TRAP_IGNORE( retval = engine->IsActiveProfileTimedL() );
+    
+    engine->Release();
+    
+    return retval;	
 	}
 
-// ---------------------------------------------------------
-// Number of profiles
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::NumberOfProfiles
 //
-TInt CAiProfileEngine::NumberOfProfiles()
+// ----------------------------------------------------------------------------
+//
+TInt CAiProfileEngine::NumberOfProfiles() const
 	{	
 	return iProfileNamePointerArray.Count();
 	}
 
-
-// ---------------------------------------------------------
-// 
-// ---------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleAiEventL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::HandleAiEventL( TInt aEvent, const TDesC& aParam )
 	{
@@ -357,86 +432,96 @@
         case EAiProfileEditActive:
             HandleEditActiveProfileL();
             break;
+            
         default:
             break;
         }
 	}
 
-
-// -----------------------------------------------------------------------------
-// Handles profile switch by index event
-// -----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleSwitchByIndexL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::HandleSwitchByIndexL( const TDesC& aParam )
 	{
     if ( aParam.Length() > 0 )
     	{
-        TInt profileId = KErrNotFound;
+        TInt index( KErrNotFound );
 		TPtrC ptr( aParam );
 		TLex lexer( ptr );
 			
-    	TInt err = lexer.Val( profileId );  
+    	TInt err( lexer.Val( index ) );
+    	
 		if ( err == KErrNone )
 			{
-			MProfilesNamesArray* profileNamesArray = iProfileEngine->ProfilesNamesArrayLC();
-			const MProfileName* profileName = profileNamesArray->ProfileName( profileId );
-		 
-		    if( profileName )
-        		{
-	            profileId = profileName->Id();
-		    	SetActiveProfileL( profileId );
-        		}
+            MProEngProfileNameArray* profileNamesArray( 
+                iProfileEngine->ProfileNameArrayLC() );
+		
+            TInt profileId( profileNamesArray->ProfileId( index ) );
+             
+            if ( profileId != KErrNotFound )
+                {
+                SetActiveProfileL( profileId );
+                }            
 		    
 		    CleanupStack::PopAndDestroy();
 		   	}
     	}
 	}
 
-// -----------------------------------------------------------------------------
-// Handles profile switch by name event
-// -----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleSwitchByNameL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::HandleSwitchByNameL( const TDesC& aParam )
 	{
     if ( aParam.Length() > 0 )
-    	{
-    	TInt profileId = KErrNotFound;
-        MProfilesNamesArray* profileNamesArray = iProfileEngine->ProfilesNamesArrayLC();
-        profileId = profileNamesArray->FindByName( aParam );
-        if( profileId != KErrNotFound )
+    	{    	
+        MProEngProfileNameArray* profileNamesArray( 
+            iProfileEngine->ProfileNameArrayLC() );
+            
+        TInt index( profileNamesArray->FindByName( aParam ) );
+        
+        if( index != KErrNotFound )
         	{
-        	SetActiveProfileL( profileId );
+        	SetActiveProfileL( profileNamesArray->ProfileId( index ) );
         	}
-    	
+        
     	CleanupStack::PopAndDestroy();
     	}
 	}
 
-// -----------------------------------------------------------------------------
-// Handles profile swap event
-// -----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleSwapL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::HandleSwapL( const TDesC& aParam )
 	{
 	if ( aParam.Length() > 0 )
 		{
-		TInt profileId = KErrNotFound;
+		TInt profileId( KErrNotFound );
 		TPtrC ptr( aParam );
 		TLex lexer( ptr );
 			
-    	TInt err = lexer.Val( profileId );  
+    	TInt err( lexer.Val( profileId ) );
+    	
 		if ( err == KErrNone )
 			{
-			TInt activeProfile = iProfileEngine->ActiveProfileId();
+			TInt activeProfile( iProfileEngine->ActiveProfileId() );
 			
 			if( activeProfile != profileId )
 				{
-				MProfilesNamesArray* profileNamesArray = iProfileEngine->ProfilesNamesArrayLC();
+                MProEngProfileNameArray* profileNamesArray( 
+                    iProfileEngine->ProfileNameArrayLC() );
+	            						
         		profileId = profileNamesArray->FindById( profileId );
 		    
 		    	if( profileId != KErrNotFound )
         			{
-		    		TRAP_IGNORE( SetActiveProfileL( profileId ) );
+		    		SetActiveProfileL( profileId );
         			}
         		
         		CleanupStack::PopAndDestroy();	
@@ -449,45 +534,51 @@
 		}
 	}
 
-// -----------------------------------------------------------------------------
-// Handles edit active profile event
-// -----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleEditActiveProfileL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::HandleEditActiveProfileL()
     {
     RWsSession ws;
-    User::LeaveIfError(ws.Connect());
-    CleanupClosePushL(ws);
+    User::LeaveIfError( ws.Connect() );
+    CleanupClosePushL( ws );
 
     // Find the task with uid
-    TApaTaskList taskList(ws);
-    TApaTask task = taskList.FindApp( KUidProfileApp );
+    TApaTaskList taskList( ws );
+    TApaTask task( taskList.FindApp( KUidProfileApp ) );
 
     if ( task.Exists() )
         {
         task.EndTask();
         User::After( 500000 );
         }
-    CleanupStack::PopAndDestroy(&ws);
+    
+    CleanupStack::PopAndDestroy( &ws );
     
     TVwsViewId viewid( KUidProfileApp, KProfileAppSettingViewId );
-    TInt profileId = iProfileEngine->ActiveProfileId();
+    
+    TInt profileId( iProfileEngine->ActiveProfileId() );
+    
     TBuf8<KMaxActiveProfileLength> buf;
-    buf.AppendNum(profileId);
-    CEikonEnv::Static()->AppUi()->ActivateViewL( viewid ,KProfileAppSettingViewId,buf);
+    buf.AppendNum( profileId );
     
-
+    CEikonEnv::Static()->AppUi()->ActivateViewL( 
+        viewid, KProfileAppSettingViewId, buf );
     }
 
-// -----------------------------------------------------------------------------
-//  Set active profile
-// -----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::SetActiveProfileL
+//
+// ----------------------------------------------------------------------------
 //
 void CAiProfileEngine::SetActiveProfileL( const TInt aProfileId )
 	{
-	TInt activeProfileId = iProfileEngine->ActiveProfileId();
+	TInt activeProfileId( iProfileEngine->ActiveProfileId() );
 	
-	if ( activeProfileId == KOfflineProfileId && aProfileId != KOfflineProfileId )
+	if ( activeProfileId == KOfflineProfileId && 
+        aProfileId != KOfflineProfileId )
    		{
     	if( !ShowOfflineMessageL() )
     		{
@@ -499,82 +590,71 @@
     	
    	iProfileEngine->SetActiveProfileL( aProfileId );   	
  	}
-		
-// ---------------------------------------------------------------------------
-// Resumes the engine
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::IsOffline
 //
-void CAiProfileEngine::ResumeL()
+// ----------------------------------------------------------------------------
+//
+TBool CAiProfileEngine::IsOffline() const
     {
-    User::LeaveIfError( iSSSettings.Open() );
- 
-    //Register to listen ALS activation, if ALS status changes,
-	//profile must be republished.
-    TInt err = iSSSettings.Register( ESSSettingsAls, *this );
-
-    if( err == KErrNotSupported || err == KErrAlreadyExists )
-        {
-        //ALS not supported or already registered, that's fine
-        err = KErrNone;
-        }
-
-    User::LeaveIfError( err );
-
-	//Start to listen profile changes.
-	delete iProfileNotifier;
-    iProfileNotifier = NULL;	
-		
-    iProfileNotifier = CProfileChangeNotifyHandler::NewL( this );
-   	}
-
-// ---------------------------------------------------------------------------
-// Suspends the engine
-// ---------------------------------------------------------------------------
-//
-void CAiProfileEngine::Suspend()
-    {
- 	iSSSettings.CancelAll( *this );
-    iSSSettings.Close();
-   	delete iProfileNotifier;
-   	iProfileNotifier = NULL;	
+    return iProfileEngine->ActiveProfileId() == KOfflineProfileId;
     }
 
-// ---------------------------------------------------------------------------
-// From class MProfileChangeObserver
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::PhoneSettingChanged
 //
-
-void CAiProfileEngine::HandleActiveProfileEventL(
-							TProfileEvent aProfileEvent,
-							TInt /*aProfileId*/ )
-    {
-	//Profile activated or modified.
-    if( ( aProfileEvent == EProfileNewActiveProfile ) ||
-    	( aProfileEvent == EProfileActiveProfileModified ) )
-        {
-        UpdateProfileNamesL();
-        iProfilePluginNotifier->NotifyContentUpdate();
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// From class MSSSettingsObserver.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
-void CAiProfileEngine::PhoneSettingChanged( 
-								TSSSettingsSetting aSetting,
-								TInt /*aNewValue*/ )
+void CAiProfileEngine::PhoneSettingChanged( TSSSettingsSetting aSetting, 							
+    TInt /*aNewValue*/ )
     {
     if( aSetting == ESSSettingsAls )
         {
-        TRAP_IGNORE( UpdateProfileNamesL() );
-        iProfilePluginNotifier->NotifyContentUpdate();
+        NotifyContentUpdate();
         }
     }
 
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleActiveProfileModifiedL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::HandleActiveProfileModifiedL()
+    {
+    NotifyContentUpdate();
+    }
 
-TBool CAiProfileEngine::IsOffline()
-	{
-	return iProfileEngine->ActiveProfileId() == KOfflineProfileId;
-	}
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleProfileNameArrayModificationL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::HandleProfileNameArrayModificationL()
+    {
+    NotifyContentUpdate();
+    }
 
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::HandleProfileActivatedL
+//
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::HandleProfileActivatedL( TInt /*aProfileId*/ )
+    {
+    NotifyContentUpdate();
+    }
+
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::NotifyContentUpdate
+//
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::NotifyContentUpdate() 
+    {
+    TRAP_IGNORE( UpdateProfileNamesL() );
+    
+    iProfilePluginNotifier->NotifyContentUpdate();    
+    }
+
+// End of file
--- a/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,25 +15,28 @@
 *
 */
 
-
+// System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationproxy.h>
-#include <aicontentobserver.h>
-#include <aiutility.h>
 #include <PUAcodes.hrh>
 #include <AknUtils.h>
 
+// User includes
+#include <aiprofilepluginuids.hrh>
+#include <aicontentobserver.h>
+#include <aiutility.h>
+
 #include "aiprofileplugincontentmodel.h"
-#include <aiprofilepluginuids.hrh>
 #include "caiprofileplugin.h"
 #include "caiprofileengine.h"
 #include "aipluginsettings.h"
 
+// Constants
+
 // PUA code for the timed profile, missing from PUAcodes.hrh
 #define KAiTimedProfilePUA 0xF815
 #define KAiRTL 0x200F
 
-// CONST CLASS VARIABLES
 const TImplementationProxy KImplementationTable[] =
     {
     IMPLEMENTATION_PROXY_ENTRY( KImplUidProfilePlugin, CAiProfilePlugin::NewL ) 
@@ -42,14 +45,14 @@
 // ======== LOCAL FUNCTIONS ========
 
 // ======== MEMBER FUNCTIONS ========
-
 // ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
+// CAiProfilePlugin::NewL
+//
 // ---------------------------------------------------------------------------
 //
 CAiProfilePlugin* CAiProfilePlugin::NewL()
     {
-    CAiProfilePlugin* self = new (ELeave) CAiProfilePlugin;
+    CAiProfilePlugin* self = new ( ELeave ) CAiProfilePlugin;
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -58,7 +61,8 @@
     }
     
 // ---------------------------------------------------------------------------
-// Default constructor
+// CAiProfilePlugin::CAiProfilePlugin()
+// 
 // ---------------------------------------------------------------------------
 //
 CAiProfilePlugin::CAiProfilePlugin()
@@ -66,39 +70,39 @@
     }
     
 // ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
+// CAiProfilePlugin::ConstructL
+// 
 // ---------------------------------------------------------------------------
 //
 void CAiProfilePlugin::ConstructL()
     { 
-    iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PROFILEPLUGIN; 
-   
     iContent = AiUtility::CreateContentItemArrayIteratorL( KAiProfileContent );
     iEvents = AiUtility::CreateContentItemArrayIteratorL( KAiProfileEvents );
-    iResources = AiUtility::CreateContentItemArrayIteratorL( KAiProfileResources );
-    
-    iIsUpdated = ETrue;
-    iAlive = EFalse;        
+    iResources = AiUtility::CreateContentItemArrayIteratorL( KAiProfileResources );        
     }
     
 // ---------------------------------------------------------------------------
-// Destructor
+// CAiProfilePlugin::~CAiProfilePlugin
 // Deletes all data created to heap
 // ---------------------------------------------------------------------------
 //
 CAiProfilePlugin::~CAiProfilePlugin()
     {
     CleanPublishedProfileNames();
+	
     Release( iContent );
     Release( iEvents );
-    Release( iResources );   
+    Release( iResources );
+    
     delete iActiveProfileAndChar;
     delete iPreviousProfileNameAndChar;
     delete iEngine;
+    
     iObservers.Close();
     }
 
 // ---------------------------------------------------------------------------
+// CAiProfilePlugin::PublishL
 // Publishes the profiles
 // ---------------------------------------------------------------------------
 //
@@ -106,12 +110,14 @@
     {
     TInt err( KErrNone );
     TInt observers( iObservers.Count() );        
-    TInt transactionId = reinterpret_cast<TInt>( this );
+    TInt transactionId ( reinterpret_cast<TInt>( this ) );
 
     iCurrentCount = iEngine->NumberOfProfiles();
-    for ( int i = 0; i < observers; i++ )
+    
+    for ( TInt i = 0; i < observers; i++ )
         {
-        MAiContentObserver* observer = iObservers[i];
+        MAiContentObserver* observer( iObservers[i] );
+        
         err = observer->StartTransaction( transactionId );
 		
 		if ( err == KErrNotSupported )
@@ -130,11 +136,12 @@
             {
             delete iActiveProfileAndChar;
             iActiveProfileAndChar = NULL;
+            
             // silent/non-silent icon + timed icon + space + possible RTL*2 = 5
-            TInt maxChars = iEngine->ActiveProfileName().Length() + 5;
+            TInt maxChars( iEngine->ActiveProfileName().Length() + 5 );
             
             iActiveProfileAndChar = HBufC::NewL( maxChars );
-            TPtr profileNamePtr = iActiveProfileAndChar->Des();
+            TPtr profileNamePtr( iActiveProfileAndChar->Des() );
            
             if( AknLayoutUtils::LayoutMirrored() )
                 {
@@ -145,7 +152,8 @@
                 {
                 profileNamePtr.Append( KAiTimedProfilePUA );                
                 }
-            if( iEngine->IsActiveProfileSilentL() )
+            
+            if ( iEngine->IsActiveProfileSilentL() )
                 {                
                 profileNamePtr.Append( KPuaCodeSilentSymbol );
                 }
@@ -153,10 +161,12 @@
                 {
                 profileNamePtr.Append( KPuaCodeAprofSound );
                 }
-            _LIT( KSpace, " " );   
+            
+            _LIT( KSpace, " " ); 
+            
             profileNamePtr.Append( KSpace );
             
-            if( AknLayoutUtils::LayoutMirrored() )
+            if ( AknLayoutUtils::LayoutMirrored() )
                 {
                 profileNamePtr.Append( KAiRTL );
                 }
@@ -184,13 +194,14 @@
        	// clean profiles that are already deleted.
        	// Cleans the array blindly from the end, because in the next
        	// step all the profiles are republished
-        if( iPreviousCount > iCurrentCount )
+        if ( iPreviousCount > iCurrentCount )
             {
             for( TInt k = iCurrentCount; k < iPreviousCount; k++ )
                 {
                 observer->Clean( *this, EAiProfileContentProfileName, k + 1 );
                 }
             }
+        
 		for ( TInt j = 0; j < iCurrentCount; j++ )
 			{
 			if ( observer->CanPublish( *this, EAiProfileContentProfileName, j + 1 ) )
@@ -206,6 +217,7 @@
         		{
         		TBuf<1> silent; // one character
         		silent.Append( KPuaCodeSilentSymbol );
+        		
         		observer->Publish( *this, EAiProfileActiveProfileSilentChar, silent, EAiProfileActiveProfileSilentChar );
         		}
         	else
@@ -220,7 +232,8 @@
     		observer->Clean( *this, EAiProfileActiveProfileIcon, EAiProfileActiveProfileSilentIconResource );
     		observer->Clean( *this, EAiProfileActiveProfileIcon, EAiProfileActiveProfileGeneralIconResource );
     		observer->Clean( *this, EAiProfileActiveProfileIcon, EAiProfileActiveProfileTimedIconResource );
-        	if ( iEngine->IsActiveProfileTimedL() )
+        	
+    		if ( iEngine->IsActiveProfileTimedL() )
         		{
         		observer->Publish( *this, 
         							EAiProfileActiveProfileIcon, 
@@ -250,9 +263,11 @@
     		observer->Clean( *this, EAiProfileActiveProfileSilentChar, EAiProfileActiveProfileSilentChar );
     		observer->Clean( *this, EAiProfileActiveProfileIcon, 1 );
     		observer->Clean( *this, EAiProfileActiveProfileIcon, 2 );
-            // uncomment also this and respective policy lines in profiles.xml if whole widget needs to be hidden in AI3 
+            
+    		// uncomment also this and respective policy lines in profiles.xml if whole widget needs to be hidden in AI3 
     		//observer->Clean( *this, EAiProfileContentActiveProfileName, EAiProfileContentActiveProfileName );        		    		
     		}
+        
         if ( err == KErrNone )
             {
             err = observer->Commit( transactionId );
@@ -261,234 +276,145 @@
                 {
                 return;
                 }
-            }
-        
-        iIsUpdated = EFalse;
+            }                
         }
+    
     iPreviousCount = iCurrentCount;
     }
     
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is requested to unload its engines due backup operation
+// CAiProfilePlugin::Start
+// 
 // ---------------------------------------------------------------------------
 //
-void CAiProfilePlugin::Stop( TAiTransitionReason /*aReason*/ )
-    {
-    FreeEngine();
+void CAiProfilePlugin::Start( TStartReason /*aReason*/ )
+    {   
+    }
+
+// ---------------------------------------------------------------------------
+// CAiProfilePlugin::Stop
+// 
+// ---------------------------------------------------------------------------
+//
+void CAiProfilePlugin::Stop( TStopReason /*aReason*/ )
+    {    
     }
 
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is allowed to consume CPU resources
+// CAiProfilePlugin::Resume
+// 
 // ---------------------------------------------------------------------------
 //
-void CAiProfilePlugin::Resume( TAiTransitionReason aReason )
+void CAiProfilePlugin::Resume( TResumeReason aReason )
     {
-    TRAP_IGNORE( DoResumeL( aReason ) ); 
-    }
-    
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is not allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CAiProfilePlugin::Suspend( TAiTransitionReason /*aReason*/ )
-    {
-    if ( iEngine && iAlive )
+    if ( aReason == EForeground )
         {
-        iEngine->Suspend();
+        TRAP_IGNORE( DoResumeL() );
         }
-        
-    iAlive = EFalse;
     }
 
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// The plug-in MUST maintain a registry of subscribers and send 
-// notification to all of them whenever the state changes or new content
-// is available
+// CAiProfilePlugin::Suspend
+// 
+// ---------------------------------------------------------------------------
+//
+void CAiProfilePlugin::Suspend( TSuspendReason /*aReason*/ )
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CAiProfilePlugin::SubscribeL
+// 
 // ---------------------------------------------------------------------------
 //
 void CAiProfilePlugin::SubscribeL( MAiContentObserver& aObserver )
-    { 
+    {
     iObservers.AppendL( &aObserver );
     }
-    
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-ins take ownership of the settings array, so it must either
-// store it in a member or free it.
-// ---------------------------------------------------------------------------
-//
-void CAiProfilePlugin::ConfigureL( RAiSettingsItemArray& aSettings )
-    {
-    aSettings.ResetAndDestroy();
-    }
 
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Returns the extension interface. Actual type depends on the passed 
-// aUid argument.
+// CAiProfilePlugin::ConfigureL
+// 
 // ---------------------------------------------------------------------------
 //
-TAny* CAiProfilePlugin::Extension( TUid aUid )
+void CAiProfilePlugin::ConfigureL( RAiSettingsItemArray& /*aSettings*/ )
     {    
-    if (aUid == KExtensionUidProperty)
-   		{
-        return static_cast<MAiPropertyExtension*>(this);
-    	}
-    else if (aUid == KExtensionUidEventHandler)
-    	{
-        return static_cast<MAiEventHandlerExtension*>(this);
-    	}
-    else
-    	{	
-        return NULL;
-    	}
     }
 
 // ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Read property of publisher plug-in.
+// CAiProfilePlugin::GetProperty
+// 
 // ---------------------------------------------------------------------------
 //
-TAny* CAiProfilePlugin::GetPropertyL( TInt aProperty )
+TAny* CAiProfilePlugin::GetProperty( TProperty aProperty )
     {
-    TAny* property = NULL;
-    
-    switch ( aProperty )
-        {
-    case EAiPublisherInfo:
-        {
-         property = static_cast<TAiPublisherInfo*>( &iInfo );
-        break;  
-        }       
-
-    case EAiPublisherContent:
+    if ( aProperty == EPublisherContent )
         {
-        property = static_cast<MAiContentItemIterator*>( iContent );
-        break;    
-        }        
-
-    case EAiPublisherEvents:
+        return static_cast< MAiContentItemIterator* >( iContent );        
+        }
+    else if ( aProperty == EPublisherEvents )
         {
-        property = static_cast<MAiContentItemIterator*>( iEvents );
-        break;
+        return static_cast< MAiContentItemIterator* >( iEvents );
         }
-    
-    case EAiPublisherResources:
-        property = static_cast<MAiContentItemIterator*>( iResources );
-        break;
-       
-    default:
-        break;
+    else if ( aProperty == EPublisherResources )
+        {
+        return static_cast< MAiContentItemIterator* >( iResources );        
         }
 
-    return property;
+    return NULL;
     }
 
 // ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Write property value to optimize the content model.
+// CAiProfilePlugin::HandleEvent
+// 
 // ---------------------------------------------------------------------------
 //
-void CAiProfilePlugin::SetPropertyL( TInt aProperty, TAny* aValue )
-    {  
-    if( aProperty == EAiPublisherInfo )
+void CAiProfilePlugin::HandleEvent( TInt aEvent, const TDesC& aParam )
+    {    
+    TRAP_IGNORE( iEngine->HandleAiEventL( aEvent, aParam ) );    
+    }
+
+// ---------------------------------------------------------------------------
+// CAiProfilePlugin::DoResumeL
+//
+// ---------------------------------------------------------------------------
+//
+void CAiProfilePlugin::DoResumeL()
+    {
+    if( !iEngine )
         {
-        ASSERT( aValue );
+        iEngine = CAiProfileEngine::NewL( this );
         
-        const TAiPublisherInfo* info( 
-                static_cast<const TAiPublisherInfo*>( aValue ) );
+        iEngine->UpdateProfileNamesL();
         
-        iInfo = *info;
+        PublishL();        
         }
     }
  
 // ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
+// CAiProfilePlugin::NotifyContentUpdate()
+// This method is called from the engine, when the profile data has changed
 // ---------------------------------------------------------------------------
 //
-void CAiProfilePlugin::HandleEvent(TInt aEvent, const TDesC& aParam)
-	{
-    if ( iEngine )
-    	{
-        // We have no way of reporting errors to framework so just ignore them.
-        TRAP_IGNORE( iEngine->HandleAiEventL( aEvent, aParam ) );
-    	}
-	} 
-    
-// ---------------------------------------------------------
-// This method is called from the engine, when the profile
-// data content has been changed. Method call is made through
-// the MAiProfilePluginNotifier interface.
-// ---------------------------------------------------------
-//
 void CAiProfilePlugin::NotifyContentUpdate()
-    {
-    iIsUpdated = ETrue;
-    
+    {        
     TRAP_IGNORE( PublishL() );
     }
 
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// framework instructs plug-in that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CAiProfilePlugin::DoResumeL( TAiTransitionReason aReason )
-    {
-    if ( !iEngine )
-        {
-        iEngine = CAiProfileEngine::NewL( this );
-        }
-    
-	//update in startup phase and idle is on foreground.
-    if( aReason != EAiBacklightOff && aReason != EAiIdleBackground )
-    	{
-    	// force republish in case layout has changed
-      if ( aReason == EAiScreenLayoutChanged )
-          {
-          delete iPreviousProfileNameAndChar;
-          iPreviousProfileNameAndChar = NULL;
-          }
-
-    	if ( !iAlive )
-    	    {
-            iEngine->ResumeL();
-    	    }
-    	
-	    iEngine->UpdateProfileNamesL();
-	    
-        PublishL();
-	    iAlive = ETrue;     
-    	}   
-    }
-    
-// ---------------------------------------------------------------------------
-// Frees engine resources
-// ---------------------------------------------------------------------------
-//    
-void CAiProfilePlugin::FreeEngine()
-    {
-    delete iEngine;
-    iEngine = NULL;
-    iAlive = EFalse;   
-    }
-
-// ---------------------------------------------------------------------------
+// CAiProfilePlugin::CleanPublishedProfileNames
 // Clean profile names from content
 // ---------------------------------------------------------------------------
 //    
 void CAiProfilePlugin::CleanPublishedProfileNames()
     {
     TInt obsCount( iObservers.Count() );
+    
     for ( TInt i( 0 ); i < obsCount; i++ )
         {
-        MAiContentObserver* observer = iObservers[i];
-        for( TInt j( 0 ); j < iCurrentCount && observer; j++ )
+        MAiContentObserver* observer( iObservers[i] );
+        
+        for ( TInt j( 0 ); j < iCurrentCount && observer; j++ )
             {
             observer->Clean( *this, EAiProfileContentProfileName, j + 1 );
             }
@@ -505,5 +431,6 @@
     {
     aTableCount = sizeof( KImplementationTable ) / 
         sizeof( TImplementationProxy );
+    
     return KImplementationTable;
     }
--- a/idlefw/plugins/pslnactiveidleplugin/data/pslnactiveidleplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM plugin resource file for Active Idle Skinning plugin.
-*
-*/
-
-
-#include <registryinfo.rh>
-#include "pslnactiveidlepluginuids.h"
-
-RESOURCE REGISTRY_INFO theInfo
-{
-    dll_uid     = KPslnActiveIdlePluginDllUID3;
-    interfaces  =
-    {
-        INTERFACE_INFO
-        {
-            interface_uid   = KPslnPluginInterfaceUID;
-            implementations =
-            {
-                IMPLEMENTATION_INFO
-                {
-                    implementation_uid  = KPslnActiveIdlePluginImplementationUID;
-                    version_no          = 1;
-                    display_name        = "Psln AI Plugin";
-                    default_data        = "0";
-                    opaque_data         = "0";
-                }
-            };
-        }
-        ,
-        INTERFACE_INFO
-        {
-            interface_uid   = KGSPluginInterfaceUID;
-            implementations =
-            {
-                IMPLEMENTATION_INFO
-                {
-                    implementation_uid  = KGSActiveIdlePluginImplementationUID;
-                    version_no          = 1;
-                    display_name        = "GS AI Plugin";
-                    default_data        = "0x1020743F"; // parent uid: Standby plugin
-                    opaque_data         = "11"; // Order number
-                }
-            };
-        }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/data/pslnactiveidlepluginrsc.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Resource file for PslnActiveIdlePlugin.
-*
-*/
-
-
-// ========== RESOURCE IDENTIFIER =============================================
-
-NAME    PSAI // 4 letter ID
-
-#include <avkon.loc> // Avkon localized strings
-#include <avkon.mbg>
-#include <avkon.rsg>
-#include <eikcore.rsg>
-#include <pslncommon.rsg>
-#include <uikon.rh>
-#include <avkon.rh>
-#include <eikon.rh>
-
-#include <pslnactiveidle3plugin.loc>
-#include <psln.hrh>
-
-// ========== RESOURCE DEFINITIONS ============================================
-
-RESOURCE RSS_SIGNATURE
-{
-}
-
-RESOURCE TBUF
-{
-    buf = "";
-}
-
-// ----------------------------------------------------------------------------
-//
-// Active Idle application specific view.
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_psln_active_idle_view
-{
-    menubar = r_psln_ai_view_menubar;
-    //cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
-    cba = r_softkeys_options_back_empty;
-}
-
-// ----------------------------------------------------------------------------
-//
-// Options menu with 'Download', 'Activate', 'Help' and 'Exit' items.
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_psln_ai_view_menubar
-{
-    titles =
-    {
-        MENU_TITLE { menu_pane = r_psln_ai_basic_menupane; },
-        MENU_TITLE { menu_pane = R_PSLN_GEN_VIEW_MENUPANE; }
-    };
-}
-
-// ----------------------------------------------------------------------------
-//
-// Menu pane for view.
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_psln_ai_basic_menupane
-{
-    items =
-    {
-#ifdef __SERIES60_HELP
-        MENU_ITEM
-        {
-            command = EPslnCmdAppHelp;
-            txt = qtn_options_help;
-        },
-#endif  // __SERIES60_HELP
-        MENU_ITEM
-        {
-            command = EAknCmdExit;
-            txt = qtn_options_exit;
-        }
-    };
-}
-
-// ----------------------------------------------------------------------------
-//
-// Shortcuts view caption for plugin. max 128
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_ai_list_view_caption
-{
-    buf = qtn_apps_idle_skin_gs;
-}
-
-// ----------------------------------------------------------------------------
-//
-// Active Idle specific skin tab title. max 128
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_ai_tab_name
-{
-    buf = qtn_skins_tabs_activeidle;
-}
-
-// ----------------------------------------------------------------------------
-//
-// View title for GS Active Idle plugin.
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_psln_gs_list_view_title
-{
-    txt = qtn_apps_idle_skin_gs;
-}
-
-// ----------------------------------------------------------------------------
-//
-// View caption for GS Active Idle plugin. max 256
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_psln_gs_list_view_caption
-{
-    buf = qtn_apps_idle_skin_gs;
-}
-
-// ----------------------------------------------------------------------------
-//
-// ----------------------------------------------------------------------------
-RESOURCE CBA r_softkeys_options_back_empty
-{
-    buttons =
-    {
-        CBA_BUTTON {id = EAknSoftkeyOptions;  txt = text_softkey_option; },
-        CBA_BUTTON {id = EAknSoftkeyBack;     txt = text_softkey_back;   },
-        CBA_BUTTON {id = EPslnCmdAppActivate; txt = ""; }
-    };
-}
-
-// ----------------------------------------------------------------------------
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE CBA r_softkeys_options_exit_empty
-{
-    buttons =
-    {
-        CBA_BUTTON {id = EAknSoftkeyOptions;  txt = text_softkey_option; },
-        CBA_BUTTON {id = EAknSoftkeyExit;     txt = text_softkey_exit;   },
-        CBA_BUTTON {id = EPslnCmdAppActivate; txt = ""; }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file provides the information required for building
-*                PslnActiveIdlePlugin.
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-#include <platform_paths.hrh>
-../loc/pslnactiveidle3plugin.loc             MW_LAYER_LOC_EXPORT_PATH(pslnactiveidle3plugin.loc)
-
-//../rom/pslnactiveidleplugin_resources.iby   LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(pslnactiveidleplugin_resources.iby)
-//../rom/pslnactiveidleplugin.iby             CORE_MW_LAYER_IBY_EXPORT_PATH(pslnactiveidleplugin.iby)
-
-		
-
-
-PRJ_MMPFILES
-pslnactiveidleplugin.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE pslnactiveidleplugin.mif
-OPTION HEADERFILE pslnactiveidleplugin.mbg
-OPTION SOURCES \
-        -c8,8 qgn_prop_psln_ai_sub
-END
-
-PRJ_TESTMMPFILES
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/group/pslnactiveidleplugin.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project specification file.
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>    // For RESOURCE_FILES_DIR
-#include "../inc/pslnactiveidlepluginuids.h"
-
-//MACRO MY_DEBUG
-
-TARGET          pslnactiveidleplugin.dll
-TARGETTYPE      PLUGIN
-UID             0x10009D8D KPslnActiveIdlePluginDllUID3
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH      ../src
-SOURCE          pslnactiveidlepluginimplementationtable.cpp
-SOURCE          pslnactiveidleplugincontainer.cpp
-SOURCE          pslnactiveidlepluginengine.cpp
-SOURCE          pslnactiveidleplugin.cpp
-SOURCE          gsactiveidleplugincontainer.cpp
-SOURCE          gsactiveidleplugin.cpp
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../loc
-USERINCLUDE     ../data // For *.rh
-
-MW_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE   /epoc32/include/ecom
-
-SOURCEPATH      ../data
-
-START RESOURCE  pslnactiveidleplugin.rss
-TARGET          pslnactiveidleplugin.rsc
-END
-
-START RESOURCE  pslnactiveidlepluginrsc.rss
-DEPENDS pslncommon.rsg
-HEADER
-TARGETPATH      RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-LIBRARY         apgrfx.lib
-LIBRARY         euser.lib
-LIBRARY         ecom.lib
-LIBRARY         efsrv.lib
-LIBRARY         avkon.lib
-LIBRARY         bafl.lib
-LIBRARY         cone.lib
-LIBRARY         eikcoctl.lib
-LIBRARY         eikcore.lib
-LIBRARY         centralrepository.lib
-
-LIBRARY         commonengine.lib    // For RConeResourceLoader
-LIBRARY         aknskins.lib        // For enhanced skinning
-LIBRARY         aknnotify.lib       // Global note
-LIBRARY         featmgr.lib         // For feature manager
-
-LIBRARY         pslnframework.lib   // For Psln FW base classes
-LIBRARY         xn3odt.lib           // For XUIKON
-
-LIBRARY         gsframework.lib     // For GS FW base classes
-LIBRARY         gsecomplugin.lib
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/group/pslnactiveidlepluginicons.mk	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\resource\apps
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\pslnactiveidleplugin.mif
-HEADERFILENAME=$(HEADERDIR)\pslnactiveidleplugin.mbg
-
-do_nothing :
-	@rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
-	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
-		/c8,8 qgn_prop_psln_ai_sub.svg
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/idlefw/plugins/pslnactiveidleplugin/inc/gsactiveidleplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Psln Active Idle settings plugin.
-*
-*/
-
-
-#ifndef C_GSACTIVEIDLEPLUGIN_H
-#define C_GSACTIVEIDLEPLUGIN_H
-
-#include <gsplugininterface.h>
-#include <coneresloader.h>
-
-class CGSActiveIdlePluginContainer;
-class CPslnFWPluginInterface;
-class CPslnFWPluginHandler;
-
-
-/**
- *  CGSActiveIdlePlugin view class for Psln Active Idle settings.
- *  @since S60 3.2
- *
- */
-class CGSActiveIdlePlugin : public CGSPluginInterface
-{
-
-public: // Constructors and destructor
-
-    /**
-     * Symbian OS two-phased constructor
-     *
-     * @param aInitParams param not used.
-     * @return GS connection view.
-     */
-    static CGSActiveIdlePlugin* NewL(TAny* aInitParams);
-
-    /**
-     * Destructor
-     */
-    ~CGSActiveIdlePlugin();
-
-// From CGSPluginInterface
-
-    /**
-     * @see CGSPluginInterface header file.
-     */
-    void GetCaptionL(TDes& aCaption) const;
-
-    /**
-     * @see CGSPluginInterface header file.
-     */
-    TInt PluginProviderCategory() const;
-
-    /**
-     * @see CGSPluginInterface header file.
-     */
-    TBool Visible() const;
-
-// from base classes
-
-    /**
-     * Returns view id.
-     * @return TUid
-     */
-    TUid Id() const;
-
-    /**
-     * Handles commands.
-     * @param aCommand Command to be handled.
-     *
-     */
-    void HandleCommandL(TInt aCommand);
-
-protected: // From CAknView
-
-    /**
-     * @see CAknView.
-     */
-    void DoActivateL(
-        const TVwsViewId& aPrevViewId,
-        TUid aCustomMessageId,
-        const TDesC8& aCustomMessage);
-
-    /**
-     * @see CAknView.
-     */
-    void DoDeactivate();
-
-// Construction
-
-    /**
-     * C++ default constructor.
-     */
-    CGSActiveIdlePlugin();
-
-    /**
-     * Symbian OS default constructor.
-     *
-     */
-    void ConstructL();
-
-private: // data
-
-    /// Resource loader.
-    RConeResourceLoader             iResourceLoader;
-
-    /// Container. Owned.
-    CGSActiveIdlePluginContainer*   iContainer;
-
-    /// Previous view id.
-    TVwsViewId                      iPrevViewId;
-
-    /// Plugin loader. Owned.
-    CPslnFWPluginHandler*           iPluginLoader;
-
-};
-
-#endif // C_GSACTIVEIDLEPLUGIN_H
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/gsactiveidleplugincontainer.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Psln Active Idle settings plugin.
-*
-*/
-
-
-#ifndef C_GSACTIVEIDLEPLUGINCONTAINER_H
-#define C_GSACTIVEIDLEPLUGINCONTAINER_H
-
-#include <coecntrl.h>
-
-/**
- *  CGSActiveIdlePluginContainer container class
- *
- *  @since S60 3.2
- */
-class CGSActiveIdlePluginContainer : public CCoeControl
-{
-public: // Constructors and destructor
-
-    /**
-     * Symbian OS constructor.
-     * @param aRect Listbox's rect.
-     *
-     */
-    void ConstructL(const TRect& aRect);
-
-    ~CGSActiveIdlePluginContainer();
-
-    CGSActiveIdlePluginContainer();
-
-// From CCoeControl
-
-    TInt CountComponentControls() const;
-
-    CCoeControl* ComponentControl(TInt aIndex) const;
-
-    void SizeChanged();
-
-};
-
-#endif // C_GSACTIVEIDLEPLUGINCONTAINER_H
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  View for Active Idle skinning.
-*
-*/
-
-
-#ifndef C_PSLNACTIVEIDLEPLUGIN_H
-#define C_PSLNACTIVEIDLEPLUGIN_H
-
-#include <aknsettingpage.h>
-#include <pslnfwbaseview.h>
-#include <coneresloader.h>
-#include <pslnfwplugininterface.h>
-#include <mpslnfwmsklabelobserver.h>
-
-
-class CAknViewAppUi;
-class CPslnActiveIdlePluginContainer;
-class CPslnActiveIdlePluginEngine;
-
-enum TAiUIControllers
-{
-    EAiUICUnknown = -1,
-    EAiUICNative = 0,
-    EAiUICXML
-};
-
-// View item text length
-const TInt KPslnItemMaxTextLength = 128;
-
-
-/**
- *  CPslnActiveIdlePlugin view class for Active Idle Theme settings
- *
- *  @since S60 3.2
- */
-class CPslnActiveIdlePlugin :
-    public CPslnFWBaseView,
-    public MPslnFWMSKObserver
-{
-public: // Constructors and destructor
-
-    /**
-     * Symbian OS two-phased constructor
-     *
-     * @param aAppUi pointer to app ui, TAny static cast'd.
-     * @return Psln AI skinning view.
-     */
-    static CPslnActiveIdlePlugin* NewL(TAny* aAppUi);
-
-    /**
-     * Destructor
-     */
-    ~CPslnActiveIdlePlugin();
-
-// From CPslnFWnInterface
-
-    /**
-     * @see CPslnFWPluginInterface.
-     */
-    void GetCaptionL(TDes& aCaption) const;
-
-
-    /**
-     * @see CPslnFWPluginInterface.
-     */
-    void GetTabTextL(TDes& aCaption) const;
-
-    /**
-     * @see CPslnFWPluginInterface.
-     */
-    CGulIcon* CreateIconL();
-
-    /**
-     * @see CPslnFWPluginInterface.
-     */
-    void GetLocationTypeAndIndex(TPslnFWLocationType& aType, TInt& aIndex) const;
-
-// from AknView
-
-    /**
-     * Returns view id.
-     * @return TUid
-     */
-    TUid Id() const;
-
-    /**
-     * Handles commands.
-     * @param aCommand Command to be handled.
-     */
-    void HandleCommandL(TInt aCommand);
-
-// new methods
-
-    /**
-     * Get CPslnActiveIdlePlugin's ccontainer.
-     * @return pointer to container.
-     */
-    CPslnActiveIdlePluginContainer* Container();
-
-    /**
-     * From MPslnFWMSKObserver.
-     * Checks if the MSK label needs to be adjusted.
-     */
-    void CheckMiddleSoftkeyLabelL();
-    
-    /**
-     * Return engine instance.
-     */
-    CPslnActiveIdlePluginEngine* Engine();
-
-protected: // From CAknView
-
-    void DoActivateL(
-        const TVwsViewId& aPrevViewId,
-        TUid aCustomMessageId,
-        const TDesC8& aCustomMessage);
-
-    void DoDeactivate();
-
-// Construction
-
-    CPslnActiveIdlePlugin(CAknViewAppUi* aAppUi);
-
-    void ConstructL();
-
-private: // From MEikMenuObserver
-
-    /**
-     * Changes MenuPane dynamically
-     */
-    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-// from CPslnFWBaseView
-
-    void NewContainerL();
-
-    void HandleListBoxSelectionL();
-
-    /**
-     * Remove command and label from MSK
-     */
-    void RemoveCommandFromMSK();
-    
-    /**
-     * @see CPslnFWBaseView.
-     */
-    void SetTitlePaneL( TInt& aResourceId );
-
-private: // data
-
-    /// Resource loader for own resources.
-    RConeResourceLoader         iResourceLoader;
-
-    /// Resource loader for common psln resources.
-    RConeResourceLoader         iResourceLoaderCommon;
-
-    /// Resource loader for Psln app resources.
-    RConeResourceLoader         iResourceLoaderPsln;
-
-    /// Application UI pointer. Not owned.
-    CAknViewAppUi*              iAppUi;
-
-    /// Navi pane. Not owned.
-    CAknNavigationDecorator*    iNaviPaneContext;
-    
-    /// Ai2 perso engine
-    CPslnActiveIdlePluginEngine* iEngine;
-
-};
-
-#endif // C_PSLNACTIVEIDLEPLUGIN_H
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugin.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Contains common definitions for menu id:s.
-*
-*/
-
-
-#ifndef INC_PSLNACTIVEIDLEPLUGIN_HRH
-#define INC_PSLNACTIVEIDLEPLUGIN_HRH
-
-// commands
-enum TPslnAIMenuCommands
-    {
-    EPslnAICmdAppOpen = 1,
-    EPslnAICmdAppHelp,
-    EPslnAICmdAppChange,
-    EPslnAIAppCmdChange
-    };
-
-#endif // INC_PSLNACTIVEIDLEPLUGIN_HRH
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidleplugincontainer.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for Application shell theme view.
-*
-*/
-
-
-#ifndef C_PSLNACTIVEIDLEPLUGINCONTAINER_H
-#define C_PSLNACTIVEIDLEPLUGINCONTAINER_H
-
-// INCLUDES
-#include <pslnfwbasecontainer.h>
-
-// CONSTANTS
-// Download item index
-const TInt KPslnDownloadItemIndex = 0;
-// View item text length
-const TInt KPslnAsItemMaxTextLength = 128;
-
-// FORWARD DECLARATION
-class CXnODT;
-class CPslnActiveIdlePlugin;
-
-// CLASS DECLARATION
-
-/**
-*  CPslnActiveIdlePluginContainer container class
-*  @since S60 v3.1
-*/
-NONSHARABLE_CLASS( CPslnActiveIdlePluginContainer ) :
-    public CPslnFWBaseContainer
-    {
-    public:
-
-        CPslnActiveIdlePluginContainer(
-                    TBool aGSCalling,
-                    CPslnActiveIdlePlugin* aPlugin);
-        /**
-        * Symbian OS constructor.
-        * @param aRect Listbox's rect.
-        */
-        void ConstructL( const TRect& aRect );
-
-        /**
-        * Destructor.
-        */
-        ~CPslnActiveIdlePluginContainer();
-
-        /**
-        * Return currently active selection from list.
-        * @return currently selected skin index from list view.
-        */
-        TInt GetCurrentlySelectedIndex() const;
-
-        /**
-        * Adds new item to the listbox.
-        * @param aItemIndex index to add.
-        * @param ODT of the theme to add.
-        * @since 3.2
-        */
-        void AddNewItemToListL(
-            const TInt aItemIndex,
-            CXnODT* aSkinODT, TInt aUiController );
-
-        /*
-        * Removes number of themes from listbox.
-        * @param aDeleteFrom start point index where to start deleting.
-        *        All themes from this on are deleted.
-        * @since 3.2
-        */
-        void RemoveThemes( const TInt aDeleteFrom );
-        
-        /**
-         * Method for telling to update the listing.
-         */
-        void RefreshList();
-        
-    private:
-
-        /* From CPslnFWBaseContainer. */
-        void ConstructListBoxL( TInt aResLbxId );
-
-        /**
-        * Required for help.
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-
-        /**
-        * Adds icons to setting item list.
-        */
-        void AddIconsToListL();
-
-    private: // data
-
-        /**
-        * Listbox array for items.
-        * Not own.
-        */
-        CDesCArray* iItemArray;
-
-        /**
-        * List of items from resources.
-        * Own.
-        */
-        CDesCArrayFlat* iItems;
-
-        /**
-        * Index of currently selected item.
-        */
-        TInt iCurrentlySelected;
-        
-        /**
-         * Pointer to psln plugin.
-         * Not own.
-         */
-        CPslnActiveIdlePlugin* iPlugin;
-
-        /**
-         * Indicate if gs started us
-         */
-        TBool iGSCalling;
-    
-    };
-
-#endif //C_PSLNACTIVEIDLEPLUGINCONTAINER_H
-
-// End of File
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidlepluginengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for Psln Active Idle settings view.
-*
-*/
-
-#ifndef C_PSLNACTIVEIDLEPLUGINENGINE_H
-#define C_PSLNACTIVEIDLEPLUGINENGINE_H
-
-#include <pslnfwbasecontainer.h>
-#include <mpslnfwappthemeobserver.h>
-
-// UID of Active Idle.
-const TUid KUidActiveIdle = { 0x102750F0 };
-
-
-class CPslnFWAppThemeHandler;
-class CXnODT;
-class CPslnActiveIdlePlugin; // for notifying MSK chech need
-class CPeriodic;
-
-
-/**
- *  CPslnActiveIdlePluginEngine container class
- *
- *  @since S60 3.2
- */
-class CPslnActiveIdlePluginEngine :
-    public CBase,
-    public MPslnFWAppThemeObserver
-{
-public: // Constructors and destructor
-
-    void ConstructL(const TRect& aRect);
-
-    CPslnActiveIdlePluginEngine(CPslnActiveIdlePlugin* aPlugin);
-
-    ~CPslnActiveIdlePluginEngine();
-
-// new methods
-
-    /**
-     * Activates currently highlighted theme.
-     */
-    void ActivateThemeL();
-    
-// from MPslnFWAppThemeObserver
-
-    void HandleMessage(TXnServiceCompletedMessage aMessage);
-
-    void HandleMessage(
-        TXnServiceCompletedMessage aMessage,
-        CArrayPtrFlat<CXnODT>& aAppThemeList);
-        
-    TInt CurrentUIController()
-        {
-        return iCurrentUIController;
-        };
-        
-    void AddThemesToContainerL();
-
-    void ManualGetSkinsRestartL(TBool aForceStart = EFalse);
-
-private: // new methods
-
-    /**
-     * Adds new theme(s) to the listbox. Multiple themes are
-     * only added when list updation is required (icons need
-     * to be updated). Otherwise latest theme info is inquired
-     * from XUIKON.
-     */
-    void AddNewThemeL(TXnServiceCompletedMessage aMessage);
-    TInt GetExtStandbyScreenState(TInt& aValue);
-
-    /**
-     * Add HS items to list.
-     */
-    void AddHomeScreenThemesL();
-
-    void CheckCurrentUIControllerL();
-    
-    void CheckCurrentAi1PluginL();
-    
-    void UpdateUIControllersInCenrepL(TInt aControllerId);
-    
-    void UpdateStatusPaneVisibilityCenrepL(TBool aPaneHidden);
-    
-    void UpdateAi1PluginLoadCenrepL(TInt aNewUid);
-    
-    TInt RestartAifw();
-
-    TBool IsAiRunning();
-
-    void UiTimerRestart();
-        
-private:
-
-    static TInt RestartTimerCallback( TAny* aSelf );
-
-    static TInt UiRefreshTimerCallback( TAny* aSelf );
-    
-private: // data
-
-    /**
-     * Application specific skin handler.
-     * Own.
-     */
-    CPslnFWAppThemeHandler* iPslnFWThemeHandler;
-
-    /**
-     * List of themes. Each theme is described within an ODT.
-     * Own.
-     */
-    CArrayPtrFlat<CXnODT>*  iMySkinList;
-
-    /**
-     * Indicates that skin list should be updated.
-     */
-    TBool                   iThemeListUpdated;
-
-    /**
-     * HomeScreen items start index in iMySkinList.
-     */
-    TInt                    iHSStartIndex;
-
-    /**
-     * HomeScreen items end index in iMySkinList.
-     */
-    TInt                    iHSEndIndex;
-
-    /**
-     * Flag to indicate if we are avaiting the first restart event.
-     */
-    TBool                   iFirstUpdateRound;
-
-    /**
-     * Flag to indicate if we have injected first round data.
-     */
-    TBool                   iFirstUpdateRoundInjected;
-
-    /**
-     * Current AI2 UI Controller id.
-     */
-    TInt                    iCurrentUIController;
-    
-    /**
-     * Current AI1 plugin id.
-     */
-    TInt                    iCurrentAi1Plugin;
-
-    /**
-     * Flag to indicate if we have injected first round data.
-     * Not owned.
-     */
-    CPslnActiveIdlePlugin*  iPlugin;
-
-    /**
-     * Restart timer. To restart AI2.
-     * Own.
-     */
-    CPeriodic*              iRestartTimer;
-
-    /**
-     * UI Refresh timer.
-     * Own.
-     */
-    CPeriodic*              iUiRefreshTimer;
-
-    /**
-     * Restart timer. To restart AI2.
-     * Own.
-     */
-    TInt                    iRestartRetryCount;
-
-    /**
-     * Kepp track what has been added to list.
-     * Own.
-     */
-    TInt                    iAddIndex;
-    
-};
-
-#endif // C_PSLNACTIVEIDLEPLUGINENGINE_H
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnactiveidlepluginuids.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Uid's of Psln Active Idle settings.
-*
-*/
-
-
-#ifndef INC_PSLNACTIVEIDLEPLUGINUIDS_H
-#define INC_PSLNACTIVEIDLEPLUGINUIDS_H
-
-// =======================
-// Psln Active Idle plugin
-// =======================
-
-// PslnActiveIdlePlugin DLL UID
-#define KPslnActiveIdlePluginDllUID3                0x102750A4
-
-// PslnActiveIdlePlugin Interface UID
-#define KPslnPluginInterfaceUID                     0x102750A9
-
-// PslnActiveIdlePlugin Implementation UID
-#define KPslnActiveIdlePluginImplementationUID      0x102750A7
-
-// ==============================
-// GS Active Idle Settings plugin
-// ==============================
-
-// GS Plugin interface uid
-#define KGSPluginInterfaceUID                       0x10207236
-
-// GSActiveIdlePlugin Implementation UID
-#define KGSActiveIdlePluginImplementationUID        0x102750F5
-
-#endif // INC_PSLNACTIVEIDLEPLUGINUIDS_H
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/inc/pslnconst.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Constants for psln plugin.
-*
-*/
-
-#ifndef INC_PSLNCONST_H
-#define INC_PSLNCONST_H
-
-// (from psln\inc\pslnconst.h, required by pslnmodel.h)
-// Maximum number of characters in Screen saver txt.
-const TInt KPslnMaxNumberOfScreenSaverText = 15;
-
-#endif // INC_PSLNCONST_H
-
-// End of File
--- a/idlefw/plugins/pslnactiveidleplugin/loc/pslnactiveidle3plugin.loc	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Localization strings for PslnActiveIdlePlugin.
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// d:Text of a list item in home screens settings list
-// d:Item opens home screen theme settings
-// l:list_single_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_idle_skin_gs "Change Idle theme"
-
-// d:Text of a list item for home screen app in Themes selection list 
-// d:Item opens home screen theme settings
-// l:list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_idle_skin_hs "Change Idle theme"
-
-// d:Title of home screen theme settings view.
-// d:
-// l:title_pane_t2/opt9
-// w:
-// r: 3.2
-//
-#define qtn_apps_idle_skin_title "Change Idle theme"
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/rom/pslnactiveidleplugin.iby	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Image description file for project pslnactiveidleplugin
-*
-*/
-
-
-#ifndef PSLNACTIVEIDLEPLUGIN_IBY
-#define PSLNACTIVEIDLEPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-// Psln ActiveIdle plugin
-data=DATAZ_\BITMAP_DIR\pslnactiveidleplugin.mif BITMAP_DIR\pslnactiveidleplugin.mif
-ECOM_PLUGIN( pslnactiveidleplugin.dll, pslnactiveidleplugin.rsc )
-
-// Central repository file, temporarily here
-//data=\S60\ActiveIdle2\plugins\shortcutplugin\src\10275104.txt "private\10202BE9\10275104.txt"
-
-#endif // PSLNACTIVEIDLEPLUGIN_IBY
--- a/idlefw/plugins/pslnactiveidleplugin/rom/pslnactiveidleplugin_resources.iby	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Image description file for project pslnactiveidleplugin localizable resources
-*
-*/
-
-
-#ifndef PSLNACTIVEIDLEPLUGIN_RESOURCES_IBY
-#define PSLNACTIVEIDLEPLUGIN_RESOURCES_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-// Psln ActiveIdle settings plugin localizable resources
-data=DATAZ_\RESOURCE_FILES_DIR\pslnactiveidlepluginrsc.rsc  RESOURCE_FILES_DIR\pslnactiveidlepluginrsc.rsc
-
-#endif // PSLNACTIVEIDLEPLUGIN_RESOURCES_IBY
--- a/idlefw/plugins/pslnactiveidleplugin/src/gsactiveidleplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Psln Active Idle settings plugin.
-*
-*/
-
-
-#include "gsactiveidleplugin.h"
-#include "gsactiveidleplugincontainer.h"
-
-#include <pslnfwplugininterface.h>
-#include <pslnfwpluginhandler.h>
-#include <pslnactiveidlepluginrsc.rsg>
-#include "pslnactiveidlepluginuids.h"
-
-#include <coeaui.h>
-#include <gulicon.h>
-#include <bautils.h>
-#include <eikfrlbd.h>
-#include <stringloader.h>
-#include <aknviewappui.h>
-
-#include <gsfwviewuids.h>
-#include <gsprivatepluginproviderids.h>
-
-// GS Active Idle Plugin impl. UID
-const TUid KGSActiveIdlePluginUid = { KGSActiveIdlePluginImplementationUID };
-
-// Psln Active Idle Plugin impl. UID
-const TUid KPslnAIPluginUid       = { KPslnActiveIdlePluginImplementationUID };
-
-_LIT(KGSActiveIdlePluginResourceFileName, "z:pslnactiveidlepluginrsc.rsc");
-
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::CGSActiveIdlePlugin()
-//
-// Constructor
-// ----------------------------------------------------------------------------
-//
-CGSActiveIdlePlugin::CGSActiveIdlePlugin() : iResourceLoader(*iCoeEnv), iPrevViewId()
-{
-}
-
-// ---------------------------------------------------------------------------
-// CGSActiveIdlePlugin::NewL()
-//
-// Symbian OS default constructor
-// ---------------------------------------------------------------------------
-CGSActiveIdlePlugin* CGSActiveIdlePlugin::NewL(TAny* /*aInitParams*/)
-{
-    CGSActiveIdlePlugin* self = new (ELeave) CGSActiveIdlePlugin();
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-// CGSActiveIdlePlugin::ConstructL()
-//
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------------------------
-void CGSActiveIdlePlugin::ConstructL()
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CGSActiveIdlePlugin::ConstructL"));
-#endif
-
-    // Find the resource file.
-    TParse parse;
-    parse.Set(KGSActiveIdlePluginResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL);
-    TFileName fileName(parse.FullName());
-
-    // Open resource file.
-    iResourceLoader.OpenL(fileName);
-
-    BaseConstructL();
-
-    // Psln first finds and loads all plugins that implement Psln plugin interface.
-    iPluginLoader = CPslnFWPluginHandler::NewL(AppUi());
-    CPslnFWPluginInterface* plugin = iPluginLoader->LoadPluginL(KPslnAIPluginUid);
-    if (plugin)
-    {
-        // Add Psln Active Idle plugin to appui views. Plugin is deleted
-        // when appui is destroyed.
-        if (plugin->Id() == KPslnAIPluginUid)
-        {
-            CAknView* view = static_cast<CAknView*>(plugin);
-            AppUi()->AddViewL(view);
-        }
-    }
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::~CGSActiveIdlePlugin
-//
-// Destructor
-// ----------------------------------------------------------------------------
-CGSActiveIdlePlugin::~CGSActiveIdlePlugin()
-{
-    if (iContainer)
-    {
-        AppUi()->RemoveFromStack(iContainer);
-        delete iContainer;
-        iContainer = NULL;
-    }
-
-    iResourceLoader.Close();
-
-    delete iPluginLoader;
-}
-
-// ---------------------------------------------------------------------------
-// TUid CGSActiveIdlePlugin::Id()
-//
-// Returns view's ID.
-// ---------------------------------------------------------------------------
-TUid CGSActiveIdlePlugin::Id() const
-{
-    return KGSActiveIdlePluginUid;
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::GetCaption
-//
-// Return application/view caption. 256
-// ----------------------------------------------------------------------------
-//
-void CGSActiveIdlePlugin::GetCaptionL(TDes& aCaption) const
-{
-    iCoeEnv->ReadResourceL(aCaption, R_PSLN_GS_LIST_VIEW_CAPTION);
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::PluginProviderCategory
-//
-// A means to identify the location of this plug-in in the framework.
-// ----------------------------------------------------------------------------
-//
-TInt CGSActiveIdlePlugin::PluginProviderCategory() const
-{
-    // To identify internal plug-ins.
-    return KGSPluginProviderInternal;
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::Visible
-//
-// Provides the visibility status of self to framework.
-// ----------------------------------------------------------------------------
-//
-TBool CGSActiveIdlePlugin::Visible() const
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CGSActiveIdlePlugin::Visible"));
-#endif
-
-    return ETrue;
-}
-
-// ---------------------------------------------------------------------------
-// CGSActiveIdlePlugin::HandleCommandL(TInt aCommand)
-//
-// Handles commands directed to this class.
-// ---------------------------------------------------------------------------
-void CGSActiveIdlePlugin::HandleCommandL(TInt aCommand)
-{
-    // shouldn't get any commands to handle, but forward them to appui anyway...
-    AppUi()->HandleCommandL(aCommand);
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::DoActivateL
-//
-// First method called by the Avkon framwork to invoke a view.
-// ----------------------------------------------------------------------------
-//
-void CGSActiveIdlePlugin::DoActivateL(
-    const TVwsViewId& aPrevViewId,
-    TUid /*aCustomMessageId*/,
-    const TDesC8& /*aCustomMessage*/)
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CGSActiveIdlePlugin::DoActivateL"));
-#endif
-
-    if (!iContainer)
-    {
-        iContainer = new (ELeave) CGSActiveIdlePluginContainer();
-        iContainer->SetMopParent(this);
-        iContainer->ConstructL(ClientRect());
-    }
-
-    AppUi()->AddToStackL(*this, iContainer);
-
-    if (iPrevViewId.iViewUid.iUid == 0)
-    {
-        iPrevViewId = aPrevViewId;
-    }
-
-	iContainer->MakeVisible(ETrue);
-    AppUi()->ActivateLocalViewL(KPslnAIPluginUid);
-}
-
-// ----------------------------------------------------------------------------
-// CGSActiveIdlePlugin::DoDeactivate
-//
-// Called by the Avkon view framework when closing.
-// ----------------------------------------------------------------------------
-//
-void CGSActiveIdlePlugin::DoDeactivate()
-{
-    AppUi()->RemoveFromStack(iContainer);
-    iContainer->MakeVisible(EFalse);
-    iPrevViewId.iViewUid.iUid = 0;
-}
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/src/gsactiveidleplugincontainer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Psln Active Idle settings plugin.
-*
-*/
-
-
-#include "gsactiveidleplugincontainer.h"
-
-// ---------------------------------------------------------------------------
-// CGSActiveIdlePluginContainer::ConstructL()
-//
-// Symbian OS two phased constructor.
-// ---------------------------------------------------------------------------
-//
-void CGSActiveIdlePluginContainer::ConstructL(const TRect& aRect)
-{
-    CreateWindowL(); // Makes the control a window-owning control
-    SetRect(aRect);
-    ActivateL();
-}
-
-// ---------------------------------------------------------------------------
-// CGSActiveIdlePluginContainer::~CGSActiveIdlePluginContainer()
-//
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CGSActiveIdlePluginContainer::~CGSActiveIdlePluginContainer()
-{
-}
-
-CGSActiveIdlePluginContainer::CGSActiveIdlePluginContainer()
-{
-}
-
-void CGSActiveIdlePluginContainer::SizeChanged()
-{
-}
-
-TInt CGSActiveIdlePluginContainer::CountComponentControls() const
-{
-    return 0;
-}
-
-CCoeControl* CGSActiveIdlePluginContainer::ComponentControl(TInt /*aIndex*/ ) const
-{
-    return NULL;
-}
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidleplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,497 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  View for Active Idle skinning.
-*
-*/
-
-
-// This plugin specific.
-#include <pslnactiveidlepluginrsc.rsg>
-#include <pslnactiveidleplugin.mbg>
-#include "pslnactiveidleplugin.h"
-#include "pslnactiveidleplugincontainer.h"
-#include "pslnactiveidlepluginengine.h"
-#include "pslnactiveidlepluginuids.h"
-
-// General services.
-#include <stringloader.h>
-#include <featmgr.h>
-#include <gsfwviewuids.h>
-
-// Psln Framework specific.
-#include <pslnfwviewuids.h>
-#include <psln.hrh>
-#include <pslncommon.rsg>
-#include <psln.rsg>
-
-
-// Path to mbm file.
-_LIT(KPslnActiveIdleIconFileName, "pslnactiveidleplugin.mbm");
-
-// Path to compiled resource file.
-_LIT(KPslnActiveIdlePluginResourceFileName, "z:pslnactiveidlepluginrsc.rsc");
-
-// Path to common personalization resources. This resource file is meant for
-// shared resources between application and plugins.
-_LIT(KPslnCommonResourceFileName, "z:pslncommon.rsc");
-
-// Path to Psln application resource file. Plugin uses some localized texts
-// from Psln's resources.
-_LIT(KPslnApplicationResourceFileName, "z:psln.rsc");
-
-// Location of this plugin view within Psln's tab group.
-const TInt KPslnActiveIdlePluginLocation = 2;
-
-const TUid KPslnActiveIdlePluginUid = { KPslnActiveIdlePluginImplementationUID };
-
-// Middle Softkey control ID.
-const TInt KPslnMSKControlId = 3;
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::CPslnActiveIdlePlugin()
-//
-// Constructor
-// ----------------------------------------------------------------------------
-//
-CPslnActiveIdlePlugin::CPslnActiveIdlePlugin(CAknViewAppUi* aAppUi)
-    :
-    iResourceLoader(*iCoeEnv),
-    iResourceLoaderCommon(*iCoeEnv),
-    iResourceLoaderPsln(*iCoeEnv),
-    iAppUi(aAppUi)
-{
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::NewL
-//
-// Symbian OS default constructor
-// ---------------------------------------------------------------------------
-CPslnActiveIdlePlugin* CPslnActiveIdlePlugin::NewL(TAny* aAppUi)
-{
-    CAknViewAppUi* appUi = reinterpret_cast<CAknViewAppUi*>(aAppUi);
-    CPslnActiveIdlePlugin* self = new(ELeave) CPslnActiveIdlePlugin (appUi);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::ConstructL
-//
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------------------------
-void CPslnActiveIdlePlugin::ConstructL()
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CPslnActiveIdlePlugin::ConstructL"));
-#endif
-
-    // Find the resource file:
-    TParse* parse = new (ELeave) TParse;
-    CleanupStack::PushL(parse);
-    parse->Set(KPslnCommonResourceFileName, &KDC_APP_RESOURCE_DIR, NULL);
-    TFileName* fileName = new (ELeave) TFileName(parse->FullName());
-    CleanupStack::PushL(fileName);
-
-    // Open resource file:
-    iResourceLoaderCommon.OpenL(*fileName);
-    CleanupStack::PopAndDestroy(fileName);
-
-    // Find the resource file:
-    parse->Set(KPslnApplicationResourceFileName, &KDC_APP_RESOURCE_DIR, NULL);
-    fileName = new (ELeave) TFileName(parse->FullName());
-    CleanupStack::PushL(fileName);
-
-    // Open resource file:
-    iResourceLoaderPsln.OpenL(*fileName);
-    CleanupStack::PopAndDestroy(fileName);
-    CleanupStack::PopAndDestroy(parse);
-
-    // Open own resources for reading.
-    OpenLocalizedResourceFileL(
-        KPslnActiveIdlePluginResourceFileName,
-        iResourceLoader);
-
-    BaseConstructL(R_PSLN_ACTIVE_IDLE_VIEW);
-
-    iEngine = new (ELeave) CPslnActiveIdlePluginEngine(this);
-    iEngine->ConstructL( TRect() );
-    iEngine->ManualGetSkinsRestartL(ETrue); // Force start
-
-}
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::~CPslnActiveIdlePlugin
-//
-// Destructor
-// ----------------------------------------------------------------------------
-CPslnActiveIdlePlugin::~CPslnActiveIdlePlugin()
-{
-    iResourceLoaderCommon.Close();
-    iResourceLoaderPsln.Close();
-    iResourceLoader.Close();
-    delete iEngine;
-}
-
-// ---------------------------------------------------------------------------
-// TUid CPslnActiveIdlePlugin::Id()
-//
-// Returns view's ID.
-// ---------------------------------------------------------------------------
-TUid CPslnActiveIdlePlugin::Id() const
-{
-    return KPslnActiveIdlePluginUid;
-}
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::GetCaption
-//
-// Return application/view caption. 128
-// ----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::GetCaptionL(TDes& aCaption) const
-{
-    // the resource file is already opened.
-    HBufC* result = StringLoader::LoadL(R_PSLN_AI_LIST_VIEW_CAPTION);
-    if (aCaption.MaxLength() >= result->Length())
-    {
-        aCaption.Copy(*result);
-    }
-    delete result;
-    }
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::GetTabTextL
-//
-// Return tab text. 128
-// ----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::GetTabTextL(TDes& aCaption) const
-{
-    // the resource file is already opened.
-    HBufC* result = StringLoader::LoadL(R_PSLN_AI_TAB_NAME);
-    if (aCaption.MaxLength() >= result->Length())
-        {
-        aCaption.Copy(*result);
-        }
-    delete result;
-    }
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::CreateIconL
-//
-// Creates Main view icon.
-// ----------------------------------------------------------------------------
-//
-CGulIcon* CPslnActiveIdlePlugin::CreateIconL()
-{
-    // Find the resource file:
-    TParse* parse = new (ELeave) TParse;
-    CleanupStack::PushL(parse);
-    parse->Set(KPslnActiveIdleIconFileName, &KDC_APP_BITMAP_DIR, NULL);
-    HBufC* fileName = parse->FullName().AllocLC();
-    TPtr fileNamePtr = fileName->Des();
-
-    CGulIcon* icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(),
-        KAknsIIDQgnPropPslnAiSub,
-        fileNamePtr,
-        EMbmPslnactiveidlepluginQgn_prop_psln_ai_sub,
-        EMbmPslnactiveidlepluginQgn_prop_psln_ai_sub_mask);
-
-    CleanupStack::PopAndDestroy(2, parse); // fileName, parse
-
-    return icon;
-}
-
-// -----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::GetLocationTypeAndIndex()
-//
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::GetLocationTypeAndIndex(
-    TPslnFWLocationType& aType,
-    TInt& aIndex) const
-{
-    aType = CPslnFWPluginInterface::EPslnFWSpecified;
-    aIndex = KPslnActiveIdlePluginLocation;
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::HandleCommandL(TInt aCommand)
-//
-// Handles commands directed to this class.
-// ---------------------------------------------------------------------------
-void CPslnActiveIdlePlugin::HandleCommandL(TInt aCommand)
-{
-    switch (aCommand)
-    {
-    case EPslnCmdAppActivate:
-        iEngine->ActivateThemeL();
-        break;
-
-    case EAknSoftkeyBack:
-        RemoveCommandFromMSK();
-        if (iAppUi->View(KPslnMainViewUid))
-        {
-            // if we are in Psln activate Psln main view...
-            iAppUi->ActivateLocalViewL(KPslnMainViewUid);
-        }
-        else if (iAppUi->View(KGSMainViewUid))
-        {
-            // ... else if we are in GS activate parent plugin view (standby view)...
-            iAppUi->ActivateLocalViewL(KGSStandbyPluginUid);
-        }
-        else
-        {
-            iAppUi->HandleCommandL(aCommand);
-        }
-        break;
-
-    case EAknSoftkeyExit:
-        // This is here because we use different softkey setups
-        iAppUi->HandleCommandL(EAknCmdExit);
-        break;
-
-    case EPslnCmdAppHelp:
-    case EAknCmdHelp:// Fall trough
-        CPslnFWBaseView::HandleCommandL(aCommand);
-        break;
-
-    default:
-        iAppUi->HandleCommandL(aCommand);
-        break;
-    }
-}
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::Container
-//
-// Return handle to container class.
-// ----------------------------------------------------------------------------
-//
-CPslnActiveIdlePluginContainer* CPslnActiveIdlePlugin::Container()
-{
-    return static_cast<CPslnActiveIdlePluginContainer*>(iContainer);
-}
-
-// -----------------------------------------------------------------------------
-// Checks is there a need to update the middle softkey label.
-// This method should do nothing but MSK issues, since it is still called
-// if the framework does not support MSK.
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::CheckMiddleSoftkeyLabelL()
-{
-    CPslnActiveIdlePluginContainer* container = Container();
-    TInt highlightedItem = iContainer->iListBox->CurrentItemIndex();
-
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CPslnActiveIdlePlugin::CheckMiddleSoftkeyLabelL highl = %d, curr = %d"), highlightedItem, container->GetCurrentlySelectedIndex());
-#endif
-
-    // First remove any previous commands.
-    RemoveCommandFromMSK();
-
-    if (highlightedItem >= 0 &&
-        highlightedItem != container->GetCurrentlySelectedIndex())
-    {
-        // Activate:
-        CPslnFWBaseView::SetMiddleSoftKeyLabelL(
-            R_PSLN_MSK_ACTIVATE,
-            EPslnCmdAppActivate);
-    }
-    else
-    {
-        CPslnFWBaseView::SetMiddleSoftKeyLabelL(
-            R_PSLN_MSK_DUMMY,
-            EPslnCmdEmptyCommand );
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Return engine instance.
-// -----------------------------------------------------------------------------
-//
-CPslnActiveIdlePluginEngine* CPslnActiveIdlePlugin::Engine()
-    {
-    return iEngine;
-    }
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::DoActivateL
-//
-// First method called by the Avkon framwork to invoke a view.
-// ----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::DoActivateL(
-    const TVwsViewId& aPrevViewId,
-    TUid aCustomMessageId,
-    const TDesC8& aCustomMessage)
-{
-#ifdef MY_DEBUG
-    RDebug::Print(_L("XAI: CPslnActiveIdlePlugin::DoActivateL"));
-    RDebug::Print(_L("XAI:   aCustomMessageId = 0x%08x"), aCustomMessageId.iUid);
-    RDebug::Print(_L("XAI:   aPrevViewId      = 0x%08x"), aPrevViewId.iAppUid.iUid);
-#endif
-
-    // If called from Psln - set tab group location.
-    if (iAppUi->View(KPslnMainViewUid))
-    {
-        CPslnFWBaseView::SetNaviPaneL(KPslnActiveIdlePluginLocation);
-    }
-
-    CEikButtonGroupContainer* cba = Cba();
-
-    if (cba)
-    {
-        if (aCustomMessageId == KUidActiveIdle)
-        {
-            cba->SetCommandSetL(R_SOFTKEYS_OPTIONS_EXIT_EMPTY);
-        }
-        else
-        {
-            cba->SetCommandSetL(R_SOFTKEYS_OPTIONS_BACK_EMPTY);
-        }
-        cba->DrawDeferred();
-    }
-
-    CPslnFWBaseView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-
-    CheckMiddleSoftkeyLabelL();
-    
-    iEngine->ManualGetSkinsRestartL();
-}
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::DoDeactivate
-//
-// Called by the Avkon view framework when closing.
-// ----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::DoDeactivate()
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CPslnActiveIdlePlugin::DoDeactivate"));
-#endif
-    CPslnFWBaseView::DoDeactivate();
-    RemoveCommandFromMSK();
-}
-
-// ----------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::DynInitMenuPaneL
-//
-//
-// ----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::DynInitMenuPaneL(
-    TInt aResourceId, CEikMenuPane* aMenuPane)
-{
-    if (aResourceId == R_PSLN_GEN_VIEW_MENUPANE &&
-        aMenuPane)
-    {
-        // Since this is common resource it contains download,
-        // set it off.
-        aMenuPane->SetItemDimmed(EPslnCmdAppDownload, ETrue);
-
-        CPslnActiveIdlePluginContainer* container = Container();
-        TInt highlightedItem = iContainer->iListBox->CurrentItemIndex();
-        // Remove Activate command, if highlighted item is already active.
-        if (highlightedItem == container->GetCurrentlySelectedIndex())
-        {
-            aMenuPane->SetItemDimmed(EPslnCmdAppActivate, ETrue);
-        }
-    }
-    else if (aResourceId == R_PSLN_AI_BASIC_MENUPANE &&
-             aMenuPane)
-    {
-        if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
-        {
-            // Disable help if not supported
-            aMenuPane->SetItemDimmed(EPslnCmdAppHelp, ETrue);
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::NewContainerL()
-//
-// Creates new iContainer.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::NewContainerL()
-{
-    if( !iContainer )
-        {
-        TBool isGSCalling = (NULL != iAppUi->View(KGSMainViewUid));
-        iContainer = new (ELeave) CPslnActiveIdlePluginContainer(isGSCalling, this);
-        iContainer->SetMiddleSoftkeyObserver(this);
-        }
-
-    RemoveCommandFromMSK();
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::HandleListBoxSelectionL()
-//
-// Handles events raised through a rocker key.
-// ---------------------------------------------------------------------------
-void CPslnActiveIdlePlugin::HandleListBoxSelectionL()
-{
-    TInt currentItem = iContainer->iListBox->CurrentItemIndex();
-    CPslnFWBaseView::SetCurrentItem(currentItem);
-
-    CPslnActiveIdlePluginContainer* container = Container();
-
-    if (currentItem != container->GetCurrentlySelectedIndex())
-    {
-        HandleCommandL(EPslnCmdAppActivate);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Remove MSK command mappings.
-// This method should do nothing but MSK issues.
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePlugin::RemoveCommandFromMSK()
-{
-    CEikButtonGroupContainer* cba = Cba();
-
-    if (cba && iContainer)
-    {
-        cba->RemoveCommandFromStack(KPslnMSKControlId, EPslnCmdEmptyCommand);
-        cba->RemoveCommandFromStack(KPslnMSKControlId, EPslnCmdAppActivate);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePlugin::SetTitlePaneL()
-// 
-// Gives resource ID to be used as plugin view title.
-// ---------------------------------------------------------------------------
-//  
-void CPslnActiveIdlePlugin::SetTitlePaneL( TInt& aResourceId )
-    {
-#ifdef RD_CONTROL_PANEL
-    aResourceId = R_PSLN_AI_LIST_VIEW_CAPTION;
-#endif // RD_CONTROL_PANEL
-    }
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidleplugincontainer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for the Application Shell plugin
-*
-*/
-
-
-// INCLUDE FILES
-
-// From this plugin.
-#include "pslnactiveidleplugincontainer.h"
-#include "pslnactiveidlepluginengine.h"
-#include "pslnactiveidleplugin.h"
-
-// From Psln application.
-#include <csxhelp/skins.hlp.hrh>
-
-// From PSLN framework
-#include <pslnfwbaseview.h>
-#include <pslnfwiconhelper.h>
-
-// Resources
-#include <psln.rsg>
-#include <pslnactiveidlepluginrsc.rsg>
-
-// General services
-#include <Aknlists.h>
-
-// XUIKON
-#include <XnODT.h>
-
-// CONSTANTS
-// UID of Personlisation application
-const TUid KPslnAppUid = { 0x10005A32 };
-
-// ========================= MEMBER FUNCTIONS ================================
-
-CPslnActiveIdlePluginContainer::CPslnActiveIdlePluginContainer(
-                    TBool aGSCalling,
-                    CPslnActiveIdlePlugin* aPlugin )
-    :
-    iPlugin( aPlugin ),
-    iGSCalling( aGSCalling )
-    {
-    }
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::ConstructL( const TRect& aRect )
-    {
-    iListBox = new( ELeave ) CAknSingleGraphicStyleListBox;
-    TInt titleResId = 0;
-
-    if (iGSCalling)
-    {
-        titleResId = R_PSLN_GS_LIST_VIEW_TITLE;
-    }
-    BaseConstructL(aRect, titleResId, R_PSLN_PLUGIN_DEFAULT_VIEW_LBX);
-    // Do not show container immediately - to avoid seeing "No Data" first.
-    iListBox->MakeVisible( EFalse );
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor 
-// ---------------------------------------------------------------------------
-//
-CPslnActiveIdlePluginContainer::~CPslnActiveIdlePluginContainer()
-    {
-    if( iItemArray )
-        {
-        TInt count = iItemArray->Count();
-        iItemArray->Delete(0, count);
-        }
-
-    delete iItems;
-    }
-
-// -----------------------------------------------------------------------------
-// CPslnActiveIdlePluginContainer::GetCurrentlySelectedIndex
-// -----------------------------------------------------------------------------
-//
-TInt CPslnActiveIdlePluginContainer::GetCurrentlySelectedIndex() const
-    {
-    return iCurrentlySelected;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds new item to the listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::AddNewItemToListL( 
-    const TInt aItemIndex, CXnODT* aSkinODT, TInt aUiController )
-    {
-    HBufC* item = HBufC::NewLC( KPslnItemMaxTextLength );
-    TPtr itemPtr = item->Des();
-    TBool newActiveItem = EFalse;
-
-    // Get theme ODT and full name. 
-    // Index aItemIndex has been verified in view.
-    itemPtr = aSkinODT->ThemeFullName();
-    if ( aSkinODT->Flags() & EXnThemeStatusActive &&
-        iPlugin->Engine()->CurrentUIController() == aUiController )
-        {
-        itemPtr.Insert( 0, KPslnFWActiveListItemFormat );
-
-        // Set selected active.
-        iCurrentlySelected = aItemIndex;
-        newActiveItem = ETrue;
-        }
-    else
-        {
-        itemPtr.Insert( 0, KPslnFWNonActiveListItemFormat );
-        }
-    iItemArray->AppendL( itemPtr );
-    CleanupStack::PopAndDestroy( item );
-
-    if ( newActiveItem )
-        {
-        // Set highlight.
-        iListBox->SetCurrentItemIndex( iCurrentlySelected );
-        // Since we now have content, show container.
-        iListBox->MakeVisible( ETrue );
-        if ( iPlugin )
-            {
-            iPlugin->CheckMiddleSoftkeyLabelL();
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Removes themes from listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::RemoveThemes( const TInt aDeleteFrom )
-    {
-    // Validate parameter first.
-    if ( iItemArray &&
-         ( aDeleteFrom >= 0 ) &&
-         ( aDeleteFrom < iItemArray->Count() ) )
-        {
-        iItemArray->Delete( aDeleteFrom, iItemArray->Count() - aDeleteFrom );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Construct the listbox from resource array.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::ConstructListBoxL( TInt aResLbxId )
-    {
-    iListBox->ConstructL( this, EAknListBoxSelectionList );
-
-    iItemArray = static_cast<CDesCArray*>
-        ( iListBox->Model()->ItemTextArray() );
-
-    iItems = iCoeEnv->ReadDesC16ArrayResourceL( aResLbxId );
-
-    // Create pre- and post-text icons.
-    AddIconsToListL();
-    }
-
-// ---------------------------------------------------------------------------
-// Gets Help context.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::GetHelpContext( 
-    TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KPslnAppUid;
-    aContext.iContext = KSKINS_HLP_APPSKINS_LIST;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds icons to setting list items.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginContainer::AddIconsToListL()
-    {
-    CPslnFWIconHelper* iconHelper = CPslnFWIconHelper::NewL();
-    CleanupStack::PushL( iconHelper );
-    iconHelper->AddIconsToSettingItemsL(
-        ETrue,
-        KErrNotFound, // none, selected
-        iListBox );
-    CleanupStack::PopAndDestroy( iconHelper );
-    }
-
-void CPslnActiveIdlePluginContainer::RefreshList()
-    {
-    TRAP_IGNORE(iListBox->HandleItemAdditionL());
-    iListBox->SetCurrentItemIndex(iCurrentlySelected);
-    TRAP_IGNORE(iPlugin->CheckMiddleSoftkeyLabelL());
-    DrawDeferred();
-    // Since we now have content, show container.
-    iListBox->MakeVisible( ETrue );
-    }
-
-// End of File
--- a/idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidlepluginengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,724 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for the Active Idle plugin.
-*
-*/
-
-
-// From this plugin.
-#include <aisystemuids.hrh>
-
-#include "pslnactiveidlepluginengine.h"
-#include "pslnactiveidleplugincontainer.h"
-#include "pslnactiveidleplugin.h"
-#include "activeidle2domainpskeys.h"
-#include "activeidle2internalpskeys.h"
-
-// from plugin side
-#include <extrstandbyscrconst.h> // for KExtrStandbyScrFullScreenMode
-
-// From PSLN framework.
-#include <pslnfwiconhelper.h>
-#include <psln.rsg>
-
-// General services.
-#include <stringloader.h>
-#include <aknglobalnote.h>
-#include <e32property.h>
-
-// Application specific skins.
-#include <pslnfwappthemehandler.h>
-
-// XUIKON.
-#include <xnodt.h>
-
-// ECOM.
-#include <ecom/ecom.h>
-#include <ecom/implementationinformation.h>
-
-#include <centralrepository.h>
-#include <activeidle2domaincrkeys.h>
-
-#include <AknSgcc.h>
-
-// Granularity of plugin array.
-const TInt KPslnPluginArrayGranularity = 4;
-
-// ActiveIdle1 plugin ECOM interface uid
-const TInt KAI1PluginInterfaceUid = 0x101F8700;
-const TInt KAIThemeStatusPaneHidden = 0x00000001;
-
-// AI1 cenrep
-const TInt KCRUidActiveIdle =  0x10207467;
-const TInt KCRPluginCountKey = 0x00000002;
-const TInt KCRFirstPluginKey = 0x00000003;
-
-const TInt KPSLNOneSecondInMicroSeconds = 1000*1000;
-
-// ========== LOCAL FUNCTIONS =================================================
-
-template<class Array>
-void CleanupResetAndDestroy(TAny* aObj)
-{
-    if(aObj)
-    {
-        static_cast<Array*>(aObj)->ResetAndDestroy();
-    }
-}
-
-template<class Array>
-void CleanupResetAndDestroyPushL(Array& aPointerArray)
-{
-    CleanupStack::PushL(TCleanupItem(&CleanupResetAndDestroy<Array>, &aPointerArray));
-}
-
-// ========== MEMBER FUNCTIONS ================================================
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::ConstructL()
-//
-// Symbian OS two phased constructor
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::ConstructL(const TRect& /*aRect*/)
-{
-#ifdef _MY_DEBUG
-    RDebug::Print(_L("XAI: CPslnActiveIdlePluginEngine::ConstructL"));
-#endif
-
-    // Create application theme handler and list for application themes.
-    iMySkinList = new (ELeave)
-        CArrayPtrFlat<CXnODT>(KPslnPluginArrayGranularity);
-    iPslnFWThemeHandler = CPslnFWAppThemeHandler::NewL(
-        *this,
-        *iMySkinList);
-
-    CheckCurrentUIControllerL();
-    CheckCurrentAi1PluginL();
-    iRestartTimer = CPeriodic::NewL(EPriorityNormal);
-    iUiRefreshTimer = CPeriodic::NewL(EPriorityNormal);
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::CPslnActiveIdlePluginEngine
-//
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CPslnActiveIdlePluginEngine::CPslnActiveIdlePluginEngine(
-    CPslnActiveIdlePlugin* aPlugin)
-  :
-    iFirstUpdateRound(ETrue),
-    iFirstUpdateRoundInjected(EFalse),
-    iCurrentUIController(EAiUICUnknown),
-    iPlugin(aPlugin)
-{
-}
-
-// ---------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::~CPslnActiveIdlePluginEngine()
-//
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CPslnActiveIdlePluginEngine::~CPslnActiveIdlePluginEngine()
-{
-    if (iRestartTimer)
-    {
-        iRestartTimer->Cancel();
-    }
-    delete iRestartTimer;
-    if (iUiRefreshTimer)
-    {
-        iUiRefreshTimer->Cancel();
-    }
-    delete iUiRefreshTimer;
-
-    if (iMySkinList)
-    {
-        iMySkinList->ResetAndDestroy();
-    }
-    delete iMySkinList;
-    delete iPslnFWThemeHandler;
-}
-
-// -----------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::ActivateThemeL
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::ActivateThemeL()
-{
-    TInt skinIndex = 0;
-    if( iPlugin->Container() )
-        {
-        skinIndex = iPlugin->Container()->iListBox->CurrentItemIndex();
-        }
-    else
-        {
-        // No selection possible yet
-        return;
-        }
-
-    if (skinIndex >= 0 && skinIndex < iMySkinList->Count() &&
-        !iRestartTimer->IsActive())
-    {
-        if (skinIndex >= iHSStartIndex &&
-            skinIndex < iHSEndIndex)
-        {
-            CXnODT* selectedSkinODT = iMySkinList->At(skinIndex);
-            UpdateStatusPaneVisibilityCenrepL(
-                selectedSkinODT->Flags() & KAIThemeStatusPaneHidden);
-
-            if (iCurrentAi1Plugin != selectedSkinODT->ThemeUid())
-            {
-                UpdateAi1PluginLoadCenrepL(selectedSkinODT->ThemeUid());
-                CheckCurrentAi1PluginL();
-            }
-            if (iCurrentUIController == EAiUICXML)
-            {
-                UpdateUIControllersInCenrepL(EAiUICNative);
-                CheckCurrentUIControllerL();
-
-                iRestartTimer->Cancel();
-                iRestartRetryCount = 0;
-                iRestartTimer->Start(
-                    KPSLNOneSecondInMicroSeconds,
-                    KPSLNOneSecondInMicroSeconds,
-                    TCallBack(RestartTimerCallback, this));
-            }
-            else
-            {
-            if( IsAiRunning() )
-                {
-                // Recycle this method to bring to foreground
-                RestartTimerCallback( this );
-                }
-            }
-            ManualGetSkinsRestartL();
-        }
-        else
-        {
-            if (iCurrentUIController == EAiUICNative)
-            {
-                UpdateStatusPaneVisibilityCenrepL(EFalse); // Always visible status pane
-                UpdateUIControllersInCenrepL(EAiUICXML);
-                CheckCurrentUIControllerL();
-                }
-
-            RProperty::Set( KPSUidAiInformation, KActiveIdleRestartAI2, KActiveIdleRestartCode );
-            iRestartTimer->Cancel();
-            iRestartRetryCount = 0;
-            iRestartTimer->Start(
-                KPSLNOneSecondInMicroSeconds,
-                KPSLNOneSecondInMicroSeconds,
-                TCallBack(RestartTimerCallback, this));
-            CXnODT* selectedSkinODT = iMySkinList->At(skinIndex);
-            TXnServiceCompletedMessage ret;
-
-            ret = iPslnFWThemeHandler->SetApplicationSkinL(
-                *selectedSkinODT );
-
-            if (ret == EXnSetActiveThemeFailed)
-            {
-                // Show error note.
-                HBufC* errorBuf = StringLoader::LoadLC(
-                    R_PSLN_QTN_SKINS_ERROR_CORRUPTED);
-                // Display global note.
-                CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
-                errorNote->ShowNoteL(EAknGlobalErrorNote, *errorBuf);
-                CleanupStack::PopAndDestroy(2, errorBuf); // errorNote also
-            }
-            else
-            {
-                iRestartTimer->Cancel();
-                iRestartRetryCount = 0;
-                iRestartTimer->Start(
-                    KPSLNOneSecondInMicroSeconds,
-                    KPSLNOneSecondInMicroSeconds,
-                    TCallBack(RestartTimerCallback, this));
-            }
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::HandleMessage
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::HandleMessage(
-    TXnServiceCompletedMessage aMessage)
-{
-    switch (aMessage)
-    {
-    case EXnGetListHeadersEmpty:
-        // Just destroy everything and use default items only.
-    case EXnGetListHeadersFailed: // fallthrough
-        if (iMySkinList)
-        {
-            iMySkinList->ResetAndDestroy();
-        }
-        break;
-    case EXnServiceRequestCanceled: // fallthrough
-    case EXnServiceRequestError: // fallthrough
-        {
-            TRAP_IGNORE(ManualGetSkinsRestartL();)
-        }
-        break;
-    default:
-        break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CPslnActiveIdlePluginEngine::HandleMessage
-// -----------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::HandleMessage(
-    TXnServiceCompletedMessage aMessage,
-    CArrayPtrFlat<CXnODT>& /*aAppThemeList*/)
-{
-    switch (aMessage)
-    {
-    case EXnGetListHeadersRestart:
-    case EXnGetListHeadersUpdate: // fallthrough
-        {
-            TRAP_IGNORE(AddNewThemeL(aMessage));
-            break;
-        }
-    default:
-        {
-            break;
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Adds new theme to the container / listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::AddThemesToContainerL()
-    {
-    TInt value  = 0;
-
-    GetExtStandbyScreenState(value);
-
-    /* value == 0  Only AI2 themes
-       value != 0
-         bit 31    AI2 themes
-         bit 30-0  External themes
-    */
-    value |= 0x80000000;                               // Force AI2 themes on
-    if ((value == 0) || ((value & 0x80000000) != 0))
-        {
-        if( iPlugin->Container() && iMySkinList )
-            {
-            // Remove themes. All.
-            iPlugin->Container()->RemoveThemes( 0 );
-            for ( TInt i = 0; i < iMySkinList->Count(); ++i )
-                {
-                if( i >= iHSStartIndex &&
-                    i < iHSEndIndex )
-                    {
-                    iPlugin->Container()->AddNewItemToListL( i,
-                                                             iMySkinList->At(i),
-                                                             EAiUICNative );
-                    }
-                else
-                    {
-                    iPlugin->Container()->AddNewItemToListL( i,
-                                                             iMySkinList->At(i),
-                                                             EAiUICXML );
-                    }
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Adds new theme to the listbox.
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::AddNewThemeL(
-    TXnServiceCompletedMessage aMessage)
-{
-    // No themes available - do not add anything.
-    if (!iMySkinList)
-    {
-        return;
-    }
-
-    // Theme activation causes restart of theme headers list.
-    if (aMessage == EXnGetListHeadersRestart)
-    {
-    iFirstUpdateRound = EFalse;
-    }
-
-    TInt value  = 0;
-
-    GetExtStandbyScreenState(value);
-
-    /* value == 0  Only AI2 themes
-       value != 0
-         bit 31    AI2 themes
-         bit 30-0  External themes
-    */
-    value |= 0x80000000;                               // Force AI2 themes on
-
-    if ((value & 0x7FFFFFFF) > 0)
-        {
-    if ((iFirstUpdateRound && !iFirstUpdateRoundInjected) ||
-        aMessage == EXnGetListHeadersRestart)
-    {
-        iFirstUpdateRoundInjected = ETrue;
-        AddHomeScreenThemesL();
-    }
-        }
-
-    UiTimerRestart();
-}
-
-//
-// Get external Standby Screen state from Cenrep
-//
-TInt CPslnActiveIdlePluginEngine::GetExtStandbyScreenState(TInt& aValue )
-    {
-    TInt ret = 0;
-    TUid uid    = { KCRUidActiveIdleLV }; // {0x10275102}; //
-
-    //TRAP_IGNORE: leaving function called in non-leaving function
-    TRAP_IGNORE
-        (
-        CRepository* cenRep = CRepository::NewLC( uid );
-
-        ret = cenRep->Get(KAIExternalStatusScreen, aValue );
-
-        CleanupStack::PopAndDestroy( cenRep );
-        )
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// Add EXT HS themes to listing
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::AddHomeScreenThemesL()
-{
-    iHSStartIndex = iHSEndIndex = iMySkinList->Count();
-    // Resolve AI1 plugins in ECOM
-    RImplInfoPtrArray eComPlugins;
-    CleanupResetAndDestroyPushL(eComPlugins);
-
-    REComSession::ListImplementationsL(TUid::Uid(KAI1PluginInterfaceUid), eComPlugins);
-    for (TInt i = 0; i < eComPlugins.Count(); ++i)
-    {
-        CXnODT* skinODT = CXnODT::NewL();
-        skinODT->SetThemeUid(eComPlugins[i]->ImplementationUid().iUid);
-        if (eComPlugins[i]->OpaqueData() == KExtrStandbyScrFullScreenMode)
-        {
-            skinODT->SetFlags(KAIThemeStatusPaneHidden);
-        }
-        else
-        {
-            skinODT->SetFlags(0);
-        }
-        CleanupStack::PushL(skinODT);
-        iMySkinList->AppendL(skinODT);
-        CleanupStack::Pop(skinODT);
-
-        HBufC* item = HBufC::NewLC(KPslnItemMaxTextLength);
-        TPtr itemPtr = item->Des();
-        if (eComPlugins[i]->DisplayName().Length())
-        {
-            itemPtr = eComPlugins[i]->DisplayName();
-        }
-        else
-        {
-            itemPtr = _L("OperatorHomeScreen1");
-        }
-        skinODT->SetThemeFullNameL( itemPtr );
-        if (iCurrentAi1Plugin == eComPlugins[i]->ImplementationUid().iUid &&
-            iCurrentUIController == EAiUICNative)
-        {
-            itemPtr.Insert(0, KPslnFWActiveListItemFormat);
-            TInt flags = skinODT->Flags();
-            skinODT->SetFlags(flags | EXnThemeStatusActive );
-        }
-        else
-        {
-            itemPtr.Insert(0, KPslnFWNonActiveListItemFormat);
-        }
-        CleanupStack::PopAndDestroy(item);
-        ++iHSEndIndex;
-    }
-    CleanupStack::PopAndDestroy();
-}
-
-// ---------------------------------------------------------------------------
-// Check active AI2 UI Controller in cenrep keys
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::CheckCurrentUIControllerL()
-{
-    CRepository* cenRep = CRepository::NewL(TUid::Uid(KCRUidActiveIdleLV)); // KCRUidActiveIdleLV AI2 Cenrep!
-    TInt value = 0;
-    if (cenRep->Get(KAiMainUIController, value) == KErrNone)
-    {
-        if ((value == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE)
-            || (value == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE))
-        {
-            iCurrentUIController = EAiUICNative;
-        }
-        else if ((value == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML)
-            || (value == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML))
-        {
-            iCurrentUIController = EAiUICXML;
-        }
-    }
-    delete cenRep;
-}
-
-// ---------------------------------------------------------------------------
-// Update active AI2 UI Controller in cenrep keys
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::UpdateUIControllersInCenrepL(TInt aControllerId)
-{
-    if (iCurrentUIController != aControllerId)
-    {
-        TUid uid = { KCRUidActiveIdleLV }; // KCRUidActiveIdleLV AI2 Cenrep!
-        CRepository* cenRep = CRepository::NewL(uid);
-        if (aControllerId == EAiUICNative)
-        {
-            cenRep->Delete(KAiFirstUIController);
-            cenRep->Delete(KAiFirstUIController + 1);
-            cenRep->Set(KAiMainUIController, AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE);
-        }
-        else if (aControllerId ==  EAiUICXML)
-        {
-            cenRep->Create(KAiFirstUIController, AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE);
-            cenRep->Set(KAiFirstUIController, AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE);
-            cenRep->Delete(KAiFirstUIController + 1);
-            cenRep->Set(KAiMainUIController, AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML);
-        }
-        delete cenRep;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Update status pane visibility for status pane cenrep key
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::UpdateStatusPaneVisibilityCenrepL(
-    TBool aPaneHidden)
-{
-    TInt value = EAiStatusPaneLayoutIdleNormal;
-    if (aPaneHidden)
-    {
-        value = EAiStatusPaneLayoutIdleHidden;
-    }
-    TUid uid = { KCRUidActiveIdleLV }; // KCRUidActiveIdleLV AI2 Cenrep!
-    CRepository* cenRep = CRepository::NewL(uid);
-    cenRep->Set(KAiStatusPaneLayout, value);
-    delete cenRep;
-}
-
-// ---------------------------------------------------------------------------
-// Update active AI1 plugin in cenrep
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::UpdateAi1PluginLoadCenrepL(TInt aNewUid)
-{
-    TUid uid = { KCRUidActiveIdle }; // KCRUidActiveIdle AI1 Cenrep!
-    CRepository* cenRep = CRepository::NewL(uid);
-    TInt currentCount = 0;
-    cenRep->Get(KCRPluginCountKey, currentCount);
-
-    // Delete old keys if any
-    for (TInt i = 0; i < currentCount; ++i)
-    {
-        cenRep->Delete(KCRFirstPluginKey+i);
-    }
-
-    cenRep->Delete(KCRPluginCountKey);
-    cenRep->Create(KCRPluginCountKey, 1);
-    // Set only 1 new key, the selected one
-    cenRep->Create(KCRFirstPluginKey, aNewUid);
-
-    delete cenRep;
-}
-
-// ---------------------------------------------------------------------------
-// Check the current AI1 plugin (ref. External opretor homescreen feature)
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::CheckCurrentAi1PluginL()
-{
-    TUid uid = { KCRUidActiveIdle }; // KCRUidActiveIdle AI1 Cenrep!
-    TInt value = 0;
-    TInt currentCount = 0;
-
-    CRepository* cenRep = CRepository::NewL(uid);
-    cenRep->Get(KCRPluginCountKey, currentCount);
-
-    if (currentCount) // count must be set
-    {
-        cenRep->Get(KCRFirstPluginKey, value);
-    }
-    delete cenRep;
-
-    if (value != 0)
-    {
-        iCurrentAi1Plugin = value;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Manually start updating theme/skin listing
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::ManualGetSkinsRestartL(TBool aForceStart)
-{
-    if( !aForceStart && iMySkinList->Count() > 0 &&
-        iUiRefreshTimer->IsActive() )
-        {
-        return;
-        }
-        
-    // Restart get skins manually!
-    if( iPlugin->Container() )
-        {
-        iPlugin->Container()->RemoveThemes(0);
-        }
-    iMySkinList->ResetAndDestroy();
-    iFirstUpdateRound = ETrue;
-    iFirstUpdateRoundInjected = EFalse;
-    iPslnFWThemeHandler->CancelGetApplicationSkins();
-    iAddIndex = 0;
-    iPslnFWThemeHandler->GetApplicationSkinsL(KUidActiveIdle);
-}
-
-// ---------------------------------------------------------------------------
-// Restart AI2 process
-// ---------------------------------------------------------------------------
-//
-TInt CPslnActiveIdlePluginEngine::RestartAifw()
-{
-    if (!IsAiRunning())
-    {
-        _LIT(KAiExeName, "z:\\sys\\bin\\ailaunch.exe");
-        RProcess process;
-        TInt ret = process.Create(KAiExeName, KNullDesC);
-        process.Resume();
-        process.Close();
-        return ret;
-    }
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-// Checks if AI2 process is running
-// ---------------------------------------------------------------------------
-//
-TBool CPslnActiveIdlePluginEngine::IsAiRunning()
-{
-    TApaTaskList taskList(CCoeEnv::Static()->WsSession());
-    TApaTask startTask = taskList.FindApp(TUid::Uid(0x100058f4));
-
-    if (!startTask.Exists()) // if first boot queries are done continue bringing ai2 to foreground.
-    {
-        TApaTask aiTask = taskList.FindApp(TUid::Uid(AI_UID3_AIFW_EXE));
-        if (aiTask.Exists())  // App open
-        {
-            return ETrue;
-        }
-    }
-    return EFalse;
-}
-
-// ---------------------------------------------------------------------------
-// start ui refresh timer
-// ---------------------------------------------------------------------------
-//
-void CPslnActiveIdlePluginEngine::UiTimerRestart()
-    {
-    iUiRefreshTimer->Cancel();
-    iUiRefreshTimer->Start(
-        KPSLNOneSecondInMicroSeconds/4, // quarter second delay
-        KPSLNOneSecondInMicroSeconds/4,
-        TCallBack(UiRefreshTimerCallback, this));
-    }
-    
-// ---------------------------------------------------------------------------
-// Call back for restart timer
-// ---------------------------------------------------------------------------
-//
-TInt CPslnActiveIdlePluginEngine::RestartTimerCallback(TAny* aSelf)
-{
-    CPslnActiveIdlePluginEngine* self =
-        static_cast<CPslnActiveIdlePluginEngine*>(aSelf);
-
-    if (self)
-    {
-        ++(self->iRestartRetryCount);
-        if ( self->RestartAifw() == KErrNone)
-        {
-            self->iRestartTimer->Cancel();
-            TApaTaskList taskList(CCoeEnv::Static()->WsSession());
-            TApaTask startTask = taskList.FindApp(TUid::Uid(0x100058f4));
-
-            if (!startTask.Exists()) // if first boot queries are done continue bringing ai2 to foreground.
-            {
-                TApaTask aiTask = taskList.FindApp(TUid::Uid(AI_UID3_AIFW_EXE));
-                if (aiTask.Exists())  // App open
-                {
-                    //aiTask.BringToForeground();
-                    CAknSgcClient::MoveApp(aiTask.WgId(), ESgcMoveAppToForeground);
-                }
-            }
-            CAknEnv::RunAppShutter();
-            return 0;
-        }
-        if (self->iRestartRetryCount > 3)
-        {
-            self->iRestartTimer->Cancel();
-            TRAP_IGNORE(self->ManualGetSkinsRestartL());
-            return 0;
-        }
-    }
-    return 1;
-}
-
-// ---------------------------------------------------------------------------
-// Call back for UI refresh timer timer
-// ---------------------------------------------------------------------------
-//
-TInt CPslnActiveIdlePluginEngine::UiRefreshTimerCallback(TAny* aSelf)
-{
-    CPslnActiveIdlePluginEngine* self =
-        static_cast<CPslnActiveIdlePluginEngine*>(aSelf);
-
-    if (self)
-    {
-        self->iUiRefreshTimer->Cancel();
-        TRAP_IGNORE(self->AddThemesToContainerL());
-        if( self->iPlugin->Container() )
-            {
-            self->iPlugin->Container()->RefreshList();
-            }
-    }
-    return 0;
-}
-
-// End of File.
--- a/idlefw/plugins/pslnactiveidleplugin/src/pslnactiveidlepluginimplementationtable.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM proxy table for PslnActiveIdlePlugin.
-*
-*/
-
-#include <e32std.h>
-#include <implementationproxy.h>
-
-#include "pslnactiveidleplugin.h"
-#include "gsactiveidleplugin.h"
-#include "pslnactiveidlepluginuids.h"
-
-const TImplementationProxy KPslnActiveIdlePluginImplementationTable[] =
-{
-    IMPLEMENTATION_PROXY_ENTRY(KPslnActiveIdlePluginImplementationUID, CPslnActiveIdlePlugin::NewL)
-    ,
-    IMPLEMENTATION_PROXY_ENTRY(KGSActiveIdlePluginImplementationUID,   CGSActiveIdlePlugin::NewL)
-};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-{
-    aTableCount = sizeof(KPslnActiveIdlePluginImplementationTable) / sizeof(TImplementationProxy);
-    return KPslnActiveIdlePluginImplementationTable;
-}
-
-// End of File.
--- a/idlefw/plugins/sapidataplugin/data/sapidataplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/data/sapidataplugin.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -18,6 +18,7 @@
 
 // INCLUDES
 #include <ecom/registryinfov2.rh>
+#include <hscontentpublisheruid.hrh>
 #include "sapidatapluginuids.hrh"
 
  
@@ -42,7 +43,7 @@
         INTERFACE_INFO
         {
             // UID of interface that is implemented
-            interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
+            interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
 
             implementations = 
             {
--- a/idlefw/plugins/sapidataplugin/inc/sapidata.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidata.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,22 +19,31 @@
 #ifndef SAPIDATA_H
 #define SAPIDATA_H
 
-// INCLUDE FILES
+// System includes
 #include <liwcommon.h> 
 #include <AknsItemID.h>
-#include <aieventhandlerextension.h>
+
+// User includes
+#include <hscontentpublisher.h>
 #include "sapidatapluginconst.h"
-#include "aicontentpublisher.h"
 
+// Forward declarations
 class MLiwInterface;
 class CLiwServiceHandler;
 class CSapiDataObserver;
 class CSapiDataPlugin;
-
+class MAiContentObserver;
 
-class CContentItem :  public CBase
+/**
+ *  @ingroup group_sapidataplugin
+ *
+ *  Content item
+ *
+ *  @since S60 5.0
+ */
+NONSHARABLE_CLASS( CContentItem ) : public CBase
 	{
-	public :
+public:
 
 	/**
 	* Part of the two phased constuction
@@ -43,19 +52,18 @@
 	* @return none
 	*/
 	static CContentItem* NewL();
-
 	
 	/*
 	* Destructor  
 	*/
 	~CContentItem();
 
-	private :
+private:
 		
 	/* 
 	* Constructor  
 	*/
-		CContentItem();   
+    CContentItem();   
 	
 	/**
 	* Part of the two phased construction
@@ -65,7 +73,7 @@
 	*/
 	void ConstructL();
 
-	public :
+public:
 
     TInt iId;
 	/* item id */
@@ -81,12 +89,13 @@
  *
  *  Sapi data
  *
- *  @since S60 v3.2
+ *  @since S60 5.0
  */
-class CSapiData : public CBase
+NONSHARABLE_CLASS( CSapiData ) : public CBase
    {
-   public:
- 
+public:
+    // constructor and destructor
+    
     /**
     * Part of the two phased construction
     *
@@ -103,9 +112,9 @@
     */
     ~CSapiData();
     
-   private :
-
-
+private:
+    // constructors
+    
     /**
     * Constructor
     *
@@ -113,8 +122,7 @@
     * @return none
     */
     CSapiData();
-   
-    
+       
     /**
     * Part of the two phased construction
     *
@@ -122,15 +130,9 @@
     * @return void
     */
     void ConstructL(CSapiDataPlugin* aPlugin);
-   
-    /**
-    * Change the publisher status
-    *
-    * @param aStatus new status of the publisher
-    * @return void
-    */
-    void ChangePublisherStatusL(const TDesC& aStatus);
-    
+
+    // new functions
+
     /**
     * Gets the menu item from the publisher
     *
@@ -139,7 +141,16 @@
     */
     void GetMenuItemsL();
     
-   public :
+public:
+    // new functions
+    
+    /**
+    * Change the publisher status
+    *
+    * @param aStatus new status of the publisher
+    * @return void
+    */
+    void ChangePublisherStatusL(const TDesC& aStatus);
     
     /**
     * Configures the subscriber and data to subscribe.
@@ -150,9 +161,22 @@
     */
     void ConfigureL(RAiSettingsItemArray& aConfigurations);
     
+    /**
+     * Sets content id
+     * 
+     * @param aId Content id
+     */
     void SetContentIdL(const TDesC8& aId);
     
     /**
+     * Sets startup reason, which will be communicated to CPS client
+     * in the case of late registration.
+     * 
+     * @param aStartupReason A reason
+     */
+    void SetStartupReasonL(const TDesC& aStartupReason);
+    
+    /**
 	* Execute the command to get the data from CPS
 	*
 	* @param aRegistry type of registry (publisher/cp_data) 
@@ -278,62 +302,6 @@
     * @return boolean (ETrue/EFalse).
     */
     TBool IsPluginActive();
-     
-    /**
-    * Resume the publisher
-    * 
-    * @param None
-    * @return void
-    */
-    void ResumeL();
-    
-    /**
-	* Suspend the publisher
-	* 
-	* @param None
-	* @return void
-	*/
-    void SuspendL();
-    
-    /**
-	* Activate the publisher
-	* 
-	* @param None
-	* @return void
-	*/
-    void ActivateL();
-    
-    /**
-	* Deactivate the publisher
-	* 
-	* @param None
-	* @return void
-	*/
-    void DeActivateL();
-    
-    /**
-	* OnLineL 
-	* 
-	* @param None
-	* @return void
-	*/
-    void OnLineL();
-    
-    /**
-	* OffLineL 
-	* 
-	* @param None
-	* @return void
-	*/
-    void OffLineL();
-    
-    /**
-	* InActiveL 
-	* 
-	* @param None
-	* @return void
-	*/
-	void InActiveL();
 	
     /**
 	* Update the publisher status 
@@ -366,54 +334,41 @@
 	*/
     void SetUpdateNeeded(TBool aStatus);
     
-    private :   
-    
-    // Subscriber interface
-    // own
-    MLiwInterface* iInterface;
-      
-    // Data Observer to CPS content registry
-    // Own // iConObserver;
-    CSapiDataObserver* iContentObserver;
+private:   
+    // data
     
-    // Data Observer to CPS publisher registry
-    // Own // iConObserver;
+    /** Subscriber interface, owned */    
+    MLiwInterface* iInterface;      
+    /** Data Observer to CPS content registry, owned */    
+    CSapiDataObserver* iContentObserver;    
+    /** Data Observer to CPS publisher registry, owned */    
     CSapiDataObserver* iPubObserver;
-   
-    // Service handler 
-    // Own
-    CLiwServiceHandler* iServiceHandler;
-    
-    // Array of configurations
-    // Own
+    /** Service handler, owned */    
+    CLiwServiceHandler* iServiceHandler;    
+    /** Array of configurations, owned */    
     RPointerArray<CContentItem> iItemList;
-
-    // Number of configurations 
-    TInt iItemCount;
-    
-    // Command name in configuration Array
+    /** Number of configurations */ 
+    TInt iItemCount;    
+    /** Command name in configuration Array, owned */
     HBufC8* iCommandName;
-	/* publisher id */
+	/** publisher id, owned */
 	HBufC* iPublisher;
-	/* content type */
+	/** content type, owned */
 	HBufC* iContentType;
-	/* content id */
+	/** content id, owned */
 	HBufC* iContentId;
-
-    // Reference of the sapi data plugin
-    // Not owned
-    CSapiDataPlugin* iPlugin;
-    
-    // Menu item names
-    // Own
-    RPointerArray<HBufC> iMenuItems; 
-    
-    // Trigger names for the menu items
-    // Own
-    RPointerArray<HBufC8> iMenuTriggers;
-    
-    // Store the status of update needed on resume
+	/** Startup reason, owned */
+	HBufC* iStartupReason;
+    /** Reference of the sapi data plugin, not owned */    
+    CSapiDataPlugin* iPlugin;    
+    /** Menu item names, owned */    
+    RPointerArray<HBufC> iMenuItems;    
+    /** Trigger names for the menu items, owned */
+    RPointerArray<HBufC8> iMenuTriggers;    
+    /** Store the status of update needed on resume */
     TBool iUpdateNeeded;
     };
 
-#endif /*SAPIDATA_H*/
+#endif // SAPIDATA_H
+
+// End of file
--- a/idlefw/plugins/sapidataplugin/inc/sapidataobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidataobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,15 +19,27 @@
 #ifndef SAPIDATAOBSERVER_H
 #define SAPIDATAOBSERVER_H
 
-// INCLUDE FILES
+// System includes
 #include <liwcommon.h>
 
+// User includes
+
+// Forward declarations
 class CSapiData;
 
-class CSapiDataObserver : public CBase, public MLiwNotifyCallback
+/**
+ * @ingroup group_sapidataplugin
+ *
+ * Sapi data observer
+ *
+ * @since S60 5.0
+ */
+NONSHARABLE_CLASS( CSapiDataObserver ) : public CBase, 
+    public MLiwNotifyCallback
     {
 public:
-
+    // constructor and destructor
+    
     /**
     * Part of the two phased constuction
     *
@@ -45,7 +57,8 @@
     */   
     ~CSapiDataObserver();
 
-private :
+private:
+    // construtors
     
     /**
     * Constructor
@@ -64,7 +77,8 @@
     */
     void ConstructL( MLiwInterface* aInterface, CSapiData* aData );
        
-public:  //from MLiwNotifyCallbackc
+public:  
+    //from MLiwNotifyCallbackc
     
     /**
     * Handles notifications caused by an asynchronous Execute*CmdL call
@@ -85,6 +99,7 @@
         const CLiwGenericParamList& /*aInParamList*/);
 
 public:
+    // new functions
     
     /**
     * Registers to CPS for add, delete , update and execute notifications
@@ -100,18 +115,17 @@
     void ReleaseL();
         
 private:
-        
-    // Reference of 
-    // Not owned
-    MLiwInterface* iInterface;
+    // data
     
-    // Reference of the sapi data
-    // Not owned
-    CSapiData* iData;
-    
-    // Call back error code
-    TInt iError;
-        
+    /** Interface Reference, not owned */    
+    MLiwInterface* iInterface;   
+    /** Reference of the sapi data, not owned */
+    CSapiData* iData;    
+    /** Call back error code */
+    TInt iError;        
     };
 
-#endif /*SAPIDATAOBSERVER_H*/
+#endif // SAPIDATAOBSERVER_H
+
+// End of file
+
--- a/idlefw/plugins/sapidataplugin/inc/sapidataplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidataplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Plug-in main class
+* Description:  SAPI data plug-in main class
 *
 */
 
@@ -19,16 +19,16 @@
 #ifndef SAPIDATAPLUGIN_H
 #define SAPIDATAPLUGIN_H
 
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
+// System includes
+
+// User includes
+#include <hscontentpublisher.h>
 #include <aicontentmodel.h>
-#include <aieventhandlerextension.h>
 
+// Forward declarations
 class MAiContentObserver;
 class MAiContentItemIterator;
-class MAiPSPropertyObserver;
 class CSapiData;
-class CDesC16Array;
 class CGulIcon;
 
 /**
@@ -38,13 +38,11 @@
  *
  *  @since S60 v3.2
  */
-class CSapiDataPlugin : public CAiContentPublisher,
-                     	public MAiPropertyExtension,
-                     	public MAiEventHandlerExtension
-                    
-    {
+NONSHARABLE_CLASS( CSapiDataPlugin ) : public CHsContentPublisher                    
+    {   
+public:
+    // data types
     
-public :
 	 /**
 	 * Plugin's network state.
 	 */
@@ -62,11 +60,12 @@
 		{
 		ENone,
 		EResume,
-		ESuspend,
-		EInActive,
+		ESuspend
 		};
+	
 public:
-
+    // constructor and destructor
+    
     /**
     * Part of the two phased constuction
     *
@@ -84,6 +83,7 @@
     ~CSapiDataPlugin();
 
 private:
+    // constructors
     
     /**
     * Constructor
@@ -100,148 +100,67 @@
     * @return void
     */
     void ConstructL();
-
-    /**
-    * Resume the plug-in.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */    
-    void DoResumeL(TAiTransitionReason aReason);
     
-public: // from base class CAiContentPublisher
+public: 
+    // from CHsContentPublisher
     
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to request the plug-in free all
-    * memory and CPU resources and close all its open files, e.g. the plug-in 
-    * should unload its engines due backup operation. The method transits the 
-    * plug-in to "Idle" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Stop( TAiTransitionReason aReason );
+     * @see CHsContentPublisher
+     */
+    void Start( TStartReason aReason );
 
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * allowed to consume CPU resources, e.g plug-in is able to run timers,
-    * perform asynchronous operations, etc. The method transits the plug-in
-    * to "Alive" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Resume( TAiTransitionReason aReason );
-
+     * @see CHsContentPublisher
+     */    
+    void Stop( TStopReason aReason );
+    
     /**
-    * From CAiContentPublisher
-    * The method is called by the framework to instruct plug-in that it is
-    * not allowed to consume CPU resources, e.g plug-in MUST stop each
-    * timers, cancel outstanding asynchronous operations, etc. The method
-    * transits the plug-in to "Suspendend" state.
-    *
-    * @param aReason reason for state change, see TAiTransitionChange.
-    * @return void
-    */
-    void Suspend( TAiTransitionReason aReason );
-
-    /**
-    * From CAiContentPublisher
-    * Adds the content observer / subscriber to plug-in. The plug-in MUST
-    * maintain a registry of subscribers and send notification to all them
-    * whenever the plug-in changes state or new content available.
-    *
-    * @param aObserver content observer to register.
-    * @return void
-    */
-    void SubscribeL( MAiContentObserver& aObserver );
+     * @see CHsContentPublisher
+     */    
+    void Resume( TResumeReason aReason );
     
     /**
-    * From CAiContentPublisher
-    * Configures the plug-in.
-    * Plug-ins take ownership of the settings array, so it must either
-    * store it in a member or free it. Framework has put the array in cleanup
-    * stack so the plugin shouldn't do that.
-    * If this leaves, the plug-in will be destroyed by AI FW.
-    * Plug-in must support LaunchByValue-event even if normal shortcuts don't
-    * work. The only allowed serious enough leave is KErrNotFound from CenRep.
-    *
-    * @param aSettings setting items defined in the UI definition.
-    * @return void
-    */
-    void ConfigureL( RAiSettingsItemArray& aSettings );
+     * @see CHsContentPublisher
+     */
+    void Suspend( TSuspendReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void SetOnline();
+
+    /**
+     * @see CHsContentPublisher
+     */
+    void SetOffline();
     
     /**
-    * From CAiContentPublisher
-    * Returns interface extension. In Series 60 3.1 only event & property
-    * extensions are supported. See MAiEventExtension & MAiPropertyExtension
-    * interfaces.
-    *
-    * @param  aUid - UID of the extension interface to access.
-    * @return the extension interface. Actual type depends on the passed aUid 
-    *         argument.
-    */
-    TAny* Extension( TUid aUid );  
-
-// from base class MAiPropertyExtension
-
-    /**
-    * From MAiPropertyExtension.
-    * Read property of publisher plug-in.
-    *
-    * @param aProperty - identification of property.
-    * @return pointer to property value.
-    */
-    TAny* GetPropertyL( TInt aProperty );
+     * @see CHsContentPublisher
+     */
+    void SubscribeL( MAiContentObserver& aObserver );
 
     /**
-    * From MAiPropertyExtension.
-    * Write property value.
-    *
-    * @param aProperty - identification of property.
-    * @param aValue - contains pointer to property value.
-    */
-    void SetPropertyL( TInt aProperty, TAny* aValue );
-  
- // from base class MAiEventHandlerExtension
-   
-     /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     * @param aEvent - unique identifier of event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where <event name> is mapped by the framework to unique
-     *        identifier supplied in aEvent, <event params> are provided to
-     *        plug-in as-is in the descriptor.
-     * @since S60 3.2
+     * @see CHsContentPublisher
      */
-     void HandleEvent(TInt aEvent, const TDesC& aParam);
-    
-     /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     *
-     * @param aEventName - name of the event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where  <event name> mapping to unique identifier supplied by event 
-     *        is failed by the frame work then the  <event name> and  
-     *        <event params>  are provided to plug-in as-is in the descriptor.
+    void ConfigureL( RAiSettingsItemArray& aSettings );  
+
+    /**
+     * @see CHsContentPublisher
      */
-     void HandleEvent(const TDesC& aEventName, const TDesC& aParam);
+    TAny* GetProperty( TProperty aProperty );     
 
     /**
- 	* Invoked by the framework for querying if plugin has menu item
- 	*
- 	* @param aMenuItem  menu item name.
- 	* @return ETrue if plugin has specific menu item, EFalse otherwise 
-	*/
-    TBool HasMenuItem(const TDesC16& aMenuItem);
+     * @see CHsContentPublisher
+     */
+    void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
+
+    /**
+     * @see CHsContentPublisher
+     */
+    TBool HasMenuItem( const TDesC16& aMenuItem );
      
-public : // new functions
+public: 
+    // new functions
 	
     /**
     * Publishes widget's texts and images
@@ -282,7 +201,7 @@
     * @param void 
     * @return boolean (ETrue/EFalse)
     */
-    TBool IsActive();
+    TBool IsActive() const;
     
     /**
 	* Publish a specific text of the widget  
@@ -332,69 +251,38 @@
      * CSapiData getter
      * @return Pointer to CSapiData
      */
-    inline CSapiData* Data() const
-        {
-        return iData;
-        }
+    CSapiData* Data() const;
 
 	/*
 	 * Plugin's network status getter
-	 * @return Pointer to Harvester status observer
 	 */
-	inline TPluginNetworkStatus NetworkStatus() const
-		{
-		return iNetworkStatus;
-		}
-	
-private: // data
-
-    // Iterator for plugin content
-    // Own
-    MAiContentItemIterator* iContent;
-
-    // Array of content observers
-    // Own
-    RPointerArray<MAiContentObserver> iObservers;
-    
-    // Information about the content publisher (this plug-in)
-    TAiPublisherInfo iInfo;
-	
-	// Number of data in the content model.
-	TInt iDataCount;
-	 
-	// Dynamic content model
-	// Own
-	TAiContentItem* iContentModel;
+	TPluginNetworkStatus NetworkStatus() const;
 	
-	// Reference array for Published text
-	// Own
-	RPointerArray<HBufC> iDataArray;
-	
-	// Service API Data Subscriber.
-	// Own
-	CSapiData* iData;
-    
-    // References array for published images 
-    // Own
-    RArray<CGulIcon*> iIconArray;
-    
-    // File Server
-    // Reference
-    RFs iRfs;
-    
-    // Plugin's network status
-    TPluginNetworkStatus iNetworkStatus;
-    
-    // Is Homescreen foreground.
-    TBool iHSForeGround;
-    
-    // Is KeyLockON.
-    TBool iKeyLockOn;
+private: 
+    // data
 
-	// Plugin state    
+    /** Iterator for plugin content, owned */    
+    MAiContentItemIterator* iContent;
+    /** Array of content observers, owned */
+    RPointerArray<MAiContentObserver> iObservers;       
+	/** Number of data in the content model */
+	TInt iDataCount;	
+	/** Dynamic content model, owned */	
+	TAiContentItem* iContentModel;	
+	/** Reference array for Published text, owned */
+	RPointerArray< HBufC > iDataArray;	
+	/** Service API Data Subscriber, owned */	
+	CSapiData* iData;    
+    /** References array for published images, owned */     
+    RArray< CGulIcon* > iIconArray;    
+    /** Handle to file server session, owned */    
+    RFs iRfs;    
+    /** Plugin's network status */
+    TPluginNetworkStatus iNetworkStatus;       
+	/** Plugin state */    
     TPluginStates iPluginState;
     };
 
 #endif // SAPIDATAPLUGIN_H
 
-
+// End of file
--- a/idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h	Fri Feb 19 23:07:29 2010 +0200
@@ -36,6 +36,7 @@
 _LIT(KPlugin, "plugin");
 
 _LIT(KNewsTicker ,"newsticker");
+_LIT(KTextEditor, "texteditor");
 
 
 // CPS Constants
@@ -79,8 +80,14 @@
 _LIT(KWidget, "hswidget");
 _LIT( KDeActive, "deactive");
 _LIT( KActive, "active");
+_LIT( KSystemStartup, "systemstartup");
+_LIT( KPageStartup, "pagestartup");
+_LIT( KPluginStartup, "pluginstartup");
 _LIT( KSuspend , "suspend");
 _LIT( KResume, "resume");
+_LIT( KSystemShutdown, "systemshutdown");
+_LIT( KPageShutdown, "pageshutdown");
+_LIT( KPluginShutdown, "pluginshutdown");
 _LIT( KOnLine, "online");
 _LIT( KOffLine, "offline");
 _LIT( KInActive, "inactive");
--- a/idlefw/plugins/sapidataplugin/inc/sapidatapluginuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidatapluginuids.hrh	Fri Feb 19 23:07:29 2010 +0200
@@ -19,8 +19,6 @@
 #ifndef SAPIDATAPLUGINUIDS_HRH
 #define SAPIDATAPLUGINUIDS_HRH
 
-#include <platform/mw/aicontentpublisheruid.hrh>
-
 /**
  * Ecom dll uid for AI Data plug-in.
  */
--- a/idlefw/plugins/sapidataplugin/src/sapidata.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidata.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,15 +15,18 @@
 *
 */
 
+// System includes
 #include <ecom/ecom.h>
 #include <liwservicehandler.h>
 #include <aipluginsettings.h>
 #include <utf.h>
 
+// User includes
 #include "sapidata.h"
 #include "sapidatapluginconst.h"
 #include "sapidataobserver.h"
 #include "sapidataplugin.h"
+
 // ======== MEMBER FUNCTIONS ========
 	
 // ---------------------------------------------------------------------------
@@ -116,7 +119,7 @@
 	delete iPublisher;
 	delete iContentType;
 	delete iContentId;
-
+	delete iStartupReason;
 	
 	if(iPubObserver)
 		{
@@ -249,10 +252,27 @@
     iPubObserver = CSapiDataObserver::NewL( iInterface, this );
     }
 
+// ---------------------------------------------------------------------------
+// SetContentIdL
+// ---------------------------------------------------------------------------
+//
 void CSapiData::SetContentIdL(const TDesC8& aId)
 	{
 	iContentId = CnvUtfConverter::ConvertToUnicodeFromUtf8L(aId);
 	}
+
+// ---------------------------------------------------------------------------
+// SetStartupReasonL
+// ---------------------------------------------------------------------------
+//
+void CSapiData::SetStartupReasonL(const TDesC& aStartupReason)
+    {
+    delete iStartupReason;
+    iStartupReason = NULL;
+    iStartupReason = aStartupReason.AllocL();
+    ChangePublisherStatusL( aStartupReason );
+    }
+
 // ---------------------------------------------------------------------------
 // GetMenuItemsL
 // ---------------------------------------------------------------------------
@@ -702,6 +722,12 @@
 //
 void CSapiData::ChangePublisherStatusL(const TDesC& aStatus)
     {
+    if ( aStatus == KResume && iUpdateNeeded )
+        {
+        iPlugin->PublishL();
+        iUpdateNeeded = EFalse;
+        }
+    
     CLiwGenericParamList* inParamList  = &iServiceHandler->InParamListL();
     CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
     HBufC8* triggerName = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aStatus);
@@ -732,74 +758,6 @@
    }
 
 // ---------------------------------------------------------------------------
-// ResumeL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::ResumeL()
-    {
-    if ( iUpdateNeeded )
-     	{
-     	iPlugin->PublishL();
-     	iUpdateNeeded = EFalse;
-     	}
-    ChangePublisherStatusL( KResume );
-    }
-
-// ---------------------------------------------------------------------------
-// SuspendL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::SuspendL()
-    {
-    ChangePublisherStatusL( KSuspend );
-    }
-
-// ---------------------------------------------------------------------------
-// ActivateL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::ActivateL()
-    {
-    ChangePublisherStatusL( KActive );
-    }
-
-// ---------------------------------------------------------------------------
-// DeActivateL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::DeActivateL()
-    {
-    ChangePublisherStatusL( KDeActive );
-    }
-
-// ---------------------------------------------------------------------------
-// OnLineL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::OnLineL()
-    {
-    ChangePublisherStatusL( KOnLine );
-    }
-
-// ---------------------------------------------------------------------------
-// offLineL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::OffLineL()
-    {
-    ChangePublisherStatusL( KOffLine );
-    }
-
-// ---------------------------------------------------------------------------
-// InActiveL
-// ---------------------------------------------------------------------------
-//
-void CSapiData::InActiveL()
-    {
-    ChangePublisherStatusL( KInActive );
-    }
-
-// ---------------------------------------------------------------------------
 // UpdatePublisherStatusL
 // ---------------------------------------------------------------------------
 //
@@ -808,23 +766,28 @@
 	 if ( aPublisher == iPublisher )
 		 {
 		 // Resend the plugin status to publisher
-		 ActivateL();
+         ChangePublisherStatusL( KActive );
+         if( iStartupReason->Length() != 0 )
+             {
+             ChangePublisherStatusL( *iStartupReason );
+             }
+         
 		 if ( iPlugin->IsActive() )
 			 {
-			 ResumeL();
+             ChangePublisherStatusL( KResume );
 			 }
 		 else
 			 {
-			 SuspendL();
+             ChangePublisherStatusL( KSuspend );
 			 }
 		  // forward the network status if it uses.
 		if ( iPlugin->NetworkStatus() == CSapiDataPlugin::EOnline )
 			{
-			OnLineL();
+            ChangePublisherStatusL( KOnLine );
 			}
 		else if ( iPlugin->NetworkStatus() == CSapiDataPlugin::EOffline )
 			{
-			OffLineL();
+            ChangePublisherStatusL( KOffLine );
 			}
 		 }
 	}
--- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -11,18 +11,14 @@
 *
 * Contributors:
 *
-* Description:  Profile plug-in publisher
+* Description:  SAPI data plug-in publisher
 *
 */
 
-
+// System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationproxy.h>
-#include <aicontentobserver.h>
-#include <aiutility.h>
-#include <aipspropertyobserver.h>
 #include <PUAcodes.hrh>
-#include <aipluginsettings.h>
 #include <badesca.h>
 #include <fbs.h>
 #include <gulicon.h>
@@ -30,6 +26,13 @@
 #include <AknsUtils.h> 
 #include <AknsConstants.h>
 #include <e32property.h>
+
+// User includes
+#include <hspublisherinfo.h>
+#include <aicontentobserver.h>
+#include <aiutility.h>
+#include <aipspropertyobserver.h>
+#include <aipluginsettings.h>
 #include <activeidle2domainpskeys.h>
 
 #include "sapidatapluginconst.h"
@@ -37,7 +40,7 @@
 #include "sapidataplugin.h"
 #include "sapidata.h"
 
-// CONST CLASS VARIABLES
+// Constants
 const TImplementationProxy KImplementationTable[] =
     {
     IMPLEMENTATION_PROXY_ENTRY( KImplUidDataPlugin, CSapiDataPlugin::NewL ) 
@@ -75,6 +78,7 @@
 // ---------------------------------------------------------------------------
 //
 CSapiDataPlugin::CSapiDataPlugin()
+    : iNetworkStatus( EUnknown ), iPluginState( ENone ) 
     {
     }
     
@@ -83,14 +87,10 @@
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::ConstructL()
-    { 
-    iInfo.iUid.iUid = SAPIDP_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DATAPLUGIN; 
-    iPluginState = ENone;
-    iHSForeGround = EFalse;
-    iKeyLockOn = EFalse;
-    iNetworkStatus = EUnknown;
-    iData = CSapiData::NewL(this);
-
+    {     
+    User::LeaveIfError( iRfs.Connect() );
+    
+    iData = CSapiData::NewL( this );   
     }
     
 // ---------------------------------------------------------------------------
@@ -101,123 +101,44 @@
 CSapiDataPlugin::~CSapiDataPlugin()
     {
     // deactivate the publishers
-    if( iData )
+    if ( iData )
         {
-        TRAP_IGNORE(iData->DeActivateL());
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KDeActive ));
+        
         delete iData;
         }
+    
     iObservers.Close();
     Release( iContent );
+
     iDataArray.ResetAndDestroy();
 
-    if( iContentModel)
+    if ( iContentModel )
         {
-        for( TInt i = iDataCount-1;i>=0  ; i-- )
+        for ( TInt i = iDataCount - 1; i >= 0  ; i-- )
             {
             User::Free((TAny*)iContentModel[i].cid);   
             }
-        delete []iContentModel;
-        }
-    iIconArray.Reset();
-    }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-ins take ownership of the settings array, so it must either
-// store it in a member or free it.
-// ---------------------------------------------------------------------------
-//
-void CSapiDataPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
-    {
-    if( iDataCount > 0 )
-        {
-        // We own the array so destroy it
-         aSettings.ResetAndDestroy();
-         return;
+        
+        delete [] iContentModel;
         }
     
-    RAiSettingsItemArray contentItemsArr;
-    RAiSettingsItemArray configurationItemsArr;
+    iIconArray.Reset();
     
-    TInt count = aSettings.Count();
-    for(TInt i = 0; i < count; i++ )
-        {
-        MAiPluginSettings* pluginSetting = aSettings[i];
-        if( pluginSetting->AiPluginItemType() == EAiPluginContentItem )
-            {
-            contentItemsArr.Append(pluginSetting);
-            }
-        else if( pluginSetting->AiPluginItemType() == EAiPluginConfigurationItem )
-            {
-            configurationItemsArr.Append(pluginSetting);
-            }
-        }
-    iDataCount = contentItemsArr.Count();
-    if(iDataCount > 0 )
-        {
-        // Create the content Model
-        HBufC* contentId = HBufC::NewLC( KAiContentIdMaxLength + KAiPluginNameMaxLength );
-        iContentModel = new TAiContentItem[iDataCount];
-        for(TInt i = 0; i < iDataCount; i++)
-            {
-            MAiPluginContentItem& contentItem = (contentItemsArr[i])->AiPluginContentItem();
-            iContentModel[i].id = i;
-            if( contentItem.Type() == KText() || contentItem.Type() == KNewsTicker() )
-                {
-                // text
-                iContentModel[i].type = KAiContentTypeText;
-                }
-            if( contentItem.Type() == KImage() )
-                {
-                // image
-                iContentModel[i].type = KAiContentTypeBitmap;
-                }
-            
-            contentId->Des().Copy(contentItem.Name());
-            contentId->Des().Delete(0, contentId->Des().LocateReverse(KPluginNameSeprator) +1);
-  
-            TInt sizeOfContentId = contentId->Des().Size()+sizeof(wchar_t);
-            iContentModel[i].cid = static_cast<const wchar_t*>( User::Alloc( sizeOfContentId ) );
-            Mem::Copy((TAny*)iContentModel[i].cid, contentId->Des().PtrZ(), sizeOfContentId);
-            
-            contentId->Des().Delete( 0, contentId->Des().Length());
-            }    
-        
-        CleanupStack::PopAndDestroy( contentId );
-        iContent = AiUtility::CreateContentItemArrayIteratorL( iContentModel, iDataCount );
-        // Configurations 
-        iData->ConfigureL(configurationItemsArr);
-        
-        // Activate the publisher
-        iData->ActivateL();
-                
-        // Register for notifications
-        iData->RegisterPublisherObserverL();
-      
-        PublishL();
-        
-        iPluginState = ESuspend;
-        iData->RegisterContentObserverL();
-        }
-    contentItemsArr.Reset();
-    configurationItemsArr.Reset();
-       // We own the array so destroy it
-    aSettings.ResetAndDestroy();
-    // publish the initial data
+    iRfs.Close();
     }
 
+
 // ---------------------------------------------------------------------------
 // Publishes widget's texts and images
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::PublishL()
-    {
-    User::LeaveIfError( iRfs.Connect() );
-
+    {    
     TInt observers( iObservers.Count() );        
     TInt transactionId = reinterpret_cast<TInt>( this );
 
-    for ( int i = 0; i < observers; i++ )
+    for ( TInt i = 0; i < observers; i++ )
         {
         MAiContentObserver* observer = iObservers[i];
         
@@ -233,8 +154,7 @@
         // Release memory of the published icons
         iIconArray.Reset();
         
-        }
-    iRfs.Close();
+        }    
     }
 
 // ---------------------------------------------------------------------------
@@ -340,19 +260,20 @@
           }
       else  // Interpret as File path
           {
-          RFile* iconFile = new (ELeave) RFile();
-          err = iconFile->Open( iRfs, aPath, EFileShareReadersOnly |  EFileRead );
+          RFile iconFile;
+          
+          err = iconFile.Open( iRfs, aPath, EFileShareReadersOnly |  EFileRead );
+
           if( err == KErrNone )
             {
-             aObserver->Publish( *this, aContentId, *iconFile, aContentId );
+             aObserver->Publish( *this, aContentId, iconFile, aContentId );
             }
           else
               {
               aObserver->Clean( *this, aContentId, aContentId );
               }
-          iconFile->Close();
-          delete iconFile;
-          iconFile = NULL;
+          
+          iconFile.Close();
           }
         }
     }
@@ -442,8 +363,7 @@
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::RefreshL(TDesC& aContentType, TDesC& aOperation)
-    {
-     User::LeaveIfError( iRfs.Connect() );
+    {     
 	 TInt observers( iObservers.Count() );        
 	 TInt transactionId = reinterpret_cast<TInt>( this );
 	 
@@ -468,8 +388,7 @@
 		 // Relese memory of the published text
          iDataArray.ResetAndDestroy();
 		 iIconArray.Reset();
-		}
-	 iRfs.Close();
+		}	 
     }
 
 // ---------------------------------------------------------------------------
@@ -483,269 +402,287 @@
 		{
 		aObserver->Clean( *this, aContentId, aContentId );		
 		}
+	}
 
-	}
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is requested to unload its engines due backup operation
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::Start
+//
+// ----------------------------------------------------------------------------
+//
+void CSapiDataPlugin::Start( TStartReason aReason )
+    {
+    if( aReason == ESystemStartup )
+        {
+        TRAP_IGNORE( iData->SetStartupReasonL( KSystemStartup ));
+        }
+    else if( aReason == EPageStartup )
+        {
+        TRAP_IGNORE( iData->SetStartupReasonL( KPageStartup ));
+        }
+    else if( aReason == EPluginStartup )
+        {
+        TRAP_IGNORE( iData->SetStartupReasonL( KPluginStartup));
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::Stop
+//
+// ----------------------------------------------------------------------------
+//
+void CSapiDataPlugin::Stop( TStopReason aReason )
+    {
+    if( aReason == ESystemShutdown )
+        {
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KSystemShutdown ));
+        }
+    else if( aReason == EPageShutdown )
+        {
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KPageShutdown ));
+        }
+    else if( aReason == EPluginShutdown )
+        {
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KPluginShutdown ));
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::Resume
+//
+// ----------------------------------------------------------------------------
 //
-void CSapiDataPlugin::Stop( TAiTransitionReason aReason )
+void CSapiDataPlugin::Resume( TResumeReason aReason )
+    {
+    if ( aReason == EForeground )
+        {
+        iPluginState = EResume;
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KResume ));
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::Suspend
+//
+// ----------------------------------------------------------------------------
+//
+void CSapiDataPlugin::Suspend( TSuspendReason aReason )
     {
-    if( iPluginState == EResume )
+    if ( aReason == EBackground )
+        {
+        iPluginState = ESuspend;
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KSuspend ));
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::SetOnline
+//
+// ----------------------------------------------------------------------------
+//
+void CSapiDataPlugin::SetOnline()
+    {
+    if ( iNetworkStatus != EOnline )
         {
-        Suspend( aReason );
+        iNetworkStatus = EOnline;
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KOnLine ));
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::SetOffline
+//
+// ----------------------------------------------------------------------------
+//
+void CSapiDataPlugin::SetOffline()
+    {
+    if ( iNetworkStatus != EOffline )
+        {
+        iNetworkStatus = EOffline;
+        TRAP_IGNORE( iData->ChangePublisherStatusL( KOffLine ));
         }
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CSapiDataPlugin::Resume( TAiTransitionReason aReason )
-    {
-    TRAP_IGNORE( DoResumeL( aReason ) ); 
-    }
-    
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is not allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::SubscribeL
 //
-void CSapiDataPlugin::Suspend( TAiTransitionReason aReason )
-    {
-    switch( aReason )
-		{
-		case EAiKeylockDisabled:
-        case EAiKeylockEnabled:
-        	{
-        	// handled in resume 
-        	TRAP_IGNORE( DoResumeL( aReason ) ); 
-        	break;
-        	}
-        default :
-        	{
-        	iPluginState = ESuspend;
-        	TRAP_IGNORE ( iData->SuspendL() );
-        	}
-		}
-    }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// The plug-in MUST maintain a registry of subscribers and send 
-// notification to all of them whenever the state changes or new content
-// is available
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
 void CSapiDataPlugin::SubscribeL( MAiContentObserver& aObserver )
-    { 
+    {
     iObservers.AppendL( &aObserver );
     }
- 
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Returns the extension interface. Actual type depends on the passed 
-// aUid argument.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::ConfigureL
+//
+// ----------------------------------------------------------------------------
 //
-TAny* CSapiDataPlugin::Extension( TUid aUid )
-    {    
-    if ( aUid == KExtensionUidProperty )
-   		{
-        return static_cast<MAiPropertyExtension*>( this );
-    	}
-    else if (aUid == KExtensionUidEventHandler)
-    	{
-        return static_cast<MAiEventHandlerExtension*>( this );
-    	}
-    else
-    	{	
-        return NULL;
-    	}
+void CSapiDataPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
+    {
+    if ( iDataCount > 0 )
+        {
+        // We own the array so destroy it
+        aSettings.ResetAndDestroy();
+        return;
+        }
+    
+    RAiSettingsItemArray contentItemsArr;    
+    RAiSettingsItemArray configurationItemsArr;
+    
+    TInt count( aSettings.Count() );
+    
+    for ( TInt i = 0; i < count; i++ )
+        {
+        MAiPluginSettings* setting( aSettings[i] );
+        
+        if ( setting->AiPluginItemType() == EAiPluginContentItem )
+            {
+            contentItemsArr.Append( setting );
+            }
+        else if ( setting->AiPluginItemType() == EAiPluginConfigurationItem )
+            {
+            configurationItemsArr.Append( setting );
+            }
+        }
+    
+    iDataCount = contentItemsArr.Count();
+    
+    if ( iDataCount > 0 )
+        {
+        // Create the content Model
+        HBufC* contentId = HBufC::NewLC( 
+            KAiContentIdMaxLength + KAiPluginNameMaxLength );
+        
+        iContentModel = new TAiContentItem[iDataCount];
+        
+        for ( TInt i = 0; i < iDataCount; i++ )
+            {
+            MAiPluginContentItem& contentItem( 
+                contentItemsArr[i]->AiPluginContentItem() );
+            
+            iContentModel[i].id = i;
+            
+            if( contentItem.Type() == KText() || 
+                contentItem.Type() == KNewsTicker() ||
+                contentItem.Type() == KTextEditor() )            
+                {
+                // text
+                iContentModel[i].type = KAiContentTypeText;
+                }
+            if( contentItem.Type() == KImage() )
+                {
+                // image
+                iContentModel[i].type = KAiContentTypeBitmap;
+                }
+            
+            contentId->Des().Copy( contentItem.Name() );
+            contentId->Des().Delete( 0, 
+                contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
+  
+            TInt sizeOfContentId( contentId->Des().Size() + sizeof( wchar_t ) );
+            
+            iContentModel[i].cid = 
+                static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
+                
+            Mem::Copy( ( TAny* )iContentModel[i].cid, 
+                contentId->Des().PtrZ(), sizeOfContentId );
+            
+            contentId->Des().Delete( 0, contentId->Des().Length() );
+            }    
+        
+        CleanupStack::PopAndDestroy( contentId );
+
+        iContent = AiUtility::CreateContentItemArrayIteratorL( 
+            iContentModel, iDataCount );
+    
+        iData->SetContentIdL( PublisherInfo().Namespace() );
+        
+        // Configurations 
+        iData->ConfigureL( configurationItemsArr );
+        
+        // Activate the publisher
+        iData->ChangePublisherStatusL( KActive );
+                
+        // Register for notifications
+        iData->RegisterPublisherObserverL();
+      
+        PublishL();
+        
+        iPluginState = ESuspend;
+        
+        iData->RegisterContentObserverL();
+        }
+    
+    contentItemsArr.Reset();
+    configurationItemsArr.Reset();
+   
+    // We own the array so destroy it
+    aSettings.ResetAndDestroy();    
     }
 
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Read property of publisher plug-in.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::GetProperty
 //
-TAny* CSapiDataPlugin::GetPropertyL( TInt aProperty )
-    {
-    TAny* property = NULL;
-    
-    switch ( aProperty )
-        {
-    case EAiPublisherInfo:
+// ----------------------------------------------------------------------------
+//
+TAny* CSapiDataPlugin::GetProperty( TProperty aProperty )
+    {    
+    if ( aProperty == EPublisherContent )
         {
-         property = static_cast<TAiPublisherInfo*>( &iInfo );
-        break;  
-        }       
-
-    case EAiPublisherContent:
-        {
-        property = static_cast<MAiContentItemIterator*>( iContent );
-        break;    
-        }        
-    default:
-        break;
+        return static_cast< MAiContentItemIterator* >( iContent );
         }
-
-    return property;
+    
+    return NULL;
     }
 
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Write property value to optimize the content model.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::HandleEvent
 //
-void CSapiDataPlugin::SetPropertyL( TInt aProperty, TAny* aValue )
-    {  
-    if( aProperty == EAiPublisherInfo )
-        {
-        ASSERT( aValue );
-        
-        const TAiPublisherInfo* info( 
-                static_cast<const TAiPublisherInfo*>( aValue ) );
-        
-        iInfo = *info;
-        
-        iData->SetContentIdL( info->iNamespace );
-        }
-    }
- 
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CSapiDataPlugin::HandleEvent( TInt /*aEvent*/, const TDesC& /*aParam*/ )
-	{
-    // This is not as there is no event id to retrieve in this dynamic plugin. 
-	} 
-    
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
 void CSapiDataPlugin::HandleEvent( const TDesC& aEventName, const TDesC& aParam )
     {
-    // We have no way of reporting errors to framework so just ignore them.
-    TRAP_IGNORE(iData->ExecuteActionL( aEventName , aParam ) );
+    TRAP_IGNORE( iData->ExecuteActionL( aEventName , aParam ) );    
+    }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::HasMenuItem
+//
+// ----------------------------------------------------------------------------
+//
+TBool CSapiDataPlugin::HasMenuItem( const TDesC16& aMenuItem )
+    {
+    return iData->HasMenuItem ( aMenuItem );    
     }
 
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Invoked by the framework for querying if plugin has menu item
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::IsActive
 //
-TBool CSapiDataPlugin::HasMenuItem( const TDesC& aMenuItem )
-	{ 
-	return iData->HasMenuItem ( aMenuItem );  
-	}
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// framework instructs plug-in that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
-void CSapiDataPlugin::DoResumeL( TAiTransitionReason aReason )
+TBool CSapiDataPlugin::IsActive() const
     {
-	//update in startup phase and idle is on foreground.
-    switch ( aReason )
-    	{
-        case EAiIdleOnLine:
-        	{
-        	iNetworkStatus = EOnline;
-			iData->OnLineL();
-			break;
-        	}
-        case EAiIdleOffLine:
-        	{
-			iNetworkStatus = EOffline;
-			iData->OffLineL();
-			break;
-			}
-        case EAiIdlePageSwitch:
-        	{
-        	if ( iPluginState == EResume )
-				{
-				iData->SuspendL();
-				}
-        	iPluginState = EInActive;
-        	iData->InActiveL();
-        	}
-        	break;
-        case EAiSystemStartup:
-    	case EAiIdleForeground:
-    		{
-			iHSForeGround = ETrue;
-    		}
-    	case EAiBacklightOn:    		
-    		{
-    		if ( iPluginState == ESuspend  && !iKeyLockOn )
-				{
-				iPluginState = EResume;
-				iData->ResumeL();
-				}
-    		break;
-			}
-    	case EAiKeylockDisabled:
-        	{
-        	iKeyLockOn = EFalse;
-        	// Key lock events considered only if HS is in foreground  
-        	if ( iHSForeGround && iPluginState == ESuspend )
-        		{
-        		iPluginState = EResume;
-				iData->ResumeL();
-        		}
-        	break;
-        	}
-    	case EAiKeylockEnabled:
-        	{
-        	iKeyLockOn = ETrue;
-        	// Key lock events considered only if HS is in foreground
-        	if ( iHSForeGround && iPluginState == EResume )
-        		{
-				iPluginState = ESuspend ;
-				iData->SuspendL();
-        		}
-        	break;
-        	}
-    	case EAiScreenLayoutChanged:
-        	{
-        	// ignore events
-        	break;
-        	}
-      case EAiGeneralThemeChanged:
-          {
-          // ignore event
-          break;
-          }
-    	case EAiIdleBackground: 
-        	{
-			iHSForeGround = EFalse;
-        	}
-        default :
-        	{
-			if ( iPluginState == EResume )
-				{
-				iPluginState = ESuspend;
-				iData->SuspendL();
-				}
-        	break;
-        	}
-    	}
+    return iPluginState == EResume;
     }
 
-// ---------------------------------------------------------------------------
-// Is plugin active to publish the data 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::Data
+//
+// ----------------------------------------------------------------------------
 //
-TBool CSapiDataPlugin::IsActive()
+CSapiData* CSapiDataPlugin::Data() const
     {
-    return (iPluginState == EResume );
+    return iData;
     }
+
+// ----------------------------------------------------------------------------
+// CSapiDataPlugin::NetworkStatus
+//
+// ----------------------------------------------------------------------------
+//
+CSapiDataPlugin::TPluginNetworkStatus CSapiDataPlugin::NetworkStatus() const
+    {
+    return iNetworkStatus;
+    }
+
+// End of file
--- a/idlefw/plugins/shortcutplugin/BWINS/aiscutextservu.def	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-EXPORTS
-	?Connect@RAiScutExtServ@@QAEHXZ @ 1 NONAME ; int RAiScutExtServ::Connect(void)
-	?IsInShortcuts@RAiScutExtServ@@QBEHAAH@Z @ 2 NONAME ; int RAiScutExtServ::IsInShortcuts(int &) const
-	?IssuePutInShortcuts@RAiScutExtServ@@QAEHXZ @ 3 NONAME ; int RAiScutExtServ::IssuePutInShortcuts(void)
-	?ResetIcon@RAiScutExtServ@@QAEHXZ @ 4 NONAME ; int RAiScutExtServ::ResetIcon(void)
-	?ResetPopupText@RAiScutExtServ@@QAEHXZ @ 5 NONAME ; int RAiScutExtServ::ResetPopupText(void)
-	?UpdateIconL@RAiScutExtServ@@QAEHABVCGulIcon@@@Z @ 6 NONAME ; int RAiScutExtServ::UpdateIconL(class CGulIcon const &)
-	?UpdatePopupTextL@RAiScutExtServ@@QAEHABVMDesC16Array@@@Z @ 7 NONAME ; int RAiScutExtServ::UpdatePopupTextL(class MDesC16Array const &)
-	?Version@RAiScutExtServ@@QBE?AVTVersion@@XZ @ 8 NONAME ; class TVersion RAiScutExtServ::Version(void) const
-	?Connect@RAiScutExtServ@@QAEHABVTDesC16@@@Z @ 9 NONAME ; int RAiScutExtServ::Connect(class TDesC16 const &)
-
--- a/idlefw/plugins/shortcutplugin/EABI/aiscutextservu.def	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-EXPORTS
-	_ZN14RAiScutExtServ11UpdateIconLERK8CGulIcon @ 1 NONAME
-	_ZN14RAiScutExtServ14ResetPopupTextEv @ 2 NONAME
-	_ZN14RAiScutExtServ16UpdatePopupTextLERK12MDesC16Array @ 3 NONAME
-	_ZN14RAiScutExtServ19IssuePutInShortcutsEv @ 4 NONAME
-	_ZN14RAiScutExtServ7ConnectEv @ 5 NONAME
-	_ZN14RAiScutExtServ9ResetIconEv @ 6 NONAME
-	_ZNK14RAiScutExtServ13IsInShortcutsERi @ 7 NONAME
-	_ZNK14RAiScutExtServ7VersionEv @ 8 NONAME
-	_ZN14RAiScutExtServ7ConnectERK7TDesC16 @ 9 NONAME
-
Binary file idlefw/plugins/shortcutplugin/cenrep/keys_scutplugin.xls has changed
Binary file idlefw/plugins/shortcutplugin/conf/scutplugin.confml has changed
Binary file idlefw/plugins/shortcutplugin/conf/scutplugin_10275104.crml has changed
--- a/idlefw/plugins/shortcutplugin/group/aiscutextserv.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project definition file for AI Shortcut xSP Extension API
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET                  aiscutextserv.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x10282CDD
-
-CAPABILITY              ALL -TCB
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  aiscutextserv.cpp
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 bafl.lib
-LIBRARY                 estor.lib
-LIBRARY                 egul.lib 
-LIBRARY                 fbscli.lib 
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/group/aiscutplugin.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project definition file for project ShortcutPlugin
-*
-*/
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-#include <platform/mw/aiscutuids.hrh>
-
-//MACRO MY_DEBUG
-
-//#include "../../../inc/common/debug.h"
-//#define AI_ENABLE_RD_LOGGING
-#define AI_RD_LOG_TO_DEBUG_OUTPUT
-
-// Master flag for enabling xSP extensions
-#define AI_SCUTPLUGIN_XSP_EXTENSIONS
-
-TARGET                  aiscutplugin.dll
-TARGETTYPE              PLUGIN
-UID                     0x10009D8D AI_UID_ECOM_DLL_CONTENTPUBLISHER_SCUTPLUGIN
-
-CAPABILITY              CAP_ECOM_PLUGIN
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-
-// xSP extension
-#ifdef AI_SCUTPLUGIN_XSP_EXTENSIONS
-SOURCE                  caiscutengineext.cpp
-SOURCE                  caiscutextserver.cpp
-SOURCE                  caiscutextsession.cpp
-SOURCE                  caiscutshortcutext.cpp
-SOURCE                  PopupFSM.cpp
-SOURCE                  cpopupeventhandler.cpp
-SOURCE                  caiscutextdata.cpp
-SOURCE                  caiscutextdatamodel.cpp
-SOURCE                  aiscutfactoryext.cpp
-USERINCLUDE             .
-LIBRARY                 estor.lib
-#else
-SOURCE                  aiscutfactory.cpp
-#endif
-
-SOURCE                  caiscutplugin.cpp
-SOURCE                  caiscutengine.cpp
-SOURCE                  caiscutshortcut.cpp
-SOURCE                  caiscutshortcutinfo.cpp
-SOURCE                  caiscuttarget.cpp
-SOURCE                  caiscuttargetapp.cpp
-SOURCE                  caiscuttargetbkm.cpp
-SOURCE                  caiscuttargethttp.cpp
-SOURCE                  caiscuttargetkeylock.cpp
-SOURCE                  caiscuttargetmessagingview.cpp
-SOURCE                  caiscuttargetnewmsg.cpp
-SOURCE                  caiscuttargetempty.cpp
-SOURCE                  aiscuttargetshutter.cpp
-
-SOURCE                  taiscutparser.cpp
-SOURCE                  aidefaultshortcut.cpp
-SOURCE                  aiscutappuidparser.cpp
-SOURCE                  aiscutrepositorywatcher.cpp
-
-START RESOURCE          aiscutplugin.rss
-TARGET                  aiscutplugin.rsc
-END
-
-START RESOURCE          aiscutpluginres.rss
-HEADER
-TARGET                  aiscutpluginres.rsc
-TARGETPATH              RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-START RESOURCE          aiscuttexts.rss
-HEADER
-TARGET                  aiscuttexts.rsc
-TARGETPATH              RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE   ../../../inc/common
-USERINCLUDE             ../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 cone.lib
-LIBRARY                 ecom.lib
-LIBRARY                 apparc.lib              // TApaTask
-LIBRARY                 apgrfx.lib              // CApaAppListNotifier
-LIBRARY                 viewcli.lib             // CVwsSessionWrapper
-LIBRARY                 ws32.lib                // RWsSession
-LIBRARY                 inetprotutil.lib        // TUriParser
-LIBRARY                 centralrepository.lib   // CRepository
-LIBRARY                 cenrepnotifhandler.lib  // CCenRepNotifyHandler
-LIBRARY                 msgs.lib                // Message Server
-LIBRARY                 muiu.lib                // MsvUiServiceUtilities
-LIBRARY                 sendui.lib              // Send UI
-LIBRARY                 egul.lib                // CGulIcon
-LIBRARY                 aknskins.lib            // AknsUtils
-LIBRARY                 charconv.lib            // CnvUtfConverter
-LIBRARY                 avkon.lib
-LIBRARY                 aknnotify.lib
-LIBRARY                 featmgr.lib
-LIBRARY                 aiutils.lib
-LIBRARY                 fbscli.lib
-LIBRARY                 aknicon.lib
-LIBRARY                 favouritesengine.lib
-LIBRARY                 commonengine.lib        // For RConeResourceLoader
-LIBRARY                 platformenv.lib         // For PathInfo
-LIBRARY                 efsrv.lib
-LIBRARY                 bafl.lib
-LIBRARY                 imcm.lib 
-LIBRARY 				akncapserverclient.lib 	// Fastswap  
-#ifdef __WEB_WIDGETS
-LIBRARY                 widgetregistryclient.lib
-#endif
-LIBRARY                 keylockpolicyapi.lib
-LIBRARY			gfxtrans.lib
-LIBRARY			akntransitionutils.lib
-LIBRARY			gslauncher.lib
-
-// Debugging dependencies
-LIBRARY    flogger.lib
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/group/aiscutsettings.mmp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project definition file for project ShortcutPlugin settings
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-#include <platform/mw/aiscutuids.hrh>
-
-//#include "../../../inc/common/debug.h"
-//#define AI_ENABLE_RD_LOGGING
-#define AI_RD_LOG_TO_DEBUG_OUTPUT
-
-//MACRO MY_DEBUG
-
-TARGET                  aiscutsettings.dll
-TARGETTYPE              PLUGIN
-UID                     0x10009D8D AI_UID_ECOM_DLL_SETTINGS_SCUTPLUGIN
-
-CAPABILITY              CAP_ECOM_PLUGIN
-VENDORID                VID_DEFAULT
-
-SOURCEPATH              ../src
-SOURCE                  caiscutsettings.cpp
-SOURCE                  caiscutsettingsimplementationtable.cpp
-SOURCE                  caiscutsettingscontainer.cpp
-SOURCE                  caiscutsettingsmodel.cpp
-SOURCE                  caiscutsettingsitem.cpp
-SOURCE                  caiscutsettingsapplist.cpp
-SOURCE                  caiscutsettingsbkmlist.cpp
-
-SOURCE                  taiscutparser.cpp
-SOURCE                  aidefaultshortcut.cpp
-SOURCE                  aiscutappuidparser.cpp
-SOURCE                  aiscutrepositorywatcher.cpp
-
-START RESOURCE          aiscutsettings.rss
-TARGET                  aiscutsettings.rsc
-END
-
-START RESOURCE          aiscutsettingsres.rss
-HEADER
-TARGET                  aiscutsettingsres.rsc
-TARGETPATH              RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE       ../../../inc/common
-USERINCLUDE             ../inc
-USERINCLUDE       ../../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 euser.lib
-LIBRARY                 ecom.lib
-LIBRARY                 avkon.lib
-LIBRARY                 bafl.lib
-LIBRARY                 cone.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 eikcoctl.lib
-LIBRARY                 eikcore.lib
-LIBRARY                 cdlengine.lib
-LIBRARY                 centralrepository.lib
-LIBRARY                 cenrepnotifhandler.lib  // CCenRepNotifyHandler
-LIBRARY                 gsframework.lib         // For base classes
-LIBRARY                 gslistbox.lib           // For CGSListBoxItemTextArray
-LIBRARY                 gsecomplugin.lib
-LIBRARY                 commonengine.lib        // For RConeResourceLoader
-LIBRARY                 inetprotutil.lib        // For TUriParser
-LIBRARY                 apgrfx.lib              // For RApaLsSession
-LIBRARY                 apparc.lib              // For TApaAppInfo
-LIBRARY                 msgs.lib                // For Message Server
-LIBRARY                 platformenv.lib         // For PathInfo
-LIBRARY                 hlplch.lib              // for HlpLauncher
-LIBRARY                 featmgr.lib             // For feature manager
-LIBRARY                 favouritesengine.lib
-LIBRARY                 javaregistryclient.lib  // For JavaRegistry
-#ifdef __WEB_WIDGETS
-LIBRARY                 widgetregistryclient.lib
-#endif
-
-// Debugging dependencies
-LIBRARY           flogger.lib
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/group/backup_registration.xml	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<!--  Backup registration file for AI2 shortcuts cenrep keys  --> 
-<backup_registration version="1.0">
-    <proxy_data_manager sid = "0x10202BE9" />
-    <restore requires_reboot = "no"/>
-</backup_registration>
--- a/idlefw/plugins/shortcutplugin/group/bld.inf	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bld.inf for Shortcut Plugin.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../loc/ai3scutsettings.loc             MW_LAYER_LOC_EXPORT_PATH(ai3scutsettings.loc)
-../loc/ai3scutplugin.loc               MW_LAYER_LOC_EXPORT_PATH(ai3scutplugin.loc)
-
-../rom/aiscutplugin_resources.iby	  LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(aiscutplugin_resources.iby)
-../rom/aiscutplugin.iby			      CORE_MW_LAYER_IBY_EXPORT_PATH(aiscutplugin.iby)
-
-
-// Backup registration
-backup_registration.xml  /epoc32/data/z/private/102750f9/backup_registration.xml
-backup_registration.xml  /epoc32/release/winscw/udeb/z/private/102750f9/backup_registration.xml
-backup_registration.xml  /epoc32/release/winscw/urel/z/private/102750f9/backup_registration.xml
-
-// Generic configuration interface for component cenrep settings
-../conf/scutplugin.confml                  APP_LAYER_CONFML(scutplugin.confml)
-../conf/scutplugin_10275104.crml           APP_LAYER_CRML(scutplugin_10275104.crml)
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE aiscutplugin.mif
-OPTION HEADERFILE aiscutplugin.mbg
-OPTION SOURCES -c8,8 qgn_prop_ai_shortcut -c8,8 qgn_menu_url \
-               -c8,8 qgn_menu_mce_sel_mes -c8,8 qgn_menu_mce_syncmail \
-               -c8,8 qgn_menu_am -c8,8 qgn_prop_cp_conn_shortcut \
-               -c8,8 qgn_prop_psln_ai_sub
-END
-
-PRJ_MMPFILES
-aiscutsettings.mmp
-aiscutplugin.mmp
-aiscutextserv.mmp
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/aidefaultshortcut.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Platform default shortcuts.
-*
-*/
-
-
-#ifndef AIDEFAULTSHORTCUT_H
-#define AIDEFAULTSHORTCUT_H
-
-#include <e32def.h> // for TInt
-#include <e32cmn.h> // for TUid, TDes
-
-
-class TAiDefaultShortcut
-{
-public:
-    /**
-     * Get S60 platform default shortcut uid and definition for index aIndex.
-     *
-     */
-    static void GetDefaultShortcut(TInt aIndex, TUid& aUid, TDes& aDefinition);
-
-};
-
-#endif
--- a/idlefw/plugins/shortcutplugin/inc/aiscutapptitle.rh	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in app title structs.
-*
-*/
-
-
-#ifndef AISCUTAPPTITLE_RH
-#define AISCUTAPPTITLE_RH
-
-STRUCT AI_APP_TITLE_ITEM
-{
-    LONG    appuid;
-    LONG    viewid = -1;
-    LTEXT   longtitle  = "";
-    LTEXT   shorttitle = "";
-    LTEXT   skeytitle  = "";
-    LTEXT   msktitle   = "";
-}
-
-STRUCT AI_APP_TITLE_LIST
-{
-    STRUCT items[]; // AI_APP_TITLE_ITEM items.
-}
-
-#endif // AISCUTAPPTITLE_RH
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/aiscutappuidparser.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser.
-*
-*/
-
-
-#ifndef AISCUTAPPUIDPARSER_H
-#define AISCUTAPPUIDPARSER_H
-
-// INCLUDES
-#include <e32base.h>
-
-// CLASS DECLARATIONS
-
-/**
- * Parser class that interpretes the given text as a description of
- * application position data.
- */
-class TAiScutAppUidParser
-{
-public: // Construction
-
-    /**
-     * Standard C++ constructor.
-     * @param aData Data which will be parsed
-     * @param aAppPositions This array will be filled with parsed
-     *                      application positions.
-     */
-    TAiScutAppUidParser(const TDesC& aData, RArray<TUid>& aAppPositions);
-
-public: // Interface
-
-    /**
-     * Parses the data that was given in constructor and fills the
-     * application position array with parsed data.
-     */
-    void ParseL();
-
-private: // Implementation
-    /**
-     * Skips the given char.
-     * Skipping can be done conditionally or unconditionally.
-     * If conditional skipping is used, next character in data will be
-     * skipped only if it is the same as given character.
-     * If unconditional skipping is used the next character in data must
-     * be the given character, otherwise the data is invalid and parsing
-     * will be stopped.
-     * @param aChar Character that will be skipped.
-     * @param aConditionalSkip If ETrue, use conditional skipping,
-     *                         otherwise unconditional skipping will be
-     *                         used.
-     */
-    void SkipChar(TChar aChar, TBool aConditionalSkip);
-
-    /**
-     * Reads app UID from data. If data doesn't contain app UID in the
-     * point in which this function is called, data is considered invalid.
-     * @return App UID that was read from data.
-     */
-    TUid ReadAppUid();
-
-private:
-
-    /// Ref: Application positions array that will be filled when parsing
-    RArray<TUid>&   iUidArray;
-
-    /// Lexer for data
-    TLex            iLex;
-
-    /// Is the data that has been read so far valid.
-    TBool           iLexIsValid;
-};
-
-#endif // AISCUTAPPUIDPARSER_H
-
-// End of File
--- a/idlefw/plugins/shortcutplugin/inc/aiscutfactory.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in factory class.
-*
-*/
-
-
-#ifndef AISCUTENGINEFACTORY_H
-#define AISCUTENGINEFACTORY_H
-
-#include <e32std.h>
-
-class CAiScutEngine;
-class CAiScutPlugin;
-class CAiScutShortcut;
-
-/**
- *  AiScutEngineFactory
- *
- *  Creates various classes used in AiScutPlugin.
- *
- *  @since S60 v3.2
- */
-class AiScutFactory
-    {
-    public:
-        /**
-         * Creates CAiScutEngine
-         * @since S60 v3.2
-         */
-        static CAiScutEngine* CreateAiScutEngineL( CAiScutPlugin& aPlugin );
-
-        /**
-         * Creates CAiScutShortcut
-         * @since S60 v3.2
-         */
-        static CAiScutShortcut* CreateAiScutShortcutL( TInt aId, 
-            const TDesC& aTarget, CAiScutEngine& aEngine );
-
-        /**
-         * Creates CAiScutShortcut
-         * @since S60 v3.2
-         */
-        static CAiScutShortcut* CreateAiScutShortcutLC( TInt aId, 
-            const TDesC& aTarget, CAiScutEngine& aEngine );
-    };
-
-#endif // AISCUTENGINEFACTORY_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/aiscutpluginprivatecrkeys.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut Plug-in private CenRep keys.
-*
-*/
-
-
-#ifndef AISCUTPLUGINPRIVATECRKEYS_H
-#define AISCUTPLUGINPRIVATECRKEYS_H
-
-#include <aiscutplugindomaincrkeys.h>
-
-#endif // AISCUTPLUGINPRIVATECRKEYS_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/aiscutrepositorywatcher.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser.
-*
-*/
-
-
-#ifndef AISCUTREPOSITORYWATCHER_H
-#define AISCUTREPOSITORYWATCHER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <cenrepnotifyhandler.h>        // For CCenRepNotifyHandler
-
-// CLASS DECLARATIONS
-
-class CAiScutRepositoryWatcher : public CBase, public MCenRepNotifyHandlerCallback
-{
-public:
-    static CAiScutRepositoryWatcher* NewL(
-        const TUid aUid,
-        const TUint32 aKey,
-        CCenRepNotifyHandler::TCenRepKeyType aKeyType,
-        TCallBack aCallBack,
-        CRepository* aRepository);
-
-    static CAiScutRepositoryWatcher* NewL(
-        const TUid aUid,
-        TCallBack aCallBack,
-        CRepository* aRepository);
-
-    ~CAiScutRepositoryWatcher();
-
-    void StartListeningL();
-
-    void StopListening();
-
-    TUint32 ChangedKey();
-
-public: // from MCenRepNotifyHandlerCallback
-    void HandleNotifyInt    (TUint32 aKey, TInt aNewValue);
-    void HandleNotifyString (TUint32 aKey, const TDesC16& aNewValue);
-    void HandleNotifyGeneric(TUint32 aKey);
-    void HandleNotifyError  (TUint32 aKey, TInt aError, CCenRepNotifyHandler* aHandler);
-
-private:
-    CAiScutRepositoryWatcher(
-        const TUid aUid,
-        const TUint32 aKey,
-        TCallBack aCallBack,
-        CRepository* aRepository);
-
-    void ConstructL(CCenRepNotifyHandler::TCenRepKeyType aKeyType);
-
-    void ConstructL();
-
-private:
-    TUid                    iUid;
-    TUint32                 iKey;
-    TUint32                 iChangedKey;
-    TCallBack               iCallBack;
-    CRepository*            iRepository;
-    CCenRepNotifyHandler*   iNotifyHandler;
-
-};
-
-#endif // AISCUTREPOSITORYWATCHER_H
-
-// End of File
--- a/idlefw/plugins/shortcutplugin/inc/aiscutsettings.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Resource headers for Shortcut plug-in
-*
-*/
-
-
-#ifndef AISCUTSETTINGS_HRH
-#define AISCUTSETTINGS_HRH
-
-/**
- * Menu command ids for the Shortcut plug-in Settings
- */
-enum TAiScutSettingsMenuCommands
-{
-    EAiScutSettingsCmdChange = 0x6000,
-
-    EAiScutSettingsCmdChangeToApps,
-    EAiScutSettingsCmdChangeToUrl,
-    EAiScutSettingsCmdChangeToBookmark,
-    EAiScutSettingsCmdChangeShortcutType
-};
-
-/**
- * Shortcut setting types
- */
-enum TAiScutSettingType
-{
-    EAiScutSettingTypeUndefined = -1,
-    EAiScutSettingTypeApplication,
-    EAiScutSettingTypeBookmark,
-    EAiScutSettingTypeUrl
-};
-
-#endif // AISCUTSETTINGS_HRH
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/aiscuttargetshutter.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#ifndef CAISCUTTARGET_H
-#define CAISCUTTARGET_H
-
-#include <e32base.h>
-#include <coemain.h>
-
-class TApaTask;
-class CPeriodic; 
-
-/**
- *  Base class for shortcut targets
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetShutter : public CActive
-{
-
-public:
-	
-	static CAiScutTargetShutter* NewL( CCoeEnv* aEnv, TUid aAppUid, TBool aIsRunning, TBool aIsDialog );
-
-    virtual ~CAiScutTargetShutter();
-    
-     void StartL();
- 
-private:
-
-	CAiScutTargetShutter( CCoeEnv* aEnv, TUid aAppUid );
-    
-    void ConstructL( TBool aIsRunning, TBool aIsDialog );
-
-    // from base class CActive
-
-    /**
-     * From CActive
-     *
-     * @since S60 v3.2
-     */
-    void DoCancel();
-
-    /**
-     * From CActive
-     *
-     * @since S60 v3.2
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Handles an error situation
-     *
-     * @since S60 v3.2
-     * @param aError Error code received from system
-     * @return Error code after error handling
-     */
-    TInt RunError( TInt aError );
-    
-    static TInt TaskExistsCallback( TAny* aPtr );
-    
-    static TInt TaskNotExistsCallback( TAny* aPtr );
-    
-    void Run();
-    
-private: //data
-
-	/**
-     * Pointer to the control environment
-     * Not own.
-     */
-    CCoeEnv*	iEnv;
-	
-	/**
-     * Target application uid
-     */
-    TUid		iAppUid;
-    
-    /**
-     * Window Server session
-     */
-    RWsSession 	iWsSession;
-    
-    /**
-     * Task exsit or not
-     */
-    TBool iTaskExists;
-    
-    /**
-     * Periodic timer
-     * Own
-     */
-    CPeriodic* iPeriodic;
-    
-    /**
-     * Count retry times
-     */
-    TInt iCounter;
-    
-    /**
-     * Target application is running
-     */
-    TBool iIsRunning;
-    
-    /**
-     * Target app is dialog
-     */
-    TBool iIsDialog;
-    
-    
-    /**
-     * 
-     */
-    TBool iTaskKilled;
-};
-
-#endif // CAISCUTTARGET_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutengine.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,667 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in engine class.
-*
-*/
-
-
-#ifndef CAISCUTENGINE_H
-#define CAISCUTENGINE_H
-
-#include <apgnotif.h>                   // For MApaAppListServObserver
-#include <msvapi.h>                     // For MMsvSessionObserver
-#include <favouritesdb.h>               // For RFavouritesDb
-#include <favouritesdbobserver.h>       // For MFavouritesDbObserver
-#include <ConeResLoader.h>
-#ifdef __WEB_WIDGETS
-#include <widgetregistryclient.h>
-#endif
-
-#include <aiutility.h>
-
-#include "aiscutdefs.h"
-#include "taiscutparser.h"
-#include "aicontentpublisher.h"
-
-class CCoeEnv;
-class CVwsSessionWrapper;
-class CActiveFavouritesDbNotifier;
-class CAiScutPlugin;
-class CAiScutShortcut;
-class CRepository;
-class CAiScutRepositoryWatcher;
-class CAiScutTargetShutter;
-class CKeyLockPolicyApi;
-
-/**
- * Defines the different scenarios of shortcut access checking.
- */
-enum TScutAccessCheckType
-{
-    EScutCheckMailbox,
-    EScutCheckApp,
-    EScutCheckBkm,
-    EScutCheckAll
-};
-
-/**
- * Defines which default can be used, when daulting is needed (uninstall/mem card removed)
- */
-enum TScutDefault
-{
-    EScutUserDefined = 0,
-    EScutDefaultToPlatform,
-    EScutDefaultToTheme
-};
-
-enum TScutLockKey
-    {
-    EScutFirstLockKey,
-    EScutSecondLockKey
-};
-
-/**
- *  Shortcut plug-in engine class.
- *
- *  Handles most of plug-in activity.
- *
- *  @since S60 v3.2
- */
-class CAiScutEngine : public CBase
-                    , public MMsvSessionObserver
-                    , public MApaAppListServObserver
-                    , public MFavouritesDbObserver
-{
-
-public:
-
-    /**
-     * First phase contructor.
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to the main plug-in class
-     */
-    static CAiScutEngine* NewL(CAiScutPlugin& aPlugin);
-
-    virtual ~CAiScutEngine();
-
-    // from base class MMsvSessionObserver
-
-    /**
-     * Handles an event from the message server
-     *
-     * @since S60 v3.2
-     * @param aEvent Indicates the event type.
-     * @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);
-
-    // from base class MApaAppListServObserver
-
-    /**
-     * From MApaAppListServObserver.
-     * Handles a change in the application list
-     *
-     * @since S60 v3.2
-     * @param aEvent Event id
-     */
-    void HandleAppListEvent(TInt aEvent);
-
-    /**
-     * Resumes the engine
-     *
-     * @since S60 v3.2
-     */
-    virtual void ResumeL(TBool aPublishAll, TAiTransitionReason aReason);
-
-    /**
-     * Suspends the engine
-     *
-     * @since S60 v3.2
-     */
-    void Suspend();
-
-    /**
-     *
-     */
-    static TInt HandleShortcutsChanged(TAny* aPtr);
-
-    /**
-     *
-     */
-    static TInt HandleHiddenAppsChanged(TAny* aPtr);
-
-    /**
-     *
-     */
-    TBool IsHidden(const TUid& aAppUid) const;
-
-    /**
-     * Handles an event sent by the AI framework
-     *
-     * @since S60 v3.2
-     * @param aEvent Event (service) id
-     * @param aParam Event parameter(s)
-     */
-    virtual void HandleAiEventL(TInt aEvent, const TDesC& aParam);
-
-    /**
-     * Called by the timer. Retries the access check for shortcuts.
-     *
-     * @since S60 v3.2
-     */
-    void RetryAccessCheck();
-
-    /**
-     * Checks if application is midlet or widget.
-     * @param aUid Application uid
-     * @since S60 v3.2
-     */
-    TBool IsNonNative(const TUid& aUid);
-    
-    TBool IsHiddenFromFSW( const TUid& aAppUid );
-#ifdef __WEB_WIDGETS
-    /**
-     * Ask client session if given UID is widget.
-     */
-    TBool IsWidget(const TUid& aUid);
-#endif
-
-    /**
-     * Handles call state changes (non-static version).
-     *
-     * @since S60 v3.2
-     */
-    void HandleCallStateChange();
-
-    /**
-     * Merges the user defined shortcuts with the defaults.
-     * @param aType  shortcut type
-     * @param aRecreateAll forces the recreation of shortcuts
-     * @since S60 v3.2
-     */
-    void MergeShortcuts(TShortcutType aType, TBool aRecreateAll);
-
-    /**
-     *Get Application title
-     */
-    TBool GetAppTitle(
-        const TUid&         aAppUid,
-        const TUid&         aViewId,
-        TDes&               aTitle,
-        TAiScutAppTitleType aType);
-
-    /**
-     * Returns the application architecture server session owned by the engine
-     *
-     * @since S60 v3.2
-     * @return Reference to RApaLsSession
-     */
-    inline RApaLsSession& ApaSession();
-
-    /**
-     * Returns reference to the bookmark database owned by the engine
-     *
-     * @since S60 v3.2
-     * @return Reference to RFavouritesDb
-     */
-    inline RFavouritesDb& FavouritesDb();
-
-    /**
-     * Returns the message server session owned by the engine
-     *
-     * @since S60 v3.2
-     * @return Pointer to CMsvSession
-     */
-    inline CMsvSession* MsvSession();
-
-    /**
-     * Returns a pointer to view server session wrapper.
-     *
-     * @since S60 v3.2
-     * @return Pointer to view server session wrapper
-     */
-    inline CVwsSessionWrapper* VwsSession();
-
-    /**
-     * Returns a pointer to the coe environment
-     *
-     * @since S60 v3.2
-     * @return Pointer to coe environment
-     */
-    inline CCoeEnv* Env();
-
-    /**
-     * Creates the shortcuts merging the defaults with user defined ones.
-     *
-     * @since S60 v3.2
-     */
-    void CreateShortcutsL();
-
-protected:
-
-
-    /**
-     * C++ constructor
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to the main plug-in class
-     */
-    CAiScutEngine(CAiScutPlugin& aPlugin);
-
-    void ConstructL();
-
-protected:
-
-    /**
-     * Merges the user defined shortcuts with the defaults.
-     * Leaving version
-     * @param aType  shortcut type
-     * @param aRecreateAll forces the recreation of shortcuts
-     * @since S60 v3.2
-     */
-    void MergeShortcutsL(TShortcutType aType, TBool aRecreateAll);
-
-    /**
-     * Checks shortcut accessibility. If the AppArc server or message server
-     * respond that they are not ready, a timer is launched to check later.
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @param aPublishAll All shortcuts are published
-     */
-    void CheckAccessAndPublish(TInt aCheckType, TBool aPublishAll);
-
-    /**
-     * Tells each shortcut to check whether or not its target is accessible.
-     * Shortcuts will revert to the default setting if the user setting is
-     * not accessible.
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @param aPublishAll All shortcuts are published
-     */
-    void CheckAccessAndPublishL(TInt aCheckType, TBool aPublishAll);
-
-    /**
-     * Finds the shortcut object with the given id
-     *
-     * @since S60 v3.2
-     * @param aId Shortcut id
-     * @return Shortcut index or KErrNotFound
-     */
-    TInt FindShortcutIndex(TInt32 aId);
-
-    /**
-     * Handles the shortcut launch by index.
-     *
-     * @since S60 v3.2
-     * @param aParam Index of the shortcut to launch
-     */
-    void HandleLaunchByIndexL(const TDesC& aParam);
-
-    /**
-     * Handles the special launching of a shortcut. The 
-     * launching can be done based on the location of 
-     * the shortcut (sk, toolbar item etc) or based on the
-     * application it points to. Currently when this function is
-     * called to a shortcut that points to appshell the fastswap
-     * window is opened
-     * 
-     * @since s60 v5.0
-     * @param aParam Index of the shortcut to perform the special launch
-     */
-    void HandleLaunchByIndexAlternateL(const TDesC& aParam);
-    /**
-     * Handles the shortcut launch by value
-     *
-     * @since S60 v3.2
-     * @param aParam Value of the shortcut to launch
-     */
-    void HandleLaunchByValueL(const TDesC& aParam);
-
-    /**
-     * Shows the plug-in settings dialog.
-     *
-     * @since S60 v3.2
-     */
-    void ShowSettingsL(const TDesC& aParam);
-
-    /**
-     * Shows the plug-in setting.
-     *
-     * @since S60 v5.0
-     */
-    void ShowSettingL(const TDesC& aParam);
-    
-    /**
-     * Opens the fast swap window
-     * 
-     * @since S60 v5.0
-     */
-    void OpenFastSwap();
-    /**
-     * Handles PS commands from WSPlugin.
-     *
-     * @since S60 v3.2
-     */
-    static TInt HandlePSCommand(TAny* aAny);
-
-    /**
-     * Handles call state changes.
-     *
-     * @since S60 v3.2
-     */
-    static TInt CallStateChangeCallback(TAny* aPtr);
-
-    /**
-     * Callback for delay timer
-     */
-    static TInt DelayTimerCallBack(TAny *aSelf );
-        
-    
-    /**
-     * Get soft key uid
-     *
-     * @since S60 v3.2
-     * @param aSoftkeyId shortcut index
-     */
-    TUid SoftkeyUid(TUint32 aSoftkeyId);
-
-    /**
-     *Check softkey delay is required
-     *
-     * @since S60 v3.2
-     * @param AppUid application uid     
-     */
-    TBool IsDelayRequired(TUid aAppUid);
-
-    /**
-     * Handles PS commands from WSPlugin (leaving version).
-     *
-     * @since S60 v3.2
-     */
-    void DoHandlePSCommandL();
-
-    /**
-     * Activates phone/video call application
-     *
-     * @since S60 v3.2
-     */
-    void ActivateTopMostApp();
-
-    /**
-     * Check MsvSession is Needed
-     */
-    TBool IsMsvSessionNeeded();
-
-    /**
-     * Check Bookmark Observer is Needed
-     */
-    TBool IsBookmarkObserverNeeded();
-
-    /**
-     * Load application titles list
-     */
-    void LoadAppTitleListL();
-
-    /**
-     * Get hidden applications
-     */
-    void GetHiddenAppsL();
-    
-    void CheckForThemeDefaultReinstalledL();
-
-    TBool IsLockKey( TInt aScanCode, TScutLockKey aLockKey ) const;
-
-    TInt AddOverrideIcon( TAiScutIcon &aIcon );
-
-    /**
-     * Starts a delay timer that calls HandleLaunchByIndexL() after
-     * a short delay. Delay is read from cenrep with the key KAIKeyLockTimeout
-     * 
-     * @param aParam The parameter to pass to HandleLaunchByIndexL()
-     * 
-     */
-    void DelayedLaunchByIndexL( const TDesC &aParam );
-private: // From MFavouritesDbObserver
-
-    /**
-     * Handles database event.
-     * @param aEvent Database event.
-     */
-    void HandleFavouritesDbEventL(RDbNotifier::TEvent aEvent);
-
-protected:  // data
-
-    /**
-     * Shortcut objects.
-     * Own.
-     */
-    RAiShortcutArray                iShortcuts;
-
-    /**
-     * Shortcut objects for storing theme default scuts.
-     * Own.
-     */
-    RAiShortcutInfoArray            iThemeShortcuts;
-    
-    /**
-     * Flags for shortcuts to indicate whether platform or theme default is used.
-     */
-    RArray<TScutDefault>            iDefaultUsed;
-
-    /**
-     * Central Repository session.
-     * Own.
-     */
-    CRepository*                    iRepository;
-
-    /**
-     * Notifier for changes in the application list
-     * (installations / uninstallations).
-     * Own.
-     */
-    CApaAppListNotifier*            iAppNotifier;
-
-    /**
-     * Notifier for changes in the shortcut settings.
-     * Own.
-     */
-    CAiScutRepositoryWatcher*       iSettingsNotifier;
-
-    /**
-     * Message server session.
-     * Own.
-     */
-    CMsvSession*                    iMsvSession;
-
-    /**
-     * Timer that performs the availability check after a given delay.
-     * Own
-     */
-    CPeriodic*                      iTimer;
-
-    /**
-     * Reference to the plug-in.
-     * Not own.
-     */
-    CAiScutPlugin&                  iPlugin;
-
-    /**
-     * Application architecture server session.
-     */
-    RApaLsSession                   iApaSession;
-
-    /**
-     * Bookmark database session.
-     * Own.
-     */
-    RFavouritesSession              iBookmarkSess;
-
-    /**
-     * Bookmark database.
-     * Own.
-     */
-    RFavouritesDb                   iBookmarkDb;
-
-    /**
-     * Bookmark database change observer.
-     * Own.
-     */
-    CActiveFavouritesDbNotifier*    iBookmarkDbObserver;
-
-    /**
-     * View server session wrapper.
-     * Own
-     */
-    CVwsSessionWrapper*             iVwsSession;
-
-    /**
-     * Flag to indicate that all shortcus are to be published. Used when resuming.
-     */
-    TBool                           iPublishAll;
-
-    /**
-     *Call key event observer
-     * Own
-     */
-    MAiPSPropertyObserver*          iKeyEventObserver;
-
-    /**
-     * Call state PS observer.
-     * Own.
-     */
-    MAiPSPropertyObserver*          iCallStateObserver;
-
-    /**
-     * Call state
-     */
-    TBool                           iActiveCall;
-
-    /**
-     * First keylock key
-     */
-    TInt                            iFirstLockKey;
-
-    /**
-     * First keylock key pressed flag to ensure first lock has been
-     * pressed when skipping key lock. Enabling the correct response to
-     * skip command.
-     */
-    TBool                           iFirstLockKeyPressed;
-
-    /**
-     * Second keylock key
-     */
-    TInt                            iSecondLockKey;
-
-    /**
-     * Resource loader for common text resources.
-     */
-    RConeResourceLoader             iResourceLoaderTexts;
-
-    /**
-     * Resource loader for sendui text resources.
-     */
-    RConeResourceLoader             iResourceLoaderSendUi;
-
-    /**
-     * Coe environment.
-     * Not own.
-     */
-    CCoeEnv*                        iEnv;
-
-    /**
-     * Array of UIDs which are hidden from the TARM
-     */
-    RArray<TUid>                    iHiddenApps;
-
-    /**
-     * Central repository object for Hidden Apps
-     * Own
-     */
-    CRepository*                    iHiddenAppsRepository;
-
-    /**
-     * Central repository change handler for Hidden Apps
-     * Own
-     */
-    CAiScutRepositoryWatcher*       iHiddenAppsNotifier;
-
-    /**
-     * Application titles list
-     */
-    RArray<TAiScutAppTitleEntry>    iAppTitleList;
-
-    /**
-     * Own
-     */
-    CAiScutTargetShutter*           iScutShutter;
-
-    /**
-     *
-     */
-    TBool                           iSoftkeyAppRunning;
-    
-#ifdef __WEB_WIDGETS
-    /**
-     * Widget registry client session to check if UID means widget.
-     */
-    RWidgetRegistryClientSession    iWidgetRegistry;
-    TBool                           iWidgetRegistryConnected;
-#endif
-    /**
-    * for parsing the icon overrides and softkeys
-    */
-    TAiScutParser                   iParser;
-
-    /**
-     * Override icons and softkeyicons are held here
-     */
-    RArray <TAiScutIcon>    iIcons;
-
-    /**
-     * For checking keylock buttons
-     * Own
-     */
-    CKeyLockPolicyApi *iKeylockApi;
-    /**
-     * Timer user to delay the launching
-     * of specific shortcuts.
-     * Own
-     */
-    CPeriodic *iDelayTimer;
-    
-    /**
-     * Command passed to HandleLaunchByIndexL()
-     * when delayed launching is used
-     * Own
-     */
-    HBufC    *iDelayedLaunchCmd;
-    
-    /**
-     * Delayed launching delay. Read from cenrep
-     */
-    TInt iDelayTimerDelay;
-};
-
-#include "caiscutengine.inl"
-
-#endif // CAISCUTENGINE_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutengine.inl	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Inline functions for the shortcut plug-in engine
-*
-*/
-
-
-// ---------------------------------------------------------------------------
-// Returns the application architecture server session owned by the engine.
-// ---------------------------------------------------------------------------
-//
-inline RApaLsSession& CAiScutEngine::ApaSession()
-{
-    return iApaSession;
-}
-
-// ---------------------------------------------------------------------------
-// Returns reference to the bookmark database owned by the engine.
-// ---------------------------------------------------------------------------
-//
-inline RFavouritesDb& CAiScutEngine::FavouritesDb()
-{
-    return iBookmarkDb;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the message server session owned by the engine.
-// ---------------------------------------------------------------------------
-//
-inline CMsvSession* CAiScutEngine::MsvSession()
-{
-    return iMsvSession;
-}
-
-// ---------------------------------------------------------------------------
-// Returns a pointer to view server session wrapper.
-// ---------------------------------------------------------------------------
-//
-inline CVwsSessionWrapper* CAiScutEngine::VwsSession()
-{
-    return iVwsSession;
-}
-
-// ---------------------------------------------------------------------------
-// Returns a pointer to the coe environment
-// ---------------------------------------------------------------------------
-//
-inline CCoeEnv* CAiScutEngine::Env()
-{
-    return iEnv;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutengineext.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in engine extension
-*
-*/
-
-
-#ifndef CAISCUTENGINEEXT_H
-#define CAISCUTENGINEEXT_H
-
-#include <e32base.h>
-
-#include "caiscutengine.h"
-#include "maiscutextmessagehandler.h"
-#include "caiscutshortcutext.h"
-
-class CAiScutPlugin;
-class CAiScutExtServer;
-class CAiScutExtDataModel;
-
-/**
- *  The class extends CAiScutEngine by handling events from
- *  xSP extension server.
- *
- *  @since S60 v3.2
- */
-class CAiScutEngineExt : public CAiScutEngine,
-    public MAiScutExtMessageHandler
-    {
-    public:
-        /**
-         * Factory function
-         * @see CAiScutEngine
-         * @since S60 v3.2
-         */
-        static CAiScutEngineExt* NewL( CAiScutPlugin& aPlugin );
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutEngineExt();
-
-    private:
-        /**
-         * Constructor
-         * @see CAiScutEngine
-         * @since S60 v3.2
-         */
-        CAiScutEngineExt( CAiScutPlugin& aPlugin );
-
-        void ConstructL();
-
-    public:  // New functions
-        /**
-         * Publishes specific shortcut
-         * @since S60 v3.2
-         */
-        void CheckAccessAndPublish( CAiScutShortcut& aShortcut );
-
-    private: // From CAiScutEngine
-        void HandleAiEventL( TInt aEvent, const TDesC& aParam );
-        void ResumeL( TBool aPublishAll, TAiTransitionReason aReason );
-
-    private: // From MAiScutExtMessageHandler
-        void HandleSetPopupLineArrayL( const TDesC& aDefinition, CDesCArray* aLineArray );
-        void HandleResetPopupLineArrayL( const TDesC& aDefinition );
-        void HandleSetIconL( const TDesC& aDefinition, CGulIcon* aIcon );
-        void HandleResetIconL( const TDesC& aDefinition );
-        TBool HandleIsInShortcutsL( const TDesC& aDefinition ) const;
-        void HandleIssuePutInShortcutsL( const TDesC& aDefinition );
-
-    private: // New functions
-        /**
-         * Finds a shortcut of which id matches with given.
-         * @param aId Target id in hexadecimal string format
-         * @return Pointer to shortcut or NULL if not found
-         */
-        CAiScutShortcutExt* FindShortcutById( const TDesC& aId ) const;
-
-        /**
-         * Iterates shortcuts and sets new extension data to matching
-         * ones.
-         * @param aDefinition Definition
-         * @param aAiScutExtData Pointer to extension data or NULL
-         * @return ETrue if matching shortcut(s) found
-         */
-        TBool PopulateExtData( const TDesC& aDefinition,
-            const MAiScutExtData* aAiScutExtData );
-
-    private: // data
-        /**
-         * xSP extension server instance
-         * Own.
-         */
-        CAiScutExtServer* iAiScutExtServer;
-
-        /**
-         * Extension data model
-         * Own.
-         */
-        CAiScutExtDataModel* iExtDataModel;
-    };
-
-#endif // CAISCUTENGINEEXT_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutextdata.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#ifndef CAISCUTEXTDATA_H
-#define CAISCUTEXTDATA_H
-
-#include <e32base.h>
-#include <badesca.h>
-
-#include "maiscutextdata.h"
-
-class CGulIcon;
-
-/**
- *  @since S60 v3.2
- */
-class CAiScutExtData : public CBase, 
-    public MAiScutExtData
-    {
-    public:
-        /**
-         * Factory function
-         * @since S60 v3.2
-         */
-        static CAiScutExtData* NewL( const TDesC& aTargetDefinition );
-
-
-        /**
-         * Factory function
-         * @since S60 v3.2
-         */
-        static CAiScutExtData* NewLC( const TDesC& aTargetDefinition );
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutExtData();
-        
-    private:
-        /**
-         * Constructor
-         * @see CAiScutEngine
-         * @since S60 v3.2
-         */
-        CAiScutExtData();
-
-        void ConstructL( const TDesC& aTargetDefinition );
-
-    public:  // New functions    
-        /**
-         * @since S60 v3.2
-         */
-        const TDesC& TargetDefinition() const;
-     
-         /**
-         * Deletes old and stores new popup line array
-         * @param aPopupLineArray Popup line array. Ownership is transferred.
-         * @since S60 v3.2
-         */
-        void SwitchPopupLineArray( CDesCArray* aPopupLineArray );
-
-        /**
-         * @since S60 v3.2
-         */
-        void ResetPopupLineArray();
-
-        /**
-         * Deletes old and stores new icon
-         * @param aIcon Icon. Ownership is transferred.
-         * @since S60 v3.2
-         */
-        void SwitchIcon( CGulIcon* aIcon );
-
-        /**
-         * @since S60 v3.2
-         */
-        void ResetIcon();
-       
-    public:  //From MAiScutExtData
-        const MDesCArray* PopupLineArray() const;        
-        const CGulIcon* Icon() const;
-        
-    private: // data
-
-        /**
-         * Definition string of the target shortcut
-         * Own.
-         */
-         HBufC* iTargetDefinition;
-
-        /**
-         * Popup line array
-         * Own.
-         */
-         CDesCArray* iPopupLineArray;
-
-        /**
-         * Icon
-         * Own.
-         */
-         CGulIcon* iIcon;
-    };
-
-#endif // CAISCUTEXTDATA_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutextdatamodel.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in extension data model
-*
-*/
-
-
-#ifndef CAISCUTEXTDATAMODEL_H
-#define CAISCUTEXTDATAMODEL_H
-
-#include <e32base.h>
-#include <badesca.h>
-
-class CGulIcon;
-class CAiScutExtData;
-
-/**
- *  This class owns an array of CAiScutExtData items and provides an API to
- *  update popup line array and icon data for different targets.
- *  @since S60 v3.2
- */
-class CAiScutExtDataModel : public CBase
-    {
-    private:
-        friend class T_CAiScutExtDataModel;
-
-    public:
-        /**
-         * Factory function
-         * @since S60 v3.2
-         */
-        static CAiScutExtDataModel* NewL();
-
-
-        /**
-         * Factory function
-         * @since S60 v3.2
-         */
-        static CAiScutExtDataModel* NewLC();
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutExtDataModel();
-        
-    private:
-        /**
-         * Constructor
-         * @see CAiScutEngine
-         * @since S60 v3.2
-         */
-        CAiScutExtDataModel();
-
-        void ConstructL();
-
-    public:  // New functions    
-        /**
-         * Sets the new popup line array for target. The old one is deleted. If
-         * matching target definition is not found new CAiScutExtData object is
-         * created.
-         * @param aDefinition Target definition string
-         * @param aLineArray Pointer to line array. Ownership is transferred
-         * @return Pointer to new or existing CAiScutExtData object
-         * @since S60 v3.2
-         */
-        CAiScutExtData* SetPopupLineArrayL( const TDesC& aDefinition, CDesCArray* aLineArray );
-
-        /**
-         * Resets popup line array. If also the icon is not set the CAiScutExtData
-         * item is deleted and removed from the array.
-         * @param aDefinition Target definition string
-         * @since S60 v3.2
-         */
-        CAiScutExtData* ResetPopupLineArray( const TDesC& aDefinition );
-
-        /**
-         * Sets the new icon for target. The old one is deleted. If
-         * matching target definition is not found new CAiScutExtData object is
-         * created.
-         * @param aDefinition Target definition string
-         * @param aIcon Pointer to icon. Ownership is transferred
-         * @return Pointer to new or existing CAiScutExtData object
-         * @since S60 v3.2
-         */
-        CAiScutExtData* SetIconL( const TDesC& aDefinition, CGulIcon* aIcon );
-
-        /**
-         * Resets icon. If also the popup line array is not set the CAiScutExtData
-         * item is deleted and removed from the array.
-         * @param aDefinition Target definition string
-         * @since S60 v3.2
-         */
-        CAiScutExtData* ResetIcon( const TDesC& aDefinition );
-
-        /**
-         * @return Array of CAiScutExtData objects
-         * @since S60 v3.2
-         */
-        TArray<CAiScutExtData*> AiScutExtDataArray() const;
-
-        /**
-         * Deletes CAiScutExtData object and removes it from the array.
-         * @param aDefinition Target definition string
-         * @since S60 v3.2
-         */
-        void RemoveAiScutExtData( const TDesC& aDefinition );
-        
-    private: // New functions
-        TInt FindAiScutExtData( const TDesC& aDefinition ) const;
-        CAiScutExtData* CreateAiScutExtDataL( const TDesC& aDefinition );
-        
-    private: // data
-        /**
-         * Shortcut extension data items
-         * Own.
-         */
-         RPointerArray<CAiScutExtData> iAiScutExtDataArray;
-    };
-
-#endif // CAISCUTEXTDATAMODEL_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutextserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension server class.
-*
-*/
-
-
-#ifndef CAISCUTEXTSERVER_H
-#define CAISCUTEXTSERVER_H
-
-#include <e32base.h>
-#include <w32std.h>
-
-#include "maiscutextmessagehandler.h"
-#include "aicontentpublisher.h"
-
-class CAiScutExtServer;
-class CAknMessageQueryDialog;
-
-/**
- *
- *  Helper class for passing parameters to the callback function.
- *
- *  @since S60 v3.2
- */
-class CLinkParams : public CBase
-    {
-    public:
-
-        CLinkParams(CAiScutExtServer& aServer, HBufC* aTargetDefinition);
-
-        ~CLinkParams();
-
-    public:
-
-        /**
-         * Reference to the server object.
-         * Ref.
-         */
-        CAiScutExtServer& iServer;
-
-        /**
-         * Application identifier.
-         * Own.
-         */
-        HBufC* iTargetDefinition;
-
-        /**
-         * The dialog that owns the link..
-         * Ref.
-         */
-        CAknMessageQueryDialog* iNote;
-    };
-
-/**
- *  Server class for xSP extensions.
- *
- *  Handles sessions.
- *
- *  @since S60 v3.2
- */
-class CAiScutExtServer : public CServer2
-    {
-    public:
-        /**
-         * Constructor
-         * @param aObserver Reference to observer
-         * @since S60 v3.2
-         */
-        CAiScutExtServer( MAiScutExtMessageHandler& aObserver, RWsSession& aWsSession );
-
-        /**
-         * 2nd-phase constructor
-         * @since S60 v3.2
-         */
-        void ConstructL();
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutExtServer();
-
-    private: // From CServer2
-
-        CSession2* NewSessionL(
-            const TVersion& aVersion, const RMessage2& aMessage ) const;
-
-    private: // New methods
-
-        void ReadAppListL();
-
-        void WriteAppListL();
-
-        static TInt LinkCallBack(TAny* aParam);
-
-        static TInt IdleCallBack(TAny* aParam);
-
-        void DoShowTipMessageL();
-
-    public:
-
-        TBool HasConnectedBefore( TUid& aUid, const RMessage2& aMessage );
-
-        void ShowTipMessage( TUid aUid );
-
-        void ResumeL( TAiTransitionReason aReason );
-
-    private: // data
-
-        /**
-         * Reference to observer
-         * Ref.
-         */
-        MAiScutExtMessageHandler& iObserver;
-
-        /**
-         * Reference to Window Server session
-         * Ref.
-         */
-        RWsSession& iWsSession;
-
-        /**
-         * List of applications we are not going to
-         * show the tip dialog.
-         * Own.
-         */
-        RArray<TUid> iUids;
-
-        /**
-         * List of applications to show the dialog.
-         *
-         * Own.
-         */
-        RArray<TUid> iShowUids;
-
-        /**
-         * Resource offset for releasing the resoruce on destruction.
-         *
-         * Own.
-         */
-        TInt iResourceOffset;
-
-        /**
-         * CIdle for the tip dialog
-         *
-         * Own.
-         */
-        CIdle* iIdle;
-
-        /**
-         * Foreground/background indication
-         *
-         */
-        TBool iIsForeground;
-
-        /**
-         * Tip message visible indication
-         *
-         */
-        TBool iIsTipMessageVisible;
-    };
-
-#endif // CAISCUTEXTSERVER_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutextsession.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension session class.
-*
-*/
-
-
-#ifndef CAISCUTEXTSESSION_H
-#define CAISCUTEXTSESSION_H
-
-#include <e32base.h>
-
-class MAiScutExtMessageHandler;
-
-/**
- *  Server session class for xSP extensions.
- *
- *  Handles IPC between server and client. Commands and data are passed to
- *  observer.
- *
- *  @since S60 v3.2
- */
-class CAiScutExtSession : public CSession2
-    {
-    public:
-        /**
-         * Constructor
-         * @param aObserver Reference to observer
-         * @since S60 v3.2
-         */
-        CAiScutExtSession( MAiScutExtMessageHandler& aObserver );
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutExtSession();
-
-    private: // From CSession2
-        void ServiceL( const RMessage2& aMessage );
-        void DispatchMessageL( const RMessage2& aMessage );
-
-    private: // New functions
-        void SetTargetDefinitionL( const RMessage2& aMessage );
-        void SetPopupTextL( const RMessage2& aMessage );
-        void ResetPopupTextL( const RMessage2& aMessage );
-        void SetIconL( const RMessage2& aMessage );
-        void ResetIconL( const RMessage2& aMessage );
-        void IsInShortcutsL( const RMessage2& aMessage );
-        void IssuePutInShortcutsL( const RMessage2& aMessage );
-
-        void PanicClient( const RMessage2& aMessage, TInt aPanicCode ) const;
-
-    private: // data
-
-        /**
-         * Reference to observer
-         * Ref.
-         */
-        MAiScutExtMessageHandler& iObserver;
-        
-        /**
-         * Target definition
-         * Own.
-         */
-        HBufC* iTargetDefinition;
-    };
-
-#endif // CAISCUTEXTSESSION_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plug-in main class
-*
-*/
-
-
-#ifndef CAISCUTPLUGIN_H
-#define CAISCUTPLUGIN_H
-
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
-#include <aieventhandlerextension.h>
-#include <aicontentmodel.h>
-
-class CAiScutEngine;
-class MAiContentObserver;
-class MAiContentItemIterator;
-class CAiScutShortcut;
-
-/**
- *  Plug-in main class
- *
- *  @since S60 v3.2
- */
-class CAiScutPlugin : public CAiContentPublisher
-                    , public MAiPropertyExtension
-                    , public MAiEventHandlerExtension
-{
-
-public: // factory methods and destructor.
-
-    static CAiScutPlugin* NewL();
-
-    virtual ~CAiScutPlugin();
-
-public: // new methods
-
-    /**
-     * Publishes the given shortcut
-     *
-     * @since S60 v3.2
-     * @return Reference to a shortcut to publish
-     */
-    void PublishShortcutsL(RAiShortcutArray& aShortcuts);
-
-    /**
-     *
-     */
-    TBool IsAlive() const;
-
-    /**
-     * @return Resume reason
-     */
-    TAiTransitionReason ResumeReason() const;
-
-public: // methods from base classes
-
-    // from base class CAiContentPublisher
-
-    void Resume(TAiTransitionReason aReason);
-
-    void Suspend(TAiTransitionReason aReason);
-
-    void Stop(TAiTransitionReason aReason);
-
-    /**
-     * From CAiContentPublisher
-     * Adds the content observer / subscriber to plug-in. The plug-in MUST
-     * maintain a registry of subscribers and send notification to all them
-     * whenever the plug-in changes state or new content available.
-     *
-     * @since S60 3.2
-     * @param aObserver content observer to register.
-     */
-    void SubscribeL(MAiContentObserver& aObserver);
-
-    /**
-     * From CAiContentPublisher
-     * Configures the plug-in.
-     * Plug-ins take ownership of the settings array, so it must either
-     * store it in a member or free it. Framework has put the array in cleanup
-     * stack so the plug-in shouldn't do that.
-     * If this leaves, the plug-in will be destroyed by AI FW.
-     * Plug-in must support LaunchByValue-event even if normal shortcuts don't
-     * work. The only allowed serious enough leave is KErrNotFound from CenRep.
-     *
-     * @since S60 3.2
-     * @param aSettings setting items defined in the UI definition.
-     */
-    void ConfigureL(RAiSettingsItemArray& aSettings);
-
-    /**
-     * From CAiContentPublisher
-     * Returns interface extension. In Series 60 3.1 only event & property
-     * extensions are supported. See MAiEventExtension & MAiPropertyExtension
-     * interfaces.
-     *
-     * @since S60 3.2
-     * @param  aUid - UID of the extension interface to access.
-     * @return the extension interface. Actual type depends on the passed aUid
-     *         argument.
-     */
-    TAny* Extension(TUid aUid);
-
-    // from base class MAiEventHandlerExtension
-
-    /**
-     * From MAiEventHandlerExtension
-     * Invoked by the framework when plug-in must handle an event.
-     *
-     * @param aEvent - unique identifier of event from plug-in content model.
-     * @param aParam - parameters associated with event. Each UI Definition
-     *        declares events in the format: <event name>(<event params>),
-     *        where <event name> is mapped by the framework to unique
-     *        identifier supplied in aEvent, <event params> are provided to
-     *        plug-in as-is in the descriptor.
-     * @since S60 3.2
-     */
-    void HandleEvent(TInt aEvent, const TDesC& aParam);
-
-    /**
-	* Invoked by the framework for querying if plugin has menu item
-	*
-	* @return ETrue if plugin has specific menu item, EFalse otherwise
-	*/   
-	
-// Online/Offline - web widgets	
-    TBool HasMenuItem(const TDesC16& aMenuItem);
-    
-    // from base class MAiPropertyExtension
-
-    /**
-     * From MAiPropertyExtension.
-     * Read property of publisher plug-in.
-     *
-     * @param aProperty - identification of property.
-     * @return pointer to property value.
-     * @since S60 3.2
-     */
-    TAny* GetPropertyL(TInt aProperty);
-
-    /**
-     * From MAiPropertyExtension.
-     * Write property value.
-     *
-     * @param aProperty - identification of property.
-     * @param aValue - contains pointer to property value.
-     * @since S60 3.2
-     */
-    void SetPropertyL(TInt aProperty, TAny* aValue);
-
-protected:
-
-private:
-
-    CAiScutPlugin();
-
-    void ConstructL();
-
-    void DoResumeL(TAiTransitionReason aReason);
-
-    void FreeEngine();
-    
-    void DeleteDefaultShortcutsL();
-
-
-private:  // data
-
-    /**
-     * Iterator for plug-in content.
-     * Own.
-     */
-    MAiContentItemIterator*             iContent;
-
-    /**
-     * Iterator for plug-in resources.
-     * Own.
-     */
-    MAiContentItemIterator*             iResources;
-
-    /**
-     * Iterator for plug-in events.
-     * Own.
-     */
-    MAiContentItemIterator*             iEvents;
-
-    /**
-     * Plug-in engine
-     * Own.
-     */
-    CAiScutEngine*                      iEngine;
-
-    /**
-     * Array of content observers
-     * Not own.
-     */
-    RPointerArray<MAiContentObserver>   iObservers;
-
-    /**
-     * Information about the content publisher ( this plug-in ).
-     */
-    TAiPublisherInfo                    iInfo;
-
-    /**
-     * Plug-in state, suspended or alive.
-     */
-    TBool                               iAlive;
-
-    /**
-     * Resume reason
-     */
-    TAiTransitionReason                 iResumeReason;
-
-    TBool                               iForcePublishAll;
-};
-
-#endif // CAISCUTPLUGIN_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettings.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut settings plug-in main class.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGS_H
-#define CAISCUTSETTINGS_H
-
-#include <gsbaseview.h>
-
-class CAiScutSettingsContainer;
-class CAiScutSettingsModel;
-
-/**
- * Shortcut settings plug-in main class
- *
- * @lib aiscutsettings.lib
- * @since S60 v3.2
- */
-class CAiScutSettings : public CGSBaseView
-{
-
-public:
-
-    static CAiScutSettings* NewL(TAny* aInitParams);
-
-    virtual ~CAiScutSettings();
-
-    // from base class CAknView
-
-    /**
-     * From CAknView
-     * Returns view id.
-     *
-     * @since S60 3.2
-     * @return TUid
-     */
-    TUid Id() const;
-
-    /**
-     * From CAknView
-     * Handles commands.
-     *
-     * @since S60 3.2
-     * @param aCommand Command to be handled.
-     */
-    void HandleCommandL(TInt aCommand);
-
-    /**
-     * See base class in AknView.h
-     */
-    void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
-
-    /**
-     * See base class.
-     */
-    void DoDeactivate();
-
-    // from base class CGSPluginInterface
-
-    /**
-     * From CGSPluginInterface
-     *
-     * @since S60 3.2
-     * @see CGSPluginInterface header file.
-     */
-    void GetCaptionL(TDes& aCaption) const;
-
-    /**
-     * From CGSPluginInterface
-     *
-     * @since S60 3.2
-     * @see CGSPluginInterface header file.
-     */
-    TInt PluginProviderCategory() const;
-
-    /**
-     * From CGSPluginInterface
-     *
-     * @since S60 3.2
-     * @see CGSPluginInterface header file.
-     */
-    TBool Visible() const;
-
-    // from base class CGSBaseView
-
-    /**
-     * From CGSBaseView
-     *
-     * @since S60 3.2
-     * Returns the container this view has.
-     * @return pointer to container, does not transfer ownership.
-     */
-    CAiScutSettingsContainer* Container();
-    
-    /**
-    * See base class
-    */
-    void HandleForegroundEventL(TBool aForeground);
-
-    /**
-    * Check if view is activate
-    * @since S60 5.1
-    * @return ETrue if activated, EFalse otherwise
-    */    
-    TBool Activated() const;
-
-protected:
-
-private: // From MEikMenuObserver
-
-    /**
-     * Changes MenuPane dynamically
-     */
-    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
-private:
-
-    CAiScutSettings();
-
-    void ConstructL();
-
-
-    // from base class CGSBaseView
-
-    /**
-     * From CGSBaseView
-     * Functionality for creating a container. Called by DoActivateL().
-     */
-    void NewContainerL();
-
-    /**
-     * From CGSBaseView
-     * Handles listbox selection. Called by HandleListBoxEventL.
-     * Implement by sub-class.
-     */
-    void HandleListBoxSelectionL();
-    
-    static TInt DoHandleListBoxSelectionL( TAny* aAny );
-
-
-private:  // data
-
-    /**
-     * Settings plug-in model.
-     * Own.
-     */
-    CAiScutSettingsModel*       iModel;
-
-    /**
-     * Resource loader for common text resources.
-     */
-    RConeResourceLoader         iResourceLoaderTexts;
-
-    /***
-     * Idle timer to delay event handling
-     * Own.
-     */
-    CIdle* iListBoxTimer;
-
-};
-
-#endif // CAISCUTSETTINGS_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingsapplist.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,553 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Application list for settings listbox.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGSAPPLIST_H
-#define CAISCUTSETTINGSAPPLIST_H
-
-#include <e32base.h>
-#include <bamdesca.h>   // For MDesCArray
-#include <apgcli.h>     // For RApaLsSession
-#include <msvapi.h>     // For MMsvSessionObserver
-#include <apgnotif.h>   // For MApaAppListServObserver
-#include "aiscutsettings.hrh" // For TAiScutSettingType
-
-class CAiScutSettingsItem;
-class CCoeEnv;
-
-/**
- * Shortcut definition parameter for theme change shortcut.
- */
-_LIT( KScutParamChangeTheme,     "view=0x102750A7" );
-
-/**
- * Shortcut definition parameter for messaging. New message
- */
-_LIT( KScutParamNewMsg,          "new=msg" );
-
-/**
- * Shortcut definition parameter for messaging. New email
- */
-_LIT( KScutParamNewEmail,        "new=email" );
-
-/**
- * Shortcut definition parameter for messaging. New syncml mail
- */
-_LIT( KScutParamNewSyncMLMail,   "new=syncmlmail" );
-
-/**
- * Shortcut definition parameter for messaging. New postcard
- */
-_LIT( KScutParamNewPostcard,     "new=postcard" );
-
-/**
- * Shortcut definition parameter for messaging. New audio message
- */
-_LIT( KScutParamNewAudioMsg,     "new=audiomsg" );
-
-/**
- * Shortcut definition parameter for messaging. Select message type
- */
-_LIT( KScutParamSelectMsgType,   "new" );
-
-/**
- * Shortcut definition parameter for messaging. Remote mailbox
- */
-_LIT( KScutParamMailbox,         "mailbox=" );
-
-/**
- * Shortcut definition parameter for general settings. Connectivity view
- */
-_LIT( KScutParamConnectivityView,     "view=0x10207250" );
-
-/**
- * Shortcut definition parameter for general settings. Installations view
- */
-_LIT( KScutParamInstallationsView,     "view=0x10283321" );
-
-
-/**
- * Observer interface for application list events
- *
- * @since S60 v3.2
- */
-class MAiScutListObserver
-{
-public:
-
-    /**
-     * AppList event codes
-     */
-    enum TScutListEvent
-    {
-        EAppListReady,
-        EAppListUpdated,
-        EBkmListUpdated
-    };
-
-    /**
-     * Callback for application list events
-     *
-     * @since S60 v3.2
-     * @param aEvent AppList event code
-     * @param aAdded ETrue if applications were added, EFalse if removed
-     */
-    virtual void HandleScutListEventL( TScutListEvent aEvent, TBool aAdded ) = 0;
-
-    virtual TBool IsHidden(const TUid& aAppUid) const = 0;
-
-};
-
-
-/**
- * Application list for settings listbox
- *
- * @since S60 v3.2
- */
-class CAiScutSettingsAppList : public CActive
-                             , public MDesCArray
-                             , public MMsvSessionObserver
-                             , public MApaAppListServObserver
-{
-
-public:
-
-    static CAiScutSettingsAppList* NewL( CCoeEnv* aEnv, MAiScutListObserver& aObserver );
-
-    virtual ~CAiScutSettingsAppList();
-
-    // from base class MDesCArray
-
-    /**
-     * From MDesCArray
-     * Returns the number of descriptor elements in a descriptor array.
-     *
-     * @since S60 v3.2
-     * @return The number of descriptor elements in a descriptor array.
-     */
-    TInt MdcaCount() const;
-
-    /**
-     * From MDesCArray
-     * Indexes into a descriptor array.
-     *
-     * @since S60 v3.2
-     * @param aIndex The position of the descriptor element within a descriptor array.
-     * @return A 16 bit non-modifiable pointer descriptor representing the descriptor
-     *         element located at position aIndex within a descriptor array.
-     */
-    TPtrC MdcaPoint( TInt aIndex ) const;
-
-    // from base class MMsvSessionObserver
-
-    /**
-     * Handles an event from the message server.
-     * Not used, but must be defined to be able to use the messaging server.
-     *
-     * @since S60 v3.2
-     * @param aEvent Indicates the event type.
-     * @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 );
-
-    // from base class MApaAppListServObserver
-
-    /**
-     * From MApaAppListServObserver
-     * Handles a change in the application list
-     *
-     * @since S60 v3.2
-     * @param aEvent Event id
-     */
-    void HandleAppListEvent( TInt aEvent );
-
-    /**
-     * Starts the asynchronous appliation list initialization
-     *
-     * @since S60 v3.2
-     */
-    void StartL();
-
-    /**
-     * Checks if the application list is ready to be shown
-     *
-     * @since S60 v3.2
-     * @return ETrue if ready, EFalse if not
-     */
-    TBool IsReady() const;
-
-    /**
-     * Tells the application list to start or stop observing for changes
-     *
-     * @since S60 v3.2
-     * @param aObserving ETrue if changes should be observed, EFalse if not
-     */
-    void SetObservingL( TBool aObserving );
-
-    /**
-     * Finds the index of the given settings item in the application list
-     *
-     * @since S60 v3.2
-     * @param aItem Setting item to find
-     * @return Index of the setting item in the application list
-     */
-    TInt FindIndex( CAiScutSettingsItem& aItem );
-
-    /**
-     * Returns target application data from the given index
-     *
-     * @since S60 v3.2
-     * @param aIndex Index of the application in the list
-     * @param aUid On return, the application uid
-     * @param aParams On return, the application parameters
-     * @param aCaption On return, the application caption
-     * @param aType On return, the application type (app or url)
-     * @return KErrNotFound if the application cannot be found, KErrNone otherwise
-     */
-    TInt GetDataByIndex( TInt aIndex, TUid& aUid, TPtrC& aParams, TPtrC& aCaption, TAiScutSettingType& aType ) const;
-
-    /**
-     * Adds extra list items to the application list.
-     * For example "No Effect" item is added here.
-     *
-     * @since S60 v3.2
-     */
-    void AddExtraItemsL();
-
-    /**
-     * Removes extra list items from the application list.
-     *
-     * @since S60 v3.2
-     */
-    void RemoveExtraItemsL();
-
-protected:
-
-private:
-
-    CAiScutSettingsAppList( CCoeEnv* aEnv, MAiScutListObserver& aObserver );
-
-    void ConstructL();
-
-    // from base class CActive
-
-    /**
-     * From CActive
-     * Implements cancellation of an outstanding request.
-     *
-     * @since S60 v3.2
-     */
-    void DoCancel();
-
-    /**
-     * From CActive
-     * Performs one step of the app list initialization
-     *
-     * @since S60 v3.2
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     * Handles an error situation
-     *
-     * @since S60 v3.2
-     * @param aError Error code received from system
-     * @return Error code after error handling
-     */
-    TInt RunError( TInt aError );
-
-    /**
-     * Completes own request status to make sure active scheduler
-     * calls RunL again.
-     *
-     * @since S60 v3.2
-     */
-    void CompleteSelf();
-
-    /**
-     * Adds an application to the list
-     *
-     * @since S60 v3.2
-     * @param aAppInfo Application information object
-     */
-    void AddApplicationL( TApaAppInfo& aAppInfo );
-
-    /**
-     * Adds the static list items to the application list.
-     * For example "New Message" and "New Email" items are added here.
-     *
-     * @since S60 v3.2
-     */
-    void AddStaticItemsL();
-
-    /**
-     * Finds all mailboxes defined in the device
-     */
-    CMsvEntry* GetRootEntryL();
-
-    /**
-     * Adds remote mailboxes to the application list.
-     *
-     * @since S60 v3.2
-     */
-    void AddMailboxesL();
-
-    /**
-     * Adds a mailbox to the list
-     *
-     * @since S60 v3.2
-     * @param aMailbox Name of the mailbox to add
-     */
-    void AddMailboxL( const TDesC& aMailbox, const TDesC& aMailboxId );
-
-    /**
-     * Removes a mailbox from the list
-     *
-     * @since S60 v3.2
-     * @param aMailboxParam Parameter string of the mailbox to remove
-     */
-    void RemoveMailboxL( const TDesC& aMailboxParam );
-
-    /**
-     * Adds extra application to applist from central repository
-     * 
-     * @since S60 v3.2
-     */
-    void AddExtraItemsFromCRL();
-
-    TBool IsBannedUid(TUid aUid);
-
-    /**
-     * Gets the next valid application from application architecture server.
-     * Valid applications are non-hidden ones
-     *
-     * @since S60 v3.2
-     * @param aAppInfo Application information of the next valid application
-     * @return Error code from RApaLsSession or one of system wide errors
-     */
-    TInt GetNextValidApp( TApaAppInfo& aAppInfo );
-
-    /**
-     * Updates the application list
-     *
-     * @since S60 v3.2
-     */
-    void UpdateAppListL();
-
-    /**
-     * Figures out which application is missing from the list and adds it
-     *
-     * @since S60 v3.2
-     * @param aCount Amount of applications to add
-     */
-    void AddInstalledAppToListL( TInt aCount );
-
-    /**
-     * Figures out which application should not be in the list and removes it
-     *
-     * @since S60 v3.2
-     * @param aCount Amount of applications to remove
-     */
-    void RemoveUninstalledAppFromListL( TInt aCount );
-    
-    /**
-     * Checks if application is midlet.
-     * @param aUid Application uid
-     * @since S60 v3.2
-     */
-    TBool IsNonNative(const TUid& aUid);
-    
-    /**
-     * Checks if application is located in ROM.
-     * @param aUid Application uid
-     * @since S60 v5.0 
-     */
-    TBool IsInRom( const TUid& aUid );
-
-
-private:
-
-    /**
-     * Nested class to store individual application list items
-     *
-     * @since S60 v3.2
-     */
-    class CAppListItem : public CBase
-    {
-    public:
-
-        static CAppListItem* NewLC( TUid aUid, const TDesC& aCaption );
-
-        ~CAppListItem();
-
-        /**
-         * Compare method used to add the items to the list in sorted order
-         *
-         * @since S60 v3.2
-         * @param aFirst The first item to be compared
-         * @param aSecond The second item to be compared
-         * @return Negative if first comes before second, zero if equal and
-         *         positive if first comes after second
-         */
-        static TInt CompareCaption( const CAppListItem& aFirst,
-            const CAppListItem& aSecond );
-
-        /**
-         * Returns the item target application uid
-         *
-         * @since S60 v3.2
-         * @return Target application uid
-         */
-        TUid Uid() const;
-
-        /**
-         * Returns the item target application caption
-         *
-         * @since S60 v3.2
-         * @return Target application caption
-         */
-        TPtrC Caption() const;
-
-        /**
-         * Returns the possible parameters for item target
-         *
-         * @since S60 v3.2
-         * @return Item target parameters
-         */
-        TPtrC Params() const;
-
-        /**
-         * Sets the parameters for the item target
-         *
-         * @since S60 v3.2
-         * @param aParams Parameters for item target
-         */
-        void SetParamsL( const TDesC& aParams );
-
-        /**
-         * Sets the type for the item target
-         * 
-         * @since S60 v3.2
-         * @param aType The item target type
-         */
-        void SetType( TAiScutSettingType aType );
-        
-        /**
-         * Returns the type of this item target
-         * 
-         * @since S60 v3.2
-         * @return Item type
-         */
-        TAiScutSettingType Type() const;
-    private:
-
-        CAppListItem( TUid aUid );
-
-        void ConstructL( const TDesC& aCaption );
-
-    private:  // data
-
-        /**
-         * Target application uid
-         */
-        TUid iUid;
-
-        /**
-         * Target application caption
-         */
-        HBufC* iCaption;
-
-        /**
-         * Target application parameters
-         */
-        HBufC* iParams;
-        /**
-         * Is this setting a application or URL. 
-         * Needed for URLs added from cenrep
-         */
-        TAiScutSettingType iType;
-
-    };
-
-private:  // data
-
-    /**
-     * List of application items
-     * Own.
-     */
-    RPointerArray<CAppListItem> iListItems;
-
-    /**
-     * Application architecture server session
-     * Own.
-     */
-    RApaLsSession               iApaSession;
-
-    /**
-     * Message server session
-     * Own.
-     */
-    CMsvSession*                iMsvSession;
-
-    /**
-     * Notifier for changes in the application list
-     * ( installations / uninstallations )
-     * Own.
-     */
-    CApaAppListNotifier*        iAppNotifier;
-
-    /**
-     * Amount of all applications in the device
-     */
-    TInt                        iTotalAppCount;
-
-    /**
-     * List of mailbox items. Points to iListItems.
-     * DO NOT DELETE THROUGH THIS!
-     * Own.
-     */
-    RPointerArray<CAppListItem> iMailboxes;
-
-    /**
-     * Flag indicating if the asynchronous application list generation is ready
-     */
-    TBool                       iReady;
-
-    /**
-     * Pointer to the control environment
-     * Not own.
-     */
-    CCoeEnv*                    iEnv;
-
-    /**
-     * Registered observer for application list events
-     */
-    MAiScutListObserver&        iObserver;
-
-    /**
-     * A flag indicating if the app list should observe changes
-     */
-    TBool                       iObserving;
-
-};
-
-#endif // CAISCUTSETTINGSAPPLIST_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingsbkmlist.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bookmark list for settings listbox.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGSBKMLIST_H
-#define CAISCUTSETTINGSBKMLIST_H
-
-#include <e32base.h>
-#include <bamdesca.h>               // For MDesCArray
-#include <favouritesdbobserver.h>   // For MFavouritesDbObserver
-
-class CCoeEnv;
-class CActiveFavouritesDbNotifier;
-class CAiScutSettingsItem;
-class CAiScutSettingsModel;
-
-/**
- * Bookmark list for settings listbox
- *
- * @since S60 v3.2
- */
-class CAiScutSettingsBkmList : public CBase
-                             , public MDesCArray
-                             , public MFavouritesDbObserver
-{
-
-public:
-
-    static CAiScutSettingsBkmList* NewL(
-        CCoeEnv* aEnv,
-        CAiScutSettingsModel* aModel,
-        MAiScutListObserver& aObserver);
-
-    virtual ~CAiScutSettingsBkmList();
-
-    // from base class MDesCArray
-
-    /**
-     * From MDesCArray
-     * Returns the number of descriptor elements in a descriptor array.
-     *
-     * @since S60 v3.2
-     * @return The number of descriptor elements in a descriptor array.
-     */
-    TInt MdcaCount() const;
-
-    /**
-     * From MDesCArray
-     * Indexes into a descriptor array.
-     *
-     * @since S60 v3.2
-     * @param aIndex The position of the descriptor element within a descriptor array.
-     * @return A 16 bit non-modifiable pointer descriptor representing the descriptor
-     *         element located at position aIndex within a descriptor array.
-     */
-    TPtrC MdcaPoint(TInt aIndex) const;
-
-    /**
-     * Gets the bookmark list.
-     *
-     * @since S60 v3.2
-     */
-    void GetBookmarkListL();
-
-    /**
-     * Tells the bookmark list to start or stop observing for changes
-     *
-     * @since S60 v3.2
-     * @param aObserving ETrue if changes should be observed, EFalse if not
-     */
-    void SetObservingL(TBool aObserving);
-
-    /**
-     * Finds the index of the given settings item in the bookmark list
-     *
-     * @since S60 v3.2
-     * @param aItem Setting item to find
-     * @return Index of the setting item in the bookmark list
-     */
-    TInt FindIndex(CAiScutSettingsItem& aItem);
-
-    /**
-     * Returns target bookmark data from the given index
-     *
-     * @since S60 v3.2
-     * @param aIndex Index of the bookmark in the list
-     * @param aParams On return, the bookmark parameters
-     * @param aCaption On return, the bookmark caption
-     * @return KErrNotFound if the bookmark cannot be found, KErrNone otherwise
-     */
-    TInt GetDataByIndex(TInt aIndex, TPtrC& aParams, TPtrC& aCaption) const;
-
-protected:
-
-private:
-
-    CAiScutSettingsBkmList(
-        CCoeEnv* aEnv,
-        CAiScutSettingsModel* aModel,
-        MAiScutListObserver& aObserver);
-
-    void ConstructL();
-
-    /**
-     * Adds an bookmark to the list
-     *
-     * @since S60 v3.2
-     * @param aBkmInfo Bookmark information object
-     */
-    void AddBookmarkL(TUid aUid, const TDesC& aCaption);
-
-    /**
-     * Updates the bookmark list
-     *
-     * @since S60 v3.2
-     */
-    void UpdateBkmListL();
-
-    // From MFavouritesDbObserver
-    /**
-     * Handles database event.
-     * @param aEvent Database event.
-     */
-    void HandleFavouritesDbEventL(RDbNotifier::TEvent aEvent);
-
-private:
-
-    /**
-     * Nested class to store individual bookmark list items
-     *
-     * @since S60 v3.2
-     */
-    class CBkmListItem : public CBase
-    {
-    public:
-
-        static CBkmListItem* NewLC(TUid aUid, const TDesC& aCaption);
-
-        ~CBkmListItem();
-
-        /**
-         * Compare method used to add the items to the list in sorted order
-         *
-         * @since S60 v3.2
-         * @param aFirst The first item to be compared
-         * @param aSecond The second item to be compared
-         * @return Negative if first comes before second, zero if equal and
-         *         positive if first comes after second
-         */
-        static TInt CompareCaption(const CBkmListItem& aFirst,
-            const CBkmListItem& aSecond);
-
-        /**
-         * Returns the item target bookmark uid
-         *
-         * @since S60 v3.2
-         * @return Target bookmark uid
-         */
-        TUid Uid() const;
-
-        /**
-         * Returns the item target bookmark caption
-         *
-         * @since S60 v3.2
-         * @return Target bookmark caption
-         */
-        TPtrC Caption() const;
-
-        /**
-         * Returns the possible parameters for item target
-         *
-         * @since S60 v3.2
-         * @return Item target parameters
-         */
-        TPtrC Params() const;
-
-        /**
-         * Sets the parameters for the item target
-         *
-         * @since S60 v3.2
-         * @param aParams Parameters for item target
-         */
-        void SetParamsL(const TDesC& aParams);
-
-    private:
-
-        CBkmListItem(TUid aUid);
-
-        void ConstructL(const TDesC& aCaption);
-
-    private:  // data
-
-        /**
-         * Target bookmark uid
-         */
-        TUid iUid;
-
-        /**
-         * Target bookmark caption
-         */
-        HBufC* iCaption;
-
-        /**
-         * Target bookmark parameters
-         */
-        HBufC* iParams;
-
-    };
-
-private:  // data
-
-    /**
-     * List of bookmark items
-     * Own.
-     */
-    RPointerArray<CBkmListItem> iListItems;
-
-    /**
-     * Amount of all bookmarks in the device
-     */
-    TInt                        iTotalAppCount;
-
-    /**
-     * Pointer to the control environment
-     * Not own.
-     */
-    CCoeEnv*                    iEnv;
-
-    /**
-     * Settings plug-in model.
-     * Not own.
-     */
-    CAiScutSettingsModel*       iModel;
-
-    /**
-     * Registered observer for list events
-     */
-    MAiScutListObserver&        iObserver;
-
-    /**
-     * A flag indicating if the bookmark list should observe changes
-     */
-    TBool                       iObserving;
-
-    /**
-     * Bookmark database change observer.
-     * Own.
-     */
-    CActiveFavouritesDbNotifier*    iBookmarkDbObserver;
-
-};
-
-#endif // CAISCUTSETTINGSBKMLIST_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingscontainer.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut settings plug-in container.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGSCONTAINER_H
-#define CAISCUTSETTINGSCONTAINER_H
-
-#include <gsbasecontainer.h>
-
-#include "aiscutsettings.hrh"
-
-class CAknRadioButtonSettingPage;
-class CAknSettingPage;
-class CAknWaitDialog;
-class CAiScutSettingsModel;
-class CAiScutSettingsBkmList;
-class CAiScutSettingsItem;
-
-/**
- * Shortcut settings plug-in container
- *
- * @lib aiscutsettings.lib
- * @since S60 v3.2
- */
-class CAiScutSettingsContainer : public CGSBaseContainer
-{
-
-public:
-
-    CAiScutSettingsContainer();
-
-    virtual ~CAiScutSettingsContainer();
-
-    /**
-     * Sets pointer to settings plug-in model.
-     *
-     * @since S60 v3.2
-     * @param aModel Pointer to settings plug-in model
-     */
-    void SetModel(CAiScutSettingsModel* aModel);
-
-    /**
-     * Chandles a setting change command
-     *
-     * @since S60 v3.2
-     */
-    void HandleChangeCommandL();
-
-    /**
-     * Chandles a setting type change command
-     *
-     * @since S60 v3.2
-     */
-    void HandleChangeShortcutTypeCommandL(TAiScutSettingType aType);
-
-    /**
-  	 * Dialog showing changed
-     *
-     * @since S60 v3.2
-      */
-    TBool IsChangeDialogShowing();
-
-    /**
-     * Close change dialog
-     *
-     * @since S60 v3.2
-     */
-    void CloseChangeDialog();
-
-    /**
-     * Reset current list
-     *
-     * @since S60 v3.2
-     */
-    void ResetCurrentListL(TInt aIndex);
-
-    /**
-     * Hides the wait note dialog.
-     *
-     * @since S60 v3.2
-     */
-    void HideWaitNoteDialog();
-    
-    /**
-    * Dismisses the wait note dialog and possible
-    * other dialogs and stops the change process.
-    *
-    * @since S60 v3.2
-    */
-    void StopShortcutChangeProcess();
-
-private:
-
-    void ConstructL(const TRect& aRect);
-
-    // from base class CGSBaseContainer
-
-    /**
-     * From CGSBaseContainer
-     * Constructs the settings listbox
-     *
-     * @since S60 v3.2
-     * @param aResLbxId Listbox resource id
-     */
-    void ConstructListBoxL(TInt aResLbxId);
-
-    /**
-     * Chandles a setting change command to select application from a list
-     *
-     * @since S60 v3.2
-     * @param aItem Applist item to modify
-     * @param aNew ETrue if selecting an application for first time, EFalse if not
-     * @return ETrue if shortcut was changed. EFalse if not
-     */
-    TBool HandleAppListChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse);
-
-    /**
-     * Chandles a setting change command to select bookmark from a list
-     *
-     * @since S60 v3.2
-     * @param aItem Applist item to modify
-     * @param aNew ETrue if selecting an application for first time, EFalse if not
-     * @return ETrue if shortcut was changed. EFalse if not
-     */
-    TBool HandleBookmarkChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse);
-
-    /**
-     * Chandles a setting change command to edit an URL
-     *
-     * @since S60 v3.2
-     * @param aItem Applist item to modify
-     * @param aNew ETrue if typing a new url, EFalse if editing an existing one
-     * @return ETrue if shortcut was changed. EFalse if not
-     */
-    TBool HandleUrlChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse);
-
-    /**
-     * Handles text editing in an CAknTextSettingPage
-     *
-     * @since S60 v3.2
-     * @param aResId Resource id for the text setting page
-     * @param aDes The text to edit
-     * @return ETrue if user pressed OK, ETrue if user pressed Cancel
-     */
-    TBool EditTextL(TInt aResId, TDes& aDes);
-
-    /**
-     * Shows the wait note dialog.
-     *
-     * @since S60 v3.2
-     */
-    void ShowWaitNoteDialogL();
-
-    /**
-     * Required for help.
-     *
-     */
-    void GetHelpContext(TCoeHelpContext& aContext) const;
-
-    /**
-     * 
-     */
-    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-    /**
-     * Checks if there is a need to update the middle softkey label.
-     */
-    void CheckMiddleSoftkeyLabelL();
-
-private:  // data
-
-    /**
-     * Settings plug-in model.
-     * Not own.
-     */
-    CAiScutSettingsModel*       iModel;
-
-    /**
-     * Application selection list page.
-     * Own.
-     */
-    CAknRadioButtonSettingPage* iAppListDialog;
-
-    /**
-     * Bookmark selection list page.
-     * Own.
-     */
-    CAknRadioButtonSettingPage* iBkmListDialog;
-
-    /**
-     * Text setting page.
-     * Own.
-     */
-    CAknSettingPage*            iEditDialog;
-
-    /**
-     * Wait dialog that is shown when the application list is not ready.
-     * Own.
-     */
-    CAknWaitDialog*             iWaitDialog;
-
-    /**
-     *
-     */
-    TAiScutSettingType          iOldType;
-    
-    /**
-    * Is the change process stopped by outside "forces"
-    */
-    TBool                       iChangeProcessStopped;
-    
-    /**
-     * Is the change process in progress
-     */
-    TBool                       iChangeProcessInProgress;
-
-};
-
-#endif // CAISCUTSETTINGSCONTAINER_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingsitem.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for shortcut setting items.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGSITEM_H
-#define CAISCUTSETTINGSITEM_H
-
-#include <e32base.h>
-#include "aiscutsettings.hrh"
-
-class CAiScutSettingsModel;
-class CRepository;
-
-/**
- * Line format for the settings list box
- */
-_LIT(KSettingListboxLineFormat, " \t%S\t\t%S");
-
-/**
- * Implements a shortcut setting item
- *
- * @since S60 v3.2
- */
-class CAiScutSettingsItem : public CBase
-{
-
-public:
-
-    /**
-     * Constructs a new settings item leaving it on the cleanup stack
-     *
-     * @since S60 v3.2
-     * @param aModel Reference to the plug-in model
-     * @param aIndex Index of the setting in the setting list
-     * @param aKey Setting item key
-     * @param aValue Setting item value
-     */
-    static CAiScutSettingsItem* NewLC(
-        CAiScutSettingsModel&   aModel,
-        TInt                    aIndex,
-        TUint32                 aKey);
-
-    static CAiScutSettingsItem* NewLC(
-        CAiScutSettingsModel&   aModel,
-        TInt                    aIndex,
-        TUint32                 aKey,
-        const TDesC&            aValue);
-
-    /**
-     * Get item value from CRepository
-     */
-    void ReadL(CRepository* aRepository);
-
-    /**
-     * set item value into CRepository
-     */
-    TInt Save(CRepository* aRepository);
-
-    /**
-     *
-     */
-    virtual ~CAiScutSettingsItem();
-
-    /**
-     * Returns the setting item key
-     *
-     * @since S60 v3.2
-     * @return Setting item key
-     */
-    inline TUint32 Key() const;
-
-    /**
-     * Returns the target shortcut uid
-     *
-     * @since S60 v3.2
-     * @return Target shortcut uid
-     */
-    inline TUid Uid() const;
-
-    /**
-     * Returns the setting item type
-     *
-     * @since S60 v3.2
-     * @return Setting item type
-     */
-    inline TAiScutSettingType Type() const;
-
-    /**
-     * Returns the setting item value
-     *
-     * @since S60 v3.2
-     * @return Setting item value
-     */
-    TPtrC Value() const;
-
-    /**
-     * Returns the formatted listbox line descriptor
-     *
-     * @since S60 v3.2
-     * @return Listbox line descriptor
-     */
-     TPtrC ListBoxLine() const;
-
-    /**
-     * Returns the setting item title
-     *
-     * @since S60 v3.2
-     * @return setting item title
-     */
-    inline TPtrC Title() const;
-
-    /**
-     * Changes the setting item target application.
-     * Can be used to change the setting item type to application setting
-     *
-     * @since S60 v3.2
-     * @param aUid Target application uid
-     * @param aParams Target application parameters, if any
-     * @param aCaption Target application caption
-     */
-    void ChangeApplicationL(TUid aUid, const TDesC& aParams, const TDesC& aCaption);
-
-    /**
-     * Changes the setting item target bookmark.
-     * Can be used to change the setting item type to bookmark setting
-     *
-     * @since S60 v3.2
-     * @param aParams Target bookmark parameters
-     * @param aCaption Target bookmark caption
-     */
-    void ChangeBookmarkL(const TDesC& aParams, const TDesC& aCaption);
-
-    /**
-     * Changes the setting item target url
-     * Can be used to change the setting item type to an url setting
-     *
-     * @since S60 v3.2
-     * @param aUrl Target url
-     */
-    void ChangeUrlL(const TDesC& aUrl);
-
-private:
-
-    /**
-     *
-     */
-    CAiScutSettingsItem(
-        CAiScutSettingsModel&   aModel,
-        TInt                    aIndex,
-        TUint32                 aKey);
-
-    /**
-     *
-     */
-    void ConstructL();
-
-    /**
-     *
-     */
-    void ConstructL(const TDesC& aValue);
-
-    /**
-     *
-     */
-    TInt ParseValueL(const TDesC& aValue);
-
-    /**
-     * Creates a formatted listbox line
-     *
-     * @since S60 v3.2
-     * @param aCaption Caption to use in the listbox line
-     */
-    void CreateListBoxLineL(const TDesC& aCaption);
-
-    /**
-     * Creates a setting item title
-     * Leaves the created descriptor on cleanup stack
-     *
-     * @since S60 v3.2
-     * @return Key title
-     */
-    HBufC* CreateItemTitleLC();
-
-    /**
-     * Creates a key title for an optionally visible shortcut.
-     * Leaves the created descriptor on cleanup stack
-     *
-     * @since S60 v3.2
-     * @return Key title
-     */
-    HBufC* CreateOptionallyVisibleKeyTitleLC();
-
-    /**
-     * Creates a key title for a non-visible shortcut.
-     * Leaves the created descriptor on cleanup stack
-     *
-     * @since S60 v3.2
-     * @return Key title
-     */
-    //    HBufC* CreateNonVisibleKeyTitleLC();
-
-protected:  // data
-
-    /**
-     * Reference to the plug-in model
-     */
-    CAiScutSettingsModel&   iModel;
-
-    /**
-     * Setting item index in the setting list
-     */
-    TInt                    iIndex;
-
-    /**
-     * Setting item key
-     */
-    TUint32                 iKey;
-
-    /**
-     * Setting item value
-     * Own.
-     */
-    HBufC*                  iValue;
-
-    /**
-     * Target application uid
-     */
-    TUid                    iUid;
-
-    /**
-     * Setting item type
-     */
-    TAiScutSettingType      iType;
-
-    /**
-     * Formatted listbox line
-     * Own.
-     */
-    HBufC*                  iListBoxLine;
-
-    /**
-     * Setting item title. Points to the iListBoxLine buffer
-     */
-    TPtrC                   iTitle;
-
-};
-
-#include "caiscutsettingsitem.inl"
-
-#endif // CAISCUTSETTINGSITEM_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingsitem.inl	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Inline functions for the shortcut settings item.
-*
-*/
-
-
-// ---------------------------------------------------------------------------
-// Returns the setting item key.
-// ---------------------------------------------------------------------------
-//
-inline TUint32 CAiScutSettingsItem::Key() const
-{
-    return iKey;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the target shortcut uid.
-// ---------------------------------------------------------------------------
-//
-inline TUid CAiScutSettingsItem::Uid() const
-{
-    return iUid;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the setting item type.
-// ---------------------------------------------------------------------------
-//
-inline TAiScutSettingType CAiScutSettingsItem::Type() const
-{
-    return iType;
-}
-
-
-
-// ---------------------------------------------------------------------------
-// Returns the setting item title.
-// ---------------------------------------------------------------------------
-//
-inline TPtrC CAiScutSettingsItem::Title() const
-{
-    return iTitle;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutsettingsmodel.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shrortcut settings plug-in model.
-*
-*/
-
-
-#ifndef CAISCUTSETTINGSMODEL_H
-#define CAISCUTSETTINGSMODEL_H
-
-#include <e32base.h>
-#include <bamdesca.h>               // For MDesCArray
-#include <apgcli.h>                 // For RApaLsSession
-#include <favouritesdb.h>           // For RFavouritesDb
-#include <favouritesitemlist.h>     // For CFavouritesItemList
-
-#include "caiscutsettingsapplist.h"
-#include "caiscutsettingsbkmlist.h"
-
-class CCoeEnv;
-class CRepository;
-class CAiScutSettingsItem;
-class CAiScutSettingsContainer;
-class CAiScutRepositoryWatcher;
-class CAiScutSettings;
-
-/**
- * Shrortcut settings plug-in model
- *
- * @lib aiscutsettings.lib
- * @since S60 v3.2
- */
-class CAiScutSettingsModel : public CBase
-                           , public MDesCArray
-                           , public MAiScutListObserver
-{
-
-public:
-
-    /**
-     *
-     */
-    static CAiScutSettingsModel* NewL(CAiScutSettings& aPlugin, CCoeEnv* aEnv);
-
-    /**
-     *
-     */
-    virtual ~CAiScutSettingsModel();
-
-public: // from MDesCArray
-
-    /**
-     * Returns the number of descriptor elements in a descriptor array.
-     *
-     * @since S60 v3.2
-     * @return The number of descriptor elements in a descriptor array.
-     */
-    TInt MdcaCount() const;
-
-    /**
-     * Indexes into a descriptor array.
-     *
-     * @since S60 v3.2
-     * @param aIndex The position of the descriptor element within a descriptor array.
-     * @return A 16 bit non-modifiable pointer descriptor representing the descriptor
-     *         element located at position aIndex within a descriptor array.
-     */
-    TPtrC MdcaPoint(TInt aIndex) const;
-
-    /**
-     * Handle Shortcuts changed
-     */
-    static TInt HandleShortcutsChanged(TAny* aPtr);
-
-    /**
-     * Handle hidden Applications changed
-     */
-    static TInt HandleHiddenAppsChanged(TAny* aPtr);
-
-public: // from MAiScutListObserver
-
-    /**
-     * From MAiScutListObserver
-     * Callback for application list events
-     *
-     * @since S60 v3.2
-     * @param aEvent AppList event code
-     * @param aAdded ETrue if applications were added, EFalse if removed
-     */
-    void HandleScutListEventL(TScutListEvent aEvent, TBool aAdded);
-
-    /**
-     * Find application is hidden using Uid
-     */
-    TBool IsHidden(const TUid& aAppUid) const;
-
-public:
-
-    /**
-     * Tells the application list and bookmark list to start or stop observing for changes
-     */
-    void ActivateObservers(TBool aActivate);
-
-    /**
-     * Returns a setting item for the given index
-     *
-     * @since S60 v3.2
-     * @param aIndex Index of the setting item
-     * @return Pointer to a setting item
-     */
-    CAiScutSettingsItem* Item(TInt aIndex) const;
-
-    /**
-     * Utility function to retrieve an appliation caption from an uid
-     *
-     * @since S60 v3.2
-     * @param aUid Application uid
-     * @return Pointer descriptor to the application caption
-     */
-    TInt GetAppCaption(const TUid aUid, TDes& aCaption);
-
-    /**
-     * Utility function to retrieve a bookmark caption from an uid
-     *
-     * @since S60 v3.2
-     * @param aUid Bookmark uid
-     * @return Pointer descriptor to the bookmark caption
-     */
-    TInt GetBkmCaptionL(const TUid aUid, TDes& aCaption);
-
-    /**
-     * Returns a pointer to the coe environment
-     *
-     * @since S60 v3.2
-     * @return Pointer to coe environment
-     */
-    CCoeEnv* Env();
-
-    /**
-     * Handles saving a setting item to central repository
-     *
-     * @since S60 v3.2
-     * @param aItem Item to save
-     */
-    void SaveItemL(CAiScutSettingsItem& aItem);
-
-    /**
-     * Sets pointer to settings plug-in container.
-     *
-     * @since S60 v3.2
-     * @param aContainer Pointer to settings plug-in container.
-     */
-    void SetContainer(CAiScutSettingsContainer* aContainer);
-
-    /**
-     * Read bookmarks from favourites engine.
-     *
-     */
-    void ReadBookmarksL();
-
-    /**
-     * Return bookmark count.
-     */
-    TInt BookmarkCount() const;
-
-    /**
-     * Get bookmark from index aIndex.
-     */
-    CFavouritesItem* GetBookmark(TInt aIndex);
-
-    /**
-     * Returns reference to the bookmark database owned by the engine
-     *
-     * @return Reference to RFavouritesDb
-     */
-    RFavouritesDb& FavouritesDb();
-
-    /**
-     *
-     */
-    CAiScutSettingsAppList* AppList();
-
-    /**
-     *
-     */
-    CAiScutSettingsBkmList* BkmList();
-    
-    /**
-     *
-     */
-    void SetSettingsKeys(RArray<TUint32>& aKeys);
-    
-    /**
-     *
-     */
-    void UpdateSettingsL();    
-
-    /**
-     *
-     */
-    void UpdateSettingsContainerL();
-
-private:
-
-    /**
-     *
-     */
-    CAiScutSettingsModel(CAiScutSettings& aPlugin, CCoeEnv* aEnv);
-
-    /**
-     *
-     */
-    void ConstructL();
-
-
-    /**
-     *
-     */
-    void GetHiddenAppsL();
-
-private:  // data
-
-    /**
-     * Array of setting items.
-     * Own.
-     */
-    RPointerArray<CAiScutSettingsItem>  iSettings;
-
-    /**
-     * Array of keys for settings items
-     * Own.
-     */    
-    RArray<TUint32>                     iKeys;
-
-    /**
-     * Central repository handler.
-     * Own.
-     */
-    CRepository*                        iRepository;
-
-    /**
-     * Application architecture server session.
-     * Own.
-     */
-    RApaLsSession                       iApaSession;
-
-    /**
-     * Bookmark database session.
-     * Own.
-     */
-    RFavouritesSession                  iBookmarkSess;
-
-    /**
-     * Bookmark database.
-     * Own.
-     */
-    RFavouritesDb                       iBookmarkDb;
-
-    /**
-     * Bookmark list.
-     * Own.
-     */
-    CFavouritesItemList*                iFavItemList;
-
-    /**
-     * Settings plugin
-     * Not own.
-     */    
-    CAiScutSettings&                    iPlugin;     
-
-    /**
-     * Coe environment.
-     * Not own.
-     */
-    CCoeEnv*                            iEnv;
-
-    /**
-     * Application list.
-     * Own.
-     */
-    CAiScutSettingsAppList*             iAppList;
-
-    /**
-     * Bookmark list.
-     * Own.
-     */
-    CAiScutSettingsBkmList*             iBkmList;
-
-    /**
-     * Notifier for changes in the shortcut settings.
-     * Own.
-     */
-    CAiScutRepositoryWatcher*           iSettingsNotifier;
-
-    /**
-     * Settings plugin container.
-     * Not own.
-     */
-    CAiScutSettingsContainer*           iContainer;
-
-    // Array of UIDs which are hidden from the TARM
-    RArray<TUid>                        iHiddenApps;
-
-    // Central repository object for Hidden Apps
-    CRepository*                        iHiddenAppsRepository;
-
-    // Central repository change handler for Hidden Apps
-    CAiScutRepositoryWatcher*           iHiddenAppsNotifier;
-
-};
-
-#endif // CAISCUTSETTINGSMODEL_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutshortcut.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,337 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for a shortcut.
-*
-*/
-
-
-#ifndef CAISCUTSHORTCUT_H
-#define CAISCUTSHORTCUT_H
-
-#include <e32base.h>
-
-#include "taiscutparser.h"
-
-class CAiScutEngine;
-class CAiScutTarget;
-class MAiContentObserver;
-class MAiPropertyExtension;
-
-/**
- *  Implementation for a shortcut
- *
- *  Handles parsing and launching an application shortcut
- *
- *  @since S60 v3.2
- */
-class CAiScutShortcut : public CTimer
-{
-
-public:
-
-    /**
-     * First phase constructor.
-     * Leaves the object on cleanup stack
-     *
-     * @since S60 v3.2
-     * @param aId Shortcut id
-     * @param aTarget The shortcut definition string.
-     * @param aEngine Reference to shortcut plug-in engine
-     */
-    static CAiScutShortcut* NewLC(TInt aId, const TDesC& aTarget,
-        CAiScutEngine& aEngine);
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aId Shortcut id
-     * @param aTarget The shortcut definition string
-     * @param aEngine Reference to shortcut plug-in engine
-     */
-    static CAiScutShortcut* NewL(TInt aId, const TDesC& aTarget,
-        CAiScutEngine& aEngine);
-
-    virtual ~CAiScutShortcut();
-
-    /**
-     * Returns the shortcut id
-     *
-     * @since S60 v3.2
-     * @return Shortcut id
-     */
-    TInt32 Id() const;
-
-    /**
-     * Publishes the shortcut content, non leaving version
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to plug-in
-     * @param aObserver Content observer to publish to
-     */
-    void Publish(MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver);
-
-    /**
-     * Checks if the application pointed to can be launched and reverts to the
-     * default setting if not. If no valid target can be found, the shortcut
-     * becomes empty. May only leave with KErrNotReady to signify that application
-     * architecture server or message server is not ready and access check should
-     * be retried later.
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @return ETrue if the shortcut target is accessible
-     */
-    TBool CheckAccessL(TInt aCheckType);
-
-    /**
-     *
-     */
-    TBool IsTargetChanged() const;
-
-    /**
-     * Changes the shortcut target to the user defined setting
-     *
-     * @since S60 v3.2
-     * @param aNewTarget The new user defined shortcut target
-     */
-    void SetUserTarget(const TDesC& aNewTarget);
-
-    /**
-     * Deletes the user target.
-     *
-     * @since S60 v3.2
-     */
-    void DeleteUserTarget();
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v5.1
-     * @param aMessage A message to pass
-     */
-    void LaunchL(const TDesC8& aMessage);
-    
-    /**
-     * Set call state
-     *
-     * @since S60 v3.2
-     */
-    void SetCallState(TBool aStatus);
-
-    /**
-     *
-     * @since S60 v3.2
-     */
-    void SetToBePublished(TBool aFlag);
-
-    /**
-     *
-     * @since S60 v3.2
-     */
-    TBool NeedsToBePublished();
-
-    /**
-     * Return shortcut type.
-     *
-     * @since S60 v3.2
-     */
-    TShortcutType Type() const;
-
-    /**
-     * Return application uid of this shortcut.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-    /**
-     * Return an additional id this target may use when 
-     * launching.
-     *
-     * @since S60 v3.2
-     */
-    TUid AdditionalUid() const;
-    
-    /**
-     * Return current valid definition.
-     *
-     * @since S60 v3.2
-     */
-    TPtrC ActiveDefinition();
-    
-    /**
-     * Set the icon to publish to softkeys,
-     * icon area or to touch toolbar. Uses
-     * aIcon.iDestination to determine which icon
-     * is in question
-     *
-     * @since S60 v5.0
-     */
-    void SetIcon(TAiScutIcon aIcon);
-
-
-protected:
-
-
-    CAiScutShortcut(TInt aId, CAiScutEngine& aEngine);
-
-    void ConstructL(const TDesC& aTarget);
-
-    /**
-     * Creates a shortcut target object
-     *
-     * @since S60 v3.2
-     * @param aDefinition Shortcut target definition
-     * @return Pointer to shortcut target object
-     */
-    CAiScutTarget* CreateTargetL(
-        const TDesC& aDefinition, TBool aCreateUserTarget);
-
-    /**
-     * Publishes the shortcut content, leaving version
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to plug-in
-     * @param aObserver Content observer to publish to
-     */
-    virtual void PublishL(MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver);
-
-    /**
-     * Publishes shortcut caption
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to plug-in
-     * @param aObserver Content observer to publish to
-     */
-    virtual TInt PublishCaption(
-        MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver,
-        TInt aCaptionContentId) const;
-
-    /**
-     * Publishes shortcut icon
-     *
-     * @since S60 v3.2
-     * @param aPlugin Reference to plug-in
-     * @param aObserver Content observer to publish to
-     */
-    virtual TInt PublishIcon(
-        MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver, TInt aIconContentId);
-
-    /**
-     * Set the icon to use instead of default icon
-     *
-     * @since S60 v3.2
-     */
-    void SetOverrideIcon(TAiScutIcon aIcon);
-
-    /**
-     * Set the icon to publish to softkeys
-     *
-     * @since S60 v3.2
-     */
-    void SetSoftkeyIcon(TAiScutIcon aIcon);
-
-    /**
-     * Set the icon to publish to touch toolbar
-     *
-     * @since S60 v5.0
-     */
-    void SetToolbarIcon(TAiScutIcon aIcon);
-    
-// from CActive/CTimer
-		
-	TInt RunError(TInt aError);
-		
-	void DoCancel();
-		
-	void RunL();
-
-protected:  // data
-
-    /**
-     * Shortcut id.
-     */
-    TInt32          iId;
-
-    /**
-     * Default shortcut target.
-     * Own.
-     */
-    CAiScutTarget*  iDefaultTarget;
-
-    /**
-     * User defined shortcut target.
-     * Own.
-     */
-    CAiScutTarget*  iUserTarget;
-
-    /**
-     * Stores the old target data while the new one is being published.
-     * During publishing the framework might still dereference pointers in the old
-     * target so it must be kept alive until the new target is successfully published.
-     * If publishing fails, this is taken back to use and the new target is deleted.
-     * Own.
-     */
-    CAiScutTarget*  iRetiredTarget;
-
-    /**
-     * Pointer to the last published target.
-     * DO NOT DELETE THROUGH THIS!
-     * Not own.
-     */
-    CAiScutTarget*  iLastPublishedTarget;
-
-    /**
-     * Pointer to the active target.
-     * Can point either to iDefaultTarget, iUserTarget or NULL
-     * DO NOT DELETE THROUGH THIS!
-     * Not own.
-     */
-    CAiScutTarget*  iActiveTarget;
-
-    /**
-     * Reference to the shortcut plug-in engine.
-     */
-    CAiScutEngine&  iEngine;
-
-    /**
-     * Boolean indicating if this shortcut needs to be published.
-     */
-    TBool           iNeedsToBePublished;
-
-    /**
-     * Call state
-     */
-    TBool           iActiveCall;
-    
-    /**
-     * Force the publish of this shortcut. For example
-     * after call state has changed the actual shortcut
-     * isn't changed but it still needs to be published.
-     */
-    TBool           iForcePublish;
-
-};
-
-#endif // CAISCUTSHORTCUT_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutshortcutext.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in shortcut extensions
-*
-*/
-
-
-#ifndef CAISCUTSHORTCUTEXT_H
-#define CAISCUTSHORTCUTEXT_H
-
-#include <e32base.h>
-#include <badesca.h>
-#include <aicontentpublisher.h>
-
-#include "caiscutshortcut.h"
-#include "mpopupeventhandleractions.h"
-
-class CPopupEventHandler;
-class MAiScutExtData;
-
-/**
- *
- *  The class extends CAiScutShortcut by offering means to store
- *  changeable popup text lines. The class overrides content publishing
- *  functions from base class.
- *
- *  @since S60 v3.2
- */
-class CAiScutShortcutExt : public CAiScutShortcut,
-    public MPopupEventHandlerActions
-    {
-    public:
-        /**
-         * Factory function
-         * @see CAiScutShortcut
-         * @since S60 v3.2
-         */
-        static CAiScutShortcutExt* NewL( TInt aId, const TDesC& aTarget,
-            CAiScutEngine& aEngine );
-
-        /**
-         * Factory function
-         * @see CAiScutShortcut
-         * @since S60 v3.2
-         */
-        static CAiScutShortcutExt* NewLC( TInt aId, const TDesC& aTarget,
-            CAiScutEngine& aEngine );
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CAiScutShortcutExt();
-
-    private:
-        CAiScutShortcutExt( TInt aId, CAiScutEngine& aEngine );
-        void ConstructL( const TDesC& aTarget );
-
-    public:  // New functions
-        /**
-         * @return Definition string of active target
-         * @since S60 v3.2
-         */
-        TPtrC ActiveTargetDefinition() const;
-
-        /**
-         * Handles events (e.g. gain/lost focus) from AI framework
-         * @param aEvent Event
-         * @since S60 v3.2
-         */
-        void HandleAIEventL( TInt aEvent );
-
-        /**
-         * Handles Resumed event
-         * @param aResumeReason Resume reason
-         * @since S60 v3.2
-         */
-        void HandleResumed( TAiTransitionReason aResumeReason );
-
-        /**
-         * Set extension data
-         * @param aAiScutExtData Pointer to new extension data
-         * @since S60 v3.2
-         */
-        void SetAiScutExtData( const MAiScutExtData* aAiScutExtData );
-
-
-    private: // From CAiScutShortcut
-        void PublishL( MAiPropertyExtension& aPlugin, 
-            MAiContentObserver& aObserver );
-
-        TInt PublishCaption( MAiPropertyExtension& aPlugin, 
-            MAiContentObserver& aObserver, TInt aCaptionContentId) const;
-
-        void PublishPopupText( MAiPropertyExtension& aPlugin, 
-            MAiContentObserver& aObserver ) const;
-        
-        TInt PublishIcon( MAiPropertyExtension& aPlugin,
-            MAiContentObserver& aObserver, TInt aIconContentId );
-
-    private:    // From MPopupEventHandlerActions
-        void IssuePublishShortcut();
-        
-    private: // data
-
-        /**
-         * Extension data
-         * Ref.
-         */
-        const MAiScutExtData* iAiScutExtData;
-        
-        /**
-         * Flag that tells whether to publish or clean the popup text box.
-         * The flag is controlled by iPopupEventHandler
-         * Own.
-         */
-        //TBool iPublishLineArray;
-
-        /**
-         * Handler of various events, includes state machine
-         * Own.
-         */
-        CPopupEventHandler* iPopupEventHandler;
-        
-        /**
-         * Pointer to previous popup line array. This is used detect changes
-         * in data.
-         * Ref.
-         */
-        const MDesCArray* iPreviousPopupLineArray;
-
-        /**
-         * Pointer to previous icon. This is used detect changes
-         * in data.
-         * Ref.
-         */
-        const CGulIcon* iPreviousIcon;
-        
-        /**
-         * Has the icon changed
-         */
-        TBool iIconChanged;
-        
-        /**
-         * Has the text changed
-         */
-        TBool iTextChanged;
-
-    };
-
-#endif // CAISCUTSHORTCUTEXT_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscutshortcutinfo.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Small container for shortcut info.
-*
-*/
-
-
-#ifndef CAISCUTSHORTCUTINFO_H
-#define CAISCUTSHORTCUTINFO_H
-
-#include <e32base.h>
-
-/**
- *  Implementation for a shortcut
- *
- *  Handles parsing and launching an application shortcut
- *
- *  @since S60 v3.2
- */
-class CAiScutShortcutInfo : public CBase
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aId Shortcut id
-     * @param aTarget The shortcut definition string
-     */
-    static CAiScutShortcutInfo* NewL(TInt aId, const TDesC& aTarget);
-
-    virtual ~CAiScutShortcutInfo();
-
-    /**
-     * Returns the shortcut id
-     *
-     * @since S60 v3.2
-     * @return Shortcut id
-     */
-    TInt32 Id() const;
-
-    /**
-     * Returns the shortcut target string.
-     *
-     * @since S60 v3.2
-     * @return Shortcut target string
-     */
-    const TDesC& Target();
-    
-protected:
-
-private:
-
-    CAiScutShortcutInfo(TInt aId);
-
-    void ConstructL(const TDesC& aTarget);
-
-private:  // data
-
-    /**
-     * Shortcut id.
-     */
-    TInt32          iId;
-
-    /**
-     * Shortcut target string.
-     * Own.
-     */
-    HBufC*  iTarget;
-
-};
-
-#endif // CAISCUTSHORTCUTINFO_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttarget.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for all shortcut targets.
-*
-*/
-
-
-#ifndef CAISCUTTARGET_H
-#define CAISCUTTARGET_H
-
-#include <e32base.h>
-
-#include "taiscutparser.h"
-#include "aiscutdefs.h"
-#include <AknsItemID.h>
-
-class CAiScutEngine;
-class CGulIcon;
-
-_LIT(KBitmapFile, "aiscutplugin.mif");
-
-/**
- *  Base class for shortcut targets
- *
- *  @since S60 v3.2
- */
-class CAiScutTarget : public CBase
-{
-
-public:
-
-    virtual ~CAiScutTarget();
-
-    /**
-     * Returns the shortcut definition string.
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    virtual TPtrC Definition() const = 0;
-
-    /**
-     * Returns the shortcut target caption.
-     * Caption can be either a descriptor or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the descriptor reference parameter is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Getting the target caption and icon utilizes the "lazy evaluation" idiom
-     * which means they are created only when they are first needed. This is because
-     * there are (atleast) two scenarios where they are never needed:
-     * 1. The active theme does not support shortcut captions or icons.
-     * 2. Shortcuts launched using LaunchByValue are never published.
-     *
-     * @since S60 v3.2
-     * @param aDes On return, the descriptor if used
-     * @return The resource id or zero to indicate that the descriptor is used.
-     */
-    virtual TInt GetCaption( TPtrC& aDes, TAiScutAppTitleType aTitleType ) const;
-
-    /**
-     * Returns the shortcut target icon.
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns the icon that has possibly
-     * been set with @c SetOverrideIcon() and returns
-     * KErrNotSupported if no override icon has been set.
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    virtual TInt GetIcon( CGulIcon*& aIcon ) const;
-    
-     /**
-     * Returns the shortcut icon that can be published to softkeys
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns the icon that has possibly
-     * been set with @c SetSoftkeyIcon() and returns
-     * KErrNotSupported if no softkey icon has been set.
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    virtual TInt GetSoftkeyIcon( CGulIcon*& aIcon ) const;
-
-     /**
-     * Returns the shortcut icon that can be published to toolbar
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns the icon that has possibly
-     * been set with @c SetSoftkeyIcon() and returns
-     * KErrNotSupported if no softkey icon has been set.
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    virtual TInt GetToolbarIcon( CGulIcon*& aIcon ) const;
-
-    /**
-     * Checks if the shortcut target is accessible.
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @return ETrue if accessible, EFalse if not
-     */
-    virtual TBool IsAccessibleL( TInt aCheckType ) = 0;
-
-    /**
-     * Launches the shortcut.
-     *
-     * @since S60 v3.2
-     */
-    virtual void LaunchL() = 0;
-
-    /**
-     * Launches the shortcut.
-     *
-     * @since S60 v5.1
-     * @param aMessage A message to pass
-     */
-    virtual void LaunchL(const TDesC8& aMessage) { (void)aMessage; };
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    virtual TUid AppUid() const = 0;
-
-    /**
-     * Return an additional id this target may use when 
-     * launching. Default implementation return TUid(-1)
-     *
-     * @since S60 v3.2
-     */
-    virtual TUid AdditionalUid() const;
-
-    /**
-     * Return shortcut type.
-     *
-     * @since S60 v3.2
-     */
-    TShortcutType Type() const;
-    
-    /**
-     * Starts a full screen effect.
-     */
-    void BeginEffectL();
-
-    /**
-     * Set the icon that overrides the shortcut default
-     * icon. Instead of fetching the icon from for example an
-     * application the icon defined here can be used. The shortcut
-     * can use the @c GetIcon() to fetch the 
-     * icon defined here. Currently we support
-     * icon loading from skin or from MIF/MBM-file. 
-     * The file must reside under z:\resource altough
-     * it can be under some subdirectory. 
-     *
-     * @since S60 v3.2
-     * @param aIcon The overriding icon
-     */
-    void SetOverrideIcon(TAiScutIcon aIcon);
-    
-    /**
-     * Set the icon that is to be published to softkeys
-     * The @c GetSoftkeyIcon() can be used to fetch the 
-     * icon defined here. Currently we support
-     * icon loading from skin or from MIF/MBM-file. 
-     * The file must reside under z:\resource altough
-     * it can be under some subdirectory. 
-     *
-     * @since S60 v3.2
-     * @param aIcon The softkey icon
-     */
-    void SetSoftkeyIcon(TAiScutIcon aIcon);
-
-    /**
-     * Set the icon that is to be published to touch toolbar
-     * The @c GetSoftkeyIcon() can be used to fetch the 
-     * icon defined here. Currently we support
-     * icon loading from skin or from mif-file. 
-     * The mif-file must reside under z:\resource altough
-     * it can be under some subdirectory. 
-     *
-     * @since S60 v5.0
-     * @param aIcon The softkey icon
-     */
-    void SetToolbarIcon(TAiScutIcon aIcon);
-    
-protected:
-
-    CAiScutTarget( CAiScutEngine& aEngine, TShortcutType aType );
-
-private:
-    
-    /**
-     * Returns the icon defined in aIconToLoads. Loads the icon
-     * from MIF/MBM-file or from skin.
-     *
-     * @return KErrNone if no error
-    */
-    TInt GetIcon(const TAiScutIcon &aIconToLoad, CGulIcon *&aIcon ) const;
-    
-    /**
-    * Loads an icon defined in aIconToLoad from skin
-    *
-    * @return KErrNone if no error
-    */
-    void LoadIconFromSkinL(const TAiScutIcon &aIconToLoad, CGulIcon*& aIcon) const;
-    
-    /**
-    * Loads an icon defined in aIconToLoad from MIF/MBM-file
-    * The file must reside under z:\resource. It can be under
-    * some subdirectory.
-    *
-    * @return KErrNone if no error
-    */
-    void LoadIconFromFileL(const TAiScutIcon &aIconToLoad, CGulIcon*& aIcon) const;
-
-
-protected:  // data
-
-    /**
-     * Reference to shortcut plug-in engine.
-     */
-    CAiScutEngine&  iEngine;
-
-    /**
-     * Shortcut type.
-     */
-    TShortcutType   iType;
-    
-    /**
-    * Icon that is meant to override the default icon
-    */
-    TAiScutIcon iOverrideIcon;
-   
-    /**
-    * Icon that is to be published to softkeys
-    */
-    TAiScutIcon     iSoftkeyIcon;
-    
-   /**
-    * Icon that is to be published to toolbar
-    */
-    TAiScutIcon     iToolbarIcon;
-   
-};
-
-#endif // CAISCUTTARGET_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetapp.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for application shortcut target.
-*
-*/
-
-
-#ifndef CAISCUTTARGETAPP_H
-#define CAISCUTTARGETAPP_H
-
-#include "caiscuttarget.h"
-
-class CPeriodic; 
-class MAknsSkinInstance; 
-/**
- *  Implements an application shortcut target
- *
- *  Handles parsing and launching an application shortcut target
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetApp : public CAiScutTarget
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aEngine Reference to the plug-in engine
-     * @param aParser Shortcut definition parser
-     */
-    static CAiScutTargetApp* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser);
-
-    virtual ~CAiScutTargetApp();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * Returns the shortcut target caption.
-     * Caption can be either a descriptor or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the descriptor reference parameter is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Getting the target caption and icon utilizes the "lazy evaluation" idiom
-     * which means they are created only when they are first needed. This is because
-     * there are (atleast) two scenarios where they are never needed:
-     * 1. The active theme does not support shortcut captions or icons.
-     * 2. Shortcuts launched using LaunchByValue are never published.
-     *
-     * @since S60 v3.2
-     * @param aDes On return, the descriptor if used
-     * @return The resource id or zero to indicate that the descriptor is used.
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * Returns the shortcut target icon.
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-     /**
-     * Returns the shortcut icon that can be published to toolbar
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns the icon that has possibly
-     * been set with @c SetSoftkeyIcon() and returns
-     * KErrNotSupported if no softkey icon has been set.
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    TInt GetToolbarIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * Checks if the shortcut target is accessible
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @return ETrue if accessible, EFalse if not
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v5.1
-     */
-    void LaunchL( const TDesC8& aCustomMessage );
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-    
-    /**
-     * Return an additional id this target may use when 
-     * launching. Default implementation return TUid(-1)
-     *
-     * @since S60 v3.2
-     */
-    TUid AdditionalUid() const;
-
-protected:
-
-private:
-
-    CAiScutTargetApp(CAiScutEngine& aEngine, TShortcutType aType, const TUid aUid);
-
-    void ConstructL(const TAiScutParser& aParser);
-
-    /**
-     *
-     */
-    void GetCaptionL(TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * Creates the application icon
-     *
-     * @since S60 v3.2
-     */
-    void CreateAppIconL(CGulIcon*& aIcon) const;
-
-    /**
-     * Creates the NonNative application icon
-     *
-     * @since S60 v3.2
-     */
-    CGulIcon* CreateNonNativeIconL() const;
-
-    /**
-     * Performs Central Repository shortcut set
-     * for EasyVoIP application.
-     */
-    void SetEasyVoIPShortcutStartL() const;
-    
-    CGulIcon* CreateSubstituteIconL( MAknsSkinInstance* aSkin, TUid aAppUid, TUid iViewUid ) const;
-private:  // data
-
-    /**
-     * Application uid.
-     */
-    TUid                iAppUid;
-
-    /**
-     * Possible view uid.
-     */
-    TUid                iViewUid;
-
-    /**
-     * Shortcut caption.
-     * Own.
-     */
-    mutable HBufC*      iCaption;
-
-    /**
-     * Shortcut short caption.
-     * Own.
-     */
-    mutable HBufC*      iShortCaption;
-
-    /**
-     * Holds the shortcut definition string.
-     * Own.
-     */
-    HBufC*              iDefinition;
-
-    /**
-     * Run the application in the background.
-     */
-    TBool               iBackground;
-
-    /**
-     * Command line parameter.
-     * Own.
-     */
-    HBufC8*              iMsg;
-
-};
-
-#endif // CAISCUTTARGETAPP_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetbkm.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for bookmark shortcut target.
-*
-*/
-
-
-#ifndef CAISCUTTARGETBKM_H
-#define CAISCUTTARGETBKM_H
-
-#include "caiscuttarget.h"
-
-/**
- *  Implements an bookmark shortcut target
- *
- *  Handles parsing and launching an bookmark shortcut target
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetBkm : public CAiScutTarget
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aEngine Reference to the plug-in engine
-     * @param aParser Shortcut definition parser
-     */
-    static CAiScutTargetBkm* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser);
-
-    virtual ~CAiScutTargetBkm();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * Returns the shortcut target caption.
-     * Caption can be either a descriptor or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the descriptor reference parameter is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Getting the target caption and icon utilizes the "lazy evaluation" idiom
-     * which means they are created only when they are first needed. This is because
-     * there are (atleast) two scenarios where they are never needed:
-     * 1. The active theme does not support shortcut captions or icons.
-     * 2. Shortcuts launched using LaunchByValue are never published.
-     *
-     * @since S60 v3.2
-     * @param aDes On return, the descriptor if used
-     * @return The resource id or zero to indicate that the descriptor is used.
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * Returns the shortcut target icon.
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * Checks if the shortcut target is accessible
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @return ETrue if accessible, EFalse if not
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-    
-    /**
-     * Return an additional id this target may use when 
-     * launching. Default implementation return TUid(-1)
-     *
-     * @since S60 v3.2
-     */
-    TUid AdditionalUid() const;
-
-protected:
-
-private:
-
-    CAiScutTargetBkm(CAiScutEngine& aEngine, TShortcutType aType);
-
-    void ConstructL(const TAiScutParser& aParser);
-
-    /**
-     *
-     */
-    void GetCaptionL() const;
-
-private:  // data
-
-    /**
-     * Bookmark uid.
-     */
-    TUid                iBkmUid;
-
-    /**
-     * Shortcut caption.
-     * Own.
-     */
-    mutable HBufC*      iCaption;
-
-    /**
-     * Holds the shortcut definition string.
-     * Own.
-     */
-    HBufC*              iDefinition;
-
-};
-
-#endif // CAISCUTTARGETAPP_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetempty.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Empty target
-*
-*/
-
-
-#ifndef CAISCUTEMPTY_H
-#define CAISCUTEMPTY_H
-
-#include "caiscuttarget.h"
-
-/**
- *  Empty target.
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetEmpty : public CAiScutTarget
-{
-public:     // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     * @param
-     * @return new instance.
-     */
-    static CAiScutTargetEmpty* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TDesC& aTarget );
-
-    /**
-     * Destructor.
-     */
-    virtual ~CAiScutTargetEmpty();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * See base class
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * See base class
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-	 * See base class
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-private: // New methods
-
-    /**
-     * C++ default constructor.
-     */
-    CAiScutTargetEmpty( CAiScutEngine& aEngine, TShortcutType aType );
-
-    /**
-     * By default Symbian OS constructor is private.
-     */
-    void ConstructL( const TDesC& aTarget );
-
-private:  // Data
-
-    /**
-     * Holds the shortcut definition string
-     * Owned.
-     */
-    HBufC*              iDefinition;
-
-};
-
-#endif
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargethttp.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for http shortcut target.
-*
-*/
-
-
-#ifndef CAISCUTTARGETHTTP_H
-#define CAISCUTTARGETHTTP_H
-
-#include "caiscuttarget.h"
-
-/**
- * Command line parameter for browser to open an url
- */
-_LIT( KOpenUrlParam, "4 " );
-
-/**
- *  Implements an http shortcut target
- *
- *  Handles parsing and launching an http shortcut target
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetHttp : public CAiScutTarget
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aEngine Reference to the plug-in engine
-     * @param aTarget The shortcut definition string
-     */
-    static CAiScutTargetHttp* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser );
-
-    virtual ~CAiScutTargetHttp();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * See base class
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * See base class
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * See base class
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-    /**
-     * Return additional UID this target refers to. In 
-     * URL case this is a unique identifer created from the URL
-     * 
-     * @since S60 v3.2
-     */
-    TUid AdditionalUid() const;
-protected:
-
-private:
-
-    CAiScutTargetHttp( CAiScutEngine& aEngine, TShortcutType aType );
-
-    void ConstructL( const TAiScutParser& aParser );
-
-private:  // data
-
-    /**
-     * Target caption, part of the http address or
-     * custom title given with the URL string
-     */
-    mutable HBufC*       iCaption;
-
-    /**
-     * Holds the shortcut definition string
-     * Owned.
-     */
-    HBufC*              iDefinition;
-    
-    /**
-     * Checksum for the URL
-     */
-    TUid                iChecksum;
-
-};
-
-#endif // CAISCUTTARGETHTTP_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetkeylock.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock
-*
-*/
-
-
-#ifndef CAISCUTKEYLOCK_H
-#define CAISCUTKEYLOCK_H
-
-#include <aknkeylock.h>
-#include "caiscuttarget.h"
-
-/**
- *  Takes care of locking the keypad.
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetKeyLock : public CAiScutTarget
-{
-public:     // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     * @param
-     * @return new instance.
-     */
-    static CAiScutTargetKeyLock* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TDesC& aTarget);
-
-    /**
-     * Destructor.
-     */
-    virtual ~CAiScutTargetKeyLock();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * Returns the shortcut target caption.
-     * Caption can be either a descriptor or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the descriptor reference parameter is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Getting the target caption and icon utilizes the "lazy evaluation" idiom
-     * which means they are created only when they are first needed. This is because
-     * there are (atleast) two scenarios where they are never needed:
-     * 1. The active theme does not support shortcut captions or icons.
-     * 2. Shortcuts launched using LaunchByValue are never published.
-     *
-     * @since S60 v3.2
-     * @param aDes On return, the descriptor if used
-     * @return The resource id or zero to indicate that the descriptor is used.
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * Returns the shortcut target icon.
-     * Icon can be either an icon pointer or a resource id.
-     * If the return value has a non-zero value, it is the resource id.
-     * Zero indicates that the icon pointer is used.
-     * Default implementation returns KErrNotSupported;
-     *
-     * Uses the "lazy evaluation" idiom to get the icon. See Caption()
-     *
-     * @since S60 v3.2
-     * @param aIcon On return, the icon pointer if used
-     * @return The resource id or zero to indicate that the icon pointer is used.
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * Checks if the shortcut target is accessible
-     *
-     * @since S60 v3.2
-     * @param aCheckType Specifies which kind of shortcuts should check its access
-     * @return ETrue if accessible, EFalse if not
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-private: // New methods
-
-    /**
-     * Enables keylock.
-     */
-    void EnableKeyLock();
-
-    /**
-     * Checks if keylock is enabled.
-     */
-    TBool IsKeyLockEnabled();
-
-    /**
-     * C++ default constructor.
-     */
-    CAiScutTargetKeyLock(CAiScutEngine& aEngine, TShortcutType aType);
-
-    /**
-     * By default Symbian OS constructor is private.
-     */
-    void ConstructL(const TDesC& aTarget);
-
-private:  // Data
-
-    /**
-     * Keylock
-     */
-    RAknKeylock2         iKeyLock;
-
-    /**
-     * Holds the shortcut definition string
-     * Owned.
-     */
-    HBufC*              iDefinition;
-
-};
-
-#endif // CAIKEYLOCK_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetmessagingview.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for messaging view shortcut target.
-*
-*/
-
-
-#ifndef CAISCUTTARGETMESSAGINGVIEW_H
-#define CAISCUTTARGETMESSAGINGVIEW_H
-
-#include <msvstd.h>
-
-#include "caiscuttarget.h"
-
-class CGulIcon;
-
-/**
- *  Implements a mailbox shortcut target
- *
- *  Handles parsing and launching a mailbox shortcut target
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetMessagingView : public CAiScutTarget
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aEngine Reference to the plug-in engine
-     * @param aParser Shortcut definition parser
-     */
-    static CAiScutTargetMessagingView* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser);
-
-    virtual ~CAiScutTargetMessagingView();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * See base class
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-	 * See base class
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * See base class
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-protected:
-
-private:
-
-    CAiScutTargetMessagingView(CAiScutEngine& aEngine, TShortcutType aType);
-
-    void ConstructL(const TAiScutParser& aParser);
-
-    /**
-     * Tries to find a view id
-     *
-     * @since S60 v3.2
-     * @return Mailbox id
-     */
-    TMsvId FindViewIdL();
-
-    /**
-     * Leaving version of GetIcon.
-     */
-    void GetIconL(CGulIcon*& aIcon) const;
-
-private:  // data
-
-    /**
-     * View name. Contains the remote mailbox name or the messaging view name
-     * Own.
-     */
-    HBufC* iViewName;
-
-    /**
-     * Holds the shortcut definition string
-     * Owned.
-     */
-    HBufC* iDefinition;
-
-};
-
-#endif // CAISCUTTARGETMESSAGINGVIEW_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/caiscuttargetnewmsg.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for new message shortcut target.
-*
-*/
-
-
-#ifndef CAISCUTTARGETNEWMSG_H
-#define CAISCUTTARGETNEWMSG_H
-
-#include <msvstd.h>
-
-#include "caiscuttarget.h"
-
-class CGulIcon;
-
-/**
- *  Implements a new message or new email shortcut target
- *
- *  Handles parsing and launching a new message shortcut target
- *
- *  @since S60 v3.2
- */
-class CAiScutTargetNewMsg : public CAiScutTarget
-{
-
-public:
-
-    /**
-     * First phase constructor
-     *
-     * @since S60 v3.2
-     * @param aEngine Reference to the plug-in engine
-     * @param aParser Shortcut definition parser
-     */
-    static CAiScutTargetNewMsg* NewL(
-        CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser);
-
-    virtual ~CAiScutTargetNewMsg();
-
-    /**
-     * Returns the shortcut definition string
-     *
-     * @since S60 v3.2
-     * @return Shortcut definition string
-     */
-    TPtrC Definition() const;
-
-    /**
-     * See base class
-     */
-    TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * See base class
-     */
-    TInt GetIcon(CGulIcon*& aIcon) const;
-
-    /**
-     * See base class
-     */
-    TBool IsAccessibleL(TInt aCheckType);
-
-    /**
-     * Launches the shortcut
-     *
-     * @since S60 v3.2
-     */
-    void LaunchL();
-
-    /**
-     * Return application uid this target launches.
-     *
-     * @since S60 v3.2
-     */
-    TUid AppUid() const;
-
-
- 
-    
-    
-protected:
-
-private:
-
-    CAiScutTargetNewMsg(CAiScutEngine& aEngine, TShortcutType aType);
-
-    void ConstructL(const TAiScutParser& aParser);
-
-    /**
-     *
-     */
-    void GetCaptionL(TAiScutAppTitleType aTitleType) const;
-
-    /**
-     * Leaving version of GetIcon.
-     */
-    void GetIconL(CGulIcon*& aIcon) const;
-    
-    void ShowErrorNote();
-
-private:  // data
-
-    /**
-     * Application uid.
-     */
-    TUid                iAppUid;
-
-    /**
-     * Possible view uid.
-     */
-    TUid                iViewUid;
-
-    /**
-     * Shortcut caption.
-     * Own.
-     */
-    mutable HBufC*      iCaption;
-
-    /**
-     * Shortcut short caption.
-     * Own.
-     */
-    mutable HBufC*      iShortCaption;
-
-    /**
-     * Holds the shortcut definition string
-     * Owned.
-     */
-    HBufC*              iDefinition;
-
-    /**
-     * Message type
-     */
-    TUid                iMtm;
-};
-
-#endif // CAISCUTTARGETNEWMSG_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/cpopupeventhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in Popup event handler class
-*
-*/
-
-
-#ifndef CPOPUPEVENTHANDLER_H
-#define CPOPUPEVENTHANDLER_H
-
-#include <e32base.h>
-#include <badesca.h>
-
-#include "PopupFSM.h"
-#include "MPopupFSMActions.h"
-
-class MPopupEventHandlerActions;
-
-/**
- *
- *  The class handles Popup events (set, reset, gain/lost focus, etc.) by
- *  delegating them to automatically generated state machine class which in 
- *  turn decides what actions the events cause in different states.
- *
- *  This class has bi-directional friend relationship to CAiScutShortcutExt
- *  in order to establish concrete actions while decoupling state machine
- *  related functions out of CAiScutShortcutExt.
- *
- *  @since S60 v3.2
- */
-class CPopupEventHandler : public CActive, 
-    public MPopupFSMActions
-    {
-    public:
-        /**
-         * Factory function
-         * @param aPopupEventHandlerActions actions interface
-         * @since S60 v3.2
-         */
-        static CPopupEventHandler* NewL( 
-            MPopupEventHandlerActions& aPopupEventHandlerActions );
-
-        /**
-         * Factory function
-         * @param aPopupEventHandlerActions actions interface
-         * @since S60 v3.2
-         */
-        static CPopupEventHandler* NewLC( 
-            MPopupEventHandlerActions& aPopupEventHandlerActions );
-
-        /**
-         * Destructor
-         * @since S60 v3.2
-         */
-        ~CPopupEventHandler();
-
-    private:
-
-        /**
-         * Constructor
-         * @param aPopupEventHandlerActions actions interface
-         * @since S60 v3.2
-         */
-        CPopupEventHandler( 
-            MPopupEventHandlerActions& aPopupEventHandlerActions );
-
-        void ConstructL();
-
-    public:  // New functions
-        /**
-         * Accessor for state machine
-         * @return Reference to state machine instance
-         * @since S60 v3.2
-         */
-        TPopupFSM& PopupFSM();
-
-        TBool PublishPopup() const;
-        TBool PopupVisible() const;
-        
-        /**
-         * @return Is publishing needed
-         */
-        TBool PublishCaption() const;
-
-        /**
-         * @return Is caption visible
-         */
-        TBool CaptionVisible() const;
-        
-    private:    // From CActive
-        void DoCancel();
-        void RunL();
-
-    private: // From MPopupFSMActions
-        void CompleteSelf();
-        void CancelRequest();
-        void StartShortTimer();
-        void StartLongTimer();
-        void IssuePublishPopup();
-        void IssueCleanPopup();
-        void IssuePublishCaption();
-        void IssueCleanCaption();
-
-    private: // data
-        /**
-         * Actions interface
-         * Ref.
-         */
-        MPopupEventHandlerActions& iPopupEventHandlerActions;
-
-        /**
-         * State machine instance
-         * Own.
-         */
-        TPopupFSM iPopupFSM;
-
-        /**
-         * Timeout timer
-         * Own.
-         */
-        RTimer iTimer;
-
-        TBool iPublishPopup;
-        TBool iPopupVisible;
-
-        TBool iPublishCaption;
-        TBool iCaptionVisible;
-    };
-
-#endif // CPOPUPEVENTHANDLER_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/maiscutextdata.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension data
-*
-*/
-
-
-#ifndef MAISCUTEXTDATA_H
-#define MAISCUTEXTDATA_H
-
-#include <e32base.h>
-
-class CGulIcon;
-
-/**
- *  @since S60 v3.2
- */
-class MAiScutExtData
-    {
-    public:
-        /**
-         * @return Pointer to popup line array or NULL if not set
-         * @since S60 v3.2
-         */
-        virtual const MDesCArray* PopupLineArray() const = 0;
-        
-        /**
-         * return Pointer to icon or NULL if not set
-         * @since S60 v3.2
-         */
-        virtual const CGulIcon* Icon() const = 0;
-    };
-
-#endif // MAISCUTEXTDATA_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/maiscutextmessagehandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension server message handler.
-*
-*/
-
-
-#ifndef MAISCUTEXTMESSAGEHANDLER_H
-#define MAISCUTEXTMESSAGEHANDLER_H
-
-#include <e32base.h>
-
-class CGulIcon;
-
-/**
- *
- *  Shortcut plug-in xSP extension server message handler.
- *
- *  @since S60 v3.2
- */
-class MAiScutExtMessageHandler
-    {
-    public:
-        /**
-         * Notifies that the popup text has been changed.
-         * @param aDefinition Target shortcut definition
-         * @param aLineArray Pointer to array of popup line texts. Ownership
-         * is transferred.
-         * @since S60 v3.2
-         */
-        virtual void HandleSetPopupLineArrayL( const TDesC& aDefinition,
-            CDesCArray* aLineArray ) = 0;
-        /**
-         * Notifies that the popup text has been reseted.
-         * @param aDefinition Target shortcut definition
-         * @since S60 v3.2
-         */
-        virtual void HandleResetPopupLineArrayL( const TDesC& aDefinition ) = 0;
-
-        /**
-         * Notifies that the ion has been changed.
-         * @param aDefinition Target shortcut definition
-         * @param aIcon Pointer to new icon. Ownership
-         * is transferred.
-         * @since S60 v3.2
-         */
-        virtual void HandleSetIconL( const TDesC& aDefinition,
-            CGulIcon* aIcon ) = 0;
-
-        /**
-         * Notifies that the icon has been reseted.
-         * @param aDefinition Target shortcut definition
-         * @since S60 v3.2
-         */
-        virtual void HandleResetIconL( const TDesC& aDefinition ) = 0;
-        
-        /**
-         * Checks whether the target is in shortcuts
-         * @param aDefinition Target shortcut definition
-         * @return ETrue if the target is in shortcuts
-         * @since S60 v3.2
-         */
-        virtual TBool HandleIsInShortcutsL( const TDesC& aDefinition ) const = 0;
-        
-        /**
-         * Launches General Settings so that the target definition is passed in.
-         * @param aDefinition Target shortcut definition
-         * @since S60 v3.2
-         */
-        virtual void HandleIssuePutInShortcutsL( const TDesC& aDefinition ) = 0;
-    };
-
-#endif // MAISCUTEXTMESSAGEHANDLER_H
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/inc/mpopupeventhandleractions.h	Tue Feb 02 00:23:10 2010 +0200
+++ /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:
-*
-*/
-#ifndef MPOPUPEVENTHANDLERACTIONS_H
-#define MPOPUPEVENTHANDLERACTIONS_H
-
-//  EXTERNAL INCLUDES
-#include <e32def.h>
-
-//  CLASS DEFINITION
-/**
- * MPopupEventHandlerActions.
- */
-class MPopupEventHandlerActions
-    {
-    public:     // Abstract methods
-        /**
-         * Publishes the shortcut
-         */
-        virtual void IssuePublishShortcut() = 0;
-    };
-
-#endif      //  MPOPUPEVENTHANDLERACTIONS_H
-
-// End of file
--- a/idlefw/plugins/shortcutplugin/inc/taiscutparser.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,451 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser.
-*
-*/
-
-
-#ifndef TAISCUTPARSER_H
-#define TAISCUTPARSER_H
-#include <uri16.h>                  // For TUriParser16
-#include <AknsItemID.h> 
-
-// =============================================================================
-// ========================= Supported URI schemes =============================
-/** URI scheme for local application shortcuts */
-_LIT( KScutURISchemeLocalApp, "localapp" );
-
-/** URI sheme for normal web addresses */
-_LIT( KScutURISchemeHttp,     "http" );
-/**  URI sheme for secure web addresses */
-_LIT( KScutURISchemeHttps,    "https" );
-// =============================================================================
-
-// =============================================================================
-// ============= Application shortcut formatting literals ======================
-
-/** Literal to format an application shortcut without parameters */
-_LIT( KScutFormatApplication,                "localapp:0x%x" );
-
-/** Literal to format an application shortcut with parameter name and value */
-_LIT( KScutFormatApplicationWithParams,      "localapp:0x%x?%S=%S" );
-
-/** Literal to format an application shortcut with a single parameter string */
-_LIT( KScutFormatApplicationWithParamString, "localapp:0x%x?%S" );
-
-// =============================================================================
-
-// =============================================================================
-// ============ Shortcut parameter name and value literals =====================
-
-/** Parameter name for view ids */
-_LIT( KScutParamNameView,           "view" );
-
-/** Parameter name for remote mailboxes. Specific to messaging shortcuts */
-_LIT( KScutParamNameMailbox,        "mailbox" );
-
-/** Parameter name for new message and new email. Specific to messaging shortcuts */
-_LIT( KScutParamNameNew,            "new" );
-
-/** Parameter value for new message shortcuts. */
-_LIT( KScutParamValueMsg,           "msg" );
-
-/** Parameter value for new email shortcuts */
-_LIT( KScutParamValueEmail,         "email" );
-
-/** Parameter value for new syncml mail shortcuts */
-_LIT( KScutParamValueSyncMLMail,    "syncmlmail" );
-
-/** Parameter value for new postcard shortcuts */
-_LIT( KScutParamValuePostcard,      "postcard" );
-
-/** Parameter value for new audio message shortcuts */
-_LIT( KScutParamValueAudioMsg,      "audiomsg" );
-
-/** Parameter value for the connectivity status view shortcut */
-const TUid KScutParamValueConnectivityView = { 0x10207250 };
-
-/** Parameter name for enable keylock */
-_LIT( KScutParamNameOn,             "on" );
-
-/** Parameter name for missed calls view */
-_LIT( KScutParamValueMissedCalls,   "missed" );
-
-/** Parameter name for dialled calls view */
-_LIT( KScutParamValueDialledCalls,  "dialled" );
-
-/** Parameter name for received calls view */
-_LIT( KScutParamValueReceivedCalls, "received" );
-
-/** Parameter name for logs main view */
-_LIT( KScutParamValueMainView,      "counters" );
-
-/** Parameter name for bookmark ids */
-_LIT( KScutParamNameBookmark,       "bkm" );
-
-/** Parameter name for icon id in skin
-  Format localapp:0xUID?iconid=majorid;minorid;optionalColourGroup */   
-_LIT( KScutParamNameIconSkinId,       "iconid" );
-
-/** Parameter name for icon path. Left here for backward
-    compatibility.
-    Format localapp:0xUID?iconmifpath=mif_file.mif;index */
-_LIT( KScutParamNameIconMifPath,       "iconmifpath" );
-
-/** Parameter name for icon path. MBM and MIF supported
-    Format localapp:0xUID?iconmifpath=mif_file.mif;index */
-_LIT( KScutParamNameIconPath,       "iconpath" );
-/** Parameter name for custom URL title.
-    Format http://www.url.com?customtitle=Here is my great title */
-_LIT( KScutParamNameCustomTitle,       "customtitle" );
-/** Parameter name for CBA icon
-    Format localapp:0xUID?iconid=majorid;minorid;optionalColourGroup&cba=1 */   
-_LIT( KScutParamNameCBAIcon,       "cba" );
-
-/** Parameter name for toolbar icon */
-_LIT( KScutParamNameToolbarIcon,       "toolbar" );
-
-/** Shortcut definition parameter for "no effect" */
-_LIT( KScutParamNoEffect,           "noeffect" );
-
-// =============================================================================
-// =============================================================================
-// ============ Shortcut parameter name and value literals =====================
-
-/** Alias for messaging shortcuts */
-_LIT( KScutTargetAliasMessaging, "msg" );
-
-/** Alias for keylock shortcuts */
-_LIT( KScutTargetAliasKeylock,   "keylock" );
-
-/** Alias for logs shortcuts */
-_LIT( KScutTargetAliasLogs,      "logs" );
-
-/** Alias for voice dialer shortcuts */
-_LIT( KScutTargetAliasVoiceDial, "voicedial" );
-
-// =============================================================================
-/** Maximum length of shortcut definition. Used when composing a definition */
-const TInt KMaxDefinitionLength = 100;
-
-/** Shortcut parameter value separator character */
-const TText KParamValueSeparator = '=';
-
-/** Shortcut parameter next param separator */
-const TText KParamNextSeparator = '&';
-
-_LIT( KScutMIFExtension, ".mif" );  
-_LIT( KScutMBMExtension, ".mbm" );  
-_LIT( KScutSkinItemSeparator, ";" );
-
-/**
- * Shortcut definition components
- */
-enum TScutDefComponent
-{
-	EScutDefScheme,    
-	EScutDefTarget,        
-	EScutDefParamName,        
-	EScutDefParamValue,    
-	EScutDefParamNameAndValue,    
-	EScutDefComplete
-};
-
-/**
- * Shortcut types
- */
-enum TShortcutType
-{
-	EScutUnknown,
-	EScutAnyType = 0,
-	EScutNoEffect,
-	EScutApplication,
-	EScutApplicationView,
-	EScutApplicationWithParams,
-	EScutNewMessage,
-	EScutNewEmail,
-	EScutNewSyncMLMail,
-	EScutNewPostcard,
-	EScutNewAudioMsg,
-	EScutNewMsgType,
-	EScutMailbox,
-	EScutChangeTheme,
-	EScutWebAddress,
-	EScutBookmark,
-	EScutKeylock,
-	EScutLogsMissedCallsView,
-	EScutLogsDialledCallsView,
-	EScutLogsReceivedCallsView,
-	EScutLogsMainView,
-	EScutConnectivityStatusView,
-	EScutApplicationManagerView
-};
-
-/**
- * Icon type
- */
-enum TShortcutIconType
-{
-	EScutIconNone,
-	EScutIconSkin,
-    EScutIconMif,
-    EScutIconMbm
-};
-
-enum TShortcutIconDestination
-{
-	EScutDestinationNormal,
-	EScutDestinationSoftkey,
-	EScutDestinationToolbar
-};
-
-class TAiScutIcon
-{
-	public:
-        /**
-        * Index of the icon in icon file
-        */
-        TInt iIconId;
-
-        /**
-        * Path to the icon file
-        */
-		TFileName iPath;
-		 
-		/**
-		 * Skin item id of the icon
-		 */
-		TAknsItemID iSkinId;
-		
-		/**
-		 * Colour groups id in skin
-		 */
-		TInt iColourGroup;
-		
-		/**
-		 * Type of the icon. From skin or from mif
-		 */
-		TShortcutIconType iType;
-		
-		/**
-		 * AppUid that this icon belongs to
-		 */
-		TUid iAppUid;
-		
-		/**
-		 * Possible view id
-		 */
-		TUid iViewId;
-		
-		/**
-		 * Type of the shortcut
-		 */
-		TShortcutType iShortcutType;
-		
-		/**
-		 * Is this CBA specific icon
-		 */
-		TShortcutIconDestination iDestination;
-		
-};
-
-/**
- *  Shortcuf definition parser
- *
- *  @since S60 v3.2
- */
-class TAiScutParser
-{
-
-public:
-	TAiScutParser();
-	
-	/**
-	 * Static utility function to parse an uid from the given descriptor
-	 *
-	 * @since S60 v3.2
-	 * @param aString The String to parse
-	 * @return Parsed application uid
-	 */
-	 static TUid ParseUid( const TDesC& aDesC );
-	
-	/**
-	 * Parses a shortcut definition
-	 *
-	 * @since S60 v3.2
-	 * @param aDefinition Shortcut definition
-	 * @return System wide error code. KErrCorrupt if not recognized
-	 */
-	 TInt Parse( const TDesC& aDefinition );
-	
-	/**
-	 * Checks if the shortcut definition was valid
-	 *
-	 * @since S60 v3.2
-	 * @return ETrue if valid, EFalse if not
-	 */
-	 TBool IsValid() const;
-	
-	/**
-	 * Returns the shortcut target type
-	 *
-	 * @since S60 v3.2
-	 * @return Shortcut target type
-	 */
-	 TShortcutType Type() const;
-	 
-	/**
-	 * Returns the possible shortcut overriding icon 
-	 * that has been defined in the URL either with the format 
-	 *  localapp:0xUID?iconid=majorid;minorid;colourgroup
-	 * or
-	 *  localapp:0xUID?iconmifpath=mif_file.mif;index
-	 *
-	 * @since S60 v3.2
-	 * @return Shortcut icon override
-	 */
-	 TAiScutIcon Icon() const;
-	
-	/**
-	 * Returns the shortcut target uid. Used for application shortcuts
-	 *
-	 * @since S60 v3.2
-	 * @return Shortcut target uid
-	 */
-	 TUid Uid() const;
-	 
-	/**
-	 * Returns a shortcut definition component value
-	 *
-	 * @since S60 v3.2
-	 * @param aComponent Shortcut definition component
-	 * @return Pointer descriptor to component value
-	 */
-	 TPtrC Get( TScutDefComponent aComponent ) const;
-	 
-	/**
-	 * Composes a shortcut definition string from given parameters
-	 *
-	 * @since S60 v3.2
-	 * @param aDes On return, the shortcut definition. Transfers ownership
-	 * @param aUid Application uid
-	 * @param aParamName Parameter name
-	 * @param aParamValue Parameter value
-	 */
-	 void ComposeL( HBufC*& aDes, const TUid aUid,
-	 	const TDesC& aParamName, const TDesC& aParamValue );
-	
-	/**
-	 * Composes a shortcut definition string from given parameters
-	 *
-	 * @since S60 v3.2
-	 * @param aDes On return, the shortcut definition. Transfers ownership
-	 * @param aUid Application uid
-	 * @param aParamString Parameter string
-	 */
-	 void ComposeL( HBufC*& aDes, const TUid aUid,
-	 	const TDesC& aParamString );
-	 	
-    /**
-     * Creates a checksum for the given aDefinition. This is used
-     * in URL matching so that no string need to be stored. Checksum is 
-     * done checksum = positionInString * charValue
-     *
-     * @since S60 v3.2 
-     * @param aDefinition The definition to calculate the checksum from
-     * @return TInt The checksum
-     */
-    TInt ChecksumForString( const TDesC& aDefinition) const; 
-
-    /**
-     * Removes icon definitions from the given string. Icon definitions are
-     * KScutParamNameIconSkinId, KScutParamNameIconSkinPath, KScutParamNameCBAIcon
-     * KScutParamNameCustomTitle
-     * 
-     * @since S60 v3.2
-     */
-    void RemoveExtraDefinitionsL( TDes &aString ) const;
-    /**
-     * Parses the custom title from the current definition.
-     * Returns ETrue on success and places the extracted 
-     * custom title to the aTarget
-     * 
-     * @param aTarget Where to place the custom title. It is callers responsibility
-     *  to provide a descriptor with enough room for the custom title.
-     * 
-     * @return KErrNone if everything is fine, KErrNotFound
-     *  if there is no custom title in the definition, KErrNoMemory in
-     *  case there is not enough room to place the result (low memory situations
-     *  or too small descriptor provided)
-     */
-    TInt CustomTitle( TDes& aTarget ) const;
-
-protected:
-private:
-
-	/**
-	 * Checks if an alias was used in shortcut definition and parses an uid from it
-	 *
-	 * @since S60 v3.2
-	 * @return ETrue if alias was found and parsed, EFalse if not
-	 */
-	 TBool ParseAlias();
-	 
-	/**
-	 * Parses the possible application shortcut parameters
-	 *
-	 * @since S60 v3.2
-	 */
-	 void ParseParams();
-	 
-private:  // data
-	/**
-	 * URI Parser
-	 */
-	 TUriParser iUriParser;
-	 
-	/**
-	 * Pointer to the full shortcut definition
-	 */
-	 TPtrC iDefinition;
-	 
-	/**
-	 * Shortcut target type
-	 */
-	 TShortcutType iType;
-	 
-	/**
-	 * Shortcut application uid
-	 */
-	 TUid iUid;
-	 
-	 /**
-	  * Pointer to shortcut parameter name
-	  */
-	  TPtrC iParamName;
-	  
-	 /**
-	  * Pointer to shortcut parameter value
-	  */
-	  TPtrC iParamValue;
-	 /**
-	  * Shortcut icon that has been given with the
-	  * URL-string
-	  */
-	  TAiScutIcon iIcon;
-	  };
-	  
-#endif // TAISCUTPARSER_H
-
-// End of File.
\ No newline at end of file
--- a/idlefw/plugins/shortcutplugin/loc/ai3scutplugin.loc	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Localization strings for project aiscutplugin
-*
-*/
-
-
-// d: Header text for Information query pop-up window.
-// l: heading_pane_t1
-// w:
-// r: TB9.2
-//
-#define qtn_ai_sc_query_modify_header "Tip:"
-
-// d: message part in Information query pop-up window,
-// d: which informs the user where to set installed application as a shortcut in idle.
-// d: %U in the message is the application name
-// d: Path in the query text is a link.
-// l: popup_info_list_pane_t1
-// w:
-// r: TB9.2
-//
-#define qtn_ai_sc_query_modify_gs "%U can show additional information in Shortcut area. If you want to modify shortcuts select <AknMessageQuery Link>Options - Change shortcut settings</AknMessageQuery Link>"
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/loc/ai3scutsettings.loc	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2125 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Localization strings for project aiscutsettings
-*
-*/
-
-
-//d:Localized name of the plugin
-//d:
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_ai_set_cont_apps "Shortcuts"
-
-// d: Text in title pane
-// l: title_pane_t2/opt9
-// w:
-// r: 3.2
-//
-#define qtn_set_title_pers_shortcuts "Shortcuts"
-
-// d: Text of a list item in personalisation view's folder list
-// d: Item opens Shortcuts folder
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_pers_shortcuts "Shortcuts"
-
-// d: Application cannot be opened during Backup
-// l: popup_note_window
-// w:
-// r: 3.2
-//
-#define qtn_ai_scut_operation_disabled "Application cannot be opened during backup"
-
-// d: Shortcuts Item caption
-// d: Active Idle Shortcut Settings View
-// d: %N order number of the shortcut item
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_ai_set_myt_linkn "%N. Shortcut item"
-
-// d: Prompt text for type new URL data query
-// d: Active Idle Shortcut Settings View
-// l: popup_query_data_window
-// w:
-// r: 3.2
-//
-#define qtn_ai_shorts_type_url "Type URL"
-
-// d: Prompt text for edit URL data query
-// d: Active Idle Shortcut Settings View
-// l: popup_query_data_window
-// w:
-// r: 3.2
-//
-#define qtn_ai_shorts_edit_url "Edit URL"
-
-// d: Prompt text for change shortcut type query
-// d: Active Idle Shortcut Settings View
-// l: heading_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_sc_set_change_prompt "Change to:"
-
-// d: Application shortcut type choice item in change shortcut type query
-// d: Active Idle Shortcut Settings View
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_sc_set_change_apps "Application"
-
-// d: Bookmark shortcut type choice item in change shortcut type query
-// d: Active Idle Shortcut Settings View
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_sc_set_change_bookmark "Bookmark"
-
-// d: URL shortcut type choice item in change shortcut type query
-// d: Active Idle Shortcut Settings View
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_sc_set_change_url "Web address"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: User selects this item when she wants Scroll keys or Selection key
-// d: have no effect is Idle state.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_skeys_no_effect "No effect"
-
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Left idle softkey setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_left_idle_softkey "Left idle softkey"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Right idle softkey setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_right_idle_softkey "Right idle softkey"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Right Scroll key setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_right_scroll "Right Scroll key"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Left Scroll key setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_left_scroll "Left Scroll key"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Down Scroll key setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_down_scroll "Down Scroll key"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Up Scroll key setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_up_scroll "Up Scroll key"
-
-// d: Title of a list item shortcut setting view's setting list
-// d: Item opens Selection key setting page
-// l: list_setting_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_selec_key "Selection key"
-
-
-// d: Text for fixed item information note
-// d: Shown when user tries to change fixed shortcut in settings
-// l: popup_note_window
-// w:
-// r: 3.2
-//
-#define qtn_ai_set_app_note_fixed "Fixed item. Can't be changed"
-
-// d: Text for empty listbox item
-// d: Shown when there are no modifiable shortcuts in settings
-// l: main_list_empty_pane
-// w:
-// r: 3.2
-//
-#define qtn_ai_sc_set_all_fixed "(No editable shortcuts available in this Idle theme.)"
-
-// =====================================================================
-// App titles
-// =====================================================================
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_about_grid               "About"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_about_list               "About product"
-
-// d: Focused application name on idle shortcut plugin tooltip.
-// l: popup_ai_links_title_window_t1
-// w:
-// r: 5.0
-//
-#define qtn_app_caption_string           "Application Manager"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_am_gs                    "App. manage"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_am_skey                  "AppMngr"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_am                   "AppMngr"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.1
-//
-#define qtn_apps_menu_gs                  "Menu"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_menu_skey                "Menu"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_menu                 "Menu"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_blid_grid                "Navigator"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_blid_list                "Navigator"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_blid_gs                  "Navigator"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_blid_skey                "Navigator"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_blid                 "Navigator"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_bluetooth_grid           "Bluetooth"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_bluetooth_list           "Bluetooth"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_bluetooth_gs             "Bluetooth"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_bluetooth_skey           "Bluetooth"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_bluetooth            "Bluetooth"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_browserng_grid           "Web"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_browserng_list           "Web"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.1
-//
-#define qtn_apps_services_gs_new          "WAP services"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_services_skey_new        "Services"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_services_new         "Services"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_oper_url             "%U"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_calculator_grid          "Calculator"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_calculator_list          "Calculator"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_calculator_gs            "Calculator"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_calculator_skey          "Calculat."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_calculator           "Calculat."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_calendar_grid            "Calendar"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_calendar_list            "Calendar"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_calendar_gs              "Calendar"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_calendar_skey            "Calendar"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_calendar             "Calendar"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_ccor_grid                "Camcorder"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_ccor_list                "Camcorder"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_ccor_gs                  "Camcorder"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_ccor_skey                "Camcorder"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_ccor                 "Camcorder"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_dict_grid                "Dictionary"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_dict_list                "Dictionary"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_dict_gs                  "Dictionary"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_dict_skey                "Dictionary"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_dict                 "Dictionary"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_clock_grid               "Clock"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_clock_list               "Clock"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_clock_gs                 "Clock"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_clock_skey               "Clock"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_clock                "Clock"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_cmon_grid                "Conn. Manager"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_cmon_list                "Conn. Manager"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_cmon_gs                  "Conn. manager"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_cmon_skey                "Conn. m."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_cmon                 "Conn. m."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_cnv_app_caption_short         "Converter"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_cnv_app_caption               "Converter"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_converter_gs             "Converter"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_converter_skey           "Convert."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_converter            "Convert."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_dm_grid                  "Device Manager"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_dm_list                  "Device Manager"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.6
-//
-#define qtn_apps_dm_gs                    "Device manager"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.6
-//
-#define qtn_apps_dm_skey                  "Dev. mgr."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_dm                   "Dev. mgr."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_drm_grid                 "Rights Mgr"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_drm_list                 "Rights Manager"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_drm_gs                   "Rights manager"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_drm_skey                 "DRM Mgr"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_drm                  "DRM Mgr"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_fax_modem_grid           "Modem"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_fax_modem_list           "Modem"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_fax_modem_gs             "Modem"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_fax_modem_skey           "Modem"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_fax_modem            "Modem"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_fmgr_grid                "File manager"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_fmgr_list                "File manager"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_fmgr_gs                  "File manager"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_fmgr_skey                "File manager"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_fmgr                 "File Manager"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_radio_grid               "Radio"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_radio_list               "Radio"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_radio_gs                 "Radio"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.7
-//
-#define qtn_apps_radio_skey               "Radio"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_radio                "Radio"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.7
-//
-#define qtn_fmtx_idle_sk                   "FM Tx sk"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_fmtx_idle_msk                  "FM Tx msk"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_settings_grid            "Settings"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_settings_list            "Settings"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_settings_gs              "Settings"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_settings_skey            "Settings"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_gs                   "Settings"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 5.0
-//
-#define qtn_apps_controlpanel_grid        "Control Panel"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 5.0
-//
-#define qtn_apps_controlpanel_list        "Control Panel"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 5.0
-//
-#define qtn_apps_controlpanel_gs          "Control Panel"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 5.0
-//
-#define qtn_apps_controlpanel_skey        "Control Panel"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 5.0
-//
-#define qtn_msk_idle_controlpanel         "Control Panel"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_help_grid                "Help"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_help_list                "Help"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_help_gs                  "Help"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_help_skey                "Help"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_help                 "Help"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_infrared_grid            "Infrared"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_infrared_list            "Infrared"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_infrared_gs              "Infrared"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_infrared_skey            "Infrared"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_infrared             "Infrared"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_instant_grid             "Chat"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_instant_list             "Chat"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_instant_gs               "Chat"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_instant_skey             "Chat"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_instant              "Chat"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_udict_grid               "User dict."
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_udict_list               "User dictionary"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_udict_gs                 "User dictionary"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_udict_skey               "User dict."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_udict                "User dict."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_lm_grid                  "Landmarks"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_lm_list                  "Landmarks"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_lm_gs                    "Landmarks"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_lm_skey                  "Landmarks"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_lm                   "Landmarks"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_logs_grid                "Log"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_logs_list                "Log"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_logs_gs                  "Log"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_logs_skey                "Log"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_logs                 "Log"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mg_grid                  "Gallery"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mg_list                  "Gallery"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_mg_gs                    "Gallery"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_mg_skey                  "Gallery"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mg                   "Gallery"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mp_grid                  "Media Player"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mp_list                  "Media Player"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_mp_gs                    "Media Player"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_mp_skey                  "Media Player"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mp                   "Media Player"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_memc_appl_grid           "Memory"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_memc_appl_list           "Memory card"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_mmc_gs                   "Memory Card"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_mmc_skey                 "Memory c..."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mmc                  "Memory c..."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_messaging_grid           "Messages"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_messaging_list           "Messages"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_messaging_gs             "Messages"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_messaging_skey           "Messag."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_messaging            "Messag."
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_set_idle_skey_new_message     "New message"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// d: User is prompted to write SMS, MMS or Email if the softkey is pressed.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_idle_skey_new_message         "New msg."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_new_message          "New msg."
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special New Message shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_skey_new_msg         "New message"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// d: User is prompted to new message if the softkey is pressed.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_idle_skey_new_msg             "New message"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_new_msg              "New message"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_set_idle_skeys_sms_editor     "New SMS"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_sms_skey                 "New SMS"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_sms                  "New SMS"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_set_idle_skeys_mms_editor     "New MMS"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_mms_skey                 "New MMS"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mms                  "New MMS"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special Select message type shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_skey_select_msg_type "Select msg type"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// d: User is prompted to Select message if the softkey is pressed.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_idle_skey_select_msg          "Select msg"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_select_msg           "Select msg"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special New Email shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_set_idle_skeys_email_editor   "New Email"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_email_skey               "New Email"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_email                "New Email"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special New MMS Postcard shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mmspostcard_gs           "New MMS postcard"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_mmspostcard_skey         "New MMS postcard"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mmspostcard          "New MMS postcard"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special New SyncML mail shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_syncml_mail_gs           "New SyncML mail"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_syncml_mail_skey         "New SyncML mail"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_syncml_mail          "New SyncML mail"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special New Audio message shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_audio_msg_gs             "New audio message"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1u
-//
-#define qtn_apps_audio_msg_skey           "New audio msg"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_audio_msg            "New audio msg"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mplayer_grid             "Music player"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mplayer_list             "Music player"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_mplayer_gs               "Music player"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_mplayer_skey             "Music"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mplayer              "Music"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_notepad_grid             "Notepad"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_notepad_list             "Notepad"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_notepad_gs               "Notepad"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_notepad_skey             "Notepad"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_notepad              "Notepad"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_notepad_newnote_gs       "New note"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.2
-//
-#define qtn_apps_notepad_newnote_skey     "New note"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_notepad_newnote      "New note"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_skins_grid               "Skins"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_skins_list               "Skins"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_skins_gs                 "Skins"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_skins_skey               "Skins"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_skins                "Skins"
-
-// d: Text of a list item in shortcut setting view's application list.
-// d: Caption for the special Change Theme shortcut
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_idle_skin_gs             "Idle theme"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.2
-//
-#define qtn_apps_idle_skin_skey           "Idle theme"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_skin                 "Idle theme"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_phone_grid               "Telephone"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_phone_list               "Telephone"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_phonebook_grid           "Contacts"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_phonebook_list           "Contacts"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_phonebook_gs             "Contacts"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_phonebook_skey           "Contacts"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_phonebook            "Contacts"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mode_grid                "Profiles"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_mode_list                "Profiles"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_mode_gs                  "Profiles"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_mode_skey                "Profiles"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_mode                 "Profiles"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_ptt_grid                 "PTT"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_ptt_list                 "Pust to talk"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_ptt_gs                   "Push to talk"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.2
-//
-#define qtn_apps_ptt_skey                 "PTT"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_ptt                  "PTT"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_search_grid              "Search"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_search_list              "Search"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_search_gs                "Search"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.2
-//
-#define qtn_apps_search_skey              "Search"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_search               "Search"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_simapps_grid             "SIM services"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_simapps_list             "SIM services"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_sd_grid                  "Speed dial"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_sd_list                  "Speed dial"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_sd_gs                    "Speed dial"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_sd_skey                  "Sp. dials"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_sd                   "Sp. dials"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_usb_grid                 "USB"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_usb_list                 "USB"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_usb_gs                   "USB"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_usb_skey                 "USB"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_usb                  "USB"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_vc_grid                  "Voice Commands"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_vc_list                  "Voice Commands"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_vc_gs                    "Voice Commands"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_vc_skey                  "Voice Commands"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_vc                   "Voice Commands"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_smsvo_grid               "Voice mail"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_smsvo_list               "Voice mailbox"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_smsvo_gs                 "Voice mailbox"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_smsvo_skey               "Voice m."
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_smsvo                "Voice m."
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_voip_grid                "Voice over IP"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_voip_list                "Voice over IP"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 3.0
-//
-#define qtn_apps_voip_gs                  "Voice over IP"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.0
-//
-#define qtn_apps_voip_skey                "Voice over IP"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_voip                 "Voice over IP"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_vorec_app_menu_grid           "Recorder"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_vorec_app_menu_list           "Recorder"
-
-// d: Text of a list item in shortcut setting view's application list.
-// l: list_set_graphic_pane_t1
-// w:
-// r: 2.8
-//
-#define qtn_apps_recorder_gs              "Recorder"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 2.8
-//
-#define qtn_apps_recorder_skey            "Recorder"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 3.2
-//
-#define qtn_msk_idle_recorder             "Recorder"
-
-// d: Application name in the App Shell grid.
-// l: cell_app_pane_t1
-// w:
-// r: 3.2
-//
-#define qtn_apps_sml_grid                 "Sync"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1_cp2
-// w:
-// r: 3.2
-//
-#define qtn_apps_sml_list                 "Sync"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_video_grid               "Vid.Services"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_operatormenu_skey        "Oper. menu"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_fplayer_skey             "Flash Player"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 3.1
-//
-#define qtn_apps_exchangemail_skey        "Exh. mail"
-
-// d: Application name in the App Shell list.
-// l: list_single_large_graphic_pane_t1
-// w:
-// r: 5.0
-//
-#define qtn_apps_connectivity_list             "Connectivity"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as Left or Right idle softkey.
-// l: control_pane_t1/opt7
-// w:
-// r: 5.0
-//
-#define qtn_apps_connectivity_skey             "Connectivity"
-
-// d: User can personalize idle softkeys to be other application from general settings.
-// d: The text is shown as middle softkey.
-// l: control_pane_t3/opt7
-// w:
-// r: 5.0
-//
-#define qtn_msk_idle_connectivity              "Connectivity"
-
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/rom/aiscutplugin.iby	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Image description file for project aiscutplugin
-*
-*/
-
-
-#ifndef AISCUTPLUGIN_IBY
-#define AISCUTPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-// Shortcut plugin
-data=DATAZ_\BITMAP_DIR\aiscutplugin.mif BITMAP_DIR\aiscutplugin.mif
-ECOM_PLUGIN( aiscutplugin.dll, aiscutplugin.rsc )
-
-// Shortcut settings plugin
-ECOM_PLUGIN( aiscutsettings.dll, aiscutsettings.rsc )
-
-file=ABI_DIR\BUILD_DIR\aiscutextserv.dll       SHARED_LIB_DIR\aiscutextserv.dll
-
-// Central repository file, temporarily here
-//data=\S60\ActiveIdle2\plugins\shortcutplugin\src\10275104.txt "private\10202BE9\10275104.txt"
-
-data=ZPRIVATE\102750F9\backup_registration.xml  private\102750F9\backup_registration.xml
-
-#endif // AISCUTPLUGIN_IBY
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/rom/aiscutplugin_resources.iby	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Image description file for project aiscutplugin localizable resources
-*
-*/
-
-
-#ifndef AISCUTPLUGIN_RESOURCES_IBY
-#define AISCUTPLUGIN_RESOURCES_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-// Shortcut settings plugin localizable resources
-data=DATAZ_\RESOURCE_FILES_DIR\aiscutsettingsres.rsc  RESOURCE_FILES_DIR\aiscutsettingsres.rsc
-data=DATAZ_\RESOURCE_FILES_DIR\aiscuttexts.rsc        RESOURCE_FILES_DIR\aiscuttexts.rsc
-data=DATAZ_\RESOURCE_FILES_DIR\aiscutpluginres.rsc    RESOURCE_FILES_DIR\aiscutpluginres.rsc
-
-#endif // AISCUTPLUGIN_RESOURCES_IBY
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/GenPopupFSM.py	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,350 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-'''
-Finite State Machine generator for Symbian OS projects.
-
-Just define fsmName, actionsIfaceName and stt and the script generates the
-needed files for you.
-
-The files are:
-- State Machine header file (including state classes, overwrites the existing file)
-- State Machine source file (including state classes, overwrites the existing file)
-- Actions interface header (abstract M-class, overwrites the existing file)
-- Header file for tracing (will be generated only if missing)
-
-
-Version 1: 22-Jun-2006, Jaakko Vuori, Initial version
-Version 2: 26-Jun-2006, Jaakko Vuori, Added argument passing
-Version 3: 27-Jun-2006, Jaakko Vuori, Changed state classes nested in FSM class
-
-'''
-from sets import Set
-import os, re, string
-
-#------------------------------------------------------------------------
-#State machine name
-fsmName = "Popup"
-
-#Actions interface name
-actionsIfaceName = "PopupFSMActions"
-
-#State transition table
-stt=[   #source state       #event                            #dest state         #actions
-        ("NotSetOffFocus",  [
-                            ("HandleUpdate()",                "SetOffFocus",      ["IssueCleanCaption()"]),
-                            ("HandleGotFocus()",              "NotSetOnFocus",    []),
-                            ("HandleForeground()",            "NotSetOffFocus",   ["IssuePublishCaption()"]),
-                            ]),    
-
-        ("SetOffFocus",     [
-                            ("HandleGotFocus()",              "GettingFocus",     ["StartShortTimer()"]),
-                            ("HandleReset()",                 "NotSetOffFocus",   ["IssuePublishCaption()"]),
-                            ]),    
-
-        ("GettingFocus",    [
-                            ("HandleRequestCompleted()",      "Visible",          ["IssuePublishPopup()", "StartLongTimer()"]),
-                            ("HandleReset()",                 "NotSetOnFocus",    ["IssuePublishCaption()", "CancelRequest()"]),
-                            ("HandleLostFocus()",             "SetOffFocus",      ["CancelRequest()"]),
-                            ]),    
-                            
-        ("LosingFocus",     [
-                            ("HandleRequestCompleted()",      "SetOffFocus",      ["IssueCleanPopup()"]),
-                            ("HandleReset()",                 "NotSetOffFocus",   ["IssuePublishCaption()", "CancelRequest()"]),
-                            ("HandleGotFocus()",              "Visible",          ["CancelRequest()", "StartLongTimer()"]),
-                            ]),
-                            
-        ("NotSetOnFocus",   [
-                            ("HandleUpdate()",                "Visible",          ["IssueCleanCaption()", "IssuePublishPopup()", "StartLongTimer()"]),
-                            ("HandleLostFocus()",             "NotSetOffFocus",   []),
-                            ("HandleBackground()",            "BackgroundNotSetOnFocus", []),
-                            ("HandleForeground()",            "NotSetOnFocus",    ["IssuePublishCaption()"]),
-                            ]),    
-                                                        
-        ("Visible",         [
-                            ("HandleUpdate()",                "Visible",              ["IssueCleanCaption()", "IssuePublishPopup()", "StartLongTimer()"]),
-                            ("HandleReset()",                 "NotSetOnFocus",        ["IssuePublishCaption()", "IssueCleanPopup()", "CancelRequest()"]),
-                            ("HandleLostFocus()",             "LosingFocus",          ["CancelRequest()", "CompleteSelf()"]),
-                            ("HandleRequestCompleted()",      "NotVisible",           ["IssueCleanPopup()"]),
-                            ("HandleBackground()",            "BackgroundSetOnFocus", ["CancelRequest()", "IssueCleanPopup()"]),
-                            ]),
-                            
-        ("NotVisible",      [
-                            ("HandleUpdate()",                "Visible",          ["IssueCleanCaption()", "IssuePublishPopup()", "StartLongTimer()"]),
-                            ("HandleReset()",                 "NotSetOnFocus",    ["IssuePublishCaption()"]),
-                            ("HandleLostFocus()",             "SetOffFocus",      []),
-                            ]),
-
-        ("BackgroundNotSetOnFocus",      [
-                            ("HandleForeground()",            "NotSetOnFocus",        ["IssuePublishCaption()"]),
-                            ("HandleUpdate()",                "BackgroundSetOnFocus", ["IssueCleanCaption()"]),
-                            ]),
-
-        ("BackgroundSetOnFocus",      [
-                            ("HandleReset()",                 "BackgroundNotSetOnFocus",        ["IssuePublishCaption()"]),
-                            ("HandleForeground()",            "Visible",                        ["IssuePublishPopup()", "StartLongTimer()"]),
-                            ]),
-
-    ]
-#------------------------------------------------------------------------    
-
-def write( s ):
-    f.write( s + '\n' )
-
-def writeHeader():
-    global f
-    fname = '%sFSM.h' % (fsmName)
-    print "Generating %s..." % (fname)
-    f = open( fname, 'w' )
-
-    write( "#ifndef %sFSM_H" % ( fsmName.upper() ) )
-    write( "#define %sFSM_H" % ( fsmName.upper() ) )
-    write( "" )
-    write( "//  EXTERNAL INCLUDES" )
-    write( "#include <e32base.h>" )
-    write( "" )
-    write( "//  FORWARD DECLARATIONS" )
-    write( "class T%sFSM;" % (fsmName) )
-    write( "class M%s;" % (actionsIfaceName) )
-    write( "" )
-    write( "//  CLASS DEFINITIONS" )
-
-    write( "/**" )
-    write( " * %s state machine" % (fsmName) )
-    write( " */" )
-    write( "class T%sFSM" % (fsmName) )
-    write( "    {" )
-
-    write( "    /**" )
-    write( "     * Base class for states" )
-    write( "     */" )
-    write( "    class T%sStateBase" % (fsmName) )
-    write( "        {" )
-    write( "        public:     // New methods" )
-    
-    events=[]
-    for s in stt:
-        for e in s[1]:
-            events.append( e[0] )    
-    for event in Set(events):
-        fname, args = re.match('(.*?)[(](.*?)[)]',event).groups()
-        if len(args)>0:
-            write( "            virtual void %s( T%sFSM* a%sFSM, M%s& a%s,%s);" % (fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName,args) )
-        else:
-            write( "            virtual void %s( T%sFSM* a%sFSM, M%s& a%s );" % (fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName) )
-        
-        
-    write( "        };" )
-    write( "" )
-    
-    for s in stt:
-        write( "    /**" )
-        write( "     * State class T%s" % (s[0]) )
-        write( "     */" )    
-        write( "    class T%s : public T%sStateBase" % (s[0],fsmName) )
-        write( "        {" )
-        write( "        protected:  // Methods derived from T%sState" % (fsmName))
-        for event in s[1]:        
-            fname, args = re.match('(.*?)[(](.*?)[)]',event[0]).groups()
-            if len(args)>0:
-                write( "            void %s( T%sFSM* a%sFSM, M%s& a%s,%s);" % (fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName,args) )
-            else:
-                write( "            void %s( T%sFSM* a%sFSM, M%s& a%s );" % (fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName) )
-            
-        write( "        };" )
-        write( "" )
-
-    write( "" )
-    write( "    public:    // Constructors" )
-    write( "        T%sFSM( M%s& a%s );" % (fsmName,actionsIfaceName,actionsIfaceName))
-    write( "" )
-    write( "    public:     // New methods" )
-    for event in Set(events):            
-        write( "        void %s;" % (event))
-    write( "" )
-    write( "    private:     // New methods" )
-    write( "        void SetState( T%sStateBase* aNewState );" % (fsmName) )
-    write( "" )
-    write( "    private:    // Data" )
-    write( "        //Ref:" )
-    write( "        T%sStateBase* iCurrentState;" % (fsmName))
-    write( "        M%s& i%s;" % (actionsIfaceName,actionsIfaceName))
-    write( "" )
-    write( "        //Own:" )
-    for s in stt:
-        write( "        T%s i%s;" % (s[0],s[0]))
-
-    write( "    private:    // Friend class definitions" )
-    for s in stt:
-        write( "        friend class T%s;" % (s[0]))
-        
-    write( "    };" )
-    write( "" )
-    write( "#endif      //  %sFSM_H" % (fsmName.upper()) )
-    write( "" )
-    write( "// End of file" )
-    f.close()
-
-
-def writeSource():
-    global f
-    fname = '%sFSM.cpp' % (fsmName)
-    print "Generating %s..." % (fname)    
-    f = open( fname, 'w' )
-
-    write( '#include "%sFSM.h"' % (fsmName) )
-    write( '#include "M%s.h"' % (actionsIfaceName) )
-    write( '#include "%sTrace.h"' % (fsmName) )
-    write( '' )
-    write( '#pragma warning( disable:4100 )' )    
-    write( '#pragma warning( disable:4068 )' )        
-    write( '#pragma warn_unusedarg off' )    
-    
-    write( '' )
-    write( 'T%sFSM::T%sFSM( M%s& a%s ) : ' % (fsmName,fsmName,actionsIfaceName,actionsIfaceName) )
-    write( '    iCurrentState( &i%s ),' % (stt[0][0]) )
-    write( '    i%s( a%s )' % (actionsIfaceName,actionsIfaceName) )
-    write( '    {' )
-    write( '    }' )
-    write( '' )
-    
-    events=[]
-    for s in stt:
-        for e in s[1]:
-            events.append( e[0] )    
-            
-    for event in Set(events):                
-        fname, args = re.match('(.*?)[(](.*?)[)]',event).groups()
-        if len(args)>0:
-            write( 'void T%sFSM::T%sStateBase::%s( T%sFSM* /*a%sFSM*/, M%s& /*a%s*/,%s )' % (fsmName,fsmName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName,args))
-        else:
-            write( 'void T%sFSM::T%sStateBase::%s( T%sFSM* /*a%sFSM*/, M%s& /*a%s*/ )' % (fsmName,fsmName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName))
-        write( '    {' )        
-        write( '    TRACE( _L("T%sStateBase::%s") );' % (fsmName,event))
-        write( '    }' )
-        write( '' )
-
-    for event in Set(events):                
-        fname, args = re.match('(.*?)[(](.*?)[)]',event).groups()
-        write( 'void T%sFSM::%s(%s)' % (fsmName,fname,args) )
-        write( '    {' )
-        arglist=args.split(',')
-        argnames = string.join([arg.split()[-1:][0] for arg in arglist if arg!=""], ', ')
-        if len(argnames)>0:
-            write( '    iCurrentState->%s( this, i%s, %s );' % (fname,actionsIfaceName,argnames) )
-        else:
-            write( '    iCurrentState->%s( this, i%s );' % (fname,actionsIfaceName) )
-        write( '    }' )
-        write( '' )
-
-    write( 'void T%sFSM::SetState( T%sStateBase* aNewState )' % (fsmName,fsmName) )
-    write( '    {' )
-    write( '    iCurrentState = aNewState;' )
-    write( '    }' )
-    write( '' )
-
-    for s in stt:
-        stateName, events = s
-        for event in events:
-            eventName = event[0]
-            destState = event[1]
-            actions = event[2]
-            fname, args = re.match('(.*?)[(](.*?)[)]',eventName).groups()
-            if len(actions)>0:                
-                if len(args)>0:
-                    write( 'void T%sFSM::T%s::%s( T%sFSM* a%sFSM, M%s& a%s,%s )' % (fsmName,stateName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName,args) )
-                else:
-                    write( 'void T%sFSM::T%s::%s( T%sFSM* a%sFSM, M%s& a%s )' % (fsmName,stateName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName) )
-            else:
-                if len(args)>0:
-                    write( 'void T%sFSM::T%s::%s( T%sFSM* a%sFSM, M%s& /*a%s*/,%s )' % (fsmName,stateName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName,args) )
-                else:
-                    write( 'void T%sFSM::T%s::%s( T%sFSM* a%sFSM, M%s& /*a%s*/ )' % (fsmName,stateName,fname,fsmName,fsmName,actionsIfaceName,actionsIfaceName) )
-            
-            write( '    {' )
-            write( '    TRACE( _L("T%s::%s") );' % (stateName, eventName) )
-            write( '    a%sFSM->SetState( &a%sFSM->i%s );' % (fsmName,fsmName,destState) )
-            for action in actions:
-                fname, args = re.match('(.*?)[(](.*?)[)]',action).groups()
-                if len(args)>0:
-                    arglist=args.split(',')                
-                    argnames = string.join([arg.split()[-1:][0] for arg in arglist if arg!=""], ', ')
-                    write( '    a%s.%s( %s );' % (actionsIfaceName,fname,argnames) )
-                else:
-                    write( '    a%s.%s();' % (actionsIfaceName,fname) )
-            write( '    }' )
-            write( '' )
-        
-    write( '// End of file' )
-
-
-def writeTraceHeader():
-    if not os.path.isfile( '%sTrace.h' % (fsmName) ):
-        global f
-        fname = '%sTrace.h' % (fsmName)
-        print "Generating %s..." % (fname)            
-        f = open( fname, 'w' )
-        write( '#ifndef %sTRACE_H' % (fsmName.upper()) )
-        write( '#define %sTRACE_H' % (fsmName.upper()) )
-        write( '' )
-        write( '//  MACROS' )
-        write( '#define TRACE' )
-        write( '' )
-        write( '#endif      //  %sTRACE_H' % (fsmName.upper()) )
-        write( '' )
-        write( '// End of file' )
-        f.close()
-
-
-def writeActionsIface():
-    global f
-    fname = 'M%s.h' % (actionsIfaceName)
-    print "Generating %s..." % (fname)            
-    f = open( fname, 'w' )
-
-    write( '#ifndef M%s_H' % (actionsIfaceName.upper()) )
-    write( '#define M%s_H' % (actionsIfaceName.upper()) )
-    write( '' )
-    write( '//  EXTERNAL INCLUDES' )
-    write( '#include <e32def.h>' )
-    write( '' )
-    write( '//  CLASS DEFINITION' )
-    write( '/**' )
-    write( ' * M%s actions.' % (actionsIfaceName) )
-    write( ' * Note: This file has been generated automatically. Do not edit!' )
-    write( ' */' )
-    write( 'class M%s' % (actionsIfaceName) )
-    write( '    {' )
-    write( '    public:     // Abstract methods' )
-
-    actions=[]
-    for s in stt:
-        for e in s[1]:
-            actions.extend( e[2] )    
-    for action in Set(actions):
-        write( '        virtual void %s = 0;' % (action))
-    write( '    };' )
-    write( '' )
-    write( '#endif      //  M%s_H' % (actionsIfaceName.upper()) )
-    write( '' )
-    write( '// End of file' )
-    f.close()
-    
-if __name__ == "__main__":
-    writeHeader()
-    writeSource()
-    writeTraceHeader()
-    writeActionsIface()
--- a/idlefw/plugins/shortcutplugin/src/MPopupFSMActions.h	Tue Feb 02 00:23:10 2010 +0200
+++ /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 MPOPUPFSMACTIONS_H
-#define MPOPUPFSMACTIONS_H
-
-//  EXTERNAL INCLUDES
-#include <e32def.h>
-
-//  CLASS DEFINITION
-/**
- * MPopupFSMActions actions.
- * Note: This file has been generated automatically. Do not edit!
- */
-class MPopupFSMActions
-    {
-    public:     // Abstract methods
-        virtual void StartLongTimer() = 0;
-        virtual void IssueCleanPopup() = 0;
-        virtual void IssuePublishPopup() = 0;
-        virtual void IssuePublishCaption() = 0;
-        virtual void IssueCleanCaption() = 0;
-        virtual void StartShortTimer() = 0;
-        virtual void CompleteSelf() = 0;
-        virtual void CancelRequest() = 0;
-    };
-
-#endif      //  MPOPUPFSMACTIONS_H
-
-// End of file
--- a/idlefw/plugins/shortcutplugin/src/PopupFSM.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "PopupFSM.h"
-#include "MPopupFSMActions.h"
-#include "PopupTrace.h"
-
-#pragma warning( disable:4100 )
-#pragma warning( disable:4068 )
-#pragma warn_unusedarg off
-
-TPopupFSM::TPopupFSM( MPopupFSMActions& aPopupFSMActions ) : 
-    iCurrentState( &iNotSetOffFocus ),
-    iPopupFSMActions( aPopupFSMActions )
-    {
-    }
-
-void TPopupFSM::TPopupStateBase::HandleForeground( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleForeground()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleUpdate( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleUpdate()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleRequestCompleted( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleRequestCompleted()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleReset( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleReset()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleBackground( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleBackground()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleGotFocus( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleGotFocus()") );
-    }
-
-void TPopupFSM::TPopupStateBase::HandleLostFocus( TPopupFSM* /*aPopupFSM*/, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TPopupStateBase::HandleLostFocus()") );
-    }
-
-void TPopupFSM::HandleForeground()
-    {
-    iCurrentState->HandleForeground( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleUpdate()
-    {
-    iCurrentState->HandleUpdate( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleRequestCompleted()
-    {
-    iCurrentState->HandleRequestCompleted( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleReset()
-    {
-    iCurrentState->HandleReset( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleBackground()
-    {
-    iCurrentState->HandleBackground( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleGotFocus()
-    {
-    iCurrentState->HandleGotFocus( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::HandleLostFocus()
-    {
-    iCurrentState->HandleLostFocus( this, iPopupFSMActions );
-    }
-
-void TPopupFSM::SetState( TPopupStateBase* aNewState )
-    {
-    iCurrentState = aNewState;
-    }
-
-void TPopupFSM::TNotSetOffFocus::HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotSetOffFocus::HandleUpdate()") );
-    aPopupFSM->SetState( &aPopupFSM->iSetOffFocus );
-    aPopupFSMActions.IssueCleanCaption();
-    }
-
-void TPopupFSM::TNotSetOffFocus::HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TNotSetOffFocus::HandleGotFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    }
-
-void TPopupFSM::TNotSetOffFocus::HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotSetOffFocus::HandleForeground()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOffFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TSetOffFocus::HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TSetOffFocus::HandleGotFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iGettingFocus );
-    aPopupFSMActions.StartShortTimer();
-    }
-
-void TPopupFSM::TSetOffFocus::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TSetOffFocus::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOffFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TGettingFocus::HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TGettingFocus::HandleRequestCompleted()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.IssuePublishPopup();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-void TPopupFSM::TGettingFocus::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TGettingFocus::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    aPopupFSMActions.CancelRequest();
-    }
-
-void TPopupFSM::TGettingFocus::HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TGettingFocus::HandleLostFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iSetOffFocus );
-    aPopupFSMActions.CancelRequest();
-    }
-
-void TPopupFSM::TLosingFocus::HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TLosingFocus::HandleRequestCompleted()") );
-    aPopupFSM->SetState( &aPopupFSM->iSetOffFocus );
-    aPopupFSMActions.IssueCleanPopup();
-    }
-
-void TPopupFSM::TLosingFocus::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TLosingFocus::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOffFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    aPopupFSMActions.CancelRequest();
-    }
-
-void TPopupFSM::TLosingFocus::HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TLosingFocus::HandleGotFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.CancelRequest();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-void TPopupFSM::TNotSetOnFocus::HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotSetOnFocus::HandleUpdate()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.IssueCleanCaption();
-    aPopupFSMActions.IssuePublishPopup();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-void TPopupFSM::TNotSetOnFocus::HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TNotSetOnFocus::HandleLostFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOffFocus );
-    }
-
-void TPopupFSM::TNotSetOnFocus::HandleBackground( TPopupFSM* aPopupFSM, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TNotSetOnFocus::HandleBackground()") );
-    aPopupFSM->SetState( &aPopupFSM->iBackgroundNotSetOnFocus );
-    }
-
-void TPopupFSM::TNotSetOnFocus::HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotSetOnFocus::HandleForeground()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TVisible::HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TVisible::HandleUpdate()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.IssueCleanCaption();
-    aPopupFSMActions.IssuePublishPopup();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-void TPopupFSM::TVisible::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TVisible::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    aPopupFSMActions.IssueCleanPopup();
-    aPopupFSMActions.CancelRequest();
-    }
-
-void TPopupFSM::TVisible::HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TVisible::HandleLostFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iLosingFocus );
-    aPopupFSMActions.CancelRequest();
-    aPopupFSMActions.CompleteSelf();
-    }
-
-void TPopupFSM::TVisible::HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TVisible::HandleRequestCompleted()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotVisible );
-    aPopupFSMActions.IssueCleanPopup();
-    }
-
-void TPopupFSM::TVisible::HandleBackground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TVisible::HandleBackground()") );
-    aPopupFSM->SetState( &aPopupFSM->iBackgroundSetOnFocus );
-    aPopupFSMActions.CancelRequest();
-    aPopupFSMActions.IssueCleanPopup();
-    }
-
-void TPopupFSM::TNotVisible::HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotVisible::HandleUpdate()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.IssueCleanCaption();
-    aPopupFSMActions.IssuePublishPopup();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-void TPopupFSM::TNotVisible::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TNotVisible::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TNotVisible::HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& /*aPopupFSMActions*/ )
-    {
-    TRACE( _L("TNotVisible::HandleLostFocus()") );
-    aPopupFSM->SetState( &aPopupFSM->iSetOffFocus );
-    }
-
-void TPopupFSM::TBackgroundNotSetOnFocus::HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TBackgroundNotSetOnFocus::HandleForeground()") );
-    aPopupFSM->SetState( &aPopupFSM->iNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TBackgroundNotSetOnFocus::HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TBackgroundNotSetOnFocus::HandleUpdate()") );
-    aPopupFSM->SetState( &aPopupFSM->iBackgroundSetOnFocus );
-    aPopupFSMActions.IssueCleanCaption();
-    }
-
-void TPopupFSM::TBackgroundSetOnFocus::HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TBackgroundSetOnFocus::HandleReset()") );
-    aPopupFSM->SetState( &aPopupFSM->iBackgroundNotSetOnFocus );
-    aPopupFSMActions.IssuePublishCaption();
-    }
-
-void TPopupFSM::TBackgroundSetOnFocus::HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions )
-    {
-    TRACE( _L("TBackgroundSetOnFocus::HandleForeground()") );
-    aPopupFSM->SetState( &aPopupFSM->iVisible );
-    aPopupFSMActions.IssuePublishPopup();
-    aPopupFSMActions.StartLongTimer();
-    }
-
-// End of file
--- a/idlefw/plugins/shortcutplugin/src/PopupFSM.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef POPUPFSM_H
-#define POPUPFSM_H
-
-//  EXTERNAL INCLUDES
-#include <e32base.h>
-
-//  FORWARD DECLARATIONS
-class TPopupFSM;
-class MPopupFSMActions;
-
-//  CLASS DEFINITIONS
-/**
- * Popup state machine
- */
-class TPopupFSM
-    {
-    /**
-     * Base class for states
-     */
-    class TPopupStateBase
-        {
-        public:     // New methods
-            virtual void HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleBackground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            virtual void HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TNotSetOffFocus
-     */
-    class TNotSetOffFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TSetOffFocus
-     */
-    class TSetOffFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TGettingFocus
-     */
-    class TGettingFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TLosingFocus
-     */
-    class TLosingFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleGotFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TNotSetOnFocus
-     */
-    class TNotSetOnFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleBackground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TVisible
-     */
-    class TVisible : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleRequestCompleted( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleBackground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TNotVisible
-     */
-    class TNotVisible : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleLostFocus( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TBackgroundNotSetOnFocus
-     */
-    class TBackgroundNotSetOnFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleUpdate( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-    /**
-     * State class TBackgroundSetOnFocus
-     */
-    class TBackgroundSetOnFocus : public TPopupStateBase
-        {
-        protected:  // Methods derived from TPopupState
-            void HandleReset( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-            void HandleForeground( TPopupFSM* aPopupFSM, MPopupFSMActions& aPopupFSMActions );
-        };
-
-
-    public:    // Constructors
-        TPopupFSM( MPopupFSMActions& aPopupFSMActions );
-
-    public:     // New methods
-        void HandleForeground();
-        void HandleUpdate();
-        void HandleRequestCompleted();
-        void HandleReset();
-        void HandleBackground();
-        void HandleGotFocus();
-        void HandleLostFocus();
-
-    private:     // New methods
-        void SetState( TPopupStateBase* aNewState );
-
-    private:    // Data
-        //Ref:
-        TPopupStateBase* iCurrentState;
-        MPopupFSMActions& iPopupFSMActions;
-
-        //Own:
-        TNotSetOffFocus iNotSetOffFocus;
-        TSetOffFocus iSetOffFocus;
-        TGettingFocus iGettingFocus;
-        TLosingFocus iLosingFocus;
-        TNotSetOnFocus iNotSetOnFocus;
-        TVisible iVisible;
-        TNotVisible iNotVisible;
-        TBackgroundNotSetOnFocus iBackgroundNotSetOnFocus;
-        TBackgroundSetOnFocus iBackgroundSetOnFocus;
-    private:    // Friend class definitions
-        friend class TNotSetOffFocus;
-        friend class TSetOffFocus;
-        friend class TGettingFocus;
-        friend class TLosingFocus;
-        friend class TNotSetOnFocus;
-        friend class TVisible;
-        friend class TNotVisible;
-        friend class TBackgroundNotSetOnFocus;
-        friend class TBackgroundSetOnFocus;
-    };
-
-#endif      //  POPUPFSM_H
-
-// End of file
--- a/idlefw/plugins/shortcutplugin/src/PopupTrace.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef POPUPTRACE_H
-#define POPUPTRACE_H
-
-//  MACROS
-#define TRACE
-
-#endif      //  POPUPTRACE_H
-
-// End of file
--- a/idlefw/plugins/shortcutplugin/src/aidefaultshortcut.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Platform default shortcuts.
-*
-*/
-
-
-#include "aidefaultshortcut.h"
-#include "taiscutparser.h"
-#include <centralrepository.h>
-#include <activeidle2domaincrkeys.h>
-#include <e32base.h>
-#include <libc/stddef.h>  // For wchar_t
-
-namespace {
-
-       struct TDefaultShortcut
-           {
-           /**
-            * Identifier
-            */
-           TInt id;
-
-           /**
-            * Key to identify this shortcut
-            */
-           TInt key;
-
-           /**
-            * Definition for this shortcut
-            */
-           const wchar_t* definition;
-           };
-       
-       enum TDefaultShortcutCenrepId
-           {
-           EDefaultShortcutFirst = 0,
-           EDefaultShortcutSecond,
-           EDefaultShortcutThird,
-           EDefaultShortcutFourth,
-           EDefaultShortcutFifth,
-           EDefaultShortcutSixth,
-           EDefaultShortcutSeventh,
-           EDefaultShortcutEighth,
-           EDefaultShortcutNaviLeft,
-           EDefaultShortcutNaviRight,
-           EDefaultShortcutNaviUp,
-           EDefaultShortcutNaviDown,
-           EDefaultShortcutNaviKey,
-           EDefaultShortcutLSK,
-           EDefaultShortcutRSK
-           };
-       
- // Platform default shortcuts.
-       const TDefaultShortcut KDefaultShortcuts[] =
-       {
-       { EDefaultShortcutFirst,     0x00000001, L"localapp:0x101F4CCE" },               // Phonebook,
-       { EDefaultShortcutSecond,    0x00000002, L"localapp:0x100058C5" },               // Messaging,
-       { EDefaultShortcutThird,     0x00000003, L"localapp:0x10008D39" },               // Browser,
-       { EDefaultShortcutFourth,    0x00000004, L"localapp:0x200009EE" },               // Photos,
-       { EDefaultShortcutFifth,     0x00000005, L"localapp:0x10005901" },               // Calendar,
-       { EDefaultShortcutSixth,     0x00000006, L"localapp:msg?new=msg" },              // New message,
-       { EDefaultShortcutSeventh,   0x00000007, L"localapp:0x102072C3" },               // Music Player,
-       { EDefaultShortcutEighth,    0x00000008, L"localapp:0x10207A89" },               // Radio,
-       { EDefaultShortcutNaviLeft,  0x01000000, L"localapp:0x100058C5?new=msg" },       // New message,
-       { EDefaultShortcutNaviRight, 0x01000001, L"localapp:0x10005901" },                // Calendar,
-       { EDefaultShortcutNaviUp,    0x01000002, L"localapp:0x101F4CCE" },               // Contacts,
-       { EDefaultShortcutNaviDown,  0x01000003, L"localapp:0x101F4CCE" },                // Contacts,
-       { EDefaultShortcutNaviKey,   0x01000004, L"localapp:0x100058C5" },               // Messagind,
-       { EDefaultShortcutLSK,       0x01000100, L"localapp:0x101F4CD2" },                // Menu,
-       { EDefaultShortcutRSK,       0x01000101, L"localapp:0x101F4CCE" }                // Contacts,
-       };
-       
-       const TInt KDefaultShortcutCount = (sizeof(KDefaultShortcuts)/sizeof(KDefaultShortcuts[0])); 
-}
-
-inline TPtrC16 DefaultDefinition( const TDefaultShortcut& aShortcut )
-    {
-    return TPtrC16( (const TText16*) aShortcut.definition );
-    }
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void GetPlatformDefaultShortcut(TInt aIndex, TUid& aUid, TDes& aDefinition)
-    {
-    TInt err = KErrNone;
-    TAiScutParser parser;
-    if (aIndex < 0)
-        {
-        aIndex = 0;
-        }
-
-    aIndex = aIndex % ::KDefaultShortcutCount;
-    aDefinition.Copy( ::DefaultDefinition(::KDefaultShortcuts[aIndex]) );
-
-    err = parser.Parse( aDefinition );
-    if ( err == KErrNone )
-        {
-        aUid = TAiScutParser::ParseUid( parser.Get( EScutDefTarget) );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt ResolveCenrepIdFromKey( TInt aKey, TInt &aCenrepId )
-    {
-    TInt ret = KErrNotFound;
-    for ( TInt i = 0; i < KDefaultShortcutCount; ++i )
-        {
-        if ( KDefaultShortcuts[i].key == aKey )
-            {            
-            aCenrepId = KDefaultShortcuts[i].id;
-            ret = KErrNone;
-            break;
-            }
-        }
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void TAiDefaultShortcut::GetDefaultShortcut(TInt aKey, TUid& aUid, TDes& aDefinition)
-{
-    CRepository *cr = NULL;
-    TInt err = KErrNone;
-    TInt index = KErrNotFound;
-    err = ::ResolveCenrepIdFromKey( aKey, index );
-    TInt32 crIndex = KAIBackupShortcutDefinitionStart;
-    if ( err == KErrNone )
-        {
-        TRAP( err, cr = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) ) );
-
-        aUid.iUid = KErrNotFound;
-        if ( err == KErrNone )
-            {
-            crIndex += index;
-            err = cr->Get( crIndex, aDefinition );
-            // In case of a null definition use the platform default
-            if ( aDefinition.Length() <= 0 )
-                {
-                err = KErrNotFound;
-                }            
-            else if ( err == KErrNone )
-                {
-                TAiScutParser parser;
-                err = parser.Parse( aDefinition );
-                if ( err == KErrNone )
-                    {
-                    aUid = TAiScutParser::ParseUid( parser.Get( EScutDefTarget) );
-                    }
-                }               
-            }           
-        }
-        
-    // Ensure that some definition is returned
-    // in case of any error occurrs
-    if ( err != KErrNone )
-        {
-        ::GetPlatformDefaultShortcut( index, aUid, aDefinition );
-        }    
-    delete cr;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutappuidparser.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser
-*
-*/
-
-
-#include "aiscutappuidparser.h"
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// TAiScutAppUidParser::TAiScutAppUidParser
-// ---------------------------------------------------------------------------
-//
-TAiScutAppUidParser::TAiScutAppUidParser(const TDesC& aData, RArray<TUid>& aUidArray)
-    :
-    iUidArray(aUidArray),
-    iLex(aData),
-    iLexIsValid(EFalse)
-{
-}
-
-// ---------------------------------------------------------------------------
-// TAiScutAppUidParser::SkipChar
-// ---------------------------------------------------------------------------
-//
-void TAiScutAppUidParser::SkipChar(TChar aChar, TBool aConditionalSkip)
-{
-    iLex.SkipSpaceAndMark();
-    if (iLex.Peek() == aChar)
-    {
-        iLex.Inc();
-    }
-    else
-    {
-        // If not conditional skip, then the input data is invalid
-        if (!aConditionalSkip)
-        {
-            iLexIsValid = EFalse;
-        }
-    }
-    iLex.SkipSpaceAndMark();
-}
-
-// ---------------------------------------------------------------------------
-// TAiScutAppUidParser::ReadAppUid
-// ---------------------------------------------------------------------------
-//
-TUid TAiScutAppUidParser::ReadAppUid()
-{
-    TUint32 appUid;
-
-    iLex.Mark();
-    while (iLex.Peek().IsHexDigit())
-    {
-        iLex.Inc();
-    }
-    TPtrC uidToken = iLex.MarkedToken();
-    TLex uidLex(uidToken);
-    if (uidLex.Val(appUid, EHex) != KErrNone)
-    {
-        iLexIsValid = EFalse;
-    }
-
-    return TUid::Uid(appUid);
-}
-
-// ---------------------------------------------------------------------------
-// TAiScutAppUidParser::ParseL
-// ---------------------------------------------------------------------------
-//
-void TAiScutAppUidParser::ParseL()
-{
-    iLexIsValid = ETrue;
-
-    while (!iLex.Eos() && iLexIsValid)
-    {
-        SkipChar(',', ETrue);
-        TUid applicationUid = ReadAppUid();
-
-        if (iLexIsValid)
-        {
-            iUidArray.AppendL(TUid(applicationUid));
-        }
-    }
-}
-
-// End of File
--- a/idlefw/plugins/shortcutplugin/src/aiscutextserv.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AI Shortcut xSP Extension API
-*
-*/
-
-
-#include <e32base.h>
-#include <s32mem.h>
-#include <gulicon.h>
-#include <fbs.h>
-
-#include <aiscutextserv.h>
-#include <aiscutextdefs.h>
-
-// ======== LOCAL DEFINITIONS ========
-
-namespace
-    {
-    //  LOCAL CONSTANTS
-    /**
-     * Default message slots
-     */
-    const TUint KDefaultMessageSlots = 4;
-
-    /**
-     * Marshalling buffer expand size
-     */
-    const TInt KBufExpandSize = 32;
-
-    /**
-     * Target string format that matches with aiscutplugin
-     */
-    _LIT( KTargetStringFormat, "localapp:0x%x" );
-
-    //  LOCAL TYPES
-    typedef TBuf<19> TTargetString;
-
-    //  LOCAL FUNCTIONS
-    /**
-     * Panics server
-     * @aReason Panic reason code
-     */
-    void Panic( TInt aReason )
-        {
-        User::Panic( KAiScutExtServerName, aReason );
-        }
-
-    /**
-     * Generates target string from Uid3 of current process
-     */
-    TTargetString DefaultTargetString()
-        {
-        TUid uid3 = RProcess().Type()[ 2 ];
-        TTargetString targetString;
-        targetString.Format( KTargetStringFormat, uid3 );
-        return targetString;
-        }
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::Connect()
-    {
-    return Connect( DefaultTargetString() );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::Connect( const TDesC& aTargetDefinition )
-    {
-    TInt err = CreateSession( KAiScutExtServerName, Version(),
-        KDefaultMessageSlots );
-    if( err == KErrNone )
-        {
-        TIpcArgs args( &aTargetDefinition );
-        err = SendReceive( EAiScutExtServSetTargetDefinition, args );
-        if( err != KErrNone )
-            {
-            Close();
-            }
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TVersion RAiScutExtServ::Version() const
-    {
-    return( TVersion(
-        KAiScutExtServMajorVersionNumber,
-        KAiScutExtServMinorVersionNumber,
-        KAiScutExtServBuildVersionNumber ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::UpdatePopupTextL(
-    const MDesCArray& aPopupTextLines )
-    {
-    TInt lineCount = aPopupTextLines.MdcaCount();
-    __ASSERT_ALWAYS( lineCount <= KMaxPopupTextLines, Panic( KErrArgument ) );
-    CBufBase* lineArrayBuf = CBufFlat::NewL( KBufExpandSize );
-    CleanupStack::PushL( lineArrayBuf );
-
-    RBufWriteStream stream( *lineArrayBuf );
-
-    stream.WriteUint8L( lineCount );
-    for( TInt i = 0; i < lineCount; i++ )
-        {
-        stream << aPopupTextLines.MdcaPoint( i );
-        }
-
-    TPtr8 lineArray = lineArrayBuf->Ptr( 0 );
-
-    TIpcArgs args( &lineArray );
-    TInt err = SendReceive( EAiScutExtServSetPopupText, args );
-
-    CleanupStack::PopAndDestroy( lineArrayBuf );
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::ResetPopupText()
-    {
-    return SendReceive( EAiScutExtServResetPopupText );
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::UpdateIconL( const CGulIcon& aIcon )
-    {
-    CBufBase* marshallBuf = CBufFlat::NewL( KBufExpandSize );
-    CleanupStack::PushL( marshallBuf );
-
-    RBufWriteStream stream( *marshallBuf );
-
-    aIcon.Bitmap()->ExternalizeL( stream );
-    aIcon.Mask()->ExternalizeL( stream );
-
-    TPtr8 marshalledData = marshallBuf->Ptr( 0 );
-
-    TIpcArgs args( &marshalledData );
-    TInt err = SendReceive( EAiScutExtServSetIcon, args );
-
-    CleanupStack::PopAndDestroy( marshallBuf );
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::ResetIcon()
-    {
-    return SendReceive( EAiScutExtServResetIcon );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::IsInShortcuts( TBool& aIsInShortcuts ) const
-    {
-    TPtr8 isInShortcutsDes(
-        reinterpret_cast< TUint8* >( &aIsInShortcuts ),
-        sizeof( aIsInShortcuts ),
-        sizeof( aIsInShortcuts ) );
-
-    TIpcArgs args( &isInShortcutsDes );
-
-    return SendReceive( EAiScutExtServIsInShortcuts, args );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RAiScutExtServ::IssuePutInShortcuts()
-    {
-    return SendReceive( EAiScutExtServIssuePutInShortcuts );
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutfactory.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in factory class.
-*
-*/
-
-
-#include "aiscutfactory.h"
-#include "caiscutengine.h"
-#include "caiscutshortcut.h"
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngine* AiScutFactory::CreateAiScutEngineL( CAiScutPlugin& aPlugin )
-    {
-    return CAiScutEngine::NewL( aPlugin );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* AiScutFactory::CreateAiScutShortcutL( TInt aId,
-    const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    return CAiScutShortcut::NewL( aId, aTarget, aEngine );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* AiScutFactory::CreateAiScutShortcutLC( TInt aId,
-    const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    return CAiScutShortcut::NewLC( aId, aTarget, aEngine );
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutfactoryext.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in factory class.
-*
-*/
-
-
-#include "aiscutfactory.h"
-#include "caiscutengineext.h"
-#include "caiscutshortcutext.h"
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngine* AiScutFactory::CreateAiScutEngineL( CAiScutPlugin& aPlugin )
-    {
-    return CAiScutEngineExt::NewL( aPlugin );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* AiScutFactory::CreateAiScutShortcutL( TInt aId,
-    const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    return CAiScutShortcutExt::NewL( aId, aTarget, aEngine );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* AiScutFactory::CreateAiScutShortcutLC( TInt aId,
-    const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    return CAiScutShortcutExt::NewLC( aId, aTarget, aEngine );
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM plug-in resource file.
-*
-*/
-
-
-#include <ecom/registryinfov2.rh>
-
-#include <platform/mw/aiscutuids.hrh>
-
-// ---------------------------------------------------------------------------
-// registry_info
-//
-// ---------------------------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO registry_info
-{
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-
-    dll_uid = AI_UID_ECOM_DLL_CONTENTPUBLISHER_SCUTPLUGIN;
-
-    // Interface info array.
-    interfaces =
-    {
-        INTERFACE_INFO
-        {
-            // UID of the implemented interface.
-            interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER;
-
-            implementations =
-            {
-                IMPLEMENTATION_INFO
-                {
-                    implementation_uid  =  AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SCUTPLUGIN;
-                    version_no          =  1;
-                    display_name        =  "Shortcut Plug-in";
-                    default_data        =  "";
-                    opaque_data         =  "";
-                }
-            };
-        }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutpluginres.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Resource definitions for Shortcut plug-in settings
-*
-*/
-
-
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-
-#include <ai3scutplugin.loc>
-
-NAME SCPL
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="SCPL"; }
-
-//----------------------------------------------------
-// EIK_APP_INFO
-// Contains application information.
-//----------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-{
-}
-
-// ----------------------------------------------------------------------------
-//
-// %U application can show additional information in Shortcut area..."
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_ai_sc_query_modify_gs
-    {
-    buf = qtn_ai_sc_query_modify_gs;
-    }
-
-//----------------------------------------------------------
-// r_scut_xsptip_note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_scut_xsptip_note
-{
-    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
-    items =
-    {
-        DLG_LINE
-        {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-            {
-                label = qtn_ai_sc_query_modify_header;
-                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
-                // headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
-            };
-        },
-        DLG_LINE
-        {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-            {
-            };
-        }
-    };
-}  
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutrepositorywatcher.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser
-*
-*/
-
-
-#include "aiscutrepositorywatcher.h"
-#include <centralrepository.h>      // For CRepository
-
-
-
-CAiScutRepositoryWatcher* CAiScutRepositoryWatcher::NewL(
-    const TUid aUid,
-    const TUint32 aKey,
-    CCenRepNotifyHandler::TCenRepKeyType aKeyType,
-    TCallBack aCallBack,
-    CRepository* aRepository)
-{
-    CAiScutRepositoryWatcher* self =
-        new (ELeave) CAiScutRepositoryWatcher(aUid, aKey, aCallBack, aRepository);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aKeyType);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-CAiScutRepositoryWatcher* CAiScutRepositoryWatcher::NewL(
-    const TUid aUid,
-    TCallBack aCallBack,
-    CRepository* aRepository)
-{
-    CAiScutRepositoryWatcher* self =
-        new (ELeave) CAiScutRepositoryWatcher(
-            aUid,
-            NCentralRepositoryConstants::KInvalidNotificationId,
-            aCallBack,
-            aRepository);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-CAiScutRepositoryWatcher::~CAiScutRepositoryWatcher()
-{
-    if (iNotifyHandler)
-    {
-        iNotifyHandler->StopListening();
-        delete iNotifyHandler;
-    }
-}
-
-CAiScutRepositoryWatcher::CAiScutRepositoryWatcher(
-    const TUid aUid,
-    const TUint32 aKey,
-    TCallBack aCallBack,
-    CRepository* aRepository)
-:
-iUid(aUid), iKey(aKey), iCallBack(aCallBack), iRepository(aRepository)
-{
-}
-
-void CAiScutRepositoryWatcher::ConstructL(
-    CCenRepNotifyHandler::TCenRepKeyType aKeyType)
-{
-    iNotifyHandler = CCenRepNotifyHandler::NewL(
-        *this, *iRepository, aKeyType, iKey);
-}
-
-void CAiScutRepositoryWatcher::ConstructL()
-{
-    iNotifyHandler = CCenRepNotifyHandler::NewL(*this, *iRepository);
-}
-
-void CAiScutRepositoryWatcher::StartListeningL()
-{
-    if (iNotifyHandler)
-    {
-        iNotifyHandler->StartListeningL();
-    }
-}
-
-void CAiScutRepositoryWatcher::StopListening()
-{
-    if (iNotifyHandler)
-    {
-        iNotifyHandler->StopListening();
-    }
-}
-
-TUint32 CAiScutRepositoryWatcher::ChangedKey()
-{
-    return iChangedKey;
-}
-
-void CAiScutRepositoryWatcher::HandleNotifyInt(TUint32 aKey, TInt /*aNewValue*/)
-{
-    iChangedKey = aKey;
-    iCallBack.CallBack();
-    iChangedKey = NCentralRepositoryConstants::KInvalidNotificationId;
-}
-
-void CAiScutRepositoryWatcher::HandleNotifyString(
-    TUint32 aKey, const TDesC16& /*aNewValue*/)
-{
-    iChangedKey = aKey;
-    iCallBack.CallBack();
-    iChangedKey = NCentralRepositoryConstants::KInvalidNotificationId;
-}
-
-void CAiScutRepositoryWatcher::HandleNotifyGeneric(TUint32 aKey)
-{
-    iChangedKey = aKey;
-    iCallBack.CallBack();
-    iChangedKey = NCentralRepositoryConstants::KInvalidNotificationId;
-}
-
-void CAiScutRepositoryWatcher::HandleNotifyError(
-    TUint32 /*aKey*/, TInt /*aError*/, CCenRepNotifyHandler* /*aHandler*/)
-{
-}
-
-// End of File
--- a/idlefw/plugins/shortcutplugin/src/aiscutsettings.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM plug-in resource file
-*
-*/
-
-
-#include <ecom/registryinfov2.rh>
-
-#include <platform/mw/aiscutuids.hrh>
-
-// ---------------------------------------------------------------------------
-// registry_info
-//
-// ---------------------------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO registry_info
-{
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-
-    dll_uid = AI_UID_ECOM_DLL_SETTINGS_SCUTPLUGIN;
-
-    // Interface info array.
-    interfaces =
-    {
-        INTERFACE_INFO
-        {
-            // UID of the implemented interface.
-            interface_uid = 0x10207236; 
-
-            implementations =
-            {
-                IMPLEMENTATION_INFO
-                {
-                    implementation_uid  =  AI_UID_ECOM_IMPLEMENTATION_SETTINGS_SCUTPLUGIN;
-                    version_no          =  1;
-                    display_name        =  "Shortcuts";
-                    default_data        =  "0x1020723B"; // Parent UID (PrslnPlugin)
-                    opaque_data         =  "-1"; // Order number
-                }
-            };
-        }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscutsettingsres.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,443 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Resource definitions for Shortcut plug-in settings
-*
-*/
-
-
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <eikcore.rsg>
-#include <eikon.rsg>
-#include <appinfo.rh>
-#include <avkon.loc>
-#include <data_caging_paths_strings.hrh>
-#include <gscommon.rh>
-#include <gs.loc>
-
-#include <ai3scutsettings.loc>
-
-#include "aiscutsettings.hrh"
-
-
-NAME SCSE
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="SCSE"; }
-
-//----------------------------------------------------
-// EIK_APP_INFO
-// Contains application information.
-//----------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-{
-}
-
-//----------------------------------------------------
-// r_scutsettings_menubar
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_scutsettings_menubar
-{
-    titles =
-    {
-        MENU_TITLE { menu_pane = r_scutsettings_menupane; }
-    };
-}
-
-//----------------------------------------------------
-// r_scutsettings_menupane
-// Options menu.
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_scutsettings_menupane
-{
-    items =
-    {
-        MENU_ITEM
-        {
-            command = EAiScutSettingsCmdChange;
-            txt     = qtn_options_change;
-        }
-
-#ifdef __SERIES60_HELP
-        ,
-        MENU_ITEM
-        {
-            command = EAknCmdHelp;
-            txt     = qtn_options_help;
-        }
-#endif  // __SERIES60_HELP
-        ,
-        MENU_ITEM
-        {
-            command = EAknCmdExit;
-            txt     = qtn_options_exit;
-        }
-    };
-}
-
-//----------------------------------------------------
-// r_scut_settings_view
-// Settings views.
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_scut_settings_view
-{
-    menubar = r_scutsettings_menubar;
-    //cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
-    cba = r_scut_softkeys_options_back_change;
-}
-
-//----------------------------------------------------
-// r_setting_listbox
-// Common listbox editor resource for setting pages.
-//----------------------------------------------------
-//
-RESOURCE LISTBOX r_setting_listbox
-{
-    flags = EEikListBoxMultipleSelection;
-}
-
-//----------------------------------------------------
-// r_scut_settings_applist_page
-// Selection key idle softkey setting page.
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_scut_settings_applist_page
-{
-    number = EAknSettingPageNoOrdinalDisplayed;
-    //    label = qtn_set_idle_selec_key;
-    // note: default cba resource is ok_cancel_select
-    //softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
-    type = EAknSetListBox;
-    editor_resource_id = r_setting_listbox;
-}
-
-//----------------------------------------------------------
-// r_scut_type_url_page
-// Setting page editing an url.
-//----------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_scut_type_url_page
-{
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    number= EAknSettingPageNoOrdinalDisplayed;
-    label= qtn_ai_shorts_type_url;
-    type = EEikCtEdwin;
-    editor_resource_id = r_scut_url_editor;
-}
-
-//----------------------------------------------------------
-// r_scut_edit_url_page
-// Setting page editing an url.
-//----------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_scut_edit_url_page
-{
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    number= EAknSettingPageNoOrdinalDisplayed;
-    label= qtn_ai_shorts_edit_url;
-    type = EEikCtEdwin;
-    editor_resource_id = r_scut_url_editor;
-}
-
-//----------------------------------------------------------
-// r_scut_url_editor
-// URL editor.
-//----------------------------------------------------------
-//
-RESOURCE EDWIN r_scut_url_editor
-{
-    width = 10;
-    lines = 2;
-    maxlength = 1000;
-    numeric_keymap = EAknEditorCalculatorNumberModeKeymap;
-    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorTextInputMode;
-    special_character_table = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG;
-    default_case = EAknEditorLowerCase;
-    flags = EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks;
-    avkon_flags = EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly;
-}
-
-//----------------------------------------------------
-// r_scut_change_to_page
-// "Change To" setting page.
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_scut_change_to_page_lbx
-{
-    items =
-    {
-        LBUF { txt = qtn_sc_set_change_apps;     },
-        LBUF { txt = qtn_sc_set_change_bookmark; }
-        
-        // Only this menu option disabled.
-        // The implementation of url functionality still exists in code, 
-        // even though this option has been decided to remove due to better
-        // usability. Affects lots of code if removed entirely.
-        /*,
-        LBUF { txt = qtn_sc_set_change_url;    }*/
-    };
-}
-
-//----------------------------------------------------
-// r_scut_listquery_change_to_page
-// "Change To" setting page.
-//----------------------------------------------------
-//
-RESOURCE AVKON_LIST_QUERY r_scut_listquery_change_to_page
-{
-    softkeys=R_AVKON_SOFTKEYS_SELECT_CANCEL;
-    items =
-    {
-        AVKON_LIST_QUERY_DLG_LINE
-        {
-            control = AVKON_LIST_QUERY_CONTROL
-            {
-                listtype = EAknCtSinglePopupMenuListBox;
-                heading = qtn_sc_set_change_prompt;
-                listbox = AVKON_LIST_QUERY_LIST
-                {
-                    // array of items will be defined dynamically
-                };
-            };
-        }
-    };
-}
-
-//----------------------------------------------------------
-// r_scut_wait_note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_scut_wait_note
-{
-    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items=
-    {
-        DLG_LINE
-        {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control= AVKON_NOTE
-            {
-                layout = EWaitLayout;
-                singular_label = qtn_gen_note_opening;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-            };
-        }
-    };
-}
-
-//----------------------------------------------------
-// r_scut_settings_view_caption
-// View caption for plug-in. max 256
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_view_caption
-{
-    buf = qtn_set_pers_shortcuts;
-}
-
-//----------------------------------------------------
-// r_scut_settings_view_title
-// View title.
-//----------------------------------------------------
-//
-RESOURCE TITLE_PANE r_scut_settings_view_title
-{
-    txt = qtn_set_title_pers_shortcuts;
-}
-
-//----------------------------------------------------
-//  r_ai_settings_txt_fixed_item
-//  Text used in information note when attempting
-//  to change a read-only shortcut
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_txt_fixed_item
-{
-    buf = qtn_ai_set_app_note_fixed;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_txt_all_fixed
-//  Text for empty listbox item
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_txt_all_fixed
-{
-    buf = qtn_ai_sc_set_all_fixed;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_txt_linkn
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_txt_linkn
-{
-    buf = qtn_ai_set_myt_linkn;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_softkey_left
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_softkey_left
-{
-    buf = qtn_set_left_idle_softkey;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_softkey_right
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_softkey_right
-{
-    buf = qtn_set_right_idle_softkey;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_scroll_left
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_scroll_left
-{
-    buf = qtn_set_idle_left_scroll;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_scroll_right
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_scroll_right
-{
-    buf = qtn_set_idle_right_scroll;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_scroll_up
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_scroll_up
-{
-    buf = qtn_set_idle_up_scroll;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_scroll_down
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_scroll_down
-{
-    buf = qtn_set_idle_down_scroll;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_selection_key
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_selection_key
-{
-    buf = qtn_set_idle_selec_key;
-}
-
-// -----------------------------------------------------------------------------
-//  r_scut_settings_no_effect
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_no_effect
-{
-    buf = qtn_set_idle_skeys_no_effect;
-}
-
-// -----------------------------------------------------------------------------
-//  r_scut_msk_edit
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_scut_msk_edit
-{
-    buf = qtn_msk_edit;
-}
-
-// -----------------------------------------------------------------------------
-//  r_scut_msk_change
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_scut_msk_change
-{
-    buf = qtn_msk_change;
-}
-
-/*
-//----------------------------------------------------
-//  r_scut_settings_key_press
-//
-//----------------------------------------------------
-//
-//RESOURCE TBUF r_scut_settings_key_press
-//    {
-//    buf = qtn_ai_shorts_key_press;
-//    }
-
-*/
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_scut_softkeys_options_back_change
-{
-    buttons =
-    {
-        CBA_BUTTON {id = EAknSoftkeyOptions;       txt = text_softkey_option; },
-        CBA_BUTTON {id = EAknSoftkeyBack;          txt = text_softkey_back;   },
-        CBA_BUTTON {id = EAiScutSettingsCmdChange; txt = qtn_msk_change;      }
-    };
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_scut_softkeys_options_exit_change
-{
-    buttons =
-    {
-        CBA_BUTTON {id = EAknSoftkeyOptions;       txt = text_softkey_option; },
-        CBA_BUTTON {id = EAknSoftkeyExit;          txt = text_softkey_exit;   },
-        CBA_BUTTON {id = EAiScutSettingsCmdChange; txt = qtn_msk_change;      }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscuttargetshutter.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-#include <apgtask.h>        //TApaTask
-#include <apgcli.h>         //RApaLsSession
-
-#include "aiscuttargetshutter.h"
-#include "aiscutdefs.h"
-#include "debug.h"
-
-#include <AknSgcc.h>
-
-const TUid KMenuUID3 = { 0x101F4CD2 }; 
-
-const TInt KTaskExistsDelay = 1500000; //1.5 second
-const TInt KTaskNotExistsDelay = 500000; //0.5 second
-const TInt KMaxNumberOfTries = 3;
-
-
-// ======== MEMBER FUNCTIONS ========
-
-CAiScutTargetShutter::CAiScutTargetShutter(CCoeEnv* aEnv, TUid aAppUid)
-    : CActive(CActive::EPriorityLow)
-    , iEnv(aEnv)
-    , iAppUid(aAppUid)
-{
-    CActiveScheduler::Add(this);
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetShutter::~CAiScutTargetShutter()
-{
-    if (iPeriodic)
-    {
-        iPeriodic->Cancel();
-        delete iPeriodic;
-    }
-
-    iWsSession.Close();
-    Cancel();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetShutter::ConstructL(TBool aIsRunning, TBool aIsDialog)
-{
-    iIsRunning = aIsRunning;
-    iIsDialog = aIsDialog;
-    iTaskExists = EFalse;
-    iTaskKilled = EFalse;
-    iCounter = 0;
-    iPeriodic = CPeriodic::NewL(CActive::EPriorityLow);
-    User::LeaveIfError(iWsSession.Connect());
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetShutter* CAiScutTargetShutter::NewL(CCoeEnv* aEnv, TUid aAppUid, TBool aIsRunning, TBool aIsDialog)
-{
-    CAiScutTargetShutter* self = new (ELeave) CAiScutTargetShutter(aEnv, aAppUid);
-    CleanupStack::PushL(self);
-    self->ConstructL(aIsRunning, aIsDialog);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetShutter::StartL()
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutTargetShutter::Start() app uid=0x%x"), iAppUid.iUid);
-	
-
-    TApaTaskList taskList(iWsSession);
-    TApaTask idleTask(taskList.FindApp(KScutActiveIdleUid));
-
-    if ( idleTask.Exists() && iIsRunning)
-    {
-        if ( iIsDialog )
-            {
-            TKeyEvent keyEvent;
-            keyEvent.iCode = EKeyEscape;
-            keyEvent.iModifiers = 0;
-            keyEvent.iRepeats = 0;
-            iEnv->SimulateKeyEventL(keyEvent, EEventKey);            
-            }
-        //idleTask.BringToForeground();
-        CAknSgcClient::MoveApp(idleTask.WgId(), ESgcMoveAppToForeground);
-        iTaskExists = ETrue;               
-		__PRINTS( "XAI:   exists and running");
-
-    }
-    else
-    {
-        TKeyEvent keyEvent;
-        keyEvent.iCode = EKeyEscape;
-        keyEvent.iModifiers = 0;
-        keyEvent.iRepeats = 0;
-        iEnv->SimulateKeyEventL(keyEvent, EEventKey);
-
-        // bring active idle to foreground
-        TApaTask idleTask(taskList.FindApp(KScutActiveIdleUid));
-        if (idleTask.Exists())
-        {
-			__PRINTS("XAI:   idle to foreground");
-            //idleTask.BringToForeground();
-            CAknSgcClient::MoveApp(idleTask.WgId(), ESgcMoveAppToForeground);
-        }
-        TApaTask task(taskList.FindApp(iAppUid));
-		if (task.Exists())
-        {
-			//task.SendToBackground();
-			CAknSgcClient::MoveApp(task.WgId(), ESgcMoveAppToBackground);
-        }
-    }
-	if( !iPeriodic->IsActive() )
-	{
-	    if (iTaskExists)
-    	{
-            iPeriodic->Start(KTaskExistsDelay, KTaskExistsDelay,
-                TCallBack(TaskExistsCallback, this));
-    	}
-    	else
-	    {
-            iPeriodic->Start(KTaskNotExistsDelay, KTaskNotExistsDelay,
-                TCallBack(TaskNotExistsCallback, this));
-    	}
-		
-	}
-}
-
-// ---------------------------------------------------------------------------
-// From CActive
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetShutter::DoCancel()
-{
-    if (iPeriodic)
-    {
-        iPeriodic->Cancel();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// From CActive.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetShutter::RunL()
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutTargetShutter::RunL() app uid=0x%x"), iAppUid.iUid);	
-
-	TUid menuUid = KMenuUID3;
-	
-    TApaTaskList taskList(iWsSession);
-    TApaTask task(taskList.FindApp(iAppUid));
-
-    if (iTaskExists)
-    {
-        RWindowGroup windowGroup = iEnv->RootWin();
-
-        if (windowGroup.OrdinalPosition() != 0)
-        {
-            TApaTask idleTask(taskList.FindApp(KScutActiveIdleUid));
-            if (idleTask.Exists())
-            {
-			__PRINTS( "XAI:   idle to foreground");
-	
-                //idleTask.BringToForeground();
-                CAknSgcClient::MoveApp(idleTask.WgId(), ESgcMoveAppToForeground);
-            }
-        }
-        iPeriodic->Cancel();
-    }
-    else
-    {
-        if (iCounter >= KMaxNumberOfTries || iTaskKilled)
-        {
-            iPeriodic->Cancel();
-        }
-        else if (task.Exists() && iAppUid != menuUid)        
-        {
-			__PRINTS("XAI:   shutdown task");
-			//task.SendToBackground();
-			CAknSgcClient::MoveApp(task.WgId(), ESgcMoveAppToBackground);
-            task.SendSystemEvent(EApaSystemEventShutdown);
-            iTaskKilled = ETrue;
-        }
-        else
-        {
-            iCounter++;
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles an error situation.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetShutter::RunError(TInt aError)
-{
-    return aError;
-}
-
-// ---------------------------------------------------------------------------
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetShutter::Run()
-{
-    SetActive();
-    TRequestStatus *status = &iStatus;
-    User::RequestComplete(status, KErrNone);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetShutter::TaskExistsCallback(TAny* aPtr)
-{
-    CAiScutTargetShutter* self = static_cast<CAiScutTargetShutter*>(aPtr);
-
-    if (self)
-    {
-        self->Run();
-    }
-
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetShutter::TaskNotExistsCallback(TAny* aPtr)
-{
-    CAiScutTargetShutter* self = static_cast<CAiScutTargetShutter*>(aPtr);
-
-    if (self)
-    {
-        self->Run();
-    }
-
-    return KErrNone;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/aiscuttexts.rss	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,707 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in common texts
-*
-*/
-
-
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <eikcore.rsg>
-#include <eikon.rsg>
-//#include <appinfo.rh>
-//#include <avkon.loc>
-//#include <data_caging_paths_strings.hrh>
-//#include <gscommon.rh>
-//#include <gs.loc>
-
-#include <ai3scutsettings.loc>
-
-#include "aiscutapptitle.rh"
-#include "aiscutappuids.hrh"
-
-NAME SCTX
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf=""; }
-
-//----------------------------------------------------
-//  r_scut_plugin_name
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_plugin_name
-{
-    buf = qtn_ai_set_cont_apps;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_change_theme
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_change_theme
-{
-    buf = qtn_apps_idle_skin_gs;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_new_msg
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_new_msg
-{
-    buf = qtn_set_idle_skey_new_msg;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_new_email
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_new_email
-{
-    buf = qtn_set_idle_skeys_email_editor;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_new_syncml_mail
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_new_syncml_mail
-{
-    buf = qtn_apps_syncml_mail_gs;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_new_postcard
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_new_postcard
-{
-    buf = qtn_apps_mmspostcard_gs;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_new_audio_msg
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_new_audio_msg
-{
-    buf = qtn_apps_audio_msg_gs;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_select_msg_type
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_select_msg_type
-{
-    buf = qtn_set_idle_skey_select_msg_type;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_connectivity_status
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_connectivity_status
-{
-    buf = qtn_apps_connectivity_list;
-}
-
-//----------------------------------------------------
-//  r_scut_settings_connectivity_status
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_scut_settings_appmngr
-{
-    buf =  qtn_apps_am_gs;           
-}
-
-//----------------------------------------------------
-//  r_ai_scut_operation_disabled
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_ai_scut_operation_disabled
-    {
-    buf = qtn_ai_scut_operation_disabled; 
-    }
-
-
-// -----------------------------------------------------------------------------
-//  r_scut_app_title_list
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AI_APP_TITLE_LIST r_scut_app_title_list
-{
-    items =
-    {
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutAboutUidValue;
-            //longtitle   = qtn_apps_about_list;
-            //shorttitle  = qtn_apps_about_grid;
-            skeytitle   = qtn_apps_about_grid;
-            msktitle    = qtn_apps_about_grid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutGeneralSettingsUidValue;
-            viewid      = KScutInstallationViewIdValue;
-            longtitle   = qtn_app_caption_string;
-            shorttitle  = qtn_apps_am_gs;
-            skeytitle   = qtn_apps_am_skey;
-            msktitle    = qtn_msk_idle_am;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutApplicationManagerUidValue;
-            //viewid      = KScutInstallationViewIdValue;
-            //longtitle   = qtn_app_caption_string;
-            //shorttitle  = qtn_app_caption_string;
-            skeytitle   = qtn_apps_am_skey;
-            msktitle    = qtn_msk_idle_am;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutApplicationShellUidValue;
-            viewid      = 1;
-            //longtitle   = "";
-            //shorttitle  = "";
-            skeytitle   = qtn_apps_menu_skey;
-            msktitle    = qtn_msk_idle_menu;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutNavigatorUidValue;
-            //longtitle   = qtn_apps_blid_list;
-            //shorttitle  = qtn_apps_blid_grid;
-            skeytitle   = qtn_apps_blid_skey;
-            msktitle    = qtn_msk_idle_blid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutBluetoothUidValue;
-            //longtitle   = qtn_apps_bluetooth_list;
-            //shorttitle  = qtn_apps_bluetooth_grid;
-            skeytitle   = qtn_apps_bluetooth_skey;
-            msktitle    = qtn_msk_idle_bluetooth;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutBrowserUidValue;
-            //longtitle   = qtn_apps_browserng_grid;
-            //shorttitle  = qtn_apps_browserng_list;
-            skeytitle   = qtn_apps_services_skey_new;
-            msktitle    = qtn_msk_idle_services_new;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutCalculatorUidValue;
-            //longtitle   = qtn_apps_calculator_list;
-            //shorttitle  = qtn_apps_calculator_grid;
-            skeytitle   = qtn_apps_calculator_skey;
-            msktitle    = qtn_msk_idle_calculator;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutCalendarUidValue;
-            //longtitle   = qtn_apps_calendar_list;
-            //shorttitle  = qtn_apps_calendar_grid;
-            skeytitle   = qtn_apps_calendar_skey;
-            msktitle    = qtn_msk_idle_calendar;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutCamcorderUidValue;
-            //longtitle   = qtn_apps_ccor_list;
-            //shorttitle  = qtn_apps_ccor_grid;
-            skeytitle   = qtn_apps_ccor_skey;
-            msktitle    = qtn_msk_idle_ccor;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutChineseDictionaryUidValue;
-            //longtitle   = qtn_apps_dict_list;
-            //shorttitle  = qtn_apps_dict_grid;
-            skeytitle   = qtn_apps_dict_skey;
-            msktitle    = qtn_msk_idle_dict;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutClockUidValue;
-            //longtitle   = qtn_apps_clock_list;
-            //shorttitle  = qtn_apps_clock_grid;
-            skeytitle   = qtn_apps_clock_skey;
-            msktitle    = qtn_msk_idle_clock;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutConnectionManagerUidValue;
-            //longtitle   = qtn_apps_cmon_list;
-            //shorttitle  = qtn_apps_cmon_grid;
-            skeytitle   = qtn_apps_cmon_skey;
-            msktitle    = qtn_msk_idle_cmon;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutConverterUidValue;
-            //longtitle   = qtn_cnv_app_caption;
-            //shorttitle  = qtn_cnv_app_caption_short;
-            skeytitle   = qtn_apps_converter_skey;
-            msktitle    = qtn_msk_idle_converter;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutDeviceManagerUidValue;
-            //longtitle   = qtn_apps_dm_list;
-            //shorttitle  = qtn_apps_dm_grid;
-            skeytitle   = qtn_apps_dm_skey;
-            msktitle    = qtn_msk_idle_dm;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutDRMRightsManagerUidValue;
-            //longtitle   = qtn_apps_drm_list;
-            //shorttitle  = qtn_apps_drm_grid;
-            skeytitle   = qtn_apps_drm_skey;
-            msktitle    = qtn_msk_idle_drm;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutFaxModemUidValue;
-            //longtitle   = qtn_apps_fax_modem_list;
-            //shorttitle  = qtn_apps_fax_modem_grid;
-            skeytitle   = qtn_apps_fax_modem_skey;
-            msktitle    = qtn_msk_idle_fax_modem;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutFileManagerUidValue;
-            //longtitle   = qtn_apps_fmgr_list;
-            //shorttitle  = qtn_apps_fmgr_grid;
-            skeytitle   = qtn_apps_fmgr_skey;
-            msktitle    = qtn_msk_idle_fmgr;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutFMRadioUidValue;
-            //longtitle   = qtn_apps_radio_list;
-            //shorttitle  = qtn_apps_radio_grid;
-            skeytitle   = qtn_apps_radio_skey;
-            msktitle    = qtn_msk_idle_radio;
-        },
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutFMTXRadioUidValue;
-            //longtitle   = qtn_apps_radio_list;
-            //shorttitle  = qtn_apps_radio_grid;
-            skeytitle   = qtn_fmtx_idle_sk;
-            msktitle    = qtn_fmtx_idle_msk;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutGeneralSettingsUidValue;
-            //longtitle   = qtn_apps_settings_list;
-            //shorttitle  = qtn_apps_settings_grid;
-            skeytitle   = qtn_apps_settings_skey;
-            msktitle    = qtn_msk_idle_gs;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutControlPanelUidValue;
-            //longtitle   = qtn_apps_controlpanel_list;
-            //shorttitle  = qtn_apps_controlpanel_grid;
-            skeytitle   = qtn_apps_controlpanel_skey;
-            msktitle    = qtn_msk_idle_controlpanel;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutHelpUidValue;
-            //longtitle   = qtn_apps_help_list;
-            //shorttitle  = qtn_apps_help_grid;
-            skeytitle   = qtn_apps_help_skey;
-            msktitle    = qtn_msk_idle_help;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutIRUidValue;
-            //longtitle   = qtn_apps_infrared_list;
-            //shorttitle  = qtn_apps_infrared_grid;
-            skeytitle   = qtn_apps_infrared_skey;
-            msktitle    = qtn_msk_idle_infrared;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutInstantMessagingUidValue;
-            //longtitle   = qtn_apps_instant_list;
-            //shorttitle  = qtn_apps_instant_grid;
-            skeytitle   = qtn_apps_instant_skey;
-            msktitle    = qtn_msk_idle_instant;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutUserDictionaryUidValue;
-            //longtitle   = qtn_apps_udict_list;
-            //shorttitle  = qtn_apps_udict_grid;
-            skeytitle   = qtn_apps_udict_skey;
-            msktitle    = qtn_msk_idle_udict;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutLandmarksUidValue;
-            //longtitle   = qtn_apps_lm_list;
-            //shorttitle  = qtn_apps_lm_grid;
-            skeytitle   = qtn_apps_lm_skey;
-            msktitle    = qtn_msk_idle_lm;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutLogsUidValue;
-            //longtitle   = qtn_apps_logs_list;
-            //shorttitle  = qtn_apps_logs_grid;
-            skeytitle   = qtn_apps_logs_skey;
-            msktitle    = qtn_msk_idle_logs;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMediaGallery2UidValue;
-            //longtitle   = qtn_apps_mg_list;
-            //shorttitle  = qtn_apps_mg_grid;
-            skeytitle   = qtn_apps_mg_skey;
-            msktitle    = qtn_msk_idle_mg;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMediaPlayerUidValue;
-            //longtitle   = qtn_apps_mp_list;
-            //shorttitle  = qtn_apps_mp_grid;
-            skeytitle   = qtn_apps_mp_skey;
-            msktitle    = qtn_msk_idle_mp;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMemoryCardUidValue;
-            //longtitle   = qtn_apps_memc_appl_list;
-            //shorttitle  = qtn_apps_memc_appl_grid;
-            skeytitle   = qtn_apps_mmc_skey;
-            msktitle    = qtn_msk_idle_mmc;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMessagingCenterUidValue;
-            //longtitle   = qtn_apps_messaging_list;
-            //shorttitle  = qtn_apps_messaging_grid;
-            skeytitle   = qtn_apps_messaging_skey;
-            msktitle    = qtn_msk_idle_messaging;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMusicPlayerUidValue;
-            //longtitle   = qtn_apps_mplayer_list;
-            //shorttitle  = qtn_apps_mplayer_grid;
-            skeytitle   = qtn_apps_mplayer_skey;
-            msktitle    = qtn_msk_idle_mplayer;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutNotepadUidValue;
-            //longtitle   = qtn_apps_notepad_list;
-            //shorttitle  = qtn_apps_notepad_grid;
-            skeytitle   = qtn_apps_notepad_skey;
-            msktitle    = qtn_msk_idle_notepad;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPersonalisationUidValue;
-            //longtitle   = qtn_apps_skins_list;
-            //shorttitle  = qtn_apps_skins_grid;
-            skeytitle   = qtn_apps_skins_skey;
-            msktitle    = qtn_msk_idle_skins;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPhoneUidValue;
-            //longtitle   = qtn_apps_phone_list;
-            //shorttitle  = qtn_apps_phone_grid;
-            skeytitle   = qtn_apps_phone_grid;
-            msktitle    = qtn_apps_phone_grid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPhonebookUidValue;
-            //longtitle   = qtn_apps_phonebook_list;
-            //shorttitle  = qtn_apps_phonebook_grid;
-            skeytitle   = qtn_apps_phonebook_skey;
-            msktitle    = qtn_msk_idle_phonebook;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutProfilesUidValue;
-            //longtitle   = qtn_apps_mode_list;
-            //shorttitle  = qtn_apps_mode_grid;
-            skeytitle   = qtn_apps_mode_skey;
-            msktitle    = qtn_msk_idle_mode;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPocUidValue;
-            //longtitle   = qtn_apps_ptt_list;
-            //shorttitle  = qtn_apps_ptt_grid;
-            skeytitle   = qtn_apps_ptt_skey;
-            msktitle    = qtn_msk_idle_ptt;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutSearchUidValue;
-            //longtitle   = qtn_apps_search_list;
-            //shorttitle  = qtn_apps_search_grid;
-            skeytitle   = qtn_apps_search_skey;
-            msktitle    = qtn_msk_idle_search;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutSatUiUidValue;
-            //longtitle   = qtn_apps_simapps_list;
-            //shorttitle  = qtn_apps_simapps_grid;
-            skeytitle   = qtn_apps_simapps_grid;
-            msktitle    = qtn_apps_simapps_grid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutSpeedDialUidValue;
-            //longtitle   = qtn_apps_sd_list;
-            //shorttitle  = qtn_apps_sd_grid;
-            skeytitle   = qtn_apps_sd_skey;
-            msktitle    = qtn_msk_idle_sd;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutUSBUidValue;
-            //longtitle   = qtn_apps_usb_list;
-            //shorttitle  = qtn_apps_usb_grid;
-            skeytitle   = qtn_apps_usb_skey;
-            msktitle    = qtn_msk_idle_usb;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutVoiceCommandsUidValue;
-            //longtitle   = qtn_apps_vc_list;
-            //shorttitle  = qtn_apps_vc_grid;
-            skeytitle   = qtn_apps_vc_skey;
-            msktitle    = qtn_msk_idle_vc;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutVoiceMailboxUidValue;
-            //longtitle   = qtn_apps_smsvo_list;
-            //shorttitle  = qtn_apps_smsvo_grid;
-            skeytitle   = qtn_apps_smsvo_skey;
-            msktitle    = qtn_msk_idle_smsvo;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutVoIPUidValue;
-            //longtitle   = qtn_apps_voip_list;
-            //shorttitle  = qtn_apps_voip_grid;
-            skeytitle   = qtn_apps_voip_skey;
-            msktitle    = qtn_msk_idle_voip;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutVoiceRecorderUidValue;
-            //longtitle   = qtn_vorec_app_menu_list;
-            //shorttitle  = qtn_vorec_app_menu_grid;
-            skeytitle   = qtn_apps_recorder_skey;
-            msktitle    = qtn_msk_idle_recorder;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutSmlSyncUidValue;
-            //longtitle   = qtn_apps_sml_list;
-            //shorttitle  = qtn_apps_sml_grid;
-            skeytitle   = qtn_apps_sml_grid;
-            msktitle    = qtn_apps_sml_grid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPersonalisationUidValue;
-            viewid      = KScutChangeThemeViewIdValue;
-            longtitle   = qtn_apps_idle_skin_gs;
-            shorttitle  = qtn_apps_idle_skin_skey;
-            skeytitle   = qtn_apps_idle_skin_skey;
-            msktitle    = qtn_msk_idle_skin;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutAmsEditorUidValue;
-            longtitle   = qtn_apps_audio_msg_gs;
-            shorttitle  = qtn_apps_audio_msg_skey;
-            skeytitle   = qtn_apps_audio_msg_skey;
-            msktitle    = qtn_msk_idle_audio_msg;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutEmailEditorUidValue;
-            longtitle   = qtn_set_idle_skeys_email_editor;
-            shorttitle  = qtn_apps_email_skey;
-            skeytitle   = qtn_apps_email_skey;
-            msktitle    = qtn_msk_idle_email;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutPostcardEditorUidValue;
-            longtitle   = qtn_apps_mmspostcard_gs;
-            shorttitle  = qtn_apps_mmspostcard_skey;
-            skeytitle   = qtn_apps_mmspostcard_skey;
-            msktitle    = qtn_msk_idle_mmspostcard;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutUnifiedEditorUidValue;
-            longtitle   = qtn_set_idle_skey_new_msg;
-            shorttitle  = qtn_idle_skey_new_msg;
-            skeytitle   = qtn_idle_skey_new_msg;
-            msktitle    = qtn_msk_idle_new_msg;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutEmailEditorUidValue;
-            viewid      = KScutSyncMlEmailUidValue;
-            longtitle   = qtn_apps_syncml_mail_gs;
-            shorttitle  = qtn_apps_syncml_mail_skey;
-            skeytitle   = qtn_apps_syncml_mail_skey;
-            msktitle    = qtn_msk_idle_syncml_mail;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMessagingCenterUidValue;
-            viewid      = KScutMessagingCenterUidValue;
-            longtitle   = qtn_set_idle_skey_select_msg_type;
-            shorttitle  = qtn_idle_skey_select_msg;
-            skeytitle   = qtn_idle_skey_select_msg;
-            msktitle    = qtn_msk_idle_select_msg;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutGeneralSettingsUidValue;
-            viewid      = KScutConnectivityStatusViewIdValue;
-            longtitle   = qtn_apps_connectivity_list;
-            shorttitle  = qtn_apps_connectivity_skey;
-            skeytitle   = qtn_apps_connectivity_skey;
-            msktitle    = qtn_msk_idle_connectivity;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutVideoServicesUidValue;
-            skeytitle   = qtn_apps_video_grid;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutMusicPlayerUidValue;
-            skeytitle   = qtn_apps_mplayer_skey;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutFlashPlayerUidValue;
-            skeytitle   = qtn_apps_fplayer_skey;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = KScutExchangeMailUidValue;
-            skeytitle   = qtn_apps_exchangemail_skey;
-        }
-        ,
-        AI_APP_TITLE_ITEM
-        {
-            appuid      = -1;
-            //longtitle   = "not found";
-            //shorttitle  = "not found";
-            skeytitle   = "not found";
-            msktitle    = "not found";
-        }
-    };
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutengine.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1787 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in engine class
-*
-*/
-
-
-#include <coemain.h>                // For CCoeEnv
-#include <centralrepository.h>      // For CRepository
-#include <w32std.h>                 // For RWsSession
-#include <apgtask.h>                // For TApaTaskList
-#include <viewcli.h>                // For CVwsSessionWrapper
-#include <vwsdef.h>                 // For TVwsViewId
-#include <e32property.h>            // For RProperty
-#include <utf.h>                    // For CnvUtfConverter
-#include <bautils.h>
-#include <featmgr.h>
-#include <activefavouritesdbnotifier.h> // For CActiveFavouritesDbNotifier
-#include <pathinfo.h>
-#include <data_caging_path_literals.hrh>
-#include <AknSgcc.h>                    // for fast swap
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <viewclipartner.h>
-#endif
-
-
-#include <ctsydomainpskeys.h>
-#include <UikonInternalPSKeys.h>
-#include <menu2internalcrkeys.h>
-#include <activeidle2internalpskeys.h>
-#include <activeidle2domaincrkeys.h>
-#include <activeidle2domainpskeys.h>
-#include <aipspropertyobserver.h>
-
-#include <aiscuttexts.rsg>
-#include "caiscutengine.h"
-#include "aiscutpluginprivatecrkeys.h"
-#include "aiscutcontentmodel.h"
-#include "caiscutplugin.h"
-#include "caiscutshortcut.h"
-#include "caiscutshortcutinfo.h"
-#include "aidefaultshortcut.h"
-#include "aiscutappuidparser.h"
-#include "aiscutrepositorywatcher.h"
-#include "aiscuttargetshutter.h"
-#include "aiscutdefs.h"
-#include "aiscutfactory.h"
-
-#include <keylockpolicyapi.h>
-#include "debug.h"
-/**
- * Timer delay for access check retry. Two seconds.
- */
-const TInt KScutAccessCheckRetryDelay = 2000000;
-const TUid KVoiceCallUidViewId = { 0x10282D81 };
-const TUid KVideoCallUid = { 0x101F8681 };
-
-_LIT(KScutTextsResourceFileName,    "aiscuttexts.rsc");
-_LIT8(KScutDirectOpen,    "?open");
-
-// ======== LOCAL FUNCTIONS ========
-
-LOCAL_C TInt CompareKey(const TUint32& aLeft, const TUint32& aRight)
-{
-    TUint32 left  = aLeft  & (KScutBitMaskThemeDefault & KScutBitMaskLocked);
-    TUint32 right = aRight & (KScutBitMaskThemeDefault & KScutBitMaskLocked);
-
-    if (left < right)
-    {
-        return -1;
-    }
-    else if (left > right)
-    {
-        return 1;
-    }
-
-    return 0;
-}
-
-static TInt IntFromDesc( const TDesC &aParam )
-    {
-    TInt err = KErrArgument;
-    if (aParam.Length() > 0)
-       {
-           _LIT(KHexPrefix, "0x");
-           const TInt prefixLen = 2;
-
-           TRadix radix(EDecimal);
-           TPtrC ptr(aParam);
-
-           if (aParam.Left(prefixLen).CompareC(KHexPrefix) == 0)
-           {
-               // Strip the '0x' prefix.
-               ptr.Set(aParam.Right(aParam.Length() - prefixLen));
-
-               radix = EHex;
-           }
-
-           TLex lexer(ptr);
-           TUint32 id;
-           
-           err = lexer.Val(id, radix);
-           if ( err == KErrNone )
-               {
-               return id;
-               }
-           else
-               {
-               return err;
-               }
-       }
-    return err;
-    }
-// ---------------------------------------------------------------------------
-// Timer callback.
-// ---------------------------------------------------------------------------
-//
-TInt DelayedCheckCallBack(TAny* aEngine)
-{
-    if (aEngine)
-    {
-    	static_cast<CAiScutEngine*>(aEngine)->RetryAccessCheck();	
-    }
-    
-    return KErrNone;
-}
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngine::CAiScutEngine(CAiScutPlugin& aPlugin)
-    :
-    iPlugin(aPlugin),
-    iResourceLoaderTexts(*CCoeEnv::Static()),
-    iResourceLoaderSendUi(*CCoeEnv::Static())
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::ConstructL()
-{
-    FeatureManager::InitializeLibL();
-
-    User::LeaveIfError(iApaSession.Connect());
-    User::LeaveIfError(iBookmarkSess.Connect());
-    User::LeaveIfError(iBookmarkDb.Open(iBookmarkSess, KBrowserBookmarks));
-
-    iVwsSession = CVwsSessionWrapper::NewL();
-    iRepository = CRepository::NewL(KCRUidShortcutItems);
-   
-    iHiddenAppsRepository = CRepository::NewL(KCRUidMenu);
-
-    // Create message server session because it may be needed during shortcut
-    // creation for checking mailbox access.
-    iMsvSession = CMsvSession::OpenAsObserverL(*this);
-
-    iEnv = CCoeEnv::Static();
-
-    TParsePtrC driveParse(PathInfo::RomRootPath());
-    TFileName resourceName(driveParse.Drive());
-    TParse parse;
-    parse.Set(KScutTextsResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL);
-    resourceName.Append(parse.FullName());
-    iResourceLoaderTexts.OpenL(resourceName);
-
-    TFileName resourceName2(driveParse.Drive());
-    TParse parse2;
-    parse2.Set(KSendNormResource, &KDC_RESOURCE_FILES_DIR, NULL);
-    resourceName2.Append(parse2.FullName());
-    iResourceLoaderSendUi.OpenL(resourceName2);
-
-    LoadAppTitleListL();
-
-    // Engine should still remain alive even though shortcut construction failed
-    // because LaunchByValue must still be possible.
-    TRAP_IGNORE(CreateShortcutsL());
-
-    // Close message server session for now. It's opened again in Resume if needed.
-    delete iMsvSession;
-    iMsvSession = NULL;
-
-    iKeyEventObserver = AiUtility::CreatePSPropertyObserverL(
-        TCallBack(HandlePSCommand, this),
-        KUidSystemCategory, KPSUidShortcutCmd);
-
-    iCallStateObserver = AiUtility::CreatePSPropertyObserverL(
-        TCallBack(CallStateChangeCallback, this),
-        KPSUidCtsyCallInformation, KCTsyCallState);
-
-    iKeylockApi = CKeyLockPolicyApi::NewL( EPolicyActivateKeyguard );
-    if ( !iKeylockApi->HasConfiguration() )
-        {
-        delete iKeylockApi;
-        iKeylockApi = NULL;
-        }
-    CRepository* repository = CRepository::NewLC(TUid::Uid(KCRUidActiveIdleLV));
-    
-    repository->Get(KAIFirstKeyLockKey,  iFirstLockKey);
-    repository->Get(KAISecondKeyLockKey, iSecondLockKey);
-    repository->Get(KAIKeyLockTimeout,  iDelayTimerDelay);    
-    CleanupStack::PopAndDestroy(repository);
-    // convert micro to milliseconds
-    const TInt KUsInMs = 1000;
-    iDelayTimerDelay = KUsInMs * iDelayTimerDelay;       
-    iDelayTimer = CPeriodic::NewL (CActive::EPriorityStandard );
-}
-
-TInt CAiScutEngine::DelayTimerCallBack (TAny *aSelf )
-    {
-    CAiScutEngine* self = static_cast<CAiScutEngine*>(aSelf );
-    TInt err = KErrNone;
-    if (self )
-        {
-        self->iDelayTimer->Cancel();
-        TRAP(err,
-                self->HandleLaunchByIndexL( *(self->iDelayedLaunchCmd) );
-                );
-        
-        }
-    return err;
-    }
-
-void CAiScutEngine::DelayedLaunchByIndexL( const TDesC &aParam )
-    {
-    delete iDelayedLaunchCmd;        
-    iDelayedLaunchCmd = NULL;
-    iDelayedLaunchCmd = aParam.AllocL();
-    iDelayTimer->Cancel();
-    iDelayTimer->Start( iDelayTimerDelay,
-            iDelayTimerDelay,
-            TCallBack( DelayTimerCallBack, this ));
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngine* CAiScutEngine::NewL(CAiScutPlugin& aPlugin)
-{
-    CAiScutEngine* self = new (ELeave) CAiScutEngine(aPlugin);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngine::~CAiScutEngine()
-{
-#ifdef __WEB_WIDGETS
-    if( iWidgetRegistryConnected )
-        {
-        iWidgetRegistry.Disconnect();
-        }
-#endif
-    delete iKeylockApi;
-    delete iSettingsNotifier;
-    delete iRepository;
-
-    delete iHiddenAppsNotifier;
-    delete iHiddenAppsRepository;
-
-    iHiddenApps.Close();
-
-    delete iAppNotifier;
-    delete iTimer;
-    delete iMsvSession;
-    delete iVwsSession;
-    delete iScutShutter;
-
-    Release(iKeyEventObserver);
-    Release(iCallStateObserver);
-
-    iShortcuts.ResetAndDestroy();
-    iThemeShortcuts.ResetAndDestroy();
-    iDefaultUsed.Close();
-
-    delete iBookmarkDbObserver;
-    iBookmarkDb.Close();
-    iBookmarkSess.Close();
-
-    iApaSession.Close();
-
-    while(iAppTitleList.Count())
-    {
-        delete iAppTitleList[0].iLongTitle;
-        delete iAppTitleList[0].iShortTitle;
-        delete iAppTitleList[0].iSkeyTitle;
-        delete iAppTitleList[0].iMskTitle;
-        iAppTitleList.Remove(0);
-    }
-    iAppTitleList.Close();
-
-    iResourceLoaderTexts.Close();
-    iResourceLoaderSendUi.Close();
-
-    delete iDelayTimer;
-    delete iDelayedLaunchCmd;
-    iIcons.Close();
-    FeatureManager::UnInitializeLib();
-}
-
-// ---------------------------------------------------------------------------
-// From class MMsvSessionObserver.
-// Handles an event from the message server.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleSessionEventL(
-    TMsvSessionEvent aEvent, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
-{
-    switch (aEvent)
-    {
-    case EMsvEntriesCreated:
-    case EMsvEntriesDeleted:
-    case EMsvEntriesChanged:
-        if (iShortcuts.Count() > 0)
-        {
-            MergeShortcuts(EScutMailbox, ETrue);
-            CheckAccessAndPublish(EScutCheckMailbox, EFalse);
-        }
-        break;
-
-    default:
-        break;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// From class MApaAppListServObserver.
-// Handles a change in the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleAppListEvent(TInt /*aEvent*/)
-{
-    TRAP_IGNORE( CheckForThemeDefaultReinstalledL() );
-    MergeShortcuts(EScutAnyType, ETrue);
-    CheckAccessAndPublish(EScutCheckApp, ETrue);
-}
-
-// ---------------------------------------------------------------------------
-// Resumes the engine.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::ResumeL(TBool aPublishAll, TAiTransitionReason /*aReason*/)
-{
-    // Merge shortcuts and start notifiers only if we have publishable shortcuts.
-    if (iShortcuts.Count() > 0)
-    {
-        if (!iSettingsNotifier)
-        {
-            iSettingsNotifier = CAiScutRepositoryWatcher::NewL(
-                KCRUidShortcutItems,
-                TCallBack(HandleShortcutsChanged, this),
-                iRepository);
-        }
-
-        if (!iHiddenAppsNotifier)
-        {
-            iHiddenAppsNotifier = CAiScutRepositoryWatcher::NewL(
-                KCRUidMenu,
-                KMenuHideApplication,
-                CCenRepNotifyHandler::EStringKey,
-                TCallBack(HandleHiddenAppsChanged, this),
-                iHiddenAppsRepository);
-        }
-    }
-#ifdef __WEB_WIDGETS
-    if( !iWidgetRegistryConnected )
-        {
-        TInt cError = iWidgetRegistry.Connect();
-        if( cError == KErrNone )
-            {
-            iWidgetRegistryConnected = ETrue;
-            }
-        }
-#endif
-
-    GetHiddenAppsL();
-
-    MergeShortcutsL(EScutAnyType, EFalse);
-
-    // Call state check must be done always because RSK "Back"
-    // must be published when theme is changed during phone call, too.
-    HandleCallStateChange();
-
-    CheckAccessAndPublish(EScutCheckAll, aPublishAll);
-
-    if (iShortcuts.Count() > 0)
-    {
-        iSettingsNotifier->StartListeningL();
-
-        iHiddenAppsNotifier->StartListeningL();
-
-        if (!iAppNotifier)
-        {
-            iAppNotifier = CApaAppListNotifier::NewL(this, CActive::EPriorityStandard);
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Suspends the engine.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::Suspend()
-{
-    delete iMsvSession; // This is to stop receiving message server events.
-    iMsvSession = NULL;
-
-    delete iSettingsNotifier;
-    iSettingsNotifier = NULL;
-
-    delete iHiddenAppsNotifier;
-    iHiddenAppsNotifier = NULL;
-
-    delete iAppNotifier;
-    iAppNotifier = NULL;
-
-    delete iTimer;
-    iTimer = NULL;
-
-    delete iScutShutter;
-    iScutShutter = NULL;
-
-    if (iBookmarkDbObserver)
-    {
-        iBookmarkDbObserver->Cancel();
-    }
-    delete iBookmarkDbObserver;
-    iBookmarkDbObserver = NULL;
-#ifdef __WEB_WIDGETS
-    if( iWidgetRegistryConnected )
-        {
-        TInt cError = iWidgetRegistry.Disconnect();
-        if( cError == KErrNone )
-            {
-            iWidgetRegistryConnected = EFalse;
-            }
-        }
-#endif
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::HandleShortcutsChanged(TAny* aPtr)
-{
-    __PRINTS("XAI: CAiScutEngine::HandleShortcutsChanged");
-    CAiScutEngine* self = static_cast<CAiScutEngine*>(aPtr);
-	
-	if (self)
-	{
-    	self->MergeShortcuts(EScutAnyType, ETrue);
-    	self->CheckAccessAndPublish(EScutCheckAll, EFalse);		
-	}
-
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::HandleHiddenAppsChanged(TAny* aPtr)
-{
-    CAiScutEngine* self = static_cast<CAiScutEngine*>(aPtr);
-
-	if (self)
-	{
-    	TRAP_IGNORE(self->GetHiddenAppsL());
-    	self->MergeShortcuts(EScutAnyType, ETrue);
-    	self->CheckAccessAndPublish(EScutCheckAll, EFalse);		
-	}
-
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsLockKey( TInt aScanCode, TScutLockKey aLockKey ) const
-    {
-    TBool returnValue = EFalse;
-    if ( iKeylockApi )
-        {      
-        TInt index = 0;
-        TUint32 priKey = 0;
-        TUint32 secKey = 0;
-        TInt err = KErrNone;  
-        // Loop through all the combinations in order
-        // to find wether this key is part of the locking
-        // process or not (1st or 2nd key)      
-        while( !returnValue )
-            {
-            err = iKeylockApi->GetKeyCombination(index, priKey, secKey);
-            if ( err == KErrNone )
-                {
-                switch( aLockKey )
-                    {
-                    case EScutFirstLockKey:
-                        returnValue = (priKey == aScanCode);
-                        break;
-                    case EScutSecondLockKey:
-                        returnValue = (secKey == aScanCode);
-                        break;
-                    default:
-                        returnValue = EFalse;
-                        break;                        
-                    }
-                }               
-            else // no more combinations
-                {
-                break;
-                }
-            ++index;
-            }
-        return returnValue;
-        }
-    switch( aLockKey )
-        {
-        case EScutFirstLockKey:
-            returnValue = iFirstLockKey == aScanCode;
-            break;
-        case EScutSecondLockKey:
-            returnValue = iSecondLockKey == aScanCode;
-            break;
-        default:
-            returnValue = EFalse;
-            break;
-        }
-    return returnValue;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsHidden(const TUid& aAppUid) const
-{
-    if (iHiddenApps.Find(aAppUid) == KErrNotFound)
-    {
-        return EFalse;
-    }
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::IsHidden (0x%x) ETrue"), aAppUid);
-    return ETrue;
-}
-
-// ---------------------------------------------------------------------------
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleAiEventL(TInt aEvent, const TDesC& aParam)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleAiEventL( %d, '%S' ) alive = %d"), aEvent, &aParam, iPlugin.IsAlive());
-
-    TUid appUid = KNullUid;
-    iFirstLockKeyPressed = EFalse;
-    iSoftkeyAppRunning = EFalse;
-
-    if (aParam.Compare(KLeftSoftkey) == 0)
-    {
-        if ( IsLockKey( EStdKeyDevice0, EScutFirstLockKey) || IsLockKey( EStdKeyDevice0 , EScutSecondLockKey))
-        {
-            // Raise the first lock key pressed flag
-            // only when this is raised, keylock skip causes scut launch
-            iFirstLockKeyPressed = ETrue;
-            appUid = SoftkeyUid(KLeftSoftkeyId);
-        }
-    }
-
-    if (aParam.Compare(KRightSoftkey) == 0)
-    {
-        if ( IsLockKey( EStdKeyDevice1 , EScutFirstLockKey) || IsLockKey( EStdKeyDevice1 , EScutSecondLockKey))
-        {
-            // Raise the first lock key pressed flag
-            // only when this is raised, keylock skip causes scut launch
-            iFirstLockKeyPressed = ETrue;
-            appUid = SoftkeyUid(KRightSoftkeyId);
-        }
-    }
-
-    if (iFirstLockKeyPressed && appUid != KNullUid)
-    {
-        TApaTaskList taskList(iEnv->WsSession());
-        TApaTask task(taskList.FindApp(appUid));
-
-        if (task.Exists())
-        {
-        	if (IsHiddenFromFSW(appUid))
-            	iSoftkeyAppRunning = EFalse;
-        	else
-        		iSoftkeyAppRunning = ETrue;	
-        }
-    }
-
-    if (IsDelayRequired(appUid))
-    {
-        DelayedLaunchByIndexL( aParam );
-        return;
-    }
-
-    if( iActiveCall && aParam.Compare( KRightSoftkey ) == 0 )
-        {   
-        ActivateTopMostApp();
-        return;
-        }
-
-    switch( aEvent )
-        {
-        case EAiScutEventLaunchByIndex:
-            HandleLaunchByIndexL(aParam);
-            break;
-    
-        case EAiScutEventLaunchByValue:
-            HandleLaunchByValueL(aParam);
-            break;
-    
-        case EAiScutEventShowSettings:
-            ShowSettingsL(aParam);
-            break;
-            
-        case EAiScutEventShowSetting:
-            ShowSettingL(aParam);
-            break;
-            
-        case EAiScutEventLaunchFastswap:
-            OpenFastSwap();
-            break;
-    
-        case EAiScutEventLaunchByIndexAlternate:
-            HandleLaunchByIndexAlternateL(aParam);
-            break;
-            
-        default:
-            break;
-        }
-
-}
-
-// ---------------------------------------------------------------------------
-// Called by the timer. Retries the access check for shortcuts.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::RetryAccessCheck()
-{
-    CheckAccessAndPublish(EScutCheckAll, iPublishAll);
-
-    // One retry is enough.
-    iTimer->Cancel();
-    delete iTimer;
-    iTimer = NULL;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsNonNative(const TUid& aUid) 
-{
-    TBool ret = EFalse;
-
-    const TUid KMidletAppType = { 0x10210E26 };
-    TUid typeuid = KNullUid;
-
-    if (KErrNone == iApaSession.GetAppType(typeuid, aUid))
-    {
-        if (typeuid == KMidletAppType)
-        {
-            ret = ETrue;
-        }
-    }
-
-#ifdef __WEB_WIDGETS
-    if (IsWidget(aUid))
-    {
-        ret = ETrue;
-    }
-#endif
-
-    return ret;
-}
-
-#ifdef __WEB_WIDGETS
-TBool CAiScutEngine::IsWidget(const TUid& aUid)
-{
-    if( iWidgetRegistryConnected )
-        {
-        return iWidgetRegistry.IsWidget(aUid);
-        }
-    else
-        {
-        return EFalse;
-        }
-}
-#endif
-
-// ---------------------------------------------------------------------------
-// Creates the default shortcuts.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::CreateShortcutsL()
-{
-    TInt scIndex = 0;
-
-    iShortcuts.ResetAndDestroy();
-
-    RArray<TUint32> keys;
-    CleanupClosePushL(keys);
-    // Find the keys that define theme-default shortcut settings.
-    iRepository->FindL(KScutCenRepKeyThemeDefault, KScutCenRepKeyMask, keys);
-    
-    
-    TLinearOrder<TUint32> order(CompareKey);
-    keys.Sort(order);
-
-    HBufC* buffer = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    if (iSettingsNotifier)
-    {
-        iSettingsNotifier->StopListening();
-    }
-    if (iHiddenAppsNotifier)
-    {
-        iHiddenAppsNotifier->StopListening();
-    }
-
-    for (TInt i = 0; i < keys.Count(); ++i)
-    {
-        TUint32 key = keys[i];
-        if (iRepository->Get(key, bufferPtr) == KErrNone)
-        {
-            // Strip off the default-setting-bit, it's not part of the shortcut id.
-            key &= KScutBitMaskThemeDefault;
-
-            // Parse the icon from the URL and fetch the icon to our icon array
-            // The actual icon => shortcut matching and overriding is done in 
-            // CheckAccessAndPublishL() just before publishing                
-            iParser.Parse(bufferPtr);
-            TAiScutIcon icon = iParser.Icon();
-            if ( icon.iType != EScutIconNone  )
-                {
-                AddOverrideIcon( icon );                
-                }
-            // Keys over 0x20000000 means that they are just icon overrides                      
-            if ( !(key & KScutFlagBitIconOverride ) )
-                {
-                key &= KScutMaskAdditionalSetting;
-                // Ignore possible errors during shortcut construction
-                // and simply try to move on to the next shortcut.
-                CAiScutShortcut* shortcut = NULL;
-                TRAPD(err, shortcut = AiScutFactory::CreateAiScutShortcutL(key, bufferPtr, *this));
-                if (err == KErrNone)
-                {
-                    // If shortcut is not accessible, replace it with platform default.
-                    TBool access = EFalse;
-                    if (shortcut)
-                    {
-                        // Append theme default to our array, incase of uninstall/reinstall/mem card removal
-                        // restoration is required.
-                        CAiScutShortcutInfo* shortcutInfo = NULL;
-                        TRAP_IGNORE(shortcutInfo = CAiScutShortcutInfo::NewL(key | KScutFlagBitThemeDefault,
-                                                                             bufferPtr));
-                        if ( shortcutInfo )
-                        {
-                            iThemeShortcuts.Append(shortcutInfo);
-                        }
-                    
-                        TScutDefault usedDefault = EScutDefaultToPlatform;
-                        
-                    	TRAP_IGNORE(access = shortcut->CheckAccessL(EScutCheckAll));
-                    	if (!access)
-                    	{
-                            HBufC* target = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-                            TPtr targetPtr = target->Des();
-                        	TUid   dummy;
-    	
-        	                // Get the default shortcut definition for index 'scIndex'.
-            	            // uid is ignored.
-                	        TAiDefaultShortcut::GetDefaultShortcut(key, dummy, targetPtr);
-    	
-        	                delete shortcut;
-            	            shortcut = NULL;
-                            TRAP(err, shortcut = AiScutFactory::CreateAiScutShortcutL(key, targetPtr, *this));
-
-                	        if (err == KErrNone)
-                        	{
-                            	// Add the bit that indicates this is a default shortcut setting.
-    	                        key |= KScutFlagBitThemeDefault;
-        	                    iRepository->Set(key, targetPtr);
-        	                    
-        	                    // Try to locate a icon override from the default
-        	                    // definition
-        	                    iParser.Parse( targetPtr );
-        	                    TAiScutIcon tIcon = iParser.Icon();
-        	                    if ( tIcon.iType != EScutIconNone  )
-        	                        {
-        	                        AddOverrideIcon( tIcon );                
-        	                        }
-            	            }
-                    	    CleanupStack::PopAndDestroy( target );
-                	    }
-                	    else
-                	    {
-                    	    usedDefault = EScutDefaultToTheme;
-                	    }
-
-                    	scIndex++;
-    	
-    	                if (shortcut) // This test ensures that the creation right above went well.
-    	                {
-    	                    iDefaultUsed.Append(usedDefault);
-            	            err = iShortcuts.Append(shortcut);
-            	            
-                	        if (err != KErrNone)
-                    	    {
-                        	    delete shortcut;
-                            	shortcut = NULL;
-                        	}	
-    	                }
-                    }
-                }
-            }
-        }
-    }
-
-    if (iSettingsNotifier)
-    {
-        iSettingsNotifier->StartListeningL();
-    }
-    if (iHiddenAppsNotifier)
-    {
-        iHiddenAppsNotifier->StartListeningL();
-    }
-
-    CleanupStack::PopAndDestroy(buffer);
-    CleanupStack::PopAndDestroy(&keys);
-}
-
-// ---------------------------------------------------------------------------
-// Check whether theme default sc was reinstalled.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::CheckForThemeDefaultReinstalledL()
-{
-    HBufC* buffer = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    if (iSettingsNotifier)
-    {
-        iSettingsNotifier->StopListening();
-    }
-    if (iHiddenAppsNotifier)
-    {
-        iHiddenAppsNotifier->StopListening();
-    }
-
-    TInt count = iThemeShortcuts.Count();
-    for (TInt i = 0; (i < count) &&
-                     (i < iDefaultUsed.Count()) &&
-                     (i < iShortcuts.Count());
-         ++i)
-    {
-        if (iDefaultUsed[i] == EScutDefaultToPlatform ||
-            iDefaultUsed[i] == EScutUserDefined)
-        {
-            bufferPtr.Zero();
-            CAiScutShortcut*& shortcut = iShortcuts[i];
-            // Strip off the default-setting-bit, it's not part of the shortcut id.
-            TUint32 scutKey = iThemeShortcuts[i]->Id() & KScutBitMaskThemeDefault;
-            bufferPtr.Append(iThemeShortcuts[i]->Target());
-            CAiScutShortcut* newScut = NULL;
-            TRAPD(err, newScut = AiScutFactory::CreateAiScutShortcutL(scutKey, bufferPtr, *this));
-    	    if (err == KErrNone)
-          	{
-                delete shortcut;
-                shortcut = NULL;
-                shortcut = newScut;
-                // Add the bit that indicates this is a default shortcut setting.
-                scutKey |= KScutFlagBitThemeDefault;
-                iRepository->Set(scutKey, bufferPtr);
-            }
-            iDefaultUsed[i] = EScutDefaultToTheme;
-            // Recheck access
-            shortcut->CheckAccessL(EScutCheckAll);
-        }
-    }
-    if (iSettingsNotifier)
-    {
-        iSettingsNotifier->StartListeningL();
-    }
-    if (iHiddenAppsNotifier)
-    {
-        iHiddenAppsNotifier->StartListeningL();
-    }
-
-    CleanupStack::PopAndDestroy(buffer);
-}
-
-// ---------------------------------------------------------------------------
-// Merges the user defined shortcuts with the defaults and checks shortcut access.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::MergeShortcuts(TShortcutType aType, TBool aRecreateAll)
-{
-    TRAP_IGNORE(MergeShortcutsL(aType, aRecreateAll));
-}
-
-// ---------------------------------------------------------------------------
-// Merges the user defined shortcuts with the defaults.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::MergeShortcutsL(TShortcutType aType, TBool aRecreateAll)
-{
-    RArray<TUint32> keys;
-    CleanupClosePushL(keys);
-
-    // Find the keys that define user defined shortcut settings.
-    iRepository->FindL(KScutCenRepKeyUserDefined, KScutCenRepKeyMask, keys);
-
-    HBufC* buffer = HBufC::NewLC(
-        NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    for (TInt i = 0; i < iShortcuts.Count(); ++i)
-    {
-        CAiScutShortcut* shortcut = iShortcuts[i];
-        if (aType == EScutAnyType || shortcut->Type() == aType)
-        {
-
-            TInt keyIndex = keys.Find(shortcut->Id());
-            if (keyIndex != KErrNotFound)
-            {
-                // Set the new user target.
-                if (keys.Count() > keyIndex && keyIndex >= 0 &&
-                    iRepository->Get(keys[keyIndex], bufferPtr) == KErrNone)
-                {
-                    iParser.Parse(bufferPtr);
-                    TAiScutIcon icon = iParser.Icon();
-                    if ( icon.iType != EScutIconNone  )
-                        {
-                        AddOverrideIcon( icon );
-                        }
-                    if ( aRecreateAll ||
-                            buffer->CompareC( shortcut->ActiveDefinition() ) != 0 )
-                        {
-                        shortcut->DeleteUserTarget();                    
-                        shortcut->SetUserTarget(bufferPtr);                       
-                        }
-                    if (i < iDefaultUsed.Count())
-                    {
-                        iDefaultUsed[i] = EScutUserDefined;
-                    }
-                }
-            }
-        }
-    }
-
-    CleanupStack::PopAndDestroy(buffer);
-    CleanupStack::PopAndDestroy(&keys);
-}
-
-// ---------------------------------------------------------------------------
-// Checks shortcut accessibility.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::CheckAccessAndPublish(TInt aCheckType, TBool aPublishAll)
-{
-    TRAPD(err, CheckAccessAndPublishL(aCheckType, aPublishAll));
-
-    if (err == KErrNotReady)
-    {
-        // Access check failed, create a timer to try again later.
-        iTimer = CPeriodic::New(CActive::EPriorityStandard);
-        iTimer->Start(KScutAccessCheckRetryDelay, KScutAccessCheckRetryDelay,
-            TCallBack(DelayedCheckCallBack));
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Tells each shortcut to check whether or not its target is accessible.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::CheckAccessAndPublishL(TInt aCheckType, TBool aPublishAll)
-{
-	__PRINTS("XAI: CheckAccessAndPublishL");
-    if (!iMsvSession && IsMsvSessionNeeded())
-    {
-        iMsvSession = CMsvSession::OpenAsObserverL(*this);
-    }
-
-    if (!iBookmarkDbObserver && IsBookmarkObserverNeeded())
-    {
-        iBookmarkDbObserver =
-            new (ELeave) CActiveFavouritesDbNotifier(iBookmarkDb, *this);
-        if (! iBookmarkDbObserver->IsActive())
-        {
-        	iBookmarkDbObserver->Start();	
-        }        
-    }
-
-    iPublishAll = aPublishAll;
-
-    TInt count = iShortcuts.Count();
-    for (TInt i = 0; i < count; ++i)
-    {
-        CAiScutShortcut*& shortcut = iShortcuts[i];
-
-        // Check shortcut access and publish it if its target has changed.
-        // When the plug-in is being resumed, all shortcuts are published.
-        // Non-visible and locked shortcuts are never published.
-        if ( !shortcut->CheckAccessL(aCheckType) )
-        {
-            HBufC* target = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-            TPtr targetPtr = target->Des();
-        	TUid dummy;
-            // Get the default shortcut definition from cenrep using key 'key'.
-            // uid is ignored.
-        	TUint32 key = shortcut->Id();
-	        TAiDefaultShortcut::GetDefaultShortcut(key, dummy, targetPtr);
-            delete shortcut;
-            shortcut = NULL;
-            TRAPD(err, shortcut = AiScutFactory::CreateAiScutShortcutL(key, targetPtr, *this));
-    	    if (err == KErrNone)
-        	{
-            	// Add the bit that indicates this is a default shortcut setting.
-                key |= KScutFlagBitThemeDefault;
-                iRepository->Set(key, targetPtr);
-                
-                // Try to locate a icon override from the default
-                // definition
-                iParser.Parse( targetPtr );
-                TAiScutIcon tIcon = iParser.Icon();
-                if ( tIcon.iType != EScutIconNone  )
-                    {
-                    AddOverrideIcon( tIcon );                
-                    }
-        	}
-    	    CleanupStack::PopAndDestroy( target );
-            if (i < iDefaultUsed.Count())
-                {
-                iDefaultUsed[i] = EScutDefaultToPlatform;
-                }
-            // Recheck access
-            shortcut->CheckAccessL(aCheckType);
-        }
-
-        TBool targetChanged = shortcut->IsTargetChanged();
-        TInt32 id = shortcut->Id();
-        TBool nonVisible = (0 != (id & KScutFlagBitNonVisible));
-        
-        if (aCheckType == EScutCheckBkm && shortcut->Type() == EScutBookmark)
-        {
-            targetChanged = ETrue;
-        }
-
-        shortcut->SetToBePublished(
-            (targetChanged || iPublishAll) &&
-            !nonVisible 
-            );
-
-         // Assign overridden icons to shortcuts if needed
-         for ( TInt j = 0; j < iIcons.Count(); j++)
-             {         
-             // Check that the appuid and type matches
-             if ( shortcut->AppUid() == iIcons[j].iAppUid &&
-                  shortcut->Type() == iIcons[j].iShortcutType )
-                {   
-                // We need to check also the view id / bkm id if present or otherwise all bookmarks
-                // app views would be overridden           
-                if ( iIcons[j].iViewId.iUid <= 0 || 
-                     iIcons[j].iViewId == shortcut->AdditionalUid() )
-                    {
-                    shortcut->SetIcon(iIcons[j]);
-                    }          
-                }
-            }
-
-		__PRINT( __DBG_FORMAT( "XAI:   id = 0x%x, type = %d, publish = %d"), 
-			shortcut->Id(), shortcut->Type(), shortcut->NeedsToBePublished());
-    }
-
-    iPlugin.PublishShortcutsL(iShortcuts);
-}
-
-// ---------------------------------------------------------------------------
-// Finds the shortcut object with the given id.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::FindShortcutIndex(TInt32 aId)
-{
-    for (TInt i = 0; i < iShortcuts.Count(); ++i)
-    {
-        if (iShortcuts[i]->Id() == aId)
-        {
-            return i;
-        }
-    }
-
-    return KErrNotFound;
-}
-
-// ---------------------------------------------------------------------------
-// Handles the shortcut launch by index.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleLaunchByIndexL(const TDesC& aParam)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleLaunchByIndexL ('%S')"), &aParam);
-    if (aParam.Length() > 0)
-    {
-        _LIT(KHexPrefix, "0x");
-        const TInt prefixLen = 2;
-
-        TRadix radix(EDecimal);
-        TPtrC ptr(aParam);
-
-        if (aParam.Left(prefixLen).CompareC(KHexPrefix) == 0)
-        {
-            // Strip the '0x' prefix.
-            ptr.Set(aParam.Right(aParam.Length() - prefixLen));
-
-            radix = EHex;
-        }
-
-        TLex lexer(ptr);
-        TUint32 id;
-        if (lexer.Val(id, radix) == KErrNone)
-        {
-            TInt idx = FindShortcutIndex(id);
-            if (idx != KErrNotFound && idx >= 0 && iShortcuts.Count() > idx)
-            {
-                iShortcuts[idx]->LaunchL();
-            }
-        }
-    }
-}
-// ---------------------------------------------------------------------------
-// Handles the shortcut launch by index.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleLaunchByIndexAlternateL(const TDesC& aParam)
-/**
- * These are the cases at the moment that are handled here.
- * 1) Appshell targeted => Fastswap opened
- */
-{
-    __PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleLaunchByIndexAlternateL ('%S')"), &aParam);
-    TInt index = IntFromDesc( aParam );
-    TInt idx = FindShortcutIndex( index );   
-    if (idx != KErrNotFound && idx >= 0 && iShortcuts.Count() > idx)
-        {
-        CAiScutShortcut *scut = iShortcuts[idx];
-        // Open fastswap in case appshell was targeted with alternate launch
-        if ( scut->AppUid() == KScutAppShellUid )
-            {
-            OpenFastSwap();
-            return;
-            }
-        // add other special cases here
-        /*if ( index == EAiScutSoftKeyLeft )
-            {
-            // do something
-            }*/
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Handles the shortcut launch by value.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleLaunchByValueL(const TDesC& aParam)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleLaunchByIndexL ('%S')"), &aParam);
-
-    if (aParam.Length() > 0)
-    {
-        CAiScutShortcut* shortcut = AiScutFactory::CreateAiScutShortcutLC(0x0, aParam, *this);
-        shortcut->CheckAccessL(EScutCheckAll);
-        shortcut->LaunchL();
-        CleanupStack::PopAndDestroy(shortcut);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Shows the plug-in settings dialog.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::ShowSettingsL(const TDesC& aParam)
-{
-    __PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::ShowSettingsL ('%S')"), &aParam);
-    
-    _LIT(KGeneralSettings, "localapp:0x100058EC?view=0x102750FC");
-    	        
-    CAiScutShortcut* shortcut = CAiScutShortcut::NewLC(0x0, KGeneralSettings, *this);
-    shortcut->CheckAccessL(EScutCheckAll);
-
-    if (aParam.Length() > 0)
-        {
-        HBufC8* param = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aParam);
-        CleanupStack::PushL(param);
-        
-        const TDesC8& msg(*param);
-        
-        shortcut->LaunchL(msg);
-        
-        CleanupStack::PopAndDestroy(param);
-        }
-    else
-        {
-        shortcut->LaunchL(KNullDesC8);
-        }        
-        
-                    
-    CleanupStack::PopAndDestroy(shortcut);        
-}
-
-// ---------------------------------------------------------------------------
-// Shows the plug-in setting.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::ShowSettingL(const TDesC& aParam)
-{
-    __PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::ShowSettingL ('%S')"), &aParam);
-    
-    _LIT(KGeneralSettings, "localapp:0x100058EC?view=0x102750FC");
-                
-    CAiScutShortcut* shortcut = CAiScutShortcut::NewLC(0x0, KGeneralSettings, *this);
-    shortcut->CheckAccessL(EScutCheckAll);
-
-    if (aParam.Length() > 0)
-        {
-        HBufC8* param = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aParam);
-        CleanupStack::PushL(param);
-        
-        HBufC8* param2 = HBufC8::NewLC(param->Des().Length()+KScutDirectOpen.iTypeLength);
-        param2->Des().Copy(param->Des());
-        param2->Des().Append(KScutDirectOpen);
-        const TDesC8& msg(*param2);
-        
-        shortcut->LaunchL(msg);
-        
-        CleanupStack::PopAndDestroy(param2);
-        CleanupStack::PopAndDestroy(param);
-        }
-    else
-        {
-        shortcut->LaunchL(KNullDesC8);
-        }        
-        
-                    
-    CleanupStack::PopAndDestroy(shortcut);       
-}
-
-// ---------------------------------------------------------------------------
-// Opens the fastswap window
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::OpenFastSwap()
-{
-    RAknUiServer* uiServer = CAknSgcClient::AknSrv();
-    if ( uiServer )
-        {
-        uiServer->MakeTaskListVisible( ETrue );
-        }    
-}
-
-
-
-// ---------------------------------------------------------------------------
-// Handles PS commands from WSPlugin.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::HandlePSCommand(TAny* aAny)
-{
-    CAiScutEngine* self = reinterpret_cast< CAiScutEngine* >(aAny);
-    TInt err = KErrNone;
-    if (self)
-    {
-    	TRAP(err, self->DoHandlePSCommandL());	
-    }
-    
-    return err;
-}
-
-// ---------------------------------------------------------------------------
-// Handles call state changes.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::CallStateChangeCallback(TAny* /*aAny*/)
-{
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutEngine::SoftkeyUid(TUint32 aSoftkeyId)
-{
-    TUid uid = KNullUid;
-
-    TInt idx = FindShortcutIndex(aSoftkeyId);
-    if (idx != KErrNotFound && idx >= 0 && iShortcuts.Count() > idx)
-    {
-        uid = iShortcuts[idx]->AppUid();
-
-	__PRINT( __DBG_FORMAT( "XAI: SoftkeyUid %d app uid = 0x%x"), idx, uid.iUid);
-    }
-
-    return uid;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsDelayRequired(TUid aAppUid)
-{
-    // softkey delay is reuired for these applications because of problems
-    // in killing them immediatly after keylock activation.
-    if (aAppUid.iUid == KScutBrowserUidValue      ||
-        aAppUid.iUid == KScutOperatorMenuUidValue ||
-        aAppUid.iUid == KScutVideoServicesUidValue ||
-        IsNonNative( aAppUid )
-        )
-    {
-        return ETrue;
-    }
-
-    return EFalse;
-}
-
-// ---------------------------------------------------------------------------
-// Handles PS commands from WSPlugin.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::DoHandlePSCommandL()
-{
-    TBuf<RProperty::KMaxPropertySize> command;
-    TUint32 lockKeyId = 0;
-    iKeyEventObserver->Get(command);
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::DoHandlePSCommandL command = '%S'"), &command);
-
-    TUid appUid = KNullUid;
-
-    if (iFirstLockKey == EStdKeyDevice0)
-    {
-        appUid = SoftkeyUid(KLeftSoftkeyId);
-        lockKeyId = KLeftSoftkeyId;
-    }
-
-    if (iFirstLockKey == EStdKeyDevice1)
-    {
-        appUid = SoftkeyUid(KRightSoftkeyId);
-        lockKeyId = KRightSoftkeyId;
-    }
-
-    if (iFirstLockKeyPressed && command.Compare(KAiPSEnableKeyLock) == 0)
-    {
-        if (appUid != KNullUid)
-        {
-            TBool isDialog = EFalse;
-            TInt idx = 0;
-            delete iScutShutter;
-            iScutShutter = NULL;
-            
-            // In case new message shortcut in lockkey
-            // we need to dismiss the dialog 
-            if ( lockKeyId > 0 )
-                {
-                idx = FindShortcutIndex( lockKeyId );
-                if (idx != KErrNotFound)
-                    {
-                    switch (iShortcuts[idx]->Type())
-                        {
-                        case EScutNewMsgType:
-                            isDialog = ETrue;
-                            break;
-                        default:
-                            isDialog = EFalse;
-                            break;                          
-                        }                                                
-                    }
-
-                }                    
-            iDelayTimer->Cancel();
-            iScutShutter = CAiScutTargetShutter::NewL(iEnv, appUid, iSoftkeyAppRunning, isDialog);
-            iScutShutter->StartL();
-        }
-    }
-
-    if (command.Compare(KAiPSSkipKeyLock) == 0)
-    {
-        iDelayTimer->Cancel();
-        return ;
-    }
-    else if (command.Compare(KAiPSKeyLockTimeout) == 0)
-    {
-        if (iFirstLockKeyPressed)
-        {
-            iFirstLockKeyPressed = EFalse;
-
-            if (iFirstLockKey == EStdKeyDevice0)
-            {
-                if (IsDelayRequired(appUid))
-                {
-                    HandleLaunchByIndexL(KLeftSoftkey);
-                }
-                return ;
-            }
-
-            if (iFirstLockKey == EStdKeyDevice1)
-            {
-                if (IsDelayRequired(appUid))
-                {
-                    HandleLaunchByIndexL(KRightSoftkey);
-                }
-                return ;
-            }
-        }
-        return ;
-    }
-
-    if (FeatureManager::FeatureSupported(KFeatureIdKeypadNoVoiceKey) &&
-        command.Compare(KAiPSSkipNameDialer) == 0)
-    {
-        HandleLaunchByIndexL(KRightSoftkey);
-        return ;
-    }
-
-    HandleLaunchByValueL(command);
-}
-
-// ---------------------------------------------------------------------------
-// Handles call state changes.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleCallStateChange()
-{
-    TInt value = 0;
-    TInt err = iCallStateObserver->Get(value);
-    iActiveCall = (value > EPSCTsyCallStateNone) && err == KErrNone;
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleCallStateChange = %d"), value);
-	__PRINT( __DBG_FORMAT( "XAI:   iActiveCall = %d"), iActiveCall);
-
-    for (TInt i = 0; i < iShortcuts.Count(); ++i)
-    {
-        iShortcuts[i]->SetCallState(iActiveCall);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Activates TopMost Application
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::ActivateTopMostApp()
-{
-    // Phone Topmost app as default
-    TInt idleAppUid   = 0;
-    TInt topMostAppId = 0;
-
-    RProperty::Get(KPSUidAiInformation, KActiveIdleUid, idleAppUid);
-
-    RProperty property;
-    TInt err = property.Attach(KPSUidUikon, KUikVideoCallTopApp);
-
-    if (err == KErrNone)
-    {
-        property.Get(topMostAppId);
-    }
-
-    property.Close();
-
-	__PRINT( __DBG_FORMAT( "XAI: ActivateTopMostApp idle uid = 0x%x topmost = 0x%x"), idleAppUid, topMostAppId);
-
-    TUid appId(TUid::Uid(topMostAppId));
-    
-    if(appId == KVideoCallUid)
-    {
-	    const TVwsViewId viewId(appId, appId);
-	    err = iVwsSession->CreateActivateViewEvent(viewId, KNullUid, KNullDesC8());
-
-		__PRINT( __DBG_FORMAT( "XAI:   CreateActivateViewEvent = %d"), err);	
-    }
-    else
-    {
-    	const TVwsViewId viewId(appId, KVoiceCallUidViewId);
-	    err = iVwsSession->CreateActivateViewEvent(viewId, KVoiceCallUidViewId, KNullDesC8());
-
-		__PRINT( __DBG_FORMAT( "XAI:   CreateActivateViewEvent = %d"), err);	
-    }
-
-}
-
-// ---------------------------------------------------------------------------
-// From class MFavouritesDbObserver.
-// Handles database event.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::HandleFavouritesDbEventL(RDbNotifier::TEvent aEvent)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutEngine::HandleFavouritesDbEventL aEvent = %d"), aEvent);
-
-    if (aEvent == RDbNotifier::ECommit)
-    {
-        MergeShortcuts(EScutBookmark, ETrue);
-        CheckAccessAndPublish(EScutCheckBkm, EFalse);
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsMsvSessionNeeded()
-{
-    TInt count = iShortcuts.Count();
-
-    for (TInt i = 0; i < count; ++i)
-    {
-        CAiScutShortcut* shortcut = iShortcuts[i];
-        TShortcutType type = shortcut->Type();
-
-        if (type == EScutNewMessage    ||
-            type == EScutNewEmail      ||
-            type == EScutNewSyncMLMail ||
-            type == EScutNewPostcard   ||
-            type == EScutNewAudioMsg   ||
-            type == EScutNewMsgType    ||
-            type == EScutMailbox)
-        {
-            return ETrue;
-        }
-    }
-
-    return EFalse;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsBookmarkObserverNeeded()
-{
-    TInt count = iShortcuts.Count();
-
-    for (TInt i = 0; i < count; ++i)
-    {
-        CAiScutShortcut* shortcut = iShortcuts[i];
-        if (shortcut->Type() == EScutBookmark)
-        {
-            return ETrue;
-        }
-    }
-
-    return EFalse;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::GetAppTitle(
-    const TUid& aAppUid, const TUid& aViewId, TDes& aTitle, TAiScutAppTitleType aType)
-{
-    TBool ret = EFalse;
-    TInt count = iAppTitleList.Count();
-
-    for (TInt i = 0; i < count; i++)
-    {
-        TAiScutAppTitleEntry entry = iAppTitleList[i];
-
-        if (entry.iAppUid == aAppUid && entry.iViewId == aViewId)
-        {
-            switch (aType)
-            {
-            case EAiScutLongTitle:
-                if (entry.iLongTitle)
-                {
-                    aTitle = *entry.iLongTitle;
-                    ret = ETrue;
-                }
-                break;
-
-            case EAiScutShortTitle:
-                if (entry.iShortTitle)
-                {
-                    aTitle = *entry.iShortTitle;
-                    ret = ETrue;
-                }
-                break;
-
-            case EAiScutSkeyTitle:
-                if (entry.iSkeyTitle)
-                {
-                    aTitle = *entry.iSkeyTitle;
-                    ret = ETrue;
-                }
-                break;
-
-            case EAiScutMskTitle:
-                if (entry.iMskTitle)
-                {
-                    aTitle = *entry.iMskTitle;
-                    ret = ETrue;
-                }
-                break;
-            default :
-            	break;
-            }
-
-            break; // break the for loop
-        }
-    }
-
-	if (! ret) __PRINT( __DBG_FORMAT( "XAI: GetAppTitle NOT found for uid = 0x%x"), aAppUid);
-
-    return ret;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::LoadAppTitleListL()
-{
-    TResourceReader reader;
-    iEnv->CreateResourceReaderLC(reader, R_SCUT_APP_TITLE_LIST);
-
-    TInt items = reader.ReadInt16();
-
-	__PRINT( __DBG_FORMAT( "XAI: LoadAppTitleListL items = %d"), items);
-
-    TUid appuid;
-    TUid viewid;
-
-    for (TInt i = 0; i < items; i++)
-    {
-        appuid.iUid = reader.ReadInt32();
-        viewid.iUid = reader.ReadInt32();
-
-        HBufC16* longTitle = reader.ReadHBufC16L();
-        CleanupStack::PushL(longTitle);
-
-        HBufC16* shortTitle = reader.ReadHBufC16L();
-        CleanupStack::PushL(shortTitle);
-
-        HBufC16* skeyTitle = reader.ReadHBufC16L();
-        CleanupStack::PushL(skeyTitle);
-
-        HBufC16* mskTitle = reader.ReadHBufC16L();
-        CleanupStack::PushL(mskTitle);
-
-        TAiScutAppTitleEntry entry;
-
-        entry.iAppUid     = appuid;
-        entry.iViewId     = viewid;
-        entry.iLongTitle  = longTitle;
-        entry.iShortTitle = shortTitle;
-        entry.iSkeyTitle  = skeyTitle;
-        entry.iMskTitle   = mskTitle;
-
-        User::LeaveIfError(iAppTitleList.Append(entry));
-
-        // Title names are deleted in destructor.
-        CleanupStack::Pop(4, longTitle);
-    }
-
-    CleanupStack::PopAndDestroy(); // reader
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngine::GetHiddenAppsL()
-{
-    HBufC* buffer = HBufC::NewLC(
-        NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    iHiddenAppsRepository->Get(KMenuHideApplication, bufferPtr);
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutSettingsModel::GetHiddenAppsL '%S' "), buffer);
-
-    iHiddenApps.Reset();
-    TAiScutAppUidParser uidParser(bufferPtr, iHiddenApps);
-    uidParser.ParseL();
-
-    CleanupStack::PopAndDestroy(buffer);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngine::IsHiddenFromFSW( const TUid& aAppUid )
-{
-	const TUid KPSUidUikon = { 0x101F8773 };
- 	const TUint32 KUikAppHiddenList  = 0x00000010;
- 	const TInt KMaxHiddenApps = 25;
-
-	TBuf16 <2*KMaxHiddenApps> retrievedList;
-    TInt err = RProperty::Get( KPSUidUikon, KUikAppHiddenList,
-retrievedList );
-    TInt i = 0;
-
-	TUint32 listValue;
-	while( i < KMaxHiddenApps && KErrNone == err )
-    {
-    	// 32-bit uid values are retrieved in two 16-bit parts
-    	listValue = retrievedList[2*i] << 16;
-  		listValue += retrievedList[2*i+1];
-   
-    	if ( listValue )
-    	{
-        	TUid t ( KNullUid );
-        	t.iUid = listValue;
-        	if( t == aAppUid )
-        	{
-        		return ETrue;	
-        	}
-   		}
-    	else
-        {
-        	err = KErrEof;
-        	return EFalse;                
-        }
-    	i++;
-    }
-    return EFalse;
-} 
-// ---------------------------------------------------------------------------
-// Adds an override icon to iIcons array in case the same icon 
-// isn't there already
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutEngine::AddOverrideIcon( TAiScutIcon &aIcon )
-    {
-    TBool foundExisting = EFalse;
-    
-    for ( TInt i = 0; i < iIcons.Count(); i++)
-        {
-        if ( aIcon.iAppUid == iIcons[i].iAppUid &&
-             aIcon.iShortcutType == iIcons[i].iShortcutType && 
-             aIcon.iViewId == iIcons[i].iViewId &&
-             aIcon.iDestination == iIcons[i].iDestination )             
-            {
-            foundExisting = ETrue;
-            break;
-            }
-        }
-    if ( !foundExisting )
-        {
-        return iIcons.Append( aIcon );
-        }
-    return KErrNone;
-    }
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutengineext.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in engine extension
-*
-*/
-
-#include <gslauncher.h>
-#include <gulicon.h>
-#include <viewcli.h>
-#include <coemain.h>
-
-#include <aiscutextdefs.h>
-
-#include "caiscutengineext.h"
-#include "caiscutextserver.h"
-#include "taiscutparser.h"
-#include "caiscutshortcut.h"
-#include "caiscutplugin.h"
-#include "aiscutcontentmodel.h"
-#include "caiscutextdata.h"
-#include "caiscutextdatamodel.h"
-
-// ======== LOCAL DEFINITIONS ========
-
-namespace
-    {
-    //  LOCAL CONSTANTS
-    /**
-     * Target id hex format
-     */
-    _LIT( KTargetIdFormat, "0x%08x" );
-
-    /**
-     * Maximum length of target id
-     */
-    const TInt KTargetIdMaxLength = 11;
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngineExt* CAiScutEngineExt::NewL( CAiScutPlugin& aPlugin )
-    {
-    CAiScutEngineExt* self = new( ELeave ) CAiScutEngineExt( aPlugin );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngineExt::~CAiScutEngineExt()
-    {
-    delete iAiScutExtServer;
-    delete iExtDataModel;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutEngineExt::CAiScutEngineExt( CAiScutPlugin& aPlugin )
-    : CAiScutEngine( aPlugin )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::ConstructL()
-    {
-    CAiScutEngine::ConstructL();
-
-    iExtDataModel = CAiScutExtDataModel::NewL();
-    iAiScutExtServer = new( ELeave ) CAiScutExtServer( *this, Env()->WsSession() );
-    iAiScutExtServer->ConstructL();
-    TRAPD( err, iAiScutExtServer->StartL( KAiScutExtServerName ) );
-
-    if( err != KErrNone && err != KErrAlreadyExists )
-        {
-        User::Leave( err );
-        }
-    
-    //Send EAiScutEventGainFocus to the leftmost shortcut in order to put
-    //its state machine in correct state
-    if( iShortcuts.Count() > 0 )
-    {
-        static_cast< CAiScutShortcutExt* >( iShortcuts[ 0 ] )->HandleAIEventL(
-            EAiScutEventGainFocus );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::CheckAccessAndPublish( CAiScutShortcut& aShortcut )
-    {
-    TRAPD( err,
-        RAiShortcutArray shortcutArray;
-        CleanupClosePushL( shortcutArray );
-        shortcutArray.AppendL( &aShortcut );
-        aShortcut.SetToBePublished( ETrue );
-        iPlugin.PublishShortcutsL( shortcutArray );
-        CleanupStack::PopAndDestroy( &shortcutArray );
-        );
-
-    if( err != KErrNone )
-        {
-        //Delegate publishing to the original engine
-        CAiScutEngine::CheckAccessAndPublish( EScutCheckAll, ETrue );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleAiEventL( TInt aEvent, const TDesC& aParam )
-    {
-    CAiScutShortcutExt* shortcut = FindShortcutById( aParam );
-    if( shortcut )
-        {
-        shortcut->HandleAIEventL( aEvent );
-        }
-    CAiScutEngine::HandleAiEventL( aEvent, aParam );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::ResumeL( TBool aPublishAll, TAiTransitionReason aReason )
-    {
-    TArray<CAiScutExtData*> extDataArray = iExtDataModel->AiScutExtDataArray();
-    const TInt count = extDataArray.Count();
-    //Iterate extension data items and populate to matching shortcuts.
-    //Remove the items that are not used in any shortcut.
-    for( TInt i = 0; i < count; i++ )
-        {
-        CAiScutExtData* extData = extDataArray[ i ];
-        const TDesC& targetDefinition = extData->TargetDefinition();
-        if( !PopulateExtData( targetDefinition, extData ) )
-            {
-            iExtDataModel->RemoveAiScutExtData( targetDefinition );
-            }
-        }
-
-    TAiTransitionReason resumeReason = iPlugin.ResumeReason();
-    const TInt shortcutCount = iShortcuts.Count();
-    for( TInt i = 0; i < shortcutCount; i++ )
-        {
-        CAiScutShortcutExt* shortcut = static_cast< CAiScutShortcutExt* >
-            ( iShortcuts[ i ] );
-        shortcut->HandleResumed( resumeReason );
-        }
-
-    iAiScutExtServer->ResumeL( aReason );
-
-    CAiScutEngine::ResumeL( aPublishAll, aReason );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleSetPopupLineArrayL( const TDesC& aDefinition,
-    CDesCArray* aLineArray )
-    {
-    CAiScutExtData* extData = iExtDataModel->SetPopupLineArrayL(
-        aDefinition, aLineArray );
-    TBool shortcutsFound = PopulateExtData(
-        aDefinition, extData );
-    if( !shortcutsFound )
-        {
-        iExtDataModel->RemoveAiScutExtData( aDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleResetPopupLineArrayL( const TDesC& aDefinition )
-    {
-    CAiScutExtData* extData = iExtDataModel->ResetPopupLineArray( aDefinition );
-    TBool shortcutsFound = PopulateExtData(
-        aDefinition, extData );
-    if( !shortcutsFound )
-        {
-        iExtDataModel->RemoveAiScutExtData( aDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleSetIconL( const TDesC& aDefinition, CGulIcon* aIcon )
-    {
-    CAiScutExtData* extData = iExtDataModel->SetIconL( aDefinition, aIcon );
-    TBool shortcutsFound = PopulateExtData(
-        aDefinition, extData );
-    if( !shortcutsFound )
-        {
-        iExtDataModel->RemoveAiScutExtData( aDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleResetIconL( const TDesC& aDefinition )
-    {
-    CAiScutExtData* extData = iExtDataModel->ResetIcon( aDefinition );
-    TBool shortcutsFound = PopulateExtData(
-        aDefinition, extData );
-    if( !shortcutsFound )
-        {
-        iExtDataModel->RemoveAiScutExtData( aDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngineExt::HandleIsInShortcutsL( const TDesC& aDefinition ) const
-    {
-    const TInt shortcutCount = iShortcuts.Count();
-    for( TInt i = 0; i < shortcutCount; i++ )
-        {
-        CAiScutShortcutExt* shortcut = static_cast< CAiScutShortcutExt* >
-            ( iShortcuts[ i ] );
-        TPtrC activeTargetDefinition = shortcut->ActiveTargetDefinition();
-        if( activeTargetDefinition.CompareF( aDefinition ) == 0 )
-            {
-            return ETrue;
-            }
-        }
-
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutEngineExt::HandleIssuePutInShortcutsL( const TDesC& /*aDefinition*/ )
-    {
-    CGSLauncher* l = CGSLauncher::NewLC();
-    l->LaunchGSViewL ( TUid::Uid( AI_UID_ECOM_IMPLEMENTATION_SETTINGS_SCUTPLUGIN ),
-                       KScutActiveIdleUid,
-                       KNullDesC8 );    
-    CleanupStack::PopAndDestroy( l );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutEngineExt::PopulateExtData( const TDesC& aDefinition,
-    const MAiScutExtData* aAiScutExtData )
-    {
-    //Iterate shortcuts and update matching ones with new extData
-    TBool shortcutsFound = EFalse;
-    const TInt shortcutCount = iShortcuts.Count();
-    for( TInt i = 0; i < shortcutCount; i++ )
-        {
-        CAiScutShortcutExt* shortcut = static_cast< CAiScutShortcutExt* >
-            ( iShortcuts[ i ] );
-        TPtrC activeTargetDefinition = shortcut->ActiveTargetDefinition();
-        if( activeTargetDefinition.CompareF( aDefinition ) == 0 )
-            {
-            shortcut->SetAiScutExtData( aAiScutExtData );
-            shortcutsFound = ETrue;
-            }
-        }
-
-    return shortcutsFound;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutExt* CAiScutEngineExt::FindShortcutById(
-    const TDesC& aId ) const
-    {
-    const TInt shortcutCount = iShortcuts.Count();
-    for( TInt i = 0; i < shortcutCount; i++ )
-        {
-        CAiScutShortcutExt* shortcut = static_cast< CAiScutShortcutExt* >
-            ( iShortcuts[ i ] );
-
-        TBuf< KTargetIdMaxLength > id;
-        id.Format( KTargetIdFormat, shortcut->Id() );
-
-        if( id.CompareF( aId ) == 0 )
-            {
-            return shortcut;
-            }
-        }
-    return NULL;
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutextdata.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in engine extension
-*
-*/
-
-
-#include "caiscutextdata.h"
-#include <fbs.h>
-#include <gulicon.h>
-
-// ======== LOCAL DEFINITIONS ========
-
-namespace
-    {
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtData* CAiScutExtData::NewL( const TDesC& aTargetDefinition )
-    {
-    CAiScutExtData* self = CAiScutExtData::NewLC( aTargetDefinition );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-CAiScutExtData* CAiScutExtData::NewLC( const TDesC& aTargetDefinition )
-    {
-    CAiScutExtData* self = new( ELeave ) CAiScutExtData;
-    CleanupStack::PushL( self );
-    self->ConstructL( aTargetDefinition );
-    return self;
-    }
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtData::~CAiScutExtData()
-    {
-    delete iIcon;
-    delete iPopupLineArray;
-    delete iTargetDefinition;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtData::CAiScutExtData()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtData::ConstructL( const TDesC& aTargetDefinition )
-    {
-    iTargetDefinition = aTargetDefinition.AllocL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-const TDesC& CAiScutExtData::TargetDefinition() const
-    {
-    return *iTargetDefinition;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtData::SwitchPopupLineArray( CDesCArray* aPopupLineArray )
-    {
-    delete iPopupLineArray;
-    iPopupLineArray = aPopupLineArray;
-    }
-    
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtData::ResetPopupLineArray()
-    {
-    delete iPopupLineArray;
-    iPopupLineArray = NULL;
-    }
-    
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtData::SwitchIcon( CGulIcon* aIcon )
-    {
-    delete iIcon;
-    iIcon = aIcon;
-    }
-    
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtData::ResetIcon()
-    {
-    delete iIcon;
-    iIcon = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-const MDesCArray* CAiScutExtData::PopupLineArray() const
-    {
-    return iPopupLineArray;
-    }
-    
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-const CGulIcon* CAiScutExtData::Icon() const
-    {
-    return iIcon;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-/*
-CGulIcon* CAiScutExtData::DuplicateIconL() const
-    {
-    if( !iIcon )
-        {
-        return NULL;
-        }
-
-    CGulIcon* newIcon = CGulIcon::NewLC();
-    
-    CFbsBitmap* iconBitmap = iIcon->Bitmap();
-    if( iconBitmap && iconBitmap->Handle() != 0 )
-        {
-        CFbsBitmap* newBitmap = new( ELeave ) CFbsBitmap();
-        CleanupStack::PushL( newBitmap );
-        User::LeaveIfError( newBitmap->Duplicate( iconBitmap->Handle() ) );
-        CleanupStack::Pop( newBitmap );
-        newIcon->SetBitmap( newBitmap );
-        }
-
-    CFbsBitmap* iconMask = iIcon->Mask();
-    if( iconMask && iconMask->Handle() != 0 )
-        {
-        CFbsBitmap* newMask = new( ELeave ) CFbsBitmap();
-        CleanupStack::PushL( newMask );
-        User::LeaveIfError( newMask->Duplicate( iconMask->Handle() ) );
-        CleanupStack::Pop( newMask );
-        newIcon->SetMask( newMask );
-        }
-
-    CleanupStack::Pop( newIcon );
-    return newIcon;
-    }
-*/
-    
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutextdatamodel.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in extension data model
-*
-*/
-
-
-#include "caiscutextdatamodel.h"
-#include "caiscutextdata.h"
-
-// ======== LOCAL DEFINITIONS ========
-
-namespace
-    {
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtDataModel* CAiScutExtDataModel::NewL()
-    {
-    CAiScutExtDataModel* self = CAiScutExtDataModel::NewLC();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-CAiScutExtDataModel* CAiScutExtDataModel::NewLC()
-    {
-    CAiScutExtDataModel* self = new( ELeave ) CAiScutExtDataModel;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtDataModel::~CAiScutExtDataModel()
-    {
-    iAiScutExtDataArray.ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtDataModel::CAiScutExtDataModel()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtDataModel::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtData* CAiScutExtDataModel::SetPopupLineArrayL( 
-    const TDesC& aDefinition, CDesCArray* aLineArray )
-    {
-    CAiScutExtData* extData = NULL;
-    TInt index = FindAiScutExtData( aDefinition );
-    if( index != KErrNotFound )
-        {
-        extData = iAiScutExtDataArray[ index ];
-        }
-    else
-        {
-        extData = CreateAiScutExtDataL( aDefinition );
-        }
-
-    extData->SwitchPopupLineArray( aLineArray );    //Takes ownership
-    return extData;
-    }
-
-CAiScutExtData* CAiScutExtDataModel::ResetPopupLineArray( const TDesC& aDefinition )
-    {
-    CAiScutExtData* extData = NULL;
-    TInt index = FindAiScutExtData( aDefinition );
-    if( index != KErrNotFound )
-        {
-        extData = iAiScutExtDataArray[ index ];
-        if( extData->Icon() )
-            {
-            extData->ResetPopupLineArray();
-            }
-        else
-            {            
-            iAiScutExtDataArray.Remove( index );
-            delete extData;
-            extData = NULL;
-            }        
-        }
-    return extData;
-    }
-
-CAiScutExtData* CAiScutExtDataModel::SetIconL( const TDesC& aDefinition, CGulIcon* aIcon )
-    {
-    CAiScutExtData* extData = NULL;
-    TInt index = FindAiScutExtData( aDefinition );
-    if( index != KErrNotFound )
-        {
-        extData = iAiScutExtDataArray[ index ];
-        }
-    else
-        {
-        extData = CreateAiScutExtDataL( aDefinition );
-        }
-
-    extData->SwitchIcon( aIcon );    //Takes ownership
-    return extData;
-    }
-
-CAiScutExtData* CAiScutExtDataModel::ResetIcon( const TDesC& aDefinition )
-    {
-    CAiScutExtData* extData = NULL;
-    TInt index = FindAiScutExtData( aDefinition );
-    if( index != KErrNotFound )
-        {
-        extData = iAiScutExtDataArray[ index ];
-        if( extData->PopupLineArray() )
-            {
-            extData->ResetIcon();
-            }
-        else
-            {            
-            iAiScutExtDataArray.Remove( index );
-            delete extData;
-            extData = NULL;
-            }        
-        }
-    return extData;
-    }
-
-TArray<CAiScutExtData*> CAiScutExtDataModel::AiScutExtDataArray() const
-    {
-    return iAiScutExtDataArray.Array();
-    }
-
-void CAiScutExtDataModel::RemoveAiScutExtData( const TDesC& aDefinition )
-    {
-    TInt index = FindAiScutExtData( aDefinition );    
-    if( index != KErrNotFound )
-        {
-        CAiScutExtData* extData = iAiScutExtDataArray[ index ];
-        iAiScutExtDataArray.Remove( index );
-        delete extData;
-        }
-    }
-
-TInt CAiScutExtDataModel::FindAiScutExtData( const TDesC& aDefinition ) const
-    {
-    const TInt count = iAiScutExtDataArray.Count();
-    for( TInt i = 0; i < count; i++ )
-        {
-        if( iAiScutExtDataArray[ i ]->TargetDefinition().CompareF( aDefinition ) == 0 )
-            {
-            return i;
-            }
-        }
-    return KErrNotFound;
-    }
-    
-CAiScutExtData* CAiScutExtDataModel::CreateAiScutExtDataL( const TDesC& aDefinition )
-    {    
-    CAiScutExtData* extData = CAiScutExtData::NewLC( aDefinition );
-    iAiScutExtDataArray.AppendL( extData ); //Takes ownership
-    CleanupStack::Pop( extData );
-    return extData;
-    }
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutextserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,396 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension server class.
-*
-*/
-
-
-#include <centralrepository.h>
-#include <apgcli.h>
-#include <apadef.h>
-#include <apgwgnam.h>
-#include <bautils.h>
-#include <e32property.h>
-
-#include <aknmessagequerydialog.h>
-#include <StringLoader.h>
-
-#include <aiscutplugindomaincrkeys.h>
-#include <aiscutpluginres.rsg>
-#include <aiscutextdefs.h>
-
-#include "caiscutextserver.h"
-#include "caiscutextsession.h"
-#include "taiscutparser.h"
-#include "caiscutextserver.h"
-#include "activeidle2domainpskeys.h"
-
-
-// Amount of bytes the data buffer increases at a time.
-const TInt KAppsListDataGranularity = 100;
-
-// The length of '0x' in front of a hex literal.
-const TInt KTokenPrefix = 2;
-
-// Index to UID 3
-const TInt KUidIndex = 2;
-
-// Count of characters one UID occupies in CenRep (prefix + 8 digits + spacer)
-const TInt KUidStorageLength = KTokenPrefix + 8 + 1;
-
-_LIT(KUidFormat, "0x%08X ");
-
-_LIT(KResource, "z:\\resource\\aiscutpluginres.rsc");
-
-_LIT(KRomDrive, "z");
-
-
-CLinkParams::CLinkParams(CAiScutExtServer& aServer, HBufC* aTargetDefinition)
-    : iServer(aServer)
-    {
-    iTargetDefinition = aTargetDefinition;
-    }
-
-CLinkParams::~CLinkParams()
-    {
-    delete iTargetDefinition;
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtServer::CAiScutExtServer( MAiScutExtMessageHandler& aObserver, RWsSession& aWsSession )
-    : CServer2( CActive::EPriorityStandard ), iObserver( aObserver ), iWsSession(aWsSession)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtServer::ConstructL()
-{
-    iIdle = CIdle::NewL( EPriorityStandard );
-
-    TFileName fileName( KResource );
-    CEikonEnv* env = CEikonEnv::Static();
-    BaflUtils::NearestLanguageFile( env->FsSession(), fileName );
-    iResourceOffset = env->AddResourceFileL( fileName );    
-
-    ReadAppListL();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtServer::~CAiScutExtServer()
-    {
-    if( iIdle )
-        {
-        iIdle->Cancel();
-        delete iIdle;
-        }
-
-    CEikonEnv::Static()->DeleteResourceFile( iResourceOffset );
-
-    iShowUids.Close();
-    iUids.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CSession2* CAiScutExtServer::NewSessionL(
-    const TVersion& aVersion, const RMessage2& /*aMessage*/ ) const
-    {
-    TVersion version(
-        KAiScutExtServMajorVersionNumber,
-        KAiScutExtServMinorVersionNumber,
-        KAiScutExtServBuildVersionNumber );
-
-    if ( !User::QueryVersionSupported( version, aVersion ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    CAiScutExtSession* session = new( ELeave ) CAiScutExtSession( iObserver );
-    return session;
-}
-
-// ---------------------------------------------------------------------------
-// Read a list of application UIDs which we must not show the tip.
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtServer::ReadAppListL()
-    {
-    CRepository* repository = CRepository::NewL( KCRUidShortcutItems );
-    CleanupStack::PushL( repository );
-
-    RBuf buffer;
-    buffer.CreateL( KAppsListDataGranularity );
-    buffer.CleanupClosePushL();
-
-    TInt err = repository->Get( KAIxSPNoTipAppsList, buffer );
-    while( err == KErrOverflow )
-        {
-        buffer.ReAllocL( buffer.MaxLength() + KAppsListDataGranularity );
-        err = repository->Get( KAIxSPNoTipAppsList, buffer );
-        }
-
-    // Handle error silently if reading from Central Repository fails.
-    if( err == KErrNone )
-        {
-        // Parse application UIDs and put them to list.
-        TLex lex(buffer);
-
-        while( !lex.Eos() )
-            {
-            TPtrC token( lex.NextToken() );
-            if( token.Length() < KTokenPrefix )
-                {
-                break;
-                }
-            TLex lexUid( token.Right( token.Length() - KTokenPrefix ) );
-
-            TUint32 uid;
-            if( lexUid.Val( uid, EHex ) == KErrNone )
-                {
-                iUids.AppendL( TUid::Uid( uid ) );
-                }
-            }
-        }
-
-    CleanupStack::PopAndDestroy();      // buffer
-    CleanupStack::PopAndDestroy( repository );
-    }
-
-// ---------------------------------------------------------------------------
-// Saves the list of applications UIDs.
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtServer::WriteAppListL()
-    {
-    CRepository* repository = CRepository::NewL( KCRUidShortcutItems );
-    CleanupStack::PushL( repository );
-
-    RBuf buffer;
-    buffer.CreateL( iUids.Count() * KUidStorageLength );
-    buffer.Zero();
-    buffer.CleanupClosePushL();
-
-    TBuf<KUidStorageLength> uidString;
-
-    for(TInt c = 0; c < iUids.Count(); c++)
-        {
-        uidString.Format( KUidFormat, iUids[c] );
-        buffer.Append( uidString );   // Ignore error
-        }
-
-    User::LeaveIfError( repository->Set( KAIxSPNoTipAppsList, buffer ) );
-
-    CleanupStack::PopAndDestroy();    // buffer
-    CleanupStack::PopAndDestroy( repository );
-    }
-
-// ---------------------------------------------------------------------------
-// Tests if the client has connected us before, i.e. determines if
-// the tip message should be shown.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutExtServer::HasConnectedBefore( TUid& aUid, const RMessage2& aMessage )
-    {
-    // First test if the current theme supports the xSP feature
-    TInt isXspSupported = EPSAiXspNotSupported;
-    TInt err = RProperty::Get( KPSUidAiInformation, KActiveIdleThemeSupportsXsp,
-        isXspSupported );
-
-    if( err != KErrNone || isXspSupported == EPSAiXspNotSupported)
-    {
-        // xSP is not supported so don't show the dialog. Also if we could not
-        // read the P&S key we won't show the dialog.
-        return ETrue;
-    }
-
-    RThread threadClient;
-
-    if( aMessage.Client( threadClient ) != KErrNone )
-        {
-        // In case of error we report that the client has connected us
-        // before in order not to show the dialog.
-        return ETrue;
-        }
-
-    RProcess processClient;
-
-    if( threadClient.Process(processClient) != KErrNone )
-        {
-        // Prevent dialog from showing in case of error.
-        return ETrue;
-        }
-
-    // See if client application is in ROM
-    TFileName fileName = processClient.FileName();
-    TPtr processDrive( fileName.LeftTPtr( KRomDrive().Length() ) );
-    processDrive.LowerCase();
-
-    if( processDrive == KRomDrive() )
-        {
-        // Don't show tip message for ROM clients.
-        return ETrue;
-        }
-
-    TUidType uidType = processClient.Type();
-
-    // UID3 of the client process
-    TUid uid3( uidType[ KUidIndex ] );
-    aUid = uid3;
-
-    // See if the uid is already in the list
-    if( iUids.Find( uid3 ) != KErrNotFound )
-        {
-        return ETrue;
-        }
-
-    return EFalse;
-    }
-
-void CAiScutExtServer::ShowTipMessage( TUid aUid )
-    {
-    if( iShowUids.Find( aUid ) == KErrNotFound )
-        {
-        iShowUids.Append( aUid );
-        iIdle->Cancel();
-        iIdle->Start( TCallBack( CAiScutExtServer::IdleCallBack, this ) );
-        }
-    }
-
-TInt CAiScutExtServer::IdleCallBack(TAny* aParam)
-    {
-    CAiScutExtServer* p = (CAiScutExtServer*) aParam;
-
-    p->iIdle->Cancel();
-
-    if( p->iIsForeground )
-        {
-        TRAP_IGNORE( p->DoShowTipMessageL() );
-        }
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// Shows a dialog
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtServer::DoShowTipMessageL()
-    {
-    // Find out the name of the application
-    RApaLsSession als;
-    User::LeaveIfError( als.Connect() );
-    CleanupClosePushL( als );
-
-    while( iShowUids.Count() > 0 && !iIsTipMessageVisible)
-        {
-        TUid uid = iShowUids[ 0 ];
-        TApaAppInfo appInfo;
-        User::LeaveIfError( als.GetAppInfo( appInfo, uid ) );
-
-        // Prepare the parameters for the link function
-        HBufC* definitionBuf = HBufC::NewLC( KMaxDefinitionLength );
-        TPtr definition( definitionBuf->Des() );
-        definition.Format( KScutFormatApplication, uid );
-
-        TBool isInShortcuts = iObserver.HandleIsInShortcutsL( definition );
-
-        CLinkParams* params = new( ELeave) CLinkParams( *this, definitionBuf );
-        CleanupStack::Pop( definitionBuf );
-        CleanupStack::PushL( params );
-
-        TCallBack cb(CAiScutExtServer::LinkCallBack, params);
-
-        // Read and format tip message from the resource file
-        HBufC* messageBuf = StringLoader::LoadLC( R_AI_SC_QUERY_MODIFY_GS, appInfo.iCaption );
-        TPtr message( messageBuf->Des() );
-
-        // Don't show the tip if the application is already in shortcuts
-        if( !isInShortcuts )
-            {
-            iIsTipMessageVisible = ETrue;
-            CAknMessageQueryDialog* note = CAknMessageQueryDialog::NewL( message );
-            params->iNote = note;
-
-            note->SetLink( cb );
-            note->ExecuteLD( R_SCUT_XSPTIP_NOTE );
-            iIsTipMessageVisible = EFalse;
-            }
-
-        // Update the list so we don't show the tip message
-        // again for this application.
-        iUids.Append( uid );   // Ignore error
-        iShowUids.Remove( 0 );
-
-        // Save the list of uids to persistant memory.
-        WriteAppListL();
-
-        CleanupStack::PopAndDestroy( messageBuf );
-        CleanupStack::PopAndDestroy( params );
-        }
-
-    CleanupStack::PopAndDestroy();  // als
-    }
-
-// ---------------------------------------------------------------------------
-// Opens the shurtcuts settings view
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutExtServer::LinkCallBack(TAny* aParam)
-    {
-    CLinkParams* params = (CLinkParams*) aParam;
-
-    TRAP_IGNORE(
-        params->iServer.iObserver.HandleIssuePutInShortcutsL(
-            params->iTargetDefinition->Des() );
-    );
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtServer::ResumeL( TAiTransitionReason aReason )
-    {
-    switch( aReason )
-        {
-        case EAiIdleForeground:
-            iIsForeground = ETrue;
-            DoShowTipMessageL();
-            break;
-
-        case EAiIdleBackground:
-            iIsForeground = EFalse;
-            break;
-
-        default:
-            break;
-        }
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutextsession.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,296 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in xSP extension session class.
-*
-*/
-
-
-#include <s32mem.h>
-#include <badesca.h>
-#include <gulicon.h>
-#include <fbs.h>
-
-#include <aiscutextdefs.h>
-
-#include "caiscutextsession.h"
-#include "maiscutextmessagehandler.h"
-
-#include  "caiscutextserver.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtSession::CAiScutExtSession( MAiScutExtMessageHandler& aObserver )
-    : iObserver( aObserver )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutExtSession::~CAiScutExtSession()
-    {
-    CAiScutExtServer* server = const_cast<CAiScutExtServer*>(
-        dynamic_cast<const CAiScutExtServer*>( Server() ) );
-
-    if( iTargetDefinition && server )
-        {
-        TRAP_IGNORE(
-            iObserver.HandleResetPopupLineArrayL( *iTargetDefinition );
-            iObserver.HandleResetIconL( *iTargetDefinition );
-            );
-        }
-
-    delete iTargetDefinition;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::ServiceL( const RMessage2& aMessage )
-    {
-    CAiScutExtServer* server = const_cast<CAiScutExtServer*>(
-        dynamic_cast<const CAiScutExtServer*>( Server() ) );
-
-    __ASSERT_ALWAYS( server, User::Leave( KErrCorrupt ) );
-
-    TUid uid;
-    if( !server->HasConnectedBefore(uid, aMessage) )
-        {
-        server->ShowTipMessage( uid );
-        }
-
-    TRAPD( err, DispatchMessageL( aMessage ) );
-
-    if( !aMessage.IsNull() )
-        {
-        aMessage.Complete( err );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::DispatchMessageL( const RMessage2& aMessage )
-    {
-    switch ( aMessage.Function() )
-        {
-        case EAiScutExtServSetTargetDefinition:
-            {
-            SetTargetDefinitionL( aMessage );
-            break;
-            }
-        case EAiScutExtServSetPopupText:
-            {
-            SetPopupTextL( aMessage );
-            break;
-            }
-        case EAiScutExtServResetPopupText:
-            {
-            ResetPopupTextL( aMessage );
-            break;
-            }
-        case EAiScutExtServSetIcon:
-            {
-            SetIconL( aMessage );
-            break;
-            }
-        case EAiScutExtServResetIcon:
-            {
-            ResetIconL( aMessage );
-            break;
-            }
-        case EAiScutExtServIsInShortcuts:
-            {
-            IsInShortcutsL( aMessage );
-            break;
-            }
-        case EAiScutExtServIssuePutInShortcuts:
-            {
-            IssuePutInShortcutsL( aMessage );
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::SetTargetDefinitionL( const RMessage2& aMessage )
-    {
-    HBufC* targetStringBuf = HBufC::NewLC( aMessage.GetDesLengthL( 0 ) );
-    TPtr targetString( targetStringBuf->Des() );
-    aMessage.ReadL( 0, targetString, 0 );
-    delete iTargetDefinition;
-    iTargetDefinition = targetStringBuf;
-    CleanupStack::Pop( targetStringBuf );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::SetPopupTextL( const RMessage2& aMessage )
-    {
-    if( !iTargetDefinition )
-        {
-        return;
-        }
-    HBufC8* marshalledLineArrayBuf = HBufC8::NewLC(
-        aMessage.GetDesLengthL( 0 ) );
-    TPtr8 marshalledLineArray( marshalledLineArrayBuf->Des() );
-    aMessage.ReadL( 0, marshalledLineArray, 0 );
-
-    RDesReadStream stream( marshalledLineArray );
-    CleanupClosePushL( stream );
-
-    const TInt lineCount = stream.ReadUint8L();
-    __ASSERT_ALWAYS( lineCount >= 0 && lineCount <= KMaxPopupTextLines,
-        User::Leave( KErrArgument ) );
-
-    CDesCArray* array = new( ELeave ) CDesCArrayFlat(
-        lineCount > 0 ? lineCount : 1 );
-    CleanupStack::PushL( array );
-
-    for( TInt i = 0; i < lineCount; i++ )
-        {
-        HBufC* lineBuf = HBufC::NewLC( stream, KMaxTInt );
-        array->AppendL( *lineBuf );
-        CleanupStack::PopAndDestroy( lineBuf );
-        }
-
-    iObserver.HandleSetPopupLineArrayL( *iTargetDefinition, array );  //Takes ownership of array
-
-    CleanupStack::Pop( array );
-    CleanupStack::PopAndDestroy( &stream );
-    CleanupStack::PopAndDestroy( marshalledLineArrayBuf );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::ResetPopupTextL( const RMessage2& /*aMessage*/ )
-    {
-    if( iTargetDefinition )
-        {
-        iObserver.HandleResetPopupLineArrayL( *iTargetDefinition );
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::SetIconL( const RMessage2& aMessage )
-    {
-    if( !iTargetDefinition )
-        {
-        return;
-        }
-    HBufC8* marshallBuf = HBufC8::NewLC( aMessage.GetDesLengthL( 0 ) );
-    TPtr8 marshalledData( marshallBuf->Des() );
-    aMessage.ReadL( 0, marshalledData, 0 );
-
-    RDesReadStream stream( marshalledData );
-    CleanupClosePushL( stream );
-
-    CFbsBitmap* bitmap = new( ELeave ) CFbsBitmap;
-    CleanupStack::PushL( bitmap );
-    bitmap->InternalizeL( stream );
-
-    CFbsBitmap* mask = new( ELeave ) CFbsBitmap;
-    CleanupStack::PushL( mask );
-    mask->InternalizeL( stream );
-
-    CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
-    CleanupStack::Pop( 2, bitmap );
-    CleanupStack::PushL( icon );
-
-    iObserver.HandleSetIconL( *iTargetDefinition, icon );
-
-    CleanupStack::Pop( icon );
-
-    CleanupStack::PopAndDestroy( &stream );
-    CleanupStack::PopAndDestroy( marshallBuf );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::ResetIconL( const RMessage2& /*aMessage*/ )
-    {
-    if( iTargetDefinition )
-        {
-        iObserver.HandleResetIconL( *iTargetDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::IsInShortcutsL( const RMessage2& aMessage )
-    {
-    if( iTargetDefinition )
-        {
-        TBool isInShortcuts = iObserver.HandleIsInShortcutsL( *iTargetDefinition );
-
-        TPtr8 isInShortcutsDes(
-            reinterpret_cast< TUint8* >( &isInShortcuts ),
-            sizeof( isInShortcuts ),
-            sizeof( isInShortcuts ) );
-        aMessage.WriteL( 0, isInShortcutsDes, 0 );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::IssuePutInShortcutsL( const RMessage2& /*aMessage*/ )
-    {
-    if( iTargetDefinition )
-        {
-        iObserver.HandleIssuePutInShortcutsL( *iTargetDefinition );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutExtSession::PanicClient(
-    const RMessage2& aMessage, TInt aPanicCode ) const
-    {
-    aMessage.Panic( KAiScutExtServerName, aPanicCode );
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plug-in main class
-*
-*/
-
-
-#include <ecom/implementationproxy.h>
-#include <centralrepository.h>
-
-#include <aicontentobserver.h>
-#include <aipluginsettings.h>
-
-#include <platform/mw/aiscutuids.hrh>
-#include "aiscutpluginprivatecrkeys.h"
-#include "aiscutdefs.h"
-#include "aiscutcontentmodel.h"
-#include "caiscutplugin.h"
-#include "caiscutengine.h"
-#include "aiscutfactory.h"
-#include "caiscutshortcut.h"
-
-#include "debug.h"
-
-const TImplementationProxy KImplementationTable[] =
-{
-    IMPLEMENTATION_PROXY_ENTRY(KImplUidScutPlugin, CAiScutPlugin::NewL)
-};
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutPlugin::CAiScutPlugin()
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::ConstructL()
-{
-    // Initialize the info which the fw uses to identify the plug-in.
-    // Fill in only the uid at this point, the fw will send this back with the
-    // name filled in later through SetPropertyL().
-    iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SCUTPLUGIN;
-
-    iContent = AiUtility::CreateContentItemArrayIteratorL(KAiScutContent);
-    iResources = AiUtility::CreateContentItemArrayIteratorL(KAiScutResources);
-    iEvents = AiUtility::CreateContentItemArrayIteratorL(KAiScutEvents);
-
-    CRepository* repository = NULL;
-    TRAP_IGNORE(repository = CRepository::NewL(KCRUidShortcutItems));
-    // No leaving code here since 'repository' is not in cleanup stack.
-    if (repository)
-    {
-        // A theme might not contain any publishable shortcuts at all, only
-        // locked ones. To take this into account we must always delete old
-        // theme-default settings to make sure the engine won't create any
-        // unwanted shortcut objects. Any errors that might happen during
-        // deletion are ignored to make sure the plug-in is kept alive.
-        TUint32 errorKey;
-
-        repository->Delete(KScutCenRepKeyThemeDefault, KScutCenRepKeyMask, errorKey);
-    }
-    delete repository;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutPlugin* CAiScutPlugin::NewL()
-{
-    CAiScutPlugin* self = new (ELeave) CAiScutPlugin;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutPlugin::~CAiScutPlugin()
-{
-    TRAP_IGNORE( DeleteDefaultShortcutsL() );
-    Release(iContent);
-    Release(iResources);
-    Release(iEvents);
-    delete iEngine;
-    iObservers.Close();
-}
-
-// ---------------------------------------------------------------------------
-// Publishes the given shortcut.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::PublishShortcutsL(RAiShortcutArray& aShortcuts)
-{
-    TInt err = KErrNone;
-    TInt observers = iObservers.Count();
-    TInt shortcuts = aShortcuts.Count();
-    
-    for (TInt i = 0; i < observers; ++i)
-    {
-        MAiContentObserver* observer = iObservers[i];
-        TBool transactionStarted = EFalse;
-        TInt transactionId = reinterpret_cast<TInt>(this);
-        err = observer->StartTransaction(transactionId);
-
-        if (err != KErrNotSupported)
-        {
-            // The observer does not support transactions, check for real errors.
-            User::LeaveIfError(err);
-            transactionStarted = ETrue;
-        }
-        err = KErrAlreadyExists;
-        for (TInt j = 0; j < shortcuts; j++)
-        {
-            CAiScutShortcut* shortcut = aShortcuts[j];
-
-            if (shortcut->NeedsToBePublished())
-            {
-                shortcut->Publish(*this, *observer);
-                err = KErrNone;
-            }
-        }
-
-        if ( transactionStarted && err == KErrNone )
-            {
-            User::LeaveIfError(observer->Commit(transactionId));
-            }
-        else if ( transactionStarted )
-            {
-            User::LeaveIfError(observer->CancelTransaction(transactionId));
-            }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Is plug-in suspended or not.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutPlugin::IsAlive() const
-{
-    return iAlive;
-}
-
-// ---------------------------------------------------------------------------
-// Resume reason
-// ---------------------------------------------------------------------------
-//
-TAiTransitionReason CAiScutPlugin::ResumeReason() const
-    {
-    return iResumeReason;
-    }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Resumes the plug-in.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::Resume(TAiTransitionReason aReason)
-{
-    TRAP_IGNORE(DoResumeL(aReason));    
-}
-
-// ---------------------------------------------------------------------------
-// Resumes the plug-in.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::DoResumeL(TAiTransitionReason aReason)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutPlugin::Resume reason %d alive = %d"), aReason, iAlive);
-    iResumeReason = aReason;
-	// Reload the engine in case general theme changed or
-	// the engine has been suspended. 
-    if (aReason == EAiGeneralThemeChanged || !iAlive)
-    {
-        // if general theme changed, free engine so that is will be
-        // loaded again because shortcut icons must be re-created.
-        FreeEngine();
-    }
-
-    if (!iEngine)
-    {
-		iEngine = AiScutFactory::CreateAiScutEngineL(*this);
-    }
-
-    iEngine->ResumeL( (iAlive == EFalse) ||
-        (
-        aReason != EAiBacklightOn    &&
-        aReason != EAiBacklightOff   &&
-        aReason != EAiIdleBackground &&
-        aReason != EAiIdleForeground
-        ),
-        aReason
-    );
-    
-    iAlive = ETrue;
-}
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Suspends the plug-in.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::Suspend(TAiTransitionReason aReason)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutPlugin::Suspend reason %d"), aReason);
-
-    if (iEngine)
-    {
-        iEngine->Suspend();
-    }
-
-    iAlive = EFalse;
-}
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Frees the plug-in engine.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::Stop(TAiTransitionReason aReason)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutPlugin::Stop reason %d"), aReason);
-
-	if ( aReason == EAiBackupRestoreStarted )
-	    {
-	    Suspend( aReason );
-	    }
-	else
-	    {
-	    FreeEngine();
-	    }
-}
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Adds the content observer / subscriber to plug-in.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::SubscribeL(MAiContentObserver& aObserver)
-{
-    iObservers.AppendL(&aObserver);
-}
-
-void CAiScutPlugin::DeleteDefaultShortcutsL()
-    {
-    // Ignore any errors that might occur when deleting
-    // the default keys
-    TUint32 errorKey;
-    CRepository* cr = CRepository::NewL(KCRUidShortcutItems);
-    cr->Delete(KScutCenRepKeyThemeDefault, KScutCenRepKeyMask, errorKey);
-    delete cr;
-    }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Configures the plug-in.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::ConfigureL(RAiSettingsItemArray& aSettings)
-{
-    CRepository* repository = NULL;
-
-    TRAPD(err, repository = CRepository::NewL(KCRUidShortcutItems));
-
-    if (err == KErrNotFound)
-    {
-        // CenRep file is missing from the image, this is a serious error.
-        User::Leave(err);
-    }
-
-    // Write settings if repository was successfully opened. All other errors
-    // are ignored to ensure that the plug-in is up and running, even if
-    // crippled.
-
-    // No leaving code here since 'repository' is not in cleanup stack.
-    if (repository)
-    {
-        repository->StartTransaction(CRepository::EConcurrentReadWriteTransaction);
-
-        // A theme might not contain any publishable shortcuts at all, only
-        // locked ones. To take this into account we must always delete old
-        // theme-default settings to make sure the engine won't create any
-        // unwanted shortcut objects. Any errors that might happen during
-        // deletion are ignored to make sure the plug-in is kept alive.
-        TUint32 errorKey;
-
-        repository->Delete(KScutCenRepKeyThemeDefault, KScutCenRepKeyMask, errorKey);
-        
-		__PRINTS( "XAI: CAiScutPlugin::ConfigureL");
-
-        TInt count = aSettings.Count();
-        if (count > 0)
-        {
-            // Write new shortcut definitions.
-            for (TInt i = 0; i < count; ++i)
-            {
-                MAiPluginSettings* settings = aSettings[ i ];
-                
-                if( settings->AiPluginItemType() == EAiPluginSettingsItem )
-                    {
-                    MAiPluginSettingsItem& item = settings->AiPluginSettingsItem();
-                    TUint32 key = item.Key(); // implicit cast from TInt32 to TUint32.
-    
-    				__PRINT( __DBG_FORMAT( "XAI:   %d. key = 0x%x"), i+1, key);
-    
-                    // Add the bit that indicates this is a default shortcut setting.
-                    key |= KScutFlagBitThemeDefault;
-    
-                    // Ignore possible error and keep going.
-                    repository->Create(key, item.Value());
-                    }
-            }
-        }
-
-        TUint32 info = 0;
-        repository->CommitTransaction(info);
-
-        delete repository;
-        repository = NULL;
-        
-        if (iEngine)
-        {
-            iEngine->CreateShortcutsL();
-            iEngine->ResumeL( ETrue, EAiGeneralThemeChanged );
-        }
-    }
-
-    // We don't need to store the settings so clear the array.
-    aSettings.ResetAndDestroy();
-}
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher.
-// Returns the extension interface.
-// ---------------------------------------------------------------------------
-//
-TAny* CAiScutPlugin::Extension(TUid aUid)
-{
-    if (aUid == KExtensionUidProperty)
-    {
-        return static_cast<MAiPropertyExtension*>(this);
-    }
-    else if (aUid == KExtensionUidEventHandler)
-    {
-        return static_cast<MAiEventHandlerExtension*>(this);
-    }
-    else
-    {
-        return NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::HandleEvent(TInt aEvent, const TDesC& aParam)
-{
-    if (iEngine)
-    {
-        // We have no way of reporting errors to framework so just ignore them.
-        TRAP_IGNORE(iEngine->HandleAiEventL(aEvent, aParam));
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CAiScutPlugin::HasMenuItem
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutPlugin::HasMenuItem(const TDesC16& /*aMenuItem*/)
-    {
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Returns a plug-in property.
-// ---------------------------------------------------------------------------
-//
-TAny* CAiScutPlugin::GetPropertyL(TInt aProperty)
-{
-    switch (aProperty)
-    {
-    case EAiPublisherInfo:
-        return static_cast<TAiPublisherInfo*>(&iInfo);
-
-    case EAiPublisherContent:
-        return static_cast<MAiContentItemIterator*>(iContent);
-
-    case EAiPublisherResources:
-        return static_cast<MAiContentItemIterator*>(iResources);
-
-    case EAiPublisherEvents:
-        return static_cast<MAiContentItemIterator*>(iEvents);
-
-    default:
-        break;
-    }
-
-    return NULL;
-}
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Sets a plug-in property to optimize the content model.
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::SetPropertyL(TInt aProperty, TAny* aValue)
-    {
-    if( aProperty == EAiPublisherInfo )
-        {
-        ASSERT( aValue );
-        
-        const TAiPublisherInfo* info( 
-                static_cast<const TAiPublisherInfo*>( aValue ) );
-        
-        iInfo = *info;               
-        }    
-    }
-
-// ---------------------------------------------------------------------------
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutPlugin::FreeEngine()
-{
-    delete iEngine;
-    iEngine = NULL;
-    iAlive = EFalse;    
-}
-
-// ======== GLOBAL FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-{
-    aTableCount = sizeof(KImplementationTable) / sizeof(TImplementationProxy);
-    return KImplementationTable;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettings.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,435 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut settings plug-in main class.
-*
-*/
-
-
-#include <e32std.h>
-#include <eikmenup.h>
-#include <eikbtgpc.h>
-#include <StringLoader.h>
-#include <gsfwviewuids.h>
-#include <gsprivatepluginproviderids.h>
-#include <bautils.h>
-#include <pathinfo.h>
-#include <hlplch.h>
-#include <featmgr.h>
-#include <e32property.h>                // For RProperty
-#include <activeidle2domainpskeys.h>    // For KPSUidActiveIdle2
-
-#include <avkon.rsg>
-#include <aiscutsettingsres.rsg>
-#include <aiscuttexts.rsg>
-
-#include "aiscutsettings.hrh"
-#include "caiscutsettings.h"
-#include "caiscutsettingsitem.h"
-#include "caiscutsettingscontainer.h"
-#include "caiscutsettingsmodel.h"
-#include <platform/mw/aiscutuids.hrh>
-#include "aiscutdefs.h"
-#include <aisystemuids.hrh>
-
-const TUid KUidScutSettingsPlugin =
-{
-    AI_UID_ECOM_IMPLEMENTATION_SETTINGS_SCUTPLUGIN
-};
-
-_LIT(KScutSettingsResourceFileName, "aiscutsettingsres.rsc");
-_LIT(KScutTextsResourceFileName,    "aiscuttexts.rsc");
-_LIT8(KScutDirectOpenTag,    "?open");
-
-
-// ======== LOCAL FUNCTIONS ========
-
-
-static void ParseKeysL( const TDesC8& aCustomMessage, RArray<TUint32>& aKeys, TBool& aOpen )
-    {
-    HBufC8* message = aCustomMessage.AllocLC();
-    
-    TPtr8 ptr( message->Des() );
-            
-    TInt pos;
-    TInt openPos;
-    TBool openTag=EFalse;
-    
-    do
-        {                
-        pos = ptr.Locate( ',' );
-        
-        if( pos != KErrNotFound )
-            {
-            const TDesC8& str1 = ptr.Left( pos );
-            const TDesC8& str2 = str1.Right( str1.Length() - 2 );
-            
-            TUint32 value;
-            TLex8 lex( str2 );
-                        
-            if( lex.Val( value, EHex ) == KErrNone )
-                {
-                aKeys.AppendL( value );
-                }
-                                    
-            ptr = ptr.MidTPtr( pos + 1 );
-            }
-        else
-            {
-            const TDesC8& str1 = ptr;
-            const TDesC8& str2 = str1.Right( str1.Length() - 2 );
-            openPos = ptr.Find( KScutDirectOpenTag );
-            TLex8 lex;
-            if( openPos != KErrNotFound )
-                {
-                openTag=ETrue;
-                const TDesC8& str3 = str2.Left( openPos -2 );
-                lex.Assign( str3 );
-                }
-            else
-                {
-                lex.Assign( str2 );
-                }
-            TUint32 value;
-            
-            
-            if( lex.Val( value, EHex ) == KErrNone )
-                {
-                aKeys.AppendL( value );
-                }                        
-            }                                           
-        }
-    while( pos != KErrNotFound );        
-            
-    if( openTag && aKeys.Count() == 1 )
-        {
-        aOpen = ETrue;
-        }
-    CleanupStack::PopAndDestroy();
-    }
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettings::CAiScutSettings() : iResourceLoaderTexts(*iCoeEnv)
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettings::ConstructL()
-{
-    FeatureManager::InitializeLibL();
-
-    TParsePtrC driveParse(PathInfo::RomRootPath());
-    TFileName resourceName(driveParse.Drive());
-
-    // Find the resource file.
-    TParse parse;
-    parse.Set(KScutSettingsResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL);
-    resourceName.Append(parse.FullName());
-
-    // Open resource file.
-    iResourceLoader.OpenL(resourceName);
-
-    resourceName.Copy(driveParse.Drive());
-    parse.Set(KScutTextsResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL);
-    resourceName.Append(parse.FullName());
-
-    // Open resource file.
-    iResourceLoaderTexts.OpenL(resourceName);
-
-    iModel = CAiScutSettingsModel::NewL(*this, iCoeEnv);
-    
-    iListBoxTimer = CIdle::NewL(CActive::EPriorityHigh);
-
-
-    BaseConstructL(R_SCUT_SETTINGS_VIEW);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettings* CAiScutSettings::NewL(TAny* /*aInitParams*/)
-{
-    CAiScutSettings* self = new (ELeave) CAiScutSettings;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettings::~CAiScutSettings()
-{
-    FeatureManager::UnInitializeLib();
-    
-    if( iListBoxTimer )
-        {
-        iListBoxTimer->Cancel();
-        delete iListBoxTimer;
-        }    
-
-    iResourceLoader.Close();
-    iResourceLoaderTexts.Close();
-
-    delete iModel;
-}
-
-// ---------------------------------------------------------------------------
-// From CAknView
-// Returns view id.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutSettings::Id() const
-{
-    return KUidScutSettingsPlugin;
-}
-
-// ---------------------------------------------------------------------------
-// From CAknView
-// Handles commands.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettings::HandleCommandL(TInt aCommand)
-{
-    switch (aCommand)
-    {
-    case EAiScutSettingsCmdChange:
-        Container()->HandleChangeCommandL();
-        break;
-
-    case EAknCmdHelp:
-	/*
-        TUid fwUid = TUid::Uid( AI_UID3_AIFW_COMMON );
-        TCoeContextName helpString;
-        helpString.Copy( KSET_HLP_HOME_SCREEN_SHORTCUTS );
-        
-        CArrayFixFlat<TCoeHelpContext>* array = 
-            new (ELeave) CArrayFixFlat<TCoeHelpContext>(1);
-        CleanupStack::PushL( array );
-        array->AppendL( TCoeHelpContext( fwUid, helpString ) );
-        HlpLauncher::LaunchHelpApplicationL( CCoeEnv::Static()->WsSession(), array );
-        CleanupStack::Pop( array );
-	*/
-        break;
-
-    case EAknSoftkeyBack:
-        if (iAppUi->View(KGSMainViewUid))
-        {
-            // if we are in GS activate parent plugin view (standby view)...
-            iAppUi->ActivateLocalViewL(KGSPrslnPluginUid);
-        }
-        else
-        {
-            iAppUi->ActivateLocalViewL(iPrevViewId.iViewUid);
-        }
-        break;
-
-    case EAknSoftkeyExit:
-        iAppUi->HandleCommandL(EAknCmdExit);
-        break;
-
-    default:
-        iAppUi->HandleCommandL(aCommand);
-        break;
-    }
-}
-
-// ----------------------------------------------------------------------------
-// From CAknView
-// First method called by the Avkon framwork
-// ----------------------------------------------------------------------------
-//
-void CAiScutSettings::DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage)
-{
-#ifdef MY_DEBUG
-    RDebug::Print(_L("XAI: CAiScutSettings::DoActivateL"));
-    RDebug::Print(_L("XAI:   aCustomMessageId = 0x%08x"), aCustomMessageId.iUid);
-    RDebug::Print(_L("XAI:   aPrevViewId      = 0x%08x"), aPrevViewId.iAppUid.iUid);
-#endif
-
-    CEikButtonGroupContainer* cba = Cba();
-
-    if (cba)
-    {
-        if (aCustomMessageId == KScutActiveIdleUid)
-        {
-            cba->SetCommandSetL(R_SCUT_SOFTKEYS_OPTIONS_EXIT_CHANGE);
-        }
-        else
-        {
-            cba->SetCommandSetL(R_SCUT_SOFTKEYS_OPTIONS_BACK_CHANGE);
-        }
-        cba->DrawDeferred();
-    }
-
-    CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-
-    TBool open=EFalse;
-    if( aCustomMessage != KNullDesC8 )
-        {
-        RArray<TUint32> keys;
-        CleanupClosePushL( keys );
-
-        ParseKeysL( aCustomMessage, keys, open );
-        
-        iModel->SetSettingsKeys( keys );
-        
-        CleanupStack::PopAndDestroy();
-        }
-    
-    iModel->UpdateSettingsContainerL();
-
-    if( open )
-        {
-        /* Let idle timer do this job. */
-        iListBoxTimer->Cancel();
-        iListBoxTimer->Start(TCallBack(DoHandleListBoxSelectionL, this));
-        }
-}
-
-// ----------------------------------------------------------------------------
-// From CAknView
-// Called by the Avkon view framework when closing.
-// ----------------------------------------------------------------------------
-//
-void CAiScutSettings::DoDeactivate()
-{
-    iModel->ActivateObservers(EFalse);
-
-    // deletes iContainer.
-    CGSBaseView::DoDeactivate();
-
-    iModel->SetContainer(Container());
-}
-
-void CAiScutSettings::HandleForegroundEventL(TBool /*aForeground*/)
-    {
-    // No implementation required
-    }
-
-// ----------------------------------------------------------------------------
-// From MEikMenuObserver
-// ----------------------------------------------------------------------------
-//
-void CAiScutSettings::DynInitMenuPaneL(
-    TInt aResourceId, CEikMenuPane* aMenuPane)
-{
-    if (aMenuPane && aResourceId == R_SCUTSETTINGS_MENUPANE)
-    {
-        if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
-        {
-            // Disable help if not supported
-            aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
-        }
-        if (iModel->MdcaCount() == 0)
-        {
-            aMenuPane->SetItemDimmed(EAiScutSettingsCmdChange, ETrue);
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// From CGSPluginInterface. 256
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettings::GetCaptionL(TDes& aCaption) const
-{
-    iCoeEnv->ReadResourceL(aCaption, R_SCUT_SETTINGS_VIEW_CAPTION);
-}
-
-// ---------------------------------------------------------------------------
-// From CGSPluginInterface
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettings::PluginProviderCategory() const
-{
-    return KGSPluginProviderInternal;
-}
-
-// ---------------------------------------------------------------------------
-// From CGSPluginInterface
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettings::Visible() const
-{
-    return EFalse;
-}
-
-// ---------------------------------------------------------------------------
-// From CGSBaseView
-// Returns view id.
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsContainer* CAiScutSettings::Container()
-{
-    return static_cast<CAiScutSettingsContainer*>(iContainer);
-}
-
-// ---------------------------------------------------------------------------
-// From CGSBaseView
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettings::NewContainerL()
-{
-    delete iContainer;
-    iContainer = NULL;
-    
-    iContainer = new (ELeave) CAiScutSettingsContainer();
-    Container()->SetModel(iModel);
-    iModel->SetContainer(Container());
-}
-
-// ---------------------------------------------------------------------------
-// From CGSBaseView
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettings::HandleListBoxSelectionL()
-{
-    Container()->HandleChangeCommandL();
-}
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettings::Activated() const
-    {
-    return iContainer ? ETrue : EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// CActiveIdleState::DoUpdateSaSetting
-// -----------------------------------------------------------------------------
-//
-TInt CAiScutSettings::DoHandleListBoxSelectionL(TAny* aAny)
-    {
-    CAiScutSettings* self = static_cast<CAiScutSettings*>(aAny);
-    if(self)
-        {
-        self->iListBoxTimer->Cancel();
-        self->HandleListBoxSelectionL();
-        }
-    return KErrNone;
-    }
-
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingsapplist.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1087 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Application list for settings listbox
-*
-*/
-
-
-#include <msvuids.h>        // For KMsvRootIndexEntryIdValue
-#include <SenduiMtmUids.h>
-#include <StringLoader.h>
-
-#include <aiscutsettingsres.rsg>
-#include <aiscuttexts.rsg>
-
-#include <featmgr.h>
-#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
-#include <javaregistry.h>
-#include <javaregistryentry.h>
-#include <pathinfo.h>
-
-#include "caiscutsettingsapplist.h"
-#include "taiscutparser.h"
-#include "caiscutsettingsitem.h"
-#include "aiscutdefs.h"
-#include <activeidle2domaincrkeys.h>
-
-#include "debug.h"
-
-using namespace Java;
-
-
-const TInt KDriveAndColon = 2; //drive char and colon string length, e.g. "c:"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList::CAiScutSettingsAppList(CCoeEnv* aEnv, MAiScutListObserver& aObserver)
-    : CActive(CActive::EPriorityLow)    // Background task priority.
-                                        // Higher priority would block the wait dialog.
-    , iEnv(aEnv)
-    , iObserver(aObserver)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::ConstructL()
-    {
-    User::LeaveIfError(iApaSession.Connect());
-    iMsvSession = CMsvSession::OpenAsObserverL(*this);
-
-    CActiveScheduler::Add(this);
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList* CAiScutSettingsAppList::NewL(CCoeEnv* aEnv,
-    MAiScutListObserver& aObserver)
-    {
-    CAiScutSettingsAppList* self = new (ELeave) CAiScutSettingsAppList(aEnv, aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList::~CAiScutSettingsAppList()
-    {
-    if (IsActive())
-        {
-        Cancel();
-        }
-
-    delete iAppNotifier;
-    delete iMsvSession;
-    iApaSession.Close();
-    iListItems.ResetAndDestroy();
-    iMailboxes.Close(); // Do not call ResetAndDestroy() to this.
-    }
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Returns the number of descriptor elements in a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::MdcaCount() const
-    {
-    return iListItems.Count();
-    }
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Indexes into a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsAppList::MdcaPoint(TInt aIndex) const
-    {
-    if (aIndex < 0 || aIndex >= iListItems.Count())
-        {
-        TPtrC ret(KNullDesC);
-        return ret;
-        }
-    return iListItems[aIndex]->Caption();
-    }
-
-// ---------------------------------------------------------------------------
-// From class MMsvSessionObserver.
-// Handles an event from the message server.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::HandleSessionEventL(
-    TMsvSessionEvent aEvent, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
-    {
-    TBool updated = ETrue;
-    TBool added   = EFalse;
-
-    switch (aEvent)
-        {
-    case EMsvEntriesCreated:
-    case EMsvEntriesDeleted:
-    case EMsvEntriesChanged:
-        if (iObserving)
-            {
-            CMsvEntry* rootEntry = GetRootEntryL();
-            
-            CleanupStack::PushL(rootEntry);
-            TBuf<255> mailboxId;
-            
-            // Reset iMailboxes
-            for (TInt j = iMailboxes.Count() - 1; j >= 0; --j)
-            {            
-              RemoveMailboxL(iMailboxes[j]->Params());
-            }
-
-      // Add all mailboxes
-      for (TInt i = rootEntry->Count() - 1; i >= 0; --i)
-                {
-                    const TMsvEntry& tentry = (*rootEntry)[i];
-
-              if (tentry.iMtm == KSenduiMtmImap4Uid || tentry.iMtm == KSenduiMtmPop3Uid)
-                {   
-                  mailboxId.Num(tentry.Id());       
-                        AddMailboxL(tentry.iDetails, mailboxId);
-                    }                      
-              }      
-              
-            CleanupStack::PopAndDestroy(rootEntry);
-            }
-
-        if (updated)
-            {
-            iObserver.HandleScutListEventL(MAiScutListObserver::EAppListUpdated, added);
-            }
-        break;
-
-    default:
-        break;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MApaAppListServObserver.
-// Handles a change in the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::HandleAppListEvent(TInt /*aEvent*/)
-    {
-    TRAP_IGNORE(UpdateAppListL());
-    }
-
-// ---------------------------------------------------------------------------
-// Starts the asynchronous application list initialization.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::StartL()
-    {
-    iListItems.ResetAndDestroy();
-
-    AddStaticItemsL();
-    AddMailboxesL();
-    AddExtraItemsFromCRL();
-
-    if (iApaSession.GetAllApps() == KErrNone &&
-        iApaSession.AppCount(iTotalAppCount) == KErrNone)
-        {
-        CompleteSelf();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Checks if the application list is ready to be shown.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsAppList::IsReady() const
-    {
-    return iReady;
-    }
-
-// ---------------------------------------------------------------------------
-// Tells the application list to start or stop observing for changes.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::SetObservingL(TBool aObserving)
-    {
-    delete iAppNotifier;
-    iAppNotifier = NULL;
-
-    if (aObserving)
-        {
-        UpdateAppListL();
-
-        iAppNotifier = CApaAppListNotifier::NewL(this, CActive::EPriorityStandard);
-        }
-
-    iObserving = aObserving;
-    }
-
-// ---------------------------------------------------------------------------
-// Finds the index of the given settings item in the application list.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::FindIndex(CAiScutSettingsItem& aItem)
-    {
-    TInt index = KErrNotFound;
-
-    TAiScutParser parser;
-    parser.Parse(aItem.Value());
-    TPtrC params(parser.Get(EScutDefParamNameAndValue));
-
-    TUid uid = aItem.Uid();
-    for (TInt i = iListItems.Count() - 1; i >= 0; --i)
-        {
-        CAppListItem* item = iListItems[i];
-        if ( (item->Uid() == uid) && params.Compare(item->Params()) == 0)
-        {
-            index = i;
-            break;
-        }
-        // Url => compare the whole url not just the parameters
-        else if( item->Type() == EAiScutSettingTypeUrl )
-            {
-            if ( parser.Get(EScutDefComplete).Compare(item->Params()) == 0 )
-                {
-                index = i;
-                break;
-                }
-            }
-        }
-
-    return index;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns target application data from the given index.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::GetDataByIndex(TInt aIndex, TUid& aUid,
-    TPtrC& aParams, TPtrC& aCaption, TAiScutSettingType& aType ) const
-    {
-    if (aIndex >= 0 && aIndex < iListItems.Count())
-        {
-        CAppListItem* item = iListItems[aIndex];
-        aUid = item->Uid();
-        aType = item->Type();
-        aParams.Set(item->Params());
-        aCaption.Set(item->Caption());
-        return KErrNone;
-        }
-
-    return KErrNotFound;
-    }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Implements cancellation of an outstanding request.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::DoCancel()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Performs one step of the app list initialization.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::RunL()
-    {
-    TApaAppInfo appInfo;
-    TInt err = GetNextValidApp(appInfo);
-
-    switch (err)
-        {
-    case KErrNone:
-        AddApplicationL(appInfo);
-        CompleteSelf();
-        break;
-
-    case RApaLsSession::ENoMoreAppsInList:
-        iReady = ETrue;
-        iObserver.HandleScutListEventL(MAiScutListObserver::EAppListReady, EFalse);
-        break;
-
-    //Indicates that an RApaLsSession member function was called before the session's 
-    //  application list is fully populated. 
-    case RApaLsSession::EAppListInvalid:
-        StartL(); // Just try again.
-        break;
-
-    default:
-        User::LeaveIfError(err);
-        break;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles an error situation.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::RunError(TInt aError)
-    {
-    return aError;
-    }
-
-// ---------------------------------------------------------------------------
-// Completes own request status to make sure active scheduler calls RunL again.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::CompleteSelf()
-    {
-    if (!IsActive())
-        {
-        TRequestStatus* status = &iStatus;
-        User::RequestComplete(status, KErrNone);
-        SetActive();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Adds an application to the list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddApplicationL(TApaAppInfo& aAppInfo)
-    {
-    TBool allowed = ETrue;
-
-    // EasyVoIP is only added when VoIP is supported
-    if (aAppInfo.iUid == KScutEasyVoIPApplicationUid)
-        {
-        // Check VoIP variation status
-        TInt voipStatus = 0;
-        // For checking VoIP variation status
-        CRepository* repository = CRepository::NewL(KCRUidTelephonySettings);
-        repository->Get(KDynamicVoIP, voipStatus);
-        delete repository;
-        allowed = (voipStatus && FeatureManager::FeatureSupported(KFeatureIdCommonVoip));
-
-        __PRINTS( "XAI: CAiScutSettingsAppList::AddApplicationL");
-        __PRINT( __DBG_FORMAT( "XAI:   voipStatus = %d, allowed = %d"), voipStatus, allowed);
-        }
-
-    // VoIP launcher is always invisible in shortcuts.
-    if (aAppInfo.iUid == KScutVoIPLauncherUid)
-        {
-        allowed = EFalse;
-        }
-
-    if (iObserver.IsHidden(aAppInfo.iUid))
-        {
-        allowed = EFalse;
-        }
-
-    if (allowed)
-        {
-        CAppListItem* listItem = CAppListItem::NewLC(aAppInfo.iUid, aAppInfo.iCaption);
-        listItem->SetType( EAiScutSettingTypeApplication );
-        TLinearOrder<CAppListItem> sortMethod(CAppListItem::CompareCaption);
-        User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-        CleanupStack::Pop(listItem);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Adds the static list items to the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddStaticItemsL()
-    {
-    HBufC* caption = NULL;
-    CAppListItem* listItem = NULL;
-    TLinearOrder<CAppListItem> sortMethod(CAppListItem::CompareCaption);
-
-    // Connectivity Status item
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_CONNECTIVITY_STATUS, iEnv);
-    listItem = CAppListItem::NewLC(KScutGeneralSettingsUid, *caption);
-    listItem->SetParamsL(KScutParamConnectivityView);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-
-    // New Message item.
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NEW_MSG, iEnv);
-    listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-    listItem->SetParamsL(KScutParamNewMsg);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-
-    // New Email item.
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NEW_EMAIL, iEnv);
-    listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-    listItem->SetParamsL(KScutParamNewEmail);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-
-#ifdef __SYNCML_DS_EMAIL
-    // New SyncML mail item.
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NEW_SYNCML_MAIL, iEnv);
-    listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-    listItem->SetParamsL(KScutParamNewSyncMLMail);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-#endif
-
-    if (FeatureManager::FeatureSupported(KFeatureIdMmsPostcard)
-        && IsInRom( KScutPostcardEditorUid ) )
-        {
-        // New Postcard item.
-        caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NEW_POSTCARD, iEnv);
-        listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-        listItem->SetParamsL(KScutParamNewPostcard);
-        listItem->SetType( EAiScutSettingTypeApplication );
-        User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-        CleanupStack::Pop(listItem);
-        CleanupStack::PopAndDestroy(caption);
-        caption = NULL;
-        listItem = NULL;
-        }
-
-    if (FeatureManager::FeatureSupported(KFeatureIdAudioMessaging))
-        {
-        // New Audio Message item.
-        caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NEW_AUDIO_MSG, iEnv);
-        listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-        listItem->SetParamsL(KScutParamNewAudioMsg);
-        listItem->SetType( EAiScutSettingTypeApplication );
-        User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-        CleanupStack::Pop(listItem);
-        CleanupStack::PopAndDestroy(caption);
-        caption = NULL;
-        listItem = NULL;
-        }
-
-    // Select Message type item.
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_SELECT_MSG_TYPE, iEnv);
-    listItem = CAppListItem::NewLC(KScutMessagingUid, *caption);
-    listItem->SetParamsL(KScutParamSelectMsgType);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-    // Installation view.
-    caption = StringLoader::LoadLC(R_SCUT_SETTINGS_APPMNGR, iEnv); 
-    listItem = CAppListItem::NewLC(KScutGeneralSettingsUid, *caption);
-    listItem->SetParamsL(KScutParamInstallationsView);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    caption = NULL;
-    listItem = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds extra list items to the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddExtraItemsL()
-    {
-    // No Effect item.
-    HBufC* caption = StringLoader::LoadLC(R_SCUT_SETTINGS_NO_EFFECT, iEnv);
-    CAppListItem* listItem = CAppListItem::NewLC(KScutSettingsDllUid, *caption);
-    listItem->SetParamsL(KScutParamNoEffect);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    User::LeaveIfError(iListItems.Insert(listItem, 0)); // insert as first item.
-    CleanupStack::Pop(listItem);
-    CleanupStack::PopAndDestroy(caption);
-    }
-
-void CAiScutSettingsAppList::AddExtraItemsFromCRL()
-    {
-    CRepository *cr = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );        
-    User::LeaveIfNull( cr );
-    
-    CleanupStack::PushL( cr );
-    
-    TUint32 crKey = KAIExtraShortcutsKeyRangeStart;
-    TBool moreSettings = ETrue;
-    TInt err = KErrNone;
-    TAiScutParser parser;
-    
-    HBufC* settingValue = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr settingValuePtr = settingValue->Des();
-    
-    while( moreSettings )
-        {
-        err = cr->Get( crKey++, settingValuePtr ); 
-        if ( err == KErrNone && settingValue->Length() > 0 )
-            {
-            CAppListItem* listItem = NULL;
-            parser.Parse( *settingValue );
-            
-            // First try to find the custom title
-            HBufC* caption = HBufC::NewLC( settingValue->Length() );
-            TPtr captionPtr = caption->Des();
-            TInt err = parser.CustomTitle( captionPtr );    
-            TUid appUid = parser.Uid();
-                
-            if ( err != KErrNone || caption->Length() <= 0 )
-                {
-                CleanupStack::PopAndDestroy( caption );
-                caption = NULL;
-                }
-            
-            if ( !caption )
-                {
-                // Web address...
-                 if ( parser.Type() == EScutWebAddress || parser.Type() == EScutUnknown )
-                     {
-                     TUriParser parser;
-                     TInt err = parser.Parse(*settingValue);
-
-                     if (err == KErrNone)
-                         {
-                         // Remove scheme from the url.
-                         caption = parser.Extract(EUriHost).AllocLC();
-                         }
-                     else
-                         {
-                         caption = settingValue->AllocLC();
-                         }
-                     }
-                 //  ...application. Nothing else supported at the moment
-                 else
-                     {
-                     TApaAppInfo appInfo;
-                     err = iApaSession.GetAppInfo(appInfo, appUid);
-                     if (err == KErrNone)
-                         {
-                         caption = appInfo.iCaption.AllocLC();
-                         }
-                     }
-                }
-            if ( caption )
-                {
-                listItem = CAppListItem::NewLC( KNullUid , *caption  );
-                listItem->SetParamsL( *settingValue );
-                listItem->SetType( EAiScutSettingTypeUrl );
-                TLinearOrder<CAppListItem> sortMethod(CAppListItem::CompareCaption);
-                User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-                CleanupStack::Pop( listItem );
-                CleanupStack::PopAndDestroy( caption );
-                }
-            }
-        else
-            {
-            moreSettings = EFalse;
-            }
-        }
-    
-
-    
-    CleanupStack::PopAndDestroy( settingValue );
-    CleanupStack::PopAndDestroy( cr );
-    }
-// ---------------------------------------------------------------------------
-// Removes extra list items from the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::RemoveExtraItemsL()
-    {
-    // No Effect item.
-    CAppListItem* listItem = iListItems[0];
-    iListItems.Remove(0);
-    if (listItem)
-        {
-        delete listItem;
-        listItem = NULL;      
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the root entry containing mailboxes.
-// ---------------------------------------------------------------------------
-//
-CMsvEntry* CAiScutSettingsAppList::GetRootEntryL()
-    {
-    return iMsvSession->GetEntryL(KMsvRootIndexEntryIdValue);
-    }
-
-// ---------------------------------------------------------------------------
-// Adds remote mailboxes to the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddMailboxesL()
-    {
-    CMsvEntry* rootEntry = GetRootEntryL();
-
-    CleanupStack::PushL(rootEntry);
-    TBuf<255> mailboxId;
-
-    for (TInt i = rootEntry->Count() - 1; i >= 0; --i)
-        {
-        const TMsvEntry& tentry = (*rootEntry)[i];
-
-        if (tentry.iMtm == KSenduiMtmImap4Uid || tentry.iMtm == KSenduiMtmPop3Uid)
-            {
-            mailboxId.Num(tentry.Id());
-            AddMailboxL(tentry.iDetails, mailboxId);
-            }
-        }
-
-    CleanupStack::PopAndDestroy(rootEntry);
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a mailbox to the list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddMailboxL(const TDesC& aMailbox, const TDesC& aMailboxId)
-{
-    CAppListItem* listItem = CAppListItem::NewLC(KScutMessagingUid, aMailbox);
-
-  // Insert params containing mailbox id
-    HBufC* params = HBufC::NewLC(KScutParamMailbox().Length() + aMailboxId.Length());
-    params->Des().Copy(KScutParamMailbox);
-    params->Des().Append(aMailboxId);
-    listItem->SetParamsL(*params);
-    listItem->SetType( EAiScutSettingTypeApplication );
-    CleanupStack::PopAndDestroy(params);
-
-    TLinearOrder<CAppListItem> sortMethod(CAppListItem::CompareCaption);
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-    User::LeaveIfError(iMailboxes.Append(listItem));
-    listItem = NULL;
-}
-
-// ---------------------------------------------------------------------------
-// Removes a mailbox from the list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::RemoveMailboxL(const TDesC& aMailboxParam)
-    {
-    for (TInt i = iListItems.Count() - 1; i >= 0; --i)
-        {
-        CAppListItem* listItem = iListItems[i];
-        if (aMailboxParam.Compare(listItem->Params()) == 0)
-            {
-            // Also remove the mailbox from the mailbox array
-            for (TInt j = iMailboxes.Count() - 1; j >= 0; --j)
-                {
-                if (aMailboxParam.Compare(iMailboxes[j]->Params()) == 0)
-                    {
-                    iMailboxes.Remove(j);
-                    }
-                }
-
-            iListItems.Remove(i);
-            delete listItem;
-            listItem = NULL;
-
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the next valid application from application architecture server.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::GetNextValidApp(TApaAppInfo& aAppInfo)
-    {
-    TInt err = KErrNone;
-    TBool validAppFound = EFalse;
-
-    while (!validAppFound)
-        {
-        TApaAppInfo appInfo;
-        err = iApaSession.GetNextApp(appInfo);
-        if (err == KErrNone)
-            {
-            TApaAppCapabilityBuf capBuf;
-            TApaAppCapability cap;
-
-            if ((iApaSession.GetAppCapability(capBuf, appInfo.iUid) == KErrNone))
-                {
-                cap = capBuf();
-
-                TInt screenNumber(0);
-                err = iApaSession.GetDefaultScreenNumber( screenNumber, appInfo.iUid );
-
-                if ((err == KErrNone) && (cap.iAppIsHidden == EFalse) && (screenNumber == 0)) 
-                    {
-                    aAppInfo = appInfo;
-                    validAppFound = ETrue;
-                    }
-                }
-            }
-        else
-            {
-            return err;
-            }
-        }
-
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Updates the application list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::UpdateAppListL()
-    {
-    TBool updated = EFalse;
-    TBool added   = EFalse;
-
-    TInt totalAppCount = 0;
-
-    if (iApaSession.AppCount(totalAppCount) == KErrNone)
-        {
-        if (totalAppCount < iTotalAppCount)
-            {
-            RemoveUninstalledAppFromListL(iTotalAppCount - totalAppCount);
-            updated = ETrue;
-            added = EFalse;
-            }
-        else if (totalAppCount > iTotalAppCount)
-            {
-            AddInstalledAppToListL(totalAppCount - iTotalAppCount);
-            updated = ETrue;
-            added = ETrue;
-            }
-
-        iTotalAppCount = totalAppCount;
-        }
-
-    if (updated)
-        {
-        iObserver.HandleScutListEventL(MAiScutListObserver::EAppListUpdated, added);
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Figures out which application is missing from the list and adds it.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::AddInstalledAppToListL(TInt aCount)
-    {
-    TInt added = 0;
-    TApaAppInfo appInfo;
-    TInt err = GetNextValidApp(appInfo);
-
-    while (err == KErrNone)
-        {
-        TBool found = EFalse;
-
-        for (TInt i = iListItems.Count() - 1; i >= 0; --i)
-            {
-            if (iListItems[i]->Uid() == appInfo.iUid)
-                {
-                found = ETrue;
-                break;
-                }
-            }
-
-        if (!found)
-            {
-            AddApplicationL(appInfo);
-            if (++added == aCount)
-                {
-                // Found all of them, no need to go further
-                return ;
-                }
-            }
-
-        err = GetNextValidApp(appInfo);
-        }
-
-    // create registry 
-    CJavaRegistry* registry = CJavaRegistry::NewLC();
-
-    // get all uids stored in registry
-    RArray<TUid> uids;
-    registry->GetRegistryEntryUidsL( uids );
-
-    CleanupClosePushL(uids);
-
-    for (TInt javaIndex = 0; javaIndex < uids.Count(); ++javaIndex)
-        {
-        TInt found = EFalse;
-        for (TInt listIndex = 0; listIndex < iListItems.Count(); ++listIndex )
-            {
-            if (iListItems[listIndex]->Uid() == uids[javaIndex])
-                {
-                found = ETrue;
-                }
-            }
-        if (!found)
-            {
-            // get registry entry by uid (i.e. the first entry)
-            CJavaRegistryEntry* entry =
-                registry->RegistryEntryL( uids[javaIndex] );
-            if( entry )
-                {
-                CleanupStack::PushL(entry);
-
-                // get entry properties (i.e. name)
-                const TDesC& name = entry->Name();
-                TUid uid = entry->Uid();
-
-                    CAppListItem* listItem = CAppListItem::NewLC(uid, name);
-                  listItem->SetType( EAiScutSettingTypeApplication );
-                TLinearOrder<CAppListItem> sortMethod(CAppListItem::CompareCaption);
-                if (entry->Type() >= EGeneralApplication)
-                    {
-                    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-                    ++added;
-                    }
-                else
-                    {
-                    delete listItem;
-                    }
-                CleanupStack::Pop(listItem);
-
-                CleanupStack::PopAndDestroy(entry);
-                }
-            if (added == aCount)
-                {
-                break;
-                }
-            }
-        }
-    CleanupStack::PopAndDestroy(); // uids
-    CleanupStack::PopAndDestroy(registry);
-    }
-
-// ---------------------------------------------------------------------------
-// Figures out which application should not be in the list and removes it.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::RemoveUninstalledAppFromListL(TInt aCount)
-    {
-    TInt removed = 0;
-
-    for (TInt i = iListItems.Count() - 1; i >= 0; --i)
-        {
-        CAppListItem* listItem = iListItems[i];
-        TApaAppInfo ignored;
-        if (iApaSession.GetAppInfo(ignored, listItem->Uid()) == KErrNotFound)
-            {
-            iListItems.Remove(i);
-            delete listItem;
-            listItem = NULL;
-
-            if (++removed == aCount)
-                {
-                return ;
-                }
-            }
-        }
-    // create registry 
-    CJavaRegistry* registry = CJavaRegistry::NewLC();
-    // get all uids stored in registry
-    RArray<TUid> uids;
-    registry->GetRegistryEntryUidsL( uids );
-
-    CleanupClosePushL(uids);
-
-    for (TInt listIndex = iListItems.Count(); listIndex >= 0 ; --listIndex )
-        {
-        TInt found = EFalse;
-        for (TInt javaIndex = 0; javaIndex < uids.Count(); ++javaIndex)
-            {
-            if (iListItems[listIndex]->Uid() == uids[javaIndex])
-                {
-                found = ETrue;
-                }
-            }
-        if (!found)
-            {
-            // Item removed, remove from item list
-            CAppListItem* listItem = iListItems[listIndex];
-            iListItems.Remove(listIndex);
-            delete listItem;
-            if (++removed == aCount)
-                {
-                break;
-                }
-            }
-        }
-    CleanupStack::PopAndDestroy(); // uids
-    CleanupStack::PopAndDestroy(registry);
-    }
-
-TBool CAiScutSettingsAppList::IsNonNative(const TUid& aUid)
-    {
-    TBool ret = EFalse;
-
-    const TUid KMidletAppType = { 0x10210E26 };
-    TUid typeuid = KNullUid;
-
-    if (KErrNone == iApaSession.GetAppType(typeuid, aUid))
-        {
-        if (typeuid == KMidletAppType)
-            {
-            ret = ETrue;
-            }
-        }
-
-    return ret;
-    }
-
-
-TBool CAiScutSettingsAppList::IsInRom( const TUid& aUid )
-    {
-    TBool inROM = EFalse;
-
-    TApaAppInfo appInfo;    
-    if( iApaSession.GetAppInfo( appInfo, aUid ) == KErrNone )
-        {
-        // Does the full path start with z: 
-        if( appInfo.iFullName.FindC( 
-                PathInfo::RomRootPath().Left( KDriveAndColon ) ) >= 0 )            
-            {          
-            inROM = ETrue;                     
-            }
-        }
-    return inROM;
-    }
-
-
-// ---------------------------------------------------------------------------
-// Nested class to store individual application list items
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList::CAppListItem::CAppListItem(TUid aUid) : iUid(aUid)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::CAppListItem::ConstructL(const TDesC& aCaption)
-    {
-    iCaption = aCaption.AllocL();
-    // Defaults to application
-    iType = EAiScutSettingTypeApplication;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList::CAppListItem* CAiScutSettingsAppList::CAppListItem::NewLC(
-    TUid aUid, const TDesC& aCaption)
-    {
-    CAppListItem* self = new (ELeave) CAppListItem(aUid);
-    CleanupStack::PushL(self);
-    self->ConstructL(aCaption);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList::CAppListItem::~CAppListItem()
-    {
-    delete iCaption;
-    delete iParams;
-    }
-
-// ---------------------------------------------------------------------------
-// Compare method used to add the items to the list in sorted order.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsAppList::CAppListItem::CompareCaption(const CAppListItem& aFirst,
-    const CAppListItem& aSecond)
-    {
-    return aFirst.iCaption->Des().CompareC(*aSecond.iCaption);
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the item target application uid.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutSettingsAppList::CAppListItem::Uid() const
-    {
-    return iUid;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the item target application caption.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsAppList::CAppListItem::Caption() const
-    {
-    return TPtrC(*iCaption);
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the possible parameters for item target.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsAppList::CAppListItem::Params() const
-    {
-    TPtrC params;
-    if (iParams)
-        {
-        params.Set(*iParams);
-        }
-    return params;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets the parameters for the item target.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsAppList::CAppListItem::SetParamsL(const TDesC& aParams)
-    {
-    HBufC* newParams = aParams.AllocL();
-    delete iParams;
-    iParams = newParams;
-    }
-
-TAiScutSettingType CAiScutSettingsAppList::CAppListItem::Type() const
-{
-    return iType;
-}
-
-void CAiScutSettingsAppList::CAppListItem::SetType( TAiScutSettingType aType )
-{
-    iType = aType;
-}
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingsbkmlist.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bookmark list for settings listbox
-*
-*/
-
-
-#include <StringLoader.h>
-#include <activefavouritesdbnotifier.h> // For CActiveFavouritesDbNotifier
-
-#include <aiscutsettingsres.rsg>
-#include <aiscuttexts.rsg>
-
-#include "caiscutsettingsmodel.h"
-#include "caiscutsettingsapplist.h"
-#include "caiscutsettingsbkmlist.h"
-#include "taiscutparser.h"
-#include "caiscutsettingsitem.h"
-#include "aiscutdefs.h"
-
-#include "debug.h"
-
-
-_LIT( KText, "bkm=0x%x" );
-const TInt KTBUF16 = 16;
-
-// ======== MEMBER FUNCTIONS ========
-
-CAiScutSettingsBkmList::CAiScutSettingsBkmList(
-    CCoeEnv*                aEnv,
-    CAiScutSettingsModel*   aModel,
-    MAiScutListObserver&    aObserver
-    )
-    : iEnv(aEnv)
-    , iModel(aModel)
-    , iObserver(aObserver)
-{
-}
-
-void CAiScutSettingsBkmList::ConstructL()
-{
-}
-
-CAiScutSettingsBkmList* CAiScutSettingsBkmList::NewL(
-    CCoeEnv* aEnv,
-    CAiScutSettingsModel* aModel,
-    MAiScutListObserver& aObserver)
-{
-    CAiScutSettingsBkmList* self = new (ELeave) CAiScutSettingsBkmList(
-        aEnv, aModel, aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CAiScutSettingsBkmList::~CAiScutSettingsBkmList()
-{
-    iListItems.ResetAndDestroy();
-    delete iBookmarkDbObserver;
-}
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Returns the number of descriptor elements in a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsBkmList::MdcaCount() const
-{
-    return iListItems.Count();
-}
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Indexes into a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsBkmList::MdcaPoint(TInt aIndex) const
-{
-    if (aIndex < 0 || aIndex >= iListItems.Count())
-    {
-        TPtrC ret(KNullDesC);
-        return ret;
-    }
-    return iListItems[aIndex]->Caption();
-}
-
-// ---------------------------------------------------------------------------
-// Gets bookmark list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::GetBookmarkListL()
-{
-    iListItems.ResetAndDestroy();
-
-    iModel->ReadBookmarksL();
-
-    TInt count = iModel->BookmarkCount();
-
-    for (TInt i = count - 1; i >= 0; i--) // newest on top
-    {
-        CFavouritesItem* item = iModel->GetBookmark(i);
-
-        TUid  uid  = TUid::Uid(item->Uid());
-        TPtrC name = item->Name();
-
-        AddBookmarkL(uid, name);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Tells the bookmark list to start or stop observing for changes.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::SetObservingL(TBool aObserving)
-{
-    delete iBookmarkDbObserver;
-    iBookmarkDbObserver = NULL;
-
-    if (aObserving)
-    {
-
-        iBookmarkDbObserver = new (ELeave) CActiveFavouritesDbNotifier(
-            iModel->FavouritesDb(), *this);
-        iBookmarkDbObserver->Start();
-    }
-
-    iObserving = aObserving;
-}
-
-// ---------------------------------------------------------------------------
-// Finds the index of the given settings item in the bookmark list.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsBkmList::FindIndex(CAiScutSettingsItem& aItem)
-{
-    TInt index = KErrNotFound;
-
-    TAiScutParser parser;
-    parser.Parse(aItem.Value());
-    TUid uid = parser.ParseUid(parser.Get(EScutDefParamValue));
-
-    for (TInt i = iListItems.Count() - 1; i >= 0; --i)
-    {
-        if (iListItems[i]->Uid() == uid)
-        {
-            index = i;
-            break;
-        }
-    }
-
-    return index;
-}
-
-// ---------------------------------------------------------------------------
-// Returns target bookmark data from the given index.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsBkmList::GetDataByIndex(
-    TInt aIndex, TPtrC& aParams, TPtrC& aCaption) const
-{
-    if (aIndex >= 0 && aIndex < iListItems.Count())
-    {
-        CBkmListItem* item = iListItems[aIndex];
-        aParams.Set(item->Params());
-        aCaption.Set(item->Caption());
-        return KErrNone;
-    }
-
-    return KErrNotFound;
-}
-
-// ---------------------------------------------------------------------------
-// Adds an bookmark to the list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::AddBookmarkL(TUid aUid, const TDesC& aCaption)
-{
-    CBkmListItem* listItem = CBkmListItem::NewLC(aUid, aCaption);
-
-    TBuf<KTBUF16> buf;
-    buf.Format( KText, aUid.iUid );
-
-    listItem->SetParamsL(buf);
-    TLinearOrder<CBkmListItem> sortMethod(CBkmListItem::CompareCaption);
-    User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
-    CleanupStack::Pop(listItem);
-}
-
-// ---------------------------------------------------------------------------
-// Updates the bookmark list.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::UpdateBkmListL()
-{
-    GetBookmarkListL();
-    iObserver.HandleScutListEventL(MAiScutListObserver::EBkmListUpdated, EFalse);
-}
-
-// -----------------------------------------------------------------------------
-// From class MFavouritesDbObserver.
-// Handles database event.
-// -----------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::HandleFavouritesDbEventL(RDbNotifier::TEvent aEvent)
-{
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutSettingsBkmList::HandleFavouritesDbEventL aEvent = %d"), aEvent);
-	
-    if (aEvent == RDbNotifier::ECommit)
-    {
-        UpdateBkmListL();
-    }
-}
-
-// ---------------------------------------------------------------------------
-//Nested class to store individual bookmark list items
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsBkmList::CBkmListItem::CBkmListItem(TUid aUid) : iUid(aUid)
-{
-}
-
-void CAiScutSettingsBkmList::CBkmListItem::ConstructL(const TDesC& aCaption)
-{
-    iCaption = aCaption.AllocL();
-}
-
-CAiScutSettingsBkmList::CBkmListItem* CAiScutSettingsBkmList::CBkmListItem::NewLC(
-    TUid aUid, const TDesC& aCaption)
-{
-    CBkmListItem* self = new (ELeave) CBkmListItem(aUid);
-    CleanupStack::PushL(self);
-    self->ConstructL(aCaption);
-    return self;
-}
-
-CAiScutSettingsBkmList::CBkmListItem::~CBkmListItem()
-{
-    delete iCaption;
-    delete iParams;
-}
-
-// ---------------------------------------------------------------------------
-// Compare method used to add the items to the list in sorted order.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsBkmList::CBkmListItem::CompareCaption(const CBkmListItem& aFirst,
-    const CBkmListItem& aSecond)
-{
-    return aFirst.iCaption->Des().CompareC(*aSecond.iCaption);
-}
-
-// ---------------------------------------------------------------------------
-// Returns the item target bookmark uid.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutSettingsBkmList::CBkmListItem::Uid() const
-{
-    return iUid;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the item target bookmark caption.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsBkmList::CBkmListItem::Caption() const
-{
-    return TPtrC(*iCaption);
-}
-
-// ---------------------------------------------------------------------------
-// Returns the possible parameters for item target.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsBkmList::CBkmListItem::Params() const
-{
-    TPtrC params;
-    if (iParams)
-    {
-        params.Set(*iParams);
-    }
-    return params;
-}
-
-// ---------------------------------------------------------------------------
-// Sets the parameters for the item target.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsBkmList::CBkmListItem::SetParamsL(const TDesC& aParams)
-{
-    HBufC* newParams = aParams.AllocL();
-    delete iParams;
-    iParams = newParams;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingscontainer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,488 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut settings plug-in container.
-*
-*/
-
-
-#include <aknlists.h>
-#include <AknWaitDialog.h>
-#include <aknnotewrappers.h>
-#include <eikbtgpc.h>
-#include <gslistbox.h>
-#include <gsfwviewuids.h>
-//#include <csxhelp/ai.hlp.hrh>
-#include <aknradiobuttonsettingpage.h>
-#include <akntextsettingpage.h>
-#include <centralrepository.h>
-#include <StringLoader.h>
-
-#include <aiscutsettingsres.rsg>
-#include <aiscuttexts.rsg>
-
-#include "caiscutsettingscontainer.h"
-#include "caiscutsettingsmodel.h"
-#include "caiscutsettingsbkmlist.h"
-#include "caiscutsettingsitem.h"
-#include "aiscutpluginprivatecrkeys.h"
-#include "aiscutdefs.h"
-
-const TUid KUidAI = { 0x101F8701 }; // Active Standby Shortcuts help uid
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsContainer::CAiScutSettingsContainer()
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::ConstructL(const TRect& aRect)
-{
-    iListBox = new (ELeave) CAknSettingStyleListBox;
-    BaseConstructL(aRect, R_SCUT_SETTINGS_VIEW_TITLE, NULL);
-
-    iOldType = EAiScutSettingTypeUndefined;
-
-    CheckMiddleSoftkeyLabelL();
-
-    iModel->ActivateObservers(ETrue);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsContainer::~CAiScutSettingsContainer()
-{
-    HideWaitNoteDialog();
-}
-
-// ---------------------------------------------------------------------------
-// Sets pointer to settings plug-in model.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::SetModel(CAiScutSettingsModel* aModel)
-{
-    iModel = aModel;
-}
-
-// ---------------------------------------------------------------------------
-// Chandles a setting change command.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::HandleChangeCommandL()
-{       
-    if ( iChangeProcessInProgress )
-        {
-        return;
-        }
-    TBool changed = EFalse;
-    TInt current = iListBox->CurrentItemIndex();
-    CAiScutSettingsItem* item = iModel->Item(current);
-    if (!item)
-    {
-        return ;
-    }
-
-    TUint32 key = item->Key();
-    TBool locked = (0 != (key & KScutFlagBitLocked));
-
-    if (locked)
-    {
-        HBufC* text = iCoeEnv->AllocReadResourceLC(R_SCUT_SETTINGS_TXT_FIXED_ITEM);
-        CAknInformationNote* note = new (ELeave) CAknInformationNote(ETrue);
-        note->ExecuteLD(*text);
-        CleanupStack::PopAndDestroy(text);
-    }
-    else
-    {
-        TAiScutSettingType oldType = item->Type();
-        TInt newType = oldType;
-
-        CDesCArrayFlat* array = iCoeEnv->ReadDesC16ArrayResourceL(
-            R_SCUT_CHANGE_TO_PAGE_LBX);
-        CleanupStack::PushL(array);
-
-        CAknListQueryDialog* dialog = new(ELeave)CAknListQueryDialog(&newType);
-        CleanupStack::PushL(dialog);
-    	dialog->PrepareLC(R_SCUT_LISTQUERY_CHANGE_TO_PAGE);
-    	CleanupStack::Pop(dialog);
-        dialog->SetItemTextArray(array);
-	    dialog->SetOwnershipType(ELbmDoesNotOwnItemArray);
-	    iChangeProcessInProgress = ETrue;
-        if (dialog->RunLD())
-        {
-            item = iModel->Item(current);
-            if (newType == EAiScutSettingTypeUrl)
-            {
-                changed = HandleUrlChangeCommandL(*item, (newType != oldType));
-            }
-            else if (newType == EAiScutSettingTypeBookmark)
-            {
-                changed = HandleBookmarkChangeCommandL(*item, (newType != oldType));
-            }
-            else
-            {
-                changed = HandleAppListChangeCommandL(*item, (newType != oldType));
-            }
-            if ( changed )
-                {
-                ResetCurrentListL(current);    
-                }
-
-        }
-        iChangeProcessInProgress = EFalse;
-        CleanupStack::PopAndDestroy(array);
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsContainer::IsChangeDialogShowing()
-{
-    return (iAppListDialog || iBkmListDialog || iEditDialog);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::CloseChangeDialog()
-{
-    TKeyEvent keyEvent;
-
-    keyEvent.iCode      = EKeyEscape;
-    keyEvent.iScanCode  = EStdKeyEscape;
-    keyEvent.iModifiers = 0;
-    keyEvent.iRepeats   = 0;
-
-    CCoeControl* dialog = NULL;
-
-    if (iAppListDialog)
-    {
-        dialog = static_cast<CCoeControl*>(iAppListDialog);
-    }
-    else if (iBkmListDialog)
-    {
-        dialog = static_cast<CCoeControl*>(iBkmListDialog);
-    }
-    else if (iEditDialog)
-    {
-        dialog = static_cast<CCoeControl*>(iEditDialog);
-    }
-
-    if (dialog)
-    {
-        TRAP_IGNORE(dialog->OfferKeyEventL(keyEvent, EEventKey));
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::ResetCurrentListL(TInt aIndex)
-{
-    if (iModel->MdcaCount() == 0)
-    {
-        iListBox->HandleItemRemovalL();
-    }
-    else
-    {
-        iListBox->HandleItemAdditionL();
-    }
-
-    iListBox->SetCurrentItemIndex(aIndex);
-
-    CheckMiddleSoftkeyLabelL();
-}
-
-// ---------------------------------------------------------------------------
-// From CGSBaseContainer
-// Constructs the settings listbox.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::ConstructListBoxL(TInt /*aResLbxId*/)
-{
-    iListBox->ConstructL(this, EAknListBoxSelectionList);
-
-    // Set empty listbox's text.
-    HBufC* text = iCoeEnv->AllocReadResourceLC(R_SCUT_SETTINGS_TXT_ALL_FIXED);
-    iListBox->View()->SetListEmptyTextL(*text);
-    CleanupStack::PopAndDestroy(text);
-
-    iListBox->Model()->SetItemTextArray(iModel);
-    iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
-}
-
-// ---------------------------------------------------------------------------
-// Chandles a setting change command to select application from a list.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsContainer::HandleAppListChangeCommandL(CAiScutSettingsItem& aItem,
-    TBool /*aNew*/)
-{
-    
-    TBool changed = EFalse;
-    
-    iChangeProcessStopped = EFalse;
-    
-    if (!iModel->AppList()->IsReady())
-    {
-        ShowWaitNoteDialogL(); // Blocks until applist reports that it is ready.
-    }
-    // If wait note was "killed" then don't continue the change process
-    // If the process is not stopped here it could lead to situation where
-    // self is deleted before the ShowWaitNoteDialogL() returns
-    if ( iChangeProcessStopped )
-        {
-        return EFalse;
-        }
-
-    TUint32 key = aItem.Key();
-    TBool optional  = (0 != (key & KScutFlagBitOptionallyVisible));
-    TBool scrollkey = (0 != ((key & 0xFFFF) < EAiScutSoftKeyLeft));
-
-    if (optional && scrollkey)
-    {
-        iModel->AppList()->AddExtraItemsL();
-    }
-
-    TInt index = iModel->AppList()->FindIndex(aItem);
-    TInt oldIndex = index;
-
-    iAppListDialog = new (ELeave) CAknRadioButtonSettingPage(
-        R_SCUT_SETTINGS_APPLIST_PAGE, index, iModel->AppList());
-
-    iAppListDialog->SetSettingTextL(aItem.Title());
-    iAppListDialog->ConstructL();
-
-    if (iAppListDialog->ExecuteLD(CAknSettingPage::EUpdateWhenChanged) &&
-        index != oldIndex)
-    {
-        TUid uid;
-        TPtrC params;
-        TPtrC caption;
-        TAiScutSettingType type;
-        if (iModel->AppList()->GetDataByIndex(index, uid, params, caption, type) == KErrNone)
-        {
-            if ( type == EAiScutSettingTypeUrl )
-                {
-                aItem.ChangeUrlL( params );
-                }
-            else
-                {                
-                aItem.ChangeApplicationL(uid, params, caption);
-                }
-            iModel->SaveItemL(aItem);
-            changed = ETrue;
-        }
-    }
-
-    if (optional && scrollkey)
-    {
-        iModel->AppList()->RemoveExtraItemsL();
-    }
-
-    iAppListDialog = NULL;
-    return changed;
-}
-
-// ---------------------------------------------------------------------------
-// Chandles a setting change command to select bookmark from a list.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsContainer::HandleBookmarkChangeCommandL(CAiScutSettingsItem& aItem,
-    TBool /*aNew*/)
-{
-
-    TBool changed = EFalse;
-    iModel->BkmList()->GetBookmarkListL();
-    TInt index = iModel->BkmList()->FindIndex(aItem);
-    TInt oldIndex = index;
-
-    iBkmListDialog = new (ELeave) CAknRadioButtonSettingPage(
-        R_SCUT_SETTINGS_APPLIST_PAGE, index, iModel->BkmList());
-
-    iBkmListDialog->SetSettingTextL(aItem.Title());
-    iBkmListDialog->ConstructL();
-
-    if (iBkmListDialog->ExecuteLD(CAknSettingPage::EUpdateWhenChanged) &&
-        index != oldIndex)
-    {
-        TPtrC params;
-        TPtrC caption;
-        if (iModel->BkmList()->GetDataByIndex(index, params, caption) == KErrNone)
-        {
-            aItem.ChangeBookmarkL(params, caption);
-            iModel->SaveItemL(aItem);
-            changed = ETrue;
-        }
-    }
-
-    iBkmListDialog = NULL;
-    return changed;
-}
-
-// ---------------------------------------------------------------------------
-// Chandles a setting change command to edit an URL.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsContainer::HandleUrlChangeCommandL(CAiScutSettingsItem& aItem,
-    TBool aNew)
-{
-    TBool changed = EFalse;
-    HBufC* newUrl = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr urlPtr = newUrl->Des();
-
-    if (!aNew)
-    {
-        urlPtr.Copy(aItem.Value());
-    }
-
-    if (EditTextL(R_SCUT_TYPE_URL_PAGE , urlPtr))
-    {
-        aItem.ChangeUrlL(urlPtr);
-        iModel->SaveItemL(aItem);
-        changed = ETrue;
-    }
-
-    CleanupStack::PopAndDestroy(newUrl);
-    return changed;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsContainer::EditTextL(TInt aResId, TDes& aDes)
-{
-    TBool ret = EFalse;
-
-    iEditDialog = new (ELeave) CAknTextSettingPage(aResId, aDes);
-
-    if (iEditDialog->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
-    {
-        if (aDes.Length())
-        {
-            ret = ETrue;
-        }
-    }
-
-    iEditDialog = NULL;
-
-    return ret;
-}
-
-// ---------------------------------------------------------------------------
-// Shows the wait note dialog.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::ShowWaitNoteDialogL()
-{
-    if (!iWaitDialog)
-    {
-        iWaitDialog = new (ELeave) CAknWaitDialog(
-            (reinterpret_cast<CEikDialog**> (&iWaitDialog)),
-            ETrue                                               // aVisibilityDelayOff
-        );
-        iWaitDialog->ExecuteLD(R_SCUT_WAIT_NOTE);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Hides the wait note dialog.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::HideWaitNoteDialog()
-{
-    if (iWaitDialog)
-    {
-        TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); // deletes the dialog.
-        iWaitDialog = NULL;
-    }
-}
-
-void CAiScutSettingsContainer::StopShortcutChangeProcess()
-{
-    iChangeProcessStopped = ETrue;
-    HideWaitNoteDialog();
-    if ( IsChangeDialogShowing() )
-        {
-        CloseChangeDialog();    
-        }    
-}
-
-// ---------------------------------------------------------------------------
-// Gets Help
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::GetHelpContext(TCoeHelpContext& aContext) const
-{
-    aContext.iMajor   = KUidAI;
-    //aContext.iContext = KSET_HLP_PERSONAL_SHORTCUTS; // This is specified in HRH file
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CAiScutSettingsContainer::OfferKeyEventL(
-    const TKeyEvent& aKeyEvent, TEventCode aType)
-{
-    switch (aKeyEvent.iCode)
-    {
-    case EKeyUpArrow:
-    case EKeyDownArrow:
-        {
-            TKeyResponse resp = iListBox->OfferKeyEventL(aKeyEvent, aType);
-            return resp;
-        }
-
-    case EKeyLeftArrow:
-    case EKeyRightArrow:
-        // Listbox takes all event even if it doesn't use them:
-        return EKeyWasNotConsumed;
-		
-    default:
-        break;
-    }
-
-    // Now it's iListBox's job to process the key event
-    return iListBox->OfferKeyEventL(aKeyEvent, aType);
-}
-
-// ---------------------------------------------------------------------------
-// Checks if there is a need to update the middle softkey label.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsContainer::CheckMiddleSoftkeyLabelL()
-{
-    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-    if (cba)
-    {
-        cba->MakeCommandVisible(EAiScutSettingsCmdChange, (iModel->MdcaCount() != 0));
-    }
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingsimplementationtable.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation table for shortcut settings plug-in
-*
-*/
-
-
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-#include "caiscutsettings.h"
-#include <platform/mw/aiscutuids.hrh>
-
-/** Implementation table for shortcut settings plug-in */
-const TImplementationProxy KAiScutSettingsImplementationTable[] =
-{
-    IMPLEMENTATION_PROXY_ENTRY(
-        AI_UID_ECOM_IMPLEMENTATION_SETTINGS_SCUTPLUGIN, CAiScutSettings::NewL)
-};
-
-
-// ---------------------------------------------------------------------------
-// Gate/factory function.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-{
-    aTableCount =
-        sizeof(KAiScutSettingsImplementationTable) /
-        sizeof(TImplementationProxy);
-    return KAiScutSettingsImplementationTable;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingsitem.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,588 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for shortcut setting items
-*
-*/
-
-
-
-#include <StringLoader.h>
-#include <centralrepository.h>
-#include <msvuids.h>        // For KMsvRootIndexEntryIdValue
-#include <SenduiMtmUids.h>
-#include <uri16.h>                  // For TUriParser16
-#include <aiscutsettingsres.rsg>
-#include <aiscuttexts.rsg>
-#include "caiscutsettingsitem.h"
-#include "caiscutsettingsmodel.h"
-#include "aiscutpluginprivatecrkeys.h"
-#include "taiscutparser.h"
-#include "aiscutdefs.h"
-#include "aiscutsettings.hrh"
-#include "aidefaultshortcut.h"
-#include "debug.h"
-
-const TInt KMaxBufSize = 250;
-// ======== MEMBER FUNCTIONS ========
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-
-CAiScutSettingsItem::CAiScutSettingsItem(
-    CAiScutSettingsModel&   aModel,
-    TInt                    aIndex,
-    TUint32                 aKey)
-    : iModel(aModel)
-        , iIndex(aIndex)
-        , iKey(aKey)
-{
-}
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsItem::ReadL(CRepository* aRepository)
-{
-    if( !aRepository )
-       {
-          return;
-       }
-
-    HBufC* buffer = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    // try user key first.
-    TUint32 key = iKey & KScutBitMaskThemeDefault;
-    TInt err = aRepository->Get(key, bufferPtr);
-
-    if (err == KErrNone)
-    {
-        err = ParseValueL(bufferPtr);
-    }
-
-    if (err == KErrNone)
-    {
-        iKey = key;
-    }
-    else
-    {
-        // if no user key try default key then.
-        key = iKey | KScutFlagBitThemeDefault;
-        err = aRepository->Get(key, bufferPtr);
-        if (err == KErrNone)
-        {
-            err = ParseValueL(bufferPtr);
-        }
-
-    }
-
-    if (err != KErrNone ||
-        (iType == EAiScutSettingTypeApplication && iModel.IsHidden(iUid)))
-    {
-        HBufC* buf = HBufC::NewLC(NCentralRepositoryConstants::KMaxUnicodeStringLength);        
-        TPtr bufPtr = buf->Des();
-        HBufC* caption = NULL;
-
-        // Get the default shortcut uid for key 'key' 
-        iType = EAiScutSettingTypeApplication;
-        TAiDefaultShortcut::GetDefaultShortcut(key, iUid, bufPtr);
-
-        err = iModel.GetAppCaption(iUid, bufPtr);
-        if (err == KErrNone)
-        {
-            caption = bufPtr.AllocLC();
-            CreateListBoxLineL(*caption);
-            CleanupStack::PopAndDestroy(caption);
-        }
-
-        CleanupStack::PopAndDestroy(buf);
-
-    }
-
-    delete iValue;
-    iValue = NULL;
-    iValue = bufferPtr.AllocL();
-
-    CleanupStack::PopAndDestroy(buffer);
-
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- TInt CAiScutSettingsItem::Save(CRepository* aRepository)
- {
-
-    if( !aRepository )
-    {
-        return KErrGeneral;
-    }
-
-    iKey = iKey & KScutBitMaskThemeDefault;
-
-    TInt err = aRepository->Set(iKey, Value());
-
-    return err;
- }
-
-
- // ---------------------------------------------------------------------------
- // Constructs a new settings item leaving it on the cleanup stack.
- // ---------------------------------------------------------------------------
- //
- CAiScutSettingsItem* CAiScutSettingsItem::NewLC(
-    CAiScutSettingsModel&   aModel,
-    TInt                    aIndex,
-    TUint32                 aKey)
- {
-    CAiScutSettingsItem* self = new (ELeave) CAiScutSettingsItem(
-        aModel, aIndex, aKey);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- CAiScutSettingsItem* CAiScutSettingsItem::NewLC(
-    CAiScutSettingsModel&   aModel,
-    TInt                    aIndex,
-    TUint32                 aKey,
-    const TDesC&            aValue)
- {
-    CAiScutSettingsItem* self = new (ELeave) CAiScutSettingsItem(
-        aModel, aIndex, aKey);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aValue);
-    return self;
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::ConstructL()
- {
-
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::ConstructL(const TDesC& aValue)
- {
-     ParseValueL(aValue);
-     iValue = aValue.AllocL();
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- CAiScutSettingsItem::~CAiScutSettingsItem()
- {
-    delete iValue;
-    delete iListBoxLine;
- }
-
- // ---------------------------------------------------------------------------
- //
- // ---------------------------------------------------------------------------
- //
- TInt CAiScutSettingsItem::ParseValueL(const TDesC& aValue)
- {
-    HBufC* caption = NULL;
-    TInt err = KErrNone;
-    HBufC* buf = HBufC::NewLC(KMaxBufSize);
-    TPtr bufPtr = buf->Des();
-
-    TAiScutParser parser;
-    parser.Parse(aValue);
-
-    TShortcutType type = parser.Type();
-
-    iUid = parser.Uid();
-    iType = EAiScutSettingTypeApplication;
-
-    switch (type)
-    {
-        case EScutApplication:
-        case EScutApplicationWithParams:
-        case EScutApplicationView:
-        case EScutLogsMissedCallsView:
-        case EScutLogsDialledCallsView:
-        case EScutLogsReceivedCallsView:
-        case EScutLogsMainView:
-            err = iModel.GetAppCaption(iUid, bufPtr);
-            if (err == KErrNone)
-            {
-                caption = bufPtr.AllocLC();
-            }
-            break;
-
-        case EScutNewMessage:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_NEW_MSG, iModel.Env());
-            break;
-
-        case EScutNewEmail:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_NEW_EMAIL, iModel.Env());
-            break;
-
-        #ifdef __SYNCML_DS_EMAIL
-            case EScutNewSyncMLMail:
-                caption = StringLoader::LoadLC(
-                    R_SCUT_SETTINGS_NEW_SYNCML_MAIL, iModel.Env());
-                break;
-        #endif
-
-        case EScutNewPostcard:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_NEW_POSTCARD, iModel.Env());
-            break;
-
-        case EScutNewAudioMsg:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_NEW_AUDIO_MSG, iModel.Env());
-            break;
-
-        case EScutNewMsgType:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_SELECT_MSG_TYPE, iModel.Env());
-            break;
-
-        case EScutChangeTheme:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_CHANGE_THEME, iModel.Env());
-            break;
-
-        case EScutMailbox:
-            {
-            err = KErrNotFound;
-            // Parse the mailbox id from the definition
-            TLex lex(parser.Get(EScutDefParamValue));
-            TInt mailboxId = KErrNone;
-            lex.Val(mailboxId);
-
-            CMsvSession* msvSession = CMsvSession::OpenAsObserverL(*iModel.AppList());
-            CleanupStack::PushL(msvSession);
-
-            CMsvEntry* rootEntry = msvSession->GetEntryL(KMsvRootIndexEntryIdValue);
-            CleanupStack::PushL(rootEntry);          
-            
-            // Searching the mailbox name
-            for (TInt i = rootEntry->Count() - 1; i >= 0; --i)
-            {
-                const TMsvEntry& tentry = (*rootEntry)[i];
-
-                if ((tentry.iMtm == KSenduiMtmImap4Uid || tentry.iMtm == KSenduiMtmPop3Uid) &&
-                    tentry.Id() == mailboxId)
-                {
-                    caption = tentry.iDetails.AllocL();
-                    err = KErrNone;
-                    break;
-                }
-            }
-            CleanupStack::PopAndDestroy(rootEntry);
-            CleanupStack::PopAndDestroy(msvSession);
-            if ( caption )
-                {
-                CleanupStack::PushL( caption );
-                }
-            }
-            break;
-
-        case EScutNoEffect:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_NO_EFFECT, iModel.Env());
-            break;
-
-        case EScutConnectivityStatusView:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_CONNECTIVITY_STATUS, iModel.Env());
-            break;
-
-        case EScutApplicationManagerView:
-            caption = StringLoader::LoadLC(
-                R_SCUT_SETTINGS_APPMNGR, iModel.Env());
-            break;
-
-        case EScutBookmark:
-            {
-            // aValue = "localapp:0x102750fb?bkm=0x12345678"
-            iUid = KScutSettingsDllUid;
-            iType = EAiScutSettingTypeBookmark;
-            TUid uid = parser.ParseUid(parser.Get(EScutDefParamValue));
-            TRAP(err, iModel.GetBkmCaptionL(uid, bufPtr));
-            if (err == KErrNone)
-            {
-                caption = bufPtr.AllocLC();
-
-                __PRINT( __DBG_FORMAT( "XAI: CAiScutSettingsItem bkm uid = 0x%x caption = '%S' "),
-                uid.iUid, caption);
-            }
-            }
-            break;
-
-        case EScutWebAddress:
-        default:
-            // treat unknown shortcuts as typed urls.
-            iUid.iUid = 0;
-            iType = EAiScutSettingTypeUrl;
-        HBufC* tmp = HBufC::NewLC( aValue.Length() );
-        TPtr tmpPtr = tmp->Des();
-        TInt err = parser.CustomTitle( tmpPtr );
-
-        if ( err != KErrNone || tmp->Length() <= 0 )
-            {
-            CleanupStack::PopAndDestroy( tmp );
-            caption = aValue.AllocLC();
-            }
-        else
-            {
-            caption = tmp;
-            }
-            break;
-        }
-
-    if (caption)
-    {
-        CreateListBoxLineL(*caption);
-        CleanupStack::PopAndDestroy(caption);
-    }
-
-    CleanupStack::PopAndDestroy(buf);
-    return err;
- }
-
- // ---------------------------------------------------------------------------
- // Changes the setting item target application.
- // ---------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::ChangeApplicationL(TUid aUid, const TDesC& aParams,
-        const TDesC& aCaption)
- {
-    iUid = aUid;
-    iType = EAiScutSettingTypeApplication;
-
-    HBufC* newValue = NULL;
-    TAiScutParser parser;
-    parser.ComposeL(newValue, iUid, aParams);
-
-    delete iValue;
-    iValue = NULL;
-    iValue = newValue;
-
-    CreateListBoxLineL(aCaption);
- }
-
- // -----------------------------------------------------------------------------
- // Changes the setting item target bookmark.
- // -----------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::ChangeBookmarkL(const TDesC& aParams, const TDesC& aCaption)
- {
-    iUid = KScutSettingsDllUid;
-    iType = EAiScutSettingTypeBookmark;
-
-    HBufC* newValue = NULL;
-    TAiScutParser parser;
-    parser.ComposeL(newValue, iUid, aParams);
-
-    delete iValue;
-    iValue = NULL;
-    iValue = newValue;
-
-    CreateListBoxLineL(aCaption);
- }
-
- // -----------------------------------------------------------------------------
- // Changes the setting item target url.
- // -----------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::ChangeUrlL(const TDesC& aUrl)
- {
-    iUid.iUid = 0;
-    iType = EAiScutSettingTypeUrl;
-
-    delete iValue;
-    iValue = NULL;
-    iValue = aUrl.AllocL();
-
-    CreateListBoxLineL(*iValue);
- }
-
- // -----------------------------------------------------------------------------
- // Creates a formatted listbox line.
- // -----------------------------------------------------------------------------
- //
- void CAiScutSettingsItem::CreateListBoxLineL(const TDesC& aCaption)
- {
-    HBufC* title = CreateItemTitleLC();
-
-    TPtrC caption;
-    caption.Set(aCaption);
-
-    TUriParser parser;
-    TInt err = parser.Parse(aCaption);
-    if (err == KErrNone)
-    {
-        // Remove scheme from the url.
-        const TDesC& host = parser.Extract(EUriHost);
-        if (host.Length())
-        {
-            caption.Set(host);
-        }
-    }
-
-    // Format (" \t%S\t\t%S") without %S characters.
-    TInt formatLength = KSettingListboxLineFormat().Length();
-
-    HBufC* listBoxLine =
-        HBufC::NewLC(title->Length() + caption.Length() + formatLength);
-
-    TPtr ptr = listBoxLine->Des();
-    ptr.Format(KSettingListboxLineFormat, title, &caption);
-
-    delete iListBoxLine;
-    iListBoxLine = NULL;
-    iListBoxLine = listBoxLine;
-    CleanupStack::Pop(listBoxLine);
-
-    TInt titlePos = ptr.Find(*title);
-    if (titlePos < 0)
-    {
-        titlePos = 0;
-    }
-    iTitle.Set(ptr.Mid(titlePos, title->Length()));
-
-    CleanupStack::PopAndDestroy(title);
- }
-
- // -----------------------------------------------------------------------------
- // Creates a setting item title.
- // -----------------------------------------------------------------------------
- //
- HBufC* CAiScutSettingsItem::CreateItemTitleLC()
- {
-     HBufC* title = NULL;
-     if (iKey & KScutFlagBitOptionallyVisible)
-     {
-        // Optionally visible shortcuts are either navigation keys or soft keys.
-        title = CreateOptionallyVisibleKeyTitleLC();
-     }
-
-     // Make sure something gets loaded and put to cleanup stack.
-     if (!title)
-     {
-        title = StringLoader::LoadLC(
-            R_SCUT_SETTINGS_TXT_LINKN, iIndex+1, iModel.Env());
-     }
-
-     __PRINT( __DBG_FORMAT( "XAI: CreateItemTitleLC %d key = 0x%x (0x%x) title = '%S' "),
-            iIndex+1, iKey, (iKey & 0xFFFF), title);
-
-     return title;
- }
-
- // -----------------------------------------------------------------------------
- // Creates a key title for an optionally visible shortcut.
- // -----------------------------------------------------------------------------
- //
- HBufC* CAiScutSettingsItem::CreateOptionallyVisibleKeyTitleLC()
- {
-    HBufC* title = NULL;
-    TInt resourceId = 0;
-
-    switch (iKey & 0xFFFF)
-    {
-        case EAiScutScrollKeyLeft:
-            resourceId = R_SCUT_SETTINGS_SCROLL_LEFT;
-            break;
-
-        case EAiScutScrollKeyRight:
-            resourceId = R_SCUT_SETTINGS_SCROLL_RIGHT;
-            break;
-
-        case EAiScutScrollKeyUp:
-            resourceId = R_SCUT_SETTINGS_SCROLL_UP;
-            break;
-
-        case EAiScutScrollKeyDown:
-            resourceId = R_SCUT_SETTINGS_SCROLL_DOWN;
-            break;
-
-        case EAiScutSelectionKey:
-            resourceId = R_SCUT_SETTINGS_SELECTION_KEY;
-            break;
-
-        case EAiScutSoftKeyLeft:
-            resourceId = R_SCUT_SETTINGS_SOFTKEY_LEFT;
-            break;
-
-        case EAiScutSoftKeyRight:
-            resourceId = R_SCUT_SETTINGS_SOFTKEY_RIGHT;
-            break;
-
-        default:
-            resourceId = 0;
-            break;
-        }
-
-    if (resourceId)
-    {
-        title = StringLoader::LoadLC(resourceId, iModel.Env());
-    }
-    else
-    {
-        title = NULL;
-    }
-
-    return title;
- }
-
- // ---------------------------------------------------------------------------
- // Returns the setting item value.
- // ---------------------------------------------------------------------------
- //
- TPtrC CAiScutSettingsItem::Value() const
- {
-     if(iValue)
-         {
-         return TPtrC( *iValue );
-         }
-     return TPtrC(KNullDesC);
- }
-
- // ---------------------------------------------------------------------------
- // Returns the formatted listbox line descriptor.
- // ---------------------------------------------------------------------------
- //
- TPtrC CAiScutSettingsItem::ListBoxLine() const
- {
-     if(iListBoxLine)
-         {
-         return TPtrC( *iListBoxLine );
-         }
-     return TPtrC(KNullDesC);
- }
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutsettingsmodel.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,603 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shrortcut settings plug-in model.
-*
-*/
-
-
-#include <centralrepository.h>
-#include <eikenv.h>
-#include <menu2internalcrkeys.h>
-
-#include "caiscutsettings.h"
-#include "caiscutsettingsmodel.h"
-#include "caiscutsettingscontainer.h"
-#include "caiscutsettingsitem.h"
-#include "aiscutpluginprivatecrkeys.h"
-#include "aiscutdefs.h"
-#include "aiscutappuidparser.h"
-#include "aiscutrepositorywatcher.h"
-
-#include "debug.h"
-
-LOCAL_C TInt CompareKey(const TUint32& aLeft, const TUint32& aRight)
-{
-    TBool softkey1 = (0 != ((aLeft  & 0xFFFF) >= EAiScutSoftKeyLeft));
-    TBool softkey2 = (0 != ((aRight & 0xFFFF) >= EAiScutSoftKeyLeft));
-    TUint32 left  = aLeft  & (KScutBitMaskThemeDefault & KScutBitMaskLocked);
-    TUint32 right = aRight & (KScutBitMaskThemeDefault & KScutBitMaskLocked);
-
-    // Softkey shortcuts are always sorted to be smallest.
-    if (!(softkey1 && softkey2))
-    {
-        if (softkey1)
-        {
-            return -1;
-        }
-        else if (softkey2)
-        {
-            return 1;
-        }
-    }
-
-    if (left < right)
-    {
-        return -1;
-    }
-    else if (left > right)
-    {
-        return 1;
-    }
-
-    return 0;
-}
-
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsModel* CAiScutSettingsModel::NewL(CAiScutSettings& aPlugin,
-    CCoeEnv* aEnv)
-{
-    CAiScutSettingsModel* self = new (ELeave) CAiScutSettingsModel(aPlugin, aEnv);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsModel::CAiScutSettingsModel(CAiScutSettings& aPlugin, CCoeEnv* aEnv) 
-    : iPlugin(aPlugin), iEnv(aEnv)
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsModel::~CAiScutSettingsModel()
-{
-    ActivateObservers(EFalse);
-
-    delete iSettingsNotifier;
-    delete iRepository;
-
-    delete iHiddenAppsNotifier;
-    delete iHiddenAppsRepository;
-
-    iHiddenApps.Close();
-
-    delete iAppList;
-    delete iBkmList;
-
-    iSettings.ResetAndDestroy();
-    iKeys.Reset();
-    delete iFavItemList;
-    iBookmarkDb.Close();
-    iBookmarkSess.Close();
-    iApaSession.Close();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::ConstructL()
-{
-    User::LeaveIfError(iApaSession.Connect());
-    User::LeaveIfError(iBookmarkSess.Connect());
-    User::LeaveIfError(iBookmarkDb.Open(iBookmarkSess, KBrowserBookmarks));
-
-    iRepository = CRepository::NewL(KCRUidShortcutItems);
-
-    iHiddenAppsRepository = CRepository::NewL(KCRUidMenu);
-
-    // Create cenrep key observer for monitoring settings changes
-    // when theme is changed.
-    iSettingsNotifier = CAiScutRepositoryWatcher::NewL(
-        KCRUidShortcutItems,
-        TCallBack(HandleShortcutsChanged, this),
-        iRepository);
-
-    iSettingsNotifier->StartListeningL();
-
-    iHiddenAppsNotifier = CAiScutRepositoryWatcher::NewL(
-        KCRUidMenu,
-        KMenuHideApplication,
-        CCenRepNotifyHandler::EStringKey,
-        TCallBack(HandleHiddenAppsChanged, this),
-        iHiddenAppsRepository);
-
-    iHiddenAppsNotifier->StartListeningL();
-
-    GetHiddenAppsL();
-
-    iAppList = CAiScutSettingsAppList::NewL(iEnv, *this);
-    iAppList->StartL();
-
-    iBkmList = CAiScutSettingsBkmList::NewL(iEnv, this, *this);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::SetSettingsKeys(RArray<TUint32>& aKeys)
-    {
-    iKeys.Reset();
-    
-    for( TInt i = 0; i < aKeys.Count(); i++ )
-        {
-        TUint32 value( aKeys[i] );
-        
-        iKeys.Append( value );
-        }        
-    }
-    
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::UpdateSettingsL()
-{
-    if( !iPlugin.Activated() )
-        {
-        return;
-        }
-        
-    iSettings.ResetAndDestroy();
-
-    TInt keyCount( iKeys.Count() );
-
-    if( keyCount > 0 )
-        {
-        for( TInt i = 0; i < keyCount; i++ )
-            {
-            CAiScutSettingsItem* setting = CAiScutSettingsItem::NewLC(
-                *this, i, iKeys[i] );
-
-            setting->ReadL( iRepository );
-
-            User::LeaveIfError( iSettings.Append( setting ) );
-            CleanupStack::Pop( setting );           
-            }
-                
-        return;
-        }
-        
-    RArray<TUint32> defaultKeys;
-    CleanupClosePushL(defaultKeys);
-    
-    // Find the default keys and user defined keys.
-    iRepository->FindL(
-        KScutCenRepKeyThemeDefault, KScutCenRepKeyMask, defaultKeys);        
-
-    TInt i;
-    TUint32 defaultKey;
-    TUint32 userKey;
-    TInt count;
-    TInt lockedKeys  = 0;
-    TInt visibleKeys = 0;
-
-    TLinearOrder<TUint32> order(CompareKey);
-    defaultKeys.Sort(order);
-
-    count = defaultKeys.Count();
-    for (i = 0; i < count; ++i)
-    {
-        defaultKey = defaultKeys[i];
-        userKey = defaultKey & KScutBitMaskThemeDefault;
-        // We show only actual shortcuts
-        if ( (! ( defaultKey & KScutFlagBitIconOverride )) && 
-             (! ( defaultKey & KScutFlagBitToolbarShortcut )))
-            {                               
-    		__PRINT( __DBG_FORMAT( "XAI:   %d. key = 0x%x"), i+1, 
-    			(defaultKey & (KScutBitMaskThemeDefault & KScutBitMaskLocked)));
-
-            if (!(userKey & KScutFlagBitOptionallyVisible))
-            {
-                visibleKeys++;
-            }
-
-            TBool locked = (0 != (userKey & KScutFlagBitLocked));
-
-            if (locked)
-            {
-                lockedKeys++;
-            }
-            else
-            {
-                CAiScutSettingsItem* setting = CAiScutSettingsItem::NewLC(
-                    *this, visibleKeys-1, defaultKey);
-
-                setting->ReadL(iRepository);
-
-                User::LeaveIfError(iSettings.Append(setting));
-                CleanupStack::Pop(setting);
-            }
-        }
-
-    }
-
-	__PRINT( __DBG_FORMAT("XAI:   %d keys, %d locked"), count, lockedKeys);
-
-    CleanupStack::PopAndDestroy(&defaultKeys);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::UpdateSettingsContainerL()
-{
-    if (iContainer)
-    {
-        if (iContainer->IsChangeDialogShowing())
-        {
-            iContainer->CloseChangeDialog();
-        }
-    }
-
-    UpdateSettingsL();
-
-    if (iContainer)
-    {
-        iContainer->ResetCurrentListL(0);
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::GetHiddenAppsL()
-{
-    HBufC* buffer = HBufC::NewLC(
-        NCentralRepositoryConstants::KMaxUnicodeStringLength);
-    TPtr bufferPtr = buffer->Des();
-
-    iHiddenAppsRepository->Get(KMenuHideApplication, bufferPtr);
-
-	__PRINT( __DBG_FORMAT("XAI: CAiScutSettingsModel::GetHiddenAppsL '%S' "), buffer);
-
-    iHiddenApps.Reset();
-    TAiScutAppUidParser uidParser(bufferPtr, iHiddenApps);
-    uidParser.ParseL();
-
-    CleanupStack::PopAndDestroy(buffer);
-}
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Returns the number of descriptor elements in a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::MdcaCount() const
-{
-    return iSettings.Count();
-}
-
-// ---------------------------------------------------------------------------
-// From MDesCArray
-// Indexes into a descriptor array.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutSettingsModel::MdcaPoint(TInt aIndex) const
-{
-    if (aIndex < 0 || aIndex >= iSettings.Count())
-    {
-        TPtrC ret(KNullDesC);
-        return ret;
-    }
-
-    return iSettings[aIndex]->ListBoxLine();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::HandleShortcutsChanged(TAny* aPtr)
-{
-	__PRINTS( "XAI: CAiScutSettingsModel::HandleShortcutsChanged");
-
-    if (aPtr)
-        {
-        CAiScutSettingsModel* self = static_cast<CAiScutSettingsModel*>(aPtr);
-        TRAP_IGNORE(self->UpdateSettingsContainerL());
-        }
-
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::HandleHiddenAppsChanged(TAny* aPtr)
-{
-	__PRINTS("XAI: CAiScutSettingsModel::HandleHiddenAppsChanged");
-
-    if (aPtr)
-        {
-        CAiScutSettingsModel* self = static_cast<CAiScutSettingsModel*>(aPtr);
-
-        TRAP_IGNORE(
-            self->iAppList->StartL();
-            self->GetHiddenAppsL();
-            self->UpdateSettingsContainerL() ) // TRAP_IGNORE
-        }
-
-    return KErrNone;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutSettingsModel::IsHidden(const TUid& aAppUid) const
-{
-    if (iHiddenApps.Find(aAppUid) == KErrNotFound)
-    {
-        return EFalse;
-    }
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutSettingsModel::IsHidden (0x%x) ETrue"), aAppUid);
-
-    return ETrue;
-}
-
-// ---------------------------------------------------------------------------
-// From MAiScutListObserver
-// Callback for application list events.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::HandleScutListEventL(TScutListEvent aEvent,
-    TBool /*aAdded*/)
-{
-    switch (aEvent)
-    {
-    case MAiScutListObserver::EAppListReady:
-        if (iContainer)
-        {
-            iContainer->HideWaitNoteDialog();
-        }
-        break;
-
-    case MAiScutListObserver::EAppListUpdated:
-    case MAiScutListObserver::EBkmListUpdated:
-        UpdateSettingsContainerL();
-        break;
-
-    default:
-        break;
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::ActivateObservers(TBool aActivate)
-{
-    TRAP_IGNORE(
-        if (iAppList)
-        {
-            iAppList->SetObservingL(aActivate);
-        }
-        if (iBkmList)
-        {
-            iBkmList->SetObservingL(aActivate);
-        }
-    )
-}
-
-// ---------------------------------------------------------------------------
-// Returns a setting item for the given index.
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsItem* CAiScutSettingsModel::Item(TInt aIndex) const
-{
-    if (aIndex >= 0 && aIndex < iSettings.Count())
-    {
-        return iSettings[aIndex];
-    }
-
-    return NULL;
-}
-
-// ---------------------------------------------------------------------------
-// Utility function to retrieve a bookmark caption from an uid.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::GetBkmCaptionL(const TUid aUid, TDes& aCaption)
-{
-    CFavouritesItem* favItem = CFavouritesItem::NewLC();
-    TInt err = iBookmarkDb.Get(aUid.iUid, *favItem);
-    if (err == KErrNone)
-    {
-        aCaption.Copy(favItem->Name());
-    }
-
-    CleanupStack::PopAndDestroy(favItem);
-
-    return err;
-}
-
-// ---------------------------------------------------------------------------
-// Utility function to retrieve an appliation caption from an uid.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::GetAppCaption(const TUid aUid, TDes& aCaption)
-{
-    TInt err = KErrNone;
-    TApaAppInfo appInfo;
-
-    err = iApaSession.GetAppInfo(appInfo, aUid);
-    if (err == KErrNone)
-    {
-        aCaption.Copy(appInfo.iCaption);
-    }
-
-    return err;
-}
-
-// ---------------------------------------------------------------------------
-// Returns a pointer to the coe environment.
-// ---------------------------------------------------------------------------
-//
-CCoeEnv* CAiScutSettingsModel::Env()
-{
-    return iEnv;
-}
-
-// ---------------------------------------------------------------------------
-// Handles saving a setting item to central repository.
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::SaveItemL(CAiScutSettingsItem& aItem)
-{
-    // Stop monitoring own settings changes.
-    iSettingsNotifier->StopListening();
-
-    TInt err = aItem.Save(iRepository);
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutSettingsModel::SaveItemL key = 0x%x, err = %d"), 
-		aItem.Key(), err);
-    UpdateSettingsL();
-    iSettingsNotifier->StartListeningL();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::SetContainer(CAiScutSettingsContainer* aContainer)
-{
-    iContainer = aContainer;
-}
-
-// -----------------------------------------------------------------------------
-// Using the Favorites dB, get the bookmarked pages
-// -----------------------------------------------------------------------------
-//
-void CAiScutSettingsModel::ReadBookmarksL()
-{
-    // Get bookmarks
-    delete iFavItemList;
-    iFavItemList = NULL;
-
-    iFavItemList = new (ELeave) CFavouritesItemList();
-    TInt err = iBookmarkDb.GetAll(
-        *iFavItemList, KFavouritesNullUid, CFavouritesItem::EItem);
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutSettingsModel::BookmarkCount() const
-{
-    if (iFavItemList)
-    {
-        return iFavItemList->Count();
-    }
-    else
-    {
-        return 0;
-    }
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CFavouritesItem* CAiScutSettingsModel::GetBookmark(TInt aIndex)
-{
-    if (aIndex >= 0 && aIndex < iFavItemList->Count())
-    {
-    	    
-    	if (iFavItemList)
-    	{
-        	return iFavItemList->At(aIndex);
-    	}
-    	else
-    	{
-        	return NULL;
-    	}
-    }
-    else
-    {
-    	return NULL;	
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Returns reference to the bookmark database owned by the engine.
-// ---------------------------------------------------------------------------
-//
-RFavouritesDb& CAiScutSettingsModel::FavouritesDb()
-{
-    return iBookmarkDb;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsAppList* CAiScutSettingsModel::AppList()
-{
-    return iAppList;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutSettingsBkmList* CAiScutSettingsModel::BkmList()
-{
-    return iBkmList;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutshortcut.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,913 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for a shortcut.
-*
-*/
-
-
-#include <aicontentobserver.h>
-#include <gulicon.h>            // For CGulIcon
-#include <fbs.h>                // For CFbsBitmap
-#include <e32property.h>            // For RProperty
-
-#include <activeidle2domainpskeys.h>
-#include "aiscutcontentmodel.h"
-#include "caiscutshortcut.h"
-#include "aiscutdefs.h"
-#include "caiscuttargetapp.h"
-#include "caiscuttargetbkm.h"
-#include "caiscuttargethttp.h"
-#include "caiscuttargetmessagingview.h"
-#include "caiscuttargetnewmsg.h"
-#include "caiscuttargetkeylock.h"
-#include "caiscuttargetempty.h"
-#include "aiscutpluginprivatecrkeys.h"
-
-#include "debug.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut::CAiScutShortcut(TInt aId, CAiScutEngine& aEngine)
-	: CTimer( CActive::EPriorityLow )
-	, iId(aId)
-    , iEngine(aEngine)
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcut::ConstructL(const TDesC& aTarget)
-{
-    iDefaultTarget = CreateTargetL(aTarget, EFalse);
-
-    if (!iDefaultTarget)
-    {
-        iDefaultTarget = CAiScutTargetEmpty::NewL(iEngine, EScutUnknown, aTarget);
-    }
-    CTimer::ConstructL();
-    CActiveScheduler::Add( this );
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* CAiScutShortcut::NewLC(TInt aId, const TDesC& aTarget,
-    CAiScutEngine& aEngine)
-{
-    CAiScutShortcut* self = new (ELeave) CAiScutShortcut(aId, aEngine);
-    CleanupStack::PushL(self);
-    self->ConstructL(aTarget);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut* CAiScutShortcut::NewL(TInt aId, const TDesC& aTarget,
-    CAiScutEngine& aEngine)
-{
-    CAiScutShortcut* self = CAiScutShortcut::NewLC(aId, aTarget, aEngine);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcut::~CAiScutShortcut()
-{
-	Cancel();
-    delete iDefaultTarget;
-    delete iUserTarget;
-    delete iRetiredTarget;
-}
-
-// -----------------------------------------------------------------------------
-// Returns the shortcut id.
-// -----------------------------------------------------------------------------
-//
-TInt32 CAiScutShortcut::Id() const
-{
-    return iId;
-}
-
-// -----------------------------------------------------------------------------
-// Publishes the shortcut content, non leaving version.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::Publish(
-    MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver)
-{
-    TRAPD(err, PublishL(aPlugin, aObserver));
-    //Possible forcing done already so reset the flag
-    iForcePublish = EFalse;
-    if (err == KErrNone)
-    {
-        delete iRetiredTarget;
-        iRetiredTarget = NULL;
-        iLastPublishedTarget = iActiveTarget;
-    }
-    else
-    {
-        // Publish failed, roll back to previous content.
-        TInt transactionId = reinterpret_cast<TInt>(this);
-        aObserver.CancelTransaction(transactionId);
-
-        // Delete the new target and put the retired one back to work.
-        if (iRetiredTarget)
-        {
-            delete iUserTarget;
-            iUserTarget = iRetiredTarget;
-            iRetiredTarget = NULL;
-        }
-
-        iActiveTarget = iLastPublishedTarget;
-    }
-
-    
-}
-
-// -----------------------------------------------------------------------------
-// Checks if the application or messaging view pointed to can be launched.
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutShortcut::CheckAccessL(TInt aCheckType)
-{
-    TBool userTargetAccessible = EFalse;
-
-	__PRINT( __DBG_FORMAT( "XAI: CAiScutShortcut::CheckAccessL( %d )"), aCheckType);
-
-    // First try the user setting if it is defined.
-    if (iUserTarget && iUserTarget->IsAccessibleL(aCheckType))
-    {
-        iActiveTarget = iUserTarget;
-        userTargetAccessible = ETrue;
-    }
-
-    if (!userTargetAccessible)
-    {
-
-		__PRINTS("XAI:   *** user target NOT accessible ***");
-        // User setting was not accessible or not defined, try the default.
-        if (iDefaultTarget->IsAccessibleL(aCheckType))
-        {
-            iActiveTarget = iDefaultTarget;
-        }
-        else
-        {
-            // The default is not accessible either, the shortcut is empty.
-            iActiveTarget = NULL;
-
-			__PRINTS( "XAI:   *** default target NOT accessible ***");
-        }
-    }
-
-    if (iActiveTarget)
-	{
-		return ETrue;
-	}
-	else
-	{
-		return EFalse;
-	}    
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutShortcut::IsTargetChanged() const
-{
-    // We need to publish if target changed during access checking.
-    return (iLastPublishedTarget != iActiveTarget);
-}
-
-// -----------------------------------------------------------------------------
-// Changes the shortcut target to the user defined setting.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::SetUserTarget(const TDesC& aNewTarget)
-{
-
-	TPtrC defaultTarget(iDefaultTarget->Definition());
-	__PRINTS( "XAI: CAiScutShortcut::SetUserTarget");
-	__PRINT( __DBG_FORMAT( "XAI:   id             = 0x%x"), iId);
-	__PRINT( __DBG_FORMAT( "XAI:   default target = '%S'"),   &defaultTarget);
-	__PRINT( __DBG_FORMAT("XAI:   new target     = '%S'"),   &aNewTarget);
-	if (iUserTarget)
-		{
-		TPtrC userTarget(iUserTarget->Definition());
-		__PRINT( __DBG_FORMAT("XAI:   user target    = '%S'"),   &userTarget);
-		}
-		
-	
-    if (iUserTarget && (aNewTarget.CompareC(iUserTarget->Definition()) == 0))
-    {
-        return;
-    }
-
-
-    // Creating the new target might leave, so it is done before the old target
-    // is deleted to ensure that the shortcut object remains in a consistent state
-    // in case of a leave. If target creation leaves, nothing has changed.
-    //
-    // As a side effect this means that the new target is allocated to a different
-    // memory address than the old one, the address of the old target will not be re-used
-    // by this target. That doesn't mean anything for the plug-in, but it helps the
-    // plug-in tester to notice premature target deletion, since the address will still
-    // contain 0xDEDEDEDE instead of the new target.
-    CAiScutTarget* tempTarget = NULL;
-
-    TRAPD(err, tempTarget = CreateTargetL(aNewTarget, ETrue));
-
-    if (err == KErrNone)
-    {
-        DeleteUserTarget();
-        iUserTarget = tempTarget;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Deletes the user target.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::DeleteUserTarget()
-{
-    if (iUserTarget)
-    {
-
-		__PRINTS("XAI: CAiScutShortcut::DeleteUserTarget");
-
-        if (iLastPublishedTarget == iUserTarget && !(iId & KScutFlagBitNonVisible))
-        {
-            // Previous user target was the last published target so the Ai framework
-            // is still using the icon pointer. Deleting the target now would cause a
-            // KERN-EXEC 3 panic when the framework tries to access the deleted icon.
-            // The target must be kept alive until the new target has been successfully
-            // published and the framework is no longer using its icon.
-            // This is unnecessary for non-visible shortcuts because they are not published.
-            iRetiredTarget = iUserTarget;
-            iUserTarget = NULL;
-
-			__PRINTS("XAI:   iUserTarget = NULL");
-
-        }
-
-        if (iActiveTarget == iUserTarget)
-        {
-            // Previous user target was the active target. We don't know if the new
-            // user target is accessible, so the shortcut is effectively empty until
-            // the access check has been run.
-            iActiveTarget = NULL;
-        }
-
-        delete iUserTarget;
-        iUserTarget = NULL;
-
-		__PRINTS( "XAI:   delete iUserTarget");
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Launches the shortcut.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::LaunchL()
-{
-	Cancel();
-	RProperty::Set( 
-        KPSUidAiInformation, 
-        KActiveIdleLaunch, 
-        EPSAiLaunchIsActive );
-
-    if (iActiveTarget)
-    {
-    	TRAP_IGNORE( iActiveTarget->BeginEffectL() ); //start a full screen effect
-        iActiveTarget->LaunchL();
-    }
-  
-    // When preparing for backup, the plugin is suspended and calling After() would
-    // cause a crash
-    if ( IsAdded() )
-    {	
-    	After(1000000);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Launches the shortcut.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::LaunchL(const TDesC8& aMessage)
-{
-	Cancel();
-	RProperty::Set( 
-        KPSUidAiInformation, 
-        KActiveIdleLaunch, 
-        EPSAiLaunchIsActive );
-
-    if (iActiveTarget)
-    {
-    	TRAP_IGNORE( iActiveTarget->BeginEffectL() ); //start a full screen effect
-        iActiveTarget->LaunchL(aMessage);
-    }
-  
-    // When preparing for backup, the plugin is suspended and calling After() would
-    // cause a crash
-    if ( IsAdded() )
-    {	
-    	After(1000000);
-    }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::SetToBePublished(TBool aFlag)
-{
-    if ( !iForcePublish )
-        {
-        iNeedsToBePublished = aFlag;                
-        }
-    else
-        {
-        iNeedsToBePublished = iForcePublish;
-        }
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutShortcut::NeedsToBePublished()
-{
-    return iNeedsToBePublished;
-}
-
-// -----------------------------------------------------------------------------
-// Return shortcut type.
-// -----------------------------------------------------------------------------
-//
-TShortcutType CAiScutShortcut::Type() const
-{
-    if (iUserTarget)
-    {
-        return iUserTarget->Type();
-    }
-    else
-    {
-        return iDefaultTarget->Type();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid of this shortcut.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutShortcut::AppUid() const
-{
-    if (iUserTarget)
-    {
-        return iUserTarget->AppUid();
-    }
-    else
-    {
-        return iDefaultTarget->AppUid();
-    }
-}
-void CAiScutShortcut::SetIcon(TAiScutIcon aIcon)
-    {
-    switch(aIcon.iDestination)
-        {      
-        case EScutDestinationSoftkey:
-            SetSoftkeyIcon(aIcon);
-            break;
-        case EScutDestinationToolbar:
-            SetToolbarIcon(aIcon);
-            break;
-        case EScutDestinationNormal:
-            SetOverrideIcon(aIcon);
-            break;
-        default:
-            break;
-        }
-    }
-void CAiScutShortcut::SetOverrideIcon(TAiScutIcon aIcon)
-{   
-    if (iUserTarget)
-    {
-        iUserTarget->SetOverrideIcon(aIcon);
-    }
-    else
-    {
-        iDefaultTarget->SetOverrideIcon(aIcon);
-    }
-}
-
-void CAiScutShortcut::SetSoftkeyIcon(TAiScutIcon aIcon)
-{   
-    if (iUserTarget)
-    {
-        iUserTarget->SetSoftkeyIcon(aIcon);
-    }
-    else
-    {
-        iDefaultTarget->SetSoftkeyIcon(aIcon);
-    }
-}
-
-
-void CAiScutShortcut::SetToolbarIcon(TAiScutIcon aIcon)
-{   
-    if (iUserTarget)
-    {
-        iUserTarget->SetToolbarIcon(aIcon);
-    }
-    else
-    {
-        iDefaultTarget->SetToolbarIcon(aIcon);
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// Creates a shortcut target object.
-// -----------------------------------------------------------------------------
-//
-CAiScutTarget* CAiScutShortcut::CreateTargetL(
-    const TDesC& aDefinition, TBool aCreateUserTarget)
-{
-
-	__PRINTS("XAI: CAiScutShortcut::CreateTargetL");
-	__PRINT( __DBG_FORMAT("XAI:   id = 0x%x, target = '%S'"), iId, &aDefinition);
-
-    CAiScutTarget* target = NULL;
-    TAiScutParser parser;
-    TInt err = parser.Parse(aDefinition);
-
-    if (parser.IsValid())
-    {
-        TShortcutType type = parser.Type();
-        
-        switch (type)
-        {
-        case EScutApplication:
-        case EScutChangeTheme:
-        case EScutApplicationView:
-        case EScutApplicationWithParams:
-        case EScutLogsMissedCallsView:
-        case EScutLogsDialledCallsView:
-        case EScutLogsReceivedCallsView:
-        case EScutLogsMainView:
-            target = CAiScutTargetApp::NewL(iEngine, type, parser);
-            break;
-
-        case EScutNewMsgType:
-        case EScutNewMessage:
-        case EScutNewEmail:
-#ifdef __SYNCML_DS_EMAIL
-        case EScutNewSyncMLMail:
-#endif
-        case EScutNewPostcard:
-        case EScutNewAudioMsg:
-            target = CAiScutTargetNewMsg::NewL(iEngine, type, parser);
-            break;
-
-        case EScutMailbox:
-            target = CAiScutTargetMessagingView::NewL(iEngine, type, parser);
-            break;
-
-        case EScutWebAddress:
-            target = CAiScutTargetHttp::NewL(iEngine, type, parser);
-            break;
-
-        case EScutKeylock:
-            target = CAiScutTargetKeyLock::NewL(iEngine, type, aDefinition);
-            break;
-
-        case EScutNoEffect:
-            target = CAiScutTargetEmpty::NewL(iEngine, type, aDefinition);
-            break;
-
-        case EScutBookmark:
-            target = CAiScutTargetBkm::NewL(iEngine, type, parser);
-            break;
-
-        case EScutConnectivityStatusView:
-            target = CAiScutTargetApp::NewL(iEngine, EScutApplicationView, parser);
-            break;
-
-        case EScutApplicationManagerView:
-            target = CAiScutTargetApp::NewL(iEngine, EScutApplicationView, parser);
-            break;
-
-        default:
-            break;
-        }
-    }
-
-    if (!target && aCreateUserTarget)
-    {
-        // treat unknown user targets as web addresses.
-        target = CAiScutTargetHttp::NewL(iEngine, EScutWebAddress, parser);
-    }
-
-    if (!target)
-    {
-		__PRINTS( "XAI:   *** empty target ***");
-    }
-    
-    
-    return target;
-}
-
-// -----------------------------------------------------------------------------
-// Publishes the shortcut content, leaving version.
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::PublishL(
-    MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver)
-    {
-    TInt err = KErrNone;
-    TBool cbaIconPublished = EFalse;
-
-	__PRINT( __DBG_FORMAT("XAI: CAiScutShortcut::PublishL 0x%x"), iId);
-
-    // Publish caption if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutCaption].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishCaption(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutCaption].id);
-
-        if (err != KErrNone)
-        	__PRINT( __DBG_FORMAT( "XAI:   publish caption err = %d"), err);
-        }
-
-    // Publish short caption if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutShortCaption].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishCaption(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutShortCaption].id);
-
-        if (err != KErrNone)
-	        __PRINT( __DBG_FORMAT( "XAI:   publish short caption err = %d"), err);
-        }
-
-    /** softkeys **/
-      // Publish short caption if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutSkIcon].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishIcon(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutSkIcon].id);
-        
-        if ( err == KErrNone )
-            {
-            cbaIconPublished = ETrue;
-            }
-        if (err != KErrNone) 
-        	__PRINT( __DBG_FORMAT("XAI:   publish icon err = %d"), err);
-        }
-    
-    // No CBA icon published so publish the caption
-    if ( !cbaIconPublished )
-        {        
-        // Publish sk caption if the framework can handle it.
-        if (!aObserver.CanPublish(
-            aPlugin, KAiScutContent[EAiScutContentShortcutSkCaption].id, iId))
-            {
-            err = KErrNotSupported;
-            }
-        else
-            {
-            err = PublishCaption(
-                aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutSkCaption].id);
-
-            if (err != KErrNone)
-    	        __PRINT( __DBG_FORMAT( "XAI:   publish short caption err = %d"), err);
-            }
-        }
-    
-    /** end of softkeys **/
-    
-    // Publish MSK caption if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutMskCaption].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishCaption(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutMskCaption].id);
-
-        if (err != KErrNone)
-        	__PRINT( __DBG_FORMAT( "XAI:   publish msk caption err = %d"), err);
-        }
-
-    // Publish icon if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutIcon].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishIcon(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutIcon].id);
-
-        if (err != KErrNone) 
-        	__PRINT( __DBG_FORMAT("XAI:   publish icon err = %d"), err);
-        }
-
-    // Publish toolbar caption if the framework can handle it.
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutToolbarCaption].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishCaption(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutToolbarCaption].id);
-
-        if (err != KErrNone)
-        	__PRINT( __DBG_FORMAT( "XAI:   publish toolbar caption err = %d"), err);
-        }
-
-    // Publish the toolbar icon if the framework can handle it    
-    if (!aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentShortcutToolbarIcon].id, iId))
-        {
-        err = KErrNotSupported;
-        }
-    else
-        {
-        err = PublishIcon(
-            aPlugin, aObserver, KAiScutContent[EAiScutContentShortcutToolbarIcon].id);
-        
-        if (err != KErrNone) 
-        	__PRINT( __DBG_FORMAT("XAI:   publish toolbar icon err = %d"), err);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// Publishes shortcut caption.
-// -----------------------------------------------------------------------------
-//
-TInt CAiScutShortcut::PublishCaption(MAiPropertyExtension& aPlugin,
-    MAiContentObserver& aObserver, TInt aCaptionContentId) const
-{
-    TInt err = KErrNone;
-
-    if (iId == KRightSoftkeyId)
-    {
-        if (iActiveCall)
-        {
-            TInt backCaptionResId = KAiScutResources[EAiScutResourceBackCaption].id;
-            err = aObserver.Publish(aPlugin, aCaptionContentId, backCaptionResId, iId);
-            return err;
-        }
-    }
-
-    if (!iActiveTarget)
-    {
-        // Publish the EmptyCaption resource id.
-        TInt emptyCaptionResId = KAiScutResources[EAiScutResourceEmptyCaption].id;
-        err = aObserver.Publish(aPlugin, aCaptionContentId, emptyCaptionResId, iId);
-    }
-    else
-    {
-        TPtrC captionDes;
-        TInt captionResId = 0;
-        TAiScutAppTitleType titleType = EAiScutLongTitle;
-        if (aCaptionContentId == KAiScutContent[EAiScutContentShortcutShortCaption].id ||
-            aCaptionContentId == KAiScutContent[EAiScutContentShortcutSkCaption].id || 
-            aCaptionContentId == KAiScutContent[EAiScutContentShortcutToolbarCaption].id)
-        {
-            titleType = EAiScutSkeyTitle;
-        }
-        else if (aCaptionContentId == KAiScutContent[EAiScutContentShortcutMskCaption].id)
-        {
-            titleType = EAiScutMskTitle;
-        }
-
-        captionResId = iActiveTarget->GetCaption(captionDes, titleType);
-
-        if (captionResId == 0)
-        {
-            // Publish descriptor.
-            err = aObserver.Publish(aPlugin, aCaptionContentId, captionDes, iId);
-        }
-        else if (captionResId > 0)
-        {
-            // Publish resource.
-            err = aObserver.Publish(aPlugin, aCaptionContentId, captionResId, iId);
-            
-            __PRINT( __DBG_FORMAT("XAI:   publish resource = %d"), captionResId);
-        }
-    }
-
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// Publishes shortcut icon.
-// -----------------------------------------------------------------------------
-//
-TInt CAiScutShortcut::PublishIcon(MAiPropertyExtension& aPlugin,
-    MAiContentObserver& aObserver, TInt aIconContentId )
-{
-    TInt emptyIconResId = KAiScutResources[EAiScutResourceEmptyIcon].id;
-    TInt err = KErrNone;
-    // In case of an active call cancel the SK icon publication
-    // to RSK
-    if ( iActiveCall && iId == KRightSoftkeyId )
-        {
-        return KErrCancel;
-        }
-    if (!iActiveTarget)
-    {
-        // Publish the EmptyIcon resource id.
-
-        __PRINT( __DBG_FORMAT( "XAI: PublishIcon publish empty #1 = %d"), emptyIconResId);
-
-        err = aObserver.Publish(aPlugin, aIconContentId, emptyIconResId, iId);
-    }
-    else
-    {
-        CGulIcon* iconPtr = NULL;
-        TInt iconResId = 0;
-        //  Normal icon
-        if (aIconContentId == KAiScutContent[EAiScutContentShortcutIcon].id)
-            {
-            iconResId = iActiveTarget->GetIcon(iconPtr);
-            }
-        // Soft key icon
-        else if ( aIconContentId == KAiScutContent[EAiScutContentShortcutSkIcon].id )
-            {
-            iconResId = iActiveTarget->GetSoftkeyIcon(iconPtr);
-            }
-        else if ( aIconContentId == KAiScutContent[EAiScutContentShortcutToolbarIcon].id )
-            {
-            iconResId = iActiveTarget->GetToolbarIcon(iconPtr);            
-            }
-
-        // No error, continue with the publish
-        if (iconResId == 0)
-        {
-            if (iconPtr)
-            {
-                // Publish pointer.
-                err = aObserver.PublishPtr(aPlugin, aIconContentId, iconPtr, iId);
-                    
-                if( err != KErrNone )
-                    {
-                    delete iconPtr;
-                    }
-            }
-            else
-            {
-                // The target hasn't been able to initialize its icon, publish the empty icon.
-
-                __PRINT( __DBG_FORMAT("XAI: PublishIcon publish empty #2 = %d"), emptyIconResId);
-
-                err = aObserver.Publish(aPlugin, aIconContentId, emptyIconResId, iId);
-            }
-        }
-        // Publish by resource
-        else if (iconResId > 0)
-        {
-            // Publish resource.
-
-            __PRINT( __DBG_FORMAT("XAI: PublishIcon publish resource = %d"), iconResId);
-
-            err = aObserver.Publish(aPlugin, aIconContentId, iconResId, iId);
-        }
-        // < 0 error occurred, return it
-        else
-            {
-            err = iconResId;
-            }
-    }
-
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// Set call state
-// -----------------------------------------------------------------------------
-//
-void CAiScutShortcut::SetCallState(TBool aStatus)
-{
-    // Call state changed force the publish of RSK    
-    if ( iActiveCall != aStatus )
-        {
-        if ( iId == KRightSoftkeyId )
-            {
-            iForcePublish = ETrue;
-            }
-        }
-    iActiveCall = aStatus;
-}
-
-TPtrC CAiScutShortcut::ActiveDefinition()
-    {
-    if( iUserTarget )
-        {
-        return iUserTarget->Definition();
-        }
-    if( iDefaultTarget )
-        {
-        return iDefaultTarget->Definition();
-        }
-    return TPtrC();
-    }
-    
-// ---------------------------------------------------------------------------
-// Return the possible additional id
-// ---------------------------------------------------------------------------
-//    
-TUid CAiScutShortcut::AdditionalUid() const
-    {
-    if( iUserTarget )
-        {
-        return iUserTarget->AdditionalUid();
-        }
-    if( iDefaultTarget )
-        {
-        return iDefaultTarget->AdditionalUid();
-        }
-    return TUid::Uid(-1);
-    }
-
-// ---------------------------------------------------------------------------
-// CActive
-// ---------------------------------------------------------------------------
-//   
-TInt CAiScutShortcut::RunError(TInt /*aError*/)
-    {
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CActive
-// ---------------------------------------------------------------------------
-//   
-void CAiScutShortcut::DoCancel()
-    {
-    CTimer::DoCancel();
-    RProperty::Set( 
-        KPSUidAiInformation, 
-        KActiveIdleLaunch, 
-        EPSAiLaunchNotActive );
-    }
-
-// ---------------------------------------------------------------------------
-// CActive
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcut::RunL()
-    {
-    RProperty::Set( 
-        KPSUidAiInformation, 
-        KActiveIdleLaunch, 
-        EPSAiLaunchNotActive );
-    }
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutshortcutext.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,419 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in shortcut extensions
-*
-*/
-
-
-#include <aicontentobserver.h>
-#include <gulicon.h>
-#include <fbs.h>
-#include <e32property.h>
-
-#include "caiscutshortcutext.h"
-#include "aiscutcontentmodel.h"
-#include "caiscuttarget.h"
-#include "caiscutengineext.h"
-#include "PopupFSM.h"
-#include "cpopupeventhandler.h"
-#include "maiscutextdata.h"
-#include "activeidle2domainpskeys.h"
-
-#include "debug.h"
-
-
-// P&S access policies
-_LIT_SECURITY_POLICY_C1( KAiScutReadPolicy, ECapabilityReadDeviceData );
-_LIT_SECURITY_POLICY_C1( KAiScutWritePolicy, ECapabilityWriteDeviceData );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutExt* CAiScutShortcutExt::NewL(
-    TInt aId, const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    CAiScutShortcutExt* self = CAiScutShortcutExt::NewLC(
-        aId, aTarget, aEngine );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutExt* CAiScutShortcutExt::NewLC(
-    TInt aId, const TDesC& aTarget, CAiScutEngine& aEngine )
-    {
-    CAiScutShortcutExt* self = new( ELeave ) CAiScutShortcutExt(
-        aId, aEngine );
-    CleanupStack::PushL( self );
-    self->ConstructL( aTarget );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutExt::~CAiScutShortcutExt()
-    {
-    delete iPopupEventHandler;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutExt::CAiScutShortcutExt( TInt aId, CAiScutEngine& aEngine )
-    : CAiScutShortcut( aId, aEngine )//,
-    //iPublishLineArray( EFalse )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::ConstructL( const TDesC& aTarget )
-    {
-    iPopupEventHandler = CPopupEventHandler::NewL( *this );
-    CAiScutShortcut::ConstructL( aTarget );
-
-    RProperty::Define(
-        KPSUidAiInformation,
-        KActiveIdleThemeSupportsXsp,
-        RProperty::EInt,
-        KAiScutReadPolicy,
-        KAiScutWritePolicy );
-    RProperty::Set( KPSUidAiInformation, KActiveIdleThemeSupportsXsp, EPSAiXspNotSupported );
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutShortcutExt::ActiveTargetDefinition() const
-    {
-    if( iActiveTarget )
-        {
-        return iActiveTarget->Definition();
-        }
-    return KNullDesC();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::HandleAIEventL( TInt aEvent )
-    {
-    switch ( aEvent )
-        {
-        case EAiScutEventLoseFocus:
-            {
-            iPopupEventHandler->PopupFSM().HandleLostFocus();
-            break;
-            }
-        case EAiScutEventGainFocus:
-            {
-            iPopupEventHandler->PopupFSM().HandleGotFocus();
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::HandleResumed( TAiTransitionReason aResumeReason )
-    {
-    switch( aResumeReason )
-        {
-        case EAiIdleBackground:
-            {
-            iPopupEventHandler->PopupFSM().HandleBackground();
-            break;
-            }
-        case EAiIdleForeground:
-            {
-            // Handleforeground() calls unnecessary publishes in case nothing
-            // has changed. 
-            if ( iTextChanged || iIconChanged )
-                {
-                iPopupEventHandler->PopupFSM().HandleForeground();
-                }
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::SetAiScutExtData(
-    const MAiScutExtData* aAiScutExtData )
-    {
-    iAiScutExtData = aAiScutExtData;
-
-    const MDesCArray* newPopupLineArray =
-        aAiScutExtData ? aAiScutExtData->PopupLineArray() : NULL;
-    const CGulIcon* newIcon =
-        aAiScutExtData ? aAiScutExtData->Icon() : NULL;
-        
-    if( iPreviousPopupLineArray != newPopupLineArray &&
-        newPopupLineArray )
-        {
-        iTextChanged = ETrue;
-        iPopupEventHandler->PopupFSM().HandleUpdate();        
-        }
-    else if( iPreviousPopupLineArray && !newPopupLineArray )
-        {
-        iTextChanged = ETrue;
-        iPopupEventHandler->PopupFSM().HandleReset();
-        }
-
-    if( iPreviousIcon != newIcon )
-        {
-        iIconChanged = ETrue;
-        CAiScutEngineExt& engine = static_cast< CAiScutEngineExt& > ( iEngine );
-        engine.CheckAccessAndPublish( *this );
-        }
-
-    iPreviousPopupLineArray = newPopupLineArray;
-    iPreviousIcon = newIcon;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::PublishL(
-    MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver )
-    {
-    if( iLastPublishedTarget && iActiveTarget &&
-        iLastPublishedTarget->Definition() != iActiveTarget->Definition() )
-        {
-        iAiScutExtData = NULL;
-        iPopupEventHandler->PopupFSM().HandleReset();
-        }
-
-    if( aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentPopupTextFirstLine].id, iId) &&
-        aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentPopupTextSecondLine].id, iId) &&
-        aObserver.CanPublish(
-        aPlugin, KAiScutContent[EAiScutContentPopupTextThirdLine].id, iId) )
-        {
-        PublishPopupText( aPlugin, aObserver );
-        RProperty::Set( KPSUidAiInformation, KActiveIdleThemeSupportsXsp, EPSAiXspIsSupported );
-        }
-
-    CAiScutShortcut::PublishL( aPlugin, aObserver );
-    iTextChanged = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutShortcutExt::PublishCaption(
-    MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver,
-    TInt aCaptionContentId ) const
-    {
-    if( iPopupEventHandler->PublishCaption() )
-        {
-        if( !iPopupEventHandler->CaptionVisible() )
-            {
-            return aObserver.Clean( aPlugin, aCaptionContentId, iId );
-            }
-        else
-            {
-            return CAiScutShortcut::PublishCaption(
-                aPlugin, aObserver, aCaptionContentId );
-            }
-        }
-    else
-        {
-        return CAiScutShortcut::PublishCaption(
-            aPlugin, aObserver, aCaptionContentId );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::PublishPopupText(
-    MAiPropertyExtension& aPlugin, MAiContentObserver& aObserver ) const
-    {
-    if( iPopupEventHandler->PublishPopup() )
-        {
-        TAiScutContentIds popupTextContentIds[] =
-            {
-            EAiScutContentPopupTextFirstLine,
-            EAiScutContentPopupTextSecondLine,
-            EAiScutContentPopupTextThirdLine
-            };
-        const TInt idCount =
-            sizeof( popupTextContentIds ) / sizeof( TAiScutContentIds );
-
-        TInt err = KErrNone;
-
-        //iLineArray is set or reset via xSP API. iPublishLineArray is controlled
-        //by state machine in iPopupEventHandler
-        if( iAiScutExtData && iAiScutExtData->PopupLineArray() &&
-            iPopupEventHandler->PopupVisible() )
-            {
-            //Publish caption line in popup text box
-            TPtrC captionDes;
-            TInt captionResId = iActiveTarget->GetCaption( captionDes, EAiScutLongTitle );
-
-            if ( captionResId == 0 )
-                {
-                // Publish descriptor
-                err = aObserver.Publish( aPlugin,
-                    KAiScutContent[ EAiScutContentPopupTextCaptionLine ].id,
-                    captionDes, iId );
-                if( err != KErrNone )
-                    {
-                    __PRINT( __DBG_FORMAT( "XAI:   publish Popup caption text err = %d" ), err );
-                    }
-                }
-            else if ( captionResId > 0 )
-                {
-                // Publish resource
-                err = aObserver.Publish( aPlugin,
-                    KAiScutContent[ EAiScutContentPopupTextCaptionLine ].id,
-                    captionResId, iId );
-                if( err != KErrNone )
-                    {
-                    __PRINT( __DBG_FORMAT( "XAI:   publish Popup caption text (resource) err = %d" ), err );
-                    }
-                }
-
-            const MDesCArray& lineArray = *iAiScutExtData->PopupLineArray();
-            TInt numberOfLines = lineArray.MdcaCount();
-            //Iterate each popup text content and either publish or clean it
-            //depending on the number or lines in iLineArray
-            for( TInt i = 0; i < idCount; i++ )
-                {
-                if( numberOfLines > i )
-                    {
-                    err = aObserver.Publish( aPlugin,
-                        KAiScutContent[ popupTextContentIds[ i ] ].id,
-                        lineArray.MdcaPoint( i ), iId );
-                    if( err != KErrNone )
-                        {
-                        __PRINT( __DBG_FORMAT( "XAI:   publish Popup text err = %d" ), err );
-                        }
-                    }
-                else
-                    {
-                    err = aObserver.Clean( aPlugin,
-                        KAiScutContent[ popupTextContentIds[ i ] ].id, iId );
-                    if( err != KErrNone )
-                        {
-                        __PRINT( __DBG_FORMAT( "XAI:   clean Popup text err = %d" ), err );
-                        }
-                    }
-                }
-            }
-        else
-            {
-            //Clean each popup text content
-            for( TInt i = 0; i < idCount; i++ )
-                {
-                err = aObserver.Clean( aPlugin,
-                    KAiScutContent[ popupTextContentIds[ i ] ].id, iId );
-                if ( err != KErrNone )
-                    {
-                    __PRINT( __DBG_FORMAT( "XAI:   clean Popup text err = %d" ), err );
-                    }
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutShortcutExt::PublishIcon( MAiPropertyExtension& aPlugin,
-    MAiContentObserver& aObserver, TInt aIconContentId )
-    {
-    if( aIconContentId == KAiScutContent[EAiScutContentShortcutIcon].id && 
-		iAiScutExtData && iAiScutExtData->Icon() )
-        {
-        const CGulIcon& icon = *iAiScutExtData->Icon();
-        CGulIcon* duplicatedIcon = NULL;
-        TRAP_IGNORE(
-            CFbsBitmap* bitmap = new( ELeave ) CFbsBitmap();
-            CleanupStack::PushL( bitmap );
-            CFbsBitmap* mask   = new( ELeave ) CFbsBitmap();
-            CleanupStack::PushL( mask );
-
-            User::LeaveIfError( bitmap->Duplicate( icon.Bitmap()->Handle() ) );
-            User::LeaveIfError( mask->Duplicate( icon.Mask()->Handle() ) );
-
-            duplicatedIcon = CGulIcon::NewL( bitmap, mask );
-
-            CleanupStack::Pop( 2, bitmap );
-            );
-
-        if( duplicatedIcon )
-            {
-            TInt err = aObserver.PublishPtr( aPlugin,
-                aIconContentId, duplicatedIcon, iId );
-            if( err != KErrNone )
-                {
-                delete duplicatedIcon;
-                }
-            return err;
-            }
-        }
-    
-    TInt err = CAiScutShortcut::PublishIcon( aPlugin, aObserver, aIconContentId );
-    iIconChanged = EFalse;
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutExt::IssuePublishShortcut()
-    {
-//    iPublishLineArray = aVisiblePopup;
-    CAiScutEngineExt& engine = static_cast< CAiScutEngineExt& >( iEngine );
-    engine.CheckAccessAndPublish( *this );
-    }
-
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscutshortcutinfo.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Small container for shortcut info.
-*
-*/
-
-
-#include "caiscutshortcutinfo.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutInfo::CAiScutShortcutInfo(TInt aId)
-    : iId(aId)
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutShortcutInfo::ConstructL(const TDesC& aTarget)
-{
-    iTarget = aTarget.AllocL();
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutInfo* CAiScutShortcutInfo::NewL(TInt aId, const TDesC& aTarget)
-{
-    CAiScutShortcutInfo* self = new(ELeave) CAiScutShortcutInfo(aId);
-    CleanupStack::PushL(self);
-    self->ConstructL(aTarget);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutShortcutInfo::~CAiScutShortcutInfo()
-{
-    delete iTarget;
-}
-
-// -----------------------------------------------------------------------------
-// Returns the shortcut id.
-// -----------------------------------------------------------------------------
-//
-TInt32 CAiScutShortcutInfo::Id() const
-{
-    return iId;
-}
-
-// -----------------------------------------------------------------------------
-// Returns the shortcut target string.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAiScutShortcutInfo::Target()
-    {
-    if( iTarget )
-        return *iTarget;
-    else
-        return KNullDesC;
-    }
-
-// Eof
--- a/idlefw/plugins/shortcutplugin/src/caiscuttarget.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for shortcut target
-*
-*/
-
-
-#include "caiscutengine.h"
-#include "caiscuttarget.h"
-#include <AknIconUtils.h>
-#include <AknsUtils.h>          // For AknsUtils
-#include <mifconvdefs.h>
-#include <gulicon.h>
-#include <bautils.h>
-#include <AknTaskList.h>        // For CAknTaskList
-#include <apgwgnam.h>           // For CApaWindowGroupName
-#include <gfxtranseffect/gfxtranseffect.h>		// For Transition effect
-#include <akntranseffect.h>
-#include <akntransitionutils.h>
-
-// ======== MEMBER FUNCTIONS ========
-_LIT(KFileLoadDir,"z:\\resource\\");
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTarget::CAiScutTarget(CAiScutEngine& aEngine, TShortcutType aType)
-    : iEngine(aEngine)
-    , iType(aType)
-{
-}
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTarget::~CAiScutTarget()
-{
-    
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTarget::GetCaption(TPtrC& /*aDes*/, TAiScutAppTitleType /*aTitleType*/) const
-{
-    // Default implementation.
-    return KErrNotSupported;
-}
-
-TUid CAiScutTarget::AdditionalUid() const
-    {
-    return TUid::Uid(-1);
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTarget::GetIcon(const TAiScutIcon &aIconToLoad, CGulIcon*& aIcon ) const
-{   
-    TInt err = KErrNotSupported;
-    
-    if ( aIconToLoad.iType == EScutIconSkin )
-        {
-        TRAP(err, LoadIconFromSkinL(aIconToLoad, aIcon));
-        }
-    else if ( aIconToLoad.iType == EScutIconMif )
-        {
-        TRAP(err, LoadIconFromFileL(aIconToLoad, aIcon));
-        }
-    else if ( aIconToLoad.iType == EScutIconMbm )
-        {
-        TRAP(err, LoadIconFromFileL(aIconToLoad, aIcon));
-        }
-    
-    return err;
-}
-
-TInt CAiScutTarget::GetIcon(CGulIcon*& aIcon) const
-    {
-    return GetIcon(iOverrideIcon, aIcon);
-    }
-
-TInt CAiScutTarget::GetSoftkeyIcon(CGulIcon*& aIcon) const
-    {
-    return GetIcon(iSoftkeyIcon, aIcon);
-    }
-
-TInt CAiScutTarget::GetToolbarIcon(CGulIcon*& aIcon) const
-    {
-    return GetIcon(iToolbarIcon, aIcon);
-    }
-    
-void CAiScutTarget::SetOverrideIcon(TAiScutIcon aIcon)
-    {
-    iOverrideIcon = aIcon;
-    }
-
-void CAiScutTarget::SetSoftkeyIcon(TAiScutIcon aIcon)
-    {
-    iSoftkeyIcon = aIcon;
-    }
-
-void CAiScutTarget::SetToolbarIcon(TAiScutIcon aIcon)
-    {
-    iToolbarIcon = aIcon;
-    }
-
-void CAiScutTarget::LoadIconFromSkinL(const TAiScutIcon &aIconToLoad, CGulIcon*& aIcon) const
-    {
-    CFbsBitmap* bitmap = NULL;
-	CFbsBitmap* bitmapMask = NULL;
-	
-    // With colour group support
-    if ( aIconToLoad.iColourGroup >= EAknsCIQsnTextColorsCG1 &&
-           aIconToLoad.iColourGroup <= EAknsCIQsnTextColorsCG62)
-        {
-        
-        AknsUtils::CreateColorIconLC(
-            AknsUtils::SkinInstance(),
-            aIconToLoad.iSkinId,
-            KAknsIIDQsnTextColors,
-            aIconToLoad.iColourGroup,
-            bitmap,
-            bitmapMask,
-            KNullDesC,  /* no backup */
-            0,          /* no backup */
-            0,          /* no backup */
-            KRgbBlack );
-            
-        if ( bitmap )
-            {
-            aIcon = CGulIcon::NewL( bitmap, bitmapMask );              
-            }
-        CleanupStack::Pop( 2 ); // bitmap, bitmapMask
-        }
-    // no colour group support
-    else
-        {
-        aIcon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(), aIconToLoad.iSkinId, KNullDesC, 0, 0 );
-        }
-    if ( !aIcon )
-        {
-        User::Leave( KErrNotFound );
-        }
-    }
-
-void CAiScutTarget::LoadIconFromFileL(const TAiScutIcon &aIconToLoad, CGulIcon*& aIcon) const 
-    {
-    CFbsBitmap* bitmap = NULL;
-	CFbsBitmap* bitmapMask = NULL;
-    TFileName actualPath;
-    TInt iconIndexStart = 0;
-    
-    if ( aIconToLoad.iType == EScutIconMif )
-        {
-        iconIndexStart = KMifIdFirst;
-        }
-    actualPath.Append(KFileLoadDir);
-    actualPath.Append(aIconToLoad.iPath);
-    
-    RFs fs; fs.Connect();
-	if ( aIconToLoad.iIconId < 0 || !BaflUtils::FileExists(fs, actualPath))
-		{
-		fs.Close();
-		User::Leave( KErrNotFound );
-		}
-    fs.Close();
-	// Mask is next after bitmap
-    AknIconUtils::CreateIconLC(bitmap,bitmapMask, actualPath,
-        aIconToLoad.iIconId+iconIndexStart, aIconToLoad.iIconId+iconIndexStart+1);
-      
-
-    aIcon = CGulIcon::NewL(bitmap, bitmapMask);
-
-    CleanupStack::Pop(bitmapMask);    
-    CleanupStack::Pop(bitmap);
-    
-    if ( !aIcon )
-        {
-        User::Leave( KErrNotFound );        
-        }
-    
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target type.
-// ---------------------------------------------------------------------------
-//
-TShortcutType CAiScutTarget::Type() const
-{
-    return iType;
-}
-
-// ---------------------------------------------------------------------------
-// Determines which effect should be shown, and starts it.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTarget::BeginEffectL()
-	{
-	RWsSession& aWs = iEngine.Env()->WsSession();
-	TUid appUid = AppUid();
-	TInt effectType = AknTransEffect::EApplicationStart;
-	CAknTaskList* taskList = CAknTaskList::NewL( aWs );
-	TApaTask task = taskList->FindRootApp( appUid );
-	delete taskList;
-	
-	if ( task.Exists() )
-		{
-		TBool inHiddenList = iEngine.IsHiddenFromFSW(appUid);
-		CApaWindowGroupName* wgName = CApaWindowGroupName::NewL( aWs, task.WgId() );
-		wgName->SetAppUid( appUid );
-		const TBool isHidden = wgName->Hidden() || inHiddenList;
-		delete wgName;
-				
-		if (!isHidden)
-			{
-			effectType = AknTransEffect::EApplicationStartSwitchRect;
-			}
-		
-		//start a full screen effect
-		GfxTransEffect::BeginFullScreen( effectType,
-		TRect(0,0,0,0), 
-		AknTransEffect::EParameterType, 
-		AknTransEffect::GfxTransParam( appUid, 
-		AknTransEffect::TParameter::EActivateExplicitContinue ) );
-		}
-	}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetapp.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,633 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for application shortcut target
-*
-*/
-
-
-#include <coemain.h>            // For CCoeEnv
-#include <w32std.h>             // For RWsSession
-#include <akntranseffect.h>
-#include <akntransitionutils.h>
-#include <apacmdln.h>           // For CApaCommandLine
-#include <apgtask.h>            // For TApaTaskList
-#include <apgwgnam.h>           // For CApaWindowGroupName
-#include <gulicon.h>            // For CGulIcon
-#include <AknsUtils.h>          // For AknsUtils
-#include <AknTaskList.h>        // For CAknTaskList
-#include <gfxtranseffect/gfxtranseffect.h>		// For Transition effect
-#include <gslauncher.h>
-#include <viewcli.h>            // For CVwsSessionWrapper
-#include <escapeutils.h>
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <viewclipartner.h>
-#endif
-
-#include <featmgr.h>
-#include <centralrepository.h>
-#include <e32property.h>
-#include <settingsinternalcrkeys.h>
-#include <UikonInternalPSKeys.h>
-
-#include <aiscuttexts.rsg>
-//#include <pslnactiveidleplugin.mbg>
-#include <data_caging_path_literals.hrh>
-
-#include <activeidle2domainpskeys.h>
-
-#include "aiscutcontentmodel.h"
-#include "caiscuttargetapp.h"
-#include "caiscutengine.h"
-
-#include <aiscutplugin.mbg>
-#include "debug.h"
-
-#include <AknSgcc.h>
-
-const TInt KIconSizeArray = 4;
-
-// ======== MEMBER FUNCTIONS =================================================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetApp::CAiScutTargetApp(
-    CAiScutEngine& aEngine, TShortcutType aType, const TUid aUid)
-    : CAiScutTarget(aEngine, aType)
-    , iAppUid(aUid)
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetApp::ConstructL(const TAiScutParser& aParser)
-    {
-    iDefinition = aParser.Get(EScutDefComplete).AllocL();
-
-    iViewUid.iUid = -1;
-
-    switch (Type())
-        {
-    case EScutApplicationView:
-    case EScutChangeTheme:
-        if (iAppUid == KScutAppShellUid)
-            {
-            iViewUid.iUid = 1; // activate always appshell main view.
-            }
-        else
-            {
-            iViewUid = TAiScutParser::ParseUid(aParser.Get(EScutDefParamValue));
-            }
-        break;
-
-    case EScutLogsMissedCallsView:
-        iMsg = TPtrC8(KLogsMissedCallsView).AllocL();
-        break;
-
-    case EScutLogsDialledCallsView:
-        iMsg = TPtrC8(KLogsDialledCallsView).AllocL();
-        break;
-
-    case EScutLogsReceivedCallsView:
-        iMsg = TPtrC8(KLogsReceivedCallsView).AllocL();
-        break;
-
-    case EScutLogsMainView:
-        iMsg = TPtrC8(KLogsMainView).AllocL();
-        break;
-
-    case EScutApplicationWithParams:
-        {
-        TPtrC ptr = aParser.Get(EScutDefParamNameAndValue);
-        iMsg = EscapeUtils::ConvertFromUnicodeToUtf8L(ptr);
-        break;
-        }
-
-    default:
-        break;
-        }
-
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetApp* CAiScutTargetApp::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser)
-    {
-    CAiScutTargetApp* self =
-        new (ELeave) CAiScutTargetApp(aEngine, aType, aParser.Uid());
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aParser);
-
-    CleanupStack::Pop(self);
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetApp::~CAiScutTargetApp()
-    {
-    delete iCaption;
-    delete iShortCaption;
-	delete iMsg;
-    delete iDefinition;
-    }
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetApp::Definition() const
-    {
-    return iDefinition ? TPtrC(*iDefinition) : TPtrC();
-    }
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetApp::GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const
-    {
-    TRAP_IGNORE(GetCaptionL(aTitleType));
-
-    if (aTitleType == EAiScutSkeyTitle)
-        {
-        aDes.Set(iShortCaption ? *iShortCaption : KNullDesC());
-        }
-    else
-        {
-        aDes.Set(iCaption ? *iCaption : KNullDesC());
-        }
-
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetApp::GetCaptionL(TAiScutAppTitleType aTitleType) const
-    {
-    TApaAppInfo appInfo;
-
-    // Use lazy evaluation, create the caption only when it is first needed.
-    if (aTitleType == EAiScutSkeyTitle)
-        {
-        if( !iShortCaption )
-            {
-            iEngine.ApaSession().GetAppInfo(appInfo, iAppUid);
-            iShortCaption = appInfo.iShortCaption.AllocL();            
-            }
-        }
-    else
-        {
-        if (!iCaption)
-            {
-            iEngine.ApaSession().GetAppInfo(appInfo, iAppUid);
-            iCaption = appInfo.iCaption.AllocL();
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetApp::GetIcon(CGulIcon*& aIcon) const
-    {
-    // First try to make the override icon
-    // if not successful then do it ourself
-    if ( CAiScutTarget::GetIcon(aIcon) != KErrNone )
-        {
-        TRAP_IGNORE(CreateAppIconL(aIcon));
-        }
-
-
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon for toolbar.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetApp::GetToolbarIcon(CGulIcon*& aIcon) const
-    {
-    if ( CAiScutTarget::GetToolbarIcon(aIcon) != KErrNone)
-        {
-        TRAP_IGNORE(CreateAppIconL(aIcon));
-        }
-
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// Creates the application icon.
-// ---------------------------------------------------------------------------
-//
-
-void CAiScutTargetApp::CreateAppIconL(CGulIcon*& aIcon) const
-    {
-    // To make sure we won't end up with a partially created icon, we first create
-    // a temporary icon and take it into use only when it is propertly initialized.
-    CGulIcon* tempIcon = NULL;
-    TInt err = KErrNone;
-
-    // If no scalable icon support is available then the icon is constructed the "old way"
-    // java icon separately from the native icon. If the support is available then the
-    // java icon is constructed the same way the native icon is constructed.
-
-    const TBool isNonNative = iEngine.IsNonNative(iAppUid);
-
-    // First try to create a normal non-native icon
-    if (isNonNative)
-        {
-        TRAP(err,
-            tempIcon = CreateNonNativeIconL()
-            );
-        // Just to be sure
-        if (err != KErrNone)
-            {
-            tempIcon = NULL;
-            }
-        }
-    // No icon yet so either native icon or non-native SVG icon.
-    if (!tempIcon)
-        {
-        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-        if ((iAppUid == KScutPersonalisationUid && iViewUid == KScutChangeThemeViewId)
-         || (iAppUid == KScutGeneralSettingsUid && (iViewUid == KScutInstallationViewId
-                               ||  iViewUid == KScutConnectivityViewId))
-          )
-          {
-          tempIcon = CreateSubstituteIconL(skin, iAppUid, iViewUid);
-          }
-    else
-      {
-          CFbsBitmap* bitmap = NULL;
-          CFbsBitmap* mask   = NULL;
-
-        AknsUtils::CreateAppIconLC(skin, iAppUid, EAknsAppIconTypeList, bitmap, mask);
-        if (bitmap)
-          {
-        tempIcon = CGulIcon::NewL(bitmap, mask);
-        CleanupStack::Pop(2);   // Bitmap and mask. They have to be popped out by number
-                                    // because the order in which they are pushed in is undefined.
-        }
-
-          }
-
-    }
-
-    aIcon = tempIcon;
-  }
-
-
-CGulIcon* CAiScutTargetApp::CreateSubstituteIconL( MAknsSkinInstance* aSkin, TUid aAppUid, TUid iViewUid ) const
-  {
-  CGulIcon* tempIcon = NULL;
-  TParse* parse = new (ELeave) TParse;
-    CleanupStack::PushL(parse);
-    parse->Set(KBitmapFile, &KDC_APP_BITMAP_DIR, NULL);
-    HBufC* fileName = parse->FullName().AllocLC();
-  TPtr fileNamePtr = fileName->Des();
-
-  //change idle theme
-  if (aAppUid == KScutPersonalisationUid && iViewUid == KScutChangeThemeViewId)
-      {
-      tempIcon = AknsUtils::CreateGulIconL(
-          aSkin,
-          KAknsIIDQgnPropPslnAiSub,
-          fileNamePtr,
-            EMbmAiscutpluginQgn_prop_psln_ai_sub,
-          EMbmAiscutpluginQgn_prop_psln_ai_sub_mask);
-      }
-    //appmngr
-    else if(aAppUid == KScutGeneralSettingsUid && iViewUid == KScutInstallationViewId)
-      {
-      CFbsBitmap* bitmap = NULL;
-      CFbsBitmap* mask   = NULL;
-
-    AknsUtils::CreateAppIconLC(aSkin, KScutAppMngrUid, EAknsAppIconTypeList, bitmap, mask);
-    
-    // The icon may reside in cache so we need to exclude in order
-    // for updated icons to be loaded properly.
-    AknIconUtils::ExcludeFromCache( bitmap );
-    if (bitmap)
-      {
-      tempIcon = CGulIcon::NewL(bitmap, mask);
-      CleanupStack::Pop(2);   // Bitmap and mask. They have to be popped out by number
-                  // because the order in which they are pushed in is undefined.
-      }
-      }
-    //connectivity view
-    else if(aAppUid == KScutGeneralSettingsUid && iViewUid == KScutConnectivityViewId)
-      {
-      tempIcon = AknsUtils::CreateGulIconL(
-          aSkin,
-          KAknsIIDQgnPropAiShortcut,
-          fileNamePtr,
-            EMbmAiscutpluginQgn_prop_cp_conn_shortcut,
-          EMbmAiscutpluginQgn_prop_cp_conn_shortcut_mask);
-      }
-    else
-      {
-      //never should go here!
-      }
-
-      CleanupStack::PopAndDestroy(2, parse); // fileName, parse
-      return tempIcon;
-  }
-
-// ---------------------------------------------------------------------------
-// Creates the NonNative application icon.
-// ---------------------------------------------------------------------------
-//
-
-CGulIcon* CAiScutTargetApp::CreateNonNativeIconL() const
-    {
-    CApaMaskedBitmap* maskedbitmap = CApaMaskedBitmap::NewLC();
-
-    CArrayFixFlat<TSize>* sizesArray = new (ELeave) CArrayFixFlat<TSize>(KIconSizeArray);
-    CleanupStack::PushL(sizesArray);
-
-    TInt err = iEngine.ApaSession().GetAppIconSizes(iAppUid, *sizesArray);
-
-    // If there is no error and there is something in array
-    // use first icon size and get an icon.
-    if (!err && sizesArray->Count())
-        {
-        err = iEngine.ApaSession().GetAppIcon(iAppUid, sizesArray->At(0), *maskedbitmap);
-        }
-
-    // If there was an error, delete every allocated object and leave.
-    if (err)
-        {
-        CleanupStack::PopAndDestroy(sizesArray);
-        CleanupStack::PopAndDestroy(maskedbitmap);
-        User::Leave(err);
-        }
-
-    CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
-    CleanupStack::PushL(bitmap);
-    CFbsBitmap* mask   = new (ELeave) CFbsBitmap();
-    CleanupStack::PushL(mask);
-
-    User::LeaveIfError(bitmap->Duplicate(maskedbitmap->Handle()));
-    User::LeaveIfError(mask->Duplicate(maskedbitmap->Mask()->Handle()));
-
-    CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
-    //icon->SetBitmapsOwnedExternally(ETrue);
-
-    CleanupStack::Pop(mask);
-    CleanupStack::Pop(bitmap);
-
-    CleanupStack::PopAndDestroy(sizesArray);
-    CleanupStack::PopAndDestroy(maskedbitmap);
-
-    return icon;
-    }
-
-// ---------------------------------------------------------------------------
-// Checks if the target application is accessible.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutTargetApp::IsAccessibleL(TInt /*aCheckType*/)
-    {
-    if (iAppUid == KNullUid || iEngine.IsHidden(iAppUid))
-        {
-        return EFalse;
-        }
-
-    TApaAppInfo appInfo;
-    TInt ret = iEngine.ApaSession().GetAppInfo(appInfo, iAppUid);
-
-    if (ret == RApaLsSession::EAppListInvalid)
-        {
-        // Application list not fully populated yet. Leave with KErrNotReady so
-        // the engine can trap it and start the timer to check accessiblity later.
-        User::Leave(KErrNotReady);
-        }
-
-    return (ret == KErrNone);
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetApp::LaunchL()
-    {
-    LaunchL( KNullDesC8 );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetApp::LaunchL( const TDesC8& aCustomMessage )
-    {
-    __PRINTS( "XAI: CAiScutShortcut::LaunchL");
-    __PRINT( __DBG_FORMAT("XAI:   type = %d"), Type());
-
-    if (iAppUid != KNullUid)
-        {
-
-        // Some special cases
-        // ---------------------------------
-        if( Type() == EScutApplicationView &&
-            iAppUid == KScutGeneralSettingsUid )
-            {
-            CGSLauncher* l = CGSLauncher::NewLC();
-            l->LaunchGSViewL ( iViewUid,
-                               KScutActiveIdleUid,
-                               aCustomMessage );            
-            CleanupStack::PopAndDestroy( l );
-            
-            return;    
-            }
-        else if ( ( ( Type() == EScutChangeTheme) && ( iAppUid == KScutPersonalisationUid ) ) ||  // For AI2 Themes
-                  ( iAppUid == KScutDiallerUid ) )                                                // Dialer
-            {
-            const TVwsViewId viewId(iAppUid, iViewUid);
-            TUid msgId = KScutGeneralSettingsUid;
-            
-            if( iAppUid == KScutDiallerUid ) 
-                {
-                msgId = KScutDiallerViewCommand;
-                RProperty::Set(KPSUidAiInformation, KActiveIdleState, EPSAiNumberEntry );
-                }
-
-            TInt err = iEngine.VwsSession()->CreateActivateViewEvent( viewId, msgId, aCustomMessage );
-
-            return;
-            }
-
-        TBool         exists = EFalse;
-
-        CAknTaskList* taskList = CAknTaskList::NewL(iEngine.Env()->WsSession());
-        TApaTask      task(taskList->FindRootApp(iAppUid));
-        delete        taskList;
-
-        exists = task.Exists();
-
-        // If not found, try again little harder
-        // ----------------------------------------
-        if (!exists)
-            {
-            RWsSession wsSession = iEngine.Env()->WsSession();
-            task.SetWgId(0);                // Set task to non-existant task
-            TInt wgId=0;
-            CApaWindowGroupName::FindByAppUid(iAppUid, wsSession, wgId);
-
-            if (wgId != KErrNotFound)
-                {
-                exists = ETrue;
-            task.SetWgId(wgId);
-                }
-            }
-
-        // Actual reactivatio / starting
-        // -----------------------------
-        if (exists)       // Found, reactivate
-            {
-            if (iMsg && iMsg->Length())
-                {
-                task.SendMessage(KNullUid, *iMsg);
-                }
-            if ( iAppUid == KScutAppShellUid ) // AppShell effect is an exception
-            	{
-            	//start different fullscreen effect when launching appshell
-            	GfxTransEffect::BeginFullScreen( AknTransEffect::EApplicationActivate ,
-            			TRect(0,0,0,0),
-            	        AknTransEffect::EParameterType,
-            	        AknTransEffect::GfxTransParam( iAppUid,
-            	        AknTransEffect::TParameter::EActivateExplicitContinue ) );        
-            	}
-            
-            if( iAppUid == KScutAppShellUid ) // Appshell starting is an exception
-                {
-                task.SendMessage( KUidApaMessageSwitchOpenFile , KNullDesC8 );
-                }
-            else
-                {
-                // If message was sent, don't try to bring task to foreground as task will do it itself
-                if ( !( (iAppUid == KScutLogsUid) && (iMsg && iMsg->Length() > 0)) )
-                    {
-                    CAknSgcClient::MoveApp(task.WgId(), ESgcMoveAppToForeground);
-                    }
-                }
-            }
-        else             // Not exists, starting
-            {
-            TApaAppInfo appInfo;
-
-            if (iEngine.ApaSession().GetAppInfo(appInfo, iAppUid) == KErrNone)
-                {
-                if (FeatureManager::FeatureSupported(KFeatureIdCommonVoip) &&
-                    (iAppUid == KScutEasyVoIPApplicationUid) )
-                    {
-                    SetEasyVoIPShortcutStartL();
-                    }
-
-                CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
-                cmdLine->SetExecutableNameL(appInfo.iFullName);
-                if (iMsg && iMsg->Length())
-                    {
-                    cmdLine->SetCommandL(EApaCommandRun);
-                    cmdLine->SetTailEndL(*iMsg);
-                    }
-                if (iBackground)
-                    {
-                    cmdLine->SetCommandL(EApaCommandBackground);
-                    }
-                if ( iAppUid == KScutVoiceDialUid )
-                	{
-                	cmdLine ->SetCommandL( EApaCommandRunWithoutViews );
-                	}
-
-                TInt err = iEngine.ApaSession().StartApp(*cmdLine);
-
-
-                __PRINT( __DBG_FORMAT("XAI:   StartApp err = %d"), err);
-
-                User::LeaveIfError(err);
-
-                CleanupStack::PopAndDestroy(cmdLine);
-                }
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetApp::AppUid() const
-    {
-
-#ifdef __WEB_WIDGETS
-    // for widgets return widgetapp uid.
-    if (iEngine.IsWidget(iAppUid))
-        {
-        return KUidWidgetUi;
-        }
-#endif
-
-    return iAppUid;
-    }
-
-// ---------------------------------------------------------------------------
-// Return the view id
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetApp::AdditionalUid() const
-    {
-    return iViewUid;
-    }
-
-// ---------------------------------------------------------------------------
-// CScShortcutNativeApp::SetEasyVoIPShortcutStartL()
-//
-// Performs Central Repository shortcut set for EasyVoIP application.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetApp::SetEasyVoIPShortcutStartL() const
-    {
-    CRepository* repository = CRepository::NewL(KUidEasyVoIPRepository);
-    CleanupStack::PushL(repository);
-
-    // Set shortcut start for EasyVoIP application.
-    TInt error = repository->Set(KEasyVoIPShortcutStartup, 1);
-    User::LeaveIfError(error);
-
-    CleanupStack::PopAndDestroy(repository);
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetbkm.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for bookmark shortcut target
-*
-*/
-
-
-#include <coemain.h>            // For CCoeEnv
-#include <w32std.h>             // For RWsSession
-#include <apgtask.h>            // For TApaTaskList
-#include <gulicon.h>            // For CGulIcon
-#include <AknsUtils.h>          // For AknsUtils
-#include <data_caging_path_literals.hrh>
-
-#include "aiscutcontentmodel.h"
-#include "caiscuttargetbkm.h"
-#include "caiscutengine.h"
-#include <aiscutplugin.mbg>
-
-#include "debug.h"
-
-
-
-_LIT16(KParam, "1 ");
-const TInt KTBUF16 = 16;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetBkm::CAiScutTargetBkm(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetBkm::ConstructL(const TAiScutParser& aParser)
-{
-    iDefinition = aParser.Get(EScutDefComplete).AllocL();
-    iBkmUid = aParser.ParseUid(aParser.Get(EScutDefParamValue));
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetBkm* CAiScutTargetBkm::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser)
-{
-    CAiScutTargetBkm* self = new (ELeave) CAiScutTargetBkm(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aParser);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetBkm::~CAiScutTargetBkm()
-{
-    delete iCaption;
-    delete iDefinition;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetBkm::Definition() const
-{
-    return iDefinition ? TPtrC(*iDefinition) : TPtrC();
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetBkm::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const
-{
-    // Use lazy evaluation, create the caption only when it is first needed.
-    if (!iCaption)
-    {
-        // Get the caption.
-        TRAP_IGNORE(GetCaptionL());
-    }
-
-    aDes.Set(iCaption ? *iCaption : KNullDesC());
-
-    return 0;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetBkm::GetCaptionL() const
-{
-    RFavouritesDb& db = iEngine.FavouritesDb();
-
-    CFavouritesItem* favItem = CFavouritesItem::NewLC();
-    TInt err = db.Get(iBkmUid.iUid, *favItem);
-    iCaption = favItem->Name().AllocL();
-
-    CleanupStack::PopAndDestroy(favItem);
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetBkm::GetIcon(CGulIcon*& aIcon) const
-{
-     if ( CAiScutTarget::GetIcon(aIcon) != KErrNone )
-        {
-        
-        CGulIcon* tempIcon = NULL;
-
-        TFileName pluginIconFile(KDC_APP_BITMAP_DIR);
-        pluginIconFile.Append(KBitmapFile);
-
-        TRAP_IGNORE(
-            tempIcon = AknsUtils::CreateGulIconL(
-                AknsUtils::SkinInstance(),
-                KAknsIIDQgnPropAiShortcut,
-                pluginIconFile,
-                EMbmAiscutpluginQgn_menu_url,
-                EMbmAiscutpluginQgn_menu_url_mask
-                )
-            );
-
-        aIcon = tempIcon;
-        }
-
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// Checks if the target bookmark is accessible.
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutTargetBkm::IsAccessibleL(TInt /*aCheckType*/)
-{
-    if (iBkmUid == KNullUid)
-    {
-        return EFalse;
-    }
-
-    // Search bookmark from favourites.
-    RFavouritesDb& db = iEngine.FavouritesDb();
-
-    TBool exists = EFalse;
-    TInt err = db.ItemExists(iBkmUid.iUid, exists);
-    if (err != KErrNone)
-    {
-        exists = EFalse;
-    }
-
-    return exists;
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAiScutTargetBkm::LaunchL()
-{
-/*
-1. Start/Continue the browser and nothing is specified (the default case)   Parameter = <Any text>
-2. Start/Continue the browser specifying a Bookmark                         Parameter = "1"+"<Space>"+"<Uid of the Bookmark>"
-3. Start/Continue the browser specifying a Saved deck                       Parameter = "2"+"<Space>"+"<Uid of the Saved deck>"
-4. Start/Continue the browser specifying a URL                              Parameter = "4"+"<Space>"+"<Url>"
-5. Start/Continue the browser specifying a URL and an Access Point          Parameter = "4"+"<Space>"+"<Url>"+"<Space>"+"<Uid of Ap>"
-6. Start/Continue the browser with the start page.
-   (Used when starting the browser with a long press of "0" in the
-   Idle state of the phone.                                                 Parameter = "5"
-7. Start/Continue the browser specifying a Bookmark folder                  Parameter = "6"+"<Space>"+"<Uid of the Folder>"
-*/
-
-    TApaTaskList taskList(iEngine.Env()->WsSession());
-    TApaTask task = taskList.FindApp(KScutBrowserUid);
-
-    
-    TBuf<KTBUF16> param(KParam);
-    param.AppendNum(iBkmUid.iUid);
-
-	__PRINT( __DBG_FORMAT("XAI: CAiScutTargetBkm::LaunchL '%S' "), &param);
-    
-    if (task.Exists())
-    {
-        HBufC8* param8 = HBufC8::NewLC(param.Length());
-        param8->Des().Copy(param);
-        task.SendMessage(KNullUid, *param8); // Uid is not used.
-        CleanupStack::PopAndDestroy(param8);
-    }
-    else
-    {
-        TThreadId id;
-        User::LeaveIfError(iEngine.ApaSession().StartDocument(
-            param, KScutBrowserUid, id));
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetBkm::AppUid() const
-{
-    return KScutBrowserUid;
-}
-
-// ---------------------------------------------------------------------------
-// Return the bkm id
-// ---------------------------------------------------------------------------
-TUid CAiScutTargetBkm::AdditionalUid() const
-    {
-    return iBkmUid;
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetempty.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for empty target.
-*
-*/
-
-
-#include "caiscuttargetempty.h"
-
-// ----------------------------------------------------------------------------
-// CAiScutEmpty::CAiScutEmpty
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetEmpty::CAiScutTargetEmpty(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutEmpty::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CAiScutTargetEmpty::ConstructL(const TDesC& aTarget)
-{
-    iDefinition = aTarget.AllocL();
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutEmpty::NewL
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetEmpty* CAiScutTargetEmpty::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TDesC& aTarget)
-{
-    CAiScutTargetEmpty* self = new (ELeave) CAiScutTargetEmpty(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aTarget);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutEmpty::~CAiScutEmpty
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetEmpty::~CAiScutTargetEmpty()
-{
-    delete iDefinition;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetEmpty::Definition() const
-{
-    return iDefinition ? TPtrC(*iDefinition) : TPtrC();
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetEmpty::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const
-{
-    aDes.Set(KNullDesC());
-    return 0;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetEmpty::GetIcon(CGulIcon*& aIcon) const
-{
-    aIcon = NULL;
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-// Checks if the target is accessible
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutTargetEmpty::IsAccessibleL(TInt /*aCheckType*/)
-{
-    return (iType != EScutUnknown);
-}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAiScutTargetEmpty::LaunchL()
-{
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetEmpty::AppUid() const
-{
-    return KNullUid;
-}
-
-//  End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargethttp.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for http shortcut target
-*
-*/
-
-
-#include <coemain.h>            // For CCoeEnv
-#include <w32std.h>             // For RWsSession
-#include <apgtask.h>            // For TApaTaskList
-#include <gulicon.h>            // For CGulIcon
-#include <AknsUtils.h>          // For AknsUtils
-#include <data_caging_path_literals.hrh>
-
-#include "caiscuttargethttp.h"
-#include "caiscutengine.h"
-#include <aiscutplugin.mbg>
-
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetHttp::CAiScutTargetHttp(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetHttp::ConstructL(const TAiScutParser& aParser)
-{
-    iDefinition = aParser.Get( EScutDefComplete ).AllocL();
-    iChecksum = TUid::Uid( aParser.ChecksumForString( *iDefinition) );
-    
-    // Get the possible custom title string from the parser
-    iCaption = HBufC::NewL( iDefinition->Length() ); 
-    TPtr captionPtr = iCaption->Des();
-    TInt err = aParser.CustomTitle( captionPtr );    
-    
-    if ( err != KErrNone || iCaption->Length() <= 0 )
-        {
-        delete iCaption;
-        iCaption = NULL;
-        }
-    TPtr defPtr = iDefinition->Des();    
-    // we need to strip the possible icon definitions away from 
-    // the URL as they are not part of it.
-    aParser.RemoveExtraDefinitionsL( defPtr );
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetHttp* CAiScutTargetHttp::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser)
-{
-    CAiScutTargetHttp* self = new (ELeave) CAiScutTargetHttp(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aParser);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetHttp::~CAiScutTargetHttp()
-{
-    delete iDefinition;
-    delete iCaption;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetHttp::Definition() const
-{
-    return iDefinition ? TPtrC(*iDefinition) : TPtrC();
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetHttp::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const
-{
-    // Custom title is fetched when constructing. If no custom
-    // title then use part of the URL as title
-    if ( !iCaption )
-    {        
-        TUriParser parser;
-        TInt err = parser.Parse(*iDefinition);
-
-        if (err == KErrNone)
-            {
-            // Remove scheme from the url.
-            iCaption = parser.Extract(EUriHost).Alloc();
-            }
-        else
-            {
-            iCaption = iDefinition->Alloc();
-            }
-    }
-
-    aDes.Set(*iCaption);
-
-    return 0;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetHttp::GetIcon(CGulIcon*& aIcon) const
-{
-
-    if ( CAiScutTarget::GetIcon(aIcon) != KErrNone )
-        {
-        CGulIcon* tempIcon = NULL;
-
-        TFileName pluginIconFile(KDC_APP_BITMAP_DIR);
-        pluginIconFile.Append(KBitmapFile);
-
-        TRAP_IGNORE(
-            tempIcon = AknsUtils::CreateGulIconL(
-                AknsUtils::SkinInstance(),
-                KAknsIIDQgnPropAiShortcut,
-                pluginIconFile,
-                EMbmAiscutpluginQgn_menu_url,
-                EMbmAiscutpluginQgn_menu_url_mask
-                )
-            );
-
-        aIcon = tempIcon;
-        }
-    return 0;
-}
-
-
-// ---------------------------------------------------------------------------
-// Checks if the shortcut target is accessible.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutTargetHttp::IsAccessibleL(TInt /*aCheckType*/)
-{
-    return (iDefinition->Length() > 0);
-}
-
-
-// -----------------------------------------------------------------------------
-// Launches the browser
-// -----------------------------------------------------------------------------
-//
-void CAiScutTargetHttp::LaunchL()
-{
-    // Store the http address directly in the browser parameter format.
-    // For example "4 http://www.nokia.com". 4 = open an url.
-    HBufC* param = HBufC::NewLC(iDefinition->Length() + KOpenUrlParam().Length());
-    param->Des().Copy(KOpenUrlParam());
-    param->Des().Append(*iDefinition);
-
-    __PRINT( __DBG_FORMAT("XAI: CAiScutTargetHttp::LaunchL '%S' "), param);
-
-    TApaTaskList taskList(iEngine.Env()->WsSession());
-    TApaTask task = taskList.FindApp(KScutBrowserUid);
-
-    if (task.Exists())
-    {
-        HBufC8* param8 = HBufC8::NewLC(param->Length());
-        param8->Des().Copy(*param);
-        task.SendMessage(KNullUid, *param8); // Uid is not used.
-        CleanupStack::PopAndDestroy(param8);
-    }
-    else
-    {
-        TThreadId id;
-        User::LeaveIfError(iEngine.ApaSession().StartDocument(
-            *param, KScutBrowserUid, id));
-    }
-
-    CleanupStack::PopAndDestroy(param);
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetHttp::AppUid() const
-{
-    return KScutBrowserUid;
-}
-
-TUid CAiScutTargetHttp::AdditionalUid() const
-{
-    return iChecksum;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetkeylock.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for key lock
-*
-*/
-
-
-#include "caiscuttargetkeylock.h"
-#include <featmgr.h>
-
-// Amount of attempts to try to connect to server.
-const TInt KTriesToConnectServer(3);
-
-// Delay between retries to connect.
-const TInt KTimeBeforeRetryingServerConnection(50000);
-
-// ----------------------------------------------------------------------------
-// CAiScutKeyLock::CAiScutKeyLock
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetKeyLock::CAiScutTargetKeyLock(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutKeyLock::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CAiScutTargetKeyLock::ConstructL(const TDesC& aTarget)
-{
-    iDefinition = aTarget.AllocL();
-
-    TInt err(KErrGeneral);
-    TInt thisTry(0);
-
-    // Try connect successfully with server limited a number of times
-    err = iKeyLock.Connect();
-    while ((err != KErrNone) && (thisTry++ < KTriesToConnectServer))
-        {
-        User::After(KTimeBeforeRetryingServerConnection);
-        err = iKeyLock.Connect();
-        }
-    User::LeaveIfError(err);
-
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutKeyLock::NewL
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetKeyLock* CAiScutTargetKeyLock::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TDesC& aTarget)
-{
-    CAiScutTargetKeyLock* self = new (ELeave) CAiScutTargetKeyLock(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aTarget);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// ----------------------------------------------------------------------------
-// CAiScutKeyLock::~CAiScutKeyLock
-// ----------------------------------------------------------------------------
-//
-CAiScutTargetKeyLock::~CAiScutTargetKeyLock()
-{
-    delete iDefinition;
-    iKeyLock.Close();
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetKeyLock::Definition() const
-{
-    return iDefinition ? TPtrC(*iDefinition) : TPtrC();
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetKeyLock::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const
-{
-    aDes.Set(KNullDesC());
-    return 0;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetKeyLock::GetIcon(CGulIcon*& aIcon) const
-{
-    aIcon = NULL;
-    return 0;
-}
-
-
-// -----------------------------------------------------------------------------
-// Checks if the target is accessible
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutTargetKeyLock::IsAccessibleL(TInt /*aCheckType*/)
-{
-    return ETrue;
-}
-
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CAiScutTargetKeyLock::LaunchL()
-{
-    EnableKeyLock();
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetKeyLock::AppUid() const
-{
-    return KNullUid;
-}
-
-
-// ----------------------------------------------------------------------------
-// CAiScutTargetKeyLock::EnableKeyLock
-// ----------------------------------------------------------------------------
-//
-void CAiScutTargetKeyLock::EnableKeyLock()
-{
-    iKeyLock.EnableKeyLock();
-}
-
-
-// ----------------------------------------------------------------------------
-// CAiScutTargetKeyLock::IsKeyLockEnabled
-// ----------------------------------------------------------------------------
-//
-TBool CAiScutTargetKeyLock::IsKeyLockEnabled()
-{
-    return iKeyLock.IsKeyLockEnabled();
-}
-
-//  End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetmessagingview.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for messaging view shortcut target
-*
-*/
-
-
-#include <msvuids.h>            // For KMsvRootIndexEntryIdValue
-#include <gulicon.h>            // For CGulIcon
-#include <SenduiMtmUids.h>
-#include <viewcli.h>            // For CVwsSessionWrapper
-#include <AknsUtils.h>          // For AknsUtils
-#include <data_caging_path_literals.hrh>
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <viewclipartner.h>
-#endif
-
-#include "caiscuttargetmessagingview.h"
-#include "caiscutengine.h"
-#include <aiscutplugin.mbg>
-
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetMessagingView::CAiScutTargetMessagingView(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetMessagingView::ConstructL(const TAiScutParser& aParser)
-{
-    iDefinition = aParser.Get(EScutDefComplete).AllocL();
-    // Updates the view name also
-    FindViewIdL();
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetMessagingView* CAiScutTargetMessagingView::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser)
-{
-    CAiScutTargetMessagingView* self = new (ELeave) CAiScutTargetMessagingView(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aParser);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetMessagingView::~CAiScutTargetMessagingView()
-{
-    delete iDefinition;
-    delete iViewName;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetMessagingView::Definition() const
-{
-    return TPtrC(*iDefinition);
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetMessagingView::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const
-{
-    aDes.Set(*iViewName);
-    return 0;
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetMessagingView::GetIcon(CGulIcon*& aIcon) const
-{
-    if ( CAiScutTarget::GetIcon(aIcon) != KErrNone )
-        {
-        TRAP_IGNORE(GetIconL(aIcon));    
-        }
-
-    return 0;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetMessagingView::GetIconL(CGulIcon*& aIcon) const
-{
-    CGulIcon* tempIcon = NULL;
-
-    CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask   = NULL;
-
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    AknsUtils::CreateAppIconLC(skin, KScutMessagingUid, EAknsAppIconTypeList, bitmap, mask);
-
-    tempIcon = CGulIcon::NewL(bitmap, mask);
-
-    CleanupStack::Pop(2); // Bitmap and mask. They have to be popped out by number
-                          // because the order in which they are pushed in is undefined.
-
-    //Do not need to sets the bitmap and mask to be owned externally
-    
-    aIcon = tempIcon;
-}
-
-
-// ---------------------------------------------------------------------------
-// Checks if the shortcut target is accessible.
-// ---------------------------------------------------------------------------
-//
-TBool CAiScutTargetMessagingView::IsAccessibleL(TInt /*aCheckType*/)
-{
-	return FindViewIdL() != KErrNotFound;
-}
-
-
-// ---------------------------------------------------------------------------
-// Launches a remote mailbox.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetMessagingView::LaunchL()
-{
-    TMsvId id(FindViewIdL());
-    if (id != KErrNotFound)
-    {
-        const TVwsViewId viewId(KScutMessagingUid, KScutRemoteMailboxViewId);
-        iEngine.VwsSession()->CreateActivateViewEvent(viewId, TUid::Uid(id), KNullDesC8());
-    }
-}
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetMessagingView::AppUid() const
-{
-    return KScutMessagingUid;
-}
-
-
-// ---------------------------------------------------------------------------
-// Tries to find a view id.
-// ---------------------------------------------------------------------------
-//
-TMsvId CAiScutTargetMessagingView::FindViewIdL()
-    {
-    TMsvId id(KErrNotFound);
-
-    TInt mailboxId = KErrNone;
-    TAiScutParser parser;
-    parser.Parse(*iDefinition);          		
-    TLex lex(parser.Get(EScutDefParamValue));
-    lex.Val(mailboxId);
-
-    if (iEngine.MsvSession())
-    {
-        // KErrNotReady is the only allowed leave code. Engine will trap it and start a timer
-        // to check access later. Other possible leaves emitted by the message server are
-        // substituted with KErrNotReady.
-        CMsvEntry* rootEntry = NULL;
-        TRAPD(err, rootEntry = iEngine.MsvSession()->GetEntryL(KMsvRootIndexEntryIdValue));
-        if (err != KErrNone)
-        {
-            User::Leave(KErrNotReady);
-        }
-
-		if(rootEntry)
-		{
-	        // No leaving code here since rootEntry is not in cleanup stack.
-    	    for (TInt i = rootEntry->Count(); --i >= 0;)
-        	{
-            	const TMsvEntry& tentry = (*rootEntry)[i];
-	
-				__PRINT( __DBG_FORMAT("XAI: CAiScutTargetMessagingView::FindViewIdL id = 0x%x '%S'"),
-					 tentry.Id(), &tentry.iDetails);
-            	if ((tentry.iMtm == KSenduiMtmImap4Uid || tentry.iMtm == KSenduiMtmPop3Uid) &&
-                	tentry.Id() == mailboxId)
-	            {
-    	            id = tentry.Id();
-    	            delete iViewName;
-    	            iViewName = NULL;
-    	            iViewName = tentry.iDetails.AllocL();
-        	        break;
-            	}
-	        }
-	
-    	    delete rootEntry;
-        	rootEntry = NULL;
-			
-		}
-    }
-
-    return id;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/caiscuttargetnewmsg.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,448 +0,0 @@
-/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for new message shortcut target
-*
-*/
-
-
-#include <sendui.h>         // For CSendUi
-#include <Sendnorm.rsg>     // For settings not ok - error dialog
-#include <gulicon.h>        // For CGulIcon
-#include <SenduiMtmUids.h>
-#include <cemailaccounts.h> // For finding out available email account counts
-#include <AknsUtils.h>      // For AknsUtils
-
-#include <avkon.rsg>
-
-#include <data_caging_path_literals.hrh>
-#include <AknGlobalNote.h>  // For error note
-#include <MuiuMsvUiServiceUtilities.h>
-#include <StringLoader.h>
-
-#include "aiscutcontentmodel.h"
-#include "caiscuttargetnewmsg.h"
-#include "caiscutengine.h"
-#include <aiscutplugin.mbg>
-#include <e32property.h>
-#include <connect/sbdefs.h>
-#include <filemanagerbkupchecker.rsg>
-#include <aiscuttexts.rsg>
-
-#include "debug.h"
-
-using namespace conn;
-const TInt KMaxBufSize = 256;
-
-// Status keys adopted from FileManager to be used when checking file backup status
-const TUid KPSUidFileManagerStatus = { 0x101F84EB }; // File Manager SID
-const TUint32 KFileManagerBkupStatus = 0x00000001;
-
-enum TFileManagerBkupStatusType
-    {
-    EFileManagerBkupStatusUnset   = 0x00000000,
-    EFileManagerBkupStatusBackup  = 0x00000001,
-    EFileManagerBkupStatusRestore = 0x00000002
-    };
-
-TBool PhoneIsInBackupOrRestoreMode()
-    {
-    TBool backupOrRestore = EFalse;
-    
-    TInt status( EFileManagerBkupStatusUnset );
-    TInt err( RProperty::Get( KPSUidFileManagerStatus, KFileManagerBkupStatus, status ) );
-    if ( status == EFileManagerBkupStatusBackup )
-    {
-    	backupOrRestore = ETrue;
-    	return backupOrRestore;
-    }
-
-    // Get the back-up restore key, return EFalse if we can't get the key
-    TInt keyVal = 0;
-    const TInt error = RProperty::Get( KUidSystemCategory, conn::KUidBackupRestoreKey, keyVal );
-    if( error )
-        {
-        return backupOrRestore;
-        }
-
-    const conn::TBURPartType partType = static_cast< conn::TBURPartType >( keyVal & conn::KBURPartTypeMask );
-    if  (keyVal != 0)
-        {
-        switch(partType)
-            {
-        case EBURUnset:
-        case EBURNormal:
-            break;
-        case EBURBackupFull:
-        case EBURBackupPartial:
-        case EBURRestoreFull:
-        case EBURRestorePartial:
-            backupOrRestore = ETrue;
-            break;
-            }
-        }
-    //
-
-    return backupOrRestore;
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetNewMsg::CAiScutTargetNewMsg(CAiScutEngine& aEngine, TShortcutType aType)
-    : CAiScutTarget(aEngine, aType)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetNewMsg::ConstructL(const TAiScutParser& aParser)
-{
-    iDefinition = aParser.Get(EScutDefComplete).AllocL();
-
-    iAppUid       = KNullUid;
-    iViewUid.iUid = -1;
-
-    switch (aParser.Type())
-    {
-    case EScutNewMessage:
-        iMtm          = KSenduiMtmUniMessageUid;
-        iAppUid.iUid  = KScutUnifiedEditorUidValue;
-        break;
-
-    case EScutNewEmail:
-        iMtm          = KSenduiMtmSmtpUid;
-        iAppUid.iUid  = KScutEmailEditorUidValue;
-        break;
-
-#ifdef __SYNCML_DS_EMAIL
-    case EScutNewSyncMLMail:
-        iMtm          = KSenduiMtmSyncMLEmailUid;
-        iAppUid.iUid  = KScutEmailEditorUidValue; // check that these uids are in sync with aiscuttexts.rss
-        iViewUid.iUid = KScutSyncMlEmailUidValue;
-        break;
-#endif
-
-    case EScutNewPostcard:
-        iMtm          = KSenduiMtmPostcardUid;
-        iAppUid.iUid  = KScutPostcardEditorUidValue;
-        break;
-
-    case EScutNewAudioMsg:
-        iMtm          = KSenduiMtmAudioMessageUid;
-        iAppUid.iUid  = KScutAmsEditorUidValue;
-        break;
-
-    case EScutNewMsgType:
-        iAppUid.iUid  = KScutMessagingCenterUidValue; // check that these uids are in sync with aiscuttexts.rss
-        iViewUid.iUid = KScutMessagingCenterUidValue;
-        // fallthrough
-    default:
-        iMtm = KNullUid;
-        break;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetNewMsg* CAiScutTargetNewMsg::NewL(
-    CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser)
-{
-    CAiScutTargetNewMsg* self = new (ELeave) CAiScutTargetNewMsg(aEngine, aType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aParser);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CAiScutTargetNewMsg::~CAiScutTargetNewMsg()
-{
-    delete iCaption;
-    delete iShortCaption;
-    delete iDefinition;
-
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut definition string.
-// ---------------------------------------------------------------------------
-//
-TPtrC CAiScutTargetNewMsg::Definition() const
-{
-    return TPtrC(*iDefinition);
-}
-
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetNewMsg::GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const
-{
-    TRAP_IGNORE(GetCaptionL(aTitleType));
-
-    if (aTitleType == EAiScutSkeyTitle)
-    {
-        aDes.Set(iShortCaption ? *iShortCaption : KNullDesC());
-    }
-    else
-    {
-        aDes.Set(iCaption ? *iCaption : KNullDesC());
-    }
-
-    return 0;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target caption.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetNewMsg::GetCaptionL(TAiScutAppTitleType aTitleType) const
-{
-    HBufC* titlePtr = HBufC::NewLC(KMaxBufSize);
-    TPtr titlePtrP = titlePtr->Des();
-
-
-    // Use lazy evaluation, create the caption only when it is first needed.
-    if (aTitleType == EAiScutSkeyTitle)
-    {
-        if (!iShortCaption)
-        {
-            if (iEngine.GetAppTitle(iAppUid, iViewUid, titlePtrP, aTitleType))
-            {
-                iShortCaption = titlePtrP.AllocL();
-            }
-        }
-    }
-    else
-    {
-        if (!iCaption)
-        {
-            if (iEngine.GetAppTitle(iAppUid, iViewUid, titlePtrP, aTitleType))
-            {
-                iCaption = titlePtrP.AllocL();
-            }
-        }
-    }
-
-    CleanupStack::PopAndDestroy(titlePtr);
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-TInt CAiScutTargetNewMsg::GetIcon(CGulIcon*& aIcon) const
-{
-    if ( CAiScutTarget::GetIcon(aIcon) != KErrNone )
-        {
-        TRAP_IGNORE(GetIconL(aIcon));
-        }
-
-
-    return 0;
-}
-
-// ---------------------------------------------------------------------------
-// Returns the shortcut target icon.
-// ---------------------------------------------------------------------------
-//
-void CAiScutTargetNewMsg::GetIconL(CGulIcon*& aIcon) const
-{
-
-    CGulIcon* tempIcon = NULL;
-    TBool useAppIcon = ETrue;
-    TInt iconId = 0;
-    TInt maskId = 0;
-
-    if (iMtm == KNullUid)
-    {
-        useAppIcon = EFalse;
-        iconId = EMbmAiscutpluginQgn_menu_mce_sel_mes;
-        maskId = EMbmAiscutpluginQgn_menu_mce_sel_mes_mask;
-    }
-#ifdef __SYNCML_DS_EMAIL
-    else if (iMtm.iUid == KSenduiMtmSyncMLEmailUidValue)
-    {
-        useAppIcon = EFalse;
-        iconId = EMbmAiscutpluginQgn_menu_mce_syncmail;
-        maskId = EMbmAiscutpluginQgn_menu_mce_syncmail_mask;
-    }
-#endif
-
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
-    if (useAppIcon)
-    {
-        CFbsBitmap* bitmap = NULL;
-        CFbsBitmap* mask   = NULL;
-
-        AknsUtils::CreateAppIconLC(skin, iAppUid, EAknsAppIconTypeList, bitmap, mask);
-        tempIcon = CGulIcon::NewL(bitmap, mask);
-        CleanupStack::Pop(2); // Bitmap and mask. They have to be popped out by number
-                              // because the order in which they are pushed in is undefined.
-    }
-    else
-    {
-        TFileName pluginIconFile(KDC_APP_BITMAP_DIR);
-        pluginIconFile.Append(KBitmapFile);
-
-        tempIcon = AknsUtils::CreateGulIconL(
-            skin,
-            KAknsIIDQgnPropAiShortcut,
-            pluginIconFile,
-            iconId,
-            maskId
-            );
-    }
-
-    //Do not need to sets the bitmap and mask to be owned externally
-
-
-    aIcon = tempIcon;
-}
-
-
-// -----------------------------------------------------------------------------
-// Checks if the shortcut target is accessible.
-// -----------------------------------------------------------------------------
-//
-TBool CAiScutTargetNewMsg::IsAccessibleL(TInt /*aCheckType*/)
-{
-    return ETrue;
-}
-
-
-// -----------------------------------------------------------------------------
-// Launches the message editor to send an Sms, Mms or Email message.
-// -----------------------------------------------------------------------------
-//
-void CAiScutTargetNewMsg::LaunchL()
-    {
-    if( PhoneIsInBackupOrRestoreMode() )
-        {
-        CAknGlobalNote* note = CAknGlobalNote::NewLC();
-
-        HBufC* prompt = StringLoader::LoadLC( R_QTN_AI_SCUT_OPERATION_DISABLED );
-
-        note->SetSoftkeys( R_AVKON_SOFTKEYS_OK_EMPTY );
-        note->ShowNoteL( EAknGlobalInformationNote, *prompt );
-
-        CleanupStack::PopAndDestroy( prompt );
-        CleanupStack::PopAndDestroy( note );
-        return;
-        }
-
-  CSendUi* sendUi = CSendUi::NewLC();
-
-    if (iMtm == KNullUid)
-        {
-        TSendingCapabilities capabs(0, 0, TSendingCapabilities::ESupportsEditor);
-
-        TUid uid = sendUi->ShowTypedQueryL(CSendUi::EWriteMenu, NULL, capabs, NULL, KNullDesC);
-        if (uid != KNullUid)
-            {
-            sendUi->ServiceCapabilitiesL(uid, capabs);
-            sendUi->CreateAndSendMessageL(uid, NULL, KNullUid, EFalse); // launch standalone
-            }
-        }
-    else
-        {
-        if( iMtm == KSenduiMtmSmtpUid ) // pop, imap, smtp
-            {
-            RArray<TPopAccount> popAccounts;
-            RArray<TImapAccount> imapAccounts;
-            RArray<TSmtpAccount> smtpAccounts;
-            CEmailAccounts* emailAccounts = CEmailAccounts::NewLC();
-            // check that mailbox exists or else display error message
-            emailAccounts->GetPopAccountsL(popAccounts);
-            emailAccounts->GetImapAccountsL(imapAccounts);
-            emailAccounts->GetSmtpAccountsL(smtpAccounts);
-            CleanupStack::PopAndDestroy(emailAccounts);
-
-            if( iMtm == KSenduiMtmSmtpUid &&
-                (popAccounts.Count() + imapAccounts.Count() + smtpAccounts.Count() ) > 0 )
-                {
-                sendUi->CreateAndSendMessageL(iMtm, NULL, KNullUid, EFalse); // launch standalone
-                }
-            else
-                {
-                ShowErrorNote();
-                }
-            popAccounts.Reset();
-            imapAccounts.Reset();
-            smtpAccounts.Reset();
-            }
-        else if ( iMtm == KSenduiMtmSyncMLEmailUid ) // syncml
-            {
-            CMsvEntrySelection* sel =
-                MsvUiServiceUtilities::GetListOfAccountsWithMTML( *(iEngine.MsvSession()), iMtm );
-            TInt accounts = sel->Count();
-            delete sel;
-            if ( accounts > 0 )
-                {
-                sendUi->CreateAndSendMessageL(iMtm, NULL, KNullUid, EFalse); // launch standalone
-                }
-            else
-                {
-                ShowErrorNote();
-                }
-            }
-        else
-            {
-            sendUi->CreateAndSendMessageL(iMtm, NULL, KNullUid, EFalse); // launch standalone
-            }
-
-    }
-    CleanupStack::PopAndDestroy(sendUi);
-}
-
-void CAiScutTargetNewMsg::ShowErrorNote()
-    {
-     TRAP_IGNORE(
-        // Display global error note.
-        CAknGlobalNote* note = CAknGlobalNote::NewLC();
-        HBufC* prompt = StringLoader::LoadLC( R_SENDUI_SETTINGS_NOT_OK );
-        note->ShowNoteL( EAknGlobalErrorNote, *prompt );
-        CleanupStack::PopAndDestroy( prompt );
-        CleanupStack::PopAndDestroy( note );
-    ); // end TRAP_IGNORE
-    }
-
-// ---------------------------------------------------------------------------
-// Return application uid this target launches.
-// ---------------------------------------------------------------------------
-//
-TUid CAiScutTargetNewMsg::AppUid() const
-{
-    return iAppUid;
-}
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/cpopupeventhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut plug-in Popup event handler class
-*
-*/
-
-
-#include "cpopupeventhandler.h"
-#include "PopupFSM.h"
-#include "mpopupeventhandleractions.h"
-
-/**
- * Timeout timer values
- */
-const TInt KTimeoutShort = 900000;  //900 ms
-const TInt KTimeoutLong = 6000000;  //6 sec
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CPopupEventHandler* CPopupEventHandler::NewL(
-    MPopupEventHandlerActions& aPopupEventHandlerActions )
-    {
-    CPopupEventHandler* self = CPopupEventHandler::NewLC( aPopupEventHandlerActions );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CPopupEventHandler* CPopupEventHandler::NewLC(
-    MPopupEventHandlerActions& aPopupEventHandlerActions )
-    {
-    CPopupEventHandler* self = new( ELeave ) CPopupEventHandler(
-        aPopupEventHandlerActions );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CPopupEventHandler::~CPopupEventHandler()
-    {
-    Cancel();
-    iTimer.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CPopupEventHandler::CPopupEventHandler(
-    MPopupEventHandlerActions& aPopupEventHandlerActions )
-    : CActive( EPriorityStandard ),
-    iPopupEventHandlerActions( aPopupEventHandlerActions ),
-    iPopupFSM( *this ),
-    iPublishPopup( ETrue ),
-    iPublishCaption( ETrue ),
-    iCaptionVisible( ETrue )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::ConstructL()
-    {
-    User::LeaveIfError( iTimer.CreateLocal() );
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TPopupFSM& CPopupEventHandler::PopupFSM()
-    {
-    return iPopupFSM;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CPopupEventHandler::PublishPopup() const
-    {
-    return iPublishPopup;
-    }
-
-TBool CPopupEventHandler::PopupVisible() const
-    {
-    return iPopupVisible;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CPopupEventHandler::PublishCaption() const
-    {
-    return iPublishCaption;
-    }
-
-TBool CPopupEventHandler::CaptionVisible() const
-    {
-    return iCaptionVisible;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::DoCancel()
-    {
-    iTimer.Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::RunL()
-    {
-    iPopupFSM.HandleRequestCompleted();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::CompleteSelf()
-    {
-    TRequestStatus* status = &iStatus;
-    User::RequestComplete( status, KErrNone );
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::CancelRequest()
-    {
-    Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::StartShortTimer()
-    {
-    Cancel();  // Cancel previous request by calling iTimer.Cancel()
-    iTimer.After( iStatus, KTimeoutShort );
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::StartLongTimer()
-    {
-    Cancel();  // Cancel previous request by calling iTimer.Cancel()
-    iTimer.After( iStatus, KTimeoutLong );
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::IssuePublishPopup()
-    {
-    iPublishPopup = ETrue;
-    iPopupVisible = ETrue;
-    iPopupEventHandlerActions.IssuePublishShortcut();
-    iPublishPopup = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::IssueCleanPopup()
-    {
-    iPublishPopup = ETrue;
-    iPopupVisible = EFalse;
-    iPopupEventHandlerActions.IssuePublishShortcut();
-    iPublishPopup = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::IssuePublishCaption()
-    {
-    iPublishCaption = ETrue;
-    iCaptionVisible = ETrue;
-    iPopupEventHandlerActions.IssuePublishShortcut();
-    iPublishCaption = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CPopupEventHandler::IssueCleanCaption()
-    {
-    iPublishCaption = ETrue;
-    iCaptionVisible = EFalse;
-    iPopupEventHandlerActions.IssuePublishShortcut();
-    iPublishCaption = EFalse;
-    }
-
-// End of File.
--- a/idlefw/plugins/shortcutplugin/src/taiscutparser.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,816 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Shortcut definition parser
-*
-*/
-
-
-#include "taiscutparser.h"
-#include "aiscutdefs.h"
-
-#include "debug.h"
-
-
-// ======== LOCAL FUNCTIONS ========
-/**
- * Extract a value with the given name from a URI query string.
- * For example a query string of ?view=1234&iconid=3;5&foo=bar
- * and we wanted iconid from that string. Function places the 3;5 
- * into aValue and if needed deletes the "iconid=3;5&" string from the
- * query string.
- *
- * @param aQueryString The querystring
- * @param aParameterName The name of the parameter to find
- * @param aValue Where to place the value
- * @param aRemoveNameAndValue ETrue to remove the name=value from the querystring
- * @return KErrNone on succesful extraction. KErrNotFound if the parameter was not found
-*/
-TInt ExtractValueFromQueryString( TDes &aQueryString, const TDesC &aParameterName,
-    TDes &aValue, TBool aRemoveNameAndValue )
-    {
-    TInt err = KErrNone;
-    HBufC *tempBuffer = aQueryString.Alloc();
-    if ( !tempBuffer )
-        {
-        return KErrNoMemory;
-        }
-    
-    TPtr temp = tempBuffer->Des();
-    
-    TInt foundStartPos = 0;
-    TInt foundStopPos = 0;
-    foundStartPos =  aQueryString.FindC(aParameterName);
-    if ( foundStartPos != KErrNotFound )
-        {
-        // remove the beginning of the string from temp, so no additional &-marks are found
-        // at the start of string
-        temp.Delete(0,foundStartPos);
-
-        foundStopPos = temp.Locate(KParamNextSeparator);
-        // stop either at the eos or at the next & mark
-        foundStopPos = (foundStopPos != KErrNotFound ) ? (foundStopPos): (temp.Length() );
-        // start after the = separator and stop either on eos or at & mark
-        TInt from = (aParameterName.Length() + 1);
-        TInt length = foundStopPos - from;
-
-        // Get just the value part
-        if ( aValue.MaxLength() >= length )
-            {
-            aValue = temp.Mid( from, length );
-            }
-        else // Can't place the value to aValue string
-            {            
-            err = KErrNoMemory;
-            }
-
-        if ( err == KErrNone && aRemoveNameAndValue )
-            {
-            // Delete the aParameterName=aValue string from the querystring
-            // If eos reached then we need to delete the & before us also
-            // Don't try to delete if this is an only parameter
-            if ( foundStopPos == temp.Length() && foundStartPos > 0 )
-                {
-                aQueryString.Delete(foundStartPos - 1, (foundStopPos + 1));
-                }
-            else
-                {
-                aQueryString.Delete(foundStartPos, (foundStopPos + 1));
-                }
-            }        
-        }
-    else
-        {
-        err = KErrNotFound;
-        }
-    
-    delete tempBuffer;
-    return err;
-    }
-
-/**
- * Tests if string ends with given pattern
- * 
- * @param aString input string
- * @param aPattern test pattern
- * @return ETrue if string ends with given pattern.
- */
-TBool EndsWith( const TDesC& aString, const TDesC& aPattern )
-    {
-    TBuf<10> temp(aString.Right(aPattern.Length()));
-    return ( aString.Right( aPattern.Length() ) == aPattern );
-    }    
-    
-/**
- * Resolves skin item id from pattern majorId;minorId;colourGroupId.
- * The colourGroupId in the syntax is optional, and if no value found then
- * aColourValue will be -1
- *
- * @param aPath   skin item id string     
- * @param aItemId skin item id to fill
- * @param aColourValue colour value to fill. 
- * 
- * @return ETrue if id was succesfully parsed.
- */
-TBool ResolveSkinItemId( const TDesC& aPath, TAknsItemID& aItemId, TInt& aColourValue )
-    {
-    // Syntax: major;minor;colourgroup    
-    aColourValue = -1;
-  
-    // Initialize lexer
-    TLex lex( aPath );
-    lex.SkipSpace();
-
-    TInt majorId( 0 );        
-    TInt minorId( 0 );
-    
-    // Resolve major id        
-    TInt error = lex.Val( majorId );
-    
-    // Resolve minor id
-    if ( lex.Eos())
-        return KErrNotFound;
-    
-    lex.Inc();
-    error |= lex.Val( minorId );
-    
-    // initilize skin item id object
-    aItemId.Set( majorId, minorId );
-    
-    if ( lex.Eos())
-        return KErrNotFound;
-    lex.Inc();
-
-    TInt colorError = lex.Val( aColourValue );
-    if ( colorError != KErrNone || aColourValue < 0)
-        {
-        aColourValue = -1;
-        }
-                
-    // Check error
-    return ( error == KErrNone );
-
-    }
-    
-/**
-* Resolves filename and id from syntax
-* filename.ext;id. If the syntax is incorrect
-* aId is -1 and filename zeroed and EFalse is returned
-* MIF and MBM supported.
-*
-* @param aPath The path to extract the data from
-* @param aId    Id to fill
-* @param aFilename Filename to fill
-* @return ETrue if id and path was succesfully parsed.
-*/
-TBool ResolveFileIdAndPath( const TDesC& aPath, TInt& aId, TDes& aFilename )
-{
-    // Syntax: filename.ext;index
-    // Supported: MIF, MBM
-    TInt pos = aPath.FindF( KScutSkinItemSeparator );
-    aFilename.Zero();
-    if( pos != KErrNotFound )
-        {
-        aFilename = (aPath.Left(pos));
-        
-        if ( ( !EndsWith(aFilename, KScutMIFExtension ) ) &&
-             ( !EndsWith(aFilename, KScutMBMExtension ) )   )
-        	{
-        	aFilename.Zero();
-        	return EFalse;
-        	}
-        
-        TLex lex(aPath.Mid(pos+1));
-        TInt error = lex.Val(aId);
-        if ( error != KErrNone )
-        	{
-        	aId = -1;
-        	return EFalse;
-        	}
-        return ETrue;
-        }
-    return EFalse;
-}     
-
-TInt CreateChecksumFromString( const TDesC& aString )
-    {
-    TInt checksum = 0;
-    
-    for ( TInt i = 0; i < aString.Length(); i++ )
-        {
-        checksum += aString[i] * ( i + 1);
-        }
-    return checksum;       
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TAiScutParser::TAiScutParser() : iType(EScutUnknown), iUid(KNullUid)
-{
-}
-
-
-// -----------------------------------------------------------------------------
-// Static utility function to parse an uid from the given descriptor.
-// -----------------------------------------------------------------------------
-//
-TUid TAiScutParser::ParseUid(const TDesC& aDesC)
-{
-    TRadix radix(EDecimal);
-
-    // Check if the number is in hexadecimal format.
-    _LIT(KHexPrefix, "0x");
-    const TInt prefixLen = 2;
-    TPtrC ptr(aDesC);
-
-    if (ptr.Left(prefixLen).CompareC(KHexPrefix) == 0)
-    {
-        // Strip the '0x' prefix.
-        ptr.Set(ptr.Right(ptr.Length() - prefixLen));
-
-        radix = EHex;
-    }
-
-    // Do the actual parsing.
-    TUint uint;
-    TUid uid(KNullUid);
-    TLex lexer(ptr);
-    TInt err = lexer.Val(uint, radix);
-    if (err == KErrNone)
-    {
-        uid.iUid = uint;
-    }
-
-    return uid;
-}
-
-
-// ---------------------------------------------------------------------------
-// Parses a shortcut definition.
-// ---------------------------------------------------------------------------
-//
-TInt TAiScutParser::Parse(const TDesC& aDefinition)
-{
-    iType = EScutUnknown;
-    iDefinition.Set(aDefinition);
-    
-    // Default values for the icon
-    iIcon.iIconId = KErrNotFound;
-    iIcon.iPath.Zero();
-    iIcon.iSkinId.iMajor = -1;
-    iIcon.iSkinId.iMinor = -1;
-    iIcon.iColourGroup = -1;
-    
-    iIcon.iType = EScutIconNone;
-    iIcon.iDestination = EScutDestinationNormal;
-    iIcon.iShortcutType = EScutUnknown;
-    iIcon.iAppUid = TUid::Uid(0);
-    iIcon.iViewId = TUid::Uid(0);
-    
-    TInt err = iUriParser.Parse(aDefinition);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    TPtrC scheme(iUriParser.Extract(EUriScheme));
-
-    if (scheme.Length() == 0 ||
-        scheme.Compare(KScutURISchemeHttp) == 0 ||
-        scheme.Compare(KScutURISchemeHttps) == 0)
-    {
-        ParseParams();
-        iType = EScutWebAddress;
-        
-        if ( iIcon.iType != EScutIconNone )
-            {
-            // create a checksum for unique identifying
-            TInt checksum = CreateChecksumFromString( aDefinition );
-            iIcon.iViewId = TUid::Uid( checksum );
-            iIcon.iShortcutType = iType;
-            iIcon.iAppUid = KScutBrowserUid;           
-            }
-        err = KErrNone;
-    }
-    else if (scheme.Compare(KScutURISchemeLocalApp) == 0)
-    {
-        iType = EScutApplication;
-
-        if (!ParseAlias())
-        {
-            iUid = ParseUid(iUriParser.Extract(EUriPath));
-        }
-
-        if (iUid == KScutAppShellUid)
-        {
-            // appshell shortcut is always of type app view.
-            iType = EScutApplicationView;
-        }
-
-        // ParseParams() parses params from an URL. If it encounters
-        // iconid, iconmifpath or cba parameter from the URL, then it
-        // places the values to iIcon and removes the parameters from
-        // the URL. It also extract the additional viewid if needed.
-        // For example bookmarks and apps with views use them. 
-
-        ParseParams();
-        // Icon found so apply the appuid and type to icon. 
-        if ( iIcon.iType != EScutIconNone )
-            {
-            iIcon.iShortcutType = iType;
-            
-            // If we are dealing with messaging icons then the 
-            // appuid needs to be changed in order to match it against
-            // the shortcuts appuid
-            switch( iType )
-                { 
-                case EScutNewMessage:
-                    iIcon.iAppUid.iUid = KScutUnifiedEditorUidValue;
-                    break;
-
-                case EScutNewEmail:
-                    iIcon.iAppUid.iUid = KScutEmailEditorUidValue;
-                    break;
-
-            #ifdef __SYNCML_DS_EMAIL
-                case EScutNewSyncMLMail:
-                    iIcon.iAppUid.iUid = KScutEmailEditorUidValue; 
-                    iIcon.iViewId.iUid = KScutSyncMlEmailUidValue;
-                    break;
-            #endif
-
-                case EScutNewPostcard:
-                    iIcon.iAppUid.iUid = KScutPostcardEditorUidValue;
-                    break;
-
-                case EScutNewAudioMsg:
-                    iIcon.iAppUid.iUid = KScutAmsEditorUidValue;
-                    break;
-
-                case EScutNewMsgType:
-                    iIcon.iAppUid.iUid = KScutMessagingCenterUidValue;
-                    iIcon.iViewId.iUid = KScutMessagingCenterUidValue;
-                    break;
-                    
-                default:
-                    iIcon.iAppUid = iUid;       
-                    break;
-               
-                }
-                 
-            }
-        err = KErrNone;
-    }
-    else
-    {
-        err = KErrCorrupt;
-    }
-
-	__PRINTS( "XAI: TAiScutParser::Parse");
-	__PRINT( __DBG_FORMAT( "XAI:   type = %d, definition = '%S', err = %d"), iType, &aDefinition, err);
-    return err;
-}
-
-
-// ---------------------------------------------------------------------------
-// Checks if the shortcut definition was valid.
-// ---------------------------------------------------------------------------
-//
-TBool TAiScutParser::IsValid() const
-{
-    return iType != EScutUnknown;
-}
-
-
-// -----------------------------------------------------------------------------
-// Returns the shortcut target type.
-// -----------------------------------------------------------------------------
-//
-TShortcutType TAiScutParser::Type() const
-{
-    return iType;
-}
-
-
-// -----------------------------------------------------------------------------
-// Returns the shortcut target uid. Used for application shortcuts.
-// -----------------------------------------------------------------------------
-//
-TUid TAiScutParser::Uid() const
-{
-    return iUid;
-}
-
-
-TAiScutIcon TAiScutParser::Icon() const
-    {
-    return iIcon;
-    }
-// -----------------------------------------------------------------------------
-// Returns a shortcut definition component value.
-// -----------------------------------------------------------------------------
-//
-TPtrC TAiScutParser::Get(TScutDefComponent aComponent) const
-{
-    TPtrC componentValue;
-
-    switch (aComponent)
-    {
-    case EScutDefScheme:
-        componentValue.Set(iUriParser.Extract(EUriScheme));
-        break;
-
-    case EScutDefTarget:
-        componentValue.Set(iUriParser.Extract(EUriPath));
-        break;
-
-    case EScutDefParamName:
-        componentValue.Set(iParamName);
-        break;
-
-    case EScutDefParamValue:
-        componentValue.Set(iParamValue);
-        break;
-
-    case EScutDefParamNameAndValue:
-        componentValue.Set(iUriParser.Extract(EUriQuery));
-        break;
-
-    case EScutDefComplete:
-        componentValue.Set(iDefinition);
-        break;
-
-    default:
-        break;
-    }
-
-    return componentValue;
-}
-
-
-// ---------------------------------------------------------------------------
-// Composes a shortcut definition string from given parameters.
-// ---------------------------------------------------------------------------
-//
-void TAiScutParser::ComposeL(HBufC*& aDes, const TUid aUid,
-    const TDesC& aParamName, const TDesC& aParamValue)
-{
-    HBufC* temp = HBufC::NewLC(KMaxDefinitionLength);
-    TPtr ptr = temp->Des();
-
-    if (aParamName.Length() && aParamValue.Length())
-    {
-        ptr.Format(KScutFormatApplicationWithParams, aUid.iUid, &aParamName, &aParamValue);
-    }
-    else
-    {
-        ptr.Format(KScutFormatApplication, aUid.iUid);
-    }
-
-    aDes = temp->AllocL();
-    CleanupStack::PopAndDestroy(temp);
-}
-
-
-// ---------------------------------------------------------------------------
-// Composes a shortcut definition string from given parameters.
-// ---------------------------------------------------------------------------
-//
-void TAiScutParser::ComposeL(HBufC*& aDes, const TUid aUid,
-    const TDesC& aParamString)
-{
-    HBufC* temp = HBufC::NewLC(KMaxDefinitionLength);
-    TPtr ptr = temp->Des();
-
-    if (aParamString.Length())
-    {
-        ptr.Format(KScutFormatApplicationWithParamString, aUid.iUid, &aParamString);
-    }
-    else
-    {
-        ptr.Format(KScutFormatApplication, aUid.iUid);
-    }
-
-    aDes = temp->AllocL();
-    CleanupStack::PopAndDestroy(temp);
-}
-
-
-// ---------------------------------------------------------------------------
-// Checks if an alias was used in shortcut definition and parses an uid from it.
-// ---------------------------------------------------------------------------
-//
-TBool TAiScutParser::ParseAlias()
-{
-    TPtrC ptr(iUriParser.Extract(EUriPath));
-
-    // "localapp:msg?..." is an alias for messaging application.
-    if (ptr.CompareC(KScutTargetAliasMessaging) == 0)
-    {
-        iUid = KScutMessagingUid;
-        return ETrue;
-    }
-    // "localapp:keylock?..." is an alias for keylock
-    else if (ptr.CompareC(KScutTargetAliasKeylock) == 0)
-    {
-        iUid = KScutKeyLockUid;
-        return ETrue;
-    }
-
-    // "localapp:voicedial..." is an alias for voicedial
-    else if (ptr.CompareC(KScutTargetAliasVoiceDial) == 0)
-    {
-        iUid = KScutVoiceDialUid;
-        return ETrue;
-    }
-
-    // "localapp:logs?..." is an alias for logs
-    else if (ptr.CompareC(KScutTargetAliasLogs) == 0)
-    {
-        iUid = KScutLogsUid;
-        return ETrue;
-    }
-    else
-    {
-        return EFalse;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// Parses the possible application shortcut parameters.
-// ---------------------------------------------------------------------------
-//
-void TAiScutParser::ParseParams()
-{
-    TPtrC params(iUriParser.Extract(EUriQuery));
-    
-    if (params.Length() > 0)
-    {        
-        HBufC *tempParams = params.Alloc();
-        // value can't be longer than the params
-        // but in some cases it can be equally long
-        HBufC *value = HBufC::New(params.Length());
-        
-        // low memory or similar situation so cannot do anything
-        if ( !value || !tempParams )
-            {
-            return;
-            }
-        
-        TPtr valuePtr = value->Des();
-        TPtr tempParamsPtr = tempParams->Des();
-        
-        TBool addonFound = EFalse;
-        TInt err = KErrNone;
-        
-        // First extract the CBA
-        err = ExtractValueFromQueryString(tempParamsPtr,KScutParamNameCBAIcon,valuePtr, ETrue);               
-        if ( err == KErrNone )
-            {
-            iIcon.iDestination = EScutDestinationSoftkey;
-            }
-        // Then the toolbar
-
-        err = ExtractValueFromQueryString(tempParamsPtr,KScutParamNameToolbarIcon,valuePtr, ETrue);               
-
-        if ( err == KErrNone )
-            {
-            iIcon.iDestination = EScutDestinationToolbar;
-            }
-        
-        // then extract the iconskinid
-        err = ExtractValueFromQueryString(tempParamsPtr,
-                KScutParamNameIconSkinId,valuePtr, ETrue);
-        if ( err == KErrNone &&
-                ResolveSkinItemId(valuePtr,iIcon.iSkinId,iIcon.iColourGroup))
-            {
-            iIcon.iType = EScutIconSkin;
-            addonFound = ETrue;
-            }
-        // Then extract the iconmifpath
-        // Iconmifpath extraction left here for backward compatibility
-        valuePtr.Zero();
-        err = ExtractValueFromQueryString(tempParamsPtr,
-                KScutParamNameIconMifPath,valuePtr, ETrue);
-        if ( err == KErrNone &&
-                ResolveFileIdAndPath(valuePtr,iIcon.iIconId,iIcon.iPath) )
-            {
-            iIcon.iType = EScutIconMif;
-            addonFound = ETrue;
-            }        
-
-        // Then extract the iconpath.
-        valuePtr.Zero();
-        err = ExtractValueFromQueryString(tempParamsPtr,
-                KScutParamNameIconPath,valuePtr, ETrue);
-        if ( err == KErrNone &&
-                ResolveFileIdAndPath(valuePtr,iIcon.iIconId,iIcon.iPath) )
-            {
-            if ( EndsWith(iIcon.iPath, KScutMIFExtension ))
-                {
-                iIcon.iType = EScutIconMif;                
-                }
-            else if ( EndsWith(iIcon.iPath, KScutMBMExtension ))
-                {
-                iIcon.iType = EScutIconMbm;
-                } 
-            addonFound = ETrue;
-            } 
-                   
-        // Use the new params string where the addons 
-        // have been removed
-        if( addonFound )
-            {
-            params.Set(tempParamsPtr);   
-            // no need to process anything because there are no
-            // parameters left after our addons have been taken out
-            if ( params.Length() <= 0)
-                {
-                delete value;
-                delete tempParams;
-                return;
-                }
-            }
-        
-        delete value;
-        
-        iType = EScutApplicationWithParams;
-        
-        const TInt valueSeparatorPos = params.Locate(KParamValueSeparator);
-
-        if (valueSeparatorPos >= 0)
-        {
-            iParamName.Set(params.Left(valueSeparatorPos));
-        }
-        if (valueSeparatorPos >= 0)
-        {
-            iParamValue.Set(params.Mid(valueSeparatorPos + 1));
-        }
-        if (valueSeparatorPos == -1)
-        {
-            iParamName.Set(params);
-        }
-
-        if (iParamName.CompareC(KScutParamNameView) == 0)
-        {
-            iType = EScutApplicationView;
-
-            if (iUid == KScutPersonalisationUid)
-            {
-                TUid uid = ParseUid(iParamValue);
-                if (uid == KScutChangeThemeViewId)
-                {
-                    iType = EScutChangeTheme;
-                }
-                iIcon.iViewId = uid;
-            }
-
-            if (iUid == KScutLogsUid)
-            {
-                if (iParamValue.CompareC(KScutParamValueMissedCalls) == 0)
-                {
-                    iType = EScutLogsMissedCallsView;
-                }
-                else if (iParamValue.CompareC(KScutParamValueDialledCalls) == 0)
-                {
-                    iType = EScutLogsDialledCallsView;
-                }
-                else if (iParamValue.CompareC(KScutParamValueReceivedCalls) == 0)
-                {
-                    iType = EScutLogsReceivedCallsView;
-                }
-                else if (iParamValue.CompareC(KScutParamValueMainView) == 0)
-                {
-                    iType = EScutLogsMainView;
-                }
-            }
-
-            if (iUid == KScutGeneralSettingsUid)
-            {
-                if (ParseUid(iParamValue) == KScutParamValueConnectivityView)
-                {
-                    iType = EScutConnectivityStatusView;
-                }
-                else if (ParseUid(iParamValue) == KScutInstallationViewId)
-                {
-                    iType = EScutApplicationManagerView;
-                }
-            }
-            
-            
-        }
-        else if (iUid == KScutMessagingUid)
-        {
-            if (iParamName.CompareC(KScutParamNameNew) == 0)
-            {
-                if (iParamValue.CompareC(KScutParamValueMsg) == 0)
-                {
-                    iType = EScutNewMessage;
-                }
-                else if (iParamValue.CompareC(KScutParamValueEmail) == 0)
-                {
-                    iType = EScutNewEmail;
-                }
-#ifdef __SYNCML_DS_EMAIL
-                else if (iParamValue.CompareC(KScutParamValueSyncMLMail) == 0)
-                {
-                    iType = EScutNewSyncMLMail;
-                }
-#endif
-                else if (iParamValue.CompareC(KScutParamValuePostcard) == 0)
-                {
-                    iType = EScutNewPostcard;
-                }
-                else if (iParamValue.CompareC(KScutParamValueAudioMsg) == 0)
-                {
-                    iType = EScutNewAudioMsg;
-                }
-                else
-                {
-                    iType = EScutNewMsgType;
-                }
-            }
-            else if (iParamName.CompareC(KScutParamNameMailbox) == 0)
-            {
-                iType = EScutMailbox;
-            }
-        }
-        else if (iUid == KScutKeyLockUid)
-        {
-            iType = EScutKeylock;
-        }
-        else if (iUid == KScutSettingsDllUid || iUid == KScutBrowserUid)
-        {
-            if (iParamName.CompareC(KScutParamNameBookmark) == 0)
-            {
-                iType = EScutBookmark;
-                iIcon.iViewId = ParseUid(iParamValue);
-            }
-            else if (iParamName.CompareC(KScutParamNoEffect) == 0)
-            {
-                iType = EScutNoEffect;
-            }
-        }
-        delete tempParams;
-    }
-}
-
-TInt TAiScutParser::ChecksumForString( const TDesC& aDefinition) const 
-    {
-    return CreateChecksumFromString( aDefinition );
-    }
-
-TInt TAiScutParser::CustomTitle( TDes& aTarget ) const
-    {
-    TPtrC params(iUriParser.Extract(EUriQuery));
-    HBufC *tempParams = params.Alloc();
-    if ( !tempParams )
-        {
-        return KErrNoMemory;
-        }
-        
-    TPtr tempParamsPtr = tempParams->Des();
-    
-    TInt err = ExtractValueFromQueryString(tempParamsPtr,
-            KScutParamNameCustomTitle, aTarget, EFalse);
-    
-    delete tempParams;
-    return err;
-    }
-
-void TAiScutParser::RemoveExtraDefinitionsL( TDes &aString ) const
-    {
-    HBufC *temp = HBufC::NewL( aString.Length( ));
-    TPtr tempPtr = temp->Des();
-    ExtractValueFromQueryString(aString,
-                    KScutParamNameCBAIcon, tempPtr, ETrue);
-    
-    ExtractValueFromQueryString(aString,
-                KScutParamNameIconSkinId,tempPtr, ETrue);
-    
-    ExtractValueFromQueryString(aString,
-                KScutParamNameIconMifPath,tempPtr, ETrue);
-    
-    ExtractValueFromQueryString(aString,
-                KScutParamNameCustomTitle, tempPtr, ETrue);
-    ExtractValueFromQueryString(aString,
-                KScutParamNameIconPath, tempPtr, ETrue);
-    delete temp;
-    }
-
-// End of File.
--- a/idlefw/plugins/wrtdataplugin/data/wrtdataplugin.rss	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/data/wrtdataplugin.rss	Fri Feb 19 23:07:29 2010 +0200
@@ -18,9 +18,9 @@
 
 // INCLUDES
 #include <ecom/registryinfov2.rh>
+#include <hscontentpublisheruid.hrh>
 #include "wrtdatapluginuids.hrh"
 
- 
 
 // -----------------------------------------------------------------------------
 //   
@@ -42,7 +42,7 @@
         INTERFACE_INFO
         {
             // UID of interface that is implemented
-            interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
+            interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER; 
 
             implementations = 
             {
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdata.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdata.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,46 +19,35 @@
 #ifndef WRTDATA_H
 #define WRTDATA_H
 
-// INCLUDE FILES
+// System includes
 #include <liwcommon.h> 
 #include <AknsItemID.h>
+
+// User includes
+#include <hscontentpublisher.h>
 #include "wrtdatapluginconst.h"
-#include "aicontentpublisher.h"
 
-// FORWARD DECLARATIONS
+// Forward declarations
 class MLiwInterface;
 class CLiwServiceHandler;
 class CWrtDataObserver;
 class CWrtDataPlugin;
 
-// CLASS DECLARATION
 /**
  *  @ingroup group_wrtdataplugin
  *
  *  Wrt data
  *
- *  @since S60 v3.2
+ *  @since S60 5.2
  */
-class CWrtData : public CBase
-   {
+NONSHARABLE_CLASS( CWrtData ) : public CBase
+    {    
+public:
+    // constructor and destructor
+    
+    static CWrtData* NewL( CWrtDataPlugin* aPlugin );
 
-   public:
-        
-        /**
-        * Part of the two phased construction
-        *
-        * @param aPlugin refrence of the plugin
-        * @return none
-        */
-        static CWrtData* NewL(CWrtDataPlugin* aPlugin);
-        
-        /**
-        * Destructor
-        *
-        * @param none
-        * @return none
-        */
-        ~CWrtData();
+    ~CWrtData();
     
    public : 
     
@@ -169,15 +158,7 @@
         * @param None
         * @return void
         */
-        void DeActivateL();
-        
-        /**
-        * InActiveL 
-        * 
-        * @param None
-        * @return void
-        */
-        void InActiveL();        
+        void DeActivateL();      
         
         /**
         * OnLineL 
@@ -275,38 +256,24 @@
         void CreateIconFromUidL(TInt& aHandle, TInt& aMaskHandle, const TUid& aAppUid );
 
     private :   
-        
-        // Subscriber interface
-        // own
-        MLiwInterface* iInterface;
-          
-        // Data Observer to CPS
-        // Own
-        CWrtDataObserver* iObserver;
-       
-        // Service handler 
-        // Own
-        CLiwServiceHandler* iServiceHandler;
+    // data
     
-        // Command name in configuration Array
-        HBufC8* iCommandName;
-          
-        // Reference of the wrt data plugin
-        // Not owned
-        CWrtDataPlugin* iPlugin;
-        
-        // Menu item names
-        // Own
-        RPointerArray<HBufC16> iMenuItems; 
-        
-        // Trigger names for the menu items
-        // Own
-        RPointerArray<HBufC8> iMenuTriggers;
-        
-        // Widgets content id.
-        // Own
-        HBufC* iContentId;
- 
+    /** Subscriber interface, owned */    
+    MLiwInterface* iInterface;     
+    /** Data Observer to CPS, owned */
+    CWrtDataObserver* iObserver;   
+    /** Service handler, owned */    
+    CLiwServiceHandler* iServiceHandler;
+    /** Command name in configuration Array, owned */
+    HBufC8* iCommandName;      
+    /** Reference of the wrt data plugin, not owned */    
+    CWrtDataPlugin* iPlugin;    
+    /** Menu item names, owned */    
+    RPointerArray<HBufC16> iMenuItems;     
+    /** Trigger names for the menu items, owned */    
+    RPointerArray<HBufC8> iMenuTriggers;    
+    /** Content id, owned */
+    HBufC* iContentId;
     };
 
 #endif /*WRTDATA_H*/
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdataobserver.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdataobserver.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,108 +19,112 @@
 #ifndef WRTDATAOBSERVER_H
 #define WRTDATAOBSERVER_H
 
-// INCLUDE FILES
+// System includes
 #include <liwcommon.h>
 
-// FORWARD DECLARATIONS
+// User includes
+
+// Forward declarations
 class CWrtData;
 
-// CLASS DECLARATION
 /**
- *  @ingroup group_wrtdataplugin
+ * @ingroup group_wrtdataplugin
+ *
+ * Wrt data observer
  *
- *  Wrt data observer
- *
- *  @since S60 v3.2
+ * @since S60 5.2
  */
-class CWrtDataObserver : public CBase, public MLiwNotifyCallback
+NONSHARABLE_CLASS( CWrtDataObserver ) : public CBase, 
+    public MLiwNotifyCallback
     {
-    public:
+public:
+    // constructor and destructor
 
-        /**
-        * Part of the two phased constuction
-        *
-        * @param aInterface reference of the interface 
-        * @param aData reference of the wrt data object
-        * @return none
-        */
-        static CWrtDataObserver* NewL( MLiwInterface* aInterface, CWrtData* aData );
+    /**
+    * Part of the two phased constuction
+    *
+    * @param aInterface reference of the interface 
+    * @param aData reference of the wrt data object
+    * @return none
+    */
+    static CWrtDataObserver* NewL( MLiwInterface* aInterface, CWrtData* aData );
     
-        /**
-        * Destructor
-        *
-        * @param none
-        * @return none
-        */   
-        ~CWrtDataObserver();
+    /**
+    * Destructor
+    *
+    * @param none
+    * @return none
+    */   
+    ~CWrtDataObserver();
 
-    private :
+private:
+    // constructors
     
-        /**
-        * Constructor
-        *
-        * @param none
-        * @return none
-        */
-        CWrtDataObserver();
-        
-        /**
-        * Part of the two phased construction
-        *
-        * @param aInterface reference of the interface
-        * @param aData reference of the wrt data object
-        * @return void
-        */
-        void ConstructL( MLiwInterface* aInterface, CWrtData* aData );
+    /**
+    * Constructor
+    *
+    * @param none
+    * @return none
+    */
+    CWrtDataObserver();
+    
+    /**
+    * Part of the two phased construction
+    *
+    * @param aInterface reference of the interface
+    * @param aData reference of the wrt data object
+    * @return void
+    */
+    void ConstructL( MLiwInterface* aInterface, CWrtData* aData );
        
-    public:  //from MLiwNotifyCallbackc
-    
-        /**
-        * Handles notifications caused by an asynchronous Execute*CmdL call
-        * or an event.
-        *
-        * @param aCmdId The service command associated to the event.
-        * @param aEventId occurred event, see LiwCommon.hrh.
-        * @param aEventParamList Event parameters, if any, as defined per
-        *        each event.
-        * @param aInParamList Input parameters, if any, given in the
-        *        related HandleCommmandL.
-        * @return Error code for the call back.
-        */
-        virtual TInt HandleNotifyL(
-            TInt aCmdId,
-            TInt /*aEventId*/,
-            CLiwGenericParamList& aEventParamList,
-            const CLiwGenericParamList& /*aInParamList*/);
-
-    public:
+public:  
+    //from MLiwNotifyCallbackc
     
-        /**
-        * Registers to CPS for add, delete , update and execute notifications
-        * @aFilter - filter for input parameter list
-        * @return void.
-        */
-        void RegisterL( CLiwDefaultMap* aFilter );
+    /**
+    * Handles notifications caused by an asynchronous Execute*CmdL call
+    * or an event.
+    *
+    * @param aCmdId The service command associated to the event.
+    * @param aEventId occurred event, see LiwCommon.hrh.
+    * @param aEventParamList Event parameters, if any, as defined per
+    *        each event.
+    * @param aInParamList Input parameters, if any, given in the
+    *        related HandleCommmandL.
+    * @return Error code for the call back.
+    */
+    virtual TInt HandleNotifyL(
+        TInt aCmdId,
+        TInt /*aEventId*/,
+        CLiwGenericParamList& aEventParamList,
+        const CLiwGenericParamList& /*aInParamList*/);
+
+public:
+    // new functions
     
-        /**
-        * Cancel all the registered notifications. 
-        * @return void.
-        */
-        void ReleaseL();
-            
-    private:
-            
-        // Reference of 
-        // Not owned
-        MLiwInterface* iInterface;
+    /**
+    * Registers to CPS for add, delete , update and execute notifications
+    * @aFilter - filter for input parameter list
+    * @return void.
+    */
+    void RegisterL( CLiwDefaultMap* aFilter );
+
+    /**
+    * Cancel all the registered notifications. 
+    * @return void.
+    */
+    void ReleaseL();
         
-        // Reference of the wrt data
-        // Not owned
-        CWrtData* iData;
+private:
+    // data 
         
-        // Call back error code
-        TInt iError;
-        
+    /** Interface Reference, not owned */     
+    MLiwInterface* iInterface;    
+    // Reference of the wrt data, not owned */    
+    CWrtData* iData;    
+    /** Call back error code */
+    TInt iError;        
     };
 
-#endif /*WRTDATAOBSERVER_H*/
+#endif // WRTDATAOBSERVER_H
+
+// End of file
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h	Fri Feb 19 23:07:29 2010 +0200
@@ -19,22 +19,19 @@
 #ifndef WRTDATAPLUGIN_H
 #define WRTDATAPLUGIN_H
 
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
+// System includes
+
+// User includes
+#include <hscontentpublisher.h>
 #include <aicontentmodel.h>
-#include <aieventhandlerextension.h>
 
-// FORWARD DECLARATIONS
+// Forward declarations
 class MAiContentObserver;
 class MAiContentItemIterator;
-class MAiPSPropertyObserver;
 class CWrtData;
-class CDesC16Array;
 class CGulIcon;
 class CLiwDefaultMap;
 
-
-// CLASS DECLARATION
 /**
  *  @ingroup group_wrtdataplugin
  *
@@ -42,400 +39,276 @@
  *
  *  @since S60 v3.2
  */
-class CWrtDataPlugin : public CAiContentPublisher,
-                     	public MAiPropertyExtension,
-                     	public MAiEventHandlerExtension
-                    
-    {
-        
-    public :
-        /**
-        * Plugin's network state.
-        */
-        enum TPluginNetworkStatus 
-            {
-            EUnknown, 
-            EOffline,
-            EOnline
-            };
-        
-        /**
-         * Plugin's state.
-         */
-        enum TPluginStates
-            {
-            ENone,
-            EResume,
-            ESuspend,
-            EInActive,
-            };
-        
-        /**
-        * Content Items
-        */
-        enum TContentItem
-         {
-         EDefaultImage,
-         EDefaultText,
-         EImage1
-         };
-
-    public:
+NONSHARABLE_CLASS( CWrtDataPlugin ) : public CHsContentPublisher
+    {    
+public:
+    // type definitions
+    
+     /**
+     * Plugin's network state.
+     */
+    enum TPluginNetworkStatus 
+        {
+        EUnknown, 
+        EOffline,
+        EOnline
+        };
+    
+    /**
+     * Plugin's state.
+     */
+    enum TPluginStates
+        {
+        ENone,
+        EResume,
+        ESuspend
+        };
     
-        /**
-        * Part of the two phased constuction
-        *
-        * @param none
-        * @return none
-        */
-        static CWrtDataPlugin* NewL();
-        
-        /**
-        * Destructor
-        *
-        * @param none
-        * @return none
-        */
-        ~CWrtDataPlugin();
-
-    public: // from base class CAiContentPublisher
+    /**
+     * Content Items
+     */
+    enum TContentItem
+        {
+        EDefaultImage,
+        EDefaultText,
+        EImage1
+        };  
         
-        /**
-        * From CAiContentPublisher
-        * The method is called by the framework to request the plug-in free all
-        * memory and CPU resources and close all its open files, e.g. the plug-in 
-        * should unload its engines due backup operation. The method transits the 
-        * plug-in to "Idle" state.
-        *
-        * @param aReason reason for state change, see TAiTransitionChange.
-        * @return void
-        */
-        void Stop( TAiTransitionReason aReason );
+public:
+    // constructor and destructor
+
+    static CWrtDataPlugin* NewL();
+    
+    ~CWrtDataPlugin();
+
+private:
+    // constructors
     
-        /**
-        * From CAiContentPublisher
-        * The method is called by the framework to instruct plug-in that it is
-        * allowed to consume CPU resources, e.g plug-in is able to run timers,
-        * perform asynchronous operations, etc. The method transits the plug-in
-        * to "Alive" state.
-        *
-        * @param aReason reason for state change, see TAiTransitionChange.
-        * @return void
-        */
-        void Resume( TAiTransitionReason aReason );
+    /**
+    * C++ constructor
+    */
+    CWrtDataPlugin();
+
+    /**
+    * 2nd phase constructor
+    */
+    void ConstructL();
     
-        /**
-        * From CAiContentPublisher
-        * The method is called by the framework to instruct plug-in that it is
-        * not allowed to consume CPU resources, e.g plug-in MUST stop each
-        * timers, cancel outstanding asynchronous operations, etc. The method
-        * transits the plug-in to "Suspendend" state.
-        *
-        * @param aReason reason for state change, see TAiTransitionChange.
-        * @return void
-        */
-        void Suspend( TAiTransitionReason aReason );
+public: 
+    // from CHsContentPublisher
     
-        /**
-        * From CAiContentPublisher
-        * Adds the content observer / subscriber to plug-in. The plug-in MUST
-        * maintain a registry of subscribers and send notification to all them
-        * whenever the plug-in changes state or new content available.
-        *
-        * @param aObserver content observer to register.
-        * @return void
-        */
-        void SubscribeL( MAiContentObserver& aObserver );
-        
-        /**
-        * From CAiContentPublisher
-        * Configures the plug-in.
-        * Plug-ins take ownership of the settings array, so it must either
-        * store it in a member or free it. Framework has put the array in cleanup
-        * stack so the plugin shouldn't do that.
-        * If this leaves, the plug-in will be destroyed by AI FW.
-        * Plug-in must support LaunchByValue-event even if normal shortcuts don't
-        * work. The only allowed serious enough leave is KErrNotFound from CenRep.
-        *
-        * @param aSettings setting items defined in the UI definition.
-        * @return void
-        */
-        void ConfigureL( RAiSettingsItemArray& aSettings );
-        
-        /**
-        * From CAiContentPublisher
-        * Returns interface extension. In Series 60 3.1 only event & property
-        * extensions are supported. See MAiEventExtension & MAiPropertyExtension
-        * interfaces.
-        *
-        * @param  aUid - UID of the extension interface to access.
-        * @return the extension interface. Actual type depends on the passed aUid 
-        *         argument.
-        */
-        TAny* Extension( TUid aUid );  
+    /**
+     * @see CHsContentPublisher
+     */
+    void Start( TStartReason aReason );
+
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Stop( TStopReason aReason );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Resume( TResumeReason aReason );
     
-    // from base class MAiPropertyExtension
+    /**
+     * @see CHsContentPublisher
+     */    
+    void Suspend( TSuspendReason aReason );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void SetOnline();
+    
+    /**
+     * @see CHsContentPublisher
+     */
+    void SetOffline();
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void SubscribeL( MAiContentObserver& aObserver );
     
-        /**
-        * From MAiPropertyExtension.
-        * Read property of publisher plug-in.
-        *
-        * @param aProperty - identification of property.
-        * @return pointer to property value.
-        */
-        TAny* GetPropertyL( TInt aProperty );
+    /**
+     * @see CHsContentPublisher
+     */    
+    void ConfigureL( RAiSettingsItemArray& aSettings );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    TAny* GetProperty( TProperty aProperty );
+    
+    /**
+     * @see CHsContentPublisher
+     */    
+    void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
     
-        /**
-        * From MAiPropertyExtension.
-        * Write property value.
-        *
-        * @param aProperty - identification of property.
-        * @param aValue - contains pointer to property value.
-        */
-        void SetPropertyL( TInt aProperty, TAny* aValue );
-      
-     // from base class MAiEventHandlerExtension
-       
-         /**
-         * From MAiEventHandlerExtension
-         * Invoked by the framework when plug-in must handle an event.
-         * @param aEvent - unique identifier of event from plug-in content model.
-         * @param aParam - parameters associated with event. Each UI Definition
-         *        declares events in the format: <event name>(<event params>),
-         *        where <event name> is mapped by the framework to unique
-         *        identifier supplied in aEvent, <event params> are provided to
-         *        plug-in as-is in the descriptor.
-         * @since S60 3.2
-         */
-         void HandleEvent(TInt aEvent, const TDesC& aParam);
-        
-         /**
-         * From MAiEventHandlerExtension
-         * Invoked by the framework when plug-in must handle an event.
-         *
-         * @param aEventName - name of the event from plug-in content model.
-         * @param aParam - parameters associated with event. Each UI Definition
-         *        declares events in the format: <event name>(<event params>),
-         *        where  <event name> mapping to unique identifier supplied by event 
-         *        is failed by the frame work then the  <event name> and  
-         *        <event params>  are provided to plug-in as-is in the descriptor.
-         */
-         void HandleEvent(const TDesC& aEventName, const TDesC& aParam);
+    /**
+     * @see CHsContentPublisher
+     */    
+    TBool HasMenuItem( const TDesC& aMenuItem );
+         
+public:
+
+    /**
+    * Gets the id of a content  
+    *
+    * @param aObjectId image or text id
+    * @return id of the content
+    */
+    TInt GetIdL( TDesC16& aObjectId );
     
-        /**
-        * Invoked by the framework for querying if plugin has menu item
-        *
-        * @param aMenuItem  menu item name.
-        * @return ETrue if plugin has specific menu item, EFalse otherwise 
-        */
-        TBool HasMenuItem(const TDesC16& aMenuItem);
-         
-    public : // New functions
+    /**
+    * Gets the type of a specific content
+    *
+    * @param aObjectId image or text id
+    * @param aType type
+    * @return void
+    */
+    void GetTypeL( TDesC16& aObjectId, TDes16& aType );
     
-        /**
-        * Gets the id of a content  
-        *
-        * @param aObjectId image or text id
-        * @return id of the content
-        */
-        TInt GetIdL(TDesC16& aObjectId);
-        
-        /**
-        * Gets the type of a specific content
-        *
-        * @param aObjectId image or text id
-        * @param aType type
-        * @return void
-        */
-        void GetTypeL( TDesC16& aObjectId, TDes16& aType );
-        
-        /**
-        * RefereshL a specific image of text in the widget
-        *
-        * @param aOperation operation performed
-        * @param aDataMap data map
-        * @return void
-        */
-        void RefreshL(TDesC16& aOperation, CLiwDefaultMap* aDataMap );
-        
-        /**
-        * Is plugin active to publish the data 
-        *
-        * @param void 
-        * @return boolean (ETrue/EFalse)
-        */
-        TBool IsActive();
-        
-        /**
-        * Publish a specific text of the widget  
-        *
-        * @param aObserver observer
-        * @param aContentId content model id
-        * @param aContentValue content value
-        * @return void
-        */
-        void PublishTextL(MAiContentObserver* aObserver, 
-                TInt aContentId, const TDesC16& aContentValue);
+    /**
+    * RefereshL a specific image of text in the widget
+    *
+    * @param aOperation operation performed
+	* @param aDataMap data map
+    * @return void
+    */
+    void RefreshL( TDesC16& aOperation, CLiwDefaultMap* aDataMap );
+    
+    /**
+    * Is plugin active to publish the data 
+    *
+    * @param void 
+    * @return boolean (ETrue/EFalse)
+    */
+    TBool IsActive() const;
     
-        /**
-        * Publish a specific image of the widget  
-        *
-        * @param aObserver observer
-        * @param aContentId content model id
-        * @param aHandle image handle 
-        * @param aMaskHandle handle of the mask image
-        * @return void
-        */
-        void PublishImageL(MAiContentObserver* aObserver, 
-                TContentItem aContentId, TInt aHandle, TInt aMaskHandle);
+    /**
+    * Publish a specific text of the widget  
+    *
+    * @param aObserver observer
+    * @param aContentId content model id
+    * @param aContentValue content value
+    * @return void
+    */
+    void PublishTextL( MAiContentObserver* aObserver, 
+        TInt aContentId, const TDesC16& aContentValue );
+
+    /**
+    * Publish a specific image of the widget  
+    *
+    * @param aObserver observer
+    * @param aContentId content model id
+    * @param aHandle image handle 
+    * @param aMaskHandle handle of the mask image
+    * @return void
+    */
+    void PublishImageL( MAiContentObserver* aObserver, 
+        TContentItem aContentId, TInt aHandle, TInt aMaskHandle );
+
+    /**
+    * Publish a specific image of the widget  
+    *
+    * @param aObserver observer
+    * @param aContentId content model id
+    * @param aPath image path / skin id pattern / mif id Pattern 
+    * @return void
+    */
+    void PublishImageL( MAiContentObserver* aObserver,
+            TContentItem aContentId, const TDesC16& aPath );
     
-        /**
-        * Publish a specific image of the widget  
-        *
-        * @param aObserver observer
-        * @param aContentId content model id
-        * @param aPath image path / skin id pattern / mif id Pattern 
-        * @return void
-        */
-        void PublishImageL(MAiContentObserver* aObserver,
-                TContentItem aContentId, const TDesC16& aPath );
-        
-        /**
-        * Cleans a data from the widget
-        *
-        * @param aObserver observer
-        * @param aContentId content model id
-        * @return void
-        */
-        void Clean(MAiContentObserver* aObserver, 
-                TInt aContentId );
-        
-        /**
-        * Shows the loading icon animation 
-        *
-        * @param aObserver observer
-        * @return void
-        */
-        void ShowLoadingIcon(MAiContentObserver* aObserver);
+    /**
+    * Cleans a data from the widget
+    *
+    * @param aObserver observer
+    * @param aContentId content model id
+    * @return void
+    */
+    void Clean( MAiContentObserver* aObserver, 
+            TInt aContentId );
 
-        /**
-        * Hides the loading icon animation 
-        *
-        * @param aObserver observer
-        * @return void
-        */
-        void HideLoadingIcon(MAiContentObserver* aObserver);
+   /**
+    * Shows the loading icon animation 
+    *
+    * @param aObserver observer
+    * @return void
+    */
+    void ShowLoadingIcon( MAiContentObserver* aObserver );
 
-        /**
-        * CWrtData getter
-        * @return Pointer to CWrtData
-        */
-        inline CWrtData* Data() const
-            {
-            return iData;
-            }
-    
-        /*
-        * Plugin's network status getter
-        * @return Pointer to Harvester status observer
-        */
-        inline TPluginNetworkStatus NetworkStatus() const
-            {
-            return iNetworkStatus;
-            }
+    /**
+    * Hides the loading icon animation 
+    *
+    * @param aObserver observer
+    * @return void
+    */
+    void HideLoadingIcon( MAiContentObserver* aObserver );    
+	
+    /**
+     * CWrtData getter
+     * @return Pointer to CWrtData
+     */
+    CWrtData* Data() const;
+
+    /*
+     * Plugin's network status getter
+     * @return Pointer to Harvester status observer
+     */
+    TPluginNetworkStatus NetworkStatus() const;
     
-    private:
-        
-        /**
-        * Constructor
-        *
-        * @param none
-        * @return none
-        */
-        CWrtDataPlugin();
-        
-        /**
-        * Part of the two phased construction
-        *
-        * @param void
-        * @return void
-        */
-        void ConstructL();
-        
-        /**
-        * Publishes widget's texts and images
-        *
-        * @param void
-        * @return void
-        */
-        void PublishL();
-
-        /**
-        * Resume the plug-in.
-        *
-        * @param aReason reason for state change, see TAiTransitionChange.
-        * @return void
-        */    
-        void DoResumeL(TAiTransitionReason aReason);
+private:
+    // new functions
+    
+    /**
+    * Publishes widget's texts and images
+    *
+    * @param void
+    * @return void
+    */
+    void PublishL();
         
-        /**
-        * Resolves skin item id and Mif id from pattern 
-        * skin( <majorId> <minorId> (<colourGroupId>) 
-        * mif(<MifFileName.mif> <bitmapId> <maskId>)
-        * 
-        * @param aPath  skin pattern / mif pattern value
-        * @param aItemId skin item id  
-        * @param aMifId  mif id 
-        * @param aMaskId  mask id 
-        * @param aFilename mif file name
-        * @return boolean (ETrue/EFalse)  
-        */
-        TBool ResolveSkinIdAndMifId( const TDesC& aPath, TAknsItemID& aItemId,
-                TInt& aMifId, TInt& aMaskId, TDes& aFilename );
-        
-    private: // data
-    
-        // Iterator for plugin content
-        // Own
-        MAiContentItemIterator* iContent;
-    
-        // Array of content observers
-        // Own
-        RPointerArray<MAiContentObserver> iObservers;
-        
-        // Information about the content publisher (this plug-in)
-        TAiPublisherInfo iInfo;
+	/**
+	* Resolves skin item id and Mif id from pattern 
+	* skin( <majorId> <minorId> (<colourGroupId>) 
+	* mif(<MifFileName.mif> <bitmapId> <maskId>)
+	* 
+	* @param aPath  skin pattern / mif pattern value
+	* @param aItemId skin item id  
+	* @param aMifId  mif id 
+	* @param aMaskId  mask id 
+	* @param aFilename mif file name
+	* @return boolean (ETrue/EFalse)  
+	*/
+	TBool ResolveSkinIdAndMifId( const TDesC& aPath, TAknsItemID& aItemId,
+	        TInt& aMifId, TInt& aMaskId, TDes& aFilename );
         
-        // Number of data in the content model.
-        TInt iDataCount;
-         
-        // Dynamic content model
-        // Own
-        TAiContentItem* iContentModel;
-        
-        // Reference array for Published text
-        // Own
-        RPointerArray<HBufC> iDataArray;
-        
-        // Service API Data Subscriber.
-        // Own
-        CWrtData* iData;
-        
-        // References array for published images 
-        // Own
-        RArray<CGulIcon*> iIconArray;
-        
-        // Plugin's network status
-        TPluginNetworkStatus iNetworkStatus;
-        
-        // Is Homescreen foreground.
-        TBool iHSForeGround;
-        
-        // Is KeyLockON.
-        TBool iKeyLockOn;
-    
-        // Plugin state    
-        TPluginStates iPluginState;
+private: 
+    // data
+
+    /** Iterator for plugin content, owned */
+    MAiContentItemIterator* iContent;
+    /** Array of content observers, owned */
+    RPointerArray< MAiContentObserver > iObservers;     
+    /** Number of data in the content model */
+    TInt iDataCount;     
+    /** Dynamic content model, owned */ 
+    TAiContentItem* iContentModel;  
+    /** Reference array for Published text, owned */    
+    RPointerArray< HBufC > iDataArray;  
+    /** Service API Data Subscriber, owned */   
+    CWrtData* iData;    
+    /* References array for published images, owned */     
+    RArray< CGulIcon* > iIconArray;    
+    /** Plugin's network status */
+    TPluginNetworkStatus iNetworkStatus;    
+    /** Plugin state */    
+    TPluginStates iPluginState;
+    /** File server session handle, owned */
+    RFs iRfs;
     };
 
 #endif // WRTDATAPLUGIN_H
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdatapluginuids.hrh	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdatapluginuids.hrh	Fri Feb 19 23:07:29 2010 +0200
@@ -20,8 +20,6 @@
 #ifndef WRTDATAPLUGINUIDS_HRH
 #define WRTDATAPLUGINUIDS_HRH
 
-#include <platform/mw/aicontentpublisheruid.hrh>
-
 /**
  * Ecom dll uid for AI Data plug-in.
  */
--- a/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -23,7 +23,7 @@
 #include <aipluginsettings.h>
 #include <apgcli.h>
 #include <apgicnfl.h> 
-#include <bautils.H> 
+#include <bautils.h> 
 
 #include "wrtdata.h"
 #include "wrtdatapluginconst.h"
@@ -490,15 +490,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CWrtData::InActiveL
-// ---------------------------------------------------------------------------
-//
-void CWrtData::InActiveL()
-    {
-    ChangePublisherStatusL( KInActive );
-    }
-
-// ---------------------------------------------------------------------------
 // CWrtData::OnLineL
 // ---------------------------------------------------------------------------
 //
--- a/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -11,21 +11,14 @@
 *
 * Contributors:
 *
-* Description:
-* Profile plug-in publisher
-*
+* Description: WRT data plug-in publisher
+* 
 */
 
-
-
-// INCLUDE FILES
+// System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationproxy.h>
-#include <aicontentobserver.h>
-#include <aiutility.h>
-#include <aipspropertyobserver.h>
 #include <PUAcodes.hrh>
-#include <aipluginsettings.h>
 #include <badesca.h>
 #include <fbs.h>
 #include <gulicon.h>
@@ -33,6 +26,13 @@
 #include <AknsUtils.h> 
 #include <AknsConstants.h>
 #include <e32property.h>
+
+// User includes
+#include <hspublisherinfo.h>
+#include <aicontentobserver.h>
+#include <aiutility.h>
+#include <aipspropertyobserver.h>
+#include <aipluginsettings.h>
 #include <activeidle2domainpskeys.h>
 
 #include "wrtdatapluginconst.h"
@@ -40,7 +40,7 @@
 #include "wrtdataplugin.h"
 #include "wrtdata.h"
 
-// CONST CLASS VARIABLES
+// Constants
 const TImplementationProxy KImplementationTable[] =
     {
     IMPLEMENTATION_PROXY_ENTRY( KImplUidDataPlugin, CWrtDataPlugin::NewL ) 
@@ -48,10 +48,12 @@
 
 // ======== MEMBER FUNCTIONS ========
 // ---------------------------------------------------------------------------
-// Constructs and returns an application object.
+// ImplementationGroupProxy
+//
 // ---------------------------------------------------------------------------
 //
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount )
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
+    TInt& aTableCount )
     {
     aTableCount = sizeof( KImplementationTable ) /
         sizeof( TImplementationProxy );
@@ -59,10 +61,10 @@
     }
 
 // ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::NewL()
+//
+// ----------------------------------------------------------------------------
 //
 CWrtDataPlugin* CWrtDataPlugin::NewL()
     {
@@ -73,27 +75,26 @@
     return self;
     }
     
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::CWrtDataPlugin()
+//
+// ----------------------------------------------------------------------------
 //
 CWrtDataPlugin::CWrtDataPlugin()
+    : iNetworkStatus( EUnknown ), iPluginState( ENone ) 
     {
     }
     
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::ConstructL()
+//
+// ----------------------------------------------------------------------------
 //
 void CWrtDataPlugin::ConstructL()
-    { 
-    iInfo.iUid.iUid = WRTDP_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DATAPLUGIN; 
-    iPluginState = ENone;
-    iHSForeGround = EFalse;
-    iKeyLockOn = EFalse;
-    iNetworkStatus = EUnknown;
-    iData = CWrtData::NewL(this);
-
+    {
+    User::LeaveIfError( iRfs.Connect() );
+    
+    iData = CWrtData::NewL( this );
     }
     
 // ---------------------------------------------------------------------------
@@ -103,15 +104,7 @@
 //
 CWrtDataPlugin::~CWrtDataPlugin()
     {
-    // deactivate the publishers
-    if( iData )
-        {
-        if ( iPluginState != EInActive )
-        	{
-        	TRAP_IGNORE(iData->DeActivateL());
-        	}
-        delete iData;
-        }
+    delete iData;
     iObservers.Close();
     Release( iContent );
     iDataArray.ResetAndDestroy();
@@ -125,71 +118,113 @@
         delete []iContentModel;
         }
     iIconArray.Reset();
+    
+    iRfs.Close();
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is requested to unload its engines due backup operation
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::Start
+//
+// ----------------------------------------------------------------------------
 //
-void CWrtDataPlugin::Stop( TAiTransitionReason aReason )
+void CWrtDataPlugin::Start( TStartReason aReason )
     {
-    if( iPluginState == EResume )
+    if( aReason == ESystemStartup || 
+        aReason == EPluginStartup )
         {
-        Suspend( aReason );
+        // publish the initial data
+        TRAP_IGNORE( PublishL());
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::Stop
+//
+// ----------------------------------------------------------------------------
+//
+void CWrtDataPlugin::Stop( TStopReason aReason )
+    {
+    if( aReason == EPluginShutdown ||
+        aReason == ESystemShutdown )
+        {
+        TRAP_IGNORE(iData->DeActivateL());
         }
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::Resume
 //
-void CWrtDataPlugin::Resume( TAiTransitionReason aReason )
-    {
-    TRAP_IGNORE( DoResumeL( aReason ) ); 
-    }
-    
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is not allowed to consume CPU resources
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
 //
-void CWrtDataPlugin::Suspend( TAiTransitionReason aReason )
+void CWrtDataPlugin::Resume( TResumeReason aReason )
     {
-    switch( aReason )
+    if ( aReason == EForeground )
         {
-        case EAiKeylockDisabled:
-        case EAiKeylockEnabled:
-            {
-            // handled in resume 
-            break;
-            }
-        default :
-            {
-            iPluginState = ESuspend;
-            TRAP_IGNORE ( iData->SuspendL() );
-            }
-        }
+        iPluginState = EResume;
+
+        TRAP_IGNORE( iData->ResumeL() );        
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::Suspend
+//
+// ----------------------------------------------------------------------------
+//
+void CWrtDataPlugin::Suspend( TSuspendReason aReason )
+    {    
+    if ( aReason == EBackground )
+        {
+        iPluginState = ESuspend;
+        
+        TRAP_IGNORE ( iData->SuspendL() );        
+        }        
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// The plug-in MUST maintain a registry of subscribers and send 
-// notification to all of them whenever the state changes or new content
-// is available
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::SetOnline
+//
+// ----------------------------------------------------------------------------
+//
+void CWrtDataPlugin::SetOnline()
+    {    
+    if ( iNetworkStatus != EOnline )
+        {
+        iNetworkStatus = EOnline;
+        
+        TRAP_IGNORE( iData->OnLineL() );            
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::SetOffline
+//
+// ----------------------------------------------------------------------------
+//
+void CWrtDataPlugin::SetOffline()
+    {
+    if ( iNetworkStatus != EOffline )
+        {
+        iNetworkStatus = EOffline;
+        
+        TRAP_IGNORE( iData->OffLineL() );            
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::SubscribeL
+//
+// ----------------------------------------------------------------------------
 //
 void CWrtDataPlugin::SubscribeL( MAiContentObserver& aObserver )
-    { 
+    {
     iObservers.AppendL( &aObserver );
     }
- 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-ins take ownership of the settings array, so it must either
-// store it in a member or free it.
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::ConfigureL
+//
+// ----------------------------------------------------------------------------
 //
 void CWrtDataPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
     {
@@ -204,33 +239,41 @@
     RAiSettingsItemArray configurationItemsArr;
     RAiSettingsItemArray settingItemsArr;
     
-    TInt count = aSettings.Count();
-    for(TInt i = 0; i < count; i++ )
+    TInt count( aSettings.Count() );
+    
+    for ( TInt i = 0; i < count; i++ )
         {
-        MAiPluginSettings* pluginSetting = aSettings[i];
-        if( pluginSetting->AiPluginItemType() == EAiPluginContentItem )
+        MAiPluginSettings* setting( aSettings[i] );
+        
+        if( setting->AiPluginItemType() == EAiPluginContentItem )
             {
-            contentItemsArr.Append(pluginSetting);
+            contentItemsArr.Append( setting );
             }
-        else if( pluginSetting->AiPluginItemType() == EAiPluginConfigurationItem )
+        else if( setting->AiPluginItemType() == EAiPluginConfigurationItem )
             {
-            configurationItemsArr.Append(pluginSetting);
+            configurationItemsArr.Append( setting );
             }
         else 
             {
-            settingItemsArr.Append(pluginSetting);
+            settingItemsArr.Append( setting );
             }
         }
     
     iDataCount = contentItemsArr.Count();
-    if(iDataCount > 0 )
+    
+    if ( iDataCount > 0 )
         {
         // Create the content Model
-        HBufC16* contentId = HBufC16::NewLC( KAiContentIdMaxLength + KAiPluginNameMaxLength );
+        HBufC16* contentId = HBufC16::NewLC( 
+            KAiContentIdMaxLength + KAiPluginNameMaxLength );
+        
         iContentModel = new TAiContentItem[iDataCount];
-        for(TInt i = 0; i < iDataCount; i++)
+        
+        for( TInt i = 0; i < iDataCount; i++ )
             {
-            MAiPluginContentItem& contentItem = (contentItemsArr[i])->AiPluginContentItem();
+            MAiPluginContentItem& contentItem( 
+                contentItemsArr[i]->AiPluginContentItem() );
+            
             iContentModel[i].id = i;
             if( contentItem.Type() == KText() )
                 {
@@ -238,28 +281,36 @@
                 iContentModel[i].type = KAiContentTypeText;
                 }
             if( contentItem.Type() == KImage() || 
-                    contentItem.Type() == KAnimation() )
+        		contentItem.Type() == KAnimation() )
                 {
                 // image
                 iContentModel[i].type = KAiContentTypeBitmap;
                 }
             
-            contentId->Des().Copy(contentItem.Name());
-            contentId->Des().Delete(0, contentId->Des().LocateReverse(KPluginNameSeprator) +1);
+            contentId->Des().Copy( contentItem.Name() );
+            contentId->Des().Delete( 0, 
+                contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
   
-            TInt sizeOfContentId = contentId->Des().Size()+sizeof(wchar_t);
-            iContentModel[i].cid = static_cast<const wchar_t*>( User::Alloc( sizeOfContentId ) );
-            Mem::Copy((TAny*)iContentModel[i].cid, contentId->Des().PtrZ(), sizeOfContentId);
+            TInt sizeOfContentId( contentId->Des().Size()+sizeof( wchar_t ) );
             
-            contentId->Des().Delete( 0, contentId->Des().Length());
+            iContentModel[i].cid = 
+                static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
+                
+            Mem::Copy( ( TAny* )iContentModel[i].cid, 
+                contentId->Des().PtrZ(), sizeOfContentId );
+            
+            contentId->Des().Delete( 0, contentId->Des().Length() );
             }    
         
         CleanupStack::PopAndDestroy( contentId );
-        iContent = AiUtility::CreateContentItemArrayIteratorL( iContentModel, iDataCount );
+        iContent = AiUtility::CreateContentItemArrayIteratorL( 
+                iContentModel, iDataCount );
+                       
         // Configurations 
-        iData->ConfigureL(configurationItemsArr);
+        iData->ConfigureL( configurationItemsArr );
 
         iPluginState = ESuspend;
+
         // Register for notifications
         iData->RegisterL();
         
@@ -270,119 +321,79 @@
     settingItemsArr.Reset();
     contentItemsArr.Reset();
     configurationItemsArr.Reset();
+    
        // We own the array so destroy it
     aSettings.ResetAndDestroy();
-    // publish the initial data
-    PublishL();
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::GetProperty
+//
+// ----------------------------------------------------------------------------
+//
+TAny* CWrtDataPlugin::GetProperty( TProperty aProperty )
+    {
+    if ( aProperty == EPublisherContent )
+        {
+        return static_cast< MAiContentItemIterator* >( iContent );      
+        }
+    
+    return NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::HandleEvent
+//
+// ----------------------------------------------------------------------------
+//
+void CWrtDataPlugin::HandleEvent( const TDesC& aEventName, 
+    const TDesC& aParam )
+    {
+    TRAP_IGNORE( iData->ExecuteActionL( aEventName , aParam ) );    
     }
 
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Returns the extension interface. Actual type depends on the passed 
-// aUid argument.
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::HasMenuItem
+//
+// ----------------------------------------------------------------------------
+//
+TBool CWrtDataPlugin::HasMenuItem( const TDesC& aMenuItem )
+    {
+    return iData->HasMenuItem ( aMenuItem );
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::IsActive
+//
+// ----------------------------------------------------------------------------
 //
-TAny* CWrtDataPlugin::Extension( TUid aUid )
-    {    
-    if ( aUid == KExtensionUidProperty )
-        {
-        return static_cast<MAiPropertyExtension*>( this );
-        }
-    else if (aUid == KExtensionUidEventHandler)
-        {
-        return static_cast<MAiEventHandlerExtension*>( this );
-        }
-    else
-        {   
-        return NULL;
-        }
+TBool CWrtDataPlugin::IsActive() const
+    {
+    return iPluginState == EResume;
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::Data
+//
+// ----------------------------------------------------------------------------
+//
+CWrtData* CWrtDataPlugin::Data() const
+    {
+    return iData;
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::NetworkStatus
+//
+// ----------------------------------------------------------------------------
+//
+CWrtDataPlugin::TPluginNetworkStatus CWrtDataPlugin::NetworkStatus() const
+    {
+    return iNetworkStatus;
     }
 
 // ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Read property of publisher plug-in.
-// ---------------------------------------------------------------------------
-//
-TAny* CWrtDataPlugin::GetPropertyL( TInt aProperty )
-    {
-    TAny* property = NULL;
-    
-    switch ( aProperty )
-        {
-    case EAiPublisherInfo:
-        {
-         property = static_cast<TAiPublisherInfo*>( &iInfo );
-        break;  
-        }       
-
-    case EAiPublisherContent:
-        {
-        property = static_cast<MAiContentItemIterator*>( iContent );
-        break;    
-        }        
-    default:
-        break;
-        }
-
-    return property;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Write property value to optimize the content model.
-// ---------------------------------------------------------------------------
-//
-void CWrtDataPlugin::SetPropertyL( TInt aProperty, TAny* aValue )
-    {  
-    switch ( aProperty )
-        {
-        case EAiPublisherInfo:
-            {
-            if( aValue )
-                {
-                const TAiPublisherInfo* info = static_cast<const TAiPublisherInfo*>( aValue );
-                iInfo.iName.Copy( info->iName );
-                iInfo.iNamespace.Copy( info->iNamespace );
-                }
-            break;
-            }
-        default:
-            break;         
-        }
-    }
- 
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CWrtDataPlugin::HandleEvent( TInt /*aEvent*/, const TDesC& /*aParam*/ )
-    {
-    // This is not as there is no event id to retrieve in this dynamic plugin. 
-    } 
-    
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Handles an event sent by the AI framework.
-// ---------------------------------------------------------------------------
-//
-void CWrtDataPlugin::HandleEvent( const TDesC& aEventName, const TDesC& aParam )
-    {
-    // We have no way of reporting errors to framework so just ignore them.
-    TRAP_IGNORE(iData->ExecuteActionL( aEventName , aParam ) );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MAiEventHandlerExtension.
-// Invoked by the framework for querying if plugin has menu item
-// ---------------------------------------------------------------------------
-//
-TBool CWrtDataPlugin::HasMenuItem( const TDesC16& aMenuItem )
-    { 
-    return iData->HasMenuItem ( aMenuItem );  
-    }
-
-// ---------------------------------------------------------------------------
+// CWrtDataPlugin::GetIdL
 // Gets the id of a content  
 // ---------------------------------------------------------------------------
 //
@@ -405,6 +416,7 @@
  
 
 // ---------------------------------------------------------------------------
+// CWrtDataPlugin::GetTypeL
 // Gets type of a content
 // ---------------------------------------------------------------------------
 //
@@ -467,15 +479,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// Is plugin active to publish the data 
-// ---------------------------------------------------------------------------
-//
-TBool CWrtDataPlugin::IsActive()
-    {
-    return (iPluginState == EResume );
-    }
-
-// ---------------------------------------------------------------------------
 // Publish a specific text of the widget  
 // ---------------------------------------------------------------------------
 //
@@ -577,23 +580,21 @@
               }
           }
       else  // Interpret as File path
-          {
-          RFs rfs;
-          User::LeaveIfError( rfs.Connect() );
-          RFile* iconFile = new (ELeave) RFile();
-          err = iconFile->Open( rfs, aPath, EFileShareReadersOnly |  EFileRead );
+          {                   
+          RFile iconFile;
+          
+          err = iconFile.Open( iRfs, aPath, EFileShareReadersOnly |  EFileRead );
+          
           if( err == KErrNone )
             {
-             aObserver->Publish( *this, aContentId, *iconFile, aContentId );
+             aObserver->Publish( *this, aContentId, iconFile, aContentId );
             }
           else
               {
               aObserver->Clean( *this, aContentId, aContentId );
               }
-          iconFile->Close();
-          delete iconFile;
-          iconFile = NULL;
-          rfs.Close();
+          
+          iconFile.Close();
           }
         }
     }
@@ -695,100 +696,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// framework instructs plug-in that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CWrtDataPlugin::DoResumeL( TAiTransitionReason aReason )
-    {
-    //update in startup phase and idle is on foreground.
-    switch ( aReason )
-        {
-        case EAiIdleOnLine:
-            {
-            iNetworkStatus = EOnline;
-            iData->OnLineL();
-            break;
-            }
-        case EAiIdleOffLine:
-            {
-            iNetworkStatus = EOffline;
-            iData->OffLineL();
-            break;
-            }
-        case EAiIdlePageSwitch:
-            {
-            if ( iPluginState == EResume )
-                {
-                iData->SuspendL();
-                }
-            iPluginState = EInActive;
-            iData->InActiveL();
-            }
-            break;
-        case EAiSystemStartup:
-        case EAiIdleForeground:
-            {
-            iHSForeGround = ETrue;
-            }
-        case EAiBacklightOn:            
-            {
-            if ( iPluginState == ESuspend  && !iKeyLockOn )
-                {
-                iPluginState = EResume;
-                iData->ResumeL();
-                }
-            break;
-            }
-        case EAiKeylockDisabled:
-            {
-            iKeyLockOn = EFalse;
-            // Key lock events considered only if HS is in foreground  
-            if ( iHSForeGround && iPluginState == ESuspend )
-                {
-                iPluginState = EResume;
-                iData->ResumeL();
-                }
-            break;
-            }
-        case EAiKeylockEnabled:
-            {
-            iKeyLockOn = ETrue;
-            // Key lock events considered only if HS is in foreground
-            if ( iHSForeGround && iPluginState == EResume )
-                {
-                iPluginState = ESuspend ;
-                iData->SuspendL();
-                }
-            break;
-            }
-        case EAiScreenLayoutChanged:
-            {
-            // ignore events
-            break;
-            }
-      case EAiGeneralThemeChanged:
-          {
-          // ignore event
-          break;
-          }
-        case EAiIdleBackground: 
-            {
-            iHSForeGround = EFalse;
-            }
-        default :
-            {
-            if ( iPluginState == EResume )
-                {
-                iPluginState = ESuspend;
-                iData->SuspendL();
-                }
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
 // ResolveSkinItemId
 // ---------------------------------------------------------------------------
 //
@@ -866,3 +773,5 @@
        }
    return (error == KErrNone );
    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/wsplugin/group/aiwsplugin.mmp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is project specification for idle window server plug-
+*                in. The plug-in provides service for routing of numeric key
+*                events to Phone application and activation of key lock.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          aiwsplugin.dll
+TARGETTYPE      ANI
+UID             0x10003B22 0x10207206
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../../inc/common
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+SOURCE          aiwspluginanimdll.cpp
+SOURCE          aiwspluginanim.cpp
+SOURCE          modifierkeytracker.cpp
+// SOURCE          keylockhandler.cpp
+// SOURCE          keylockstates.cpp
+// SOURCE          keypadsettings.cpp
+SOURCE          numerickeyhandler.cpp
+// SOURCE          logslaunchhandler.cpp
+// SOURCE          sindlaunchhandler.cpp
+// SOURCE          keyhandlertimer.cpp
+SOURCE          panic.cpp
+
+
+LIBRARY         euser.lib
+LIBRARY         cone.lib
+LIBRARY			ws32.lib
+LIBRARY			apgrfx.lib
+LIBRARY			centralrepository.lib
+LIBRARY			flogger.lib
+
+LIBRARY			featmgr.lib
+LIBRARY         cenrepnotifhandler.lib
+LIBRARY         ptiengine.lib
+LIBRARY         keylockpolicyapi.lib
+
+LIBRARY			aiutils.lib
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/wsplugin/group/bld.inf	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The build information file of WS Plugin
+*
+*/
+
+
+#ifdef RD_CUSTOMIZABLE_AI
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../rom/aiwsplugin.iby        CORE_MW_LAYER_IBY_EXPORT_PATH(aiwsplugin.iby)
+
+PRJ_MMPFILES
+aiwsplugin.mmp
+
+#endif // RD_CUSTOMIZABLE_AI
+
+// End of File.
--- a/idlefw/plugins/wsplugin/inc/keyhandlertimer.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Key handler timer for Active Idle WS Plug-in.
-*
-*/
-
-#ifndef C_AIWSPLUGIN_KEYHANDLERTIMER_H
-#define C_AIWSPLUGIN_KEYHANDLERTIMER_H
-
-#include <e32base.h>
-
-namespace AiWsPlugin {
-
-/**
- * Handler timer interface.
- */
-class MHandlerTimer
-    {
-public:
-    virtual void TimerDone() = 0;
-    };  
-
-/**
- *  @ingroup group_wsplugin
- *
- *  Logs app launch handler for Active Idle WS Plug-in. 
- */
-class CKeyHandlerTimer : 
-        public CTimer
-    {
-public:
-
-// Construction
-
-    static CKeyHandlerTimer* NewL( MHandlerTimer* aHandler );
-    
-    static CKeyHandlerTimer* NewLC( MHandlerTimer* aHandler );
-    
-    ~CKeyHandlerTimer();
-
-// new methods
-
-    void StopTimer();
-
-    TBool IsActive();
-
-protected: // From CActive
-
-    void RunL();
-
-    TInt RunError( TInt aError );
-
-private:
-
-// Construction
-
-    CKeyHandlerTimer( MHandlerTimer* aHandler );
-
-    void ConstructL();
-
-private: // data
-
-    /// Pointer to handler timer. Not owned.
-    MHandlerTimer* iHandler;
-    }; 
-
-} // namespace AiWsPlugin
-
-
-#endif // C_AIWSPLUGIN_KEYHANDLERTIMER_H
\ No newline at end of file
--- a/idlefw/plugins/wsplugin/inc/keylockcontrol.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock handler settings class and control interface for 
-*                Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef M_AIWSPLUGIN_KEYLOCKCONTROL_H
-#define M_AIWSPLUGIN_KEYLOCKCONTROL_H
-
-#include <e32def.h>
-class TRawEvent;
-
-namespace AiWsPlugin {
-
-class TKeypadSettings;
-class TKeylockState;
-
-/**
- *  @ingroup group_wsplugin
- *
- * Callback interface for CKeyLockHandler internal states.
- */
-class MKeyLockHandlerControl
-    {
-public:
-
-    virtual const TKeypadSettings& Settings() const = 0;
-    
-    virtual void StartTimeoutTimer( TInt aTimeout = -1 ) = 0;
-    
-    virtual void StopTimeoutTimer() = 0;
-    
-    virtual void ActivateKeypadLock() = 0;
-    
-    virtual void CancelKeypadLock() = 0;
-
-    virtual void KeypadLockTimeout() = 0;
-    
-    virtual void SetNextState( const TKeylockState& aState ) = 0;
-    
-    virtual void ActivateNextState() = 0;
-    
-    virtual void SetLastLockKeyScanCode( TInt aScanCode ) = 0;
-    
-    virtual TInt LastLockKeyScanCode() const = 0;
-    
-    virtual TBool HasFocus() = 0;
-    
-    virtual TBool TimeoutTimerActive()  = 0;
-    
-    virtual TBool IsFirstLockKey( TInt aScanCode ) = 0;
-    
-    virtual TBool IsSecondLockKey( TInt aScanCode ) = 0;
-
-    
-protected:
-    /**
-     * Protected dtor prevents deletion through this interface.
-     */
-    ~MKeyLockHandlerControl() { }
-    };
-
-} // namespace AiWsPlugin
-
-#endif // M_AIWSPLUGIN_KEYLOCKCONTROL_H
--- a/idlefw/plugins/wsplugin/inc/keylockhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock handler for Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef C_AIWSPLUGIN_KEYLOCKHANDLER_H
-#define C_AIWSPLUGIN_KEYLOCKHANDLER_H
-
-#include "eventhandler.h"
-#include "keylockcontrol.h"
-#include "keypadsettings.h"
-#include "keyhandlertimer.h"
-
-class CKeyLockPolicyApi;
-namespace AiWsPlugin {
-
-class TKeylockState;
-
-/**
- *  @ingroup group_wsplugin
- *
- *  Keylock handler for Active Idle WS Plug-in. 
- *
- *  Monitors key presses that activate keyboard lock on the device.
- *
- *  @since S60 3.2
- */
-class CKeyLockHandler : 
-        public CEventHandler, 
-        public MKeyLockHandlerControl,
-        public MHandlerTimer
-    {
-public:
-
-    static CKeyLockHandler* NewLC();
-
-    ~CKeyLockHandler();
-
-// from MHandlerTimer
-
-    void TimerDone();    
-
-private:
-
-// from base class CEventHandler
-
-    void SetUiStateQuery( MUiState& aUiState );
-    
-    void FocusChanged( TBool aState );
-    
-    TBool OfferRawEvent(const TRawEvent& aRawEvent);
-
-// from base class MKeyLockHandlerControl
-
-    const TKeypadSettings& Settings() const;
-    
-    void StartTimeoutTimer( TInt aTimeout );
-    
-    void StopTimeoutTimer();
-    
-    void ActivateKeypadLock();
-    
-    void CancelKeypadLock();
-    
-    void KeypadLockTimeout();
-    
-    void SetNextState( const TKeylockState& aState );
-    
-    void ActivateNextState();
-    
-    void SetLastLockKeyScanCode( TInt aScanCode );
-    
-    TInt LastLockKeyScanCode() const;
-    
-    TBool HasFocus();
-
-    TBool TimeoutTimerActive();
-    
-// construction
-
-    CKeyLockHandler();
-    
-    void ConstructL();
-    
-    static TInt TimerElapsed( TAny* aSelf );
-    
-    TBool IsFirstLockKey( TInt aScanCode );
-    
-    TBool IsSecondLockKey( TInt aScanCode );
-
-private: // data
-    /**
-     * Current state of this object.
-     * Not owned.
-     */
-    const TKeylockState* iCurrentState;
-
-    /**
-     * Next state of this object.
-     * Not owned.
-     */
-    const TKeylockState* iNextState;
-    
-    /**
-     * Timeout timer for keypad lock.
-     * Own.
-     */
-    CPeriodic* iKeypadLockTimer;
-
-    /**
-     * Key lock settings.
-     */
-    TKeypadSettings iSettings;
-    
-    /**
-     * Last value of SetLastLockKeyScanCode( TInt aScanCode).
-     */
-    TInt iLastLockKeyScanCode;
-    
-    /**
-     * Pointer to ui state.
-     * Not owned.
-     */
-    MUiState* iUiState;
-    
-    /**
-     * For checking keylock buttons
-     * Own
-     */
-    CKeyLockPolicyApi *iKeylockApi;
-    };
-
-} // namespace AiWsPlugin
-
-
-#endif // C_AIWSPLUGIN_KEYLOCKHANDLER_H
--- a/idlefw/plugins/wsplugin/inc/keylockstates.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock handler states for Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef T_AIWSPLUGIN_KEYLOCKSTATES_H
-#define T_AIWSPLUGIN_KEYLOCKSTATES_H
-
-#include <e32def.h>
-class TRawEvent;
-
-namespace AiWsPlugin {
-
-class MKeyLockHandlerControl;
-
-/**
- *  @ingroup group_wsplugin
- *
- * Internal state structure for class CKeyLockHandler.
- * The states are behaviour-only and thus consist of just function pointers.
- */
-class TKeylockState
-    {
-public:
-    /**
-     * Returns the state machine's initial startup state.
-     */
-    static const TKeylockState& StartupState();
-
-    /**
-     * Returns this state's default succeeding state.
-     */
-    inline const TKeylockState& DefaultNextState() const
-        { return (*iDefaultNextState)(); }
-
-    /**
-     * Handles Active Idle focus changes.
-     *
-     * @param aControl Key lock control interface.
-     * @param aState   current focus state. See CWindowAnim::FocusChaned.
-     */
-    inline void FocusChanged( MKeyLockHandlerControl& aControl, TBool aState ) const
-        { (*iFocusChanged)( aControl, aState ); }
-        
-    /**
-     * Handles raw Window Server events.
-     *
-     * @param aControl  Key lock control interface.
-     * @param aRawEvent The event to handle. See MEventHandler::OfferRawEvent.
-     * @return true if the event was consumed by the state, false otherwise.
-     */
-    inline TBool OfferRawEvent
-            (  MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent ) const
-        { return (*iOfferRawEvent)( aControl, aRawEvent ); }
-
-    /**
-     * Handles key lock timeout timer elapsed event.
-     *
-     * @param aControl  Key lock control interface.
-     */
-    inline void TimerElapsed( MKeyLockHandlerControl& aControl ) const
-        { (*iTimerElapsed)( aControl ); }
-
-// Public function pointers
-
-    /**
-     * Pointer to state function that returns this state's default succeeding state.
-     */
-    const TKeylockState& (*iDefaultNextState)();
-    
-    /**
-     * Pointer to state function which handles Active Idle focus changes.
-     *
-     * @param aControl Key lock control interface.
-     * @param aState   current focus state. See CWindowAnim::FocusChaned.
-     */
-    void  (*iFocusChanged)( MKeyLockHandlerControl& aControl, TBool aState );
-
-    /**
-     * Pointer to state function which handles raw Window Server events.
-     *
-     * @param aControl  Key lock control interface.
-     * @param aRawEvent The event to handle. See MEventHandler::OfferRawEvent.
-     * @return true if the event was consumed by the state, false otherwise.
-     */
-    TBool (*iOfferRawEvent)( MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent );
-    
-    /**
-     * Pointer to state function which handles key lock timeout timer elapsed 
-     * event.
-     *
-     * @param aControl  Key lock control interface.
-     */
-    void  (*iTimerElapsed)( MKeyLockHandlerControl& aControl );
-    };
-
-} // namespace AiWsPlugin
-
-#endif // T_AIWSPLUGIN_KEYLOCKSTATES_H
-
--- a/idlefw/plugins/wsplugin/inc/keypadsettings.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keypad settings class for Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef T_AIWSPLUGIN_KEYPADSETTINGS_H
-#define T_AIWSPLUGIN_KEYPADSETTINGS_H
-
-#include <e32std.h>
-class TRawEvent;
-
-namespace AiWsPlugin {
-
-/**
- *  @ingroup group_wsplugin
- *
- * Internal class for keypad settings.
- */
-class TKeypadSettings
-    {
-public:
-    /**
-     * Initializes this object from settings repository.
-     */
-    void ReadFromRepositoryL();
-    
-    /**
-     * Returns true if aScanCode matches the first lock key.
-     */
-    TBool IsFirstLockKey( TInt aScanCode ) const;
-
-    /**
-     * Returns true if aScanCode matches the second lock key.
-     */
-    TBool IsSecondLockKey( TInt aScanCode ) const;
-
-    /**
-     * Returns the key lock timeout in microseconds.
-     */
-    TTimeIntervalMicroSeconds32 KeylockTimeout() const;
-    
-    /**
-     * Returns true if aScanCode matches the SIND key.
-     */
-    TBool IsSINDKey( TInt aScanCode ) const;
-
-    /**
-     * Returns the key lock timeout in microseconds.
-     */
-    TTimeIntervalMicroSeconds32 KeySINDTimeout() const;
-    
-    TInt16 MapNkpScanCodeToChar( TInt aScanCode );    
-
-private:  // data
-    /**
-     * Scan code of first keypad lock key.
-     */
-    TInt16 iFirstLockKeyScanCode;
-    
-    /**
-     * Character code (if any) that matches iFirstLockKeyScanCode.
-     */
-    TInt16 iFirstLockKeyChar;
-    
-    /**
-     * Scan code of second keypad lock key.
-     */
-    TInt16 iSecondLockKeyScanCode;
-    
-    /**
-     * Character code (if any) that matches iSecondLockKeyChar.
-     */
-    TInt16 iSecondLockKeyChar;
-    
-    /**
-     * Scan code of optional second keypad lock key.
-     */
-    TInt16 iSecondLockKeyScanCode2;
-    
-    /**
-     * Character code (if any) that matches iSecondLockKeyChar2.
-     */
-    TInt16 iSecondLockKeyChar2;
-    
-    /** 
-     * Keypad lock timeout in microseconds.
-     */
-    TTimeIntervalMicroSeconds32 iKeylockTimeout;
-
-    /**
-     * Scan code of SIND keypad key.
-     */
-    TInt16 iSINDKeyScanCode;
-    
-    /**
-     * Character code (if any) that matches iSINDKeyScanCode.
-     */
-    TInt16 iSINDKeyScanChar;    
-    
-    /** 
-     * Keypad SIND timeout in microseconds.
-     */
-    TTimeIntervalMicroSeconds32 iKeySINDTimeout;    
-    
-    };
-
-} // namespace AiWsPlugin
-
-#endif // T_AIWSPLUGIN_KEYPADETTINGS_H
--- a/idlefw/plugins/wsplugin/inc/logslaunchhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Logs app launch handler for Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef C_AIWSPLUGIN_LOGSLAUNCHANDLER_H
-#define C_AIWSPLUGIN_LOGSLAUNCHANDLER_H
-
-#include "eventhandler.h"
-#include "keyhandlertimer.h"
-
-namespace AiWsPlugin {
-
-/**
- *  @ingroup group_wsplugin
- *
- *  Logs app launch handler for Active Idle WS Plug-in. 
- */
-class CLogsLaunchHandler : 
-        public CEventHandler,
-        public MHandlerTimer        
-    {
-public:
-
-    static CLogsLaunchHandler* NewLC();
-    
-    ~CLogsLaunchHandler();
-
-private:
-
-// from base class CEventHandler
-
-    void SetUiStateQuery( MUiState& aUiState );
-    
-    void FocusChanged( TBool aState );
-    
-    TBool OfferRawEvent(const TRawEvent& aRawEvent);
-
-// from MHandlerTimer
-
-    void TimerDone();
-
-// Construction
-
-    CLogsLaunchHandler();
-    
-    void ConstructL();
-
-private: // data
-
-    /// Pointer to state. Not owned.
-    MUiState* iUiState;
-    
-    /// Timer for long key down event. Owned.
-    CKeyHandlerTimer* iTimer;
-    };
-
-} // namespace AiWsPlugin
-
-
-#endif // C_AIWSPLUGIN_KEYLOCKHANDLER_H
--- a/idlefw/plugins/wsplugin/inc/numerickeyhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wsplugin/inc/numerickeyhandler.h	Fri Feb 19 23:07:29 2010 +0200
@@ -44,7 +44,8 @@
         public CEventHandler, 
         private MCenRepNotifyHandlerCallback
     {
-public:
+public:    
+    
     /**
      * Creates a new instance of this class.
      *
@@ -118,6 +119,13 @@
     
     /// Input language indicator.
     TInt iInputLanguage;
+    
+private:
+    // friend classes
+    
+#ifdef _AIWSPLUGIN_UNIT_TEST    
+    friend class UT_NumericKeyHandler;
+#endif    
     };
 
 } // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/inc/sindlaunchhandler.h	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  SIND launch handler for Active Idle WS Plug-in.
-*
-*/
-
-
-#ifndef C_AIWSPLUGIN_SINDLAUNCHANDLER_H
-#define C_AIWSPLUGIN_SINDLAUNCHANDLER_H
-
-#include "eventhandler.h"
-#include "keyhandlertimer.h"
-
-#include <e32base.h>
-
-namespace AiWsPlugin {
-
-/**
- *  @ingroup group_wsplugin
- *
- *  Logs app launch handler for Active Idle WS Plug-in. 
- */
-class CSINDLaunchHandler : 
-        public CEventHandler,
-        public MHandlerTimer        
-    {
-public:
-
-// Construction
-
-    static CSINDLaunchHandler* NewLC();
-    
-    ~CSINDLaunchHandler();
-
-// from base class CEventHandler
-
-    void SetUiStateQuery( MUiState& aUiState );
-    
-    void FocusChanged( TBool aState );
-    
-    TBool OfferRawEvent(const TRawEvent& aRawEvent);
-    
-// from MHandlerTimer
-
-    void TimerDone();
-
-private:
-
-// Construction
-
-    CSINDLaunchHandler();
-    
-    void ConstructL();
-    
-// New methods
-
-    void SkipVoiceDial();
-
-private: // data
-
-    /// Pointer to state. Not owned.
-    MUiState* iUiState;
-    
-    /// Timer for long key down event. Owned.
-    CKeyHandlerTimer* iTimer;
-    
-    /// Flag for SIND key down
-    TBool iSINDKeyDown;
-    
-    /// Flag for SIND launched
-    TBool iSINDLaunched;
-    };
-
-} // namespace AiWsPlugin
-
-
-#endif // C_AIWSPLUGIN_SINDLAUNCHANDLER_H
\ No newline at end of file
--- a/idlefw/plugins/wsplugin/src/aiwspluginanim.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/plugins/wsplugin/src/aiwspluginanim.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -16,47 +16,81 @@
 */
 
 
+// System includes
+#include <featmgr.h>
+
+// User includes
 #include "aiwspluginanim.h"
 #include "aiwspluginanimdef.h"
-#include "keylockhandler.h"
 #include "numerickeyhandler.h"
-#include "logslaunchhandler.h"
-#include "sindlaunchhandler.h"
 
-#include <featmgr.h>
 
 using namespace AiWsPlugin;
 
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::CAiWsPluginAnim
+//
+// ---------------------------------------------------------------------------
+//
 CAiWsPluginAnim::CAiWsPluginAnim()
     {
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::~CAiWsPluginAnim
+//
+// ---------------------------------------------------------------------------
+//
 CAiWsPluginAnim::~CAiWsPluginAnim()
     {
     iEventHandlers.ResetAndDestroy();
+    
     if ( iFunctions )
         {
         iFunctions->GetRawEvents( EFalse );
         }
+    
     FeatureManager::UnInitializeLib();
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::CommandReplyL
+//
+// ---------------------------------------------------------------------------
+//
 TInt CAiWsPluginAnim::CommandReplyL( TInt /*aOpcode*/, TAny* /*aArgs*/ )
     {
     return KErrNone;
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::Command
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::Command( TInt /*aOpcode*/, TAny* /*aArgs*/ )
     {
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::Animate
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::Animate( TDateTime* /*aDateTime*/ )
     {
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::AddEventHandlerAndPopL
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::AddEventHandlerAndPopL( CEventHandler* aEventHandler )
     {
-    if( aEventHandler )
+    if ( aEventHandler )
         {
         aEventHandler->SetUiStateQuery( *this );
 	    iEventHandlers.AppendL( aEventHandler );
@@ -64,55 +98,75 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::ConstructL
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::ConstructL( TAny* aArgs, TBool aHasFocus )
     {
-    FeatureManager::InitializeLibL();
-    
-    iFunctions->GetRawEvents( ETrue );
-    if( !aArgs )
+    if ( !aArgs )
         {
         User::Leave( KErrArgument );
         }
-    iWgInfo = *( static_cast<TAiWsPluginAnimInitData*>(aArgs) );
+    
+    FeatureManager::InitializeLibL();
     
-    AddEventHandlerAndPopL( CKeyLockHandler::NewLC() );
-
-    MAnimGeneralFunctionsWindowExtension* ext = reinterpret_cast<MAnimGeneralFunctionsWindowExtension*>
-        ( iFunctions->ExtendedInterface( 
-         MAnimGeneralFunctions::EWindowExtensionInterface ) );
-    AddEventHandlerAndPopL( CNumericKeyHandler::NewLC( iWgInfo.iTargetWgId, ext ) );
+    iFunctions->GetRawEvents( ETrue );
+       
+    iWgInfo = *( static_cast< TAiWsPluginAnimInitData* >( aArgs ) );
+        
+    // AddEventHandlerAndPopL( CKeyLockHandler::NewLC() );
+    
+    MAnimGeneralFunctionsWindowExtension* ext = 
+        reinterpret_cast<MAnimGeneralFunctionsWindowExtension*>
+            ( iFunctions->ExtendedInterface( 
+                MAnimGeneralFunctions::EWindowExtensionInterface ) ); 
+         
+    AddEventHandlerAndPopL( 
+        CNumericKeyHandler::NewLC( iWgInfo.iTargetWgId, ext ) );
 	
-	AddEventHandlerAndPopL( CLogsLaunchHandler::NewLC() );
-	
-/* Leave this commented code here for now.. 2.5.2007, unclear if needed still in some config.
-	if ( FeatureManager::FeatureSupported( KFeatureIdKeypadNoVoiceKey ) )
-	    {
-	    AddEventHandlerAndPopL( CSINDLaunchHandler::NewLC() );       
-	    }	
-*/
     // Update initial focus status
     FocusChanged( aHasFocus );
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::Redraw
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::Redraw()
     {
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::FocusChanged
+//
+// ---------------------------------------------------------------------------
+//
 void CAiWsPluginAnim::FocusChanged( TBool aState )
     {
     iAiFocused = aState;
-    const TInt handlerCount = iEventHandlers.Count();
-    for( TInt i = 0; i < handlerCount; ++i )
+    
+    const TInt count( iEventHandlers.Count() );
+    
+    for ( TInt i = 0; i < count; ++i )
         {
         iEventHandlers[i]->FocusChanged( aState );
         }
     }
 
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::OfferRawEvent
+//
+// ---------------------------------------------------------------------------
+//
 TBool CAiWsPluginAnim::OfferRawEvent( const TRawEvent& aRawEvent )
     {
     // Forward event to all event handlers
-    const TInt handlerCount = iEventHandlers.Count();
-    for( TInt i = 0; i < handlerCount; ++i )
+    const TInt count( iEventHandlers.Count() );
+    
+    for ( TInt i = 0; i < count; ++i )
         {
         // All other are made to return EFalse
         // Except wait for 2ndkeyup and 2ndkeydown of keylock states.
@@ -127,14 +181,25 @@
     
     return EFalse;
     }
-	
+
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::Modifiers
+//
+// ---------------------------------------------------------------------------
+//
 TUint CAiWsPluginAnim::Modifiers() const
     {
     return iModifierTracker.Status();
     }
     
+// ---------------------------------------------------------------------------
+// CAiWsPluginAnim::HasFocus
+//
+// ---------------------------------------------------------------------------
+//
 TBool CAiWsPluginAnim::HasFocus() const
     {
     return iAiFocused;
     }
 	
+// End of file
--- a/idlefw/plugins/wsplugin/src/keyhandlertimer.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Key handler timer for Active Idle WS Plug-in.
-*
-*/
-
-
-#include <e32base.h>
-
-#include "keyhandlertimer.h"
-#include "sindlaunchhandler.h"
-
-namespace AiWsPlugin {
-
-CKeyHandlerTimer::CKeyHandlerTimer( MHandlerTimer* aHandler )
- :  CTimer( CTimer::EPriorityStandard )
-    {
-    iHandler = aHandler;
-    }
-    
-void CKeyHandlerTimer::ConstructL()
-    {
-    CTimer::ConstructL();
-    CActiveScheduler::Add( this );        
-    }
-
-CKeyHandlerTimer* CKeyHandlerTimer::NewL( MHandlerTimer* aHandler )
-    {
-    CKeyHandlerTimer* self = CKeyHandlerTimer::NewLC( aHandler );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-CKeyHandlerTimer* CKeyHandlerTimer::NewLC( MHandlerTimer* aHandler )
-    {
-    CKeyHandlerTimer* self = new(ELeave) CKeyHandlerTimer( aHandler );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-    
-CKeyHandlerTimer::~CKeyHandlerTimer()
-    {
-    Cancel();
-    }
-
-void CKeyHandlerTimer::RunL()
-    {
-    if( iHandler )
-        {
-        iHandler->TimerDone();
-        }
-    }
-    
-TInt CKeyHandlerTimer::RunError( TInt /*aError*/ )
-    {
-    return 0;
-    }
-
-TBool CKeyHandlerTimer::IsActive()
-	{
-	return CActive::IsActive();
-	}
-
-} // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/src/keylockhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock handler implementation for Active Idle WS Plug-in
-*
-*/
-
-
-#include "keylockhandler.h"
-#include "keyhandlertimer.h"
-#include "keylockstates.h"
-#include "aiwspluginanimdef.h"
-#include "uistate.h"
-
-#include <e32property.h>
-#include <activeidle2internalpskeys.h>
-#include <keylockpolicyapi.h>
-
-#include "debug.h"
-
-namespace AiWsPlugin {
-
-CKeyLockHandler::CKeyLockHandler() :
-    // Initialize to start-up state
-    iCurrentState( &TKeylockState::StartupState() ),
-    iNextState( &iCurrentState->iDefaultNextState() )
-    {
-    }
-    
-void CKeyLockHandler::ConstructL()
-    {
-    // Read capability: ReadDeviceData.
-    _LIT_SECURITY_POLICY_C1( KReadDevicePolicy, ECapabilityReadDeviceData );
-    // Write capability: WriteDeviceData.
-    _LIT_SECURITY_POLICY_C1( KWriteDevicePolicy, ECapabilityWriteDeviceData );
-
-    // Initialize Shortcut Plug-in command API
-    RProperty::Define( 
-    	KUidSystemCategory,
-    	KPSUidShortcutCmd,  
-      	RProperty::EText,
-        KReadDevicePolicy,
-        KWriteDevicePolicy 
-        );
-
-    iSettings.ReadFromRepositoryL();    
-    iKeypadLockTimer = CPeriodic::NewL( CActive::EPriorityUserInput );
-    iKeylockApi = CKeyLockPolicyApi::NewL( EPolicyActivateKeyguard );
-    if ( !iKeylockApi->HasConfiguration() )
-        {
-        delete iKeylockApi;
-        iKeylockApi = NULL;
-        }
-    }
-
-CKeyLockHandler* CKeyLockHandler::NewLC()
-    {
-    CKeyLockHandler* self = new( ELeave ) CKeyLockHandler;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-CKeyLockHandler::~CKeyLockHandler()
-    {
-    delete iKeypadLockTimer;
-    delete iKeylockApi;
-    }
-
-void CKeyLockHandler::SetUiStateQuery( MUiState& aUiState )
-    {
-    iUiState = &aUiState;
-    }
-
-TBool CKeyLockHandler::HasFocus()
-    {
-    return iUiState->HasFocus();
-    }
-    
-TBool CKeyLockHandler::TimeoutTimerActive()
-    {
-    return iKeypadLockTimer->IsActive();
-    }
-
-void CKeyLockHandler::FocusChanged( TBool aState )
-    {
-    iCurrentState->FocusChanged( *this, aState );
-    }
-    
-TBool CKeyLockHandler::OfferRawEvent(const TRawEvent& aRawEvent)
-    {
-    return iCurrentState->OfferRawEvent( *this, aRawEvent );    
-    }
-
-TBool CKeyLockHandler::IsFirstLockKey( TInt aScanCode )
-    {  
-    if ( iKeylockApi )
-        {
-        TKeyEvent event;
-        event.iModifiers = 0;
-        event.iCode = 0;
-        event.iRepeats = 0;
-        event.iScanCode = aScanCode;
-        // Keylock API return ETrue on handlekeyeventL only if the whole key
-        // sequence has been inputted (1st + 2nd key pressed)
-        TRAP_IGNORE(iKeylockApi->HandleKeyEventL( event,EEventKeyDown ));
-        return iKeylockApi->PrimaryKeyPressed();
-        }
-    else
-        {
-        return Settings().IsFirstLockKey( aScanCode );
-        }
-    }
-
-TBool CKeyLockHandler::IsSecondLockKey( TInt aScanCode )
-    {   
-    TBool returnValue = EFalse;
-    if ( iKeylockApi )
-        {
-        TKeyEvent event;
-        event.iModifiers = 0;
-        event.iCode = 0;
-        event.iRepeats = 0;
-        event.iScanCode = aScanCode;
-        TRAP_IGNORE(returnValue = iKeylockApi->HandleKeyEventL( event,EEventKeyDown ));
-        return returnValue;
-        }
-    else
-        {
-        return Settings().IsSecondLockKey( aScanCode );
-        }
-    }
-
-const TKeypadSettings& CKeyLockHandler::Settings() const
-    {
-    return iSettings;
-    }
-
-void CKeyLockHandler::StartTimeoutTimer( TInt aTimeout )
-    {
-    __PRINTS( "AiWsPlugin: CKeyLockHandler::StartTimeoutTimer()" );
-    
-    iKeypadLockTimer->Cancel();
-    if( aTimeout < 0 )
-        {
-        iKeypadLockTimer->Start( 
-            iSettings.KeylockTimeout(), iSettings.KeylockTimeout(),
-            TCallBack( &CKeyLockHandler::TimerElapsed, this ) );
-        }
-    else
-        {
-        iKeypadLockTimer->Start( 
-            aTimeout, aTimeout,
-            TCallBack( &CKeyLockHandler::TimerElapsed, this ) );
-        }
-    }
-    
-void CKeyLockHandler::StopTimeoutTimer()
-    {
-    __PRINTS( "AiWsPlugin: CKeyLockHandler::StopTimeoutTimer()" );
-    iKeypadLockTimer->Cancel();
-    }
-
-void CKeyLockHandler::ActivateKeypadLock()
-	{
-    __PRINTS( "AiWsPlugin: CKeyLockHandler::ActivateKeypadLock()" );
-	StopTimeoutTimer();
-	// Use Shortcut Plug-in API to set the keylock
-	RProperty::Set(
-		KUidSystemCategory, 
-	    KPSUidShortcutCmd,
-	    KAiPSEnableKeyLock );
-    }
-
-void CKeyLockHandler::CancelKeypadLock()
-	{
-    __PRINTS( "AiWsPlugin: CKeyLockHandler::CancelKeypadLock()" );
-	StopTimeoutTimer();
-	RProperty::Set(
-		KUidSystemCategory, 
-	    KPSUidShortcutCmd,
-	    KAiPSSkipKeyLock );
-	} 
-
-void CKeyLockHandler::KeypadLockTimeout()
-	{
-    __PRINTS( "AiWsPlugin: CKeyLockHandler::CancelKeypadLock()" );
-	StopTimeoutTimer();
-	RProperty::Set(
-		KUidSystemCategory, 
-	    KPSUidShortcutCmd,
-	    KAiPSKeyLockTimeout );
-	} 
-
-void CKeyLockHandler::SetNextState( const TKeylockState& aState )
-    {
-    iNextState = &aState;
-    }
-
-void CKeyLockHandler::ActivateNextState()
-    {
-    iCurrentState = iNextState;
-    iNextState = &(*iCurrentState->iDefaultNextState)();
-    }
-
-void CKeyLockHandler::SetLastLockKeyScanCode( TInt aScanCode )
-    {
-    iLastLockKeyScanCode = aScanCode;
-    }
-    
-TInt CKeyLockHandler::LastLockKeyScanCode() const
-    {
-    return iLastLockKeyScanCode;
-    }
-    
-TInt CKeyLockHandler::TimerElapsed(TAny* aSelf)
-    {
-    CKeyLockHandler* self = static_cast<CKeyLockHandler*>(aSelf);
-    if( self )
-        {
-        self->iCurrentState->TimerElapsed( *self );
-        }
-    return KErrNone;
-    }
-    
-void CKeyLockHandler::TimerDone()
-    {
-        
-    }
-
-} // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/src/keylockstates.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,346 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keylock states implementation for Active Idle WS Plug-in
-*
-*/
-
-
-#include "keylockstates.h"
-#include "keylockcontrol.h"
-#include "keypadsettings.h"
-#include "panic.h"
-#include "activeidle2domainpskeys.h"
-
-#include <e32event.h>
-#include <e32property.h>
-
-#include "debug.h"
-
-
-namespace AiWsPlugin {
-
-const TInt KTenMilliSecondsInu = 10 * 1000;
-
-/**
- * Helper macro for declaring internal state classes for CKeyLockHandler.
- */
-#define AI_DECLARE_KEYLOCK_STATE(StateCls) \
-    class StateCls { \
-    public: \
-        static const TKeylockState KState; \
-        static const TKeylockState& DefaultNextState(); \
-        static void FocusChanged( MKeyLockHandlerControl& aControl, TBool aState ); \
-        static TBool OfferRawEvent( MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent ); \
-        static void TimerElapsed( MKeyLockHandlerControl& aControl ); \
-        }
-
-/**
- * Inactive state class for CKeyLockHandler.
- */
-AI_DECLARE_KEYLOCK_STATE(TKeylockStateInactive);
-
-/**
- * Active state class for CKeyLockHandler.
- */
-AI_DECLARE_KEYLOCK_STATE(TKeylockStateWaitForFirstKeyDown);
-
-/**
- * Keylock sequence in progress state class for CKeyLockHandler.
- */
-AI_DECLARE_KEYLOCK_STATE(TKeylockStateWaitForSecondKeyDown);
-
-/**
- * Keylock sequence finalizer state class for CKeyLockHandler.
- */
-AI_DECLARE_KEYLOCK_STATE(TKeylockStateWaitForSecondKeyUp);
-
-/**
- * Helper macro for defining key lock state function tables.
- */
-#define AI_DEFINE_KEYLOCK_STATE_FT(StateCls) \
-    const TKeylockState StateCls::KState = {     \
-        &StateCls::DefaultNextState,             \
-        &StateCls::FocusChanged,                 \
-        &StateCls::OfferRawEvent,                \
-        &StateCls::TimerElapsed }
-
-/// Defines function table for key lock inactive state
-AI_DEFINE_KEYLOCK_STATE_FT(TKeylockStateInactive);
-
-/// Defines function table for key lock active state
-AI_DEFINE_KEYLOCK_STATE_FT(TKeylockStateWaitForFirstKeyDown);
-
-/// Defines function table for key lock in progress state
-AI_DEFINE_KEYLOCK_STATE_FT(TKeylockStateWaitForSecondKeyDown);
-
-/// Defines function table for key lock finalizing state
-AI_DEFINE_KEYLOCK_STATE_FT(TKeylockStateWaitForSecondKeyUp);
-
-// TKeyLockState
-const TKeylockState& TKeylockState::StartupState()
-    {
-    return TKeylockStateInactive::KState;
-    }
-
-// TKeylockStateInactive
-const TKeylockState& TKeylockStateInactive::DefaultNextState()
-    {
-    return TKeylockStateWaitForFirstKeyDown::KState;
-    }
-    
-void TKeylockStateInactive::FocusChanged
-        ( MKeyLockHandlerControl& aControl, TBool aState )
-    {
-    __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateInactive::FocusChanged(%d)"), aState );
-    if ( aState )
-        {
-        // Gained focus, switch to active state
-        aControl.ActivateNextState();    
-        }
-    }
-    
-TBool TKeylockStateInactive::OfferRawEvent
-        ( MKeyLockHandlerControl& /*aControl*/, const TRawEvent& /*aRawEvent*/ )
-    {
-    return EFalse;
-    }
-    
-void TKeylockStateInactive::TimerElapsed
-        ( MKeyLockHandlerControl& aControl )
-    {
-    // Illegal event in this state
-    aControl.KeypadLockTimeout();
-#ifndef NDEBUG
-    //Panic( EPanicInvalidKeylockEvent );
-#endif    
-    }
-
-// TKeylockStateWaitForFirstLockKeyDown
-const TKeylockState& TKeylockStateWaitForFirstKeyDown::DefaultNextState()
-    {
-    return TKeylockStateWaitForSecondKeyDown::KState;
-    }
-
-void TKeylockStateWaitForFirstKeyDown::FocusChanged
-        ( MKeyLockHandlerControl& aControl, TBool aState )
-    {
-    __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForFirstKeyDown::FocusChanged(%d)"), aState );
-    if ( !aState )
-        {
-        if( !aControl.TimeoutTimerActive() )
-            {
-            // Lost focus, switch to inactive state
-            aControl.SetNextState( TKeylockStateInactive::KState );
-            aControl.ActivateNextState();
-            }
-        }
-    }
-    
-TBool TKeylockStateWaitForFirstKeyDown::OfferRawEvent
-        ( MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent )
-    {
-    switch ( aRawEvent.Type() )
-        {
-        case TRawEvent::EKeyDown:
-            {
-            const TInt scanCode = aRawEvent.ScanCode();
-            __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForFirstKeyDown::OfferRawEvent(EKeyDown,ScanCode=%d)" ), scanCode );
-            if ( aControl.IsFirstLockKey( scanCode ) && aControl.HasFocus() )
-                {
-                // First lock key was pressed down
-                aControl.SetLastLockKeyScanCode( scanCode );
-                // (Re)activate the keylock timeout timer
-                aControl.StartTimeoutTimer(KTenMilliSecondsInu);
-                }
-            }
-        }
-
-    // Never consume the event to enable its processing if keylock
-    // is not activated within the timeout
-    return EFalse;
-    }
-    
-void TKeylockStateWaitForFirstKeyDown::TimerElapsed
-        ( MKeyLockHandlerControl& aControl )
-    {
-                TInt value = EPSAiNotDisplayingMenuOrDialog;          
-                TInt err = RProperty::Get(
-                   KPSUidAiInformation, 
-                   KActiveIdlePopupState, 
-                   value );
-                
-                if( value == EPSAiNotDisplayingMenuOrDialog && err == KErrNone )
-                    {
-                    // (Re)activate the keylock timeout timer
-                    aControl.StartTimeoutTimer();
-                    // Switch to wait for second lock key down (see constructor of this state)
-                    aControl.ActivateNextState();
-                    }
-                else
-                    {
-                    if( aControl.HasFocus() )
-                        {
-                        aControl.StopTimeoutTimer();
-                        }
-                    else
-                        {
-                        // Lost focus, switch to inactive state
-                        aControl.SetNextState( TKeylockStateInactive::KState );
-                        aControl.ActivateNextState();
-                        }
-                    }
-    // Illegal event in this state
-#ifndef NDEBUG
-    //Panic( EPanicInvalidKeylockEvent );
-#endif    
-    }
-
-// TKeylockStateWaitForSecondKeyDown
-const TKeylockState&  TKeylockStateWaitForSecondKeyDown::DefaultNextState()
-    {
-    // Assume the keylock sequence is cancelled
-    return TKeylockStateWaitForFirstKeyDown::KState;
-    }
-
-void TKeylockStateWaitForSecondKeyDown::FocusChanged
-        ( MKeyLockHandlerControl& aControl, TBool aState )
-    {
-    __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForSecondKeyDown::FocusChanged(%d)"), aState );
-    if ( aState )
-        {
-        // Gained focus: return to active state if keylock sequence is cancelled
-        aControl.SetNextState( TKeylockStateWaitForFirstKeyDown::KState );
-        }
-    else
-        {
-        // Lost focus: return to inactive state if keylock sequence is cancelled
-        aControl.SetNextState( TKeylockStateInactive::KState );
-        }
-    }
-    
-TBool TKeylockStateWaitForSecondKeyDown::OfferRawEvent
-        ( MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent )
-    {
-    TBool consumedEvent = EFalse;
-    
-    switch ( aRawEvent.Type() )
-        {
-        case TRawEvent::EKeyDown:
-            {
-            const TInt scanCode = aRawEvent.ScanCode();
-            __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForSecondKeyDown::OfferRawEvent(EKeyDown,ScanCode=%d)" ), scanCode );
-            if ( aControl.IsSecondLockKey( scanCode ) )
-                {
-                // Second lock key was pressed down. Cancel keylock timer
-                // and switch to wait for key up event.
-                aControl.StopTimeoutTimer();
-                aControl.SetLastLockKeyScanCode( scanCode );
-                aControl.SetNextState( TKeylockStateWaitForSecondKeyUp::KState );
-                aControl.ActivateNextState();
-                consumedEvent = ETrue;
-                }
-            else
-                {
-                // Some other key than second lock key was pressed while
-                // keylock timer was running. Cancel the keylock sequence and
-                // switch to previous state. (Depending on focus status,
-                // see TKeylockStateWaitForFirstKeyDown::FocusChanged.)
-                aControl.CancelKeypadLock();
-                aControl.ActivateNextState();
-                consumedEvent = EFalse;
-                }
-            break;
-            }
-        }
-        
-    return consumedEvent;
-    }
-    
-void TKeylockStateWaitForSecondKeyDown::TimerElapsed
-        ( MKeyLockHandlerControl& aControl )
-    {
-    __PRINTS( "AiWsPlugin: TKeylockStateWaitForSecondKeyDown::TimerElapsed()" ); 
-    aControl.KeypadLockTimeout();
-    aControl.ActivateNextState();
-    }
-
-// TKeylockStateWaitForSecondKeyUp
-const TKeylockState& TKeylockStateWaitForSecondKeyUp::DefaultNextState()
-    {
-    // Idle must currently have focus so return to active state from this state
-    return TKeylockStateWaitForFirstKeyDown::KState;
-    }
-
-void TKeylockStateWaitForSecondKeyUp::FocusChanged
-        ( MKeyLockHandlerControl& aControl, TBool aState )
-    {
-    __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForSecondKeyUp::FocusChanged(%d)"), aState );
-    if ( aState )
-        {
-        // Gained focus: return to active state if keylock sequence is cancelled
-        aControl.SetNextState(
-            TKeylockStateWaitForFirstKeyDown::KState );
-        }
-    else
-        {
-        // Lost focus: return to inactive state if keylock sequence is cancelled
-        aControl.SetNextState( TKeylockStateInactive::KState );
-        }
-    }
-    
-TBool TKeylockStateWaitForSecondKeyUp::OfferRawEvent
-        ( MKeyLockHandlerControl& aControl, const TRawEvent& aRawEvent )
-    {
-    TBool consumedEvent = EFalse;
-    
-    switch ( aRawEvent.Type() )
-        {
-        case TRawEvent::EKeyUp:
-            {
-            const TInt scanCode = aRawEvent.ScanCode();
-            __PRINT( __DBG_FORMAT("AiWsPlugin: TKeylockStateWaitForSecondKeyUp::OfferRawEvent(EKeyUp,ScanCode=%d)" ), scanCode );
-            if ( scanCode == aControl.LastLockKeyScanCode() )
-                {
-                // Second lock key was released. Activate the keypad lock and
-                // switch back to initial state. (Depending on focus status,
-                // see TKeylockStateWaitForSecondKeyUp::FocusChanged.)
-                aControl.ActivateKeypadLock();
-                aControl.ActivateNextState();
-                }
-            // Consume all key events until the keylock sequence is finalized
-            consumedEvent = ETrue;
-            break;
-            }
-
-        case TRawEvent::EKeyDown:
-            {
-            // Consume all key events until the keylock sequence is finalized
-            consumedEvent = ETrue;
-            break;
-            }
-        }
-        
-    return consumedEvent;
-    }
-    
-void TKeylockStateWaitForSecondKeyUp::TimerElapsed
-        ( MKeyLockHandlerControl& /*aControl*/ )
-    {
-    // Illegal event in this state
-#ifndef NDEBUG
-    //Panic( EPanicInvalidKeylockEvent );
-#endif    
-    }
-
-} // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/src/keypadsettings.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Keypad settings implmentation for Active Idle WS Plug-in.
-*
-*/
-
-
-#include "keypadsettings.h"
-
-#include <e32keys.h>
-#include <e32event.h>
-#include <centralrepository.h>
-
-#include <activeidle2domaincrkeys.h>
-
-#include "debug.h"
-
-namespace AiWsPlugin {
-
-
-/**
- * Maps selected numeric keypad scan codes to character.
- *
- * @param aScanCode scan code for which to find a character mapping.
- * @return character mapping for aScanCode or -1 if no mapping is found.
- */
-TInt16 TKeypadSettings::MapNkpScanCodeToChar( TInt aScanCode )
-    {
-    TInt16 result;
-    switch( aScanCode )
-        {
-        case EStdKeyHash:        result = '#'; break;
-        case EStdKeyMinus:       result = '-'; break;
-        case EStdKeyNkpAsterisk: result = '*'; break;
-        case EStdKeyNkpMinus:    result = '-'; break;
-        case EStdKeyNkpPlus:     result = '+'; break;
-        case EStdKeyNkp1:        result = '1'; break;
-        case EStdKeyNkp2:        result = '2'; break;
-        case EStdKeyNkp3:        result = '3'; break;
-        case EStdKeyNkp4:        result = '4'; break;
-        case EStdKeyNkp5:        result = '5'; break;
-        case EStdKeyNkp6:        result = '6'; break;
-        case EStdKeyNkp7:        result = '7'; break;
-        case EStdKeyNkp8:        result = '8'; break;
-        case EStdKeyNkp9:        result = '9'; break;
-        case EStdKeyNkp0:        result = '0'; break;
-        default:                 result =  -1; break;
-        }
-    return result;
-    }
-
-void TKeypadSettings::ReadFromRepositoryL()
-    {
-    CRepository* repository = CRepository::NewLC( TUid::Uid( KCRUidActiveIdleLV ) );
-    TInt value;
-    
-    // KAIFirstKeyLockKey
-    User::LeaveIfError( repository->Get( KAIFirstKeyLockKey,  value ) );
-    iFirstLockKeyScanCode = TInt16( value );
-    iFirstLockKeyChar = MapNkpScanCodeToChar( value );
-    __PRINT( 
-        __DBG_FORMAT("AiWsPlugin: KAIFirstKeyLockKey = %d, ch=%d"), 
-        TInt(iFirstLockKeyScanCode), TInt(iFirstLockKeyChar) );
-    
-    // KAISecondKeyLockKey
-	User::LeaveIfError( repository->Get( KAISecondKeyLockKey, value ) );
-	iSecondLockKeyScanCode = TInt16( value );
-	iSecondLockKeyChar = MapNkpScanCodeToChar( value );
-    __PRINT( 
-        __DBG_FORMAT("AiWsPlugin: KAISecondKeyLockKey = %d, ch=%d"), 
-        TInt(iSecondLockKeyScanCode), TInt(iSecondLockKeyChar) );
-    
-    // KAISecondKeyLockKey2
-	User::LeaveIfError( repository->Get( KAISecondKeyLockKey2, value ) );
-	iSecondLockKeyScanCode2 = TInt16( value );
-	iSecondLockKeyChar2 = MapNkpScanCodeToChar( value );
-    __PRINT( 
-        __DBG_FORMAT("AiWsPlugin: KAISecondKeyLockKey2 = %d, ch=%d"), 
-        TInt(iSecondLockKeyScanCode2), TInt(iSecondLockKeyChar2) );
-
-    // KAIKeyLockTimeout    
-	User::LeaveIfError( repository->Get( KAIKeyLockTimeout, value ) );
-    __PRINT( __DBG_FORMAT("AiWsPlugin: KAIKeyLockTimeout=%d ms"), value );
-	// Convert timeout from milliseconds to microseconds
-    const TInt KUsInMs = 1000;
-    iKeylockTimeout = KUsInMs * value;
-    
-    // KAISINDKey
-	User::LeaveIfError( repository->Get( KAIVoiceDialLaunchKey, value ) );
-	iSINDKeyScanCode = TInt16( value );
-	iSINDKeyScanChar = MapNkpScanCodeToChar( value );
-    __PRINT( 
-        __DBG_FORMAT("AiWsPlugin: iSINDKey = %d, ch=%d"), 
-        TInt(iSINDKeyScanCode), TInt(iSINDKeyScanChar) );
-
-    // KAISINDKeyTimeout    
-	User::LeaveIfError( repository->Get( KAIVoiceDialKeyTimeout, value ) );
-    __PRINT( __DBG_FORMAT("AiWsPlugin: KAISINDKeyTimeout=%d ms"), value );
-	// Convert timeout from milliseconds to microseconds
-    iKeySINDTimeout = KUsInMs * value;
-	
-	CleanupStack::PopAndDestroy( repository );
-    }
-
-TBool TKeypadSettings::IsFirstLockKey( TInt aScanCode ) const
-    {
-    return ( aScanCode == iFirstLockKeyScanCode || aScanCode == iFirstLockKeyChar );
-    }
-    
-TBool TKeypadSettings::IsSecondLockKey( TInt aScanCode ) const
-    {
-    return (
-        ( aScanCode == iSecondLockKeyScanCode || aScanCode == iSecondLockKeyChar ) ||
-        ( aScanCode == iSecondLockKeyScanCode2 || aScanCode == iSecondLockKeyChar2 ) );
-    }
-
-TTimeIntervalMicroSeconds32 TKeypadSettings::KeylockTimeout() const
-    {
-    return iKeylockTimeout;
-    }
-
-} // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/src/logslaunchhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Logs app launch handler for Active Idle WS Plug-in.
-*
-*/
-
-
-#include "logslaunchhandler.h"
-#include "uistate.h"
-#include <e32property.h>
-#include <e32event.h>
-#include <e32keys.h>
-#include <activeidle2internalpskeys.h>
-#include <activeidle2domainpskeys.h>
-
-namespace AiWsPlugin {
-
-
-CLogsLaunchHandler::CLogsLaunchHandler()
-    {
-    }
-
-void CLogsLaunchHandler::ConstructL()
-    {
-    // Read capability: ReadDeviceData.
-    _LIT_SECURITY_POLICY_C1( KReadDevicePolicy, ECapabilityReadDeviceData );
-    // Write capability: WriteDeviceData.
-    _LIT_SECURITY_POLICY_C1( KWriteDevicePolicy, ECapabilityWriteDeviceData );
-
-    // Initialize Shortcut Plug-in command API
-    RProperty::Define(
-        KUidSystemCategory,
-        KPSUidShortcutCmd,
-        RProperty::EText,
-        KReadDevicePolicy,
-        KWriteDevicePolicy
-        );
-
-    iTimer = CKeyHandlerTimer::NewL( this );
-    }
-
-CLogsLaunchHandler* CLogsLaunchHandler::NewLC()
-    {
-    CLogsLaunchHandler* self = new(ELeave) CLogsLaunchHandler;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-CLogsLaunchHandler::~CLogsLaunchHandler()
-    {
-     if ( iTimer)
-     {
-     iTimer->Cancel();
-     delete iTimer;
-     }
-    }
-
-void CLogsLaunchHandler::SetUiStateQuery( MUiState& aUiState )
-    {
-    iUiState = &aUiState;
-    }
-
-void CLogsLaunchHandler::FocusChanged( TBool /*aState*/ )
-    {
-    // Focus status is queried from iUiState
-    }
-
-TBool CLogsLaunchHandler::OfferRawEvent(const TRawEvent& aRawEvent)
-    {
-    TInt reactOnSendKey = 1;
-    TInt err = RProperty::Get( KPSUidAiInformation, KActiveIdleActOnSendKey, reactOnSendKey );
-    if ( err != KErrNone )
-        {
-        reactOnSendKey = 1;
-        }
-
-    TBool consumed = EFalse;
-
-    if ( reactOnSendKey )
-        {
-        switch( aRawEvent.Type() )
-            {
-            case TRawEvent::EKeyDown:
-                {
-                if ( iUiState->HasFocus() && aRawEvent.ScanCode() == EStdKeyYes )
-                    {
-                    const TTimeIntervalMicroSeconds32 KLongKeyPress(600000);
-                    iTimer->Cancel();
-                    iTimer->After(KLongKeyPress);
-                    consumed = ETrue;
-                    }
-                break;
-                }
-            case TRawEvent::EKeyUp:
-                {
-                if ( iUiState->HasFocus() && aRawEvent.ScanCode() == EStdKeyYes && iTimer->IsActive() )
-                    {
-                    iTimer->Cancel();
-                    RProperty::Set(
-                        KUidSystemCategory,
-                        KPSUidShortcutCmd,
-                        KAiPSLaunchLogs );
-                    consumed = ETrue;
-                    }
-                break;
-                }
-            }
-        }
-
-    return consumed;
-    }
-
-void CLogsLaunchHandler::TimerDone()
-    {
-    RProperty::Set(
-        KUidSystemCategory,
-        KPSUidShortcutCmd,
-        KAiPSLaunchNameDialer );
-    }
-
-} // namespace AiWsPlugin
--- a/idlefw/plugins/wsplugin/src/sindlaunchhandler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  SIND app launch handler for Active Idle WS Plug-in.
-*
-*/
-
-
-#include "sindlaunchhandler.h"
-#include "keyhandlertimer.h"
-#include "uistate.h"
-#include <e32property.h>
-#include <e32event.h>
-#include <e32keys.h>
-#include <activeidle2internalpskeys.h>
-
-//#define AI_ENABLE_RD_LOGGING
-#define AI_RD_LOG_TO_DEBUG_OUTPUT
-
-#include "debug.h"
-
-namespace AiWsPlugin {
-
-
-CSINDLaunchHandler::CSINDLaunchHandler()
-    {
-    }
-    
-void CSINDLaunchHandler::ConstructL()
-    {
-    // Read capability: ReadDeviceData.
-    _LIT_SECURITY_POLICY_C1( KReadDevicePolicy, ECapabilityReadDeviceData );
-    // Write capability: WriteDeviceData.
-    _LIT_SECURITY_POLICY_C1( KWriteDevicePolicy, ECapabilityWriteDeviceData );
-
-    // Initialize Shortcut Plug-in command API
-    RProperty::Define( 
-    	KUidSystemCategory,
-    	KPSUidShortcutCmd,  
-      	RProperty::EText,
-        KReadDevicePolicy,
-        KWriteDevicePolicy 
-        );
-        
-    iTimer = CKeyHandlerTimer::NewL( this );
-    
-    iSINDKeyDown = EFalse;
-    }
-
-CSINDLaunchHandler* CSINDLaunchHandler::NewLC()
-    {
-    CSINDLaunchHandler* self = new(ELeave) CSINDLaunchHandler;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-    
-CSINDLaunchHandler::~CSINDLaunchHandler()
-    {
-    delete iTimer;
-    }
-
-void CSINDLaunchHandler::SetUiStateQuery( MUiState& aUiState )
-    {
-    iUiState = &aUiState;
-    }
-    
-void CSINDLaunchHandler::FocusChanged( TBool /*aState*/ )
-    {
-    // Focus status is queried from iUiState
-    }
-    
-TBool CSINDLaunchHandler::OfferRawEvent(const TRawEvent& aRawEvent)
-    {
-    switch( aRawEvent.Type() )
-        {
-        case TRawEvent::EKeyDown:
-            {
-            if ( iUiState->HasFocus() && aRawEvent.ScanCode() == EStdKeyDevice1 )
-        		{		
-				__PRINTS( "XAI: CSINDLaunchHandler: SIND key down, start timer");
-				const TTimeIntervalMicroSeconds32 KLongKeyPress(600000);
-				iTimer->Cancel();
-				iTimer->After(KLongKeyPress);
-                iSINDLaunched = EFalse;
-                iSINDKeyDown = ETrue;                
-        		}        		
-            else if( iUiState->HasFocus() && iSINDKeyDown )
-                {
-                __PRINTS( "XAI: CSINDLaunchHandler: SIND key down, other key pressed, cancel timer");
-                iTimer->Cancel();
-                SkipVoiceDial();
-                }
-            break;
-            }
-        case TRawEvent::EKeyUp:
-            {
-            if ( iUiState->HasFocus() && aRawEvent.ScanCode() == EStdKeyDevice1 && !iSINDLaunched && iTimer->IsActive() )
-                {                
-                __PRINTS( "XAI: SIND key up, cancel timer");
-                iTimer->Cancel();
-                SkipVoiceDial();
-                }
-            break;
-            }
-        }
-    return EFalse;
-    }
-
-void CSINDLaunchHandler::SkipVoiceDial()
-    {
-    __PRINTS( "XAI: CSINDLaunchHandler::SkipVoiceDial()");
-    // Handle skip scenario only if voice dial ui hasn't been launched
-    if( !iSINDLaunched )
-        {
-        RProperty::Set(
-	    	KUidSystemCategory, 
-		    KPSUidShortcutCmd,
-		    KAiPSSkipNameDialer );  
-        }
-    iSINDKeyDown = EFalse; 
-    }
-    
-void CSINDLaunchHandler::TimerDone()
-    {
-    __PRINTS( "XAI: CSINDLaunchHandler::TimerDone()");
-    __PRINTS( "XAI: Start Voice Dial UI");
-    RProperty::Set(
-		KUidSystemCategory, 
-		KPSUidShortcutCmd,
-		KAiPSLaunchNameDialer );    		
-    iSINDLaunched = ETrue;
-    iSINDKeyDown = EFalse; 
-    }    
-
-} // namespace AiWsPlugin
--- a/idlefw/rom/idlefw.iby	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/rom/idlefw.iby	Fri Feb 19 23:07:29 2010 +0200
@@ -29,7 +29,4 @@
 file=ABI_DIR\BUILD_DIR\aiidleint.dll  SHARED_LIB_DIR\aiidleint.dll
 file=ABI_DIR\BUILD_DIR\aifw.dll       SHARED_LIB_DIR\aifw.dll
 
-// Content publishing plug-ins
-ECOM_PLUGIN( aidevstaplg.dll, aidevstaplg.rsc )
-
 #endif // ACTIVEIDLE3_IBY
--- a/idlefw/rom/idlefw_resources.iby	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/rom/idlefw_resources.iby	Fri Feb 19 23:07:29 2010 +0200
@@ -25,9 +25,6 @@
 
 data=DATAZ_\APP_RESOURCE_DIR\homescreen.rsc		APP_RESOURCE_DIR\homescreen.rsc
 
-// Content publishing plug-in resources
-data=DATAZ_\APP_RESOURCE_DIR\aidevstaplgres.rsc  APP_RESOURCE_DIR\aidevstaplgres.rsc
-
 #endif // RD_CUSTOMIZABLE_AI
 
 #endif // ACTIVEIDLE3_RESOURCES_IBY
--- a/idlefw/src/framework/aibackuprestorestatusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Backup/restore status observer for AI2
-*
-*/
-
-
-#include <connect/sbdefs.h>
-#include <aipspropertyobserver.h>
-#include "aistatemanager.h"
-#include "aibackuprestorestatusobserver.h"
-#include "aifwpanic.h"
-#include "debug.h"
-
-const TUint KAI2BackupMask( conn::KBURPartTypeMask ^ conn::EBURNormal );
-
-CAiBackupRestoreStatusObserver::CAiBackupRestoreStatusObserver()
-    {
-    }
-    
-CAiBackupRestoreStatusObserver::~CAiBackupRestoreStatusObserver()
-    {
-    }
-
-CAiBackupRestoreStatusObserver* CAiBackupRestoreStatusObserver::NewL(
-                                        MAiStateManager* aStateManager )
-    {
-    CAiBackupRestoreStatusObserver* self = new (ELeave) CAiBackupRestoreStatusObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiBackupRestoreStatusObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    BaseConstructL( TCallBack( HandleBackupOperationEvent, this ),
-                    KUidSystemCategory,
-                    conn::KUidBackupRestoreKey,
-                    aStateManager );
-    }
-    
-TAiStateChanges CAiBackupRestoreStatusObserver::Status()
-    {
-    TInt value = 0;
-    TInt err = iObserver->Get( value );
-    if( ( value & KAI2BackupMask ) &&
-        ( err == KErrNone ) ) // any type of backup or restore operation
-        {
-        return ESMAIBackupOn;
-        }
-    else
-        {
-        return ESMAIBackupOff;
-        } 
-    }
-
-TInt CAiBackupRestoreStatusObserver::HandleBackupOperationEvent( TAny* aPtr )
-    {
-    // see \epoc32\include\connect\sbdefs.h for enum descriptions
-    CAiBackupRestoreStatusObserver* self =
-                static_cast<CAiBackupRestoreStatusObserver*>( aPtr );
-    
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-    
-    TInt value = 0;
-    TInt err = self->iObserver->Get( value );
-
-    if( ( value & KAI2BackupMask ) &&
-        ( err == KErrNone ) ) // any type of backup or restore operation
-        {
-        __PRINTS("XAI: Backup = ON");
-        self->iStateManager->ReportStateChange( ESMAIBackupOn );
-        }
-    else // aValue == conn::EBURUnset || aValue & conn::EBURNormal
-        {
-        // back operation finished -> return to previous state
-        __PRINTS("XAI: Backup = OFF");
-        self->iStateManager->ReportStateChange( ESMAIBackupOff );
-        }
-    return KErrNone;
-    }
-
--- a/idlefw/src/framework/aicallstatusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Call status observer for AI2
-*
-*/
-
-
-#include <aipspropertyobserver.h>
-#include <ctsydomainpskeys.h>
-#include "aicallstatusobserver.h"
-#include "aistatemanager.h"
-#include "aifwpanic.h"
-#include "debug.h"
-
-CAiCallStatusObserver::CAiCallStatusObserver()
-    {
-    }
-    
-CAiCallStatusObserver::~CAiCallStatusObserver()
-    {
-    }
-
-CAiCallStatusObserver* CAiCallStatusObserver::NewL( MAiStateManager* aStateManager )
-    {
-    CAiCallStatusObserver* self = new (ELeave) CAiCallStatusObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiCallStatusObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    BaseConstructL( TCallBack( HandleCallStateChange, this ),
-                    KPSUidCtsyCallInformation,
-                    KCTsyCallState,
-                    aStateManager );
-    }
-    
-TAiStateChanges CAiCallStatusObserver::Status()
-    {
-    TInt value = 0;
-    TInt err = iObserver->Get( value );
-    if( ( value > EPSCTsyCallStateNone ) &&
-        ( err == KErrNone ) )
-        {
-        return ESMAIInCall;
-        }
-    else
-        {
-        return ESMAINoCall;
-        } 
-    }
-
-TInt CAiCallStatusObserver::HandleCallStateChange( TAny* aPtr )
-    {
-    CAiCallStatusObserver* self = reinterpret_cast< CAiCallStatusObserver* >( aPtr );
-
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-
-    TInt value = 0;
-    TInt err = self->iObserver->Get( value );
-                 
-    if( ( value > EPSCTsyCallStateNone ) &&
-        ( err == KErrNone ) )
-        {
-        __PRINTS("XAI: Call = ON");
-        self->iStateManager->ReportStateChange( ESMAIInCall );
-        }
-    else
-        {
-        __PRINTS("XAI: Call = OFF");
-        self->iStateManager->ReportStateChange( ESMAINoCall );
-        } 
-    return KErrNone;
-    }
-
--- a/idlefw/src/framework/aicontentpluginmanager.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,391 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Content plugin error manager class
-*
-*/
-
-
-#include <ecom/ecom.h>
-#include <ecom/implementationinformation.h>
-#include <aiutility.h>
-#include <aiplugintool.h>
-
-#include <centralrepository.h>
-#include <activeidle2domaincrkeys.h>
-
-#include "aicontentpluginmanager.h"
-#include "aipluginstatemanager.h"
-#include "aifweventhandler.h"
-#include "aicontentpublisher.h"
-#include "aipropertyextension.h"
-#include <aicontentrequest.h>
-#include "aieventhandlerextension.h"
-#include "aiuicontroller.h"
-#include "aiconsts.h"
-#include "debug.h"
-
-// CONSTANTS
-const TInt KAILenOfParenthesis( 2 );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::NewL()
-// ----------------------------------------------------------------------------
-//
-CAiContentPluginManager* CAiContentPluginManager::NewL()
-    {
-    CAiContentPluginManager* self = new ( ELeave ) CAiContentPluginManager();         
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-  
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::ConstructL()
-// ----------------------------------------------------------------------------
-//
-void CAiContentPluginManager::ConstructL()
-    {
-    iPluginFactory = CAiPluginFactory::NewL( iPlugins, *this );
-
-    iStateManager = CAiPluginStateManager::NewL();
-    
-    iPluginFactory->AddLifecycleObserverL( *iStateManager );
-        
-    iPluginTool = AiUtility::CreatePluginToolL();
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::~CAiContentPluginManager()
-// ----------------------------------------------------------------------------
-//
-CAiContentPluginManager::~CAiContentPluginManager()
-    {               
-    iPlugins.ResetAndDestroy();
-    
-    delete iPluginFactory;
-    delete iStateManager;
-    
-    Release( iPluginTool );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::CAiContentPluginManager()
-// ----------------------------------------------------------------------------
-//
-CAiContentPluginManager::CAiContentPluginManager() 
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::HandlePluginEvent()
-// ----------------------------------------------------------------------------
-//
-void CAiContentPluginManager::HandlePluginEvent( const TDesC& aParam )    
-    {
-    const TInt separatorPos( aParam.Locate( KPluginEventSeparator ) );
-    
-    if( separatorPos == KErrNotFound )
-        {
-        return;
-        }
-
-    // Extract plugin name
-    TPtrC pluginName( aParam.Left( separatorPos ) );
-    
-    // Extract event and parameter string
-    TPtrC eventNameAndParams( aParam.Mid( separatorPos + 1 ) );
-
-    // Find parameter string position
-    const TInt paramsPos( 
-            eventNameAndParams.Locate( KEventParameterSeparator  ) );
-    
-    // Extract event name
-    TPtrC eventName( paramsPos < 0 ? eventNameAndParams : 
-                                     eventNameAndParams.Left( paramsPos ) );
-    
-    // Calculate actual parameter string length by ignoring parenthesis 
-    TInt paramsLength( 
-            eventNameAndParams.Length() - paramsPos - KAILenOfParenthesis );
-    
-    // Extract paramenters
-    TPtrC param( paramsPos < 0 ? KNullDesC()  :             
-            eventNameAndParams.Mid( paramsPos + 1, Max( 0, paramsLength ) ) );
-    
-    // Resolve plugin
-    CAiContentPublisher* target = NULL;
-    
-    __TIME( "FW: Lookup plug-in by name",
-            
-        TRAP_IGNORE( target = iPluginFactory->PluginByNameL( pluginName ) );  
-    
-    );
-
-    __PRINT( __DBG_FORMAT( 
-            "\t[I]\t Event: %S to plug-in by addr 0x%x" ), &aParam, target );
-    
-    if( target )
-        {
-        // Resolve plugin specific event id
-        TInt eventId( KErrNotFound );
-        
-        TRAP_IGNORE( GetIdL( *target, EAiPublisherEvents, eventName, eventId ) );
-        
-        // Forward event to plugin
-        MAiEventHandlerExtension* ext( 
-                iPluginTool->EventHandlerExt( *target ) );
-        
-        if( ext )
-            {
-            if( eventId != KErrNotFound )
-                {
-                ext->HandleEvent( eventId, param );
-                }
-            else
-                {
-                ext->HandleEvent( eventName, param );
-                }
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::HandlePluginEventL()
-// ----------------------------------------------------------------------------
-//
-void CAiContentPluginManager::HandlePluginEventL( 
-    const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam )
-    {
-    // Resolve plugin
-    CAiContentPublisher* target( 
-            iPluginFactory->PluginByInfoL( aPublisherInfo ) );
-              
-    if( target )    
-        {
-        const TInt separatorPos( aParam.Locate( KPluginEventSeparator ) );
-        
-        // Extract event and parameter string
-        TPtrC eventNameAndParams( aParam.Mid( separatorPos + 1 ) );
-
-        // Find parameter string position
-        const TInt paramsPos( 
-                eventNameAndParams.Locate( KEventParameterSeparator  ) );
-        
-        // Extract event name
-        TPtrC eventName( paramsPos < 0 ? 
-            eventNameAndParams : eventNameAndParams.Left( paramsPos ) );
-        
-        // Calculate actual parameter string length by ignoring parenthesis 
-        TInt paramsLength( 
-                eventNameAndParams.Length() - paramsPos - KAILenOfParenthesis );
-        
-        // Extract paramenters
-        TPtrC param( paramsPos < 0 ? KNullDesC() :
-            eventNameAndParams.Mid( paramsPos + 1, Max( 0, paramsLength ) ) );
-        
-        // Resolve plugin specific event id
-        TInt eventId( KErrNotFound );
-        
-        GetIdL( *target, EAiPublisherEvents, eventName, eventId );
-        
-        // Forward event to plugin
-        MAiEventHandlerExtension* ext( 
-                iPluginTool->EventHandlerExt( *target ) );
-        
-        if( ext )
-            {
-            if( eventId != KErrNotFound )
-                {
-                ext->HandleEvent( eventId, param );
-                }
-            else
-                {
-                ext->HandleEvent( eventName, param );
-                }
-            }        
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::HasMenuItemL()
-// ----------------------------------------------------------------------------
-//
-TBool CAiContentPluginManager::HasMenuItemL( 
-    const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem )
-    {          
-    // Resolve plugin
-    CAiContentPublisher* target( 
-            iPluginFactory->PluginByInfoL( aPublisherInfo ) );
-              
-    if( target )    
-        {
-        // Forward query to plugin
-        MAiEventHandlerExtension* ext( 
-                iPluginTool->EventHandlerExt( *target ) );                 
-        
-        if ( ext )
-            {
-            return ext->HasMenuItem( aMenuItem );
-            }
-        }
-
-    return EFalse;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::RefreshContentL()
-// ----------------------------------------------------------------------------
-//
-TBool CAiContentPluginManager::RefreshContent( const TDesC& aContentCid )
-    {
-    TRAPD( error, RefreshContentL( aContentCid ) );
-    
-    return ( error == KErrNone );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiFw::ProcessOnlineState()
-// ----------------------------------------------------------------------------
-//
-void CAiContentPluginManager::ProcessOnlineState( TBool aOnline )    
-    {  
-    _LIT( KOnlineOffline, "online_offline" );
-    
-    for( TInt i = 0; i < iPlugins.Count(); i++ )
-        {               
-        MAiEventHandlerExtension* ext( 
-                iPluginTool->EventHandlerExt( *iPlugins[i] ) );
-        
-        // If plugin understands online/offline run state change
-        if( ext && ext->HasMenuItem( KOnlineOffline ) )
-            {            
-            if( aOnline )
-                {
-                iStateManager->ProcessOnlineState( *iPlugins[i] );
-                }
-            else
-                {
-                iStateManager->ProcessOfflineState( *iPlugins[i] );                     
-                }                                                           
-            }
-        }       
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::StateManager()
-// ----------------------------------------------------------------------------
-//
-CAiPluginStateManager& CAiContentPluginManager::StateManager() const
-    {
-    return *iStateManager;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::PluginFactory()
-// ----------------------------------------------------------------------------
-//
-CAiPluginFactory& CAiContentPluginManager::PluginFactory() const
-    {
-    return *iPluginFactory;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::GetIdL()
-// ----------------------------------------------------------------------------
-//
-void CAiContentPluginManager::GetIdL( CAiContentPublisher& aContentPublisher,         
-    TAiPublisherProperty aProperty, const TDesC& aName, TInt& aId )                 
-    {
-    MAiContentItemIterator* iterator = 
-        iPluginTool->ContentItemIteratorL( aContentPublisher, aProperty );
-
-    if( iterator )
-        {
-        const TAiContentItem& ci( iterator->ItemL( aName ) );
-        aId = ci.id;
-        }
-    else
-        {
-        aId = KErrNotFound;
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiContentPluginManager::RefreshContentL()
-// ----------------------------------------------------------------------------
-//
-TInt CAiContentPluginManager::RefreshContentL( const TDesC& aContentCid )
-    {
-    TInt retval( KErrNotFound );
-    
-    // Look up plug-in and content item and delegate to plug-in's
-    // MAiContentRequest implementation.
-
-    // Find plugin name
-    TInt pos( aContentCid.Locate( KPluginEventSeparator ) );
-
-    if( pos == KErrNotFound )
-        {
-        return retval;        
-        }
-    
-    TPtrC pluginName( aContentCid.Left( pos ) );
-           
-    CAiContentPublisher* plugin( iPluginFactory->PluginByNameL( pluginName ) );
-    
-    if( !plugin )
-        {
-        return retval;
-        }
-    
-    MAiPropertyExtension* ext( iPluginTool->PropertyExt( *plugin ) );
-    
-    if( !ext )
-        {
-        return retval;
-        }
-        
-    // Extract content id
-    TPtrC cid( aContentCid.Mid( ++pos ) );
-    TInt id( 0 );
-    
-    MAiContentRequest* handler( NULL );
-    
-    TRAPD( error, GetIdL( *plugin, EAiPublisherContent, cid, id ) );
-    
-    if ( !error )
-        {
-        handler = static_cast< MAiContentRequest* >( 
-                    ext->GetPropertyL( EAiContentRequest ) );            
-        }
-    else
-        {
-        GetIdL( *plugin, EAiPublisherResources, cid, id );
-        
-        handler = static_cast< MAiContentRequest* >( 
-                    ext->GetPropertyL( EAiResourceRequest ) );           
-        }
-
-    // Forward event to plugin
-    if( handler && handler->RefreshContent( id ) )
-        {               
-        retval = KErrNone;        
-        }
-    
-    return retval;
-    }
-
-// End of File.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/src/framework/aiecomobserver.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CAiEcomObserver class implementation.
+*
+*/
+
+// System includes
+
+// User incldues
+#include "aiecomobserver.h"
+
+
+// Constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::CAiEcomObserver
+//
+//-----------------------------------------------------------------------------
+//
+CAiEcomObserver::CAiEcomObserver()
+    : CActive( EPriorityStandard )
+	{
+    CActiveScheduler::Add( this );
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::NewLC
+//
+//-----------------------------------------------------------------------------
+//
+CAiEcomObserver* CAiEcomObserver::NewLC()
+	{
+	CAiEcomObserver* self = new ( ELeave ) CAiEcomObserver();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	return self;
+	}
+      
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::NewL
+//
+//-----------------------------------------------------------------------------
+//
+CAiEcomObserver* CAiEcomObserver::NewL()
+	{
+	CAiEcomObserver* self = CAiEcomObserver::NewLC();
+	CleanupStack::Pop( self ); 
+	return self;
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::ConstructL
+//
+//-----------------------------------------------------------------------------
+//
+void CAiEcomObserver::ConstructL()
+	{
+	iEComSession = REComSession::OpenL();
+	StartObserving();
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::~CAiEcomObserver
+//
+//-----------------------------------------------------------------------------
+//
+CAiEcomObserver::~CAiEcomObserver()
+	{
+    // Cancel any request, if outstanding
+	Cancel();
+    
+    // Clean up memebers
+    iObservers.Close();
+         
+    iEComSession.Close();   
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::DoCancel
+//
+//-----------------------------------------------------------------------------
+//
+void CAiEcomObserver::DoCancel()
+	{
+	iEComSession.CancelNotifyOnChange( iStatus );
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::StartObserving
+//
+//-----------------------------------------------------------------------------
+//
+void CAiEcomObserver::StartObserving()
+	{       
+	iEComSession.NotifyOnChange( iStatus );     
+    SetActive();
+	}
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::AddObserverL
+//
+//-----------------------------------------------------------------------------
+//
+void CAiEcomObserver::AddObserverL( MAiEcomObserver* aObserver )
+    {
+    if ( aObserver )
+        {
+        iObservers.AppendL( aObserver );
+        }    
+    }
+
+//-----------------------------------------------------------------------------
+// CAiEcomObserver::RunL
+//
+//-----------------------------------------------------------------------------
+//
+void CAiEcomObserver::RunL()
+	{   
+    // Store completion status
+    TInt status( iStatus.Int() );
+
+    // Continue request
+    StartObserving();
+
+    // Notify observers
+    if ( status == KErrNone )
+        {
+        NotifyObservers();
+        }    
+	}
+
+//------------------------------------------------------------------------------
+// CAiEcomObserver::NotifyObservers
+//
+//------------------------------------------------------------------------------
+//
+void CAiEcomObserver::NotifyObservers()
+    {
+    TInt count( iObservers.Count() );
+    
+    for ( TInt i = 0; i < count; i++ )
+        {        
+        iObservers[i]->NotifyEcomRegistryChanged();
+        }
+    }
+
+// End of file
--- a/idlefw/src/framework/aienvironmentchangeobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Environment change observer for AI2
-*
-*/
-
-
-#include <bacntf.h> // for CEnvironmentChangeNotifier
-#include <coemain.h>
-#include <AknDef.h> // for KEikDynamicLayoutVariantSwitch
-#include "aienvironmentchangeobserver.h"
-#include "aistatemanager.h"
-#include "aifwpanic.h"
-#include "debug.h"
-
-CAiEnvironmentChangeObserver::CAiEnvironmentChangeObserver()
-    {
-    }
-    
-CAiEnvironmentChangeObserver::~CAiEnvironmentChangeObserver()
-    {
-    if( iEnvironmentChangeNotifier )
-        {
-        iEnvironmentChangeNotifier->Cancel();
-        delete iEnvironmentChangeNotifier;
-        }
-    }
-
-CAiEnvironmentChangeObserver* CAiEnvironmentChangeObserver::NewL( MAiStateManager* aStateManager )
-    {
-    CAiEnvironmentChangeObserver* self = new (ELeave) CAiEnvironmentChangeObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiEnvironmentChangeObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    iStateManager = aStateManager;
-    iEnvironmentChangeNotifier = CEnvironmentChangeNotifier::NewL(
-                                    EActivePriorityLogonA,
-                                    TCallBack( EnvironmentChangeCallBack, this ) );
-    iEnvironmentChangeNotifier->Start();
-    }
-    
-TAiStateChanges CAiEnvironmentChangeObserver::Status()
-    {
-    // No statuses to report
-    return ESMAIUnknownState;
-    }
-
-TInt CAiEnvironmentChangeObserver::EnvironmentChangeCallBack(TAny* aPtr)
-    {
-    CAiEnvironmentChangeObserver* self =
-            static_cast<CAiEnvironmentChangeObserver*>( aPtr );
-            
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-                    
-    const TInt changes( self->iEnvironmentChangeNotifier->Change() );
-
-    // report environment changes
-    if( changes & EChangesMidnightCrossover )
-        {
-        __PRINTS("XAI: Event: Midnight crossover");
-        self->iStateManager->ReportStateChange( ESMAIMidnightCrossover );
-        }
-    if( changes & EChangesSystemTime )
-        {
-        __PRINTS("XAI: Event: Time changed");
-        self->iStateManager->ReportStateChange( ESMAITimeChanged );
-        }
-    if( changes & EChangesLocale )
-        {
-        __PRINTS("XAI: Event: Locale setting changed");
-        self->iStateManager->ReportStateChange( ESMAILocaleChanged );
-        }
-
-    return EFalse;
-    }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/src/framework/aieventhandler.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,383 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Content plugin event handler
+*
+*/
+
+// System includes
+
+// User includes
+#include <aiutility.h>
+#include <aiplugintool.h>
+#include <aicontentrequest.h>
+
+#include "aipluginfactory.h"
+#include "aiconsts.h"
+#include "debug.h"
+
+#include "aieventhandler.h"
+
+// Constants
+const TInt KAILenOfParenthesis( 2 );
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::NewL()
+//
+// ----------------------------------------------------------------------------
+//
+CAiEventHandler* CAiEventHandler::NewL( 
+    CAiPluginFactory& aFactory )
+    {
+    CAiEventHandler* self = 
+        new ( ELeave ) CAiEventHandler( aFactory );         
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+  
+// ----------------------------------------------------------------------------
+// CAiEventHandler::ConstructL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiEventHandler::ConstructL()
+    {             
+    iPluginTool = AiUtility::CreatePluginToolL();
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::~CAiEventHandler()
+//
+// ----------------------------------------------------------------------------
+//
+CAiEventHandler::~CAiEventHandler()
+    {                     
+    Release( iPluginTool );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::CAiEventHandler()
+//
+// ----------------------------------------------------------------------------
+//
+CAiEventHandler::CAiEventHandler( CAiPluginFactory& aFactory ) 
+    : iFactory( aFactory )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::HandlePluginEvent()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiEventHandler::HandlePluginEvent( const TDesC& aParam )    
+    {
+    const TInt separatorPos( aParam.Locate( KPluginEventSeparator ) );
+    
+    if( separatorPos == KErrNotFound )
+        {
+        return;
+        }
+
+    // Extract plugin name
+    TPtrC pluginName( aParam.Left( separatorPos ) );
+    
+    // Extract event and parameter string
+    TPtrC eventNameAndParams( aParam.Mid( separatorPos + 1 ) );
+
+    // Find parameter string position
+    const TInt paramsPos( 
+            eventNameAndParams.Locate( KEventParameterSeparator  ) );
+    
+    // Extract event name
+    TPtrC eventName( paramsPos < 0 ? eventNameAndParams : 
+                                     eventNameAndParams.Left( paramsPos ) );
+    
+    // Calculate actual parameter string length by ignoring parenthesis 
+    TInt paramsLength( 
+            eventNameAndParams.Length() - paramsPos - KAILenOfParenthesis );
+    
+    // Extract paramenters
+    TPtrC param( paramsPos < 0 ? KNullDesC()  :             
+            eventNameAndParams.Mid( paramsPos + 1, Max( 0, paramsLength ) ) );
+    
+    // Resolve plugin
+    CHsContentPublisher* publisher( NULL );
+    
+    __TIME( "FW: Lookup plug-in by name",            
+        publisher = iFactory.PluginByName( pluginName );      
+    );
+
+    __PRINT( __DBG_FORMAT( 
+            "\t[I]\t Event: %S to plug-in by addr 0x%x" ), &aParam, publisher );
+    
+    if( publisher )
+        {
+        // Resolve plugin specific event id
+        TInt eventId( KErrNotFound );
+        
+        TRAP_IGNORE( GetIdL( *publisher, 
+            CHsContentPublisher::EPublisherEvents, eventName, eventId ) );
+        
+        if( eventId != KErrNotFound )
+            {
+            publisher->HandleEvent( eventId, param );
+            }
+        else
+            {
+            publisher->HandleEvent( eventName, param );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::HandlePluginEventL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiEventHandler::HandlePluginEventL( 
+    const THsPublisherInfo& aPublisherInfo, const TDesC& aParam )
+    {
+    // Resolve plugin
+    CHsContentPublisher* publisher( 
+        iFactory.PluginByInfo( aPublisherInfo ) );
+              
+    if( publisher )    
+        {
+        const TInt separatorPos( aParam.Locate( KPluginEventSeparator ) );
+        
+        // Extract event and parameter string
+        TPtrC eventNameAndParams( aParam.Mid( separatorPos + 1 ) );
+
+        // Find parameter string position
+        const TInt paramsPos( 
+                eventNameAndParams.Locate( KEventParameterSeparator  ) );
+        
+        // Extract event name
+        TPtrC eventName( paramsPos < 0 ? 
+            eventNameAndParams : eventNameAndParams.Left( paramsPos ) );
+        
+        // Calculate actual parameter string length by ignoring parenthesis 
+        TInt paramsLength( 
+                eventNameAndParams.Length() - paramsPos - KAILenOfParenthesis );
+        
+        // Extract paramenters
+        TPtrC param( paramsPos < 0 ? KNullDesC() :
+            eventNameAndParams.Mid( paramsPos + 1, Max( 0, paramsLength ) ) );
+        
+        // Resolve plugin specific event id
+        TInt eventId( KErrNotFound );
+        
+        GetIdL( *publisher, 
+            CHsContentPublisher::EPublisherEvents, eventName, eventId );
+                
+        if( eventId != KErrNotFound )
+            {
+            publisher->HandleEvent( eventId, param );
+            }
+        else
+            {
+            publisher->HandleEvent( eventName, param );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::HasMenuItemL()
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiEventHandler::HasMenuItemL( const THsPublisherInfo& aPublisherInfo,  
+    const TDesC& aMenuItem )
+    {          
+    // Resolve plugin
+    CHsContentPublisher* publisher( 
+        iFactory.PluginByInfo( aPublisherInfo ) );
+              
+    if( publisher )    
+        {
+        return publisher->HasMenuItem( aMenuItem );            
+        }
+
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::RefreshContent()
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiEventHandler::RefreshContent( const TDesC& aContentCid )
+    {
+    TRAPD( error, RefreshContentL( aContentCid ) );
+    
+    return ( error == KErrNone );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::RefreshContent()
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiEventHandler::RefreshContent( const THsPublisherInfo& aPublisherInfo, 
+    const TDesC& aContentCid )
+    {
+    // Resolve plugin
+    CHsContentPublisher* publisher( 
+        iFactory.PluginByInfo( aPublisherInfo ) );
+    
+    if( publisher )    
+        {
+        TInt id( KErrNotFound );
+        
+        TRAP_IGNORE( GetIdL( *publisher, 
+            CHsContentPublisher::EPublisherContent, aContentCid, id ) ); 
+            
+        if ( id != KErrNotFound )
+            {
+            MAiContentRequest* handler = static_cast< MAiContentRequest* >(
+                publisher->GetProperty( CHsContentPublisher::EContentRequest ) );
+            
+            if ( handler )
+                {
+                return handler->RefreshContent( id );
+                }            
+            }
+        }
+    
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::SuspendContent()
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiEventHandler::SuspendContent( const THsPublisherInfo& aPublisherInfo,  
+    const TDesC& aContentCid )
+    {
+    // Resolve plugin
+    CHsContentPublisher* publisher( 
+        iFactory.PluginByInfo( aPublisherInfo ) );
+    
+    if( publisher )    
+        {
+        TInt id( KErrNotFound );
+        
+        TRAP_IGNORE( GetIdL( *publisher, 
+            CHsContentPublisher::EPublisherContent, aContentCid, id ) ); 
+
+        if ( id != KErrNotFound )
+            {
+            MAiContentRequest* handler = static_cast< MAiContentRequest* >(
+                publisher->GetProperty( CHsContentPublisher::EContentRequest ) );
+            
+            if ( handler )
+                {
+                return handler->SuspendContent( id );
+                }            
+            }
+        }
+    
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::GetIdL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiEventHandler::GetIdL( CHsContentPublisher& aContentPublisher,         
+    CHsContentPublisher::TProperty aProperty, const TDesC& aName, TInt& aId )                    
+    {
+    MAiContentItemIterator* iterator = 
+        iPluginTool->ContentItemIterator( aContentPublisher, aProperty );
+
+    if( iterator )
+        {
+        const TAiContentItem& ci( iterator->ItemL( aName ) );
+        aId = ci.id;
+        }
+    else
+        {
+        aId = KErrNotFound;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiEventHandler::RefreshContentL()
+//
+// ----------------------------------------------------------------------------
+//
+TInt CAiEventHandler::RefreshContentL( const TDesC& aContentCid )
+    {
+    TInt retval( KErrNotFound );
+    
+    // Look up plug-in and content item and delegate to plug-in's
+    // MAiContentRequest implementation.
+
+    // Find plugin name
+    TInt pos( aContentCid.Locate( KPluginEventSeparator ) );
+
+    if( pos == KErrNotFound )
+        {
+        return retval;        
+        }
+    
+    TPtrC pluginName( aContentCid.Left( pos ) );
+           
+    CHsContentPublisher* publisher( iFactory.PluginByName( pluginName ) );
+    
+    if( !publisher )
+        {
+        return retval;
+        }
+            
+    // Extract content id
+    TPtrC cid( aContentCid.Mid( ++pos ) );
+    TInt id( 0 );
+    
+    MAiContentRequest* handler( NULL );
+    
+    TRAPD( error, GetIdL( *publisher, 
+        CHsContentPublisher::EPublisherContent, cid, id ) );
+    
+    if ( !error )
+        {
+        handler = static_cast< MAiContentRequest* >( 
+            publisher->GetProperty( CHsContentPublisher::EContentRequest ) );            
+        }
+    else
+        {
+        GetIdL( *publisher, 
+            CHsContentPublisher::EPublisherResources, cid, id );
+        
+        handler = static_cast< MAiContentRequest* >( 
+            publisher->GetProperty( CHsContentPublisher::EResourceRequest ) );           
+        }
+
+    // Forward event to plugin
+    if( handler && handler->RefreshContent( id ) )
+        {               
+        retval = KErrNone;        
+        }
+    
+    return retval;
+    }
+
+// End of File.
--- a/idlefw/src/framework/aifocusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Focus observer for Active idle 2
-*
-*/
-
-
-#include <aipspropertyobserver.h>
-#include <activeidle2domainpskeys.h>
-#include "aistatemanager.h"
-#include "aifocusobserver.h"
-#include "aifwpanic.h"
-#include "debug.h"
-
-CAiFocusObserver::CAiFocusObserver()
-    {
-    }
-    
-CAiFocusObserver::~CAiFocusObserver()
-    {
-    }
-
-CAiFocusObserver* CAiFocusObserver::NewL(
-                                        MAiStateManager* aStateManager )
-    {
-    CAiFocusObserver* self = new (ELeave) CAiFocusObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiFocusObserver::ConstructL( MAiStateManager* aStateManager )
-    {
- //++HV
-    BaseConstructL( TCallBack( StaticHandleFocusChangeEvent, this ),
-                    KPSUidAiInformation, 
-                    KActiveIdleState, 
-                    aStateManager );
-//--HV
-    }
-    
-TAiStateChanges CAiFocusObserver::Status()
-    {
-    TInt value = 0;
-    TInt err = iObserver->Get( value );
-    if( ( value == EPSAiForeground ) &&
-        ( err == KErrNone ) )
-        {
-        return ESMAIIdleForeground;
-        }
-    else
-        {
-        return ESMAIIdleBackground;
-        } 
-    }
-
- //++HV
-                
- TInt CAiFocusObserver::StaticHandleFocusChangeEvent( TAny* aPtr )
-    {
-    CAiFocusObserver* self =
-                static_cast<CAiFocusObserver*>( aPtr );
-    
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-                    
-    return( self->HandleFocusChangeEvent() );                
-    }
-    
-    
-TInt CAiFocusObserver::HandleFocusChangeEvent()
-    {
-    if( iTfxEffectActive )
-		{
-       	return KErrNone;
-        }  
-    
-    TInt value = 0;
-    TInt err = iObserver->Get( value );
-    
-    // Check the PS keys value and call manager with approriate parameter.
-    // Repowrt either "idle foreground" or "idle background"
-    if( ( value == EPSAiForeground ) &&
-        ( err == KErrNone ) )
-        {
-       	// Check if the transition effect is active
-       	
-       	// This has to be called first, otherwise the state might not be valid.
-		CAknTransitionUtils::AddObserver( this, CAknTransitionUtils::EEventWsBufferRedirection );
-
- 		TInt redirState = 0;
- 		CAknTransitionUtils::GetState( CAknTransitionUtils::EEventWsBufferRedirection, &redirState );
- 		if ( (TBool)redirState )
- 			{
- 			// The effect is on-going. Prevent view refresh until the effect is finished.
-			iTfxEffectActive = ETrue; 
- 			} 
- 		else
- 			{			
-    		// No effect on-going. Observer is not needed.    
-			CAknTransitionUtils::RemoveObserver( this, CAknTransitionUtils::EEventWsBufferRedirection );
-        	iStateManager->ReportStateChange( ESMAIIdleForeground );
- 			}
-        }
-    else if( value == EPSAiBackground )
-        {
-    	// Do not receive callbacks in background. Remove observer if it still exists.
-    	CAknTransitionUtils::RemoveObserver( this, CAknTransitionUtils::EEventWsBufferRedirection );
-    	iTfxEffectActive = EFalse;
-    		
-        iStateManager->ReportStateChange( ESMAIIdleBackground );
-        } 
-
-    return KErrNone;
-    }
-
-
-TInt CAiFocusObserver::AknTransitionCallback( TInt aEvent, TInt aState, const TDesC8* /*aParams*/ )
-	{
-	if ( ( aEvent & CAknTransitionUtils::EEventWsBufferRedirection ) && ( !(TBool)aState ) )
-		{
-		// The effect has been finished
-		iTfxEffectActive = EFalse;
-   		// Observer is not needed any more.    
-    	CAknTransitionUtils::RemoveObserver( this, CAknTransitionUtils::EEventWsBufferRedirection );
-    	
-    	// Issue one focus change event
-    	TInt value = 0;
-    	TInt err = iObserver->Get( value );
-    	if( ( value == EPSAiForeground ) &&
-        	( err == KErrNone ) )
-        	{
-    	 	iStateManager->ReportStateChange( ESMAIIdleForeground );
-        	}
-    	else if( value == EPSAiBackground )
-        	{
-        	iStateManager->ReportStateChange( ESMAIIdleBackground );
-        	} 
-		}
-	
-	return 0;	
-	}
-	
-
-//--HV
--- a/idlefw/src/framework/aifw.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/src/framework/aifw.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,49 +15,42 @@
 *
 */
 
+// System includes
+#include <startupdomainpskeys.h>
+#include <centralrepository.h>
+#include <cenrepnotifyhandler.h>
 
-#include <bautils.h>
-#include <coemain.h>
-#include <ConeResLoader.h>
-#include <e32property.h>
-#include <startupdomainpskeys.h>
+// User includes
+#include "aiuicontrollermanager.h"
+#include "aiuicontroller.h"
+#include "aieventhandler.h"
+#include "aistatemanager.h"
+#include "aistateprovider.h"
+#include "aipluginfactory.h"
+#include "aiwspluginmanager.h"
+#include "aiidleappregister.h"
+
+#include <activeidle2domaincrkeys.h>
 #include <activeidle2domainpskeys.h>
 #include <activeidle2internalpskeys.h>
-#include <cenrepnotifyhandler.h>
 #include <aipspropertyobserver.h>
 #include <aisystemuids.hrh>
 
-#include <AknWaitDialog.h>
-#include <AknGlobalNote.h>
-#include <StringLoader.h>
-
-
-#include <e32cmn.h>
-#include <e32def.h>
+#include "aiutility.h"
+#include "aifwpanic.h"
 
 #include "aifw.h"
-#include "aifwpanic.h"
-#include "aiutility.h"
-#include "aiuicontrollermanager.h"
-#include "aiuicontroller.h"
-#include "aicontentmodel.h"
-#include "aicontentpluginmanager.h"
-#include "aiwspluginmanager.h"
-#include "aipluginstatemanager.h"
-#include "aiidleappregister.h"
+
 #include "debug.h"
 
-#include <centralrepository.h>
-#include <activeidle2domaincrkeys.h>
-#include "ainetworklistener.h"
+// Constants
 
 
-#include <data_caging_path_literals.hrh>
-
 // ======== MEMBER FUNCTIONS ========
 
 // ----------------------------------------------------------------------------
-// CAiFw::NewL()
+// CAiFw::CAiFw()
+//
 // ----------------------------------------------------------------------------
 //
 CAiFw::CAiFw()
@@ -66,6 +59,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::ConstructL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::ConstructL()
@@ -78,47 +72,50 @@
                                            
     if( secId == 0x2001CB4F )
         {
-        iAIRepository = CRepository::NewL( TUid::Uid( 0x2001952B ) );
+        iRepository = CRepository::NewL( TUid::Uid( 0x2001952B ) );
         }   
     else
         {
-        iAIRepository = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
+        iRepository = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
         }
 #else
-    iAIRepository = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
+    iRepository = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
 #endif
         
     TInt value( 0 );
     
-    iAIRepository->Get( KAiMainUIController, value );
+    iRepository->Get( KAiMainUIController, value );
     
-    if( !( value == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
+    if ( !( value == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
            value == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE ||
            value == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
            value == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE ) )
         {
         // Someone wrote an invalid configuration! Reset repository.
-        iAIRepository->Reset( KAiMainUIController );
-        iAIRepository->Reset( KAiFirstUIController );
-        iAIRepository->Delete( KAiFirstUIController + 1 );
+        iRepository->Reset( KAiMainUIController );
+        iRepository->Reset( KAiFirstUIController );
+        iRepository->Delete( KAiFirstUIController + 1 );
         }
     
-    iUiControllerManager = CAiUiControllerManager::NewL();
-           
-    iPluginManager = CAiContentPluginManager::NewL();
-                                                                   
-    // Hook framework as UI event observer
-    iUiControllerManager->SetEventHandler( *this );    
+    iUiControllerManager = CAiUiControllerManager::NewL( this );
+    
+    iFactory = CAiPluginFactory::NewL( *iUiControllerManager );
+    
+    iStateManager = CAiStateManager::NewL( *iFactory );
+                 
+    iEventHandler = CAiEventHandler::NewL( *iFactory );                                                                   
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::NewLC()
+//
 // ----------------------------------------------------------------------------
 //
 EXPORT_C CAiFw* CAiFw::NewLC()
     {
     CAiFw* self = new ( ELeave ) CAiFw;
     CleanupStack::PushL( self );
+    
     self->ConstructL();
 
     __TICK( "FW: Core FW constructed" );
@@ -129,54 +126,51 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::~CAiFw()
+//
 // ----------------------------------------------------------------------------
 //
 CAiFw::~CAiFw()
-    {
-    if( iPluginManager )
-        {
-        delete iPluginManager;
-        iPluginManager = NULL;
-        }
-        
-    if( iIdleRestartObserver )
-        {
-        Release( iIdleRestartObserver );
-        iIdleRestartObserver = NULL;
-        }
-    
-    if( iWsPluginManager )
-        {
-        delete iWsPluginManager;
-        iWsPluginManager = NULL;
-        }
-        
-    if( iUiControllerManager )
-        {
-        delete iUiControllerManager;
-        iUiControllerManager = NULL;
-        }
-    
-    if( iNotifyHandler )
+    {        
+    if ( iNotifyHandler )
         {
         iNotifyHandler->StopListening();
-        delete iNotifyHandler;
-        iNotifyHandler = NULL;
         }
+
+    delete iNotifyHandler;
+    iNotifyHandler = NULL;
     
-    if( iNotifyHandlerESS )
+    if ( iNotifyHandlerESS )
         {
         iNotifyHandlerESS->StopListening();
-        delete iNotifyHandlerESS;
-        iNotifyHandlerESS = NULL;
         }
+
+    delete iNotifyHandlerESS;
+    iNotifyHandlerESS = NULL;
+   
+    Release( iIdleRestartObserver );
+    iIdleRestartObserver = NULL;
+        
+    delete iWsPluginManager;
+    iWsPluginManager = NULL;
+    
+    delete iEventHandler;
+    iEventHandler = NULL;
     
-    if( iAIRepository )
-        {
-        delete iAIRepository;
-        iAIRepository = NULL;
-        }
+    delete iStateProvider;
+    iStateProvider = NULL;
+    
+    delete iStateManager;
+    iStateManager = NULL;
     
+    delete iFactory;
+    iFactory = NULL;
+    
+    delete iUiControllerManager;
+    iUiControllerManager = NULL;
+                                
+    delete iRepository;
+    iRepository = NULL;
+           
     iLibrary1.Close();
     iLibrary2.Close();
     iLibrary3.Close();
@@ -184,6 +178,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::RunL()
+//
 // ----------------------------------------------------------------------------
 //
 EXPORT_C void CAiFw::RunL()
@@ -200,6 +195,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::AppEnvReadyL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::AppEnvReadyL()
@@ -207,71 +203,56 @@
     // Initialize members which need to be connected to the app environment's
     // active scheduler or depend on the app environment being initialized.
 
-    // Create state managers system state observers
-    CAiPluginStateManager& stateManager( iPluginManager->StateManager() );
-    
-    stateManager.CreateSystemStateObserversL();
-
-    // Connect state managers UI observer to UI controllers
-    MAiUiFrameworkObserver* fwObserver( stateManager.UiFwObserver() );
-    
-    if ( fwObserver )
-        {
-        iUiControllerManager->AddObserverL( *fwObserver );
-        }
+    CCoeEnv& env( iUiControllerManager->CoeEnv() );
 
     // Create WS pluign manager
-    iWsPluginManager = CAiWsPluginManager::NewL
-        ( iUiControllerManager->CoeEnv() );
-
-    // CenRep notifier to listen key changes in cenrep. Application is restarted
-    // if key value is changed.
-    iNotifyHandler = CCenRepNotifyHandler::NewL( *this,
-                                                 *iAIRepository,
-                                                 CCenRepNotifyHandler::EIntKey,
-                                                 KAiMainUIController );
+    iWsPluginManager = CAiWsPluginManager::NewL( env );
+    
+    iStateProvider = CAiStateProvider::NewL( *iStateManager, env );
+    
+    iUiControllerManager->SetStateHandler( *iStateProvider );
+        
+    // CenRep notifier to listen key changes in cenrep. 
+    // Application is restarted if key value is changed.
+    iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository,  
+        CCenRepNotifyHandler::EIntKey, KAiMainUIController );
+                                                                                                                                                  
     iNotifyHandler->StartListeningL();
 
-    // Cenrep notifier to listen ESS changes in cenrep
-    //
-    iNotifyHandlerESS = CCenRepNotifyHandler::NewL( *this,
-                                                    *iAIRepository,
-                                                     CCenRepNotifyHandler::EIntKey,
-                                                     KAIExternalStatusScreen );
+    // Cenrep notifier to listen ESS changes in cenrep    
+    iNotifyHandlerESS = CCenRepNotifyHandler::NewL( *this, *iRepository,                                                    
+         CCenRepNotifyHandler::EIntKey, KAIExternalStatusScreen );
+                                                     
     iNotifyHandlerESS->StartListeningL();
 
     iIdleRestartObserver = AiUtility::CreatePSPropertyObserverL(
-                        TCallBack( HandleRestartEvent, this ),
-                        KPSUidAiInformation,
-                        KActiveIdleRestartAI2 );
-    
-    stateManager.ReportStateChange( ESMAISystemBoot );
+        TCallBack( HandleRestartEvent, this ), 
+        KPSUidAiInformation, KActiveIdleRestartAI2 );                                                      
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::HandleUiReadyEventL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::HandleUiReadyEventL( CAiUiController& aUiController )
     {         
-    if( iUiControllerManager->IsMainUiController( aUiController ) )
-        {
-        iUiControllerManager->LoadUIDefinition();
-                
+    if ( iUiControllerManager->IsMainUiController( aUiController ) )
+        {                      
         TInt value( EIdlePhase1Ok );
         
         RProperty::Get( KPSUidStartup, 
                         KPSIdlePhase1Ok, 
                         value );
                                                       
-        if( value == EIdlePhase1NOK )
+        if ( value == EIdlePhase1NOK )
             {
             RProperty::Set( KPSUidStartup, 
                             KPSIdlePhase1Ok, 
                             EIdlePhase1Ok );                                                          
             }    
         
-        if( !iLibrariesLoaded )
+        if ( !iLibrariesLoaded )
             {
             _LIT( KAIVoiceUIDialer, "VoiceUiNameDialer.dll" );
             _LIT( KAIVoiceUIRecog, "VoiceUiRecognition.dll" );
@@ -284,11 +265,13 @@
             iLibrariesLoaded = ETrue;
             }
         
+        iUiControllerManager->LoadUIDefinition();
         }
     }
 
 // ---------------------------------------------------------------------------
 // CAiFw::HandleActivateUI()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::HandleActivateUI()
@@ -298,138 +281,109 @@
 
 // ---------------------------------------------------------------------------
 // CAiFw::HandleUiShutdown()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::HandleUiShutdown( CAiUiController& aUiController )
     {
-    if( iUiControllerManager->IsMainUiController( aUiController ) )
+    if ( iUiControllerManager->IsMainUiController( aUiController ) )
         {
-        if( iNotifyHandler )
+        if ( iNotifyHandler )
             {
             iNotifyHandler->StopListening();
-            delete iNotifyHandler;
-            iNotifyHandler = NULL;
             }
 
-        if( iNotifyHandlerESS )
+        delete iNotifyHandler;
+        iNotifyHandler = NULL;
+
+        if ( iNotifyHandlerESS )
             {
             iNotifyHandlerESS->StopListening();
-            delete iNotifyHandlerESS;
-            iNotifyHandlerESS = NULL;
             }
+
+        delete iNotifyHandlerESS;
+        iNotifyHandlerESS = NULL;
         
-        iPluginManager->PluginFactory().DestroyPlugins();
-
-        iPluginManager->StateManager().DestroySystemStateObservers();
-                
         iUiControllerManager->DestroySecondaryUiControllers();
 
-        iUiControllerManager->RemoveObserver( 
-                *iPluginManager->StateManager().UiFwObserver() );
+        delete iWsPluginManager;
+        iWsPluginManager = NULL;
         
-        if( iWsPluginManager )
-            {
-            delete iWsPluginManager;
-            iWsPluginManager = NULL;
-            }
+        Release( iIdleRestartObserver );
+        iIdleRestartObserver = NULL;
         
-        if( iIdleRestartObserver )
-            {
-            Release( iIdleRestartObserver );
-            iIdleRestartObserver = NULL;
-            } 
+        delete iStateProvider;
+        iStateProvider = NULL;
         }
     }
 
 // ----------------------------------------------------------------------------
-// CAiFw::HandleLoadPluginL()
-// ----------------------------------------------------------------------------
-//
-void CAiFw::HandleLoadPluginL( const TAiPublisherInfo& aPublisherInfo )
-    {           
-    iPluginManager->PluginFactory().CreatePluginL( 
-       aPublisherInfo, iUiControllerManager->UiControllers() );                                                                                                                                                 
-    }
-
-// ----------------------------------------------------------------------------
-// CAiFw::HandleDestroyPluginL()
-// ----------------------------------------------------------------------------
-//
-void CAiFw::HandleDestroyPluginL( const TAiPublisherInfo& aPublisherInfo )
-    {    
-    iPluginManager->PluginFactory().DestroyPluginL(
-        aPublisherInfo, iUiControllerManager->UiControllers() );                                                                            
-    }
-
-// ----------------------------------------------------------------------------
 // CAiFw::HandlePluginEvent()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::HandlePluginEvent( const TDesC& aParam )
     {
-    iPluginManager->HandlePluginEvent( aParam );
+    iEventHandler->HandlePluginEvent( aParam );
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::HandlePluginEventL()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiFw::HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, 
+void CAiFw::HandlePluginEventL( const THsPublisherInfo& aPublisherInfo, 
     const TDesC& aParam )
     {
-    iPluginManager->HandlePluginEventL( aPublisherInfo, aParam );
+    iEventHandler->HandlePluginEventL( aPublisherInfo, aParam );
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::HasMenuItemL()
+//
 // ----------------------------------------------------------------------------
 //
-TBool CAiFw::HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, 
+TBool CAiFw::HasMenuItemL( const THsPublisherInfo& aPublisherInfo, 
     const TDesC& aMenuItem )
     {            
-    return iPluginManager->HasMenuItemL( aPublisherInfo, aMenuItem ); 
+    return iEventHandler->HasMenuItemL( aPublisherInfo, aMenuItem ); 
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::RefreshContent()
+//
 // ----------------------------------------------------------------------------
 //
 TBool CAiFw::RefreshContent( const TDesC& aContentCid )
     {
-    return iPluginManager->RefreshContent( aContentCid );
+    return iEventHandler->RefreshContent( aContentCid );
     }
 
 // ----------------------------------------------------------------------------
-// CAiFw::ProcessStateChange()
+// CAiFw::RefreshContent()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiFw::ProcessStateChange( TAifwStates aState )     
+TBool CAiFw::RefreshContent( const THsPublisherInfo& aPublisherInfo, 
+    const TDesC& aContentCid ) 
     {
-    switch ( aState )
-    	{
-    	case EAifwOnline :
-    		{
-    		iPluginManager->ProcessOnlineState( ETrue );
-    		}
-    		break;
-    	case EAifwOffline :
-			{
-			iPluginManager->ProcessOnlineState( EFalse );
-			}
-			break;
-    	case EAifwPageSwitch:
-    		{
-    		iPluginManager->StateManager().ReportStateChange( ESMAIPageSwitch );
-    		}
-    		break;
-    	default : 
-    		break;
-    	}
-    
+    return iEventHandler->RefreshContent( aPublisherInfo, aContentCid );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiFw::SuspendContent()
+//
+// ----------------------------------------------------------------------------
+//
+TBool CAiFw::SuspendContent( const THsPublisherInfo& aPublisherInfo,     
+    const TDesC& aContentCid )
+    {
+    return iEventHandler->SuspendContent( aPublisherInfo, aContentCid );
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::QueryIsMenuOpen()
+//
 // ----------------------------------------------------------------------------
 //
 TBool CAiFw::QueryIsMenuOpen()
@@ -439,14 +393,15 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::HandleNotifyInt()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::HandleNotifyInt( TUint32 aId, TInt aNewValue )
     {
-    switch( aId )
+    switch ( aId )
         {
         case KAiMainUIController:
-            if( aNewValue == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
+            if ( aNewValue == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
                 aNewValue == AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE ||
                 aNewValue == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML ||
                 aNewValue == AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE )
@@ -455,17 +410,14 @@
                 }
             else
                 {
-                // Someone wrote an invalid configuration! Reset repository.
-                if( iAIRepository )
-                    {
-                    iAIRepository->Reset( KAiMainUIController );
-                    iAIRepository->Reset( KAiFirstUIController );
-                    iAIRepository->Delete( KAiFirstUIController + 1 );
-                    }
+                // Someone wrote an invalid configuration! Reset repository.               
+                iRepository->Reset( KAiMainUIController );
+                iRepository->Reset( KAiFirstUIController );
+                iRepository->Delete( KAiFirstUIController + 1 );
                 }
             break;
         case KAIExternalStatusScreen:
-            if( ( aNewValue & 0x7FFFFFFF ) != 0 )
+            if ( ( aNewValue & 0x7FFFFFFF ) != 0 )
                 {
                 TRAP_IGNORE( SwapUiControllerL( EFalse ) );
                 }
@@ -481,41 +433,41 @@
 
 // ----------------------------------------------------------------------------
 // CAiFw::SwapUiControllerL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiFw::SwapUiControllerL( TBool aToExtHS )
-    {
-    TUid uid = { KCRUidActiveIdleLV };
-    CRepository* cenRep = CRepository::NewL( uid );
-
+    {      
     if( !aToExtHS ) // Switch to XML UI
         {
-        cenRep->Create( KAiFirstUIController, 
+        iRepository->Create( KAiFirstUIController, 
                 AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE );
         
-        cenRep->Set( KAiFirstUIController, 
+        iRepository->Set( KAiFirstUIController, 
                 AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE );
-        cenRep->Delete( KAiFirstUIController + 1 );
         
-        cenRep->Set( KAiMainUIController, 
+        iRepository->Delete( KAiFirstUIController + 1 );
+        
+        iRepository->Set( KAiMainUIController, 
                 AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML );
         }
     else // Switch to ExtHS
         {
-        cenRep->Delete( KAiFirstUIController );
-        cenRep->Delete( KAiFirstUIController + 1 );
-        cenRep->Set( KAiMainUIController, 
-                AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE );
+        iRepository->Delete( KAiFirstUIController );
+        
+        iRepository->Delete( KAiFirstUIController + 1 );
+        
+        iRepository->Set( KAiMainUIController, 
+            AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE );
         }
-    
-    delete cenRep;
-
+       
     // Restart
     iUiControllerManager->ExitMainController();
     }
 
 // ----------------------------------------------------------------------------
 // CAiFw::HandleRestartEvent()
+//
 // ----------------------------------------------------------------------------
 //
 TInt CAiFw::HandleRestartEvent( TAny* aSelf )
@@ -524,13 +476,11 @@
     
     TInt value( 0 );
     
-    if( self->iIdleRestartObserver )
+    if ( self->iIdleRestartObserver )
         {
         TInt err( self->iIdleRestartObserver->Get( value ) );
 
-        // Check the PS keys value and call manager with approriate parameter.
-        // Report either "idle foreground" or "idle background"
-        if( value == KActiveIdleRestartCode )
+        if ( err == KErrNone && value == KActiveIdleRestartCode )
             {
             self->iUiControllerManager->ExitMainController();
             }
@@ -539,4 +489,14 @@
     return KErrNone;
     }
 
+// ----------------------------------------------------------------------------
+// CAiFw::Repository()
+//
+// ----------------------------------------------------------------------------
+//
+CRepository& CAiFw::Repository() const
+    {
+    return *iRepository;
+    }
+
 // End of file
--- a/idlefw/src/framework/aifwstartupscheduler.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AvtiveIdle2 startup scheduler
-*
-*/
-
-
-#include "aifwstartupscheduler.h"
-
-CAiFwStartupScheduler::CAiFwStartupScheduler()
-    : iResult(KErrNone)
-    {
-    }
-
-CAiFwStartupScheduler* CAiFwStartupScheduler::NewLC()
-    {
-    CAiFwStartupScheduler* self = new(ELeave) CAiFwStartupScheduler;
-    CleanupStack::PushL(self);
-    return self;
-    }
-
-CAiFwStartupScheduler::~CAiFwStartupScheduler()
-    {
-    }
-
-TInt CAiFwStartupScheduler::Result()
-    {
-    return iResult;
-    }
-
-// All RunL leaves from active objects which execute during Active Idle
-// Framework startup end up here
-void CAiFwStartupScheduler::Error(TInt aError) const
-    {
-    // Store any error code
-    if (aError != KErrNone && iResult == KErrNone)
-        {
-        iResult = aError;
-        }
-        
-    // Stop the scheduler as all errors during Active Idle Framework startup
-    // are fatal
-    Stop();
-    }
-
--- a/idlefw/src/framework/aikeylockobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Focus observer for Active idle 2
-*
-*/
-
-
-#include <aipspropertyobserver.h>
-#include <activeidle2domainpskeys.h>
-#include <avkondomainpskeys.h>      // KPSUidAvkonDomain, KAknKeyguardStatus, TAknKeyguardStatus
-#include "aistatemanager.h"
-#include "aikeylockobserver.h"
-#include "aifwpanic.h"
-#include "debug.h"
-
-CAiKeylockObserver::CAiKeylockObserver()
-    {
-    }
-    
-CAiKeylockObserver::~CAiKeylockObserver()
-    {
-    }
-
-CAiKeylockObserver* CAiKeylockObserver::NewL(
-                                        MAiStateManager* aStateManager )
-    {
-    CAiKeylockObserver* self = new (ELeave) CAiKeylockObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiKeylockObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    BaseConstructL( TCallBack( HandleKeylockStatusEvent, this ),
-                    KPSUidAvkonDomain, 
-                    KAknKeyguardStatus, 
-                    aStateManager );
-    }
-    
-TAiStateChanges CAiKeylockObserver::Status()
-    {
-	TInt value;
-	TInt err = iObserver->Get( value );
-	if( err != KErrNone ) 
-	    {
-	    return ESMAIKeylockDisabled;
-	    }
-	    
-	switch( value ) 
-	    {
-	    case EKeyguardLocked:
-	    case EKeyguardAutolockEmulation: // fallthorugh
-	        {
-	        return ESMAIKeylockEnabled;
-	        }
-	    case EKeyguardNotActive:
-	    default: // fallthorugh
-	        {
-	        return ESMAIKeylockDisabled;
-	        }
-	    }
-    }
-
-TInt CAiKeylockObserver::HandleKeylockStatusEvent( TAny* aPtr )
-    {
-    CAiKeylockObserver* self =
-                static_cast<CAiKeylockObserver*>( aPtr );
-    
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-    
-    TAiStateChanges stateChange = self->Status();
-    self->iStateManager->ReportStateChange( stateChange );
-    return KErrNone;
-    }
-
--- a/idlefw/src/framework/ailightstatusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Light status observer for AI2
-*
-*/
-
-
-#include <aipspropertyobserver.h>
-#include "ailightstatusobserver.h"
-#include "aistatemanager.h"
-#include "debug.h"
-
-CAiLightStatusObserver::CAiLightStatusObserver()
-    {
-    }
-    
-CAiLightStatusObserver::~CAiLightStatusObserver()
-    {
-    delete iLight;
-    }
-
-CAiLightStatusObserver* CAiLightStatusObserver::NewL( MAiStateManager* aStateManager )
-    {
-    CAiLightStatusObserver* self = new (ELeave) CAiLightStatusObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiLightStatusObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    iStateManager = aStateManager;
-    iLight = CHWRMLight::NewL( this );
-    }
-    
-TAiStateChanges CAiLightStatusObserver::Status()
-    {
-    // In future handle other screen lights here also..
-    CHWRMLight::TLightStatus status = iLight->LightStatus( CHWRMLight::EPrimaryDisplay );
-    if( status == CHWRMLight::ELightOn )
-        {
-        return ESMAIBacklightOn;
-        }
-    else if( status == CHWRMLight::ELightOff )
-        {
-        return ESMAIBacklightOff;
-        }
-    return ESMAIBacklightOn;
-    }
-
-void CAiLightStatusObserver::LightStatusChanged( TInt aTarget, CHWRMLight::TLightStatus aStatus )
-    {
-    if( aTarget == CHWRMLight::EPrimaryDisplay ||
-        aTarget == CHWRMLight::EPrimaryDisplayAndKeyboard )
-        {
-        if( aStatus == CHWRMLight::ELightOn )
-            {
-            __PRINTS("XAI: Light = ON");
-            iStateManager->ReportStateChange( ESMAIBacklightOn );
-            }
-        else if( aStatus == CHWRMLight::ELightOff )
-            {
-            __PRINTS("XAI: Light = OFF");
-            iStateManager->ReportStateChange( ESMAIBacklightOff );
-            }
-        }
-    }
-
--- a/idlefw/src/framework/ainetworklistener.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Network info listener
-*
-*/
-
-#include <NetworkHandlingProxy.h>
-#include <CNWSession.h>
-#include "ainetworklistener.h"
-#include "ainetworkobserver.h"
-
-/// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor. Can leave.
-// -----------------------------------------------------------------------------
-// 
-CAiNetworkListener* CAiNetworkListener::NewL(MAiNetworkObserver& aNetworkObserver)
-    {
-    CAiNetworkListener* self = new (ELeave) CAiNetworkListener(aNetworkObserver);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-CAiNetworkListener::CAiNetworkListener(MAiNetworkObserver& aNetworkObserver)
-:iObserver(aNetworkObserver)
-    {
-    }
-
-void CAiNetworkListener::ConstructL()
-    {
-    //Create network handling engine session.
-    iSession = CreateL( *this, iInfo );
-    iCurrentNwState = MAiNetworkObserver::ENone;
-    }
-
-CAiNetworkListener::~CAiNetworkListener()
-    {
-    delete iSession;
-    }
-
-void CAiNetworkListener::HandleNetworkMessage( const TNWMessages aMessage )
-    {
-    TBool hasNetInfoChanged = HasNetworkInfoChanged( aMessage );
-    if ( !hasNetInfoChanged )
-        {
-        return;
-        }
-        
-    // Interpret new nw state
-    MAiNetworkObserver::TNetworkState newState;
-    newState= InterpretNWMessage(aMessage,iInfo);
-
-    // Inform observer of only new nw states (TNetworkState)
-    if (newState != iCurrentNwState)
-        {
-        iObserver.HandleNetworkStateChange(newState);
-        }    
-    
-    // Store new nw state
-    iCurrentNwState= newState;
-  
-    }
-
-MAiNetworkObserver::TNetworkState CAiNetworkListener::InterpretNWMessage(const TNWMessages aMessage, const TNWInfo aNWInfo)
-    {
-    MAiNetworkObserver::TNetworkState nwstate = MAiNetworkObserver::ENone;
-    
-    switch (aMessage)
-        {
-        case MNWMessageObserver::ENWMessageNetworkRegistrationStatusChange:
-        case MNWMessageObserver::ENWMessageCurrentHomeZoneMessage:
-            {
-            switch (aNWInfo.iRegistrationStatus)
-                {
-                case ENWRegisteredRoaming:
-                    nwstate = MAiNetworkObserver::ERoaming;
-                    break;
-                case ENWRegisteredOnHomeNetwork:
-                    nwstate = MAiNetworkObserver::EHomeNetwork;
-                    break;  
-                    
-                default:
-                    // unknown state
-                    break;
-                }
-            }
-       }
-    
-    return nwstate;
-    }
-
-void CAiNetworkListener::HandleNetworkError( const TNWOperation aOperation, TInt /*aErrorCode*/ )
-    {
-     switch ( aOperation )
-        {
-        case MNWMessageObserver::ENWGetNetworkProviderName:
-            iReceivedMessageFlags |= ENetworkProviderNameReceived;
-            iReceivedMessageFlags &= ~ENetworkProviderNameOk;
-            iInfo.iNPName.Zero();
-            break;
-        case MNWMessageObserver::ENWGetProgrammableOperatorName:
-            iReceivedMessageFlags |= EProgrammableOperatorInfoReceived;
-            iReceivedMessageFlags &= ~EProgrammableOperatorInfoReceivedOk;
-            iInfo.iOperatorNameInfo.iName.Zero();
-            break;
-        case MNWMessageObserver::ENWGetServiceProviderName:
-            iReceivedMessageFlags |= EServiceProviderNameReceived;
-            iReceivedMessageFlags &= ~EServiceProviderNameOk;
-            iInfo.iServiceProviderNameDisplayReq = RMobilePhone::KDisplaySPNNotRequired;
-            iInfo.iSPName.Zero();
-            iInfo.iPLMNField.Zero();
-            break;
-        default:
-            break;
-        }
-    
-    HandleNetworkMessage( TNWMessages( KErrGeneral ) );
-    }
-
-TBool CAiNetworkListener::HasNetworkInfoChanged( const TNWMessages aMessage )
-    {
-    TBool result = ETrue;
-    
-    // pass through
-    if ( aMessage == MNWMessageObserver::ENWMessageCurrentHomeZoneMessage   ||
-         aMessage == MNWMessageObserver::ENWMessageNetworkConnectionFailure ||
-         aMessage == MNWMessageObserver::ENWMessageCurrentCellInfoMessage   ||
-         aMessage == MNWMessageObserver::ENWMessageNetworkRegistrationStatusChange )
-        {
-        return result;
-        }
-    
-    result = ( iReceivedMessageFlags != iOldReceivedMessageFlags );
-    
-    if ( !result )
-        {
-         result = 
-            iInfo.iRegistrationStatus != iOldInfo.iRegistrationStatus;
-        }
-
-    iOldReceivedMessageFlags = iReceivedMessageFlags;
-    iOldInfo = iInfo;
-
-    return result;
-    }
-
-MAiNetworkObserver::TNetworkState CAiNetworkListener::NetworkState()
-    {
-    return iCurrentNwState;
-    }
-    
--- a/idlefw/src/framework/ainwsdlgcontroller.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Network selection dialog controller
-*
-*/
-
-
-#include <networkhandlingproxy.h>
-#include <cnwsession.h>
-#include <centralrepository.h>
-#include <e32property.h>
-
-#include <ProfileEngineSDKCRKeys.h>
-#include <BTSapDomainPSKeys.h>
-
-#include "ainwsdlgcontroller.h"
-#include "debug.h"
-
-
-// 1-minute timeout before showing soft notification
-const TInt KPhoneNetworkLostTimeout = 60*1000000;
-
-// Offline profile, from ProfileEngineSDKCRKeys.h
-const TInt KOfflineProfileId = 5;
-
-
-CAiNwSDlgController* CAiNwSDlgController::NewL()
-    {
-    CAiNwSDlgController* self = new(ELeave) CAiNwSDlgController();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();    // self
-    return self;
-    }
-
-CAiNwSDlgController::CAiNwSDlgController()
-    {
-    iRegistered = ETrue;
-    }
-
-void CAiNwSDlgController::ConstructL()
-    {
-    __PRINTS( "XAI: CAiNwSDlgController is initializing" );
-
-    iSoftNotifier = CAknSoftNotifier::NewL();
-    iSession = CreateL( *this, iInfo );
-    iProfileApi = CRepository::NewL( KCRUidProfileEngine );
-    iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-
-    HandleStateChange();
-
-    __PRINTS( "XAI: CAiNwSDlgController initialized succesfully" );
-    }
-
-CAiNwSDlgController::~CAiNwSDlgController()
-    {
-    delete iPeriodic;
-    delete iProfileApi;
-    delete iSession;
-    delete iSoftNotifier;
-    }
-
-void CAiNwSDlgController::HandleStateChange()
-    {
-    switch( iInfo.iRegistrationStatus )
-        {
-        case ENWNotRegisteredNoService:
-            // Fall-through
-        case ENWNotRegisteredEmergencyOnly:
-            // Fall-through
-        case ENWNotRegisteredSearching:
-            // Fall-through
-        case ENWRegistrationDenied:
-            HandleNetworkLost();
-            break;
-
-        case ENWRegisteredBusy:
-            // Fall-through
-        case ENWRegisteredOnHomeNetwork:
-            // Fall-through
-        case ENWRegisteredRoaming:
-            HandleNetworkFound();
-            break;
-
-        case ENWRegistrationUnknown:
-            // Take no action
-        default:
-            break;
-        }
-    }
-
-void CAiNwSDlgController::HandleNetworkFound()
-    {
-    __PRINTS( "XAI: Network found" );
-    iRegistered = ETrue;
-    iPeriodic->Cancel();
-    CancelDialog();
-    }
-
-void CAiNwSDlgController::HandleNetworkLost()
-    {
-    if( iInfo.iSelectionSetting == ENWNetworkSelectionManual )
-        {
-        // See if we were registered before
-        if( iRegistered )
-            {
-            iRegistered = EFalse;
-
-            if(!IsOffLineMode() && !IsBluetoothSAPConnected())
-                {
-                __PRINTS( "XAI: Network lost, show dialog in 1 minute" );
-                iPeriodic->Start( KPhoneNetworkLostTimeout,
-                    KPhoneNetworkLostTimeout, TCallBack( DelayCallBack, this ));
-                }
-            }
-        }
-    }
-
-void CAiNwSDlgController::LaunchDialog()
-    {
-    iPeriodic->Cancel();
-    TRAP_IGNORE( iSoftNotifier->AddNotificationL( ESelectNetworkNotification, 1 ); );
-    }
-
-void CAiNwSDlgController::CancelDialog()
-    {
-    TRAP_IGNORE( iSoftNotifier->CancelSoftNotificationL( ESelectNetworkNotification ); );
-    }
-
-TInt CAiNwSDlgController::DelayCallBack(TAny* aParam)
-    {
-    CAiNwSDlgController* self = (CAiNwSDlgController*) aParam;
-    self->LaunchDialog();
-    return KErrNone;
-    }
-
-void CAiNwSDlgController::HandleNetworkMessage( const TNWMessages aMessage )
-    {
-    switch(aMessage)
-        {
-        case ENWMessageNetworkRegistrationStatusChange:
-            HandleStateChange();
-            break;
-
-        default:
-            break;
-        }
-    }
-
-void CAiNwSDlgController::HandleNetworkError( const TNWOperation /*aOperation*/,
-                                             TInt /*aErrorCode*/ )
-    {
-    // Take no action.
-    }
-
-TBool CAiNwSDlgController::IsOffLineMode() const
-    {
-    TInt profileId;
-    TInt err = iProfileApi->Get( KProEngActiveProfile, profileId );
-    return profileId == KOfflineProfileId && err == KErrNone;
-    }
-
-TBool CAiNwSDlgController::IsBluetoothSAPConnected() const
-    {
-    TInt btSapState( EBTSapNotConnected );
-    TInt err = RProperty::Get( KPSUidBluetoothSapConnectionState,
-                               KBTSapConnectionState,
-                               btSapState );
-    return btSapState != EBTSapNotConnected && err == KErrNone;
-    }
-
-// End of file.
--- a/idlefw/src/framework/aipluginactivitypstool.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin activity PS tool
-*
-*/
-
-
-#include "aipluginactivitypstool.h"
-#include "aipropertyextension.h"
-#include <activeidle2domainpskeys.h>
-#include <e32std.h> // for User
-#include <e32property.h> // for RProperty
-#include <e32capability.h>
-
-// Unnamed namespace for local definitions
-namespace
-    {
-
-    const TInt KStartOrdinal( KAIActivePluginRangeStart );
-    
-    // All reads are allowed.
-    _LIT_SECURITY_POLICY_PASS( KPluginActivityRegistryReadPolicy );
-
-    // Write requires WriteDeviceData capability
-    _LIT_SECURITY_POLICY_C1( KPluginActivityRegistryWritePolicy, ECapabilityWriteDeviceData );
-
-    }
-
-CAiPluginActivityRegistry::CAiPluginActivityRegistry()
-  : iRegistryOrdinal( KStartOrdinal )
-    {
-    }
-
-CAiPluginActivityRegistry* CAiPluginActivityRegistry::NewL()
-    {
-    CAiPluginActivityRegistry* self = 
-        new (ELeave) CAiPluginActivityRegistry();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-    
-void CAiPluginActivityRegistry::ConstructL()
-    {
-    }
-    
-CAiPluginActivityRegistry::~CAiPluginActivityRegistry()
-    {
-    CleanRegistry();
-    }
-        
-TInt CAiPluginActivityRegistry::SetPluginActive( const TAiPublisherInfo& aPubInfo )
-    {
-    TInt psErr = KErrArgument;
-    TInt uid = aPubInfo.iUid.iUid;
-    
-    // Make sure the keys are within their assigned ranges
-    if( uid >= KAIPluginNameRangeStart &&
-        uid <= KAIPluginNameRangeEnd &&
-        iRegistryOrdinal  >= KAIActivePluginRangeStart &&
-        iRegistryOrdinal  <= KAIActivePluginRangeEnd )
-        {
-        psErr = UpdateOrdinalRegister( uid );
-
-        ++iPluginCount; // now there is partial data in registry for next item
-                        // so update count allready here, so that
-                        // the data may be cleaned in case on error
-             
-        psErr |= UpdateNameRegister( uid, aPubInfo.iName );
-                        
-        psErr |= UpdateCountRegister();
-        
-        if( psErr != KErrNone )
-            {
-            CleanLastEntry( uid,
-                            iRegistryOrdinal,
-                            iPluginCount - 1 );
-            // Decrement only after rollback so failures may be cleaned properly
-            // in case there is interrupting error situations
-            --iPluginCount;
-            return psErr;
-            }
-                        
-        ++iRegistryOrdinal;
-        }
-    
-    return psErr;
-    }
-    
-void CAiPluginActivityRegistry::CleanRegistry()
-    {
-    // The count in p&s might not be updated before
-    // we end up here that why we use iPluginCount for count.
-    for( TInt i = 0; i < iPluginCount; ++i )
-        {
-        TInt categoryKey = i + KStartOrdinal;
-        TInt pluginUid = 0;
-        TInt err = RProperty::Get( 
-                    KPSUidActiveIdle2,
-                    categoryKey,
-                    pluginUid );
-        if( err == KErrNone )
-            {
-            // Delete name
-            RProperty::Delete( KPSUidActiveIdle2, pluginUid );
-            }
-        // Delete ordinal
-        RProperty::Delete( KPSUidActiveIdle2, categoryKey );
-        }
-    // Delete count
-    RProperty::Delete( KPSUidActiveIdle2, KAIActivePluginCount );
-    iRegistryOrdinal = KStartOrdinal;
-    }
-
-TInt CAiPluginActivityRegistry::UpdateCountRegister()
-    {
-    TInt err = RProperty::Define(
-                        KPSUidActiveIdle2,
-                        KAIActivePluginCount,
-                        RProperty::EInt,
-                        KPluginActivityRegistryReadPolicy,
-                        KPluginActivityRegistryWritePolicy );
-    if( err == KErrAlreadyExists &&
-        iRegistryOrdinal == KStartOrdinal )
-        {
-        // Some error has occured
-        CleanRegistry();
-        err = RProperty::Define(
-                        KPSUidActiveIdle2,
-                        KAIActivePluginCount,
-                        RProperty::EInt,
-                        KPluginActivityRegistryReadPolicy,
-                        KPluginActivityRegistryWritePolicy );
-        }
-    if( err != KErrAlreadyExists &&
-        err != KErrNone )
-        {
-        return err;
-        }
-        
-    // iRegistryOrdinal starts from 1, so it can be used as count, but only
-    // before incrementation.
-    err = RProperty::Set( 
-                    KPSUidActiveIdle2,
-                    KAIActivePluginCount,
-                    iPluginCount );
-    return err;
-    }
-
-TInt CAiPluginActivityRegistry::UpdateOrdinalRegister( TInt aPluginUid )
-    {
-    TInt categoryKey = iRegistryOrdinal;
-    TInt err = RProperty::Define(
-                KPSUidActiveIdle2,
-                categoryKey,
-                RProperty::EInt,
-                KPluginActivityRegistryReadPolicy,
-                KPluginActivityRegistryWritePolicy );
-    
-    if( err == KErrNone ||
-        err == KErrAlreadyExists )
-        {
-        // Set plugin uid to ordinal key
-        err = RProperty::Set( 
-                    KPSUidActiveIdle2,
-                    categoryKey,
-                    aPluginUid );
-        }
-    return err;
-    }
-
-TInt CAiPluginActivityRegistry::UpdateNameRegister( TInt aPluginUid,
-                                                    const TDesC& aName )
-    {
-    TInt err = RProperty::Define(
-                    KPSUidActiveIdle2,
-                    aPluginUid,
-                    RProperty::EText,
-                    KPluginActivityRegistryReadPolicy,
-                    KPluginActivityRegistryWritePolicy );
-                        
-    if( err == KErrNone ||
-        err == KErrAlreadyExists )
-        {
-        // Set plugin uid to ordinal key
-        err = RProperty::Set( 
-                        KPSUidActiveIdle2,
-                        aPluginUid,
-                        aName );
-        }
-    return err;
-    }
-
-void CAiPluginActivityRegistry::CleanLastEntry( TInt aPluginUid,
-                                                TInt aOrdinal,
-                                                TInt aLastCount )
-    {
-    RProperty::Delete( KPSUidActiveIdle2, aOrdinal );
-    RProperty::Delete( KPSUidActiveIdle2, aPluginUid );
-    if( aLastCount == 0 )
-        {
-        RProperty::Delete( KPSUidActiveIdle2, KAIActivePluginCount );
-        }
-    else
-        {
-        RProperty::Set( 
-                    KPSUidActiveIdle2,
-                    KAIActivePluginCount,
-                    aLastCount );
-        }
-    }
--- a/idlefw/src/framework/aipluginfactory.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/src/framework/aipluginfactory.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -18,86 +18,96 @@
 // System includes
 #include <ecom/ecom.h>
 #include <ecom/implementationinformation.h>
-#include <AknGlobalNote.h>
-#include <StringLoader.h>
-#include <e32property.h>                    // For RProperty
 
 // User includes
+#include <aisystemuids.hrh>
+#include <hscontentpublisher.h>
+#include <hspublisherinfo.h>
 #include <aicontentobserver.h>
-#include <aiutility.h>
-#include <aiplugintool.h>
-#include <activeidle2domainpskeys.h>        // PubSub category
-#include <activeidle2internalpskeys.h>      // PubSub category key and values
+#include <aiuicontroller.h>
 
+#include "aiuicontrollermanager.h"
 #include "aipluginfactory.h"
-#include "aicontentpluginmanager.h"
-#include "aipluginlifecycleobserver.h"
+#include "debug.h"
 
-#include "aiuicontroller.h"
-#include "aifwpanic.h"
-#include "debug.h"
+// Constants
+const TUid KDeviceStatusPluginUid = 
+    { AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN };
+
+_LIT( KDeviceStatusPluginName, "DeviceStatus" );
 
 
 // ======== LOCAL FUNCTIONS ========
 // ----------------------------------------------------------------------------
-// CleanupResetAndDestroy()
+// IsDeviceStatus()
+//
 // ----------------------------------------------------------------------------
 //
-template<class T>
-static void CleanupResetAndDestroy( TAny* aObj )
+TBool IsDeviceStatus( const THsPublisherInfo& aInfo )
     {
-    if( aObj )
-        {
-        static_cast<T*>( aObj )->ResetAndDestroy();
-        }
+    return ( aInfo.Name() == KDeviceStatusPluginName && 
+        aInfo.Uid() == KDeviceStatusPluginUid );
+    }
+
+// ----------------------------------------------------------------------------
+// CleanupResetAndDestroy()
+//
+// ----------------------------------------------------------------------------
+//
+template< class T >
+static void CleanupResetAndDestroy( TAny* aObj )
+    {        
+    static_cast< T* >( aObj )->ResetAndDestroy();    
     }
 
 // ----------------------------------------------------------------------------
 // CleanupResetAndDestroyPushL()
+//
 // ----------------------------------------------------------------------------
 //
-template<class T>
-static void CleanupResetAndDestroyPushL(T& aArray)
+template< class T >
+static void CleanupResetAndDestroyPushL( T& aArray )
     {
-    CleanupStack::PushL( TCleanupItem( &CleanupResetAndDestroy<T>, &aArray ) );
+    CleanupStack::PushL( 
+        TCleanupItem( &CleanupResetAndDestroy< T >, &aArray ) );
     }
     
 // ======== MEMBER FUNCTIONS ========    
 
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::CAiPluginFactory()
+//
 // ----------------------------------------------------------------------------
 //
-CAiPluginFactory::CAiPluginFactory( 
-    RPointerArray<CAiContentPublisher>& aPlugins,
-    CAiContentPluginManager& aManager )
-      : iPlugins( aPlugins ), iManager( aManager )    
+CAiPluginFactory::CAiPluginFactory( CAiUiControllerManager& aManager )
+    : iUiControllerManager( aManager )
     {
     }
 
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::~CAiPluginFactory()
+//
 // ----------------------------------------------------------------------------
 //
 CAiPluginFactory::~CAiPluginFactory()
-    {    
-    Release( iPluginTool );
-           
-    iEComPlugins.ResetAndDestroy();
-           
-    iLifecycleObservers.Reset();
+    {
+    // All publishers should be already deleted from CAiFw::HandleUiShutdown       
+    iPublishers.ResetAndDestroy();
+    
+    iEComPlugins.ResetAndDestroy();        
+    
+    REComSession::FinalClose();
     }
     
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::NewL()
+//
 // ----------------------------------------------------------------------------
 //
-CAiPluginFactory* CAiPluginFactory::NewL( 
-    RPointerArray<CAiContentPublisher>& aPlugins,
-    CAiContentPluginManager& aManager )
+CAiPluginFactory* CAiPluginFactory::NewL( CAiUiControllerManager& aManager )
     {
     CAiPluginFactory* self = 
-        new ( ELeave ) CAiPluginFactory( aPlugins, aManager );
+        new ( ELeave ) CAiPluginFactory( aManager );
                                                                       
     CleanupStack::PushL( self );
     self->ConstructL();
@@ -107,222 +117,158 @@
 
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::ConstructL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiPluginFactory::ConstructL()
-    {        
-    iPluginTool = AiUtility::CreatePluginToolL();
+    {               
+    REComSession::ListImplementationsL( 
+        KInterfaceUidHsContentPlugin, iEComPlugins );    
     }
         
 // ----------------------------------------------------------------------------
-// CAiPluginFactory::AddLifecycleObserverL()
-// ----------------------------------------------------------------------------
+// CAiPluginFactory::CreatePluginL()
 //
-void CAiPluginFactory::AddLifecycleObserverL(
-    MAiPluginLifecycleObserver& aObserver )
-    {
-    if( iLifecycleObservers.Find( &aObserver ) == KErrNotFound )
-        {
-        iLifecycleObservers.AppendL( &aObserver );
-        }    
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginFactory::CreatePluginL()
 // ----------------------------------------------------------------------------
 //
-void CAiPluginFactory::CreatePluginL(
-    const TAiPublisherInfo& aPublisherInfo,
-    RPointerArray<CAiUiController>& aControllerArray )                       
-    {           
-    iEComPlugins.ResetAndDestroy();
-    
-    // Discover Plugin implementations.
-    __TIME_MARK( ecomOverhead );
-    
-    REComSession::ListImplementationsL( 
-            KInterfaceUidContentPlugin, iEComPlugins );
-    
-    __TIME_ENDMARK( "FW: ECom Discover plug-ins", ecomOverhead );    
-                          
-    iPlugins.ReserveL( iPlugins.Count() + 1 );
-                       
+TInt CAiPluginFactory::CreatePlugin( 
+    const THsPublisherInfo& aPublisherInfo )                             
+    {                                            
+    __PRINTS( "*** CAiPluginFactory::CreatePlugin: Start ***" );
+                                    
+    if ( IsDeviceStatus( aPublisherInfo ) )
+        {
+        CHsContentPublisher* plugin( PluginByUid( aPublisherInfo.Uid() ) );
+        
+        if ( plugin )
+            {
+            // Devicestatus plugin already exists, update its namespace
+            THsPublisherInfo& info( 
+                const_cast< THsPublisherInfo& >( plugin->PublisherInfo() ) );
+            
+            info.iNamespace.Copy( aPublisherInfo.Namespace() );
+            
+            __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - DeviceStatus plugin updated ***" );
+            
+            return KErrNone;
+            }
+        }
+            
     TBool implFound( EFalse );
     
     for( TInt i = 0; i < iEComPlugins.Count(); i++ )
         {
         CImplementationInformation* information( iEComPlugins[i] );
                                                                  
-        if( information->ImplementationUid().iUid == aPublisherInfo.iUid.iUid )
+        if( information->ImplementationUid().iUid == aPublisherInfo.Uid().iUid )
             {
             implFound = ETrue;
             break;
             }
         }
     
-    if( aPublisherInfo.iNamespace == KNullDesC8 || !implFound )
+    if( aPublisherInfo.Namespace() == KNullDesC8 || !implFound )
         {
-        // No namespace available or no ecom implementation available                               
-        User::Leave( KErrNotSupported );
+        // No namespace available or no ecom implementation available
+        __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - Failed to Load Plug-in: KErrNotSupported ***" );
+        
+        return KErrNotSupported;
         }
            
-    CAiContentPublisher* plugin( PluginByInfoL( aPublisherInfo ) );
+    CHsContentPublisher* plugin( PluginByInfo( aPublisherInfo ) );
     
     if( plugin )
         {                             
-        User::Leave( KErrAlreadyExists );
+        __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - Failed to Load Plug-in: KErrAlreadyExists ***" );
+        
+        return KErrAlreadyExists;
         }
-           
-    __PRINT( __DBG_FORMAT( "\t[I]\t Loading plug-in uid=%x name=%S"), 
-                            aPublisherInfo.iUid, &(aPublisherInfo.iName) );
-           
-    __TIME( "FW: Create plug-in:",
-        plugin = CreatePluginLC( aPublisherInfo );
-        ) // __TIME
-       
-    __TIME( "FW: Subscribe content observers",    
-        SubscribeContentObserversL( *plugin, 
-            aPublisherInfo, aControllerArray );
-        ) // __TIME
-                                              
-    // Plug-in settings
-    __TIME( "FW: Configure Plugin",
-        ConfigurePluginL( aControllerArray, *plugin, aPublisherInfo );
-        ) // __TIME
-                                  
-    __PRINTS( "*** FW: Done - Load Plug-in ***" );                          
+    
+    TInt err( KErrNone );
     
-    // This might fail and the plugin ends up destroyed
-    for( TInt i = 0; i < iLifecycleObservers.Count(); ++i )
-        {
-        iLifecycleObservers[i]->PluginCreatedL( *plugin );
-        }
-                
-    for( TInt i = 0; i < iLifecycleObservers.Count(); ++i )
-        {
-        iLifecycleObservers[i]->AllPluginsCreated();
-        }
-                   
-    // Move plugins to manager
-    iPlugins.Append( plugin );
-    CleanupStack::Pop( plugin );
+    TRAP( err, CreatePluginL( aPublisherInfo ) );
     
-    iEComPlugins.ResetAndDestroy();       
+    __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - Load Plug-in ***" );
+    
+    return err;    
     }
         
 // ----------------------------------------------------------------------------
-// CAiPluginFactory::DestroyPluginL()
+// CAiPluginFactory::DestroyPlugin()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiPluginFactory::DestroyPluginL(
-    const TAiPublisherInfo& aPublisherInfo,
-    RPointerArray< CAiUiController >& /*aControllerArray*/ )                       
+void CAiPluginFactory::DestroyPlugin( const THsPublisherInfo& aPublisherInfo )                             
     {
-    // TODO: check is there need to call 
-    // iUiControllerManager->RemovePluginFromUI( aPlugin );
-    // it will clean the published content.     
+    __PRINTS( "*** CAiPluginFactory::DestroyPlugin: Start ***" );
     
-    if( iPlugins.Count() == 0 )
+    if ( IsDeviceStatus( aPublisherInfo ) )
         {
+        // Don't destroy device status plugin
+        __PRINTS( "*** CAiPluginFactory::DestroyPlugin: Done - Keepind DeviceStatus Plug-in ***" );
+        
         return;
         }
-               
-    CAiContentPublisher* plugin( PluginByInfoL( aPublisherInfo ) );
-    
-    TInt index( iPlugins.Find( plugin ) );
+        
+    CHsContentPublisher* plugin( PluginByInfo( aPublisherInfo ) );
     
-    if( plugin && index != KErrNotFound )
-        {               
-        for( TInt i = 0; i < iLifecycleObservers.Count(); i++ )
-            {                
-            iLifecycleObservers[i]->PluginDestroyed( *plugin );
-            }
-        
-        iPlugins.Remove( index );
+    if ( plugin )
+        {
+        iPublishers.Remove( iPublishers.Find( plugin ) );
         
         delete plugin;
-        plugin = NULL;
-        }
-        
-    if( iPlugins.Count() == 0 )
-        {
-        for( TInt i = 0; i < iLifecycleObservers.Count(); i++ )
-            {                
-            iLifecycleObservers[i]->AllPluginsDestroyed();
-            }        
+        plugin = NULL;            
         }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginFactory::DestroyPlugins()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginFactory::DestroyPlugins()
-    {
-    for( TInt i = 0; i < iPlugins.Count(); i++ )
-        {
-        CAiContentPublisher* plugin( iPlugins[i] );
-        
-        for( TInt i = 0; i < iLifecycleObservers.Count(); i++ )
-            {                
-            iLifecycleObservers[i]->PluginDestroyed( *plugin );
-            }        
-        }
-
-    iPlugins.ResetAndDestroy();
     
-    for( TInt i = 0; i < iLifecycleObservers.Count(); i++ )
-        {                
-        iLifecycleObservers[i]->AllPluginsDestroyed();
-        }           
+    __PRINTS( "*** CAiPluginFactory::DestroyPlugin: Done ***" );
     }
         
 // ----------------------------------------------------------------------------
-// CAiPluginFactory::CreatePluginLC()
+// CAiPluginFactory::CreatePluginL()
+//
 // ----------------------------------------------------------------------------
 //
-CAiContentPublisher* CAiPluginFactory::CreatePluginLC(
-    const TAiPublisherInfo& aPluginInfo )
-    {
-    CAiContentPublisher* plugin = 
-            CAiContentPublisher::NewL( aPluginInfo.iUid );
-    
+void CAiPluginFactory::CreatePluginL(
+    const THsPublisherInfo& aPublisherInfo )
+    {       
+    __PRINT( __DBG_FORMAT( "\t[I]\t Loading plug-in uid=%x name=%S"), 
+    aPublisherInfo.Uid(), &(aPublisherInfo.Name() ) );
+
+    __TIME( "FW: Create plug-in:",
+            
+    iPublishers.ReserveL( iPublishers.Count() + 1 );    
+            
+    CHsContentPublisher* plugin = 
+        CHsContentPublisher::NewL( aPublisherInfo ) );            
     CleanupStack::PushL( plugin );
-        
-    MAiPropertyExtension* ext( iPluginTool->PropertyExt( *plugin ) );
     
-    if( !ext )
-        {
-        User::Leave( KErrNotFound );
-        }
-    
-    ext->SetPropertyL( EAiPublisherInfo, (TAny*)&aPluginInfo );
+    __TIME( "FW: Subscribe content observers",    
+    SubscribeContentObserversL( *plugin, aPublisherInfo ) );             
+                                                      
+    __TIME( "FW: Configure Plugin",
+    ConfigurePluginL( *plugin, aPublisherInfo ) );
     
-    const TAiPublisherInfo* info( ext->PublisherInfoL() );
-    
-    if( info->iNamespace != aPluginInfo.iNamespace )
-        {
-        // SetPropertyL is not implemented correctly
-        User::Leave( KErrNotSupported );
-        }
-    
-    return plugin;
+    // Take plugin's ownership
+    iPublishers.Append( plugin );
+    CleanupStack::Pop( plugin );
     }
 
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::SubscribeContentObserversL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiPluginFactory::SubscribeContentObserversL(
-    CAiContentPublisher& aContentPublisher,        
-    const TAiPublisherInfo& aPublisherInfo,
-    RPointerArray<CAiUiController>& aControllerArray )
-    {       
-    
-    for( TInt i = 0; i < aControllerArray.Count(); i++ )
+    CHsContentPublisher& aContentPublisher,        
+    const THsPublisherInfo& aPublisherInfo )    
+    {
+    RPointerArray< CAiUiController >& 
+        controllers( iUiControllerManager.UiControllers() );
+            
+    for( TInt i = 0; i < controllers.Count(); i++ )
         {
         MAiContentObserver& observer( 
-            aControllerArray[i]->GetContentObserver() );
+            controllers[i]->GetContentObserver() );
         
         if ( observer.RequiresSubscription( aPublisherInfo ) )
             {
@@ -334,44 +280,46 @@
 
 // ----------------------------------------------------------------------------
 // CAiPluginFactory::ConfigurePluginL()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiPluginFactory::ConfigurePluginL( 
-    RPointerArray<CAiUiController>& aControllerArray,
-    CAiContentPublisher& aContentPublisher,
-    const TAiPublisherInfo& aPubInfo )
+void CAiPluginFactory::ConfigurePluginL(     
+    CHsContentPublisher& aContentPublisher,
+    const THsPublisherInfo& aPublisherInfo )
     {    
-    RAiSettingsItemArray pluginSettings;
-    CleanupResetAndDestroyPushL( pluginSettings );
+    RAiSettingsItemArray settings;
+    CleanupResetAndDestroyPushL( settings );
     
-    for( TInt i = 0; i < aControllerArray.Count(); i++ )
+    RPointerArray< CAiUiController >& 
+        controllers( iUiControllerManager.UiControllers() );
+    
+    for( TInt i = 0; i < controllers.Count(); i++ )
         {
         // Get settings for plug-in        
-        aControllerArray[i]->GetSettingsL( aPubInfo, pluginSettings );
+        controllers[i]->GetSettingsL( aPublisherInfo, settings );
         }
     
     // Configure plug-in with its settings
-    aContentPublisher.ConfigureL( pluginSettings );
+    aContentPublisher.ConfigureL( settings );
     
-    CleanupStack::PopAndDestroy( &pluginSettings );    
+    CleanupStack::PopAndDestroy( &settings );    
     }
         
 // ----------------------------------------------------------------------------
-// CAiPluginFactory::PluginByInfoL()
+// CAiPluginFactory::PluginByInfo()
+// Gets plugin by publisher info. Only this overload returns the exact match
 // ----------------------------------------------------------------------------
 //
-CAiContentPublisher* CAiPluginFactory::PluginByInfoL( 
-    const TAiPublisherInfo& aInfo ) const
+CHsContentPublisher* CAiPluginFactory::PluginByInfo( 
+    const THsPublisherInfo& aPublisherInfo ) const
     {       
-    for( TInt i = 0; i < iPlugins.Count(); i++ )
+    for( TInt i = 0; i < iPublishers.Count(); i++ )
         {         
-        const TAiPublisherInfo* info( NULL );
-                                                  
-        info = iPluginTool->PublisherInfoL( *iPlugins[i] );
-        
-        if( info && ( aInfo == *info ) ) 
+        const THsPublisherInfo& info( iPublishers[i]->PublisherInfo() ); 
+                                                                             
+        if( aPublisherInfo == info ) 
             {
-            return iPlugins[i];
+            return iPublishers[i];
             }
         }
     
@@ -379,25 +327,109 @@
     }
 
 // ----------------------------------------------------------------------------
-// CAiPluginFactory::PluginByNameL()
+// CAiPluginFactory::PluginByUid()
+// Gets plugin by UID
 // ----------------------------------------------------------------------------
 //
-CAiContentPublisher* CAiPluginFactory::PluginByNameL( 
+CHsContentPublisher* CAiPluginFactory::PluginByUid( const TUid& aUid ) const
+    {
+    for( TInt i = 0; i < iPublishers.Count(); i++ )
+        {
+        const THsPublisherInfo& info( iPublishers[i]->PublisherInfo() );
+                                                               
+        if( info.Uid() == aUid )
+            {
+            return iPublishers[i];            
+            }
+        }
+    
+    return NULL;        
+    }
+    
+// ----------------------------------------------------------------------------
+// CAiPluginFactory::PluginByName()
+// Gets plugin by name
+// ----------------------------------------------------------------------------
+//
+CHsContentPublisher* CAiPluginFactory::PluginByName( 
     const TDesC& aName ) const
     {
-    for( TInt i = 0; i < iPlugins.Count(); i++ )
+    for( TInt i = 0; i < iPublishers.Count(); i++ )
         {
-        const TAiPublisherInfo* info( NULL );
-        
-        TRAP_IGNORE( info = iPluginTool->PublisherInfoL( *iPlugins[i] ) );
-                        
-        if( info && info->iName == aName )
+        const THsPublisherInfo& info( iPublishers[i]->PublisherInfo() );
+                                                               
+        if( info.Name() == aName )
             {
-            return iPlugins[i];            
+            return iPublishers[i];            
             }
         }
     
     return NULL;    
     }
 
+// ----------------------------------------------------------------------------
+// CAiPluginFactory::Publishers()
+//
+// ----------------------------------------------------------------------------
+//
+RPointerArray< CHsContentPublisher >& CAiPluginFactory::Publishers() const
+    {
+    return iPublishers;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiPluginFactory::ResolvePluginsToUpgradeL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiPluginFactory::ResolvePluginsToUpgradeL( 
+    RArray< THsPublisherInfo >& aArray )
+    {
+    RImplInfoPtrArray ecomPlugins;
+    CleanupResetAndDestroyPushL( ecomPlugins );
+        
+    REComSession::ListImplementationsL( 
+        KInterfaceUidHsContentPlugin, ecomPlugins );
+    
+    for ( TInt i = 0; i < ecomPlugins.Count(); i++ )
+        {
+        CImplementationInformation* newInformation( ecomPlugins[i] );
+                 
+        for( TInt j = 0; j < iEComPlugins.Count(); j++ )
+            {            
+            CImplementationInformation* oldInformation( iEComPlugins[j] );
+                                                                 
+            if( newInformation->ImplementationUid() == oldInformation->ImplementationUid() )
+                {
+                if( newInformation->Version() != oldInformation->Version() )
+                    {                        
+                    for ( TInt k = 0; k < iPublishers.Count(); k++ )
+                        {
+                        const THsPublisherInfo& info( 
+                            iPublishers[k]->PublisherInfo() );
+                                                
+                        if ( info.Uid() == newInformation->ImplementationUid() )
+                            {                            
+                            __PRINT( __DBG_FORMAT( "\t[I]\t Plug-in to update uid=%x name=%S namespace=%S, version update %d to %d"), 
+                                info.Uid(), &(info.Name()), &(info.Namespace()), oldInformation->Version(), newInformation->Version()  );
+                            
+                            aArray.Append( info );
+                            }
+                        }
+                                                         
+                    break;
+                    }
+                }                
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( &ecomPlugins );
+           
+    // Update ecom plugin array
+    iEComPlugins.ResetAndDestroy();
+    
+    REComSession::ListImplementationsL( 
+        KInterfaceUidHsContentPlugin, iEComPlugins );
+    }
+
 // End of file
--- a/idlefw/src/framework/aipluginstatemachineimpl.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Plugin state machine impl
-*
-*/
-
-
-#include "aipluginstatemachineimpl.h"
-#include "aipluginstatemachine.h"
-#include "aipluginlifecycleobserver.h"
-#include "aipluginstate.h"
-#include "aifwpanic.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::CAiPluginStateMachine()
-// ----------------------------------------------------------------------------
-//
-CAiPluginStateMachine::CAiPluginStateMachine(
-    MAiPluginStateResources& aPluginStateResource,    
-    CAiContentPublisher& aPlugin )
-      : iAlive( *this ),
-        iCurrentState( NULL ),
-        iPluginStateResource( aPluginStateResource ),        
-        iPlugin( aPlugin )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::SwitchToState()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateMachine::SwitchToState( TAiState aState,
-    TAiStateChanges aStateChange )
-    {
-    // Store previous state
-    MAiPluginState* previousState( iCurrentState );
-    
-    // Determine new current state
-    switch( aState )
-        {
-        case EAiAlive:
-            {
-            iCurrentState = &iAlive;
-            break;
-            }
-        case EAiSuspended:
-            {
-            iCurrentState = &iSuspended;
-            break;
-            }
-        case EAiIdle:
-            {
-            iCurrentState = &iIdle;
-            break;
-            }
-        default:
-            {
-#ifdef _DEBUG
-            AiFwPanic::Panic( AiFwPanic::EAiFwPanic_IllegalPluginStateChange );
-#endif
-            break;
-            }
-        }
-    
-    if( previousState != iCurrentState )
-        {
-        if( previousState )
-            {
-            // Exit the previous state
-            previousState->Exit( *this, aStateChange );            
-            }
-        
-        if( iCurrentState )
-            {
-            // Enter the new state
-            iCurrentState->Enter( *this, aStateChange );                    
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::StateVariable()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateMachine::StateVariable( TAiStateVariable aStateVariable )
-    {
-    return iPluginStateResource.StateVariable( aStateVariable );
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::Plugin()
-// ----------------------------------------------------------------------------
-//
-CAiContentPublisher& CAiPluginStateMachine::Plugin() const
-    {
-    return iPlugin;
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateMachine::HandleEvent( TAiStateChanges aStateChange )
-    {
-    // State machine handles some state changes directly.
-    switch( aStateChange )
-        {
-        case ESMAISystemBoot:
-            {
-            // State machine handles startup event(boot/theme change).
-            // Check if backup is ongoing
-            if( iPluginStateResource.StateVariable( ESMAIBackupRestoreStatus ) )
-                {
-                SwitchToState( EAiIdle, aStateChange );
-                }
-            else
-                {
-                SwitchToState( EAiAlive, aStateChange );
-                }
-            break;
-            }
-        case ESMAIBackupOn:
-            {
-            // Backup/restore directs straight to idle state.
-            SwitchToState( EAiIdle, aStateChange );
-            break;
-            }
-        case ESMAIReportThemeChangeStarted:
-        case ESMAISystemShutdown:
-            {
-            // Shutdown drives directly to idle state.
-            ChangePluginState( iPluginStateResource.TranslateReason( aStateChange ),
-                               CAiContentPublisher::Stop );
-            break;
-            }
-        case ESMAIOnLine:
-            {
-            if( !iOnline && iCurrentState )
-                {
-                iOnline = ETrue;
-                
-                return iCurrentState->HandleEvent( *this, aStateChange );
-                }                
-            break;
-            }
-        case ESMAIOffLine:
-            {
-            if( iCurrentState )
-                {
-                iOnline = EFalse;
-                
-                return iCurrentState->HandleEvent( *this, aStateChange );                
-                }            
-            break;
-            }
-        default:
-            {
-            if( ( aStateChange == ESMAIBacklightOn ) &&
-                !iPluginStateResource.StateVariable( ESMAIIdleFocusStatus ) )
-                {
-                // Ignore lights on when on background
-                return ETrue;
-                }
-            
-            if( iCurrentState )
-                {
-                // Other events are handled by the current set state.
-                // Current state determines return value.
-                return iCurrentState->HandleEvent( *this, aStateChange );                
-                }
-            }
-        }
-    
-    // Return event handled.
-    return ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::TranslateReason()
-// ----------------------------------------------------------------------------
-//    
-TAiTransitionReason CAiPluginStateMachine::TranslateReason( 
-    TAiStateChanges aStateChange )
-    {
-    return iPluginStateResource.TranslateReason( aStateChange );
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::RestartSuspendTimer()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateMachine::RestartSuspendTimer()
-    {
-    iPluginStateResource.RestartSuspendTimer();
-    }
-
-// ---------------------------------------------------------------------------
-// CAiPluginStateMachine::ChangePluginState()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateMachine::ChangePluginState( TAiTransitionReason aReason,         
-    void (CAiContentPublisher::*aStateChangeMethod)( TAiTransitionReason ) )
-    {       
-	TRAP_IGNORE( ( iPlugin.*aStateChangeMethod)( aReason ) );	
-    }
-
-// End of file.
--- a/idlefw/src/framework/aipluginstatemanager.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,549 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  System state observer and notifier
-*
-*/
-
-
-#include <connect/sbdefs.h>
-#include <aipspropertyobserver.h>
-#include <settingsinternalcrkeys.h> // for KSettingsScreenSaverPeriod
-#include <e32property.h>
-#include <aiutility.h>
-#include <e32base.h>
-#include <centralrepository.h>
-#include <activeidle2domaincrkeys.h>
-#include "aifwpanic.h"
-#include "aipluginstatemanager.h"
-#include "aipluginstatemachineimpl.h"
-#include "ailightstatusobserver.h"
-#include "aicallstatusobserver.h"
-#include "aifocusobserver.h"
-#include "aikeylockobserver.h"
-#include "aibackuprestorestatusobserver.h"
-#include "aienvironmentchangeobserver.h"
-#include "aiuiframeworkobserverimpl.h"
-
-#include <ScreensaverInternalPSKeys.h> // this include needs to be last
-
-#include "debug.h"
-
-const TInt KMinuteInSeconds( 60 );
-const TInt KSecondInMikroSeconds( 1000*1000 );
-const TInt KAIFadeOutEstimateMikroSeconds( 10 * KSecondInMikroSeconds );
-const TInt KTwoMinutesInMikroSeconds( 2 * KMinuteInSeconds * KSecondInMikroSeconds );
-
-#define AI2_OPTION_RESUME_AT_CREATION
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::NewL()
-// ----------------------------------------------------------------------------
-//
-CAiPluginStateManager* CAiPluginStateManager::NewL()
-    {
-    CAiPluginStateManager* self = new (ELeave) CAiPluginStateManager;
-    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    return self;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::~CAiPluginStateManager()
-// ----------------------------------------------------------------------------
-//
-CAiPluginStateManager::~CAiPluginStateManager()
-    {       
-    iStateMachines.ResetAndDestroy();
-    
-    DestroySystemStateObservers();
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::CAiPluginStateManager()
-// ----------------------------------------------------------------------------
-//
-CAiPluginStateManager::CAiPluginStateManager()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ConstructL()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ConstructL()
-    {
-    TInt value( 0 );
-    
-    TInt err( RProperty::Get( KCRUidPersonalizationSettings, 
-                              KSettingsScreenSaverPeriod, value ) );
-                               
-    if( err == KErrNone )
-        {
-        iT1Delay = ( value * KMinuteInSeconds * KSecondInMikroSeconds )
-                   + KAIFadeOutEstimateMikroSeconds;
-        }
-    else
-        {
-        // default when error to 2 minutes
-        iT1Delay = KTwoMinutesInMikroSeconds;
-        }    
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::CreateSystemStateObserversL()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::CreateSystemStateObserversL()
-    {
-    iT1Timer = CPeriodic::NewL( CActive::EPriorityStandard );
-
-    iBackupOperationObserver = CAiBackupRestoreStatusObserver::NewL( this );
-
-    iCallStateObserver = CAiCallStatusObserver::NewL( this );
-
-    iLightStateObserver = CAiLightStatusObserver::NewL( this );
-
-    iFocusObserver = CAiFocusObserver::NewL( this );
-
-    iKeylockObserver = CAiKeylockObserver::NewL( this );
-
-    // Environment change observer notifies time/date/midnight/language
-    // changes
-    iEnvironmentObserver = CAiEnvironmentChangeObserver::NewL( this );
-
-    // Ui framework observer notifies currently general theme changes
-    iFrameworkObserver = CAiUiFrameworkObserverImpl::NewL( *this );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::DestroySystemStateObservers()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::DestroySystemStateObservers()
-    {
-    if( iT1Timer )
-        {
-        iT1Timer->Cancel();
-        
-        delete iT1Timer;       
-        iT1Timer = NULL;
-        }
-
-    delete iBackupOperationObserver;
-    iBackupOperationObserver = NULL;
-
-    delete iCallStateObserver;
-    iCallStateObserver = NULL;
-
-    delete iLightStateObserver;
-    iLightStateObserver = NULL;
-
-    delete iFocusObserver;
-    iFocusObserver = NULL;
-
-    delete iKeylockObserver;
-    iKeylockObserver = NULL;
-
-    delete iEnvironmentObserver;
-    iEnvironmentObserver = NULL;
-
-    delete iFrameworkObserver;
-    iFrameworkObserver = NULL;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::UiFwObserver()
-// ----------------------------------------------------------------------------
-//
-MAiUiFrameworkObserver* CAiPluginStateManager::UiFwObserver() const
-    {
-    return iFrameworkObserver;
-    }
-    
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ReportStateChange()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ReportStateChange( TAiStateChanges aState )
-    {
-    if( !iIsDeviceStarted ) 
-        {
-        if( aState == ESMAISystemBoot )
-            {
-            iIsDeviceStarted = ETrue;
-            }               
-        }
-    
-    if( aState == ESMAISystemBoot )
-        {
-        return;
-        }
-        
-    ProcessStateChangeForAll( aState );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::StateVariable()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateManager::StateVariable( TAiStateVariable aStateChange )
-    {
-    switch ( aStateChange )
-        {
-        case ESMAICallStatus:
-            {
-            return CallOngoing();
-            }
-        case ESMAILightStatus:
-            {
-            return LightsOn();
-            }
-        case ESMAIBackupRestoreStatus:
-            {
-            return BackupOngoing();
-            }
-        case ESMAIIdleFocusStatus:
-            {
-            return IdleFocused();
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::RestartSuspendTimer()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::RestartSuspendTimer()
-    {
-    if( iT1Timer )
-        {
-        iT1Timer->Cancel();
-        
-        iT1Timer->Start( iT1Delay, iT1Delay,                         
-                         TCallBack( T1TimerCallback, this ) );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::PluginCreatedL()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::PluginCreatedL( CAiContentPublisher& aPlugin )
-    {
-    // Create a new state machine for the plugin from the heap
-    // and append the machine to our local array.
-    CAiPluginStateMachine* machine = 
-        new ( ELeave ) CAiPluginStateMachine( *this, aPlugin );                                                                                                                                              
-
-    // Important to append first so failure will be handled properly
-    CleanupStack::PushL( machine );
-    iStateMachines.AppendL( machine );
-    CleanupStack::Pop( machine );
-              
-    // This will effectively resume the plugin NOW.
-    ProcessStateChange( ESMAISystemBoot, *machine );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::PluginDestroyed()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::PluginDestroyed( CAiContentPublisher& aPlugin )
-    {
-    // plugin has beed destroyed, remove the state machine also
-    for( TInt i = 0; i < iStateMachines.Count(); i++ )
-        {
-        if( &iStateMachines[i]->Plugin() == &aPlugin )
-            {
-            iStateMachines[i]->HandleEvent( ESMAISystemShutdown );
-            delete iStateMachines[i];
-          
-            iStateMachines.Remove( i );                                    
-            break;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::AllPluginsCreated()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::AllPluginsCreated()
-    {
-    // Currently we get this event via pluginmanager -> aifw -> EAISMSystemBoot event
-    // so no implementation required. We might want to handle this locally in the 
-    // future though. Current impl is such because RefreshUI for ui controller
-    // needs to after the plugins are resumed -> If we handle this here it is not
-    // garanteed.
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::AllPluginsDestroyed()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::AllPluginsDestroyed()
-    {
-    // Plugins have been destroyed, so destroy the state machines also.
-    iStateMachines.ResetAndDestroy();
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::TranslateReason()
-// ----------------------------------------------------------------------------
-//
-TAiTransitionReason CAiPluginStateManager::TranslateReason( 
-    TAiStateChanges aStateChange )
-    {
-    switch ( aStateChange )
-        {
-        case ESMAIBacklightOn:
-            {
-            return EAiBacklightOn;
-            }
-        case ESMAIBacklightOff:
-            {
-            return EAiBacklightOff;
-            }
-        case ESMAIBackupOn:
-            {
-            return EAiBackupRestoreStarted;
-            }
-        case ESMAIBackupOff:
-            {
-            return EAiBackupRestoreEnded;
-            }
-        case ESMAIInCall:
-            {
-            return EAiPhoneCallStarted;
-            }
-        case ESMAINoCall:
-            {
-            return EAiPhoneCallEnded;
-            }
-        case ESMAISystemBoot:
-            {
-            return EAiSystemStartup;
-            }
-        case ESMAILocaleChanged:
-            {
-            return EAiLanguageChanged;
-            }
-        case ESMAIIdleForeground:
-            {
-            return EAiIdleForeground;
-            }
-        case ESMAIIdleBackground:
-            {
-            return EAiIdleBackground;
-            }
-        case ESMAITimeChanged:
-            {
-            return EAiTimeChanged;
-            }
-        case ESMAIMidnightCrossover:
-            {
-            return EAiMidnightPassed;
-            }
-        case ESMAIRelayoutScreen:
-            {
-            return EAiScreenLayoutChanged;
-            }
-        case ESMAIReportThemeChangeStarted:
-            {
-            return EAiUiDefinitionChangeStarted;
-            }
-        case ESMAIReportThemeChangeReady:
-            {
-            return EAiUiDefinitionChangeEnded;
-            }
-        case ESMAIGeneralThemeChanged:
-            {
-            return EAiGeneralThemeChanged;
-            }
-        case ESMAISystemShutdown:
-            {
-            return EAiSystemShutdown;
-            }
-        case ESMAIT1Timeout:
-            {
-            return EAiSuspendPlugins;
-            }
-        case ESMAIKeylockEnabled:
-            {
-            return EAiKeylockEnabled;
-            }
-        case ESMAIKeylockDisabled:
-            {
-            return EAiKeylockDisabled;
-            }
-        case ESMAIOffLine:
-            {
-            return EAiIdleOffLine;
-            }
-        case ESMAIOnLine:
-            {
-            return EAiIdleOnLine;
-            }   
-        case ESMAIPageSwitch:
-        	{
-        	return EAiIdlePageSwitch;
-        	}
-        case ESMAIUnknownState: // fallthrough
-        default:
-            {
-            return EAiUnknownTransitionReason;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ProcessStateChange()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ProcessStateChange( TAiStateChanges aState,
-    CAiPluginStateMachine& aMachine )
-    {
-    aMachine.HandleEvent( aState );    
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ProcessOnlineState()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ProcessOnlineState( CAiContentPublisher& aPlugin ) 
-    {
-    for ( TInt i = 0; i < iStateMachines.Count(); i++ )
-        {
-        if( &iStateMachines[i]->Plugin() == &aPlugin )
-            {
-            iStateMachines[i]->HandleEvent( ESMAIOnLine );            
-            break;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ProcessOfflineState()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ProcessOfflineState( CAiContentPublisher& aPlugin )
-    {
-    for ( TInt i = 0; i < iStateMachines.Count(); i++ )
-        {
-        if( &iStateMachines[i]->Plugin() == &aPlugin )
-            {
-            iStateMachines[i]->HandleEvent( ESMAIOffLine );            
-            break;
-            }        
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::ProcessStateChangeForAll()
-// ----------------------------------------------------------------------------
-//
-void CAiPluginStateManager::ProcessStateChangeForAll( TAiStateChanges aState )
-    {
-    for ( TInt i = 0; i < iStateMachines.Count(); ++i )
-        {
-        iStateMachines[i]->HandleEvent( aState );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::IdleFocused()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateManager::IdleFocused() const
-    {
-    if ( iFocusObserver )
-        {
-        return ( iFocusObserver->Status() == ESMAIIdleForeground );
-        }
-
-    return EFalse;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::BackupOngoing()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateManager::BackupOngoing() const
-    {
-    if ( iBackupOperationObserver )
-        {
-        return ( iBackupOperationObserver->Status() == ESMAIBackupOn );
-        }
-    
-    return EFalse;    
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::LightsOn()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateManager::LightsOn() const
-    {
-    if ( iLightStateObserver )
-        {
-        return ( iLightStateObserver->Status() == ESMAIBacklightOn );
-        }
-    
-    return EFalse;
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::CallOngoing()
-// ----------------------------------------------------------------------------
-//
-TBool CAiPluginStateManager::CallOngoing() const
-    {
-    if ( iCallStateObserver )
-        {
-        return ( iCallStateObserver->Status() == ESMAIInCall );
-        }
-        
-    return EFalse;    
-    }
-
-// ----------------------------------------------------------------------------
-// CAiPluginStateManager::T1TimerCallback()
-// ----------------------------------------------------------------------------
-//
-TInt CAiPluginStateManager::T1TimerCallback( TAny* aPtr )
-    {
-    CAiPluginStateManager* self =
-        static_cast< CAiPluginStateManager* >( aPtr );
-
-    __ASSERT_DEBUG( self, 
-        AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-
-    self->iT1Timer->Cancel();
-    
-//    self->ProcessStateChangeForAll( ESMAIT1Timeout );
-    
-    return KErrNone;
-    }
-
-// End of file
-
--- a/idlefw/src/framework/aipsstatusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Generic PS observer base class
-*
-*/
-
-
-#include <aiutility.h>
-#include <aipspropertyobserver.h>
-#include "aipsstatusobserver.h"
-
-CAiPSStatusObserver::~CAiPSStatusObserver()
-    {
-    if( iObserver )
-        iObserver->Release();
-    }
-
-TAiStateChanges CAiPSStatusObserver::Status()
-    {
-    return ESMAIUnknownState;
-    }
-
-CAiPSStatusObserver::CAiPSStatusObserver()
-    {
-    }
-    
-void CAiPSStatusObserver::BaseConstructL( TCallBack aCallBack,
-                                              TUid aCategory,
-                                              TInt aKey,
-                                              MAiStateManager* aStateManager )
-    {
-    iStateManager = aStateManager;
-    iObserver = AiUtility::CreatePSPropertyObserverL( aCallBack, aCategory, aKey );
-    }
-
-// End of File.
--- a/idlefw/src/framework/aissaverstatusobserver.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-#include <aipspropertyobserver.h>
-#include "aissaverstatusobserver.h"
-#include <screensaverinternalpskeys.h> // this include needs to be last
-#include "aifwpanic.h"
-#include "debug.h"
-
-CAiSSaverStatusObserver::CAiSSaverStatusObserver()
-    {
-    }
-    
-CAiSSaverStatusObserver::~CAiSSaverStatusObserver()
-    {
-    }
-
-CAiSSaverStatusObserver* CAiSSaverStatusObserver::NewL( MAiStateManager* aStateManager )
-    {
-    CAiSSaverStatusObserver* self = new (ELeave) CAiSSaverStatusObserver();
-    CleanupStack::PushL(self);
-    self->ConstructL( aStateManager );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-void CAiSSaverStatusObserver::ConstructL( MAiStateManager* aStateManager )
-    {
-    BaseConstructL( TCallBack( HandleScreenSaverStateChanged, this ),
-                    KPSUidScreenSaver,
-                    KScreenSaverOn,
-		            aStateManager );
-    }
-    
-TAiStateChanges CAiSSaverStatusObserver::Status()
-    {
-    TInt value = 0;
-    Tint err = iObserver->Get( value );
-    if( ( value == 0 ) ||
-        ( err != KErrNone ) )
-    	{
-    	return ESMAIScreensaverInactive;
-    	}
-    else
-    	{
-    	return ESMAIScreensaverActive;
-    	} 
-    }
-
-TInt CAiSSaverStatusObserver::HandleScreenSaverStateChanged( TAny* aPtr )
-    {
-    CAiSSaverStatusObserver* self =
-                static_cast<CAiSSaverStatusObserver*>( aPtr );
-
-    __ASSERT_DEBUG( self, 
-                    AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-
-    TInt value = 0;
-    TInt err = self->iObserver->Get( value );
-	
-    if ( ( value == 0 ) ||
-         ( err != KErrNone ) )
-		{
-        // screensaver off
-        __PRINTS("XAI: Screen saver = OFF");
-        self->iStateManager->ReportStateChange( ESMAIScreensaverInactive );
-		}
-    else
-		{
-        // screensaver on
-        __PRINTS("XAI: Screen saver = ON");
-        self->iStateManager->ReportStateChange( ESMAIScreensaverActive );
-		}
-	
-    return KErrNone;
-    }
-
--- a/idlefw/src/framework/aistatealive.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,387 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State class for alive states
-*
-*/
-
-
-#include "aistatealive.h"
-#include "aipluginstatemachine.h"
-#include "debug.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveActive::TAiStateAliveActive()
-// ----------------------------------------------------------------------------
-//
-TAiStateAliveActive::TAiStateAliveActive()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveActive::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveActive::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Enter Alive active" );
-    
-    const TAiTransitionReason reason( 
-            aStateMachine.TranslateReason( aStateChange ) );
-    
-    aStateMachine.ChangePluginState( reason, CAiContentPublisher::Resume );                                    
-    }
-    
-// ----------------------------------------------------------------------------
-// TAiStateAliveActive::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateAliveActive::HandleEvent( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Alive active handles event" );
-    switch( aStateChange )
-        {
-        case ESMAIBacklightOff:
-            {
-            aStateMachine.SwitchToState( EAiAliveInactive, aStateChange );
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-    
-// ----------------------------------------------------------------------------
-// TAiStateAliveActive::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveActive::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges /*aStateChange*/ )
-    {
-    __PRINTS( "XAI: Exit alive active" );
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveInactive::TAiStateAliveInactive()
-// ----------------------------------------------------------------------------
-//
-TAiStateAliveInactive::TAiStateAliveInactive()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveInactive::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveInactive::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Enter alive inactive" );
-    const TAiTransitionReason reason( 
-            aStateMachine.TranslateReason( aStateChange ) );
-    
-    aStateMachine.ChangePluginState( reason, CAiContentPublisher::Resume );
-                                         
-    aStateMachine.RestartSuspendTimer();
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveInactive::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateAliveInactive::HandleEvent( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: alive inactive handles event" );
-    switch( aStateChange )
-        {
-        case ESMAIIdleForeground:
-        case ESMAIBacklightOn:
-            {
-            aStateMachine.SwitchToState( EAiAliveActive, aStateChange );
-            return ETrue;
-            }
-        case ESMAIT1Timeout:
-            {
-            aStateMachine.SwitchToState( EAiSuspended, aStateChange );
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveInactive::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveInactive::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges /*aStateChange*/ )
-    {
-    __PRINTS( "XAI: Exit alive inactive" );
-    }
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveIncall::TAiStateAliveIncall()
-// ----------------------------------------------------------------------------
-//
-TAiStateAliveIncall::TAiStateAliveIncall()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveIncall::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveIncall::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Enter alive incall" );
-    
-    const TAiTransitionReason reason( 
-            aStateMachine.TranslateReason( aStateChange ) );
-    
-    aStateMachine.ChangePluginState( reason, CAiContentPublisher::Resume );                                    
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveIncall::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateAliveIncall::HandleEvent( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: alive incall handles event" );
-    switch( aStateChange )
-        {
-        case ESMAINoCall:
-            {
-            // To alive switch
-            aStateMachine.SwitchToState( EAiAlive, aStateChange );
-            return ETrue;
-            }
-        case ESMAIInCall:
-            {
-            // prevent master state from handling this
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAliveIncall::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAliveIncall::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges /*aStateChange*/ )
-    {
-    __PRINTS( "XAI: Exit alive incall" );
-    }
-   
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::TAiStateAlive()
-// ----------------------------------------------------------------------------
-//
-TAiStateAlive::TAiStateAlive( MAiPluginStateMachine& aParentStateMachine )
-  : iCurrentState( &iStateAliveInactive ),
-    iParentStateMachine( &aParentStateMachine )
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::SwitchToState()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAlive::SwitchToState( TAiState aState,
-    TAiStateChanges aStateChange )
-    {
-    switch( aState )
-        {
-        case EAiAliveInactive:
-            {
-            iCurrentState = &iStateAliveInactive;
-            break;
-            }
-        case EAiAliveActive:
-            {
-            iCurrentState = &iStateAliveActive;
-            break;
-            }
-        case EAiAliveIncall:
-            {
-            iCurrentState = &iStateAliveIncall;
-            break;
-            }
-        default:
-            {
-            iParentStateMachine->SwitchToState( aState, aStateChange );
-            return;
-            }
-        }   
-    iCurrentState->Enter( *this, aStateChange );
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::StateVariable()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateAlive::StateVariable( TAiStateVariable aStateVariable )
-    {
-    return iParentStateMachine->StateVariable( aStateVariable );
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::Plugin()
-// ----------------------------------------------------------------------------
-//
-CAiContentPublisher& TAiStateAlive::Plugin() const
-    {
-    return iParentStateMachine->Plugin();
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::TranslateReason()
-// ----------------------------------------------------------------------------
-//
-TAiTransitionReason TAiStateAlive::TranslateReason( 
-    TAiStateChanges aStateChange )
-    {
-    return iParentStateMachine->TranslateReason( aStateChange );
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::RestartSuspendTimer()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAlive::RestartSuspendTimer()
-    {
-    iParentStateMachine->RestartSuspendTimer();
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAlive::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Alive switch - enter" );
-    if( aStateMachine.StateVariable( ESMAICallStatus ) )
-        {
-        // If call is ongoing enter alive in call
-        iCurrentState = &iStateAliveIncall;
-        }
-    else if( !aStateMachine.StateVariable( ESMAILightStatus ) )
-        {
-        // If light is off enter alive inactive
-        iCurrentState = &iStateAliveInactive;
-        }
-    else
-        {
-        // Otherwise alive active
-        iCurrentState = &iStateAliveActive;
-        }
-    // finally call the Enter() method
-    iCurrentState->Enter( *this, aStateChange );
-    }
- 
-// ----------------------------------------------------------------------------
-// TAiStateAlive::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateAlive::HandleEvent( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Alive switch handle event" );
-
-    if( !iCurrentState->HandleEvent( *this, aStateChange ) )
-        {
-        // Only master state machine handles the "backup/restore on" and
-        // screen layout changed cases.
-        // Other event are forwarded to the currently active sub state.
-        // Other common events may be added here in the future also.
-        switch( aStateChange )
-            {
-            case ESMAIOffLine:
-            case ESMAIOnLine:
-            case ESMAIKeylockEnabled:
-            case ESMAIKeylockDisabled:
-            case ESMAIRelayoutScreen:
-            case ESMAIIdleForeground:
-            case ESMAIIdleBackground:
-            case ESMAIPageSwitch:
-            case ESMAIGeneralThemeChanged: // fallthrough
-                {
-                iCurrentState->Enter( *this, aStateChange );
-                // Handled the event ok
-                break;
-                }
-            case ESMAIInCall:
-                {
-                SwitchToState( EAiAliveIncall, aStateChange );
-                // Handled the event ok
-                break;
-                }
-            default:
-                {
-                // Neither current state or master handled this event
-                return EFalse;
-                }
-            }
-        }
-    // Current state handled the event
-    return ETrue;
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAlive::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Alive switch exit" );
-    iCurrentState->Exit( *this, aStateChange );
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateAlive::ChangePluginState()
-// ----------------------------------------------------------------------------
-//
-void TAiStateAlive::ChangePluginState( TAiTransitionReason aReason,       
-    void (CAiContentPublisher::*aStateChangeMethod)(TAiTransitionReason) )
-    {
-    iParentStateMachine->ChangePluginState( aReason, aStateChangeMethod );
-    }
-   
-// End of file
--- a/idlefw/src/framework/aistateidle.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State class for idle state
-*
-*/
-
-
-#include "aistateidle.h"
-#include "aipluginstatemachine.h"
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateIdle::TAiStateIdle()
-// ----------------------------------------------------------------------------
-//
-TAiStateIdle::TAiStateIdle()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateIdle::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateIdle::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Enter idle backup restore" );
-    const TAiTransitionReason reason( 
-            aStateMachine.TranslateReason( aStateChange ) );
-    
-    aStateMachine.ChangePluginState( reason, CAiContentPublisher::Stop );                                    
-    }
-    
-// ----------------------------------------------------------------------------
-// TAiStateIdle::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateIdle::HandleEvent( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Idle backup restore handle event" );
-    switch( aStateChange )
-        {
-        case ESMAIBackupOff:
-            {
-            aStateMachine.SwitchToState( EAiAlive, aStateChange );
-            return ETrue;
-            }
-        case ESMAIKeylockEnabled:
-        case ESMAIKeylockDisabled: // fallthrough
-            {
-            Enter( aStateMachine, aStateChange );
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateIdle::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateIdle::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges /*aStateChange*/ )
-    {
-    __PRINTS( "XAI: Exit idle backup restore" );
-    }
-
-// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/src/framework/aistatemanager.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,581 @@
+/*
+* 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:  State Manager
+*
+*/
+
+// System includes
+
+// User includes
+#include <hscontentpublisher.h>
+#include <aifwdefs.h>
+
+#include "aipluginfactory.h"
+
+#include "aistatemanager.h"
+
+#include "debug.h"
+
+// Constants
+_LIT( KOnlineOffline, "online_offline" );
+
+// ======== LOCAL FUNCTIONS ========
+// ----------------------------------------------------------------------------
+// StartReason
+// 
+// ----------------------------------------------------------------------------
+//
+static CHsContentPublisher::TStartReason StartReason( TAiFwLoadReason aReason )
+    {
+    CHsContentPublisher::TStartReason reason; 
+             
+    if ( aReason == EAiFwPageStartup )
+        {
+        reason = CHsContentPublisher::EPageStartup; 
+        }
+    else if ( aReason == EAiFwPluginStartup )
+        {
+        reason = CHsContentPublisher::EPluginStartup;
+        }
+    else
+        {
+        reason = CHsContentPublisher::ESystemStartup;
+        }
+    
+    return reason;
+    }
+
+// ----------------------------------------------------------------------------
+// StopReason
+// 
+// ----------------------------------------------------------------------------
+//
+static CHsContentPublisher::TStopReason StopReason( TAiFwDestroyReason aReason )
+    {
+    CHsContentPublisher::TStopReason reason; 
+             
+    if ( aReason == EAiFwPageShutdown )
+        {
+        reason = CHsContentPublisher::EPageShutdown; 
+        }
+    else if ( aReason == EAiFwPluginShutdown )
+        {
+        reason = CHsContentPublisher::EPluginShutdown;
+        }
+    else
+        {
+        reason = CHsContentPublisher::ESystemShutdown;
+        }
+    
+    return reason;
+    }
+
+// ======== MEMBER FUNCTIONS ========
+// ----------------------------------------------------------------------------
+// CAiStateManager::NewL()
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateManager* CAiStateManager::NewL( CAiPluginFactory& aFactory )
+    {
+    CAiStateManager* self = CAiStateManager::NewLC( aFactory );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::NewLC()
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateManager* CAiStateManager::NewLC( CAiPluginFactory& aFactory )
+    {
+    CAiStateManager* self = new ( ELeave ) CAiStateManager( aFactory );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::~CAiStateManager()
+// C++ default destructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateManager::~CAiStateManager()
+    {  
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::CAiStateManager()
+// C++ default constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateManager::CAiStateManager( CAiPluginFactory& aFactory )
+    : iFactory( aFactory )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::ConstructL()
+// 2nd phase constructor
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::ConstructL()
+    {        
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::NotifyStateChange()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::NotifyStateChange( TAiFwState aState )    
+    {       
+    if ( aState == EAiFwUiShutdown )
+        {     
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwUiShutdown" );
+        
+        iFlags.Set( EShutdown );
+        
+        DestroyPlugins();
+        
+        return;
+        }    
+    else if ( aState == EAiFwUiStartup )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwUiStartup" );
+        
+        iFlags.Clear( EShutdown );
+        
+        return;
+        }
+       
+    TBitFlags32 flags( iFlags );
+    
+    if ( aState == EAiFwForeground )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwForeground" );
+        
+        iFlags.Set( EIsForeground );                                    
+        }
+    else if ( aState == EAiFwBackground )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwBackground" );
+        
+        iFlags.Clear( EIsForeground );
+        }
+    else if ( aState == EAiFwBacklightOn )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwBacklightOn" );
+        
+        iFlags.Set( EIsLightsOn );
+        }
+    else if ( aState == EAiFwBacklightOff )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwBacklightOff" );
+        
+        iFlags.Clear( EIsLightsOn );
+        }
+    else if ( aState == EAiFwOnline )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwOnline" );
+        
+        iFlags.Set( EIsOnline );
+        
+        ProcessOnlineStateChange();
+        }
+    else if ( aState == EAiFwOffline )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwOffline" );
+        
+        iFlags.Clear( EIsOnline );
+        
+        ProcessOnlineStateChange();
+        }
+    else if ( aState == EAiFwGeneralThemeChange )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwGeneralThemeChange" );
+        
+        ProcessGeneralThemeChange();
+        }
+    else if ( aState == EAiFwBackupRestoreStart || 
+        aState == EAiFwBackupRestoreEnd )
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: EAiFwBackupRestoreStart/End" );
+        
+        ProcessBackupRestore( aState == EAiFwBackupRestoreStart );
+        }
+    else
+        {
+        __PRINTS( "CAiStateManager::NotifyStateChange, aState: Unknown" );
+        }
+
+    // State change evaluation and state change trial is done always here
+    __PRINTS( "CAiStateManager::NotifyStateChange, Run state change" );    
+    ProcessStateChange( EvaluateNextState() );            
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::NotifyLoadPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+TInt CAiStateManager::NotifyLoadPlugin( const THsPublisherInfo& aPublisherInfo,
+    TAiFwLoadReason aReason )
+    {                
+    __PRINT( __DBG_FORMAT( 
+        "CAiStateManager::NotifyLoadPlugin: name: %S, reason: %d " ), 
+              &aPublisherInfo.Name(), (TInt) aReason );      
+          
+    __TIME_MARK( time );
+      
+    // Create plugin
+    TInt retval( iFactory.CreatePlugin( aPublisherInfo ) );
+    
+    if ( retval == KErrNone )
+        {
+        CHsContentPublisher* plugin( iFactory.PluginByInfo( aPublisherInfo ) );
+
+        // Do startup state transition    
+        StartPlugin( *plugin, StartReason( aReason ) );            
+        }
+      
+    __TIME_ENDMARK( "CAiStateManager::NotifyLoadPlugin, construction", time );
+    
+    return retval;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::NotifyDestroyPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::NotifyDestroyPlugin( 
+    const THsPublisherInfo& aPublisherInfo, TAiFwDestroyReason aReason )    
+    {
+    __PRINT( __DBG_FORMAT( 
+        "CAiStateManager::NotifyDestroyPlugin: name: %S, reason: %d " ), 
+            &aPublisherInfo.Name(), (TInt)aReason );              
+    
+    __TIME_MARK( time );
+    
+    // Resolve plugin
+    CHsContentPublisher* plugin( iFactory.PluginByInfo( aPublisherInfo ) );
+            
+    if ( plugin )
+        {                  
+        // Do shutdown state transition
+        StopPlugin( *plugin, StopReason( aReason ) );
+        
+        // Destroy plugin
+        iFactory.DestroyPlugin( aPublisherInfo );                                    
+        }
+           
+    __TIME_ENDMARK( "CAiStateManager::DestroyPlugin, done", time );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::NotifyUpdatePlugins()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::NotifyUpdatePlugins()
+    {
+    __PRINTS( "CAiStateManager::NotifyUpdatePlugins" );
+    
+    RArray< THsPublisherInfo > publishers;
+        
+    // Get plugins which has upgrade available
+    TRAP_IGNORE( iFactory.ResolvePluginsToUpgradeL( publishers ) );
+    
+    for ( TInt i = 0; i < publishers.Count(); i++ )
+        {        
+        THsPublisherInfo info( publishers[i] );
+        
+        // Update by destroy - load sequence 
+        NotifyDestroyPlugin( info, EAiFwSystemShutdown );
+        NotifyLoadPlugin( info, EAiFwSystemStartup );         
+        }
+    
+    publishers.Reset();
+    
+    __PRINTS( "CAiStateManager::NotifyUpdatePlugins, done" );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::OnlineStateInUse()
+// 
+// ----------------------------------------------------------------------------
+//
+TBool CAiStateManager::OnlineStateInUse() const
+    {
+    __PRINTS( "CAiStateManager::OnlineStateInUse" );        
+    
+    RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+    
+    for( TInt i = 0; i < plugins.Count(); i++ )
+        {
+        CHsContentPublisher* plugin( plugins[i] );
+        
+        if ( plugin->HasMenuItem( KOnlineOffline() ) )
+            {
+            return ETrue;
+            }
+        }
+    
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::EvaluateNextState()
+// 
+// ----------------------------------------------------------------------------
+//
+CAiStateManager::TState CAiStateManager::EvaluateNextState() const
+    {
+    TState nextState( iCurrentState );
+        
+    if ( iFlags.IsSet( EIsForeground ) && iFlags.IsSet( EIsLightsOn ) )
+        {
+        nextState = EAlive;
+        }
+    else 
+        {
+        nextState = ESuspended;
+        } 
+
+    __PRINT( __DBG_FORMAT( 
+        "CAiStateManager::EvaluateNextState: current state: %d, next state: %d" ), 
+            (TInt)iCurrentState, (TInt)nextState );     
+    
+    return nextState;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::ProcessStateChange()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::ProcessStateChange( TState aNextState )
+    {
+    __PRINT( __DBG_FORMAT( 
+        "CAiStateManager::ProcessStateChange: current state: %d, next state: %d, halt: &d" ), 
+            (TInt)iCurrentState, (TInt)aNextState, iHalt );     
+        
+    __TIME_MARK( time );
+    
+    if ( aNextState != iCurrentState )
+        {
+        // Update state
+        iCurrentState = aNextState;
+        
+        RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+                       
+        // Process state for all
+        for( TInt i = 0; !iHalt && i < plugins.Count(); i++ )
+            {
+            CHsContentPublisher* plugin( plugins[i] );
+            
+            const THsPublisherInfo& info( plugin->PublisherInfo() );
+                
+            __PRINT( __DBG_FORMAT( 
+                "CAiStateManager::ProcessStateChange: name: %S" ), &info.Name() ); 
+            
+            if ( iCurrentState == EAlive )
+                {
+                __TIME( "CAiStateManager::ProcessStateChange, EAlive", 
+                        
+                plugin->Resume( CHsContentPublisher::EForeground ) );         
+                }
+            else if ( iCurrentState == ESuspended )
+                {
+                __TIME( "CAiStateManager::ProcessStateChange, ESuspended",
+                        
+                plugin->Suspend( CHsContentPublisher::EBackground ) );
+                }            
+            }
+        }
+    else
+        {
+        __PRINTS( "CAiStateManager::ProcessStateChange, no state change" );
+        }
+    
+    __TIME_ENDMARK( "CAiStateManager::ProcessStateChange, done", time );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::ProcessGeneralThemeChange()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::ProcessGeneralThemeChange()
+    {
+    __PRINTS( "CAiStateManager::ProcessGeneralThemeChange" );
+    __TIME_MARK( time );
+    
+    RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+            
+    for( TInt i = 0; i < plugins.Count(); i++ )
+        {
+        CHsContentPublisher* plugin( plugins[i] );
+        
+        plugin->Suspend( CHsContentPublisher::EGeneralThemeChange );
+                
+        // Resume publisher immediately if in alive state 
+        if( !iHalt && iCurrentState == EAlive )
+            {
+            plugin->Resume( CHsContentPublisher::EForeground );
+            }        
+        } 
+    
+    __TIME_ENDMARK( "CAiStateManager::ProcessGeneralThemeChange, done", time );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::ProcessBackupRestore()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::ProcessBackupRestore( TBool aStart )
+    {
+    __PRINTS( "CAiStateManager::ProcessBackupRestore" );
+    __TIME_MARK( time );
+    
+    iHalt = aStart;
+
+    RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+            
+    for( TInt i = 0; i < plugins.Count(); i++ )
+        {
+        CHsContentPublisher* plugin( plugins[i] );
+        
+        if ( aStart )
+            {
+            plugin->Suspend( CHsContentPublisher::EBackupRestore );
+            }
+        else
+            {
+            // Resume publisher immediately if in alive state
+            if ( !iHalt && iCurrentState == EAlive )
+                {
+                plugin->Resume( CHsContentPublisher::EForeground );
+                }
+            }
+        }
+            
+    __TIME_ENDMARK( "CAiStateManager::ProcessBackupRestore, done", time );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::ProcessOnlineStateChange()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::ProcessOnlineStateChange()
+    {
+    __PRINTS( "CAiStateManager::ProcessOnlineStateChange" );
+    
+    RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+    
+    for( TInt i = 0; i < plugins.Count(); i++ )
+        {
+        CHsContentPublisher* plugin( plugins[i] );
+        
+        if ( iFlags.IsSet( EIsOnline ) )
+            {
+            plugin->SetOnline();
+            }
+        else
+            {
+            plugin->SetOffline();
+            }
+        }               
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::StartPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::StartPlugin( CHsContentPublisher& aPlugin,
+    CHsContentPublisher::TStartReason aReason )
+    {
+    __PRINTS( "CAiStateManager::StartPlugin" );
+    
+    aPlugin.Start( aReason );
+    
+    if ( iCurrentState == EAlive )
+        {
+        aPlugin.Resume( CHsContentPublisher::EForeground );
+        }
+    else if ( iCurrentState == ESuspended )
+        {
+        aPlugin.Suspend( CHsContentPublisher::EBackground );
+        }    
+    
+    if ( iFlags.IsSet( EIsOnline ) )
+        {
+        aPlugin.SetOnline();
+        }
+    else
+        {
+        aPlugin.SetOffline();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::StopPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::StopPlugin( CHsContentPublisher& aPlugin,
+    CHsContentPublisher::TStopReason aReason )
+    {
+    __PRINTS( "CAiStateManager::StopPlugin" );
+                
+    if ( iCurrentState == EAlive )
+        {
+        aPlugin.Suspend( CHsContentPublisher::EBackground );
+        }
+    
+    aPlugin.Stop( aReason );                    
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateManager::DestroyPlugins()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateManager::DestroyPlugins()
+    {
+    __PRINTS( "CAiStateManager::DestroyPlugins, start" );    
+    __TIME_MARK( time );
+    
+    RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() );
+    
+    for ( TInt i = 0; i < plugins.Count(); i++ )
+        {
+        CHsContentPublisher* plugin( plugins[i] );
+
+        // Do shutdown state transition
+        StopPlugin( *plugin, CHsContentPublisher::ESystemShutdown );        
+        }    
+    
+    // Finally get rid of all plugins
+    plugins.ResetAndDestroy();
+    
+    __TIME_ENDMARK( "CAiStateManager::DestroyPlugins, done", time );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/src/framework/aistateprovider.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -0,0 +1,282 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  State Provider
+*
+*/
+
+// System includes
+#include <AknDef.h>
+#include <connect/sbdefs.h>
+#include <e32property.h>
+
+// User includes
+#include <aipspropertyobserver.h>
+#include <aiutility.h>
+#include <aifwdefs.h>
+#include "aiecomobserver.h"
+#include "aistateobserver.h"
+
+#include "aistateprovider.h"
+
+// Constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::NewL()
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateProvider* CAiStateProvider::NewL( 
+    MAiStateObserver& aObserver, CCoeEnv& aCoeEnv )
+    {
+    CAiStateProvider* self = 
+        CAiStateProvider::NewLC( aObserver, aCoeEnv );
+    
+    CleanupStack::Pop( self );
+    
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::NewLC()
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateProvider* CAiStateProvider::NewLC( 
+    MAiStateObserver& aObserver, CCoeEnv& aCoeEnv )
+    {
+    CAiStateProvider* self = 
+        new ( ELeave ) CAiStateProvider( aObserver, aCoeEnv );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::~CAiStateProvider()
+// C++ default destructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateProvider::~CAiStateProvider()
+    {        
+    iObserver.NotifyStateChange( EAiFwUiShutdown );
+    
+    iCoeEnv.RemoveMessageMonitorObserver( *this );
+    
+    delete iEcomObserver;
+    
+    iSkinSrv.Close();
+           
+    Release( iBackupRestoreObserver );
+    
+    delete iLightObserver;       
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::CAiStateProvider()
+// C++ default constructor.
+// ----------------------------------------------------------------------------
+//
+CAiStateProvider::CAiStateProvider( MAiStateObserver& aObserver, 
+    CCoeEnv& aCoeEnv )     
+    : iObserver( aObserver ), iCoeEnv( aCoeEnv )
+    {  
+    iObserver.NotifyStateChange( EAiFwUiStartup );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::ConstructL()
+// 2nd phase constructor
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::ConstructL()
+    {
+    iLightObserver = CHWRMLight::NewL( this );
+    
+    iBackupRestoreObserver = AiUtility::CreatePSPropertyObserverL(
+        TCallBack( BackupRestoreEvent, this ),
+        KUidSystemCategory, conn::KUidBackupRestoreKey );
+    
+    User::LeaveIfError( iSkinSrv.Connect( this ) );
+       
+    iEcomObserver = CAiEcomObserver::NewL();
+    iEcomObserver->AddObserverL( this );
+    
+    iCoeEnv.AddMessageMonitorObserverL( *this );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::MonitorWsMessage()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::MonitorWsMessage( const TWsEvent& aEvent )
+    {
+    TInt type( aEvent.Type() );
+    
+    if ( type == KAknFullOrPartialForegroundGained )
+        {
+        iObserver.NotifyStateChange( EAiFwForeground );
+        }
+    else if ( type == KAknFullOrPartialForegroundLost )
+        {
+        iObserver.NotifyStateChange( EAiFwBackground );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::LightStatusChanged()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::LightStatusChanged( TInt aTarget, 
+    CHWRMLight::TLightStatus aStatus )
+    {
+    if ( aTarget == CHWRMLight::EPrimaryDisplay )
+        {
+        if ( aStatus == CHWRMLight::ELightOn )
+            {
+            iObserver.NotifyStateChange( EAiFwBacklightOn );
+            }
+        else if ( aStatus == CHWRMLight::ELightOff )
+            {
+            iObserver.NotifyStateChange( EAiFwBacklightOff );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::SkinContentChanged()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::SkinContentChanged()
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::SkinConfigurationChanged()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::SkinConfigurationChanged(
+    const TAknsSkinStatusConfigurationChangeReason aReason )
+    {
+    if ( aReason == EAknsSkinStatusConfigurationDeployed )
+        {
+        iObserver.NotifyStateChange( EAiFwGeneralThemeChange );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::SkinPackageChanged()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::SkinPackageChanged(
+    const TAknsSkinStatusPackageChangeReason /*aReason*/ )
+    {    
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::NotifyEcomRegistryChanged()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::NotifyEcomRegistryChanged()
+    {
+    iObserver.NotifyUpdatePlugins();
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::LoadPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+TInt CAiStateProvider::LoadPlugin( const THsPublisherInfo& aPublisherInfo, 
+    TAiFwLoadReason aReason )
+    {
+    return iObserver.NotifyLoadPlugin( aPublisherInfo, aReason );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::DestroyPlugin()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::DestroyPlugin( const THsPublisherInfo& aPublisherInfo,
+    TAiFwDestroyReason aReason )
+    {
+    iObserver.NotifyDestroyPlugin( aPublisherInfo, aReason );
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::ChangePluginState()
+// 
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::ChangePluginState( TAiFwState aState )    
+    {
+    if ( aState == EAiFwOnline || aState == EAiFwOffline )
+        {
+        iObserver.NotifyStateChange( aState );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::OnlineStateInUse()
+// 
+// ----------------------------------------------------------------------------
+//
+TBool CAiStateProvider::OnlineStateInUse() const
+    {
+    return iObserver.OnlineStateInUse();
+    }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::BackupRestoreEvent()
+// 
+// ----------------------------------------------------------------------------
+//
+/* static */ TInt CAiStateProvider::BackupRestoreEvent( TAny* aAny )
+    {
+    CAiStateProvider* self = static_cast< CAiStateProvider* >( aAny );
+
+    const TUint mask( conn::KBURPartTypeMask ^ conn::EBURNormal );
+    
+    TInt value( 0 );
+    
+    if ( self->iBackupRestoreObserver->Get( value ) == KErrNone )
+        {
+        if ( value & mask )
+            {
+            // Any type of backup or restore operation
+            self->iObserver.NotifyStateChange( EAiFwBackupRestoreStart );
+            }
+        else
+            {
+            self->iObserver.NotifyStateChange( EAiFwBackupRestoreEnd ); 
+            }
+        }
+    
+    return KErrNone;
+    }
+
+// End of file
+
--- a/idlefw/src/framework/aistatesuspended.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  State class for suspended state
-*
-*/
-
-
-#include "aistatesuspended.h"
-#include "aipluginstatemachine.h"
-#include "debug.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------------
-// TAiStateSuspended::TAiStateSuspended()
-// ----------------------------------------------------------------------------
-//
-TAiStateSuspended::TAiStateSuspended()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateSuspended::Enter()
-// ----------------------------------------------------------------------------
-//
-void TAiStateSuspended::Enter( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Enter Suspended" );
-    const TAiTransitionReason reason( 
-            aStateMachine.TranslateReason( aStateChange ) );
-
-    aStateMachine.ChangePluginState( reason, &CAiContentPublisher::Suspend );                                    
-    }
-    
-// ----------------------------------------------------------------------------
-// TAiStateSuspended::HandleEvent()
-// ----------------------------------------------------------------------------
-//
-TBool TAiStateSuspended::HandleEvent( MAiPluginStateMachine& aStateMachine,
-    TAiStateChanges aStateChange )
-    {
-    __PRINTS( "XAI: Suspended handle event" );
-    switch( aStateChange )
-        {
-        case ESMAIIdleForeground:
-        case ESMAIBacklightOn:
-        case ESMAILocaleChanged:
-        case ESMAITimeChanged:
-        case ESMAIMidnightCrossover:
-        case ESMAIRelayoutScreen:
-        case ESMAIGeneralThemeChanged:
-        case ESMAIInCall: // fallthrough
-            {
-            aStateMachine.SwitchToState( EAiAlive, aStateChange );
-            return ETrue;
-            }
-        case ESMAIKeylockEnabled:
-        case ESMAIKeylockDisabled:
-            {
-            Enter( aStateMachine, aStateChange );
-            return ETrue;
-            }
-        default:
-            {
-            return EFalse;
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// TAiStateSuspended::Exit()
-// ----------------------------------------------------------------------------
-//
-void TAiStateSuspended::Exit( MAiPluginStateMachine& /*aStateMachine*/,
-    TAiStateChanges /*aStateChange*/ )
-    {
-    __PRINTS( "XAI: Exit Suspended" );
-    }
-   
--- a/idlefw/src/framework/aiuicontrollermanager.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/src/framework/aiuicontrollermanager.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,18 +15,19 @@
 *
 */
 
+// System includes
+#include <centralrepository.h>
 
-#include "aiuicontrollermanager.h"
+// User includes
+#include <aisystemuids.hrh>
 #include "aiuicontroller.h"
-#include "aicontentpublisher.h"
 #include "aicontentobserver.h"
 #include "activeidle2domaincrkeys.h"
+#include "aifw.h"
+
+#include "aiuicontrollermanager.h"
+
 #include "aifwpanic.h"
-#include <ecom/ecom.h>
-#include <ecom/implementationinformation.h>
-#include <centralrepository.h>
-
-#include <aisystemuids.hrh>
 
 #include "debug.h"
 
@@ -34,6 +35,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::CAiUiControllerManager()
+//
 // ----------------------------------------------------------------------------
 //
 CAiUiControllerManager::CAiUiControllerManager()
@@ -42,15 +44,15 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::LoadMainControllerL()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiUiControllerManager::LoadMainControllerL(
-    CRepository& aCenRepConfig )
+void CAiUiControllerManager::LoadMainControllerL( CRepository& aRepository )    
     {
     TInt value( 0 );
     
     // Main UI Controller must be configured correctly
-    User::LeaveIfError( aCenRepConfig.Get( KAiMainUIController, value ) );
+    User::LeaveIfError( aRepository.Get( KAiMainUIController, value ) );
     
     CAiUiController* controller = CAiUiController::NewL( TUid::Uid( value ) );
     
@@ -67,24 +69,22 @@
         }
     
     iUiControllerArray.AppendL( controller );
-    CleanupStack::Pop( controller );
-    
-    // Register this as a UI framework observer of the main UI controller
-    iMainUiController->SetUiFrameworkObserver( *this );
+    CleanupStack::Pop( controller );    
     }
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::LoadSecondaryControllersL()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::LoadSecondaryControllersL(
-    CRepository& aCenRepConfig )
+    CRepository& aRepository )
     {
     TInt value( 0 );
     
     // Instantiate rest of the UI controllers.
     for( TInt key = KAiFirstUIController; 
-         key <= KAiLastUIController && aCenRepConfig.Get( key, value ) == KErrNone;
+         key <= KAiLastUIController && aRepository.Get( key, value ) == KErrNone;
         ++key )
         {
         // skip empty entries
@@ -106,77 +106,48 @@
         CleanupStack::PushL( controller );
         
         iUiControllerArray.AppendL( controller );
-        CleanupStack::Pop( controller );
-        
-        // Get the secondary interface
-        MAiSecondaryUiController* secController( 
-                    controller->SecondaryInterface() ); 
-                        
-        if( secController )
-            {
-            MAiUiFrameworkObserver* uiFwObserver(
-                    secController->UiFrameworkObserver() );
-        
-            if( uiFwObserver )
-                {
-                // Add secondary controller as UI framework event observer. 
-                User::LeaveIfError( 
-                        iUiFrameworkObservers.InsertInAddressOrder( uiFwObserver ) );
-                }
-            }
+        CleanupStack::Pop( controller );        
         }
     }
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::ConstructL()
+//
 // ----------------------------------------------------------------------------
 //
-void CAiUiControllerManager::ConstructL()
+void CAiUiControllerManager::ConstructL( CAiFw* aAiFw )
     {
     __HEAP("FW: Init - Create UI Ctrls");
     __TIME_MARK(t);
-
-    CRepository* cenRep( NULL );
-
-#if 0
-    // For AI3_test    
-    RProcess proc;
-    // 0x102750F0 in AI3, 0x2001CB4F in AI3_Test
-    TSecureId secId( proc.SecureId() ); 
-                                           
-    if( secId == 0x2001CB4F )
-        {
-        cenRep = CRepository::NewL( TUid::Uid( 0x2001952B ) );
-        }   
-    else
-        {
-        cenRep = CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
-        }
-#else
-    cenRep = CRepository::NewLC( TUid::Uid( KCRUidActiveIdleLV ) );
-#endif
-
-    LoadMainControllerL( *cenRep );
+   
+    CRepository& repository( aAiFw->Repository() );
+    
+    LoadMainControllerL( repository );
     
     // Failing on secondary is not fatal. Ignore leaves.
-    TRAP_IGNORE( LoadSecondaryControllersL( *cenRep ) );
-                       
-    CleanupStack::PopAndDestroy( cenRep );
-    
+    TRAP_IGNORE( LoadSecondaryControllersL( repository ) );
+                           
+    for ( TInt i = 0; i < iUiControllerArray.Count(); i++ )
+        {
+        iUiControllerArray[i]->SetEventHandler( *aAiFw );
+        }
+        
     __TIME_ENDMARK("FW: Create UI Ctrls", t);
     __HEAP("FW: Done - Create UI Ctrls");
     }
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::NewL()
+//
 // ----------------------------------------------------------------------------
 //
-CAiUiControllerManager* CAiUiControllerManager::NewL()
+CAiUiControllerManager* CAiUiControllerManager::NewL( CAiFw* aAiFw )
     {
-    CAiUiControllerManager* self = new (ELeave) CAiUiControllerManager;
+    CAiUiControllerManager* self = 
+        new ( ELeave ) CAiUiControllerManager;
     
     CleanupStack::PushL( self );
-    self->ConstructL();
+    self->ConstructL( aAiFw );
     CleanupStack::Pop( self ); // self
     
     return self;
@@ -184,19 +155,19 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::~CAiUiControllerManager()
+//
 // ----------------------------------------------------------------------------
 //
 CAiUiControllerManager::~CAiUiControllerManager()
     {
     iUiControllerArray.ResetAndDestroy();
-    
-    iUiFrameworkObservers.Reset();
-    
+           
     iCreatedUICList.Reset();
     }
 
 // ----------------------------------------------------------------------------
-// CAiUiControllerManager::UiControllers() 
+// CAiUiControllerManager::UiControllers()
+//
 // ----------------------------------------------------------------------------
 //
 RPointerArray< CAiUiController >& CAiUiControllerManager::UiControllers() const
@@ -206,6 +177,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::IsMainUiController()
+//
 // ----------------------------------------------------------------------------
 //
 TBool CAiUiControllerManager::IsMainUiController(
@@ -215,20 +187,8 @@
     }
 
 // ----------------------------------------------------------------------------
-// CAiUiControllerManager::SetEventHandler()
-// ----------------------------------------------------------------------------
+// CAiUiControllerManager::RunApplicationL()
 //
-void CAiUiControllerManager::SetEventHandler(
-    MAiFwEventHandler& aEventHandler )
-    {
-    for ( TInt i = 0; i < iUiControllerArray.Count(); i++ )
-        {
-        iUiControllerArray[i]->SetEventHandler( aEventHandler );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::RunApplicationL()
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::RunApplicationL()
@@ -238,6 +198,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::ActivateUI()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::ActivateUI()
@@ -250,6 +211,7 @@
     
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::LoadUIDefinition()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::LoadUIDefinition()
@@ -290,6 +252,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::CoeEnv()
+//
 // ----------------------------------------------------------------------------
 //
 CCoeEnv& CAiUiControllerManager::CoeEnv() const
@@ -299,6 +262,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::MainUiController()
+//
 // ----------------------------------------------------------------------------
 //
 MAiMainUiController& CAiUiControllerManager::MainUiController() const
@@ -308,6 +272,7 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::DestroySecondaryUiControllers()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::DestroySecondaryUiControllers()
@@ -328,82 +293,25 @@
 
 // ----------------------------------------------------------------------------
 // CAiUiControllerManager::ExitMainController()
+//
 // ----------------------------------------------------------------------------
 //
 void CAiUiControllerManager::ExitMainController()
     {
     iMainUiController->Exit();
     }
-
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::AddObserverL()
-// ----------------------------------------------------------------------------
-//
-void CAiUiControllerManager::AddObserverL( 
-    MAiUiFrameworkObserver& aUiFwObserver )
-    {
-    User::LeaveIfError( 
-            iUiFrameworkObservers.InsertInAddressOrder( &aUiFwObserver ) );
-    }
-
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::RemoveObserver()
+    
 // ----------------------------------------------------------------------------
+// CAiUiControllerManager::SetStateHandler()
 //
-void CAiUiControllerManager::RemoveObserver( 
-    MAiUiFrameworkObserver& aUiFwObserver )
-    {
-    TInt index( iUiFrameworkObservers.FindInAddressOrder( &aUiFwObserver ) );
-    
-    if( index != KErrNotFound )
-        {
-        iUiFrameworkObservers.Remove( index );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::RemovePluginFromUI()
 // ----------------------------------------------------------------------------
 //
-void CAiUiControllerManager::RemovePluginFromUI( CAiContentPublisher& aPlugin )
+void CAiUiControllerManager::SetStateHandler( MAiFwStateHandler& aHandler )
     {
-    // Get MAiPropertyExtension from plugin
-    MAiPropertyExtension* plugin =
-        static_cast< MAiPropertyExtension* >( 
-                aPlugin.Extension( KExtensionUidProperty ) );
-    
-    // Inform all UI controller that this plugin need to be removed from UI.
-    if( plugin )
+    for ( TInt i = 0; i < iUiControllerArray.Count(); i++ )
         {
-        for ( TInt i = 0; i < iUiControllerArray.Count(); i++ )
-            {
-            iUiControllerArray[i]->RemovePluginFromUI( *plugin );
-            }
-        }
+        iUiControllerArray[i]->SetStateHandler( aHandler );
+        }    
     }
 
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::HandleResourceChange()
-// ----------------------------------------------------------------------------
-//
-void CAiUiControllerManager::HandleResourceChange( TInt aType )
-    {
-    for( TInt i = 0; i < iUiFrameworkObservers.Count(); i++ )
-        {
-        iUiFrameworkObservers[i]->HandleResourceChange( aType );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CAiUiControllerManager::HandleForegroundEvent()
-// ----------------------------------------------------------------------------
-//
-void CAiUiControllerManager::HandleForegroundEvent( TBool aForeground )
-    {
-    for( TInt i = 0; i < iUiFrameworkObservers.Count(); i++ )
-        {
-        iUiFrameworkObservers[i]->HandleForegroundEvent( aForeground );
-        }
-    }
-    
 // End of file
--- a/idlefw/src/framework/aiuiframeworkobserverimpl.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  UI framework observer for Active Idle framework
-*
-*/
-
-
-#include <AknsConstants.h> // for KAknsMessageSkinChange equal general theme changed
-#include "aiuiframeworkobserverimpl.h"
-#include "debug.h"
-
-CAiUiFrameworkObserverImpl::CAiUiFrameworkObserverImpl( MAiStateManager& aManager )
-  : iManager( aManager )
-    {
-    }
-
-void CAiUiFrameworkObserverImpl::ConstructL()
-    {
-    }
-
-CAiUiFrameworkObserverImpl* CAiUiFrameworkObserverImpl::NewL( MAiStateManager& aManager )
-                                                              
-    {
-    CAiUiFrameworkObserverImpl* self = 
-                        new(ELeave) CAiUiFrameworkObserverImpl( aManager );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-CAiUiFrameworkObserverImpl::~CAiUiFrameworkObserverImpl()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// From class MAiUiFrameworkObserver.
-// 
-// ---------------------------------------------------------------------------
-//
-void CAiUiFrameworkObserverImpl::HandleResourceChange( TInt aType )
-    {
-    switch( aType )
-        {
-        case KAknsMessageSkinChange:
-            {
-            iManager.ReportStateChange( ESMAIGeneralThemeChanged );
-            break;
-            }
-        default:
-            {
-            // Do nothing
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MAiUiFrameworkObserver.
-// 
-// ---------------------------------------------------------------------------
-//    
-void CAiUiFrameworkObserverImpl::HandleForegroundEvent( TBool /*aForeground*/ )
-    {
-    // Focus observer disabled from this location
-    }
-    
-// ---------------------------------------------------------------------------
-// From class MAiDeviceStatusObserver.
-// 
-// ---------------------------------------------------------------------------
-//
-TAiStateChanges CAiUiFrameworkObserverImpl::Status()
-    {
-    // Resource change event are by nature single shot, so no status can 
-    // be defined for them.
-    return ESMAIUnknownState;
-    }
--- a/idlefw/src/idleint/aiuiidleintegration.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/src/idleint/aiuiidleintegration.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -106,16 +106,10 @@
             ->PushContextL( aKeySoundConfig.iContextResId );            
         }
     
-    // Set Active Idle application to be system application and disable
-    // priority switching performed by window server.
     iEikEnv.SetSystem( ETrue );
-    iEikEnv.WsSession().ComputeMode( RWsSession::EPriorityControlDisabled ); 
-             
+                 
     // Eikon server window group
     iThisApplicationWgId = iEikEnv.RootWin().Identifier();
-
-    iEikEnv.RootWin().EnableFocusChangeEvents(); 
-    iEikEnv.RootWin().EnableGroupChangeEvents();
     
     CApaWindowGroupName::FindByAppUid( KAknCapServerUid, 
                                        iEikEnv.WsSession(), 
--- a/idlefw/src/utility/caiplugintool.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/idlefw/src/utility/caiplugintool.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -15,14 +15,29 @@
 *
 */
 
+// System includes
 
-#include <aicontentpublisher.h>
+// User includes 
+#include <hscontentpublisher.h>
+
 #include "caiplugintool.h"
 
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CAiPluginTool::CAiPluginTool
+//
+// ----------------------------------------------------------------------------
+//
 CAiPluginTool::CAiPluginTool()
     {
     }
 
+// ----------------------------------------------------------------------------
+// CAiPluginTool::NewL
+//
+// ----------------------------------------------------------------------------
+//
 CAiPluginTool* CAiPluginTool::NewL()
     { 
     CAiPluginTool* self = new ( ELeave ) CAiPluginTool();
@@ -32,59 +47,37 @@
     return self;
     }
 
+// ----------------------------------------------------------------------------
+// CAiPluginTool::ConstructL
+//
+// ----------------------------------------------------------------------------
+//
 void CAiPluginTool::ConstructL()
     {
     }
 
+// ----------------------------------------------------------------------------
+// CAiPluginTool::Release
+//
+// ----------------------------------------------------------------------------
+//
 void CAiPluginTool::Release()
     {
     delete this;
     }
-    
-const TAiPublisherInfo* CAiPluginTool::PublisherInfoL(
-                                        CAiContentPublisher& aContentPublisher )
+
+// ----------------------------------------------------------------------------
+// CAiPluginTool::ContentItemIterator
+//
+// ----------------------------------------------------------------------------
+//
+MAiContentItemIterator* CAiPluginTool::ContentItemIterator(
+    CHsContentPublisher& aContentPublisher,
+    CHsContentPublisher::TProperty aType )
     {
-    const TAiPublisherInfo* result = NULL;
-    MAiPropertyExtension* propExt = PropertyExt( aContentPublisher );
-    if ( propExt )
-        {
-        result = propExt->PublisherInfoL();
-        }
-    return result;
+    return static_cast< MAiContentItemIterator* >( 
+        aContentPublisher.GetProperty( aType ) );
     }
     
-MAiContentItemIterator* CAiPluginTool::ContentItemIteratorL(
-                                        CAiContentPublisher& aContentPublisher,
-                                        TInt aContentType )
-    {
-    MAiContentItemIterator* result = NULL;
-    MAiPropertyExtension* propExt = PropertyExt( aContentPublisher );
-    if ( propExt )
-        {
-        TAny* prop = NULL;
-        prop = propExt->GetPropertyL( aContentType );
-        if ( prop )
-            {
-            result = static_cast<MAiContentItemIterator*>( prop );
-            }
-        }
-    return result;
-    }
-    
-MAiPropertyExtension* CAiPluginTool::PropertyExt(
-                                        CAiContentPublisher& aContentPublisher )
-    {
-    return static_cast<MAiPropertyExtension*>(
-                        aContentPublisher.Extension( KExtensionUidProperty ) );
-    }
-
-MAiEventHandlerExtension* CAiPluginTool::EventHandlerExt(
-                                        CAiContentPublisher& aContentPublisher )
-    {
-    return static_cast<MAiEventHandlerExtension*>(
-                        aContentPublisher.Extension( KExtensionUidEventHandler ) );
-    }
-
  // End of File.
 
-
--- a/menucontentsrv/srvsrc/mcsrunningappswgmonitor.cpp	Tue Feb 02 00:23:10 2010 +0200
+++ b/menucontentsrv/srvsrc/mcsrunningappswgmonitor.cpp	Fri Feb 19 23:07:29 2010 +0200
@@ -24,6 +24,9 @@
 #include "mcsrunningappshandler.h"
 #include "menueng.h"
 
+const TInt KWindowGroupPosition = -1;
+const TInt KWindowGroupPriority = -1;
+
 // ---------------------------------------------------------
 // CMcsRunningAppsWgMonitor::NewL
 // ---------------------------------------------------------
@@ -91,9 +94,8 @@
     iWg.DisableModifierChangedEvents();
     iWg.DisableOnEvents();
     iWg.DisableScreenChangeEvents();
-
+    iWg.SetOrdinalPosition( KWindowGroupPosition, KWindowGroupPriority );
     User::LeaveIfError( iWg.EnableGroupListChangeEvents() );    
-    
     //it makes the soft keys working
     iWg.EnableReceiptOfFocus( EFalse );