Revision: 201033 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:35:44 +0300
branchRCL_3
changeset 57 05bc53fe583b
parent 55 fc7b30ed2058
child 58 83ca720e2b9a
Revision: 201033 Kit: 201035
accesspointcontrol/apcontrollistplugin/data/10281BB4.rss
accesspointcontrol/apcontrollistplugin/data/apcontrollistpluginrsc.rss
accesspointcontrol/apcontrollistplugin/group/apcontrollistplugin.mmp
accesspointcontrol/apcontrollistplugin/group/apcontrollistpluginicons_dc.mk
accesspointcontrol/apcontrollistplugin/group/bld.inf
accesspointcontrol/apcontrollistplugin/inc/apcontrollistapiwrapper.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistbox.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistboxmodel.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistcapschange.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.hrh
accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugincontainer.h
accesspointcontrol/apcontrollistplugin/inc/apcontrollistpluginlogger.h
accesspointcontrol/apcontrollistplugin/loc/apcontrollistplugin.loc
accesspointcontrol/apcontrollistplugin/rom/APControlListPlugin.iby
accesspointcontrol/apcontrollistplugin/rom/APControlListPluginResources.iby
accesspointcontrol/apcontrollistplugin/src/apcontrollistapiwrapper.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistbox.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistboxmodel.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistcapschange.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistplugin.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistplugincontainer.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistpluginimplementationtable.cpp
accesspointcontrol/apcontrollistplugin/src/apcontrollistpluginlogger.cpp
alwayson_net_plugin/pdpcontextmanager2/conf/pdpcontextmanager2.confml
alwayson_net_plugin/pdpcontextmanager2/src/10281f41.rss
alwayson_net_plugin/pdpcontextmanager2/src/alwaysonlinepdpplugin.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoconnection.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitor.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoraumanager.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caoserver.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caotimer.cpp
alwayson_net_plugin/pdpcontextmanager2/src/cenrepobserver.cpp
alwayson_net_plugin/pdpcontextmanager2/src/linger.cpp
apengine/apeng/group/APEngine.MMP
apengine/apeng/src/APAccessPointItem.cpp
apengine/apeng/src/APDataHandler.cpp
apengine/apeng/src/VpnApItem.cpp
apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp
apengine/apsettingshandlerui/inc/ApSelPopupList.h
apengine/apsettingshandlerui/inc/ApSettingsModel.h
apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp
apengine/apsettingshandlerui/src/ApSelPopupList.cpp
apengine/apsettingshandlerui/src/ApSelectorDialog.cpp
apengine/apsettingshandlerui/src/ApSettingsDlg.cpp
apengine/apsettingshandlerui/src/ApSettingsModel.cpp
apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp
apengine/apsettingsplugin/data/1020736C.rss
apengine/apsettingsplugin/data/ApSettingsPluginRsc.rss
apengine/apsettingsplugin/group/ApSettingsPlugin.mmp
apengine/apsettingsplugin/group/apsettingspluginicons.mk
apengine/apsettingsplugin/group/bld.inf
apengine/apsettingsplugin/inc/APSettingsPlugin.h
apengine/apsettingsplugin/inc/utilities.h
apengine/apsettingsplugin/loc/apsettingsplugin.loc
apengine/apsettingsplugin/rom/ApSettingsPlugin.iby
apengine/apsettingsplugin/rom/ApSettingsPluginResources.iby
apengine/apsettingsplugin/src/APSettingsPlugin.cpp
apengine/apsettingsplugin/src/ApSettingsPluginImplementationTable.cpp
apengine/apsettingsplugin/src/utilities.cpp
apengine/group/bld.inf
bearermanagement/S60MCPR/inc/s60extendedtmselector.h
bearermanagement/S60MCPR/inc/s60mcpr.h
bearermanagement/S60MCPR/inc/s60mpmpolicyinterfaces.h
bearermanagement/S60MCPR/inc/s60tiermanagerselector.h
bearermanagement/S60MCPR/src/s60extendedtmselector.cpp
bearermanagement/S60MCPR/src/s60mcprerrorrecoveryactivity.cpp
bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp
bearermanagement/S60MCPR/src/s60mcprstates.cpp
bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp
bearermanagement/mpm/bwins/mpmdefaultconnectionu.def
bearermanagement/mpm/conf/mpmvpntoggleapi.confml
bearermanagement/mpm/conf/mpmvpntoggleapi_20016a88.crml
bearermanagement/mpm/eabi/mpmdefaultconnectionu.def
bearermanagement/mpm/group/bld.inf
bearermanagement/mpm/group/mpmdefaultconnectionclient.mmp
bearermanagement/mpm/group/mpmserver.mmp
bearermanagement/mpm/inc/mpmcommsdataccess.h
bearermanagement/mpm/inc/mpmconnmonevents.h
bearermanagement/mpm/inc/mpmdefaultconnection.h
bearermanagement/mpm/inc/mpmdefaultconnserver.h
bearermanagement/mpm/inc/mpmdefaultconnserversession.h
bearermanagement/mpm/inc/mpmdialog.h
bearermanagement/mpm/inc/mpmdisconnectdlg.h
bearermanagement/mpm/inc/mpmiapselection.h
bearermanagement/mpm/inc/mpmlogger.h
bearermanagement/mpm/inc/mpmofflinewatcher.h
bearermanagement/mpm/inc/mpmserver.h
bearermanagement/mpm/inc/mpmserver.inl
bearermanagement/mpm/inc/mpmserversession.h
bearermanagement/mpm/inc/mpmserversession.inl
bearermanagement/mpm/inc/mpmstarter.h
bearermanagement/mpm/inc/mpmvpntogglewatcher.h
bearermanagement/mpm/inc/mpmwlanquerydialog.h
bearermanagement/mpm/inc/rmpm.h
bearermanagement/mpm/inc/rmpm.inl
bearermanagement/mpm/src/mpmcommsdataccess.cpp
bearermanagement/mpm/src/mpmconfirmdlgroaming.cpp
bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp
bearermanagement/mpm/src/mpmconnmonevents.cpp
bearermanagement/mpm/src/mpmconnmonreqs.cpp
bearermanagement/mpm/src/mpmdatausagewatcher.cpp
bearermanagement/mpm/src/mpmdefaultconnection.cpp
bearermanagement/mpm/src/mpmdefaultconnserver.cpp
bearermanagement/mpm/src/mpmdefaultconnserversession.cpp
bearermanagement/mpm/src/mpmdialog.cpp
bearermanagement/mpm/src/mpmdisconnectdlg.cpp
bearermanagement/mpm/src/mpmiapselection.cpp
bearermanagement/mpm/src/mpmofflinewatcher.cpp
bearermanagement/mpm/src/mpmserver.cpp
bearermanagement/mpm/src/mpmserversession.cpp
bearermanagement/mpm/src/mpmstarter.cpp
bearermanagement/mpm/src/mpmvpntogglewatcher.cpp
bearermanagement/mpm/src/mpmwlanquerydialog.cpp
bearermanagement/mpm/src/rmpmdefaultconnection.cpp
cmmanager/cmapplsettingsui/bwins/cmapplsettingsuiu.def
cmmanager/cmapplsettingsui/cmapplsettingsui.pro
cmmanager/cmapplsettingsui/eabi/cmapplsettingsuiu.def
cmmanager/cmapplsettingsui/inc/cmapplsettingsui_p.h
cmmanager/cmapplsettingsui/inc/cmradiodialog.h
cmmanager/cmapplsettingsui/inc/cmsettingdata.h
cmmanager/cmapplsettingsui/res/cmapplsettingsui.qrc
cmmanager/cmapplsettingsui/res/cmradiodialog.docml
cmmanager/cmapplsettingsui/rom/cmapplsettingsui.iby
cmmanager/cmapplsettingsui/rom/cmapplsettingsui_resources.iby
cmmanager/cmapplsettingsui/src/cmapplsettingsui.cpp
cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp
cmmanager/cmapplsettingsui/src/cmradiodialog.cpp
cmmanager/cmapplsettingsui/src/cmsettingdata.cpp
cmmanager/cmapplsettingsui/traces/OstTraceDefinitions.h
cmmanager/cmapplsettingsui/tsrc/tsrc.pro
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/inc/applsettester.h
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.docml
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.qrc
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui.iby
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui_stub.pkg
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui_stub.sis
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/src/applsettester.cpp
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/src/tst_applsettingsui.cpp
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/tst_applsettingsui.pro
cmmanager/cmapplsettingsui/tsrc/ut/hbautotest.cpp
cmmanager/cmapplsettingsui/tsrc/ut/hbautotest.h
cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.cpp
cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.h
cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.pro
cmmanager/cmapplsettingsui/tsrc/ut/tools/applsettingsui_ctc.bat
cmmanager/cmapplsettingsui/tsrc/ut/tools/commsdat_restore.bat
cmmanager/cmapplsettingsui/tsrc/ut/tools/commsdat_set.bat
cmmanager/cmapplsettingsui/tsrc/ut/tools/default.cre
cmmanager/cmmanager.pro
cmmanager/cmmgr/Framework/BWinsCw/CmManager_prot_setupU.DEF
cmmanager/cmmgr/Framework/EABI/CmManager_prot_setupU.def
cmmanager/cmmgr/Framework/Group/bld.inf
cmmanager/cmmgr/Framework/Group/cmmanager.mmp
cmmanager/cmmgr/Framework/Group/framework_icons.mk
cmmanager/cmmgr/Framework/Inc/ccmdexec.h
cmmanager/cmmgr/Framework/Inc/cmapplicationsettingsuiimpl.h
cmmanager/cmmgr/Framework/Inc/cmcommsdatnotifier.h
cmmanager/cmmgr/Framework/Inc/cmconnectionmethodinfo.h
cmmanager/cmmgr/Framework/Inc/cmconnselectrbpage.h
cmmanager/cmmgr/Framework/Inc/cmconnsettingsuiimpl.h
cmmanager/cmmgr/Framework/Inc/cmdesticondialog.h
cmmanager/cmmgr/Framework/Inc/cmdesticonmap.h
cmmanager/cmmgr/Framework/Inc/cmdestinationimpl.h
cmmanager/cmmgr/Framework/Inc/cmdlg.h
cmmanager/cmmgr/Framework/Inc/cmlistbox.h
cmmanager/cmmgr/Framework/Inc/cmlistboxmodel.h
cmmanager/cmmgr/Framework/Inc/cmlistitem.h
cmmanager/cmmgr/Framework/Inc/cmlistitemlist.h
cmmanager/cmmgr/Framework/Inc/cmlogger.h
cmmanager/cmmgr/Framework/Inc/cmmanager.hrh
cmmanager/cmmgr/Framework/Inc/cmmanagerimpl.h
cmmanager/cmmgr/Framework/Inc/cmmanagerimpl.inl
cmmanager/cmmgr/Framework/Inc/cmobjectpool.h
cmmanager/cmmgr/Framework/Inc/cmpluginmenucommands.hrh
cmmanager/cmmgr/Framework/Inc/cmpluginmultilinedialog.h
cmmanager/cmmgr/Framework/Inc/cmsettingsuiimpl.h
cmmanager/cmmgr/Framework/Inc/cmtransactionhandler.h
cmmanager/cmmgr/Framework/Inc/cmwizard.h
cmmanager/cmmgr/Framework/Inc/destdlg.h
cmmanager/cmmgr/Framework/Inc/destlistbox.h
cmmanager/cmmgr/Framework/Inc/destlistboxmodel.h
cmmanager/cmmgr/Framework/Inc/destlistitem.h
cmmanager/cmmgr/Framework/Inc/destlistitemlist.h
cmmanager/cmmgr/Framework/Inc/selectdestinationdlg.h
cmmanager/cmmgr/Framework/Inc/uncatdlg.h
cmmanager/cmmgr/Framework/Src/ccmdexec.cpp
cmmanager/cmmgr/Framework/Src/ccmpluginbaseeng.cpp
cmmanager/cmmgr/Framework/Src/cmapplicationsettingsui.cpp
cmmanager/cmmgr/Framework/Src/cmapplicationsettingsuiimpl.cpp
cmmanager/cmmgr/Framework/Src/cmcommonui.cpp
cmmanager/cmmgr/Framework/Src/cmcommsdatnotifier.cpp
cmmanager/cmmgr/Framework/Src/cmconnectionmethod.cpp
cmmanager/cmmgr/Framework/Src/cmconnectionmethodext.cpp
cmmanager/cmmgr/Framework/Src/cmconnectionmethodinfo.cpp
cmmanager/cmmgr/Framework/Src/cmconnselectrbpage.cpp
cmmanager/cmmgr/Framework/Src/cmconnsettingsuiimpl.cpp
cmmanager/cmmgr/Framework/Src/cmdesticondialog.cpp
cmmanager/cmmgr/Framework/Src/cmdesticonmap.cpp
cmmanager/cmmgr/Framework/Src/cmdestination.cpp
cmmanager/cmmgr/Framework/Src/cmdestinationext.cpp
cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp
cmmanager/cmmgr/Framework/Src/cmdlg.cpp
cmmanager/cmmgr/Framework/Src/cmlistbox.cpp
cmmanager/cmmgr/Framework/Src/cmlistboxmodel.cpp
cmmanager/cmmgr/Framework/Src/cmlistitem.cpp
cmmanager/cmmgr/Framework/Src/cmlistitemlist.cpp
cmmanager/cmmgr/Framework/Src/cmlogger.cpp
cmmanager/cmmgr/Framework/Src/cmmanager.cpp
cmmanager/cmmgr/Framework/Src/cmmanagerext.cpp
cmmanager/cmmgr/Framework/Src/cmmanagerimpl.cpp
cmmanager/cmmgr/Framework/Src/cmobjectpool.cpp
cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp
cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlgadv.cpp
cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlgip.cpp
cmmanager/cmmgr/Framework/Src/cmpluginbase.cpp
cmmanager/cmmgr/Framework/Src/cmpluginlanbase.cpp
cmmanager/cmmgr/Framework/Src/cmpluginmultilinedialog.cpp
cmmanager/cmmgr/Framework/Src/cmsettingsui.cpp
cmmanager/cmmgr/Framework/Src/cmsettingsuiimpl.cpp
cmmanager/cmmgr/Framework/Src/cmtransactionhandler.cpp
cmmanager/cmmgr/Framework/Src/cmwizard.cpp
cmmanager/cmmgr/Framework/Src/destdlg.cpp
cmmanager/cmmgr/Framework/Src/destlistbox.cpp
cmmanager/cmmgr/Framework/Src/destlistboxmodel.cpp
cmmanager/cmmgr/Framework/Src/destlistitem.cpp
cmmanager/cmmgr/Framework/Src/destlistitemlist.cpp
cmmanager/cmmgr/Framework/Src/selectdestination.cpp
cmmanager/cmmgr/Framework/Src/uncatdlg.cpp
cmmanager/cmmgr/Framework/SrcData/cmmanager.rss
cmmanager/cmmgr/Framework/conf/cmmanager.confml
cmmanager/cmmgr/Framework/conf/cmmanager_10207376.crml
cmmanager/cmmgr/Framework/loc/cmmanager.loc
cmmanager/cmmgr/Plugins/Group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginembdestination/data/1020737D.rss
cmmanager/cmmgr/Plugins/cmpluginembdestination/data/cmpluginembdestinationui.rss
cmmanager/cmmgr/Plugins/cmpluginembdestination/group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginembdestination/group/cmpluginembdestination.mmp
cmmanager/cmmgr/Plugins/cmpluginembdestination/inc/cmpluginembdestination.h
cmmanager/cmmgr/Plugins/cmpluginembdestination/src/cmpluginembdestination.cpp
cmmanager/cmmgr/Plugins/cmpluginembdestination/src/cmpluginembdestinationproxy.cpp
cmmanager/cmmgr/Plugins/cmpluginlan/data/1020737B.rss
cmmanager/cmmgr/Plugins/cmpluginlan/group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginlan/group/cmpluginlan.mmp
cmmanager/cmmgr/Plugins/cmpluginlan/inc/cmpluginlan.h
cmmanager/cmmgr/Plugins/cmpluginlan/src/cmpluginlan.cpp
cmmanager/cmmgr/Plugins/cmpluginlan/src/cmpluginlanproxy.cpp
cmmanager/cmmgr/Plugins/cmpluginpacketdata/data/1020737C.rss
cmmanager/cmmgr/Plugins/cmpluginpacketdata/data/cmpacketdataui.rss
cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp
cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/pluginpacketdata_icons.mk
cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmpacketdatacommonconstants.h
cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmpluginpacketdata.h
cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlg.h
cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlgadv.h
cmmanager/cmmgr/Plugins/cmpluginpacketdata/loc/cmpluginpacketdata.loc
cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp
cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdataproxy.cpp
cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlg.cpp
cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlgadv.cpp
cmmanager/cmmgr/Plugins/cmpluginvpn/data/10281BBE.rss
cmmanager/cmmgr/Plugins/cmpluginvpn/data/cmpluginvpnui.rss
cmmanager/cmmgr/Plugins/cmpluginvpn/group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginvpn/group/cmpluginvpn.mmp
cmmanager/cmmgr/Plugins/cmpluginvpn/group/cmpluginvpn_icons.mk
cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpluginvpn.h
cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnnextlayerselectdlg.h
cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnpolicyselectiondlg.h
cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnsettingsdlg.h
cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmvpncommonconstants.h
cmmanager/cmmgr/Plugins/cmpluginvpn/loc/cmpluginvpn.loc
cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginproxyvpn.cpp
cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp
cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnnextlayerselectdlg.cpp
cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnpolicyselectiondlg.cpp
cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnsettingsdlg.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/data/10281BB2.rss
cmmanager/cmmgr/Plugins/cmpluginwlan/data/cmwlanui.rss
cmmanager/cmmgr/Plugins/cmpluginwlan/group/bld.inf
cmmanager/cmmgr/Plugins/cmpluginwlan/group/cmpluginwlan.mmp
cmmanager/cmmgr/Plugins/cmpluginwlan/group/pluginwlan_icons.mk
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlan.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlandata.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlandataarray.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlanactivewaiter.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlg.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgadv.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgipv4.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgipv6.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmwlancommonconstants.h
cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmwlancoveragecheck.h
cmmanager/cmmgr/Plugins/cmpluginwlan/loc/cmpluginwlan.loc
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlan.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlandata.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlandataarray.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlanproxy.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlanactivewaiter.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlg.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgadv.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv4.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv6.cpp
cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmwlancoveragecheck.cpp
cmmanager/cmmgr/Rom/CmManager.iby
cmmanager/cmmgr/Rom/CmManagerResources.iby
cmmanager/cmmgr/Rom/cmplugincsd.iby
cmmanager/cmmgr/Rom/cmplugincsdresources.iby
cmmanager/cmmgr/Rom/cmpluginembdestination.iby
cmmanager/cmmgr/Rom/cmpluginembdestinationresources.iby
cmmanager/cmmgr/Rom/cmpluginpacketdata.iby
cmmanager/cmmgr/Rom/cmpluginpacketdataresources.iby
cmmanager/cmmgr/Rom/cmpluginvpn.iby
cmmanager/cmmgr/Rom/cmpluginvpnresources.iby
cmmanager/cmmgr/Rom/cmpluginwlan.iby
cmmanager/cmmgr/Rom/cmpluginwlanresources.iby
cmmanager/cmmgr/cmmapi/BWinsCw/CmManager_prot_setupU.DEF
cmmanager/cmmgr/cmmapi/EABI/CmManager_prot_setupU.def
cmmanager/cmmgr/cmmapi/group/bld.inf
cmmanager/cmmgr/cmmapi/group/cmmapi.mmp
cmmanager/cmmgr/cmmapi/inc/cmconnectionmethodapi.h
cmmanager/cmmgr/cmmapi/inc/cmconnectionmethodwrapper.h
cmmanager/cmmgr/cmmapi/inc/cmdestinationapi.h
cmmanager/cmmgr/cmmapi/inc/cmdestinationwrapper.h
cmmanager/cmmgr/cmmapi/inc/cmmanagerapi.h
cmmanager/cmmgr/cmmapi/rom/cmmapi.iby
cmmanager/cmmgr/cmmapi/src/cmapplicationsettingsui.cpp
cmmanager/cmmgr/cmmapi/src/cmconnectionmethod.cpp
cmmanager/cmmgr/cmmapi/src/cmconnectionmethodapi.cpp
cmmanager/cmmgr/cmmapi/src/cmconnectionmethodext.cpp
cmmanager/cmmgr/cmmapi/src/cmconnectionmethodwrapper.cpp
cmmanager/cmmgr/cmmapi/src/cmdestination.cpp
cmmanager/cmmgr/cmmapi/src/cmdestinationapi.cpp
cmmanager/cmmgr/cmmapi/src/cmdestinationext.cpp
cmmanager/cmmgr/cmmapi/src/cmdestinationwrapper.cpp
cmmanager/cmmgr/cmmapi/src/cmmanager.cpp
cmmanager/cmmgr/cmmapi/src/cmmanagerapi.cpp
cmmanager/cmmgr/cmmapi/src/cmmanagerext.cpp
cmmanager/cmmgr/cmmapi/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmapi/traces/fixed_id.definitions
cmmanager/cmmgr/cmmcommon/inc/cmmclistatic.h
cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h
cmmanager/cmmgr/cmmcommon/src/cmmclistatic.cpp
cmmanager/cmmgr/cmmpluginbase/BWinsCw/cmmpluginbaseu.def
cmmanager/cmmgr/cmmpluginbase/EABI/cmmpluginbaseu.def
cmmanager/cmmgr/cmmpluginbase/group/bld.inf
cmmanager/cmmgr/cmmpluginbase/group/cmmpluginbase.mmp
cmmanager/cmmgr/cmmpluginbase/inc/ccmpluginbaseengtextresolver.h
cmmanager/cmmgr/cmmpluginbase/rom/cmmpluginbase.iby
cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp
cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseengtextresolver.cpp
cmmanager/cmmgr/cmmpluginbase/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmpluginbase/traces/fixed_id.definitions
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/data/1020737D.rss
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/group/bld.inf
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/group/cmpluginembdestination.mmp
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/inc/cmpluginembdestination.h
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/rom/cmmpluginembdestination.iby
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/src/cmpluginembdestination.cpp
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/src/cmpluginembdestinationproxy.cpp
cmmanager/cmmgr/cmmplugins/cmpluginembdestination/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginlan/data/1020737B.rss
cmmanager/cmmgr/cmmplugins/cmpluginlan/group/bld.inf
cmmanager/cmmgr/cmmplugins/cmpluginlan/group/cmpluginlan.mmp
cmmanager/cmmgr/cmmplugins/cmpluginlan/inc/cmpluginlan.h
cmmanager/cmmgr/cmmplugins/cmpluginlan/rom/cmmpluginlan.iby
cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp
cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlanproxy.cpp
cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/fixed_id.definitions
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/data/1020737C.rss
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/group/bld.inf
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/inc/cmpluginpacketdata.h
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/rom/cmmpluginpacketdata.iby
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdataproxy.cpp
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/fixed_id.definitions
cmmanager/cmmgr/cmmplugins/cmpluginvpn/data/10281BBE.rss
cmmanager/cmmgr/cmmplugins/cmpluginvpn/group/bld.inf
cmmanager/cmmgr/cmmplugins/cmpluginvpn/group/cmpluginvpn.mmp
cmmanager/cmmgr/cmmplugins/cmpluginvpn/inc/cmpluginvpn.h
cmmanager/cmmgr/cmmplugins/cmpluginvpn/rom/cmmpluginvpn.iby
cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpn.cpp
cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpnproxy.cpp
cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/cmpluginvpnTraces.h
cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/fixed_id.definitions
cmmanager/cmmgr/cmmplugins/cmpluginwlan/data/10281BB2.rss
cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/bld.inf
cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/cmpluginwlan.mmp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/inc/cmpluginwlan.h
cmmanager/cmmgr/cmmplugins/cmpluginwlan/inc/cmwlancoveragecheck.h
cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby
cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlanproxy.cpp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmwlancoveragecheck.cpp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/fixed_id.definitions
cmmanager/cmmgr/cmmplugins/group/bld.inf
cmmanager/cmmgr/cmmserver/conf/cmmanager.confml
cmmanager/cmmgr/cmmserver/conf/cmmanager_10207376.crml
cmmanager/cmmgr/cmmserver/group/bld.inf
cmmanager/cmmgr/cmmserver/group/cmmserver.mmp
cmmanager/cmmgr/cmmserver/inc/cmmanagerimpl.h
cmmanager/cmmgr/cmmserver/inc/cmmanagertextresolver.h
cmmanager/cmmgr/cmmserver/inc/cmmbearerpriority.h
cmmanager/cmmgr/cmmserver/inc/cmmbearerprioritycache.h
cmmanager/cmmgr/cmmserver/inc/cmmcache.h
cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h
cmmanager/cmmgr/cmmserver/inc/cmmconnmethoditem.h
cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h
cmmanager/cmmgr/cmmserver/inc/cmmdbchangelistener.h
cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h
cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h
cmmanager/cmmgr/cmmserver/inc/cmminstancemapping.h
cmmanager/cmmgr/cmmserver/inc/cmmlistenermanager.h
cmmanager/cmmgr/cmmserver/inc/cmmserver.h
cmmanager/cmmgr/cmmserver/inc/cmmsession.h
cmmanager/cmmgr/cmmserver/inc/cmmstarter.h
cmmanager/cmmgr/cmmserver/inc/cmmtransactionhandler.h
cmmanager/cmmgr/cmmserver/rom/cmmserver.iby
cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.cpp
cmmanager/cmmgr/cmmserver/src/cmmanagertextresolver.cpp
cmmanager/cmmgr/cmmserver/src/cmmbearerpriority.cpp
cmmanager/cmmgr/cmmserver/src/cmmbearerprioritycache.cpp
cmmanager/cmmgr/cmmserver/src/cmmcache.cpp
cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp
cmmanager/cmmgr/cmmserver/src/cmmconnmethoditem.cpp
cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp
cmmanager/cmmgr/cmmserver/src/cmmdbchangelistener.cpp
cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp
cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp
cmmanager/cmmgr/cmmserver/src/cmminstancemapping.cpp
cmmanager/cmmgr/cmmserver/src/cmmlistenermanager.cpp
cmmanager/cmmgr/cmmserver/src/cmmserver.cpp
cmmanager/cmmgr/cmmserver/src/cmmsession.cpp
cmmanager/cmmgr/cmmserver/src/cmmsrvstatic.cpp
cmmanager/cmmgr/cmmserver/src/cmmstarter.cpp
cmmanager/cmmgr/cmmserver/src/cmmtransactionhandler.cpp
cmmanager/cmmgr/cmmserver/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmserver/traces/fixed_id.definitions
cmmanager/cmmgr/database/group/cmmanagerdatabase.mmp
cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h
cmmanager/cmmgr/database/rom/cmmanagerdatabase.iby
cmmanager/cmmgr/database/src/cmmanagertableformats.cpp
cmmanager/cmmgr/database/src/datamobilitycommsdattypes.cpp
cmmanager/cmmgr/group/bld.inf
cmmanager/connection_settings_shim/bwins/connection_settings_shimu.def
cmmanager/connection_settings_shim/connection_settings_shim.pro
cmmanager/connection_settings_shim/eabi/connection_settings_shimu.def
cmmanager/connection_settings_shim/inc/cmconnectionmethod_shim_s60_p.h
cmmanager/connection_settings_shim/inc/cmdestination_shim_s60_p.h
cmmanager/connection_settings_shim/inc/cmmanager_shim_s60_p.h
cmmanager/connection_settings_shim/rom/connection_settings_shim.iby
cmmanager/connection_settings_shim/src/cmconnectionmethod_shim.cpp
cmmanager/connection_settings_shim/src/cmconnectionmethod_shim_s60.cpp
cmmanager/connection_settings_shim/src/cmdestination_shim.cpp
cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp
cmmanager/connection_settings_shim/src/cmmanager_shim.cpp
cmmanager/connection_settings_shim/src/cmmanager_shim_s60.cpp
cmmanager/connection_settings_shim/traces/OstTraceDefinitions.h
cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp
cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.h
cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.pro
cmmanager/connection_settings_shim/tsrc/ut/tools/cmmgrshim_ctc.bat
cmmanager/cpdestinationplugin/cpdestinationplugin.pro
cmmanager/cpdestinationplugin/inc/cpadddestinationentryitemdata.h
cmmanager/cpdestinationplugin/inc/cpdestinationentryitem.h
cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h
cmmanager/cpdestinationplugin/inc/cpdestinationplugin.h
cmmanager/cpdestinationplugin/inc/cpiapitem.h
cmmanager/cpdestinationplugin/res/cpdestinationplugin.qrc
cmmanager/cpdestinationplugin/res/cpdestinationplugindialogs.docml
cmmanager/cpdestinationplugin/rom/cpdestinationplugin.iby
cmmanager/cpdestinationplugin/rom/cpdestinationplugin_resources.iby
cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp
cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp
cmmanager/cpdestinationplugin/src/cpdestinationplugin.cpp
cmmanager/cpdestinationplugin/src/cpiapitem.cpp
cmmanager/cpdestinationplugin/traces/OstTraceDefinitions.h
cmmanager/cpdestinationplugin/tsrc/ut/hbautotest.cpp
cmmanager/cpdestinationplugin/tsrc/ut/hbautotest.h
cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.cpp
cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.h
cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.pro
cmmanager/cpdestinationplugin/tsrc/ut/tools/commsdat_restore.bat
cmmanager/cpdestinationplugin/tsrc/ut/tools/commsdat_set.bat
cmmanager/cpdestinationplugin/tsrc/ut/tools/cpdestinationplugin_ctc.bat
cmmanager/cpdestinationplugin/tsrc/ut/tools/default.cre
cmmanager/cpipsettingsplugin/cpipsettingsplugin.pro
cmmanager/cpipsettingsplugin/inc/cpipsettingsplugin.h
cmmanager/cpipsettingsplugin/inc/cpipsettingsview.h
cmmanager/cpipsettingsplugin/rom/cpipsettingsplugin.iby
cmmanager/cpipsettingsplugin/rom/cpipsettingsplugin_resources.iby
cmmanager/cpipsettingsplugin/src/cpipsettingsplugin.cpp
cmmanager/cpipsettingsplugin/src/cpipsettingsview.cpp
cmmanager/cppacketdataapplugin/cppacketdataapplugin.pro
cmmanager/cppacketdataapplugin/inc/cppacketdataapadvancedview.h
cmmanager/cppacketdataapplugin/inc/cppacketdataapplugin.h
cmmanager/cppacketdataapplugin/inc/cppacketdataapview.h
cmmanager/cppacketdataapplugin/rom/cppacketdataapplugin.iby
cmmanager/cppacketdataapplugin/rom/cppacketdataapplugin_resources.iby
cmmanager/cppacketdataapplugin/src/cppacketdataapadvancedview.cpp
cmmanager/cppacketdataapplugin/src/cppacketdataapplugin.cpp
cmmanager/cppacketdataapplugin/src/cppacketdataapview.cpp
cmmanager/cppacketdataapplugin/traces/OstTraceDefinitions.h
cmmanager/cppacketdataapplugin/tsrc/ut/hbautotest.cpp
cmmanager/cppacketdataapplugin/tsrc/ut/hbautotest.h
cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.cpp
cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.h
cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.pro
cmmanager/cppacketdataapplugin/tsrc/ut/tools/commsdat_restore.bat
cmmanager/cppacketdataapplugin/tsrc/ut/tools/commsdat_set.bat
cmmanager/cppacketdataapplugin/tsrc/ut/tools/cppacketdataapplugin_ctc.bat
cmmanager/cppacketdataapplugin/tsrc/ut/tools/default.cre
cmmanager/cppluginutils/cppluginutils.pri
cmmanager/cppluginutils/inc/cpipv4filter.h
cmmanager/cppluginutils/inc/cpipv6filter.h
cmmanager/cppluginutils/src/cpipv4filter.cpp
cmmanager/cppluginutils/src/cpipv6filter.cpp
cmmanager/cpwlanapplugin/cpwlanapplugin.pro
cmmanager/cpwlanapplugin/inc/cpwlanapadvancedview.h
cmmanager/cpwlanapplugin/inc/cpwlanapplugin.h
cmmanager/cpwlanapplugin/inc/cpwlanapview.h
cmmanager/cpwlanapplugin/rom/cpwlanapplugin.iby
cmmanager/cpwlanapplugin/src/cpwlanapadvancedview.cpp
cmmanager/cpwlanapplugin/src/cpwlanapplugin.cpp
cmmanager/cpwlanapplugin/src/cpwlanapview.cpp
cmmanager/cpwlanapplugin/traces/OstTraceDefinitions.h
cmmanager/cpwlanapplugin/tsrc/ut/hbautotest.cpp
cmmanager/cpwlanapplugin/tsrc/ut/hbautotest.h
cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.cpp
cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.h
cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.pro
cmmanager/cpwlanapplugin/tsrc/ut/tools/commsdat_restore.bat
cmmanager/cpwlanapplugin/tsrc/ut/tools/commsdat_set.bat
cmmanager/cpwlanapplugin/tsrc/ut/tools/cpwlanapplugin_ctc.bat
cmmanager/cpwlanapplugin/tsrc/ut/tools/default.cre
cmmanager/group/bld.inf
cmmanager/gsconnsettingsplugin/data/200255B8.rss
cmmanager/gsconnsettingsplugin/data/gsconnsettingspluginrsc.rss
cmmanager/gsconnsettingsplugin/group/bld.inf
cmmanager/gsconnsettingsplugin/group/gsconnsettingsplugin.mmp
cmmanager/gsconnsettingsplugin/inc/gsconnsettingsmskobserver.h
cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h
cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh
cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h
cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h
cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h
cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc
cmmanager/gsconnsettingsplugin/rom/gsconnsettingsplugin.iby
cmmanager/gsconnsettingsplugin/rom/gsconnsettingspluginresources.iby
cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp
cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp
cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginimpltable.cpp
cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginmodel.cpp
cmmanager/gsconnsettingsplugin/src/gsconnsettingsselectiondlg.cpp
cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h
cmmanager/gsconnsettingsplugin/traces/gsconnsettingspluginmodelTraces.h
connectionmonitoring/cellularindicatorplugin/cellularindicatorplugin.pro
connectionmonitoring/cellularindicatorplugin/inc/cellularindicatorplugin.h
connectionmonitoring/cellularindicatorplugin/rom/cellularindicatorplugin.iby
connectionmonitoring/cellularindicatorplugin/rom/cellularindicatorplugin_resources.iby
connectionmonitoring/cellularindicatorplugin/src/cellularindicatorplugin.cpp
connectionmonitoring/cellularindicatorplugin/traces/OstTraceDefinitions.h
connectionmonitoring/connectionmonitoring.pro
connectionmonitoring/connectionmonitorplugin/data/10281BC1.rss
connectionmonitoring/connectionmonitorplugin/data/connectionmonitorpluginrsc.rss
connectionmonitoring/connectionmonitorplugin/group/bld.inf
connectionmonitoring/connectionmonitorplugin/group/connectionmonitorplugin.mmp
connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h
connectionmonitoring/connectionmonitorplugin/loc/connectionmonitorplugin.loc
connectionmonitoring/connectionmonitorplugin/rom/connectionmonitorplugin.iby
connectionmonitoring/connectionmonitorplugin/rom/connectionmonitorpluginresources.iby
connectionmonitoring/connectionmonitorplugin/src/connectionmonitorplugin.cpp
connectionmonitoring/connectionmonitorplugin/src/connectionmonitorpluginimplementationtable.cpp
connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUi.iby
connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUiResources.iby
connectionmonitoring/connectionmonitorui/aif/ConnectionMonitorUiaif.rss
connectionmonitoring/connectionmonitorui/aif/context_pane_icon.bmp
connectionmonitoring/connectionmonitorui/aif/context_pane_icon_mask.bmp
connectionmonitoring/connectionmonitorui/aif/list_icon.bmp
connectionmonitoring/connectionmonitorui/aif/list_icon_mask.bmp
connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi.rss
connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_caption.rss
connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_reg.rss
connectionmonitoring/connectionmonitorui/group/ConnectionMonitorUI.mmp
connectionmonitoring/connectionmonitorui/group/bld.inf
connectionmonitoring/connectionmonitorui/help/data/xhtml.zip
connectionmonitoring/connectionmonitorui/help/group/bld.inf
connectionmonitoring/connectionmonitorui/help/inc/cmon.hlp.hrh
connectionmonitoring/connectionmonitorui/help/rom/connectionmonitoruihelps_variant.iby
connectionmonitoring/connectionmonitorui/inc/ActiveWrapper.h
connectionmonitoring/connectionmonitorui/inc/ConnectionArray.h
connectionmonitoring/connectionmonitorui/inc/ConnectionInfoBase.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUi.hrh
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiApp.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiAppUi.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiContainer.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsContainer.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsView.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDocument.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiLogger.h
connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h
connectionmonitoring/connectionmonitorui/inc/CsdConnectionInfo.h
connectionmonitoring/connectionmonitorui/inc/EasyWLANConnectionInfo.h
connectionmonitoring/connectionmonitorui/inc/FeatureManagerWrapper.h
connectionmonitoring/connectionmonitorui/inc/GprsConnectionInfo.h
connectionmonitoring/connectionmonitorui/inc/WlanConnectionInfo.h
connectionmonitoring/connectionmonitorui/loc/connectionmonitorui.loc
connectionmonitoring/connectionmonitorui/sis/ConnectionMonitorUI.pkg
connectionmonitoring/connectionmonitorui/src/ActiveWrapper.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionArray.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiApp.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsView.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDocument.cpp
connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp
connectionmonitoring/connectionmonitorui/src/CsdConnectionInfo.cpp
connectionmonitoring/connectionmonitorui/src/EasyWLANConnectionInfo.cpp
connectionmonitoring/connectionmonitorui/src/FeatureManagerWrapper.cpp
connectionmonitoring/connectionmonitorui/src/GprsConnectionInfo.cpp
connectionmonitoring/connectionmonitorui/src/WlanConnectionInfo.cpp
connectionmonitoring/connectionview/connectionview.pro
connectionmonitoring/connectionview/inc/connectionview.h
connectionmonitoring/connectionview/inc/scrollareawidget.h
connectionmonitoring/connectionview/res/connectionview.css
connectionmonitoring/connectionview/res/connectionview.qrc
connectionmonitoring/connectionview/rom/connectionview.iby
connectionmonitoring/connectionview/rom/connectionview_resources.iby
connectionmonitoring/connectionview/src/connectionview.cpp
connectionmonitoring/connectionview/src/main.cpp
connectionmonitoring/connectionview/src/scrollareawidget.cpp
connectionmonitoring/connectionview/traces/OstTraceDefinitions.h
connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def
connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def
connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h
connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp
connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp
connectionmonitoring/connmon/connectionmonitor/src/ConnMonServ.cpp
connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp
connectionmonitoring/connmon/connectionmonitor/src/connmonwlannetwork_v2.cpp
connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h
connectionmonitoring/group/bld.inf
connectionmonitoring/indicatorobserver/inc/indicatorobserver.h
connectionmonitoring/indicatorobserver/indicatorobserver.pro
connectionmonitoring/indicatorobserver/rom/indicatorobserver.iby
connectionmonitoring/indicatorobserver/src/indicatorobserver.cpp
connectionmonitoring/indicatorobserver/src/main.cpp
connectionmonitoring/indicatorobserver/traces/OstTraceDefinitions.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_ALRU.def
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_ALRU.def
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ActiveConnectViaNote.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ActiveSelectWLanDlgPlugin.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQueryNotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConnectViaNoteNotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/NetworkInfoArray.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/WepWpaQueryDlg.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopup.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopupnotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectionerrordiscreetpopup.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectionerrordiscreetpopupnotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/nowlannetworksavailablenotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/nowlansdiscreetpopup.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/wlanpowersavetest.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/wlanpowersavetestnotif.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveConnectViaNote.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnectViaNoteNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWepDlgNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWpaDlgNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoArray.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoBase.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteDlg.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WepWpaQueryDlg.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopup.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopupnotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopup.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopupnotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/easywapidlgnotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/nowlannetworksavailablenotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/nowlansdiscreetpopup.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/wlanpowersavetest.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/wlanpowersavetestnotif.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ActiveWrapper.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ChangeConnectionDlg.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesClient.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveCChangeConnectionDlg.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveWrapper.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesClient.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/connectionstatuspopup.cpp
connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss
connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h
connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionInfo.cpp
connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp
connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp
connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp
connectionutilities/ConnectionDialogs/cconndlg/clientinc/ActiveLogin.h
connectionutilities/ConnectionDialogs/cconndlg/clientsrc/ActiveLogin.cpp
connectionutilities/ConnectionDialogs/cconndlg/clientsrc/GenConAgentDialogServer.cpp
connectionutilities/ConnectionDialogs/cconndlg/data/CConnDlgPlugin.rss
connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveBase.h
connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveIapPlugin.h
connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveSelectConnectionPlugin.h
connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveSelectExplicit.h
connectionutilities/ConnectionDialogs/cconndlg/inc/AuthenticationDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/CConnDlgPrivateCRKeys.h
connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h
connectionutilities/ConnectionDialogs/cconndlg/inc/IAPDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/IapDialog.inl
connectionutilities/ConnectionDialogs/cconndlg/inc/NewIapDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/QosDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/ReconnectDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/SelectConnectionDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/SelectConnectionDialog.inl
connectionutilities/ConnectionDialogs/cconndlg/inc/SelectExplicitDialog.h
connectionutilities/ConnectionDialogs/cconndlg/inc/SelectExplicitDialog.inl
connectionutilities/ConnectionDialogs/cconndlg/inc/sortsnaputils.h
connectionutilities/ConnectionDialogs/cconndlg/src/ActiveBase.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/ActiveIapPlugin.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/ActiveSelectConnectionPlugin.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/ActiveSelectExplicit.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/AuthenticationDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/ConnDlgPlugin.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/IAPDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/NewIapDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/QosDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/ReconnectDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/SelectConnectionDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/SelectExplicitDialog.cpp
connectionutilities/ConnectionDialogs/cconndlg/src/sortsnaputils.cpp
connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp
connectionutilities/ConnectionDialogs/group/CConnDlgClient.mmp
connectionutilities/ConnectionDialogs/group/CConnDlgPlugin.mmp
connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp
connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp
connectionutilities/ConnectionDialogs/group/DisconnectDlg.mmp
connectionutilities/ConnectionDialogs/group/bld.inf
connectionutilities/ConnectionDialogs/inc/ConnectionDialogsNotifBase.h
connectionutilities/ConnectionDialogs/inc/ConnectionDialogsUidDefs.h
connectionutilities/ConnectionDialogs/inc/ConnectionInfo.h
connectionutilities/ConnectionDialogs/inc/ConnectionInfo.inl
connectionutilities/ConnectionDialogs/rom/cconndlgResources.iby
connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp
connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp
connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp
connectionutilities/ConnectionDialogs/traces/OstTraceDefinitions.h
connectionutilities/confirmqueries/confirmqueries.pro
connectionutilities/confirmqueries/inc/cellularpromptdialog.h
connectionutilities/confirmqueries/inc/cellularpromptdialogplugin.h
connectionutilities/confirmqueries/res/prompt_abroad.docml
connectionutilities/confirmqueries/res/prompt_home.docml
connectionutilities/confirmqueries/res/promptdialog.qrc
connectionutilities/confirmqueries/rom/promptdialogplugin.iby
connectionutilities/confirmqueries/rom/promptdialogplugin_resources.iby
connectionutilities/confirmqueries/src/cellularpromptdialog.cpp
connectionutilities/confirmqueries/src/cellularpromptdialogplugin.cpp
connectionutilities/confirmqueries/traces/OstTraceDefinitions.h
connectionutilities/connectionutilities.pro
data/bld.inf
data/cccccc00_emulator.cre
dbcreator/commsdatcreator/Inc/cdcprocessordn.h
dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h
dbcreator/commsdatcreator/Inc/cdcprocessorvpn.h
dbcreator/commsdatcreator/Inc/cdcprocessorwlan.h
dbcreator/commsdatcreator/Src/cdccommsdatcreator.cpp
dbcreator/commsdatcreator/Src/cdcprocessordn.cpp
dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp
dbcreator/commsdatcreator/Src/cdcprocessorwlan.cpp
dbcreator/commsdatcreator/Src/cdcreaderxml.cpp
dbcreator/commsdatcreator/bwins/commsdatcreatoru.def
dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp
dbcreator/commsdatcreatorrfsplugin/src/cdccommsdatcreatorrfsplugin.cpp
dbcreator/commsdatstartup/Inc/cdccommsdatstartup.h
dbcreator/commsdatstartup/Src/cdccommsdatstartup.cpp
dbcreator/commsdatstartup/cenrep/keys_commsdatcreator.xls
dbcreator/conf/bld.inf
dbcreator/conf/commsdatcreator.confml
dbcreator/conf/commsdatcreator.implml
dbcreator/conf/commsdatcreator_10281BC8.crml
dbcreator/group/bld.inf
dbcreator/inc/cdccommon.h
dbcreator/inc/cdccommsdatcreator.h
dbcreator/inc/cdccommsdatcreatorcrkeys.h
group/bld.inf
ipcm_plat/access_point_engine_misc_api/inc/ApProtHandler.h
ipcm_plat/access_point_engine_misc_api/inc/VpnAPEngine.h
ipcm_plat/access_point_engine_misc_api/inc/VpnAPItem.h
ipcm_plat/bearer_settings_plugin_api/group/bld.inf
ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h
ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h
ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbase.h
ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h
ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h
ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlandef.h
ipcm_plat/bearer_settings_ui_plugin_api/bearer_settings_ui_plugin_api.pri
ipcm_plat/bearer_settings_ui_plugin_api/inc/cpbearerapplugininterface.h
ipcm_plat/connection_settings_shim_api/connection_settings_shim_api.pri
ipcm_plat/connection_settings_shim_api/inc/cmconnectionmethod_shim.h
ipcm_plat/connection_settings_shim_api/inc/cmdestination_shim.h
ipcm_plat/connection_settings_shim_api/inc/cmmanager_shim.h
ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h
ipcm_plat/connection_settings_ui_api/connection_settings_ui_api.pri
ipcm_plat/connection_settings_ui_api/inc/cmapplsettingsui.h
ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h
ipcm_plat/extended_connection_settings_api/group/bld.inf
ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h
ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h
ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h
ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h
ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h
ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h
ipcm_plat/flextimer_api/group/bld.inf
ipcm_plat/flextimer_api/inc/flexperiodic.h
ipcm_plat/flextimer_api/inc/flextimer.h
ipcm_plat/flextimer_api/inc/rflextimer.h
ipcm_plat/group/bld.inf
ipcm_plat/ipcm_plat.pro
ipcm_plat/mpm_default_connection_api/group/bld.inf
ipcm_plat/mpm_default_connection_api/inc/rmpmdefaultconnection.h
ipcm_plat/mpm_default_connection_api/mpm_default_connection_api.metaxml
ipcm_plat/mpm_vpn_toggle_api/group/bld.inf
ipcm_plat/mpm_vpn_toggle_api/inc/mpmvpntoggleapi.h
ipcm_plat/mpm_vpn_toggle_api/mpm_vpn_toggle_api.metaxml
ipcm_plat/wlan_security_settings_ui_plugin_api/inc/cpwlansecurityplugininterface.h
ipcm_plat/wlan_security_settings_ui_plugin_api/wlan_security_settings_ui_plugin_api.pri
ipcm_pub/access_point_engine_api/inc/APAccessPointItem.h
ipcm_pub/access_point_engine_api/inc/APDataHandler.h
ipcm_pub/access_point_engine_api/inc/APNetworks.h
ipcm_pub/access_point_engine_api/inc/APSelect.h
ipcm_pub/access_point_engine_api/inc/APUtils.h
ipcm_pub/access_point_engine_api/inc/ActiveApDb.h
ipcm_pub/access_point_engine_api/inc/ApEngineConsts.h
ipcm_pub/access_point_engine_api/inc/ApEngineVer.h
ipcm_pub/access_point_engine_api/inc/ApListItem.h
ipcm_pub/access_point_engine_api/inc/ApNetworkItem.h
ipcm_pub/access_point_engine_api/inc/ApNetworkItemlist.h
ipcm_pub/access_point_engine_api/inc/Aplistitemlist.h
ipcm_pub/access_point_settings_handler_api/inc/ApSettingsHandlerCommons.h
ipcm_pub/access_point_settings_handler_api/inc/Apsettingshandlerui.h
ipcm_pub/connection_monitor_server_api/inc/rconnmon.h
ipcm_pub/connection_settings_api/group/bld.inf
ipcm_pub/connection_settings_api/inc/cmconnectionmethod.h
ipcm_pub/connection_settings_api/inc/cmconnectionmethod.inl
ipcm_pub/connection_settings_api/inc/cmconnectionmethoddef.h
ipcm_pub/connection_settings_api/inc/cmdestination.h
ipcm_pub/connection_settings_api/inc/cmmanager.h
ipcm_pub/connection_settings_api/inc/cmmanager.inl
ipcm_pub/connection_settings_api/inc/cmmanagerdef.h
ipcm_pub/connection_settings_api/inc/cmpluginpacketdatadef.h
ipcm_pub/connection_settings_api/inc/cmpluginvpndef.h
ipcm_pub/connection_settings_api/inc/cmpluginwlandef.h
ipcm_pub/connection_settings_api/inc/cmsettingsui.h
ipcm_pub/extendedconnpref_api/inc/extendedconnpref.h
ipconnmgmt.pro
keepalive/flextimer/client/bwins/flextimerclientu.def
keepalive/flextimer/client/eabi/flextimerclientu.def
keepalive/flextimer/client/group/bld.inf
keepalive/flextimer/client/group/flextimerclient.mmp
keepalive/flextimer/client/rom/flextimerclient.iby
keepalive/flextimer/client/src/flexperiodic.cpp
keepalive/flextimer/client/src/flextimer.cpp
keepalive/flextimer/client/src/rflextimer.cpp
keepalive/flextimer/client/traces/OstTraceDefinitions.h
keepalive/flextimer/client/traces/fixed_id.definitions
keepalive/flextimer/doc_pub/flextimer_for_clients.chm
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/classesfordox.h
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/dox_base_settings.cfg
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_clients.cfg
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_clients.dox
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_devs.cfg
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimerComponents.png
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimerWindowConcept.png
keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimersExample.png
keepalive/flextimer/group/bld.inf
keepalive/flextimer/server/engine/bwins/flextimerengineu.def
keepalive/flextimer/server/engine/eabi/flextimerengineu.def
keepalive/flextimer/server/engine/group/bld.inf
keepalive/flextimer/server/engine/group/flextimerengine.mmp
keepalive/flextimer/server/engine/inc/flextimercontainer.h
keepalive/flextimer/server/engine/inc/flextimercontainer.inl
keepalive/flextimer/server/engine/inc/flextimerengine.h
keepalive/flextimer/server/engine/inc/flextimeritem.h
keepalive/flextimer/server/engine/inc/flextimeritem.inl
keepalive/flextimer/server/engine/inc/flextimerwakeuptimer.h
keepalive/flextimer/server/engine/inc/mflextimerwakeuptimercb.h
keepalive/flextimer/server/engine/rom/flextimerengine.iby
keepalive/flextimer/server/engine/src/flextimercontainer.cpp
keepalive/flextimer/server/engine/src/flextimerengine.cpp
keepalive/flextimer/server/engine/src/flextimeritem.cpp
keepalive/flextimer/server/engine/src/flextimerwakeuptimer.cpp
keepalive/flextimer/server/engine/traces/OstTraceDefinitions.h
keepalive/flextimer/server/engine/traces/fixed_id.definitions
keepalive/flextimer/server/group/bld.inf
keepalive/flextimer/server/group/flextimerserver.mmp
keepalive/flextimer/server/inc/flextimercommon.h
keepalive/flextimer/server/inc/flextimerpanic.h
keepalive/flextimer/server/inc/flextimerserver.h
keepalive/flextimer/server/inc/flextimersession.h
keepalive/flextimer/server/inc/flextimersession.inl
keepalive/flextimer/server/inc/mflextimerservice.h
keepalive/flextimer/server/inc/mflextimerservicecb.h
keepalive/flextimer/server/rom/flextimerserver.iby
keepalive/flextimer/server/src/flextimerserver.cpp
keepalive/flextimer/server/src/flextimersession.cpp
keepalive/flextimer/test/flextimer_build.bat
keepalive/flextimer/test/testflextimer/bmarm/testflextimeru.def
keepalive/flextimer/test/testflextimer/bwins/testflextimeru.def
keepalive/flextimer/test/testflextimer/eabi/testflextimeru.def
keepalive/flextimer/test/testflextimer/flextimerservermonitor/bwins/flextimerservermonitorclientu.def
keepalive/flextimer/test/testflextimer/flextimerservermonitor/eabi/flextimerservermonitorclientu.def
keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/bld.inf
keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/flextimerservermonitorclient.mmp
keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/flextimerservermonitorserver.mmp
keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorcommon.h
keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorserver.h
keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorsession.h
keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/rflextimerservermonitor.h
keepalive/flextimer/test/testflextimer/flextimerservermonitor/rom/flextimerservermonitor.iby
keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/flextimerservermonitorserver.cpp
keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/flextimerservermonitorsession.cpp
keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/rflextimerservermonitor.cpp
keepalive/flextimer/test/testflextimer/flextimerservermonitor/traces/OstTraceDefinitions.h
keepalive/flextimer/test/testflextimer/group/bld.inf
keepalive/flextimer/test/testflextimer/group/testflextimer.mmp
keepalive/flextimer/test/testflextimer/group/testflextimer.pkg
keepalive/flextimer/test/testflextimer/group/testflextimer_doxyfile.txt
keepalive/flextimer/test/testflextimer/group/testflextimer_nrm.mmp
keepalive/flextimer/test/testflextimer/inc/inheritedcflextimer.h
keepalive/flextimer/test/testflextimer/inc/inheritedcflextimer2.h
keepalive/flextimer/test/testflextimer/inc/testcflextimer.h
keepalive/flextimer/test/testflextimer/inc/testflexperiodic.h
keepalive/flextimer/test/testflextimer/inc/testflextimer.h
keepalive/flextimer/test/testflextimer/inc/testrflextimer.h
keepalive/flextimer/test/testflextimer/init/testflextimer.ini
keepalive/flextimer/test/testflextimer/rom/testflextimer.iby
keepalive/flextimer/test/testflextimer/src/inheritedcflextimer.cpp
keepalive/flextimer/test/testflextimer/src/inheritedcflextimer2.cpp
keepalive/flextimer/test/testflextimer/src/testcflextimer.cpp
keepalive/flextimer/test/testflextimer/src/testflexperiodic.cpp
keepalive/flextimer/test/testflextimer/src/testflextimer.cpp
keepalive/flextimer/test/testflextimer/src/testrflextimer.cpp
keepalive/group/bld.inf
layers.sysdef.xml
package_definition.xml
package_map.xml
sysdef_1_4_0.dtd
sysdef_1_5_1.dtd
--- a/accesspointcontrol/apcontrollistplugin/data/10281BB4.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*        ECOM plugin resource file for VPN Settings plugin.
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid     = 0x10281BB4; // Plugin dll UID
-    interfaces  = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid   = 0x10207236; // UID for CGSPluginInterface
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid  = 0x10281BB5; // Plugin UID
-                    version_no          = 1;
-                    display_name        = "AP Control List Plugin"; // Plugin debug name
-#ifdef RD_CONTROL_PANEL
-                    default_data        = "0x200255B9"; // Parent UID (gsconnsettingsplugin)
-                    opaque_data         = "70"; // Order number
-#else //RD_CONTROL_PANEL
-                    default_data        = "0x10207250"; // Parent UID (Connection View)
-                    opaque_data         = "210"; // Order number
-#endif //RD_CONTROL_PANEL
-                    }
-                };
-            }
-        };
-    }
-
--- a/accesspointcontrol/apcontrollistplugin/data/apcontrollistpluginrsc.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,329 +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: 
-*        Resource file for APControlListPlugin
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME    APCL
-
-//  INCLUDES
-#include <eikon.rh>
-#include <eikon.rsg>
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.loc>
-
-#include "apcontrollistplugin.hrh"
-#include <apcontrollistplugin.loc>
-
-
-
-
-//  MACROS
-
-//  RESOURCE DEFINITIONS
-RESOURCE RSS_SIGNATURE
-    {
-    }
-
-RESOURCE TBUF
-    {
-    buf = "apnlist";
-    }
-
-//----------------------------------------------------
-//
-//    r_apclplugin_title
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_apclplugin_title                         
-    { 
-    buf = qtn_acl_title; 
-    }
-
-//----------------------------------------------------
-//
-//    r_qtn_acl_navi_active
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_navi_active                          
-    { 
-    buf = qtn_acl_navi_active ; 
-    }
-    
-//----------------------------------------------------
-//
-//    r_qtn_acl_navi_not_active
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_navi_not_active                          
-    { 
-    buf = qtn_acl_navi_not_active ; 
-    }
-    
-//----------------------------------------------------
-//
-//    r_qtn_acl_empty_view_primary
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_empty_view_primary                          
-    { 
-    buf = qtn_acl_empty_view_primary ; 
-    }
-    
-//----------------------------------------------------
-//
-//    qtn_acl_empty_view_secondary
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_empty_view_secondary                          
-    { 
-    buf = qtn_acl_empty_view_secondary ; 
-    }
-
-//----------------------------------------------------
-//
-//    r_qtn_acl_wait_reading_sim
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_wait_reading_sim                         
-    { 
-    buf = qtn_acl_wait_reading_sim; 
-    }
-
-//----------------------------------------------------
-//
-//    r_qtn_acl_network_provided_apn
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_network_provided_apn                         
-    { 
-    buf = qtn_acl_network_provided_apn; 
-    }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_control_activated 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_control_activated { buf = qtn_acl_conf_control_activated ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_control_deactivated 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_control_deactivated { buf = qtn_acl_conf_control_deactivated ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_info_active 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_info_active { buf = qtn_acl_info_active ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_info_not_active 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_info_not_active { buf = qtn_acl_info_not_active ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_err_invalid_input 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_err_invalid_input { buf = qtn_acl_err_invalid_input; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_err_sim_card 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_err_sim_card { buf = text_fdn_card_error; }
-
-//----------------------------------------------------
-//   
-//    r_two_string_for_empty_view 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_two_string_for_empty_view { buf = "%0U\n%1U"; }
-
-//----------------------------------------------------
-//
-//    r_apclplugin_main_menubar
-//
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_apclplugin_main_menubar
-    {
-    titles =
-        {
-        MENU_TITLE 
-            { 
-            menu_pane = r_apclplugin_main_menu; 
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_apclplugin_main_menu
-//
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_apclplugin_main_menu
-    {
-    items =
-        {
-        MENU_ITEM 
-            { 
-            command = EAPControlListCmdActivate; 
-            txt = qtn_acl_options_activate_control; 
-            },
-        MENU_ITEM 
-            { 
-            command = EAPControlListCmdDeactivate; 
-            txt = qtn_acl_options_deactivate_control; 
-            },
-        MENU_ITEM 
-            { 
-            command = EAPControlListCmdAdd; 
-            txt = qtn_acl_options_add_apn_manually; 
-            },
-        MENU_ITEM 
-            { 
-            command = EAPControlListCmdRemove; 
-            txt = qtn_acl_options_remove;
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdHelp; 
-            txt = qtn_options_help; 
-            },
-        MENU_ITEM 
-            { 
-            command = EEikCmdExit; 
-            txt = qtn_options_exit; 
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_apclplugin_softkeys_options_back
-//
-//
-//----------------------------------------------------
-//
-RESOURCE CBA r_apclplugin_softkeys_options_back
-    {
-    buttons =
-        {
-        CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
-        CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_back;},
-        CBA_BUTTON {id=EAknSoftkeyEmpty; txt = text_softkey_empty;}
-        };
-    }
-
-//----------------------------------------------------
-//   
-//    r_apclplugin_main_view
-//    Main view.
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW    r_apclplugin_main_view    
-    {
-    menubar=r_apclplugin_main_menubar;  
-    cba=r_apclplugin_softkeys_options_back;   
-    }
-
-RESOURCE LISTBOX r_apcontrol_listbox
-{
-   flags = EAknListBoxSelectionList;
-}
-//----------------------------------------------------
-//
-//    r_apn_name_query
-//
-//
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_apn_name_query
-   {
-   flags = EGeneralQueryFlags;
-   buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
-   items =
-       {
-       DLG_LINE
-             {
-             type = EAknCtQuery;
-             id = EGeneralQuery;
-             control = AVKON_DATA_QUERY
-                    {
-                    layout = EDataLayoutAllowEmptyInput;
-                    label = qtn_acl_prmpt_apn_to_add;
-                    control = EDWIN
-                        {
-                        maxlength = KMaxApnNameWitoutLabelLength;
-                        default_case = EAknEditorLowerCase;
-                        // accepts only ASCII
-                        flags = EEikEdwinNoWrap;
-                        avkon_flags = EAknEditorFlagLatinInputModesOnly;
-                        };
-                    };
-             }
-        };
-    }
-    
-//----------------------------------------------------
-//   
-//    r_qtn_vpn_main 
-//    Caption for Plugin.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_menu_item { buf = qtn_acl_menu_item ; }
-
-
-//End of File
--- a/accesspointcontrol/apcontrollistplugin/group/apcontrollistplugin.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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 is project specification file for the apcontrollistplugin.
-*
-*
-*/
-
-#include <data_caging_paths.hrh>    //this is needed for RESOURCE_FILES_DIR
-#include <platform_paths.hrh>
-
-CAPABILITY          CAP_ECOM_PLUGIN
-TARGET              apcontrollistplugin.dll
-TARGETTYPE          PLUGIN
-UID                 0x10009D8D 0x10281BB4
-VENDORID            VID_DEFAULT
-
-SOURCEPATH          ../src
-SOURCE				apcontrollistapiwrapper.cpp
-SOURCE              apcontrollistbox.cpp
-SOURCE              apcontrollistboxmodel.cpp
-SOURCE              apcontrollistcapschange.cpp
-SOURCE              apcontrollistplugin.cpp
-SOURCE              apcontrollistplugincontainer.cpp 
-SOURCE              apcontrollistpluginimplementationtable.cpp
-SOURCE              apcontrollistpluginlogger.cpp
-
-USERINCLUDE         ../data
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-APP_LAYER_SYSTEMINCLUDE
-#endif
-
-SOURCEPATH          ../data
-
-//ECOM resource definition
-START RESOURCE      10281BB4.rss
-TARGET              apcontrollistplugin.rsc
-END 
-// ECOM resource definition
-
-//apcontrollistplugin resources
-START RESOURCE      apcontrollistpluginrsc.rss
-HEADER
-TARGETPATH          RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-LIBRARY             hlplch.lib      // for "Help" options menu
-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             eikctl.lib
-LIBRARY             commonengine.lib//For RConeResourceLoader
-LIBRARY             GSFramework.lib
-LIBRARY             egul.lib        // CGulIcon
-LIBRARY             aknskins.lib    // AknsUtils.h
-LIBRARY             flogger.lib
-LIBRARY             GSEcomPlugin.lib
-LIBRARY             commonui.lib 
-LIBRARY 			aknnotify.lib 
-LIBRARY             centralrepository.lib
-LIBRARY 			etel.lib 
-LIBRARY 			etelmm.lib 
-LIBRARY 			customapi.lib 
-LIBRARY 			ws32.lib 
-LIBRARY 			FeatMgr.lib 
-
-
-// This is optional - used only by Codewarrior for convenience.
-DOCUMENT            10281BB4.rss
--- a/accesspointcontrol/apcontrollistplugin/group/apcontrollistpluginicons_dc.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  Makefile for icons of APControlListPlugin
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\apcontrollistplugin.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\apcontrollistplugin.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) \
-		/c16,8 qgn_prop_set_conn_acl.bmp 
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/accesspointcontrol/apcontrollistplugin/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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:  Build information for the APControlListsPlugin
-*
-*/
-
-
-#ifdef RD_GS_RENOVATION // This is the GS_RENOVATION
-	
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export iby files
-../rom/APControlListPlugin.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(APControlListPlugin.iby)
-../rom/APControlListPluginResources.iby	LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(APControlListPluginResources.iby)
-
-// export localised loc file
-../loc/apcontrollistplugin.loc	MW_LAYER_LOC_EXPORT_PATH(apcontrollistplugin.loc)
-
-PRJ_MMPFILES
-// gnumakefile apcontrollistpluginicons_dc.mk
-
-./apcontrollistplugin.mmp
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE apcontrollistplugin.mif
-OPTION HEADERFILE apcontrollistplugin.mbg
-OPTION SOURCES -c16,8 qgn_prop_set_conn_acl
-END
-
-#endif
-
-// End of File
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistapiwrapper.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +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:  
-* 		 Wrapper class for asyncron calls in RMyPhone and RMyCustomAPI.
-*
-*/
-
-#ifndef APCONTROLLISTAPIWRAPPER_H
-#define APCONTROLLISTAPIWRAPPER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <rmmcustomapi.h>
-
-// FORWARD DECLARATIONS
-class CAPControlListPlugin;
-
-// CLASS DECLARATION
-/**
-*  Wrapper class for asyncron calls in RMyPhone and RMyCustomAPI.
-*/
-class CAPControlListAPIWrapper : public CActive
-	{
-	private: 
-		// Enum for the states checked in RunL()
-		enum TRequestType { EGetACLStatus, EAddAPN, EAddAPNSecurity, 
-		                    ERemoveAPN, ERemoveAPNSecurity, EActivateACL, 
-							EActivateACLSecurity, EDeactivateACL, 
-							EDeactivateACLSecurity, EReadData, 
-							EEnumerateAPN, ENoRequest};
-
-    public:  
-    	// Constructor and destructor
-    	    			
-        /**
-        * Constructor.
-        * @param aPlugin reference to the view
-        * @param aPriority priority for CActive
-        */
-		CAPControlListAPIWrapper(CAPControlListPlugin& aPlugin,
-									TInt aPriority = EPriorityStandard );
-        /**
-        * Destructor.
-        */
-		~CAPControlListAPIWrapper();
-		
-        // New functions     
-          
-        /**
-        * Initialises iPhone and iCustomAPI members. 
-        * Uses User::WaitForRequest
-        * because we need to know the ACL status before Visible() is called.
-        */
-		void ConstructL();
-		
-		// Primary functions for the API calls
-		// These are the functions for which security check is necessary.
-		// If the security was already checked they call the correspondig
-		// secondary function. If the security wasn't already checked they
-		// call the asyncron security check and let RunL call the correspondig
-		// secondary function when the security check is finished.
-        /**
-        * Add APN to the ACL list
-        */
-		void AddAPNL();		
-        /**
-        * Remove APN from the ACL list which is currently selected in the
-        * listbox.
-        */
-		void RemoveAPN();		
-        /**
-        * Activates the ACL list
-        */
-		void ActivateACL();
-        /**
-        * Deactivates the ACL list
-        */
-		void DeActivateACL();
-				
-        /**
-        * Gets the ACL status then reads the ACL list.
-        * If this call is succesfull then RunL calls EnumerateAPN 
-        * then it calls DoReadData
-        */
-		void ReadData();
-		
-        /**
-        * Method for checking if plugin should be visible and used in 
-        * the Connection settings.
-        * @return ETrue if plugin should be visible.
-        * @return EFalse if plugin should not be visible.
-        */
-		TBool Visible() const;
-		
-        /**
-        * Method for checking if the ACL list is enabled or not. 
-        * @return ETrue if the ACL list is enabled.
-        * @return EFalse if the ACL list is not enabled.
-        */
-		TBool Enabled() const;
-		
-        /**
-      	* Calls RMyPhone::NotifyIccAccessCapsChange
-        * Used by CAPControlListCapsChange class. This function is nescessary
-        * since iPhone is a private member.
-        */
-		void NotifyIccAccessCapsChange(TRequestStatus& aReqStatus, 
-														TUint32& aCaps);				
-        /**
-      	* Calls RTelSubSessionBase::CancelAsyncRequest
-        * Used by CAPControlListCapsChange class. This function is nescessary
-        * since iPhone is a private member.
-        */
-        void CancelNotify(); 
-				
-        // Functions from CActive
-        /**
-        * Closes API in case of Cancel() 
-        */
-		void DoCancel();		
-        /**
-        * Handles asynchronous function completion 
-        */
-		void RunL(); 
-		/** 
-		* Shows SIM card error note in error cases
-		*/
-		void ShowSimCardErrorNoteL();
-		
-	private:
-        // New functions
-        
-        /**
-		* Called from one of the primary functions for the API calls
-        * Calls RMmCustomAPI::CheckSecurityCode asyncron call. This functon is
-        * called only once.
-        * @param aRequest We need this to set the state so we'll know in RunL
-        * which primary function called it.
-        */
-		void SecurityCheck( TRequestType aRequest ); 
-		
-		// Secondary functions for the API calls		
-        /**
-        * Secondary function for AddAPNL().Makes the asyncron call to 
-        * add an APN to the ACL list.
-        * If the security was already checked it is called from AddAPNL.
-        * If the security was not checked it is called from the RunL()
-        * when RunL() is called for RMmCustomAPI::CheckSecurityCode()
-        */
-		void DoAddAPNL();		
-        /**
-        * Secondary function for RemoveAPN().Makes the asyncron call to 
-        * remove an APN from the ACL list.
-        * If the security was already checked it is called from AddAPNL.
-        * If the security was not checked it is called from the RunL()
-        * when RunL() is called for RMmCustomAPI::CheckSecurityCode()
-        */
-		void DoRemoveAPN();
-        /**
-        * Secondary function for ActivateACL() and DeActivateACL().Makes the 
-        * asyncron call to SetACLStatus either EAclStatusEnabled or
-        * EAclStatusDisabled.
-        * If the security was already checked it is called from ActivateACL()
-        * or DeActivateACL().
-        * If the security was not checked it is called from the RunL()
-        * when RunL() is called for RMmCustomAPI::CheckSecurityCode()
-        * @param aAclStatus the status we want to set.
-        */
-		void SetACLStatus( const RMobilePhone::TAPNControlListServiceStatus 
-		                                        aAPNControlListServiceStatus );
-		
-        /**
-        * Reads the ACL list. 
-        * Gets the number of items with an asyncron call. The actual reading
-        * of the APNs happens in DoReadData()
-        */
-		void EnumerateAPN();
-		
-        /**
-        * Reads an APN entry from the ACL list and puts it in the listbox. 
-        * Called from RunL() when RunL() after ReadData() was called. It is
-        * called iSize times. 
-        */
-		void DoReadData();
-
-        /**
-        * Case EReadData in RunL 
-        * Code removed from RunL to make it's size smaller
-        */
-		void FinishReadDataL();
-		
-	    /**
-	     * From CActive, handles leaves from RunL.
-	     * @param aLeaveCode The leave code.
-	     */
-	    TInt RunError( TInt aLeaveCode );
-		
-	private: // Data
-		
-        //@var reference to the view
-		CAPControlListPlugin&			iPlugin;
-	
-		// API objects
-        //@var RTelServer object for the ACL API
-		RTelServer 						iServer;	
-        //@var RMobilePhone object for the ACL API
-		RMobilePhone 					iPhone;
-        //@var RMmCustomAPI object for the ACL API
-		RMmCustomAPI 					iCustomAPI;
-
-        //@var state to store which is the current request
-		TRequestType iRequest;
-		
-        //@var  ACL status
-		RMobilePhone::TAPNControlListServiceStatus		iAclStatus;   
-		
-        //@var phone is online
-		TBool 							iConnAllowed;
-		
-        //@var security checked
-		TBool 							iSecurityChecked;
-		
-        //@var AP Name from the user input ( AddAPN2L() )
-		HBufC* 							iAPN;
-
-		//members for reading data ( ReadData() ReadData2() )
-        //@var AP Name in the form expected by the API
-		RMobilePhone::TAPNEntryV3 		iApn;
-        //@var iApn packaged
-		RMobilePhone::TAPNEntryV3Pckg 	iApnPKG;
-        //@var size of the ACL list
-		TUint32 						iSize;
-        //@var index of item currently read from the ACL list 
-		TUint32 						iIndex;
-		
-		TBool                           iSimCardError;
-	} ;
-
-#endif
-
-// End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistbox.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +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:  Declaration of class CApControlListbox.
-*
-*/
-
-
-#ifndef APSELECTOR_LISTBOX_H
-#define APSELECTOR_LISTBOX_H
-
-// INCLUDE FILES
-#include <aknlists.h>
-class CAPControlListPluginContainer;
-
-
-// CLASS DECLARATION
-
-/**
-* Listbox to display the list of access points.
-* 
-*/
-NONSHARABLE_CLASS(CApControlListbox): public CAknSingleStyleListBox
-    {
-    public:     // Construct / destruct
-
-        /**
-        * Destructor.
-        */
-        virtual ~CApControlListbox();
-
-
-        /**
-        * Constructor.
-        */
-        CApControlListbox();
-
-    public :
-        /**
-        * Handle key event.
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return Response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL
-            ( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-        /**
-        * Handle focus change.
-        * @param aDrawNow Draw now?
-        */
-        void FocusChanged( TDrawNow aDrawNow );
-
-
-        /**
-        * From CCoeControl. Handles a change to the control's resources.
-        * The types of resources handled are those which are shared across 
-        * the environment, e.g. colours or fonts.
-        * Called if Skinning is changed.
-        * @param aType A message UID value.
-        */
-        virtual void HandleResourceChange(TInt aType); 
-
-        /**
-        * Set EmptyText in the listbox
-        */
-        void SetListEmptyTextL();
-    };
-
-
-#endif
-
-// End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistboxmodel.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +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:  Declaration of class CApControlListboxModel.
-*
-*/
-
-
-#ifndef APCONTROL_LISTBOX_MODEL_H
-#define APCONTROL_LISTBOX_MODEL_H
-
-// INCLUDES
-#include <aknlists.h>
-
-// CLASS DECLARATION
-
-/**
-* Data model for the access point listbox. It is an array of CApListItem
-* pointers; items are owned.
-*/
-NONSHARABLE_CLASS( CApControlListboxModel ):
-        public CTextListBoxModel,
-        public MDesCArray
-    {
-    public:     // Construct / destruct
-
-        /**
-        * Constructor.
-        * @param aGraphicType Graphic type
-        */
-        CApControlListboxModel( );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CApControlListboxModel();
-
-    public:     // from MDesCArray
-
-        /**
-        * Get number of items in the model.
-        * @return Number of items.
-        */
-        TInt MdcaCount() const;
-
-        /**
-        * Text to be displayed for this item.
-        * @param aIndex Index of item.
-        * @return TPtrC for this item text (text owned by the model).
-        */
-        TPtrC MdcaPoint( TInt aIndex ) const;
-
-    };
-
-
-#endif
-
-// End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistcapschange.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +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:  Class for asyncron API call NotifyIccAccessCapsChange.
-*
-*/
-
-#ifndef APCONTROLLISTCAPSCHANGE_H
-#define APCONTROLLISTCAPSCHANGE_H
-
-// INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class CAPControlListPlugin;
-
-// CLASS DECLARATION
-/**
-*  Wrapper class for asyncron syncron API call NotifyIccAccessCapsChange.
-*/
-class CAPControlListCapsChange : public CActive
-	{
-	public: 
-    	// Constructor and destructor
-    	    			
-        /**
-        * Constructor.
-        * @param aPlugin reference to the view
-        * @param aPriority priority for CActive
-        */
-		CAPControlListCapsChange(CAPControlListPlugin& aPlugin,
-									TInt aPriority = EPriorityStandard );
-        /**
-        * Destructor.
-        */
-		~CAPControlListCapsChange();
-		
-        // New functions     
-        /**
-        * Makes asyncron API call RMobilePhone::NotifyIccAccessCapsChange
-        */
-		void NotifyCapsChange();
-		 
-				
-        // Functions from CActive
-        /**
-        * Called by Cancel() 
-        */
-		void DoCancel();		
-        /**
-        * Handles asynchronous function completion 
-        */
-		void RunL();
-		
-	private:
-        //@var reference to the view
-		CAPControlListPlugin&	iPlugin;
-		
-        //@var Caps set by NotifyIccAccessCapsChange
-		TUint32 				iCaps;
-	} ;
-
-#endif
-
-// End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +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: 
-*        Header file for CAPControlListPlugin class.
-*
-*/
-
-#ifndef APCONTROLLIST_PLUGIN_H__
-#define APCONTROLLIST_PLUGIN_H__
-
-// System includes
-#include <eikclb.h>
-#include <gsplugininterface.h>
-#include <ConeResLoader.h>
-
-// This UID is used for both the view UID and the ECOM plugin implementation UID.
-const TUid KAPControlListPluginUid = { 0x10281BB5 };
-
-
-// Forward declarations
-class CAPControlListPluginContainer;
-class CAPControlListAPIWrapper;
-class MUiRunnerObserver;
-class MEikListBoxObserver;
-class CAPControlListCapsChange;
-
-/**
-* Interface class for AP Settings Handler UI. 
-*/
-class CAPControlListPlugin : public CGSPluginInterface,
-                           public MEikListBoxObserver
-    {
-    public://Constructors & destructors
-
-        /**
-        * First phase constructor
-        * Creates new Plugin and Launches CAPControlListPlugin
-        * with default parameters
-        * @param aAppUi pointer to the application Ui
-        */ 
-        static CAPControlListPlugin* NewL( TAny* aInitParams );
-                        
-        /**
-        * Destructor
-        */
-        inline ~CAPControlListPlugin();
-        
-    public: // Functions from base class
-        
-        /**
-        * From CAknView
-        */
-        TUid Id() const;
-        
-        /**
-        * From CAknView
-        */
-        void HandleCommandL( TInt aCommand );
-          
-        /**
-        * From CAknView
-        */    
-        void DoActivateL( const TVwsViewId& aPrevViewId, 
-                          TUid aCustomMessageId, 
-                          const TDesC8& aCustomMessage );
-        
-        /**
-        * From CAknView
-        */    
-        void DoDeactivate();
-        
-        /**
-        * Exit plugin
-        */    
-        void ExitOnUSIMRemovalL();
-        
-
-    public:
-    
-        /**
-        * from CGSPluginInterface
-        */
-        
-        /**
-        * Method for checking plugin's Uid. Uid identifies this GS plugin. Use
-        * same Uid as the ECOM plugin implementation Uid.
-        *
-        * @return PluginUid
-        */
-        TUid PluginUid() const;
-
-        /**
-        * Method for getting caption of this plugin. This should be the 
-        * localized name of the settings view to be shown in parent view.
-        *
-        * @param aCaption pointer to Caption variable
-        */
-        void GetCaptionL( TDes& aCaption ) const;
-
-        /**
-        * Method for checking, if item has bitmap icon to be shown in list
-        *
-        * @return ETrue if plugin has icon bitmap
-        * @return EFalse if plugin does not have a bitmap
-        */
-        TBool HasBitmap() const;
-
-        /**
-        * Method for reading bitmap icon.
-        *
-        * @param aBitmap plugin bitmap
-        * @param aMask plugin icon bitmap mask
-        */
-        void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const;
-
-        /**
-        * Method for reading the ID of the plugin provider category. See 
-        *
-        * @return Plugin provider category ID defined by 
-        *         
-        */
-        TInt PluginProviderCategory() const;
-        
-        /**
-        * Creates a new icon of desired type. Override this to provide custom
-        * icons. Othervise default icon is used. Ownership of the created icon
-        * is transferred to the caller.
-        *
-        * Icon type UIDs (use these defined constants):
-        * KGSIconTypeLbxItem  -   ListBox item icon.
-        * KGSIconTypeTab      -   Tab icon.
-        *
-        * @param aIconType UID Icon type UID of the icon to be created.
-        * @return Pointer of the icon. NOTE: Ownership of this icon is
-        *         transferred to the caller.
-        */
-        CGulIcon* CreateIconL( const TUid aIconType );
-        
-        /**
-        * Method for checking, if plugin should be visible and used in GS FW.
-        * (for example shown in listbox of the parent view).
-        *
-        * On default plugin is visible. Overwrite this function to enable or
-        * disable your plugin dynamically.
-        *
-        * @return ETrue if plugin should be visible in GS.
-        * @return EFalse if plugin should not be visible in GS.
-        */
-        virtual TBool Visible() const;
-                
-        /**
-        * From MUiRunnerObserver
-        */                    
-        void UiComplete( TInt aUirEvent );
-        
-        /**
-        * From MEikListBoxObserver
-        */
-        void HandleListBoxEventL( CEikListBox* aListBox,
-                                  TListBoxEvent aEventType );
-                                          
-        /**
-        * Shows a information note.
-        * @param aResourceId Resource id of the showed text .
-        */
-        void ShowInfoNoteL( TInt aResourceId );
-
-        /**
-        * Shows a confirmation note.
-        * @param aResourceId Resource id of the showed text .
-        */
-        void ShowConfirmNoteL( TInt aResourceId );
-
-        /**
-        * Shows a confirmation note.
-        * @param aResourceId Resource id of the showed text .
-        */
-        void ShowConfirmNoteAPNL( TInt aResourceId, TPtrC& aAPN  );
-   
-      /**
-        * Init menu pane
-        */
-        virtual void DynInitMenuPaneL( TInt aResourceId, 
-                                       CEikMenuPane* aMenuPane );
-		
-        /**
-        * Method for getting the container 
-        *
-        * @return the container 
-        *         
-        */
-        CAPControlListPluginContainer* Container();
-                
-        /**
-        * Method for getting the APIWrapper 
-        *
-        * @return the APIWrapper 
-        *         
-        */
-        CAPControlListAPIWrapper* APIWrapper();
-
-    protected:
-    
-        /**
-        * Constructor
-        */
-        CAPControlListPlugin();
-
-    private:
-    
-        /**
-        * Second phase constructor
-        */
-        TAny ConstructL();
-                                                     
-                    
-    private: //data
-        
-        //@var pointer to the container - owned
-        CAPControlListPluginContainer* 	iContainer; 
-        
-        //@var Previous view.
-        TVwsViewId 						iPrevViewId; 
-        
-        //@var resource loader
-        RConeResourceLoader 			iResources;
-
-        //@var should the plugin should be visible and used in 
-        // the Connection settings.        
-        TBool 							iVisible;
-        
-        //@var class for wrapping asyncron API calls - owned
-        CAPControlListAPIWrapper* 		iAPIWrapper;
-        
-		//@var Wrapper class for asyncron syncron API call 
-		//NotifyIccAccessCapsChange - owned        
-        CAPControlListCapsChange* 		iChangeNotifier;
-        
-        // for the FeatureManager
-        TBool                           iHelp;
-	};
-
-#endif //APCONTROLLIST_PLUGIN_H__
-
-//End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugin.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     This file contains declarations for resources of APControl List Plugin.
-*     The file can be included in C++ or resource file.
-*
-*/
-
-
-#ifndef APCONTROLLISTUI_HRH
-#define APCONTROLLISTUI_HRH
-
-//Menu commands.
-enum TAPControlListMenuCommands
-    {
-    EAPControlListCmdActivate = 7777,
-    EAPControlListCmdDeactivate,
-    EAPControlListCmdAdd,
-    EAPControlListCmdRemove,
-    EAPControlListCmdExit
-    };
-    
-enum { KMaxApnNameWitoutLabelLength = 99 }; //MaxApnName - 1
-    
-#endif      //  APCONTROLLISTUI_HRH
-
-// End of File
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistplugincontainer.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +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:  
-*     Container class for APControl list plugin.
-*
-*/
-
-
-#ifndef APCONTROLLIST_PLUGIN_CONTAINER_H
-#define APCONTROLLIST_PLUGIN_CONTAINER_H
-
-// INCLUDES
-#include <coeccntx.h>
-#include <eikclb.h>
-
-// FORWARD DECLARATIONS
-class CApControlListbox;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-class CAPControlListPlugin;
-class MEikListBoxObserver;
-class CApControlListboxModel;
-
-// UID of general settings app, in which help texts are included
-const   TUid    KHelpUidAPControlList = { 0x100058EC };
-
-
-// CLASS DECLARATION
-
-/**
-*  CAPControlListPluginContainer container class
-*  container class for APControl list plugin 
-*/
-class CAPControlListPluginContainer : public CCoeControl
-    {
-    
-    public: 
-        
-        /**
-        * Symbian OS constructor.
-        *
-        * @param aRect Listbox's rect.
-        * @param aListObserver pointer to the list observer
-        */
-        void ConstructL( const TRect& aRect, 
-                         MEikListBoxObserver* aListObserver );
-
-        /**
-        * Destructor.
-        */
-        ~CAPControlListPluginContainer();
-    
-    public: // From CCoeControl
-    
-        /**
-        * From CCoeControl, gives back the count of contained controls.
-        */
-        virtual TInt CountComponentControls() const;
-
-        /**
-        * From CCoeControl, gives back the given indexed 
-        * from contained controls.
-		* @param aIndex index
-        */        
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-
-        /**
-        * From CCoeControl, resizes the contained controls.
-        */
-        virtual void SizeChanged();
-        
-        /**
-        * From CCoeControl, processes the given key event.
-	    * @param aKeyEvent The key event that occured.
-		* @param aType The type of key event that occured.
-	    * @return @c EKeyWasConsumed if the event was processed,
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType );
-    
-        /** 
-        * From CCoeControl, gets the control's help context.
-     	* @param aContext help context.
-        */
-        virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-        /**
-        * From CCoeControl, used for sclable ui and landscape support.
-     	* @param aType A message UID value.
-        */        
-        void HandleResourceChange( TInt aType );
-          
-        /**
-        * From CoeControl,SizeChanged.
-        * @param aDrawNow Contains the value that was passed to it by 
-        *        @c SetFocus(). 
-        */        
-        virtual void FocusChanged(TDrawNow aDrawNow);  
-        
-        /**
-        * Adds to the ListBox
-        * @param newItem new item.
-        */        
-        void AddToListBoxL(TPtrC& newItem);              
-        
-        /**
-        * Sets Current Item Index in the ListBox
-        * @param index Current item index.
-        */        
-		void SetCurrentItemIndex(TInt index);
-		
-        /**
-        * Gets current item index
-        * @return Current item index in the ListBox
-        */        
-		TInt CurrentItemIndex();
-		
-        /**
-        * Removes current item from ListBox
-        */        
-		void RemoveFromListBoxL();
-		
-        /**
-        * Gets the number of items in the list
-        * @return the number of items in the list
-        */
-        TInt NumberOfItems() const;
-		
-        /**
-        * Writes text with ID to the NaviPane
-        */
-        void WriteToNaviPaneL( TInt aResourceId );
-        
-    private:
-
-        /**
-        * Sets the title pane to the appropriate text.
-        * @param aResourceId Resource id of the showed text .
-        */
-        void TitlePaneTextsL( TInt aResourceId );
-
-    public:
-        
-        //@var Listbox  - owned
-        CApControlListbox* 				iListBox;
-        //@var Model for the listbox  - owned
-        CApControlListboxModel*     	iModel;
-
-    private:
-    
-        //@var For NaviPane. - owned
-        CAknNavigationDecorator* 		iNaviDecorator;
-
-        //@var For NaviPane. - owned
-        CAknNavigationControlContainer* iNaviPane;
-        
-    };
-
-#endif //APCONTROLLIST_PLUGIN_CONTAINER_H   
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistpluginlogger.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Logging macros for APControl List Plugin
-*
-*/
-
-
-#ifndef APCONROL_LIST_PLUGIN_LOGGER_H
-#define APCONROL_LIST_PLUGIN_LOGGER_H
-
-// INCLUDES
-
-#ifdef _DEBUG
-    #include <e32std.h>
-    #include <e32def.h>
-    #include <flogger.h>
-
-    // TYPES
-
-    enum TAPControlListPluginLogMask             ///< Log mask bits.
-        {
-        ELogOff         = 0x00000000,   ///< Don't log.
-        EApUi           = 0x00000001,   ///< Log transaction activity.
-        ESelector       = 0x00000002,   ///< Log Selection activity.
-        EEditing        = 0x00000004,   ///< Log editing activity.
-        EModel          = 0x00000008,   ///< Log model activity.
-
-        EProtection     = 0x00000020,   ///< Log protection activity.
-        EApItem         = 0x00000040,   ///< Log ApItem activity.
-        ECommons        = 0x00000080,   ///< Log transaction activity.
-        EActiveDb       = 0x000000F0,   ///< Log active db&notific. activity.
-        ELogAll         = 0xFFFFFFFF    ///< Log all.
-        };
-
-    // MACROS
-
-    /// Determines what to log. Construct this from TApEngineLogMask values.
-    #define APCONTROL_LIST_LOG_MASK ELogAll
-    /// Determines log detail (0==basic level).
-    #define APCONTROL_LIST_LOG_LEVEL 4
-
-    // CLASS DECLARATION
-
-    /**
-    * Logger class.
-    */
-NONSHARABLE_CLASS( APControlListPluginLogger )
-        {
-        public:     // new methods
-
-        /**
-        * Write formatted log.
-        * @param aMask Log mask.
-        * @param aLevel Log level.
-        * @param aFmt Format string.
-        */
-        static void Write
-            ( TInt32 aMask, TInt aLevel, 
-              TRefByValue<const TDesC16> aFmt, ... );
-
-        /**
-        * Write formatted log.
-        * @param aMask Log mask.
-        * @param aLevel Log level.
-        * @param aFmt Format string.
-        * @param aList Variable argument list.
-        */
-        static void Write
-            (
-            TInt32 aMask,
-            TInt aLevel,
-            TRefByValue<const TDesC16> aFmt,
-            VA_LIST& aList
-            );
-
-        /**
-        * Write formatted log.
-        * @param aMask Log mask.
-        * @param aLevel Log level.
-        * @param aFmt Format string.
-        */
-        static void Write
-            ( TInt32 aMask, TInt aLevel, 
-              TRefByValue<const TDesC8> aFmt, ... );
-
-        /**
-        * Write formatted log.
-        * @param aMask Log mask.
-        * @param aLevel Log level.
-        * @param aFmt Format string.
-        * @param aList Variable argument list.
-        */
-        static void Write
-            (
-            TInt32 aMask,
-            TInt aLevel,
-            TRefByValue<const TDesC8> aFmt,
-            VA_LIST& aList
-            );
-
-        /**
-        * Write hex dump.
-        * @param aMask Log mask.
-        * @param aLevel Log level.
-        * @param aHeader Header string.
-        * @param aMargin Margin.
-        * @param aPtr Data.
-        * @param aLen Data length.
-        */
-        static void HexDump
-            (
-            TInt32 aMask,
-            TInt aLevel, 
-            const TText* aHeader,
-            const TText* aMargin,
-            const TUint8* aPtr,
-            TInt aLen
-            );
-
-        /**
-        * Create log dir.
-        */
-		static void FCreate();
-        };
-
-
-	#define CLOG_CREATE()  {APControlListPluginLogger::FCreate();}
-    /// Write formatted to log.
-    #define CLOG( body ) APControlListPluginLogger::Write body
-    /// Write hex dump.
-    #define CDUMP( body ) APControlListPluginLogger::HexDump body
-
-#else /* not defined _DEBUG */
-
-    /// Do nothing (log disabled).
-    #define CLOG( body )
-    /// Do nothing (log disabled).
-    #define CDUMP( body )
-	#define CLOG_CREATE()
-
-#endif /* def _DEBUG */
-
-#endif /* def APCONROL_LIST_PLUGIN_LOGGER_H */
--- a/accesspointcontrol/apcontrollistplugin/loc/apcontrollistplugin.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +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: 
-*        Localization strings for Plugin
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-//d:Text of a list item in Connection view's list
-//d:Item opens APN control list view
-//l:list_single_large_graphic_pane_t1 
-//r:3.1
-//
-#define qtn_acl_menu_item "Access point name (APN) control list"
-
-
-//d:Title pane text of the APN control list view
-//l:title_pane_t2/opt12
-//r:3.1
-//
-#define qtn_acl_title "APN control list"
-
-//d:Text of the wait window while the program reads the info from the SIM card
-//l:popup_note_wait_window
-//r:3.1
-//
-#define qtn_acl_wait_reading_sim "Reading info from SIM card"
-
-//d:Text in a note window
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_info_not_active "APN control list not active"
-
-//d:Text in a note window
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_info_active "APN control list is activated"
-
-//d:Text in the navi text pane pane when the control is not active
-//l:navi_text_pane_t1   
-//r:3.1
-//
-#define qtn_acl_navi_not_active "Control not active"
-
-//d:Text in the navi text pane pane when the control is active
-//l:navi_text_pane_t1   
-//r:3.1
-//
-#define qtn_acl_navi_active "Control active"
-
-//d:This is the text in the ABC column when when the list is empty
-//l:main_pane_empty_t1/opt2
-//r:3.1
-//
-#define qtn_acl_empty_view_primary "(no APNs)"
-
-//d:This is the secondary text in the ABC column when when the list is empty
-//l:main_list_empty_pane/opt2
-//r:3.1
-//
-#define qtn_acl_empty_view_secondary "Select Add APN from Options menu to add it to control list" 
-
-//d:Command in options menu.
-//d:Activates the currently selected list item.
-//l:list_single_pane_t1_cp2
-//r:3.1
-//
-#define qtn_acl_options_activate_control "Activate control"
-
-//d:Command in options menu.
-//d:Deactivates the currently selected list item.
-//l:list_single_pane_t1_cp2
-//r:3.1
-//
-#define qtn_acl_options_deactivate_control "Deactivate control"
-
-//d:If the APN control list is activated
-//d:this note is displayed.
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_conf_control_activated "APN control list activated"
-
-//d:If the APN control list is deactivated
-//d:this note is displayed.
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_conf_control_deactivated "APN control list deactivated"
-
-//d:Command in options menu.
-//d:Adds an APN manually
-//l:list_single_pane_t1_cp2
-//r:3.1
-//
-#define qtn_acl_options_add_apn_manually "Add APN manually"
-
-//d:Text in data query window
-//d:text of the data query window with wich is possible to add APN manually
-//l:popup_query_data_window
-//r:3.1
-//
-#define qtn_acl_prmpt_apn_to_add "APN to add:"
-
-//d:Text in the popup window whics comes up when the APN is
-//d:added to the control list
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_conf_apn_added "APN '%U' added to control list"
-
-//d:Text in the popup window whics comes up when a Network-provided APN is
-//d:added to the control list
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_conf_nw_provided_apn_added "Network-provided APN added to control list"
-
-//d:Command in options menu.
-//d:Removes currently selected list item from the list.
-//l:list_single_pane_t1_cp2
-//r:3.1
-//
-#define qtn_acl_options_remove "Remove"
-
-//d:Text in the popup window whics comes up when
-//d:the APN is removed from list
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_conf_apn_removed "APN removed from list"
-
-//d:APN name for network-provided APN in the list
-//l:list_single_pane_t1
-//r:3.1
-//
-#define qtn_acl_network_provided_apn "Network-provided APN"
-
-//d:Text in a note window
-//l:popup_note_window
-//r:3.1
-//
-#define qtn_acl_err_invalid_input "Invalid input value"
-
-// End of File
-
-
--- a/accesspointcontrol/apcontrollistplugin/rom/APControlListPlugin.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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:  Image description file for project APControlListPlugin
-*
-*/
-
-
-#ifndef __APControlListPLUGIN_IBY__
-#define __APControlListPLUGIN_IBY__
-
-#ifdef __PROTOCOL_WCDMA
-#ifdef _DEBUG
-ECOM_PLUGIN_UDEB(APControlListPlugin.DLL,10281BB4.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,APControlListplugin)
-#else
-ECOM_PLUGIN(APControlListPlugin.DLL,10281BB4.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,APControlListplugin)
-#endif
-#endif //__PROTOCOL_WCDMA
-
-#endif __APControlListPLUGIN_IBY__
\ No newline at end of file
--- a/accesspointcontrol/apcontrollistplugin/rom/APControlListPluginResources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +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:  Image description file for project APControlListPlugin
-*
-*/
-
-
-#ifndef __APControlListPLUGIN_RESOURCES_IBY__
-#define __APControlListPLUGIN_RESOURCES_IBY__
-
-#ifdef __PROTOCOL_WCDMA
-data=DATAZ_\RESOURCE_FILES_DIR\APControlListPluginRsc.rsc RESOURCE_FILES_DIR\APControlListPluginRsc.rsc
-#endif //__PROTOCOL_WCDMA
-
-#endif __APControlListPLUGIN_RESOURCES_IBY__
\ No newline at end of file
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistapiwrapper.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,774 +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:  Class for asyncron calls.
-*
-*/
-
-// INCLUDE FILES
-#include <AknQueryDialog.h>
-#include <rmmcustomapi.h>
-#include <etelmm.h>
-#include <apcontrollistpluginrsc.rsg>
-#include <errorres.rsg>
-#include <StringLoader.h>
-#include <aknnotewrappers.h> 
-
-#include "apcontrollistapiwrapper.h"
-#include "apcontrollistpluginlogger.h"
-#include "apcontrollistplugincontainer.h"
-#include "apcontrollistplugin.h"
-#include "apcontrollistbox.h"
-#include "centralrepository.h"
-#include "CoreApplicationUIsSDKCRKeys.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// ----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper::CAPControlListAPIWrapper
-// Description: CAPControlListAPIWrapper constructer 
-// ----------------------------------------------------------------------------- 
-//
-CAPControlListAPIWrapper::CAPControlListAPIWrapper(
-							CAPControlListPlugin& aPlugin, TInt aPriority ) : 
-											CActive( aPriority ), 
-											iPlugin(aPlugin),
-											iApnPKG(iApn),
-											iSimCardError( EFalse )
-	{
-	CActiveScheduler::Add( this ); 
-	}
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper:: CAPControlListAPIWrapper
-// Description: CAPControlListAPIWrapper Destructer
-// ----------------------------------------------------------------------------- 
-// 
-CAPControlListAPIWrapper::~CAPControlListAPIWrapper()
-	{
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::~CAPControlListAPIWrapper" ) ) );
-	Cancel();
-	iCustomAPI.Close();
-	iPhone.Close();
-	iServer.Close();
-	delete iAPN;
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::~CAPControlListAPIWrapper" ) ) );
-	}
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper::RequestFunction
-// Description: Request Function for CAPControlListAPIWrapper 
-// ---------------------------------------------------------------------------- 
-//
-void CAPControlListAPIWrapper::SecurityCheck(TRequestType aRequest) 
-	{
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::SecurityCheck" ) ) );
-	if( !IsActive() )
-		{
-		iCustomAPI.CheckSecurityCode (iStatus, 
-								RMmCustomAPI::ESecurityCodePin2 ); 	 	
-		iRequest = aRequest;	
-		SetActive();
-		}
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::SecurityCheck" ) ) );
-	}
-
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper::DoCancel
-// Description: This is called from CActive's Cancel 
-//----------------------------------------------------------------------------- 
-//
-void CAPControlListAPIWrapper::DoCancel()
-	{
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::DoCancel" ) ) );
-	CLOG( ( ESelector, 0, _L( "Current request: %d" ), iRequest ) );
-	switch(iRequest)
-	{
-	case EEnumerateAPN: 
-        iPhone.CancelAsyncRequest(EMobilePhoneEnumerateAPNEntries);
-	    break; 
-	case EReadData: 
-        iPhone.CancelAsyncRequest(EMobilePhoneGetAPNname);
-	    break;
-	    
-	// Since there are no enums for these, can't cancel  
-	case EAddAPNSecurity:
-	case EAddAPN:
-	case ERemoveAPNSecurity:
-	case ERemoveAPN: 
-	case EActivateACLSecurity:
-	case EActivateACL: 
-	case EDeactivateACLSecurity:
-	case EDeactivateACL:
-	    break; 	
-	 
-	case ENoRequest: // no active request
-	    break; 	
-	default:
-		// This could be only in case of programming error
-		CLOG( ( ESelector, 0, _L( "State Error: %d" ), iRequest ) );
-	    break;
-	}
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::DoCancel" ) ) );
-	}
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper::FinishReadDataL
-// Description: Case EReadData in RunL  
-//----------------------------------------------------------------------------- 
-//
-void CAPControlListAPIWrapper::FinishReadDataL()
-	{
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::FinishReadDataL" ) ) );
-	if (iIndex > 0)
-		{
-		iApn = iApnPKG();
-		// lablel lengthes must be replaced with dots and  
-	    // removed from the beginnig
-	    if ( iApn.iApn.Length() )
-    	    {
-    	    TUint8 lablelLength	= (TUint8)(iApn.iApn[0]);
-    	    TUint8 wholeLength	= lablelLength;
-    	    iApn.iApn.Delete(0,1);
-    	    while (iApn.iApn.Length() > wholeLength)
-    	        {
-    	        wholeLength = wholeLength + 
-    	            (TUint8)(iApn.iApn[lablelLength]) + 1;
-    	        iApn.iApn[lablelLength] = '.';
-    	        lablelLength = wholeLength;//place of next dot
-    	        }	        
-		    HBufC* buf = HBufC::NewLC( RMobilePhone::KMaxApnName );
-		    buf->Des().Copy( iApn.iApn );
-		    TPtrC itemPtr(buf->Des());
-			iPlugin.Container()->AddToListBoxL(itemPtr);			
-		    CleanupStack::PopAndDestroy( buf );
-    	    }
-	    else
-	        {
-			// Empty APN means network provided APN
-    		HBufC* buf = StringLoader::LoadLC ( 
-    							R_QTN_ACL_NETWORK_PROVIDED_APN );
-    		TPtrC nPtr(buf->Des());
-			iPlugin.Container()->AddToListBoxL(nPtr);			
-		    CleanupStack::PopAndDestroy( buf );
-	        }
-		}
-	if (iIndex < iSize)
-		{
-		DoReadData();
-		iIndex++;
-		}
-	else
-		{
-		iRequest = ENoRequest;			
-		if ( iSize > 0 )
-			{
-			iPlugin.Container()->SetCurrentItemIndex(0);    		
-			}				
-		}
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::FinishReadDataL" ) ) );
-	}
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListAPIWrapper::RunL 
-// Description: CActive::RunL implementation which will either stop the
-// Scheduler or increment the count
-//----------------------------------------------------------------------------- 
-//
-void CAPControlListAPIWrapper::RunL()
-	{
-    CLOG( ( ESelector, 0, _L( "RequestStatus: %d for request: %d" ), 
-                                                iStatus.Int(), iRequest) );     
-
-    // If there happens an error show error note and set this sw to error
-    // state --> does not accept any operations but closing.
-	if ( iStatus.Int() != KErrNone )
-		{
-        ShowSimCardErrorNoteL();
-
-        iSimCardError = ETrue;
-	    iRequest = ENoRequest;  
-
-		return;
-		}
-	
-	iSimCardError = EFalse;
-	
-	switch(iRequest)
-	{
-	case EGetACLStatus:
-	    {
-		CLOG( ( ESelector, 0, _L( "EGetACLStatus OK" ) ) );
-#ifdef _DEBUG
-    	if (iAclStatus == RMobilePhone::EAPNControlListServiceEnabled)
-    		{		
-        	CLOG( ( ESelector, 0, _L( "iAclStatus == EAclStatusEnabled" ) ) );
-    		}
-    	else if (iAclStatus == RMobilePhone::EAPNControlListServiceDisabled)
-    		{		
-        	CLOG( ( ESelector, 0, _L( "iAclStatus == EAclStatusDisabled" ) ) );
-    		}
-    	else
-    		{		
-        	CLOG( ( ESelector, 0, _L( "iAclStatus is bad!!!" ) ) );
-    		}
-#endif 		    
-		if ( Enabled() )
-			{
-		    iPlugin.ShowInfoNoteL(R_QTN_ACL_INFO_ACTIVE);
-		    iPlugin.Container()->WriteToNaviPaneL(R_QTN_ACL_NAVI_ACTIVE);
-			}
-		else
-			{
-		    iPlugin.ShowInfoNoteL(R_QTN_ACL_INFO_NOT_ACTIVE);
-		    iPlugin.Container()->WriteToNaviPaneL(R_QTN_ACL_NAVI_NOT_ACTIVE);
-			}
-        EnumerateAPN();
-	    break; 	        
-	    }
-	case EAddAPNSecurity:
-		CLOG( ( ESelector, 0, _L( "EAddAPNSecurity OK" ) ) );
-		iSecurityChecked = ETrue;
-		DoAddAPNL();
-	    break; 
-	case EAddAPN:
-	    {
-		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "EAddAPN OK" ) ) );
-        TPtrC tptrc(iAPN->Des());
-		if (tptrc.Length())
-			{
-	    	iPlugin.Container()->AddToListBoxL(tptrc);        
-			}
-		else
-			{
-			HBufC* buf = StringLoader::LoadLC ( 
-						R_QTN_ACL_NETWORK_PROVIDED_APN );
-			TPtrC itemPtr(buf->Des());
-			iPlugin.Container()->AddToListBoxL(itemPtr);			
-			CleanupStack::PopAndDestroy( buf );
-			}
-	    break; 	        
-	    } 
-	case ERemoveAPNSecurity:
-		CLOG( ( ESelector, 0, _L( "ERemoveAPNSecurity OK" ) ) );
-		iSecurityChecked = ETrue;
-		DoRemoveAPN();
-	    break; 
-	case ERemoveAPN: 
-		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "ERemoveAPN OK" ) ) );		
-		iPlugin.Container()->RemoveFromListBoxL();    			
-	    break; 
-	case EActivateACLSecurity:
-		CLOG( ( ESelector, 0, _L( "EActivateACLSecurity OK" ) ) );
-		iSecurityChecked = ETrue;
-		SetACLStatus( RMobilePhone::EAPNControlListServiceEnabled );
-	    break; 
-	case EActivateACL: 
-		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "EActivateACL OK" ) ) );
-		iAclStatus = RMobilePhone::EAPNControlListServiceEnabled;
-		iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_CONTROL_ACTIVATED);	
-		iPlugin.Container()->WriteToNaviPaneL(R_QTN_ACL_NAVI_ACTIVE);
-	    break; 
-	case EDeactivateACLSecurity:
-		CLOG( ( ESelector, 0, _L( "EDeactivateACLSecurity OK" ) ) );
-		iSecurityChecked = ETrue;
-		SetACLStatus( RMobilePhone::EAPNControlListServiceDisabled );
-	    break; 
-	case EDeactivateACL: 
-		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "EDeactivateACL OK" ) ) );
-		iAclStatus = RMobilePhone::EAPNControlListServiceDisabled;
-		iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_CONTROL_DEACTIVATED);	
-		iPlugin.Container()->WriteToNaviPaneL(R_QTN_ACL_NAVI_NOT_ACTIVE);
-	    break; 
-	case EEnumerateAPN: 
-		CLOG( ( ESelector, 0, _L( "EEnumerateAPN OK" ) ) );
-		iRequest = EReadData;	
-		FinishReadDataL();
-	    break; 
-	case EReadData: 
-		CLOG( ( ESelector, 0, _L( "EReadData OK" ) ) );
-		FinishReadDataL();
-	    break; 
-	default:
-		{
-		// This could be only in case of programming error
-		CLOG( ( ESelector, 0, _L( "State Error: %d" ), iRequest ) );
-		User::Leave(KErrGeneral);			
-		}
-	    break;
-	}
-	}
-	
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::DoReadData
-// ---------------------------------------------------------
-void CAPControlListAPIWrapper::DoReadData() 
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::ReadData2" ) ) );
-	if( !IsActive() )
-		{
-		iRequest = EReadData;			
-		iApn.iApn.Zero();
-		iApn.iApn.SetMax();
-		iPhone.GetAPNname(iStatus, iIndex, iApnPKG);
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::ReadData2" ) ) );
-    }
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::ReadData
-// ---------------------------------------------------------
-void CAPControlListAPIWrapper::ReadData() 
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::ReadData" ) ) );
-	if( !IsActive() )
-		{
-		iRequest = EGetACLStatus;			
-	    iPhone.GetAPNControlListServiceStatus( iStatus, iAclStatus );
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::ReadData" ) ) );
-    }
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::ReadData
-// ---------------------------------------------------------
-void CAPControlListAPIWrapper::EnumerateAPN() 
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::EnumerateAPN" ) ) );
-	if( !IsActive() )
-		{
-		iRequest = EEnumerateAPN;			
-		iIndex = 0;
-		iPhone.EnumerateAPNEntries(iStatus, iSize);
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::EnumerateAPN" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::DeActivateACLL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::DeActivateACL()
-    {   	
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::DeActivateACLL" ) ) );
-    
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-	if (iSecurityChecked)
-		{
-		SetACLStatus( RMobilePhone::EAPNControlListServiceDisabled );
-		}
-	else
-		{
-		SecurityCheck(EDeactivateACLSecurity);
-		}
-    
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::DeActivateACLL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::ActivateACLL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::ActivateACL()
-    {   	
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::ActivateACLL" ) ) );
-
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-	if (iSecurityChecked)
-		{
-		SetACLStatus( RMobilePhone::EAPNControlListServiceEnabled );
-		}
-	else
-		{
-		SecurityCheck(EActivateACLSecurity);
-		}
-    
-    CLOG( ( ESelector, 0, _L( 
-    			"<- CAPControlListAPIWrapper::ActivateACLL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::SetACLStatus()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::SetACLStatus( const 
-    RMobilePhone::TAPNControlListServiceStatus aAPNControlListServiceStatus )
-    {   	
-    CLOG( ( ESelector, 0, 
-    				_L( "-> CAPControlListAPIWrapper::SetACLStatus" ) ) );
-    
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-
-	if( !IsActive() )
-		{
-   		iPhone.SetAPNControlListServiceStatus( iStatus, 
-   		                    aAPNControlListServiceStatus );
-		if ( aAPNControlListServiceStatus == 
-		        RMobilePhone::EAPNControlListServiceEnabled )
-			{
-			iRequest = EActivateACL;			
-			}
-		else
-			{
-			iRequest = EDeactivateACL;			
-			}
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( 
-    					"<- CAPControlListAPIWrapper::SetACLStatus" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::RemoveAPN()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::RemoveAPN()
-    {   	
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::RemoveAPNL" ) ) );
-    
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-
-    if( iPlugin.Container()->NumberOfItems() > 0)
-        {
-    	if (iSecurityChecked)
-    		{
-    		DoRemoveAPN();
-    		}
-    	else
-    		{
-    		SecurityCheck(ERemoveAPNSecurity);
-    		}
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::RemoveAPNL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::DoRemoveAPN()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::DoRemoveAPN()
-    {   	
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::RemoveAPN2L" ) ) );
-    
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-
-	if( !IsActive() )
-		{
-		TInt index = iPlugin.Container()->CurrentItemIndex();
-		iPhone.DeleteAPNName( iStatus, index );
-		iRequest = ERemoveAPN;
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::RemoveAPN2L" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::AddAPNL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::AddAPNL()
-    {   	
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::AddAPNL" ) ) );
-    
-    // Check if in error state
-    if ( iSimCardError )
-        {
-        ShowSimCardErrorNoteL();
-        return;
-        }
-	if (iSecurityChecked)
-		{
-		DoAddAPNL();
-		}
-	else
-		{
-		SecurityCheck(EAddAPNSecurity);
-		}
-    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::AddAPNL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::DoAddAPNL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::DoAddAPNL()
-    {   	
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::DoAddAPNL" ) ) );
-	if( !IsActive() )
-		{
-		delete iAPN;
-		iAPN = NULL;
-		iAPN = HBufC::NewL( RMobilePhone::KMaxApnName );
-	    TPtr16 ptr( iAPN->Des() );		    
-	    CAknQueryDialog* dlg = 
-	                CAknQueryDialog::NewL( ptr, CAknQueryDialog::ENoTone );
-	       
-	    TBool notCanceled = EFalse;
-	    
-	    // Ask the user until either the input is valid or canceled
-	    while ( dlg->ExecuteLD( R_APN_NAME_QUERY ) )
-	        {
-	        
-	        TBool validInput = ETrue;
-	        
-            for (TInt index = 0; index < ptr.Length(); index++)
-                {
-                TChar inputchar = ptr[index];
-                // For ACL only 0-9, A-Z, a-z, '-' and '.' are valid
-                if (! ( ('0' <= inputchar && inputchar <= '9') ||
-                        ('A' <= inputchar && inputchar <= 'Z') ||
-                        ('a' <= inputchar && inputchar <= 'z') ||
-                        inputchar == '-' || inputchar == '.' ) )
-                    {
-                    validInput = EFalse;
-                    break;
-                    }
-                }
-            
-	        if ( validInput )
-		        {
-		        notCanceled =  ETrue;
-		        break;
-		        }
-		    else
-    		    {
-                HBufC* text = StringLoader::LoadLC ( 
-                    R_QTN_ACL_ERR_INVALID_INPUT );
-                CAknErrorNote* note = new ( ELeave ) CAknErrorNote(
-                     ETrue );
-                note->ExecuteLD( *text );
-
-                CleanupStack::PopAndDestroy( text );
-                
-                dlg = 
-	                CAknQueryDialog::NewL( ptr, CAknQueryDialog::ENoTone );
-	            
-    		    }
-	        }
-	        
-	    if ( notCanceled )
-		    {
-		   
-		    // lablel lengthes must be added in place of dots and at the 
-		    // beginnig
-            _LIT8(KFormat,"%c%S"); 
-		    iApn.iApn.SetMax();
-		    iApn.iApn.Zero();		    
-            if ( iAPN->Length() )
-                {
-    	    	TBufC8<RMobilePhone::KMaxApnName> buffer;
-    	    	TBufC8<RMobilePhone::KMaxApnName> buffer2;
-    	    	buffer.Des().Copy( iAPN->Des() );
-    	    	TInt index = buffer.Des().Find(_L8("."));
-    	    	
-    	    	while (index != KErrNotFound)
-        	    	{
-       	    	    buffer2.Des().Copy( buffer.Des().Left( index ) );
-                    TPtr8 tmp = buffer2.Des();
-    			    iApn.iApn.AppendFormat(KFormat, index, &tmp);
-    			    buffer.Des().Delete(0,index+1);
-    			    index = buffer.Des().Find(_L8("."));
-        	    	}
-       	        TPtr8 tmp = buffer.Des();
-    			iApn.iApn.AppendFormat(KFormat, buffer.Length(), &tmp);               
-                }
-            else
-                {
-		        _LIT8(KEmpty8,""); 
-		        iApn.iApn.Copy(KEmpty8);                    
-                }
-            
-	        CLOG( ( ESelector, 0, _L( "Size: %d" ), iApn.iApn.Size() ) );
-	    	iPhone.AppendAPNName( iStatus, iApnPKG );
-	    	
-			iRequest = EAddAPN;
-			SetActive();
-		    }		
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::DoAddAPNL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::Visible
-// ---------------------------------------------------------
-TBool CAPControlListAPIWrapper::Visible() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::Visible" ) ) );    
-    if (!iConnAllowed)
-        {
-		return EFalse; // phone is in off-line mode            
-        }
-	TUint32 aCaps;	  
-	iPhone.GetIccAccessCaps(aCaps);
-	CLOG( ( ESelector, 0, _L( "%d" ),  aCaps) );
-	if (aCaps & RMobilePhone::KCapsUSimAccessSupported)
-		{		
-		CLOG( ( ESelector, 0, _L( 
-						"<- CAPControlListAPIWrapper::Visible 2" ) ) );
-		return ETrue;
-		}
-	else
-		{			
-		CLOG( ( ESelector, 0, _L( 
-						"<- CAPControlListAPIWrapper::Visible 3" ) ) );
-		return EFalse;
-		}
-    }
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::Enabled
-// ---------------------------------------------------------
-TBool CAPControlListAPIWrapper::Enabled() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::Enabled" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::Enabled" ) ) );
-	if ( iAclStatus == RMobilePhone::EAPNControlListServiceEnabled )
-		{
-		return ETrue;		
-		}
-	else
-		{
-		return EFalse;
-		}		
-    }
-	
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::ConstructL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::ConstructL()
-    {   	
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListAPIWrapper::ConstructL" ) ) );
-    // init RMobilePhone and RMmCustomAPI
-	_LIT (KTsyName,"phonetsy.tsy");
-	RTelServer::TPhoneInfo info;
-	RPhone::TLineInfo lineInfo;
-	User::LeaveIfError( iServer.Connect() );
-	User::LeaveIfError( iServer.LoadPhoneModule( KTsyName ) );
-	User::LeaveIfError( iServer.GetPhoneInfo( 0, info ) );
-	User::LeaveIfError( iPhone.Open(iServer, info.iName) );	  
-	User::LeaveIfError( iPhone.Initialise() );
-	User::LeaveIfError( iCustomAPI.Open(iPhone) );
-	           		
-	CRepository* aRepository = CRepository::NewL( KCRUidCoreApplicationUIs );
-    aRepository->Get( KCoreAppUIsNetworkConnectionAllowed, iConnAllowed);
-    delete aRepository;
-
-    if (!iAPN)
-		{
-		iAPN = HBufC::NewL( RMobilePhone::KMaxApnName );
-		}
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::ConstructL" ) ) );
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::NotifyIccAccessCapsChange()
-// ----------------------------------------------------------
-//
-void CAPControlListAPIWrapper::NotifyIccAccessCapsChange(
-							TRequestStatus& aReqStatus, TUint32& aCaps)
-    {
-    CLOG( ( ESelector, 0, 
-        _L( "-> CAPControlListAPIWrapper::NotifyIccAccessCapsChange" ) ) );
-    iPhone.NotifyIccAccessCapsChange( aReqStatus, aCaps );
-    CLOG( ( ESelector, 0, 
-        _L( "<- CAPControlListAPIWrapper::NotifyIccAccessCapsChange" ) ) );
-    }
-// ----------------------------------------------------------
-// CAPControlListPlugin::CancelNotify()
-// ----------------------------------------------------------
-//
-void CAPControlListAPIWrapper::CancelNotify()
-    {
-    CLOG( ( ESelector, 0, 
-        _L( "-> CAPControlListAPIWrapper::CancelNotify" ) ) );
-    iPhone.CancelAsyncRequest(EMobilePhoneNotifyIccAccessCapsChange);
-    CLOG( ( ESelector, 0, 
-        _L( "<- CAPControlListAPIWrapper::CancelNotify" ) ) );
-    }
-// ----------------------------------------------------------
-// CAPControlListPlugin::ShowSimCardErrorNoteL()
-// ----------------------------------------------------------
-//
-void CAPControlListAPIWrapper::ShowSimCardErrorNoteL()
-    {
-    HBufC* text = StringLoader::LoadLC ( 
-        R_QTN_ACL_ERR_SIM_CARD );
-    CAknErrorNote* note = new ( ELeave ) CAknErrorNote(
-         ETrue );
-    note->ExecuteLD( *text );
-
-    CleanupStack::PopAndDestroy( text );
-    }
-// -----------------------------------------------------------------------------
-// Handles the leave from the RunL()
-// -----------------------------------------------------------------------------
-//
-TInt CAPControlListAPIWrapper::RunError( TInt /*aLeaveCode*/ )
-    {
-    iSimCardError = ETrue;
-    iRequest = ENoRequest;  
-
-    return KErrNone;
-    }
-
-
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistbox.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +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:  Implementation of ApControlListbox.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <eikclbd.h>
-#include <avkon.mbg>
-#include <aknkeys.h>
-#include <apcontrollistpluginrsc.rsg>
-#include <AknsUtils.h>
-#include <data_caging_path_literals.hrh>
-#include <StringLoader.h>
-
-#include "apcontrollistbox.h"
-#include "apcontrollistboxmodel.h"
-#include "apcontrollistpluginlogger.h"
-#include "apcontrollistplugin.h"
-#include "apcontrollistapiwrapper.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-
-// ---------------------------------------------------------
-// CApControlListbox::CApControlListbox
-// ---------------------------------------------------------
-//
-CApControlListbox::CApControlListbox() 
-    {
-    CLOG( ( ESelector, 0, 
-        _L( "<-> CApControlListbox::CApControlListbox" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CApControlListbox::~CApControlListbox
-// ---------------------------------------------------------
-//
-CApControlListbox::~CApControlListbox()
-    {
-    CLOG( ( ESelector, 0, 
-        _L( "<-> CApControlListbox::~CApControlListbox" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CApControlListbox::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CApControlListbox::OfferKeyEventL
-( const TKeyEvent& aKeyEvent, TEventCode aType )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CApControlListbox::OfferKeyEventL" ) ) );
-
-    TKeyResponse retval ( EKeyWasConsumed );
-
-    if (    aKeyEvent.iCode == EKeyOK &&
-            !( aKeyEvent.iModifiers & EModifierShift )
-       )
-        {
-        // Enter pressed (not Shift-Enter). This will report an
-        // EEnterKeyPressed event sent to the observer (the view), which may
-        // delete this listbox. The code which processes keypresses by
-        // default, will continue (on the already deleted listbox), and
-        // will crash. So we grab this keypress here, and generate the
-        // same event, but after that, quit immediately.
-        ReportListBoxEventL( MEikListBoxObserver::EEventEnterKeyPressed );
-        // By now the listbox may have been deleted.
-        // Do not access it after this point.
-        }
-    else if (    aKeyEvent.iCode == EKeyBackspace )
-        {
-        static_cast<CAPControlListPlugin*>(iListBoxObserver)->APIWrapper()->
-            RemoveAPN();
-        }
-    else
-        {
-        retval = CAknSingleStyleListBox::OfferKeyEventL
-                            ( aKeyEvent, aType );
-        }
-
-    CLOG( ( ESelector, 0, _L( "<- CApControlListbox::OfferKeyEventL" ) ) );
-
-    return retval;
-    }
-
-
-
-// ---------------------------------------------------------
-// CApControlListbox::FocusChanged
-// ---------------------------------------------------------
-//
-void CApControlListbox::FocusChanged( TDrawNow aDrawNow )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CApControlListbox::FocusChanged" ) ) );
-
-    // Do nothing until the listbox is fully constructed
-    // The dialogpage sets the focus before calling ConstructL
-    if ( iView )
-        {
-        CAknSingleStyleListBox::FocusChanged( aDrawNow );
-        }
-
-    CLOG( ( ESelector, 0, _L( "<- CApControlListbox::FocusChanged" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CApControlListbox::HandleResourceChange
-// ---------------------------------------------------------
-//
-void CApControlListbox::HandleResourceChange(TInt aType)
-    {
-    CLOG( ( ESelector, 0, _L( 
-    				"-> CApControlListbox::HandleResourceChange" ) ) );
-    if ( aType == KAknsMessageSkinChange )
-        {        CAknSingleStyleListBox::HandleResourceChange( aType );
-        SizeChanged();
-        }    
-        
-    CAknSingleStyleListBox::HandleResourceChange( aType );
-    CLOG( ( ESelector, 0, _L( 
-    				"<- CApControlListbox::HandleResourceChange" ) ) );
-    }
-// ---------------------------------------------------------
-// CApControlListbox::AddToListBoxL
-// ---------------------------------------------------------
-//
-void CApControlListbox::SetListEmptyTextL()
-    {
-    CLOG( ( ESelector, 0, _L( 
-        "-> CApControlListbox::SetListEmptyTextL" ) ) );
-    HBufC* primary = 
-              iEikonEnv->AllocReadResourceLC( R_QTN_ACL_EMPTY_VIEW_PRIMARY );
-//    _LIT( KCmNewLine, "\n" );    
-//    primary->Des().Append( KCmNewLine );    
-    HBufC* secondary = 
-              iEikonEnv->AllocReadResourceLC( R_QTN_ACL_EMPTY_VIEW_SECONDARY );
-    CDesCArrayFlat* items = new (ELeave) CDesCArrayFlat(2);
-    CleanupStack::PushL(items);
-    items->AppendL(primary->Des()); 
-    items->AppendL(secondary->Des());      
-    HBufC* emptyText = 
-          StringLoader::LoadLC( R_TWO_STRING_FOR_EMPTY_VIEW , *items);              
-    View()->SetListEmptyTextL( *emptyText );    
-    CleanupStack::PopAndDestroy( emptyText );
-    CleanupStack::PopAndDestroy( items );
-    CleanupStack::PopAndDestroy( secondary );
-    CleanupStack::PopAndDestroy( primary );
-    
-    CLOG( ( ESelector, 0, _L( 
-        "<- CApControlListbox::SetListEmptyTextL" ) ) );
-    }
-
-// End of File
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistboxmodel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +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:  Implementation of ApControlListboxModel.
-*
-*/
-
-
-// INCLUDE FILES
-#include <aknlists.h>
-#include <apcontrollistpluginrsc.rsg>
-
-#include "apcontrollistboxmodel.h"
-#include "apcontrollistpluginlogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CApControlListboxModel::CApControlListboxModel
-// ---------------------------------------------------------
-//
-CApControlListboxModel::CApControlListboxModel()
-:CTextListBoxModel()
-    {
-    CLOG( ( ESelector, 0, _L( 
-    	"-> CApControlListboxModel::CApControlListboxModel" ) ) );
-    CLOG( ( ESelector, 0, _L( 
-    	"<- CApControlListboxModel::CApControlListboxModel" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CApControlListboxModel::~CApControlListboxModel
-// ---------------------------------------------------------
-//
-CApControlListboxModel::~CApControlListboxModel()
-    {
-    CLOG( ( ESelector, 0, _L( 
-    	"-> CApControlListboxModel::~CApControlListboxModel" ) ) );
-    CLOG( ( ESelector, 0, _L( 
-    	"<- CApControlListboxModel::~CApControlListboxModel" ) ) );
-    }
-
-
-
-// ---------------------------------------------------------
-// CApControlListboxModel::MdcaCount
-// ---------------------------------------------------------
-//
-TInt CApControlListboxModel::MdcaCount() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CApControlListboxModel::MdcaCount" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CApControlListboxModel::MdcaCount" ) ) );
-    return NumberOfItems();
-    }
-
-
-// ---------------------------------------------------------
-// CApControlListboxModel::MdcaPoint
-// ---------------------------------------------------------
-//
-
-TPtrC CApControlListboxModel::MdcaPoint( TInt aIndex ) const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CApControlListboxModel::MdcaPoint" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CApControlListboxModel::MdcaPoint" ) ) );
-    return ItemText(aIndex);
-    }
-
-
-
-
-// End of File
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistcapschange.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +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:  Class for asyncron calls.
-*
-*/
-
-
-// INCLUDE FILES
-#include <rmmcustomapi.h>
-
-#include "apcontrollistcapschange.h"
-#include "apcontrollistplugin.h"
-#include "apcontrollistapiwrapper.h"
-#include "apcontrollistpluginlogger.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// ----------------------------------------------------------------------------- 
-// CAPControlListCapsChange::CAPControlListCapsChange
-// Description: CAPControlListCapsChange constructer 
-// ----------------------------------------------------------------------------- 
-//
-CAPControlListCapsChange::CAPControlListCapsChange(
-					CAPControlListPlugin& aPlugin, TInt aPriority ) : 
-													CActive( aPriority ), 
-													iPlugin(aPlugin) 
-	{
-	CActiveScheduler::Add( this ); 
-	}
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListCapsChange:: CAPControlListCapsChange
-// Description: CAPControlListCapsChange Destructer
-// ----------------------------------------------------------------------------- 
-// 
-CAPControlListCapsChange::~CAPControlListCapsChange()
-	{
-	Cancel();
-	}
-
-
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListCapsChange::DoCancel
-// Description: This calls CActive's Cancel 
-//----------------------------------------------------------------------------- 
-//
-void CAPControlListCapsChange::DoCancel()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListCapsChange::DoCancel" ) ) );
-    iPlugin.APIWrapper()->CancelNotify();   
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListCapsChange::DoCancel" ) ) );
-    }
-
-//
-//----------------------------------------------------------------------------- 
-// CAPControlListCapsChange::RunL 
-// Description: CActive::RunL implementation which will either stop the
-// Scheduler or increment the count
-//----------------------------------------------------------------------------- 
-//
-void CAPControlListCapsChange::RunL()
-	{
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListCapsChange::RunL" ) ) );
-    CLOG( ( ESelector, 0, _L( "iStatus.Int(): %d"), iStatus.Int() ) );
-    CLOG( ( ESelector, 0, _L( "iCaps: %d"), iCaps ) );
-	if ( !(iCaps & RMobilePhone::KCapsUSimAccessSupported) )
-		{
-		iPlugin.ExitOnUSIMRemovalL();
-		}
-	else
-		{
-    	iPlugin.APIWrapper()->NotifyIccAccessCapsChange( iStatus, iCaps );
-		SetActive();			
-		}
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListCapsChange::RunL" ) ) );
-	}
-	
-
-
-// ---------------------------------------------------------
-// CAPControlListCapsChange::NotifyCapsChange()
-// ---------------------------------------------------------
-//
-void CAPControlListCapsChange::NotifyCapsChange()
-    {   	
-    CLOG( ( ESelector, 0, _L( 
-    	"-> CAPControlListCapsChange::NotifyCapsChange" ) ) );
-	if( !IsActive() )
-		{
-    	iPlugin.APIWrapper()->NotifyIccAccessCapsChange( iStatus, iCaps );
-		SetActive();	
-		}
-    CLOG( ( ESelector, 0, _L( 
-    	"<- CAPControlListCapsChange::NotifyCapsChange" ) ) );
-    }
-
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistplugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,506 +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:  APControlListPlugin class.
-*
-*/
-
-
-// INCLUDE FILES
-
-// System includes
-#include <hlplch.h>
-
-#include <aknlists.h>        //for CListBox
-#include <f32file.h>
-#include <aknnotewrappers.h> //for CAknInformationNote
-#include <AknQueryDialog.h>
-#include <StringLoader.h>
-#include <apcontrollistpluginrsc.rsg>
-#include <data_caging_path_literals.hrh>
-#include <apcontrollistplugin.mbg>
-#include <featmgr.h>
-
-// User includes
-#include "apcontrollistplugin.hrh"
-#include "apcontrollistplugin.h"
-#include "apcontrollistplugincontainer.h"
-#include "apcontrollistpluginlogger.h"
-#include "apcontrollistapiwrapper.h"
-#include "apcontrollistcapschange.h"
-
-// CONSTANTS
-// Resource file location constant
-_LIT( KResourceFileName, "APControlListPluginRsc.rsc" );
-
-// ROM folder
-_LIT( KDriveZ, "z:" );
-
-// Name of the MBM file containing icons
-_LIT( KFileIcons, "apcontrollistplugin.mbm");
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::NewL
-// First phase constructor
-// ---------------------------------------------------------
-CAPControlListPlugin* CAPControlListPlugin::NewL( TAny* /*aInitParams*/ )
-    {
-	CLOG_CREATE()
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::NewL" ) ) );
-    CAPControlListPlugin* self = new ( ELeave ) CAPControlListPlugin();
-    CleanupStack::PushL( self );
-    
-    self->ConstructL( );
-                      
-    CleanupStack::Pop( self );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::NewL" ) ) );
-    return self;     
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::NewL
-// Destructor
-// ---------------------------------------------------------
-CAPControlListPlugin::~CAPControlListPlugin()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::~CAPControlListPlugin" ) ) );
-    if( iContainer )
-    {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        delete iContainer;
-    }
-    if (iAPIWrapper)
-    {
-    	delete iAPIWrapper;
-    }
-    if (iChangeNotifier)
-    {
-    	delete iChangeNotifier;
-    }
-    iResources.Close();
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::~CAPControlListPlugin" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::Id
-// ---------------------------------------------------------
-TUid CAPControlListPlugin::Id() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::Id" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::Id" ) ) );
-    return KAPControlListPluginUid;
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::HandleCommandL( TInt aCommand )
-// ---------------------------------------------------------
-//
-void CAPControlListPlugin::HandleCommandL( TInt aCommand )
-    {   
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::HandleCommandL" ) ) );
-    switch ( aCommand )
-        {
-        case EAknSoftkeyBack :
-            {
-            // Activate the view ( from GS ) that we
-            // are supposed to return to
-            AppUi()->ActivateLocalViewL( iPrevViewId.iViewUid );
-            break;
-            }
-        case EAPControlListCmdActivate :
-            {
-            iAPIWrapper->ActivateACL();
-            break;
-            }
-        case EAPControlListCmdDeactivate :
-            {
-            iAPIWrapper->DeActivateACL();
-            break;
-            }
-        case EAPControlListCmdAdd :
-            {
-            iAPIWrapper->AddAPNL();
-            break;
-            }
-        case EAPControlListCmdRemove :
-            {
-            iAPIWrapper->RemoveAPN();
-            break;
-            }
-        case EAknCmdHelp : 
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), 
-                                                 AppUi()->AppHelpContextL() );
-            break;
-            }
-        case EEikCmdExit :
-        default :
-            {            
-            AppUi()->HandleCommandL( aCommand );
-            break;
-            }
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::HandleCommandL" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::ExitOnUSIMRemovalL
-// ---------------------------------------------------------
-void CAPControlListPlugin::ExitOnUSIMRemovalL() 
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::ExitOnUSIMRemovalL" ) ) );
-    iVisible = EFalse;
-	AppUi()->ActivateLocalViewL( iPrevViewId.iViewUid );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::ExitOnUSIMRemovalL" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::DoActivateL
-// ---------------------------------------------------------
-void CAPControlListPlugin::DoActivateL( const TVwsViewId& aPrevViewId, 
-                                      TUid /*aCustomMessageId*/, 
-                                      const TDesC8& /*aCustomMessage*/ )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::DoActivateL" ) ) );
-    if ( iPrevViewId.iViewUid.iUid == 0 )
-        {
-        //must be prepared to application switch, so it stores
-        //only the parent view (General Settings Main View)
-        iPrevViewId = aPrevViewId;
-        }
-
-    if ( !iContainer )
-        {
-        iContainer = new( ELeave ) CAPControlListPluginContainer;
-        iContainer->SetMopParent( this );
-        
-        TRAPD( error, iContainer->ConstructL( ClientRect(), this ) );
-        if ( error )
-            {
-            delete iContainer;
-            iContainer = NULL;
-            User::Leave( error );
-            }
-            
-        AppUi()->AddToViewStackL( *this, iContainer );
-        iContainer->HandleResourceChange(KEikDynamicLayoutVariantSwitch);
-        
-        if (!iAPIWrapper)  
-            {
-            iAPIWrapper = new( ELeave ) CAPControlListAPIWrapper(*this);
-            iAPIWrapper->ConstructL();
-            }
-        if (!iChangeNotifier)  
-            {
-            iChangeNotifier = new( ELeave ) CAPControlListCapsChange(*this);
-            iChangeNotifier->NotifyCapsChange();
-            }
-	    				
-        ShowInfoNoteL(R_QTN_ACL_WAIT_READING_SIM);
-        iAPIWrapper->ReadData();  
-        iContainer->HandleResourceChange(KEikDynamicLayoutVariantSwitch);
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::DoActivateL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::PluginUid
-// ---------------------------------------------------------
-TUid CAPControlListPlugin::PluginUid() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::PluginUid" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::PluginUid" ) ) );
-    return KAPControlListPluginUid;
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::GetCaption
-// ---------------------------------------------------------
-void CAPControlListPlugin::GetCaptionL( TDes& aCaption ) const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::GetCaptionL" ) ) );
-    StringLoader::Load( aCaption, R_QTN_ACL_MENU_ITEM );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::GetCaptionL" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::HasBitmap
-// ---------------------------------------------------------
-TBool CAPControlListPlugin::HasBitmap() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::HasBitmap" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::HasBitmap" ) ) );
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::GetBitmapL
-// ---------------------------------------------------------
-void CAPControlListPlugin::GetBitmapL( CFbsBitmap* /*aBitmap*/, 
-                                     CFbsBitmap* /*aMask*/ ) const
-    {
-    //no bitmap
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::GetBitmapL" ) ) );
-    User::Leave( KErrNotFound );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::GetBitmapL" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::PluginProviderCategory
-// ---------------------------------------------------------
-TInt CAPControlListPlugin::PluginProviderCategory() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::PluginProviderCategory" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::PluginProviderCategory" ) ) );
-    return EGSPluginProviderOEM;
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::CreateIconL
-// ---------------------------------------------------------    
-CGulIcon* CAPControlListPlugin::CreateIconL( const TUid aIconType )
-    {
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-    iconsFileName.Append( KFileIcons );
-    
-	CGulIcon* icon;
-       
-    if( aIconType == KGSIconTypeLbxItem )
-        {
-        icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(), 
-        KAknsIIDQgnPropSetConnAccp, 
-        iconsFileName,
-        EMbmApcontrollistpluginQgn_prop_set_conn_acl,
-        EMbmApcontrollistpluginQgn_prop_set_conn_acl_mask );
-        }
-     else
-        {
-        icon = CGSPluginInterface::CreateIconL( aIconType );
-        }
-	
-	return icon;
-    }    
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::Visible
-// ---------------------------------------------------------
-TBool CAPControlListPlugin::Visible() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::Visible" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::Visible" ) ) );
-    return iVisible;
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::CAPControlListPlugin
-// ---------------------------------------------------------
-CAPControlListPlugin::CAPControlListPlugin():
-    iPrevViewId(),
-    iResources( *CCoeEnv::Static() ),
-    iVisible(EFalse)
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::CAPControlListPlugin" ) ) );
-    // no implementation required
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::CAPControlListPlugin" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPlugin::ConstructL
-// ---------------------------------------------------------
-TAny CAPControlListPlugin::ConstructL()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::ConstructL" ) ) );
-   
-    TFileName fileName;
-    TDriveUnit drive( EDriveZ );
-    
-    fileName.Append( drive.Name() );
-    fileName.Append( KDC_RESOURCE_FILES_DIR );
-    fileName.Append( KResourceFileName );    
-    iResources.OpenL( fileName );
-
-    BaseConstructL( R_APCLPLUGIN_MAIN_VIEW );
-     
-	// get Visible   
-    iAPIWrapper = new( ELeave ) CAPControlListAPIWrapper(*this);
-    iAPIWrapper->ConstructL();
-    iVisible = iAPIWrapper->Visible();
-    iAPIWrapper->Cancel();
-    delete iAPIWrapper;
-    iAPIWrapper = NULL;
-        
-    FeatureManager::InitializeLibL();
-    iHelp = FeatureManager::FeatureSupported( KFeatureIdHelp ); 
-    FeatureManager::UnInitializeLib();
-    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::ConstructL" ) ) );
-    }
-    
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::DynInitMenuPaneL
-// ---------------------------------------------------------
-void CAPControlListPlugin::DynInitMenuPaneL( TInt aResourceId,
-                                         CEikMenuPane* aMenuPane )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::DynInitMenuPaneL" ) ) );
-    CAknView::DynInitMenuPaneL( aResourceId, aMenuPane );
-    if ( aResourceId == R_APCLPLUGIN_MAIN_MENU )
-    {    
-		if ( iAPIWrapper->Enabled() )
-		{
-    		aMenuPane->DeleteMenuItem( EAPControlListCmdActivate );
-		}
-		else
-		{
-    		aMenuPane->DeleteMenuItem( EAPControlListCmdDeactivate );
-		}
-		if ( !iContainer->NumberOfItems() )
-		{
-    		aMenuPane->DeleteMenuItem( EAPControlListCmdRemove );
-		}
-		if (!iHelp)
-		{
-    		aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-		}
-    }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::DynInitMenuPaneL" ) ) );
-    }
-        
-// ---------------------------------------------------------
-// CAPControlListPlugin::DoDeactivate
-// ---------------------------------------------------------
-void CAPControlListPlugin::DoDeactivate()
-    {        
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::DoDeactivate" ) ) );
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        }
-
-    delete iContainer;
-    iContainer = NULL; 
-    if (iChangeNotifier)
-    {
-    	delete iChangeNotifier;
-		iChangeNotifier = NULL; 
-    }
-    if (iAPIWrapper)  
-	    {
-	    delete iAPIWrapper;
-	    iAPIWrapper = NULL;    	
-	    }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::DoDeactivate" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPlugin::UiComplete( TInt aUirEvent )
-// ---------------------------------------------------------
-//
-void CAPControlListPlugin::UiComplete( TInt /*aUirEvent*/ )
-    {    
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::UiComplete" ) ) );
-    // Activate this view as we are coming back
-    // from some other view in the UI
-    TRAP_IGNORE( 
-        AppUi()->ActivateLocalViewL( KAPControlListPluginUid ) )
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::UiComplete" ) ) );
-    }
-    
-// ---------------------------------------------------------
-//  CAPControlListPlugin::HandleListBoxEventL
-// ---------------------------------------------------------
-void CAPControlListPlugin::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                              TListBoxEvent aEventType )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::HandleListBoxEventL" ) ) );
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed :
-        case EEventItemClicked :
-            {
-            break;
-            }
-        default :
-           break;
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::HandleListBoxEventL" ) ) );
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::ShowInfoNoteL( TInt aResourceId )
-// ----------------------------------------------------------
-//
-void CAPControlListPlugin::ShowInfoNoteL( TInt aResourceId )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::ShowInfoNoteL" ) ) );
-    HBufC* text = iCoeEnv->AllocReadResourceLC( aResourceId );
-    CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
-    note->ExecuteLD( *text );
-    CleanupStack::PopAndDestroy( text );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::ShowInfoNoteL" ) ) );
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::ShowConfirmNoteL( TInt aResourceId )
-// ----------------------------------------------------------
-//
-
-void CAPControlListPlugin::ShowConfirmNoteL( TInt aResourceId )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::ShowConfirmNoteL" ) ) );
-    HBufC* text = iCoeEnv->AllocReadResourceLC( aResourceId );
-    CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote( ETrue );
-    note->ExecuteLD( *text );
-    CleanupStack::PopAndDestroy( text );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::ShowConfirmNoteL" ) ) );
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::ShowConfirmNoteL( TInt aResourceId )
-// ----------------------------------------------------------
-//
-void CAPControlListPlugin::ShowConfirmNoteAPNL( TInt aResourceId, TPtrC& aAPN )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPlugin::ShowConfirmNoteL" ) ) );
-    HBufC* text = StringLoader::LoadLC ( aResourceId, aAPN);
-    CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote( ETrue );
-    note->ExecuteLD( *text );
-    CleanupStack::PopAndDestroy( text );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::ShowConfirmNoteL" ) ) );
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::Container()
-// ----------------------------------------------------------
-//
-CAPControlListPluginContainer* CAPControlListPlugin::Container()
-    {
-    return iContainer;
-    }
-    
-// ----------------------------------------------------------
-// CAPControlListPlugin::APIWrapper()
-// ----------------------------------------------------------
-//
-CAPControlListAPIWrapper* CAPControlListPlugin::APIWrapper()
-    {
-    	return iAPIWrapper;
-    }
-//End of file
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistplugincontainer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,344 +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:  APControl list Plugin container
-*
-*/
-
-
-// INCLUDE FILES
-#include <hlplch.h>          //for help
-#include <csxhelp/cp.hlp.hrh>
-
-
-#include <akntitle.h>        //for CAknTitlePane
-#include <barsread.h>        //for TResourceReader
-#include <aknlists.h>        //for CListBox
-#include <aknnavi.h>         //for CNaviPane
-#include <aknnavide.h>       //for CAknNavigationDecorator
-#include <apcontrollistpluginrsc.rsg>
-#include <etelmm.h>
-
-#include "apcontrollistplugincontainer.h"
-#include "apcontrollistplugin.h"
-#include "apcontrollistplugin.hrh"
-#include "apcontrollistbox.h"
-#include "apcontrollistboxmodel.h"
-#include "apcontrollistpluginlogger.h"
-
-// CONSTANTS
-_LIT( KEmpty, "");
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::ConstructL
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::ConstructL( const TRect& aRect, 
-                                              MEikListBoxObserver* aListObserver )
-    {       
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::ConstructL" ) ) );
-    if ( !iListBox )
-        {
-
-        TResourceReader rr;
-
-        //creates resource reader. reader is pushed to cleaup stack
-        ControlEnv()->CreateResourceReaderLC( rr, R_APCONTROL_LISTBOX );
-
-        CreateWindowL();
-
-        iListBox = new( ELeave ) CApControlListbox;
-        iListBox->SetContainerWindowL( *this );
-
-        iListBox->CreateScrollBarFrameL( ETrue );
-        iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
-                                        CEikScrollBarFrame::EOff, 
-                                        CEikScrollBarFrame::EAuto );
-
-        iListBox->ConstructFromResourceL( rr );
-	    
-	    //Put in empty text thing
-	    iListBox->SetListEmptyTextL();
-        iListBox->SetListBoxObserver( aListObserver );
-
-    	iModel = new( ELeave )CApControlListboxModel;
-    	iModel->ConstructL();
-    	iListBox->Model()->SetItemTextArray( iModel );//give ownership of
-    	// iModel to iListBox
-        
-        CleanupStack::PopAndDestroy(); //resource reader
-        
-        SetRect( aRect );
-                                                           
-        HandleResourceChange( KEikDynamicLayoutVariantSwitch );
-        }      
-        
-
-    TitlePaneTextsL( R_APCLPLUGIN_TITLE );
-    ActivateL();
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::ConstructL" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::AddToListBoxL
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::AddToListBoxL(TPtrC& newItem)
-    {
-    CLOG( ( ESelector, 0, _L( 
-        "-> CAPControlListPluginContainer::AddToListBoxL" ) ) );
-	MDesCArray* textArray = iModel->ItemTextArray();
-	CDesCArray* listBoxItems = static_cast<CDesCArray*>(textArray);
-
-	TBuf<RMobilePhone::KMaxApnName> item;
-	// RMobilePhone::KMaxApnName - label length + TAB = 
-	// RMobilePhone::KMaxApnName 
-	item.Format(_L("\t%S"), &newItem); 
-	listBoxItems->AppendL(item);
-
-	iListBox->HandleItemAdditionL(); // Update listbox
-	iListBox->SetCurrentItemIndexAndDraw(
-	    listBoxItems->Count() - 1); // select new item
-    CLOG( ( ESelector, 0, _L( 
-        "<- CAPControlListPluginContainer::AddToListBoxL" ) ) );
-    }
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::CurrentItemIndex
-// ---------------------------------------------------------
-//
-TInt CAPControlListPluginContainer::CurrentItemIndex()
-    {
-    CLOG( ( ESelector, 0, _L( 
-        "-> CAPControlListPluginContainer::CurrentItemIndex" ) ) );
-    CLOG( ( ESelector, 0, _L( 
-        "<- CAPControlListPluginContainer::CurrentItemIndex" ) ) );
-	return iListBox->CurrentItemIndex(); 
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::SetCurrentItemIndex
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::SetCurrentItemIndex(TInt index)
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::SetCurrentItemIndex" ) ) );
-	iListBox->SetCurrentItemIndexAndDraw(index); 
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::SetCurrentItemIndex" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::RemoveFromListBoxL
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::RemoveFromListBoxL()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::RemoveFromListBoxL" ) ) );
-	TInt currentItem = iListBox->CurrentItemIndex();
-
-	MDesCArray* textArray = iModel->ItemTextArray();
-	CDesCArray* listBoxItems = static_cast<CDesCArray*>(textArray);
-	listBoxItems->Delete(currentItem, 1); // 1 = how many items to delete
-	AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(iListBox, currentItem, ETrue);
-	iListBox->DrawNow(); // Update listbox    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::RemoveFromListBoxL" ) ) );
-	}
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::~CAPControlListPluginContainer
-// ---------------------------------------------------------
-//
-CAPControlListPluginContainer::~CAPControlListPluginContainer()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::~CAPControlListPluginContainer" ) ) );
-    delete iListBox;
-    if (iNaviPane)
-        {
-        iNaviPane->Pop(iNaviDecorator);        
-        }
-    delete iNaviDecorator;    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::~CAPControlListPluginContainer" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::CountComponentControls
-// ---------------------------------------------------------
-//
-TInt CAPControlListPluginContainer::CountComponentControls() const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::CountComponentControls" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::CountComponentControls" ) ) );
-    return 1;
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::ComponentControl
-// ---------------------------------------------------------
-//
-CCoeControl* CAPControlListPluginContainer::ComponentControl( TInt aIndex ) const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::ComponentControl" ) ) );
-    switch( aIndex )
-        {
-        case 0 :
-            {
-    		CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::ComponentControl 1" ) ) );
-            return iListBox;
-            }
-        default:
-            {
-    		CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::ComponentControl 2" ) ) );
-            return 0;
-            } 
-        }
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CAPControlListPluginContainer::OfferKeyEventL( 
-                                            const TKeyEvent& aKeyEvent, 
-                                            TEventCode aType )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::OfferKeyEventL" ) ) );
-    TKeyResponse response = EKeyWasNotConsumed;
-    if ( aType == EEventKey )
-        {
-        response = iListBox->OfferKeyEventL( aKeyEvent, aType );
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::OfferKeyEventL" ) ) );
-    return response;
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::SizeChanged
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::SizeChanged()
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::SizeChanged" ) ) );
-    iListBox->SetRect( Rect() );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::SizeChanged" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::GetHelpContext()
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::GetHelpContext( TCoeHelpContext& aContext) const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::GetHelpContext" ) ) );
-    aContext.iMajor = KHelpUidAPControlList;
-    aContext.iContext = KACL_HLP_MAIN;
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::GetHelpContext" ) ) );
-    }
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::TitlePaneTextsL
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::TitlePaneTextsL( TInt aResourceId )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::TitlePaneTextsL" ) ) );
-    CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
-    CAknTitlePane* titlePane =
-        ( CAknTitlePane* )statusPane->ControlL(
-                            TUid::Uid( EEikStatusPaneUidTitle ) );
-
-    //creates and sets title. title is pushed to cleanup stack
-    HBufC* title = iEikonEnv->AllocReadResourceLC( aResourceId );
-    titlePane->SetTextL( *title );
-
-    iNaviPane = STATIC_CAST( CAknNavigationControlContainer*, 
-                 statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
-    
-    iNaviDecorator = iNaviPane->CreateNavigationLabelL( KEmpty );
-    iNaviPane->PushL( *iNaviDecorator );
-
-    CleanupStack::PopAndDestroy(title);
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::TitlePaneTextsL" ) ) );
-    }
-
-
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::HandleResourceChange
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::HandleResourceChange( TInt aType )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::HandleResourceChange" ) ) );
-    CCoeControl::HandleResourceChange( aType );
-    if( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                           mainPaneRect );
-        SetRect( mainPaneRect );
-        DrawNow();
-        }
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::HandleResourceChange" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::FocusChanged( TDrawNow aDrawNow )
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::FocusChanged" ) ) );
-    CCoeControl::FocusChanged( aDrawNow );
-    if( iListBox )
-        {
-        iListBox->SetFocus( IsFocused() );
-        }        
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::FocusChanged" ) ) );
-    }
-           
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::CurrentItemNameL
-// ---------------------------------------------------------
-//
-TInt CAPControlListPluginContainer::NumberOfItems()  const
-    {
-    CLOG( ( ESelector, 0, _L( "-> CAPControlListPluginContainer::NumberOfItems" ) ) );
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListPluginContainer::NumberOfItems" ) ) );
-    return iListBox->Model()->ItemTextArray()->MdcaCount();
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListPluginContainer::WriteToNaviPaneL
-// ---------------------------------------------------------
-//
-void CAPControlListPluginContainer::WriteToNaviPaneL( TInt aResourceId )
-    {
-    CLOG( ( ESelector, 0, 
-        _L( "-> CAPControlListPluginContainer::WriteToNaviPaneL" ) ) );
-    HBufC* text = iCoeEnv->AllocReadResourceLC( aResourceId );
-    if ( iNaviDecorator )
-        {
-        iNaviPane->Pop(iNaviDecorator);
-        delete iNaviDecorator;
-        iNaviDecorator = NULL;// CodeScanner needs this line
-        }
-    iNaviDecorator = iNaviPane->CreateNavigationLabelL( *text );
-    iNaviPane->PushL( *iNaviDecorator );
-    
-    CleanupStack::PopAndDestroy( text );
-    CLOG( ( ESelector, 0, 
-        _L( "<- CAPControlListPluginContainer::WriteToNaviPaneL" ) ) );
-    }
-    
-// End of File  
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistpluginimplementationtable.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*        ECOM proxy table for this plugin
-*
-*/
-
-
-// System includes
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// User includes
-#include "apcontrollistplugin.h"
-
-// Constants
-const TImplementationProxy KAPControlListPluginImplementationTable[] = 
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x10281BB5,    CAPControlListPlugin::NewL )
-    };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-    {
-    aTableCount = sizeof( KAPControlListPluginImplementationTable ) 
-        / sizeof( TImplementationProxy );
-    return KAPControlListPluginImplementationTable;
-    }
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistpluginlogger.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +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: 
-*      Implementation of class APControlListPluginLogger.   
-*
-*/
-
-
-// INCLUDE FILES
-
-#ifdef _DEBUG
-
-    #include "apcontrollistpluginlogger.h"
-    #include <flogger.h>
-	#include <eikenv.h>
-
-    // ================= CONSTANTS =======================
-
-    /// apcontrollistplugin logging directory.
-    _LIT( KapcontrollistpluginLogDir, "apcontrollistplugin" );
-    /// apcontrollistplugin log file name.
-    _LIT( KapcontrollistpluginLogFile, "apcontrollistplugin.txt" );
-
-
-    // ================= MEMBER FUNCTIONS =======================
-
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::Write()
-    // ---------------------------------------------------------
-    //
-    void APControlListPluginLogger::Write
-    ( TInt32 aMask, TInt aLevel, TRefByValue<const TDesC16> aFmt, ... )
-        {
-        if( (aMask & APCONTROL_LIST_LOG_MASK) && (aLevel <= APCONTROL_LIST_LOG_LEVEL) )
-            {
-            VA_LIST list;
-            VA_START( list, aFmt );
-            RFileLogger::WriteFormat
-                (
-                KapcontrollistpluginLogDir,
-                KapcontrollistpluginLogFile,
-                EFileLoggingModeAppend,
-                aFmt,
-                list
-                );
-            VA_END( list );
-            }
-        }
-
-
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::Write()
-    // ---------------------------------------------------------
-    //
-    void APControlListPluginLogger::Write
-    ( TInt32 aMask, TInt aLevel, TRefByValue<const TDesC16> aFmt, 
-      VA_LIST& aList )
-        {
-        if( (aMask & APCONTROL_LIST_LOG_MASK) && (aLevel <= APCONTROL_LIST_LOG_LEVEL) )
-            {
-            RFileLogger::WriteFormat
-                (
-                KapcontrollistpluginLogDir,
-                KapcontrollistpluginLogFile,
-                EFileLoggingModeAppend,
-                aFmt,
-                aList
-                );
-            }
-        }
-
-
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::Write()
-    // ---------------------------------------------------------
-    //
-    void APControlListPluginLogger::Write
-    ( TInt32 aMask, TInt aLevel, TRefByValue<const TDesC8> aFmt, ... )
-        {
-        if( (aMask & APCONTROL_LIST_LOG_MASK) && (aLevel <= APCONTROL_LIST_LOG_LEVEL) )
-            {
-            VA_LIST list;
-            VA_START( list, aFmt );
-            RFileLogger::WriteFormat
-                (
-                KapcontrollistpluginLogDir,
-                KapcontrollistpluginLogFile,
-                EFileLoggingModeAppend,
-                aFmt,
-                list
-                );
-            VA_END( list );
-            }
-        }
-
-
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::Write()
-    // ---------------------------------------------------------
-    //
-    void APControlListPluginLogger::Write
-    ( TInt32 aMask, TInt aLevel, TRefByValue<const TDesC8> aFmt, 
-      VA_LIST& aList )
-        {
-        if( (aMask & APCONTROL_LIST_LOG_MASK) && (aLevel <= APCONTROL_LIST_LOG_LEVEL) )
-            {
-            RFileLogger::WriteFormat
-                (
-                KapcontrollistpluginLogDir,
-                KapcontrollistpluginLogFile,
-                EFileLoggingModeAppend,
-                aFmt,
-                aList
-                );
-            }
-        }
-
-
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::HexDump()
-    // ---------------------------------------------------------
-    //
-    void APControlListPluginLogger::HexDump
-            (
-            TInt32 aMask,
-            TInt aLevel, 
-            const TText* aHeader,
-            const TText* aMargin,
-            const TUint8* aPtr,
-            TInt aLen
-            )
-        {
-        if( (aMask & APCONTROL_LIST_LOG_MASK) && (aLevel <= APCONTROL_LIST_LOG_LEVEL) )
-            {
-            RFileLogger::HexDump
-                (
-                KapcontrollistpluginLogDir,
-                KapcontrollistpluginLogFile,
-                EFileLoggingModeAppend,
-                aHeader,
-                aMargin,
-                aPtr,
-                aLen
-                );
-            }
-        }
-                
-    // ---------------------------------------------------------
-    // APControlListPluginLogger::FCreate()
-    // ---------------------------------------------------------
-    //
-	void APControlListPluginLogger::FCreate()
-	    {
-	    TFileName path(_L("c:\\logs\\"));
-	    path.Append(KapcontrollistpluginLogDir);
-	    path.Append(_L("\\"));
-	    RFs& fs = CEikonEnv::Static()->FsSession();
-	    fs.MkDirAll(path);
-	    }
-#endif // _DEBUG
-
Binary file alwayson_net_plugin/pdpcontextmanager2/conf/pdpcontextmanager2.confml has changed
--- a/alwayson_net_plugin/pdpcontextmanager2/src/10281f41.rss	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/10281f41.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,9 +15,7 @@
 *
 */
 
-
-
-#include <Ecom/RegistryInfo.rh>
+#include <ecom/registryinfo.rh>
 
 RESOURCE REGISTRY_INFO theInfo
 	{
--- a/alwayson_net_plugin/pdpcontextmanager2/src/alwaysonlinepdpplugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/alwaysonlinepdpplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -67,7 +67,8 @@
 // ---------------------------------------------------------------------------
 //
 CAlwaysOnlinePDPPlugin::CAlwaysOnlinePDPPlugin():
-    CAlwaysOnlineEComInterface()
+    CAlwaysOnlineEComInterface(),
+    iAlwaysOnServer( NULL )
     {
     }
 
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnection.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnection.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -114,7 +114,8 @@
 // Constructor
 // ---------------------------------------------------------------------------
 //
-CAOConnection::CAOConnection()
+CAOConnection::CAOConnection():
+    iConnectionImpl( NULL )
     {
     LOG_1( _L("CAOConnection::CAOConnection") );
     }
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -208,7 +208,9 @@
                                         MAOConnectionManagerObserver& aObserver,
                                         MAOSettings& aSettings ):
     iObserver( aObserver ),
-    iSettings( aSettings )
+    iSettings( aSettings ),
+    iConnection( NULL ),
+    iConnectionMonitor( NULL ) 
     {
     LOG_1( _L("CAOConnectionManager::CAOConnectionManager") );
     }
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitor.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitor.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -79,9 +79,11 @@
 // Constructor
 // ---------------------------------------------------------------------------
 //
-CAOConnectionMonitor::CAOConnectionMonitor()
+CAOConnectionMonitor::CAOConnectionMonitor():
+    iConnectionMonitorImpl( NULL )
     {
     LOG_1( _L("CAOConnectionMonitor::CAOConnectionMonitor") );
+
     }
 
 // ---------------------------------------------------------------------------
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -127,10 +127,16 @@
     MAOConnectionMonitorObserver& aObserver, MAOSettings& aSettings ):
     iObserver( aObserver ),
     iSettings( aSettings ),
+    iTelephony( NULL ),
     iWNRegPckg( iWNReg ),
     iWNRegChangePckg( iWNChangeReg ),
+    iNWRegistrationStatus( NULL ),
+    iNWRegistrationStatusChange( NULL ),
+    iBearer( NULL ), 
+    iMyConnectionId( 0 ),
     iConnectionAlive( EFalse ),
-    iBearerValue( KBearerNotSearched )
+    iBearerValue( KBearerNotSearched ),
+    iCounter( 0 )
     {
     LOG_1( _L("CAOConnectionMonitorImpl::CAOConnectionMonitorImpl") );
     }
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoraumanager.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoraumanager.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -80,7 +80,8 @@
 // CAORAUManager::CAORAUManager
 // ---------------------------------------------------------------------------
 //
-CAORAUManager::CAORAUManager()
+CAORAUManager::CAORAUManager():
+    iRAUManagerImpl( NULL )
     {
     LOG_1( _L("CAORAUManager::CAORAUManager") );
     }
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoserver.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -197,7 +197,20 @@
 // CAOServer::CAOServer
 // ---------------------------------------------------------------------------
 //
-CAOServer::CAOServer()
+CAOServer::CAOServer():
+    iConnectionManager( NULL ),
+    iTimer( NULL ),
+    iRAUManager( NULL ),
+    iSettings( NULL ),
+    iGpds( NULL ),
+    iPointerStatePool( NULL ),
+    iAsyncReactivation( NULL ),
+    iFailure( MAOConnectionManager::EDisconnected ),
+    iActivationFailure( ETrue),
+    iCurrentState( NULL ),
+    iPDPPropertySubscriber( NULL ), 
+    iAsyncSetup( NULL ),
+    iCenRepObserver( NULL )
     {
     LOG_1( _L("CAOServer::CAOServer") );
     }
@@ -432,9 +445,9 @@
     // Create property subscriber
     iPDPPropertySubscriber = CAOAsyncWrapper<CAOServer>::NewL(
         this,
-        &PDPPropertySubscriptionIssueRequest,
-        &PDPPropertySubscriptionRunL,
-        &PDPPropertySubscriptionDoCancel,
+        &CAOServer::PDPPropertySubscriptionIssueRequest,
+        &CAOServer::PDPPropertySubscriptionRunL,
+        &CAOServer::PDPPropertySubscriptionDoCancel,
         NULL );
         
     // Subscribe
@@ -950,15 +963,16 @@
         &StateToDesC( CurrentState()->StateName() ) );
     
     if ( aValue != ECmCellularDataUsageDisabled )
-        {
-        TAOState* newState = NULL;
+       {
         	
         if ( CurrentState()->StateName() == TAOState::EStateDisabled )
             {
-            newState = iCurrentState->HandleEnableAlwaysOnL();
+              iCurrentState->HandleEnableAlwaysOnL();
             }
         else
             {
+            TAOState* newState = NULL;
+            
             // Behaviour is the same as if unconnect timer had expired
             iTimer->StopUnconnectTimer();
             newState = iCurrentState->HandleUnconnectTimerExpiredL();
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caotimer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caotimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -228,7 +228,12 @@
 //
 CAOTimer::CAOTimer( MAOTimerObserver& aObserver, MAOSettings& aSettings ):
     iObserver( aObserver ),
-    iSettings( aSettings )
+    iSettings( aSettings ),
+    iRetryTimer( NULL ),
+    iRetryTimerCount( 0 ),
+    iCurrentRetryTimerInterval( 0 ), 
+    iConnectionTimer( NULL ),
+    iUnconnectTimer( NULL )
     {
     LOG_1( _L("CAOTimer::CAOTimer") );
     }
--- a/alwayson_net_plugin/pdpcontextmanager2/src/cenrepobserver.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/cenrepobserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -65,7 +65,10 @@
 CAOCenRepObserver::CAOCenRepObserver( MAOCenRepObserver& aObserver )
         :
         CActive( CActive::EPriorityStandard ),
-        iObserver( aObserver )
+        iObserver( aObserver ),
+        iRepository( NULL ), 
+        iErrorCounter( 0 )
+                
     {
     }
 
--- a/alwayson_net_plugin/pdpcontextmanager2/src/linger.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/linger.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -46,7 +46,11 @@
     iDlData( 0 ),
     iPckgDlData( iDlData ),
     iUlData( 0 ),
-    iPckgUlData( iUlData )
+    iPckgUlData( iUlData ),
+    iTimer( NULL ), 
+    iLingerInterval( 0 ), 
+    iLingerTimerCount( 0 ),
+    iCurrentTimerInterval( 0 ) 
     {
     }
 
--- a/apengine/apeng/group/APEngine.MMP	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apeng/group/APEngine.MMP	Tue Aug 31 15:35:44 2010 +0300
@@ -73,11 +73,6 @@
 LIBRARY		Vpnapi.lib
 LIBRARY     centralrepository.lib
 
-
-LIBRARY WEPSecuritySettingsUi.lib
-LIBRARY WPASecuritySettingsUi.lib
-
-
 #if defined(ARMCC)
     DEFFILE ../EABI/ApEngine_EKA2.def
 #elif defined( WINSCW )
--- a/apengine/apeng/src/APAccessPointItem.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apeng/src/APAccessPointItem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -24,7 +24,7 @@
 #include    <f32file.h>
 #include    <bautils.h>
 #include    <barsc.h>
-#include    <ApEngine.rsg>
+#include    <apengine.rsg>
 #include    "ApAccessPointItem.h"
 #include    "ApEngineConsts.h"
 #include    "ApEngineCommons.h"
@@ -5058,7 +5058,7 @@
         {
         //TText ch = aInText[i];
         TChar ch = aInText[i];
-        if ( ( ch == 'p' ) || ( ch == 'P' ) || ( ch == 'w' ) || ( ch == 'W' )
+        if ( ( ch == 'p' ) || ( ch == 'P' ) || ( ch == 'W' ) || ( ch == 'W' )
             || ( ch == '+' ) || ( ch == '0' ) || ( ch == '1' ) || ( ch == '2' )
             || ( ch == '3' ) || ( ch == '4' ) || ( ch == '5' ) || ( ch == '6' )
             || ( ch == '7' ) || ( ch == '8' ) || ( ch == '9' ) || ( ch == '*' )
--- a/apengine/apeng/src/APDataHandler.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apeng/src/APDataHandler.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -38,17 +38,13 @@
 #include "ApEngineCommons.h"
 #include "ApUtils.h"
 #include "ApEngineVer.h"
-#include "ApEngineLogger.h"
+#include "ApEngineLogger.h" 
 #include "ApNetworkItem.h"
 #include "APItemExtra.h"
 #include "APItemCdmaData.h"
 #include "APItemWlanData.h"
 #include "ApSpeedLookup.h"
 
-#include <WEPSecuritySettingsUI.h>
-#include <WPASecuritySettingsUI.h>
-
-
 // CONSTANTS
 #if defined(_DEBUG)
     _LIT( KErrInvalidIntendedType, "Invalid intended default type" );
@@ -256,140 +252,8 @@
 //
 EXPORT_C TUint32 CApDataHandler::CreateCopyFromL( TUint32 aBaseId )
     {
-    CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL" ) ) );
-
-    if ( iExt->iVariant & KApUiEditOnlyVPNs )
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-    CApAccessPointItem* holder = CApAccessPointItem::NewLC();
-
-    TBool ownTransaction = ApCommons::StartPushedTransactionLC( *iDb );
-    AccessPointDataL( aBaseId, *holder );
-    TUint32 oldwlanid( 0 );
-    holder->ReadUint( EApIapServiceId, oldwlanid );
-    
-    TUint32 retval( 0 );
-    TBool aNameChanged( EFalse );
-    
-    TApBearerType bearer = holder->BearerTypeL();
-    CWEPSecuritySettings* wepSecSettings = NULL;
-    CWPASecuritySettings* wpaSecSettings( NULL );
-    // only one of the above might be loaded once, so after copying
-    // we might need to PopAndDestroy only one item
-    TBool pushed(EFalse);
-
-    if ( bearer == EApBearerTypeWLAN )
-        {
-        TUint32 secmode( 0 );
-        holder->ReadUint( EApWlanSecurityMode, secmode );
-        switch ( secmode )
-            {
-            case EOpen:
-                {
-                break;
-                }
-            case EWep:
-                {
-                wepSecSettings = CWEPSecuritySettings::NewL();
-                CleanupStack::PushL( wepSecSettings );
-                pushed = ETrue;
-                TUint32 wlanid( 0 );
-                holder->ReadUint( EApIapServiceId, wlanid );
-                wepSecSettings->LoadL( wlanid, *iDb );
-                break;
-                }
-            case E802_1x:
-                {
-                wpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityMode8021x );
-                CleanupStack::PushL( wpaSecSettings );
-                pushed = ETrue;
-                TUint32 wlanid( 0 );
-                holder->ReadUint( EApIapServiceId, wlanid );
-                wpaSecSettings->LoadL( wlanid, *iDb );
-                break;
-                }
-            case EWpa:
-            case EWpa2:
-                {
-                wpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityModeWpa );
-                CleanupStack::PushL( wpaSecSettings );
-                pushed = ETrue;
-                TUint32 wlanid( 0 );
-                holder->ReadUint( EApIapServiceId, wlanid );
-                wpaSecSettings->LoadL( wlanid, *iDb );
-                break;
-                }
-            default:
-                {
-                __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) );
-                // do nothing in urel
-                break;
-                }
-            }
-        
-        }
-    
-    retval = DoUpdateAccessPointDataL( *holder, ETrue, aNameChanged );
-    
-    if ( bearer == EApBearerTypeWLAN )
-        {
-        TUint32 wlanid(0);
-        holder->ReadUint( EApIapServiceId, wlanid );        
-        // now check if it is WEP...
-        // read up security mode
-        TUint32 secmode( 0 );
-        holder->ReadUint( EApWlanSecurityMode, secmode );
-        switch ( secmode )
-            {
-            case EOpen:
-                {
-                break;
-                }
-            case EWep:
-                {
-                // we have to try to save
-                wepSecSettings->SaveL( wlanid, *iDb );
-                break;
-                }
-            case E802_1x:
-                {
-                wpaSecSettings->SaveL( wlanid, *iDb, 
-                                       ESavingNewAPAsACopy, oldwlanid );
-                break;
-                }
-            case EWpa:
-            case EWpa2:
-                {
-                wpaSecSettings->SaveL( wlanid, *iDb,
-                                       ESavingNewAPAsACopy, oldwlanid );
-                break;
-                }
-            default:
-                {
-                __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) );
-                // do nothing in urel
-                break;
-                }
-            }
-        }
-    if ( pushed )        
-        {
-        CleanupStack::PopAndDestroy(); // the sec. settings
-        }
-        
-    if ( ownTransaction )
-        {
-        ApCommons::CommitTransaction( *iDb );
-        CleanupStack::Pop(); // RollbackTransactionOnLeave
-        }
-    CleanupStack::PopAndDestroy( holder );    // holder
-
-    CLOG( ( EHandler, 1, _L( "<- CApDataHandler::CreateCopyFromL" ) ) );
-    return retval;
+    CLOG( ( EHandler, 0, _L( "-> CApDataHandler::CreateCopyFromL - ERROR: not suported" ) ) );
+    User::Leave( KErrNotSupported );
     }
 
 
@@ -2530,71 +2394,8 @@
 //
 void CApDataHandler::RemoveWlanL( TUint32 aUid )
     {
-    CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL" ) ) );
-
-    CCommsDbTableView* table = NULL;
-
-    // now check the WLAN table for corresponding record and delete them, too
-    table = iDb->OpenViewMatchingUintLC
-            ( TPtrC(WLAN_SERVICE), TPtrC(WLAN_SERVICE_ID), aUid );
-
-    TInt res = table->GotoFirstRecord(); // O.K.
-    if ( res == KErrNone )
-        { // exists, delete it
-        TUint32 tempint( 0 );
-        ApCommons::ReadUintL( table, TPtrC(WLAN_SECURITY_MODE), tempint );
-        // now tempint holds the security mode
-        // we have to delete security settings, too
-        switch ( tempint )
-            {
-            case EOpen:
-            case EWep:
-                {
-                break;
-                }
-            case E802_1x:
-                {
-                CWPASecuritySettings* wpa = 
-                        CWPASecuritySettings::NewL( ESecurityMode8021x );
-                CleanupStack::PushL( wpa );
-                wpa->DeleteL( aUid );
-                CleanupStack::PopAndDestroy( wpa );
-                break;
-                }
-            case EWpa:
-            case EWpa2:
-                {
-                CWPASecuritySettings* wpa = 
-                        CWPASecuritySettings::NewL( ESecurityModeWpa );
-                CleanupStack::PushL( wpa );
-                wpa->DeleteL( aUid );
-                CleanupStack::PopAndDestroy( wpa );
-                break;
-                }
-            default:
-                {
-                // some weird error, repair it...
-                __ASSERT_DEBUG( EFalse, ApCommons::Panic( ENotSupported ) );
-                break;
-                }
-            }
-        
-        User::LeaveIfError( table->DeleteRecord() );
-        }
-    else
-        {
-        // silently ignore KErrNotFound. It is caused by incorrect DB,
-        // we are 'repairing it' this way.
-        if ( res != KErrNotFound )
-            {
-            User::Leave( res );
-            }
-        }
-
-    // only need to destroy if it was successfully created!
-    CleanupStack::PopAndDestroy( table ); // table            
-    
-    CLOG( ( EHandler, 1, _L( "<- CApDataHandler::RemoveWlanL" ) ) );
+    CLOG( ( EHandler, 0, _L( "-> CApDataHandler::RemoveWlanL - ERROR: not suported" ) ) );
+    User::Leave( KErrNotSupported );
     }
 
 
--- a/apengine/apeng/src/VpnApItem.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apeng/src/VpnApItem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #include    <f32file.h>
 #include    <bautils.h>
 #include    <barsc.h>
-#include    <ApEngine.rsg>
+#include    <apengine.rsg>
 #include    <txtetext.h>
 #include    <data_caging_path_literals.hrh>
 
--- a/apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/group/Apsettingshandlerui.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -89,8 +89,6 @@
 LIBRARY FeatMgr.lib
 LIBRARY AknInputLanguage.lib
 
-LIBRARY WEPSecuritySettingsUi.lib
-LIBRARY WPASecuritySettingsUi.lib
 LIBRARY ConnectionUiUtilities.lib
 LIBRARY centralrepository.lib
 
--- a/apengine/apsettingshandlerui/inc/ApSelPopupList.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/inc/ApSelPopupList.h	Tue Aug 31 15:35:44 2010 +0300
@@ -337,10 +337,6 @@
         TBool							iHelpSupported;
         TBool							iProtectionSupported;
         TBool                           iDoExit;
-        TBool                           iFirstEnter;  // pressing the enter key
-                                                      // first time will be
-                                                      // handled as an uparrow 
-                                                      // key
     };
 
 #endif
--- a/apengine/apsettingshandlerui/inc/ApSettingsModel.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/inc/ApSettingsModel.h	Tue Aug 31 15:35:44 2010 +0300
@@ -44,10 +44,8 @@
 class CEikonEnv;
 
 class CWEPSecuritySettings;
-class CWEPSecuritySettingsUi;
 
 class CWPASecuritySettings;
-class CWPASecuritySettingsUi;
 
 
 
@@ -676,11 +674,9 @@
 
     public:
         CWEPSecuritySettings*       iWepSecSettings;    ///< WEP settings data
-        CWEPSecuritySettingsUi*     iWepSecSettingsUi;  ///< WEP settings UI
         TInt                        iWepUiExitReason;   ///< WEP UI exit reason
 
         CWPASecuritySettings*       iWpaSecSettings;    ///< WPA settings data
-        CWPASecuritySettingsUi*     iWpaSecSettingsUi;  ///< WPA settings UI
         TInt                        iWpaUiExitReason;   ///< WPA UI exit reason
         TBool                       iNoEdit;
         
--- a/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApNetSelPopupList.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,6 @@
 // INCLUDE FILES
 
 #include <ApNetworkItem.h>
-#include <csxhelp/cp.hlp.hrh>
 #include <featmgr.h>
 
 #include "ApSettingsHandlerUI.hrh"
@@ -183,8 +182,6 @@
     APSETUILOGGER_ENTERFN( EListbox,"NetSelPopup::GetHelpContext")
     
     aContext.iMajor = iHandler->iHelpMajor;
-    // help no longer available for user, use dummy ID
-    aContext.iContext = KSET_HLP_AP_SETTING_GPRS;
     
     APSETUILOGGER_LEAVEFN( EListbox,"NetSelPopup::GetHelpContext")
     }
--- a/apengine/apsettingshandlerui/src/ApSelPopupList.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApSelPopupList.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -24,9 +24,6 @@
 #include <apsetui.rsg>
 #include <featmgr.h>
 
-#include <csxhelp/cp.hlp.hrh>
-
-
 #include "ApSelectorListBoxModel.h"
 #include "ApSettingsModel.h"
 #include "ApSettingsHandlerUI.hrh"
@@ -243,8 +240,7 @@
 iVpnFilterType( aVpnFilterType ),
 iVariant( aHandler.iExt->iVariant ),
 iIncludeEasyWlan( EFalse ),
-iNoEdit( aNoEdit ),
-iFirstEnter( ETrue )
+iNoEdit( aNoEdit )
     {
     }
 
@@ -282,8 +278,7 @@
 iVariant( aHandler.iExt->iVariant ),
 iIncludeEasyWlan( aIncludeEasyWlan ),
 iInitialised( EFalse ),
-iNoEdit( aNoEdit ),
-iFirstEnter( ETrue )
+iNoEdit( aNoEdit )
     {
     }
 
@@ -318,8 +313,6 @@
     APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::GetHelpContext")
     
     aContext.iMajor = iHandler->iHelpMajor;
-    // help no longer available for user, use dummy ID
-    aContext.iContext = KSET_HLP_AP_SETTING_GPRS;
     
     APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::GetHelpContext")
     }
@@ -490,14 +483,16 @@
 
     iList->HandleItemAdditionL();
 
+    iList->View()->SetDisableRedraw( EFalse );
+    iList->HandleItemAdditionL();
+
     SetSelectedL();
     iPreferredUid = *iSelected;
     
     SetHighlighted();
 
-    iList->View()->SetDisableRedraw( EFalse );
-    
     SizeChanged();
+    DrawNow();
     
     CheckAndSetDataValidity();
     UpdateCbaL();
@@ -525,8 +520,7 @@
             i = count;
             }
         }
-    
-    iList->SetCurrentItemIndex( idx );
+    iList->SetCurrentItemIndexAndDraw( idx );
     SelectCurrentItemL();
     
     APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetSelectedL")
@@ -839,29 +833,11 @@
                 ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) ||
                     ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) )
                 { // process only if command is available...
-                if ( aKeyEvent.iCode == EKeyEnter  &&  iFirstEnter )
-                    {//pressing the enter key at the first time will be changed
-                     //to an up arrow key so the first item in the list will be highlighted
-                    iFirstEnter = EFalse;
-                    iPreferredUid = 0;
-                    SetHighlighted();
-                    TKeyEvent aKeyEventmy = aKeyEvent;
-                    aKeyEventmy.iCode = EKeyUpArrow;
-                    retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEventmy, aType );
-                    }
-                else
-                    {
-                    iFirstEnter = ETrue; //change back to true for the next session
-                    ProcessCommandL( EApSelCmdSelect );
-                    retval = EKeyWasConsumed;
-                    }
+                ProcessCommandL( EApSelCmdSelect );
+                retval = EKeyWasConsumed;
                 }
             else
                 {
-                if ( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow )
-                    {//we will have highligt so the following enter key should select the item
-                    iFirstEnter = EFalse;
-                    }
                 retval = CAknRadioButtonSettingPage::OfferKeyEventL(
                                         aKeyEvent, aType );
                 }
--- a/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApSelectorDialog.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -29,8 +29,6 @@
 
 #include <featmgr.h>
 
-#include <csxhelp/cp.hlp.hrh>
-
 #include "ApSelectorDialog.h"
 #include "ApSelectorListBoxModel.h"
 #include "ApSelectorListbox.h"
@@ -435,14 +433,12 @@
     APSETUILOGGER_ENTERFN( EDialog,"SelDIalog::GetHelpContext<->")
     
     aContext.iMajor = iHandler->iHelpMajor;
-    // help no longer available for user, use dummy ID
-    aContext.iContext = KSET_HLP_AP_SETTING_GPRS;
     }
 
 
 
 // ---------------------------------------------------------
-// CApSelectorDialog::HandleApDbEventL
+// CApSelectorDialog::HandleApDbEventLw
 // called by the active access point framework
 // ---------------------------------------------------------
 //
--- a/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApSettingsDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -43,8 +43,6 @@
 #include "ApSettingsModel.h"
 #include <apsetui.rsg>
 
-#include <csxhelp/cp.hlp.hrh>
-
 #include "ApSettingsHandlerUI.hrh"
 #include "ApsettingshandleruiImpl.h"
 #include "ApSettingsHandlerConsts.h"
@@ -775,90 +773,6 @@
     APSETUILOGGER_ENTERFN( ESettings,"Settings::GetHelpContext")
     
     aContext.iMajor = iHandler->iHelpMajor;
-    switch ( iBearerType )
-        {
-        case EApBearerTypeCSD:
-        case EApBearerTypeHSCSD:
-            {
-            switch ( iLevel )
-                {
-                case 2:
-                    {
-                    if ( iL2Ipv4 )
-                        {
-                        aContext.iContext = KSET_HLP_AP_DATA_AS_IPV4;
-                        }
-                    else
-                        {
-                        aContext.iContext = KSET_HLP_AP_DATA_AS_IPV6;
-                        }
-                    break;
-                    }
-                case 1:
-                    {
-                    aContext.iContext = KSET_HLP_AP_SETTING_DATA_AS;
-                    break;
-                    }
-                case 0:
-                default:
-                    {
-                    aContext.iContext = KSET_HLP_AP_SETTING_DATA;
-                    break;
-                    }
-                }
-            break;
-            }
-        case EApBearerTypeGPRS:
-            {
-            if ( iLevel )
-                {
-                aContext.iContext = KSET_HLP_AP_SETTING_GPRS_AS;
-                }
-            else
-                {
-                aContext.iContext = KSET_HLP_AP_SETTING_GPRS;
-                }
-            break;
-            }
-        case EApBearerTypeWLAN: 
-            {
-            switch ( iLevel )
-                {
-                case 2:
-                    {
-                    if ( iL2Ipv4 )
-                        {
-                        aContext.iContext = KSET_HLP_AP_WLAN_AS_IPV4;
-                        }
-                    else
-                        {
-                        aContext.iContext = KSET_HLP_AP_WLAN_AS_IPV6;
-                        }
-                    break;
-                    }
-                case 1:
-                    {
-                    aContext.iContext = KSET_HLP_AP_SETTING_WLAN_AS;
-                    break;
-                    }
-                case 0:
-                    {
-                    aContext.iContext = KSET_HLP_AP_SETTING_WLAN;
-                    break;
-                    }
-                default:
-                    {
-                    break;
-                    }
-                }
-            break;
-            }
-        default:
-            {
-            __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) );
-            break;
-            }
-        }
     
     APSETUILOGGER_LEAVEFN( ESettings,"Settings::GetHelpContext")
     }
--- a/apengine/apsettingshandlerui/src/ApSettingsModel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApSettingsModel.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -44,9 +44,6 @@
 #include "ApNetworks.h"
 #include "FeatureManagerWrapper.h"
 
-#include <WEPSecuritySettingsUI.h>
-#include <WPASecuritySettingsUI.h>
-
 #include <ApAccessPointItem.h>
 
 #include "ApSettingsHandlerLogger.h"
@@ -145,11 +142,6 @@
         delete iop;
         }
 
-    delete iWepSecSettings;
-    delete iWepSecSettingsUi;
-
-    delete iWpaSecSettings;
-    delete iWpaSecSettingsUi;
     APSETUILOGGER_LEAVEFN( EModel,"~Model")    
     }
 
@@ -1088,35 +1080,9 @@
 //
 TInt CApSettingsModel::ChangeWepSettingsL( CApAccessPointItem* aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL")
-    TInt retval(0);
-        
-    if ( !iWepSecSettings )
-        {
-        iWepSecSettings = CWEPSecuritySettings::NewL();
-        TUint32 iapid( 0 );
-        aApItem->ReadUint( EApIapServiceId, iapid );
-        iWepSecSettings->LoadL( iapid, *Database()->Database() );        
-        }
-
-    if ( !iWepSecSettingsUi )
-        {
-        iWepSecSettingsUi = CWEPSecuritySettingsUi::NewL( *EikEnv() );
-        }
-
-    iWepUiExitReason = iWepSecSettings->EditL( *iWepSecSettingsUi, 
-                                               aApItem->ConnectionName() );
-                                               
-    if ( iWepUiExitReason & CWEPSecuritySettings::EExitReq )
-        {
-        retval += KApUiEventExitRequested;
-        }
-    if ( iWepUiExitReason & CWEPSecuritySettings::EShutDownReq )
-        {
-        retval += KApUiEventShutDownRequested;
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::ChangeWepSettingsL")
-    return retval;
+    APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWepSettingsL - ERROR: not suported")
+    aApItem = aApItem;
+    return KErrNotSupported;
     }
 
 
@@ -1127,35 +1093,9 @@
 //
 TInt CApSettingsModel::ChangeWpaSettingsL( CApAccessPointItem* aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL")
-    TInt retval(0);
-
-    if ( !iWpaSecSettings )
-        {
-        iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityModeWpa );
-        TUint32 iapid( 0 );
-        aApItem->ReadUint( EApIapServiceId, iapid );
-        iWpaSecSettings->LoadL( iapid, *Database()->Database() );
-        }
-
-    if ( !iWpaSecSettingsUi )
-        {
-        iWpaSecSettingsUi = CWPASecuritySettingsUi::NewL( *EikEnv() );
-        }
-
-    iWpaUiExitReason = iWpaSecSettings->EditL( *iWpaSecSettingsUi, 
-                                               aApItem->ConnectionName() );
-                                               
-    if ( iWpaUiExitReason & CWPASecuritySettings::EExitReq )
-        {
-        retval += KApUiEventExitRequested;
-        }
-    if ( iWpaUiExitReason & CWPASecuritySettings::EShutDownReq )
-        {
-        retval += KApUiEventShutDownRequested;
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::ChangeWpaSettingsL")    
-    return retval;
+    APSETUILOGGER_ENTERFN( EModel,"Model::ChangeWpaSettingsL - ERROR: not suported")
+    aApItem = aApItem;
+    return KErrNotSupported;
     }
 
 
@@ -1166,35 +1106,9 @@
 //
 TInt CApSettingsModel::Change8021xSettingsL( CApAccessPointItem* aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL")
-    TInt retval(0);
-
-    if ( !iWpaSecSettings )
-        {
-        iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityMode8021x );
-        TUint32 iapid( 0 );
-        aApItem->ReadUint( EApIapServiceId, iapid );
-        iWpaSecSettings->LoadL( iapid, *Database()->Database() );        
-        }
-        
-    if ( !iWpaSecSettingsUi )
-        {
-        iWpaSecSettingsUi = CWPASecuritySettingsUi::NewL( *EikEnv() );
-        }
-        
-    iWpaUiExitReason = iWpaSecSettings->EditL( *iWpaSecSettingsUi, 
-                                               aApItem->ConnectionName() );
-
-    if ( iWpaUiExitReason & CWPASecuritySettings::EExitReq )
-        {
-        retval += KApUiEventExitRequested;
-        }
-    if ( iWpaUiExitReason & CWPASecuritySettings::EShutDownReq )
-        {
-        retval += KApUiEventShutDownRequested;
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::Change8021xSettingsL")       
-    return retval;
+    APSETUILOGGER_ENTERFN( EModel,"Model::Change8021xSettingsL - ERROR: not suported")
+    aApItem = aApItem;
+    return KErrNotSupported;
     }
 
 
@@ -1205,19 +1119,10 @@
 //
 void CApSettingsModel::ClearWEPAndWPASettings()
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings")
-    
-    delete iWepSecSettings;
-    iWepSecSettings = NULL;
-
-    delete iWpaSecSettings;
-    iWpaSecSettings = NULL;
-    
-    APSETUILOGGER_LEAVEFN( EModel,"Model::ClearWEPAndWPASettings") 
+    APSETUILOGGER_ENTERFN( EModel,"Model::ClearWEPAndWPASettings - ERROR: not suported")
     }
 
 
-
 // ---------------------------------------------------------
 // CApSettingsModel::WriteWlanL
 // ---------------------------------------------------------
@@ -1225,284 +1130,34 @@
 void CApSettingsModel::WriteWlanL( CApAccessPointItem& aApItem,
                                    TBool aIsNew )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL")
-    // now check if it is WLAN and handle security savings...
-    if ( aApItem.BearerTypeL() == EApBearerTypeWLAN )
-        { // it is WLAN...
-        // check that there were no bearer-change, because if orig. bearer 
-        // was NOT wlan, then we shouls consider it as a new record!!!
-        TUint32 wlanid(0);
-        aApItem.ReadUint( EApIapServiceId, wlanid );        
-        
-        TUint32 oldwlanid(wlanid);
-        
-        TTypeOfSaving savetype( ESavingEditedAP );
-        
-        if ( aIsNew )
-            {
-            savetype = ESavingBrandNewAP;
-            oldwlanid = 0;
-            }
-        // now check if it is WEP...
-        // read up security mode
-        TUint32 secmode( 0 );
-        aApItem.ReadUint( EApWlanSecurityMode, secmode );
-        
-        
-        TBool fresh(EFalse); 
-        
-        
-        switch ( secmode )
-            {
-            case EOpen:
-                {
-                break;
-                }
-            case EWep:
-                {
-                // we have to try to save if:
-                // 1. it is a changed AP, it is possible that only 
-                // sec. settings have been changed. 
-                // In this case, iWepSecSettings might be NULL!!
-                // 2. it's sec. settings had been edited
-                
-                if ( !iWepSecSettings )
-                    {
-                    iWepSecSettings = CWEPSecuritySettings::NewL();
-                    fresh = ETrue;
-                    iWepSecSettings->LoadL( oldwlanid, 
-                                            *Database()->Database() );
-                    }
-                
-                if ( ( iWepUiExitReason & CWEPSecuritySettings::EValid ) 
-                    || ( fresh ) )
-                    { // save WEP settings, too, into same transaction...
-                    iWepSecSettings->SaveL( wlanid, *iDb->Database() );
-                    }
-                break;
-                }
-            case E802_1x:
-                {
-                
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityMode8021x );
-                    fresh = ETrue;
-                    iWpaSecSettings->LoadL( oldwlanid, 
-                                            *Database()->Database() );
-                    }                
-                
-                if ( ( iWpaUiExitReason & CWPASecuritySettings::EValid )
-                    || ( fresh ) )
-                    { // save WPA settings, too, into same transaction...
-                    iWpaSecSettings->SaveL( wlanid, *iDb->Database(), 
-                                            savetype, oldwlanid );
-                    }
-                break;
-                }
-            case EWpa:
-            case EWpa2:
-                {
-                
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                          CWPASecuritySettings::NewL( ESecurityModeWpa );
-                    fresh = ETrue;
-                    iWpaSecSettings->LoadL( oldwlanid, 
-                                            *Database()->Database() );
-                    }                
-                
-                if ( ( iWpaUiExitReason & CWPASecuritySettings::EValid )
-                    || ( fresh ) )
-                    { // save WPA settings, too, into same transaction...
-                    iWpaSecSettings->SaveL( wlanid, *iDb->Database(),
-                                            savetype, oldwlanid );
-                    }
-                break;
-                }
-            default:
-                {
-                __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) );
-                // do nothing in urel
-                break;
-                }
-            }
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::WriteWlanL")    
+    APSETUILOGGER_ENTERFN( EModel,"Model::WriteWlanL - ERROR: not supported")
+    aApItem;
+    aIsNew;
+    User::Leave( KErrNotSupported );
     }
 
 
-
-
-
 // ---------------------------------------------------------
 // CApSettingsModel::LoadWlanL
 // ---------------------------------------------------------
 //
 void CApSettingsModel::LoadWlanL( CApAccessPointItem& aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL")
-    // now check if it is WLAN and handle security savings...
-    if ( aApItem.BearerTypeL() == EApBearerTypeWLAN )
-        { // it is WLAN...
-        // now check if it is WEP...
-        // read up security mode
-        TUint32 secmode( 0 );
-        aApItem.ReadUint( EApWlanSecurityMode, secmode );
-        switch ( secmode )
-            {
-            case EOpen:
-                {
-                break;
-                }
-            case EWep:
-                {
-                if ( !iWepSecSettings )
-                    {
-                    iWepSecSettings = CWEPSecuritySettings::NewL();
-                    }
-    
-                if ( !iWepSecSettingsUi )
-                    {
-                    iWepSecSettingsUi = 
-                        CWEPSecuritySettingsUi::NewL( *EikEnv() );
-                    }
-                TUint32 wlanid( 0 );
-                aApItem.ReadUint( EApIapServiceId, wlanid );
-                iWepSecSettings->LoadL( wlanid, *Database()->Database() );
-                break;
-                }
-            case E802_1x:
-                {
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityMode8021x );
-                    }
-    
-                if ( !iWpaSecSettingsUi )
-                    {
-                    iWpaSecSettingsUi = 
-                        CWPASecuritySettingsUi::NewL( *EikEnv() );
-                    }
-                TUint32 wlanid( 0 );
-                aApItem.ReadUint( EApIapServiceId, wlanid );
-                iWpaSecSettings->LoadL( wlanid, *Database()->Database() );
-                break;
-                }
-            case EWpa:
-            case EWpa2:
-                {
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityModeWpa );
-                    }
-    
-                if ( !iWpaSecSettingsUi )
-                    {
-                    iWpaSecSettingsUi = 
-                        CWPASecuritySettingsUi::NewL( *EikEnv() );
-                    }
-                TUint32 wlanid( 0 );
-                aApItem.ReadUint( EApIapServiceId, wlanid );
-                iWpaSecSettings->LoadL( wlanid, *Database()->Database() );
-                break;
-                }
-            default:
-                {
-                __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) );
-                // do nothing in urel
-                break;
-                }
-            }
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::LoadWlanL")    
+    APSETUILOGGER_ENTERFN( EModel,"Model::LoadWlanL - ERROR: not supported")
+    aApItem;
+    User::Leave( KErrNotSupported );
     }
 
 
-
-
-
 //----------------------------------------------------------
 // CApSettingsModel::HasWlanSecSettingsFilledL
 //----------------------------------------------------------
 //
 TBool CApSettingsModel::HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL")
-    TBool retval(EFalse);
-    
-    TUint32 secmode( 0 );
-    aApItem.ReadUint( EApWlanSecurityMode, secmode );
-    
-    TUint32 wlanid(0);
-    aApItem.ReadUint( EApIapServiceId, wlanid );        
-        
-    TUint32 oldwlanid(wlanid);
-
-    TUint32 wapuid = aApItem.WapUid();
-
-    if ( ( wapuid == KApNoneUID )
-        || ( iUtils->BearerTypeL( wapuid ) != EApBearerTypeWLAN ) )
-        {
-        oldwlanid = 0;
-        }
-
-    switch ( secmode )
-        {
-        case EOpen:
-            {
-            retval = ETrue;
-            break;
-            }
-        case EWep:
-            {
-            if ( !iWepSecSettings )
-                {
-                iWepSecSettings = CWEPSecuritySettings::NewL();
-                iWepSecSettings->LoadL( oldwlanid, 
-                                        *Database()->Database() );
-                }
-            retval = iWepSecSettings->IsValid();
-            break;
-            }
-        case E802_1x:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityMode8021x );
-                iWpaSecSettings->LoadL( oldwlanid, 
-                                        *Database()->Database() );
-                }
-            retval = iWpaSecSettings->IsValid();
-            break;
-            }
-        case EWpa:
-        case EWpa2:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                      CWPASecuritySettings::NewL( ESecurityModeWpa );
-                iWpaSecSettings->LoadL( oldwlanid, 
-                                        *Database()->Database() );
-                }                
-            retval = iWpaSecSettings->IsValid();                
-            break;
-            }
-        default:
-            {
-            __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) );
-            // do nothing in urel
-            break;
-            }
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::HasWlanSecSettingsFilledL")    
-    return retval;
+    APSETUILOGGER_ENTERFN( EModel,"Model::HasWlanSecSettingsFilledL - ERROR: not supported")
+    aApItem;
+    return EFalse;
     }
 
 
@@ -1512,66 +1167,9 @@
 //
 void CApSettingsModel::UpdateSecurityModeL( CApAccessPointItem& aApItem )
     {
-    APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL")
-    TUint32 secmode( 0 );
-    aApItem.ReadUint( EApWlanSecurityMode, secmode );
-
-    TUint32 wlanid(0);
-    aApItem.ReadUint( EApIapServiceId, wlanid );
-
-    switch ( secmode )
-        {
-        case EOpen:
-            {
-            break;
-            }
-        case EWep:
-            {
-            if ( iWepSecSettings )
-                {
-                delete iWepSecSettings;
-                iWepSecSettings = NULL; // to satisfy CodeScanner
-                }
-            iWepSecSettings = CWEPSecuritySettings::NewL();
-            iWepSecSettings->LoadL( wlanid, 
-                                    *Database()->Database() );
-            break;
-            }
-        case E802_1x:
-            {
-            if ( iWpaSecSettings )
-                {
-                delete iWpaSecSettings;
-                iWpaSecSettings = NULL; // to satisfy CodeScanner
-                }
-            iWpaSecSettings = 
-                CWPASecuritySettings::NewL( ESecurityMode8021x );
-            iWpaSecSettings->LoadL( wlanid, 
-                                    *Database()->Database() );
-            break;
-            }
-        case EWpa:
-        case EWpa2:
-            {
-            if ( iWpaSecSettings )
-                {
-                delete iWpaSecSettings;
-                iWpaSecSettings = NULL; // to satisfy CodeScanner
-                }
-            iWpaSecSettings = 
-                  CWPASecuritySettings::NewL( ESecurityModeWpa );
-            iWpaSecSettings->LoadL( wlanid, 
-                                    *Database()->Database() );
-            break;
-            }
-        default:
-            {
-            __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) );
-            // do nothing in urel
-            break;
-            }
-        }
-    APSETUILOGGER_LEAVEFN( EModel,"Model::UpdateSecurityModeL")    
+    APSETUILOGGER_ENTERFN( EModel,"Model::UpdateSecurityModeL - ERROR: not supported")
+    aApItem;
+    User::Leave( KErrNotSupported );
     }
 
 // End of File
--- a/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/apsettingshandlerui/src/apsettingsdeleteoperation.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -28,8 +28,6 @@
 #include <ErrorUI.h>
 #include "Apsettingsdeleteoperation.h"
 
-#include <WEPSecuritySettingsUI.h>
-#include <WPASecuritySettingsUI.h>
 #include <ApAccessPointItem.h>
 
 // Following includes are needed only for the test
--- a/apengine/apsettingsplugin/data/1020736C.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*        ECOM plugin resource file for AP Settings plugin.
-*
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid     = 0x1020736C; // Plugin dll UID
-	interfaces  = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid   = 0x10207236; // UID for CGSPluginInterface
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x1020736B; // Plugin UID 
-					version_no          = 1;
-					display_name        = "AP Settings Plugin"; // Plugin debug name
-					default_data        = "0x200255B9"; // Parent UID (gsconnsettingsplugin)
-					opaque_data         = "60"; // Order number
-					}
-				};
-			}
-		};
-	}
-
--- a/apengine/apsettingsplugin/data/ApSettingsPluginRsc.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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: 
-*        Resource file for ApSettingsPlugin
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME    PAPS // 4 letter ID
-
-//  INCLUDES
-#include    <bldvariant.hrh>
-#include    <avkon.rh>
-#include    <avkon.rsg>
-#include    <EIKCORE.rsg>
-#include    <eikon.rh>
-#include    <eikon.rsg>
-#include    <data_caging_paths_strings.hrh>
-
-#include    <apsettingsplugin.loc>
-
-//  RESOURCE DEFINITIONS 
-
-//---------------------------------------------------- 
-//    
-//    Needed or loading the resource fails!
-//
-//----------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
-    {
-    }
-
-//----------------------------------------------------
-//   
-//    qtn_set_access_points 
-//    Caption for Plugin.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_network_connections 
-    { buf = qtn_netw_conset_network_connections ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_err_os_general 
-//    Caption for Plugin.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_err_os_general { buf = qtn_err_os_general ; }
-
-//End of File
--- a/apengine/apsettingsplugin/group/ApSettingsPlugin.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +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 is project specification file for the ApSettingsPlugin.
-*
-*
-*/
-
-#include <data_caging_paths.hrh>    //this is needed for RESOURCE_FILES_DIR
-#include <platform_paths.hrh>
-
-CAPABILITY          CAP_ECOM_PLUGIN
-TARGET              ApSettingsPlugin.dll
-TARGETTYPE          PLUGIN
-UID                 0x10009D8D 0x1020736C
-VENDORID            VID_DEFAULT
-
-SOURCEPATH          ../src
-SOURCE              APSettingsPlugin.cpp
-SOURCE              ApSettingsPluginImplementationTable.cpp
-SOURCE              utilities.cpp
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH          ../data
-
-//ECOM resource definition
-START RESOURCE      1020736C.rss
-TARGET              ApSettingsPlugin.rsc
-END // ECOM resource definition
-
-//ApSettingsPlugin resources
-START RESOURCE      ApSettingsPluginRsc.rss
-HEADER
-TARGETPATH          RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END // ApSettingsPlugin resources
-
-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             commonengine.lib//For RConeResourceLoader
-LIBRARY             GSFramework.lib
-LIBRARY             egul.lib // CGulIcon
-LIBRARY             aknskins.lib // AknsUtils.h
-LIBRARY             ApSettingsHandlerUI.lib //ApSettingsHandlerUI.h
-LIBRARY             GSEcomPlugin.lib
-LIBRARY             commonui.lib 
-LIBRARY 			aknnotify.lib
-LIBRARY	            centralrepository.lib
-LIBRARY             cmmanager.lib
-
-
-
--- a/apengine/apsettingsplugin/group/apsettingspluginicons.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  Makefile for icons of ApSettingsPlugin
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\apsettingsplugin.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\apsettingsplugin.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) \
-		/c16,8 qgn_prop_set_conn_accp.bmp 
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/apengine/apsettingsplugin/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /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:  Build information for the ApSettingsPlugin
-*
-*/
-
-
-#ifdef RD_GS_RENOVATION // This is the GS_RENOVATION
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT  
-
-PRJ_EXPORTS
-// export iby files
-../rom/ApSettingsPlugin.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(ApSettingsPlugin.iby)
-../rom/ApSettingsPluginResources.iby	LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ApSettingsPluginResources.iby)
-
-// export localised loc file
-../loc/apsettingsplugin.loc	MW_LAYER_LOC_EXPORT_PATH(apsettingsplugin.loc)
-
-PRJ_MMPFILES
-./ApSettingsPlugin.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE apsettingsplugin.mif
-OPTION HEADERFILE apsettingsplugin.mbg
-OPTION SOURCES -c16,8 qgn_prop_set_conn_accp
-END
-
-#endif
-
-// End of File
--- a/apengine/apsettingsplugin/inc/APSettingsPlugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +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: 
-*        Header file for CApSettingsPlugin class.
-*
-*/
-
-#ifndef __AP_SETTINGS_PLUGIN_H__
-#define __AP_SETTINGS_PLUGIN_H__
-
-// System includes
-#include <e32def.h>
-#include <e32cmn.h>
-#include <gsplugininterface.h>
-#include <ConeResLoader.h>
-
-// Forward declaration
-class CApSettingsPluginContainer;
-
-/**
-* Wrapper class for AP Settings Handler UI. 
-*/
-class CApSettingsPlugin : public CGSPluginInterface
-    {
-    public://Constructors & destructors
-
-        /**
-        * First phase constructor
-        * Creates new Plugin and Launches APSettingsHandlerUI
-        * with default parameters
-        */ 
-        static CApSettingsPlugin* NewL( TAny* aInitParams );
-                        
-        /**
-        * Destructor
-        */
-        ~CApSettingsPlugin();
-        
-    public: // Functions from base class
-        
-        /**
-        * from CAknView
-        */
-        TUid Id() const;
-        
-        void DoActivateL( const TVwsViewId& aPrevViewId, 
-                          TUid aCustomMessageId, 
-                          const TDesC8& aCustomMessage );
-    
-        void DoDeactivate();
-
-    public:
-    
-        /**
-        * from CGSPluginInterface
-        */
-
-        void GetCaptionL( TDes& aCaption ) const;
-
-        TBool HasBitmap() const;
-  
-        void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const;
-        
-        TInt PluginProviderCategory() const; 
-        
-        void HandleSelection( const TGSSelectionTypes aSelectionType );
-          
-        TGSListboxItemTypes ItemType();
-        
-        CGulIcon* CreateIconL( const TUid aIconType );
-            
-        TBool Visible() const;
-
-    protected:
-    
-        /**
-        * Constructor
-        */
-        CApSettingsPlugin();
-
-    private:
-    
-        /**
-        * Second phase constructor
-        */
-        TAny ConstructL();
-        
-        /**
-        * Creates and starts WLAN Settings UI 
-        */
-        void DoSettingsL();
-                     
-    private: //data
-        
-        //@var resource loader
-        RConeResourceLoader iResources;
-        TInt iApSettingsSupported;
-
-    };
-
-#endif //__AP_SETTINGS_PLUGIN_H__
-//End of file
--- a/apengine/apsettingsplugin/inc/utilities.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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: 
-*        Header file for Utilities class.
-*
-*/
-
-#ifndef __UTILITIES_H__
-#define __UTILITIES_H__
-
-// System includes
-#include <e32def.h>
-
-/**
-* Utilities class.
-*/
-class Utilities
-    {
-    public:
-
-        /**
-        * Shows an error note if it can be resolved by the error resolver or
-        * a general error note if the given error code cannot be resolved.
-        * @param aErrorCode Error code.
-        */ 
-        static void ShowErrorNote(TInt errorCode);
-       
-    private:
-    
-        /**
-        * Shows an error note if it can be resolved by the error resolver.
-        * @param aErrorCode Error code.
-        * @return True if the error note was showned, 
-        *         false if not showed.
-        */
-        static TBool ShowErrorNoteL(TInt aErrorCode);
-        
-        /**
-        * Shows a general error note "System error" (qtn.err.os.general).
-        */
-        static void ShowGeneralErrorNoteL();
-         
-    private: //data
-
-    };
-
-#endif //__WLAN_SETTINGS_PLUGIN_H__
-//End of file
\ No newline at end of file
--- a/apengine/apsettingsplugin/loc/apsettingsplugin.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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 Plugin
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-
-//d:Text of a list item in Connection view's list
-//d:Item opens Access points view
-//l:list_single_large_graphic_pane_t1
-//r:3.1
-//
-#define qtn_set_folder_conn_accpoints "Access points"
-        
-//d: In case of error, the error code is passed to error resolver
-//d: and the error note is displayed accordingly. If error resolver
-//d: cannot resolve the error, an error note "System error" is displayed.
-//l: popup_note_window/opt2
-//w:
-//r:3.1
-//
-#define qtn_err_os_general "System error"
-
-//d:Text of a list item in Connection view's list
-//d:Item opens Access points view
-//l:list_single_large_graphic_pane_t1_cp2
-//r:3.2
-//
-#define qtn_netw_conset_network_connections "Network destinations"
-
-// End of File
-
-
--- a/apengine/apsettingsplugin/rom/ApSettingsPlugin.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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:  Image description file for project ApSettingsPlugin
-*
-*/
-
-
-#ifndef __APSETTINGSPLUGIN_IBY__
-#define __APSETTINGSPLUGIN_IBY__
-
-ECOM_PLUGIN(ApSettingsPlugin.DLL,1020736C.rsc)
-
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,apsettingsplugin)
-
-
-#endif __APSETTINGSPLUGIN_IBY__
\ No newline at end of file
--- a/apengine/apsettingsplugin/rom/ApSettingsPluginResources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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:  Image description file for project ApSettingsPlugin
-*
-*/
-
-
-#ifndef __APSETTINGSPLUGIN_RESOURCES_IBY__
-#define __APSETTINGSPLUGIN_RESOURCES_IBY__
-
-data=DATAZ_\RESOURCE_FILES_DIR\ApSettingsPluginRsc.rsc RESOURCE_FILES_DIR\ApSettingsPluginRsc.rsc
-
-#endif __APSETTINGSPLUGIN_RESOURCES_IBY__
\ No newline at end of file
--- a/apengine/apsettingsplugin/src/APSettingsPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +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:  ApSettingsPlugin class.
-*
-*/
-
-
-// INCLUDE FILES
-
-// User includes
-#include "APSettingsPlugin.h"
-#include "StringLoader.h"
-#include "utilities.h"
-
-#include <cmsettingsui.h>
-
-// System includes
-#include <eikon.hrh>
-#include <f32file.h>
-#include <ConeResLoader.h>
-#include <ApSettingsPluginRsc.rsg>
-#include <data_caging_path_literals.hrh>
-#include <apsettingsplugin.mbg>
-#include <settingsinternalcrkeys.h>
-#include <centralrepository.h>
-
-
-const TInt KDefaultAPSettingsValue 	  = 1;	// AP settings UI supported
-
-// Resource file location
-_LIT( KApSettingsPluginRscFileName, "ApSettingsPluginRsc.rsc" );
-
-// This UID is used for both the view UID 
-// and the ECOM plugin implementation ID.
-const TUid KApSettingsPluginUid = { 0x1020736B };
-
-// ROM folder
-_LIT( KDriveZ, "z:" );
-
-// Name of the MBM file containing icons
-_LIT( KFileIcons, "apsettingsplugin.mbm");
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::NewL
-// First phase constructor
-// ---------------------------------------------------------
-CApSettingsPlugin* CApSettingsPlugin::NewL( TAny* /*aInitParams*/ )
-    {
-    CApSettingsPlugin* self = new ( ELeave ) CApSettingsPlugin();
-    CleanupStack::PushL( self );
-    
-    self->ConstructL();
-                      
-    CleanupStack::Pop( self );
-    return self;     
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::~CApSettingsPlugin
-// Destructor
-// ---------------------------------------------------------
-CApSettingsPlugin::~CApSettingsPlugin()
-    {
-    iResources.Close();
-#ifdef _DEBUG
-    RDebug::Print( _L( "[CApSettingsPlugin] ~CApSettingsPlugin()" ) );
-#endif
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::Id
-// ---------------------------------------------------------
-TUid CApSettingsPlugin::Id() const
-    {
-    return KApSettingsPluginUid;
-    }
- 
-// ---------------------------------------------------------
-// CApSettingsPlugin::DoActivateL()
-// ---------------------------------------------------------      
-void CApSettingsPlugin::DoActivateL( const TVwsViewId& /*aPrevViewId*/, 
-                          TUid /*aCustomMessageId*/, 
-                          const TDesC8& /*aCustomMessage*/ )
-    {
-    //no implementation required
-    }
-    
-// ---------------------------------------------------------
-// CApSettingsPlugin::DoDeactivate()
-// ---------------------------------------------------------
-void CApSettingsPlugin::DoDeactivate()
-    {
-    //no implementation required
-    }
-       
-// ---------------------------------------------------------
-// CApSettingsPlugin::GetCaption
-// ---------------------------------------------------------
-void CApSettingsPlugin::GetCaptionL( TDes& aCaption ) const
-    {
-    StringLoader::Load( aCaption, R_QTN_NETW_CONSET_NETWORK_CONNECTIONS  );
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::HasBitmap
-// ---------------------------------------------------------
-TBool CApSettingsPlugin::HasBitmap() const
-    {
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::GetBitmapL
-// ---------------------------------------------------------
-void CApSettingsPlugin::GetBitmapL( CFbsBitmap* /*aBitmap*/, 
-                                    CFbsBitmap* /*aMask*/ ) const
-    {
-    //no bitmap
-    User::Leave( KErrNotFound );
-    }
-    
-// ---------------------------------------------------------
-// CApSettingsPlugin::PluginProviderCategory
-// ---------------------------------------------------------
-TInt CApSettingsPlugin::PluginProviderCategory() const
-    {
-    return EGSPluginProviderOEM;
-    }
-    
-// ---------------------------------------------------------
-// CApSettingsPlugin::HandleSelection
-// ---------------------------------------------------------   
-void CApSettingsPlugin::HandleSelection(
-            const TGSSelectionTypes /*aSelectionType*/ )
-    {
-    TRAPD( error, DoSettingsL() );
-    
-    if( error && error != KLeaveWithoutAlert )
-        {
-        Utilities::ShowErrorNote(error);
-        }    
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::ItemType
-// ---------------------------------------------------------
-TGSListboxItemTypes CApSettingsPlugin::ItemType()
-    {
-    return EGSItemTypeSettingDialog;
-    }
-    
-// ---------------------------------------------------------
-// CApSettingsPlugin::CreateIconL
-// ---------------------------------------------------------    
-CGulIcon* CApSettingsPlugin::CreateIconL( const TUid aIconType )
-    {
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-    iconsFileName.Append( KFileIcons );
-    
-	CGulIcon* icon;
-       
-    if( aIconType == KGSIconTypeLbxItem )
-        {
-        icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(), 
-        KAknsIIDQgnPropSetConnAccp, 
-        iconsFileName,
-        EMbmApsettingspluginQgn_prop_set_conn_accp,
-        EMbmApsettingspluginQgn_prop_set_conn_accp_mask );
-        }
-     else
-        {
-        icon = CGSPluginInterface::CreateIconL( aIconType );
-        }
-	
-	return icon;
-    }    
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::Visible
-// -----------------------------------------------
-TBool CApSettingsPlugin::Visible() const
-    {
-  	if ( iApSettingsSupported == KDefaultAPSettingsValue )
-  		{
-  		return ETrue;
-		}
-	else
-		{
-		return EFalse;
-		}
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::CApSettingsPlugin
-// ---------------------------------------------------------
-CApSettingsPlugin::CApSettingsPlugin():
-    iResources( *CCoeEnv::Static() )
-    {
-    // no implementation required
-    }
-
-// ---------------------------------------------------------
-// CApSettingsPlugin::ConstructL
-// ---------------------------------------------------------
-TAny CApSettingsPlugin::ConstructL()
-    {
-    
-#ifdef _DEBUG    
-    RDebug::Print( _L("[CApSettingsPlugin] ConstructL()" ) );
-    RDebug::Print( _L( "[CApSettingsPlugin] Loading resource from :" ) );
-    RDebug::Print( KApSettingsPluginRscFileName );
-#endif
-    
-    BaseConstructL();
-        
-    TFileName fileName;
-    TDriveUnit drive( EDriveZ );
-    
-    fileName.Append( drive.Name() );
-    fileName.Append( KDC_RESOURCE_FILES_DIR );
-    fileName.Append( KApSettingsPluginRscFileName );
-    
-    iResources.OpenL( fileName );
-    
-  	iApSettingsSupported = KDefaultAPSettingsValue;
-    }
-    
-// ---------------------------------------------------------
-// CApSettingsPlugin::DoSettingsL
-// ---------------------------------------------------------
-void CApSettingsPlugin::DoSettingsL()
-    {
-    CCmSettingsUi* settings = CCmSettingsUi::NewL();
-    CleanupStack::PushL( settings );
-    
-    if( settings->RunSettingsL() == CCmSettingsUi::EExit )
-        {
-        //exit from General Settings
-        ProcessCommandL( EAknCmdExit );
-        }
-    
-    CleanupStack::PopAndDestroy( settings );
-    }
-    
-
-//End of file
--- a/apengine/apsettingsplugin/src/ApSettingsPluginImplementationTable.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /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: 
-*        ECOM proxy table for this plugin
-*
-*/
-
-
-// System includes
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// User includes
-#include "APSettingsPlugin.h"
-
-// Constants
-const TImplementationProxy KApSettingsPluginImplementationTable[] = 
-    {
-    IMPLEMENTATION_PROXY_ENTRY(0x1020736B,    CApSettingsPlugin::NewL)
-    };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-    {
-    aTableCount = sizeof(KApSettingsPluginImplementationTable) 
-        / sizeof(TImplementationProxy);
-    return KApSettingsPluginImplementationTable;
-    }
--- a/apengine/apsettingsplugin/src/utilities.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Implementation of utilities functions.   
-*      
-*
-*/
-
-
-// INCLUDE FILES
-#include "utilities.h"
-
-#include <ErrorUI.h>
-#include <AknGlobalNote.h>
-#include <StringLoader.h>
-#include <ApSettingsPluginRsc.rsg>
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// Utilities::ShowErrorNote
-// ---------------------------------------------------------
-//
-void Utilities::ShowErrorNote(TInt aErrorCode)
-    {
-    TBool errorNoteShowed = EFalse;
-        
-    TRAPD(error, errorNoteShowed = ShowErrorNoteL(aErrorCode));
-            
-    if(error || !errorNoteShowed) 
-        {
-        TRAP_IGNORE( ShowGeneralErrorNoteL() );
-        }    
-    }
-
-// ---------------------------------------------------------
-// Utilities::ShowErrorNoteL
-// ---------------------------------------------------------
-//
-TBool Utilities::ShowErrorNoteL(TInt aErrorCode)
-    {
-    CErrorUI* errorUi = CErrorUI::NewLC();
-    
-    TBool errorNoteShowed = errorUi->ShowGlobalErrorNoteL( aErrorCode );
-    
-    CleanupStack::PopAndDestroy( errorUi );
-        
-    return errorNoteShowed;
-    }    
-
-// ---------------------------------------------------------
-// Utilities::ShowGeneralErrorNoteL
-// ---------------------------------------------------------
-//
-void Utilities::ShowGeneralErrorNoteL()
-    {
-    HBufC *msg = StringLoader::LoadLC( R_QTN_ERR_OS_GENERAL );
-
-    CAknGlobalNote *note = CAknGlobalNote::NewLC();
-    
-    
-    note->ShowNoteL( EAknGlobalErrorNote, *msg );
-
-
-    CleanupStack::PopAndDestroy( note );
-    CleanupStack::PopAndDestroy( msg );
-    }
--- a/apengine/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/apengine/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -24,6 +24,5 @@
 PRJ_MMPFILES
 #include "../apeng/group/bld.inf"
 #include "../apsettingshandlerui/group/bld.inf"
-#include "../apsettingsplugin/group/bld.inf"
 
 PRJ_TESTMMPFILES
\ No newline at end of file
--- a/bearermanagement/S60MCPR/inc/s60extendedtmselector.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/inc/s60extendedtmselector.h	Tue Aug 31 15:35:44 2010 +0300
@@ -25,9 +25,6 @@
 
 #include <comms-infras/simpleselectorbase.h>
 
-// Forward declaration
-class ESock::CMetaConnectionProviderBase;
-
 /**
  * TS60ProviderSelectorFactory
  */
--- a/bearermanagement/S60MCPR/inc/s60mcpr.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/inc/s60mcpr.h	Tue Aug 31 15:35:44 2010 +0300
@@ -253,11 +253,11 @@
      * Used to filter out extra notifications because MPM only needs one 
      * started/stopped event. Implement as simple FlipFlop -flag.
      */
-    TBool                   iDataClientStatusStarted : 1;
+    TBool                   iDataClientStatusStarted;
     /**
      * Synchronisation flags, private by design, can be modified only by CMobilityActivity
      */
-    TBool                   iIsHandshakingNow : 1; 
+    TBool                   iIsHandshakingNow; 
     
     /**
      * Connection preference list
--- a/bearermanagement/S60MCPR/inc/s60mpmpolicyinterfaces.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/inc/s60mpmpolicyinterfaces.h	Tue Aug 31 15:35:44 2010 +0300
@@ -65,6 +65,7 @@
     {
     enum TPolicyServerOperations
         {
+        EPolicyRequestInvalid,
         EPolicyRequestChooseBestIAP = EMPMChooseBestIAP,
         EPolicyRequestReselectBestIAP = EMPMReselectBestIAP,
         EPolicyRequestProcessError = EMPMProcessError,
@@ -94,12 +95,14 @@
          * c++ constructor 
          */
         PolicyRequest()
-            :   iConnPref(NULL),
+            :   iRequestType( S60MCPRMPMOperations::EPolicyRequestInvalid ),
+                iConnPref(NULL),
                 iIapId(0),
                 iConnId(0),
                 iAppUid(KNullUid),
                 iError(KErrNone),
                 iPolicyPref(NULL),
+                iNeededAction( EIgnoreError ),
                 iStatus(KErrNone),
                 iUser(NULL)
             {}
--- a/bearermanagement/S60MCPR/inc/s60tiermanagerselector.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/inc/s60tiermanagerselector.h	Tue Aug 31 15:35:44 2010 +0300
@@ -25,9 +25,6 @@
 
 #include <comms-infras/simpleselectorbase.h>
 
-// Forward declaration
-class ESock::CMetaConnectionProviderBase;
-
 /**
  * TS60ProviderSelectorFactory
  */
--- a/bearermanagement/S60MCPR/src/s60extendedtmselector.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60extendedtmselector.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -56,10 +56,12 @@
 // -----------------------------------------------------------------------------
 //
 CExtendedS60SelectorBase::CExtendedS60SelectorBase(  TUid aTierId, const ESock::RConnPrefList& aConnPrefList )
-    :    ASimpleSelectorBase( )
+    :    ASimpleSelectorBase( ),
+         iDefaultAp( 0 ),
+         iConnPrefList( aConnPrefList ),
+         iTierId( aTierId ),
+         iSubSessionUniqueId( 0 )
     {
-    iTierId = aTierId;
-    iConnPrefList = aConnPrefList;
     }
 
 // -----------------------------------------------------------------------------
--- a/bearermanagement/S60MCPR/src/s60mcprerrorrecoveryactivity.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprerrorrecoveryactivity.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -174,7 +174,6 @@
     DEFINE_SMELEMENT(TRetryConnectionOrProcessErrorTagBackward, NetStateMachine::MStateFork, TContext)
     TInt TRetryConnectionOrProcessErrorTagBackward::TransitionTag()
         {
-        CS60MetaConnectionProvider& node = (CS60MetaConnectionProvider&)iContext.Node();
         TCFMcpr::TReConnectComplete* msg = NULL;
         if ( iContext.iMessage.IsMessage<TCFMcpr::TReConnectComplete>() )
             {
@@ -185,9 +184,8 @@
             {
             S60MCPRLOGSTRING1("S60MCPR<%x>::TRetryConnectionOrProcessErrorTagBackward::TransitionTag() KProcessError",(TInt*)&iContext.Node());
             return S60MCprStates::KProcessError | NetStateMachine::EBackward;
-            //return KErrorTag | NetStateMachine::EForward;
             }
-        else// if ( node.ServiceProvider()->ProviderInfo().APId() == node.PolicyPrefs().IapId() )
+        else
             {
             S60MCPRLOGSTRING1("S60MCPR<%x>::TRetryConnectionOrProcessErrorTagBackward::TransitionTag() KRetryConnection",(TInt*)&iContext.Node());
             return S60MCprStates::KRetryConnection | NetStateMachine::EForward;
--- a/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -325,7 +325,11 @@
     //
     CS60MobilityActivity::CS60MobilityActivity( const MeshMachine::TNodeActivity& aActivitySig, 
                                                 MeshMachine::AMMNodeBase& aNode )
-        :   S60MCprStates::CS60ErrorRecoveryActivity( aActivitySig, aNode )
+        :   S60MCprStates::CS60ErrorRecoveryActivity( aActivitySig, aNode ),
+            iCurrentAssumedAPId( 0 ),
+            iPreferredAPId( 0 ),
+            iIsUpgrade( EFalse ),
+            iIsSeamless( EFalse )
         {}
 
 
--- a/bearermanagement/S60MCPR/src/s60mcprstates.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprstates.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -368,10 +368,10 @@
 
         // Only EIntSetting is supported 
         // 
-        if ( ( TMCprGetConnectionSetting::TConnectionSettingType)msg->iSettingType == 
-               TMCprGetConnectionSetting::EIntSetting
-               && node.PolicyPrefs().ServiceId() != 0 
-               && field.Compare( KIapProxyServiceSetting ) == 0  )
+        if ( msg
+             && msg->iSettingType == TMCprGetConnectionSetting::EIntSetting
+             && node.PolicyPrefs().ServiceId() != 0 
+             && field.Compare( KIapProxyServiceSetting ) == 0  )
             {
             S60MCPRLOGSTRING1("S60MCPR<%x>::TAwaitingServiceIdRequest::Accept() TMCprGetConnectionSetting EIntSetting", 
                 (TInt*)&iContext.Node())
--- a/bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60tiermanagerselector.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -67,7 +67,9 @@
 // -----------------------------------------------------------------------------
 //
 CSimpleS60SelectorBase::CSimpleS60SelectorBase( const Meta::SMetaData& aSelectionPreferences )
-    :    ASimpleSelectorBase( aSelectionPreferences )
+    :    ASimpleSelectorBase( aSelectionPreferences ),
+         iDefaultAp( 0 ),
+         iSubSessionUniqueId( 0 )
     {
     }
 
--- a/bearermanagement/mpm/bwins/mpmdefaultconnectionu.def	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-EXPORTS
-	?ClearDefaultIAP@RMPMDefaultConnection@@QAEHXZ @ 1 NONAME ; int RMPMDefaultConnection::ClearDefaultIAP(void)
-	?Close@RMPMDefaultConnection@@QAEXXZ @ 2 NONAME ; void RMPMDefaultConnection::Close(void)
-	?Connect@RMPMDefaultConnection@@QAEHXZ @ 3 NONAME ; int RMPMDefaultConnection::Connect(void)
-	?SetDefaultIAP@RMPMDefaultConnection@@QAEHH@Z @ 4 NONAME ; int RMPMDefaultConnection::SetDefaultIAP(int)
-	?Version@RMPMDefaultConnection@@QBE?AVTVersion@@XZ @ 5 NONAME ; class TVersion RMPMDefaultConnection::Version(void) const
-
Binary file bearermanagement/mpm/conf/mpmvpntoggleapi.confml has changed
Binary file bearermanagement/mpm/conf/mpmvpntoggleapi_20016a88.crml has changed
--- a/bearermanagement/mpm/eabi/mpmdefaultconnectionu.def	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-EXPORTS
-	_ZN21RMPMDefaultConnection13SetDefaultIAPEi @ 1 NONAME
-	_ZN21RMPMDefaultConnection15ClearDefaultIAPEv @ 2 NONAME
-	_ZN21RMPMDefaultConnection5CloseEv @ 3 NONAME
-	_ZN21RMPMDefaultConnection7ConnectEv @ 4 NONAME
-	_ZNK21RMPMDefaultConnection7VersionEv @ 5 NONAME
-
--- a/bearermanagement/mpm/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -21,19 +21,19 @@
 DEFAULT
 
 PRJ_EXPORTS
-../inc/rmpm.h                   |../../../inc/rmpm.h
-../inc/rmpm.inl                 |../../../inc/rmpm.inl
-../rom/mpm.iby                  CORE_MW_LAYER_IBY_EXPORT_PATH(mpm.iby)
-../rom/mpmdefaultconnection.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mpmdefaultconnection.iby)
-../rom/mpmserver.iby            CORE_MW_LAYER_IBY_EXPORT_PATH(mpmserver.iby)
-../conf/mpm.confml              MW_LAYER_CONFML(mpm.confml)
-../conf/mpm_101f6d12.crml       MW_LAYER_CRML(mpm_101f6d12.crml)
-../conf/mpm_101f6d50.crml       MW_LAYER_CRML(mpm_101f6d50.crml)
+../inc/rmpm.h                           |../../../inc/rmpm.h
+../inc/rmpm.inl                         |../../../inc/rmpm.inl
+../rom/mpm.iby                          CORE_MW_LAYER_IBY_EXPORT_PATH(mpm.iby)
+../rom/mpmserver.iby                    CORE_MW_LAYER_IBY_EXPORT_PATH(mpmserver.iby)
+../conf/mpm.confml                      MW_LAYER_CONFML(mpm.confml)
+../conf/mpm_101f6d12.crml               MW_LAYER_CRML(mpm_101f6d12.crml)
+../conf/mpm_101f6d50.crml               MW_LAYER_CRML(mpm_101f6d50.crml)
+../conf/mpmvpntoggleapi.confml          MW_LAYER_CONFML(mpmvpntoggleapi.confml)
+../conf/mpmvpntoggleapi_20016a88.crml   MW_LAYER_CRML(mpmvpntoggleapi_20016a88.crml)
 
 PRJ_MMPFILES
 mpmclient.mmp
 mpmserver.mmp
-mpmdefaultconnectionclient.mmp
 mpmserver_platsim.mmp // mpmserver-variant for Platsim
 
 PRJ_TESTMMPFILES
--- a/bearermanagement/mpm/group/mpmdefaultconnectionclient.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: MPM server client interface library
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET            mpmdefaultconnection.dll
-TARGETTYPE        dll
-
-UID               0x1000008d 0x101F6D33
-
-VENDORID          VID_DEFAULT
-CAPABILITY        CAP_CLIENT_DLL
-
-SOURCEPATH        ../src
-SOURCE            rmpmdefaultconnection.cpp
-
-USERINCLUDE       ../inc
-MW_LAYER_SYSTEMINCLUDE 
-
-LIBRARY           euser.lib
-DEBUGLIBRARY      flogger.lib
--- a/bearermanagement/mpm/group/mpmserver.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/group/mpmserver.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -34,28 +34,22 @@
 epocstacksize 0x5000
 
 SOURCEPATH        ../src
-SOURCE            mpmdialog.cpp
 SOURCE            mpmconnmonevents.cpp
 SOURCE            mpmconnmonreqs.cpp
 SOURCE            mpmserversession.cpp
 SOURCE            mpmserver.cpp
 SOURCE            mpmstarter.cpp
-SOURCE            mpmdisconnectdlg.cpp
 SOURCE            mpmdtmwatcher.cpp
 SOURCE            mpmroamingwatcher.cpp 
 SOURCE            mpmconfirmdlg.cpp
 SOURCE            mpmconfirmdlgstarting.cpp
 SOURCE            mpmconfirmdlgroaming.cpp
-SOURCE            mpmdefaultconnection.cpp
-SOURCE            mpmdefaultconnserver.cpp
-SOURCE            mpmdefaultconnserversession.cpp
 SOURCE            mpmcommsdataccess.cpp
-SOURCE            mpmwlanquerydialog.cpp
 SOURCE            mpmiapselection.cpp
 SOURCE            mpmcsidwatcher.cpp
 SOURCE            mpmdialogbase.cpp
 SOURCE            mpmdatausagewatcher.cpp
-SOURCE            mpmofflinewatcher.cpp
+SOURCE            mpmvpntogglewatcher.cpp
 SOURCE            mpmexpirytimer.cpp
 SOURCE            mpmconnpermquerytimer.cpp
 
@@ -68,12 +62,10 @@
 SYSTEMINCLUDE     ../../../inc
 
 LIBRARY           euser.lib
-LIBRARY           agentdialog.lib
 LIBRARY           commdb.lib
 LIBRARY           commsdat.lib
 LIBRARY           esock.lib
 LIBRARY           connmon.lib
-LIBRARY           disconnectdlgclient.lib
 LIBRARY           commonengine.lib
 LIBRARY           featmgr.lib
 LIBRARY           centralrepository.lib
@@ -84,8 +76,6 @@
 LIBRARY           connectionuiutilities.lib
 LIBRARY           cmmanagerdatabase.lib
 LIBRARY           charconv.lib
-LIBRARY           wifiprotclient.lib
-LIBRARY           wifiprotplugin.lib
 LIBRARY           cmmanager.lib
 DEBUGLIBRARY      flogger.lib
 
--- a/bearermanagement/mpm/inc/mpmcommsdataccess.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmcommsdataccess.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -54,36 +54,7 @@
 enum TWlanIapType
     {
     ENotWlanIap,
-    EWlanIap,
-    EEasyWlanIap
-    };
-
-// Structure containing WLAN WEP key data
-// 
-class TWepKeyData
-    {
-public:
-    inline TWepKeyData(): 
-    iWep1(),
-    iWep2(),
-    iWep3(),
-    iWep4(),
-    iWepFormat1( 0 ),
-    iWepFormat2( 0 ),
-    iWepFormat3( 0 ),
-    iWepFormat4( 0 ),
-    iDefaultWep( EWlanDefaultWepKey1 )
-    {};
-    
-    TWlanWepKey iWep1;
-    TWlanWepKey iWep2;
-    TWlanWepKey iWep3;
-    TWlanWepKey iWep4;
-    TUint iWepFormat1;
-    TUint iWepFormat2;
-    TUint iWepFormat3;
-    TUint iWepFormat4;
-    TWlanDefaultWepKey iDefaultWep;
+    EWlanIap
     };
 
 // CLASS DECLARATION
@@ -138,14 +109,6 @@
                            CMPMServerSession&       aSession );
     
         /**
-        * Checks if given IAP is Easy WLan.
-        * @since 3.1
-        * @param aIapId IAP Id to be checked
-        * @return ETrue if IAP Id is Easy WLan, otherwise EFalse.
-        */
-        TBool CheckEasyWLanL( TUint32 aIapId ) const;
-
-        /**
         * Find all snap ids
         *
         * @since 3.2
@@ -196,47 +159,6 @@
         void CheckWLANIapL(CMPMServerSession& aSession);
 
         /**
-        * Checks whether there is a wlan iap which matches the 
-        * parameter settings.
-        *
-        * @since 3.2
-        * @param aSsid Wlan iap ssid
-        * @param aSecMode Wlan iap security mode
-        * @param aConnMode Wlan iap connection mode
-        */
-        TUint32 CheckWLANIapWithSsidL( TWlanSsid& aSsid, 
-                                       TUint32 aSecMode,
-                                       TWlanNetMode aConnMode );
-
-        /**
-        * Stores easy wlan settings into commsdat. 
-        *
-        * @since 3.2
-        * @param aSsid Wlan iap ssid, stored in used ssid field
-        * @param aSecMode Wlan iap security mode
-        * @param aConnMode Wlan iap connection mode
-        * @param aWepData WEP key data
-        * @param aEnableWpaPsk Wlan iap enable psk mode
-        * @param aWpaPsk Wlan iap wpa psk
-        * @param aWpaKeyLen Wlan iap wpa key length
-        */
-        void SetEasyWlanDataL( const TWlanSsid& aSsid,
-                               TUint            aSecMode,
-                               TWlanNetMode     aConnMode,
-                               TWepKeyData      aWepData,
-                               TUint            aEnableWpaPsk,
-                               const TDesC8&    aWpaPsk,
-                               TUint            aWpaKeyLen  );
-
-        /**
-        * Returns Easy wlan service record id.
-        * @since 3.2
-        * @param aDb DB session
-        * return Easy wlan service record id
-        */
-        TUint32 FindEasyWlanServiceIdL( CMDBSession* aDb );
-        
-        /**
         * Checks if the HiddenAgent metadata is set for this IAP.
         * @since 3.2
         * @param aIapId Given Iap Id 
@@ -291,11 +213,10 @@
                                            RArray<TNetIap>& aEmbeddedIaps );
 
         /**
-        * Checks if given IAP is WLAN and whether it is EasyWLAN IAP.
+        * Checks if given IAP is WLAN.
         * @since 3.2
         * @param aIapId IAP Id to be checked
-        * @return One of TWlanIapType values depending on 
-        * whether IAP is WLAN or Easy WLAN
+        * @return One of TWlanIapType values
         */
         TWlanIapType CheckWlanL( TUint32 aIapId ) const;
 
@@ -343,7 +264,14 @@
         */
         TBool IsInternetSnapL( TUint32 aIapId, TUint32 aSnapId );
 
-       /**
+        /**
+         * Returns true if destination is intranet.
+         * @param aSnapId Snap id
+         * @return True or false depending on destination type.
+         */
+         TBool IsIntranetSnapL( TUint32 aSnapId );
+
+        /**
         * Used to get bearer type of the iap.
         *
         * @since 5.0
@@ -351,38 +279,6 @@
         * @return Type of the bearer.
         */
         TMPMBearerType GetBearerTypeL( TUint32 aIapId );
-        
-       /**
-        * Check if all active connections are in same snap.
-        *
-        * @since 5.0
-        * @param aActiveBMConns Array of active connections.
-        * @param aSnapId Destination where connections are located is returned
-        *                to this parameter.
-        * @param aServer Handle to server class.
-        * @return ETrue if all active connections are in same snap.
-        */
-        TBool AreActiveIapsInSameSnapL ( RArray<TActiveBMConn>& aActiveBMConns,
-                                         TUint32& aSnapId,
-                                         CMPMServer& aServer );
-
-       /**
-        * Select active connection according to snap priorities.
-        *
-        * @since 5.0
-        * @param aSnapId Snap id of the connection.
-        * @param aActiveBMConns Array of active connections.
-        * @param aActiveIapId Iap id of the selected active connection.
-        * @param aActiveSnapId Snap id of the selected active connection.
-        * @param aActiveBearerType Bearer type of the selected active connection.
-        * @param aSession Handle to session class.
-        */
-        void SelectActiveConnectionL ( const TUint32 aSnapId,
-                                       RArray<TActiveBMConn>& aActiveBMConns,
-                                       TUint32& aActiveIapId,
-                                       TUint32& aActiveSnapId,
-                                       TMPMBearerType& aActiveBearerType,
-                                       CMPMServerSession& aSession );
 
        /**
         * Check if snap is empty.
@@ -469,6 +365,14 @@
         * @return Snap id.
         */
         TUint32 DestinationIdL( CMManager::TSnapPurpose aSnapPurpose );
+        
+        /**
+        * Returns the default connection values
+        * @since symbian^4
+        * @param aType The type of the id
+        * @param aId The id of the snap or the iap
+        */
+        void GetDefaultConnectionL( TCmDefConnType& aType, TUint32& aId );
         	
         /**
         * Finds the real IAP behind the virtual IAP.
@@ -523,30 +427,6 @@
         CCDRecordBase* LoadLinkedRecordL( CMDBSession&  aSession, 
                                           TMDBElementId aElementId );
 
-        /**
-         * Sets WEP key data for WLAN service record
-         * @since 9.1
-         * @param aFormatId Id of the field where WEP format is stored
-         * @param aKeyId Id of the field where WEP key is stored
-         * @param aWepData WEP key value
-         * @param aWepFormat WEP key format value
-         * @param aRecord WLAN service record where data is stored
-         */        
-       void SetWepKeyL( TMDBElementId       aFormatId,
-                        TMDBElementId       aKeyId, 
-                        TWlanWepKey         aWepData,
-                        TUint               aWepFormat,
-                        CMDBGenericRecord*  aRecord );
-        
-       /**
-        * Converts ascii data to hex
-        * @since 3.2
-        * @param aSource Ascii data
-        * @param aDest hex data to be filled in
-        */        
-        void ConvertAsciiToHex( const TDesC8& aSource, 
-				                HBufC8*      aDest );
-
        /**
         * Returns true if destination is internet.
         * @since 5.1
@@ -574,15 +454,6 @@
         * @param aWlanArray Array of wlan bearers
         */
         void BuildWlanArrayL(CMDBSession& aDb, RArray<TUint32>& aWlanArray);
-        
-       /**
-        * Get snap id for the iap
-        * 
-        * @since 5.0
-        * @param aIapId Id of the iap
-        * @return Id of the snap
-        */
-        TUint32 GetSnapIdL( TUint32 aIapId );
 
         /**
         * C++ default constructor.
--- a/bearermanagement/mpm/inc/mpmconnmonevents.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmconnmonevents.h	Tue Aug 31 15:35:44 2010 +0300
@@ -293,6 +293,13 @@
         inline TBool DiscardAvailabilityNotification(); 
         
         /**
+        * Returns the setting whether IAP availability notification has been discarded by MPM.
+        * @since 3.2
+        * @return ETrue if availability notifications have been discarded. 
+        */
+        inline TBool AvailabilityNotificationDiscarded();
+        
+        /**
          * Creates preferred carrier available notification when needed.
          * @since 5.1
          * @param aCaller Identifies the calling context
@@ -343,6 +350,9 @@
         // until MPM initiated WLAN scan request has completed. 
         TBool iDiscardAvailabilityNotification;
 
+        // ConnMon's IAP availability event has been discarded.
+        TBool iAvailabilityNotificationDiscarded;
+
 #ifdef _DEBUG 
         TBool iFilterEvents; // by default off. (CBase)
     public:
@@ -378,6 +388,15 @@
     return iDiscardAvailabilityNotification;
     }
 
+// -----------------------------------------------------------------------------
+// CMPMConnMonEvents::AvailabilityNotificationDiscarded
+// -----------------------------------------------------------------------------
+//
+inline TBool CMPMConnMonEvents::AvailabilityNotificationDiscarded()
+    {
+    return iAvailabilityNotificationDiscarded;
+    }
+
 #endif // MPMCONNMONEVENTS_H
 
 // End of file
--- a/bearermanagement/mpm/inc/mpmdefaultconnection.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +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: Handles logic of selecting default connection, 
-*              stores selected default connection when necessary.
-*
-*/
-
-#ifndef C_DEFAULTCONNECTION_H
-#define C_DEFAULTCONNECTION_H
-
-#include <e32base.h>
-#include <cmdefconnvalues.h>
-
-const TCmDefConnType KDefaultMode = ECmDefConnAlwaysAsk;
-const TUint32 KDefaultConnectionId = 0;
-
-class CMPMServer;
-/**
- *  Class handling default connection
- *  The class handles logic of selecting default connection
- *  based on the registered Default connections, user selection 
- *  stored in CommsDat and values queried from user.
- *
- *  The default connection can be queried from the class by 
- *  MPM Server session starting a connection. Following 
- *  example describes the behaviour expected from the session.
- *
- *  @code
- *  TCmDefConnType mode(0);
- *  TUint id(0);
- *  iMyServer.DefaultConnection().GetDefaultConnection( mode, id );
- *  if( mode == ECmDefConnAlwaysAsk )
- *      {
- *      //implicit connection start
- *      }
- *  else if (mode == ECmDefConnAskOnce)
- *      {
- *      if( id == 0 )
- *          {
- *          // Implicit connection start
- *          //
- *          // User selection must be registered by the session 
- *          // with call:
- *          MyServer().DefaultConnection().
- *                 SetAskOnceDefaultConnection( aId );
- *
- *          // When BM connection is added under the MPM server object
- *          // the parameter aUsingAskOnce must be set to ETrue in call
- *          MyServer().CMAppendBMConnection( connId, snap, iapId, 
- *                                           state, ETrue );
- *          }
- *      else  
- *          {
- *          // Explicit connection start using SNAP or IAP from
- *          // parameters.    
- *          //
- *          // When BM connection is added under the MPM server object
- *          // the parameter aUsingAskOnce must be set to ETrue in call
- *          MyServer().CMAppendBMConnection( connId, snap, iapId, 
- *                                           state, ETrue );
- *          }
- *      }
- *      else // snap or iap
- *          {
- *          // Explicit connection start using SNAP or IAP from
- *          //parameters
- *          }
- *      } 
- *  @endcode
- *
- *  @lib mpmserver.exe
- *  @since S60 v3.2
- */
-class CMPMDefaultConnection : public CBase
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     * @param aServer Reference to MPM Server
-     */
-    static CMPMDefaultConnection* NewL( const CMPMServer* aServer );
-    
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMPMDefaultConnection();
-
-    /**
-     * Sets IAP to be used as default connection
-     *
-     * @since S60 v3.2
-     * @param aIapId The IAP to be set as default connection
-     * return KErrNone if succesful, KErrArgument if id was not accepted
-     */
-    TInt SetDefaultIAP( TInt aIapId );
-
-    /**
-     * Clear IAP from being used as default connection,
-     * if one is set
-     *
-     * @since S60 v3.2
-     */
-    void ClearDefaultIAP();
-
-    /**
-     * Get the current default connection value 
-     *
-     * @since S60 v3.2
-     * @param aMode Points to snap or specific iap.
-     * @param aConnection CommsDat elementId of the IAP or SNAP to be used. 
-     * 0 if not defined.
-     *
-     */
-    void GetDefaultConnectionL( TCmDefConnType& aMode, 
-                                TUint32& aConnection );
-    
-private:
-
-    /**
-     * Converts int value to TCmDefaultConnection
-     * Leaves with KErrArgument is value no in the range
-     *
-     * @since S60 v3.2
-     * @param aInt Int value
-     * @return TCmDefConn value
-     */    
-    TCmDefConnType IntToCmDefConnTypeL( const TUint& aInt );
-
-    /**
-     * Reads default connection setting from commsdat.
-     * If no entry is found default values are returned.
-     *
-     * @since S60 v3.2
-     * @param aType Default connection setting type
-     * @param aId Default connection id
-     */    
-    void ReadDefConnSettingL( TCmDefConnType& aType,
-                              TUint32&          aId );
-    /**
-     * C++ default constructor.
-     */
-    CMPMDefaultConnection( const CMPMServer* aServer );
-    
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    
-
-private: // data
-
-    /**
-     * CommsDat element id of IAP registered by Wlan active idle plugin, 
-     * 0 if not defined
-     */
-    TUint32 iDefaultIapId;
-
-    /**
-     * Pointer to the MPM Server object
-     * Not own
-     */
-    const CMPMServer* iServer;
-
-    };
-
-#endif // CMPMDEFAULTCONNECTION
--- a/bearermanagement/mpm/inc/mpmdefaultconnserver.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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: Server allows registering IAP to be used as default connection
-*
-*/
-
-#ifndef CMPMDEFAULTCONNSERVER_H
-#define CMPMDEFAULTCONNSERVER_H
-
-#include <e32base.h>
-
-#include "mpmserver.h"
-
-class CMPMServer;
-
-/**
- *  Server allows registering IAP to be used as default connection.
- *  Server allows WLAN Active Idle plug-in to register the started 
- *  WLAN IAP as default connection. Only one client is served at the time.
- *
- *
- *  @lib MPMServer.exe
- *  @since S60 v3.2
- */
-class CMPMDefaultConnServer : public CPolicyServer
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     */
-    static CMPMDefaultConnServer* NewL( CMPMServer* aMPMServer );
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMPMDefaultConnServer();
-
-    /**
-     * Creates new session
-     *
-     * @since S60 v3.2
-     * @return MPMServer object
-     */
-    CMPMServer* MPMServer();
-
-// from base class CServer2
-
-
-    /**
-     * From CServer2
-     * Creates new session
-     *
-     * @since S60 v3.2
-     * @param aVersion Version information
-     * @param aMessage Message, not used here
-     */
-    CSession2* NewSessionL( const TVersion& aVersion,
-                            const RMessage2& aMessage) const;
-
-private:
-
-    CMPMDefaultConnServer( CMPMServer* aMPMServer );
-
-    void ConstructL();
-
-
-private: // data
-
-    /**
-     * Reference to MPM Server for storing the default IAP. 
-     * Not own.
-     */
-    CMPMServer* iMPMServer;
-
-    };
-
-#endif // CMPMDEFAULTCONNSERVER_H
--- a/bearermanagement/mpm/inc/mpmdefaultconnserversession.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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: Session to MPM Default Connection server
-*
-*/
-
-#ifndef CMPMDEFAULTCONNSERVERSESSION_H
-#define CMPMDEFAULTCONNSERVERSESSION_H
-
-#include <e32base.h>
-#include "mpmdefaultconnserver.h"
-
-
-/**
- *  Session to MPM Default Connection server
- *
- *  @lib MPMServer.exe
- *  @since S60 v3.2
- */
-class CMPMDefaultConnServerSession : public CSession2
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     */
-    static CMPMDefaultConnServerSession* NewL( CMPMDefaultConnServer* aServer );
-    
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMPMDefaultConnServerSession();
-
-   /**
-     * Returns the default connection server object
-     *
-     * @since S60 v3.2
-     * @return Default Connection server pointer
-     */
-     CMPMDefaultConnServer* DefaultConnServer();
-
-
-// from base class CSession2
-
-      /**
-       * From CSession2.
-       * Serves client request
-       *
-       * @since S60 v3.2
-       * @param aMessage Message from client
-       */
-       void ServiceL( const RMessage2& aMessage );
-
-
-private:
-
-    CMPMDefaultConnServerSession( CMPMDefaultConnServer* aServer );
-
-    void ConstructL();
-    
-    /**
-     * Store IAP to be used as default connection in MPM Server
-     *
-     * @since S60 v3.2
-     * @param aMessage Client message containing the IAP
-     */
-    void SetDefaultIAP( const RMessage2& aMessage );
-
-    /**
-     * Clear IAP from being used as default connection in MPM Server
-     *
-     * @since S60 v3.2
-     */
-    void ClearDefaultIAP( const RMessage2& aMessage );
-
-
-private: // data
-
-    
-    /**
-     * Poiter to DefaultConnServer object. Not own
-     */
-    CMPMDefaultConnServer* iDefaultConnServer;
-
-    };
-
-#endif // CMPMDEFAULTCONNSERVERSESSION_H
--- a/bearermanagement/mpm/inc/mpmdialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: MPM class used for agent dialog initiation
-*
-*/
-
-/**
-@file mpmdialog.h
-Mobility Policy Manager agent dialog initiation class.
-*/
-
-#ifndef MPMDIALOG_H
-#define MPMDIALOG_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <agentdialog.h>
-
-#include "mpmiapselection.h"
-#include "mpmdialogbase.h" 
-
-// CLASS DECLARATION
-/**
-*  MPM dialog initiation class definition.
-*
-*  @lib MPMServer.exe
-*  @since 3.0
-*/
-class CMPMDialog : protected CMPMDialogBase
-    {    
-public:
-
-    /**
-     * Two-phased constructor.
-     * @param aCommDbConnPref Connection preferences
-     */
-    static CMPMDialog* NewL( CMPMIapSelection&          aIapSelection,
-                             const RAvailableIAPList&   aIAPList,
-                             TUint32                    aBearerSet,
-                             CArrayPtrFlat<CMPMDialog>& aQueue,
-                             CMPMServer&                aServer );
-
-    /**
-     * Destructor.
-     */
-    virtual ~CMPMDialog();
-
-    /**
-     * Write sort snap information to publish and subscribe.
-     * 
-     * Publish and subscribe is used as there is otherwise circular 
-     * reference between MPM and connection dialogs which causes 
-     * @since 3.2 
-     */
-    void PublishSortSnapInfoL();
-
-protected: // Functions from base classes
-    /**
-     * Called from the Base class implementation 
-     * when dialog is started. In the current
-     * call stack it's possible to query aDlg for 
-     * more information and after that pointer is 
-     * invalid.
-     */
-    virtual void Start( CMPMDialogBase* aDlg = NULL );
-
-    
-    /**
-     * From CActive. Cancels UI dialog.
-     * @since 3.0
-     */        
-    void DoCancel();
-
-    /**
-     * From CActive. Run when UI dialog finished.
-     * @since 3.0
-     */               
-    void RunL();
-
-    /**
-     * From CActive. Run if RunL leaves.
-     * @since 3.0
-     * @param aError Error that caused leave.
-     * @return KErrNone
-     */
-    TInt RunError( TInt aError );
-
-private: // New methods
-    /**
-     * Initiates a UI dialog towards Agent Dialog Server.
-     * @since 3.0
-     */
-    void InitSelectConnection();
-
-    /**
-     * C++ default constructor.
-     * @param aCommDbConnPref Connection preferences
-     */
-    CMPMDialog( CMPMIapSelection&           aIapSelection,
-                TUint32                     aBearerSet,
-                CArrayPtrFlat<CMPMDialog>&  aQueue,
-                CMPMServer&                 aServer );
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL( const RAvailableIAPList& aIAPList );
-
-    /**
-     * Copies aOrigin to aCopy. 
-     * @since 3.2 
-     * @param aOrigin Original RAvailableIAPList.
-     * @param aCopy Copy RAvailableIAPList.
-     * @return KErrNone if successful, otherwise one of the 
-     * system-wide error codes.
-     */
-    TInt CopyArray( const RAvailableIAPList& aOrigin, 
-                    RAvailableIAPList&       aCopy );
-
-    /**
-     * Clean sort snap information from publish and subscribe.
-     * 
-     * @since 3.2 
-     */
-    void CleanSortSnapInfo();
-
-private: // Data
-    // Agent Dialog server
-    RGenConAgentDialogServer    iDlgServ;
-
-    // Iap selection object reference
-    CMPMIapSelection&           iIapSelection;
-
-    // SNAP or IAP id
-    TUint32                     iSnapOrIAPId;
-
-    // Bearer set as a combination of
-    // TExtendedConnPref::TExtendedConnBearer values.
-    TUint32                     iBearerSet;
-
-    // Handle to server class
-    CMPMServer&                 iServer;
-
-    RAvailableIAPList           iIAPList;
-    };
-
-
-#endif // MPMDIALOG_H
-
-// End of file
--- a/bearermanagement/mpm/inc/mpmdisconnectdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: MPM class used for disconnect dialog initiation
-*
-*/
-
-/**
-@file mpmdisconnectdlg.h
-Mobility Policy Manager disconnect dialog initiation class.
-*/
-
-#ifndef MPMDISCONNECTDLG_H
-#define MPMDISCONNECTDLG_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <DisconnectDlgClient.h>
-#include "mpmserversession.h"
-#include "mpmdialogbase.h"
-
-// CLASS DECLARATION
-/**
-*  MPM disconnect dialog initiation class definition.
-*
-*  @lib MPMServer.exe
-*  @since 3.1
-*/
-class CMPMDisconnectDlg : protected CMPMDialogBase
-    {
-    public:    // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        */
-        static CMPMDisconnectDlg* NewL(
-		    CMPMServerSession&                aSession,
-            TInt                              aOrigError,
-            CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CMPMDisconnectDlg();
-
-    protected: // New functions
-
-        /**
-         * Start Dlg.
-         * @param aDlg previous same type of dlg in case its response could
-		 *             be utilized.
-         */
-        virtual void Start( CMPMDialogBase* aDlg );
-
-        /**
-        * User selected Ok in Disconnect Dialog.
-        * @since 3.2
-        * @param aError Error code from dialog
-        * @param aIapId Id of the Iap from terminated connection
-        */
-        void UserSelectedOk( TInt aError );
-
-        /**
-        * User selected Cancel in Disconnect Dialog.
-        * @since 3.2
-        * @param aError Error code from dialog
-        */
-        void UserSelectedCancel( TInt aError );
-
-    protected: // Functions from base classes
-
-        /**
-        * From CActive. Cancels UI dialog.
-        * @since 3.1
-        */        
-        void DoCancel();
-
-        /**
-        * From CActive. Run when UI dialog finished.
-        * @since 3.1
-        */               
-        void RunL();
-
-        /**
-        * From CActive. Run if RunL leaves.
-        * @since 3.1
-        * @param aError Error that caused leave.
-        * @return KErrNone
-        */
-        TInt RunError (TInt aError);
-
-    private: // New methods
-
-        /**
-        * C++ default constructor.
-        */
-        CMPMDisconnectDlg(
-		    CMPMServerSession&                aSession,
-            TInt                              aOrigError,
-            CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue );
-
-        /**
-        * 2nd phase constructor.
-        */
-        void ConstructL();
-    protected:
-        TInt        iUserStatus;
-        TInt        iUserIap;
-        
-    private: // Data
-        // Disconnect Dialog Server
-        RDisconnectDlgServer        iDlgServ;
-
-        // Session object reference
-        CMPMServerSession&          iSession;
-
-        // IAP of the closed connection
-        TUint32                     iIapId;
-
-        // Original error code reported by Bearer Manager
-        TInt                        iOrigError;
-    };
-
-
-#endif // MPMDISCONNECTDLG_H
-
-// End of file
--- a/bearermanagement/mpm/inc/mpmiapselection.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmiapselection.h	Tue Aug 31 15:35:44 2010 +0300
@@ -23,8 +23,6 @@
 #include "mpmserversession.h"
 #include "mpmcommsdataccess.h"
 
-class CMPMDialog;
-class CMPMWlanQueryDialog;
 class CMPMConfirmDlgStarting;
 class TMpmConnPref;
 
@@ -66,7 +64,8 @@
      * Two-phased constructor.
      */
     static CMPMIapSelection* NewL( CMPMCommsDatAccess*  aCommsDatAccess,
-                                   CMPMServerSession*   aSession );
+                                   CMPMServerSession*   aSession,
+                                   CConnectionUiUtilities* aConnUiUtils );
     
     /**
      * Destructor.
@@ -89,26 +88,15 @@
      */
     void ExplicitConnectionL();
 
-    /**
-     * Updates connection dialog contents if 
-     * the dilog is shown
-     *
-     * @since S60 v3.2
-     */
-    void UpdateConnectionDialogL();
-
 public:
     /**
-     * Starts Wlan query if Iap is wlan iap.
+     * Returns true if given iap is a wlan iap.
      *
      * @param aIapId Id of Iap
-     * @param aIsRoaming True if wlan query is for roaming
-     * @return ETrue if wlan query was started
-     * @since S60 v3.2
+     * @return ETrue if iap aIap is wlan
+     * @since symbian^4
      */
-    TBool StartWlanQueryIfNeededL(
-        TUint32 aIapId,
-        TBool aIsRoaming = EFalse );
+    TBool IsIapWlanL( TUint32 aIapId );
 
     /**
      * Part of selecting best IAP at connection start. Called when WLAN scan
@@ -131,18 +119,6 @@
     void ChooseIapComplete( TInt aError, const TMpmConnPref* aPolicyPref );
 
     /**
-     * Callback function used after Wlan network has been selected. 
-     * Uses HandleUserIapSelectionL to complete IAP selection.
-     *
-     * @since 3.2
-     * @param aError Error code from selection
-     * @param aIapId Element id of IAP record if different than reported before. 
-     * May be 0, when error occurred in selection or when no new Iap id is set.
-     *
-     */
-    void UserWlanSelectionDoneL( TInt aError, TUint32 aIapId );
-
-    /**
      * Stops displaying the starting dialog.
      *
      * @since 3.2
@@ -268,7 +244,7 @@
      * @since 3.2
      */
     void ImplicitConnectionWlanNoteL();
-    
+
     /**
      * Gets current cellular data usage setting
      * @since 5.2
@@ -281,7 +257,8 @@
      * C++ default constructor.
      */
     CMPMIapSelection( CMPMCommsDatAccess*   aCommsDatAccess,
-                      CMPMServerSession*    aSession );
+                      CMPMServerSession*    aSession,
+                      CConnectionUiUtilities* aConnUiUtils );
 
     /**
      * ConstructL
@@ -302,6 +279,9 @@
     // Used for commsdat related functionalities
     CMPMCommsDatAccess* iCommsDatAccess;
 
+    // Handle to connection UI utilities
+    CConnectionUiUtilities* iConnUiUtils;
+
     // Contains state info whether PrefIapnotifs can be sent 
     // and saved IAP info structure.
     TStoredIapInfo iStoredIapInfo;
@@ -315,12 +295,6 @@
     // Pointer to Confirmation dialog.
     CMPMConfirmDlgStarting* iConfirmDlgStarting;
 
-    // Pointer to the dialog active object.
-    CMPMDialog* iDialog;
-
-    // Pointer to Wlan query dialog.
-    CMPMWlanQueryDialog* iWlanDialog;
-
     // Stores the boolean value whether next best iaps 
     // exists in explicit connection start.
     TBool iNextBestExists;
--- a/bearermanagement/mpm/inc/mpmlogger.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmlogger.h	Tue Aug 31 15:35:44 2010 +0300
@@ -138,4 +138,4 @@
 
 #endif // MPMLOGGER_H
 
-// End of File
+// End of File
\ No newline at end of file
--- a/bearermanagement/mpm/inc/mpmofflinewatcher.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Listens for offline mode changes in central repository.
-*
-*/
-
-#ifndef MPMOFFLINEWATCHER_H
-#define MPMOFFLINEWATCHER_H
-
-//  INCLUDES
-#include <e32base.h>
-
-class CRepository;
-class CMPMServer;
-
-// Stop after this many consecutive central repository errors.
-const TInt KMpmOfflineWatcherCenRepErrorThreshold = 80;
-
-/**
- *  Class for accessing central repository.
- *  Follows KCoreAppUIsNetworkConnectionAllowed key in central repository.
- *  @since 5.2
- */
-class CMpmOfflineWatcher : public CActive
-    {
-
-public:
-
-    /**
-    * New for calling the two-phased constructor.
-    */
-    static CMpmOfflineWatcher* NewL( CMPMServer* aServer );
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMpmOfflineWatcher();
-
-    /**
-     * Start to listen for events.
-     */
-    void StartL();
-    
-    /**
-    * Active object's RunL.
-    */
-    void RunL();
-
-    /**
-    * Active object's DoCancel.
-    */
-    void DoCancel();
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CMpmOfflineWatcher( CMPMServer* aServer );
-
-    /**
-    * Symbian 2nd phase constructor.
-    */
-    void ConstructL();
-    
-    /**
-    * Request for notifications.
-    */
-    TInt RequestNotifications();
-    
-    /**
-    * Get current offline mode value.
-    */
-    TInt GetCurrentOfflineValue();
-
-
-private: // data
-
-    /**
-     * Is offline feature supported.
-     */
-    TBool iOfflineFeatureSupported;
-
-    /**
-     * Central repository handle.
-     * Own.
-     */
-    CRepository* iRepository;
-
-    /**
-     * Offline mode activity value.
-     */
-    TInt iOfflineMode;     // type: TCoreAppUIsNetworkConnectionAllowed
-
-    /**
-     * Pointer to the MPM Server object.
-     * Not own.
-     */
-    CMPMServer* iServer;
-
-    /**
-     * Error counter.
-     */
-    TUint iErrorCounter;
-
-    };
-
-#endif // MPMOFFLINEWATCHER_H
--- a/bearermanagement/mpm/inc/mpmserver.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -29,17 +29,19 @@
 #include <etel.h>           // RTelServer
 #include <etelmm.h>         // RMobilePhone
 #include <etelpckt.h>       // RPacketService
+#include <ConnectionUiUtilities.h>
 
 #include "mpmcommon.h"
 #include "rmpm.h"
 #include "mpmroamingwatcher.h"
 #include "mpmdatausagewatcher.h"
+#include "mpmvpntogglewatcher.h"
 
 
 class CMPMCommsDatAccess;
 class CMpmCsIdWatcher;
 class CMpmDataUsageWatcher;
-class CMpmOfflineWatcher;
+class CMpmVpnToggleWatcher;
 
 // CONSTANTS
 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" );
@@ -49,12 +51,8 @@
 //
 const TInt    KPhoneRetryTimeout = 100000;
 
-const TUint32 KMaxOpenTransAttempts = 5;
-const TUint32 KRetryAfter = 200000;
-
-// The granularity with which iDisconnectQueue will allocate memory chunks. 
-// If set to two there will be space for two instances of CMPMDisconnectDlg
-// before new memory will be allocated.
+// The granularity with which roaming and starting dialogs will allocate memory chunks. 
+// If set to two there will be space for two instances before new memory will be allocated.
 const TInt    KGranularity       = 2;
 
 // Security policy definitions
@@ -65,10 +63,6 @@
 // roaming to connected wlan wait interval
 // in micro seconds (10 sec)
 const TInt KRoamingToWlanUpdateInterval = 10000000; 
-
-// roaming to connected hotspot wlan wait interval
-// in micro seconds (120 sec)                    
-const TInt KRoamingToHotspotWlanUpdateInterval = 120000000; 
  
 //Definition of the ranges of IPC numbers
 const TInt KMPMPolicyRanges[KMPMPolicyRangeCount] = 
@@ -194,12 +188,9 @@
 class CMPMConnMonEvents;
 class CMPMServerSession;
 class CMPMDtmWatcher;
-class CMPMDisconnectDlg;
 class CMPMConfirmDlgRoaming;
 class CMPMConfirmDlgStarting;
 class CMPMDefaultConnection;
-class CMPMWlanQueryDialog;
-class CMPMDialog;
 class CMPMConnPermQueryTimer;
 
 // CLASS DECLARATION
@@ -277,7 +268,8 @@
 *  @lib MPMServer.exe
 *  @since 3.0
 */
-class CMPMServer : public CPolicyServer
+class CMPMServer : public CPolicyServer,
+                   public MMpmVpnToggleWatcherNotify
     {
     public: // Constructors and destructor
 
@@ -361,21 +353,18 @@
                                  TConnectionState&   aState );
 
         /**
-        * Checks if the connection is started for the Iap Id,
-        * returning the state.
+        * Checks if the connection is started for the Iap Id.
         * @since 3.2
         * @param aIapId IAP Id of the connection
         * @param aConnId Connection Id
-        * @return Connection State, EIdle if not found
         */
-        TConnectionState CheckUsageOfIap( const TUint32 aIapId, 
+        TBool CheckIfStarted( const TUint32 aIapId, 
                               const TConnectionId aConnId );
 
         /**
-        * Checks if any WLAN connection is started.
+        * Checks if a connection is started with wlan iap.
         * @since 3.2
         * @param aCdbAccess
-		* @return IAP ID of the started WLAN connection, zero if not found
         */
         TUint32 IsWlanConnectionStartedL( const CMPMCommsDatAccess* aCdbAccess );
         
@@ -433,7 +422,6 @@
         * preferred IAP notifications.
         * @since 3.2
         * @param aConnId Connection Id
-        * @return ETrue if registered
         */
         TBool RegisteredForBMPrefIAP( const TConnectionId aConnId );
 
@@ -472,27 +460,6 @@
                                const TPrefIAPNotifCaller aCaller );
 
         /**
-        * Update Connection dialog of each session
-        * @since 3.2
-        */
-        void UpdateSessionConnectionDlgL();
-
-        /**
-        * Completes pending messages
-        * @since 5.2
-        * @param aIapId IAP Id of the connection.
-        * @param aError Message status
-        * @param aErrorReturned Error value to be returned, NULL if no 
-        * value should be passed
-        * @param aNeededAction Needed action to be returned, NULL if no 
-        * value should be passed
-        */
-        void HandlePendingMsgs( TUint aIapId,
-                                TInt aError,
-                                TInt* aErrorReturned,
-                                TBMNeededAction* aNeededAction );
-
-        /**
         * Handling of blacklisting certain IAP and the presumed IAP for 
         * the certain connection.
         * @since 3.1
@@ -623,13 +590,6 @@
         inline TBool IsWLANScanRequired() const;
 
         /**
-        * Get the DisconnectQueue.
-        * @since 3.2
-        * @return Pointer to the DisconnectQueue.
-        */
-        inline CArrayPtrFlat<CMPMDisconnectDlg>* DisconnectQueue();
-
-        /**
         * Get the RoamingQueue.
         * @since 3.2
         * @return Pointer to the RoamingQueue.
@@ -644,48 +604,6 @@
         inline CArrayPtrFlat<CMPMConfirmDlgStarting>* StartingQueue();
 
         /**
-        * Appends aDlg to the iWlanQueryQueue.
-        * @since 3.2
-        * @param aDlg Pointer to the CMPMConfirmDlgWlanQuery object.
-        */
-        void AppendWlanQueryQueueL( CMPMWlanQueryDialog* aDlg );
-
-        /**
-        * Removes the dialog from the iWlanQueryQueue.
-        * @since 3.2
-        * @param aDlg dialog to be removed.
-        */
-        inline void RemoveFromWlanQueryQueue( CMPMWlanQueryDialog* aDlg );
-
-        /**
-        * Get the WlanQueryQueue.
-        * @since 3.2
-        * @return Pointer to the WlanQueryQueue.
-        */
-        inline CArrayPtrFlat<CMPMWlanQueryDialog>* WlanQueryQueue();
-
-        /**
-        * Get the first item in iWlanQueryQueue.
-        * @since 3.2
-        * @return Pointer to the first item in iWlanQueryQueue.
-        */
-        inline CMPMWlanQueryDialog* FirstInWlanQueryQueue();
-
-        /**
-        * Get the ConnectDialogQueue.
-        * @since 3.2
-        * @return Pointer to the CMPMDialogQueue.
-        */
-        inline CArrayPtrFlat<CMPMDialog>* ConnectDialogQueue();
-
-        /**
-        * Get the Default Connection object.
-        * @since 3.2
-        * @return Pointer to the Default Connection object.
-        */
-        CMPMDefaultConnection* DefaultConnection(); 
-
-        /**
         * Returns true if there is a started connection
         * 
         * @since 3.2
@@ -733,7 +651,6 @@
         * Returns the Commsdat access instance
         *
         * @since 3.2
-        * @return Commsdat access instance.
         */
         inline CMPMCommsDatAccess* CommsDatAccess();
 
@@ -749,21 +666,11 @@
         * Starts forced roaming sequence to connected wlan
         *
         * @param aIapInfo Info about available IAPs
-        * @return Always zero...
         * @since 5.2
         */
         static TInt StartForcedRoamingToConnectedWlanL( TAny* aUpdater );
         
         /**
-        * Starts forced roaming sequence to connected hotspot wlan
-        *
-        * @param aIapInfo Info about available IAPs
-        * @return Always zero...
-        * @since 5.2
-        */
-        static TInt StartForcedRoamingToConnectedHotspotWlanL( TAny* aUpdater );
-
-        /**
         * Starts forced roaming sequence from WLAN if necessary
         *
         * @param aIapInfo Info about available IAPs
@@ -775,7 +682,6 @@
         * Checks whether phone is in visitor network.
         *
         * @since 5.2
-		* @return ETrue if phone is in visitor network, EFalse otherwise
         */
         TBool IsVisitorNetwork() const;
         
@@ -783,11 +689,10 @@
         * Returns the RoamingWatcher pointer
         *
         * @since 5.2
-		* @return RoamingWatcher pointer
         */
         inline CMPMRoamingWatcher* RoamingWatcher() const;
 
-         /**
+        /**
         * Returns the DataUsageWatcher pointer
         *
         * @since 5.2
@@ -799,6 +704,20 @@
     public: // Functions from base classes
 
         /**
+         * From MMpmVpnToggleWatcherNotify. Sets values for VPN toggle after
+         * VPN toggle key changes in central repository.
+         * @param aVpnPreferred Informs if VPN connection is preferred
+         *                      connection
+         * @param aVpnIapId VPN IAP Id, which is used for VPN connection, when
+         *                  VPN connection is preferred                           
+         * @param aSnapId SNAP Id SNAP Id, which is used for VPN connection,
+         *                when VPN connection is preferred
+         */
+         void SetVpnToggleValuesL( const TBool aVpnPreferred,
+                                   const TUint32 aVpnIapId,
+                                   const TUint32 aSnapId );
+
+        /**
         * From CServer2. Creates a new session for a client.
         * @since 3.0
         * @param aVersion Version information
@@ -808,13 +727,9 @@
         CSession2* NewSessionL( const TVersion& aVersion,
                                 const RMessage2& aMessage) const;
 
-        /**
-		* Stops either all connections or a certain IAP
-		*
-        * @param IAP ID to be stopped, zero for all connections
-		*/
+        // Stops connection of certain IAP, zero for all connections
         void StopConnections( TInt aIapId = 0 );
-
+                
     public:
 
         /**
@@ -856,6 +771,34 @@
          * @return ETrue if user connection is in internet snap
          */
         TBool UserConnectionInInternet() const;
+
+        /**
+         * Mark that there is an active VPN user connection.
+         */
+        void AddVpnUserConnectionSession();
+        
+        /**
+         * Mark that VPN user connection is not active
+         */
+        void RemoveVpnUserConnectionSession();
+        
+        /**
+         * Informs if VPN user connection is used with given MPM preferences
+         * and application.
+         * @param aMpmConnPref MPM connection preferences.
+         * @param aAppUid Application UID
+         * @return Informs if VPN connection is preferred
+         */        
+        TBool UseVpnUserConnection( const TMpmConnPref aMpmConnPref,
+                                    const TUint32 aAppUid ) const;
+        
+        /**
+         * Prepares VPN user connection.
+         * @param aMpmConnPref Connection preferences, which are modified
+         *                     for VPN user connection (returned)
+         * @return Informs if preparation was successful.                                         
+         */
+        TBool PrepareVpnUserConnection( TMpmConnPref& aMpmConnPref );
                 
         /**
          * Handle to central repository watcher
@@ -865,41 +808,10 @@
         inline CMpmCsIdWatcher* CsIdWatcher();
 
         /**
-         * Change state of the P&S keys according to active connection.
-         * Non-leaving version. Resets variables in case error happens.
-         * @since 5.2         
-         * @param aSession Handle to session used by connection.
-        */
-        void UpdateActiveConnection( CMPMServerSession& aSession );
-        
-        /**
-        * Change state of the P&S keys according to active connection.
-        * @since 5.0
-        * @param aSession Handle to session used by connection.
-        */
-        void UpdateActiveConnectionL( CMPMServerSession& aSession );
-
-        /**
-        * Map bearer type between MPM and commsdat.
-        * @since 5.0
-        * @param aBearerType Bearer type used by MPM for active connection selection.
-        * @return Bearer type used by commsdat
-        */
-        TUint32 MapBearerType( TMPMBearerType aBearerType );
-
-        /**
-        * Writes new active connection to the P&S keys
-        * @since 5.0
-        */    
-        void PublishActiveConnection();
-        
-        /**
-        * Returns number of active iaps.
-        * @since 5.0
-        * @param aKeysUpToDate Tells whether P&S keys are valid or not.
-        * @return Number of active connections
-        */
-        TInt NumberOfActiveConnections( TBool& aKeysUpToDate );
+         * Handle to VPN toggle central repository watcher
+         * @return Pointer to watcher object.
+         */
+        inline CMpmVpnToggleWatcher* VpnToggleWatcher();
 
         /**
         * Returns server session instance that corresponds to given
@@ -913,36 +825,40 @@
         
         /**
         * Stops cellular connections, except MMS
-        * @param aSilentOnly stop only silent cellular connections
         * @since 5.2
         */
-        void StopCellularConns( TBool aSilentOnly = EFalse );
+        void StopCellularConns();
+        
+        /**
+        * Handle to connection ui utilities
+        */        
+        inline CConnectionUiUtilities* ConnUiUtils() const;
 
         /**
         * Offline mode watcher updates the mode variable stored by MPM server.
         * @since 5.2
-        * @param aNewModeValue New offline mode value
+        * @param aNewModeValue New offline mode value to be updated.
         */
         void UpdateOfflineMode( TInt aNewModeValue );
 
         /**
-        * Returns true if the phone is in offline mode.
+        * Tells if the phone is in offline mode.
         * @since 5.2
-        * @return ETrue if phone is in offline mode, EFalse otherwise.
+        * @return ETrue if phone is in offline mode.
         */
         TBool IsPhoneOffline();
 
         /**
         * Tells the "Use WLAN in offline mode" query response.
         * @since 5.2
-        * @return Response of offline mode query (Undefined if not executed)
+        * @return TOfflineWlanQueryResponse (not_responded/yes/no).
         */
         TOfflineWlanQueryResponse OfflineWlanQueryResponse();
 
         /**
         * Called when the "Use WLAN in offline mode" query has been responded.
         * @since 5.2
-        * @param aResponse Sets the Offline mode query response value.
+        * @param aResponse setting the query response value (not_responded/yes/no).
         */
         void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse);
 
@@ -995,12 +911,6 @@
                                 TBool aCheckForBestIap,
                                 TMPMBearerType aDestinationBearerType );
         
-        /**
-         * Check if iap can be disconnected, and disconnect it
-         * @since 5.2
-         * @param aIapId Iap id for checking
-         */
-        void CheckIapForDisconnect( TInt aIapId );
 
     private: // Data
         // Pointer to the ConnMonEvents object
@@ -1041,24 +951,12 @@
         // Is WLAN scan required or not before displaying Connection Dialog
         TBool iWLANScanRequired;
 
-        // Solves problem with overlapping Disconnect Dialogs
-        CArrayPtrFlat<CMPMDisconnectDlg>* iDisconnectQueue;
-
         // Solves problem with overlapping Roaming Dialogs
         CArrayPtrFlat<CMPMConfirmDlgRoaming>* iRoamingQueue;
 
         // Solves problem with overlapping Starting Dialogs
         CArrayPtrFlat<CMPMConfirmDlgStarting>* iStartingQueue;
 
-        // Solves problem with overlapping Wlan Queries
-        CArrayPtrFlat<CMPMWlanQueryDialog>* iWlanQueryQueue;
-
-        // Solves problem with overlapping Connection Dialogs
-        CArrayPtrFlat<CMPMDialog>* iConnectDialogQueue;
-        
-        // Handles Default Connection selection
-        CMPMDefaultConnection* iDefaultConnection;
-
         // Keeps track of the number of connections
         TUint iConnectionCounter;
 
@@ -1071,6 +969,10 @@
         // Set when user connection in internet snap
         TBool iUserConnectionInInternet;
         
+        // Count of sessions using VPN user connection
+        //
+        TInt iVpnUserConnectionSessionCount;        
+        
         /**
          * Handle to central repository watcher
          * Own.
@@ -1078,29 +980,25 @@
         CMpmCsIdWatcher* iMpmCsIdWatcher;
 
         /**
-         * Handle to central repository watcher
+         * Handle to VPN toggle central repository watcher.
+         * Own.
          */
-        CMpmDataUsageWatcher* iMpmDataUsageWatcher;
+        CMpmVpnToggleWatcher* iMpmVpnToggleWatcher;
 
         /**
          * Handle to central repository watcher
          */
-        CMpmOfflineWatcher* iMpmOfflineWatcher;
-
-        // Iap id of the active connection
-        TUint32 iActiveIapId;
-        
-        // Snap id of the active connection
-        TUint32 iActiveSnapId;
-
-        // Bearer type of the active connection
-        TMPMBearerType iActiveBearerType;
+        CMpmDataUsageWatcher* iMpmDataUsageWatcher;
 
         // Dedicated clients
         RArray<TUint32> iDedicatedClients;
 
         // Used for commsdat related functionalities
         CMPMCommsDatAccess* iCommsDatAccess;
+
+        // Handle to connection UI utilities
+        //
+        CConnectionUiUtilities* iConnUiUtils;
         
         // Offline mode.
         TInt iOfflineMode;
@@ -1110,10 +1008,7 @@
         
         // Timer to start roaming to connected WLAN network 
         CPeriodic* iRoamingToWlanPeriodic;
-        
-        // Timer to start roaming to connected WLAN network 
-        CPeriodic* iRoamingToHotspotWlanPeriodic;
-        
+
         // TConnMonIapInfo Info about available IAPs
         TConnMonIapInfo iConnMonIapInfo;
         
--- a/bearermanagement/mpm/inc/mpmserver.inl	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -72,15 +72,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::DisconnectQueue
-// -----------------------------------------------------------------------------
-//
-inline CArrayPtrFlat<CMPMDisconnectDlg>* CMPMServer::DisconnectQueue()
-    {
-    return iDisconnectQueue;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServer::RoamingQueue
 // -----------------------------------------------------------------------------
 //
@@ -99,52 +90,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::RemoveFromWlanQueryQueue
-// -----------------------------------------------------------------------------
-//
-inline void CMPMServer::RemoveFromWlanQueryQueue( CMPMWlanQueryDialog* aDlg )
-    {
-    for ( TInt i = 0; i < iWlanQueryQueue->Count(); i++ )
-        {
-        if ( iWlanQueryQueue->At( i ) == aDlg )
-            {
-            iWlanQueryQueue->Delete( i );
-            break;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::WlanQueryQueue
-// -----------------------------------------------------------------------------
-//
-inline CArrayPtrFlat<CMPMWlanQueryDialog>* CMPMServer::WlanQueryQueue()
-    {
-    return iWlanQueryQueue;
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::FirstInWlanQueryQueue
-// -----------------------------------------------------------------------------
-//
-inline CMPMWlanQueryDialog* CMPMServer::FirstInWlanQueryQueue()
-    {
-    if ( iWlanQueryQueue->Count() == 0 )
-        return NULL;
-    else
-        return iWlanQueryQueue->At( 0 );
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::ConnectDialogQueue
-// -----------------------------------------------------------------------------
-//
-inline CArrayPtrFlat<CMPMDialog>* CMPMServer::ConnectDialogQueue()
-    {
-    return iConnectDialogQueue;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServer::IncrementConnections
 // -----------------------------------------------------------------------------
 //
@@ -241,6 +186,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMPMServer::VpnToggleWatcher
+// -----------------------------------------------------------------------------
+//
+inline CMpmVpnToggleWatcher* CMPMServer::VpnToggleWatcher()
+    {
+    return iMpmVpnToggleWatcher;
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMServer::DedicatedClients
 // -----------------------------------------------------------------------------
 //
@@ -262,12 +216,21 @@
 // CMPMServer::RoamingWatcher()
 // -----------------------------------------------------------------------------
 //
-CMPMRoamingWatcher* CMPMServer::RoamingWatcher() const
+inline CMPMRoamingWatcher* CMPMServer::RoamingWatcher() const
     {
     return iRoamingWatcher;
     }
 
 // -----------------------------------------------------------------------------
+// CMPMServer::ConnUiUtils()
+// -----------------------------------------------------------------------------
+//
+inline CConnectionUiUtilities* CMPMServer::ConnUiUtils() const
+    {
+    return iConnUiUtils;
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMServer::DataUsageWatcher()
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/inc/mpmserversession.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserversession.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -28,7 +28,7 @@
 #include <commdbconnpref.h> // for TCommDbConnPref
 #include <connpref.h>       // for TConnPref
 #include <rconnmon.h>       // for TConnMonIapInfo
-#include <ConnectionUiUtilities.h> //TMsgQueryLinkedResults
+#include <ConnectionUiUtilities.h>
 #include "rmpm.h"
 #include "mpmserver.h"
 
@@ -53,7 +53,6 @@
 _LIT( KIapProxyServiceSetting, "IAP\\IAPService" );
 
 // FORWARD DECLARATIONS
-class CMPMDisconnectDlg;
 class CMPMConfirmDlgRoaming;
 class CMPMCommsDatAccess;
 class CMPMIapSelection;
@@ -321,13 +320,6 @@
         void SortSnapL( const TUint32   aSnapId, 
                         TMpmSnapBuffer& aSortedIaps );
 
-        /**
-        * If session is displaying connection selection dialog
-        * updated contents for it are written to publish& subscribe API.
-        *
-        * @since 3.2
-        */
-        void UpdateConnectionDialogL();
 
         /**
         * Returns a reference to iStoredIapInfo. 
@@ -421,6 +413,18 @@
         TBool UseUserConnPref();
         
         /**
+         * Returns VPN user connection usage status.
+         * @return ETrue if VPN user connection is used in this session.
+         */
+        inline TBool VpnUserConnectionUsed() const;
+
+        /**
+         * Sets VPN user connection usage status.
+         * @param aEnabled Informs if VPN user connection is used.
+         */
+        void SetVpnUserConnectionUsed( const TBool aEnabled );
+        
+        /**
         * Returns id of the client.
         *
         * @since 5.0
@@ -599,7 +603,7 @@
         * @param aMessage message from client
         */
         void HandleServerProcessErrorL(const RMessage2& aMessage);
-
+        
         /**
         * Handling of prefered IAP notification registration.
         * @since 3.1
@@ -829,7 +833,7 @@
         * @param aUid Application Uid
         */
         TBool IsBackgroundApplication( TUint32 aUid ) const;
-
+        
         /**
         * Checks if disconnect dialog should be displayed for this error
         * @since 3.2
@@ -881,9 +885,6 @@
         // Server class reference
         CMPMServer& iMyServer;
 
-        // Pointer to the disconnect dialog active object
-        CMPMDisconnectDlg* iDisconnectDlg;
-
         // Pointer to the roaming confirmation dialog active object
         CMPMConfirmDlgRoaming* iConfirmDlgRoaming;
 
@@ -937,27 +938,26 @@
         //    
         CMPMIapSelection* iIapSelection;
 
-		// Stored state of migrating to carrier
-		// 
-		TMigrateToCarrierState iMigrateState;
+        // Stored state of migrating to carrier
+        // 
+        TMigrateToCarrierState iMigrateState;
 
-		// Last Iap notified using PreferredIap-notification
-		//
-		TUint32 iLastNotifiedIap;
-		
-		// Iap to which connection is migrating
+        // Last Iap notified using PreferredIap-notification
+        //
+        TUint32 iLastNotifiedIap;
+    
+        // Iap to which connection is migrating
         //
         TUint32 iMigrateIap;
 
         // Set when this session is user connection
-		//
+        //
         TBool iUserConnection;
-        
-        // Set when disconnect dialog is shown to avoid 
-        // showing duplicate cellulara data usage dialog
+
+        // Set when this session uses VPN user connection
         //
-        TBool iDisconnectDialogShown;
-        
+        TBool iVpnUserConnectionUsed;        
+
         // Set when error discreet popup shown for IAP so it is
         // not shown again if the SNAP is empty
         TBool iErrorDiscreetPopupShown;
--- a/bearermanagement/mpm/inc/mpmserversession.inl	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserversession.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -16,15 +16,6 @@
 */
 
 // -----------------------------------------------------------------------------
-// CMPMServerSession::SetDisconnectDlgPtrNull
-// -----------------------------------------------------------------------------
-//
-inline void CMPMServerSession::SetDisconnectDlgPtrNull()
-    {
-    iDisconnectDlg = NULL;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServerSession::SetConfirmDlgRoamingPtrNull
 // -----------------------------------------------------------------------------
 //
@@ -89,6 +80,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMPMServerSession::VpnUserConnectionUsed
+// -----------------------------------------------------------------------------
+//
+inline TBool CMPMServerSession::VpnUserConnectionUsed() const
+    {
+    return iVpnUserConnectionUsed;
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMServerSession::AppUid
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/inc/mpmstarter.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmstarter.h	Tue Aug 31 15:35:44 2010 +0300
@@ -44,13 +44,6 @@
         static CServer2* CreateAndStartServerL();
 
         /**
-        * Creates and starts server Default connection server.
-        * @since 3.2
-        * @return Pointer to the server object.
-        */
-        static CServer2* CreateDefaultConnServerL( CMPMServer* aMPMServer );
-
-        /**
         * Gets server name.
         * @since 3.0
         * @return Descriptor of the server name.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bearermanagement/mpm/inc/mpmvpntogglewatcher.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Listen VPN toggle key changes in central repository.
+*
+*/
+
+#ifndef MPMVPNTOGGLEWATCHER_H
+#define MPMVPNTOGGLEWATCHER_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CRepository;
+
+// Stop after this many consecutive central repository errors.
+const TInt KMpmVpnToggleWatcherCenRepErrorThreshold = 80;
+
+/**
+* Class that specifies the functions for handling notify messages about
+* VPN toggle key changes in central repository.
+*/
+class MMpmVpnToggleWatcherNotify
+{
+public:
+    
+    /**
+     * Sets values for VPN toggle after VPN toggle key changes in central
+     * repository.
+     * @param aVpnPreferred Informs if VPN connection is preferred
+     *                      connection
+     * @param aVpnIapId VPN IAP Id, which is used for VPN connection, when
+     *                  VPN connection is preferred                           
+     * @param aSnapId SNAP Id SNAP Id, which is used for VPN connection,
+     *                when VPN connection is preferred
+     */
+     virtual void SetVpnToggleValuesL( const TBool aVpnPreferred,
+                                       const TUint32 aVpnIapId,
+                                       const TUint32 aSnapId ) = 0;
+};
+
+
+/**
+ *  Class for monitoring VPN toggle key changes in central repository.
+ *  Follows KMpmVpnToggleCenRepUid key in central repository.
+ */
+class CMpmVpnToggleWatcher : public CActive
+    {
+public:
+
+    /**
+    * Two-phased constructor.
+    * @param aNotify Handler for notify messages.
+    */    
+    static CMpmVpnToggleWatcher* NewL( MMpmVpnToggleWatcherNotify& aNotify );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CMpmVpnToggleWatcher();
+    
+    /**
+     * Call this when you want to start listen event.
+     */
+    void StartL();    
+        
+    /**
+     * Informs if VPN connection is preferred.
+     * @return True if VPN connection is preferred.
+     */
+    TBool IsVpnConnectionPreferred() const;
+    
+    /**
+     * Returns VPN IAP Id, which is used for VPN connection, when VPN
+     * connection is preferred.
+     * @return VPN IAP Id
+     */
+    TUint32 VpnIapId() const;
+    
+    /**
+     * Returns SNAP Id, which is used for VPN connection, when VPN
+     * connection is preferred.
+     * @return SNAP Id
+     */
+    TUint32 SnapId() const;    
+    
+    /**
+     * Resets VPN toggle values.
+     */    
+    void ResetVpnToggleValues();
+    
+private:
+
+    CMpmVpnToggleWatcher( MMpmVpnToggleWatcherNotify& aNotify );
+
+    void ConstructL();
+    
+    /**
+     * Request for notifications.
+     * @return Error value
+     */
+    TInt RequestNotifications();
+    
+    /**
+     * Gets VPN toggle values.
+     * @return Error value
+     */
+    TInt GetVpnToggleValues();
+
+// from base class CActive
+
+    void RunL();
+
+    void DoCancel();
+    
+private: // data
+    
+    /**
+     * Central repository handle
+     * Own.
+     */
+    CRepository* iRepository;    
+    
+    /**
+     * Informs if VPN connection is preferred connection
+     * Own.
+     */
+    TBool iVpnConnectionPreferred;
+    
+    /**
+     * VPN IAP Id which is used, when VPN connection is preferred
+     * Own.
+     */
+    TUint32 iVpnIapId;
+    
+    /**
+     * SNAP Id which is used, when VPN connection is preferred
+     * Own.
+     */
+    TUint32 iSnapId;
+    
+    /**
+     * Error counter.
+     */
+    TUint iErrorCounter;
+
+    /**
+     * Handler for notify messages.
+     * Not own.
+     */
+    MMpmVpnToggleWatcherNotify& iNotify;
+    
+    };
+
+#endif // MPMVPNTOGGLEWATCHER_H
--- a/bearermanagement/mpm/inc/mpmwlanquerydialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles displaying wlan related dialogs
-*
-*/
-
-
-#ifndef MPMWLANQUERYDIALOG_H
-#define MPMWLANQUERYDIALOG_H
-
-#include <e32std.h>
-#include <wdbifwlansettings.h> //for struct
-#include <ConnectionUiUtilities.h>
-#include <wifiprotuiclient.h>
-#include <wifiprotreturn.h>
-
-#include "mpmcommsdataccess.h"
-
-
-// ID of Easy Wep dialog
-const TUid KUidEasyWepDlg = { 0x101FD673 };
-
-// ID of Easy Wpa dialog
-const TUid KUidEasyWpaDlg = { 0x101FD674 };
-
-// ID of OfflineWlanNote dialog
-const TUid KUidCOfflineWlanNoteDlg = { 0x101FD671 };
-
-/**
- * This structure is copied from ConnectionUiUtilitiesCommon.h,
- * but given here a different name.
- * Defines preferences of the Wlan Network
- */
-class TMpmWlanNetworkPrefs
-    {
-public:
-    TWlanSsid                           iSsId;        ///< Ssid of Wlan network
-    TWlanConnectionMode                 iNetworkMode; ///< mode of Wlan network
-    TWlanConnectionSecurityMode         iSecMode;     ///< Security mode of Wlan network
-    TBool                               iProtectedSetupSupported; 
-                                        ///< Wlan network supports Protected Setup
-    };
-
-const TInt KEasyWepQuery256BitMaxLength = 58;
-
-class TWlanAgtWepKeyData
-    {
-public:
-    TBuf< KEasyWepQuery256BitMaxLength > iKey;
-    TBool iHex;
-    };
-
-class CMPMIapSelection;
-/**
- *  Handles displaying wlan related dialogs
- *
- *  @lib mpmserver.exe
- *  @since S60 v3.2
- */
-class CMPMWlanQueryDialog : public CActive
-    {
-
-enum TWlanQueryState
-    {
-    EOffline,
-    EWlanNetwork,
-    EWepSettings,
-    EWpaSettings, 
-    EWPS,
-    ERetrySettingsStorage
-    };
-
-public:
-
-    static CMPMWlanQueryDialog* NewL( CMPMIapSelection&  aSession,
-                                      TUint32            aSelectedWlanIap );
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMPMWlanQueryDialog();
-
-public: // Functions from base classes
-
-        /**
-        * From CActive. Cancels UI dialogs.
-        * @since 3.2
-        */        
-        void DoCancel();
-        
-        /**
-        * From CActive. Run when UI dialog finished.
-        * @since 3.2
-        */               
-        void RunL();
-        
-        /**
-        * From CActive. Run if RunL leaves.
-        * @since 3.2
-        * @param aError Error that caused leave.
-        * @return KErrNone
-        */
-        TInt RunError( TInt aError );
-
-public:
-
-        /**
-        * Starts displaying wlan dialogs if necessary
-        * @since 3.2
-        */
-        void StartWlanQueryL();
-        
-        /**
-        * Stores user defined easy wlan parameters to commsdat
-        * if easy wlan has been selected.
-        *
-        * @since 3.2
-        */
-        void StoreEasyWlanSelectionL();
-
-private:
-
-        /**
-         * Propagates wlan network selection as an initial value for the dialog,
-         * Used if there are several dialogs queued.
-         *
-         * @param aWlanIapId     Selected WLAN IAP
-         * @param aDialogStatus  Status of the dialog when destroyed.
-         * @since 3.2
-         */
-        void OfferInformation( TUint32 aWlanIapId, 
-                               TInt aDialogStatus );
-
-        CMPMWlanQueryDialog( CMPMIapSelection&  aSession,
-                             TUint32            aSelectedWlanIap );
-
-        void ConstructL();
-
-        /**
-        * Gets Easy Wlan data from member variables and stores 
-        * it to arguments
-        *
-        * @since 9.1
-        * @param aSsid Wlan iap ssid, stored in used ssid field
-        * @param aSecMode Wlan iap security mode
-        * @param aConnMode Wlan iap connection mode
-        * @param aWepKeyData Wlan iap wep key data
-        * @param aEnableWpaPsk Wlan iap enable psk mode
-        * @param aWpaPsk Wlan iap wpa psk
-        * @param aWpaKeyLen Wlan iap wpa key length
-        */
-        void GetEasyWlanDataL( TWlanSsid&    aSsid,
-                               TUint&        aSecMode,
-                               TWlanNetMode& aConnMode,
-                               TWepKeyData&  aWepKeyData, 
-                               TUint&        aEnableWpaPsk,
-                               TDes8&        aWpaPsk,
-                               TUint&        aWpaKeyLen  );
-
-        /**
-        * Maps TWlanConnectionSecurityMode to security mode stored in CommsDat
-        *
-        * @since 9.1
-        * @param aConnSecmode Security mode in TWlanConnectionSecurityMode format
-        * @param aCommsdatSecMode returned security mode value in CommsDat format
-        */
-        TInt ConnSecModeToCommsDatSecMode( TWlanConnectionSecurityMode aConnSecmode,
-                                           TUint& aCommsdatSecMode ) const;
-
-        /**
-        * Maps TWlanIapSecurityMode to security mode stored in CommsDat
-        *
-        * @since 9.1
-        * @param aConnSecmode Security mode in TWlanIapSecurityMode format
-        * @param aCommsdatSecMode returned security mode value in CommsDat format
-        */
-        TInt IapSecModeToCommsDatSecMode( TWlanIapSecurityMode aConnSecmode,
-                                          TUint& aCommsdatSecMode ) const;
-
-        /**
-        * Gets Easy Wlan data from member variables when WPS has been used 
-        * and stores it to arguments
-        *
-        * @since 9.1
-        * @param aSsid Wlan iap ssid, stored in used ssid field
-        * @param aSecMode Wlan iap security mode
-        * @param aConnMode Wlan iap connection mode
-        * @param aWepKeyData WEP key data
-        * @param aEnableWpaPsk Wlan iap enable psk mode
-        * @param aWpaPsk Wlan iap wpa psk
-        * @param aWpaKeyLen Wlan iap wpa key length
-        */
-        void GetEasyWlanDataForWpsL( TWlanSsid&    aSsid,
-                                     TUint&        aSecMode,
-                                     TWlanNetMode& aConnMode,
-                                     TWepKeyData&  aWepKeyData, 
-                                     TUint&        aEnableWpaPsk,
-                                     TDes8&        aWpaPsk,
-                                     TUint&        aWpaKeyLen  );
-
-        /**
-        * Starts WPS dialog and sets the active object active.
-        *
-        * @since 9.1
-        */
-        void StartWpsDlgL();
-
-        /**
-        * Determines whether WEP key is hex format based on the length
-        *
-        * @since 9.1
-        * @param aLength 
-        * @return ETrue if format is hex, otherwise EFalse
-        */
-        TBool IsWepFormatHexL( TInt aLength ) const;
-
-        /**
-        * Get the network preferences using ConnectionUiUtilities API.
-        *
-        * @since 5.1
-        */
-        void GetNetworkPrefs();
-
-private: // data
-
-        // Reference to iap selection object
-        CMPMIapSelection& iIapSelection;
-
-        // Stores data for offline note
-        TPckgBuf<TBool> iOfflineReply;
-        
-        // Stores data for wlan network guery
-        TPckgBuf<TMpmWlanNetworkPrefs> iNetworkPrefs;
-        
-        // Stores data for wep query
-        TPckgBuf<TWlanAgtWepKeyData> iNotifWep;
-        
-        // Stores data for wpa query
-        TPckgBuf< TBuf< KWLMMaxWpaPskLength > > iNotifWpaKey;
-
-        //Interfce to Notifier
-        RNotifier iNotifier;
-
-        //State of querying Wlan settings
-        TWlanQueryState iWlanQueryState;
-            
-        // selected wlan iap id
-        TUint32 iWlanIapId;
-            
-        // ETrue if user has selected easy wlan
-        TBool iEasyWlanSelected;
-            
-        // Flag that can be used to cancel the dialog startup based on earlier dialog
-        TInt iOverrideStatus;
-            
-        // Connection Ui Utilities pointer
-        CConnectionUiUtilities* iConnUiUtils;
-
-        // Contains WLAN settings received through WPS
-        TWlanProtectedSetupCredentialAttribute iWpsAttribute;
-
-        // WPS client pointer for displaying WPS dialogs
-        CWiFiProtUiClient* iWps;
-
-        // Contains WPS return value
-        WiFiProt::TWiFiReturn iWpsReturn;
-
-        // True if wps has been completed. 
-        TBool iWpsCompleted;
-        
-        // Retry count
-        TUint32 iRetryCount;
-        
-        // Retry timer
-        RTimer iTimer;
-    };
-
-#endif // MPMWLANQUERYDIALOG_H
--- a/bearermanagement/mpm/inc/rmpm.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/rmpm.h	Tue Aug 31 15:35:44 2010 +0300
@@ -63,71 +63,6 @@
 // Write policy
 _LIT_SECURITY_POLICY_C1( KMPMSortSnapWritePolicy, ECapabilityNetworkControl );
 
-// Definitions for Reading/Writing user connection data
-// to publish and subscribe API
-//
-// UID of the category (note that uid is the same as sort snap category)
-const TUid KMPMUserConnectionCategory = { 0x101f6d3a };
-
-// Keys for this category
-const TUint KMPMPSKeyUserConnectionSnap = 10001;
-const TUint KMPMPSKeyUserConnectionIap = 10002;
-
-// Property types
-const TInt KMPMUserConnectionSnapType = RProperty::EInt;
-const TInt KMPMUserConnectionIapType = RProperty::EInt;
-
-// Read policy, no capabilities required
-// This format is used instead of _LIT_SECURITY_POLICY_PASS, which 
-// produces pclint warnings
-_LIT_SECURITY_POLICY_C1( KMPMUserConnectionReadPolicy, ECapability_None );
-
-// Write policy
-_LIT_SECURITY_POLICY_C1( KMPMUserConnectionWritePolicy, ECapabilityNetworkControl );
-
-// Definitions for Reading/Writing active connection data 
-// to publish and subscribe API
-//
-// UID of the category
-const TUid KMPMActiveConnectionCategory = { 0x101f6d3a };
-
-// Property types
-const TInt KMPMActiveConnectionIapType = RProperty::EInt;
-const TInt KMPMActiveConnectionSnapType = RProperty::EInt;
-const TInt KMPMActiveConnectionBearerType = RProperty::EInt;
-
-// Keys for active connection category
-
-/**
- * Iap Id of the active connection.
- * If set to zero then no active connection
- */
-const TUint KMPMPSKeyActiveConnectionIap = 10003;
-
-/**
- * Snap Id of the active connection.
- * If set to zero then possible iap connection
- */
-const TUint KMPMPSKeyActiveConnectionSnap = 10004;
-
-/**
- * Possible values:
- * 0,
- * KCommDbBearerVirtual,
- * KCommDbBearerWLAN,
- * KCommDbBearerWcdma,
- * KCommDbBearerUnknown,
- */
-const TUint KMPMPSKeyActiveConnectionBearer = 10005;
-
-// Read policy, no capabilities required
-// This format is used instead of _LIT_SECURITY_POLICY_PASS, which 
-// produces pclint warnings
-_LIT_SECURITY_POLICY_C1( KMPMActiveConnectionReadPolicy, ECapability_None );
-
-// Write policy
-_LIT_SECURITY_POLICY_C1( KMPMActiveConnectionWritePolicy, ECapabilityNetworkControl );
-
 // MACROS
 _LIT( KPanicCategory, "MPM Client" );
 
@@ -182,7 +117,7 @@
     public:
         // Zero values 
         inline void Reset();    
-        inline const TInt Count() const;
+        inline TInt Count() const;
 
     public:
         TUint   iCount;
@@ -340,7 +275,7 @@
     
 public:
     enum { EConnS60PolicyPref = 0x0f }; // TConnPref has defined up to 0x07.
-    inline TPolicyConnPref::TPolicyConnPref()
+    inline TPolicyConnPref()
     : TConnPref( TPolicyConnPref::EConnS60PolicyPref )
         {
         SetIapId( 0 );
@@ -456,7 +391,7 @@
         EConnTypeExplicit
     };
     
-    inline TMpmConnPref::TMpmConnPref()
+    inline TMpmConnPref()
     : TConnPref( TMpmConnPref::EConnPrefMpm )
         {
         SetSnapPurpose( CMManager::ESnapPurposeUnknown );
--- a/bearermanagement/mpm/inc/rmpm.inl	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/inc/rmpm.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -33,7 +33,7 @@
 // TMpmSnapBuffer::Count
 // -----------------------------------------------------------------------------
 //
-inline const TInt TMpmSnapBuffer::Count() const
+inline TInt TMpmSnapBuffer::Count() const
     {
     return iCount;
     }
--- a/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -235,13 +235,6 @@
 
                 TUint32 presumedIapId = aIapId; 
 
-                // Find and change Iap and Net Id if SSID exist
-                //
-                if ( !CheckEasyWLanL( aIapId ) )
-                    {
-                    aSession.MyServer().Events()->FindSSID( ssid, aIapId, aNetId );
-                    }
-
                 // Store Iap Id, Net Id and empty APN to TConnInfo, 
                 // so that FindAPN can utilise the information 
                 // during the validation of next IAP to support 
@@ -416,125 +409,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::CheckEasyWLanL
-// -----------------------------------------------------------------------------
-//
-TBool CMPMCommsDatAccess::CheckEasyWLanL( TUint32 aIapId ) const
-    {
-    MPMLOGSTRING2( "CMPMCommsDatAccess::CheckEasyWLanL: IAP Id = %i", aIapId)
-
-    TBool easyWlan = EFalse;
-    CCommsDatabase* commsDatabase = CCommsDatabase::NewL();
-    CleanupStack::PushL( commsDatabase );
-
-    // Make hidden records visible
-    // 
-    commsDatabase->ShowHiddenRecords();
-
-    CCommsDbTableView* commsDbIapTableView = 
-        commsDatabase->OpenViewMatchingUintLC( TPtrC( IAP ),
-                                               TPtrC( COMMDB_ID ),
-                                               aIapId );
-
-    User::LeaveIfError( commsDbIapTableView->GotoFirstRecord() );
-
-    TInt length1( 0 );
-
-    commsDbIapTableView->ReadColumnLengthL( TPtrC( IAP_SERVICE_TYPE ), 
-                                            length1 );
-
-    HBufC* buf1 = HBufC::NewLC( length1 );
-    TPtr ptr1( buf1->Des() );
-
-    // Read IAP's service type
-    //
-    commsDbIapTableView->ReadTextL(TPtrC( IAP_SERVICE_TYPE ), ptr1 );
-    MPMLOGSTRING2(
-        "CMPMCommsDatAccess::CheckEasyWLanL: IAP service type = %S", &ptr1 )
-
-    if ( ptr1.Compare( TPtrC( LAN_SERVICE ) ) == KErrNone )
-        {
-        TUint32 service( 0 );
-        commsDbIapTableView->ReadUintL( TPtrC( IAP_SERVICE ), service );
-
-        // Now open a view to LAN_SERVICE table
-        //
-        CCommsDbTableView* commsDbLanTableView = 
-            commsDatabase->OpenViewMatchingUintLC( TPtrC( LAN_SERVICE ),
-                                                   TPtrC( COMMDB_ID ),
-                                                   service );
-
-        User::LeaveIfError( commsDbLanTableView->GotoFirstRecord() );
-
-        TUint32 commDbId( 0 );
-
-        commsDbLanTableView->ReadUintL( TPtrC( COMMDB_ID ), commDbId );
-
-        // Now open a view to WLAN_SERVICE table
-        //
-        // If non wlan product, wlan tables won't exist and this will 
-        // leave. In that case do not check WLAN related issues 
-        //
-        CCommsDbTableView* commsDbWlanTableView( NULL );
-        TRAPD( err2, commsDbWlanTableView =
-                     commsDatabase->OpenViewMatchingUintLC( TPtrC( WLAN_SERVICE ),
-                                                            TPtrC( WLAN_SERVICE_ID ),
-                                                            commDbId );
-                     CleanupStack::Pop( commsDbWlanTableView ) );
-        if ( err2 == KErrNone )
-            {
-            // Push back to cleanup stack. Object must be popped within 
-            // TRAP, to avoid unbalance in cleanup stack and panic 71
-            CleanupStack::PushL( commsDbWlanTableView );
-
-            TInt err = commsDbWlanTableView->GotoFirstRecord();
-
-            if ( err == KErrNone )
-                {
-                TInt ssidLength( 0 );
-                commsDbWlanTableView->ReadColumnLengthL( TPtrC( NU_WLAN_SSID ), 
-                                                                ssidLength );
-                if ( ssidLength == 0 )
-                    {
-                    MPMLOGSTRING(
-                        "CMPMCommsDatAccess::CheckEasyWLanL: IAP is Easy WLAN" )
-                    easyWlan = ETrue;
-                    }
-                else
-                    {
-                    MPMLOGSTRING(
-                        "CMPMCommsDatAccess::CheckEasyWLanL: IAP isn't Easy WLAN" )
-                    easyWlan = EFalse;
-                    }
-                }
-            else
-                {
-                MPMLOGSTRING2( "CMPMCommsDatAccess::CheckEasyWLanL\
- GotoFirstRecord returned %d", err )
-                }
-
-            // Release memory
-            //
-            CleanupStack::PopAndDestroy( commsDbWlanTableView );
-            }
-        else
-            {
-            MPMLOGSTRING2(
-                        "CMPMCommsDatAccess::CheckEasyWLanL: WLAN table view failed, err %d", err2 )
-            }    
-        CleanupStack::PopAndDestroy( commsDbLanTableView );
-        }
-
-    // Release memory
-    //
-    CleanupStack::PopAndDestroy( buf1 );
-    CleanupStack::PopAndDestroy( commsDbIapTableView );
-    CleanupStack::PopAndDestroy( commsDatabase );
-
-    return easyWlan;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMCommsDatAccess::DumpIAPsL
 // -----------------------------------------------------------------------------
 //
@@ -1034,317 +908,6 @@
     CleanupStack::PopAndDestroy( table );
     CleanupStack::PopAndDestroy( commsDatabase );
     }
-        
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::CheckWLANIapWithSsidL
-// -----------------------------------------------------------------------------
-//
-
-TUint32 CMPMCommsDatAccess::CheckWLANIapWithSsidL( TWlanSsid& aSsid, 
-                                                   TUint32 aSecMode,
-                                                   TWlanNetMode aConnMode )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::CheckWLANIapWithSsidL" )
-    TUint iapId( 0 );
-
-    // Creating a session with the latest version
-    //     
-    CMDBSession* db = CMDBSession::NewLC( KCDVersion1_1 );
-
-    db->SetAttributeMask( ECDHidden | ECDProtectedWrite );
-
-    // Find Wlan service record
-    //
-    TBuf<KWlanMaxSsidLength> ssid16;
-    CnvUtfConverter::ConvertToUnicodeFromUtf8( ssid16, aSsid );
-    MPMLOGSTRING4( "CMPMCommsDatAccess::CheckWLANIapWithSsidL sec:%d, conn:%d ssid %S", 
-                   aSecMode, 
-                   aConnMode, 
-                   &ssid16 )
-    CMDBRecordSet<CCDWlanServiceRecord>* wlanSet = 
-        new ( ELeave ) CMDBRecordSet<CCDWlanServiceRecord>( 
-         CCDWlanServiceRecord::TableIdL( *db ) );
-    CleanupStack::PushL( wlanSet ); 
-
-    CCDWlanServiceRecord* wlanRecord = new ( ELeave ) 
-        CCDWlanServiceRecord( CCDWlanServiceRecord::TableIdL( *db ) );
-
-    CleanupStack::PushL( wlanRecord ); 
-    wlanSet->LoadL( *db );
-    
-    MPMLOGSTRING2( "CMPMCommsDatAccess::CheckWLANIapWithSsidL, record count:%d", 
-                   wlanSet->iRecords.Count() )
-    TBool matchFound( EFalse );
-    for (TInt i = 0; ( i < wlanSet->iRecords.Count() ) && !matchFound; i++ )
-        {
-        wlanRecord->SetElementId( GetRealElementId( wlanSet->iRecords[i] ) );
-        wlanRecord->LoadL( *db );
-        TBuf<KWlanMaxSsidLength> ssid;
-        ssid = wlanRecord->iWLanSSID;
-        //if not easywlan, continue
-        //
-        if( ssid.Compare( KNullDesC() ) )
-            {
-            ssid = wlanRecord->iWLanSSID.GetL();
-            TUint32 secMode = wlanRecord->iWlanSecMode;
-            TUint32 connMode = wlanRecord->iWlanConnMode;
-        
-            if ( connMode )
-                {
-                connMode = 1;    
-                }
-            MPMLOGSTRING3( "CMPMCommsDatAccess::CheckWLANIapWithSsidL CommsDat secmode:%d, connmode:%d ", 
-        				   secMode, 
-        				   connMode )
-
-            if ( !ssid.Compare( ssid16 ) && ( aConnMode == connMode ) )
-        	    {
-        	    //compare sec mode
-        	    if ( aSecMode == EWlanSecModeOpen || aSecMode == EWlanSecModeWep )
-        		    {
-        		    if ( aSecMode == secMode )
-        		        {
-        		        MPMLOGSTRING( "CMPMCommsDatAccess::CheckWLANIapWithSsidL match found, open/wep " )
-        		        matchFound = ETrue;
-        		        }
-        			    
-        		    }
-            	//WPA PSK case
-            	else if ( aSecMode == EWlanSecModeWpa2 )
-            		{
-        	    	if ( ( secMode > EWlanSecModeWep ) && (wlanRecord->iWlanEnableWpaPsk) )
-        	    	    {
-        	    	    MPMLOGSTRING( "CMPMCommsDatAccess::CheckWLANIapWithSsidL match found, wpa psk " )
-        	    	    matchFound = ETrue;
-        	    	    }
-            		}
-            	//aSecMode = EWlanSecModeWpa
-            	else
-            		{
-        	    	if ( secMode > EWlanSecModeWep )
-        	    	    {
-        	    	    MPMLOGSTRING( "CMPMCommsDatAccess::CheckWLANIapWithSsidL match found, wpa " )
-        	    	    matchFound = ETrue;
-        	    	    }
-            		}
-        			
-        		}
-        	}
-        }
-    
-    if ( matchFound )
-        {
-        // load Iap record
-        //
-        CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*> ( 
-            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
-        CleanupStack::PushL( iapRecord );
-
-        CCDLANServiceRecord* lanRecord = static_cast<CCDLANServiceRecord*> (
-            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ));
-        CleanupStack::PushL( lanRecord );
-        
-        iapRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
-        
-        lanRecord->SetRecordId( wlanRecord->iWlanServiceId );
-        lanRecord->LoadL( *db );
-
-        iapRecord->iService = lanRecord->ElementId();
-
-/*        iapRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
-        iapRecord->iService = wlanRecord->iWlanServiceId;
-*/
-        if( iapRecord->FindL( *db ) )
-            {
-            MPMLOGSTRING( "CMPMCommsDatAccess::CheckWLANIapWithSsidL iap found" )
-            // Iap record found
-            //
-            iapId = iapRecord->RecordId();
-            }
-        CleanupStack::PopAndDestroy( lanRecord );
-        CleanupStack::PopAndDestroy( iapRecord );
-        }
-    CleanupStack::PopAndDestroy( wlanRecord );
-    CleanupStack::PopAndDestroy( wlanSet );
-    CleanupStack::PopAndDestroy( db );
-    
-    return iapId;
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::SetEasyWlanDataL
-// -----------------------------------------------------------------------------
-//
-void CMPMCommsDatAccess::SetEasyWlanDataL( const TWlanSsid& aSsid,
-                                           TUint            aSecMode,
-                                           TWlanNetMode     aConnMode,
-                                           TWepKeyData      aWepData,
-                                           TUint            aEnableWpaPsk,
-                                           const TDesC8&    aWpaPsk,
-                                           TUint            aWpaKeyLen )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::SetEasyWlanDataL" )
-    CMDBSession* dbSession = CMDBSession::NewL( KCDVersion1_1 );
-    CleanupStack::PushL(dbSession);
-
-    // Try to open a transaction to obtain write lock
-    dbSession->OpenTransactionL();
-
-    TUint32 wlanId = FindEasyWlanServiceIdL( dbSession );
-    if( !wlanId )
-        {
-        MPMLOGSTRING( "CMPMCommsDatAccess::SetEasyWlanDataL unable to store \
- easy wlan settings" )
-        dbSession->Close();		
-		CleanupStack::PopAndDestroy( dbSession );
-        return;
-        }
-    
-    CMDBGenericRecord* record = static_cast<CMDBGenericRecord*> 
-				    ( CCDRecordBase::RecordFactoryL( 0));
-    CleanupStack::PushL( record );
-    record->InitializeL( TPtrC( WLAN_SERVICE ),NULL );
-    record->SetRecordId( wlanId );
-    record->LoadL( *dbSession );
-
-        TBuf<KWlanMaxSsidLength> ssid16;
-        CnvUtfConverter::ConvertToUnicodeFromUtf8( ssid16, aSsid );
-        CMDBField<TDesC>* textField = (CMDBField<TDesC>*)record->GetFieldByIdL(KCDTIdWlanUsedSSID);
-        textField->SetMaxLengthL( ssid16.Length());
-        textField->SetL( ssid16 );
-    
-        *((CMDBField<TUint32>*)record->GetFieldByIdL(KCDTIdWlanSecMode)) = aSecMode;
-        *((CMDBField<TUint32>*)record->GetFieldByIdL(KCDTIdWlanConnMode)) = aConnMode;
-    
-        if (aEnableWpaPsk)
-    	    {
-    	    MPMLOGSTRING( "CMPMCommsDatAccess::SetEasyWlanDataL wpa psk" )
-    	    CMDBField<TDesC8>* binField = (CMDBField<TDesC8>*)
-		   									record->GetFieldByIdL(KCDTIdWlanWpaPreSharedKey);
-		    binField->SetMaxLengthL( aWpaKeyLen );
-		    binField->SetL( aWpaPsk );
-
-		    *((CMDBField<TUint32>*)record->GetFieldByIdL(KCDTIdWlanWpaKeyLength)) = aWpaKeyLen;
-		    *((CMDBField<TUint32>*)record->GetFieldByIdL(KCDTIdWlanEnableWpaPsk)) = aEnableWpaPsk;
-    	    }
-        else if (aSecMode == EWlanSecModeWep)
-    	    {
-    	    MPMLOGSTRING( "CMPMCommsDatAccess::SetEasyWlanDataL wep psk" )
-     	    *((CMDBField<TUint32>*)record->GetFieldByIdL( KCDTIdWlanWepIndex )) = 
-     	        aWepData.iDefaultWep;
- 
-    	    SetWepKeyL( KCDTIdWlanFormatKey1, KCDTIdWlanWepKey1, 
-    	                aWepData.iWep1, aWepData.iWepFormat1, record );
-            SetWepKeyL( KCDTIdWlanFormatKey2, KCDTIdWlanWepKey2, 
-                        aWepData.iWep2, aWepData.iWepFormat2, record );
-            SetWepKeyL( KCDTIdWlanFormatKey3, KCDTIdWlanWepKey3, 
-                        aWepData.iWep3, aWepData.iWepFormat3, record );
-            SetWepKeyL( KCDTIdWlanFormatKey4, KCDTIdWlanWepKey4, 
-                        aWepData.iWep4, aWepData.iWepFormat4, record );
-    	    }
-    	else
-    	    {
-    	    MPMLOGSTRING2( "CMPMCommsDatAccess::SetEasyWlanDataL sec mode %d, no key data written",
-    	         aSecMode )
-    	    }
-    
-        //Finally save all to commsdat.
-        record->ModifyL( *dbSession );
-        dbSession->CommitTransactionL();
-        dbSession->Close();
-        CleanupStack::PopAndDestroy( record );
-        CleanupStack::PopAndDestroy( dbSession );
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::SetWepKeyL
-// -----------------------------------------------------------------------------
-//
-void CMPMCommsDatAccess::SetWepKeyL( TMDBElementId       aFormatId,
-                                     TMDBElementId       aKeyId, 
-                                     TWlanWepKey         aWepKey,
-                                     TUint               aWepFormat,
-                                     CMDBGenericRecord*  aRecord )
-    {
-    CMDBField<TUint32>* formatField = static_cast<CMDBField<TUint32>*>
-            ( aRecord->GetFieldByIdL( aFormatId ) );
-    formatField->SetL( aWepFormat );
-    CMDBField<TDesC8>* wepKey = static_cast<CMDBField<TDesC8>*>
-            ( aRecord->GetFieldByIdL( aKeyId ) );
-    if ( aWepFormat )
-        {
-        wepKey->SetL( aWepKey );
-        }
-    else
-        {
-        //Convert Ascii to Hex format, as only Hex value to be stored in CommsDat
-        HBufC8* buf8Conv = HBufC8::NewLC( aWepKey.Length() * KMpmDoubleLength );
-        ConvertAsciiToHex( aWepKey, buf8Conv );
-        wepKey->SetL( buf8Conv->Des() );
-        CleanupStack::PopAndDestroy( buf8Conv );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::ConvertAsciiToHex
-// -----------------------------------------------------------------------------
-//
-void CMPMCommsDatAccess::ConvertAsciiToHex( const TDesC8& aSource, 
-        							        HBufC8* aDest )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::ConvertAsciiToHex" )
-    _LIT( hex, "0123456789ABCDEF" );
-    TInt size = aSource.Size();
-    TPtr8 ptr = aDest->Des();
-    for ( TInt ii = 0; ii < size; ii++ )
-    	{
-    	TText8 ch = aSource[ii];
-    	ptr.Append( hex()[(ch/16)&0x0f] );
-    	ptr.Append( hex()[ch&0x0f] );
-    	}
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::FindEasyWlanServiceIdL
-// -----------------------------------------------------------------------------
-//
-TUint32 CMPMCommsDatAccess::FindEasyWlanServiceIdL( CMDBSession* aDb )
-    {
-    // if the method returns the record container there is for 
-    // some reason garbage data in the key values
-    //
-    TUint32 wlanId( 0 );
-    MPMLOGSTRING( "CMPMCommsDatAccess::FindEasyWlanServiceIdL" )    
-
-    CMDBRecordSet<CCDWlanServiceRecord>* wlanSet = 
-        new ( ELeave ) CMDBRecordSet<CCDWlanServiceRecord>( 
-         CCDWlanServiceRecord::TableIdL( *aDb ) );
-    CleanupStack::PushL( wlanSet ); 
-    wlanSet->LoadL( *aDb );
-    
-    TBool found( EFalse );
-    for ( TInt i = 0; i < wlanSet->iRecords.Count() && !found; i++ )
-        {
-        CCDWlanServiceRecord* wlanRecord = new ( ELeave ) 
-            CCDWlanServiceRecord( CCDWlanServiceRecord::TableIdL( *aDb ) );
-        CleanupStack::PushL( wlanRecord );
-
-        wlanRecord->SetElementId( GetRealElementId( wlanSet->iRecords[i] ) );
-        wlanRecord->LoadL( *aDb );
-        
-        TDesC ssid = wlanRecord->iWLanSSID;
-        if( !ssid.Compare( KNullDesC() ) )
-            {
-            MPMLOGSTRING2( "CMPMCommsDatAccess::FindEasyWlanServiceIdL: \
-found service entry %i", wlanRecord->RecordId() )
-            wlanId = wlanRecord->RecordId();
-            found = ETrue;
-            }
-        CleanupStack::PopAndDestroy( wlanRecord );
-        }
-    CleanupStack::PopAndDestroy( wlanSet );
-    return wlanId;
-    }
 
 // -----------------------------------------------------------------------------
 // CMPMCommsDatAccess::CheckHiddenAgentL
@@ -1753,12 +1316,6 @@
                 TInt ssidLength( 0 );
                 commsDbWlanTableView->ReadColumnLengthL( TPtrC( NU_WLAN_SSID ), 
                                                      ssidLength );
-                if ( ssidLength == 0 )
-                    {
-                    MPMLOGSTRING(
-                        "CMPMCommsDatAccess::CheckWlanL: IAP is Easy WLAN" )
-                    wlan = EEasyWlanIap;
-                    }
                 }
             else
                 {
@@ -2325,7 +1882,7 @@
 
             TMpmConnPref tempMpmConnPref;
             tempMpmConnPref.SetSnapId( snap );
-            
+
             // Ensure that there will be no infinite loops by dropping
             // this virtual iap out from the list of available iaps.
             // E.g. next layer SNAP could be the same as current SNAP.
@@ -2344,7 +1901,7 @@
                 }
             aSession.IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, tempList );
             CleanupStack::PopAndDestroy( &tempList );
-            
+
             aRealIapId = tempMpmConnPref.IapId();
             }
         else if ( virtualNext->iNextLayerIAP != 0 )
@@ -2596,6 +2153,31 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMPMCommsDatAccess::IsIntranetSnapL
+// -----------------------------------------------------------------------------
+//
+TBool CMPMCommsDatAccess::IsIntranetSnapL( TUint32 aSnapId )
+    {
+    MPMLOGSTRING( "CMPMCommsDatAccess::IsIntranetSnapL" )
+
+    RCmManager rCmManager;
+    rCmManager.OpenLC();
+
+    RCmDestination dest = rCmManager.DestinationL( aSnapId );
+    CleanupClosePushL(dest);
+    TInt snapMetadata = dest.MetadataL( CMManager::ESnapMetadataPurpose );
+    CleanupStack::PopAndDestroy( &dest );
+    CleanupStack::PopAndDestroy( &rCmManager );
+    
+    if ( snapMetadata == CMManager::ESnapPurposeIntranet )
+        {
+        return ETrue;
+        }
+    
+    return EFalse;            
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMCommsDatAccess::GetBearerTypeL
 // -----------------------------------------------------------------------------
 //
@@ -2695,209 +2277,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::AreActiveIapsInSameSnapL
-// -----------------------------------------------------------------------------
-//
-TBool CMPMCommsDatAccess::AreActiveIapsInSameSnapL ( RArray<TActiveBMConn>& aActiveBMConns,
-                                                     TUint32& aSnapId,
-                                                     CMPMServer& aServer )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::AreActiveIapsInSameSnapL" )
-    TBool same = ETrue;
-    TUint32 snapId = 0;
-    TUint32 prevSnapId = 0;
-            
-    // Go through all active connections
-    for (TInt index = 0; index < aActiveBMConns.Count(); index++ )
-        {
-        CMPMServerSession* serverSession = aServer.GetServerSession(
-                aActiveBMConns[index].iConnInfo.iConnId );
-    
-        // Do check only for active connections
-        if ( aActiveBMConns[index].iConnInfo.iState != EStarted ||
-             !serverSession->ChooseBestIapCalled())
-            {
-            continue;
-            }
-        
-        // Iap id must be nonzero
-        if ( aActiveBMConns[index].iConnInfo.iIapId )
-            {
-            prevSnapId = snapId;
-            // Get destination id for the iap
-            snapId = aActiveBMConns[index].iConnInfo.iSnap;
-            
-            // Check if previous iap's destination is different
-            if ( ( ( prevSnapId != snapId ) && prevSnapId && snapId ) ||
-                 !snapId )
-                {
-                // Set return value to false and leave loop
-                same = EFalse;
-                break;
-                }
-            }
-        }
-    
-    // Return destId for later use
-    aSnapId = snapId;
-    
-    return same;
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::SelectActiveConnectionL
-// -----------------------------------------------------------------------------
-//
-void CMPMCommsDatAccess::SelectActiveConnectionL ( const TUint32 aSnapId,
-                                                   RArray<TActiveBMConn>& aActiveBMConns,
-                                                   TUint32& aActiveIapId,
-                                                   TUint32& aActiveSnapId,
-                                                   TMPMBearerType& aActiveBearerType,
-                                                   CMPMServerSession& aSession )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::SelectActiveConnectionL" )
-    RArray<TUint32> activeIaps;
-    RArray<TNetIap> iapIds;
-    
-    // Reset output parameters
-    aActiveIapId = 0;
-    aActiveSnapId = 0;
-    aActiveBearerType = EMPMBearerTypeNone;
-
-    CleanupClosePushL( activeIaps );
-        
-    for (TInt index = 0; index < aActiveBMConns.Count(); index++ )
-        {
-        CMPMServerSession* serverSession = 
-            aSession.MyServer().GetServerSession(
-                aActiveBMConns[index].iConnInfo.iConnId );
-
-        // Add only started iaps to array
-        if ( aActiveBMConns[index].iConnInfo.iState == EStarted &&
-             serverSession->ChooseBestIapCalled() )
-            {
-            activeIaps.AppendL ( aActiveBMConns[index].iConnInfo.iIapId );
-            }
-        }
-        
-    CleanupClosePushL( iapIds );
-    SearchDNEntriesL( aSnapId, iapIds );
-    
-    // Remove any deactived IAP from iapIds
-    TInt ret        = KErrNotFound;
-    TInt destCount  = iapIds.Count();
-    
-    // Decrement by one, because count is n, 
-    // but indexes in array are 0 .. n-1.
-    // 
-    destCount--;
-
-    // This time we are browsing the array from the end to the beginning, 
-    // because removing one element from array affects index numbering.
-    for ( TInt k = destCount; k >= 0; k-- )
-        {
-        ret = activeIaps.Find( iapIds[k].iIapId );
-        if ( ret == KErrNotFound )
-            {
-            MPMLOGSTRING2( "CMPMCommsDatAccess::SelectActiveConnectionL: \
-Remove deactived IAP = %i", iapIds[k].iIapId )
-            iapIds.Remove( k );
-            }
-        }
-
-    // Determine the actual priorities for IAPs
-    if( iapIds.Count() > 1 )
-        {
-        DeterminePrioritiesL( iapIds, activeIaps, aSession );
-        }
-
-    // Check if a matching available IAP is found.
-    if( iapIds.Count() )
-        {
-        // Go through all iaps
-        for ( TInt index = 0; index < iapIds.Count(); index++ )
-            {
-            // Get bearer type
-            TMPMBearerType bearerType = GetBearerTypeL( iapIds[index].iIapId );
-        
-            // If iap is not vpn, wlan or packet then skip it
-            if ( bearerType == EMPMBearerTypeOther )
-                {
-                continue;
-                }
-            
-            // Set bearer type, iap id and snap id
-            for (TInt index2 = 0; index2 < aActiveBMConns.Count(); index2++ )
-                {
-                if ( ( aActiveBMConns[index2].iConnInfo.iIapId ==
-                       iapIds[index].iIapId ) )
-                    {
-                    if ( aSession.MyServer().DedicatedClients().Find(
-                         aActiveBMConns[index2].iConnInfo.iAppUid ) != KErrNone )
-                        {
-                        aActiveSnapId = aActiveBMConns[index2].iConnInfo.iSnap;
-                        aActiveIapId = aActiveBMConns[index2].iConnInfo.iIapId;
-                        aActiveBearerType = bearerType;
-                        }
-                    break;
-                    }
-                }
-            
-            break;
-            }
-        }
-
-    MPMLOGSTRING4(
-        "CMPMCommsDatAccess::SelectActiveConnectionL: Iap id = %i, Snap id = %i, \
-Bearer type = %i",
-        aActiveIapId, aActiveSnapId, aActiveBearerType )
-    
-    CleanupStack::PopAndDestroy( &iapIds );
-    CleanupStack::PopAndDestroy( &activeIaps );
-    }
-    
-// -----------------------------------------------------------------------------
-// CMPMCommsDatAccess::GetSnapIdL
-// -----------------------------------------------------------------------------
-//
-TUint32 CMPMCommsDatAccess::GetSnapIdL( TUint32 aIapId )
-    {
-    MPMLOGSTRING( "CMPMCommsDatAccess::GetSnapIdL" )
-    TUint32 snapId = 0;
-    RArray<TUint> snapIds;
-        
-    CleanupClosePushL( snapIds );
-    // Get destinations
-    FindAllSnapsL( snapIds );
-
-    for (TInt index = 0; index < snapIds.Count(); index++)
-        {
-        RArray<TNetIap> ids;
-        // Get iaps belonging to this snap
-        CleanupClosePushL( ids );
-        SearchDNEntriesL( snapIds[index], ids );
-            
-        for (TInt index2 = 0; index2 < ids.Count(); index2++)
-            {
-            // Check if iap belongs to this destination
-            if (ids[index2].iIapId == aIapId)
-                {
-                snapId = snapIds[index];
-                CleanupStack::PopAndDestroy( &ids );                    
-                CleanupStack::PopAndDestroy( &snapIds );
-                return snapId;
-                }
-            }
-        
-        CleanupStack::PopAndDestroy( &ids );
-        }
-
-    CleanupStack::PopAndDestroy( &snapIds );
-    
-    return snapId;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMCommsDatAccess::IsSnapEmptyL
 // -----------------------------------------------------------------------------
 //
@@ -3146,4 +2525,26 @@
     return destinationId;
     }
 
+// -----------------------------------------------------------------------------
+// CMPMCommsDatAccess::GetDefaultConnectionL
+// -----------------------------------------------------------------------------
+//
+void CMPMCommsDatAccess::GetDefaultConnectionL( TCmDefConnType& aType, TUint32& aId )
+    {
+    MPMLOGSTRING( "CMPMCommsDatAccess::GetDefaultConnectionL" )
+
+    RCmManager rCmManager;
+    CleanupClosePushL( rCmManager ); 
+    rCmManager.CreateTablesAndOpenL();
+    
+    TCmDefConnValue defConnValue;
+    rCmManager.ReadDefConnL( defConnValue );
+    
+    aType = defConnValue.iType;
+    aId = defConnValue.iId;
+    
+    CleanupStack::PopAndDestroy( &rCmManager );
+    
+    }
+
 //  End of File
--- a/bearermanagement/mpm/src/mpmconfirmdlgroaming.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconfirmdlgroaming.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -67,6 +67,8 @@
       iIAP( aIAP ),
       iDialogType( aDialogType ),
       iConfirmDlg( NULL ),
+      iMsgQuery( EMsgQueryCancelled ),
+      iError( 0 ),
       iReconnect( aReconnect )
     {
     }
--- a/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -81,9 +81,11 @@
       iIAP( aIAP ),
       iDialogType( aDialogType ),
       iConfirmDlg( NULL ),
+      iMsgQuery( EMsgQueryCancelled ),
       iPref( aPref ),
       iServer( aServer ),
       iSession ( aSession ),
+      iError( 0 ),
       iIapState( aIapState )
     {
     }
@@ -206,11 +208,11 @@
     {
     MPMLOGSTRING2( "CMPMConfirmDlgStarting<0x%x>::UserSelectedConnectThisTime", iConnId )
     
-    TBool wlanNeeded( EFalse );
-    TRAPD( err, wlanNeeded = iIapSelection.StartWlanQueryIfNeededL( iIAP ) )
+    TBool isWlan( EFalse );
+    TRAPD( err, isWlan = iIapSelection.IsIapWlanL( iIAP ) )
     if( err == KErrNone )
         {
-        if( !wlanNeeded )
+        if( !isWlan )
             {
             if ( iIapState == CMPMIapSelection::EImplicitConnection )
                 {
@@ -231,9 +233,6 @@
                                             EStarting,
                                             iSession );
 
-                // Complete the ChooseBestIAP message with 
-                // KErrNone if user selected yes.
-                // 
                 MPMLOGSTRING2( "CMPMConfirmDlgStarting<0x%x>::UserSelectedConnectThisTime:\
 Complete KErrNone", iConnId )
                 iIapSelection.ChooseIapComplete( KErrNone, &iPref );                        
@@ -268,11 +267,11 @@
             }
         } 
     
-    TBool wlanNeeded( EFalse );
-    TRAPD( err, wlanNeeded = iIapSelection.StartWlanQueryIfNeededL( iIAP ) )
+    TBool isWlan( EFalse );
+    TRAPD( err, isWlan = iIapSelection.IsIapWlanL( iIAP ) )
     if( err == KErrNone )
         {
-        if( !wlanNeeded )
+        if( !isWlan )
             {
             if ( iIapState == CMPMIapSelection::EImplicitConnection )
                 {
@@ -293,8 +292,6 @@
                                             EStarting,
                                             iSession );
 
-                 // Complete the ChooseBestIAP message with 
-                 // KErrNone if user selected yes.
                  // 
                  MPMLOGSTRING2( "CMPMConfirmDlgStarting<0x%x>::UserSelectedConnectAutomatically:\
 Complete KErrNone", iConnId )
--- a/bearermanagement/mpm/src/mpmconnmonevents.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconnmonevents.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -51,7 +51,8 @@
 // 
 CMPMConnMonEvents::CMPMConnMonEvents( CMPMServer& aServer )
     : iMyServer( aServer ),
-      iDiscardAvailabilityNotification( EFalse )
+      iDiscardAvailabilityNotification( EFalse ),
+      iAvailabilityNotificationDiscarded( EFalse )
     {
     }
 
@@ -466,6 +467,7 @@
     if ( ( iAvailableIAPs.Count() > 0 ) && 
          !DiscardAvailabilityNotification() )
         {
+        iAvailabilityNotificationDiscarded = EFalse;
         // Remove temporary blacklistings as fresh availability 
         // info is available.
         // 
@@ -479,6 +481,7 @@
         }
     else
         {
+        iAvailabilityNotificationDiscarded = ETrue;
         MPMLOGSTRING2( "CMPMConnMonEvents::EventL - IAPs count: %d", 
             iAvailableIAPs.Count() )
         MPMLOGSTRING2( 
@@ -535,13 +538,6 @@
             iAvailableIAPs = eventIap->IapAvailability();
             UpdateIAPRefreshTime();
             IapAvailabilityChange( EConnMonEvent );
-            
-            TRAPD( err, iMyServer.UpdateSessionConnectionDlgL() )
-            if( err != KErrNone )
-                {
-                MPMLOGSTRING2( "CMPMConnMonEvents::EventL UpdateSessionConnectionDlgL \
-error code %d", err )
-                }
             break;
             }
         default:
--- a/bearermanagement/mpm/src/mpmconnmonreqs.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconnmonreqs.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -56,7 +56,9 @@
                                  RConnectionMonitor& aConnMon,
                                  TUint aConnId, 
                                  CMPMServerSession* aSession )
-    : CActive(CActive::EPriorityStandard), 
+    : CActive(CActive::EPriorityStandard),
+      iNextState( EGetIapAvailState ),
+      iLastCancelCode( 0 ),
       iParent(aParent), 
       iConnMon(aConnMon), 
       iConnId(aConnId), 
@@ -347,6 +349,12 @@
                         //
                         iParent.IapAvailabilityChange( EConnMon );
                         }
+
+                    if ( iParent.AvailabilityNotificationDiscarded() )
+                        {
+                        MPMLOGSTRING( "CMPMConnMonReqs::RunL: AvailabilityNotificationDiscarded, roaming logic triggered" )
+                        iParent.IapAvailabilityChange( EConnMonEvent );
+                        }
                     }
                 // check which callback function to use
                 // 
--- a/bearermanagement/mpm/src/mpmdatausagewatcher.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmdatausagewatcher.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -118,24 +118,15 @@
         // Get the new Cellular data usage setting value from central repository.
         TInt oldCellularDataUsage = iCellularDataUsage;
 
-        if ( GetCurrentDataUsageValue() == KErrNone // Updates iCellularDataUsage
-             && oldCellularDataUsage != iCellularDataUsage
-             && iServer->RoamingWatcher()->RoamingStatus() != EMPMRoamingStatusUnknown )
+        if ( GetCurrentDataUsageValue() == KErrNone )
             {
-            // Setting changed while cellular is in use
-
-            if ( iCellularDataUsage == ECmCellularDataUsageDisabled )
+            // Stop cellular connections if the setting changes into Disabled.
+            if ( oldCellularDataUsage != ECmCellularDataUsageDisabled &&
+                    iCellularDataUsage == ECmCellularDataUsageDisabled &&
+                    iServer->RoamingWatcher()->RoamingStatus() != EMPMRoamingStatusUnknown )
                 {
-                // Cellular data usage disabled -> disconnect cellular
                 iServer->StopCellularConns();
                 }
-            else if ( iCellularDataUsage == ECmCellularDataUsageConfirm )
-                {
-                // Cellular data usage needs to be confirmed -> disconnect if 
-                // there are only silent cellular connections left.
-                iServer->StopCellularConns( ETrue );
-                }
-
             }
         }
     
--- a/bearermanagement/mpm/src/mpmdefaultconnection.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +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: Handles defualt connection logic
-*
-*/
-
-#include <metadatabase.h>
-#include <datamobilitycommsdattypes.h>
-#include <cmdefconnvalues.h>
-#include "mpmdefaultconnection.h"
-#include "mpmserversession.h" //KShift8
-#include "mpmserver.h" 
-#include "mpmlogger.h"
-#include "mpmcommsdataccess.h"
-
-using namespace CommsDat;
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::NewL
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnection* CMPMDefaultConnection::NewL( const CMPMServer* aServer)
-    {
-    CMPMDefaultConnection * self = new (ELeave) 
-    CMPMDefaultConnection( aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-    
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnection::~CMPMDefaultConnection()
-    {
-    }
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::SetDefaultIAP
-// ---------------------------------------------------------------------------
-//
-TInt CMPMDefaultConnection::SetDefaultIAP( TInt aIapId )
-    {
-    TInt err( KErrNone );
-    //check validity
-    if( ( aIapId ) > 0 && ( aIapId <= KCDMaxRecords ) )
-        {
-        iDefaultIapId = aIapId;
-        MPMLOGSTRING2(
-            "CMPMDefaultConnection::SetDefaultIAP Set default connection iap: %d", 
-            aIapId)
-        }
-    else
-        {
-        err = KErrArgument;
-        MPMLOGSTRING2(
-            "CMPMDefaultConnection::SetDefaultIAP Invalid iap: %d", 
-            aIapId)
-        }    
-    return err;
-    }
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::ClearDefaultIAP
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnection::ClearDefaultIAP()
-    {
-    iDefaultIapId = 0;
-    MPMLOGSTRING( "CMPMDefaultConnection::ClearDefaultIAP:\
- cleared default iap" )
-    }
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::GetDefaultConnectionL
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnection::GetDefaultConnectionL( TCmDefConnType& aMode, 
-                                                   TUint32& aConnection )
-    {
-    // first option is registered default iap
-    if( iDefaultIapId )
-        {
-        MPMLOGSTRING2( "CMPMDefaultConnection::GetDefaultConnectionL:\
- default iap set as id %d", iDefaultIapId )
-        aMode = ECmDefConnConnectionMethod;
-        aConnection = iDefaultIapId;
-        }
-    else
-        {
-        MPMLOGSTRING( "CMPMDefaultConnection::GetDefaultConnectionL:\
- getting value from commsdat" )
-
-        // read global commsdat setting     
-        //
-        TRAPD( err, ReadDefConnSettingL( aMode, aConnection ) )
-
-        if( err != KErrNone )
-            {
-            //use default values
-            //
-            aMode = KDefaultMode;
-            aConnection = KDefaultConnectionId;
-            }
-
-        MPMLOGSTRING3( "CMPMDefaultConnection::GetDefaultConnectionL: \
-found type %d, id %d", aMode, aConnection )                
-          
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnection::CMPMDefaultConnection( const CMPMServer* aServer ) : 
-    iServer( aServer )
-    {
-    
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::ConstructL
-// ---------------------------------------------------------------------------
-//    
-void CMPMDefaultConnection::ConstructL()
-    {
-    
-    }
-    
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::IntToCmDefConnType
-// ---------------------------------------------------------------------------
-//
-TCmDefConnType CMPMDefaultConnection::IntToCmDefConnTypeL( const TUint& aInt )
-    {
-    TCmDefConnType type( TCmDefConnType ( 0 ) );
-
-    if( aInt == ECmDefConnDestination )
-        {
-        type = ECmDefConnDestination;
-        }
-    else if( aInt == ECmDefConnConnectionMethod )
-        {
-        type = ECmDefConnConnectionMethod;
-        }
-    else
-        {
-        MPMLOGSTRING2( "CMPMDefaultConnection::IntToCmDefConnType:\
- incorrect value %d", aInt )
-        User::Leave( KErrArgument );
-        }
-    
-    return type;    
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnection::ReadDefConnSetting
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnection::ReadDefConnSettingL( TCmDefConnType& aType,
-                                                 TUint32&        aId )
-    {
-    MPMLOGSTRING( "CMPMDefaultConnection::ReadDefConnSettingL " )
-    CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() ); 
-    TMDBElementId tableId = CCDDefConnRecord::TableIdL( *db );     
-
-    // fetch value from commsdat using record set to be able 
-    // to load any and all records in the table.
-    // we don't want to make assumptions on id
-    //
-    CMDBRecordSet<CMDBGenericRecord> * recordSet = new ( ELeave )
-    CMDBRecordSet<CMDBGenericRecord>( tableId );
-    CleanupStack::PushL( recordSet );
-    recordSet->LoadL( *db );
-    
-    CCDDefConnRecord* dconn = new (ELeave) CCDDefConnRecord( tableId );
-    CleanupStack::PushL( dconn );
-    if( recordSet->iRecords.Count() )
-        {
-        // load the first entry found
-        dconn->SetElementId( CMPMCommsDatAccess::GetRealElementId( recordSet->iRecords[0] ) );
-        dconn->LoadL( *db );
-        aType = IntToCmDefConnTypeL( dconn->iDefConnType );
-        aId = dconn->iDefConnUid;
-        }
-    else
-        {
-        // nothing found, use default value
-        // 
-        MPMLOGSTRING( "CMPMDefaultConnection::ReadDefConnSettingL \
-no entry found" )
-        aType = KDefaultMode;
-        aId = KDefaultConnectionId;
-        }
-    db->Close();
-    CleanupStack::PopAndDestroy( dconn );
-    CleanupStack::PopAndDestroy( recordSet );
-    CleanupStack::PopAndDestroy( db );
-    }
--- a/bearermanagement/mpm/src/mpmdefaultconnserver.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +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: Default connection server implementation
-*
-*/
-
-#include "mpmdefaultconnserver.h"
-#include "mpmdefaultconnserversession.h"
-#include "mpmlogger.h"
-#include "mpmserver.h"
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServer::CMPMDefaultConnServer( CMPMServer* aMPMServer )
-    : CPolicyServer( CPolicyServer::EPriorityStandard, KMPMPolicy ),
-    iMPMServer( aMPMServer )
-    {        
-    }
-
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServer::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnServer::ConstructL()
-    {
-    MPMLOGSTRING( "MPMDefConnServer starting" )
-    StartL(KMPMDefaultConnectionServerName);
-    }
-
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServer::NewL
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServer* CMPMDefaultConnServer::NewL( CMPMServer* aMPMServer )
-    {
-    CMPMDefaultConnServer* self = new ( ELeave ) CMPMDefaultConnServer( aMPMServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServer::~CMPMDefaultConnServer()
-    {
-
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServer::MPMServer
-// ---------------------------------------------------------------------------
-//
-CMPMServer* CMPMDefaultConnServer::MPMServer()
-    {
-    return iMPMServer;
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServer::NewSessionL
-// From class CServer2.
-// ---------------------------------------------------------------------------
-//
-CSession2* CMPMDefaultConnServer::NewSessionL( const TVersion& /*aVersion*/,
-                                               const RMessage2& /*aMessage*/) const
-    {
-    //create session
-    return CMPMDefaultConnServerSession::NewL( 
-        const_cast<CMPMDefaultConnServer*> ( this ) );
-    }
-
-
--- a/bearermanagement/mpm/src/mpmdefaultconnserversession.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +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: Session to MPM Default Connection server
-*
-*/
-
-#include <featmgr.h>
-
-#include "mpmdefaultconnserversession.h"
-#include "mpmdefaultconnserver.h"
-#include "mpmdefaultconnection.h"
-#include "mpmcommon.h"
-#include "mpmserver.h"
-#include "mpmlogger.h"
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::NewL
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServerSession* CMPMDefaultConnServerSession::NewL( 
-    CMPMDefaultConnServer* aServer )
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::NewL" )
-    CMPMDefaultConnServerSession* self = new ( ELeave ) CMPMDefaultConnServerSession( aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServerSession::~CMPMDefaultConnServerSession()
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::~CMPMDefaultConnServerSession" )
-    DefaultConnServer()->MPMServer()->DefaultConnection()->ClearDefaultIAP();
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::DefaultConnServer
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServer* CMPMDefaultConnServerSession::DefaultConnServer()
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::DefaultConnServer" )
-    return iDefaultConnServer; 
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::ServiceL
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnServerSession::ServiceL( const RMessage2& aMessage )
-    {
-    MPMLOGSTRING2( "CMPMDefaultConnServerSession::ServiceL %d ", 
-                   aMessage.Function() )
-    switch ( aMessage.Function() )
-        {
-        case EMPMDefaultConnectionSetDefaultIap:
-            {
-            SetDefaultIAP( aMessage );
-            break;
-            }
-        case EMPMDefaultConnectionClearDefaultIap:
-            {
-            ClearDefaultIAP( aMessage);
-            break;
-            }
-        default:
-            {
-            aMessage.Complete( KErrNotSupported );
-			MPMLOGSTRING( 
-			    "CMPMDefaultConnServerSession::ServiceL: Unsupported message type" )
-            }                   
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CMPMDefaultConnServerSession::CMPMDefaultConnServerSession( 
-CMPMDefaultConnServer* aServer )
-    : CSession2(), 
-      iDefaultConnServer( aServer ) 
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::CMPMDefaultConnServerSession" )
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnServerSession::ConstructL()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::SetDefaultIAP
-// Store IAP to be used as default connection in MPM Server
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnServerSession::SetDefaultIAP( const RMessage2& aMessage )
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::SetDefaultIAP" )
-    TInt iap( 0 ), err( KErrNone );
-    iap = aMessage.Int0();
-    err = DefaultConnServer()->MPMServer()->DefaultConnection()->SetDefaultIAP( iap );
-    aMessage.Complete( err );
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMDefaultConnServerSession::ClearDefaultIAP
-// Clear IAP from being used as default connection in MPM Server
-// ---------------------------------------------------------------------------
-//
-void CMPMDefaultConnServerSession::ClearDefaultIAP( const RMessage2& aMessage )
-    {
-    MPMLOGSTRING( "CMPMDefaultConnServerSession::ClearDefaultIAP" )
-    DefaultConnServer()->MPMServer()->DefaultConnection()->ClearDefaultIAP();
-    aMessage.Complete( KErrNone );
-    }
--- a/bearermanagement/mpm/src/mpmdialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,374 +0,0 @@
-/*
-* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: MPM user dialog handling
-*
-*/
-
-/**
-@file mpmdialog.cpp
-Mobility Policy Manager user dialog initiation.
-*/
-
-// INCLUDE FILES
-#include <connpref.h> // for TConnPref
-#include <gsmerror.h>
-#include <metadatabase.h>
-#include <datamobilitycommsdattypes.h>
-#include <commdb.h>
-#include <bldvariant.hrh>   // For feature flags
-#include <e32property.h>    //publish and subscribe
-
-#include "mpmdialog.h"
-#include "mpmlogger.h"
-#include "mpmdefaultconnection.h"
-#include "rmpm.h"
-#include "mpmcommsdataccess.h"
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::NewL
-// -----------------------------------------------------------------------------
-//
-CMPMDialog* CMPMDialog::NewL( CMPMIapSelection&             aIapSelection,
-                              const RAvailableIAPList&      aIAPList,
-                              TUint32                       aBearerSet,
-                              CArrayPtrFlat<CMPMDialog>&    aQueue,
-                              CMPMServer&                   aServer )
-    {
-    CMPMDialog* self = new ( ELeave ) CMPMDialog( aIapSelection, 
-                                                  aBearerSet,
-                                                  aQueue,
-                                                  aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL( aIAPList );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::CMPMDialog
-// -----------------------------------------------------------------------------
-//
-CMPMDialog::CMPMDialog( CMPMIapSelection&           aIapSelection,
-                        TUint32                     aBearerSet,
-                        CArrayPtrFlat<CMPMDialog>&  aQueue,
-                        CMPMServer&                 aServer )
-    :   CMPMDialogBase( *(CArrayPtrFlat<CMPMDialogBase>*)&aQueue ),
-        iIapSelection( aIapSelection ), 
-        iSnapOrIAPId( 0 ),
-        iBearerSet( aBearerSet ),
-        iServer ( aServer )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::~CMPMDialog
-// -----------------------------------------------------------------------------
-//
-CMPMDialog::~CMPMDialog()
-    {
-    Cancel();
-    MPMLOGSTRING2( "CMPMDialog::~CMPMDialog: deleted, Completing with code = %i", 
-                       iStatus.Int() )
-    iDlgServ.Close();
-    // Clean up all other stuff
-    iIAPList.Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::ConstructL( const RAvailableIAPList& aIAPList )
-    {
-    User::LeaveIfError( CopyArray( aIAPList, iIAPList ) );
-    CMPMDialogBase::ConstructL();
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::Start( CMPMDialogBase* /*aDlg*/ )
-    {
-    InitSelectConnection();
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::IntSelectConnection
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::InitSelectConnection()
-    {
-    TInt err = iDlgServ.Connect();
-    // Try to publish sort snap data
-    //
-    if ( err == KErrNone )
-        {
-        TRAP( err, PublishSortSnapInfoL() )
-        }
-    if ( err != KErrNone )
-        {
-        // Jump to RunL()
-        TRequestStatus* status = &iStatus;
-        User::RequestComplete( status, err );
-        SetActive();
-        return;
-        }
-
-    // Map bearer set. bearerSet variable is a combination of values
-    // mapped to TCommDbBearer while iBearerSet is a combination of
-    // TExtendedConnPref::TExtendedConnBearer values.
-
-    TUint32 bearerSet( ECommDbBearerVirtual );
-    if ( iBearerSet == TExtendedConnPref::EExtendedConnBearerUnknown )
-        {
-        bearerSet |= ECommDbBearerCSD | ECommDbBearerWcdma |
-                     ECommDbBearerWLAN;
-        }
-    else
-        {
-        if ( iBearerSet & TExtendedConnPref::EExtendedConnBearerWLAN )
-            {
-            bearerSet |= ECommDbBearerWLAN;
-            }
-        if ( iBearerSet & TExtendedConnPref::EExtendedConnBearerCellular )
-            {
-            bearerSet |= ECommDbBearerWcdma;
-            }
-        }
-
-    // API definition was provided by Symbian, but we don't really need 
-    // these parameters with AccessPointConnection. 
-    // 
-    TUint32 unusedVariable( 0 );
-
-    /*  AccessPointConnection API implements also the ChangeConnection in 
-     *  the ALR "world", you should also be careful of the input value of 
-     *  iSnapOrIAPId, because the Destination with the input ElementID is 
-     *  considered the "current Destination in use", so it will not be 
-     *  listed by the notifier. So if you really want to see the ALR 
-     *  version of AccessPointConnection, in input iSnapOrIAPId MUST be  
-     *  an invalid ElementID (e.g. 0), to be sure that no Destinations 
-     *  will be removed from the list. 
-     */
-    iDlgServ.AccessPointConnection( unusedVariable,
-                                    unusedVariable,
-                                    iSnapOrIAPId,
-                                    bearerSet,
-                                    iStatus );
-
-    SetActive();
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::PublishSortSnapInfoL
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::PublishSortSnapInfoL()
-    {
-    // allow PublishSortSnapInfoL to run only 
-    // if the dialog is the first one in the queue.
-    // => First one is active one.
-    if ( !IsFirst() )
-        {
-        return;
-        }
-        
-    MPMLOGSTRING( "CMPMDialog::PublishSortSnapInfoL" )
-    RArray<TUint> snaps;
-    CleanupClosePushL( snaps );
-    
-    // set first snap to 0 as ungathegorised
-    //
-    snaps.AppendL( KSortUncategorisedIaps );
-    
-    // Find Snap ids
-    //
-    iServer.CommsDatAccess()->FindAllSnapsL( snaps );
-    
-    // Write iaps for each snap, also 0 is 
-    // included for uncategorised
-    //
-    TMpmSnapPubSubFormat snapData;
-    TInt i( 0 ), err( KErrNone );
-    for(; ( i < snaps.Count() ) && 
-          ( i < KMPMSortSnapMaxKey ); i++ )
-        {
-        snapData.iSnap = snaps[ i ];
-        snapData.iSortedIaps.Reset();
-        // Get sorted iaps
-        //
-        iIapSelection.Session()->SortSnapL( snaps[ i ], snapData.iSortedIaps );
-        
-        // Define pub&sub key if not already defined
-        //
-        err = RProperty::Define( KMPMSortSnapCategory, 
-                                 i,
-                                 KMPMSortSnapType,
-                                 KMPMSortSnapReadPolicy,
-                                 KMPMSortSnapWritePolicy );
-        
-        if ( err != KErrAlreadyExists &&
-             err != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMDialog::PublishSortSnapInfoL: error in define: %d ", err )
-            }
-        
-        TPtrC8 dataPtr( reinterpret_cast< TUint8* >( &snapData  ), sizeof( snapData ) );
-
-        err = RProperty::Set( KMPMSortSnapCategory, 
-                              i, 
-                              dataPtr );
-        if ( err != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMDialog::PublishSortSnapInfoL: error in set: %d ", err )
-            }    
-        MPMLOGSTRING3( "CMPMDialog::PublishSortSnapInfoL: snap %d iap count %d",
-                       snapData.iSnap, snapData.iSortedIaps.Count() )
-        }
-
-    // set rest of the keys to undefined
-    // 
-    while( i < KMPMSortSnapMaxKey )
-        {
-        err = RProperty::Delete( KMPMSortSnapCategory, i );
-        if ( err != KErrNotFound &&
-             err != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMDialog::PublishSortSnapInfoL: error in delete: %d ", err )
-            }
-        i++;
-        }
-    CleanupStack::PopAndDestroy( &snaps );    
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::RunL
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::RunL()
-    {
-    MPMLOGSTRING2( "CMPMDialog::RunL: status = %i", 
-        iStatus.Int() )
-        
-    TMDBElementId tableId = iSnapOrIAPId & KCDMaskShowRecordType; 
-    TBool isIap( EFalse );
-    if ( tableId == KCDTIdIAPRecord )
-        {
-        isIap = ETrue;
-        }
-    
-    // Clean data from publish & subscribe
-    //
-    CleanSortSnapInfo();
-        
-    TUint32 id = ( iSnapOrIAPId & KCDMaskShowRecordId ) >> KShift8;
-    iIapSelection.HandleUserSelectionL( isIap, id, iStatus.Int() );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::RunError
-// -----------------------------------------------------------------------------
-//
-TInt CMPMDialog::RunError(TInt aError)
-    {
-    // Handles a leave occurring in the request completion event handler 
-    // RunL(). The active scheduler calls this function if this active 
-    // object's RunL() function leaves. This gives this active object 
-    // the opportunity to perform any necessary cleanup.
-    // 
-    MPMLOGSTRING2( "CMPMDialog::RunError: RunL left with error = %i", aError )
-    iIapSelection.HandleUserSelectionError( aError );
-
-    // Clean data from publish & subscribe
-    //
-    CleanSortSnapInfo();
-
-    // Return KErrNone to prevent panic 
-    // 
-    return KErrNone;
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CMPMDialog::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::DoCancel()
-    {
-    iDlgServ.CancelAccessPointConnection();
-    // Clean data from publish & subscribe
-    //
-    CleanSortSnapInfo();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::CopyArray
-// -----------------------------------------------------------------------------
-//
-TInt CMPMDialog::CopyArray( const RAvailableIAPList& aOrigin, 
-                            RAvailableIAPList&       aCopy )
-	{
-	TInt err( KErrNone );
-
-    // Clean array first
-    // 
-	aCopy.Reset(); 
-
-	for( TInt i( 0 ); ( i < aOrigin.Count() ) && ( err == KErrNone ); ++i )
-		{
-		err = aCopy.Append( aOrigin[i] );
-		if ( err != KErrNone )
-			{
-			// Cleanup and return
-			// 
-            MPMLOGSTRING2( "CMPMDialog::CopyArray: Append error = %i", err )
-			aCopy.Reset();
-			}
-		}
-
-	return err;
-	} 
-
-// -----------------------------------------------------------------------------
-// CMPMDialog::CleanSortSnapInfoL
-// -----------------------------------------------------------------------------
-//
-void CMPMDialog::CleanSortSnapInfo()
-    {
-    MPMLOGSTRING( "CMPMDialog::CleanSortSnapInfoL" )
-
-    // Clean info from all keys
-    //
-    for( TInt i(0); i < KMPMSortSnapMaxKey; i++ )
-        {
-        TInt err = RProperty::Delete( KMPMSortSnapCategory, i );
-        if ( err != KErrNotFound &&
-             err != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMDialog::CleanSortSnapInfoL: error in delete: %d ", err )
-            }
-        }
-    }
-
-//  End of File
--- a/bearermanagement/mpm/src/mpmdisconnectdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +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: MPM disconnect dialog handling
-*
-*/
-
-/**
-@file mpmdisconnectdlg.cpp
-Mobility Policy Manager disconnect dialog initiation.
-*/
-
-// INCLUDE FILES
-#include "mpmdisconnectdlg.h"
-#include "mpmconnmonevents.h"
-#include "mpmlogger.h"
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::NewL
-// -----------------------------------------------------------------------------
-//
-CMPMDisconnectDlg* CMPMDisconnectDlg::NewL(
-    CMPMServerSession&                aSession,
-    TInt                              aOrigError,
-    CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue )
-    {
-    CMPMDisconnectDlg* self = new (ELeave) CMPMDisconnectDlg( aSession,
-                                                              aOrigError,
-                                                              aDisconnectQueue );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::CMPMDisconnectDlg
-// -----------------------------------------------------------------------------
-//
-CMPMDisconnectDlg::CMPMDisconnectDlg(
-    CMPMServerSession&                aSession,
-    TInt                              aOrigError,
-    CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue )
-    :   CMPMDialogBase( *(CArrayPtrFlat<CMPMDialogBase>*)&aDisconnectQueue ), 
-        iSession( aSession ),
-        iOrigError( aOrigError )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::~CMPMDisconnectDlg
-// -----------------------------------------------------------------------------
-//
-CMPMDisconnectDlg::~CMPMDisconnectDlg()
-    {
-    MPMLOGSTRING( "CMPMDisconnectDlg::~CMPMDisconnectDlg" )
-    Cancel();
-    iDlgServ.Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::ConstructL()
-    {
-    User::LeaveIfError( iDlgServ.Connect() );
-    CMPMDialogBase::ConstructL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::RunL
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::RunL()
-    {
-    MPMLOGSTRING2( "CMPMDisconnectDlg::RunL status %d", iStatus.Int() )
-
-    TInt error = iStatus.Int();
-    if ( error == KErrNone )
-        {
-        UserSelectedOk( iStatus.Int() );
-        }
-    else
-        {
-        UserSelectedCancel( iStatus.Int() );
-        }
-    // Store selection
-    iUserStatus = iStatus.Int();
-    iUserIap = iIapId;
-    }
-
-    
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::UserSelectedOk
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::UserSelectedOk( TInt aError )
-    {
-    MPMLOGSTRING( "CMPMDisconnectDlg::UserSelectedOk: \
-Tell BM to ignore error and do reselection" )
-
-    TInt error = aError;
-
-    // Get the current connection IapId for this connId 
-    TUint32 iapId = iSession.MyServer().GetBMIap( iSession.ConnectionId() );
-    
-    TBMNeededAction neededActionForPendingMsgs( EIgnoreError );
-    iSession.MyServer().HandlePendingMsgs( iapId, 
-                                           KErrNone,
-                                           &error,
-                                           &neededActionForPendingMsgs );
-										   
-    TBMNeededAction neededAction( EDoReselection );
-    iSession.ProcessErrorComplete( KErrNone,
-                                   &error,
-                                   &neededAction );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::UserSelectedCancel
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::UserSelectedCancel( TInt aError )
-    {
-    // User has selected Cancel
-    // 
-    // Read the Connection Id of the application
-    // 
-    TConnectionId connId = iSession.ConnectionId();
-
-    TBMNeededAction neededAction( EDoReselection );
-
-    TInt error = aError;
-    TInt* errorPtr( NULL );
-    
-    if ( error == KErrNotFound )
-        {
-        MPMLOGSTRING2( "CMPMDisconnectDlg::UserSelectedCancelL: \
-Use original error code %i", iOrigError )
-
-        error = iOrigError;
-        }
-
-    // Get the state of the connection for this Iap Id.
-    // 
-    TConnectionState state;
-    iSession.MyServer().GetConnectionState( connId, state );
-
-    // Get the current connection IapId for this connId 
-    //
-    TUint32 currentIap = iSession.MyServer().GetBMIap( connId );
-
-    if ( state == EStarting )
-        {
-        MPMLOGSTRING2( "CMPMDisconnectDlg::UserSelectedCancelL: \
-Tell BM to end the client connection with error code %i", error )
-
-        neededAction = EPropagateError;
-        errorPtr = &error;
-        }
-    else if ( state == ERoaming )
-        {
-        // New notification will be attempted with latest
-        // available IAPs
-        //
-        iSession.StoredIapInfo().ResetStoredIapInfo();
-        neededAction = EIgnoreError;
-
-        TConnMonIapInfo availableIAPs;
-        availableIAPs = iSession.GetAvailableIAPs();
-
-        iSession.MyServer().HandleServerBlackListIap( connId, 
-                                                      currentIap, 
-                                                      ETemporary );
-        TRAP( error, iSession.PrefIAPNotificationL( availableIAPs, 
-                                                    EBearerMan ) );
-        if ( error == KErrNotFound )
-            {
-            neededAction = EPropagateError;
-
-            errorPtr = &error;
-            TRAP_IGNORE( iSession.MobilityErrorNotificationL( KErrNotFound ) )
-            MPMLOGSTRING2(
-                "CMPMDisconnectDlg::UserSelectedCancelL: \
-Tell BM to end the client connection with error code %i", error )
-            }
-        else
-            {
-            MPMLOGSTRING(
-                "CMPMDisconnectDlg::UserSelectedCancelL: \
-Tell BM to ignore error and let MPM notify application about preferred IAP" )
-            }
-        }
-    else
-        {
-        MPMLOGSTRING2( "CMPMDisconnectDlg::UserSelectedCancelL: \
-Unsupported state %d", state )
-        }
-
-    iSession.MyServer().HandlePendingMsgs( currentIap,
-                                           KErrNone,
-                                           errorPtr,
-                                           &neededAction );
-
-    iSession.ProcessErrorComplete( KErrNone,
-                                   errorPtr,
-                                   &neededAction );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::RunError
-// -----------------------------------------------------------------------------
-//
-TInt CMPMDisconnectDlg::RunError(TInt aError)
-    {
-    // Handles a leave occurring in the request completion event handler 
-    // RunL(). The active scheduler calls this function if this active 
-    // object's RunL() function leaves. This gives this active object 
-    // the opportunity to perform any necessary cleanup.
-    // 
-    MPMLOGSTRING2(
-        "CMPMDisconnectDlg::RunError: RunL made a leave with error = %i", 
-        aError )
-
-    // Get the current connection IapId for this connId 
-    TUint32 iapId = iSession.MyServer().GetBMIap( iSession.ConnectionId() );
-
-    iSession.MyServer().HandlePendingMsgs( iapId, aError, NULL, NULL );
-
-    iSession.ProcessErrorComplete( aError, NULL, NULL );
-	
-    // Return KErrNone to prevent panic 
-    // 
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::DoCancel()
-    {
-    MPMLOGSTRING( "CMPMDisconnectDlg::DoCancel" )
-    iDlgServ.CancelDisconnectDlg();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMDisconnectDlg::Start
-// -----------------------------------------------------------------------------
-//
-void CMPMDisconnectDlg::Start( CMPMDialogBase* aDlg )
-    {
-    // If there are no outstanding CMPMDisconnectDlg, then 
-    // start CMPMDisconnectDlg immediately.
-    //
-    if ( aDlg )
-        {
-        CMPMDisconnectDlg* dlg = (CMPMDisconnectDlg*) aDlg;
-        iUserStatus = dlg->iUserStatus;
-        iUserIap = dlg->iUserIap;
-        }
-    if ( iUserStatus == KErrNone && iUserIap != 0 )
-        {
-        UserSelectedOk( iUserStatus );
-        }
-    else if ( iUserStatus != KErrNone )
-        {
-        UserSelectedCancel( iUserStatus );
-        }
-    else
-        {
-        iDlgServ.DisconnectDlg( iStatus, iIapId, ETrue );
-        SetActive();
-        }
-    }
-
-
-//  End of File
--- a/bearermanagement/mpm/src/mpmiapselection.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmiapselection.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -17,13 +17,10 @@
 
 #include "mpmiapselection.h"
 #include "mpmlogger.h"
-#include "mpmdialog.h"
 #include "mpmserversession.h"
 #include "mpmcommsdataccess.h"
 #include "mpmconnmonevents.h"
 #include "mpmconfirmdlgstarting.h"
-#include "mpmdefaultconnection.h"
-#include "mpmwlanquerydialog.h"
 #include "extendedconnpref.h"
 
 // ---------------------------------------------------------------------------
@@ -31,14 +28,14 @@
 // ---------------------------------------------------------------------------
 //
 CMPMIapSelection::CMPMIapSelection( CMPMCommsDatAccess*  aCommsDatAccess,
-                                    CMPMServerSession*   aSession )
+                                    CMPMServerSession*   aSession,
+                                    CConnectionUiUtilities* aConnUiUtils )
     : iChooseIapState( ENoConnection ),
       iCommsDatAccess( aCommsDatAccess ),
+      iConnUiUtils( aConnUiUtils ),
       iStoredIapInfo(),
       iSession( aSession ),
       iConfirmDlgStarting( NULL ),
-      iDialog( NULL ),
-      iWlanDialog( NULL ),
       iNextBestExists( EFalse ),
       iUserSelectionIapId( 0 ),
       iUserSelectionSnapId( 0 ),
@@ -62,10 +59,12 @@
 // ---------------------------------------------------------------------------
 //
 CMPMIapSelection* CMPMIapSelection::NewL( CMPMCommsDatAccess*  aCommsDatAccess,
-                                          CMPMServerSession*   aSession )
+                                          CMPMServerSession*   aSession,
+                                          CConnectionUiUtilities* aConnUiUtils )
     {
     CMPMIapSelection* self = new ( ELeave ) CMPMIapSelection( aCommsDatAccess,
-                                                              aSession );
+                                                              aSession,
+                                                              aConnUiUtils );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -84,8 +83,6 @@
     StopDisplayingStartingDlg();
     
     delete iConfirmDlgStarting;
-    delete iDialog;
-    delete iWlanDialog;
     }
 
 // -----------------------------------------------------------------------------
@@ -166,7 +163,8 @@
             return;
             }
         }
-    
+        
+           
     if  ( iChooseIapPref.ConnSelectionDialog() )
         {
         // Complete selection with error code if wlan only was set and bearer set as cellular 
@@ -186,7 +184,7 @@
         // Default connection is requested.
 
         MPMLOGSTRING( "CMPMIapSelection::ChooseIapL:\
- Default Connection" )
+            Default Connection" )
 
         if ( iSession->UseUserConnPref() )
             {
@@ -202,39 +200,17 @@
             return;
             }
 
+        // Read the default connection values
         TCmDefConnType type( TCmDefConnType( 0 ) );
         TUint32 id( 0 );
-        iSession->MyServer().DefaultConnection()->GetDefaultConnectionL( type, id );
+        iCommsDatAccess->GetDefaultConnectionL( type, id );
         
         MPMLOGSTRING3( "CMPMIapSelection::ChooseIapL:\
- default connection type %d id %d", type, id )
-       
-        if( type == ECmDefConnConnectionMethod )
-            {
-            iChooseIapPref.SetIapId( id );
-            iChooseIapPref.SetSnapId( 0 );
-            ExplicitConnectionL();
-            }
-        else if( type == ECmDefConnDestination )
-            { 
-            iChooseIapPref.SetSnapId( id );
-            ExplicitConnectionL();
-            }
-        else
-            {
-            if( iCommsDatAccess->IsSnapEmptyL( id ) )
-                {
-                // start implicit connection
-                ImplicitConnectionL();
-                return;
-                }
-
-            iChooseIapPref.SetSnapId( id );
-
-            // start connection as if explicitly defined 
-            // by application
-            ExplicitConnectionL();
-            }       
+            default connection type %d id %d", type, id )
+        
+        // set the received snap id and open the connection
+        iChooseIapPref.SetSnapId( id );
+        ExplicitConnectionL();
         }
     else if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit )
         {
@@ -351,13 +327,8 @@
         iChooseIapPref.SetIapId( validateIapId );
         iChooseIapPref.SetNetId( retNetId );
 
-        // In case offline mode is enabled, only LAN or WLAN is allowed.
-        // If some other bearer has been requested, then error code 
-        // KErrGprsOfflineMode should be returned instead of KErrNone.
-        // 
-        
-        if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() ||                 
-             iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) )
+        if ( !iapTypeLanOrWlan &&                  
+             iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown )
             {
             ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref );
             }
@@ -366,9 +337,13 @@
             TWlanIapType wlanType = iCommsDatAccess->CheckWlanL( validateIapId );
             if( wlanType != ENotWlanIap )
                 {
-                iChooseIapState = EExplicitConnection;
-                iWlanDialog = CMPMWlanQueryDialog::NewL( *this, validateIapId );
-                iWlanDialog->StartWlanQueryL();
+                // Add info into the BM connections
+                iSession->MyServer().AppendBMConnection( iSession->ConnectionId(), 
+                                    iChooseIapPref.SnapId(),
+                                    validateIapId,
+                                    EStarting,
+                                    *iSession );
+                ChooseIapComplete( KErrNone, &iChooseIapPref );
                 return;                
                 }
 
@@ -378,36 +353,39 @@
             if ( iSession->IsConfirmFirstL( validateIapId ) &&
                  !( iSession->MyServer().CommsDatAccess()->IsVirtualIapL( validateIapId ) ))
                 {
-                // Check if we are roaming and cellular data usage query has not yet been presented
-                // to the user in this country
-                if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming )
+                // Check that queries aren't disabled and
+                // enough time has elapsed from the last query cancelled by the user.
+                if ( !( iChooseIapPref.NoteBehaviour()
+                        & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
+                     !iSession->MyServer().IsConnPermQueryTimerOn() )
                     {
-                    // Check that queries aren't disabled and
-                    // enough time has elapsed from the last query cancelled by the user.
-                    if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
-                            !iSession->MyServer().IsConnPermQueryTimerOn() )
-                        {
-                        TConnectionId connId = iSession->ConnectionId();
-                                                            
-                        // International roaming
-                        iConfirmDlgStarting = CMPMConfirmDlgStarting::NewL( 
-                            *this, 
-                            connId,
-                            snap, 
-                            validateIapId, 
-                            CMPMConfirmDlg::EConfirmDlgVisitorNetwork,
-                            iChooseIapPref,
-                            iSession->MyServer(),
-                            *iSession,
-                            EExplicitConnection );
-                        return;    
-                        }
-                    else
-                        {
-                        // Queries disabled, connection must fail
-                        ChooseIapComplete( KErrPermissionDenied, &iChooseIapPref );
-                        return;
-                        }
+                    TConnectionId connId = iSession->ConnectionId();
+
+                    // Set confirmation type based on roaming status
+                    CMPMConfirmDlg::TDialogType type = 
+                            CMPMConfirmDlg::EConfirmDlgHomeNetwork;
+                    if ( iSession->MyServer().RoamingWatcher()->RoamingStatus()
+                            == EMPMInternationalRoaming ) {
+                        type = CMPMConfirmDlg::EConfirmDlgVisitorNetwork;
+                    }
+                    
+                    iConfirmDlgStarting = CMPMConfirmDlgStarting::NewL( 
+                        *this, 
+                        connId,
+                        snap, 
+                        validateIapId, 
+                        type,
+                        iChooseIapPref,
+                        iSession->MyServer(),
+                        *iSession,
+                        EExplicitConnection );
+                    return;    
+                    }
+                else
+                    {
+                    // Queries disabled, connection must fail
+                    ChooseIapComplete( KErrPermissionDenied, &iChooseIapPref );
+                    return;
                     }
                 }
                            
@@ -462,19 +440,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMIapSelection::UpdateConnectionDialog
-// -----------------------------------------------------------------------------
-//
-void CMPMIapSelection::UpdateConnectionDialogL()
-    {
-    if( iDialog )
-        {
-        MPMLOGSTRING( "CMPMIapSelection::UpdateConnectionDialogL data will be updated" )
-        iDialog->PublishSortSnapInfoL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMIapSelection::CompleteExplicitSnapConnectionL
 // -----------------------------------------------------------------------------
 //
@@ -498,7 +463,17 @@
     // Check if any suitable IAP's were found, if not then complete selection with error code
     if ( validateIapId == 0 )
         {
-        ChooseIapComplete( KErrNotFound, NULL );
+        if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
+                ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault ||
+                ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit &&
+                  iCommsDatAccess->IsInternetSnapL( 0, snap ) ) ) )
+            {
+            ImplicitConnectionL();
+            }
+        else
+            {
+            ChooseIapComplete( KErrNotFound, NULL );
+            }
         CleanupStack::PopAndDestroy( &availableIAPList );
         return;
         }
@@ -520,8 +495,8 @@
         {
         ChooseIapComplete( KErrGprsServicesNotAllowed, NULL );
         }
-    else if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() ||                 
-               iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) )
+    else if ( !iapTypeLanOrWlan &&                 
+               iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown )
         {
         // In case offline mode is enabled, only LAN or WLAN is allowed.
         // If some other bearer has been requested, then error code 
@@ -540,7 +515,7 @@
             // Check that queries aren't disabled and
             // enough time has elapsed from the last query cancelled by the user.
             if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
-                    !iSession->MyServer().IsConnPermQueryTimerOn() )
+                 !iSession->MyServer().IsConnPermQueryTimerOn() )
                 {
                 if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming )
                     {
@@ -580,19 +555,14 @@
             }
         else
             {
-            if ( !StartWlanQueryIfNeededL( validateIapId ) )
-                {
-                // Add info into the BM connections
-                //
-                iSession->MyServer().AppendBMConnection( connId, 
+            // Add info into the BM connections
+            //
+            iSession->MyServer().AppendBMConnection( connId, 
                         snap, 
                         validateIapId, 
                         EStarting,
                         *iSession );
-                ChooseIapComplete( KErrNone, &iChooseIapPref );
-
-                }
-
+            ChooseIapComplete( KErrNone, &iChooseIapPref );
             }
         }
 
@@ -631,26 +601,18 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMIapSelection::StartWlanQueryIfNeededL
+// CMPMIapSelection::IsIapWlanL
 // -----------------------------------------------------------------------------
 //
-TBool CMPMIapSelection::StartWlanQueryIfNeededL( TUint32 aIapId, TBool aIsRoaming )
+TBool CMPMIapSelection::IsIapWlanL( TUint32 aIapId )
     {
-    MPMLOGSTRING3( "CMPMIapSelection::StartWlanQueryIfNeededL iap %d, isRoaming %d ", 
-                   aIapId,
-                   aIsRoaming )
-    TBool wlanQueryNeeded( EFalse );
-    // If wlan iap check if offline note needed
+    MPMLOGSTRING2( "CMPMIapSelection::StartWlanQueryIfNeededL iap %d, ", aIapId)
     TWlanIapType wlanType = iCommsDatAccess->CheckWlanL( aIapId );
-    if( wlanType != ENotWlanIap )
+    if( wlanType != EWlanIap )
         {
-        iIsRoaming = aIsRoaming;
-        iChooseIapState = EExplicitConnection;
-        iWlanDialog = CMPMWlanQueryDialog::NewL( *this, aIapId );
-        iWlanDialog->StartWlanQueryL();
-        wlanQueryNeeded = ETrue;
+        return EFalse;
         }
-    return wlanQueryNeeded;
+    return ETrue;
     }
 
 // -----------------------------------------------------------------------------
@@ -659,8 +621,6 @@
 //
 void CMPMIapSelection::ImplicitConnectionCheckWlanScanNeededL()
     {
-    __ASSERT_DEBUG( !iDialog, PanicServer( EMPMReceiveAlreadyActive ) );
-
     MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionCheckWlanScanNeededL" )
 
     iCommsDatAccess->CheckWLANIapL( *iSession );
@@ -729,33 +689,6 @@
     const TMpmConnPref* aPolicyPref )
     {
     MPMLOGSTRING2( "CMPMIapSelection::ChooseIapComplete aError = %d", aError )
-    
-    if ( ( aError == KErrNone ) &&
-        !( iChooseIapPref.NoteBehaviour() &
-           TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
-        {
-        TConnectionState state =
-            iSession->MyServer().CheckUsageOfIap( aPolicyPref->IapId(), 
-                                                  iSession->ConnectionId() );
-        TBool connectionAlreadyActive = (state == EStarted || state == EStarting || state == ERoaming);
-        if ( !connectionAlreadyActive &&
-                ( iSession->IsMMSIap( aPolicyPref->IapId() ) == EFalse ) )
-            {
-            CConnectionUiUtilities* connUiUtils( NULL );
-            TRAPD( popupError, connUiUtils = CConnectionUiUtilities::NewL() );
-            if ( popupError == KErrNone )
-        	    {
-            	connUiUtils->ConnectingViaDiscreetPopup( aPolicyPref->IapId() );
-               	delete connUiUtils;
-        	    }
-            }
-        }
-    
-    if( iWlanDialog )
-        {
-        delete iWlanDialog;
-        iWlanDialog = NULL;
-        }
 
     iSession->ChooseIapComplete( aError, aPolicyPref );
     // Set choose iap state to none
@@ -766,63 +699,6 @@
     iImplicitState = EImplicitStart;
     }
 
-
-// -----------------------------------------------------------------------------
-// CMPMIapSelection::UserWlanSelectionDoneL
-// -----------------------------------------------------------------------------
-//
-void CMPMIapSelection::UserWlanSelectionDoneL( TInt aError, TUint32 aIapId )
-    {
-    MPMLOGSTRING( "CMPMIapSelection::UserWlanSelectionDoneL" )
-
-    if( iIsRoaming )
-        {
-        iIsRoaming = EFalse;
-        iSession->MigrateCallbackL( aError );
-        delete iWlanDialog;
-        iWlanDialog = NULL;
-        }
-    else
-        {
-        if( aError != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMIapSelection::UserWlanSelectionDoneL - Error = %d, completing", aError ) 
-            ChooseIapComplete( aError, NULL );        
-            }
-        else
-            {
-            if( iChooseIapState == EImplicitConnection )
-                {
-                iUserSelectionIapId = aIapId;
-                ImplicitConnectionL();    
-                }
-            else if( iChooseIapState == EExplicitConnection )
-                {
-                MPMLOGSTRING( "CMPMIapSelection::UserWlanSelectionDoneL completing explicit iap connection" ) 
-                iChooseIapPref.SetIapId( aIapId );
-                // Add info into the BM connections
-                //
-                iSession->MyServer().AppendBMConnection( iSession->ConnectionId(), 
-                                                         iChooseIapPref.SnapId(),
-                                                         aIapId,
-                                                         EStarting,
-                                                         *iSession );
-                iWlanDialog->StoreEasyWlanSelectionL();
-                delete iWlanDialog;
-                iWlanDialog = NULL;
-
-                ChooseIapComplete( KErrNone, &iChooseIapPref );
-                }
-            else
-                {
-                MPMLOGSTRING( "CMPMIapSelection::UserWlanSelectionDoneL - error, no connection state" ) 
-                }
-            
-            }
-        
-        }
-    }
-
 // -----------------------------------------------------------------------------
 // CMPMIapSelection::HandleUserSelectionError
 // -----------------------------------------------------------------------------
@@ -833,8 +709,6 @@
         aError )
     
     ChooseIapComplete( aError, NULL );
-    delete iDialog;
-    iDialog = NULL;
     }
 
        
@@ -858,7 +732,7 @@
         // User selected SNAP
         // 
         TMpmConnPref userPref;
-        iUserSelectionSnapId = iCommsDatAccess->MapNetIdtoSnapAPL( aId );
+        iUserSelectionSnapId = aId;
         userPref.SetSnapId( iUserSelectionSnapId );
         userPref.SetIapId( 0 );
 
@@ -883,12 +757,7 @@
 
         }
     
-    // We are done
-    // 
-    delete iDialog;
-    iDialog = NULL;
-    
-    // Dialog is deleted. Letting a function leave here would panic the whole MPM.
+    // Letting a function leave here would panic the whole MPM.
     //
     TRAPD( err, ImplicitConnectionL() );
     if( err != KErrNone )
@@ -906,15 +775,10 @@
     MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionWlanNoteL" )
     
     TWlanIapType wlanType = iCommsDatAccess->CheckWlanL( iUserSelectionIapId );
-    // In case offline mode is enabled, only LAN or WLAN is allowed.
-    // If some other bearer has been requested, then error code 
-    // KErrGprsOfflineMode should be returned instead of KErrNone.
-    // 
+
     if( wlanType != ENotWlanIap )
         {
-        iChooseIapState = EImplicitConnection;
-        iWlanDialog = CMPMWlanQueryDialog::NewL( *this, iUserSelectionIapId );
-        iWlanDialog->StartWlanQueryL();
+        ImplicitConnectionL();
         return;                
         }
     else
@@ -932,7 +796,7 @@
                 // Check that queries aren't disabled and
                 // enough time has elapsed from the last query cancelled by the user.
                 if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
-                        !iSession->MyServer().IsConnPermQueryTimerOn() )
+                     !iSession->MyServer().IsConnPermQueryTimerOn() )
                     {
                     TConnectionId connId = iSession->ConnectionId();
                                                                     
@@ -977,8 +841,8 @@
                                    iapTypeLanOrWlan,
                                    *iSession );
                                    
-    if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() ||            
-            iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) )
+    if ( !iapTypeLanOrWlan &&            
+            iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown )
         {
         MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i",
                 KErrGprsOfflineMode )
@@ -1000,14 +864,6 @@
         iChooseIapPref.SetIapId( iUserSelectionIapId );
         iChooseIapPref.SetNetId( retNetId );
             
-        
-        if( iWlanDialog )
-            {
-            iWlanDialog->StoreEasyWlanSelectionL();
-            delete iWlanDialog;
-            iWlanDialog = NULL;
-            }
-        
         ChooseIapComplete( KErrNone, &iChooseIapPref );
         }
     
@@ -1022,13 +878,14 @@
     MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionIapSelectionL" )
     iSession->AvailableUnblacklistedIapsL( iStoredAvailableIaps, iSession->ConnectionId() );
 
-    // Create and initiate user dialog
-    //
-    iDialog = CMPMDialog::NewL( *this,
-                                iStoredAvailableIaps,
-                                iChooseIapPref.BearerSet(),
-                                *iSession->MyServer().ConnectDialogQueue(),
-                                iSession->MyServer() );
+    // The connection selection dialog doesn't exist any longer, thus
+    // the HandleUserSelection is called with the Internet SNAP that is returned instead
+    TInt err = KErrNone;
+    TInt internetSnapId = 0;
+    // if the reading leaves, then the internet snap did not exist for some reason
+    TRAP ( err, internetSnapId = 
+        iCommsDatAccess->DestinationIdL( CMManager::ESnapPurposeInternet ));
+    HandleUserSelectionL( false, internetSnapId, err );
     }
 
 // -----------------------------------------------------------------------------
--- a/bearermanagement/mpm/src/mpmofflinewatcher.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Listens central repository for offline mode changes.
- *
- */
-
-#include <e32base.h>
-#include <centralrepository.h>
-#include <CoreApplicationUIsSDKCRKeys.h>
-#include <featmgr.h>
-
-#include "mpmlogger.h"
-#include "mpmserver.h"
-#include "mpmofflinewatcher.h"
-
-// ---------------------------------------------------------------------------
-// Default C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CMpmOfflineWatcher::CMpmOfflineWatcher( CMPMServer* aServer ) :
-    CActive( EPriorityStandard ), iServer( aServer )
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::CMpmOfflineWatcher" )
-
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor. Creates a central repository object.
-// ---------------------------------------------------------------------------
-//
-void CMpmOfflineWatcher::ConstructL()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::ConstructL" )
-
-    FeatureManager::InitializeLibL();
-    // If feature isn't supported, then no watching, but return in StartL().
-    iOfflineFeatureSupported = FeatureManager::FeatureSupported( 
-                               KFeatureIdOfflineMode );
-    FeatureManager::UnInitializeLib();
-
-        
-    iRepository = CRepository::NewL( KCRUidCoreApplicationUIs );
-    }
-
-// ---------------------------------------------------------------------------
-// Creates a new object by calling the two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CMpmOfflineWatcher* CMpmOfflineWatcher::NewL( CMPMServer* aServer )
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::NewL" )
-
-    CMpmOfflineWatcher* self = new( ELeave ) CMpmOfflineWatcher( aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CMpmOfflineWatcher::~CMpmOfflineWatcher()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::~CMpmOfflineWatcher" )
-
-    Cancel();
-    delete iRepository;
-    }
-
-// ---------------------------------------------------------------------------
-// Order notification from changes.
-// ---------------------------------------------------------------------------
-//
-void CMpmOfflineWatcher::StartL()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::StartL" )
-            
-    if ( !iOfflineFeatureSupported )
-        {
-        return;
-        }
-
-    // Get the initial data usage value from repository.
-    User::LeaveIfError( GetCurrentOfflineValue() );
-    iServer->UpdateOfflineMode( iOfflineMode );
-    
-    // Request notifications.
-    User::LeaveIfError( RequestNotifications() );
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Event is received when there is a change in central repository key.
-// ---------------------------------------------------------------------------
-//
-void CMpmOfflineWatcher::RunL()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::RunL" )
-
-    if ( iStatus.Int() < KErrNone )
-        {
-        MPMLOGSTRING2("Status: 0x%08X", iStatus.Int())
-        iErrorCounter++;
-        if ( iErrorCounter > KMpmOfflineWatcherCenRepErrorThreshold )
-            {
-            MPMLOGSTRING2("Over %d consecutive errors, stopping notifications permanently.",
-                    KMpmOfflineWatcherCenRepErrorThreshold)
-            return;
-            }
-        // Else: Error occured but counter not expired. Proceed.
-        }
-    else
-        {
-        // Notification is received ok => Reset the counter.
-        iErrorCounter = 0;
-
-        // Check if mode has changed (it should).
-        TInt oldMode = iOfflineMode;
-        
-        TInt err = GetCurrentOfflineValue();
-        if ( err == KErrNone && oldMode != iOfflineMode )
-            {
-            iServer->UpdateOfflineMode( iOfflineMode );
-            }
-        }
-    
-    RequestNotifications();
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Cancel the outstanding request.
-// ---------------------------------------------------------------------------
-//
-void CMpmOfflineWatcher::DoCancel()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::DoCancel" )
-
-    iRepository->NotifyCancel( KCoreAppUIsNetworkConnectionAllowed );
-    }
-
-// ---------------------------------------------------------------------------
-// Request for notifications.
-// ---------------------------------------------------------------------------
-//
-TInt CMpmOfflineWatcher::RequestNotifications()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::RequestNotifications" )
-
-    TInt err = iRepository->NotifyRequest( KCoreAppUIsNetworkConnectionAllowed, iStatus );
-        
-    if ( err == KErrNone )
-        {
-        SetActive();
-        }
-    else
-        {
-        // MPM's offline mode watching wouldn't recover... 
-        MPMLOGSTRING2( "CMpmOfflineWatcher::RequestNotifications, ERROR: %d", err )
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Get the current repository key value.
-// ---------------------------------------------------------------------------
-//
-TInt CMpmOfflineWatcher::GetCurrentOfflineValue()
-    {
-    MPMLOGSTRING( "CMpmOfflineWatcher::GetCurrentOfflineValue" )
-
-    TInt err = iRepository->Get( KCoreAppUIsNetworkConnectionAllowed, iOfflineMode );
-        
-    if ( err != KErrNone )
-        {
-        MPMLOGSTRING2( "CMpmOfflineWatcher::GetCurrentOfflineValue, ERROR: %d", err )
-        }
-    return err;
-    }
--- a/bearermanagement/mpm/src/mpmserver.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -34,20 +34,18 @@
 #include "mpmlogger.h"
 #include "mpmdtmwatcher.h"
 #include "mpmroamingwatcher.h"
-#include "mpmdisconnectdlg.h"
 #include "mpmconfirmdlgroaming.h"
 #include "mpmconfirmdlgstarting.h"
-#include "mpmdefaultconnection.h"
 #include "mpmcommsdataccess.h"
-#include "mpmwlanquerydialog.h"
-#include "mpmdialog.h"
 #include "mpmprivatecrkeys.h"
 #include "mpmcsidwatcher.h"
+#include "mpmvpntogglewatcher.h"
 #include "mpmdatausagewatcher.h"
 #include "mpmpropertydef.h"
-#include "mpmofflinewatcher.h"
 #include "mpmconnpermquerytimer.h"
 
+static const TUint32 KUidKmdServer = 0x1000088A;
+    
 // ============================= LOCAL FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -87,15 +85,23 @@
       iTSYLoaded( EFalse ),
       iPacketServLoaded( EFalse ), 
       iDtmWatcher( NULL ), 
+      iRoamingWatcher( NULL ),
       iWLANScanRequired( EFalse ), 
-      iDisconnectQueue( NULL ), 
       iRoamingQueue( NULL ), 
       iStartingQueue( NULL ),
-      iWlanQueryQueue( NULL ),
-      iConnectDialogQueue( NULL ),
-      iDefaultConnection( NULL ), 
       iConnectionCounter( 0 ),
-      iOfflineMode( ECoreAppUIsNetworkConnectionAllowed )
+      iUserConnection( EFalse ),
+      iUserConnectionInInternet( EFalse ),
+      iVpnUserConnectionSessionCount( 0 ),
+      iMpmCsIdWatcher( NULL ),
+      iMpmVpnToggleWatcher( NULL ),
+      iMpmDataUsageWatcher( NULL ),
+      iCommsDatAccess( NULL ),
+      iConnUiUtils( NULL ),
+      iOfflineMode( ECoreAppUIsNetworkConnectionAllowed ),
+      iOfflineWlanQueryResponse( EOfflineResponseUndefined ),      
+      iRoamingToWlanPeriodic( NULL ),
+      iConnPermQueryTimer( NULL )
     {
     }
 
@@ -156,9 +162,6 @@
     iRoamingWatcher = CMPMRoamingWatcher::NewL(iMobilePhone);
 
     iCommsDatAccess = CMPMCommsDatAccess::NewL( );
-    
-    iDisconnectQueue = new ( ELeave ) CArrayPtrFlat<CMPMDisconnectDlg>( KGranularity );
-    iDisconnectQueue->Reset();
 
     iRoamingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgRoaming>( KGranularity );
     iRoamingQueue->Reset();
@@ -166,17 +169,12 @@
     iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); 
     iStartingQueue->Reset();
 
-    iWlanQueryQueue = new ( ELeave ) CArrayPtrFlat<CMPMWlanQueryDialog>( KGranularity );
-    iWlanQueryQueue->Reset();
-
-    iConnectDialogQueue = new ( ELeave ) CArrayPtrFlat<CMPMDialog>( KGranularity );
-    iConnectDialogQueue->Reset();
-    
-    iDefaultConnection = CMPMDefaultConnection::NewL( this );    
-
     // Create central repository watcher and start it
     iMpmCsIdWatcher = CMpmCsIdWatcher::NewL();
     iMpmCsIdWatcher->StartL();
+    
+    // Create VPN toggle central repository watcher and start it
+    iMpmVpnToggleWatcher = CMpmVpnToggleWatcher::NewL( *this );
 
     // Create another central repository watcher and start it
     TRAPD( duwErr, iMpmDataUsageWatcher = CMpmDataUsageWatcher::NewL( this ) );
@@ -190,50 +188,6 @@
         MPMLOGSTRING( "CMPMServer::ConstructL: CMpmDataUsageWatcher::NewL() failed!" )
         }
 
-    // Create another central repository watcher and start it
-    TRAPD( owErr, iMpmOfflineWatcher = CMpmOfflineWatcher::NewL( this ) );
-    if (owErr == KErrNone)
-        {
-        iMpmOfflineWatcher->StartL();
-        }
-    else
-        {
-        iMpmOfflineWatcher = NULL;
-        MPMLOGSTRING( "CMPMServer::ConstructL: CMpmOfflineWatcher::NewL() failed!" )
-        }
-
-    // Define P&S keys (snap & iap) for the user connection
-    TInt ret = RProperty::Define( KMPMUserConnectionCategory,
-                                  KMPMPSKeyUserConnectionSnap,
-                                  KMPMUserConnectionSnapType,
-                                  KMPMUserConnectionReadPolicy,
-                                  KMPMUserConnectionWritePolicy );
-    
-    if ( (ret != KErrNone) && (ret != KErrAlreadyExists) )
-        {
-        User::Leave(err);
-        }
-    
-    ret = RProperty::Define( KMPMUserConnectionCategory,
-                             KMPMPSKeyUserConnectionIap,
-                             KMPMUserConnectionIapType,
-                             KMPMUserConnectionReadPolicy,
-                             KMPMUserConnectionWritePolicy );
-                                          
-    if ( (ret != KErrNone) && (ret != KErrAlreadyExists) )
-        {
-        User::Leave(err);
-        }
-
-    // Set initial values for the keys
-    User::LeaveIfError(RProperty::Set( KMPMUserConnectionCategory,
-                                       KMPMPSKeyUserConnectionSnap,
-                                       0 ));
-
-    User::LeaveIfError(RProperty::Set( KMPMUserConnectionCategory,
-                                       KMPMPSKeyUserConnectionIap,
-                                       0 ));
-
     // Read dedicated clients from the central repository
     CRepository* repository = CRepository::NewL( KCRUidMPM );
     
@@ -241,7 +195,7 @@
     
     TUint32 baseKey = KMpmDedicatedClientBase;
     TInt value;
-    ret = KErrNone;
+    TInt ret = KErrNone;
     
     while ( ret == KErrNone )
         {
@@ -257,46 +211,8 @@
         }
     
     CleanupStack::PopAndDestroy ( repository );
-    
-    // Define P&S keys for the connection dialogs
-    ret = RProperty::Define( KMPMActiveConnectionCategory,
-                             KMPMPSKeyActiveConnectionIap,
-                             KMPMActiveConnectionIapType,
-                             KMPMActiveConnectionReadPolicy,
-                             KMPMActiveConnectionWritePolicy );
-    
-    if ( (ret != KErrNone) && (ret != KErrAlreadyExists) )
-        {
-        User::Leave(err);
-        }
-    
-    ret = RProperty::Define( KMPMActiveConnectionCategory,
-                             KMPMPSKeyActiveConnectionSnap,
-                             KMPMActiveConnectionSnapType,
-                             KMPMActiveConnectionReadPolicy,
-                             KMPMActiveConnectionWritePolicy );
-    
-    if ( (ret != KErrNone) && (ret != KErrAlreadyExists) )
-        {
-        User::Leave(err);
-        }
-
-    ret = RProperty::Define( KMPMActiveConnectionCategory,
-                             KMPMPSKeyActiveConnectionBearer,
-                             KMPMActiveConnectionBearerType,
-                             KMPMActiveConnectionReadPolicy,
-                             KMPMActiveConnectionWritePolicy );
-                                          
-    if ( (ret != KErrNone) && (ret != KErrAlreadyExists) )
-        {
-        User::Leave(err);
-        }
         
-    PublishActiveConnection();
-    
-    iRoamingToWlanPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-    iRoamingToHotspotWlanPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-            
+    iConnUiUtils = CConnectionUiUtilities::NewL();
     }
 
 
@@ -311,17 +227,6 @@
         iRoamingToWlanPeriodic->Cancel();
 		delete iRoamingToWlanPeriodic;
         }
-    if ( iRoamingToHotspotWlanPeriodic )
-        {
-        iRoamingToHotspotWlanPeriodic->Cancel();
-        delete iRoamingToHotspotWlanPeriodic;
-        }
-    if ( iDisconnectQueue )
-        {
-        iDisconnectQueue->ResetAndDestroy();
-        }
-    delete iDisconnectQueue;
-
     if ( iRoamingQueue )
         {
         iRoamingQueue->ResetAndDestroy();
@@ -334,18 +239,6 @@
         }
     delete iStartingQueue;
 
-    while ( iWlanQueryQueue && iWlanQueryQueue->Count() > 0 )
-        {
-        iWlanQueryQueue->Delete( 0 );
-        }
-    delete iWlanQueryQueue;
-    
-    if ( iConnectDialogQueue )
-        {
-        iConnectDialogQueue->ResetAndDestroy();
-        }
-    delete iConnectDialogQueue;
-
     delete iEvents;
 
     for ( TInt i = 0; i < iBlackListIdList.Count(); i++ )
@@ -368,21 +261,72 @@
     iMobilePhone.Close();
     iTelServer.Close();
     
-    delete iDefaultConnection;
-    
     delete iMpmCsIdWatcher;    
-    
+       
+    delete iMpmVpnToggleWatcher;
+ 
     delete iMpmDataUsageWatcher;    
 
-    delete iMpmOfflineWatcher;    
-
     iDedicatedClients.Close();
 
     delete iCommsDatAccess;
     
+    delete iConnUiUtils;
+    
     delete iConnPermQueryTimer;
     }
 
+// -----------------------------------------------------------------------------
+// CMPMServer::SetVpnToggleValuesL
+// -----------------------------------------------------------------------------
+//
+void CMPMServer::SetVpnToggleValuesL( const TBool aVpnPreferred,
+                                      const TUint32 /*aVpnIapId*/,
+                                      const TUint32 /*aSnapId*/ )
+    {
+    MPMLOGSTRING2("CMPMServer::SetVpnToggleValues, VPN connection preferred: %d",
+            aVpnPreferred)
+    if ( aVpnPreferred )
+        {
+        // Stop Internet connections, except if VPN user connection
+        // would not be made with current preferences when reconnecting.
+        for (TInt index = 0; index < iSessions.Count(); index++)
+            {
+            CMPMServerSession* session = iSessions[index];
+            TUint32 iapId = GetBMIap( session->ConnectionId() );
+            TUint32 snapId = GetBMSnap( session->ConnectionId() );
+            
+            if ( (session->ChooseBestIapCalled()) &&
+                 (!session->IapSelectionL()->MpmConnPref().MandateIap()) &&
+                 (session->AppUid() != KUidKmdServer) &&                 
+                 (!session->UserConnection()) &&                 
+                 iCommsDatAccess->IsInternetSnapL(iapId, snapId) )
+                {
+                // Stop connection.
+                MPMLOGSTRING2( "CMPMServer::SetVpnToggleValuesL: \
+ Disconnected Connection Id = 0x%x", session->ConnectionId() )            
+                session->ClientErrorNotificationL(KErrForceDisconnected);
+                }
+            }        
+        }
+    else
+        {
+        // Stop connections, which use VPN user connection.
+        for (TInt index = 0; index < iSessions.Count(); index++)
+            {
+            CMPMServerSession* session = iSessions[index];
+            if ( session->VpnUserConnectionUsed() )
+                {
+                session->SetVpnUserConnectionUsed( EFalse );                    
+                // Stop connection.
+                MPMLOGSTRING2( "CMPMServer::SetVpnToggleValuesL: \
+ Disconnected Connection Id = 0x%x", session->ConnectionId() )            
+                session->ClientErrorNotificationL(KErrForceDisconnected);
+                }
+            }
+        ASSERT( iVpnUserConnectionSessionCount == 0 );
+        }    
+    }
 
 // -----------------------------------------------------------------------------
 // CMPMServer::NewSessionL
@@ -473,11 +417,6 @@
             }
         }
 
-    if ( aState == EStarted && aSession.ChooseBestIapCalled() )
-        {
-        UpdateActiveConnection( aSession );
-        }
-
 #ifdef _DEBUG
     // Dump array of active connections to log in order to support testing.
     // 
@@ -492,7 +431,7 @@
 //
 void CMPMServer::ResetBMConnection( const TConnectionId aConnId,
                                     const TUint32       aIapId,
-                                    CMPMServerSession&  aSession )
+                                    CMPMServerSession&  /*aSession*/ )
     {
     MPMLOGSTRING3(
         "CMPMServer::ResetBMConnection - aConnId = 0x%x, aIapId = %i", 
@@ -528,12 +467,6 @@
         //
         iActiveBMConns[index1].iConnInfo.iIapId = 0;
         iActiveBMConns[index1].iConnInfo.iState = EIdle;
-        
-        // Change state of P&S keys if needed
-        if ( aSession.ChooseBestIapCalled() )
-            {
-            UpdateActiveConnection( aSession );
-            }
         }
 #ifdef _DEBUG
     // Dump array of active connections to log in order to support testing.
@@ -548,38 +481,31 @@
 // -----------------------------------------------------------------------------
 //
 void CMPMServer::RemoveBMConnection( const TConnectionId aConnId,
-                                     CMPMServerSession&  aSession )
+                                     CMPMServerSession&  /*aSession*/ )
     {
     MPMLOGSTRING2( "CMPMServer::RemoveBMConnection - aConnId = 0x%x", 
         aConnId )
 
+    TInt count = iActiveBMConns.Count();
+    
+    // Decrement by one, because count is n, 
+    // but indexes in array are 0 .. n-1.
+    // 
+    count--;
+
     // This time we are browsing the array from the end to the beginning, 
     // because removing one element from array affects index numbering.
-    // Decrement i by one, because count is n, but indexes in array are 0 .. n-1
-    for ( TInt i = iActiveBMConns.Count() - 1; i >= 0; i-- )
+    // 
+    for ( TInt i = count; i >= 0; i-- )
         {
         if ( iActiveBMConns[i].iConnInfo.iConnId == aConnId )
             {
-            
-            TInt closeIapId = iActiveBMConns[i].iConnInfo.iIapId;
-            if ( !closeIapId )
-                {
-                TRAP_IGNORE( closeIapId = aSession.IapSelectionL()->MpmConnPref().IapId() );
-                }
-
             // If Connection Id found, remove it. 
+            //
             iActiveBMConns.Remove( i );
-            
-            // Update active connection
-            if ( aSession.ChooseBestIapCalled() )
-                {
-                UpdateActiveConnection( aSession );
-                }
-            
-            CheckIapForDisconnect( closeIapId );
             }
         }
-    
+
 #ifdef _DEBUG
     // Dump array of active connections to log in order to support testing.
     // 
@@ -598,6 +524,7 @@
     TUint32 connectionIapId( 0 );
 
     // Set the Connection Id and SNAP
+    // 
     TConnectionInfo connInfo;
     connInfo.iConnId = aConnId;
 
@@ -609,6 +536,7 @@
     if ( ( index1 != KErrNotFound ) && ( index1 < iActiveBMConns.Count() ) )
         {
         // If connInfo found, set the Iap Id as connectionIapId
+        //
         connectionIapId = iActiveBMConns[index1].iConnInfo.iIapId;
         }
 
@@ -706,25 +634,26 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::CheckUsageOfIap
+// CMPMServer::CheckIfStarted
 // -----------------------------------------------------------------------------
 //
-TConnectionState CMPMServer::CheckUsageOfIap( const TUint32 aIapId , 
-                                  const TConnectionId aOwnConnId )
+TBool CMPMServer::CheckIfStarted( const TUint32 aIapId , 
+                                  const TConnectionId aConnId )
     {
-    MPMLOGSTRING3( "CMPMServer::CheckUsageOfIap - aIapId = %i, aOwnConnId = 0x%x", 
-                  aIapId, aOwnConnId )
+    MPMLOGSTRING3( "CMPMServer::CheckIfStarted - aIapId = %i, aConnId = 0x%x", 
+                  aIapId, aConnId )
 
-    TConnectionState state = EIdle;
+    TConnectionState state( EIdle );
+    TBool stopLoop( EFalse );
 
     // Loop all connections until EStarted is found or no more connections
     // 
-    for ( TInt i = 0; i < iActiveBMConns.Count(); i++ )
+    for ( TInt i = 0; ( ( i < iActiveBMConns.Count() ) && !stopLoop ); i++ )
         {
         // Check if IAP Id matches; exclude matching with own connection
         // 
         if ( iActiveBMConns[i].iConnInfo.iIapId == aIapId && 
-             iActiveBMConns[i].iConnInfo.iConnId != aOwnConnId)
+             iActiveBMConns[i].iConnInfo.iConnId != aConnId)
             {
             state = iActiveBMConns[i].iConnInfo.iState;  
 
@@ -732,7 +661,7 @@
             // 
             if ( state == EStarted )
                 {
-                break; // Breaks the for loop
+                stopLoop = ETrue;
                 }
             }
         }
@@ -742,33 +671,44 @@
         {
         case EStarting:
             {
-            MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Starting" )
+            MPMLOGSTRING( "CMPMServer::CheckIfStarted - Starting" )
             break;
             }
         case EStarted:
             {
-            MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Started" )
+            MPMLOGSTRING( "CMPMServer::CheckIfStarted - Started" )
             break;
             }
         case EIdle:
             {
-            MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Idle" )
+            MPMLOGSTRING( "CMPMServer::CheckIfStarted - Idle" )
             break;
             }
         case ERoaming:
             {
-            MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Roaming" )
+            MPMLOGSTRING( "CMPMServer::CheckIfStarted - Roaming" )
             break;
             }
         default:
             {
-            MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Unknown" )
+            MPMLOGSTRING( "CMPMServer::CheckIfStarted - Unknown" )
             break;
             }
         }
 #endif // _DEBUG
         
-    return state;
+    //Return true incase the matching connection is in EStarting state also because
+    //sometimes when connections are started simultaneously (for same iapID) 
+    //the first connection may still be in EStarting state. 
+    //
+    if ( state == EStarted || state == EStarting )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -850,11 +790,6 @@
             }
         }
 
-    if ( aSession.ChooseBestIapCalled() )
-        {
-        UpdateActiveConnection( aSession );
-        }
-
 #ifdef _DEBUG
     // Dump array of active connections to log in order to support testing.
     // 
@@ -869,19 +804,29 @@
 //
 void CMPMServer::RemoveBMIAPConnection( const TUint32       aIapId, 
                                         const TConnectionId aConnId,
-                                        CMPMServerSession&  aSession )
+                                        CMPMServerSession&  /*aSession*/ )
     {
     MPMLOGSTRING3(
         "CMPMServer::RemoveBMIAPConnection - aIapId = %i, aConnId = 0x%x", 
         aIapId, aConnId )
 
+    TActiveBMConn conn;
+    conn.iConnInfo.iIapId = aIapId;
+
     // The IAP connection lifetime is determined by the two calls 
     // IAPConnectionStarted and IAPConnectionStopped. 
+    //
+    TInt count = iActiveBMConns.Count();
+
+    // Decrement by one, because count is n, 
+    // but indexes in array are 0 .. n-1.
+    // 
+    count--;
 
     // This time we are browsing the array from the end to the beginning, 
     // because removing one element from array affects index numbering.
-    // Decrement i by one, because count is n, but indexes in array are 0 .. n-1
-    for ( TInt i = iActiveBMConns.Count() - 1; i >= 0; i-- )
+    // 
+    for ( TInt i = count; i >= 0; i-- )
         {
         if ( iActiveBMConns[i].iConnInfo.iIapId == aIapId )
             {
@@ -905,12 +850,6 @@
                     iActiveBMConns[i].iConnInfo.iState = EIdle;
                     }
                 }
-            
-            // Update active connection
-            if ( aSession.ChooseBestIapCalled() )
-                {
-                UpdateActiveConnection( aSession );
-                }
             }
         }
 
@@ -964,7 +903,7 @@
     MPMLOGSTRING2( "CMPMServer::NotifyBMPrefIapL - IAPs count: %d", 
         aIapInfo.iCount)
     TConnMonIapInfo iapInfo = aIapInfo;
-    iConnMonIapInfo = aIapInfo;
+    
 #ifdef _DEBUG
     for (TUint i = 0; i < iapInfo.Count(); i++)
         {
@@ -973,62 +912,37 @@
         }
 #endif // _DEBUG
 
-    // Read info for forced roaming from Commdat
-    TUint32 maxOpenTransAttempts ( KMaxOpenTransAttempts ) ;
-    TUint32 retryAfter ( KRetryAfter );
-    TInt err;
-    // CommDat reading might fail because CommDat session could be locked by another process at the moment
-    // So, we may wait/retry to read from CommDat a bit later.
-    TCmUsageOfWlan usageOfWlan ( ECmUsageOfWlanKnown );
-    do
+    // Start possible forced roaming
+    TCmUsageOfWlan usageOfWlan = CommsDatAccess()->ForcedRoamingL();
+    if ( usageOfWlan == ECmUsageOfWlanKnown || usageOfWlan == ECmUsageOfWlanKnownAndNew )
         {
-        TRAP ( err, usageOfWlan = CommsDatAccess()->ForcedRoamingL() );
-        
-        if( err )
+        if ( IsWlanConnectionStartedL( CommsDatAccess() ) )
             {
-            User::After( retryAfter );
-            }
-        } while( err && maxOpenTransAttempts-- );
-    
-    // Start possible forced roaming
-    if ( !err )
-        {
-        if ( usageOfWlan == ECmUsageOfWlanKnown || usageOfWlan == ECmUsageOfWlanKnownAndNew )
-            {
-            if ( IsWlanConnectionStartedL( CommsDatAccess() ) )
+            iConnMonIapInfo = aIapInfo;
+                
+            if ( iRoamingToWlanPeriodic )
                 {
                 iRoamingToWlanPeriodic->Cancel();
-                iRoamingToHotspotWlanPeriodic->Cancel();
-                        
-                // Start periodic object that calls StartForcedRoamingToWlanL after 10s. 
-                // this handles the case when new wlan connection is 
-                // started from e.g. wlan sniffer but IAP is not yet in Internet SNAP 
-                iRoamingToWlanPeriodic->Start( 
-                        TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), 
-                        TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), 
-                        TCallBack( StartForcedRoamingToConnectedWlanL, this ) );
-                
-                // Start periodic object that calls StartForcedRoamingToWlanL after 120s. 
-                // this handles the case when new captive portal hotspot wlan 
-                // connection is started. IAP will be moved to Internet SNAP after 
-                // successful login only. 
-                iRoamingToHotspotWlanPeriodic->Start( 
-                        TTimeIntervalMicroSeconds32( KRoamingToHotspotWlanUpdateInterval ), 
-                        TTimeIntervalMicroSeconds32( KRoamingToHotspotWlanUpdateInterval ), 
-                        TCallBack( StartForcedRoamingToConnectedHotspotWlanL, this ) );
                 }
             else
                 {
-                StartForcedRoamingToWlanL( iapInfo );
+                iRoamingToWlanPeriodic = CPeriodic::NewL( 
+                                                   CActive::EPriorityStandard );
                 }
-
-            StartForcedRoamingFromWlanL( iapInfo );
+            // start periodic object that calls StartForcedRoamingToWlanL after 10s. 
+            // this handles the case when new wlan connection is 
+            // started from e.g. wlan sniffer but IAP is not yet in Internet SNAP 
+            iRoamingToWlanPeriodic->Start( 
+                   TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), 
+                   TTimeIntervalMicroSeconds32( KRoamingToWlanUpdateInterval ), 
+                   TCallBack( StartForcedRoamingToConnectedWlanL, this ) );
             }
-        }
-    else
-        {
-        MPMLOGSTRING2( "CMPMServer::NotifyBMPrefIapL - \
-reading info for forced roaming fails with err %d, forced roaming fails", err )
+        else
+            {
+            StartForcedRoamingToWlanL( iapInfo );
+            }
+
+        StartForcedRoamingFromWlanL( iapInfo );
         }
     
     MPMLOGSTRING2(
@@ -1040,65 +954,6 @@
         iapInfo = iSessions[i]->GetAvailableIAPs( );
         iSessions[i]->PrefIAPNotificationL( iapInfo, aCaller );
         }
-
-    // If a session is displaying connection selection dialog 
-    // the contents of the dialog should be updated according to the 
-    // current iap availability
-    //
-    for ( TInt i( 0 ); i < iSessions.Count(); i++ )
-        {
-        iSessions[i]->UpdateConnectionDialogL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::UpdateSessionConnectionDlgL
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::UpdateSessionConnectionDlgL()
-    {
-    MPMLOGSTRING( "CMPMServer::UpdateSessionConnectionDlgL" )
-
-    // If a session is displaying connection selection dialog 
-    // the contents of the dialog should be updated according to the 
-    // current iap availability
-    //
-    for ( TInt i( 0 ); i < iSessions.Count(); i++ )
-        {
-        iSessions[i]->UpdateConnectionDialogL();
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMServer::HandlePendingMsgs
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::HandlePendingMsgs( TUint            aIapId,
-                                    TInt             aError, 
-                                    TInt*            aErrorReturned,
-                                    TBMNeededAction* aNeededAction )
-    {
-    MPMLOGSTRING3( "CMPMServer::HandlePendingMsgs aError = %d iapId = %d", 
-                   aError, aIapId )
-
-    for ( TInt i( 0 ); i < iSessions.Count(); i++ )
-        {
-        // Read the Connection Id of the application
-        TConnectionId connId = iSessions[i]->ConnectionId();
-
-        // Get the current connection IapId for this connId 
-        TUint32 currentIap = iSessions[i]->MyServer().GetBMIap( connId );
-
-        MPMLOGSTRING2( "Session IapId = %d", currentIap );
-
-        if ( currentIap == aIapId && !iSessions[i]->ChooseBestIapCalled() )
-            {
-            iSessions[i]->ProcessErrorComplete( aError, 
-                                                aErrorReturned, 
-                                                aNeededAction );
-            }
-        }
     }
 
 
@@ -1198,7 +1053,7 @@
             connIdInfo.Close();
             return KErrNone;
             }
-        
+
         found = EFalse;
         for (TInt j = 0; j < connIdInfo.Count(); j++)
             {
@@ -1541,18 +1396,6 @@
 #endif // _DEBUG
     }
 
-
-// -----------------------------------------------------------------------------
-// CMPMServer::DefaultConnection
-// -----------------------------------------------------------------------------
-//
-CMPMDefaultConnection* CMPMServer::DefaultConnection()
-    {
-    MPMLOGSTRING( "CMPMServer::DefaultConnection:\
- Default Connection" )
-    return iDefaultConnection;
-    }
-
 // -----------------------------------------------------------------------------
 // CMPMServer::StartedConnectionExists
 // -----------------------------------------------------------------------------
@@ -1587,22 +1430,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::AppendWlanQueryQueueL
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::AppendWlanQueryQueueL( CMPMWlanQueryDialog* aDlg )
-    {
-    if( aDlg )
-        {
-        iWlanQueryQueue->AppendL( aDlg );
-        }
-    else
-        {
-        MPMLOGSTRING( "CMPMServer::AppendWlanQueryQueueL argument NULL, Error" )
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServer::StopConnections
 // -----------------------------------------------------------------------------
 //
@@ -1625,235 +1452,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::UpdateActiveConnection
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::UpdateActiveConnection( CMPMServerSession& aSession )
-    {
-    // Update active connection
-    TInt ret = KErrNone;
-            
-    TRAP ( ret, UpdateActiveConnectionL( aSession ) );
-            
-    if ( ret != KErrNone )
-        {
-        iActiveBearerType = EMPMBearerTypeNone;
-        iActiveIapId = 0;
-        iActiveSnapId = 0;            
-        }   
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::UpdateActiveConnectionL
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::UpdateActiveConnectionL( CMPMServerSession& aSession )
-    {
-    MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL" )
-
-    TBool keysUpToDate( ETrue );
-    
-    // number of active iaps
-    TInt numberOfActive = NumberOfActiveConnections( keysUpToDate );
-    
-    if ( numberOfActive == 0 )
-        {
-        // If no active connections then just reset keys and publish
-        iActiveBearerType = EMPMBearerTypeNone;
-        iActiveIapId = 0;
-        iActiveSnapId = 0;
-        PublishActiveConnection();
-        return;
-        }
-        
-    if ( keysUpToDate )
-        {
-        MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: already up-to-date" )
-        return;   
-        }
-
-    if ( numberOfActive > 1 )
-        {
-        // Check if all active connections are in same snap
-        TUint32 snapId;
-
-        if ( CommsDatAccess()->AreActiveIapsInSameSnapL(
-             iActiveBMConns, snapId, *this ) )
-            {
-            MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in one SNAP" )
-            // Select active connection according to priority
-            CommsDatAccess()->SelectActiveConnectionL (
-                snapId,
-                iActiveBMConns,
-                iActiveIapId,
-                iActiveSnapId,
-                iActiveBearerType,
-                aSession );
-
-            PublishActiveConnection();
-            return;
-            }
-        
-        MPMLOGSTRING( "CMPMServer::UpdateActiveConnectionL: Active iaps are in different SNAPs" )
-        }
-
-    // Reset active connections
-    iActiveBearerType = EMPMBearerTypeNone;
-    iActiveIapId = 0;
-    iActiveSnapId = 0;
-                
-    // Active connections locating in different snaps
-    // Use priority order vpn, wlan and packet
-    for ( TInt index = 0; index < iActiveBMConns.Count(); index++ )
-        {
-        CMPMServerSession* serverSession = GetServerSession(
-            iActiveBMConns[index].iConnInfo.iConnId );
-                     	
-        // Do check only for active connections
-        if ( iActiveBMConns[index].iConnInfo.iState == EStarted &&
-        	   serverSession->ChooseBestIapCalled() )
-            {
-            TMPMBearerType bearerType = EMPMBearerTypeOther;
-        
-            TInt ret = iDedicatedClients.Find( iActiveBMConns[index].iConnInfo.iAppUid );
-            if ( ret != KErrNotFound )
-                {
-                // Skip dedicated client
-                MPMLOGSTRING2( "Skip dedicated client = %d", iActiveBMConns[index].iConnInfo.iAppUid )
-                continue;
-                }
-
-            bearerType = CommsDatAccess()->GetBearerTypeL( 
-                         iActiveBMConns[index].iConnInfo.iIapId );
-        
-            if ( bearerType == EMPMBearerTypeOther )
-                {
-                // Don't publish this connection
-                continue;
-                }
-                    
-            // This is true if,
-            // bearer type is smaller or different than none
-            // or
-            // bearer type is same and iap is different.
-            if ( ( bearerType < iActiveBearerType ) || 
-                 ( iActiveBearerType == EMPMBearerTypeNone ) ||
-                 ( ( bearerType == iActiveBearerType) &&
-                   ( iActiveIapId != iActiveBMConns[index].iConnInfo.iIapId ) ) )
-                {
-                iActiveBearerType = bearerType;
-                iActiveIapId = iActiveBMConns[index].iConnInfo.iIapId;
-                iActiveSnapId = iActiveBMConns[index].iConnInfo.iSnap;
-                }
-            }
-        }
-    PublishActiveConnection();
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::MapBearerType
-// -----------------------------------------------------------------------------
-//
-TUint32 CMPMServer::MapBearerType(TMPMBearerType aBearerType)
-    {
-    MPMLOGSTRING( "CMPMServer::MapBearerType" )
-    
-    switch ( aBearerType )
-        {
-        case EMPMBearerTypeNone:
-            return 0;
-
-        case EMPMBearerTypeVpn:
-            return KCommDbBearerVirtual;
-            
-        case EMPMBearerTypeWlan:
-            return KCommDbBearerWLAN;
-            
-        case EMPMBearerTypePacketData:
-            return KCommDbBearerWcdma;
-
-        case EMPMBearerTypeOther:
-            return KCommDbBearerUnknown;
-            
-        default:
-            MPMLOGSTRING( "CMPMServer::MapBearerType: Unknown bearer type" )
-            break;
-        }
-    
-    return KCommDbBearerUnknown;
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::PublishActiveConnection
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::PublishActiveConnection()
-    {
-    MPMLOGSTRING( "CMPMServer::PublishActiveConnection" )
-    
-    // update active connection keys
-    RProperty::Set( KMPMActiveConnectionCategory,
-                    KMPMPSKeyActiveConnectionIap,
-                    iActiveIapId );
-
-    RProperty::Set( KMPMActiveConnectionCategory,
-                    KMPMPSKeyActiveConnectionSnap,
-                    iActiveSnapId );
-
-    RProperty::Set( KMPMActiveConnectionCategory,
-                    KMPMPSKeyActiveConnectionBearer,
-                    MapBearerType( iActiveBearerType ) );    
-
-    MPMLOGSTRING4( "CMPMServer::PublishActiveConnection: Set to: %d, %d, %d",
-                   iActiveIapId, iActiveSnapId, iActiveBearerType )
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMServer::NumberOfActiveConnections
-// Returns number of active iaps.
-// -----------------------------------------------------------------------------
-//
-TInt CMPMServer::NumberOfActiveConnections( TBool& aKeysUpToDate )
-    {
-    MPMLOGSTRING( "CMPMServer::NumberOfActiveConnections" )
-    
-    aKeysUpToDate = ETrue; 
-    TInt count( 0 );
-    RArray<TUint32> activeIaps;
-    
-    activeIaps.Reset();
-    
-    for ( TInt index = 0; index < iActiveBMConns.Count(); index++ )
-        {
-        CMPMServerSession* serverSession = GetServerSession(
-             iActiveBMConns[index].iConnInfo.iConnId );
-
-        if ( iActiveBMConns[index].iConnInfo.iState == EStarted &&
-             serverSession->ChooseBestIapCalled() )
-            {
-            TInt ret = activeIaps.Find( iActiveBMConns[index].iConnInfo.iIapId );
- 
-            if ( ret == KErrNotFound )
-                {        
-                activeIaps.Append ( iActiveBMConns[index].iConnInfo.iIapId ); 
-                count++;
-                }
-            
-            if ( iActiveIapId != iActiveBMConns[index].iConnInfo.iIapId )
-                 {
-                 // iap that is different from current active iap was found
-                 aKeysUpToDate = EFalse;
-                 }
-            }
-        }
-    
-    activeIaps.Close();
-    MPMLOGSTRING2( "CMPMServer::NumberOfActiveConnections: count = %d", count )
-    
-    return count;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServer::UserConnectionInInternet
 // -----------------------------------------------------------------------------
 //
@@ -1880,7 +1478,13 @@
 void CMPMServer::StartForcedRoamingToWlanL( const TConnMonIapInfo& aIapInfo )
     {
     MPMLOGSTRING( "CMPMServer::StartForcedRoamingToWlan" )
- 
+    
+    // cancel the periodic object
+    if ( iRoamingToWlanPeriodic )
+        {
+        iRoamingToWlanPeriodic->Cancel();
+        }
+
     // Copy all available wlan iap ids to own array
     RArray<TUint32> wlanIapIds;
     CleanupClosePushL( wlanIapIds );
@@ -1889,9 +1493,7 @@
 
     for ( TUint index = 0; index < aIapInfo.iCount; index++ )
         {
-        TWlanIapType iapType ( ENotWlanIap );
-        TRAPD (leave, iapType = CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) );
-        if ( ( iapType != ENotWlanIap ) && ( leave == KErrNone ) )
+        if ( CommsDatAccess()->CheckWlanL( aIapInfo.iIap[index].iIapId ) != ENotWlanIap )
             {
             // Accept only wlan iaps in internet snap
             if ( iCommsDatAccess->IsInternetSnapL( aIapInfo.iIap[index].iIapId, 0 ) )
@@ -1899,12 +1501,10 @@
                 wlanIapIds.AppendL( aIapInfo.iIap[index].iIapId );
                 }
             }
-        // Fill iap list to be used later to check best iap;
-        if ( leave == KErrNone )
-            {
-            iapList.AppendL( aIapInfo.iIap[index].iIapId );
-            }
+        // Fill iap list to be used later to check best iap
+        iapList.AppendL( aIapInfo.iIap[index].iIapId );
         }
+
     // No wlans available -> no reason to continue
     if ( !wlanIapIds.Count() )
         {
@@ -1949,33 +1549,17 @@
 //    
 TInt CMPMServer::StartForcedRoamingToConnectedWlanL( TAny* aUpdater )
     {
-    MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedWlanL" )
-    CMPMServer* self = static_cast<CMPMServer*>( aUpdater );
-    if ( self )
-        {
-        // cancel the periodic object        
-        self->iRoamingToWlanPeriodic->Cancel();
-        self->StartForcedRoamingToWlanL( self->iConnMonIapInfo );
-        }
+    MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedWlanL" );
+    static_cast<CMPMServer*>( aUpdater )->StartForcedRoamingToWlanL( 
+            static_cast<CMPMServer*>( aUpdater )->iConnMonIapInfo );
+    // Added also execution of policy based roaming logic because
+    // connections that are in EStarting state, when WLAN signal
+    // gets weak, would remain in WLAN as long as signal is weak. 
+    static_cast<CMPMServer*>( aUpdater )->StartForcedRoamingFromWlanL(
+            static_cast<CMPMServer*>( aUpdater )->iConnMonIapInfo );
     return 0;
     }
 
-// ---------------------------------------------------------------------------
-// CMPMServer::StartForcedRoamingToConnectedHotspotWlanL
-// ---------------------------------------------------------------------------
-//    
-TInt CMPMServer::StartForcedRoamingToConnectedHotspotWlanL( TAny* aUpdater )
-    {
-    MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedHotspotWlanL" )
-    CMPMServer* self = static_cast<CMPMServer*>( aUpdater );
-    if ( self )
-        {        
-        // cancel the periodic object
-        self->iRoamingToHotspotWlanPeriodic->Cancel();
-        self->StartForcedRoamingToWlanL( self->iConnMonIapInfo );
-        }
-    return 0;
-    }
 
 // -----------------------------------------------------------------------------
 // CMPMServer::StartForcedRoamingFromWlanL
@@ -2210,7 +1794,7 @@
 // Stop all cellular connections except MMS
 // ---------------------------------------------------------------------------
 //
-void CMPMServer::StopCellularConns( TBool aSilentOnly )
+void CMPMServer::StopCellularConns()
     {
     MPMLOGSTRING( "CMPMServer::StopCellularConns" )
 
@@ -2239,14 +1823,7 @@
                 if (!(err == KErrNone && iapId == mmsIap))
                     {
                     // Stop the conn / IAP.
-                    if ( aSilentOnly )
-                        {
-                        CheckIapForDisconnect( iapId );
-                        }
-                    else
-                        {
-                        StopConnections( iapId );
-                        }
+                    StopConnections( iapId );
                     stoppedIaps.Append( iapId );
                     }
                 }
@@ -2255,16 +1832,136 @@
     stoppedIaps.Close();
     }
 
+// -----------------------------------------------------------------------------
+// CMPMServer::AddVpnUserConnectionSession
+// -----------------------------------------------------------------------------
+//
+void CMPMServer::AddVpnUserConnectionSession()
+    {
+    iVpnUserConnectionSessionCount++;
+    }
+
+// -----------------------------------------------------------------------------
+// CMPMServer::RemoveVpnUserConnectionSession
+// -----------------------------------------------------------------------------
+//
+void CMPMServer::RemoveVpnUserConnectionSession()
+    {    
+    ASSERT( iVpnUserConnectionSessionCount > 0 );
+    iVpnUserConnectionSessionCount--;
+    }
+
+// ---------------------------------------------------------------------------
+// CMPMServer::UseVpnUserConnection
+// Informs if VPN user connection is used with given MPM preferences and
+// application.
+// ---------------------------------------------------------------------------
+//
+TBool CMPMServer::UseVpnUserConnection( const TMpmConnPref aMpmConnPref,
+                                        const TUint32 aAppUid ) const
+    {    
+    if ( iMpmVpnToggleWatcher->IsVpnConnectionPreferred() &&
+         !aMpmConnPref.MandateIap() &&
+         aAppUid != KUidKmdServer &&
+         aAppUid != iMpmCsIdWatcher->ConnectScreenId() )
+        {
+        // VPN connection is preferred connection, connection preferences are
+        // not mandatet and client is not KMD server or Connect Screen.            
+        if ( aMpmConnPref.ConnType() == TMpmConnPref::EConnTypeDefault ||
+             aMpmConnPref.ConnType() == TMpmConnPref::EConnTypeImplicit )
+            {
+            // Default or implicit connection is requested.
+            // VPN user connection is used.
+            return ETrue;
+            }
+        else
+            {
+            // Explicit connection is requested.
+            TBool internetSnap(EFalse);    
+            TRAPD( err, internetSnap = iCommsDatAccess->IsInternetSnapL( aMpmConnPref.IapId(),
+                                                                         aMpmConnPref.SnapId() ) );
+            if ( err == KErrNone &&
+                 internetSnap )
+                {
+                // Connection belongs to Internet SNAP.
+                // VPN user connection is used.
+                return ETrue;
+                }
+            }
+        }
+    
+    // VPN user connection is not used.
+    return EFalse;    
+    }
+
+// -----------------------------------------------------------------------------
+// CMPMServer::PrepareVpnUserConnection
+// -----------------------------------------------------------------------------
+//
+TBool CMPMServer::PrepareVpnUserConnection( TMpmConnPref& aMpmConnPref )
+    {
+    // Get VPN IAP Id or SNAP Id, which is used for VPN user connection. 
+    TUint32 vpnIapId = iMpmVpnToggleWatcher->VpnIapId();
+    TUint32 snapId = iMpmVpnToggleWatcher->SnapId();
+
+    // Check first if SNAP Id is set, in which case VPN IAP Id is ignored.
+    if ( snapId != 0 )
+        {
+        TBool intranetSnap( EFalse );   
+        TRAPD( err , intranetSnap = 
+            iCommsDatAccess->IsIntranetSnapL( snapId ) );
+        if ( (err != KErrNone) ||
+             (!intranetSnap) )
+            {
+            // SNAP is not intranet SNAP.
+            // Reset VPN toggle values and continue without using VPN user
+            // connection.
+            MPMLOGSTRING3( "CMPMServer::PrepareVpnUserConnection failed, \
+SNAP Id=%d, err=%d", snapId, err );
+        
+            iMpmVpnToggleWatcher->ResetVpnToggleValues();        
+            return EFalse;
+            }        
+        aMpmConnPref.SetIapId( 0 );
+        aMpmConnPref.SetSnapId( snapId );               
+        }
+    else
+        {
+        // Validate that IAP is VPN IAP. 
+        TMPMBearerType bearerType = EMPMBearerTypeNone;
+        TRAPD( err, bearerType = iCommsDatAccess->GetBearerTypeL( vpnIapId ) );        
+        if ( (err != KErrNone) ||
+             (bearerType != EMPMBearerTypeVpn) )
+            {        
+            // IAP is not valid VPN IAP.
+            // Reset VPN toggle values and continue without using VPN user
+            // connection.
+            MPMLOGSTRING4( "CMPMServer::PrepareVpnUserConnection failed, \
+IAP Id=%d, err=%d, bearerType=%d", vpnIapId, err, bearerType );
+        
+            iMpmVpnToggleWatcher->ResetVpnToggleValues();
+            return EFalse;
+            }
+        aMpmConnPref.SetIapId( vpnIapId );
+        aMpmConnPref.SetSnapId( 0 );            
+        }
+   
+    aMpmConnPref.SetConnType( TMpmConnPref::EConnTypeExplicit );
+    
+    // VPN user connection will be activated.
+    return ETrue;        
+    }
+
 // ---------------------------------------------------------------------------
 // CMPMServer::UpdateOfflineMode
 // Offline watcher listens the offline mode and calls this when it's changed.
 // ---------------------------------------------------------------------------
 //
-void CMPMServer::UpdateOfflineMode( TInt newModeValue )
+void CMPMServer::UpdateOfflineMode( TInt aNewModeValue )
     {
-    MPMLOGSTRING2( "CMPMServer::UpdateOfflineMode: Value %d", newModeValue )
+    MPMLOGSTRING2( "CMPMServer::UpdateOfflineMode: Value %d", aNewModeValue )
 
-    iOfflineMode = newModeValue;
+    iOfflineMode = aNewModeValue;
 
     if ( iOfflineMode == ECoreAppUIsNetworkConnectionAllowed )
         {
@@ -2380,79 +2077,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::CheckIapForDisconnect
-// -----------------------------------------------------------------------------
-//
-void CMPMServer::CheckIapForDisconnect( TInt aIapId )
-    {
-    MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - aIapId = 0x%x", 
-        aIapId )
-
-    // Fix for case ou1cimx1#468999: stop sessions to cellular iap
-    // when there is only silent connections to it, and cellular usage is set
-    // to always ask
-    
-    // Check iap type and usage policy
-    TMPMBearerType bearerType( EMPMBearerTypeNone );
-    TRAP_IGNORE( bearerType = CommsDatAccess()->GetBearerTypeL( aIapId ) );
-
-    TBool closeIap = ( bearerType == EMPMBearerTypePacketData
-                && DataUsageWatcher()->CellularDataUsage() == ECmCellularDataUsageConfirm ); 
-    
-    // No need to put iapSessions to CleanupStack; there are no leaves
-    RPointerArray<CMPMServerSession> iapSessions;
-    if ( closeIap )
-        {
-        // Check for non-silent sessions to iap
-        // closeIap is left true also when there are no sessions using the iap
-        for ( TInt i = 0; i < iActiveBMConns.Count(); i++ )
-            {
-
-            CMPMServerSession* session
-                = GetServerSession( iActiveBMConns[i].iConnInfo.iConnId );
-
-            TInt sessionIapId = iActiveBMConns[i].iConnInfo.iIapId;
-            if ( !sessionIapId )
-                {
-                TRAP_IGNORE( sessionIapId = session->IapSelectionL()->MpmConnPref().IapId() );
-                }
-
-            if ( sessionIapId == aIapId )
-                {
-                iapSessions.Append( session ); // Don't mind if Append fails
-                
-                TBool silent( ETrue );
-                TRAP_IGNORE( silent = session->IapSelectionL()->MpmConnPref().NoteBehaviour()
-                                      & TExtendedConnPref::ENoteBehaviourConnDisableNotes );
-                if ( !silent )
-                    {
-                    // Non-silent session to iap found
-                    closeIap = EFalse;
-                    break; // for
-                    }
-                }
-            }
-        }
-    
-    if ( closeIap )
-        {
-        MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping silent sessions to iap 0x%x", 
-            aIapId )
-        // Stop all (silent) sessions to iap
-        for ( TInt i = 0; i < iapSessions.Count(); i++)
-            {
-            MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping connId 0x%x",
-                    iapSessions[i]->ConnectionId());
-            iapSessions[i]->StopConnection();
-            }
-        }
-
-    iapSessions.Close();
-    
-    }
-
-
-// -----------------------------------------------------------------------------
 // TMPMBlackListConnId::Append
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/src/mpmserversession.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserversession.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -38,13 +38,10 @@
 #include "mpmcommsdataccess.h"
 #include "mpmserversession.h"
 #include "mpmconnmonevents.h"
-#include "mpmdialog.h"
-#include "mpmdisconnectdlg.h"
 #include "mpmconfirmdlgstarting.h"
 #include "mpmconfirmdlgroaming.h"
 #include "mpmlogger.h"
 #include "mpmpropertydef.h"
-#include "mpmdefaultconnection.h"
 #include "mpmiapselection.h"
 #include "mpmcsidwatcher.h"
 
@@ -71,12 +68,20 @@
 CMPMServerSession::CMPMServerSession(CMPMServer& aServer)
     : CSession2(), 
       iMyServer( aServer ),
-      iDisconnectDlg( NULL ),
       iConfirmDlgRoaming( NULL ),
+      iConnId( 0 ),
+      iNotifRequested( EFalse ),
+      iPreferredIAPRequested( EFalse ),
+      iOfflineFeatureSupported( EFalse ),
+      iEasyWlanIap( 0 ),
+      iAppUid( 0 ),
       iStoredIapInfo(),
       iIapSelection( NULL ),
       iMigrateState( EMigrateNone ),
-      iDisconnectDialogShown( EFalse ),
+      iLastNotifiedIap( 0 ),
+      iMigrateIap( 0 ),
+      iUserConnection( 0 ),
+      iVpnUserConnectionUsed( EFalse ),
       iErrorDiscreetPopupShown( EFalse )
     {
     }
@@ -91,7 +96,7 @@
     MPMLOGSTRING( "CMPMServerSession::ConstructL" )
     if ( !iMyServer.Events() )
         {
-        iMyServer.SetEvents( CMPMConnMonEvents::NewL(
+        iMyServer.SetEvents(CMPMConnMonEvents::NewL(
             *const_cast<CMPMServer*>( &iMyServer ) ) );
         }
 
@@ -107,40 +112,37 @@
 //
 CMPMServerSession::~CMPMServerSession()
     {
-
+    delete iConfirmDlgRoaming;
+    delete iIapSelection;
 
     // Remove serverside objects for notification session.
     // 
     iMyServer.RemoveSession( this );
 
-    if (UserConnection())
+    if (VpnUserConnectionUsed())
+        {
+        SetVpnUserConnectionUsed( EFalse );
+    
+    MPMLOGSTRING( "CMPMServerSession::~CMPMServerSession -\
+ VPN user connection usage ended" )    
+        }
+    else if (UserConnection())
         {
         iMyServer.ClearUserConnection();
         ClearUserConnection();
         
-        // Set PS keys to zero
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionSnap,
-                        0 );
-        
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionIap,
-                        0 );
-        
-        MPMLOGSTRING( "CMPMServerSession::HandleServerApplicationConnectionEnds -\
+        MPMLOGSTRING( "CMPMServerSession::~CMPMServerSession -\
 User connection deactivated" )
         }   
 
     // Clean up the blacklist table 
     iMyServer.HandleServerUnblackListIap( iConnId, 0 );
-    
+
     // Make sure the connection is removed from server's information array.
     iMyServer.RemoveBMConnection( iConnId, *this );
-
-    delete iDisconnectDlg;
-    delete iConfirmDlgRoaming;
-    delete iIapSelection;
-
+    
+    // Cancel discreet popup
+    iMyServer.ConnUiUtils()->CancelConnectingViaDiscreetPopup();
     }
 
 
@@ -422,16 +424,7 @@
         if ( ! ( mpmConnPref.NoteBehaviour() &
             TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
             {
-            CConnectionUiUtilities* connUiUtils = NULL;
-        
-            TRAP_IGNORE( connUiUtils = CConnectionUiUtilities::NewL() );
-            
-            if ( connUiUtils )
-                {
-                connUiUtils->ConnectionErrorDiscreetPopup( error );
-                delete connUiUtils;
-                connUiUtils = NULL;
-                }
+            iMyServer.ConnUiUtils()->ConnectionErrorDiscreetPopup( error );
             }    	
         	
         MPMLOGSTRING( "CMPMServerSession::HandleServerChooseIapL - Error \
@@ -441,23 +434,34 @@
         }
 
     // Store the Uid of the application to the member variable so 
-    // that it can be used to avoid DisconnectDialog popping up when 
-    // AlwaysOnline connection is being established.
+    // that it can be used when AlwaysOnline connection is being established.
     // 
     iAppUid = aMessage.Int2();
 
-    MPMLOGSTRING2( "CMPMServerSession::HandleServerChooseIapL: \
-Client UID = 0x%x", iAppUid )
-
     if ( !iIapSelection )
         {
         iIapSelection = CMPMIapSelection::NewL( iMyServer.CommsDatAccess(),
-                                                this ); 
+                                                this,
+                                                iMyServer.ConnUiUtils() ); 
         }
     
     MPMLOGSTRING3( "CMPMServerSession::HandleServerChooseIapL - iap %d \
 connType %d", mpmConnPref.IapId(), mpmConnPref.ConnType() )
 
+
+    if ( iMyServer.UseVpnUserConnection(mpmConnPref,
+                                        AppUid()) )
+        {
+        // VPN user connection needs to be used.
+        TBool prepareOk = iMyServer.PrepareVpnUserConnection( mpmConnPref );
+        if ( prepareOk )
+            {
+            SetVpnUserConnectionUsed( ETrue );
+            MPMLOGSTRING( "CMPMServerSession::HandleServerChooseIapL -\
+ VPN user connection used" )                    
+            }
+        }
+            
     iIapSelection->ChooseIapL( mpmConnPref );
 
     if ( iAppUid == iMyServer.CsIdWatcher()->ConnectScreenId() )
@@ -469,16 +473,6 @@
         iMyServer.SetUserConnection();
         SetUserConnection();
         iMyServer.SetUserConnPref( mpmConnPref );
-        
-        // Set PS keys according to user connection
-        // Do not check return values. Can do nothing in case of failing.
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionSnap,
-                        mpmConnPref.SnapId() );
-        
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionIap,
-                        mpmConnPref.IapId() );
         }
     }
 
@@ -535,13 +529,6 @@
             //
             TRAP_IGNORE( iMyServer.Events()->CancelScanL( this ) )
 
-            if ( iDisconnectDlg )
-                {
-                MPMLOGSTRING( "CMPMServerSession::HandleServerCancelRequest: \
-removing dconn dlg" )
-                delete iDisconnectDlg;
-                iDisconnectDlg = NULL;
-                }
             return;
             }
         case EMPMWaitNotification:
@@ -560,7 +547,7 @@
                 // TODO Change CancelScanL to non-leaving.
                 // Otherwise, nothing clever can be done here.
                 // And OOM may risk MPM stability.
-                TRAP_IGNORE( iMyServer.Events()->CancelScanL( this ) )
+                TRAP_IGNORE( iMyServer.Events()->CancelScanL( this ))
                 iServerSortSNAPMessage.Complete( KErrCancel );
                 }
             break;
@@ -710,8 +697,11 @@
     // Complete the message as soon as possible to avoid latency in BM
     // 
     aMessage.Complete( KErrNone );
+    
+    iMyServer.ConnUiUtils()->CancelConnectingViaDiscreetPopup();
     }
 
+
 // -----------------------------------------------------------------------------
 // CMPMServerSession::HandleServerIapConnectionStopped
 // -----------------------------------------------------------------------------
@@ -750,20 +740,18 @@
     //
     TConnectionId endId = aMessage.Int0();
 
-    if (UserConnection())
+    if (VpnUserConnectionUsed())
+        {
+        SetVpnUserConnectionUsed( EFalse );
+
+        MPMLOGSTRING( "CMPMServerSession::HandleServerApplicationConnectionEnds -\
+ VPN user connection usage ended" )    
+        }
+    else if (UserConnection())
         {
         iMyServer.ClearUserConnection();
         ClearUserConnection();
         
-        // Set PS keys to zero
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionSnap,
-                        0 );
-        
-        RProperty::Set( KMPMUserConnectionCategory,
-                        KMPMPSKeyUserConnectionIap,
-                        0 );
-        
         MPMLOGSTRING( "CMPMServerSession::HandleServerApplicationConnectionEnds -\
 User connection deactivated" )
         }   
@@ -817,8 +805,8 @@
 
     // check whether a started connection exists which already 
     // uses this IAP. If so, it won't need to be confirmed again
-    //
-    if ( iMyServer.CheckUsageOfIap( aIapId, iConnId ) == EStarted )
+    // 
+    if( iMyServer.CheckIfStarted( aIapId, iConnId ) )
         {
         MPMLOGSTRING(
         "CMPMServerSession::IsConfirmFirstL - IAP already started, \
@@ -848,21 +836,6 @@
         {
         MPMLOGSTRING( "CMPMServerSession::IsConfirmFirstL - True" )
         isConfirmFirst = ETrue;
-
-        // iDisconnectDialogShown is set when disconnect dialog is shown.
-        // Before the disconnect dialog is shown, data usage confirmation
-        // dialog is already shown for the new PDP context. If you choose
-        // to disconnect the active PDP context then data usage dialog is
-        // shown again for the new context. So, set isConfirmFirst to
-        // False to avoid duplicate cellular confirm dialog
-        //
-        if ( iDisconnectDialogShown )
-            {
-            MPMLOGSTRING( "CMPMServerSession::IsConfirmFirstL  - False; Data \
-confirmation dialog already shown this IAP" )
-            isConfirmFirst = EFalse;
-            iDisconnectDialogShown = EFalse;
-            }
         }
     else 
         {
@@ -943,7 +916,7 @@
             // Check that connection preferences don't deny queries, and
             // enough time has elapsed from the last query cancelled by the user.
             if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
-                    !MyServer().IsConnPermQueryTimerOn() )
+                 !MyServer().IsConnPermQueryTimerOn() )
                 {
                 if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming )
                     {
@@ -1004,10 +977,6 @@
 	    if( aError == KErrNone )
 	        {
 	        iMigrateState = EMigrateOfflineConfirmation;
-    	    if( IapSelectionL()->StartWlanQueryIfNeededL( iMigrateIap, ETrue ) )
-	            {
-	            return;
-                }
 	        }
 	    }
 	else if( iMigrateState == EMigrateOfflineConfirmation )
@@ -1427,56 +1396,21 @@
         return;
         }
 
-    // Read the Connection Id of the application
-    // 
-    TConnectionId connId = iProcessErrorMessage.Int1();
-    
-    MPMLOGSTRING3( "CMPMServerSession::HandleServerProcessErrorL \
-- error code = %i, Connection Id = 0x%x", error, connId )
-
     if ( !ChooseBestIapCalled() )
         {
         MPMLOGSTRING( "CMPMServerSession::HandleServerProcessErrorL - \
-ChooseBestIap has not been called yet" )
-
-        // If it is not disconnect dialog error then complete message. 
-        // If it is then leave message pending and it will be completed when 
-        // disconnect dialog completes in other session.
-        if ( !DisconnectDlgErrorCode( error ) )
-            {
-            TBMNeededAction neededAction( EPropagateError );
-            ProcessErrorComplete( KErrNone, &error, &neededAction );
-            }
-        else
-            {
-            MPMLOGSTRING( "Disconnect dlg error - leave msg pending" );
-            }
+Warning: ChooseBestIap has not been called yet" )
+        TBMNeededAction neededAction( EPropagateError );
+        ProcessErrorComplete( KErrNone, &error, &neededAction );
         return;
         }
-
-    // Show error popup if it's allowed per client request
-    // Don't show the pop up if error code is for disconnect dialog
-    //
-    if ( !( iIapSelection->MpmConnPref().NoteBehaviour() &
-            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) &&
-         !DisconnectDlgErrorCode( error ) )
-        {
-        CConnectionUiUtilities* connUiUtils = NULL;
-        TRAPD( popupCreateError, connUiUtils = CConnectionUiUtilities::NewL() );
-        if ( popupCreateError == KErrNone && connUiUtils )
-            {
-            // Note: Below function shows the discreet popup only if the error code
-            // belongs to the set of errors that are shown to the user.
-            // Otherwise the popup is not shown.
-            connUiUtils->ConnectionErrorDiscreetPopup( error );
-            delete connUiUtils;
-            connUiUtils = NULL;
-            
-            // Error discreet popup has been shown. This is needed so that we
-            // dont show it again for SNAP.
-            iErrorDiscreetPopupShown = ETrue;
-            }
-        }
+    
+    // Read the Connection Id of the application
+    // 
+    TConnectionId connId = iProcessErrorMessage.Int1();
+
+    MPMLOGSTRING3( "CMPMServerSession::HandleServerProcessErrorL\
+ - error code = %i, Connection Id = 0x%x", error, connId )
 
     // Get the current connection IapId for this connId 
     //
@@ -1486,6 +1420,29 @@
     //
     TUint32 snapId = iMyServer.GetBMSnap( connId );
 
+    // The popup is shown if the connection is not silent and the
+    // error is something else than a disconnect dialog error code.
+    // The popup is also shown if the connection is silent and the
+    // error is a disconnect dlg error, a background application 
+    // is not in question, a MMS IAP is not
+    // in question, and a started connection does not exist.
+    TBool silent = iIapSelection->MpmConnPref().NoteBehaviour() &
+                TExtendedConnPref::ENoteBehaviourConnDisableNotes;
+    if ( !silent && ( !DisconnectDlgErrorCode( error ) ||
+            ( !IsBackgroundApplication( iAppUid ) &&
+            !IsMMSIap( currentIap ) && 
+            iMyServer.StartedConnectionExists() != KErrNotFound ) ) )
+        {
+        // Note: Below function shows the discreet popup only if the error code
+        // belongs to the set of errors that are shown to the user.
+        // Otherwise the popup is not shown.
+        iMyServer.ConnUiUtils()->ConnectionErrorDiscreetPopup( error );
+        
+        // Error discreet popup has been shown. This is needed so that we
+        // dont show it again for SNAP.
+        iErrorDiscreetPopupShown = ETrue;
+        }  
+
     TConnMonIapInfo availableIAPs;
     availableIAPs = GetAvailableIAPs();
 
@@ -1497,6 +1454,8 @@
     // 
     TConnectionState state;
     iMyServer.GetConnectionState( connId, state );
+    MPMLOGSTRING2(
+        "CMPMServerSession::HandleServerProcessErrorL - state %d", state )
 
     // We need to blacklist the presumed IAP too
     // 
@@ -1507,256 +1466,213 @@
     // 
     iMyServer.Events()->ResetIapConnInfo( currentIap );
 
-    // Check if IAP is reported by MMS
-    //
-    TBool isMMSIap = IsMMSIap( currentIap );
-    if ( isMMSIap )
-        {
-        MPMLOGSTRING( "CMPMServerSession::HandleServerProcessErrorL\
-        - DisconnectDialog is not started because of MMS reported IAP" )
-        }
-
     TInt* returnError( NULL );
-    if ( ( state == EStarting ) || ( state == ERoaming ) )
+    switch ( state )
         {
-        // Process error according to the fact that the connection 
-        // has not yet been started.
-        // 
-        if ( DisconnectDlgErrorCode( error ) &&
-             !IsBackgroundApplication( iAppUid ) &&
-             !isMMSIap && 
-             iIapSelection->MpmConnPref().DisconnectDialog() &&
-             iMyServer.StartedConnectionExists() != KErrNotFound )
-            {
-            // Start the Disconnect dialog
-            // 
-            MPMLOGSTRING( "CMPMServerSession::HandleServerProcessErrorL\
- - Start Disconnect dialog" )
-            iDisconnectDlg = CMPMDisconnectDlg::NewL( *const_cast<CMPMServerSession*>(this),
-                                                      error,
-                                                      *MyServer().DisconnectQueue() );
-            iDisconnectDialogShown = ETrue;
-            return;
-            }
-        else
-            {
-            MPMLOGSTRING( "CMPMServerSession::HandleServerProcessErrorL - \
-Error not handled with disconnect dialog" )
-
-            if ( state == EStarting ) 
+        case EStarting: 
+            if ( ( snapId == 0 ) || ( error == KErrCancel ) )
                 {
-                if ( ( snapId == 0 ) || ( error == KErrCancel ) )
-                    {
-                    neededAction = EPropagateError;
-
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )
-                    }
-                else
-                    {
-                    neededAction = EDoReselection;
-
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to ignore error and do reselection" )
-
-                    iMyServer.HandleServerBlackListIap( connId, 
-                                                        currentIap, 
-                                                        ETemporary );
-                    if ( ( presumedIap != 0 ) && 
-                         ( presumedIap != currentIap ) )
-                        {
-                        iMyServer.HandleServerBlackListIap( connId, 
-                                                            presumedIap, 
-                                                            ETemporary );
-                        }
-                    }
+                neededAction = EPropagateError;
+
+                MPMLOGSTRING(
+                    "CMPMServerSession::HandleServerProcessErrorL - \
+                Tell BM to end the client connection with appropriate error code" )
                 }
-            else if ( state == ERoaming ) 
+            else
                 {
-                // ERoaming means commsfw stack is moving to new IAP and failed.
-                // Hence, MPM should mark to current iap as zero. 
-                //
-                iMyServer.ResetBMConnection( iConnId, currentIap, *this );
-                
-                // Notification will be sent with latest 
-                // availability info
-                //
-                iStoredIapInfo.ResetStoredIapInfo();
-
-                neededAction = EIgnoreError;
+                neededAction = EDoReselection;
+
+                MPMLOGSTRING(
+                    "CMPMServerSession::HandleServerProcessErrorL - \
+                Tell BM to ignore error and do reselection" )
 
                 iMyServer.HandleServerBlackListIap( connId, 
                                                     currentIap, 
                                                     ETemporary );
                 if ( ( presumedIap != 0 ) && 
-                     ( presumedIap != currentIap ) )
+                    ( presumedIap != currentIap ) )
                     {
                     iMyServer.HandleServerBlackListIap( connId, 
                                                         presumedIap, 
                                                         ETemporary );
                     }
-                TRAP( error, PrefIAPNotificationL( availableIAPs, 
+                }
+            // Error might be different from KErrNone if there 
+            // is no preferred IAP among the available IAPs.
+            // 
+            ProcessErrorComplete( KErrNone,
+                                  returnError,
+                                  &neededAction );
+            break;
+            
+        case ERoaming: 
+            // ERoaming means commsfw stack is moving to new IAP and failed.
+            // Hence, MPM should mark to current iap as zero. 
+            //
+            iMyServer.ResetBMConnection( iConnId, currentIap, *this );
+                
+            // Notification will be sent with latest 
+            // availability info
+            //
+            iStoredIapInfo.ResetStoredIapInfo();
+            
+            neededAction = EIgnoreError;
+
+            iMyServer.HandleServerBlackListIap( connId, 
+                                                currentIap, 
+                                                ETemporary );
+            if ( ( presumedIap != 0 ) && 
+                ( presumedIap != currentIap ) )
+                {
+                iMyServer.HandleServerBlackListIap( connId, 
+                                                    presumedIap, 
+                                                    ETemporary );
+                }
+            TRAP( error, PrefIAPNotificationL( availableIAPs, 
                                                    EBearerMan ) );
-                if ( error == KErrNotFound )
-                    {
-                    neededAction = EPropagateError;
-
-                    returnError = &error;
-
-                    TRAP_IGNORE( ErrorNotificationL( KErrNotFound, 
-                                                     EMPMMobilityErrorNotification ) );
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )
-                    }
-                else
-                    {
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to ignore error and let MPM notify application about preferred IAP" )
-                    }
+            if ( error == KErrNotFound )
+                {
+                neededAction = EPropagateError;
+
+                returnError = &error;
+
+                TRAP_IGNORE( ErrorNotificationL( KErrNotFound, 
+                                                EMPMMobilityErrorNotification ) );
+                MPMLOGSTRING(
+                    "CMPMServerSession::HandleServerProcessErrorL - \
+                Tell BM to end the client connection with appropriate error code" )
                 }
             else
                 {
-                MPMLOGSTRING2(
+                MPMLOGSTRING(
                     "CMPMServerSession::HandleServerProcessErrorL - \
-Unknown state %d", state )
+                Tell BM to ignore error and let MPM notify application about preferred IAP" )
                 }
-
+            
             // Error might be different from KErrNone if there 
             // is no preferred IAP among the available IAPs.
             // 
             ProcessErrorComplete( KErrNone,
                                   returnError,
                                   &neededAction );
-            
-            iMyServer.HandlePendingMsgs( currentIap,
-                                         KErrNone,
-                                         returnError,
-                                         &neededAction );
-            return;
-            }
-        }
-    else if ( state == EStarted )
-        {
-        // Process error according to the fact that the connection 
-        // has already been started.
-        // KErrConnectionTerminated is received when user disconnects
-        // connection from Settings/Connection mgr.
-        //       
-        if ( ( error == KErrCancel ) || ( error == KErrTimedOut ) || ( error == KErrConnectionTerminated )
-                || ( error == KErrDisconnected && iMyServer.IsPhoneOffline() ) )
-            {
-            neededAction = EPropagateError;
-
-            MPMLOGSTRING(
-                "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )
-
-            // Send error notification. 
-            // Not sent if connection not registered
-            // 
-            TRAP_IGNORE( ErrorNotificationL( error,
-                                             EMPMMobilityErrorNotification ) )
-            }
-        else if ( iPreferredIAPRequested )
-            {
-            // IAP connection
-            //
-            if( snapId == 0 )
+            break;
+      
+        case EStarted:
+            // Process error according to the fact that the connection 
+            // has already been started.
+            // KErrConnectionTerminated is received when user disconnects
+            // connection from Settings/Connection mgr.
+            //         
+            if ( ( error == KErrCancel ) || ( error == KErrTimedOut ) || ( error == KErrConnectionTerminated ) )
                 {
                 neededAction = EPropagateError;
-    
+
                 MPMLOGSTRING(
                     "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )
-
-                TRAP_IGNORE( ErrorNotificationL( KErrNotFound,
-                                                 EMPMMobilityErrorNotification ) )
+                    Tell BM to end the client connection with appropriate error code" )
+
+                // Send error notification. 
+                // Not sent if connection not registered
+                // 
+                TRAP_IGNORE( ErrorNotificationL( error,
+                                             EMPMMobilityErrorNotification ) )
                 }
-            // SNAP connection
-            //
-            else
+            else if ( iPreferredIAPRequested )
                 {
-                // If this has been WLAN IAP and the SNAP contains 
-                // other WLAN IAPs, we need to perform WLAN scan before
-                // knowing the availability of those
+                // IAP connection
                 //
-                RArray<TUint> iapPath;
-                CleanupClosePushL( iapPath );
-
-                iMyServer.HandleServerBlackListIap( connId, 
-                                                    currentIap, 
-                                                    ETemporary );
-                if ( ( presumedIap != 0 ) && 
-                     ( presumedIap != currentIap ) )
+                if( snapId == 0 )
                     {
-                    iMyServer.HandleServerBlackListIap( connId, 
-                                                        presumedIap, 
-                                                        ETemporary );
-                    }
-
-                // current iap is either WLAN or EasyWlan
-                // 
-                if( ( iMyServer.CommsDatAccess()->CheckWlanL( currentIap ) != ENotWlanIap ) && 
-                      iMyServer.CommsDatAccess()->SnapContainsWlanL( snapId, iapPath, KMPMNrWlansTwo ) )
-                    {
-                    // perform WLAN scan 
-                    // message is completed in callback function 
-                    // ProcessErrorWlanScanCompletedL
-                    // 
-                    iMyServer.Events()->ScanWLANNetworksL( this, 
-                                                           ConnectionId(), 
-                                                           EWlanScanCallbackProcessErr );
-                    CleanupStack::PopAndDestroy( &iapPath );
-                    return;
-                    }
-
-                CleanupStack::PopAndDestroy( &iapPath );
-                neededAction = EIgnoreError;
-
-                TRAPD( err2, PrefIAPNotificationL( availableIAPs, EBearerMan ) );
-                if ( err2 == KErrNotFound )
-                    {
-                    error = err2;
                     neededAction = EPropagateError;
+    
+                    MPMLOGSTRING(
+                        "CMPMServerSession::HandleServerProcessErrorL - \
+                        Tell BM to end the client connection with appropriate error code" )
 
                     TRAP_IGNORE( ErrorNotificationL( KErrNotFound,
                                                      EMPMMobilityErrorNotification ) )
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )   
                     }
+                // SNAP connection
+                //
                 else
                     {
-                    MPMLOGSTRING(
-                        "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to ignore error and let MPM notify application about preferred IAP" )
+                    // If this has been WLAN IAP and the SNAP contains 
+                    // other WLAN IAPs, we need to perform WLAN scan before
+                    // knowing the availability of those
+                    //
+                    RArray<TUint> iapPath;
+                    CleanupClosePushL( iapPath );
+
+                    iMyServer.HandleServerBlackListIap( connId, 
+                                                    currentIap, 
+                                                    ETemporary );
+                    if ( ( presumedIap != 0 ) && 
+                        ( presumedIap != currentIap ) )
+                        {
+                        iMyServer.HandleServerBlackListIap( connId, 
+                                                        presumedIap, 
+                                                        ETemporary );
+                        }
+
+                    // current iap is WLAN
+                    // 
+                    if( ( iMyServer.CommsDatAccess()->CheckWlanL( currentIap ) != ENotWlanIap ) && 
+                        iMyServer.CommsDatAccess()->SnapContainsWlanL( snapId, iapPath, KMPMNrWlansTwo ) )
+                        {
+                        // perform WLAN scan 
+                        // message is completed in callback function 
+                        // ProcessErrorWlanScanCompletedL
+                        // 
+                        iMyServer.Events()->ScanWLANNetworksL( this, 
+                                                           ConnectionId(), 
+                                                           EWlanScanCallbackProcessErr );
+                        CleanupStack::PopAndDestroy( &iapPath );
+                        return;
+                        }
+
+                    CleanupStack::PopAndDestroy( &iapPath );
+                    neededAction = EIgnoreError;
+
+                    TRAPD( err2, PrefIAPNotificationL( availableIAPs, EBearerMan ) );
+                    if ( err2 == KErrNotFound )
+                        {
+                        error = err2;
+                        neededAction = EPropagateError;
+
+                        TRAP_IGNORE( ErrorNotificationL( KErrNotFound,
+                                                         EMPMMobilityErrorNotification ) )
+                        MPMLOGSTRING(
+                            "CMPMServerSession::HandleServerProcessErrorL - \
+                            Tell BM to end the client connection with appropriate error code" )   
+                        }
+                    else
+                        {
+                        MPMLOGSTRING(
+                            "CMPMServerSession::HandleServerProcessErrorL - \
+                            Tell BM to ignore error and let MPM notify application about preferred IAP" )
+                        }
                     }
                 }
-            }
-        else
-            {
-            neededAction = EPropagateError;
-
-            MPMLOGSTRING(
-                "CMPMServerSession::HandleServerProcessErrorL - \
-Tell BM to end the client connection with appropriate error code" )
-
-            }
-        ProcessErrorComplete( KErrNone, &error, &neededAction );
-        
-        }
-    else
-        {
-        MPMLOGSTRING2(
-            "CMPMServerSession::HandleServerProcessErrorL Unknown state %d",
-            state )
-        ProcessErrorComplete( KErrCorrupt,
-                              NULL,
-                              NULL );
+            else
+                {
+                neededAction = EPropagateError;
+
+                MPMLOGSTRING(
+                    "CMPMServerSession::HandleServerProcessErrorL - \
+                    Tell BM to end the client connection with appropriate error code" )
+
+                }
+            ProcessErrorComplete( KErrNone, &error, &neededAction );
+            break;
+            
+        default:
+            MPMLOGSTRING2(
+                "CMPMServerSession::HandleServerProcessErrorL Unknown state %d",
+                state )
+            ProcessErrorComplete( KErrCorrupt,
+                                  NULL,
+                                  NULL );
+            break;
         }
     }
 
@@ -2273,18 +2189,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServerSession::UpdateConnectionDialog
-// -----------------------------------------------------------------------------
-//
-void CMPMServerSession::UpdateConnectionDialogL()
-    {
-    if( iIapSelection )
-        {
-        iIapSelection->UpdateConnectionDialogL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServerSession::CompleteCarrierRejected
 // -----------------------------------------------------------------------------
 //
@@ -2906,21 +2810,10 @@
     if ( !( iIapSelection->MpmConnPref().NoteBehaviour() &
             TExtendedConnPref::ENoteBehaviourConnDisableNotes) )
         {
-        TConnectionState state = iMyServer.CheckUsageOfIap( aIapId, iConnId );
-        TBool connectionAlreadyActive = (state == EStarted || state == EStarting || state == ERoaming);
-        CConnectionUiUtilities* connUiUtils = NULL;
-        if (!connectionAlreadyActive )
-            {
-            TRAPD( popupError,
-                   connUiUtils = CConnectionUiUtilities::NewL();
-                   connUiUtils->ConnectingViaDiscreetPopup(
-                   			        aIapId );
-                   delete connUiUtils; );
-            if ( popupError && connUiUtils )
-                {
-                delete connUiUtils;
-                }
-            }
+        TBool connectionAlreadyActive = iMyServer.CheckIfStarted( aIapId, iConnId );
+        
+        iMyServer.ConnUiUtils()->ConnectingViaDiscreetPopup( aIapId,
+                                                  connectionAlreadyActive );
         }
 
     TMpmNotificationStartIAP notifInfo;
@@ -3122,23 +3015,20 @@
                 //
                 TBool usesSame( EFalse ); 
 
-                if ( !iMyServer.CommsDatAccess()->CheckEasyWLanL( unavailableIAPs[i] ) )
-                    {
-                    TRAP_IGNORE( iMyServer.CommsDatAccess()->MatchSSIDL( ssid, 
-                                                              unavailableIAPs[i], 
-                                                              usesSame,
-                                                              *this ) )
+                TRAP_IGNORE( iMyServer.CommsDatAccess()->MatchSSIDL( ssid, 
+                                                                     unavailableIAPs[i], 
+                                                                     usesSame,
+                                                                     *this ) )
                                                               
-                    if ( usesSame )
-                        {
-                        // Append unavailable IAP to list of available IAPs
-                        // if it uses same SSID as active WLAN connection.
-                        // 
-                        MPMLOGSTRING2(
-                            "CMPMServerSession::AvailableUnblacklistedIapsL:\
+                if ( usesSame )
+                    {
+                    // Append unavailable IAP to list of available IAPs
+                    // if it uses same SSID as active WLAN connection.
+                    // 
+                    MPMLOGSTRING2(
+                        "CMPMServerSession::AvailableUnblacklistedIapsL:\
  Append unavailable IapId = %i", unavailableIAPs[i] )
-                        aAvailableIAPs.AppendL( unavailableIAPs[i] );
-                        }
+                    aAvailableIAPs.AppendL( unavailableIAPs[i] );
                     }
                 }
             }
@@ -3356,25 +3246,6 @@
     {
     MPMLOGSTRING2( "CMPMServerSession::ChooseIapComplete aError = %d", aError )
 
-    // Show error popup if it's allowed per client request.
-	// Error popup shown to SNAP only if error discreet has not been shown for IAP.
-    if ( ChooseBestIapCalled() && (!( iIapSelection->MpmConnPref().NoteBehaviour() &
-            TExtendedConnPref::ENoteBehaviourConnDisableNotes ))
-              && ( aError != KErrNone )
-              && ( iErrorDiscreetPopupShown == EFalse ) )
-        {
-        CConnectionUiUtilities* connUiUtils = NULL;
-        TRAPD( error, connUiUtils = CConnectionUiUtilities::NewL() );
-        if ( error == KErrNone && connUiUtils )
-            {
-            // Note: Below function shows the discreet popup only if the error code
-            // belongs to the set of errors that are shown to the user.
-            // Otherwise the popup is not shown.
-            connUiUtils->ConnectionErrorDiscreetPopup( aError );
-            delete connUiUtils;
-            connUiUtils = NULL;
-            }
-        }
     
     // Try to write back arguments and complete message.
     // 
@@ -3430,6 +3301,32 @@
         MPMLOGSTRING( "CMPMServerSession::ChooseIapComplete Message completed" )
         iChooseIapMessage.Complete( aError );
         }
+
+    // Show error popup if it's allowed per client request
+    // Error popup shown to SNAP only if error discreet has not been shown for IAP.
+    if ( ChooseBestIapCalled() && (!( iIapSelection->MpmConnPref().NoteBehaviour() &
+            TExtendedConnPref::ENoteBehaviourConnDisableNotes ))
+            && ( aError != KErrNone ) 
+            && ( iErrorDiscreetPopupShown == EFalse ) )
+        {
+        // Note: Below function shows the discreet popup only if the error code
+        // belongs to the set of errors that are shown to the user.
+        // Otherwise the popup is not shown.
+        iMyServer.ConnUiUtils()->ConnectionErrorDiscreetPopup( aError );
+        }
+    else if ( aError == KErrNone )
+        {
+        if (!( iIapSelection->MpmConnPref().NoteBehaviour() &
+            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) &&
+            ( IsMMSIap( aPolicyPref->IapId() ) == EFalse ) )
+            {
+            TBool connectionAlreadyActive =
+                MyServer().CheckIfStarted( aPolicyPref->IapId(), iConnId );
+
+            iMyServer.ConnUiUtils()->ConnectingViaDiscreetPopup( aPolicyPref->IapId(),
+                                                      connectionAlreadyActive );
+            }            
+        }
     
     // Enable showing error discreet popup for SNAP again
     iErrorDiscreetPopupShown = EFalse;
@@ -3445,9 +3342,6 @@
                                               TBMNeededAction* aNeededAction )
     {
     MPMLOGSTRING2( "CMPMServerSession::ProcessErrorComplete aError = %d", aError )
-
-    delete iDisconnectDlg;
-    iDisconnectDlg = NULL;
     
     if ( !iProcessErrorMessage.IsNull() )
         {
@@ -3587,6 +3481,24 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMPMServerSession::SetVpnUserConnectionUsed
+// -----------------------------------------------------------------------------
+//
+void CMPMServerSession::SetVpnUserConnectionUsed( const TBool aUseVpnUserConnection )
+    {
+    if ( aUseVpnUserConnection )
+        {
+        iVpnUserConnectionUsed = ETrue;
+        iMyServer.AddVpnUserConnectionSession();        
+        }
+    else 
+        {
+        iVpnUserConnectionUsed = EFalse;
+        iMyServer.RemoveVpnUserConnectionSession();        
+        }
+    }
+
+// -----------------------------------------------------------------------------
 // CMPMServerSession::IsWlanOnlyL
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/src/mpmstarter.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/bearermanagement/mpm/src/mpmstarter.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -26,7 +26,6 @@
 #include "mpmstarter.h"
 #include "mpmserver.h"
 #include "mpmlogger.h"
-#include "mpmdefaultconnserver.h"
 
 // ============================= LOCAL FUNCTIONS ===============================
 
@@ -46,11 +45,6 @@
     // create the server
     CServer2* server = MPMStarter::CreateAndStartServerL();
     CleanupStack::PushL( server );
-       
-    // create default connection server
-    CServer2* server2 = MPMStarter::CreateDefaultConnServerL( 
-    static_cast<CMPMServer*> ( server ) );
-    CleanupStack::PushL( server2 );
 
     User::LeaveIfError( RThread::RenameMe( MPMStarter::ServerName() ) );
 
@@ -61,7 +55,6 @@
     CActiveScheduler::Start();
     //
     // Cleanup the server and scheduler
-    CleanupStack::PopAndDestroy( server2 );
     CleanupStack::PopAndDestroy( server );
     CleanupStack::PopAndDestroy( s );
     }
@@ -113,17 +106,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// MPMStarter::CreateDefaultConnServerL
-// create default connection server object
-// -----------------------------------------------------------------------------
-//
-CServer2* MPMStarter::CreateDefaultConnServerL( CMPMServer* aMPMServer )
-    {
-    MPMLOGSTRING( "MPMStarter::CreateDefaultConnServerL" )
-    return CMPMDefaultConnServer::NewL( aMPMServer );
-    }
-
-// -----------------------------------------------------------------------------
 // MPMStarter::ServerName
 // return server name
 // -----------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bearermanagement/mpm/src/mpmvpntogglewatcher.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,242 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Listen VPN toggle key changes in central repository.
+*
+*/
+
+#include <centralrepository.h>
+#include <mpmvpntoggleapi.h>
+#include "mpmlogger.h"
+#include "mpmvpntogglewatcher.h"
+
+// ---------------------------------------------------------------------------
+// Default constructor
+// ---------------------------------------------------------------------------
+//
+CMpmVpnToggleWatcher::CMpmVpnToggleWatcher( MMpmVpnToggleWatcherNotify& aNotify )
+    : CActive( EPriorityStandard ),
+      iNotify( aNotify )
+    {
+    CActiveScheduler::Add( this );    
+    }
+
+
+// ---------------------------------------------------------------------------
+// Creates central repositor object
+// ---------------------------------------------------------------------------
+//
+void CMpmVpnToggleWatcher::ConstructL()
+    {
+    TRAPD(err, iRepository = CRepository::NewL( KMpmVpnToggleCenRepUid ));
+    if ( err == KErrNone )
+        {
+        StartL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Creates new object
+// ---------------------------------------------------------------------------
+//
+CMpmVpnToggleWatcher* CMpmVpnToggleWatcher::NewL( MMpmVpnToggleWatcherNotify& aNotify )
+    {
+    CMpmVpnToggleWatcher* self = new( ELeave ) CMpmVpnToggleWatcher(aNotify);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CMpmVpnToggleWatcher::~CMpmVpnToggleWatcher()
+    {    
+    Cancel();
+    delete iRepository;
+    }
+
+// ---------------------------------------------------------------------------
+// Order notification from changes
+// ---------------------------------------------------------------------------
+//
+void CMpmVpnToggleWatcher::StartL()
+    {
+    MPMLOGSTRING( "CMpmVpnToggleWatcher::StartL" )
+            
+    // Get the initial Connect screen ID from repository.
+    User::LeaveIfError( GetVpnToggleValues() );
+
+    // Request for notifications.
+    User::LeaveIfError( RequestNotifications() );
+    }
+
+// ---------------------------------------------------------------------------
+// Request notifications.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmVpnToggleWatcher::RequestNotifications()
+    {
+    MPMLOGSTRING( "CMpmVpnToggleWatcher::RequestNotifications" )
+
+    TInt err = iRepository->NotifyRequest( KMpmVpnTogglePreferVpn, iStatus );
+        
+    if ( err == KErrNone )
+        {
+        SetActive();
+        }
+    else
+        {
+        MPMLOGSTRING2( "CMpmVpnToggleWatcher::RequestNotifications, ERROR: %d", err )
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Get VPN toggle values.
+// ---------------------------------------------------------------------------
+//
+TInt CMpmVpnToggleWatcher::GetVpnToggleValues()
+    {
+    MPMLOGSTRING( "CMpmVpnToggleWatcher::GetVpnToggleValues" )
+            
+    // Get values from central repository    
+    TInt err = iRepository->Get( KMpmVpnTogglePreferVpn, iVpnConnectionPreferred );
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmVpnToggleWatcher::GetVpnToggleValues, preferred value, ERROR: %d", err )    
+        return err;
+        }    
+    TInt value(0);    
+    err = iRepository->Get( KMpmVpnToggleIapId, value );
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmVpnToggleWatcher::GetVpnToggleValues, IAP Id value, ERROR: %d", err )
+        return err;
+        }    
+    iVpnIapId = value;   
+    err = iRepository->Get( KMpmVpnToggleSnapId, value );
+    if ( err != KErrNone )
+        {
+        MPMLOGSTRING2( "CMpmVpnToggleWatcher::GetVpnToggleValues, SNAP Id value, ERROR: %d", err )
+        return err;
+        }
+    iSnapId = value;        
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// Return VPN toggle value.
+// ---------------------------------------------------------------------------
+//
+TBool CMpmVpnToggleWatcher::IsVpnConnectionPreferred() const
+    {
+    return iVpnConnectionPreferred;
+    }
+
+// ---------------------------------------------------------------------------
+// Return VPN IAP Id.
+// ---------------------------------------------------------------------------
+//
+TUint32 CMpmVpnToggleWatcher::VpnIapId() const
+    {
+    return iVpnIapId;
+    }
+
+// ---------------------------------------------------------------------------
+// Return SNAP Id.
+// ---------------------------------------------------------------------------
+//
+TUint32 CMpmVpnToggleWatcher::SnapId() const
+    {
+    return iSnapId;
+    }
+
+// ---------------------------------------------------------------------------
+// Resets VPN toggle values.
+// ---------------------------------------------------------------------------
+//
+void CMpmVpnToggleWatcher::ResetVpnToggleValues()
+    {
+    // Cancel listening VPN toggle value change
+    Cancel();
+
+    // Reset values.
+    iVpnConnectionPreferred = EFalse;
+    iVpnIapId = 0;
+    iSnapId = 0;
+    
+    TInt err = iRepository->Set( KMpmVpnTogglePreferVpn, 0 );
+    if ( err == KErrNone ) 
+        {
+        err = iRepository->Set( KMpmVpnToggleIapId, 0 );
+        }
+    if ( err == KErrNone )
+        {
+        err = iRepository->Set( KMpmVpnToggleSnapId, 0 );
+        }
+    
+    MPMLOGSTRING2( "CMpmVpnToggleWatcher::ResetVpnToggleValues, ERROR: %d", err )
+    
+    // Restart listening VPN toggle value change
+    RequestNotifications();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// When there is a change in VPN toggle key value, event is received in here
+// ---------------------------------------------------------------------------
+//
+void CMpmVpnToggleWatcher::RunL()
+    {            
+    if ( iStatus.Int() < KErrNone )
+        {
+        MPMLOGSTRING2("CMpmVpnToggleWatcher::RunL, status: 0x%08X", iStatus.Int())
+        iErrorCounter++;
+        if ( iErrorCounter > KMpmVpnToggleWatcherCenRepErrorThreshold )
+            {
+            MPMLOGSTRING2("Over %d consecutive errors, stopping notifications permanently.",
+                    KMpmVpnToggleWatcherCenRepErrorThreshold)
+            return;
+            }
+        // Else: Error occured but counter not expired. Proceed.
+        RequestNotifications();
+        }
+    else
+        {
+        // Notification is received ok => Reset the counter.
+        iErrorCounter = 0;
+    
+        RequestNotifications();
+        
+        // Get values from central repository
+        GetVpnToggleValues();
+        
+        // Notify values.
+        TRAP_IGNORE( iNotify.SetVpnToggleValuesL( iVpnConnectionPreferred,
+                                                  iVpnIapId,
+                                                  iSnapId ) );        
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// Cancel outstanding request
+// ---------------------------------------------------------------------------
+//
+void CMpmVpnToggleWatcher::DoCancel()
+    {
+    iRepository->NotifyCancel( KMpmVpnTogglePreferVpn );
+    }
--- a/bearermanagement/mpm/src/mpmwlanquerydialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,875 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles displaying wlan dialogs
-*
-*/
-
-
-#include <wlanmgmtcommon.h>
-#include <e32std.h>
-#include <utf.h>
-#include <cmpluginwlandef.h>
-#include <ctsydomainpskeys.h>
-
-#include "mpmwlanquerydialog.h"
-#include "mpmiapselection.h"
-#include "mpmconnmonevents.h"
-#include "mpmlogger.h"
-
-// valid Wep key lengths, to check wep key format
-// (wep key format depends on key length)
-const TInt KConnUiUtilsWepLengthASCII5 = 5;
-const TInt KConnUiUtilsWepLengthASCII13 = 13;
-const TInt KConnUiUtilsWepLengthASCII29 = 29;
-const TInt KConnUiUtilsWepLengthHEX10 = 10;
-const TInt KConnUiUtilsWepLengthHEX26 = 26;
-const TInt KConnUiUtilsWepLengthHEX58 = 58; 
-
-// Retry count and delay for storing Easy WLAN data
-const TInt KStoreRetryCount = 10;
-const TInt KStoreRetryDelay = 100000;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::CMPMWlanQueryDialog
-// ---------------------------------------------------------------------------
-//
-CMPMWlanQueryDialog::CMPMWlanQueryDialog( CMPMIapSelection&  aSession,
-                                          TUint32            aWlanIapId )
-  : CActive( CActive::EPriorityStandard ),
-    iIapSelection( aSession ),
-    iNetworkPrefs(),
-    iNotifWep(),
-    iWlanQueryState( EWlanNetwork ),
-    iWlanIapId( aWlanIapId ),
-    iEasyWlanSelected( EFalse ),
-    iOverrideStatus( KErrNone ),
-    iConnUiUtils( NULL ), 
-    iWps( NULL ),
-    iWpsReturn( WiFiProt::EWiFiOK ),
-    iWpsCompleted( EFalse ),
-    iRetryCount( 0 )
-    {
-    
-    }
-    
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::ConstructL()
-    {
-    User::LeaveIfError(iNotifier.Connect());
-    CActiveScheduler::Add( this );
-    iConnUiUtils = CConnectionUiUtilities::NewL();
-    User::LeaveIfError( iTimer.CreateLocal() );
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::NewL
-// ---------------------------------------------------------------------------
-//
-CMPMWlanQueryDialog* CMPMWlanQueryDialog::NewL( CMPMIapSelection&  aSession,
-                                                TUint32            aWlanIapElementId )
-    {
-    CMPMWlanQueryDialog* self = new( ELeave ) CMPMWlanQueryDialog( aSession,
-                                                                   aWlanIapElementId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::~CMPMWlanQueryDialog
-// ---------------------------------------------------------------------------
-//
-CMPMWlanQueryDialog::~CMPMWlanQueryDialog()
-    {
-    MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog enters" )
-    // Check if this dialog instance was not started but only added to the queue
-    if ( iIapSelection.Session()->MyServer().FirstInWlanQueryQueue() != this )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog, not a active delete" )
-
-        // Close notifier and timer
-        iNotifier.Close();
-        iTimer.Close();
-        
-        // We're not first in the queue, thus we can just delete.
-        // But remember the pointer in the array.
-        iIapSelection.Session()->MyServer().RemoveFromWlanQueryQueue( this );
-        MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog exits (break)" )
-        return;
-        }
-
-    // Cancel previous dialogs if any.
-    Cancel();
-
-    // Close notifier and timer
-    iNotifier.Close();
-    iTimer.Close();
-
-    delete iConnUiUtils;
-
-    delete iWps;
-    // Remove self from the queue
-    iIapSelection.Session()->MyServer().RemoveFromWlanQueryQueue( this );
-    
-    // Start the next query
-    CMPMWlanQueryDialog* dlg = iIapSelection.Session()->MyServer().FirstInWlanQueryQueue();
-    if ( dlg )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog starts new dialog" )
-        dlg->OfferInformation( iWlanIapId, 
-                               iStatus.Int() );
-        // In destructor we cannot let the query leave
-        TRAPD( err, dlg->StartWlanQueryL(); )
-        if ( err != KErrNone )
-            {
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog caught Leave %d, executing RunError()", err )
-            dlg->RunError( err );
-            }
-        }
-
-    MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog exits" )
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::DoCancel()
-    {
-    MPMLOGSTRING2( "CMPMWlanQueryDialog::DoCancel state %d", iWlanQueryState )
-    if ( iWlanQueryState == EOffline )
-        {
-        iNotifier.CancelNotifier( KUidCOfflineWlanNoteDlg );
-        }
-    else if ( iWlanQueryState == EWlanNetwork )    
-        {
-        iConnUiUtils->CancelSearchWLANNetwork();
-        }
-    else if ( iWlanQueryState == EWepSettings )    
-        {
-        iNotifier.CancelNotifier( KUidEasyWepDlg );
-        }
-    else if( iWlanQueryState == EWPS )
-        {
-        iWps->CancelWiFiProt();
-        }
-    else if ( iWlanQueryState == EWpaSettings )
-        {
-        iNotifier.CancelNotifier( KUidEasyWpaDlg );
-        }
-    else // ERetrySettingsStorage
-        {
-        iTimer.Cancel();
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::RunL
-// ---------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::RunL()
-    {
-    MPMLOGSTRING3( "CMPMWlanQueryDialog::RunL status %d state %d", 
-                   iStatus.Int(), 
-                   iWlanQueryState )
-    if( iWlanQueryState == EOffline )
-        {
-        if( iStatus.Int() == KErrNone )
-            {
-            iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
-                    EOfflineResponseYes );
-            if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) )
-                {
-                MPMLOGSTRING( "CMPMWlanQueryDialog::RunL starting wlan network query" )
-                GetNetworkPrefs();
-                return;
-                }
-            }
-        else if ( iStatus.Int() == KErrCancel )
-            {
-            iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
-                    EOfflineResponseNo );
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", 
-                           iStatus.Int() )
-            }
-        else
-            {
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", 
-                           iStatus.Int() )
-            }
-        }
-    else if( iWlanQueryState == EWlanNetwork )
-        {
-        if( iStatus.Int() == KErrNone )
-            {
-            
-            TUint secMode( 0 );
-            TWlanNetMode connMode( EInfra );
-            TInt err = ConnSecModeToCommsDatSecMode( iNetworkPrefs().iSecMode,
-                                                     secMode );
-            if( err != KErrNone )
-       	    	{
-       	    	MPMLOGSTRING( "CMPMWlanQueryDialog::RunL, Unknown security mode" )
-       	    	iWlanIapId = 0;
-                iWlanQueryState = EWlanNetwork;
-       	    	iIapSelection.UserWlanSelectionDoneL( KErrCouldNotConnect, iWlanIapId );
-       	    	return;
-       	    	}
-            
-            TUint32 configuredIap = iIapSelection.Session()->MyServer().
-                CommsDatAccess()->CheckWLANIapWithSsidL( iNetworkPrefs().iSsId, 
-                                                         secMode,
-                                                         connMode );
-            // If previously unknown IAP, query wep/wpa parameters
-            //
-            if( !configuredIap )
-                {
-                iEasyWlanSelected = ETrue;
-                if ( iNetworkPrefs().iProtectedSetupSupported && 
-                     iNetworkPrefs().iNetworkMode != EWlanConnectionModeAdhoc )
-                    {
-                    StartWpsDlgL();
-                    return;                                    
-                    }         
-                // WEP
-                //
-                if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep )
-                    {
-                    MPMLOGSTRING( "CMPMWlanQueryDialog::RunL unknown wep network" )
-                    iWlanQueryState = EWepSettings;
-                    iNotifier.StartNotifierAndGetResponse( iStatus, 
-                                                           KUidEasyWepDlg, 
-                                                           iNotifWep, 
-                                                           iNotifWep );
-                    SetActive();
-                    return;
-                    }
-                // WPA
-                //
-                else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk )
-                    {
-                    MPMLOGSTRING( "CMPMWlanQueryDialog::RunL unknown wpa network" )
-                    iWlanQueryState = EWpaSettings;
-                    iNotifier.StartNotifierAndGetResponse( iStatus, 
-                                                           KUidEasyWpaDlg, 
-                                                           iNotifWpaKey, 
-                                                           iNotifWpaKey );
-                    SetActive();
-                    return;
-
-                    }
-                else
-                    {
-                    MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL security mode %d", 
-                                   iNetworkPrefs().iSecMode )
-                    }
-                }
-        	
-        	else
-        	    {
-        	    iWlanIapId = configuredIap;
-        	    MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL found configured iap matching ssid, id %d", 
-        	                   iWlanIapId )
-        	    
-        	    }
-            }
-        else if( iStatus.Int() == KErrCancel )
-            {
-            iEasyWlanSelected = EFalse;
-            MPMLOGSTRING( "CMPMWlanQueryDialog::RunL easy wlan dialog cancelled, \
-setting easy wlan as not selected" )
-            }
-        else
-            {
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL EWlanNetwork error %d", 
-                iStatus.Int() )
-            }
-        
-        }
-    else if( iWlanQueryState == EWepSettings || iWlanQueryState == EWpaSettings )
-        {
-        if( iStatus.Int() == KErrCancel )
-      	   {
-            MPMLOGSTRING( "CMPMWlanQueryDialog::Key dialog cancelled,back to easy wlan" )
-            iNetworkPrefs().iSsId.FillZ();
-            iNetworkPrefs().iNetworkMode = EWlanConnectionModeNotConnected;
-            iNetworkPrefs().iSecMode = EWlanConnectionSecurityOpen;
-            GetNetworkPrefs();
-            return;
-            }
-        }
-    else if( iWlanQueryState == EWPS )
-        {
-        MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL WPS, status %d", iStatus.Int() )
-        if( iStatus.Int()  == KErrNone )
-            {
-            if( iWpsReturn == WiFiProt::EWiFiOK)
-                {
-                MPMLOGSTRING( "CMPMWlanQueryDialog::RunL WPS ok" )
-                iWpsCompleted = ETrue;
-                }
-            else if ( iWpsReturn == WiFiProt::EWiFiCancel )
-                {
-                MPMLOGSTRING( "CMPMWlanQueryDialog::RunL WPS cancelled" )
-                iStatus = KErrCancel;
-                }
-            else // WiFiProt::EWiFiNoAuto
-                {
-                if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep )
-                    {
-                    MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, starting WEP key query" );
-                    iWlanQueryState = EWepSettings;
-                    iNotifier.StartNotifierAndGetResponse( iStatus, 
-                            KUidEasyWepDlg, 
-                            iNotifWep, 
-                            iNotifWep );
-                    SetActive();
-                    return;
-                    }
-                else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk )
-                    {
-                    MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, starting WPA key query" );
-                    iWlanQueryState = EWpaSettings;
-                    iNotifier.StartNotifierAndGetResponse( iStatus, 
-                            KUidEasyWpaDlg, 
-                            iNotifWpaKey, 
-                            iNotifWpaKey );
-                    SetActive();
-                    return;
-                    }
-                else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityOpen )
-                    {
-                    MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, sec mode open" );
-					iStatus = KErrNone;
-                    }
-                else
-                    {
-                    MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL: No WPS, unsupported sec mode %d", 
-                            iNetworkPrefs().iSecMode );
-                    iStatus = KErrNotSupported;
-                    }
-                }
-            }
-        }
-    else if ( iWlanQueryState == ERetrySettingsStorage )
-        {
-        // Retry settings storage
-        MPMLOGSTRING( "CMPMWlanQueryDialog::RunL Retry settings storage" )
-        }
-    else
-        {
-		MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL, unknown state: %d", iWlanQueryState )
-        User::Leave( KErrCancel );
-        }
-        
-    TRAPD( leaveCode, iIapSelection.UserWlanSelectionDoneL( iStatus.Int(), iWlanIapId ) );
-    if( leaveCode != KErrNone )
-        {
-        // Something caused method to leave, if CommsDat was locked we should retry 
-        if ( iStatus.Int() == KErrNone &&
-             leaveCode == KErrLocked &&
-             iRetryCount > 0 )
-            {
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL Start retry timer, retry count %d", iRetryCount )
-            iWlanQueryState = ERetrySettingsStorage;
-            iRetryCount--;
-            iTimer.After( iStatus, KStoreRetryDelay );
-            SetActive();
-            return;
-            }
-        else
-            {
-            User::Leave( leaveCode );
-            }
-        }
-    
-    iWlanIapId = 0;
-    iWlanQueryState = EWlanNetwork;
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CMPMWlanQueryDialog::RunError( TInt aError )
-    {
-    MPMLOGSTRING2( "CMPMWlanQueryDialog::RunError failed with %d", aError )
-    iEasyWlanSelected = EFalse;    
-    iIapSelection.ChooseIapComplete( aError, NULL );    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMWlanQueryDialog::StartWlanQueryL
-// -----------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::StartWlanQueryL()
-    {
-    MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery" )
-
-    iRetryCount = KStoreRetryCount;
-    
-    // if first dialog user, add it to the array and continue.
-    //
-    if ( iIapSelection.Session()->MyServer().WlanQueryQueue()->Count() == 0 )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery First one, start immediately" )
-        iIapSelection.Session()->MyServer().AppendWlanQueryQueueL( this );
-        }
-    // if another dialog should be processed before this, just add and return.
-    //
-    else if ( iIapSelection.Session()->MyServer().FirstInWlanQueryQueue() != this )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery Latter, process later" )
-        iIapSelection.Session()->MyServer().AppendWlanQueryQueueL( this );
-        return;
-        }
-    // else Continue to process the first dialog.(this one)
-    // FirstInWlanQueryQueue() == this && Count() > 0
-    
-    TUint32 activeWlanIap = iIapSelection.Session()->MyServer().IsWlanConnectionStartedL( 
-        iIapSelection.Session()->MyServer().CommsDatAccess() );
-
-    // Get EmergencyCallInfo via Publish & Subscribe
-    // 
-    TInt emergencyCallEstablished( 0 );
-    RProperty::Get( KPSUidCtsyEmergencyCallInfo, 
-                    KCTSYEmergencyCallInfo, 
-                    emergencyCallEstablished );  
-    MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery KCTSYEmergencyCallInfo = %d", 
-                   emergencyCallEstablished )
-
-    // Get note behaviour setting
-    TUint32 noteBehaviour( 0 );
-    noteBehaviour = iIapSelection.MpmConnPref().NoteBehaviour();
-    MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery noteBehaviour = %d", noteBehaviour )
-    
-    if( !emergencyCallEstablished && 
-        iIapSelection.Session()->MyServer().IsPhoneOffline() && 
-        !activeWlanIap && 
-        iIapSelection.Session()->MyServer().OfflineWlanQueryResponse() != EOfflineResponseYes &&
-        iOverrideStatus == KErrNone )
-        {
-        if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries )
-            {
-            MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery offline note query not shown due to disabled queries" )
-            iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId );
-            }
-        else
-            {
-            MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, starting offline note" )            
-            iWlanQueryState = EOffline;
-            iNotifier.StartNotifierAndGetResponse( iStatus, 
-                                                   KUidCOfflineWlanNoteDlg, 
-                                                   KNullDesC8(), 
-                                                   iOfflineReply );
-            SetActive();
-            }
-        }
-    // if easy wlan iap and some wlan iap started, use existing connection
-    //
-    else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId )  && 
-             activeWlanIap )
-        {
-        MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery using active WLAN IAP %d", 
-                      activeWlanIap )
-        iIapSelection.UserWlanSelectionDoneL( KErrNone, activeWlanIap );      
-        }
-    // if easy wlan iap and easy wlan is not already started
-    // 
-    else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) && 
-             iIapSelection.Session()->MyServer().CheckUsageOfIap(
-                     iWlanIapId, iIapSelection.Session()->ConnectionId() ) != EStarted &&
-             iNetworkPrefs().iSsId.Length() == 0 &&
-             iOverrideStatus == KErrNone )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery starting network query" )
-        GetNetworkPrefs();
-        }
-    // if an error was given through OfferInformation() -call we abort the execution.
-    //
-    else if ( iOverrideStatus != KErrNone )
-        {
-        MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery inherited error %d", iOverrideStatus )
-        iIapSelection.UserWlanSelectionDoneL( iOverrideStatus, iWlanIapId );
-        }
-    else
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery no wlan dialog to show" )
-        iIapSelection.UserWlanSelectionDoneL( KErrNone, iWlanIapId );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMWlanQueryDialog::OfferInformation
-// -----------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::OfferInformation(
-                TUint32 aWlanIapId,
-                TInt aDialogStatus )
-    {
-    TBool isEasyWlan( EFalse );
-    // Take information from earlier note into use
-    // if the selected IAP is EasyWLAN or Offline note response was No.
-    //
-    TRAP_IGNORE( isEasyWlan = 
-        iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ); )
-    if ( isEasyWlan ) 
-        {
-        // iEasyWlanSelected is not passed as only the first connection 
-        // should write the easy wlan settings to commsdat if easy wlan is used.
-        // 
-        MPMLOGSTRING3( "CMPMWlanQueryDialog<0x%x>::OfferInformation: EasyWLAN, iap %d", 
-                       iIapSelection.Session()->ConnectionId(),
-                       aWlanIapId ) 
-
-        iWlanIapId      = aWlanIapId;
-        iOverrideStatus = aDialogStatus;
-        }
-    TOfflineWlanQueryResponse offlineResponse =
-            iIapSelection.Session()->MyServer().OfflineWlanQueryResponse();
-    if ( offlineResponse != EOfflineResponseUndefined )
-        {
-        MPMLOGSTRING3( "CMPMWlanQueryDialog<0x%x>::OfferInformation: offline response %d",
-                       iIapSelection.Session()->ConnectionId(),
-                       offlineResponse )
-        iOverrideStatus = aDialogStatus;
-        }
-
-#ifdef _LOG
-    else
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::OfferInformation, information not taken." ) 
-        }
-#endif 
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMWlanQueryDialog::StoreEasyWlanSelectionL
-// -----------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::StoreEasyWlanSelectionL()
-    {
-    if( iEasyWlanSelected )
-        {
-        TWlanSsid ssid;
-        TWepKeyData wepData;
-        TUint wpaPskEnabled( 0 );
-        TUint wpaPskLen( 0 );
-        TBuf8<KWLMMaxWpaPskLength> wpa;       
-        TUint secMode( 0 );
-        TWlanNetMode connMode( EInfra );
-
-        if( iWpsCompleted )
-            {
-            GetEasyWlanDataForWpsL( ssid,
-                                    secMode,
-                                    connMode, 
-                                    wepData,
-                                    wpaPskEnabled, 
-                                    wpa, 
-                                    wpaPskLen );
-            MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \
-wps used, connection iap %d, ssid %S", iWlanIapId, &iWpsAttribute.iSsid )
-            iIapSelection.Session()->MyServer().Events()->
-                SetConnInfoIapSsid( iWlanIapId, 
-                                    iWpsAttribute.iSsid );
-            iIapSelection.Session()->MyServer().CommsDatAccess()->SetEasyWlanDataL( ssid,
-                                                                         secMode,
-                                                                         connMode, 
-                                                                         wepData,
-                                                                         wpaPskEnabled, 
-                                                                         wpa, 
-                                                                         wpaPskLen );
-            return;
-            }
-
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: setting easy wlan data" )
-        GetEasyWlanDataL( ssid,
-                          secMode,
-                          connMode, 
-                          wepData,
-                          wpaPskEnabled, 
-                          wpa, 
-                          wpaPskLen );
-
-        MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \
-setting easy wlan iap %d ssid %S in connmon events", iWlanIapId, &iNetworkPrefs().iSsId )
-        iIapSelection.Session()->MyServer().Events()->SetConnInfoIapSsid( iWlanIapId, 
-                                                                          iNetworkPrefs().iSsId );
-        iIapSelection.Session()->MyServer().CommsDatAccess()->SetEasyWlanDataL( ssid,
-                                                                     secMode,
-                                                                     connMode, 
-                                                                     wepData,
-                                                                     wpaPskEnabled, 
-                                                                     wpa, 
-                                                                     wpaPskLen );
-                    
-        }
-    else
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: no easy wlan selected by user" )
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMWlanQueryDialog::GetEasyWlanDataL
-// -----------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::GetEasyWlanDataL( TWlanSsid&    aSsid,
-                                            TUint&        aSecMode,
-                                            TWlanNetMode& aConnMode,
-                                            TWepKeyData&  aWepData,
-                                            TUint&        aEnableWpaPsk,
-                                            TDes8&        aWpaPsk,
-                                            TUint&        aWpaKeyLen  )
-    {
-    aSsid.Copy( iNetworkPrefs().iSsId );
-    if ( iNetworkPrefs().iNetworkMode == EWlanConnectionModeAdhoc )
-        {
-        aConnMode = EAdhoc;
-        }
-
-    // Set security mode
-    TInt err = ConnSecModeToCommsDatSecMode( iNetworkPrefs().iSecMode,
-                                             aSecMode );
-
-    if( err != KErrNone )
-        {
-        MPMLOGSTRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \
-unsupported sec mode %d. leaving", iNetworkPrefs().iSecMode )
-        User::Leave( KErrNotSupported );
-        }
-
-    if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep )
-        {
-        CnvUtfConverter::ConvertFromUnicodeToUtf8( aWepData.iWep1, iNotifWep().iKey );
-        //MPMLOG8STRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection:wep-key8:%S ", &aWepData.iWep1 )
-        if( iNotifWep().iHex )
-            {
-        	aWepData.iWepFormat1 = 1;
-        	MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: wep format is 1 (hex)") 
-        	}
-        aWepData.iDefaultWep = EWlanDefaultWepKey1;
-        }
-    else if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk )
-        {        
-        CnvUtfConverter::ConvertFromUnicodeToUtf8( aWpaPsk, iNotifWpaKey() );
-        aEnableWpaPsk = 1;
-        aWpaKeyLen = aWpaPsk.Length();
-        MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection:wpapsk-key:%s, len:%d", 
-                       &iNotifWpaKey(), 
-                       aWpaKeyLen )
-        }
-    else
-        {
-        MPMLOGSTRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \
-no key handling needed for sec mode %d", iNetworkPrefs().iSecMode )
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::ConnSecModeToCommsDatSecMode
-// ---------------------------------------------------------------------------
-//
-TInt CMPMWlanQueryDialog::ConnSecModeToCommsDatSecMode( TWlanConnectionSecurityMode aConnSecmode,
-                                                        TUint& aCommsdatSecMode ) const
-    {
-
-    if ( aConnSecmode == EWlanConnectionSecurityOpen )
-        {
-        aCommsdatSecMode = EWlanSecModeOpen;
-        }
-    else if ( aConnSecmode == EWlanConnectionSecurityWep )
-        {
-        aCommsdatSecMode = EWlanSecModeWep;
-        }
-    else if ( aConnSecmode == EWlanConnectionSecurityWpaPsk )
-       	{
-       	aCommsdatSecMode = EWlanSecModeWpa2;
-       	}
-    else if ( aConnSecmode == EWlanConnectionSecurityWpa )
-       	{
-       	aCommsdatSecMode = EWlanSecModeWpa;
-        }
-    else
-       	{
-       	MPMLOGSTRING( "CMPMWlanQueryDialog::RunL, Unknown security mode" )
-       	return KErrCouldNotConnect;
-       	}
-    return KErrNone;    
-    }
-
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode
-// ---------------------------------------------------------------------------
-//
-TInt CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode( TWlanIapSecurityMode aIapSecmode,
-                                                       TUint& aCommsdatSecMode ) const
-    {
-    switch( aIapSecmode )
-        {
-        case EWlanIapSecurityModeAllowUnsecure:
-    	    aCommsdatSecMode |= EWlanSecModeOpen;
-            break;
-        case EWlanIapSecurityModeWep:
-            aCommsdatSecMode |= EWlanSecModeWep;
-            break;
-        case EWlanIapSecurityModeWpa:
-            aCommsdatSecMode |= EWlanSecModeWpa;
-            break;
-        case EWlanIapSecurityModeWpa2Only:
-            aCommsdatSecMode |= EWlanSecModeWpa2;
-            break;
-        default:
-            MPMLOGSTRING2( "CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode: \
-unsupported sec mode %d ", aIapSecmode )
-            return KErrNotSupported;
-        }
-    return KErrNone;    
-    }
-
-// -----------------------------------------------------------------------------
-// CMPMWlanQueryDialog::GetEasyWlanDataForWpsL
-// -----------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::GetEasyWlanDataForWpsL( TWlanSsid&    aSsid,
-                                                  TUint&        aSecMode,
-                                                  TWlanNetMode& aConnMode,
-                                                  TWepKeyData&  aWepKeyData, 
-                                                  TUint&        aEnableWpaPsk,
-                                                  TDes8&        aWpaPsk,
-                                                  TUint&        aWpaKeyLen  )
-    {
-    aSsid.Copy( iWpsAttribute.iSsid );
-    if ( iWpsAttribute.iOperatingMode == EWlanOperatingModeAdhoc )
-        {
-        aConnMode = EAdhoc;
-        }
-    TInt err = IapSecModeToCommsDatSecMode( iWpsAttribute.iSecurityMode, 
-                                            aSecMode );
-    if( err != KErrNone )
-        {
-        MPMLOGSTRING( "CMPMWlanQueryDialog::GetEasyWlanDataForWpsL: \
-unsupported wps sec mode leaving" )
-        User::Leave( KErrNotSupported );
-        }
-
-    if( iWpsAttribute.iSecurityMode == EWlanIapSecurityModeWep )
-        {
-        if( iWpsAttribute.iWepKey1.Length() && 
-            IsWepFormatHexL( iWpsAttribute.iWepKey1.Length() ) )
-            {
-            aWepKeyData.iWepFormat1 = 1;
-            }
-        if( iWpsAttribute.iWepKey2.Length() && 
-            IsWepFormatHexL( iWpsAttribute.iWepKey2.Length() ) )
-            {
-            aWepKeyData.iWepFormat2 = 1;
-            }
-        if( iWpsAttribute.iWepKey3.Length() && 
-            IsWepFormatHexL( iWpsAttribute.iWepKey3.Length() ) )
-            {
-            aWepKeyData.iWepFormat3 = 1;
-            }
-        if( iWpsAttribute.iWepKey4.Length() && 
-            IsWepFormatHexL( iWpsAttribute.iWepKey4.Length() ) )
-            {
-            aWepKeyData.iWepFormat4 = 1;
-            }
-        aWepKeyData.iWep1.Copy( iWpsAttribute.iWepKey1 );
-        aWepKeyData.iWep2.Copy( iWpsAttribute.iWepKey2 );
-        aWepKeyData.iWep3.Copy( iWpsAttribute.iWepKey3 );
-        aWepKeyData.iWep4.Copy( iWpsAttribute.iWepKey4 );
-        aWepKeyData.iDefaultWep = iWpsAttribute.iWepDefaultKey;        
-        }
-    if( iWpsAttribute.iWpaPreSharedKey.Length() )
-        {
-        aEnableWpaPsk = 1;
-        aWpaPsk.Copy( iWpsAttribute.iWpaPreSharedKey );
-        aWpaKeyLen = aWpaPsk.Length();
-        }
-
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::StartWpsDlgL
-// ---------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::StartWpsDlgL()
-    {
-    MPMLOGSTRING( "CMPMWlanQueryDialog::StartWpsDlgL, Starting WPS" )
-    iWlanQueryState = EWPS;
-    iWps = CWiFiProtUiClient::NewL();
-    iWps->StartWiFiProtConnL( iNetworkPrefs().iSsId, // TWlanSsid&,
-                              iWpsAttribute,
-                              iWpsReturn,
-                              iStatus );
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::IsWepFormatHexL
-// ---------------------------------------------------------------------------
-//
-TBool CMPMWlanQueryDialog::IsWepFormatHexL( TInt aLength ) const
-    {
-    MPMLOGSTRING2( "CMPMWlanQueryDialog::IsWepFormatHexL length %d", aLength )
-
-    if ( ( aLength == KConnUiUtilsWepLengthASCII5 ) ||
-        ( aLength == KConnUiUtilsWepLengthASCII13 ) ||
-        ( aLength == KConnUiUtilsWepLengthASCII29 ) )
-        {
-        return EFalse;
-        }
-    else if ( ( aLength == KConnUiUtilsWepLengthHEX10 ) ||
-        ( aLength == KConnUiUtilsWepLengthHEX26 ) ||
-        ( aLength == KConnUiUtilsWepLengthHEX58 ) )
-        {
-        return ETrue;
-        }
-    else
-        {
-        User::Leave( KErrNotSupported );
-        }            
-    return EFalse;
-    }
-    
-// ---------------------------------------------------------------------------
-// CMPMWlanQueryDialog::GetNetworkPrefs
-// ---------------------------------------------------------------------------
-//
-void CMPMWlanQueryDialog::GetNetworkPrefs()
-    {
-    iWlanQueryState = EWlanNetwork;
-    iConnUiUtils->SearchWLANNetworkAsync( iStatus,
-                                          iNetworkPrefs().iSsId,
-                                          iNetworkPrefs().iNetworkMode,
-                                          iNetworkPrefs().iSecMode, 
-                                          iNetworkPrefs().iProtectedSetupSupported
-                                        );
-    SetActive();
-    }
-
--- a/bearermanagement/mpm/src/rmpmdefaultconnection.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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: Client interface to MPM Default Connection server
-*
-*/
-
-#include "rmpmdefaultconnection.h"
-#include "mpmcommon.h"
-#include "mpmlogger.h"
-
-_LIT( KPanicCategory, "MPM Default Connection Client" );
-
-// ---------------------------------------------------------------------------
-// RMPMDefaultConnection::Connect
-// Creates connection to server
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RMPMDefaultConnection::Connect()
-    {
-    MPMLOGSTRING("RMPMDefaultConnection::Connect" )
-    TInt r( KErrNone );
-    if( !iClientConnected ) 
-        {
-        MPMLOGSTRING("RMPMDefaultConnection::Connect: Connecting to server")
-        r = CreateSession( KMPMDefaultConnectionServerName, Version(), KNumDefConnMessageSlots );
-        if(r == KErrNone)
-            {
-            iClientConnected = ETrue;
-            }
-        else
-            {
-            MPMLOGSTRING2("RMPMDefaultConnection::Connect: \
-Error occurred %d", r )
-            Close();
-            }
-        }
-    return r;
-    }
-
-// ---------------------------------------------------------------------------
-// RMPMDefaultConnection::Close
-// Closes connection to server
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void RMPMDefaultConnection::Close()
-    {
-    MPMLOGSTRING("RMPMDefaultConnection::Close" )
-    RSessionBase::Close();
-    iClientConnected = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// RMPMDefaultConnection::SetDefaultIAP
-// Sets IAP to be used as default connection
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RMPMDefaultConnection::SetDefaultIAP( TInt aIapId )
-    {
-    __ASSERT_ALWAYS( iClientConnected, 
-                     User::Panic( KPanicCategory, 
-                                  ERMPMPanicClientNotConnected ) );
-    MPMLOGSTRING("RMPMDefaultConnection::SetDefaultIAP" )
-    return SendReceive( EMPMDefaultConnectionSetDefaultIap, TIpcArgs( aIapId ) );
-    }
-
-// ---------------------------------------------------------------------------
-//RMPMDefaultConnection::ClearDefaultIAP
-// Clears IAP from being used as default connection
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt RMPMDefaultConnection::ClearDefaultIAP()
-    {
-    __ASSERT_ALWAYS( iClientConnected, 
-                     User::Panic( KPanicCategory, 
-                                  ERMPMPanicClientNotConnected ) );
-    MPMLOGSTRING("RMPMDefaultConnection::ClearDefaultIAP" )
-    return SendReceive( EMPMDefaultConnectionClearDefaultIap );
-    }
-
-// -----------------------------------------------------------------------------
-// RMPMDefaultConnection::Version
-// Returns version number
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TVersion RMPMDefaultConnection::Version() const
-    {
-    MPMLOGSTRING("RMPMDefaultConnection::Version" )
-    return TVersion(KMPMServerMajorVersionNumber,
-                    KMPMServerMinorVersionNumber,
-                    KMPMServerBuildVersionNumber);
-    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/bwins/cmapplsettingsuiu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+EXPORTS
+	??_ECmApplSettingsUi@@UAE@I@Z @ 1 NONAME ; CmApplSettingsUi::~CmApplSettingsUi(unsigned int)
+	?tr@CmApplSettingsUi@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString CmApplSettingsUi::tr(char const *, char const *)
+	?getStaticMetaObject@CmApplSettingsUi@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & CmApplSettingsUi::getStaticMetaObject(void)
+	?qt_metacast@CmApplSettingsUi@@UAEPAXPBD@Z @ 4 NONAME ; void * CmApplSettingsUi::qt_metacast(char const *)
+	?setSelection@CmApplSettingsUi@@QAEXABUSettingSelection@1@@Z @ 5 NONAME ; void CmApplSettingsUi::setSelection(struct CmApplSettingsUi::SettingSelection const &)
+	?tr@CmApplSettingsUi@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString CmApplSettingsUi::tr(char const *, char const *, int)
+	?trUtf8@CmApplSettingsUi@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString CmApplSettingsUi::trUtf8(char const *, char const *)
+	??1CmApplSettingsUi@@UAE@XZ @ 8 NONAME ; CmApplSettingsUi::~CmApplSettingsUi(void)
+	?selection@CmApplSettingsUi@@QBE?AUSettingSelection@1@XZ @ 9 NONAME ; struct CmApplSettingsUi::SettingSelection CmApplSettingsUi::selection(void) const
+	?qt_metacall@CmApplSettingsUi@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int CmApplSettingsUi::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?staticMetaObject@CmApplSettingsUi@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const CmApplSettingsUi::staticMetaObject
+	?finished@CmApplSettingsUi@@IAEXI@Z @ 12 NONAME ; void CmApplSettingsUi::finished(unsigned int)
+	?trUtf8@CmApplSettingsUi@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString CmApplSettingsUi::trUtf8(char const *, char const *, int)
+	??0CmApplSettingsUi@@QAE@PAVQObject@@@Z @ 14 NONAME ; CmApplSettingsUi::CmApplSettingsUi(class QObject *)
+	?metaObject@CmApplSettingsUi@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * CmApplSettingsUi::metaObject(void) const
+	?open@CmApplSettingsUi@@QAEXXZ @ 16 NONAME ; void CmApplSettingsUi::open(void)
+	?setOptions@CmApplSettingsUi@@QAEXABV?$QFlags@W4SelectionDialogItems@CmApplSettingsUi@@@@ABV?$QSet@I@@@Z @ 17 NONAME ; void CmApplSettingsUi::setOptions(class QFlags<enum CmApplSettingsUi::SelectionDialogItems> const &, class QSet<unsigned int> const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/cmapplsettingsui.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# CM Manager Application Settings UI project file.
+#
+
+TEMPLATE = lib
+TARGET = cmapplsettingsui
+TARGET.CAPABILITY = ALL -TCB
+DEFINES += BUILD_CMAPPLSETTINGSUI_DLL 
+DEPENDPATH += .
+INCLUDEPATH += inc
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+    MMP_RULES += "USERINCLUDE traces"
+}
+
+CONFIG += hb
+RESOURCES = res/cmapplsettingsui.qrc
+
+DOCML += res/cmradiodialog.docml
+
+TRANSLATIONS = cmapplsettingsui.ts
+
+#Store generated files to their own directory
+MOC_DIR = build
+RCC_DIR = build
+
+HEADERS += \
+    ../../ipcm_plat/connection_settings_ui_api/inc/cmapplsettingsui.h \
+    inc/cmapplsettingsui_p.h \
+    inc/cmradiodialog.h \
+    inc/cmsettingdata.h \
+    traces/OstTraceDefinitions.h
+    
+SOURCES += \
+    src/cmapplsettingsui.cpp \
+    src/cmapplsettingsui_p.cpp \
+    src/cmsettingdata.cpp \
+    src/cmradiodialog.cpp
+
+# Temporary export directory definition
+# This can be removed when the default has changed to "." from ".."
+mmpRuleDeffile = \
+    "$${LITERAL_HASH}ifdef WINSCW" \
+    "DEFFILE ./bwins/cmapplsettingsui.def" \
+    "$${LITERAL_HASH}else" \
+    "DEFFILE ./eabi/cmapplsettingsui.def" \
+    "$${LITERAL_HASH}endif"
+
+symbian: {
+    TARGET.UID3 = 0x2002DC89
+    TARGET.EPOCALLOWDLLDATA = 1
+    MMP_RULES += mmpRuleDeffile
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+    BLD_INF_RULES.prj_exports += "rom/cmapplsettingsui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cmapplsettingsui.iby)"
+    BLD_INF_RULES.prj_exports += "rom/cmapplsettingsui_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cmapplsettingsui_resources.iby)"
+    LIBS += -lcmmanager -lconnection_settings_shim
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/eabi/cmapplsettingsuiu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+EXPORTS
+	_ZN16CmApplSettingsUi10setOptionsERK6QFlagsINS_20SelectionDialogItemsEERK4QSetIjE @ 1 NONAME
+	_ZN16CmApplSettingsUi11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN16CmApplSettingsUi11qt_metacastEPKc @ 3 NONAME
+	_ZN16CmApplSettingsUi12setSelectionERKNS_16SettingSelectionE @ 4 NONAME
+	_ZN16CmApplSettingsUi16staticMetaObjectE @ 5 NONAME DATA 16
+	_ZN16CmApplSettingsUi19getStaticMetaObjectEv @ 6 NONAME
+	_ZN16CmApplSettingsUi4openEv @ 7 NONAME
+	_ZN16CmApplSettingsUi8finishedEj @ 8 NONAME
+	_ZN16CmApplSettingsUiC1EP7QObject @ 9 NONAME
+	_ZN16CmApplSettingsUiC2EP7QObject @ 10 NONAME
+	_ZN16CmApplSettingsUiD0Ev @ 11 NONAME
+	_ZN16CmApplSettingsUiD1Ev @ 12 NONAME
+	_ZN16CmApplSettingsUiD2Ev @ 13 NONAME
+	_ZNK16CmApplSettingsUi10metaObjectEv @ 14 NONAME
+	_ZNK16CmApplSettingsUi9selectionEv @ 15 NONAME
+	_ZTI16CmApplSettingsUi @ 16 NONAME
+	_ZTV16CmApplSettingsUi @ 17 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/inc/cmapplsettingsui_p.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Manager Application Settings UI private interface.  
+*/
+
+#ifndef CMAPPLSETTINGSUI_P_H
+#define CMAPPLSETTINGSUI_P_H
+
+// System includes
+
+#include <QObject>
+#include <QFlags>
+#include <QSet>
+#include <QList>
+#include <QSharedPointer>
+
+// User includes
+
+#include "cmconnectionmethod_shim.h"
+#include "cmdestination_shim.h"
+#include "cmsettingdata.h"
+#include "cmapplsettingsui.h"
+
+// Forward declarations
+
+class HbTranslator;
+class CmManagerShim;
+class CmRadioDialog;
+class TestCmApplSettingsUi;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class CmApplSettingsUiPrivate : QObject
+{
+    Q_OBJECT
+
+public:
+
+    // Data types
+
+    explicit CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer);
+    
+    virtual ~CmApplSettingsUiPrivate();
+
+    void setOptions(
+        const QFlags<CmApplSettingsUi::SelectionDialogItems> &listItems,
+        const QSet<CmApplSettingsUi::BearerTypeFilter> &bearerFilter);
+    
+    void setSelection(
+        const CmApplSettingsUi::SettingSelection &selection);
+    
+    CmApplSettingsUi::SettingSelection selection() const;
+    
+    void open();
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    Q_DISABLE_COPY(CmApplSettingsUiPrivate)
+
+    void runDestinationDialog();
+    
+    void runConnectionMethodDialog();
+        
+    int findDestination(uint destinationId) const;
+
+    int findConnectionMethod(uint connMethodId) const;
+
+    void emitFinished(uint status) const;
+    
+private slots:
+
+    void destinationDialogResult(bool success);
+    
+    void connMethodDialogResult(bool success);
+
+private: // data
+    
+    //! "Not found" search index value. 
+    static const int ItemNotFound = -1;
+
+    // General member data
+    CmApplSettingsUi *q_ptr;                //!< Public implementation
+    QSharedPointer<CmManagerShim> mCmManagerShim;   //!< CM Manager client instance
+    QSharedPointer<HbTranslator> mTranslator;   //!< Translator for the dialog       
+
+    // Configuration
+    QFlags<CmApplSettingsUi::SelectionDialogItems> mListItems;  //!< Wanted dialog type's
+    
+    // State data
+    CmSettingData mSettingData;             //!< Setting data
+    CmRadioDialog *mDestinationDialog;      //!< Destination dialog
+    CmRadioDialog *mConnMethodDialog;       //!< Connection method dialog
+    CmApplSettingsUi::SettingSelection mSelection;          //!< Current selection
+    QList< QSharedPointer<CmSettingData::Destination> > mDestinations;  //! Destinations
+    QList< QSharedPointer<CmSettingData::ConnMethod> > mConnMethods;    //! Connection methods
+    
+    // Friend classes
+    
+    // Test class needs direct access
+    friend class TestCmApplSettingsUi;
+};
+
+#endif // CMAPPLSETTINGSUI_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/inc/cmradiodialog.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Dialog implementation for the CM Manager Application Settings UI. 
+*
+*/
+
+#ifndef CMRADIODIALOG_H
+#define CMRADIODIALOG_H
+
+// System includes
+
+#include <QObject>
+#include <QSet>
+#include <QStringList>
+#include <QSharedPointer>
+
+// User includes
+
+// Forward declarations
+
+class HbDialog;
+class HbLabel;
+class HbRadioButtonList;
+class HbAction;
+class HbDocumentLoader;
+class TestCmApplSettingsUi;
+
+// External data types
+
+// Constants
+
+// Supported dialog types
+enum CmRadioDialogType {
+    CmRadioDialogTypeDestination = 1,       //!< Destination selection dialog
+    CmRadioDialogTypeAccessPoint            //!< Access point selection dialog
+};
+
+// Supported options
+enum CmRadioDialogOpt {
+    CmRadioDialogOptDedicatedAP = 1         //!< Append "Dedicated access point"
+};
+
+// Class declaration
+
+class CmRadioDialog : public QObject
+{
+    Q_OBJECT
+
+public:
+
+    // Data types
+
+    explicit CmRadioDialog(QObject *parent = 0);
+    
+    ~CmRadioDialog();
+    
+    void setType(CmRadioDialogType type);
+    
+    void setOptions(const QSet<CmRadioDialogOpt> &options);
+    
+    void setItems(const QStringList &list);
+    
+    void setSelected(int index);
+    
+    int selected() const;
+    
+    void open();
+    
+signals:
+
+    /*!
+     * Signal used for informing that the dialog has finished.
+     * 
+     * @param[in] success Dialog run success. This is true if OK was pressed.
+     */
+    void finished(bool success);
+
+public slots:
+
+    void dialogClosed(HbAction *action);
+
+protected:
+
+protected slots:
+
+private:
+
+    void setHeading();
+
+private slots:
+    
+    void loadDocml();
+
+private: // data
+
+    // Owned data
+    CmRadioDialogType mType;                    //!< Radio dialog type
+    QSet<CmRadioDialogOpt> mOptions;            //!< Radio dialog options
+    QSharedPointer<HbDocumentLoader> mLoader;   //!< Dialog document loader
+    QStringList mListItems;                     //!< Dialog radio button items
+    QSharedPointer<HbDialog> mDialog;           //!< Dialog reference
+    
+    // Not owned data
+    HbLabel *mHeading;                          //!< Dialog title
+    HbRadioButtonList *mList;                   //!< Dialog's radio button list
+    HbAction *mOkAction;                        //!< Dialog's OK button action
+    
+    // Friend classes
+    
+    // Test class needs direct access
+    friend class TestCmApplSettingsUi;
+};
+
+#endif // CMRADIODIALOG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/inc/cmsettingdata.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Data handling encapsulation for CM Application Settings UI.
+*
+*/
+
+#ifndef CMSETTINGDATA_H
+#define CMSETTINGDATA_H
+
+// System includes
+#include <QString>
+#include <QFlags>
+#include <QSet>
+#include <QList>
+#include <QSharedPointer>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <cmdestination_shim.h>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class CmSettingData
+{
+
+public:
+
+    // Data types
+
+    // Data class for Destination
+    class Destination
+    {
+    public:
+        int id;         //!< Destination ID.
+        QString name;   //!< Destination name.
+    };
+
+    // Data class for Connection Method
+    class ConnMethod
+    {
+    public:
+        int id;         //!< Connection Method ID.
+        QString name;   //!< Connection Method name.
+    };
+
+    explicit CmSettingData();
+    
+    ~CmSettingData();
+    
+    void setBearerFilter(const QSet<uint> &bearers);
+    
+    bool fetchDestinations(QList< QSharedPointer<Destination> > &destinations);
+
+    bool fetchConnMethods(QList< QSharedPointer<ConnMethod> > &connMethods);
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    void getCmManager();
+
+    bool validateDestination(CmDestinationShim *destination) const;
+    
+    bool validateConnMethod(CmConnectionMethodShim *connMethod) const;
+
+    static bool connMethodLessThan(
+        const QSharedPointer<ConnMethod> connMethod1,
+        const QSharedPointer<ConnMethod> connMethod2);
+    
+private slots:
+
+private: // data
+
+    QSet<uint> mBearers;                        //!< Bearer filter.
+    QSharedPointer<CmManagerShim> mCmManager;   //!< CM Manager client instance
+
+    // Friend classes
+};
+
+#endif // CMSETTINGDATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/res/cmapplsettingsui.qrc	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/docml" >
+        <file alias="cmradiodialog.docml">cmradiodialog.docml.bin</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/res/cmradiodialog.docml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="okAction" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_ok" name="text"/>
+    </object>
+    <object name="cancelAction" type="HbAction">
+        <string name="role" value="HbDialog:secondaryAction"/>
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="dialog" type="HbDialog">
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel"/>
+        <widget name="radioButtonList" role="HbDialog:contentWidget" type="HbRadioButtonList"/>
+        <bool name="backgroundFaded" value="TRUE"/>
+        <integer name="timeout" value="0"/>
+        <enums name="dismissPolicy" value="NoDismiss"/>
+        <ref object="okAction" role="HbWidget:addAction"/>
+        <ref object="cancelAction" role="HbWidget:addAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/rom/cmapplsettingsui.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CMAPPLSETTINGSUI_IBY
+#define CMAPPLSETTINGSUI_IBY
+
+file=ABI_DIR\BUILD_DIR\cmapplsettingsui.dll SHARED_LIB_DIR\cmapplsettingsui.dll
+
+#endif // CMAPPLSETTINGSUI_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/rom/cmapplsettingsui_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CMAPPLSETTINGSUI_RESOURCES_IBY
+#define CMAPPLSETTINGSUI_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cmapplsettingsui.qm QT_TRANSLATIONS_DIR/cmapplsettingsui.qm 
+
+#endif // CMAPPLSETTINGSUI_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/src/cmapplsettingsui.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Manager Application Settings UI implementation.  
+*
+*/
+
+// System includes
+
+// User includes
+
+#include "cmapplsettingsui_p.h"
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+CmApplSettingsUi::CmApplSettingsUi(QObject *parent) :
+    QObject(parent),
+    d_ptr(new CmApplSettingsUiPrivate(this))
+{
+}
+
+CmApplSettingsUi::~CmApplSettingsUi()
+{
+}
+
+void CmApplSettingsUi::setOptions(
+    const QFlags<SelectionDialogItems> &listItems,
+    const QSet<BearerTypeFilter> &bearerFilter)
+{
+    d_ptr->setOptions(listItems, bearerFilter);
+}
+
+void CmApplSettingsUi::setSelection(const SettingSelection &selection)
+{
+    d_ptr->setSelection(selection);
+}
+
+CmApplSettingsUi::SettingSelection CmApplSettingsUi::selection() const
+{
+    return d_ptr->selection();
+}
+
+void CmApplSettingsUi::open()
+{
+    d_ptr->open();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,407 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Manager Application Settings UI private implementation.  
+*/
+
+// System includes
+
+#include <HbTranslator>
+#include <HbApplication>
+#include <HbLabel>
+#include <cmmanager_shim.h>
+
+// User includes
+
+#include "cmradiodialog.h"
+#include "cmapplsettingsui_p.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmapplsettingsui_pTraces.h"
+#endif
+
+
+/*!
+    \class CmApplSettingsUiPrivate
+    \brief Private implementation class for Application Settings UI.
+
+    Displays a radio button list dialog for an application that can be used
+    to select a destination or connection method.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param q_pointer Parent object.
+ */
+CmApplSettingsUiPrivate::CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer) :
+    QObject(q_pointer),
+    q_ptr(q_pointer),
+    mTranslator(new HbTranslator("cmapplsettingsui")),
+    mListItems(
+        CmApplSettingsUi::ShowDestinations |
+        CmApplSettingsUi::ShowConnectionMethods),
+    mSettingData(),
+    mDestinationDialog(0),
+    mConnMethodDialog(0),
+    mSelection(),
+    mDestinations(),
+    mConnMethods()
+{   
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_ENTRY);
+    
+    // Initialize to default selection
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 0;
+        
+    // Install also common localization
+    mTranslator->loadCommon();
+
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_EXIT);
+}
+
+/*!
+    Destructor.
+ */
+CmApplSettingsUiPrivate::~CmApplSettingsUiPrivate()
+{
+    OstTraceFunctionEntry0(DUP1_CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_ENTRY);
+    OstTraceFunctionExit0(DUP1_CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_EXIT);
+}
+
+/*!
+    Options setter. 
+     
+    @param[in] listItems Dialog list items configuration.
+    @param[in] bearerFilter Dialog Connection Method bearer filter.
+ */
+void CmApplSettingsUiPrivate::setOptions(
+    const QFlags<CmApplSettingsUi::SelectionDialogItems> &listItems,
+    const QSet<CmApplSettingsUi::BearerTypeFilter> &bearerFilter)
+{
+    // Store the options
+    mListItems = listItems;
+    mSettingData.setBearerFilter(bearerFilter);
+}
+
+/*!
+    Dialog selection setter.
+    
+    @param[in] selection Dialog selection to set.
+ */
+void CmApplSettingsUiPrivate::setSelection(
+    const CmApplSettingsUi::SettingSelection &selection)
+{
+    // Set the selection.
+    // If the selection is invalid, it is ignored later on,
+    // and default is used instead.
+    mSelection = selection;
+}
+
+/*!
+    Dialog selection getter. Returns the current selection.
+    
+    @return Current dialog selection.
+ */
+CmApplSettingsUi::SettingSelection CmApplSettingsUiPrivate::selection() const
+{
+    return mSelection;
+}
+
+/*!
+    This function runs the dialog asynchronously. Use the setters to
+    configure the dialog before running. After the dialog has been closed
+    (accepted or cancelled), the signal finished() is emitted.
+ */
+void CmApplSettingsUiPrivate::open()
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_OPEN_ENTRY);
+
+    // Fetch filtered Destinations and Connection Methods
+    bool settingsRead = true;
+    if (mListItems.testFlag(CmApplSettingsUi::ShowDestinations)) {
+        settingsRead = mSettingData.fetchDestinations(mDestinations);
+    }
+    if (mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)) {
+        settingsRead &= mSettingData.fetchConnMethods(mConnMethods);
+    }
+
+    if (!settingsRead) {
+        // Settings reading failed
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorSettingsRead);
+    } else if (mListItems.testFlag(CmApplSettingsUi::ShowDestinations)) {
+        // Start with destination view
+        runDestinationDialog();
+    } else if (mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)) {
+        // Start directly with connection method view
+        runConnectionMethodDialog();
+    } else {
+        // Nothing to show, so finish
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+    }
+    
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_OPEN_EXIT);
+}
+
+/*!
+    Destination selection dialog execution.
+ */
+void CmApplSettingsUiPrivate::runDestinationDialog()
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_RUNDESTINATIONDIALOG_ENTRY);
+
+    // Check that there is some content to show:
+    // -At least one Destination
+    // -Or at least one Connection Method under "Dedicated access point"
+    if (mDestinations.isEmpty()
+        && (!mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)
+            || mConnMethods.isEmpty())) {
+        // Nothing to show, so finish
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+        OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_RUNDESTINATIONDIALOG_EXIT);
+        return;
+    }
+
+    // Create a new Destination dialog
+    delete mDestinationDialog;
+    mDestinationDialog = new CmRadioDialog(this);
+    mDestinationDialog->setType(CmRadioDialogTypeDestination);
+    
+    // Add Dedicated access point option if requested & supported
+    if (mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)
+        && !mConnMethods.isEmpty()) {
+        QSet<CmRadioDialogOpt> options;
+        options.insert(CmRadioDialogOptDedicatedAP);
+        mDestinationDialog->setOptions(options);
+    }
+    
+    // Add destinations to the dialog
+    QStringList destinations;
+    for (int i = 0; i < mDestinations.count(); i++) {
+        destinations << mDestinations[i]->name;
+    }
+    mDestinationDialog->setItems(destinations);
+    
+    // Set selection
+    int index = 0;          // Default index is the first
+    if (mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)
+        && mSelection.result == CmApplSettingsUi::SelectionTypeConnectionMethod
+        && !mConnMethods.isEmpty()) {
+        // Dedicated access point
+        index = destinations.count();
+    } else {
+        int destinationIndex = findDestination(mSelection.id);
+        if (destinationIndex != ItemNotFound) {
+            index = destinationIndex;
+        }
+    }
+    mDestinationDialog->setSelected(index);
+    
+    // Execute the dialog
+    bool connected = connect(
+        mDestinationDialog,
+        SIGNAL(finished(bool)),
+        this,
+        SLOT(destinationDialogResult(bool)));
+    Q_ASSERT(connected);
+    mDestinationDialog->open();
+    
+    OstTraceFunctionExit0(DUP1_CMAPPLSETTINGSUIPRIVATE_RUNDESTINATIONDIALOG_EXIT);
+}
+
+/*!
+    Connection method selection dialog execution.
+ */
+void CmApplSettingsUiPrivate::runConnectionMethodDialog()
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_RUNCONNECTIONMETHODDIALOG_ENTRY);
+    
+    // Check that there is at least one Connection Method to show
+    if (mConnMethods.count() == 0) {
+        // Nothing to show, so finish
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+        OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_RUNCONNECTIONMETHODDIALOG_EXIT);
+        return;
+    }
+
+    // Create a dialog & configure it
+    delete mConnMethodDialog;
+    mConnMethodDialog = new CmRadioDialog(this);
+    mConnMethodDialog->setType(CmRadioDialogTypeAccessPoint);
+
+    // Add connection methods to the dialog
+    QStringList connectionMethods;
+    for (int i = 0; i < mConnMethods.count(); i++) {
+        connectionMethods << mConnMethods[i]->name;
+    }
+    mConnMethodDialog->setItems(connectionMethods);
+
+    // Set selection
+    int index = findConnectionMethod(mSelection.id);
+    if (index == ItemNotFound) {
+        // Connection Method not found
+        index = 0;
+    }
+    mConnMethodDialog->setSelected(index);
+    
+    // Execute the dialog
+    bool connected = connect(
+        mConnMethodDialog,
+        SIGNAL(finished(bool)),
+        this,
+        SLOT(connMethodDialogResult(bool)));
+    Q_ASSERT(connected);
+    mConnMethodDialog->open();
+
+    OstTraceFunctionExit0(DUP1_CMAPPLSETTINGSUIPRIVATE_RUNCONNECTIONMETHODDIALOG_EXIT);
+}
+
+/*!
+    Destination search function.
+    
+    @param destinationId Destination ID.
+    
+    @return Returns index if found, and ItemNotFound if not. 
+ */
+int CmApplSettingsUiPrivate::findDestination(uint destinationId) const
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_FINDDESTINATION_ENTRY);
+    
+    int result = ItemNotFound;
+    
+    for (int i = 0; i < mDestinations.count(); i++) {
+        if (mDestinations[i]->id == destinationId) {
+            result = i;
+            break;
+        }
+    }
+    
+    OstTraceExt2(
+        TRACE_NORMAL,
+        CMAPPLSETTINGSUIPRIVATE_FINDDESTINATION,
+        "CmApplSettingsUiPrivate::findDestination;destinationId=%u;result=%d",
+        destinationId,
+        result);
+    
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_FINDDESTINATION_EXIT);
+    return result;
+}
+
+/*!
+    Connection Method search function.
+    
+    @param connMethodId Connection Method ID.
+    
+    @return Returns index if found, and ItemNotFound if not. 
+ */
+int CmApplSettingsUiPrivate::findConnectionMethod(uint connMethodId) const
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_FINDCONNECTIONMETHOD_ENTRY);
+
+    int result = ItemNotFound;
+    
+    for (int i = 0; i < mConnMethods.count(); i++) {
+        if (mConnMethods[i]->id == connMethodId) {
+            result = i;
+            break;
+        }
+    }
+    
+    OstTraceExt2(
+        TRACE_NORMAL,
+        CMAPPLSETTINGSUIPRIVATE_FINDCONNECTIONMETHOD,
+        "CmApplSettingsUiPrivate::findConnectionMethod;connMethodId=%u;result=%d",
+        connMethodId,
+        result);
+    
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_FINDCONNECTIONMETHOD_EXIT);
+    return result;
+}
+
+/*!
+   Emits the completion signal "finished(uint)".
+   
+   @param status Finishing status code.
+ */
+void CmApplSettingsUiPrivate::emitFinished(uint status) const
+{
+    OstTrace1(
+        TRACE_NORMAL,
+        CMAPPLSETTINGSUIPRIVATE_EMITFINISHED,
+        "CmApplSettingsUiPrivate::emitFinished;status=%u",
+        status);
+    emit q_ptr->finished(status);
+}
+
+/*!
+    Destination dialog result handling slot.
+    
+    @param success Destination dialog result - TRUE if accepted.
+ */
+void CmApplSettingsUiPrivate::destinationDialogResult(bool success)
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_DESTINATIONDIALOGRESULT_ENTRY);
+    
+    if (success) {
+        // Dialog was accepted - user clicked "OK"
+        int index = mDestinationDialog->selected();    
+        if (mListItems.testFlag(CmApplSettingsUi::ShowConnectionMethods)
+            && index == mDestinations.count()) {
+            // Dedicated access point was selected
+            runConnectionMethodDialog();
+        } else {
+            // Destination was selected
+            mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+            mSelection.id = mDestinations[index]->id;
+            emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+        }
+    } else {
+        // Dialog was cancelled - user clicked "Cancel"
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+    }
+    
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_DESTINATIONDIALOGRESULT_EXIT);
+}
+
+/*!
+    Connection method dialog result handling slot.
+    
+    @param success Connection method dialog result - TRUE if accepted.
+ */
+void CmApplSettingsUiPrivate::connMethodDialogResult(bool success)
+{
+    OstTraceFunctionEntry0(CMAPPLSETTINGSUIPRIVATE_CONNMETHODDIALOGRESULT_ENTRY);
+    
+    if (success) {
+        // Dialog was accepted - user clicked "OK"
+        int index = mConnMethodDialog->selected();
+        mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+        mSelection.id = mConnMethods[index]->id;
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+    } else {
+        // Dialog was cancelled - user clicked "Cancel"
+        emitFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+    }
+    
+    OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_CONNMETHODDIALOGRESULT_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/src/cmradiodialog.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,276 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Dialog implementation for the CM Manager Application Settings UI. 
+*
+*/
+
+// System includes
+
+#include <HbDialog>
+#include <HbLabel>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbDocumentLoader>
+
+// User includes
+
+#include "cmradiodialog.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmradiodialogTraces.h"
+#endif
+
+
+/*!
+    \class CmRadioDialog
+    \brief Radio dutton dialog class for Application Settings UI.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param parent Parent object.
+*/
+CmRadioDialog::CmRadioDialog(QObject *parent) :
+    QObject(parent),
+    mType(CmRadioDialogTypeDestination),
+    mLoader(),
+    mListItems(),
+    mDialog(),
+    mHeading(0),
+    mList(0),
+    mOkAction(0)
+{    
+    OstTraceFunctionEntry0(CMRADIODIALOG_CMRADIODIALOG_ENTRY);
+    
+    mLoader = QSharedPointer<HbDocumentLoader>(new HbDocumentLoader());
+    loadDocml();
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_CMRADIODIALOG_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CmRadioDialog::~CmRadioDialog()
+{
+    OstTraceFunctionEntry0(DUP1_CMRADIODIALOG_CMRADIODIALOG_ENTRY);
+    OstTraceFunctionExit0(DUP1_CMRADIODIALOG_CMRADIODIALOG_EXIT);
+}
+
+/*!
+    Heading setter.
+    
+    @param type Dialog type.
+*/
+void CmRadioDialog::setType(CmRadioDialogType type)
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SETTYPE_ENTRY);
+    
+    mType = type;
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_SETTYPE_EXIT);
+}
+
+/*!
+    Options setter.
+    
+    @param options Dialog options.
+ */
+void CmRadioDialog::setOptions(const QSet<CmRadioDialogOpt> &options)
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SETOPTIONS_ENTRY);
+    
+    mOptions = options;
+
+    OstTraceFunctionExit0(CMRADIODIALOG_SETOPTIONS_EXIT);
+}
+
+/*!
+    Radio button list items setter.
+    
+    @param list List of radio button item strings.
+*/
+void CmRadioDialog::setItems(const QStringList &list)
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SETITEMS_ENTRY);
+    
+    // Store the new items
+    mListItems = list;
+    
+    // Append "Dedicated access point"
+    if (mOptions.contains(CmRadioDialogOptDedicatedAP)) {
+        mListItems.append(hbTrId("txt_occ_list_dedicated_access_point"));
+    }
+
+    // Set the items to the radio list
+    mList->setItems(mListItems);
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_SETITEMS_EXIT);
+}
+    
+/*!
+    Setter for current selection.
+    
+    @param index Radio list item current selection setter. Indexing from zero.
+*/
+void CmRadioDialog::setSelected(int index)
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SETSELECTED_ENTRY);
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        CMRADIODIALOG_SETSELECTED,
+        "CmRadioDialog::setSelected;index=%d",
+        index);
+    
+    // The index must be valid
+    Q_ASSERT(index < mList->items().count());
+    
+    // Set the current selection
+    mList->setSelected(index);
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_SETSELECTED_EXIT);
+}
+    
+/*!
+    Getter for current selection.
+    
+    @return Current selection index. Indexing from zero.
+*/
+int CmRadioDialog::selected() const
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SELECTED_ENTRY);
+    
+    int selection = mList->selected();
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        CMRADIODIALOG_SELECTED,
+        "CmRadioDialog::selected;index=%d",
+        index);    
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_SELECTED_EXIT);
+    return selection;
+}
+    
+/*!
+    Run the dialog asynchronously. When the dialog has finished, the signal
+    finished(bool) is sent.
+*/
+void CmRadioDialog::open()
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_EXEC_ENTRY);
+    
+    setHeading();
+    mDialog->open(this, SLOT(dialogClosed(HbAction*)));
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_EXEC_EXIT);
+}
+
+/*!
+    Dialog result handling slot.
+    
+    @param action Selected action. 
+ */
+void CmRadioDialog::dialogClosed(HbAction *action)
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_DIALOGCLOSED_ENTRY);
+    
+    // Extract the selection status
+    bool success;
+    if (action == mOkAction) {
+        success = true;
+    } else {
+        success = false;
+    }
+    emit finished(success);
+    
+    OstTraceExt1(
+        TRACE_NORMAL,
+        CMRADIODIALOG_EXEC_RESULT,
+        "CmRadioDialog::exec;success=%hhu",
+        success);
+
+    OstTraceFunctionExit0(CMRADIODIALOG_DIALOGCLOSED_EXIT);
+}
+
+/*!
+    Dialog heading setter.
+ */
+void CmRadioDialog::setHeading()
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_SETHEADING_ENTRY);
+    
+    QString heading;
+    
+    // Select correct header based on dialog type
+    switch (mType) {
+    case CmRadioDialogTypeDestination:
+        heading = hbTrId("txt_occ_title_network_connection");
+        break;
+        
+    case CmRadioDialogTypeAccessPoint:
+        heading = hbTrId("txt_occ_title_access_point");
+        break;
+        
+#ifndef QT_NO_DEBUG
+    default:
+        // Unsupported dialog type detected
+        Q_ASSERT(0);
+        break;
+#endif        
+    }
+    
+    mHeading->setPlainText(heading);
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_SETHEADING_EXIT);
+}
+
+/*!
+    Docml loading for the dialog.
+*/
+void CmRadioDialog::loadDocml()
+{
+    OstTraceFunctionEntry0(CMRADIODIALOG_LOADDOCML_ENTRY);
+    bool ok = false;
+
+    // Load the common section
+    mLoader->load(":/docml/cmradiodialog.docml", &ok);
+    Q_ASSERT(ok);
+
+    mDialog = QSharedPointer<HbDialog>(qobject_cast<HbDialog *>(mLoader->findWidget("dialog")));
+    Q_ASSERT(mDialog);
+    
+    mHeading = qobject_cast<HbLabel *>(mLoader->findWidget("heading"));
+    Q_ASSERT(mHeading);
+    
+    mList = qobject_cast<HbRadioButtonList *>(mLoader->findWidget("radioButtonList")); 
+    Q_ASSERT(mList);
+    
+    mOkAction = qobject_cast<HbAction *>(mLoader->findObject("okAction")); 
+    Q_ASSERT(mOkAction);
+    
+    OstTraceFunctionExit0(CMRADIODIALOG_LOADDOCML_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/src/cmsettingdata.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,324 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Data handling encapsulation for CM Application Settings UI.
+*
+*/
+
+// System includes
+#include <HbStringUtil>
+
+// User includes
+#include "cmsettingdata.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmsettingdataTraces.h"
+#endif
+
+
+/*!
+    \class CmSettingData
+    \brief Cm Manager settings data wrapper class for Application Settings UI.
+
+    This class fetches, catches exceptions, filters and orders the
+    destinations and connection methods needed by Application Settings UI.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CmSettingData::CmSettingData() :
+    mBearers(),
+    mCmManager()
+{    
+    OstTraceFunctionEntry0(CMSETTINGDATA_CMSETTINGDATA_ENTRY);
+    OstTraceFunctionExit0(CMSETTINGDATA_CMSETTINGDATA_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CmSettingData::~CmSettingData()
+{
+    OstTraceFunctionEntry0(DUP1_CMSETTINGDATA_CMSETTINGDATA_ENTRY);
+    OstTraceFunctionExit0(DUP1_CMSETTINGDATA_CMSETTINGDATA_EXIT);
+}
+
+/*!
+    Bearer filter setter function.
+    
+    @param[in] bearers Connection Method bearer filter.
+*/
+void CmSettingData::setBearerFilter(const QSet<uint> &bearers)
+{
+    OstTraceFunctionEntry0(CMSETTINGDATA_SETBEARERFILTER_ENTRY);
+    
+    mBearers = bearers;
+    
+    OstTraceFunctionExit0(CMSETTINGDATA_SETBEARERFILTER_EXIT);
+}
+
+/*!
+    Fetches destinations suitable for Application Selection UI Dialog.
+    
+    @param[out] destinations Destination list.
+    
+    @return Settings fetching status - true if reading succeeded.
+*/
+bool CmSettingData::fetchDestinations(
+    QList< QSharedPointer<Destination> > &destinations)
+{
+    OstTraceFunctionEntry0(CMSETTINGDATA_FETCHDESTINATIONS_ENTRY);
+    
+    bool success = false;
+
+    // Clear the list just in case
+    destinations.clear();
+    
+    // Catch all CM Manager exceptions
+    try {
+        getCmManager();
+        
+        // Fetch all destinations
+        QList<uint> destArray;
+        mCmManager->allDestinations(destArray);
+        int count = destArray.count();
+        
+        OstTrace1(
+            TRACE_NORMAL,
+            CMSETTINGDATA_FETCHDESTINATIONS_RETRIEVED,
+            "CmSettingData::fetchDestinations retrieved;count=%d",
+            count);
+        
+        // Go through all destinations
+        for (int i=0; i < count; i++) {
+            QSharedPointer<CmDestinationShim> destination;
+            destination = QSharedPointer<CmDestinationShim>(
+                mCmManager->destination(destArray[i]));
+            // Append to list if destination is OK
+            if (validateDestination(destination.data())) {
+                QSharedPointer<Destination> dest(new Destination);
+                dest->id = destination->id();
+                dest->name = destination->name();
+                destinations.append(dest);
+            }
+        }
+        
+        // Destinations fetched successfully 
+        success = true;
+    } catch (const std::exception &ex) {
+        int error = qt_symbian_exception2Error(ex);
+        OstTrace1(
+            TRACE_NORMAL,
+            CMSETTINGDATA_FETCHDESTINATIONS_EXCEPTION,
+            "CmSettingData::fetchDestinations exception;error=%d",
+            error);
+    }
+
+    OstTraceFunctionExit0(CMSETTINGDATA_FETCHDESTINATIONS_EXIT);
+    return success;
+}
+
+/*!
+    Fetching of connection methods suitable for Application Selection UI Dialog.
+    
+    @param[out] connMethods Connection Method list.
+    
+    @return Settings fetching status - true if reading succeeded.
+ */
+bool CmSettingData::fetchConnMethods(
+    QList< QSharedPointer<ConnMethod> > &connMethods)
+{
+    OstTraceFunctionEntry0(CMSETTINGDATA_FETCHCONNMETHODS_ENTRY);
+    
+    bool success = false;
+
+    // Clear the list just in case
+    connMethods.clear();
+    
+    // Catch all CM Manager exceptions
+    try {
+        getCmManager();
+        
+        // Fetch all connection methods
+        QList<uint> connMethodList;
+        mCmManager->connectionMethod(connMethodList, false);
+        int count = connMethodList.count();
+        
+        OstTrace1(
+            TRACE_NORMAL,
+            CMSETTINGDATA_FETCHCONNMETHODS_RETRIEVED,
+            "CmSettingData::fetchConnMethods retrieved;count=%d",
+            count);
+
+        // Go through all connection methods
+        for (int i=0; i < count; i++) {
+            QSharedPointer<CmConnectionMethodShim> connMethod;
+            connMethod = QSharedPointer<CmConnectionMethodShim>(
+                mCmManager->connectionMethod(connMethodList[i]));
+            // Append to list if connection method is OK
+            if (validateConnMethod(connMethod.data())) {
+                QSharedPointer<ConnMethod> connectionMethod(new ConnMethod);
+                connectionMethod->id = connMethod->getIntAttribute(
+                    CMManagerShim::CmId);
+                connectionMethod->name = connMethod->getStringAttribute(
+                    CMManagerShim::CmName);
+                connMethods.append(connectionMethod);
+            }
+        }
+
+        // Destinations fetched successfully 
+        success = true;
+    } catch (const std::exception &ex) {
+        int error = qt_symbian_exception2Error(ex);
+        OstTrace1(
+            TRACE_NORMAL,
+            CMSETTINGDATA_FETCHCONNMETHODS_EXCEPTION,
+            "CmSettingData::fetchDestinations exception;error=%d",
+            error);
+    }
+    
+    // Order the list by connection method name
+    qSort(
+        connMethods.begin(),
+        connMethods.end(),
+        CmSettingData::connMethodLessThan);
+    
+    OstTraceFunctionExit0(CMSETTINGDATA_FETCHCONNMETHODS_EXIT);
+    return success;
+}
+
+/*!
+    Instantiates Cm Manager Shim for this setting data object.
+    This is a member function since this can throw an exception and it
+    needs to be catched.
+ */
+void CmSettingData::getCmManager()
+{
+    if (!mCmManager) {
+        mCmManager = QSharedPointer<CmManagerShim>(new CmManagerShim());    
+    }
+}
+
+/*!
+    Validates the given destination.
+    This function checks that the following criterias match:
+    -The destination is not empty (i.e. it has least one Connection Method).
+     This covers also the bearer filter, so there must be at least one
+     Connection Method after the bearer filtering.
+    -The destination is not hidden.
+    
+    @param[in] destination Destination to validate.
+
+    @return Validation result - true if valid.
+ */
+bool CmSettingData::validateDestination(CmDestinationShim *destination) const
+{
+    OstTraceFunctionEntry0(CMSETTINGDATA_VALIDATEDESTINATION_ENTRY);
+    
+    bool valid = true;
+
+    // Destination must not be hidden or empty
+    if (destination->isHidden() ||
+        destination->connectionMethodCount() == 0) {
+        valid = false;
+    } else if (!mBearers.isEmpty()) {
+        // If filter is empty, all bearers are supported
+
+        // Check that there is at least one Connection Method that
+        // matches after bearer filtering
+        valid = false;
+        for (int i=0; i < destination->connectionMethodCount(); i++) {
+            QSharedPointer<CmConnectionMethodShim> connMethod;
+            connMethod = QSharedPointer<CmConnectionMethodShim>(
+                destination->connectionMethod(i));
+            int bearer = connMethod->getIntAttribute(CMManagerShim::CmBearerType);
+            if (mBearers.contains(bearer)) {
+                // Matching bearer found from this Connection Method
+                valid = true;
+                break;
+            }
+        }
+    }
+
+    OstTraceExt2(
+        TRACE_NORMAL,
+        CMSETTINGDATA_VALIDATEDESTINATION_RESULT,
+        "CmSettingData::validateDestination result;destination=%d;valid=%hhd",
+        (TInt32)destination->id(),
+        valid);
+
+    OstTraceFunctionExit0(CMSETTINGDATA_VALIDATEDESTINATION_EXIT);
+    return valid;
+}
+
+/*!
+    Validates the given connection method.
+    This function checks that the following criterias match:
+    -The bearer type of the connection method matches the set filter.
+    -The connection method is not hidden.
+    
+    @param[in] connMethod Connection method to validate.
+
+    @return Validation result - true if valid.
+ */
+bool CmSettingData::validateConnMethod(CmConnectionMethodShim *connMethod) const
+{
+    OstTraceFunctionEntry0(CMSETTINGDATA_VALIDATECONNMETHOD_ENTRY);
+
+    bool valid = true;
+
+    int bearer = connMethod->getIntAttribute(CMManagerShim::CmBearerType);
+    bool hidden = connMethod->getBoolAttribute(CMManagerShim::CmHidden);
+    if (hidden || (!mBearers.isEmpty() && !mBearers.contains(bearer))) {
+        valid = false;
+    }
+    
+    OstTraceExt4(
+        TRACE_NORMAL,
+        CMSETTINGDATA_VALIDATECONNMETHOD_RESULT,
+        "CmSettingData::validateConnMethod result;id=%d;valid=%hhd;hidden=%hhd;bearer=%d",
+        connMethod->getIntAttribute(CMManagerShim::CmId),
+        valid,
+        hidden,
+        bearer);
+
+    OstTraceFunctionEntry0(CMSETTINGDATA_VALIDATECONNMETHOD_EXIT);
+    return valid;
+}
+
+/*!
+    Compares two Connection Methods.
+    
+    @param[in] connMethod1 Connection method to compare with.
+    @param[in] connMethod2 Connection method to compare.
+    
+    @return Returns true if the first connection method is "less than"
+    the second one.
+ */
+bool CmSettingData::connMethodLessThan(
+    const QSharedPointer<ConnMethod> connMethod1,
+    const QSharedPointer<ConnMethod> connMethod2)
+{
+    int result = HbStringUtil::compareC(connMethod1->name, connMethod2->name);
+    return (result < 0) ? true : false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ */
+
+#ifndef OSTTRACEDEFINITIONS_H
+#define OSTTRACEDEFINITIONS_H
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tsrc.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS += \
+    tst_applsettingsui
+
+CONFIG += ordered
+
+symbian: {
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/inc/applsettester.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Dialog implementaton for test application 
+* for testing CM Manager Application Settings Ui.
+*/
+
+#ifndef APPLSETTESTER_H
+#define APPLSETTESTER_H
+
+#include <QObject>
+#include <HbMainWindow>
+
+#include "cmapplsettingsui.h"
+
+class HbDocumentLoader;
+class HbCheckBox;
+class HbAction;
+class HbLabel;
+class HbLineEdit;
+class HbComboBox;
+
+class ApplSettTester : public HbMainWindow
+{
+    Q_OBJECT
+    
+public:
+    ApplSettTester(QWidget *parent = 0);
+    ~ApplSettTester();
+        
+private slots:
+    void runTest();
+    void docmlLoad(Qt::Orientation orientation);
+    void orientationChange(Qt::Orientation);
+    void showResult(uint retval);
+
+private:
+    
+    HbDocumentLoader *docLoader;
+    HbView *view;              
+    HbAction *action;
+    HbCheckBox *checkboxDest;
+    HbCheckBox *checkboxCM;
+    HbCheckBox *checkboxWlan;
+    HbCheckBox *checkboxGprs;
+    HbLabel *labelResult;
+    HbLineEdit *selectionId;
+    HbComboBox *selectionMode;
+    
+    CmApplSettingsUi *applSett;
+    
+    CmApplSettingsUi::SettingSelection mSelection;
+};
+
+#endif // APPLSETTESTER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.docml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="testAction" type="HbAction">
+        <string name="text" value="Test"/>
+    </object>
+    <widget name="testApplView" type="HbView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="container_P" type="HbWidget">
+                <widget name="label_1" type="HbLabel">
+                    <string name="plainText" value="Select Dialog Type:"/>
+                </widget>
+                <widget name="checkbox_dest" type="HbCheckBox">
+                    <enums name="checkState" value="Checked"/>
+                    <string name="text" value="Destinations"/>
+                </widget>
+                <widget name="checkbox_cm" type="HbCheckBox">
+                    <enums name="checkState" value="Checked"/>
+                    <string name="text" value="Connection Methods"/>
+                </widget>
+                <widget name="label" type="HbLabel">
+                    <string name="plainText" value="Bearer Filter:"/>
+                </widget>
+                <widget name="checkbox_wlan" type="HbCheckBox">
+                    <string name="text" value="WLAN"/>
+                </widget>
+                <widget name="checkbox_gprs" type="HbCheckBox">
+                    <string name="text" value="GPRS"/>
+                </widget>
+                <widget name="label_2" type="HbLabel">
+                    <string name="plainText" value="Selection:"/>
+                </widget>
+                <widget name="container_mode" type="HbWidget">
+                    <widget name="mode" type="HbComboBox">
+                        <container name="items" type="stringlist">
+                            <string value="Destination"/>
+                            <string value="Connection Method"/>
+                        </container>
+                        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                    </widget>
+                    <widget name="label_3" type="HbLabel">
+                        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                        <string name="plainText" value="Mode:"/>
+                    </widget>
+                    <real name="z" value="0"/>
+                    <layout orientation="Horizontal" type="linear">
+                        <linearitem itemname="label_3"/>
+                        <linearitem itemname="mode"/>
+                    </layout>
+                </widget>
+                <widget name="container_id" type="HbWidget">
+                    <widget name="label_4" type="HbLabel">
+                        <string name="plainText" value="Id:"/>
+                    </widget>
+                    <widget name="id" type="HbLineEdit">
+                        <enums name="alignment" value="AlignLeft|AlignLeading"/>
+                        <string name="text" value="0"/>
+                    </widget>
+                    <real name="z" value="0"/>
+                    <layout orientation="Horizontal" type="linear">
+                        <linearitem itemname="label_4"/>
+                        <linearitem itemname="id"/>
+                    </layout>
+                </widget>
+                <widget name="label_5" type="HbLabel">
+                    <real name="z" value="1"/>
+                    <string name="plainText" value="Result:"/>
+                </widget>
+                <widget name="result" type="HbLabel">
+                    <enums name="alignment" value="AlignLeft|AlignVCenter|AlignHCenter|AlignLeading"/>
+                    <real name="z" value="3"/>
+                    <string name="plainText" value="-"/>
+                </widget>
+                <widget name="toolBar" type="HbToolBar">
+                    <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                    <ref object="testAction" role="HbToolBar:addAction"/>
+                </widget>
+                <real name="z" value="1"/>
+                <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+                <layout orientation="Vertical" type="linear">
+                    <linearitem itemname="label_1"/>
+                    <linearitem itemname="checkbox_dest"/>
+                    <linearitem itemname="checkbox_cm"/>
+                    <linearitem itemname="label"/>
+                    <linearitem itemname="checkbox_wlan"/>
+                    <linearitem itemname="checkbox_gprs"/>
+                    <linearitem itemname="label_2"/>
+                    <linearitem itemname="container_mode"/>
+                    <linearitem itemname="container_id"/>
+                    <linearitem itemname="label_5"/>
+                    <linearitem itemname="result"/>
+                    <linearitem itemname="toolBar"/>
+                </layout>
+            </widget>
+            <widget name="container_L1" type="HbWidget">
+                <layout orientation="Horizontal" type="linear"/>
+            </widget>
+            <widget name="container_L2" type="HbWidget">
+                <layout orientation="Vertical" type="linear"/>
+            </widget>
+            <widget name="container_L3" type="HbWidget">
+                <layout orientation="Vertical" type="linear"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="container_P" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="container_P" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="container_P" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="container_P" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <string name="title" value="cmapplsettingsui"/>
+    </widget>
+    <section name="portrait">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="container_P" type="HbWidget">
+                <widget name="label_1" type="HbLabel"/>
+                <widget name="checkbox_dest" type="HbCheckBox"/>
+                <widget name="checkbox_cm" type="HbCheckBox"/>
+                <widget name="label" type="HbLabel"/>
+                <widget name="checkbox_wlan" type="HbCheckBox"/>
+                <widget name="checkbox_gprs" type="HbCheckBox"/>
+                <widget name="label_2" type="HbLabel"/>
+                <widget name="container_mode" type="HbWidget">
+                    <widget name="mode" type="HbComboBox"/>
+                    <widget name="label_3" type="HbLabel"/>
+                </widget>
+                <widget name="container_id" type="HbWidget">
+                    <widget name="label_4" type="HbLabel"/>
+                    <widget name="id" type="HbLineEdit"/>
+                </widget>
+                <widget name="label_5" type="HbLabel"/>
+                <widget name="result" type="HbLabel"/>
+                <widget name="toolBar" type="HbToolBar"/>
+                <layout orientation="Vertical" type="linear">
+                    <linearitem itemname="label_1"/>
+                    <linearitem itemname="checkbox_dest"/>
+                    <linearitem itemname="checkbox_cm"/>
+                    <linearitem itemname="label"/>
+                    <linearitem itemname="checkbox_wlan"/>
+                    <linearitem itemname="checkbox_gprs"/>
+                    <linearitem itemname="label_2"/>
+                    <linearitem itemname="container_mode"/>
+                    <linearitem itemname="container_id"/>
+                    <linearitem itemname="label_5"/>
+                    <linearitem itemname="result"/>
+                    <linearitem itemname="toolBar"/>
+                </layout>
+            </widget>
+        </widget>
+    </section>
+    <section name="landscape">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="container_L1" type="HbWidget">
+                <widget name="container_L2" type="HbWidget">
+                    <widget name="label_1" type="HbLabel"/>
+                    <widget name="checkbox_dest" type="HbCheckBox"/>
+                    <widget name="checkbox_cm" type="HbCheckBox"/>
+                    <widget name="label" type="HbLabel"/>
+                    <widget name="checkbox_wlan" type="HbCheckBox"/>
+                    <widget name="checkbox_gprs" type="HbCheckBox"/>
+                    <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+                    <layout orientation="Vertical" type="linear">
+                        <linearitem itemname="label_1"/>
+                        <linearitem itemname="checkbox_dest"/>
+                        <linearitem itemname="checkbox_cm"/>
+                        <linearitem itemname="label"/>
+                        <linearitem itemname="checkbox_wlan"/>
+                        <linearitem itemname="checkbox_gprs"/>
+                    </layout>
+                </widget>
+                <widget name="container_L3" type="HbWidget">
+                    <widget name="label_2" type="HbLabel"/>
+                    <widget name="container_mode" type="HbWidget">
+                        <widget name="mode" type="HbComboBox"/>
+                        <widget name="label_3" type="HbLabel"/>
+                    </widget>
+                    <widget name="container_id" type="HbWidget">
+                        <widget name="label_4" type="HbLabel"/>
+                        <widget name="id" type="HbLineEdit"/>
+                    </widget>
+                    <widget name="label_5" type="HbLabel"/>
+                    <widget name="result" type="HbLabel"/>
+                    <widget name="toolBar" type="HbToolBar"/>
+                    <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Ignored" verticalStretch="0"/>
+                    <layout orientation="Vertical" type="linear">
+                        <linearitem itemname="label_2"/>
+                        <linearitem itemname="container_mode"/>
+                        <linearitem itemname="container_id"/>
+                        <linearitem itemname="label_5"/>
+                        <linearitem itemname="result"/>
+                        <linearitem itemname="toolBar"/>
+                    </layout>
+                </widget>
+                <layout orientation="Horizontal" type="linear">
+                    <linearitem itemname="container_L2"/>
+                    <linearitem itemname="container_L3"/>
+                </layout>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="container_L1" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="container_L1" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="container_L1" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="container_L1" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape"/>
+        <uistate name="portrait" sections="#common portrait"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.qrc	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/docml" >
+        <file alias="tst_applsettingsui.docml">tst_applsettingsui.docml.bin</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CMAPPLSETTINGSUI_TEST_IBY
+#define CMAPPLSETTINGSUI_TEST_IBY
+
+#include <bldvariant.hrh>
+
+#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
+
+S60_APP_EXE(tst_applsettingsui)
+S60_APP_RESOURCE(tst_applsettingsui)
+UPGRADABLE_APP_REG_RSC(tst_applsettingsui)
+
+data=DATAZ_\system\install\tst_applsettingsui_stub.sis  system\install\tst_applsettingsui_stub.sis
+
+#endif // CMAPPLSETTINGSUI_TEST_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui_stub.pkg	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: This is the stub package file for tst_applsettingsui SIS creation
+;
+
+; Languages
+&EN
+
+; Header
+#{"tst_applsettingsui"},(0x2002E69A),1,0,0,TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Stub Files
+""-"z:\sys\bin\tst_applsettingsui.exe"
+""-"z:\private\10003a3f\import\apps\tst_applsettingsui_reg.rsc"
+""-"z:\resource\apps\tst_applsettingsui.r*"
Binary file cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/rom/tst_applsettingsui_stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/src/applsettester.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Dialog implementaton for test application 
+* for testing CM Manager Application Settings Ui.
+*/
+
+#include <QGraphicsWidget>
+#include <QString>
+
+#include <HbDialog>
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbDocumentLoader>
+#include <HbInstance>
+#include <HbAction>
+#include <HbCheckBox>
+#include <HbLabel>
+#include <HbLineEdit>
+#include <HbComboBox>
+
+
+#include "cmapplsettingsui.h"
+#include "cmmanagerdefines_shim.h"
+
+#include "applsettester.h"
+
+#define TEST_DOCML ":/docml/tst_applsettingsui.docml"
+
+ApplSettTester::ApplSettTester(QWidget *parent) : HbMainWindow(parent)
+{
+    applSett = new CmApplSettingsUi(this);
+
+    // Clear initial selection
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 0;
+    
+    bool status = connect(
+        this,
+        SIGNAL(orientationChanged(Qt::Orientation)),
+        this,
+        SLOT(orientationChange(Qt::Orientation)));
+    Q_ASSERT(status);
+    
+    docLoader = new HbDocumentLoader();
+    docmlLoad(this->orientation()); 
+}
+
+ApplSettTester::~ApplSettTester()
+{
+    delete docLoader;
+}
+
+void ApplSettTester::docmlLoad(Qt::Orientation orientation)
+{
+    bool ok = true;
+    
+    docLoader->reset();
+    // First load the common section
+    docLoader->load(TEST_DOCML, &ok);
+
+    if (ok) {    
+        // Then load the orientation specific section
+        orientationChange(orientation);
+        
+        QGraphicsWidget *widget = docLoader->findWidget(QString("testApplView"));
+        if (widget) {
+            view = qobject_cast<HbView*>(widget);
+            this->addView(view);
+            this->setCurrentView(view);
+
+            checkboxDest = qobject_cast<HbCheckBox*>(docLoader->findWidget("checkbox_dest"));
+            Q_ASSERT(checkboxDest);
+            checkboxCM = qobject_cast<HbCheckBox*>(docLoader->findWidget("checkbox_cm"));
+            Q_ASSERT(checkboxCM);
+            
+            checkboxWlan = qobject_cast<HbCheckBox*>(docLoader->findWidget("checkbox_wlan"));
+            Q_ASSERT(checkboxWlan);
+            checkboxGprs = qobject_cast<HbCheckBox*>(docLoader->findWidget("checkbox_gprs"));
+            Q_ASSERT(checkboxGprs);
+           
+            selectionMode = qobject_cast<HbComboBox*>(docLoader->findWidget("mode"));
+            Q_ASSERT(selectionMode);
+            selectionId = qobject_cast<HbLineEdit*>(docLoader->findWidget("id"));
+            Q_ASSERT(selectionId);
+           
+            labelResult = qobject_cast<HbLabel*>(docLoader->findWidget("result"));
+            Q_ASSERT(labelResult);
+            
+            action = qobject_cast<HbAction *>(docLoader->findObject("testAction"));
+            Q_ASSERT(action);
+            
+            bool status = connect(action, SIGNAL(triggered()), this, SLOT(runTest()));
+            Q_ASSERT(status);
+        }
+    }
+}
+
+void ApplSettTester::orientationChange(Qt::Orientation orientation)
+{
+    bool ok = true;
+    if (orientation == Qt::Vertical) {
+        // reading "portrait" section
+        docLoader->load(TEST_DOCML, "portrait", &ok);
+    } else {
+        // reading "landscape" section
+        docLoader->load(TEST_DOCML, "landscape", &ok);
+    }   
+}
+
+void ApplSettTester::runTest()
+{
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    
+    // Dialog type selection
+    if (checkboxDest->checkState()) {
+        listItems |= CmApplSettingsUi::ShowDestinations;
+    }
+    if (checkboxCM->checkState()) {
+        listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    }
+
+    // Bearer filtering
+    if (checkboxWlan->checkState()) {
+        filter |= CMManagerShim::BearerTypeWlan;
+    }
+    if (checkboxGprs->checkState()) {
+        filter |= CMManagerShim::BearerTypePacketData;
+    }
+    
+    // Setting selection value
+    mSelection.result = 
+        (CmApplSettingsUi::SelectionType)selectionMode->currentIndex();
+    mSelection.id = selectionId->text().toUInt();;
+
+    applSett->setOptions(listItems, filter);
+    applSett->setSelection(mSelection);
+    
+    // Connect finished(uint) signal and handle result via it
+    connect(applSett, SIGNAL(finished(uint)), this, SLOT(showResult(uint)));
+    
+    // Start CmApplSettingsUi
+    applSett->open();
+}
+
+void ApplSettTester::showResult(uint retval)
+{
+    if (retval == CmApplSettingsUi::ApplSettingsErrorNone) {
+        mSelection = applSett->selection();
+        selectionMode->setCurrentIndex(mSelection.result);    
+        selectionId->setText(QString::number(mSelection.id));
+    }
+    labelResult->setNumber(int(retval));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/src/tst_applsettingsui.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Simple test/example client for Qt Application Settings UI interface.
+*
+*/
+#include <HbApplication>
+
+#include "cmapplsettingsui.h"
+#include "applsettester.h"
+
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv); 
+    
+    ApplSettTester tester;
+    tester.show();
+     
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/tst_applsettingsui.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = tst_applsettingsui
+TARGET.CAPABILITY = ALL -TCB
+DEPENDPATH += .
+INCLUDEPATH += \
+    . \
+    inc \
+    ../../inc \
+    ../../../../inc
+CONFIG += hb
+RESOURCES = res/tst_applsettingsui.qrc
+DOCML += res/tst_applsettingsui.docml
+MOC_DIR = moc
+
+# Input
+HEADERS += \
+    inc/applsettester.h
+SOURCES += \
+    src/applsettester.cpp \
+    src/tst_applsettingsui.cpp
+
+symbian*: {
+    LIBS += -lcmapplsettingsui
+    TARGET.UID3 = 0x2002E69A
+}
+
+symbian: {
+    BLD_INF_RULES.prj_exports += "rom/tst_applsettingsui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(tst_applsettingsui.iby)"
+    BLD_INF_RULES.prj_exports += "rom/tst_applsettingsui_stub.sis /epoc32/data/z/system/install/tst_applsettingsui_stub.sis"
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/hbautotest.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,831 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "hbautotest.h"
+#include <hbmainwindow.h>
+#include <hbwidget.h>
+
+
+const qreal STEP = 4; //How many pixels to drag before sending an event
+
+//Init static members
+bool HbAutoTest::pointerPressed = false;
+QPointF HbAutoTest::pressPoint = QPointF();
+
+void HbAutoTest::mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    if (pointerPressed) {
+        //Now we should drag an item
+        drag(window, targetPoint);
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            qApp->notify((window->viewport()), &me);
+            QCoreApplication::sendPostedEvents();
+            QTest::qWait(1);
+    } else {
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            qApp->notify((window->viewport()), &me);
+            QCoreApplication::sendPostedEvents();
+            QTest::qWait(1);
+
+    }
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+ 
+void HbAutoTest::mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=true;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    pressPoint=targetPoint;
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+    QCoreApplication::sendPostedEvents();
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=false;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    pressPoint=QPointF();
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+    QTest::qWait(1);
+
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    HbAutoTestMouseEvent me2 (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton,
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me2);
+    qApp->notify((window->viewport()), &me2);
+    QCoreApplication::sendPostedEvents();
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}   
+
+QPointF HbAutoTest::middlePointOfWidget( const HbWidget* widget)
+{
+    QRectF widgetRect = widget->rect();
+    QRectF widgetSceneRect = widget->mapRectToScene(widgetRect);
+    qreal middleX = ((widgetSceneRect.right() - widgetSceneRect.left())/2)+widgetSceneRect.left();
+    qreal middleY = ((widgetSceneRect.bottom() - widgetSceneRect.top())/2)+widgetSceneRect.top();  
+    return QPointF(middleX,middleY);
+}
+
+
+
+void HbAutoTest::drag(HbAutoTestMainWindow *window, QPointF targetPoint)
+{
+    qreal tempX = targetPoint.x() - pressPoint.x();
+    qreal tempY = targetPoint.y() - pressPoint.y();
+    qreal totalTrip = sqrt ((tempX * tempX) + (tempY * tempY));
+    
+    int numberOfSteps = qRound(totalTrip / STEP);
+    HbAutoTestMouseEvent me (
+        QEvent::MouseMove, 
+        targetPoint.toPoint(), 
+        window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+        Qt::NoButton , 
+        Qt::LeftButton, 
+        Qt::NoModifier);
+
+    QPointF nextPanPoint=pressPoint;
+    for (int i=1; i<numberOfSteps; i++) { //On purpose not =<
+        
+        nextPanPoint.setY (pressPoint.y()+((i / (qreal)numberOfSteps) * tempY));
+        nextPanPoint.setX (pressPoint.x()+((i / (qreal)numberOfSteps) * tempX));
+        
+        QCursor::setPos(window->mapToGlobal(nextPanPoint.toPoint()));
+
+        me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            nextPanPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(nextPanPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+
+        QSpontaneKeyEvent::setSpontaneous(&me);
+        qApp->notify((window->viewport()), &me);
+        QCoreApplication::sendPostedEvents();
+    }
+
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    //One more (or the only one) step to the target
+    me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            targetPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+}
+
+
+void HbAutoTest::simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay)
+    {
+        //Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        /*extern int Q_TESTLIB_EXPORT defaultKeyDelay();
+
+        if (delay == -1 || delay < defaultKeyDelay())
+            delay = defaultKeyDelay();
+        if(delay > 0)
+            QTest::qWait(delay);*/
+        Q_UNUSED(delay);
+        QTest::qWait(10); //TODO: Remove this and reveal above out-commented code
+
+        HbAutoTestKeyEvent a(press ? QEvent::KeyPress : QEvent::KeyRelease, code, modifier, text, repeat);
+        QSpontaneKeyEvent::setSpontaneous(&a);
+        if (!qApp->notify(widget, &a))
+            QTest::qWarn("Keyboard event not accepted by receiving widget");
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay)
+    {
+        QTEST_ASSERT(qApp);
+
+        if (!widget)
+            widget = QWidget::keyboardGrabber();
+        if (!widget) {
+            if (QWidget *apw = QApplication::activePopupWidget())
+                widget = apw->focusWidget() ? apw->focusWidget() : apw;
+            else
+                widget = QApplication::focusWidget();
+        }
+        if (!widget)
+            widget = QApplication::activeWindow();
+
+        QTEST_ASSERT(widget);
+
+        if (action == QTest::Click) {
+            QPointer<QWidget> ptr(widget);
+            sendKeyEvent(QTest::Press, widget, code, text, modifier, delay);
+            if (!ptr) {
+                // if we send key-events to embedded widgets, they might be destroyed
+                // when the user presses Return
+                return;
+            }
+            sendKeyEvent(QTest::Release, widget, code, text, modifier, delay);
+            return;
+        }
+
+        bool repeat = false;
+
+        if (action == QTest::Press) {
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, true, Qt::Key_Shift, 0, QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, true, Qt::Key_Control, modifier & Qt::ShiftModifier, QString(), false, delay);
+
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, true, Qt::Key_Alt,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, true, Qt::Key_Meta, modifier & (Qt::ShiftModifier
+                                                                      | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+            simulateEvent(widget, true, code, modifier, text, repeat, delay);
+        } else if (action == QTest::Release) {
+            simulateEvent(widget, false, code, modifier, text, repeat, delay);
+
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, false, Qt::Key_Meta, modifier, QString(), false, delay);
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, false, Qt::Key_Alt, modifier &
+                              (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, false, Qt::Key_Control,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, false, Qt::Key_Shift, modifier & Qt::ShiftModifier, QString(), false, delay);
+        }
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        QString text;
+        if (ascii)
+            text = QString(QChar::fromLatin1(ascii));
+        sendKeyEvent(action, widget, code, text, modifier, delay);
+    }
+
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, asciiToKey(ascii), ascii, modifier, delay); 
+     }
+     
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, key, keyToAscii(key), modifier, delay); 
+     }
+
+void HbAutoTest::keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        for (int i=0; i < sequence.length(); i++)
+            keyEvent(QTest::Click, widget, sequence.at(i).toLatin1(), modifier, delay);
+    }
+
+void HbAutoTest::keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); }
+    
+void HbAutoTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+
+Qt::Key HbAutoTest::asciiToKey(char ascii)
+{
+    switch ((unsigned char)ascii) {
+    case 0x08: return Qt::Key_Backspace;
+    case 0x09: return Qt::Key_Tab;
+    case 0x0b: return Qt::Key_Backtab;
+    case 0x0d: return Qt::Key_Return;
+    case 0x1b: return Qt::Key_Escape;
+    case 0x20: return Qt::Key_Space;
+    case 0x21: return Qt::Key_Exclam;
+    case 0x22: return Qt::Key_QuoteDbl;
+    case 0x23: return Qt::Key_NumberSign;
+    case 0x24: return Qt::Key_Dollar;
+    case 0x25: return Qt::Key_Percent;
+    case 0x26: return Qt::Key_Ampersand;
+    case 0x27: return Qt::Key_Apostrophe;
+    case 0x28: return Qt::Key_ParenLeft;
+    case 0x29: return Qt::Key_ParenRight;
+    case 0x2a: return Qt::Key_Asterisk;
+    case 0x2b: return Qt::Key_Plus;
+    case 0x2c: return Qt::Key_Comma;
+    case 0x2d: return Qt::Key_Minus;
+    case 0x2e: return Qt::Key_Period;
+    case 0x2f: return Qt::Key_Slash;
+    case 0x30: return Qt::Key_0;
+    case 0x31: return Qt::Key_1;
+    case 0x32: return Qt::Key_2;
+    case 0x33: return Qt::Key_3;
+    case 0x34: return Qt::Key_4;
+    case 0x35: return Qt::Key_5;
+    case 0x36: return Qt::Key_6;
+    case 0x37: return Qt::Key_7;
+    case 0x38: return Qt::Key_8;
+    case 0x39: return Qt::Key_9;
+    case 0x3a: return Qt::Key_Colon;
+    case 0x3b: return Qt::Key_Semicolon;
+    case 0x3c: return Qt::Key_Less;
+    case 0x3d: return Qt::Key_Equal;
+    case 0x3e: return Qt::Key_Greater;
+    case 0x3f: return Qt::Key_Question;
+    case 0x40: return Qt::Key_At;
+    case 0x41: return Qt::Key_A;
+    case 0x42: return Qt::Key_B;
+    case 0x43: return Qt::Key_C;
+    case 0x44: return Qt::Key_D;
+    case 0x45: return Qt::Key_E;
+    case 0x46: return Qt::Key_F;
+    case 0x47: return Qt::Key_G;
+    case 0x48: return Qt::Key_H;
+    case 0x49: return Qt::Key_I;
+    case 0x4a: return Qt::Key_J;
+    case 0x4b: return Qt::Key_K;
+    case 0x4c: return Qt::Key_L;
+    case 0x4d: return Qt::Key_M;
+    case 0x4e: return Qt::Key_N;
+    case 0x4f: return Qt::Key_O;
+    case 0x50: return Qt::Key_P;
+    case 0x51: return Qt::Key_Q;
+    case 0x52: return Qt::Key_R;
+    case 0x53: return Qt::Key_S;
+    case 0x54: return Qt::Key_T;
+    case 0x55: return Qt::Key_U;
+    case 0x56: return Qt::Key_V;
+    case 0x57: return Qt::Key_W;
+    case 0x58: return Qt::Key_X;
+    case 0x59: return Qt::Key_Y;
+    case 0x5a: return Qt::Key_Z;
+    case 0x5b: return Qt::Key_BracketLeft;
+    case 0x5c: return Qt::Key_Backslash;
+    case 0x5d: return Qt::Key_BracketRight;
+    case 0x5e: return Qt::Key_AsciiCircum;
+    case 0x5f: return Qt::Key_Underscore;
+    case 0x60: return Qt::Key_QuoteLeft;
+    case 0x61: return Qt::Key_A;
+    case 0x62: return Qt::Key_B;
+    case 0x63: return Qt::Key_C;
+    case 0x64: return Qt::Key_D;
+    case 0x65: return Qt::Key_E;
+    case 0x66: return Qt::Key_F;
+    case 0x67: return Qt::Key_G;
+    case 0x68: return Qt::Key_H;
+    case 0x69: return Qt::Key_I;
+    case 0x6a: return Qt::Key_J;
+    case 0x6b: return Qt::Key_K;
+    case 0x6c: return Qt::Key_L;
+    case 0x6d: return Qt::Key_M;
+    case 0x6e: return Qt::Key_N;
+    case 0x6f: return Qt::Key_O;
+    case 0x70: return Qt::Key_P;
+    case 0x71: return Qt::Key_Q;
+    case 0x72: return Qt::Key_R;
+    case 0x73: return Qt::Key_S;
+    case 0x74: return Qt::Key_T;
+    case 0x75: return Qt::Key_U;
+    case 0x76: return Qt::Key_V;
+    case 0x77: return Qt::Key_W;
+    case 0x78: return Qt::Key_X;
+    case 0x79: return Qt::Key_Y;
+    case 0x7a: return Qt::Key_Z;
+    case 0x7b: return Qt::Key_BraceLeft;
+    case 0x7c: return Qt::Key_Bar;
+    case 0x7d: return Qt::Key_BraceRight;
+    case 0x7e: return Qt::Key_AsciiTilde;
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case 0xa0: return Qt::Key_nobreakspace;
+    case 0xa1: return Qt::Key_exclamdown;
+    case 0xa2: return Qt::Key_cent;
+    case 0xa3: return Qt::Key_sterling;
+    case 0xa4: return Qt::Key_currency;
+    case 0xa5: return Qt::Key_yen;
+    case 0xa6: return Qt::Key_brokenbar;
+    case 0xa7: return Qt::Key_section;
+    case 0xa8: return Qt::Key_diaeresis;
+    case 0xa9: return Qt::Key_copyright;
+    case 0xaa: return Qt::Key_ordfeminine;
+    case 0xab: return Qt::Key_guillemotleft;
+    case 0xac: return Qt::Key_notsign;
+    case 0xad: return Qt::Key_hyphen;
+    case 0xae: return Qt::Key_registered;
+    case 0xaf: return Qt::Key_macron;
+    case 0xb0: return Qt::Key_degree;
+    case 0xb1: return Qt::Key_plusminus;
+    case 0xb2: return Qt::Key_twosuperior;
+    case 0xb3: return Qt::Key_threesuperior;
+    case 0xb4: return Qt::Key_acute;
+    case 0xb5: return Qt::Key_mu;
+    case 0xb6: return Qt::Key_paragraph;
+    case 0xb7: return Qt::Key_periodcentered;
+    case 0xb8: return Qt::Key_cedilla;
+    case 0xb9: return Qt::Key_onesuperior;
+    case 0xba: return Qt::Key_masculine;
+    case 0xbb: return Qt::Key_guillemotright;
+    case 0xbc: return Qt::Key_onequarter;
+    case 0xbd: return Qt::Key_onehalf;
+    case 0xbe: return Qt::Key_threequarters;
+    case 0xbf: return Qt::Key_questiondown;
+    case 0xc0: return Qt::Key_Agrave;
+    case 0xc1: return Qt::Key_Aacute;
+    case 0xc2: return Qt::Key_Acircumflex;
+    case 0xc3: return Qt::Key_Atilde;
+    case 0xc4: return Qt::Key_Adiaeresis;
+    case 0xc5: return Qt::Key_Aring;
+    case 0xc6: return Qt::Key_AE;
+    case 0xc7: return Qt::Key_Ccedilla;
+    case 0xc8: return Qt::Key_Egrave;
+    case 0xc9: return Qt::Key_Eacute;
+    case 0xca: return Qt::Key_Ecircumflex;
+    case 0xcb: return Qt::Key_Ediaeresis;
+    case 0xcc: return Qt::Key_Igrave;
+    case 0xcd: return Qt::Key_Iacute;
+    case 0xce: return Qt::Key_Icircumflex;
+    case 0xcf: return Qt::Key_Idiaeresis;
+    case 0xd0: return Qt::Key_ETH;
+    case 0xd1: return Qt::Key_Ntilde;
+    case 0xd2: return Qt::Key_Ograve;
+    case 0xd3: return Qt::Key_Oacute;
+    case 0xd4: return Qt::Key_Ocircumflex;
+    case 0xd5: return Qt::Key_Otilde;
+    case 0xd6: return Qt::Key_Odiaeresis;
+    case 0xd7: return Qt::Key_multiply;
+    case 0xd8: return Qt::Key_Ooblique;
+    case 0xd9: return Qt::Key_Ugrave;
+    case 0xda: return Qt::Key_Uacute;
+    case 0xdb: return Qt::Key_Ucircumflex;
+    case 0xdc: return Qt::Key_Udiaeresis;
+    case 0xdd: return Qt::Key_Yacute;
+    case 0xde: return Qt::Key_THORN;
+    case 0xdf: return Qt::Key_ssharp;
+    case 0xe5: return Qt::Key_Aring;
+    case 0xe6: return Qt::Key_AE;
+    case 0xf7: return Qt::Key_division;
+    case 0xf8: return Qt::Key_Ooblique;
+    case 0xff: return Qt::Key_ydiaeresis;
+    default: QTEST_ASSERT(false); return Qt::Key(0);
+    }
+}
+
+char HbAutoTest::keyToAscii(Qt::Key key)
+{
+    switch (key) {
+    case Qt::Key_Backspace: return 0x8; //BS
+    case Qt::Key_Tab: return 0x09; // HT
+    case Qt::Key_Backtab: return 0x0b; // VT
+    case Qt::Key_Enter:
+    case Qt::Key_Return: return 0x0d; // CR
+    case Qt::Key_Escape: return 0x1b; // ESC
+    case Qt::Key_Space: return 0x20;        // 7 bit printable ASCII
+    case Qt::Key_Exclam: return 0x21;
+    case Qt::Key_QuoteDbl: return 0x22;
+    case Qt::Key_NumberSign: return 0x23;
+    case Qt::Key_Dollar: return 0x24;
+    case Qt::Key_Percent: return 0x25;
+    case Qt::Key_Ampersand: return 0x26;
+    case Qt::Key_Apostrophe: return 0x27;
+    case Qt::Key_ParenLeft: return 0x28;
+    case Qt::Key_ParenRight: return 0x29;
+    case Qt::Key_Asterisk: return 0x2a;
+    case Qt::Key_Plus: return 0x2b;
+    case Qt::Key_Comma: return 0x2c;
+    case Qt::Key_Minus: return 0x2d;
+    case Qt::Key_Period: return 0x2e;
+    case Qt::Key_Slash: return 0x2f;
+    case Qt::Key_0: return 0x30;
+    case Qt::Key_1: return 0x31;
+    case Qt::Key_2: return 0x32;
+    case Qt::Key_3: return 0x33;
+    case Qt::Key_4: return 0x34;
+    case Qt::Key_5: return 0x35;
+    case Qt::Key_6: return 0x36;
+    case Qt::Key_7: return 0x37;
+    case Qt::Key_8: return 0x38;
+    case Qt::Key_9: return 0x39;
+    case Qt::Key_Colon: return 0x3a;
+    case Qt::Key_Semicolon: return 0x3b;
+    case Qt::Key_Less: return 0x3c;
+    case Qt::Key_Equal: return 0x3d;
+    case Qt::Key_Greater: return 0x3e;
+    case Qt::Key_Question: return 0x3f;
+    case Qt::Key_At: return 0x40;
+    case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a'
+    case Qt::Key_B: return 0x62;
+    case Qt::Key_C: return 0x63;
+    case Qt::Key_D: return 0x64;
+    case Qt::Key_E: return 0x65;
+    case Qt::Key_F: return 0x66;
+    case Qt::Key_G: return 0x67;
+    case Qt::Key_H: return 0x68;
+    case Qt::Key_I: return 0x69;
+    case Qt::Key_J: return 0x6a;
+    case Qt::Key_K: return 0x6b;
+    case Qt::Key_L: return 0x6c;
+    case Qt::Key_M: return 0x6d;
+    case Qt::Key_N: return 0x6e;
+    case Qt::Key_O: return 0x6f;
+    case Qt::Key_P: return 0x70;
+    case Qt::Key_Q: return 0x71;
+    case Qt::Key_R: return 0x72;
+    case Qt::Key_S: return 0x73;
+    case Qt::Key_T: return 0x74;
+    case Qt::Key_U: return 0x75;
+    case Qt::Key_V: return 0x76;
+    case Qt::Key_W: return 0x77;
+    case Qt::Key_X: return 0x78;
+    case Qt::Key_Y: return 0x79;
+    case Qt::Key_Z: return 0x7a;
+    case Qt::Key_BracketLeft: return 0x5b;
+    case Qt::Key_Backslash: return 0x5c;
+    case Qt::Key_BracketRight: return 0x5d;
+    case Qt::Key_AsciiCircum: return 0x5e;
+    case Qt::Key_Underscore: return 0x5f;
+    case Qt::Key_QuoteLeft: return 0x60;
+
+    case Qt::Key_BraceLeft: return 0x7b;
+    case Qt::Key_Bar: return 0x7c;
+    case Qt::Key_BraceRight: return 0x7d;
+    case Qt::Key_AsciiTilde: return 0x7e;
+
+    case Qt::Key_Delete: return 0;
+    case Qt::Key_Insert: return 0; // = 0x1006,
+    case Qt::Key_Pause: return 0; // = 0x1008,
+    case Qt::Key_Print: return 0; // = 0x1009,
+    case Qt::Key_SysReq: return 0; // = 0x100a,
+
+    case Qt::Key_Clear: return 0; // = 0x100b,
+
+    case Qt::Key_Home: return 0; // = 0x1010,        // cursor movement
+    case Qt::Key_End: return 0; // = 0x1011,
+    case Qt::Key_Left: return 0; // = 0x1012,
+    case Qt::Key_Up: return 0; // = 0x1013,
+    case Qt::Key_Right: return 0; // = 0x1014,
+    case Qt::Key_Down: return 0; // = 0x1015,
+    case Qt::Key_PageUp: return 0; // = 0x1016,
+    case Qt::Key_PageDown: return 0; // = 0x1017,
+    case Qt::Key_Shift: return 0; // = 0x1020,        // modifiers
+    case Qt::Key_Control: return 0; // = 0x1021,
+    case Qt::Key_Meta: return 0; // = 0x1022,
+    case Qt::Key_Alt: return 0; // = 0x1023,
+    case Qt::Key_CapsLock: return 0; // = 0x1024,
+    case Qt::Key_NumLock: return 0; // = 0x1025,
+    case Qt::Key_ScrollLock: return 0; // = 0x1026,
+    case Qt::Key_F1: return 0; // = 0x1030,        // function keys
+    case Qt::Key_F2: return 0; // = 0x1031,
+    case Qt::Key_F3: return 0; // = 0x1032,
+    case Qt::Key_F4: return 0; // = 0x1033,
+    case Qt::Key_F5: return 0; // = 0x1034,
+    case Qt::Key_F6: return 0; // = 0x1035,
+    case Qt::Key_F7: return 0; // = 0x1036,
+    case Qt::Key_F8: return 0; // = 0x1037,
+    case Qt::Key_F9: return 0; // = 0x1038,
+    case Qt::Key_F10: return 0; // = 0x1039,
+    case Qt::Key_F11: return 0; // = 0x103a,
+    case Qt::Key_F12: return 0; // = 0x103b,
+    case Qt::Key_F13: return 0; // = 0x103c,
+    case Qt::Key_F14: return 0; // = 0x103d,
+    case Qt::Key_F15: return 0; // = 0x103e,
+    case Qt::Key_F16: return 0; // = 0x103f,
+    case Qt::Key_F17: return 0; // = 0x1040,
+    case Qt::Key_F18: return 0; // = 0x1041,
+    case Qt::Key_F19: return 0; // = 0x1042,
+    case Qt::Key_F20: return 0; // = 0x1043,
+    case Qt::Key_F21: return 0; // = 0x1044,
+    case Qt::Key_F22: return 0; // = 0x1045,
+    case Qt::Key_F23: return 0; // = 0x1046,
+    case Qt::Key_F24: return 0; // = 0x1047,
+    case Qt::Key_F25: return 0; // = 0x1048,        // F25 .. F35 only on X11
+    case Qt::Key_F26: return 0; // = 0x1049,
+    case Qt::Key_F27: return 0; // = 0x104a,
+    case Qt::Key_F28: return 0; // = 0x104b,
+    case Qt::Key_F29: return 0; // = 0x104c,
+    case Qt::Key_F30: return 0; // = 0x104d,
+    case Qt::Key_F31: return 0; // = 0x104e,
+    case Qt::Key_F32: return 0; // = 0x104f,
+    case Qt::Key_F33: return 0; // = 0x1050,
+    case Qt::Key_F34: return 0; // = 0x1051,
+    case Qt::Key_F35: return 0; // = 0x1052,
+    case Qt::Key_Super_L: return 0; // = 0x1053,        // extra keys
+    case Qt::Key_Super_R: return 0; // = 0x1054,
+    case Qt::Key_Menu: return 0; // = 0x1055,
+    case Qt::Key_Hyper_L: return 0; // = 0x1056,
+    case Qt::Key_Hyper_R: return 0; // = 0x1057,
+    case Qt::Key_Help: return 0; // = 0x1058,
+    case Qt::Key_Direction_L: return 0; // = 0x1059,
+    case Qt::Key_Direction_R: return 0; // = 0x1060,
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case Qt::Key_nobreakspace: return char(0xa0);
+    case Qt::Key_exclamdown: return char(0xa1);
+    case Qt::Key_cent: return char(0xa2);
+    case Qt::Key_sterling: return char(0xa3);
+    case Qt::Key_currency: return char(0xa4);
+    case Qt::Key_yen: return char(0xa5);
+    case Qt::Key_brokenbar: return char(0xa6);
+    case Qt::Key_section: return char(0xa7);
+    case Qt::Key_diaeresis: return char(0xa8);
+    case Qt::Key_copyright: return char(0xa9);
+    case Qt::Key_ordfeminine: return char(0xaa);
+    case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar
+    case Qt::Key_notsign: return char(0xac);
+    case Qt::Key_hyphen: return char(0xad);
+    case Qt::Key_registered: return char(0xae);
+    case Qt::Key_macron: return char(0xaf);
+    case Qt::Key_degree: return char(0xb0);
+    case Qt::Key_plusminus: return char(0xb1);
+    case Qt::Key_twosuperior: return char(0xb2);
+    case Qt::Key_threesuperior: return char(0xb3);
+    case Qt::Key_acute: return char(0xb4);
+    case Qt::Key_mu: return char(0xb5);
+    case Qt::Key_paragraph: return char(0xb6);
+    case Qt::Key_periodcentered: return char(0xb7);
+    case Qt::Key_cedilla: return char(0xb8);
+    case Qt::Key_onesuperior: return char(0xb9);
+    case Qt::Key_masculine: return char(0xba);
+    case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar
+    case Qt::Key_onequarter: return char(0xbc);
+    case Qt::Key_onehalf: return char(0xbd);
+    case Qt::Key_threequarters: return char(0xbe);
+    case Qt::Key_questiondown: return char(0xbf);
+    case Qt::Key_Agrave: return char(0xc0);
+    case Qt::Key_Aacute: return char(0xc1);
+    case Qt::Key_Acircumflex: return char(0xc2);
+    case Qt::Key_Atilde: return char(0xc3);
+    case Qt::Key_Adiaeresis: return char(0xc4);
+    case Qt::Key_Aring: return char(0xe5);
+    case Qt::Key_AE: return char(0xe6);
+    case Qt::Key_Ccedilla: return char(0xc7);
+    case Qt::Key_Egrave: return char(0xc8);
+    case Qt::Key_Eacute: return char(0xc9);
+    case Qt::Key_Ecircumflex: return char(0xca);
+    case Qt::Key_Ediaeresis: return char(0xcb);
+    case Qt::Key_Igrave: return char(0xcc);
+    case Qt::Key_Iacute: return char(0xcd);
+    case Qt::Key_Icircumflex: return char(0xce);
+    case Qt::Key_Idiaeresis: return char(0xcf);
+    case Qt::Key_ETH: return char(0xd0);
+    case Qt::Key_Ntilde: return char(0xd1);
+    case Qt::Key_Ograve: return char(0xd2);
+    case Qt::Key_Oacute: return char(0xd3);
+    case Qt::Key_Ocircumflex: return char(0xd4);
+    case Qt::Key_Otilde: return char(0xd5);
+    case Qt::Key_Odiaeresis: return char(0xd6);
+    case Qt::Key_multiply: return char(0xd7);
+    case Qt::Key_Ooblique: return char(0xf8);
+    case Qt::Key_Ugrave: return char(0xd9);
+    case Qt::Key_Uacute: return char(0xda);
+    case Qt::Key_Ucircumflex: return char(0xdb);
+    case Qt::Key_Udiaeresis: return char(0xdc);
+    case Qt::Key_Yacute: return char(0xdd);
+    case Qt::Key_THORN: return char(0xde);
+    case Qt::Key_ssharp: return char(0xdf);
+    case Qt::Key_division: return char(0xf7);
+    case Qt::Key_ydiaeresis: return char(0xff);
+
+    // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
+
+    case Qt::Key_Back : return 0; // = 0x1061,
+    case Qt::Key_Forward : return 0; // = 0x1062,
+    case Qt::Key_Stop : return 0; // = 0x1063,
+    case Qt::Key_Refresh : return 0; // = 0x1064,
+
+    case Qt::Key_VolumeDown: return 0; // = 0x1070,
+    case Qt::Key_VolumeMute : return 0; // = 0x1071,
+    case Qt::Key_VolumeUp: return 0; // = 0x1072,
+    case Qt::Key_BassBoost: return 0; // = 0x1073,
+    case Qt::Key_BassUp: return 0; // = 0x1074,
+    case Qt::Key_BassDown: return 0; // = 0x1075,
+    case Qt::Key_TrebleUp: return 0; // = 0x1076,
+    case Qt::Key_TrebleDown: return 0; // = 0x1077,
+
+    case Qt::Key_MediaPlay : return 0; // = 0x1080,
+    case Qt::Key_MediaStop : return 0; // = 0x1081,
+    case Qt::Key_MediaPrevious : return 0; // = 0x1082,
+    case Qt::Key_MediaNext : return 0; // = 0x1083,
+    case Qt::Key_MediaRecord: return 0; // = 0x1084,
+
+    case Qt::Key_HomePage : return 0; // = 0x1090,
+    case Qt::Key_Favorites : return 0; // = 0x1091,
+    case Qt::Key_Search : return 0; // = 0x1092,
+    case Qt::Key_Standby: return 0; // = 0x1093,
+    case Qt::Key_OpenUrl: return 0; // = 0x1094,
+
+    case Qt::Key_LaunchMail : return 0; // = 0x10a0,
+    case Qt::Key_LaunchMedia: return 0; // = 0x10a1,
+    case Qt::Key_Launch0 : return 0; // = 0x10a2,
+    case Qt::Key_Launch1 : return 0; // = 0x10a3,
+    case Qt::Key_Launch2 : return 0; // = 0x10a4,
+    case Qt::Key_Launch3 : return 0; // = 0x10a5,
+    case Qt::Key_Launch4 : return 0; // = 0x10a6,
+    case Qt::Key_Launch5 : return 0; // = 0x10a7,
+    case Qt::Key_Launch6 : return 0; // = 0x10a8,
+    case Qt::Key_Launch7 : return 0; // = 0x10a9,
+    case Qt::Key_Launch8 : return 0; // = 0x10aa,
+    case Qt::Key_Launch9 : return 0; // = 0x10ab,
+    case Qt::Key_LaunchA : return 0; // = 0x10ac,
+    case Qt::Key_LaunchB : return 0; // = 0x10ad,
+    case Qt::Key_LaunchC : return 0; // = 0x10ae,
+    case Qt::Key_LaunchD : return 0; // = 0x10af,
+    case Qt::Key_LaunchE : return 0; // = 0x10b0,
+    case Qt::Key_LaunchF : return 0; // = 0x10b1,
+
+    default: QTEST_ASSERT(false); return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/hbautotest.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef HBAUTOTEST_H
+#define HBAUTOTEST_H
+
+#include <hbnamespace.h>
+#include <hbmainwindow.h>
+#include <QtTest/QtTest>
+
+class HbMainWindow;
+class HbWidget;
+class HbAutoTestMainWindow;
+class HbAutoTest;
+class HbAutoTestMouseEvent; 
+/*
+INSTRUCTIONS:
+The class HbAutoTest is meant to be used with Orbit applications auto testing instead of GUI testing APIs of QTestLib.
+
+The functions of this class is to used similarily to the related QTestLib functions.
+
+Use HbAutoTestMainWindow (defined below) instead of HbMainWindow to enble filtering.
+Filterin filters out UI events that are not sent by function defined in HbAutoTest class.
+
+*/
+
+class HbAutoTestMouseEvent : public QMouseEvent
+{
+public:
+    HbAutoTestMouseEvent(Type type, const QPoint & pos, const QPoint & globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers ) 
+        : QMouseEvent(type,pos,globalPos,button,buttons,modifiers){}
+};
+
+class HbAutoTestKeyEvent : public QKeyEvent
+{
+public:
+        HbAutoTestKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
+              bool autorep = false, ushort count = 1 ) 
+        : QKeyEvent(type, key, modifiers, text, autorep, count){}
+};
+
+class HbAutoTest 
+{
+public:
+    
+    static void mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1 );
+    static void mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+   
+private:
+    static void drag(HbAutoTestMainWindow *window, QPointF targetPoint);
+    static QPointF middlePointOfWidget( const HbWidget* widget);
+
+    static bool pointerPressed;
+    static QPointF pressPoint;
+
+//Key event Part: copy-pasted from QTestLib and modified to support HbAutoTestKeyEvent to enable filtering.
+//see HbAutoTestMainWindow below.
+public:
+    
+    static Qt::Key asciiToKey(char ascii);
+    static char keyToAscii(Qt::Key key);
+
+    static void simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1);
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay=-1);    
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay=-1);
+
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+ 
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+   
+    static void keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+};
+
+class HbTestEvent
+{
+public:
+    virtual void simulate(QWidget *w) = 0;
+    virtual HbTestEvent *clone() const = 0;
+
+    virtual ~HbTestEvent() {}
+};
+
+class HbTestKeyEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyEvent(QTest::KeyAction action, Qt::Key key, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers), _ascii(0), _key(key) {}
+    inline HbTestKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers),
+          _ascii(ascii), _key(Qt::Key_unknown) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        if (_ascii == 0)
+            HbAutoTest::keyEvent(_action, w, _key, _modifiers, _delay);
+        else
+            HbAutoTest::keyEvent(_action, w, _ascii, _modifiers, _delay);
+    } 
+
+protected:
+    QTest::KeyAction _action;
+    int _delay;
+    Qt::KeyboardModifiers _modifiers;
+    char _ascii;
+    Qt::Key _key;
+};
+
+class HbTestKeyClicksEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyClicksEvent(const QString &keys, Qt::KeyboardModifiers modifiers, int delay)
+        : _keys(keys), _modifiers(modifiers), _delay(delay) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyClicksEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        HbAutoTest::keyClicks(w, _keys, _modifiers, _delay);
+    }
+
+private:
+    QString _keys;
+    Qt::KeyboardModifiers _modifiers;
+    int _delay;
+};
+
+class HbTestDelayEvent: public HbTestEvent
+{
+public:
+    inline HbTestDelayEvent(int msecs): _delay(msecs) {}
+    inline HbTestEvent *clone() const { return new HbTestDelayEvent(*this); }
+
+    inline void simulate(QWidget * /*w*/) { QTest::qWait(_delay); }
+
+private:
+    int _delay;
+};
+
+class HbTestEventList: public QList<HbTestEvent *>
+{
+public:
+    inline HbTestEventList() {}
+    inline HbTestEventList(const HbTestEventList &other): QList<HbTestEvent *>()
+    { for (int i = 0; i < other.count(); ++i) append(other.at(i)->clone()); }
+    inline ~HbTestEventList()
+    { clear(); }
+    inline void clear()
+    { qDeleteAll(*this); QList<HbTestEvent *>::clear(); }
+
+    inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
+    inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, qtKey, modifiers, msecs); }
+    inline void addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, qtKey, modifiers, msecs); }
+    inline void addKeyEvent(QTest::KeyAction action, Qt::Key qtKey,
+                            Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, qtKey, modifiers, msecs)); }
+
+    inline void addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, ascii, modifiers, msecs); }
+    inline void addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, ascii, modifiers, msecs); }
+    inline void addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, ascii, modifiers, msecs); }
+    inline void addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyClicksEvent(keys, modifiers, msecs)); }
+    inline void addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, ascii, modifiers, msecs)); }
+
+    inline void addDelay(int msecs)
+    { append(new HbTestDelayEvent(msecs)); }
+
+    inline void simulate(QWidget *w)
+    {
+        for (int i = 0; i < count(); ++i)
+            at(i)->simulate(w);
+    }
+};
+
+class HbAutoTestMainWindow : public HbMainWindow
+{
+public:
+    HbAutoTestMainWindow() : HbMainWindow() {}
+    
+    void mousePressEvent(QMouseEvent *event)
+    {
+        qDebug(
+            "HbAutoTestMainWindow::mousePressEvent: x(%d) y(%d)",
+            event->x(),
+            event->y());
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mousePressEvent(event);
+            } else {
+                ;//Do nothing 
+         }
+    }
+
+    void mouseMoveEvent(QMouseEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseMoveEvent(event);
+            } else {
+                ;//Do nothing
+         }
+    }
+
+    void mouseReleaseEvent(QMouseEvent *event)
+    {
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void keyPressEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyPressEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+    void keyReleaseEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void mouseDoubleClickEvent(QMouseEvent *event)
+    {
+        Q_UNUSED(event);
+        //Just ignore, not supported in Orbit
+    }
+};
+
+
+Q_DECLARE_METATYPE(HbTestEventList)
+#endif //HBAUTOTEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,632 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Application Settings UI unit testing.
+*/
+
+#include <QSharedPointer>
+
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbDialog>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <QtTest/QtTest>
+
+#include "cmapplsettingsui_p.h"
+#include "cmradiodialog.h"
+
+#include "hbautotest.h"
+#include "testcmapplsettingsui.h"
+
+// -----------------------------------------------------------------------------
+// STATIC TEST DATA
+// -----------------------------------------------------------------------------
+
+// Time to wait before continuing after an UI step
+static const int waitTime = 10;
+
+// Destination list item for Connection Method selection
+static const QString dedicatedAccessPoint = "Dedicated access point";
+
+static const QStringList allDestinations = QStringList() <<
+    "Internet" <<
+    "My Snap" <<
+    dedicatedAccessPoint;
+
+static const QStringList allConnectionMethods = QStringList()
+    << "Home WLAN"
+    << "packet data 1"
+    << "packet data 2"
+    << "packet data 3"
+    << "Streaming"
+    << "WLAN IAP 1"
+    << "WLAN IAP 2"
+    << "WLAN IAP 3";
+
+static const QStringList gprsConnectionMethods = QStringList()
+    << "packet data 1"
+    << "packet data 2"
+    << "packet data 3"
+    << "Streaming";
+
+static const QStringList wlanConnectionMethods = QStringList()
+    << "Home WLAN"
+    << "WLAN IAP 1"
+    << "WLAN IAP 2"
+    << "WLAN IAP 3";
+
+// -----------------------------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// -----------------------------------------------------------------------------
+
+/**
+ * Test main function. Runs all test cases.
+ */
+#ifndef TESTCMAPPLSETTINGSUI_NO_OUTPUT_REDIRECT
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    app.setApplicationName("TestCmApplSettingsUi");
+    
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\data\\TestCmApplSettingsUi.txt";
+ 
+    TestCmApplSettingsUi tc;
+    int res = QTest::qExec(&tc, 3, pass);
+ 
+    return res;
+}
+#else
+QTEST_MAIN(TestCmApplSettingsUi)
+#endif
+
+/**
+ * This function is be called before the first test case is executed.
+ */
+void TestCmApplSettingsUi::initTestCase()
+{
+    mMainWindow = new HbAutoTestMainWindow;
+    //mMainWindow = new HbMainWindow;
+    mMainWindow->show();
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 0;
+    mSignalFinished = NULL;
+}
+
+/**
+ * This function is be called after the last test case was executed.
+ */
+void TestCmApplSettingsUi::cleanupTestCase()
+{
+    delete mMainWindow;
+    mMainWindow = 0;
+}
+
+/**
+ * This function is be called before each test case is executed.
+ */
+void TestCmApplSettingsUi::init()
+{
+    // Initialize the CmApplSettingsUI object
+    mApplSettUi = new CmApplSettingsUi;
+
+    // Initialize code references
+    mApplSettingsPriv = mApplSettUi->d_ptr;
+    QVERIFY(mApplSettingsPriv != NULL);
+
+    // CmApplSettingsUI finished(uint) signal watcher
+    mSignalFinished = new QSignalSpy(mApplSettUi, SIGNAL(finished(uint)));
+    QVERIFY(mSignalFinished->isValid() == true);
+}
+
+/**
+ * This function is be called after each test case is executed.
+ */
+void TestCmApplSettingsUi::cleanup()
+{
+    delete mApplSettUi;
+    mApplSettUi = NULL;
+    
+    mApplSettingsPriv = NULL;
+    
+    QCOMPARE(mSignalFinished->count(), 0);
+    delete mSignalFinished;
+    mSignalFinished = NULL;
+}
+
+// -----------------------------------------------------------------------------
+// TEST CASES
+// -----------------------------------------------------------------------------
+
+void TestCmApplSettingsUi::tcConfigAndDelete()
+{
+    // Form the configuration parameters
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 0;
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowDestinations;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+        
+    // Configure the dialog
+    mApplSettUi->setOptions(listItems, filter);
+    mApplSettUi->setSelection(mSelection);
+    
+    // Skip execution, to test premature deletion
+}
+
+void TestCmApplSettingsUi::tcNoContentToShow()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    mApplSettUi->setOptions(listItems, filter);
+
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // The dialog should fail to no content error code,
+    // since no selection dialog items were selected.
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+}
+
+void TestCmApplSettingsUi::tcDestinationSelect()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowDestinations;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    mApplSettUi->setOptions(listItems, filter);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    QStringList destinations;
+    destinations
+        << "Internet"
+        << "My Snap";
+    subCheckDialog(
+        mApplSettingsPriv->mDestinationDialog,
+        destinations,
+        0);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mDestinationDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+    // Selection should be Internet Destination
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 4099;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcDestinationCancel()
+{
+    // Run the dialog with default parameters
+    mApplSettUi->open();
+
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mDestinationDialog,
+        allDestinations,
+        0);
+
+    // Click "Cancel"
+    subDismissDialog(mApplSettingsPriv->mDestinationDialog->mDialog, false);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+}
+
+void TestCmApplSettingsUi::tcDestinationFilterWlan()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowDestinations;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    filter |= CMManagerShim::BearerTypeWlan;
+    mApplSettUi->setOptions(listItems, filter);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    QStringList destinations;
+    destinations
+        << "Internet"
+        << "My Snap";
+    subCheckDialog(
+        mApplSettingsPriv->mDestinationDialog,
+        destinations,
+        0);
+    
+    // Select "My Snap"
+    subSelectDialogItem(
+        mApplSettingsPriv->mDestinationDialog,
+        1);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mDestinationDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+    // Selection should be "My Snap" Destination
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 4102;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcDestinationFilterUnknown()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowDestinations;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    filter |= 0x10281BB7;       // Obsolete CSD bearer type
+    mApplSettUi->setOptions(listItems, filter);
+
+    // Run the dialog with default parameters
+    mApplSettUi->open();
+
+    // The dialog should fail since there's nothing to show
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+}
+
+void TestCmApplSettingsUi::tcDedicatedConnMethodSelect()
+{
+    // Configure the dialog
+    mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
+    mSelection.id = 4099;
+    mApplSettUi->setSelection(mSelection);
+    
+    // Run the dialog with default parameters
+    mApplSettUi->open();
+
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mDestinationDialog,
+        allDestinations,
+        0);
+    
+    // Select "Dedicated access point"
+    subSelectDialogItem(
+        mApplSettingsPriv->mDestinationDialog,
+        2);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mDestinationDialog->mDialog, true);
+
+    // Connection method list should open
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        allConnectionMethods,
+        0);
+
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+    
+    // Selection should be Connection Method "Home WLAN"
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 8;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcDedicatedConnMethodCancel()
+{
+    // Configure the dialog
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 1;
+    mApplSettUi->setSelection(mSelection);
+    
+    // Run the dialog with default parameters
+    mApplSettUi->open();
+
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mDestinationDialog,
+        allDestinations,
+        2);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mDestinationDialog->mDialog, true);
+
+    // Connection method list should open
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        allConnectionMethods,
+        1);
+
+    // Click "Cancel"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, false);
+
+    // The dialog should be cancelled
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+}
+
+void TestCmApplSettingsUi::tcConnMethodSelect()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    mApplSettUi->setOptions(listItems, filter);
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 1;
+    mApplSettUi->setSelection(mSelection);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        allConnectionMethods,
+        1);
+    
+    // Select "WLAN IAP 1"
+    subSelectDialogItem(
+        mApplSettingsPriv->mConnMethodDialog,
+        3);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+    // Selection should be Connection Method "packet data 3"
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 4;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcConnMethodCancel()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    mApplSettUi->setOptions(listItems, filter);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        allConnectionMethods,
+        0);
+    
+    // Click "Cancel"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, false);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorCancel);
+}
+
+void TestCmApplSettingsUi::tcConnMethodFilterGprs()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    filter |= CMManagerShim::BearerTypePacketData;
+    mApplSettUi->setOptions(listItems, filter);
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 9;
+    mApplSettUi->setSelection(mSelection);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        gprsConnectionMethods,
+        3);
+    
+    // Select "packet data 3"
+    subSelectDialogItem(
+        mApplSettingsPriv->mConnMethodDialog,
+        2);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+    // Selection should be Connection Method "packet data 3"
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 4;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcConnMethodFilterWlan()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    filter |= CMManagerShim::BearerTypeWlan;
+    mApplSettUi->setOptions(listItems, filter);
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 6;
+    mApplSettUi->setSelection(mSelection);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // Validate the dialog content
+    subCheckDialog(
+        mApplSettingsPriv->mConnMethodDialog,
+        wlanConnectionMethods,
+        2);
+    
+    // Select "WLAN IAP 1"
+    subSelectDialogItem(
+        mApplSettingsPriv->mConnMethodDialog,
+        1);
+    
+    // Click "OK"
+    subDismissDialog(mApplSettingsPriv->mConnMethodDialog->mDialog, true);
+
+    // The dialog should succeed
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNone);
+
+    // Selection should be Connection Method "WLAN IAP 1"
+    mSelection.result = CmApplSettingsUi::SelectionTypeConnectionMethod;
+    mSelection.id = 5;
+    subVerifySelection(mSelection);
+}
+
+void TestCmApplSettingsUi::tcConnMethodFilterUnknown()
+{
+    // Configure the dialog
+    QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+    listItems |= CmApplSettingsUi::ShowConnectionMethods;
+    QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+    filter |= 0x10281BB7;       // Obsolete CSD bearer type
+    mApplSettUi->setOptions(listItems, filter);
+    
+    // Run the dialog
+    mApplSettUi->open();
+    
+    // The dialog should fail since there's nothing to show
+    subCatchSignalFinished(CmApplSettingsUi::ApplSettingsErrorNoContent);
+}
+
+// -----------------------------------------------------------------------------
+// SUB TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Catch and verify the signal "finished(int)" emitted by mSignalFinished.
+ */
+void TestCmApplSettingsUi::subCatchSignalFinished(uint status)
+{
+    QTest::qWait(waitTime);
+    QCOMPARE(mSignalFinished->count(), 1);      // A sole signal
+    QList<QVariant> arguments = mSignalFinished->takeFirst();
+    // Verify the first result status
+    QVERIFY(arguments.at(0).toUInt() == status);
+}
+
+/**
+ * Verify the current selection against given selection
+ */
+void TestCmApplSettingsUi::subVerifySelection(CmApplSettingsUi::SettingSelection selection)
+{
+    mSelection = mApplSettUi->selection();
+    QCOMPARE(mSelection.result, selection.result);
+    QCOMPARE(mSelection.id, selection.id);    
+}
+
+/**
+ * Application settings ui dialog content validation subtestcase.
+ * Checks:
+ * -The dialog's radiobutton list content.
+ * -Dialog's current selection.
+ */
+void TestCmApplSettingsUi::subCheckDialog(
+    CmRadioDialog *radioDialog,
+    QStringList items,
+    int selected)
+{
+    // Wait for the dialog to show properly
+    QTest::qWait(waitTime);
+    
+    QVERIFY(radioDialog != NULL);
+    QVERIFY(radioDialog->mList != NULL);
+    QCOMPARE(radioDialog->mList->items(), items);
+    QCOMPARE(radioDialog->mList->selected(), selected);
+}
+
+/**
+ * Select an item from the radio dialog.
+ */
+void TestCmApplSettingsUi::subSelectDialogItem(
+    CmRadioDialog *radioDialog,
+    int selected)
+{
+    // Wait for the dialog to show properly
+    QTest::qWait(waitTime);
+    
+    QVERIFY(radioDialog != NULL);
+    QVERIFY(radioDialog->mList != NULL);
+    HbRadioButtonList *radioList = radioDialog->mList;
+
+    // Calculate radio list item center location inside the
+    // radio list widget
+    QSizeF radioListSize = radioList->size();
+    qDebug(
+        "Radio List size height(%f) width(%f)",
+        radioListSize.height(),
+        radioListSize.width());
+    int itemCount = radioList->items().count();
+    qDebug("Radio List item count: %d", itemCount);
+    qreal buttonHeight = radioListSize.height() / itemCount;
+    QPoint point(
+        radioListSize.width() / 2,
+        buttonHeight * (selected + 0.5));
+    
+    // Click the button
+    HbAutoTest::mouseClick(mMainWindow, radioList, point, waitTime);
+
+    // Verify that the selection succeeded
+    QCOMPARE(radioDialog->mList->selected(), selected);
+}
+
+/**
+ * Dismiss the dialog by pressing either "OK" or "Cancel".
+ */
+void TestCmApplSettingsUi::subDismissDialog(
+    QSharedPointer<HbDialog> dialog,
+    bool accept)
+{
+    // Wait for the dialog to show properly
+    QTest::qWait(waitTime);
+    
+    QVERIFY(dialog != NULL);
+    
+    // Calculate button center location inside the dialog
+    QSizeF dialogSize = dialog->size();
+    qDebug(
+        "Dialog size height(%f) width(%f)",
+        dialogSize.height(),
+        dialogSize.width());
+    QPoint point;
+    if (accept) {
+        // Left button: "OK"
+        point.setX(dialogSize.width() / 4);
+    } else {
+        // Right button: "Cancel"
+        point.setX(dialogSize.width() - (dialogSize.width() / 4));
+    }
+    point.setY(dialogSize.height() - 30);
+    
+    // Click the button
+    HbAutoTest::mouseClick(mMainWindow, dialog.data(), point, waitTime);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Application Settings UI unit testing.
+*/
+
+#include <QSharedPointer>
+#include <QStringList>
+#include <QtTest/QtTest>
+
+#include "cmapplsettingsui.h"
+
+class HbDialog;
+class CmRadioDialog;
+class HbMainWindow;
+class HbAutoTestMainWindow;
+
+class TestCmApplSettingsUi : public QObject
+{
+    Q_OBJECT
+
+    public slots:
+        // Test framework functions
+        void initTestCase();
+        void cleanupTestCase();
+        void init();
+        void cleanup();
+
+    private slots:
+        // Test cases
+        void tcConfigAndDelete();
+        void tcNoContentToShow();
+        void tcDestinationSelect();
+        void tcDestinationCancel();
+        void tcDestinationFilterWlan();
+        void tcDestinationFilterUnknown();
+        void tcDedicatedConnMethodSelect();
+        void tcDedicatedConnMethodCancel();
+        void tcConnMethodSelect();
+        void tcConnMethodCancel();
+        void tcConnMethodFilterGprs();
+        void tcConnMethodFilterWlan();
+        void tcConnMethodFilterUnknown();
+
+    private:
+        // Sub test cases
+        void subCatchSignalFinished(uint status);
+        void subVerifySelection(CmApplSettingsUi::SettingSelection selection);
+        void subCheckDialog(
+            CmRadioDialog *radioDialog,
+            QStringList items,
+            int selection);
+        void subSelectDialogItem(
+            CmRadioDialog *radioDialog,
+            int selected);
+        void subDismissDialog(
+            QSharedPointer<HbDialog> dialog,
+            bool accept);
+
+    private:
+        // Code references
+        CmApplSettingsUiPrivate *mApplSettingsPriv;
+        
+        // Test data
+        HbAutoTestMainWindow *mMainWindow;
+        CmApplSettingsUi::SettingSelection mSelection;
+        CmApplSettingsUi *mApplSettUi;
+        QSignalSpy *mSignalFinished;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/testcmapplsettingsui.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for CM Application Settings UI Unit Tests.
+
+TEMPLATE = app
+
+TARGET = testcmapplsettingsui
+
+CONFIG += hb qtestlib
+
+INCLUDEPATH += . ../../inc
+DEPENDPATH += .
+
+HEADERS += \
+    hbautotest.h \
+    testcmapplsettingsui.h
+SOURCES += \
+    hbautotest.cpp \
+    testcmapplsettingsui.cpp
+
+LIBS += -lcmapplsettingsui
+
+symbian: {
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/tools/applsettingsui_ctc.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,89 @@
+::
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+:: Script running Application Settings UI test cases with CTC analysis.
+
+@echo off
+
+:: -----------------------------------------------------------------------------
+:: Instructions
+:: -----------------------------------------------------------------------------
+:: 
+:: Remember to use the test CommsDat that can be set and restored with the
+:: helper scripts:
+:: - commsdat_set.bat
+:: - commsdat_restore.bat
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+:: Cm Application Settings UI base directory
+set cmapplsettingsui_dir=..\..\..
+pushd %cmapplsettingsui_dir%
+
+:: CTC instrumentation excludes
+set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp
+
+
+::-----------------------------------------------------------------------------
+:: Remove old coverage data
+::-----------------------------------------------------------------------------
+
+echo Cleaning up...
+del MON.* ctcerr.txt profile.txt
+rd /s /q CTCHTML
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build & instrument code
+::-----------------------------------------------------------------------------
+
+echo Building code and instrumenting..
+call del MON.* ctcerr.txt profile.txt
+call make distclean
+call qmake
+call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build test code
+::-----------------------------------------------------------------------------
+
+echo Building test code...
+call cd tsrc\ut
+call make distclean
+call qmake
+call sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Execute the tests
+::-----------------------------------------------------------------------------
+
+echo Running tests..
+cd ..\..
+call \epoc32\release\winscw\udeb\testcmapplsettingsui.exe
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Create coverage results
+::-----------------------------------------------------------------------------
+
+echo Creating results...
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
+echo ...done
+
+popd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/tools/commsdat_restore.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for restoring backup of commsdat.
+
+copy backup\cccccc00.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/ut/tools/commsdat_set.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for setting test commsdat.
+
+md backup
+copy \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre backup\
+copy default.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
Binary file cmmanager/cmapplsettingsui/tsrc/ut/tools/default.cre has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmanager.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS += \
+    connection_settings_shim \
+    cmapplsettingsui \
+    cpipsettingsplugin \
+    cpdestinationplugin \
+    cppacketdataapplugin \
+    cpwlanapplugin
+
+CONFIG += ordered
+
+symbian*: {
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+} 
--- a/cmmanager/cmmgr/Framework/BWinsCw/CmManager_prot_setupU.DEF	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-EXPORTS
-	??0CCmPluginBaseEng@@IAE@PAVTCmPluginInitParam@@@Z @ 1 NONAME ; CCmPluginBaseEng::CCmPluginBaseEng(class TCmPluginInitParam *)
-	??0CCmPluginLanBase@@IAE@PAVTCmPluginInitParam@@@Z @ 2 NONAME ; CCmPluginLanBase::CCmPluginLanBase(class TCmPluginInitParam *)
-	??0CmPluginBaseSettingsDlg@@QAE@AAVCCmPluginBaseEng@@@Z @ 3 NONAME ; CmPluginBaseSettingsDlg::CmPluginBaseSettingsDlg(class CCmPluginBaseEng &)
-	??0CmPluginBaseSettingsDlgAdv@@QAE@AAVCCmPluginBaseEng@@@Z @ 4 NONAME ; CmPluginBaseSettingsDlgAdv::CmPluginBaseSettingsDlgAdv(class CCmPluginBaseEng &)
-	??0CmPluginBaseSettingsDlgIp@@QAE@AAVCCmPluginBaseEng@@@Z @ 5 NONAME ; CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp(class CCmPluginBaseEng &)
-	??0RCmDestination@@QAE@ABV0@@Z @ 6 NONAME ; RCmDestination::RCmDestination(class RCmDestination const &)
-	??0RCmDestinationExt@@QAE@ABV0@@Z @ 7 NONAME ; RCmDestinationExt::RCmDestinationExt(class RCmDestinationExt const &)
-	??1CCmApplicationSettingsUi@@UAE@XZ @ 8 NONAME ; CCmApplicationSettingsUi::~CCmApplicationSettingsUi(void)
-	??1CCmPluginBaseEng@@UAE@XZ @ 9 NONAME ; CCmPluginBaseEng::~CCmPluginBaseEng(void)
-	??1CCmPluginLanBase@@MAE@XZ @ 10 NONAME ; CCmPluginLanBase::~CCmPluginLanBase(void)
-	??1CCmSettingsUi@@UAE@XZ @ 11 NONAME ; CCmSettingsUi::~CCmSettingsUi(void)
-	??1CmPluginBaseSettingsDlg@@UAE@XZ @ 12 NONAME ; CmPluginBaseSettingsDlg::~CmPluginBaseSettingsDlg(void)
-	??1CmPluginBaseSettingsDlgAdv@@UAE@XZ @ 13 NONAME ; CmPluginBaseSettingsDlgAdv::~CmPluginBaseSettingsDlgAdv(void)
-	??1CmPluginBaseSettingsDlgIp@@UAE@XZ @ 14 NONAME ; CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp(void)
-	??1RCmDestination@@QAE@XZ @ 15 NONAME ; RCmDestination::~RCmDestination(void)
-	??1RCmDestinationExt@@QAE@XZ @ 16 NONAME ; RCmDestinationExt::~RCmDestinationExt(void)
-	??4RCmDestination@@QAEAAV0@ABV0@@Z @ 17 NONAME ; class RCmDestination & RCmDestination::operator=(class RCmDestination const &)
-	??4RCmDestinationExt@@QAEAAV0@ABV0@@Z @ 18 NONAME ; class RCmDestinationExt & RCmDestinationExt::operator=(class RCmDestinationExt const &)
-	?AddCommonConversionTableL@CCmPluginBaseEng@@IAEXPBUTCmCommonAttrConvArrayItem@@@Z @ 19 NONAME ; void CCmPluginBaseEng::AddCommonConversionTableL(struct TCmCommonAttrConvArrayItem const *)
-	?AddConnectionMethodL@RCmDestinationExt@@QAEHVRCmConnectionMethodExt@@@Z @ 20 NONAME ; int RCmDestinationExt::AddConnectionMethodL(class RCmConnectionMethodExt)
-	?AddConverstionTableL@CCmPluginBaseEng@@IAEXPAPAVCCDRecordBase@CommsDat@@PAHPBUTCmAttribConvTable@@@Z @ 21 NONAME ; void CCmPluginBaseEng::AddConverstionTableL(class CommsDat::CCDRecordBase * *, int *, struct TCmAttribConvTable const *)
-	?AddEmbeddedDestinationL@RCmDestinationExt@@QAEHABV1@@Z @ 22 NONAME ; int RCmDestinationExt::AddEmbeddedDestinationL(class RCmDestinationExt const &)
-	?AddResourceFileL@CCmPluginBaseEng@@IAEXABVTDesC16@@@Z @ 23 NONAME ; void CCmPluginBaseEng::AddResourceFileL(class TDesC16 const &)
-	?AllDestinationsL@CCmManagerImpl@@QAEXAAV?$RArray@K@@@Z @ 24 NONAME ; void CCmManagerImpl::AllDestinationsL(class RArray<unsigned long> &)
-	?AllDestinationsL@RCmManager@@QBEXAAV?$RArray@K@@@Z @ 25 NONAME ; void RCmManager::AllDestinationsL(class RArray<unsigned long> &) const
-	?AllDestinationsL@RCmManagerExt@@QAEXAAV?$RArray@K@@@Z @ 26 NONAME ; void RCmManagerExt::AllDestinationsL(class RArray<unsigned long> &)
-	?AllocReadL@CCmPluginBaseEng@@IBEPAVHBufC16@@H@Z @ 27 NONAME ; class HBufC16 * CCmPluginBaseEng::AllocReadL(int) const
-	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IAEXAAVCDesC16Array@@HH@Z @ 28 NONAME ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int)
-	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IAEXAAVCDesC16Array@@HPBVHBufC16@@@Z @ 29 NONAME ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, class HBufC16 const *)
-	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IBEXAAVCDesC16Array@@HHABVTDesC16@@H@Z @ 30 NONAME ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int, class TDesC16 const &, int) const
-	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IBEXAAVCDesC16Array@@HHHH@Z @ 31 NONAME ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int, int, int) const
-	?BearerPriorityArrayL@RCmManager@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 32 NONAME ; void RCmManager::BearerPriorityArrayL(class RArray<class TBearerPriority> &) const
-	?BearerPriorityArrayL@RCmManagerExt@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 33 NONAME ; void RCmManagerExt::BearerPriorityArrayL(class RArray<class TBearerPriority> &) const
-	?BearerRecordIdLC@CCmPluginLanBase@@MAEXAAPAVHBufC16@@AAK@Z @ 34 NONAME ; void CCmPluginLanBase::BearerRecordIdLC(class HBufC16 * &, unsigned long &)
-	?CheckDNSServerAddressL@CCmPluginBaseEng@@QAEXHAAV?$CMDBField@VTDesC16@@@CommsDat@@0AAV?$CMDBField@H@3@@Z @ 35 NONAME ; void CCmPluginBaseEng::CheckDNSServerAddressL(int, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<int> &)
-	?CheckIPv4ValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 36 NONAME ; int CheckIPv4ValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?CheckIPv6ValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 37 NONAME ; int CheckIPv6ValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?CheckIfAlreadyConnected@CCmPluginBaseEng@@MBEHXZ @ 38 NONAME ; int CCmPluginBaseEng::CheckIfAlreadyConnected(void) const
-	?CheckIfNameModifiedL@CCmPluginBaseEng@@IBEXPAVCCDRecordBase@CommsDat@@@Z @ 39 NONAME ; void CCmPluginBaseEng::CheckIfNameModifiedL(class CommsDat::CCDRecordBase *) const
-	?CheckPortNumberValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 40 NONAME ; int CheckPortNumberValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?CheckRecordIdValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 41 NONAME ; int CheckRecordIdValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?CheckWAPWspOptionValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 42 NONAME ; int CheckWAPWspOptionValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?ClassifyIPv6Address@@YA?AW4TIPv6Types@CMManager@@ABVTDesC16@@@Z @ 43 NONAME ; enum CMManager::TIPv6Types ClassifyIPv6Address(class TDesC16 const &)
-	?CleanupGlobalPriorityArray@RCmManager@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 44 NONAME ; void RCmManager::CleanupGlobalPriorityArray(class RArray<class TBearerPriority> &) const
-	?CleanupGlobalPriorityArray@RCmManagerExt@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 45 NONAME ; void RCmManagerExt::CleanupGlobalPriorityArray(class RArray<class TBearerPriority> &) const
-	?Close@CCmTransactionHandler@@QAEXXZ @ 46 NONAME ABSENT ; void CCmTransactionHandler::Close(void)
-	?Close@RCmConnectionMethod@@QAEXXZ @ 47 NONAME ; void RCmConnectionMethod::Close(void)
-	?Close@RCmConnectionMethodExt@@QAEXXZ @ 48 NONAME ; void RCmConnectionMethodExt::Close(void)
-	?Close@RCmDestination@@QAEXXZ @ 49 NONAME ; void RCmDestination::Close(void)
-	?Close@RCmDestinationExt@@QAEXXZ @ 50 NONAME ; void RCmDestinationExt::Close(void)
-	?Close@RCmManager@@QAEXXZ @ 51 NONAME ; void RCmManager::Close(void)
-	?Close@RCmManagerExt@@QAEXXZ @ 52 NONAME ; void RCmManagerExt::Close(void)
-	?ConnectionMethodByIDL@RCmDestination@@QBE?AVRCmConnectionMethod@@H@Z @ 53 NONAME ; class RCmConnectionMethod RCmDestination::ConnectionMethodByIDL(int) const
-	?ConnectionMethodByIDL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@H@Z @ 54 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodByIDL(int)
-	?ConnectionMethodCount@CCmDestinationImpl@@QAEHXZ @ 55 NONAME ; int CCmDestinationImpl::ConnectionMethodCount(void)
-	?ConnectionMethodCount@RCmDestination@@QBEHXZ @ 56 NONAME ; int RCmDestination::ConnectionMethodCount(void) const
-	?ConnectionMethodCount@RCmDestinationExt@@QAEHXZ @ 57 NONAME ; int RCmDestinationExt::ConnectionMethodCount(void)
-	?ConnectionMethodL@CCmDestinationImpl@@QAEPAVCCmPluginBaseEng@@H@Z @ 58 NONAME ; class CCmPluginBaseEng * CCmDestinationImpl::ConnectionMethodL(int)
-	?ConnectionMethodL@CCmManagerImpl@@QAEPAVCCmPluginBaseEng@@K@Z @ 59 NONAME ; class CCmPluginBaseEng * CCmManagerImpl::ConnectionMethodL(unsigned long)
-	?ConnectionMethodL@CCmManagerImpl@@QAEXAAV?$RArray@K@@HHHH@Z @ 60 NONAME ; void CCmManagerImpl::ConnectionMethodL(class RArray<unsigned long> &, int, int, int, int)
-	?ConnectionMethodL@RCmDestination@@QBE?AVRCmConnectionMethod@@H@Z @ 61 NONAME ; class RCmConnectionMethod RCmDestination::ConnectionMethodL(int) const
-	?ConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@H@Z @ 62 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodL(int)
-	?ConnectionMethodL@RCmManager@@QBE?AVRCmConnectionMethod@@K@Z @ 63 NONAME ; class RCmConnectionMethod RCmManager::ConnectionMethodL(unsigned long) const
-	?ConnectionMethodL@RCmManager@@QBEXAAV?$RArray@K@@HHH@Z @ 64 NONAME ; void RCmManager::ConnectionMethodL(class RArray<unsigned long> &, int, int, int) const
-	?ConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 65 NONAME ; class RCmConnectionMethodExt RCmManagerExt::ConnectionMethodL(unsigned long)
-	?ConnectionMethodL@RCmManagerExt@@QAEXAAV?$RArray@K@@HHH@Z @ 66 NONAME ; void RCmManagerExt::ConnectionMethodL(class RArray<unsigned long> &, int, int, int)
-	?ConstructAndRunLD@CmPluginBaseSettingsDlg@@QAEHXZ @ 67 NONAME ; int CmPluginBaseSettingsDlg::ConstructAndRunLD(void)
-	?ConstructL@CCmPluginBaseEng@@MAEXXZ @ 68 NONAME ; void CCmPluginBaseEng::ConstructL(void)
-	?ConstructL@CCmPluginLanBase@@MAEXXZ @ 69 NONAME ; void CCmPluginLanBase::ConstructL(void)
-	?ConvTableItem@CCmPluginBaseEng@@QAEPBUTCmAttribConvTable@@K@Z @ 70 NONAME ; struct TCmAttribConvTable const * CCmPluginBaseEng::ConvTableItem(unsigned long)
-	?CopyConnectionMethodL@RCmManagerExt@@QAEHAAVRCmDestinationExt@@AAVRCmConnectionMethodExt@@@Z @ 71 NONAME ; int RCmManagerExt::CopyConnectionMethodL(class RCmDestinationExt &, class RCmConnectionMethodExt &)
-	?CreateConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 72 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(unsigned long)
-	?CreateConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 73 NONAME ; class RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(unsigned long)
-	?CreateCopyL@CCmPluginBaseEng@@UBEPAV1@XZ @ 74 NONAME ; class CCmPluginBaseEng * CCmPluginBaseEng::CreateCopyL(void) const
-	?CreateCopyL@RCmConnectionMethodExt@@QAE?AV1@XZ @ 75 NONAME ; class RCmConnectionMethodExt RCmConnectionMethodExt::CreateCopyL(void)
-	?CreateDestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@ABVTDesC16@@@Z @ 76 NONAME ; class RCmDestinationExt RCmManagerExt::CreateDestinationL(class TDesC16 const &)
-	?CreateNewL@CCmPluginBaseEng@@UAEXXZ @ 77 NONAME ; void CCmPluginBaseEng::CreateNewL(void)
-	?CreateNewServiceRecordL@CCmPluginLanBase@@MAEXXZ @ 78 NONAME ; void CCmPluginLanBase::CreateNewServiceRecordL(void)
-	?DeleteConnectionMethodL@RCmDestinationExt@@QAEXAAVRCmConnectionMethodExt@@@Z @ 79 NONAME ; void RCmDestinationExt::DeleteConnectionMethodL(class RCmConnectionMethodExt &)
-	?DeleteL@CCmPluginBaseEng@@UAEHHH@Z @ 80 NONAME ; int CCmPluginBaseEng::DeleteL(int, int)
-	?DeleteL@RCmConnectionMethodExt@@QAEHXZ @ 81 NONAME ; int RCmConnectionMethodExt::DeleteL(void)
-	?DeleteLD@CCmDestinationImpl@@QAEXXZ @ 82 NONAME ; void CCmDestinationImpl::DeleteLD(void)
-	?DeleteLD@RCmDestinationExt@@QAEXXZ @ 83 NONAME ; void RCmDestinationExt::DeleteLD(void)
-	?Destination@CCmPluginBaseEng@@UBEPAVCCmDestinationImpl@@XZ @ 84 NONAME ; class CCmDestinationImpl * CCmPluginBaseEng::Destination(void) const
-	?DestinationL@CCmManagerImpl@@QAEPAVCCmDestinationImpl@@K@Z @ 85 NONAME ; class CCmDestinationImpl * CCmManagerImpl::DestinationL(unsigned long)
-	?DestinationL@RCmConnectionMethod@@QBE?AVRCmDestination@@XZ @ 86 NONAME ; class RCmDestination RCmConnectionMethod::DestinationL(void) const
-	?DestinationL@RCmConnectionMethodExt@@QBE?AVRCmDestinationExt@@XZ @ 87 NONAME ; class RCmDestinationExt RCmConnectionMethodExt::DestinationL(void) const
-	?DestinationL@RCmManager@@QBE?AVRCmDestination@@K@Z @ 88 NONAME ; class RCmDestination RCmManager::DestinationL(unsigned long) const
-	?DestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@K@Z @ 89 NONAME ; class RCmDestinationExt RCmManagerExt::DestinationL(unsigned long)
-	?DynInitMenuPaneL@CmPluginBaseSettingsDlg@@MAEXHPAVCEikMenuPane@@@Z @ 90 NONAME ; void CmPluginBaseSettingsDlg::DynInitMenuPaneL(int, class CEikMenuPane *)
-	?DynInitMenuPaneL@CmPluginBaseSettingsDlgAdv@@UAEXHPAVCEikMenuPane@@@Z @ 91 NONAME ; void CmPluginBaseSettingsDlgAdv::DynInitMenuPaneL(int, class CEikMenuPane *)
-	?DynInitMenuPaneL@CmPluginBaseSettingsDlgIp@@UAEXHPAVCEikMenuPane@@@Z @ 92 NONAME ; void CmPluginBaseSettingsDlgIp::DynInitMenuPaneL(int, class CEikMenuPane *)
-	?EasyWlanIdL@CCmManagerImpl@@QAEKXZ @ 93 NONAME ; unsigned long CCmManagerImpl::EasyWlanIdL(void)
-	?EasyWlanIdL@RCmManager@@QBEKXZ @ 94 NONAME ; unsigned long RCmManager::EasyWlanIdL(void) const
-	?EasyWlanIdL@RCmManagerExt@@QAEKXZ @ 95 NONAME ; unsigned long RCmManagerExt::EasyWlanIdL(void)
-	?ElementId@RCmDestination@@QBEKXZ @ 96 NONAME ; unsigned long RCmDestination::ElementId(void) const
-	?ElementId@RCmDestinationExt@@QAEKXZ @ 97 NONAME ; unsigned long RCmDestinationExt::ElementId(void)
-	?EnableChargeCardL@CCmPluginBaseEng@@AAEXH@Z @ 98 NONAME ABSENT ; void CCmPluginBaseEng::EnableChargeCardL(int)
-	?EnableLocationL@CCmPluginBaseEng@@AAEXH@Z @ 99 NONAME ABSENT ; void CCmPluginBaseEng::EnableLocationL(int)
-	?EnableProxyL@CCmPluginBaseEng@@AAEXH@Z @ 100 NONAME ABSENT ; void CCmPluginBaseEng::EnableProxyL(int)
-	?FeatureSupported@CCmPluginBaseEng@@SAHH@Z @ 101 NONAME ; int CCmPluginBaseEng::FeatureSupported(int)
-	?GetBearerInfoBoolL@CCmManagerImpl@@QBEHKK@Z @ 102 NONAME ; int CCmManagerImpl::GetBearerInfoBoolL(unsigned long, unsigned long) const
-	?GetBearerInfoBoolL@RCmManager@@QBEHKK@Z @ 103 NONAME ; int RCmManager::GetBearerInfoBoolL(unsigned long, unsigned long) const
-	?GetBearerInfoBoolL@RCmManagerExt@@QBEHKK@Z @ 104 NONAME ; int RCmManagerExt::GetBearerInfoBoolL(unsigned long, unsigned long) const
-	?GetBearerInfoIntL@CCmManagerImpl@@QBEKKK@Z @ 105 NONAME ; unsigned long CCmManagerImpl::GetBearerInfoIntL(unsigned long, unsigned long) const
-	?GetBearerInfoIntL@RCmManager@@QBEKKK@Z @ 106 NONAME ; unsigned long RCmManager::GetBearerInfoIntL(unsigned long, unsigned long) const
-	?GetBearerInfoIntL@RCmManagerExt@@QBEKKK@Z @ 107 NONAME ; unsigned long RCmManagerExt::GetBearerInfoIntL(unsigned long, unsigned long) const
-	?GetBearerInfoString8L@CCmManagerImpl@@QBEPAVHBufC8@@KK@Z @ 108 NONAME ; class HBufC8 * CCmManagerImpl::GetBearerInfoString8L(unsigned long, unsigned long) const
-	?GetBearerInfoString8L@RCmManager@@QBEPAVHBufC8@@KK@Z @ 109 NONAME ; class HBufC8 * RCmManager::GetBearerInfoString8L(unsigned long, unsigned long) const
-	?GetBearerInfoString8L@RCmManagerExt@@QBEPAVHBufC8@@KK@Z @ 110 NONAME ; class HBufC8 * RCmManagerExt::GetBearerInfoString8L(unsigned long, unsigned long) const
-	?GetBearerInfoStringL@CCmManagerImpl@@QBEPAVHBufC16@@KK@Z @ 111 NONAME ; class HBufC16 * CCmManagerImpl::GetBearerInfoStringL(unsigned long, unsigned long) const
-	?GetBearerInfoStringL@RCmManager@@QBEPAVHBufC16@@KK@Z @ 112 NONAME ; class HBufC16 * RCmManager::GetBearerInfoStringL(unsigned long, unsigned long) const
-	?GetBearerInfoStringL@RCmManagerExt@@QBEPAVHBufC16@@KK@Z @ 113 NONAME ; class HBufC16 * RCmManagerExt::GetBearerInfoStringL(unsigned long, unsigned long) const
-	?GetBoolAttributeL@CCmPluginBaseEng@@UBEHK@Z @ 114 NONAME ; int CCmPluginBaseEng::GetBoolAttributeL(unsigned long) const
-	?GetBoolAttributeL@RCmConnectionMethod@@QBEHK@Z @ 115 NONAME ; int RCmConnectionMethod::GetBoolAttributeL(unsigned long) const
-	?GetBoolAttributeL@RCmConnectionMethodExt@@QBEHK@Z @ 116 NONAME ; int RCmConnectionMethodExt::GetBoolAttributeL(unsigned long) const
-	?GetConnectionMethodInfoBoolL@CCmManagerImpl@@QBEHKK@Z @ 117 NONAME ; int CCmManagerImpl::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoBoolL@RCmManager@@QBEHKK@Z @ 118 NONAME ; int RCmManager::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoBoolL@RCmManagerExt@@QBEHKK@Z @ 119 NONAME ; int RCmManagerExt::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoIntL@CCmManagerImpl@@QBEKKK@Z @ 120 NONAME ; unsigned long CCmManagerImpl::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoIntL@RCmManager@@QBEKKK@Z @ 121 NONAME ; unsigned long RCmManager::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoIntL@RCmManagerExt@@QBEKKK@Z @ 122 NONAME ; unsigned long RCmManagerExt::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoString8L@CCmManagerImpl@@QBEPAVHBufC8@@KK@Z @ 123 NONAME ; class HBufC8 * CCmManagerImpl::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoString8L@RCmManager@@QBEPAVHBufC8@@KK@Z @ 124 NONAME ; class HBufC8 * RCmManager::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoString8L@RCmManagerExt@@QBEPAVHBufC8@@KK@Z @ 125 NONAME ; class HBufC8 * RCmManagerExt::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoStringL@CCmManagerImpl@@QBEPAVHBufC16@@KK@Z @ 126 NONAME ; class HBufC16 * CCmManagerImpl::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoStringL@RCmManager@@QBEPAVHBufC16@@KK@Z @ 127 NONAME ; class HBufC16 * RCmManager::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
-	?GetConnectionMethodInfoStringL@RCmManagerExt@@QBEPAVHBufC16@@KK@Z @ 128 NONAME ; class HBufC16 * RCmManagerExt::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
-	?GetHelpContext@CmPluginBaseSettingsDlg@@UBEXAAVTCoeHelpContext@@@Z @ 129 NONAME ; void CmPluginBaseSettingsDlg::GetHelpContext(class TCoeHelpContext &) const
-	?GetIPv6DNSTypeL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 130 NONAME ; int CmPluginBaseSettingsDlg::GetIPv6DNSTypeL(unsigned long, unsigned long)
-	?GetIntAttributeL@CCmPluginBaseEng@@UBEKK@Z @ 131 NONAME ; unsigned long CCmPluginBaseEng::GetIntAttributeL(unsigned long) const
-	?GetIntAttributeL@RCmConnectionMethod@@QBEKK@Z @ 132 NONAME ; unsigned long RCmConnectionMethod::GetIntAttributeL(unsigned long) const
-	?GetIntAttributeL@RCmConnectionMethodExt@@QBEKK@Z @ 133 NONAME ; unsigned long RCmConnectionMethodExt::GetIntAttributeL(unsigned long) const
-	?GetString8AttributeL@CCmPluginBaseEng@@UBEPAVHBufC8@@K@Z @ 134 NONAME ; class HBufC8 * CCmPluginBaseEng::GetString8AttributeL(unsigned long) const
-	?GetString8AttributeL@RCmConnectionMethod@@QBEPAVHBufC8@@K@Z @ 135 NONAME ; class HBufC8 * RCmConnectionMethod::GetString8AttributeL(unsigned long) const
-	?GetString8AttributeL@RCmConnectionMethodExt@@QBEPAVHBufC8@@K@Z @ 136 NONAME ; class HBufC8 * RCmConnectionMethodExt::GetString8AttributeL(unsigned long) const
-	?GetStringAttributeL@CCmPluginBaseEng@@UBEPAVHBufC16@@K@Z @ 137 NONAME ; class HBufC16 * CCmPluginBaseEng::GetStringAttributeL(unsigned long) const
-	?GetStringAttributeL@RCmConnectionMethod@@QBEPAVHBufC16@@K@Z @ 138 NONAME ; class HBufC16 * RCmConnectionMethod::GetStringAttributeL(unsigned long) const
-	?GetStringAttributeL@RCmConnectionMethodExt@@QBEPAVHBufC16@@K@Z @ 139 NONAME ; class HBufC16 * RCmConnectionMethodExt::GetStringAttributeL(unsigned long) const
-	?GlobalBearerPriority@CCmPluginBaseEng@@IBEHABVTDesC16@@@Z @ 140 NONAME ; int CCmPluginBaseEng::GlobalBearerPriority(class TDesC16 const &) const
-	?GlobalUiBearerPriority@CCmPluginBaseEng@@IBEHABVTDesC16@@@Z @ 141 NONAME ; int CCmPluginBaseEng::GlobalUiBearerPriority(class TDesC16 const &) const
-	?HandleListBoxEventL@CmPluginBaseSettingsDlg@@MAEXPAVCEikListBox@@W4TListBoxEvent@MEikListBoxObserver@@@Z @ 142 NONAME ; void CmPluginBaseSettingsDlg::HandleListBoxEventL(class CEikListBox *, enum MEikListBoxObserver::TListBoxEvent)
-	?HandleListboxDataChangeL@CmPluginBaseSettingsDlg@@QAEXXZ @ 143 NONAME ; void CmPluginBaseSettingsDlg::HandleListboxDataChangeL(void)
-	?IAPRecordElementId@CCmPluginBaseEng@@QBEKXZ @ 144 NONAME ; unsigned long CCmPluginBaseEng::IAPRecordElementId(void) const
-	?IconL@CCmDestinationImpl@@QAEPAVCGulIcon@@XZ @ 145 NONAME ; class CGulIcon * CCmDestinationImpl::IconL(void)
-	?IconL@RCmDestination@@QBEPAVCGulIcon@@XZ @ 146 NONAME ; class CGulIcon * RCmDestination::IconL(void) const
-	?IconL@RCmDestinationExt@@QAEPAVCGulIcon@@XZ @ 147 NONAME ; class CGulIcon * RCmDestinationExt::IconL(void)
-	?Id@RCmDestination@@QBEKXZ @ 148 NONAME ; unsigned long RCmDestination::Id(void) const
-	?Id@RCmDestinationExt@@QAEKXZ @ 149 NONAME ; unsigned long RCmDestinationExt::Id(void)
-	?InitTextsL@CmPluginBaseSettingsDlg@@UAEXXZ @ 150 NONAME ; void CmPluginBaseSettingsDlg::InitTextsL(void)
-	?InitializeWithUiL@CCmPluginLanBase@@UAEHH@Z @ 151 NONAME ; int CCmPluginLanBase::InitializeWithUiL(int)
-	?IsConnectedL@CCmDestinationImpl@@QBEHXZ @ 152 NONAME ; int CCmDestinationImpl::IsConnectedL(void) const
-	?IsConnectedL@RCmDestination@@QBEHXZ @ 153 NONAME ; int RCmDestination::IsConnectedL(void) const
-	?IsConnectedL@RCmDestinationExt@@QBEHXZ @ 154 NONAME ; int RCmDestinationExt::IsConnectedL(void) const
-	?IsHidden@CCmDestinationImpl@@QAEHXZ @ 155 NONAME ; int CCmDestinationImpl::IsHidden(void)
-	?IsHidden@RCmDestination@@QBEHXZ @ 156 NONAME ; int RCmDestination::IsHidden(void) const
-	?IsHidden@RCmDestinationExt@@QAEHXZ @ 157 NONAME ; int RCmDestinationExt::IsHidden(void)
-	?IsProtected@CCmPluginBaseEng@@QBEHXZ @ 158 NONAME ; int CCmPluginBaseEng::IsProtected(void) const
-	?IsUnspecifiedIPv4Address@@YAHABVTDesC16@@@Z @ 159 NONAME ; int IsUnspecifiedIPv4Address(class TDesC16 const &)
-	?LoadL@CCmPluginBaseEng@@UAEXK@Z @ 160 NONAME ; void CCmPluginBaseEng::LoadL(unsigned long)
-	?LoadResourceL@CmPluginBaseSettingsDlg@@IAEHABVTDesC16@@@Z @ 161 NONAME ; int CmPluginBaseSettingsDlg::LoadResourceL(class TDesC16 const &)
-	?LoadServiceSettingL@CCmPluginBaseEng@@MAEXXZ @ 162 NONAME ; void CCmPluginBaseEng::LoadServiceSettingL(void)
-	?LoadServiceSettingL@CCmPluginLanBase@@UAEXXZ @ 163 NONAME ; void CCmPluginLanBase::LoadServiceSettingL(void)
-	?MetadataL@RCmDestination@@QBEKW4TSnapMetadataField@CMManager@@@Z @ 164 NONAME ; unsigned long RCmDestination::MetadataL(enum CMManager::TSnapMetadataField) const
-	?MetadataL@RCmDestinationExt@@QBEKW4TSnapMetadataField@CMManager@@@Z @ 165 NONAME ; unsigned long RCmDestinationExt::MetadataL(enum CMManager::TSnapMetadataField) const
-	?ModifyPriorityL@RCmDestinationExt@@QAEXAAVRCmConnectionMethodExt@@I@Z @ 166 NONAME ; void RCmDestinationExt::ModifyPriorityL(class RCmConnectionMethodExt &, unsigned int)
-	?MoveConnectionMethodL@RCmManagerExt@@QAEHAAVRCmDestinationExt@@0AAVRCmConnectionMethodExt@@@Z @ 167 NONAME ; int RCmManagerExt::MoveConnectionMethodL(class RCmDestinationExt &, class RCmDestinationExt &, class RCmConnectionMethodExt &)
-	?NameLC@CCmDestinationImpl@@QAEPAVHBufC16@@XZ @ 168 NONAME ; class HBufC16 * CCmDestinationImpl::NameLC(void)
-	?NameLC@RCmDestination@@QBEPAVHBufC16@@XZ @ 169 NONAME ; class HBufC16 * RCmDestination::NameLC(void) const
-	?NameLC@RCmDestinationExt@@QAEPAVHBufC16@@XZ @ 170 NONAME ; class HBufC16 * RCmDestinationExt::NameLC(void)
-	?NewL@CCmApplicationSettingsUi@@SAPAV1@XZ @ 171 NONAME ; class CCmApplicationSettingsUi * CCmApplicationSettingsUi::NewL(void)
-	?NewL@CCmApplicationSettingsUiImpl@@SAPAV1@XZ @ 172 NONAME ; class CCmApplicationSettingsUiImpl * CCmApplicationSettingsUiImpl::NewL(void)
-	?NewL@CCmConnSettingsUiImpl@@SAPAV1@PAVCCmManagerImpl@@@Z @ 173 NONAME ; class CCmConnSettingsUiImpl * CCmConnSettingsUiImpl::NewL(class CCmManagerImpl *)
-	?NewL@CCmDestinationImpl@@SAPAV1@AAVCCmManagerImpl@@ABVTDesC16@@@Z @ 174 NONAME ; class CCmDestinationImpl * CCmDestinationImpl::NewL(class CCmManagerImpl &, class TDesC16 const &)
-	?NewL@CCmDestinationImpl@@SAPAV1@AAVCCmManagerImpl@@I@Z @ 175 NONAME ; class CCmDestinationImpl * CCmDestinationImpl::NewL(class CCmManagerImpl &, unsigned int)
-	?NewL@CCmPluginMultiLineDialog@@SAPAV1@AAVTDes16@@0W4TTone@CAknQueryDialog@@@Z @ 176 NONAME ; class CCmPluginMultiLineDialog * CCmPluginMultiLineDialog::NewL(class TDes16 &, class TDes16 &, enum CAknQueryDialog::TTone)
-	?NewL@CCmSettingsUi@@SAPAV1@XZ @ 177 NONAME ; class CCmSettingsUi * CCmSettingsUi::NewL(void)
-	?NewLC@CCmApplicationSettingsUi@@SAPAV1@XZ @ 178 NONAME ; class CCmApplicationSettingsUi * CCmApplicationSettingsUi::NewLC(void)
-	?NumOfConnMethodReferencesL@CCmPluginBaseEng@@UAEHXZ @ 179 NONAME ; int CCmPluginBaseEng::NumOfConnMethodReferencesL(void)
-	?OkToExitL@CmPluginBaseSettingsDlg@@MAEHH@Z @ 180 NONAME ; int CmPluginBaseSettingsDlg::OkToExitL(int)
-	?OpenL@RCmManager@@QAEXXZ @ 181 NONAME ; void RCmManager::OpenL(void)
-	?OpenL@RCmManagerExt@@QAEXXZ @ 182 NONAME ; void RCmManagerExt::OpenL(void)
-	?OpenLC@RCmManager@@QAEXXZ @ 183 NONAME ; void RCmManager::OpenLC(void)
-	?OpenLC@RCmManagerExt@@QAEXXZ @ 184 NONAME ; void RCmManagerExt::OpenLC(void)
-	?PreLayoutDynInitL@CmPluginBaseSettingsDlg@@MAEXXZ @ 185 NONAME ; void CmPluginBaseSettingsDlg::PreLayoutDynInitL(void)
-	?PrepareToLoadRecordsL@CCmPluginBaseEng@@MAEXXZ @ 186 NONAME ; void CCmPluginBaseEng::PrepareToLoadRecordsL(void)
-	?PrepareToUpdateRecordsL@CCmPluginBaseEng@@MAEXXZ @ 187 NONAME ; void CCmPluginBaseEng::PrepareToUpdateRecordsL(void)
-	?PrepareToUpdateRecordsL@CCmPluginLanBase@@UAEXXZ @ 188 NONAME ; void CCmPluginLanBase::PrepareToUpdateRecordsL(void)
-	?PriorityL@CCmDestinationImpl@@QAEIAAVCCmPluginBaseEng@@@Z @ 189 NONAME ABSENT ; unsigned int CCmDestinationImpl::PriorityL(class CCmPluginBaseEng &)
-	?PriorityL@RCmDestination@@QBEIABVRCmConnectionMethod@@@Z @ 190 NONAME ; unsigned int RCmDestination::PriorityL(class RCmConnectionMethod const &) const
-	?PriorityL@RCmDestinationExt@@QAEIABVRCmConnectionMethodExt@@@Z @ 191 NONAME ; unsigned int RCmDestinationExt::PriorityL(class RCmConnectionMethodExt const &)
-	?ProcessCommandL@CmPluginBaseSettingsDlg@@UAEXH@Z @ 192 NONAME ; void CmPluginBaseSettingsDlg::ProcessCommandL(int)
-	?ProtectionLevel@CCmDestinationImpl@@QAE?AW4TProtectionLevel@CMManager@@XZ @ 193 NONAME ; enum CMManager::TProtectionLevel CCmDestinationImpl::ProtectionLevel(void)
-	?ProtectionLevel@RCmDestination@@QBE?AW4TProtectionLevel@CMManager@@XZ @ 194 NONAME ; enum CMManager::TProtectionLevel RCmDestination::ProtectionLevel(void) const
-	?ProtectionLevel@RCmDestinationExt@@QAE?AW4TProtectionLevel@CMManager@@XZ @ 195 NONAME ; enum CMManager::TProtectionLevel RCmDestinationExt::ProtectionLevel(void)
-	?ReadDefConnL@RCmManager@@QAEXAAUTCmDefConnValue@@@Z @ 196 NONAME ; void RCmManager::ReadDefConnL(struct TCmDefConnValue &)
-	?ReadDefConnL@RCmManagerExt@@QAEXAAUTCmDefConnValue@@@Z @ 197 NONAME ; void RCmManagerExt::ReadDefConnL(struct TCmDefConnValue &)
-	?ReadOnlyAttributeL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 198 NONAME ; int ReadOnlyAttributeL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?RemoveAllReferencesL@RCmManagerExt@@QAEXAAVRCmConnectionMethodExt@@@Z @ 199 NONAME ; void RCmManagerExt::RemoveAllReferencesL(class RCmConnectionMethodExt &)
-	?RemoveCommonConversionTable@CCmPluginBaseEng@@IAEXPBUTCmCommonAttrConvArrayItem@@@Z @ 200 NONAME ; void CCmPluginBaseEng::RemoveCommonConversionTable(struct TCmCommonAttrConvArrayItem const *)
-	?RemoveConnectionMethodL@RCmDestinationExt@@QAEXVRCmConnectionMethodExt@@@Z @ 201 NONAME ; void RCmDestinationExt::RemoveConnectionMethodL(class RCmConnectionMethodExt)
-	?RemoveConnectionMethodL@RCmManagerExt@@QAEXAAVRCmDestinationExt@@AAVRCmConnectionMethodExt@@@Z @ 202 NONAME ; void RCmManagerExt::RemoveConnectionMethodL(class RCmDestinationExt &, class RCmConnectionMethodExt &)
-	?RemoveConversionTable@CCmPluginBaseEng@@IAEXPBUTCmAttribConvTable@@@Z @ 203 NONAME ; void CCmPluginBaseEng::RemoveConversionTable(struct TCmAttribConvTable const *)
-	?RemoveFromPool@CCmDestinationImpl@@QAEXXZ @ 204 NONAME ; void CCmDestinationImpl::RemoveFromPool(void)
-	?RemoveResourceFile@CCmPluginBaseEng@@IAEXABVTDesC16@@@Z @ 205 NONAME ; void CCmPluginBaseEng::RemoveResourceFile(class TDesC16 const &)
-	?Reset@CCmPluginBaseEng@@IAEXXZ @ 206 NONAME ; void CCmPluginBaseEng::Reset(void)
-	?RestoreAttributeL@CCmPluginBaseEng@@UAEXK@Z @ 207 NONAME ; void CCmPluginBaseEng::RestoreAttributeL(unsigned long)
-	?RunAdvancedSettingsL@CmPluginBaseSettingsDlgAdv@@UAEXXZ @ 208 NONAME ; void CmPluginBaseSettingsDlgAdv::RunAdvancedSettingsL(void)
-	?RunAdvancedSettingsL@CmPluginBaseSettingsDlgIp@@UAEXXZ @ 209 NONAME ; void CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL(void)
-	?RunApplicationSettingsL@CCmApplicationSettingsUi@@QAEHAAUTCmSettingSelection@@@Z @ 210 NONAME ; int CCmApplicationSettingsUi::RunApplicationSettingsL(struct TCmSettingSelection &)
-	?RunApplicationSettingsL@CCmApplicationSettingsUi@@QAEHAAUTCmSettingSelection@@IAAV?$RArray@K@@@Z @ 211 NONAME ; int CCmApplicationSettingsUi::RunApplicationSettingsL(struct TCmSettingSelection &, unsigned int, class RArray<unsigned long> &)
-	?RunApplicationSettingsL@CCmApplicationSettingsUiImpl@@QAEHAAUTCmSettingSelection@@@Z @ 212 NONAME ; int CCmApplicationSettingsUiImpl::RunApplicationSettingsL(struct TCmSettingSelection &)
-	?RunApplicationSettingsL@CCmConnSettingsUiImpl@@QAEHAAUTCmSettingSelection@@IAAV?$RArray@K@@@Z @ 213 NONAME ; int CCmConnSettingsUiImpl::RunApplicationSettingsL(struct TCmSettingSelection &, unsigned int, class RArray<unsigned long> &)
-	?RunSettingsL@CCmPluginLanBase@@UAEHXZ @ 214 NONAME ; int CCmPluginLanBase::RunSettingsL(void)
-	?RunSettingsL@CCmSettingsUi@@QAE?AW4TResult@1@XZ @ 215 NONAME ; enum CCmSettingsUi::TResult CCmSettingsUi::RunSettingsL(void)
-	?SelectDestinationDlgL@CCmSettingsUi@@QAEHAAK@Z @ 216 NONAME ; int CCmSettingsUi::SelectDestinationDlgL(unsigned long &)
-	?SelectItem@CmPluginBaseSettingsDlg@@IAEXH@Z @ 217 NONAME ; void CmPluginBaseSettingsDlg::SelectItem(int)
-	?ServiceRecord@CCmPluginLanBase@@ABEAAVCCDLANServiceRecord@CommsDat@@XZ @ 218 NONAME ; class CommsDat::CCDLANServiceRecord & CCmPluginLanBase::ServiceRecord(void) const
-	?ServiceRecordIdLC@CCmPluginLanBase@@MAEXAAPAVHBufC16@@AAK@Z @ 219 NONAME ; void CCmPluginLanBase::ServiceRecordIdLC(class HBufC16 * &, unsigned long &)
-	?Session@CCmPluginBaseEng@@QBEAAVCMDBSession@CommsDat@@XZ @ 220 NONAME ; class CommsDat::CMDBSession & CCmPluginBaseEng::Session(void) const
-	?SetBoolAttributeL@CCmPluginBaseEng@@UAEXKH@Z @ 221 NONAME ; void CCmPluginBaseEng::SetBoolAttributeL(unsigned long, int)
-	?SetBoolAttributeL@RCmConnectionMethodExt@@QAEXKH@Z @ 222 NONAME ; void RCmConnectionMethodExt::SetBoolAttributeL(unsigned long, int)
-	?SetDNSServerAddressL@CCmPluginBaseEng@@QAEXKABVTDesC16@@K0KH@Z @ 223 NONAME ; void CCmPluginBaseEng::SetDNSServerAddressL(unsigned long, class TDesC16 const &, unsigned long, class TDesC16 const &, unsigned long, int)
-	?SetHiddenL@CCmDestinationImpl@@QAEXH@Z @ 224 NONAME ; void CCmDestinationImpl::SetHiddenL(int)
-	?SetHiddenL@RCmDestinationExt@@QAEXH@Z @ 225 NONAME ; void RCmDestinationExt::SetHiddenL(int)
-	?SetIconL@CCmDestinationImpl@@QAEXK@Z @ 226 NONAME ; void CCmDestinationImpl::SetIconL(unsigned long)
-	?SetIconL@RCmDestinationExt@@QAEXK@Z @ 227 NONAME ; void RCmDestinationExt::SetIconL(unsigned long)
-	?SetIntAttributeL@CCmPluginBaseEng@@UAEXKK@Z @ 228 NONAME ; void CCmPluginBaseEng::SetIntAttributeL(unsigned long, unsigned long)
-	?SetIntAttributeL@RCmConnectionMethodExt@@QAEXKK@Z @ 229 NONAME ; void RCmConnectionMethodExt::SetIntAttributeL(unsigned long, unsigned long)
-	?SetMetadataL@RCmDestinationExt@@QAEXW4TSnapMetadataField@CMManager@@K@Z @ 230 NONAME ; void RCmDestinationExt::SetMetadataL(enum CMManager::TSnapMetadataField, unsigned long)
-	?SetNameL@CCmDestinationImpl@@QAEXABVTDesC16@@@Z @ 231 NONAME ; void CCmDestinationImpl::SetNameL(class TDesC16 const &)
-	?SetNameL@RCmDestinationExt@@QAEXABVTDesC16@@@Z @ 232 NONAME ; void RCmDestinationExt::SetNameL(class TDesC16 const &)
-	?SetProtectionL@CCmDestinationImpl@@QAEXW4TProtectionLevel@CMManager@@@Z @ 233 NONAME ; void CCmDestinationImpl::SetProtectionL(enum CMManager::TProtectionLevel)
-	?SetProtectionL@RCmDestinationExt@@QAEXW4TProtectionLevel@CMManager@@@Z @ 234 NONAME ; void RCmDestinationExt::SetProtectionL(enum CMManager::TProtectionLevel)
-	?SetProxyServerNameL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 235 NONAME ; int SetProxyServerNameL(class CCmPluginBaseEng *, unsigned long, void const *)
-	?SetString8AttributeL@CCmPluginBaseEng@@UAEXKABVTDesC8@@@Z @ 236 NONAME ; void CCmPluginBaseEng::SetString8AttributeL(unsigned long, class TDesC8 const &)
-	?SetString8AttributeL@RCmConnectionMethodExt@@QAEXKABVTDesC8@@@Z @ 237 NONAME ; void RCmConnectionMethodExt::SetString8AttributeL(unsigned long, class TDesC8 const &)
-	?SetStringAttributeL@CCmPluginBaseEng@@UAEXKABVTDesC16@@@Z @ 238 NONAME ; void CCmPluginBaseEng::SetStringAttributeL(unsigned long, class TDesC16 const &)
-	?SetStringAttributeL@RCmConnectionMethodExt@@QAEXKABVTDesC16@@@Z @ 239 NONAME ; void RCmConnectionMethodExt::SetStringAttributeL(unsigned long, class TDesC16 const &)
-	?ShowConfirmationQueryL@TCmCommonUi@@SAHH@Z @ 240 NONAME ; int TCmCommonUi::ShowConfirmationQueryL(int)
-	?ShowConfirmationQueryL@TCmCommonUi@@SAHHABVTDesC16@@@Z @ 241 NONAME ; int TCmCommonUi::ShowConfirmationQueryL(int, class TDesC16 const &)
-	?ShowConfirmationQueryWithInputL@TCmCommonUi@@SAHHAAVTDes16@@@Z @ 242 NONAME ; int TCmCommonUi::ShowConfirmationQueryWithInputL(int, class TDes16 &)
-	?ShowNoteL@TCmCommonUi@@SAHABVTDesC16@@W4TCmNoteType@1@@Z @ 243 NONAME ; int TCmCommonUi::ShowNoteL(class TDesC16 const &, enum TCmCommonUi::TCmNoteType)
-	?ShowNoteL@TCmCommonUi@@SAHHABVTDesC16@@W4TCmNoteType@1@@Z @ 244 NONAME ; int TCmCommonUi::ShowNoteL(int, class TDesC16 const &, enum TCmCommonUi::TCmNoteType)
-	?ShowNoteL@TCmCommonUi@@SAHHW4TCmNoteType@1@@Z @ 245 NONAME ; int TCmCommonUi::ShowNoteL(int, enum TCmCommonUi::TCmNoteType)
-	?ShowPopupIPv4DNSEditorL@CmPluginBaseSettingsDlg@@QAEHKKKK@Z @ 246 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupIPv4DNSEditorL(unsigned long, unsigned long, unsigned long, unsigned long)
-	?ShowPopupIPv6DNSEditorL@CmPluginBaseSettingsDlg@@QAEHPBKKKK@Z @ 247 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupIPv6DNSEditorL(unsigned long const *, unsigned long, unsigned long, unsigned long)
-	?ShowPopupIpSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 248 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupIpSettingPageL(unsigned long, unsigned long)
-	?ShowPopupListL@TCmCommonUi@@SAHABVTDesC16@@PAVCDesC16ArrayFlat@@PAV?$CArrayPtr@VCGulIcon@@@@IAAH@Z @ 249 NONAME ; int TCmCommonUi::ShowPopupListL(class TDesC16 const &, class CDesC16ArrayFlat *, class CArrayPtr<class CGulIcon> *, unsigned int, int &)
-	?ShowPopupPasswordSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 250 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupPasswordSettingPageL(unsigned long, unsigned long)
-	?ShowPopupPortNumSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 251 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupPortNumSettingPageL(unsigned long, unsigned long)
-	?ShowPopupSettingPageL@CmPluginBaseSettingsDlg@@MAEHKH@Z @ 252 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupSettingPageL(unsigned long, int)
-	?ShowPopupSettingPageL@CmPluginBaseSettingsDlgAdv@@MAEHHH@Z @ 253 NONAME ; int CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL(int, int)
-	?ShowPopupTextSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 254 NONAME ; int CmPluginBaseSettingsDlg::ShowPopupTextSettingPageL(unsigned long, unsigned long)
-	?ShowRadioButtonSettingPageL@CmPluginBaseSettingsDlg@@QAEHAAVCDesC16ArrayFlat@@AAHK@Z @ 255 NONAME ; int CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL(class CDesC16ArrayFlat &, int &, unsigned long)
-	?ShowRadioButtonSettingPageL@CmPluginBaseSettingsDlg@@QAEHPBKAAHK@Z @ 256 NONAME ; int CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL(unsigned long const *, int &, unsigned long)
-	?StringAttributeWithDefaultL@CmPluginBaseSettingsDlg@@IAEPAVHBufC16@@KK@Z @ 257 NONAME ; class HBufC16 * CmPluginBaseSettingsDlg::StringAttributeWithDefaultL(unsigned long, unsigned long)
-	?SupportedBearersL@RCmManagerExt@@QBEXAAV?$RArray@K@@@Z @ 258 NONAME ; void RCmManagerExt::SupportedBearersL(class RArray<unsigned long> &) const
-	?UncategorizedIconL@RCmManagerExt@@QBEPAVCGulIcon@@XZ @ 259 NONAME ; class CGulIcon * RCmManagerExt::UncategorizedIconL(void) const
-	?UpdateBearerPriorityArrayL@RCmManagerExt@@QAEXABV?$RArray@VTBearerPriority@@@@@Z @ 260 NONAME ; void RCmManagerExt::UpdateBearerPriorityArrayL(class RArray<class TBearerPriority> const &)
-	?UpdateL@CCmDestinationImpl@@QAEXXZ @ 261 NONAME ; void CCmDestinationImpl::UpdateL(void)
-	?UpdateL@CCmPluginBaseEng@@UAEXXZ @ 262 NONAME ; void CCmPluginBaseEng::UpdateL(void)
-	?UpdateL@RCmConnectionMethodExt@@QAEXXZ @ 263 NONAME ; void RCmConnectionMethodExt::UpdateL(void)
-	?UpdateL@RCmDestinationExt@@QAEXXZ @ 264 NONAME ; void RCmDestinationExt::UpdateL(void)
-	?UpdateListBoxContentL@CmPluginBaseSettingsDlg@@MAEXXZ @ 265 NONAME ; void CmPluginBaseSettingsDlg::UpdateListBoxContentL(void)
-	?UpdateListBoxContentL@CmPluginBaseSettingsDlgAdv@@MAEXXZ @ 266 NONAME ; void CmPluginBaseSettingsDlgAdv::UpdateListBoxContentL(void)
-	?UpdateListBoxContentL@CmPluginBaseSettingsDlgIp@@MAEXXZ @ 267 NONAME ; void CmPluginBaseSettingsDlgIp::UpdateListBoxContentL(void)
-	?UpdateProxyRecordL@CCmPluginBaseEng@@AAEXXZ @ 268 NONAME ABSENT ; void CCmPluginBaseEng::UpdateProxyRecordL(void)
-	?UpdateServiceRecordL@CCmPluginBaseEng@@MAEXXZ @ 269 NONAME ; void CCmPluginBaseEng::UpdateServiceRecordL(void)
-	?WriteDefConnL@RCmManagerExt@@QAEXABUTCmDefConnValue@@@Z @ 270 NONAME ; void RCmManagerExt::WriteDefConnL(struct TCmDefConnValue const &)
-	??0RCmDestination@@QAE@XZ @ 271 NONAME ; RCmDestination::RCmDestination(void)
-	??0RCmDestinationExt@@QAE@XZ @ 272 NONAME ; RCmDestinationExt::RCmDestinationExt(void)
-	??8RCmDestination@@QBEHABV0@@Z @ 273 NONAME ; int RCmDestination::operator==(class RCmDestination const &) const
-	??8RCmDestinationExt@@QBEHABV0@@Z @ 274 NONAME ; int RCmDestinationExt::operator==(class RCmDestinationExt const &) const
-	??9RCmDestination@@QBEHABV0@@Z @ 275 NONAME ; int RCmDestination::operator!=(class RCmDestination const &) const
-	??9RCmDestinationExt@@QBEHABV0@@Z @ 276 NONAME ; int RCmDestinationExt::operator!=(class RCmDestinationExt const &) const
-	??0CCmPluginBase@@QAE@PAVCCmPluginBaseEng@@@Z @ 277 NONAME ; CCmPluginBase::CCmPluginBase(class CCmPluginBaseEng *)
-	??1CCmPluginBase@@UAE@XZ @ 278 NONAME ; CCmPluginBase::~CCmPluginBase(void)
-	?AddResourceFileL@CCmPluginBase@@IAEXABVTDesC16@@@Z @ 279 NONAME ; void CCmPluginBase::AddResourceFileL(class TDesC16 const &)
-	?AllocReadL@CCmPluginBase@@IBEPAVHBufC16@@H@Z @ 280 NONAME ; class HBufC16 * CCmPluginBase::AllocReadL(int) const
-	?CmMgr@CCmPluginBase@@QBEAAVCCmManagerImpl@@XZ @ 281 NONAME ; class CCmManagerImpl & CCmPluginBase::CmMgr(void) const
-	?ConstructL@CCmPluginBase@@IAEXXZ @ 282 NONAME ; void CCmPluginBase::ConstructL(void)
-	?CreateCopyL@CCmPluginBase@@QBEPAV1@XZ @ 283 NONAME ; class CCmPluginBase * CCmPluginBase::CreateCopyL(void) const
-	?CreateNewL@CCmPluginBase@@QAEXXZ @ 284 NONAME ; void CCmPluginBase::CreateNewL(void)
-	?DeleteL@CCmPluginBase@@QAEHHH@Z @ 285 NONAME ; int CCmPluginBase::DeleteL(int, int)
-	?Destination@CCmPluginBase@@QBEPAVCCmDestinationImpl@@XZ @ 286 NONAME ; class CCmDestinationImpl * CCmPluginBase::Destination(void) const
-	?EnableChargeCardL@CCmPluginBase@@AAEXH@Z @ 287 NONAME ; void CCmPluginBase::EnableChargeCardL(int)
-	?EnableLocationL@CCmPluginBase@@AAEXH@Z @ 288 NONAME ; void CCmPluginBase::EnableLocationL(int)
-	?EnableProxyL@CCmPluginBase@@AAEXH@Z @ 289 NONAME ; void CCmPluginBase::EnableProxyL(int)
-	?GetBoolAttributeL@CCmPluginBase@@QBEHK@Z @ 290 NONAME ; int CCmPluginBase::GetBoolAttributeL(unsigned long) const
-	?GetConnectionMethodL@CCmDestinationImpl@@QAEPAVCCmPluginBase@@H@Z @ 291 NONAME ; class CCmPluginBase * CCmDestinationImpl::GetConnectionMethodL(int)
-	?GetConnectionMethodL@CCmManagerImpl@@QAEPAVCCmPluginBase@@K@Z @ 292 NONAME ; class CCmPluginBase * CCmManagerImpl::GetConnectionMethodL(unsigned long)
-	?GetIntAttributeL@CCmPluginBase@@QBEKK@Z @ 293 NONAME ; unsigned long CCmPluginBase::GetIntAttributeL(unsigned long) const
-	?GetString8AttributeL@CCmPluginBase@@QBEPAVHBufC8@@K@Z @ 294 NONAME ; class HBufC8 * CCmPluginBase::GetString8AttributeL(unsigned long) const
-	?GetStringAttributeL@CCmPluginBase@@QBEPAVHBufC16@@K@Z @ 295 NONAME ; class HBufC16 * CCmPluginBase::GetStringAttributeL(unsigned long) const
-	?IAPRecordElementId@CCmPluginBase@@QBEKXZ @ 296 NONAME ; unsigned long CCmPluginBase::IAPRecordElementId(void) const
-	?LoadL@CCmPluginBase@@QAEXK@Z @ 297 NONAME ; void CCmPluginBase::LoadL(unsigned long)
-	?LoadServiceSettingL@CCmPluginBase@@IAEXXZ @ 298 NONAME ; void CCmPluginBase::LoadServiceSettingL(void)
-	?NumOfConnMethodReferencesL@CCmPluginBase@@QAEHXZ @ 299 NONAME ; int CCmPluginBase::NumOfConnMethodReferencesL(void)
-	?ParentDestination@CCmPluginBase@@QBEPAVCCmDestinationImpl@@XZ @ 300 NONAME ; class CCmDestinationImpl * CCmPluginBase::ParentDestination(void) const
-	?Plugin@CCmPluginBase@@QBEPAVCCmPluginBaseEng@@XZ @ 301 NONAME ; class CCmPluginBaseEng * CCmPluginBase::Plugin(void) const
-	?PrepareToLoadRecordsL@CCmPluginBase@@IAEXXZ @ 302 NONAME ; void CCmPluginBase::PrepareToLoadRecordsL(void)
-	?PrepareToUpdateRecordsL@CCmPluginBase@@IAEXXZ @ 303 NONAME ; void CCmPluginBase::PrepareToUpdateRecordsL(void)
-	?RemoveResourceFile@CCmPluginBase@@IAEXABVTDesC16@@@Z @ 304 NONAME ; void CCmPluginBase::RemoveResourceFile(class TDesC16 const &)
-	?RestoreAttributeL@CCmPluginBase@@QAEXK@Z @ 305 NONAME ; void CCmPluginBase::RestoreAttributeL(unsigned long)
-	?Session@CCmPluginBase@@QBEAAVCMDBSession@CommsDat@@XZ @ 306 NONAME ; class CommsDat::CMDBSession & CCmPluginBase::Session(void) const
-	?SetBoolAttributeL@CCmPluginBase@@QAEXKH@Z @ 307 NONAME ; void CCmPluginBase::SetBoolAttributeL(unsigned long, int)
-	?SetIntAttributeL@CCmPluginBase@@QAEXKK@Z @ 308 NONAME ; void CCmPluginBase::SetIntAttributeL(unsigned long, unsigned long)
-	?SetString8AttributeL@CCmPluginBase@@QAEXKABVTDesC8@@@Z @ 309 NONAME ; void CCmPluginBase::SetString8AttributeL(unsigned long, class TDesC8 const &)
-	?SetStringAttributeL@CCmPluginBase@@QAEXKABVTDesC16@@@Z @ 310 NONAME ; void CCmPluginBase::SetStringAttributeL(unsigned long, class TDesC16 const &)
-	?UpdateL@CCmPluginBase@@QAEXXZ @ 311 NONAME ; void CCmPluginBase::UpdateL(void)
-	?UpdateProxyRecordL@CCmPluginBase@@AAEXXZ @ 312 NONAME ; void CCmPluginBase::UpdateProxyRecordL(void)
-	?UpdateServiceRecordL@CCmPluginBase@@IAEXXZ @ 313 NONAME ; void CCmPluginBase::UpdateServiceRecordL(void)
-	??0RCmConnectionMethod@@QAE@XZ @ 314 NONAME ; RCmConnectionMethod::RCmConnectionMethod(void)
-	??0RCmConnectionMethodExt@@QAE@XZ @ 315 NONAME ; RCmConnectionMethodExt::RCmConnectionMethodExt(void)
-	??4RCmConnectionMethod@@QAEAAV0@ABV0@@Z @ 316 NONAME ; class RCmConnectionMethod & RCmConnectionMethod::operator=(class RCmConnectionMethod const &)
-	??4RCmConnectionMethodExt@@QAEAAV0@ABV0@@Z @ 317 NONAME ; class RCmConnectionMethodExt & RCmConnectionMethodExt::operator=(class RCmConnectionMethodExt const &)
-	??8RCmConnectionMethod@@QBEHAAV0@@Z @ 318 NONAME ; int RCmConnectionMethod::operator==(class RCmConnectionMethod &) const
-	??8RCmConnectionMethodExt@@QBEHAAV0@@Z @ 319 NONAME ; int RCmConnectionMethodExt::operator==(class RCmConnectionMethodExt &) const
-	??9RCmConnectionMethod@@QBEHAAV0@@Z @ 320 NONAME ; int RCmConnectionMethod::operator!=(class RCmConnectionMethod &) const
-	??9RCmConnectionMethodExt@@QBEHAAV0@@Z @ 321 NONAME ; int RCmConnectionMethodExt::operator!=(class RCmConnectionMethodExt &) const
-	??1RCmConnectionMethod@@QAE@XZ @ 322 NONAME ; RCmConnectionMethod::~RCmConnectionMethod(void)
-	??1RCmConnectionMethodExt@@QAE@XZ @ 323 NONAME ; RCmConnectionMethodExt::~RCmConnectionMethodExt(void)
-	?ClearDestinationArrayToUse@CCmConnSettingsUiImpl@@QAEXXZ @ 324 NONAME ; void CCmConnSettingsUiImpl::ClearDestinationArrayToUse(void)
-	?SetDestinationArrayToUseL@CCmConnSettingsUiImpl@@QAEXV?$RArray@K@@@Z @ 325 NONAME ; void CCmConnSettingsUiImpl::SetDestinationArrayToUseL(class RArray<unsigned long>)
-	?GetAdditionalUids@CCmPluginBase@@QAEXAAV?$RArray@K@@@Z @ 326 NONAME ; void CCmPluginBase::GetAdditionalUids(class RArray<unsigned long> &)
-	?GetAdditionalUids@CCmPluginBaseEng@@UAEXAAV?$RArray@K@@@Z @ 327 NONAME ; void CCmPluginBaseEng::GetAdditionalUids(class RArray<unsigned long> &)
-	?WrapCmManager@CCmManagerImpl@@QAEXAAVRCmManagerExt@@@Z @ 328 NONAME ; void CCmManagerImpl::WrapCmManager(class RCmManagerExt &)
-	?CombineArraysForPriorityOrderL@CCmManagerImpl@@AAEXAAV?$RPointerArray@VCCmPluginBase@@@@0@Z @ 329 NONAME ; void CCmManagerImpl::CombineArraysForPriorityOrderL(class RPointerArray<class CCmPluginBase> &, class RPointerArray<class CCmPluginBase> &)
-	?CreateFlatCMListL@CCmManagerImpl@@QAEXKAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 330 NONAME ; void CCmManagerImpl::CreateFlatCMListL(unsigned long, class RPointerArray<class CCmPluginBase> &)
-	?FilterOutVirtualsL@CCmManagerImpl@@QAEXAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 331 NONAME ; void CCmManagerImpl::FilterOutVirtualsL(class RPointerArray<class CCmPluginBase> &)
-	?CreateFlatCMListLC@CCmManagerImpl@@QAEXKAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 332 NONAME ; void CCmManagerImpl::CreateFlatCMListLC(unsigned long, class RPointerArray<class CCmPluginBase> &)
-	??0RCmConnectionMethod@@QAE@ABV0@@Z @ 333 NONAME ; RCmConnectionMethod::RCmConnectionMethod(class RCmConnectionMethod const &)
-	??0RCmConnectionMethodExt@@QAE@ABV0@@Z @ 334 NONAME ; RCmConnectionMethodExt::RCmConnectionMethodExt(class RCmConnectionMethodExt const &)
-	?IsLinkedToIap@CCmPluginBase@@QAEHK@Z @ 335 NONAME ; int CCmPluginBase::IsLinkedToIap(unsigned long)
-	?IsLinkedToSnap@CCmPluginBase@@QAEHK@Z @ 336 NONAME ; int CCmPluginBase::IsLinkedToSnap(unsigned long)
-	?ParentDestination@CCmPluginBaseEng@@QBEPAVCCmDestinationImpl@@XZ @ 337 NONAME ; class CCmDestinationImpl * CCmPluginBaseEng::ParentDestination(void) const
-	?CreateTablesAndOpenL@RCmManagerExt@@QAEXXZ @ 338 NONAME ; void RCmManagerExt::CreateTablesAndOpenL(void)
-	?CreateConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@KK@Z @ 339 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(unsigned long, unsigned long)
-	?CreateConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@KK@Z @ 340 NONAME ; class RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(unsigned long, unsigned long)
-	?CreateDestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@ABVTDesC16@@K@Z @ 341 NONAME ; class RCmDestinationExt RCmManagerExt::CreateDestinationL(class TDesC16 const &, unsigned long)
-	?SetPreDefinedId@CCmPluginBaseEng@@QAEXK@Z @ 342 NONAME ; void CCmPluginBaseEng::SetPreDefinedId(unsigned long)
-	?HandleResourceChange@CmPluginBaseSettingsDlg@@UAEXH@Z @ 343 NONAME ; void CmPluginBaseSettingsDlg::HandleResourceChange(int)
-	?Execute@CmPluginBaseSettingsDlg@@UAEXXZ @ 344 NONAME ; void CmPluginBaseSettingsDlg::Execute(void)
-	?CheckSpaceBelowCriticalLevelL@CCmPluginBaseEng@@QBEHXZ @ 345 NONAME ; int CCmPluginBaseEng::CheckSpaceBelowCriticalLevelL(void) const
-	?HandleLeaveError@CmPluginBaseSettingsDlg@@UAEXH@Z @ 346 NONAME ; void CmPluginBaseSettingsDlg::HandleLeaveError(int)
-	?AddConnectionMethodL@RCmDestination@@QAEHVRCmConnectionMethod@@@Z @ 347 NONAME ; int RCmDestination::AddConnectionMethodL(class RCmConnectionMethod)
-	?AddEmbeddedDestinationL@RCmDestination@@QAEHABV1@@Z @ 348 NONAME ; int RCmDestination::AddEmbeddedDestinationL(class RCmDestination const &)
-	?CopyConnectionMethodL@RCmManager@@QAEHAAVRCmDestination@@AAVRCmConnectionMethod@@@Z @ 349 NONAME ; int RCmManager::CopyConnectionMethodL(class RCmDestination &, class RCmConnectionMethod &)
-	?CreateConnectionMethodL@RCmDestination@@QAE?AVRCmConnectionMethod@@K@Z @ 350 NONAME ; class RCmConnectionMethod RCmDestination::CreateConnectionMethodL(unsigned long)
-	?CreateConnectionMethodL@RCmDestination@@QAE?AVRCmConnectionMethod@@KK@Z @ 351 NONAME ; class RCmConnectionMethod RCmDestination::CreateConnectionMethodL(unsigned long, unsigned long)
-	?CreateConnectionMethodL@RCmManager@@QAE?AVRCmConnectionMethod@@K@Z @ 352 NONAME ; class RCmConnectionMethod RCmManager::CreateConnectionMethodL(unsigned long)
-	?CreateConnectionMethodL@RCmManager@@QAE?AVRCmConnectionMethod@@KK@Z @ 353 NONAME ; class RCmConnectionMethod RCmManager::CreateConnectionMethodL(unsigned long, unsigned long)
-	?CreateCopyL@RCmConnectionMethod@@QAE?AV1@XZ @ 354 NONAME ; class RCmConnectionMethod RCmConnectionMethod::CreateCopyL(void)
-	?CreateDestinationL@RCmManager@@QAE?AVRCmDestination@@ABVTDesC16@@@Z @ 355 NONAME ; class RCmDestination RCmManager::CreateDestinationL(class TDesC16 const &)
-	?CreateDestinationL@RCmManager@@QAE?AVRCmDestination@@ABVTDesC16@@K@Z @ 356 NONAME ; class RCmDestination RCmManager::CreateDestinationL(class TDesC16 const &, unsigned long)
-	?CreateTablesAndOpenL@RCmManager@@QAEXXZ @ 357 NONAME ; void RCmManager::CreateTablesAndOpenL(void)
-	?DeleteConnectionMethodL@RCmDestination@@QAEXAAVRCmConnectionMethod@@@Z @ 358 NONAME ; void RCmDestination::DeleteConnectionMethodL(class RCmConnectionMethod &)
-	?DeleteL@RCmConnectionMethod@@QAEHXZ @ 359 NONAME ; int RCmConnectionMethod::DeleteL(void)
-	?DeleteLD@RCmDestination@@QAEXXZ @ 360 NONAME ; void RCmDestination::DeleteLD(void)
-	?ModifyPriorityL@RCmDestination@@QAEXAAVRCmConnectionMethod@@I@Z @ 361 NONAME ; void RCmDestination::ModifyPriorityL(class RCmConnectionMethod &, unsigned int)
-	?MoveConnectionMethodL@RCmManager@@QAEHAAVRCmDestination@@0AAVRCmConnectionMethod@@@Z @ 362 NONAME ; int RCmManager::MoveConnectionMethodL(class RCmDestination &, class RCmDestination &, class RCmConnectionMethod &)
-	?RemoveAllReferencesL@RCmManager@@QAEXAAVRCmConnectionMethod@@@Z @ 363 NONAME ; void RCmManager::RemoveAllReferencesL(class RCmConnectionMethod &)
-	?RemoveConnectionMethodL@RCmDestination@@QAEXVRCmConnectionMethod@@@Z @ 364 NONAME ; void RCmDestination::RemoveConnectionMethodL(class RCmConnectionMethod)
-	?RemoveConnectionMethodL@RCmManager@@QAEXAAVRCmDestination@@AAVRCmConnectionMethod@@@Z @ 365 NONAME ; void RCmManager::RemoveConnectionMethodL(class RCmDestination &, class RCmConnectionMethod &)
-	?SetBoolAttributeL@RCmConnectionMethod@@QAEXKH@Z @ 366 NONAME ; void RCmConnectionMethod::SetBoolAttributeL(unsigned long, int)
-	?SetHiddenL@RCmDestination@@QAEXH@Z @ 367 NONAME ; void RCmDestination::SetHiddenL(int)
-	?SetIconL@RCmDestination@@QAEXK@Z @ 368 NONAME ; void RCmDestination::SetIconL(unsigned long)
-	?SetIntAttributeL@RCmConnectionMethod@@QAEXKK@Z @ 369 NONAME ; void RCmConnectionMethod::SetIntAttributeL(unsigned long, unsigned long)
-	?SetMetadataL@RCmDestination@@QAEXW4TSnapMetadataField@CMManager@@K@Z @ 370 NONAME ; void RCmDestination::SetMetadataL(enum CMManager::TSnapMetadataField, unsigned long)
-	?SetNameL@RCmDestination@@QAEXABVTDesC16@@@Z @ 371 NONAME ; void RCmDestination::SetNameL(class TDesC16 const &)
-	?SetProtectionL@RCmDestination@@QAEXW4TProtectionLevel@CMManager@@@Z @ 372 NONAME ; void RCmDestination::SetProtectionL(enum CMManager::TProtectionLevel)
-	?SetString8AttributeL@RCmConnectionMethod@@QAEXKABVTDesC8@@@Z @ 373 NONAME ; void RCmConnectionMethod::SetString8AttributeL(unsigned long, class TDesC8 const &)
-	?SetStringAttributeL@RCmConnectionMethod@@QAEXKABVTDesC16@@@Z @ 374 NONAME ; void RCmConnectionMethod::SetStringAttributeL(unsigned long, class TDesC16 const &)
-	?SupportedBearersL@RCmManager@@QBEXAAV?$RArray@K@@@Z @ 375 NONAME ; void RCmManager::SupportedBearersL(class RArray<unsigned long> &) const
-	?UncategorizedIconL@RCmManager@@QBEPAVCGulIcon@@XZ @ 376 NONAME ; class CGulIcon * RCmManager::UncategorizedIconL(void) const
-	?UpdateBearerPriorityArrayL@RCmManager@@QAEXABV?$RArray@VTBearerPriority@@@@@Z @ 377 NONAME ; void RCmManager::UpdateBearerPriorityArrayL(class RArray<class TBearerPriority> const &)
-	?UpdateL@RCmConnectionMethod@@QAEXXZ @ 378 NONAME ; void RCmConnectionMethod::UpdateL(void)
-	?UpdateL@RCmDestination@@QAEXXZ @ 379 NONAME ; void RCmDestination::UpdateL(void)
-	?WriteDefConnL@RCmManager@@QAEXABUTCmDefConnValue@@@Z @ 380 NONAME ; void RCmManager::WriteDefConnL(struct TCmDefConnValue const &)
-	?WriteGenConnSettingsL@RCmManager@@QAEXABUTCmGenConnSettings@@@Z @ 381 NONAME ; void RCmManager::WriteGenConnSettingsL(struct TCmGenConnSettings const &)
-	?ReadGenConnSettingsL@RCmManager@@QAEXAAUTCmGenConnSettings@@@Z @ 382 NONAME ; void RCmManager::ReadGenConnSettingsL(struct TCmGenConnSettings &)
-	?WatcherRegisterL@CCmManagerImpl@@QAEXPAVMCmCommsDatWatcher@@@Z @ 383 NONAME ; void CCmManagerImpl::WatcherRegisterL(class MCmCommsDatWatcher *)
-	?DestinationStillExistedL@CCmManagerImpl@@QAEHPAVCCmDestinationImpl@@@Z @ 384 NONAME ; int CCmManagerImpl::DestinationStillExistedL(class CCmDestinationImpl *)
-	?IsIapStillInDestL@CCmManagerImpl@@QAEHPAVCCmDestinationImpl@@ABVCCmPluginBaseEng@@@Z @ 385 NONAME ; int CCmManagerImpl::IsIapStillInDestL(class CCmDestinationImpl *, class CCmPluginBaseEng const &)
-	?IapStillExistedL@CCmManagerImpl@@QAEHABVCCmPluginBaseEng@@@Z @ 386 NONAME ; int CCmManagerImpl::IapStillExistedL(class CCmPluginBaseEng const &)
-	?WatcherUnRegister@CCmManagerImpl@@QAEXXZ @ 387 NONAME ; void CCmManagerImpl::WatcherUnRegister(void)
-	?RemoveDestFromPool@CCmManagerImpl@@QAEXPAVCCmDestinationImpl@@@Z @ 388 NONAME ; void CCmManagerImpl::RemoveDestFromPool(class CCmDestinationImpl *)
-	?OfferKeyEventL@CmPluginBaseSettingsDlg@@MAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 389 NONAME ; enum TKeyResponse CmPluginBaseSettingsDlg::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?AddCmL@CCmSettingsUi@@QAEKAAKK@Z @ 390 NONAME ; unsigned long CCmSettingsUi::AddCmL(unsigned long &, unsigned long)
-	?EditCmL@CCmSettingsUi@@QAE?AW4TResult@1@K@Z @ 391 NONAME ; enum CCmSettingsUi::TResult CCmSettingsUi::EditCmL(unsigned long)
-
--- a/cmmanager/cmmgr/Framework/EABI/CmManager_prot_setupU.def	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,440 +0,0 @@
-EXPORTS
-	_Z18CheckIPv4ValidityLP16CCmPluginBaseEngmPKv @ 1 NONAME
-	_Z18CheckIPv6ValidityLP16CCmPluginBaseEngmPKv @ 2 NONAME
-	_Z18ReadOnlyAttributeLP16CCmPluginBaseEngmPKv @ 3 NONAME
-	_Z19ClassifyIPv6AddressRK7TDesC16 @ 4 NONAME
-	_Z19SetProxyServerNameLP16CCmPluginBaseEngmPKv @ 5 NONAME
-	_Z22CheckRecordIdValidityLP16CCmPluginBaseEngmPKv @ 6 NONAME
-	_Z24CheckPortNumberValidityLP16CCmPluginBaseEngmPKv @ 7 NONAME
-	_Z24IsUnspecifiedIPv4AddressRK7TDesC16 @ 8 NONAME
-	_Z26CheckWAPWspOptionValidityLP16CCmPluginBaseEngmPKv @ 9 NONAME
-	_ZN10RCmManager12ReadDefConnLER15TCmDefConnValue @ 10 NONAME
-	_ZN10RCmManager5CloseEv @ 11 NONAME
-	_ZN10RCmManager5OpenLEv @ 12 NONAME
-	_ZN10RCmManager6OpenLCEv @ 13 NONAME
-	_ZN11TCmCommonUi14ShowPopupListLERK7TDesC16P16CDesC16ArrayFlatP9CArrayPtrI8CGulIconEjRi @ 14 NONAME
-	_ZN11TCmCommonUi22ShowConfirmationQueryLEi @ 15 NONAME
-	_ZN11TCmCommonUi22ShowConfirmationQueryLEiRK7TDesC16 @ 16 NONAME
-	_ZN11TCmCommonUi31ShowConfirmationQueryWithInputLEiR6TDes16 @ 17 NONAME
-	_ZN11TCmCommonUi9ShowNoteLERK7TDesC16NS_11TCmNoteTypeE @ 18 NONAME
-	_ZN11TCmCommonUi9ShowNoteLEiNS_11TCmNoteTypeE @ 19 NONAME
-	_ZN11TCmCommonUi9ShowNoteLEiRK7TDesC16NS_11TCmNoteTypeE @ 20 NONAME
-	_ZN13CCmSettingsUi12RunSettingsLEv @ 21 NONAME
-	_ZN13CCmSettingsUi21SelectDestinationDlgLERm @ 22 NONAME
-	_ZN13CCmSettingsUi4NewLEv @ 23 NONAME
-	_ZN13CCmSettingsUiD0Ev @ 24 NONAME
-	_ZN13CCmSettingsUiD1Ev @ 25 NONAME
-	_ZN13CCmSettingsUiD2Ev @ 26 NONAME
-	_ZN13RCmManagerExt11EasyWlanIdLEv @ 27 NONAME
-	_ZN13RCmManagerExt12DestinationLEm @ 28 NONAME
-	_ZN13RCmManagerExt12ReadDefConnLER15TCmDefConnValue @ 29 NONAME
-	_ZN13RCmManagerExt13WriteDefConnLERK15TCmDefConnValue @ 30 NONAME
-	_ZN13RCmManagerExt16AllDestinationsLER6RArrayImE @ 31 NONAME
-	_ZN13RCmManagerExt17ConnectionMethodLER6RArrayImEiii @ 32 NONAME
-	_ZN13RCmManagerExt17ConnectionMethodLEm @ 33 NONAME
-	_ZN13RCmManagerExt18CreateDestinationLERK7TDesC16 @ 34 NONAME
-	_ZN13RCmManagerExt20RemoveAllReferencesLER22RCmConnectionMethodExt @ 35 NONAME
-	_ZN13RCmManagerExt21CopyConnectionMethodLER17RCmDestinationExtR22RCmConnectionMethodExt @ 36 NONAME
-	_ZN13RCmManagerExt21MoveConnectionMethodLER17RCmDestinationExtS1_R22RCmConnectionMethodExt @ 37 NONAME
-	_ZN13RCmManagerExt23CreateConnectionMethodLEm @ 38 NONAME
-	_ZN13RCmManagerExt23RemoveConnectionMethodLER17RCmDestinationExtR22RCmConnectionMethodExt @ 39 NONAME
-	_ZN13RCmManagerExt26UpdateBearerPriorityArrayLERK6RArrayI15TBearerPriorityE @ 40 NONAME
-	_ZN13RCmManagerExt5CloseEv @ 41 NONAME
-	_ZN13RCmManagerExt5OpenLEv @ 42 NONAME
-	_ZN13RCmManagerExt6OpenLCEv @ 43 NONAME
-	_ZN14CCmManagerImpl11EasyWlanIdLEv @ 44 NONAME
-	_ZN14CCmManagerImpl12DestinationLEm @ 45 NONAME
-	_ZN14CCmManagerImpl16AllDestinationsLER6RArrayImE @ 46 NONAME
-	_ZN14CCmManagerImpl17ConnectionMethodLER6RArrayImEiiii @ 47 NONAME
-	_ZN14CCmManagerImpl17ConnectionMethodLEm @ 48 NONAME
-	_ZN14RCmDestination5CloseEv @ 49 NONAME
-	_ZN14RCmDestinationC1ERKS_ @ 50 NONAME
-	_ZN14RCmDestinationC2ERKS_ @ 51 NONAME
-	_ZN14RCmDestinationD1Ev @ 52 NONAME
-	_ZN14RCmDestinationD2Ev @ 53 NONAME
-	_ZN14RCmDestinationaSERKS_ @ 54 NONAME
-	_ZN16CCmPluginBaseEng10ConstructLEv @ 55 NONAME
-	_ZN16CCmPluginBaseEng10CreateNewLEv @ 56 NONAME
-	_ZN16CCmPluginBaseEng12EnableProxyLEi @ 57 NONAME ABSENT
-	_ZN16CCmPluginBaseEng13ConvTableItemEm @ 58 NONAME
-	_ZN16CCmPluginBaseEng15EnableLocationLEi @ 59 NONAME ABSENT
-	_ZN16CCmPluginBaseEng16AddResourceFileLERK7TDesC16 @ 60 NONAME
-	_ZN16CCmPluginBaseEng16FeatureSupportedEi @ 61 NONAME
-	_ZN16CCmPluginBaseEng16SetIntAttributeLEmm @ 62 NONAME
-	_ZN16CCmPluginBaseEng17EnableChargeCardLEi @ 63 NONAME ABSENT
-	_ZN16CCmPluginBaseEng17RestoreAttributeLEm @ 64 NONAME
-	_ZN16CCmPluginBaseEng17SetBoolAttributeLEmi @ 65 NONAME
-	_ZN16CCmPluginBaseEng18RemoveResourceFileERK7TDesC16 @ 66 NONAME
-	_ZN16CCmPluginBaseEng18UpdateProxyRecordLEv @ 67 NONAME ABSENT
-	_ZN16CCmPluginBaseEng19LoadServiceSettingLEv @ 68 NONAME
-	_ZN16CCmPluginBaseEng19SetStringAttributeLEmRK7TDesC16 @ 69 NONAME
-	_ZN16CCmPluginBaseEng20AddConverstionTableLEPPN8CommsDat13CCDRecordBaseEPiPK18TCmAttribConvTable @ 70 NONAME
-	_ZN16CCmPluginBaseEng20SetDNSServerAddressLEmRK7TDesC16mS2_mi @ 71 NONAME
-	_ZN16CCmPluginBaseEng20SetString8AttributeLEmRK6TDesC8 @ 72 NONAME
-	_ZN16CCmPluginBaseEng20UpdateServiceRecordLEv @ 73 NONAME
-	_ZN16CCmPluginBaseEng21PrepareToLoadRecordsLEv @ 74 NONAME
-	_ZN16CCmPluginBaseEng21RemoveConversionTableEPK18TCmAttribConvTable @ 75 NONAME
-	_ZN16CCmPluginBaseEng22CheckDNSServerAddressLEiRN8CommsDat9CMDBFieldI7TDesC16EES4_RNS1_IiEE @ 76 NONAME
-	_ZN16CCmPluginBaseEng23PrepareToUpdateRecordsLEv @ 77 NONAME
-	_ZN16CCmPluginBaseEng25AddCommonConversionTableLEPK26TCmCommonAttrConvArrayItem @ 78 NONAME
-	_ZN16CCmPluginBaseEng26NumOfConnMethodReferencesLEv @ 79 NONAME
-	_ZN16CCmPluginBaseEng27RemoveCommonConversionTableEPK26TCmCommonAttrConvArrayItem @ 80 NONAME
-	_ZN16CCmPluginBaseEng5LoadLEm @ 81 NONAME
-	_ZN16CCmPluginBaseEng5ResetEv @ 82 NONAME
-	_ZN16CCmPluginBaseEng7DeleteLEii @ 83 NONAME
-	_ZN16CCmPluginBaseEng7UpdateLEv @ 84 NONAME
-	_ZN16CCmPluginBaseEngC2EP18TCmPluginInitParam @ 85 NONAME
-	_ZN16CCmPluginBaseEngD0Ev @ 86 NONAME
-	_ZN16CCmPluginBaseEngD1Ev @ 87 NONAME
-	_ZN16CCmPluginBaseEngD2Ev @ 88 NONAME
-	_ZN16CCmPluginLanBase10ConstructLEv @ 89 NONAME
-	_ZN16CCmPluginLanBase12RunSettingsLEv @ 90 NONAME
-	_ZN16CCmPluginLanBase16BearerRecordIdLCERP7HBufC16Rm @ 91 NONAME
-	_ZN16CCmPluginLanBase17InitializeWithUiLEi @ 92 NONAME
-	_ZN16CCmPluginLanBase17ServiceRecordIdLCERP7HBufC16Rm @ 93 NONAME
-	_ZN16CCmPluginLanBase19LoadServiceSettingLEv @ 94 NONAME
-	_ZN16CCmPluginLanBase23CreateNewServiceRecordLEv @ 95 NONAME
-	_ZN16CCmPluginLanBase23PrepareToUpdateRecordsLEv @ 96 NONAME
-	_ZN16CCmPluginLanBaseC2EP18TCmPluginInitParam @ 97 NONAME
-	_ZN16CCmPluginLanBaseD0Ev @ 98 NONAME
-	_ZN16CCmPluginLanBaseD1Ev @ 99 NONAME
-	_ZN16CCmPluginLanBaseD2Ev @ 100 NONAME
-	_ZN17RCmDestinationExt10SetHiddenLEi @ 101 NONAME
-	_ZN17RCmDestinationExt12SetMetadataLEN9CMManager18TSnapMetadataFieldEm @ 102 NONAME
-	_ZN17RCmDestinationExt14SetProtectionLEN9CMManager16TProtectionLevelE @ 103 NONAME
-	_ZN17RCmDestinationExt15ModifyPriorityLER22RCmConnectionMethodExtj @ 104 NONAME
-	_ZN17RCmDestinationExt15ProtectionLevelEv @ 105 NONAME
-	_ZN17RCmDestinationExt17ConnectionMethodLEi @ 106 NONAME
-	_ZN17RCmDestinationExt20AddConnectionMethodLE22RCmConnectionMethodExt @ 107 NONAME
-	_ZN17RCmDestinationExt21ConnectionMethodByIDLEi @ 108 NONAME
-	_ZN17RCmDestinationExt21ConnectionMethodCountEv @ 109 NONAME
-	_ZN17RCmDestinationExt23AddEmbeddedDestinationLERKS_ @ 110 NONAME
-	_ZN17RCmDestinationExt23CreateConnectionMethodLEm @ 111 NONAME
-	_ZN17RCmDestinationExt23DeleteConnectionMethodLER22RCmConnectionMethodExt @ 112 NONAME
-	_ZN17RCmDestinationExt23RemoveConnectionMethodLE22RCmConnectionMethodExt @ 113 NONAME
-	_ZN17RCmDestinationExt2IdEv @ 114 NONAME
-	_ZN17RCmDestinationExt5CloseEv @ 115 NONAME
-	_ZN17RCmDestinationExt5IconLEv @ 116 NONAME
-	_ZN17RCmDestinationExt6NameLCEv @ 117 NONAME
-	_ZN17RCmDestinationExt7UpdateLEv @ 118 NONAME
-	_ZN17RCmDestinationExt8DeleteLDEv @ 119 NONAME
-	_ZN17RCmDestinationExt8IsHiddenEv @ 120 NONAME
-	_ZN17RCmDestinationExt8SetIconLEm @ 121 NONAME
-	_ZN17RCmDestinationExt8SetNameLERK7TDesC16 @ 122 NONAME
-	_ZN17RCmDestinationExt9ElementIdEv @ 123 NONAME
-	_ZN17RCmDestinationExt9PriorityLERK22RCmConnectionMethodExt @ 124 NONAME
-	_ZN17RCmDestinationExtC1ERKS_ @ 125 NONAME
-	_ZN17RCmDestinationExtC2ERKS_ @ 126 NONAME
-	_ZN17RCmDestinationExtD1Ev @ 127 NONAME
-	_ZN17RCmDestinationExtD2Ev @ 128 NONAME
-	_ZN17RCmDestinationExtaSERKS_ @ 129 NONAME
-	_ZN18CCmDestinationImpl10SetHiddenLEi @ 130 NONAME
-	_ZN18CCmDestinationImpl14RemoveFromPoolEv @ 131 NONAME
-	_ZN18CCmDestinationImpl14SetProtectionLEN9CMManager16TProtectionLevelE @ 132 NONAME
-	_ZN18CCmDestinationImpl15ProtectionLevelEv @ 133 NONAME
-	_ZN18CCmDestinationImpl17ConnectionMethodLEi @ 134 NONAME
-	_ZN18CCmDestinationImpl21ConnectionMethodCountEv @ 135 NONAME
-	_ZN18CCmDestinationImpl4NewLER14CCmManagerImplRK7TDesC16 @ 136 NONAME
-	_ZN18CCmDestinationImpl4NewLER14CCmManagerImplj @ 137 NONAME
-	_ZN18CCmDestinationImpl5IconLEv @ 138 NONAME
-	_ZN18CCmDestinationImpl6NameLCEv @ 139 NONAME
-	_ZN18CCmDestinationImpl7UpdateLEv @ 140 NONAME
-	_ZN18CCmDestinationImpl8DeleteLDEv @ 141 NONAME
-	_ZN18CCmDestinationImpl8IsHiddenEv @ 142 NONAME
-	_ZN18CCmDestinationImpl8SetNameLERK7TDesC16 @ 143 NONAME
-	_ZN18CCmDestinationImpl9PriorityLER16CCmPluginBaseEng @ 144 NONAME ABSENT
-	_ZN19RCmConnectionMethod5CloseEv @ 145 NONAME
-	_ZN21CCmConnSettingsUiImpl23RunApplicationSettingsLER19TCmSettingSelectionjR6RArrayImE @ 146 NONAME
-	_ZN21CCmConnSettingsUiImpl4NewLEP14CCmManagerImpl @ 147 NONAME
-	_ZN21CCmTransactionHandler5CloseEv @ 148 NONAME ABSENT
-	_ZN22RCmConnectionMethodExt11CreateCopyLEv @ 149 NONAME
-	_ZN22RCmConnectionMethodExt16SetIntAttributeLEmm @ 150 NONAME
-	_ZN22RCmConnectionMethodExt17SetBoolAttributeLEmi @ 151 NONAME
-	_ZN22RCmConnectionMethodExt19SetStringAttributeLEmRK7TDesC16 @ 152 NONAME
-	_ZN22RCmConnectionMethodExt20SetString8AttributeLEmRK6TDesC8 @ 153 NONAME
-	_ZN22RCmConnectionMethodExt5CloseEv @ 154 NONAME
-	_ZN22RCmConnectionMethodExt7DeleteLEv @ 155 NONAME
-	_ZN22RCmConnectionMethodExt7UpdateLEv @ 156 NONAME
-	_ZN23CmPluginBaseSettingsDlg10InitTextsLEv @ 157 NONAME
-	_ZN23CmPluginBaseSettingsDlg10SelectItemEi @ 158 NONAME
-	_ZN23CmPluginBaseSettingsDlg13LoadResourceLERK7TDesC16 @ 159 NONAME
-	_ZN23CmPluginBaseSettingsDlg15GetIPv6DNSTypeLEmm @ 160 NONAME
-	_ZN23CmPluginBaseSettingsDlg15ProcessCommandLEi @ 161 NONAME
-	_ZN23CmPluginBaseSettingsDlg16DynInitMenuPaneLEiP12CEikMenuPane @ 162 NONAME
-	_ZN23CmPluginBaseSettingsDlg17ConstructAndRunLDEv @ 163 NONAME
-	_ZN23CmPluginBaseSettingsDlg17PreLayoutDynInitLEv @ 164 NONAME
-	_ZN23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16ArrayiPK7HBufC16 @ 165 NONAME
-	_ZN23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16Arrayii @ 166 NONAME
-	_ZN23CmPluginBaseSettingsDlg19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 167 NONAME
-	_ZN23CmPluginBaseSettingsDlg21ShowPopupSettingPageLEmi @ 168 NONAME
-	_ZN23CmPluginBaseSettingsDlg21UpdateListBoxContentLEv @ 169 NONAME
-	_ZN23CmPluginBaseSettingsDlg23ShowPopupIPv4DNSEditorLEmmmm @ 170 NONAME
-	_ZN23CmPluginBaseSettingsDlg23ShowPopupIPv6DNSEditorLEPKmmmm @ 171 NONAME
-	_ZN23CmPluginBaseSettingsDlg23ShowPopupIpSettingPageLEmm @ 172 NONAME
-	_ZN23CmPluginBaseSettingsDlg24HandleListboxDataChangeLEv @ 173 NONAME
-	_ZN23CmPluginBaseSettingsDlg25ShowPopupTextSettingPageLEmm @ 174 NONAME
-	_ZN23CmPluginBaseSettingsDlg27ShowRadioButtonSettingPageLEPKmRim @ 175 NONAME
-	_ZN23CmPluginBaseSettingsDlg27ShowRadioButtonSettingPageLER16CDesC16ArrayFlatRim @ 176 NONAME
-	_ZN23CmPluginBaseSettingsDlg27StringAttributeWithDefaultLEmm @ 177 NONAME
-	_ZN23CmPluginBaseSettingsDlg28ShowPopupPortNumSettingPageLEmm @ 178 NONAME
-	_ZN23CmPluginBaseSettingsDlg29ShowPopupPasswordSettingPageLEmm @ 179 NONAME
-	_ZN23CmPluginBaseSettingsDlg9OkToExitLEi @ 180 NONAME
-	_ZN23CmPluginBaseSettingsDlgC2ER16CCmPluginBaseEng @ 181 NONAME
-	_ZN23CmPluginBaseSettingsDlgD0Ev @ 182 NONAME
-	_ZN23CmPluginBaseSettingsDlgD1Ev @ 183 NONAME
-	_ZN23CmPluginBaseSettingsDlgD2Ev @ 184 NONAME
-	_ZN24CCmApplicationSettingsUi23RunApplicationSettingsLER19TCmSettingSelection @ 185 NONAME
-	_ZN24CCmApplicationSettingsUi23RunApplicationSettingsLER19TCmSettingSelectionjR6RArrayImE @ 186 NONAME
-	_ZN24CCmApplicationSettingsUi4NewLEv @ 187 NONAME
-	_ZN24CCmApplicationSettingsUi5NewLCEv @ 188 NONAME
-	_ZN24CCmApplicationSettingsUiD0Ev @ 189 NONAME
-	_ZN24CCmApplicationSettingsUiD1Ev @ 190 NONAME
-	_ZN24CCmApplicationSettingsUiD2Ev @ 191 NONAME
-	_ZN24CCmPluginMultiLineDialog4NewLER6TDes16S1_N15CAknQueryDialog5TToneE @ 192 NONAME
-	_ZN25CmPluginBaseSettingsDlgIp16DynInitMenuPaneLEiP12CEikMenuPane @ 193 NONAME
-	_ZN25CmPluginBaseSettingsDlgIp20RunAdvancedSettingsLEv @ 194 NONAME
-	_ZN25CmPluginBaseSettingsDlgIp21UpdateListBoxContentLEv @ 195 NONAME
-	_ZN25CmPluginBaseSettingsDlgIpC1ER16CCmPluginBaseEng @ 196 NONAME
-	_ZN25CmPluginBaseSettingsDlgIpC2ER16CCmPluginBaseEng @ 197 NONAME
-	_ZN25CmPluginBaseSettingsDlgIpD0Ev @ 198 NONAME
-	_ZN25CmPluginBaseSettingsDlgIpD1Ev @ 199 NONAME
-	_ZN25CmPluginBaseSettingsDlgIpD2Ev @ 200 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdv16DynInitMenuPaneLEiP12CEikMenuPane @ 201 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdv20RunAdvancedSettingsLEv @ 202 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdv21ShowPopupSettingPageLEii @ 203 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdv21UpdateListBoxContentLEv @ 204 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdvC1ER16CCmPluginBaseEng @ 205 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdvC2ER16CCmPluginBaseEng @ 206 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdvD0Ev @ 207 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdvD1Ev @ 208 NONAME
-	_ZN26CmPluginBaseSettingsDlgAdvD2Ev @ 209 NONAME
-	_ZN28CCmApplicationSettingsUiImpl23RunApplicationSettingsLER19TCmSettingSelection @ 210 NONAME
-	_ZN28CCmApplicationSettingsUiImpl4NewLEv @ 211 NONAME
-	_ZNK10RCmManager11EasyWlanIdLEv @ 212 NONAME
-	_ZNK10RCmManager12DestinationLEm @ 213 NONAME
-	_ZNK10RCmManager16AllDestinationsLER6RArrayImE @ 214 NONAME
-	_ZNK10RCmManager17ConnectionMethodLER6RArrayImEiii @ 215 NONAME
-	_ZNK10RCmManager17ConnectionMethodLEm @ 216 NONAME
-	_ZNK10RCmManager17GetBearerInfoIntLEmm @ 217 NONAME
-	_ZNK10RCmManager18GetBearerInfoBoolLEmm @ 218 NONAME
-	_ZNK10RCmManager20BearerPriorityArrayLER6RArrayI15TBearerPriorityE @ 219 NONAME
-	_ZNK10RCmManager20GetBearerInfoStringLEmm @ 220 NONAME
-	_ZNK10RCmManager21GetBearerInfoString8LEmm @ 221 NONAME
-	_ZNK10RCmManager26CleanupGlobalPriorityArrayER6RArrayI15TBearerPriorityE @ 222 NONAME
-	_ZNK10RCmManager27GetConnectionMethodInfoIntLEmm @ 223 NONAME
-	_ZNK10RCmManager28GetConnectionMethodInfoBoolLEmm @ 224 NONAME
-	_ZNK10RCmManager30GetConnectionMethodInfoStringLEmm @ 225 NONAME
-	_ZNK10RCmManager31GetConnectionMethodInfoString8LEmm @ 226 NONAME
-	_ZNK13RCmManagerExt17GetBearerInfoIntLEmm @ 227 NONAME
-	_ZNK13RCmManagerExt17SupportedBearersLER6RArrayImE @ 228 NONAME
-	_ZNK13RCmManagerExt18GetBearerInfoBoolLEmm @ 229 NONAME
-	_ZNK13RCmManagerExt18UncategorizedIconLEv @ 230 NONAME
-	_ZNK13RCmManagerExt20BearerPriorityArrayLER6RArrayI15TBearerPriorityE @ 231 NONAME
-	_ZNK13RCmManagerExt20GetBearerInfoStringLEmm @ 232 NONAME
-	_ZNK13RCmManagerExt21GetBearerInfoString8LEmm @ 233 NONAME
-	_ZNK13RCmManagerExt26CleanupGlobalPriorityArrayER6RArrayI15TBearerPriorityE @ 234 NONAME
-	_ZNK13RCmManagerExt27GetConnectionMethodInfoIntLEmm @ 235 NONAME
-	_ZNK13RCmManagerExt28GetConnectionMethodInfoBoolLEmm @ 236 NONAME
-	_ZNK13RCmManagerExt30GetConnectionMethodInfoStringLEmm @ 237 NONAME
-	_ZNK13RCmManagerExt31GetConnectionMethodInfoString8LEmm @ 238 NONAME
-	_ZNK14CCmManagerImpl17GetBearerInfoIntLEmm @ 239 NONAME
-	_ZNK14CCmManagerImpl18GetBearerInfoBoolLEmm @ 240 NONAME
-	_ZNK14CCmManagerImpl20GetBearerInfoStringLEmm @ 241 NONAME
-	_ZNK14CCmManagerImpl21GetBearerInfoString8LEmm @ 242 NONAME
-	_ZNK14CCmManagerImpl27GetConnectionMethodInfoIntLEmm @ 243 NONAME
-	_ZNK14CCmManagerImpl28GetConnectionMethodInfoBoolLEmm @ 244 NONAME
-	_ZNK14CCmManagerImpl30GetConnectionMethodInfoStringLEmm @ 245 NONAME
-	_ZNK14CCmManagerImpl31GetConnectionMethodInfoString8LEmm @ 246 NONAME
-	_ZNK14RCmDestination12IsConnectedLEv @ 247 NONAME
-	_ZNK14RCmDestination15ProtectionLevelEv @ 248 NONAME
-	_ZNK14RCmDestination17ConnectionMethodLEi @ 249 NONAME
-	_ZNK14RCmDestination21ConnectionMethodByIDLEi @ 250 NONAME
-	_ZNK14RCmDestination21ConnectionMethodCountEv @ 251 NONAME
-	_ZNK14RCmDestination2IdEv @ 252 NONAME
-	_ZNK14RCmDestination5IconLEv @ 253 NONAME
-	_ZNK14RCmDestination6NameLCEv @ 254 NONAME
-	_ZNK14RCmDestination8IsHiddenEv @ 255 NONAME
-	_ZNK14RCmDestination9ElementIdEv @ 256 NONAME
-	_ZNK14RCmDestination9MetadataLEN9CMManager18TSnapMetadataFieldE @ 257 NONAME
-	_ZNK14RCmDestination9PriorityLERK19RCmConnectionMethod @ 258 NONAME
-	_ZNK16CCmPluginBaseEng10AllocReadLEi @ 259 NONAME
-	_ZNK16CCmPluginBaseEng11CreateCopyLEv @ 260 NONAME
-	_ZNK16CCmPluginBaseEng11DestinationEv @ 261 NONAME
-	_ZNK16CCmPluginBaseEng16GetIntAttributeLEm @ 262 NONAME
-	_ZNK16CCmPluginBaseEng17GetBoolAttributeLEm @ 263 NONAME
-	_ZNK16CCmPluginBaseEng19GetStringAttributeLEm @ 264 NONAME
-	_ZNK16CCmPluginBaseEng20CheckIfNameModifiedLEPN8CommsDat13CCDRecordBaseE @ 265 NONAME
-	_ZNK16CCmPluginBaseEng20GetString8AttributeLEm @ 266 NONAME
-	_ZNK16CCmPluginBaseEng20GlobalBearerPriorityERK7TDesC16 @ 267 NONAME
-	_ZNK16CCmPluginBaseEng22GlobalUiBearerPriorityERK7TDesC16 @ 268 NONAME
-	_ZNK16CCmPluginBaseEng23CheckIfAlreadyConnectedEv @ 269 NONAME
-	_ZNK16CCmPluginBaseEng7SessionEv @ 270 NONAME
-	_ZNK16CCmPluginLanBase13ServiceRecordEv @ 271 NONAME
-	_ZNK17RCmDestinationExt12IsConnectedLEv @ 272 NONAME
-	_ZNK17RCmDestinationExt9MetadataLEN9CMManager18TSnapMetadataFieldE @ 273 NONAME
-	_ZNK18CCmDestinationImpl12IsConnectedLEv @ 274 NONAME
-	_ZNK19RCmConnectionMethod12DestinationLEv @ 275 NONAME
-	_ZNK19RCmConnectionMethod16GetIntAttributeLEm @ 276 NONAME
-	_ZNK19RCmConnectionMethod17GetBoolAttributeLEm @ 277 NONAME
-	_ZNK19RCmConnectionMethod19GetStringAttributeLEm @ 278 NONAME
-	_ZNK19RCmConnectionMethod20GetString8AttributeLEm @ 279 NONAME
-	_ZNK22RCmConnectionMethodExt12DestinationLEv @ 280 NONAME
-	_ZNK22RCmConnectionMethodExt16GetIntAttributeLEm @ 281 NONAME
-	_ZNK22RCmConnectionMethodExt17GetBoolAttributeLEm @ 282 NONAME
-	_ZNK22RCmConnectionMethodExt19GetStringAttributeLEm @ 283 NONAME
-	_ZNK22RCmConnectionMethodExt20GetString8AttributeLEm @ 284 NONAME
-	_ZNK23CmPluginBaseSettingsDlg14GetHelpContextER15TCoeHelpContext @ 285 NONAME
-	_ZNK23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16ArrayiiRK7TDesC16i @ 286 NONAME
-	_ZNK23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16Arrayiiii @ 287 NONAME
-	_ZTI16CCmPluginBaseEng @ 288 NONAME ; #<TI>#
-	_ZTI16CCmPluginLanBase @ 289 NONAME ; #<TI>#
-	_ZTI23CmPluginBaseSettingsDlg @ 290 NONAME ; #<TI>#
-	_ZTI25CmPluginBaseSettingsDlgIp @ 291 NONAME ; #<TI>#
-	_ZTI26CmPluginBaseSettingsDlgAdv @ 292 NONAME ; #<TI>#
-	_ZTIN11TCmCommonUi12CCmDesCArrayE @ 293 NONAME ; #<TI>#
-	_ZTV16CCmPluginBaseEng @ 294 NONAME ; #<VT>#
-	_ZTV16CCmPluginLanBase @ 295 NONAME ; #<VT>#
-	_ZTV23CmPluginBaseSettingsDlg @ 296 NONAME ; #<VT>#
-	_ZTV25CmPluginBaseSettingsDlgIp @ 297 NONAME ; #<VT>#
-	_ZTV26CmPluginBaseSettingsDlgAdv @ 298 NONAME ; #<VT>#
-	_ZTVN11TCmCommonUi12CCmDesCArrayE @ 299 NONAME ; #<VT>#
-	_ZThn156_N23CmPluginBaseSettingsDlg15ProcessCommandLEi @ 300 NONAME ; #<thunk>#
-	_ZThn156_N23CmPluginBaseSettingsDlg16DynInitMenuPaneLEiP12CEikMenuPane @ 301 NONAME ; #<thunk>#
-	_ZThn156_N25CmPluginBaseSettingsDlgIp16DynInitMenuPaneLEiP12CEikMenuPane @ 302 NONAME ; #<thunk>#
-	_ZThn156_N26CmPluginBaseSettingsDlgAdv16DynInitMenuPaneLEiP12CEikMenuPane @ 303 NONAME ; #<thunk>#
-	_ZThn176_N23CmPluginBaseSettingsDlg19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 304 NONAME ; #<thunk>#
-	_ZN14RCmDestinationC1Ev @ 305 NONAME
-	_ZN14RCmDestinationC2Ev @ 306 NONAME
-	_ZN17RCmDestinationExtC1Ev @ 307 NONAME
-	_ZN17RCmDestinationExtC2Ev @ 308 NONAME
-	_ZNK14RCmDestinationeqERKS_ @ 309 NONAME
-	_ZNK14RCmDestinationneERKS_ @ 310 NONAME
-	_ZNK17RCmDestinationExteqERKS_ @ 311 NONAME
-	_ZNK17RCmDestinationExtneERKS_ @ 312 NONAME
-	_ZN13CCmPluginBase10ConstructLEv @ 313 NONAME
-	_ZN13CCmPluginBase10CreateNewLEv @ 314 NONAME
-	_ZN13CCmPluginBase12EnableProxyLEi @ 315 NONAME
-	_ZN13CCmPluginBase15EnableLocationLEi @ 316 NONAME
-	_ZN13CCmPluginBase16AddResourceFileLERK7TDesC16 @ 317 NONAME
-	_ZN13CCmPluginBase16SetIntAttributeLEmm @ 318 NONAME
-	_ZN13CCmPluginBase17EnableChargeCardLEi @ 319 NONAME
-	_ZN13CCmPluginBase17RestoreAttributeLEm @ 320 NONAME
-	_ZN13CCmPluginBase17SetBoolAttributeLEmi @ 321 NONAME
-	_ZN13CCmPluginBase18RemoveResourceFileERK7TDesC16 @ 322 NONAME
-	_ZN13CCmPluginBase18UpdateProxyRecordLEv @ 323 NONAME
-	_ZN13CCmPluginBase19LoadServiceSettingLEv @ 324 NONAME
-	_ZN13CCmPluginBase19SetStringAttributeLEmRK7TDesC16 @ 325 NONAME
-	_ZN13CCmPluginBase20SetString8AttributeLEmRK6TDesC8 @ 326 NONAME
-	_ZN13CCmPluginBase20UpdateServiceRecordLEv @ 327 NONAME
-	_ZN13CCmPluginBase21PrepareToLoadRecordsLEv @ 328 NONAME
-	_ZN13CCmPluginBase23PrepareToUpdateRecordsLEv @ 329 NONAME
-	_ZN13CCmPluginBase26NumOfConnMethodReferencesLEv @ 330 NONAME
-	_ZN13CCmPluginBase5LoadLEm @ 331 NONAME
-	_ZN13CCmPluginBase7DeleteLEii @ 332 NONAME
-	_ZN13CCmPluginBase7UpdateLEv @ 333 NONAME
-	_ZN13CCmPluginBaseC1EP16CCmPluginBaseEng @ 334 NONAME
-	_ZN13CCmPluginBaseC2EP16CCmPluginBaseEng @ 335 NONAME
-	_ZN13CCmPluginBaseD0Ev @ 336 NONAME
-	_ZN13CCmPluginBaseD1Ev @ 337 NONAME
-	_ZN13CCmPluginBaseD2Ev @ 338 NONAME
-	_ZN14CCmManagerImpl20GetConnectionMethodLEm @ 339 NONAME
-	_ZN18CCmDestinationImpl20GetConnectionMethodLEi @ 340 NONAME
-	_ZNK13CCmPluginBase10AllocReadLEi @ 341 NONAME
-	_ZNK13CCmPluginBase11CreateCopyLEv @ 342 NONAME
-	_ZNK13CCmPluginBase11DestinationEv @ 343 NONAME
-	_ZNK13CCmPluginBase16GetIntAttributeLEm @ 344 NONAME
-	_ZNK13CCmPluginBase17GetBoolAttributeLEm @ 345 NONAME
-	_ZNK13CCmPluginBase17ParentDestinationEv @ 346 NONAME
-	_ZNK13CCmPluginBase19GetStringAttributeLEm @ 347 NONAME
-	_ZNK13CCmPluginBase20GetString8AttributeLEm @ 348 NONAME
-	_ZNK13CCmPluginBase5CmMgrEv @ 349 NONAME
-	_ZNK13CCmPluginBase6PluginEv @ 350 NONAME
-	_ZNK13CCmPluginBase7SessionEv @ 351 NONAME
-	_ZTI13CCmPluginBase @ 352 NONAME ; #<TI>#
-	_ZTV13CCmPluginBase @ 353 NONAME ; #<VT>#
-	_ZN19RCmConnectionMethodC1Ev @ 354 NONAME
-	_ZN19RCmConnectionMethodC2Ev @ 355 NONAME
-	_ZN19RCmConnectionMethodaSERKS_ @ 356 NONAME
-	_ZN22RCmConnectionMethodExtC1Ev @ 357 NONAME
-	_ZN22RCmConnectionMethodExtC2Ev @ 358 NONAME
-	_ZN22RCmConnectionMethodExtaSERKS_ @ 359 NONAME
-	_ZNK19RCmConnectionMethodeqERS_ @ 360 NONAME
-	_ZNK19RCmConnectionMethodneERS_ @ 361 NONAME
-	_ZNK22RCmConnectionMethodExteqERS_ @ 362 NONAME
-	_ZNK22RCmConnectionMethodExtneERS_ @ 363 NONAME
-	_ZN19RCmConnectionMethodD1Ev @ 364 NONAME
-	_ZN19RCmConnectionMethodD2Ev @ 365 NONAME
-	_ZN22RCmConnectionMethodExtD1Ev @ 366 NONAME
-	_ZN22RCmConnectionMethodExtD2Ev @ 367 NONAME
-	_ZN21CCmConnSettingsUiImpl25SetDestinationArrayToUseLE6RArrayImE @ 368 NONAME
-	_ZN21CCmConnSettingsUiImpl26ClearDestinationArrayToUseEv @ 369 NONAME
-	_ZN13CCmPluginBase17GetAdditionalUidsER6RArrayImE @ 370 NONAME
-	_ZN14CCmManagerImpl13WrapCmManagerER13RCmManagerExt @ 371 NONAME
-	_ZN16CCmPluginBaseEng17GetAdditionalUidsER6RArrayImE @ 372 NONAME
-	_ZN14CCmManagerImpl17CreateFlatCMListLEmR13RPointerArrayI13CCmPluginBaseE @ 373 NONAME
-	_ZN14CCmManagerImpl18FilterOutVirtualsLER13RPointerArrayI13CCmPluginBaseE @ 374 NONAME
-	_ZN14CCmManagerImpl30CombineArraysForPriorityOrderLER13RPointerArrayI13CCmPluginBaseES3_ @ 375 NONAME
-	_ZN14CCmManagerImpl18CreateFlatCMListLCEmR13RPointerArrayI13CCmPluginBaseE @ 376 NONAME
-	_ZN19RCmConnectionMethodC1ERKS_ @ 377 NONAME
-	_ZN19RCmConnectionMethodC2ERKS_ @ 378 NONAME
-	_ZN22RCmConnectionMethodExtC1ERKS_ @ 379 NONAME
-	_ZN22RCmConnectionMethodExtC2ERKS_ @ 380 NONAME
-	_ZN13CCmPluginBase13IsLinkedToIapEm @ 381 NONAME
-	_ZN13CCmPluginBase14IsLinkedToSnapEm @ 382 NONAME
-	_ZNK16CCmPluginBaseEng17ParentDestinationEv @ 383 NONAME
-	_ZN13RCmManagerExt20CreateTablesAndOpenLEv @ 384 NONAME
-	_ZN13RCmManagerExt18CreateDestinationLERK7TDesC16m @ 385 NONAME
-	_ZN13RCmManagerExt23CreateConnectionMethodLEmm @ 386 NONAME
-	_ZN16CCmPluginBaseEng15SetPreDefinedIdEm @ 387 NONAME
-	_ZN17RCmDestinationExt23CreateConnectionMethodLEmm @ 388 NONAME
-	_ZN23CmPluginBaseSettingsDlg20HandleResourceChangeEi @ 389 NONAME
-	_ZN23CmPluginBaseSettingsDlg7ExecuteEv @ 390 NONAME
-	_ZThn180_N23CmPluginBaseSettingsDlg7ExecuteEv @ 391 NONAME ; #<thunk>#
-	_ZN23CmPluginBaseSettingsDlg16HandleLeaveErrorEi @ 392 NONAME
-	_ZThn180_N23CmPluginBaseSettingsDlg16HandleLeaveErrorEi @ 393 NONAME ; #<thunk>#
-	_ZN10RCmManager13WriteDefConnLERK15TCmDefConnValue @ 394 NONAME
-	_ZN10RCmManager18CreateDestinationLERK7TDesC16 @ 395 NONAME
-	_ZN10RCmManager18CreateDestinationLERK7TDesC16m @ 396 NONAME
-	_ZN10RCmManager20CreateTablesAndOpenLEv @ 397 NONAME
-	_ZN10RCmManager20RemoveAllReferencesLER19RCmConnectionMethod @ 398 NONAME
-	_ZN10RCmManager21CopyConnectionMethodLER14RCmDestinationR19RCmConnectionMethod @ 399 NONAME
-	_ZN10RCmManager21MoveConnectionMethodLER14RCmDestinationS1_R19RCmConnectionMethod @ 400 NONAME
-	_ZN10RCmManager23CreateConnectionMethodLEm @ 401 NONAME
-	_ZN10RCmManager23CreateConnectionMethodLEmm @ 402 NONAME
-	_ZN10RCmManager23RemoveConnectionMethodLER14RCmDestinationR19RCmConnectionMethod @ 403 NONAME
-	_ZN10RCmManager26UpdateBearerPriorityArrayLERK6RArrayI15TBearerPriorityE @ 404 NONAME
-	_ZN14RCmDestination10SetHiddenLEi @ 405 NONAME
-	_ZN14RCmDestination12SetMetadataLEN9CMManager18TSnapMetadataFieldEm @ 406 NONAME
-	_ZN14RCmDestination14SetProtectionLEN9CMManager16TProtectionLevelE @ 407 NONAME
-	_ZN14RCmDestination15ModifyPriorityLER19RCmConnectionMethodj @ 408 NONAME
-	_ZN14RCmDestination20AddConnectionMethodLE19RCmConnectionMethod @ 409 NONAME
-	_ZN14RCmDestination23AddEmbeddedDestinationLERKS_ @ 410 NONAME
-	_ZN14RCmDestination23CreateConnectionMethodLEm @ 411 NONAME
-	_ZN14RCmDestination23CreateConnectionMethodLEmm @ 412 NONAME
-	_ZN14RCmDestination23DeleteConnectionMethodLER19RCmConnectionMethod @ 413 NONAME
-	_ZN14RCmDestination23RemoveConnectionMethodLE19RCmConnectionMethod @ 414 NONAME
-	_ZN14RCmDestination7UpdateLEv @ 415 NONAME
-	_ZN14RCmDestination8DeleteLDEv @ 416 NONAME
-	_ZN14RCmDestination8SetIconLEm @ 417 NONAME
-	_ZN14RCmDestination8SetNameLERK7TDesC16 @ 418 NONAME
-	_ZN19RCmConnectionMethod11CreateCopyLEv @ 419 NONAME
-	_ZN19RCmConnectionMethod16SetIntAttributeLEmm @ 420 NONAME
-	_ZN19RCmConnectionMethod17SetBoolAttributeLEmi @ 421 NONAME
-	_ZN19RCmConnectionMethod19SetStringAttributeLEmRK7TDesC16 @ 422 NONAME
-	_ZN19RCmConnectionMethod20SetString8AttributeLEmRK6TDesC8 @ 423 NONAME
-	_ZN19RCmConnectionMethod7DeleteLEv @ 424 NONAME
-	_ZN19RCmConnectionMethod7UpdateLEv @ 425 NONAME
-	_ZNK10RCmManager17SupportedBearersLER6RArrayImE @ 426 NONAME
-	_ZNK10RCmManager18UncategorizedIconLEv @ 427 NONAME
-	_ZN10RCmManager20ReadGenConnSettingsLER18TCmGenConnSettings @ 428 NONAME
-	_ZN10RCmManager21WriteGenConnSettingsLERK18TCmGenConnSettings @ 429 NONAME
-	_ZN14CCmManagerImpl16IapStillExistedLERK16CCmPluginBaseEng @ 430 NONAME
-	_ZN14CCmManagerImpl16WatcherRegisterLEP18MCmCommsDatWatcher @ 431 NONAME
-	_ZN14CCmManagerImpl17IsIapStillInDestLEP18CCmDestinationImplRK16CCmPluginBaseEng @ 432 NONAME
-	_ZN14CCmManagerImpl17WatcherUnRegisterEv @ 433 NONAME
-	_ZN14CCmManagerImpl18RemoveDestFromPoolEP18CCmDestinationImpl @ 434 NONAME
-	_ZN14CCmManagerImpl24DestinationStillExistedLEP18CCmDestinationImpl @ 435 NONAME
-	_ZN23CmPluginBaseSettingsDlg14OfferKeyEventLERK9TKeyEvent10TEventCode @ 436 NONAME
-	_ZN13CCmSettingsUi6AddCmLERmm @ 437 NONAME
-	_ZN13CCmSettingsUi7EditCmLEm @ 438 NONAME
-
--- a/cmmanager/cmmgr/Framework/Group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build file for Connection Method Manager's framework.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export localised loc file
-../loc/cmmanager.loc             MW_LAYER_LOC_EXPORT_PATH(cmmanager.loc)
-../conf/cmmanager.confml         MW_LAYER_CONFML(cmmanager.confml)
-../conf/cmmanager_10207376.crml  MW_LAYER_CRML(cmmanager_10207376.crml)
-
-PRJ_MMPFILES
-cmmanager.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE cmmanager.mif
-OPTION HEADERFILE cmmanager.mbg
-OPTION SOURCES -c8,8 qgn_indi_sett_protected_add\
-               -c8,8 qgn_prop_set_conn_dest_add\
-               -c8,8 qgn_prop_set_conn_dest_internet\
-               -c8,8 qgn_prop_set_conn_dest_wap\
-               -c8,8 qgn_prop_set_conn_dest_mms\
-               -c8,8 qgn_prop_set_conn_dest_intranet\
-               -c8,8 qgn_prop_set_conn_dest_operator\
-               -c8,8 qgn_prop_set_conn_dest_icon1\
-               -c8,8 qgn_prop_set_conn_dest_icon2\
-               -c8,8 qgn_prop_set_conn_dest_icon3\
-               -c8,8 qgn_prop_set_conn_dest_icon4\
-               -c8,8 qgn_prop_set_conn_dest_icon5\
-               -c8,8 qgn_prop_set_conn_dest_icon6\
-               -c8,8 qgn_prop_set_conn_dest_default\
-               -c8,8 qgn_prop_set_conn_dest_uncategorized\
-               -c8,8 qgn_prop_set_conn_bearer_avail_wlan\
-               -c8,8 qgn_prop_set_conn_bearer_avail_packetdata\
-               -c8,8 qgn_prop_set_conn_wlan_easy\
-               -c8,8 qgn_prop_set_conn_dest_internet_small\
-               -c8,8 qgn_prop_set_conn_dest_wap_small\
-               -c8,8 qgn_prop_set_conn_dest_mms_small\
-               -c8,8 qgn_prop_set_conn_dest_intranet_small\
-               -c8,8 qgn_prop_set_conn_dest_operator_small\
-               -c8,8 qgn_prop_set_conn_dest_icon1_small\
-               -c8,8 qgn_prop_set_conn_dest_icon2_small\
-               -c8,8 qgn_prop_set_conn_dest_icon3_small\
-               -c8,8 qgn_prop_set_conn_dest_icon4_small\
-               -c8,8 qgn_prop_set_conn_dest_icon5_small\
-               -c8,8 qgn_prop_set_conn_dest_icon6_small\
-               -c8,8 qgn_prop_set_conn_dest_default_small\
-               -c8,8 qgn_indi_cb_hot_add\
-               -c8,8 qgn_indi_default_conn_add
-END
--- a/cmmanager/cmmgr/Framework/Group/cmmanager.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2006-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:  Makefile of Connection Method Manager's framework.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET        	cmmanager.dll
-TARGETTYPE    	dll
-UID           	0x1000008d 0x10207376
-CAPABILITY		CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH      ../Src
-
-SOURCE 			cmmanager.cpp
-SOURCE 			cmmanagerext.cpp
-SOURCE          cmmanagerimpl.cpp
-SOURCE 			cmdestination.cpp
-SOURCE          cmdestinationext.cpp
-SOURCE          cmdestinationimpl.cpp
-SOURCE 			ccmpluginbaseeng.cpp
-SOURCE 			cmpluginbase.cpp
-SOURCE 			cmsettingsui.cpp
-SOURCE 			cmapplicationsettingsui.cpp
-SOURCE 			cmapplicationsettingsuiimpl.cpp //just here to avoid bc break
-SOURCE 			cmsettingsuiimpl.cpp
-SOURCE 			cmconnsettingsuiimpl.cpp
-SOURCE          cmlogger.cpp
-SOURCE          destdlg.cpp
-SOURCE          destlistbox.cpp
-SOURCE          destlistboxmodel.cpp
-SOURCE          destlistitem.cpp
-SOURCE          destlistitemlist.cpp
-SOURCE          cmdlg.cpp
-SOURCE          cmlistbox.cpp
-SOURCE          cmlistboxmodel.cpp
-SOURCE          cmlistitem.cpp
-SOURCE          cmlistitemlist.cpp
-SOURCE          cmpbasesettingsdlg.cpp
-SOURCE          cmconnectionmethod.cpp
-SOURCE          cmconnectionmethodext.cpp
-SOURCE          cmcommonui.cpp
-SOURCE          cmwizard.cpp
-SOURCE 			cmconnselectrbpage.cpp
-SOURCE          cmconnectionmethodinfo.cpp
-SOURCE          cmtransactionhandler.cpp
-SOURCE          uncatdlg.cpp
-SOURCE          selectdestination.cpp
-SOURCE          cmdesticondialog.cpp
-SOURCE          cmdesticonmap.cpp
-SOURCE 			cmpluginlanbase.cpp
-SOURCE 			cmpbasesettingsdlgadv.cpp
-SOURCE 			cmpbasesettingsdlgip.cpp
-SOURCE 			cmpluginmultilinedialog.cpp
-SOURCE 			cmobjectpool.cpp
-SOURCE          ccmdexec.cpp
-SOURCE          cmcommsdatnotifier.cpp
-
-START RESOURCE ../SrcData/cmmanager.rss
-HEADER
-TARGETPATH   RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END  // RESOURCE
-
-USERINCLUDE		../SrcData
-USERINCLUDE		../../Plugins/cmpluginembdestination/inc    // cmpluginembdestinationdef.h
-
-// Component specific internal headers 
-USERINCLUDE			../Inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-APP_LAYER_SYSTEMINCLUDE
-#endif
-
-LIBRARY         hlplch.lib
-
-LIBRARY       	euser.lib
-LIBRARY         ECom.lib
-LIBRARY         COMMSDAT.lib
-LIBRARY         flogger.lib
-LIBRARY         FeatMgr.lib
-
-
-LIBRARY eikcore.lib egul.lib
-LIBRARY eikcoctl.lib avkon.lib eikdlg.lib
-LIBRARY eikctl.lib  cone.lib CommonEngine.lib
-LIBRARY bafl.lib fbscli.lib efsrv.lib CommonUI.LIB
-LIBRARY AknSkins.lib CdlEngine.lib
-LIBRARY ESock.lib
-LIBRARY AknLayout.lib
-LIBRARY AknLayout2.lib
-LIBRARY AknLayout2scalable.lib
-LIBRARY aknicon.lib
-LIBRARY ws32.lib
-LIBRARY cmmanagerdatabase.lib
-LIBRARY insock.lib
-LIBRARY sysutil.lib
-LIBRARY connectionuiutilities.lib
-LIBRARY touchfeedback.lib
-LIBRARY centralrepository.lib
-
-#if defined(ARMCC)
-    DEFFILE ../EABI/CmManager_prot_setup.def
-#elif defined( WINSCW )
-    DEFFILE ../BWinsCw/CmManager_prot_setup.DEF
-#elif defined( WINS )
-    DEFFILE ../BWins/CmManager_prot_setup.def
-#else
-    DEFFILE ../BMarm/CmManager_prot_setup.def
-#endif
--- a/cmmanager/cmmgr/Framework/Group/framework_icons.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-#
-# Copyright (c)  Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  icons makefile for project CMManager Framework
-#
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cmmanager.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cmmanager.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_indi_sett_protected_add.bmp\
-                /c8,8 qgn_prop_set_conn_dest_add.bmp\
-                /c8,8 qgn_prop_set_conn_dest_internet.bmp\
-                /c8,8 qgn_prop_set_conn_dest_wap.bmp\
-                /c8,8 qgn_prop_set_conn_dest_mms.bmp\
-                /c8,8 qgn_prop_set_conn_dest_intranet.bmp\
-                /c8,8 qgn_prop_set_conn_dest_operator.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon1.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon2.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon3.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon4.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon5.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon6.bmp\
-                /c8,8 qgn_prop_set_conn_dest_default.bmp\
-                /c8,8 qgn_prop_set_conn_dest_uncategorized.bmp\
-                /c8,8 qgn_prop_set_conn_bearer_avail_wlan.bmp\
-                /c8,8 qgn_prop_set_conn_bearer_avail_packetdata.bmp\
-                /c8,8 qgn_prop_set_conn_wlan_easy.bmp\
-                /c8,8 qgn_prop_set_conn_dest_internet_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_wap_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_mms_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_intranet_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_operator_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon1_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon2_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon3_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon4_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon5_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_icon6_small.bmp\
-                /c8,8 qgn_prop_set_conn_dest_default_small.bmp\
-                /c8,8 qgn_indi_cb_hot_add.bmp\
-                /c8,8 qgn_indi_default_conn_add.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cmmanager/cmmgr/Framework/Inc/ccmdexec.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Signaling class for destination edit.
-*
-*/
-
-
-#ifndef C_CCMDEXEC_H
-#define C_CCMDEXEC_H
-
-class MCmdExec;
-
-NONSHARABLE_CLASS(CCmdExec) : public CActive
-    {
-
-public:
-
-    /**
-    * Destructor.
-    */
-    virtual ~CCmdExec();
-    
-    void Execute();
-    
-// from base class CActive
-public:
-    virtual void RunL();
-
-    virtual TInt RunError( TInt /*aError*/ );
-
-    virtual void DoCancel();
-
-    CCmdExec(MCmdExec& aOwner);
-
-protected: // data
-
-    /**
-     * Owner
-     * Not own.
-     */
-    MCmdExec& iOwner;
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/cmapplicationsettingsuiimpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +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:  Declaration of application selection dialog
-*
-*/
-
-#ifndef C_CMAPLICATIONSETTINGSUIIMPL_H
-#define C_CMAPLICATIONSETTINGSUIIMPL_H
-
-#include <e32def.h>
-#include <e32base.h>
-#include <ConeResLoader.h>
-#include <badesca.h>    // CDesCArrayFlat
-#include "cmmanager.hrh"
-#include "cmapplicationsettingsui.h"
-
-class TCmSettingSelection;
-class CCmManagerImpl;
-class CCmDestinationImpl;
-
-
-//IMPLEMENTATION REMOVED!!!!
-//JUST HERE TO MANTAIN BC COMPATIBILITY!!!
-/**
- *  Implementation of application setting UI.
- *
- *  @lib cmmanage.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmApplicationSettingsUiImpl) : public CBase
-    {
-
-    public:
-
-        IMPORT_C static CCmApplicationSettingsUiImpl* NewL();
-
-
-    //=========================================================================    
-    // UI API
-    //
-    public:
-
-        /**
-        * Launches the 'easy to use' Settings UI provided for applications
-        * for handling Destinations and Connection Methods
-        * @since 3.1U
-        * @params aSelection User selection.
-        * @returns ETrue if a selection was made
-        */
-        TBool RunApplicationSettingsL( TCmSettingSelection& aSelection );
-
-
-        /**
-        * Enables/Disabled AlwaysAsk
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableAlwaysAsk( TBool aEnable ) 
-                                        { iShowAlwaysAsk = aEnable; }
-        
-        /**
-        * Enables/Disabled EasyWlan
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableEasyWlan( TBool aEnable )
-                                        { iShowEasyWlan = aEnable; }
-        
-        /**
-        * Enables/Disabled VirtualCMs
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableVirtualCMs( TBool aEnable )
-                                        { iShowVirtualCMs = aEnable; }
-        
-        /**
-        * Enables/Disabled EmptyDestinations
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableEmptyDestinations( TBool aEnable ) 
-                                        { iShowEmptyDestinations = aEnable; }
-                                        
-        /**
-        * Sets a destination id which should be omitted from the list
-        * typically this will be the parent destination of a virtual CM
-        * 
-        * @param aDestinationId
-        * @since S60 3.2
-        */
-        inline void SetDestinationToOmit( TUint32 aDestinationId )
-                                    { iDestinationToOmit = aDestinationId; }
-
-                         
-    private: // data
-
-        /**
-         * pointer to the CmManager - OWNED
-         */
-        CCmManagerImpl* iCmManagerImpl;
-        
-        /**
-         * resource loader
-         */
-        RConeResourceLoader iResourceReader;
-        
-        /**
-         * List of destination IDs to show
-         */ 
-        RArray<TUint32> iDestinations;
-                
-        /**
-         * Indicates whether Always Ask should be shown in the page
-         */
-        TBool iShowAlwaysAsk;
-        
-        /**
-         * Indicates whether EasyWlan should be shown in the page
-         */
-        TBool iShowEasyWlan;
-        
-        /**
-         * Indicates whether virtual iaps should be shown in the page
-         */
-        TBool iShowVirtualCMs;
-        
-        /**
-         * Indicates whether Empty destinations should be shown in the page
-         */
-        TBool iShowEmptyDestinations;
-        
-        /**
-         * Indicates the id of destination to specifically omit (usually a parent destination)
-         * if zero, it can be ignored
-         */
-        TUint iDestinationToOmit;
-    };
-
-#endif // C_CMAPLICATIONSETTINGSUIIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmcommsdatnotifier.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Listens for changes in one CommsDat table through CenRep.
-*
-*/
-
-#ifndef CMCOMMSDATNOTIFIER_H
-#define CMCOMMSDATNOTIFIER_H
-
-_LIT( KIapDisappear, "Iap disappears from CommsDat" );
-_LIT( KDestDisappear, "Destination disappears from CommsDat" );
-
-class CCmManagerImpl;
-class CRepository;
-class MCmCommsDatWatcher;
-
-// A stack to store watchers
-typedef CArrayPtrFlat<MCmCommsDatWatcher> CCmCallBackArray;
-
-// Used to notify parent view what happens during son's view editing.
-const TInt KCmNotifiedNone = 0;
-const TInt KCmNotifiedDestinationDisappear = 1;
-const TInt KCmNotifiedIapIsNotInThisDestination = 2;
-const TInt KCmNotifiedIapDisappear = 3;
-
-class MCmCommsDatWatcher
-    {
-public:
-    // watcher should implement this function to get the notification of CommsDat changes.
-    // see class CCmManagerImpl for watcher registration
-    virtual void CommsDatChangesL() = 0;
-    };
-
-// Used for son's watcher to notify parent watcher that CommsDat has changes
-// if farther watcher wants to know what heppens when son's watcher exiting
-class CCmParentViewNotifier
-    {
-public:
-    virtual void NotifyParentView( TInt aValue ) = 0;
-    };
-
-/*
- * CommsDat can suddenly change with some reasons, e.g., an application may suddenly add/delete a destination
- * and Iap. Those changes may affect CmManager. This class will listen to changes in one CommsDat table
- * through CenRep and inform related watcher that is interesting in CommsDat changes.
- */
-NONSHARABLE_CLASS( CCmCommsDatNotifier ) : public CActive
-    {
-public:
-
-    static CCmCommsDatNotifier* NewL( TUint32 aTableId );
-
-    static CCmCommsDatNotifier* NewLC( TUint32 aTableId );
-
-    virtual ~CCmCommsDatNotifier();
-    
-    void WatcherRegisterL( MCmCommsDatWatcher* aWatcher );
-    void WatcherUnRegister( );
-
-private:
-    CCmCommsDatNotifier( TUint32 aTableId );
-
-    void ConstructL();
-    TInt RequestNotifications();
-    
-    void DeleteCallBackArray();
-
-private: // Methods from base class
-    void DoCancel();
-    void RunL();
-
-private:
-    TUint32 iTableId;
-    CRepository* iRepository;
-    MCmCommsDatWatcher* iWatcher; // callback object that wants to see changes in CommsDat
-    CCmCallBackArray* iCallBackArray; // used as stack to go to the next view
-    };
-
-#endif // CMCOMMSDATNOTIFIER_H
-
-// End-of-file
--- a/cmmanager/cmmgr/Framework/Inc/cmconnectionmethodinfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +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:  Connection Method interface class.
-*
-*/
-
-#ifndef CMCONNECTIONMETHODINFO_H
-#define CMCONNECTIONMETHODINFO_H
-
-#include <cmpluginbaseeng.h>
-
-/**
- *  Acts as a connection method that has no bearer type.
- *  Client applications can query connection method, but non-bearer specific
- *  attributes by calling RCmManager/Ext::GetConnectionMethodInfoXXXL()
- *  functions.
- *  Modification and update of a connetion method is not supported.
- *  Common records of a connection method are loaded, and kept in memory
- *  as long as the client application queries attribute of another connection
- *  method.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmConnectionMethodInfo ) : public CCmPluginBaseEng
-    {
-    public:
-    
-        static CCmConnectionMethodInfo* NewL( TCmPluginInitParam *aInitParam );
-
-        static CCmConnectionMethodInfo* NewLC( TCmPluginInitParam *aInitParam );
-
-        virtual ~CCmConnectionMethodInfo();
-
-        virtual CCmPluginBaseEng* 
-                CreateInstanceL( TCmPluginInitParam& /*aInitParam*/ ) const;
-        virtual CCmPluginBaseEng* CreateCopyL() const;
-
-    public: // new functions
-    
-        virtual TUint32 GetConnectionInfoIntL( const TUint32 aIapId, 
-                                          const TUint32 aAttribute );
-                                          
-        virtual TBool GetConnectionInfoBoolL( const TUint32 aIapId, 
-                                         const TUint32 aAttribute );
-                                         
-        virtual HBufC* GetConnectionInfoStringL( const TUint32 aIapId, 
-                                            const TUint32 aAttribute );
-        
-        virtual HBufC8* GetConnectionInfoString8L( const TUint32 aIapId, 
-                                             const TUint32 aAttribute );
-        
-        virtual void AdditionalReset(){};
-
-        void ResetIfInMemory( CCmPluginBaseEng* aCM );
-
-    private: // from CCmPluginBaseEng
-    
-        virtual TInt RunSettingsL();
-        virtual TBool InitializeWithUiL( TBool aManuallyConfigure );
-        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        virtual TBool CanHandleIapIdL( CommsDat::CCDIAPRecord* aIapRecord ) const;
-        virtual void CopyAdditionalDataL( CCmPluginBaseEng* aDestInst );
-
-    private:
-    
-        virtual void ServiceRecordIdLC( HBufC* &aServiceName, 
-                                       TUint32& aRecordId );
-        virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                           TUint32& aRecordId );
-        virtual void CreateNewServiceRecordL();
-        
-        void ResetAndLoadL( TUint32 aIapId );
-        
-    private:
-
-        CCmConnectionMethodInfo( TCmPluginInitParam *aInitParam );
-
-        void ConstructL();
-
-    private:    // new functions
-    
-    private: // data
-    };
-
-
-#endif // CMCONNECTIONMETHODINFO_H
--- a/cmmanager/cmmgr/Framework/Inc/cmconnselectrbpage.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +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:  Dialog for setting the gateway. It's used temporarily.
-*
-*/
-
-#ifndef C_CMCONNSELECTRBPAGE_H
-#define C_CMCONNSELECTRBPAGE_H
-
-#include <aknradiobuttonsettingpage.h>
-#include <csxhelp/cp.hlp.hrh>
-#include <cmcommonconstants.h>
-
-#include "cmmanagerimpl.h"
-#include "cmconnsettingsuiimpl.h"
-
-/**
- * Application Settings UI radio button page
- *
- *  @lib cmmanager.lib
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS(CCMConnSelectRBPage) : public CAknRadioButtonSettingPage
-    {
-    
-   public: // construction/destruction
-    
-        /**
-         * Constructor
-         *
-         * @since S60 3.2
-         * @param aDialogResourceId resource id for the dialog
-         * @param aCurrentSelectionIndex the item to be highlighted
-         * @param aItemArray the items to be displayed
-         * @param aCmManagerImpl reference to the cm manager
-         * @param aSelectionMode the selected item type
-         * @param aHelpContext help context to use when Help menuitem is selected
-         */
-        CCMConnSelectRBPage( TInt aDialogResourceId,
-                          TInt& aCurrentSelectionIndex, 
-                          const MDesCArray* aItemArray, 
-                          CCmManagerImpl& aCmManagerImpl, 
-                          CMManager::TCmDCSettingSelectionMode& aSelectionMode,
-                          RArray<TUint32>& aDestinations,
-                          TBool areDestinations, 
-                          TBool aOpenDestination,
-                          TCoeContextName& aHelpContext );
-        
-        /**
-         * Destructor
-         */
-        ~CCMConnSelectRBPage();
-    
-    public: // derived functions
-    
-        /**
-        * From CCoeControl
-        *
-        * @since S60 3.2
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return key response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType );    
-        
-        /**
-        * Returns the help context
-        * From CCoeControl
-        * 
-        * @since S60 3.2
-        * @param aContext the returned help context
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-        /**
-        * Handle list box events
-        * From CCoeControl
-        * 
-        * @since S60 5.0
-        * @param aListBox Reference to list box object.
-        * @param aEventType Type of event.
-        */
-        void HandleListBoxEventL(CEikListBox* aListBox, MEikListBoxObserver::TListBoxEvent aEventType);
-		
-    private: // derived functions
-        
-        /*
-        * From CEikDialog
-        *
-        * @since S60 3.2
-        * @param aButtonId
-        */
-        TBool OkToExitL( TInt aButtonId );
-        
-        /*
-         * From MEikMenuObserver
-         *
-         * @since S60 3.2
-         * @param aResourceId
-         * @param aMenuPane
-         */
-        void DynInitMenuPaneL( TInt aResourceId,
-                               CEikMenuPane* aMenuPane );    
-        
-        /**
-        * From MEikCommandObserver
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        void ProcessCommandL( TInt aCommandId );
-
-    private: // data
-            
-        /**
-         * Resource id of the used dialog type
-         */
-		TInt iDialogResourceId;
-		
-        /**
-         * reference to the cm manager
-         */
-        CCmManagerImpl& iCmManagerImpl;
-        
-        /**
-         * The selection made by the user
-         */
-        CMManager::TCmDCSettingSelectionMode& iSelectionMode;
-        
-        /**
-         * A list of destination ids
-         */
-        RArray<TUint32>& iDestinations;
-        /**
-         * Indicates whether iDestinations holds destinatos or CMs
-         */
-        TBool iAreDestinations;
-        /**
-         * Indicates whether iDestinations should be openable
-         */
-        TBool iOpenDestination;
-        /**
-         * help context
-         */        
-        TCoeContextName iHelpContext;
-        /**
-         * Previously selected item
-         */
-        TInt iPrevItem;
-        /*
-         * pressing the enter key first time will be handled as an uparrow key        
-         */
-        TBool iFirstEnter;
-    };
-    
-#endif // C_CMAPPSETTRBPAGE_H
--- a/cmmanager/cmmgr/Framework/Inc/cmconnsettingsuiimpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,566 +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:  Declaration of application selection dialog
-*
-*/
-
-#ifndef C_CMCONNSETTINGSUIIMPL_H
-#define C_CMCONNSETTINGSUIIMPL_H
-
-#include <e32def.h>
-#include <e32base.h>
-#include <ConeResLoader.h>
-#include <badesca.h>    // CDesCArrayFlat
-#include <cmdefconnvalues.h>
-#include <hlplch.h>
-
-#include "cmmanager.hrh"
-#include "cmapplicationsettingsui.h"
-
-class TCmDCSettingSelection;
-class CCmManagerImpl;
-class CCmDestinationImpl;
-class CCmPluginBase;
-
-//CONSTS
-const TInt KCmDefConnIndex = 0;
-const TInt KCmUserDefinedIndex  = 1;
-
-namespace CMManager
-    {
-    enum TCmDCSettingSelectionMode
-        {
-        EDCAlwaysAsk,         /**<
-                            * The user selected Always Ask
-                            */
-        EDCAskOnce,         /**<
-                            * The user selected Ask Once
-                            */
-        EDCDestination,       /**<
-                            * The user selected a destination
-                            */
-        EDCConnectionMethod,   /**<
-                            * The user selected a connection method
-                            */
-        EDCDefaultConnection   /**<
-                            * The user selected a connection method
-                            */
-        };
-    } //namespace CmManager
-    
-/**
- * Stores the details of a setting selection
- *
- *  @since S60 3.2
- */
-NONSHARABLE_STRUCT( TCmDCSettingSelection ) //extended with Ask Once
-    {
-    /**
-    * Selection that the user made
-    */
-    CMManager::TCmDCSettingSelectionMode iResult;
-    
-    /**
-    * Id of the selected destination or connection method
-    */
-    TUint iId;
-    // -----------------------------------------------------------------------------
-    // TCmDCSettingSelection::operator==
-    // -----------------------------------------------------------------------------
-    //
-    inline TBool TCmDCSettingSelection::operator==( TCmDCSettingSelection& aDCSettingSelection ) const
-        {
-        return ( (iResult == aDCSettingSelection.iResult) && ( iId == aDCSettingSelection.iId ) );
-        };
-
-    // -----------------------------------------------------------------------------
-    // TCmDCSettingSelection::operator!=
-    // -----------------------------------------------------------------------------
-    //
-    inline TBool TCmDCSettingSelection::operator!=( TCmDCSettingSelection& aDCSettingSelection ) const
-        {
-        return (!( (iResult == aDCSettingSelection.iResult) && ( iId == aDCSettingSelection.iId ) ));
-        };    
-    // -----------------------------------------------------------------------------
-    // TCmDCSettingSelection::ConvertToDefConn
-    // -----------------------------------------------------------------------------
-    //
-    inline TCmDefConnValue TCmDCSettingSelection::ConvertToDefConn( ) const
-        {
-        TCmDefConnValue defConnValue;
-        defConnValue.iType = ECmDefConnAlwaysAsk;
-        defConnValue.iId = 0;
-        switch ( iResult )
-            {
-            case CMManager::EDCAlwaysAsk :       
-                {
-                defConnValue.iType = ECmDefConnAlwaysAsk;
-                break;
-                }
-            case CMManager::EDCAskOnce :   
-                {
-                defConnValue.iType = ECmDefConnAskOnce;
-                break;
-                }
-            case CMManager::EDCDestination :
-                {
-                defConnValue.iType = ECmDefConnDestination;
-                defConnValue.iId = iId;
-                break;
-                }
-            case CMManager::EDCConnectionMethod :
-                {
-                defConnValue.iType = ECmDefConnConnectionMethod;
-                defConnValue.iId = iId;
-                break;
-                }
-            case CMManager::EDCDefaultConnection : 
-                {
-                defConnValue.iType = ECmDefConnAlwaysAsk; //default value
-                break;
-                }
-            default:
-                {
-                defConnValue.iType = ECmDefConnAlwaysAsk; //default value
-                break;
-                }
-            };
-        return defConnValue; 
-        };
-     };    
-    
-
-        
-/**
- *  Implementation of application setting UI.
- *
- *  @lib cmmanage.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmConnSettingsUiImpl) : public CBase
-    {
-
-    public:
-
-        IMPORT_C static CCmConnSettingsUiImpl* NewL( CCmManagerImpl* aCCmManagerImpl = NULL );
-        static CCmConnSettingsUiImpl* NewWithoutTablesL();
-
-        virtual ~CCmConnSettingsUiImpl();
-
-    //=========================================================================    
-    // UI API
-    //
-    public:
-
-        /**
-        * Launches the 'easy to use' Settings UI provided for applications
-        * for handling Destinations and Connection Methods
-        *
-        * @since 3.2
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. If a list of Destinations is displayed, and
-        * the initial highlight is set to a Connection Method, the parent Destination
-        * gets highlighted. On return, holds user selection.
-        * @param aListItems A bit field which indicates which items shoud be
-        *                   shown in the selection dialog. The bitmasks are 
-        *                   defined in the TCmSelectionDialogItems enum.
-        *
-        * The function leaves with KErrNotSupported  if all the items which 
-        * were set to be shown are not supported/enabled. 
-        * E.g. Default Connection availability/support is controlled by the 
-        * Feature Manager so if only EShowDefaultConnection is set and the 
-        * Default Connection feature is not enabled than the function leaves
-        * with KErrNotSupported.
-        *
-        * In other cases (when an item or items are not supported/enabled but
-        * not all) the selected but not supported/enabled items are not added
-        * to the list. The request to show such an item is silently ignored.
-        *
-        *
-        * Special note about the EShowDestinations and EShowConnectionMethods
-        * bitmasks:      
-        *   The following enumerations controls how how destinations and 
-        *   Connection Methods are presented in the selection UI.
-        *   General rule about the EShowDestinations:
-        *     Destinations which does not contain any Connection Methods are 
-        *     not shown in the selection dialog. The same rule is applied if
-        *     the Destination containes Connection Methods but all of them 
-        *     are filtered out by the filtering criteria.
-        *   EShowDestinations is set and EShowConnectionMethods is set:
-        *     Destination list is added to the selection UI and a Connection
-        *     Method can be selected inside a Destination.
-        *   EShowDestinations is set and EShowConnectionMethods is not set:
-        *     Destination list is added to the selection UI and no Connection
-        *     Method can be selected inside a Destination. 
-        *   EShowDestinations is not set and EShowConnectionMethods is set:
-        *     Connection Method list is added to the selection UI. Connection
-        *     Methods are ordered according to the global bearer type 
-        *     priorities. Destination cannot be selected.
-        *   EShowDestinations is not set and EShowConnectionMethods is not set:
-        *     The selection UI will not contain any Destination or Connection 
-        *     Method. E.g. If EShowAlwaysAsk and EShowDefaultConnection was 
-        *     set then the selection UI will contain two entries (AlwaysAsk
-        *     and DefaultConnection).
-        *
-        * @param aFilterArray Only Connection Methods with bearer types from
-        *                     the aFilterArray will be showed. 
-        *                     All Connection Methods will be listed if the 
-        *                     array has no element.
-        * @return TBool seleceted or not.
-        *
-        * @leave KErrArgument If the selection dialog would have zero 
-        *                     elements based on the aListItems bitmask
-        *                     (aListItems is equal to zero). 
-        *
-        * @leave KErrNotSupported 
-        *                     If the selection dialog would have zero 
-        *                     elements based on the aListItems bitmask
-        *                     (all the selected elements in aListItems  
-        *	                  are not supported/disabled).
-        *                     E.g. aListItems = EShowDefaultConnection but 
-        *                     Default Connection feature is not enabled.
-        *
-        * @leave KErrNotFound If the selection dialog would have zero 
-        *                     elements caused by filtering out all the 
-        *                     Connection Methods with the aFilterArray
-        *                     and not requesting other list elements by 
-        *                     the aListItems bitfield than an error note
-        *                     is shown and the function call leaves with 
-        *                     KErrNotFound error code. 
-        *                     E.g. 
-        *                       - aListItems = EShowConnectionMethods
-        *                     but all Connection Methods are filtered 
-        *                     out by the aFilterArray.
-        */
-        IMPORT_C TBool RunApplicationSettingsL( 
-                                        TCmSettingSelection& aSelection, 
-                                        TUint aListItems,
-                                        TBearerFilterArray& aFilterArray);
-
-        /**
-        * Launches the Default Connection Radio Button Page
-        * for use in Destinations View
-        * @since 3.1U
-        * @params aSelection User selection.
-        * @returns ETrue if a selection was made
-        */
-        TBool RunDefaultConnecitonRBPageL ( TCmDCSettingSelection& aSelection );
-        
-        /**
-        * Creates and returns a string which contains the default connection name
-        * for use in Destinations View
-        * @since 3.1U
-        * @params aSelection User selection.
-        * @returns the default connection name
-        */        
-        HBufC* CreateDefaultConnectionNameL( TCmDefConnValue aSelection );
-        
-        /**
-        * Enables/Disables AlwaysAsk
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableAlwaysAsk( TBool aEnable ) 
-                                        { iShowAlwaysAsk = aEnable; }
-        
-        /**
-        * Enables/Disables EasyWlan
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableEasyWlan( TBool aEnable )
-                                        { iShowEasyWlan = aEnable; }
-        
-        /**
-        * Enables/Disables VirtualCMs
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableVirtualCMs( TBool aEnable )
-                                        { iShowVirtualCMs = aEnable; }
-        
-        /**
-        * Enables/Disables EmptyDestinations
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableEmptyDestinations( TBool aEnable ) 
-                                        { iShowEmptyDestinations = aEnable; }
-                                        
-        /**
-        * Sets a destination id which should be omitted from the list
-        * typically this will be the parent destination of a virtual CM
-        * 
-        * @param aDestinationId
-        * @since S60 3.2
-        */
-        inline void SetDestinationToOmit( TUint32 aDestinationId )
-                                    { iDestinationToOmit = aDestinationId; }
-        
-        /**
-        * Enables/Disables Ask Once
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableAskOnce( TBool aEnable ) 
-                                        { iShowAskOnce = aEnable; }
-                                        
-        /**
-        * Enables/Disables Uncategorised item
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableUncat( TBool aEnable ) 
-                                        { iShowUncat = aEnable; }
-                                        
-        /**
-        * Enables/Disables Default Connection item
-        * 
-        * @param ETrue enables
-        * @since S60 3.2
-        */
-        inline void EnableDefConn( TBool aEnable ) 
-                                        { iShowDefConn = aEnable; }
-
-
-
-        /**
-        * Sets the array of destinations to be used.
-        * Typically this routine will be used by plugins having 
-        * restrictions on possible destinations.
-        * 
-        * @param aDestinationArray
-        * @since S60 3.2
-        */
-        IMPORT_C void SetDestinationArrayToUseL( RArray<TUint32> aDestinationArray );
-
-        /**
-        * Clear previously passed destinations and return to normal use.
-        *
-        * @since S60 3.2
-        */
-        IMPORT_C void ClearDestinationArrayToUse();
-                                                
-    private:
-
-        CCmConnSettingsUiImpl();
-
-        void ConstructL( CCmManagerImpl* aCCmManagerImpl = NULL );
-
-        TInt LoadResourceL ();
-        
-        /**
-        * Displays a set of destinations for selecting a network connection
-        *
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. If a list of Destinations is displayed, and
-        * the initial highlight is set to a Connection Method, the parent Destination
-        * gets highlighted. On return, holds user selection.
-        * @return soft key selection
-        */
-        TBool ShowConnSelectRadioPageL( TCmDCSettingSelection& aSelection, 
-                        const TInt aTitleStringResource, 
-                        TBearerFilterArray& aFilterArray );
-
-        /**
-        * Displays a the Default Connection/User Defined radio button page 
-        *
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. If a list of Destinations is displayed, and
-        * the initial highlight is set to a Connection Method, the parent Destination
-        * gets highlighted. On return, holds user selection.
-        * @return soft key selection
-        */
-    //    TBool ShowDefConnRadioPageL( TInt& aSelection );
-
-        
-        /**
-        * Return array of destination of which have at least connection method
-        * @param aItems array of destination names
-        */
-        void BuildDestinationArrayL( CDesCArrayFlat* aItems, 
-                                        TBearerFilterArray& aFilterArray );
-
-        /**
-        * Return array of CMs of which have at least connection method
-        * @param aItems array of destination names
-        */
-        void BuildCMArrayL( CDesCArrayFlat* aItems, 
-                            TBearerFilterArray& aFilterArray );
-
-        /**
-        * Put the array of CMs into iConnMethods
-        */
-        void GetCMArrayL( );
-
-        /**
-        * Build uncategorized connection method array and append
-        * 'Uncategorized' item if there's any.
-        * @param aUncatArray array of uncategorized connection method ids.
-        * @param aItems array of destination names
-        */
-        void BuildUncatArrayL( RPointerArray<CCmPluginBase>& aUncatArray,
-                               CDesCArrayFlat* aItems, 
-                               TBearerFilterArray& aFilterArray );
-        /**
-        * Show destination selection dialog.
-        * @param aDestSelected index of selected destination
-        * @param aItems array of destination names
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. If a list of Destinations is displayed, and
-        * the initial highlight is set to a Connection Method, the parent Destination
-        * gets highlighted. On return, holds user selection.
-        * @return ETrue if a selection was made
-        */
-        TBool UserSelectionDlgL( TInt& aDestSelected, 
-                                 CDesCArrayFlat* aItems, 
-                                 TCmDCSettingSelection& aSelection,
-                                 const TInt aTitleStringResource,
-                                 TBool aOpenDestination );
-
-        /**
-        * Show uncategorized connection method selection dialog
-        * @param aUncatArray list of uncategorized connection methods.
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. On return, holds user selection.
-        * @return softkey selection.
-        */
-        TBool UserSelectedUncatItemL( RPointerArray<CCmPluginBase>& aUncatArray,
-                                      TCmDCSettingSelection& aSelection, 
-                                        const TInt aTitleStringResource );
-                                      
-        /**
-        * A radio button page of all the connection methods belonging to
-        * a the specified destination
-        *
-        * @param aDestinationId the destination from which a connection
-        *                       method will be selected
-        * @param aSelection If initialised to a valid value, sets the higlight to the
-        * corresponding list item at startup. On return, holds user selection.
-        * @return soft key selection
-        */
-        TBool ShowConnectionMethodsL( RPointerArray<CCmPluginBase>& aCmArray, 
-                                      TCmDCSettingSelection& aSelection, 
-                                      const TInt aTitleStringResource,
-                                      TBearerFilterArray& aFilterArray );
-
-        /**
-        * Checks if a Connection method is virtual
-        *
-        * @since S60 3.2
-        * @param aCmIapId the iap id of the CM
-        * @return ETrue if virtual
-        */
-        TBool IsCmVirtualL( TUint32 aCmIapId );
-                         
-    private: // data
-
-        /**
-         * pointer to the CmManager - OWNED
-         */
-        CCmManagerImpl* iCmManagerImpl;
-        
-        /**
-         * resource loader
-         */
-        RConeResourceLoader iResourceReader;
-        
-        /**
-         * List of destination or CM IDs to show
-         */ 
-        RArray<TUint32> iItems;
-        /**
-         * Indicates whether iItems holds destinatos or CMs
-         */
-        TBool iAreDestinations;
-                        
-        /**
-         * Indicates whether Always Ask should be shown in the page
-         */
-        TBool iShowAlwaysAsk;
-        
-        /**
-         * Indicates whether EasyWlan should be shown in the page
-         */
-        TBool iShowEasyWlan;
-        
-        /**
-         * Indicates whether virtual iaps should be shown in the page
-         */
-        TBool iShowVirtualCMs;
-        
-        /**
-         * Indicates whether Empty destinations should be shown in the page
-         */
-        TBool iShowEmptyDestinations;
-        
-        /**
-         * Indicates the id of destination to specifically omit (usually a parent destination)
-         * if zero, it can be ignored
-         */
-        TUint iDestinationToOmit;
-        
-        /**
-         * Indicates whether Ask Once item should be shown in the page
-         */
-        TBool iShowAskOnce;
-
-        /**
-         * Indicates whether Uncategorized item should be shown in the page
-         */
-        TBool iShowUncat;
-        
-        /**
-         * Indicates whether Default Connection item should be shown in the page
-         */
-        TBool iShowDefConn;
-                
-        /**
-         * Indicates whether we have an own CmManager that we have to create and destroy
-         */
-        TBool iOwnCmManager;
-
-        /**
-         * Indicates whether the selected destinaton should be opened
-         */
-        TBool iOpenDestination;
-        
-        /**
-        * Indicates whether to use a passed list of destinations 
-        * or use our own algorithm to get the list of possible destinations.
-        */
-        TBool iUsePassedDestinationArray;
-        
-        /**
-        * An Array to hold the passed destinations.
-        */
-        RArray<TUint32> iPassedDestinations;
-        
-        /**
-         * help context
-         */        
-        TCoeContextName iHelpContext;        
-
-        /**
-         * Indicates whether the tables should be created
-         */
-        TBool iCreateTables;
-    };
-#endif // C_CMCONNSETTINGSUIIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmdesticondialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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:  Destination icon dialog
-*
-*/
-
-#ifndef CMDESTICONDIALOG_H
-#define CMDESTICONDIALOG_H
-
-#include <AknDialog.h>// <eikdialg.h>
-
-/**
- * Change Icon table for destinations.Contains all the icon available
- */
-NONSHARABLE_CLASS(CCmDestinationIconDialog) : public CAknDialog
-    {
-    public:
-
-        /**
-        * Destinations change Icon table constructor. 
-        *
-        * @param aIconIndex selected icon index. 
-        *
-        */
-        CCmDestinationIconDialog( TInt& aIconIndex );
-
-        /**
-        * Destinations change Icon table destructor. 
-        * C++ destructor
-        */
-        ~CCmDestinationIconDialog();
-
-    public: // from CEikDialog
-
-        /**
-        * Prepares and runs the dialog and returns the id of the button used to 
-        * dismiss it. The dialog is constructed from the resource with id 
-        * aResourceId and is destroyed on exit.
-        *
-        * @return Id of the button used to dismiss dialog.
-        */
-        TInt ExecuteLD();
-        
-#ifdef RD_SCALABLE_UI_V2
-
-	    //From MCoeControlObserver
-	    void HandleControlEventL( CCoeControl* aControl,
-	                              TCoeEvent aEventType );
-	    void HandleDialogPageEventL( TInt aEventID );
-	    
-#endif // RD_SCALABLE_UI_V2 	
-
-    public: // from CCoeControl
-
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                      TEventCode /*aType*/ );
-        void HandleResourceChange(TInt aType);
-        SEikControlInfo CreateCustomControlL(TInt aControlType);
-
-    protected: // from CEikDialog
-    
-         virtual TBool OkToExitL(TInt);
-         virtual void PreLayoutDynInitL();
-         virtual void SetSizeAndPosition(const TSize& aSize);
-
-    private: 
-
-         virtual void CEikDialog_Reserved_1();
-         virtual void CEikDialog_Reserved_2();
-
-    private: // new function
-    
-         virtual void CAknIconMapDialog_Reserved();
-
-    private:
-    
-        TInt* iIconIndex;
-
-#ifdef RD_SCALABLE_UI_V2     
-
-    	TBool iConSelected;
-
-#endif // RD_SCALABLE_UI_V2  
-    };
-
-#endif  // LMKICONDIALOG_H
--- a/cmmanager/cmmgr/Framework/Inc/cmdesticonmap.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +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:  Destination icon map
-*
-*/
-
-#ifndef CMDESTICONMAP_H
-#define CMDESTICONMAP_H
-
-#include <coecntrl.h>
-#include <AknUtils.h>
-#include <gulicon.h>
-#include <AknIconArray.h>
-
-
-class CCmDestinationIconMapExtension;
-class CEikScrollBarFrame;
-class CCmDestinationIconMapExtension;
-
-
-/**
- * Change Icon Dialog table Destination UI.
- *
- */
-NONSHARABLE_CLASS(CCmDestinationIconMap) : public CCoeControl
-                                         , public MEikScrollBarObserver
-    {
-    public: 
-        
-        /** 
-        * CCmDestinationIconMap two phase constructor
-        */
-        static CCmDestinationIconMap* NewL();    
-        
-        /** 
-        * CCmDestinationIconMap destructor
-        */
-         ~CCmDestinationIconMap();
-        
-        /** 
-        * CCmDestinationIconMap resource constructor.
-        * @param aReader Icon Dialog table Resource
-        */
-         void ConstructFromResourceL( TResourceReader& aReader );
-
-        /**
-        * Number of rows in the icon table.
-        * @return Number of rows in icon table.
-        */
-         TInt HeightInRows();
-        
-        /**
-        * Create the scrollbar Ptr and set the No of Rows in the 
-        * Icon table depends upon the Icon array count.
-        */
-         void CreateScrollBarAndIconRowL();
-        
-        /**
-        * Sets reference to the index where selected icon index is put.
-        * @param aIconIndex Reference to the integer where selected icon 
-        * index is put.
-        */
-         void SetIndex(TInt& aIconIndex);
-
-    private:
-    
-        /** 
-        * CCmDestinationIconMap constructor
-        */
-         CCmDestinationIconMap();
-
-        /** 
-        * CCmDestinationIconMap two phase constructor
-        */
-        void ConstructL();
-        
-    public: // from CCoeControl
-    
-         TSize MinimumSize();
-         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
-         TCoeInputCapabilities InputCapabilities() const;
-         virtual void ActivateL();
-
-#ifdef RD_SCALABLE_UI_V2
-
- 	    void HandlePointerEventL( const TPointerEvent& aPointerEvent );
- 	    void SetObserver( MCoeControlObserver* aObserver  );
- 	    
-#endif //RD_SCALABLE_UI_V2
-
-    protected: // from CCoeControl
-    
-         void SizeChanged();
-         void HandleResourceChange(TInt aType);
-         TInt CountComponentControls() const;
-         CCoeControl* ComponentControl(TInt aIndex) const;
-
-    public: 
-
-        /**
-        * DrawOffscreenBackgroundIfRequired().
-        *
-        * @Description:Draw the offscreen bitmap if applicable.
-        *              Specially in case of Skin change
-        */
-        void DrawOffscreenBackgroundIfRequired() const;
-
-        /**
-        * DoLayout()
-        * @Description: Sets the Layout of the Icon table.
-        */
-        void DoLayout();
-
-    private:
-    
-        /**
-        * Draw().
-        *
-        * @Description:
-        */
-        void Draw(const TRect& aRect) const;
-
-        /**
-        * DrawItem().
-        *
-        * @Description:
-        */
-        void DrawItem( CWindowGc& aGc,
-                       TInt index,
-                       TInt aIconIndex,
-                       TBool aHighlighted,
-                       TBool aDrawBackground ) const;
-
-        /**
-        * DrawCursor().
-        *
-        * @Description:
-        */
-        void DrawCursor() const;
-        
-        /**
-        * MoveCursorL().
-        *
-        * @Description:
-        */
-        void MoveCursorL( TInt aX, TInt aY );
-
-        /**
-        * DrawCell().
-        *
-        * @Description:
-        */
-        void DrawCell( TInt aCursorPos, TBool aHighLighted ) const;
-        
-        /**
-        * CursorRect().
-        *
-        * @Description:
-        */
-        TRect CursorRect( TInt aCursorPos ) const;
-        
-        /**
-        * CursorPoint().
-        *
-        * @Description:
-        */
-        TPoint CursorPoint( TInt aCursorPos ) const;
-
-        /**
-        * UpdateScrollIndicatorL().
-        *
-        * @Description:
-        */
-        void UpdateScrollIndicatorL();
-
-        /**
-        * CountMaxColumnsAndCellSizes().
-        *
-        * @Description:
-        */
-        void CountMaxColumnsAndCellSizes();
-
-        /**
-        * LoadIconL().
-        * This fucton leaves if the client does not have a valid UI context
-        *
-        * @Description:
-        */
-        void LoadIconL();
-
-        /**
-        * Extension().
-        *
-        * @Description:
-        */
-        CCmDestinationIconMapExtension* Extension() const;        
-     
-    private: //from CCoeContrl
-
-        void Reserved_1();
-        void Reserved_2();
-        
-    public:
-
-        void HandleScrollEventL( CEikScrollBar* aScrollBar, 
-                                 TEikScrollEvent aEventType);
-
-    private:
-        TInt                iGridItemWidth;
-        TInt                iGridItemHeight;
-        TBool               iIsMirrored;
-        TInt                iRows;
-        TInt                iFirstVisibleRow;
-        TPoint              iOffset;
-        TPoint              iGridTopLeft;
-
-        TPoint              iCursorPos;
-        TPoint              iOldCursorPos;
-        mutable TBool       iDrawnBefore;
-
-        CEikScrollBarFrame* iSBFrame;
-        TInt*               iIconIndex;
-
-        TBool               iAnimated;
-
-        CFbsBitmap*         iOffscreenBg;
-        CFbsBitmapDevice*   iBitmapDevice;
-        CFbsBitGc*          iBitmapGc;
-        TBool               iHasBitmapBackground;
-        mutable TBool       iOffscreenBgDrawn;
-
-        TInt                iMaxColumns;
-        CCmDestinationIconMapExtension*   iExtension;
-        CArrayPtr<CGulIcon>*  iConsArray;
-        TBool               iDragAlreadyActive;
-    };
-
-#endif // __CMDESTICONMAP_H
--- a/cmmanager/cmmgr/Framework/Inc/cmdestinationimpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,992 +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:  Implementation of destination class.
-*
-*/
-
-#ifndef DESTINATIONIMPL_H
-#define DESTINATIONIMPL_H
-
-// User includes
-#include "cmmanager.hrh"
-#include <cmmanagerdef.h>
-
-// System includes
-#include <e32def.h>
-#include <e32base.h>
-#include <metadatabase.h>
-#include <commsdattypesv1_1.h>
-
-// CONSTANTS
-const TInt KCmInitIndex =  1;
-const TInt KNumOfIcons = 12;
-
-#define RECORD_FROM_ELEMENT_ID( elementId ) \
-                                    (( elementId & KCDMaskShowRecordId ) >> 8 )
-
-enum TSnapMetadataProtecionLevel
-    {
-    EProtectionLevel0 = 0x00000000,
-    EProtectionLevel1 = 0x10000000,
-    EProtectionLevel2 = 0x20000000
-    };
-    
-#define KSnapMetadataProtecionLevelMask 0xF0000000;
-
-// DATA TYPES    
-    
-// FORWARD DECLARATIONS
-class CCmManagerImpl;
-class CCmPluginBaseEng;
-class CCmPluginBase;
-class TCmPluginInitParam;
-class CPluginItem;
-class CCDDataMobilitySelectionPolicyRecord;
-class CGulIcon;
-class CCmTransactionHandler;
-class CCDSNAPMetadataRecord;
-
-typedef CArrayPtrFlat<CPluginItem> CCmArray;
-
-#define KFlagRemove 0x00000001
-
-typedef CCDDataMobilitySelectionPolicyRecord CCDSnapRecord;
-
-const TUint32 KCmDefaultDestinationAPTagId = 0x1000;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS(CPluginItem) : public CBase
-    {
-    public:
-    
-        enum
-            {
-            ERemoveCm   = 0x00000001
-            };
-            
-    public:
-        
-        CCDSnapRecord*     iDNRecord;
-        CCmPluginBase*   iPlugin;
-        TUint32             iFlags;
-    };        
-
-/**
- * Holds all the destination specific data of the CCmDestinationImpl
- * This class is put in the object pool and may be shared
- * among CCmDestinationImpl objects
- */
-NONSHARABLE_CLASS( CCmDestinationData ): public CBase
-    {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
-    public:
-        CCmDestinationData( CCmManagerImpl& aCmMgr );
-        ~CCmDestinationData();
-        /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void IncrementRefCounter();
-        /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void DecrementRefCounter();
-    private:
-        /**
-        * Reset and, if needed, destroy the passed array.
-        * @since S60 3.2
-        * @param aArray array to be reseted and deleted
-        * @parar aDestroy ETrue if array has to be deleted
-        */
-        void ResetAndDestroyArray( CCmArray* &aArray, TBool aDestroy );
-        
-    public:
-        /**
-        * Returns the number of connection methods of the destination
-        * @param None
-        * @return TInt        
-        */                  
-        TInt ConnectionMethodCount();
-        
-        /**
-        * Returns the destination's Id attribute
-        * @param None
-        * @return TUint32        
-        */            
-        inline TUint32 Id(){return iDestAPRecord->iRecordTag;};
-                
-        /**
-        * Returns the destination's ElementId attribute
-        * @param None
-        * @return TUint32        
-        */            
-        inline TUint32 ElementId() 
-        { return iNetworkRecord->ElementId() & KCDMaskShowField;};
-    
-        /**
-        * Returns that the destination is protected or not.
-        * @return protection level   
-        */
-        CMManager::TProtectionLevel ProtectionLevel();
-        
-        /**
-        * Returns that the destination is hidden or not.
-        * @param None
-        * @return TBool   
-        */
-        TBool IsHiddenL(); 
-
-        /**
-        * Indicates if the Id is valid or if this is a new object which sitll
-        * haven't been updated. 
-        * Used by the object pool.
-        * @return TBool
-        */
-        TBool IdIsValid();
-
-        /**
-        * Returns the reference counter. Used by the object pool.
-        * @return TInt
-        */
-        TInt GetRefCounter();
-        /** 
-        * Returns pointer to the CmManager object
-        * Used in 'R' classes
-        */
-        CCmManagerImpl* Cmmgr();
-
-        /**
-        * Returns the Metadata
-        * @param None
-        * @return TUint32        
-        */            
-        TUint32 MetadataL( CMManager::TSnapMetadataField aMetaField ) const;
-
-    private:
-        CCmManagerImpl&               iCmMgr;         //< Not owned
-        CommsDat::CCDNetworkRecord*   iNetworkRecord;
-                
-        //To store Connection methods that belong to this destination
-        CCmArray* iConnMethodArray;
-        CCmArray* iDeleteCmArray;
-        
-        // DN_IAP Table has to be update if
-        // - new CM is added to the destination
-        // - CM is delete from the destination
-        // - CM priority modified
-        TBool iDNTableChanged;
-        
-        //Protection changed
-        TBool   iProtectionChanged;
-        //The last protection level of the destination
-        TUint   iLastProtectionLevel;
-        
-        CCDSNAPMetadataRecord* iMetaDataRec;
-        //Reference counter for the object pool
-        TInt                iRefCounter;
-        //indicates if the Id is valid or not (for the object pool)
-        TBool               iIdIsValid;                
-        CommsDat::CCDAccessPointRecord* iDestAPRecord;
-
-        friend class CCmDestinationImpl;
-        friend class CCmManagerImpl;
-        TBool               iNewWithId;
-    };
-/**
- *  RCmDestination is for getting/setting values of a network destination.
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmDestinationImpl ) : public CBase
-    {
-    public:
-    //=====================================================================
-    // Constructors/Destructors
-    // 
-    public:
-    
-        /** Destructor. */
-        ~CCmDestinationImpl();
-        
-        /** Epoc constructor 
-        * This should be used only by the object pool
-        */
-        IMPORT_C static CCmDestinationImpl* NewL( CCmManagerImpl& aCmMgr,
-                                                  const TDesC& aName );
-        
-        /** Epoc constructor 
-        * This should be used only by the object pool
-        */
-        static CCmDestinationImpl* NewL( CCmManagerImpl& aCmMgr,
-                                         CCmDestinationData* aData );
-        
-        /** Epoc constructor 
-        * This should be used only by the 'R' classes
-        */
-        static CCmDestinationImpl* NewLC( CCmDestinationData* aData );
-        
-        /** Epoc constructor 
-        * This should be used only by the object pool
-        */
-        IMPORT_C static CCmDestinationImpl* NewL( CCmManagerImpl& aCmMgr,
-                                                  TUint aDestinationId );
-        
-    public:
-        /** 
-        * Returns pointer to the CmManager object
-        * Used in 'R' classes
-        */
-        CCmManagerImpl* Cmmgr();
-        //=====================================================================
-        // Conn method handling
-        
-        /**
-        * Create a connection method belonging to the destination
-        * @param aImplementationUid - implementation uid of the connection 
-        * method
-        * @return CCmPluginBaseEng*
-        */
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aBearerType );
-
-        /**
-        * Create a connection method belonging to the destination
-        * @param aBearerType - implementation uid of the connection 
-        * method
-        * @param aConnMethId - Predefined id for the connection method.
-        * @return CCmPluginBaseEng*
-        */
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aBearerType,
-                                                TUint32 aConnMethId );
-        /*
-        * Adds an existing connection method to a destination
-        * @param
-        * @return TInt - index in the Connection Method list
-        */
-        TInt AddConnectionMethodL( CCmPluginBase& aConnectionMethod );
-        
-        /*
-        * Embeds an existing destination to the destination
-        * @param CCmDestinationImpl - Destinatio to be embedded
-        * @return TInt - index in the Connection Method list
-        */
-        TInt AddEmbeddedDestinationL( CCmDestinationImpl& aDestination );        
-        
-        /**
-        * Remove a connection method from a destination and delete it
-        * on update. 
-        * Exception: conenction method is not deleted  if it's referenced 
-        * from any other destination.
-        * @param aConnectionMethod the connection method to be deleted
-        * @return none.
-        */
-        void DeleteConnectionMethodL( CCmPluginBase& aConnectionMethod ); 
-    
-        /**
-        * Remove connection method from the destination
-        * @param aConnectionMethod connection method to be removed
-        */
-        void RemoveConnectionMethodL( const CCmPluginBase& aConnectionMethod );
-    
-        /**
-        * Remove connection method from the destination
-        * @param aConnectionMethod connection method to be removed
-        */
-        void RemoveConnectionMethodL( const CCmPluginBaseEng& aConnectionMethod );
-        
-        /**
-        * Notification from child plugin that it was deleted.
-        * Remove it from the array and update priorities.
-        * @param aConnectionMethod child connection method that was deleted.
-        */
-        void ConnectionMethodDeletedL( const CCmPluginBase& aConnectionMethod );
-        
-        /**
-        * Set the CCMItem's priority based on the passed new index
-        * @param aCCMItem The connection method item
-        * @param aIndex The new index of the item in the list
-        */
-        void ModifyPriorityL( CCmPluginBase& aCCMItem, TUint aIndex );
-
-        /**
-        * Obsolete 
-        */
-        TUint PriorityL( CCmPluginBaseEng& aCCMItem );
-
-        /**
-        * Return the priority of the passed connection method
-        * @param aCCMItem queried connection method
-        * @return the priority of the queried connection method 
-        */
-        TUint PriorityL( CCmPluginBase& aCCMItem );
-        
-        /**
-        * Returns the number of connection methods of the destination
-        * @param None
-        * @return TInt        
-        */                  
-        IMPORT_C TInt ConnectionMethodCount();
-        
-        //Operator
-
-        /**
-        * Obsolete
-        */
-        IMPORT_C CCmPluginBaseEng* ConnectionMethodL( TInt anIndex );
-
-        /**
-        * Returns a reference to the connection method. 
-        * The index must be less than the return value of ConnMethodCount()
-        * @param anIndex
-        * @return plugin instance - ownership NOT passed
-        */         
-        IMPORT_C CCmPluginBase* GetConnectionMethodL( TInt anIndex );
-
-        /**
-        * Returns a reference to the connection method. 
-        * The index must be less than the return value of ConnMethodCount()
-        * @param anIapId IAP id of the queried connection method
-        * @return plugin instance - ownership NOT passed
-        */         
-        CCmPluginBase* ConnectionMethodByIDL( TUint32 anIapId );
-
-        void ConnectMethodIdArrayL( RArray<TUint32>& aCmIds );
-        
-        //Getting attributes
-
-        /**
-        * Returns the destination's Name attribute
-        * HBuf ownership is passed to the caller
-        * @param None
-        * @return name of the destination. ownership is passed.
-        */      
-        IMPORT_C HBufC* NameLC();                        
-        
-        /**
-        * Returns the destination's Id attribute
-        * @param None
-        * @return TUint32        
-        */
-        inline TUint32 Id(){return iData->Id();};
-
-        /**
-        * Returns the destination's ElementId attribute
-        * @param None
-        * @return TUint32
-        */            
-        inline TUint32 ElementId(){ return iData->ElementId();};
-     
-        /**
-        * Returns the Icon pointer
-        * This fucton leaves if the client does not have a valid UI context
-        * @param None
-        * @return TUint32  
-        */ 
-        IMPORT_C CGulIcon* IconL();
-
-        /**
-        * Returns the Metadata
-        * @param None
-        * @return TUint32        
-        */            
-        TUint32 MetadataL( CMManager::TSnapMetadataField aMetaField ) const;
-        
-        /**
-        * Returns if there's connection created with any of the destination's
-        * connection method.
-        * @return ETrue if there's connection with any of the destination's
-        * connection method.
-        */
-        IMPORT_C TBool IsConnectedL() const;
-
-        //=====================================================================
-        //Setting Attributes
-        
-        /**
-        * Set the destination's Name attribute. Leaves if the name already 
-        * exists
-        * @param aDestinationName value to set
-        * @return None   
-        */
-        IMPORT_C void SetNameL( const TDesC& aName );
-           
-        /**
-        * Set the destination's Icon index.
-        * This fucton leaves if the client does not have a valid UI context
-        * @param aIconIndex value to set
-        * @return None   
-        */
-        IMPORT_C void SetIconL( TUint32 anIndex );
-    
-        /**
-        * Set the Metadata
-        * @param aMetaField field to be modified
-        * @param aValue value to be set
-        */            
-        void SetMetadataL( CMManager::TSnapMetadataField aMetaField, 
-                           TUint32 aValue );    
-    
-        /**
-        * Returns that the destination is protected or not.
-        * @return protection level   
-        */
-        IMPORT_C CMManager::TProtectionLevel ProtectionLevel();
-        
-        /**
-        * Set the protection of the destination.
-        * @param aProtectionLevel
-        * @return None   
-        */
-        IMPORT_C void SetProtectionL( CMManager::TProtectionLevel aProtectionLevel );
-        
-        /**
-        * Update all the attributes of the Connection Methods and the 
-        * Destination.
-        * @return None   
-        */        
-        IMPORT_C void UpdateL();         
-    
-        /**
-        * Deletes it's connection methods from comms.dat (unless shared)
-        * then deletes itself
-        */
-        IMPORT_C void DeleteLD();
-        
-        /**
-        * Performs RollbackTransactionL().
-        */
-        void Close();
-        
-        /**
-        * Set iPlugin to NULL in plugin array, but not delete it.
-        * Next reference to this connection method will load the
-        * plugin again.
-        */
-        void PluginClosed( CCmPluginBase* aPlugin );
-        
-        /**
-        * Returns that the destination is hidden or not.
-        * @param None
-        * @return TBool   
-        */
-        IMPORT_C TBool IsHidden(); 
-        
-        /**
-        * Set that the destination is hidden or not.
-        * @param aHidden - True if it is hidden.
-        * @return None   
-        */
-        IMPORT_C void SetHiddenL( TBool aHidden );         
-        
-        /**
-        * Check if the destination element id is already embeded.
-        * Leaves with KErrNotSupported (multiple levels of embedding is not 
-        * supported)
-        */
-        void CheckIfEmbeddedL( TInt aId );
-        
-        
-        static CGulIcon* IconIdL( CCmManagerImpl& aCmMgr,
-                                  CommsDat::TMDBElementId aId );
-                
-        static CMManager::TProtectionLevel ProtectionLevelL( CCmManagerImpl& aCmMgr,
-                                                  CommsDat::TMDBElementId aId );
-        
-        /**
-        * Removes this destination from the object pool.
-        */
-        IMPORT_C void RemoveFromPool();
-
-        /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void IncrementRefCounter();
-        /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void DecrementRefCounter();
-        /**
-        * Returns the reference counter. Used by the object pool.
-        * @return TInt
-        */
-        TInt GetRefCounter();
-
-        /**
-        * Returns iData. Used by the object pool and the API oprators.
-        * @return TInt
-        */
-        CCmDestinationData* GetData();
-        /**
-        * Used by the object pool and the API oprators.
-        */
-        void SetData(CCmDestinationData* aData);
-        /**
-        * Indicates if the Id is valid or if this is a new object which sitll
-        * haven't been updated. 
-        * Used by the object pool.
-        * @return TBool
-        */
-        TBool IdIsValid();
-
-        /**
-        * Returns pointer to embedded destination if there is any
-        * @return CCmDestinationImpl* Pointer to embedded destination
-        * Contains NULL if there is no destination embedded
-        */        
-        CCmDestinationImpl* EmbeddedL();
-        
-        /**
-        * Checks if this destination plus a possible embedded destinaion
-        * contains a connection method which can be used for a connection
-        * Doesn't check VPNs!
-        * @return TBool ETrue if this destination or a destination embedded into
-        * it contains a connection method. Otherwise returns EFalse
-        */            
-        TBool CanUseToConnectL();
-        
-        
-        /**
-        * Reload connection method under this destination so as to
-        * keep synchronization with CommsDat
-        */
-        void ReLoadConnectionMethodsL();
-
-        /** Epoc constructor 
-        * This should be used only by the object pool
-        */
-        static CCmDestinationImpl* NewL( CCmManagerImpl& aCmMgr,
-                                         const TDesC& aName,
-                                         TUint32 aDestId);
-                                         
-
-        /**
-        * Returns the Id of this Destination which is used to identify the Destination.
-        * It is the Id saved to Destination Access Point's Tag field.
-        */            
-        TUint32 GetDestinationAPTagId();
-
-        /**
-        * Checks if this destination already contains the given Connection Method
-        * @param aConnectionMethod Connection Method to be checked whether it 
-        * already exists.
-        * @return TBool ETrue if this Destination contais already the given CM. If the
-        * Destination does not contain the given CM returns EFalse. Otherwise leaves
-        * with system-wide error code.
-        */            
-        TBool CheckIfCMExistsL( CCmPluginBase& aConnectionMethod );
-
-            
-    //=========================================================================
-    // Construction
-    //
-    private:    
-    
-        /**
-        * Default constructor. 
-        * @param aCmManager connection method manager
-        */
-        CCmDestinationImpl( CCmManagerImpl& aCmMgr );
-
-        /*
-        * Create a new destination with the specified name
-        */
-        void ConstructL( const TDesC& aName );
-
-        void ConstructL( const TDesC& aName, TUint32 aDestId );
-
-        /*
-        * Create a destination and initializes it 
-        * from the commsdat based on the id
-        */
-        void ConstructL( TUint aDestinationId );
-
-    //=========================================================================
-    // New functions
-    //
-    private:
-                          
-        /**
-        * Check if the destination contains and embedded destination
-        * @since S60 3.2
-        * @return ETrue if the destination contains and embedded destination   
-        */
-        TBool HasEmbeddedL();        
-    
-        /**
-        * - Check if transaction is already opened
-        * - Set iOwnTransaction is not and opens it and
-            put 'this' on cleanup&close stack
-        */
-        void OpenTransactionLC();
-        
-        /**
-        * - Check if the transaction is ours.
-        * - If yes, commits the transaction.
-        * - anyway does nothing
-        * @praram aError - error id
-        */
-        void CommitTransactionL( TInt aError );
-        
-        /**
-        * Rollback transaction.
-        */
-        void RollbackTransaction();
-
-        /**
-        * Returns the CommsDat session.
-        * Do not close!
-        * @return commsdat session
-        */
-        CommsDat::CMDBSession& Session()const;
-        
-        /**
-        * Find the connection method in iConnMethodArray.
-        * @param aConnectionMethod connection method to be searched for
-        * @return index of the found item
-        */
-        TInt FindConnectionMethodL( const CCmPluginBase& aConnectionMethod );
-        
-        /**
-        * Find the connection method in iConnMethodArray.
-        * @param aConnectionMethod connection method to be searched for
-        * @return index of the found item
-        */
-        TInt FindConnectionMethodL( const CCmPluginBaseEng& aConnectionMethod );
-        
-        /**
-        * Update protection attributes of every connection method if changed.
-        */
-        void UpdateProtectionL();
-
-        /**
-        * Update every connection method.
-        */
-        void UpdateConnectionMethodsL();
-        
-        /**
-        * Create or update the record of the network table for this 
-        * destination.
-        */
-        void UpdateNetworkRecordL();
-
-        /**
-        * Update the SNAP table
-        */
-        void UpdateSNAPTableL();
-        
-        /**
-        * Update the SNAP Metadata table
-        */        
-        void UpdateSNAPMetadataTableL();
-        
-        /**
-        * Load network record. Destination id is passed, because
-        * id is from the client application, and destinaion id
-        * is the network id for them. :)
-        * @param aDestinationId network record id
-        */        
-        void LoadNetworkRecordL( TUint32 aDestinationId );
-
-        /**
-        * Load Destination AP record. Destination id is passed, because
-        * id is from the client application, and destinaion id
-        * is the network id for them. :)
-        * @param aDestinationId network record id
-        */        
-        void LoadDestAPRecordL( TUint32 aDestinationId );
-
-        /**
-        * Load connection methods of the destination
-        */        
-        void LoadConnectionMethodsL();
-        
-        /**
-        * Load SNAP Metadata table
-        */        
-        void LoadSNAPMetadataTableL();        
-        
-        /**
-        * Create a connection method belonging to the destination
-        * @param aImplementationUid - implementation uid of the connection 
-        * method
-        * @param aParams - plugin init param
-        * @return CCmPluginBaseEng*
-        */        
-        CCmPluginBase* CreateConnectionMethodL( TUid aImplementationUid, 
-                                                   TCmPluginInitParam& aParams );
-                
-        /**
-        * Compare two records from DNIAP by their priority field.
-        * @param aLeft one record from DN_IAP table.
-        * @param aRight one record from DN_IAP table.
-        * @return
-        *   - negative value, if aLeft is less than aRight;
-        *   - 0,              if aLeft equals to aRight;
-        *   - positive value, if aLeft is greater than aRight.
-        */
-        static TInt SortRecordsByPriority( const CommsDat::CMDBRecordBase& aLeft, 
-                                           const CommsDat::CMDBRecordBase& aRight);
-        
-        /**
-        * Add an item to the Connection Method array based on bearer priority 
-        * table.
-        * @param aItem An item to be added.
-        * @return TInt the index of the added item. The array contains an initial item,
-        * so always SUBTRACT KCmInitIndex to get the connection method index number!!!
-        */        
-        TInt AddToArrayL( CPluginItem* aItem );
-        
-        /**
-        * IAP is considered to be removed from the commsdat by third 
-        * party (someone else external).
-        * Seamlessness entries should also be removed.
-        * @param aIapId Iap was removed        
-        */        
-        void CleanUpSeamlessnessTableL( TUint32 aIapId );
-        
-        /**
-        * Embedded dest is considered to be removed from the commsdat 
-        * by third party (someone else external).
-        * Snap Metadata entries should also be removed.
-        * @param aSnap Id was removed        
-        */          
-        void CleanUpSnapMetadataTableL( TUint32 aSnap );        
-        
-        /**
-        * Embedded dest is considered to be removed from the commsdat 
-        * by third party (someone else external).
-        * Snap Metadata entries should also be removed.
-        * @param aSnap Id was removed        
-        */          
-        void CleanUpEmbeddedL( TUint32 aDestId );        
-        
-        /**
-        * Create and load plugin.
-        * @param item where plugin has to be loaded.
-        */
-        void LoadPluginL( CPluginItem& aItem );
-        
-        
-        /**
-        * Create embedded destination plugin.
-        * @param aItem - plugin item
-        * @param TUint32 destination id
-        */        
-        void CreateEmbeddedDestinationPluginL( CPluginItem& aItem, 
-                                               TInt aDestinationId );
-        /**
-        * Load embedded destination plugin.
-        * @param aItem - plugin item
-        */        
-        void LoadEmbeddedDestinationPluginL( CPluginItem& aItem );
-        
-        /**
-        * Check if there is destination with this name. 
-        * Leaves with KErrAlreadyExists if name already exists
-        * @param aName destination name
-        */        
-        void CheckIfDestinationNameExistL( const TDesC& aName );
-        
-        /**
-        * Set or clear attribute
-        * @aRecord record of which the attribute is to be set or clear
-        * @aAttribute attribute to be set or clear
-        * @aSet ETrue to set
-        */        
-        void SetAttribute( CommsDat::CMDBRecordBase* aRecord, 
-                           TUint32 aAttribute, 
-                           TBool aSet );
-
-
-        /**
-        * Delete all connection methods.
-        * @since S60 3.2
-        */
-        void DeleteConnectionMethodsL();
-        
-        /**
-        * Reference to a non-existing IAP found in the SNAP table.
-        * Remove the SNAP record and the metadata record of this
-        * IAP. IAP is most probably deleted by APEngine.
-        * @param aSnapRecord SNAP record point to a non-existing IAP
-        */
-        void DeleteIAPRecordsL( CommsDat::CMDBRecordBase* aSnapRecord );
-        
-        /**
-        * Check if the name of the passed record is the same as the name of 
-        * network one, and update it if not.
-        * @param aRecord record to be checked and updated if needed
-        */
-        void CheckIfNameModifiedL( CCDSnapRecord* aRecord );
-        
-        /**
-        * Checks if there's another SNAP with Internet bit set.
-        * Leaves with KErrAlreadyExists if so.
-        */
-        void CheckIfInternetExistsL();
-        
-        /**
-        * Return the index value of the connection method.
-        * @param aCmId id of the connection method
-        * @return index value in iConnMethodArray
-        */
-        TInt ConnectionMethodIndex( TUint32 aCmId );
-        
-        /**
-        * Retrieves the base of the priority counts in cm list
-        * It is the data of the plugin in case of none VPN.
-        * It is the data of the underlying cm in case of VPN over cm.
-        * It is "wildcard" in case of VPN over destination. 
-        * aRetBearer and aRetExtLevel are not filled in this case 
-        * @param aItem the plugin list item which data is get
-        * @param aRetPrio the default priority of the cm in return
-        * @param aRetBearer the bearer of the cm in return
-        * @param aRetExtLevel the extenson level of the cm in return
-        * @return ETrue if the cm is virtual else EFalse
-        */
-        TBool PrioDataL( CPluginItem* aItem, TUint32& aRetPrio, 
-                        TUint32& aRetBearer, TUint32& aRetExtLevel );
-                        
-                            
-                            
-        /**
-        * Determines the position of the inserted item into the cm list.
-        * This determination is based on the similarity of the bearer types.
-        * The inserted position is just after the last item with the
-        * same bearer type and virtuality - if exist else -1. 
-        * @param aBearerType bearer type od the inserted cm
-        * @param aIsVirtual virtuality of the inserted cm 
-        * @return The position in the cm list where the item should be inserted.
-        * If there is no cm with same bearer type in the list then it
-        * returns -1;
-        */
-        TInt InsertSameMethodL( TUint32 aBearerType, TBool aIsVirtual );
-
-        /**
-        * Determines the position of the inserted item into the cm list.
-        * This determination is based on the priority and the extension
-        * level of the cm's. 
-        * @param aPrio default bearer type of the inserted cm
-        * @param aExtLevel extension level of the inserted cm 
-        * @return The position in the cm list where the item should be inserted.
-        */
-        TInt InsertPriorityMethodL( TUint32 aPrio, TUint32 aExtLevel );
-                                 
-        /**
-        * Checks if there's another SNAP with the same localised bit set.
-        * Leaves with KErrAlreadyExists if so.
-        */
-        void CheckIfLocalisedDestExistL( TUint32 aValue );
-
-        /**
-        * Checks if there's another SNAP with the same purpose bit set.
-        * Leaves with KErrAlreadyExists if so.
-        */
-        void CheckIfPurposeExistL( TUint32 aValue );
-
-        static CGulIcon* IconL( TInt aIconIndex );
-        static CMManager::TProtectionLevel ProtectionLevel( CCDSNAPMetadataRecord* aMetaDataRec );
-
-        /**
-        * Deletes all the recordsrelated to this Destination to be
-        * deleted.
-        * @param None
-        * @return        
-        */
-        void DeleteRelatedRecordsL( TInt aCount );
-
-        /**
-        * Checks if this(current) destination is referenced by any
-        * Virtual Connection Method.
-        * @param None
-        * Leaves with KErrLocked if it's referenced.
-        */
-        void CheckIfReferencedByVirtualCML();
-
-        /**
-        * Initializes the Destination AccessPoint record
-        * deleted.
-        * @param aDestAPRecord Record to be initialized
-        * @return
-        */
-        void InitializeDestAPRecordL();
-
-        /**
-        * Sets the given (tag)id to the accesspoint record
-        * @param aDestId Id to be set
-        * @return
-        */
-        void SetIdL( TInt aDestId );
-
-        /**
-        * Checks that there isn't any destination with the given (tag)id.
-        * @param aDestId Id to be checked
-        * @return
-        */
-        void CheckIfDestinationIdExistsL( TUint32 aDestId );
-
-        /**
-        * Create or update the record of the accesspoint table for this 
-        * destination.
-        */
-        void UpdateDestAPRecordL();
-
-        /**
-        * Creates an unique (tag)id to the record of the accesspoint table for this 
-        * destination.
-        */
-        TUint32 CreateDestinationAPTagIdL();
-
-        /**
-        * Sets the default Tier Manager to the accesspoint record for this 
-        * destination.
-        */
-        void SetDefaultTierManagerL();
-
-        /**
-        * Sets the default Meta Connection Provider to the accesspoint record for this 
-        * destination.
-        */
-        void SetDefaultMCprL();
-
-        /**
-        * Sets the default Connection Provider to the accesspoint record for this 
-        * destination.
-        */
-        void SetDefaultCprL();
-
-        /**
-        * Sets the default Subconnection Provider to the accesspoint record for this 
-        * destination.
-        */
-        void SetDefaultSCprL();
-
-        /**
-        * Sets the default Protocol to the accesspoint record for this 
-        * destination.
-        */
-        void SetDefaultProtocolL();
-        
-    //=========================================================================        
-    // Member variables
-    //
-    private: 
-        CCmManagerImpl&     iCmMgr;         //< Not owned
-        CCmDestinationData* iData;
-    private:
-    
-        friend class CCmManagerImpl;
-    };
-    
-#endif // DESTINATIONIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +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:  Dialog for setting the gateway. It's used temporarily.
-*
-*/
-
-#ifndef CMDIALOG_H
-#define CMDIALOG_H
-
-//  INCLUDES
-
-#include <AknForm.h>
-#include <AknInfoPopupNoteController.h>
-#include "cmlistboxmodel.h"
-#include "cmlistbox.h"
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-#include <mcmdexec.h>
-#include "cmcommsdatnotifier.h"
-
-//#include <EIKLBO.H>
-
-// CLASS DECLARATION
-class CEikStatusPane;
-class CAknTitlePane;
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class CCmWizard;
-class CCmdExec;
-class CDestDlg;
-
-/**
- *  Dialog for displaying and editing connection methods
- *  also base class for CUncatDlg
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmDlg ) : public CAknDialog
-                            , MEikListBoxObserver
-                            , MAknInfoPopupNoteObserver
-                            , public MCmdExec
-                            , public MCmCommsDatWatcher
-    {
-    public :    // construction
-        CCmDlg( CCmManagerImpl* aCmManager, TUint32 aDestUid,
-                CDestDlg* aDestDlg );
-
-        ~CCmDlg();
-        
-        /**
-        * Two-phased constructor.
-        */
-        static CCmDlg* NewL( CCmManagerImpl* aCmManager, TUint32 aDestUid,
-                             CDestDlg* aDestDlg );
-        
-        TInt ConstructAndRunLD( TUint32 aHighLight, TUint32& aSelected );        
-
-        // From MEikMenuObserver
-        virtual void DynInitMenuPaneL( TInt aResourceId, 
-                                       CEikMenuPane* aMenuPane );
-        // From MEikCommandObserver
-        virtual void ProcessCommandL( TInt aCommandId ) ;
-        
-        /**
-        * Updates listbox data
-        */
-        virtual void HandleListboxDataChangeL();   
-        
-        /**
-        * Handle key event.
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return Response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL
-            ( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-	public:
-        /**
-         * From base class MCmdExec
-         */
-        void Execute();
-
-    public: // From CCoeControl
-    
-        /**
-        * Returns the help context
-        * From CCoeControl
-        * 
-        * @since S60 3.2
-        * @param aContext the returned help context
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-        /**
-        * Handles the resource change
-        * From CCoeControl
-        * 
-        * @since S60 5.0
-        * @param aType Type of the resource change
-        */
-		void HandleResourceChange( TInt aType );
-        
-    public: // From MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        virtual void CommsDatChangesL();
-                 
-    protected :    // from CEikDialog
-        TBool OkToExitL( TInt aButtonId ) ;
-        
-        virtual void PreLayoutDynInitL();
-        
-        SEikControlInfo CreateCustomControlL ( TInt aControlType );
-
-        // From MEikListBoxObserver
-        void HandleListBoxEventL( CEikListBox* aListBox, 
-                                  TListBoxEvent aEventType );
-        
-        /**
-        * Initialises listbox texts
-        */
-        virtual void InitTextsL();
-        
-        /**
-        * Sets the number of conn methods text on navi pane
-        */
-        void SetNoOfCMsL(TInt aCount);
-        
-    
-        //from MAknInfoPopupNoteObserver
-        /* Handles events reported from info popup note.
-        * @param aController The controller that controls the note, from
-        *   where the event originates.
-        * @param aEvent The event.
-        */
-        void HandleInfoPopupNoteEvent(
-            CAknInfoPopupNoteController* aController,
-            TAknInfoPopupNoteEvent aEvent ); 
-        
-        /**
-        * @return the currently focused connection method in the list
-        */
-        virtual CCmPluginBase* CurrentCML();  
-        
-        /**
-        * @return the connection method in the list at the specified index
-        */
-        virtual CCmPluginBase* CMByIndexL( TInt aIndex );
-        
-        /**
-        * @return the connection mehtod count
-        */
-        virtual TInt CMCount();     
-        
-        /**
-        * deletes the currently highlighted conneciton method
-        */
-        void DeleteCurrentCmL();
-        
-        void RenameConnectionMethodL();
-        void PrioritiseConnectionMethodL();
-        void AddConnectionMethodL();
-        void CopyConnectionMethodL();
-        void MoveConnectionMethodL();
-        void EditConnectionMethodL();
-        
-        /**
-        * Indicates if a connection is in use and displays and error message
-        *
-        * @return ETrue if in use
-        */
-        TBool CurrentCmInUseL();
-        
-        virtual void ConstructCMArrayL( RArray<TUint32>& aCmIds );
-
-        /**
-         * Remove hidden Connection Methods from the Array
-         */
-        virtual void ClearHiddenCMsFromArrayL( RArray<TUint32>& aCmIds );
-                
-    public:
-        /**
-         * From base class MCmdExec
-         */
-        void HandleLeaveError( TInt aError );
-        
-    private:
-     
-        /**
-        * Finishes the priorizing method
-        *
-        * @param aOkPushed ETrue if the OK button pushed.
-        *                  EFalse if the Cancel button pushed. 
-        *
-        */
-        void FinishPriorizingL( TBool aOkPushed );    
-
-        /**
-         * Rebuild item index array to remove some Iap that has been deleted from
-         * CommsDat by other application
-         */
-        void ReBuildItemIndexArrayL();
-        
-        /**
-         * Reorder connection methods according to underlying connection in case of vpn
-         */
-        void ReOrderCMsL();
-               
-        
-        /**
-         * Get a proper index in list for priority
-         */
-        TInt GetInsertIndexL( TInt aCount, TUint32 aPriority );
-        
-        /**
-         * Check if plugin exits exceptionally
-         */
-        TBool IsExceptionExitL();
-        
-    protected:
-        CCmListboxModel*    iModel;
-        TUint32             iHighlight;
-        TUint32*            iSelected;           
-        TBool               iModelPassed;
-        CCmListbox*         iListbox;
-        CEikStatusPane*     iStatusPane;    // NOT owned
-        CAknTitlePane*      iTitlePane;     // NOT owned
-        CAknNavigationControlContainer* iNaviPane;      // NOT owned
-        CAknNavigationDecorator*        iNaviDecorator; // owned
-        HBufC*              iOldTitleText;  
-        CCmManagerImpl*     iCmManager;   // NOT owned   
-        TUint32             iDestUid;  // uid of the destination the
-                                       // connection mehtods belong to
-        TBool               iPrioritising;
-        TInt                iExitReason; // Exit reason, can be KUserExit or 
-                                         // KUserBack used to pass user exit 
-                                         // event                                         
-        CAknInfoPopupNoteController*    iInfoPopupNoteController;
-        
-    private:        
-    
-        TInt                iCmToPrioritise; // connection mehthod index 
-                                            // selected to prioritise
-        CCmDestinationImpl* iCmDestinationImpl; // the destination the 
-
-        CCmWizard*          iCmWizard; // wizard for connection method creation
-        // Indicated that Escape has arrived and it should be forwarded when CmWizard
-        // finished its work
-        TBool               iEscapeArrived;
-        
-        TBool 				iProcessing;
-        TBool               iAlreadyConfirmedDelete;
-                                                // connection mehtods belongs to
-        TBool               iExitduringProcessing;
-        TBool               iBackduringProcessing;
-        CDestDlg*           iDestDlg;
-        
-        /**
-         * Indicate if exiting from plugin normally or exceptionally
-         */
-        TBool                iPluginExitExceptionally;
-        
-    protected:
-        // This is nescessary becaue in case of not supported CMs the data base 
-        // and the lisbox content is different.(The listbox doesn' show the
-        // unsupported ones.)
-        RArray<TInt>        iItemIndex;
-        CCmdExec*           iCmdExec;
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/cmlistbox.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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:  Declaration of class CCmListbox.
-*
-*/
-
-#ifndef CM_LISTBOX_H
-#define CM_LISTBOX_H
-
-// INCLUDE FILES
-#include <aknlists.h>
-
-// FORWARD DECLARATION
-class CCmListboxModel;
-
-/**
- *  Model for the connection methods listbox. It is an array of CCmListItem
- *  pointers; items are owned.
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmListbox ) : public CAknDoubleGraphicStyleListBox
-    {
-    public:     // Construct / cmruct
-
-        /**
-        * Two-phased constructor. Leaves on failure.
-        * @param aParent Parent control.
-        * @return The constructed listbox.
-        */
-        static CCmListbox* NewL
-            ( const CCoeControl* aParent );
-
-        /**
-        * Cmructor.
-        */
-        virtual ~CCmListbox();
-
-        /**
-        * Constructor.
-        */
-        CCmListbox();
-
-    public :
-        /**
-        * Handle key event.
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return Response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL
-            ( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-        /**
-        * Handle focus change.
-        * @param aDrawNow Draw now?
-        */
-        void FocusChanged( TDrawNow aDrawNow );
-
-        /**
-        * Gets the UID from a given item
-        * @param    The index of the item
-        * @return   The UID of the item given by itemindex
-        */
-        TUint32 Uid4Item( TInt aItem ) const;
-
-        /**
-        * Gets the UID of the current item
-        * @return  The UID of the current item
-        */
-        TUint32 CurrentItemUid() const;
-
-        /**
-        * Gets the name of the current item
-        * @return The name of the current item
-        */
-        const TDesC& CurrentItemNameL();
-        
-        // from CCoeControl
-        void HandleResourceChange(TInt aType);
-    };
-
-
-#endif
-
-// End of file
--- a/cmmanager/cmmgr/Framework/Inc/cmlistboxmodel.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +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:  Declaration of class CCmListboxModel.
-*
-*/
-
-#ifndef CMLISTBOX_LISTBOX_MODEL_H
-#define CMLISTBOX_LISTBOX_MODEL_H
-
-// INCLUDE FILES
-#include <eikdialg.h>
-#include "cmlistitemlist.h"
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat.h>
-#else
-#include <commsdat.h>
-#include <commsdat_partner.h>
-#endif
-
-// CONSTANTS
-// Granularity of the model array.
-const TInt KCMGranularity = 8;
-
-//"1\tFirstLabel\tSecondLabel\t0\t0" /**/
-_LIT( KListItemFormatCmProt, "%d\t%S\t%S\t%d" );
-//"0\tFirstLabel\tSecondLabel" /*\t%d*/
-_LIT( KListItemFormatCm, "%d\t%S\t%S" );
-//"0\tFirstLabel" /*\t%d*/
-_LIT( KListItemFormatEmbDest, "%d\t%S\t" );
-//"0\tFirstLabel\t0\t0" /*\t%d*/
-_LIT( KListItemFormatEmbDestProt, "%d\t%S\t\t%d" );
-
-const TInt KCMMaxFormatSize = sizeof( KListItemFormatCm );
-const TInt KCMMaxListItemNameLength = CommsDat::KMaxTextLength;
-const TInt KMaxCmListboxName = KCMMaxListItemNameLength+KCMMaxFormatSize;
-
-
-/**
-* Buffer size for formatting listbox text. Maximum item length
-* plus listbox internals (tabulators for icons etc.) must fit into it.
-*
-* Important note:
-* The model of the listbox is a CAknFilteredTextListBoxModel.
-* The *itemarray* of that model is this class. That is, whatever is in
-* the model (this class), it may not be visible, if it is filtered out.
-* We always must use the listbox's Model() to get visible ones.
-*/
-
-
-// CLASS DECLARATION
-
-/**
- * Model for the connection methods listbox.
- * pointers; items are owned.
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmListboxModel ) : public CCmListItemList
-                                     , public MDesCArray
-    {
-    public:     // Construct
-
-        /**
-        * Constructor.
-        */
-        CCmListboxModel();
-
-        /**
-        * CCmListboxructor.
-        */
-        virtual ~CCmListboxModel();
-
-    public:     // from MDesCArray
-
-        /**
-        * Get number of items in the model.
-        * @return number of items.
-        */
-        TInt MdcaCount() const;
-
-        /**
-        * Text to be displayed for this item.
-        * @param aIndex Index of item.
-        * @return for this item text (text owned by the model).
-        */
-        TPtrC MdcaPoint( TInt aIndex ) const;
-
-    public:        
-        
-        /**
-        * Sets the icon offset
-        * @param aOffset the offset of our icons in the iconarray
-        */
-        void SetOwnIconOffset( TInt aOffset );
-
-    protected:    // data
-    
-        /**
-        * Formats the text of the listbox, calls the leaving version trapped.
-        * @param aIndex Index of item.
-        * @param aBuf Buffer to store formatted text.
-        */
-        void FormatListboxText( TInt aIndex, TDes& aBuf ) const;
-
-        /**
-        * Formats the text of the listbox, leaving version.
-        * @param aIndex Index of item.
-        * @param aBuf Buffer to store formatted text.
-        */
-        void FormatListboxTextL( TInt aIndex, TDes& aBuf ) const;
-
-        /**
-        * MdcaPoint() cannot leave, so this buffer is allocated
-        * to allow formatting. Fortunately, doesn't have to be very
-        * large.
-        * We have to use MUTABLE CAST, as MdcaPoint is const (odd enough),
-        * so wouldn't allow formatting the text in a member...
-        */
-        __MUTABLE TBuf<KMaxCmListboxName> iBuf;
-        TInt iOffset;
-    };
-
-#endif // CMLISTBOX_LISTBOX_MODEL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmlistitem.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +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:  Declaration of the CCmListItem class.
-*
-*/
-
-#ifndef CCMLISTITEM_H
-#define CCMLISTITEM_H
-
-//  INCLUDES
-#include <e32base.h>
-
-/**
- *  Representation of a list item.
- *  This class is used to hold the main information of a connection method.
- *  It is used in CCmSelect.
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmListItem ) :public CBase
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor. Leaves on failure, places instance
-        * on cleanup stack.
-        * @param aUid The ID of the connection method
-        * @param aName The name of the connection method
-        * @param aPriority The priority of the connection method
-        * @param aIconIndex The icon index of the connection method's 
-        * bearer's icon
-        * @param aIsProtected Whether the given item is read-only or not
-        * @param aIsSingleLine Whether the given item has one line only      
-        * @return The constructed CCmListItem.
-        */
-        static CCmListItem* NewLC( TUint32 aUid,
-                                    HBufC* aName,
-                                    TInt aPriority, 
-                                    TUint aIconIndex, 
-                                    TBool aIsProtected, 
-                                    TBool aIsVPNOverDestination,
-                                    TBool aIsSingleLine, 
-                                    TBool aIsDefault);
-        /**
-        * Destructor.
-        */
-        virtual ~CCmListItem();
-
-    protected:      // Constructors
-    
-        /**
-        * C++ default constructor.
-        */
-        CCmListItem( HBufC* aName );
-
-        /**
-        * Second-phase constructor.
-        * @param aUid The ID of the connection method
-        * @param aPriority The priority of the connection method
-        * @param aIconIndex The icon index of the connection method's 
-        * bearer's icon
-        * @param aIsProtected Whether the given item is read-only or not
-        * @param aIsSingleLine Whether the given item has one line only
-        */
-        void ConstructL( TUint32 aUid,
-                         TInt aPriority, 
-                         TUint aIconIndex, 
-                         TBool aIsProtected, 
-                         TBool aIsVPNOverDestination,
-                         TBool aIsSingleLine, 
-                         TBool aIsDefault);
-    
-    public: // New functions
-
-        /**
-        * Gets the name of the 'current' connection method
-        * Ownership of the returned text is not passed.
-        * @return The name of the current connection method
-        */
-        const TDesC& Name();
-
-        /**
-        * Gets the UID of the current connection method
-        * @return The UID of the current connection method
-        */
-        TUint32 Uid();
-
-        /**
-        * Gets the Priority of the current connection method
-        * @return The Priority of the current connection method
-        */
-        TInt Priority();
-         
-        /**
-        * Gets the IconIndex of the current connection method's bearer icon
-        * @return The IconIndex of the current connection method's bearer icon
-        */
-        TUint IconIndex();
-        
-        /**
-        * Returns the connection method's protected flag
-        * @return ETrue if the connection method is protected
-        */       
-        TBool IsProtected();
-        
-        /**
-        * Returns the connection method's destination flag
-        * @return ETrue if the item has one line only
-        */       
-        TBool IsSingleLine();
-
-        /**
-        * Returns the connection method's default flag
-        * @return ETrue if the item is the default connection
-        */       
-        TBool IsDefault();
-
-        /**
-        * Used to figure out whether connection is VPN over destination.
-        * @return ETrue if the item is VPN over destination
-        */       
-        TBool IsVpnOverDestination();
-                
-    private:    // Data
-
-        TUint32         iUid;            // The ID of the access point
-        HBufC*          iName;           // The name of the access point
-        TInt            iPriority;       // The Priority of the access point
-        TUint           iIconIndex;      // The IconIndex of the access point
-        TBool           iIsProtected;    // The IsProtected flag of the access point
-        TBool           iIsSingleLine;   // ETrue if the item has one line only
-        TBool           iIsDefault;      // ETrue if the item is the default connection
-        TBool           iIsVpnOverDestination; // ETrue if the item is VPN over destination
-    };
-
-#endif      // CCMLISTITEM_H
--- a/cmmanager/cmmgr/Framework/Inc/cmlistitemlist.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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:  Declaration of the CCmListItemList class.
-*
-*/
-
-#ifndef CCMLISTITEMLIST_H
-#define CCMLISTITEMLIST_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATION
-class CCmListItem;
-
-/**
- *  A list of CCmListItem-s pointers; items are owned.
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmListItemList ) : public CArrayPtrFlat<CCmListItem>
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CCmListItemList();
-
-        /**
-        * Destructor. Items in the list are destroyed.
-        */
-        virtual ~CCmListItemList();
-
-    public:  // New methods
-
-        /**
-        * Get pointer to the item having aUid, or NULL if no such item is in the
-        * list.
-        * @param aUid Uid of item to get.
-        * @return Pointer to the item having uid aUid, or NULL. Ownership
-        * not passed (the list still owns the item).
-        */
-        CCmListItem* ItemForUid( TUint32 aUid ) const;
-    };
-
-#endif
-
-// End of File
--- a/cmmanager/cmmgr/Framework/Inc/cmlogger.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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:  Declaration of logger
-*
-*/
-
-#ifndef CONNECTIONMETHODLOGGER_H
-#define CONNECTIONMETHODLOGGER_H
-
-// INCLUDE FILES
-#include <e32svr.h>
-
-#ifdef _DEBUG
-
-#define __CONNECTION_METHOD_LOG__
-#include <flogger.h>
-
-// CONSTANTS
-
-class CFunctionEntryExit;
-
-//Logging to file in THUMB UDEB
-class TLogger
-    {
-    public: // methods
-
-        static void CreateLogger( TAny* aOwner );
-        static void CloseLogger( TAny* aOwner );
-
-        static void AttachLogger( const TAny* aOwner, 
-                                   const TAny* aAttach1,
-                                   const TAny* aAttach2 );
-       
-        static void NameIt( const TAny* aOwner, 
-                            TRefByValue<const TDesC> aNameFmt, 
-                            ... );
-        
-        static void LogIt( const TAny* aOwner, 
-                           TRefByValue<const TDesC> aFmt, 
-                           ... );
-        static void LogIt( const TAny* aOwner, 
-                           TRefByValue<const TDesC8> aFmt, 
-                           ... );
-        static void LogIt( const TAny* aOwner, 
-                           TRefByValue<const TDesC> aFmt, 
-                           VA_LIST aList );
-        static void LogIt( const TAny* aOwner, 
-                           TRefByValue<const TDesC8> aFmt, 
-                           VA_LIST aList );
-
-    private:       
-
-        TBuf<2048>      iLogBuf;
-        TBuf8<2048>     iLogBuf8;
-        TInt            iRefCounter;
-        TAny*           iOwner;
-    };
-
-NONSHARABLE_CLASS( CFunctionEntryExit ): public CBase
-    {
-    public:
-
-        CFunctionEntryExit( const TAny* aOwner, 
-                            TRefByValue<const TDesC> aFunc );
-        ~CFunctionEntryExit();
-
-    public:
-    
-        TPtrC       iFunc;  // function name
-        const TAny* iOwner;
-        TTime       iEntryTime;
-    };
-
-#define LOGGER_ENTERFN( a )     CFunctionEntryExit entryExit( this, _L(a) );
-#define CLOG_ENTERFN_PTR( a )   CFunctionEntryExit entryExit( NULL, _L(a) );
-
-#define CLOG_CREATE             TLogger::CreateLogger( this );
-#define CLOG_CREATE_PTR         TLogger::CreateLogger( NULL );
-#define CLOG_ATTACH( attach1, attach2 )  TLogger::AttachLogger( this, \
-                                                                   attach1, \
-                                                                   attach2 );
-#define CLOG_NAME( a )           TLogger::NameIt( this, a );
-#define CLOG_NAME_1( a, b )      TLogger::NameIt( this, a, b );
-#define CLOG_NAME_2( a, b, c )   TLogger::NameIt( this, a, b, c );
-#define CLOG_NAME_3( a, b, c, d )   TLogger::NameIt( this, a, b, c, d );
-#define CLOG_CLOSE               TLogger::CloseLogger( this );
-#define CLOG_WRITE( a )          TLogger::LogIt( this, _L(a) );
-#define CLOG_WRITE_FORMAT( a, b )   TLogger::LogIt( this, _L(a), b );
-#define CLOG_WRITE_1( a, b )     TLogger::LogIt( this, _L(a), b );
-#define CLOG_WRITE_2( a, b, c )  TLogger::LogIt( this, _L(a), b, c );
-#define CLOG_WRITE_3( a, b, c, d )  TLogger::LogIt( this, _L(a), b, c, d );
-#define CLOG_WRITE_4( a, b, c, d, e )   TLogger::LogIt( this, \
-                                                          _L(a), b, c, d, e );
-#define CLOG_WRITE8( a )         TLogger::LogIt( this, _L8(a) );
-#define CLOG_WRITE8_1( a, b )    TLogger::LogIt( this, _L8(a), b );
-#define CLOG_WRITE8_2( a, b, c ) TLogger::LogIt( this, _L8(a), b, c );
-#define CLOG_WRITE8_3( a, b, c, d ) TLogger::LogIt( this, _L8(a), b, c, d );
-#define CLOG_WRITE8_4( a, b, c, d, e )  TLogger::LogIt( this, \
-                                                          _L8(a), b, c, d, e );
-
-#define CLOG_NAME_PTR( ptr, a )                     TLogger::NameIt( ptr, a );
-#define CLOG_ATTACH_PTR( ptr, attach1, attach2 )    TLogger::AttachLogger( \
-                                                        ptr, attach1, attach2 );
-#define CLOG_WRITE_PTR( ptr, a )                    TLogger::LogIt( ptr, \
-                                                                      _L(a) );
-#define CLOG_WRITE_1_PTR( ptr, a, b )               TLogger::LogIt( ptr, \
-                                                                    _L(a), b );
-#define CLOG_WRITE_2_PTR( ptr, a, b, c )            TLogger::LogIt( ptr, \
-                                                                  _L(a), b, c );
-#define CLOG_WRITE_3_PTR( ptr, a, b, c, d )         TLogger::LogIt( ptr, \
-                                                               _L(a), b, c, d );
-#define CLOG_WRITE_4_PTR( ptr, a, b, c, d, e )      TLogger::LogIt( ptr, \
-                                                            _L(a), b, c, d, e );
-#define CLOG_WRITE_FORMAT_PTR( ptr, a, b )          TLogger::LogIt( ptr, \
-                                                                    _L(a), b );
-#define CLOG_CLOSE_PTR( ptr )   TLogger::CloseLogger( ptr );
-
-#else   // _DEBUG
-
-#define LOGGER_ENTERFN( a )
-#define CLOG_ENTERFN_PTR( a )
-
-#define CLOG_CREATE
-#define CLOG_CREATE_PTR
-#define CLOG_ATTACH( attach1, attach2 )
-#define CLOG_NAME( a )
-#define CLOG_NAME_1( a, b )
-#define CLOG_NAME_2( a, b, c )
-#define CLOG_NAME_3( a, b, c, d )
-#define CLOG_CLOSE
-#define CLOG_WRITE( a )                   
-#define CLOG_WRITE_FORMAT( a, b )              
-#define CLOG_WRITE_1( a, b )
-#define CLOG_WRITE_2( a, b, c )           
-#define CLOG_WRITE_3( a, b, c, d )        
-#define CLOG_WRITE_4( a, b, c, d, e )     
-#define CLOG_WRITE8( a )                  
-#define CLOG_WRITE8_1( a, b )             
-#define CLOG_WRITE8_2( a, b, c )          
-#define CLOG_WRITE8_3( a, b, c, d )       
-#define CLOG_WRITE8_4( a, b, c, d, e )    
-
-#define CLOG_NAME_PTR( ptr, a )
-#define CLOG_ATTACH_PTR( ptr, attach1, attach2 )
-#define CLOG_WRITE_PTR( ptr, a )
-#define CLOG_WRITE_1_PTR( ptr, a, b )
-#define CLOG_WRITE_2_PTR( ptr, a, b, c )
-#define CLOG_WRITE_3_PTR( ptr, a, b, c, d )
-#define CLOG_WRITE_4_PTR( ptr, a, b, c, d, e )
-#define CLOG_WRITE_FORMAT_PTR( ptr, a, b )
-#define CLOG_CLOSE_PTR( ptr )
-
-#endif // _DEBUG
-#endif // CONNECTIONMETHODLOGGER_H
--- a/cmmanager/cmmgr/Framework/Inc/cmmanager.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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:  Resource definitions for connection method manager
-*
-*/
-
-#ifndef CMMANAGER_HRH
-#define CMMANAGER_HRH
-
-#define  KDestListboxType     3432
-#define  KCmListboxType     3432
-#define  KCmDestIconMapType     3433
-
-enum TCmManagerUiMenuCommands  /// Commands.
-    {
-    ECmManagerUiCmdCmEdit =1234,
-    ECmManagerUiCmdCmAdd,
-    ECmManagerUiCmdCmRename,
-    ECmManagerUiCmdCmDelete,
-    ECmManagerUiCmdCmUserExit,
-    ECmManagerUiCmdCmPrioritise,
-    ECmManagerUiCmdCmMoveToOtherDestination,
-    ECmManagerUiCmdCmCopyToOtherDestination,
-    ECmManagerUiCmdDestEdit,
-    ECmManagerUiCmdDestDefaultConnection,
-    ECmManagerUiCmdDestUserExit,
-    ECmManagerUiCmdDestAdd,
-    ECmManagerUiCmdDestRename,
-    ECmManagerUiCmdDestChangeIcon,
-    ECmManagerUiCmdDestDelete,
-    ECmManagerUiCmdDestSelect,
-    ECmManagerUiCmdCMSelect,
-    ECmManagerUiCmdCmPrioOk,
-    ECmManagerUiCmdCmPrioCancel
-    };
- 
-#include "cmpluginmenucommands.hrh"
-    
-enum TCmManagerUiDlgLineIds // dialog line IDs
-    {
-    KDestListboxId = 1,
-    KCmListboxId,
-    KPluginBaseListboxId,
-    ECmDestIconMapContentId
-    };
-
-enum TCmDialogIds
-    {
-    ECmWaitDialog = 1
-    };
-    
-    
-#endif // CMMANAGER_HRH
--- a/cmmanager/cmmgr/Framework/Inc/cmmanagerimpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1018 +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:  Implementation of connection method manager
-*
-*/
-
-#ifndef CMMANAGERIMPL_H
-#define CMMANAGERIMPL_H
-
-// User Includes
-#include "cmmanager.hrh"
-#include "cmobjectpool.h"
-#include "cmconnectionmethodinfo.h"
-#include <datamobilitycommsdattypes.h>
-#include <cmmanagerdef.h>
-#include <cmdefconnvalues.h>
-#include <cmgenconnsettings.h>
-
-// System Includes
-#include <e32std.h>
-#include <e32base.h>
-#include <e32cmn.h>
-#include <f32file.h>    // RFs
-#include <barsc.h>      // RResourceFile
-#include <metadatabase.h>
-#include <commsdattypesv1_1.h>
-
-// Forward Declarations
-class CCmTransactionHandler;
-class CCmDestination;
-class CCmDestinationExt;
-class CCmDestinationImpl;
-class CCmPluginBaseEng;
-class CCmPluginBase;
-class CImplementationInformation;
-class TBearerPriority;
-class RConeResourceLoader;
-class CCmConnectionMethodInfo;
-class CGulIcon;
-class CCDGlobalBearerTypePriorizationRecord;
-class CCDDataMobilitySelectionPolicyRecord;
-class TCmPluginInitParam;
-class CCmDestinationData;
-class RCmManagerExt;
-class MCmCommsDatWatcher;
-class CCmCommsDatNotifier;
-
-// DATA TYPES
-typedef RPointerArray<CImplementationInformation>   RImplInfoPtrArray;
-typedef CCDGlobalBearerTypePriorizationRecord       CCmBearerPriRec;
-typedef CCDDataMobilitySelectionPolicyRecord        CCDSnapRecord;
-
-typedef struct
-    {
-    RResourceFile       iFile;  // resource file handler
-    TFileName           iFName; // resource filename
-    TInt                iRefs;  // number of references to this res file
-    }TResourceFiles;
-    
-/*#ifdef _DEBUG
-void DumIapTableL( CommsDat::CMDBSession& aSession );
-#define DUMP_IAP_TBL( session )  DumIapTableL( (session) );
-#else   // _DEBUG
-#define DUMP_IAP_TBL( session )
-#endif  // _DEBUG*/
-
-/**
- *  Implementation of connection method manager
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmManagerImpl ) : public CBase
-      {          
-    // Construction/Destruction
-    public:
-    
-        /** Epoc constructor */
-        static CCmManagerImpl* NewL( TBool aCreateTables = ETrue );
-        
-        /** Destructor */
-        virtual ~CCmManagerImpl();
-        
-    protected:
-    
-        /** First stage constructor */
-        CCmManagerImpl();
-    
-        /** Epoc constructor */
-        void ConstructL(); // second-phase constructor
-        
-    public: // Transaction handling API
-    
-        void OpenTransactionLC( TBool aSetAttribs = ETrue );
-        void CommitTransactionL( TInt aError );
-        void RollbackTransaction();
-        
-        // This will be called when the first UI view is on
-        void StartCommsDatNotifierL();
-        
-    public: // Basic CM attribute query API
-    
-        /**
-        * GetBearerInfoXXX function can be used to query
-        * bearer informantion that doesn't belong
-        * to a specific connection method, such as 
-        * ECmCoverage or ECmDefaultPriority etc.
-        * HBuf ownership is passed to the caller
-        */
-        IMPORT_C TUint32 GetBearerInfoIntL( TUint32 aBearerType,
-                                            TUint32 aAttribute ) const;
-        IMPORT_C TBool GetBearerInfoBoolL( TUint32 aBearerType,
-                                           TUint32 aAttribute ) const;
-        IMPORT_C HBufC* GetBearerInfoStringL( TUint32 aBearerType,
-                                              TUint32 aAttribute ) const;
-        IMPORT_C HBufC8* GetBearerInfoString8L( TUint32 aBearerType,
-                                                TUint32 aAttribute ) const;
-                    
-        /**
-        * GetConnectionMethodInfoXXX function can be used to 
-        * query any, non-bearer specific information about
-        * a given connection method. This can be e.g. ECmBearerType,
-        * ECmName, ECmStartPage etc.
-        * HBuf ownership is passed to the caller
-        */
-        IMPORT_C TUint32 GetConnectionMethodInfoIntL( 
-                                                TUint32 aCmId,
-                                                TUint32 aAttribute ) const;
-        IMPORT_C TBool GetConnectionMethodInfoBoolL( 
-                                                TUint32 aCmId,
-                                                TUint32 aAttribute ) const;
-        IMPORT_C HBufC* GetConnectionMethodInfoStringL( 
-                                                TUint32 aCmId,
-                                                TUint32 aAttribute ) const;
-        IMPORT_C HBufC8* GetConnectionMethodInfoString8L( 
-                                                TUint32 aCmId,
-                                                TUint32 aAttribute ) const;
-                
-                    
-    //=========================================================================
-    // Creation/Destruction API
-    //
-    public:
-              
-        /**
-        * Creates a Destination by the given name
-        *
-        * @since 3.2
-        * @param aName the name of the new destination
-        * @return CCmDestination*, ownership is passed to the caller
-        */
-        CCmDestinationImpl* CreateDestinationL( const TDesC& aName );
-
-        /**
-        * Creates a Destination by the given name
-        *
-        * @since 3.2
-        * @param aName the name of the new destination
-        * @param aDestId Predefined id for the destination
-        * @return CCmDestination*, ownership is passed to the caller
-        */
-        CCmDestinationImpl* CreateDestinationL( const TDesC& aName,
-                                                TUint32      aDestId );
-
-        
-        /**
-        * Creates a connection method does not belong to any destination
-        *
-        * @since 3.2
-        * @param aImplementationUid - implementation uid of the connection 
-        * method
-        * @param aParentDestination - the destination which holds the 
-        *                             connection method, NULL means there is
-        *                             no parent
-        * @return CCmPluginBase*
-        */
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aBearerType,
-                            CCmDestinationImpl* aParentDestination = NULL );
-
-        /**
-        * Creates a connection method does not belong to any destination
-        *
-        * @since 3.2
-        * @param aImplementationUid - implementation uid of the connection 
-        * method
-        * @param aConnMethodId Predefined id for the connection method
-        * @param aParentDestination - the destination which holds the 
-        *                             connection method, NULL means there is
-        *                             no parent
-        * @return CCmPluginBase*
-        */
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aBearerType,
-        		            TUint32 aConnMethodId,             
-                            CCmDestinationImpl* aParentDestination = NULL );
-        
-        /**
-        * Creates a connection method does not belong to any destination
-        *
-        * @since 3.2
-        * @param pluginBaseEng - Object to put in the pool
-        * @return CCmPluginBase*
-        */
-        CCmPluginBase* CreateConnectionMethodL( 
-                            CCmPluginBaseEng* pluginBaseEng );
-
-        /**
-        * Insert a connection method does not belong to any destination
-        * API doesn't use CCmPluginBase. So, nothing returns
-        *
-        * @param pluginBaseEng - Object to put in the pool
-        */
-        void InsertConnectionMethodL( 
-                            CCmPluginBaseEng* pluginBaseEng );
-        
-        /**
-        * Creates a connection method does not belong to any destination
-        *
-        * @since 3.2
-        * @param aBearerType - implementation uid of the connection 
-        * method
-        * @param aParams - the destination which holds the 
-        *                             connection method, NULL means there is
-        *                             no parent
-        * @return CCmPluginBaseEng*
-        */
-        CCmPluginBaseEng* DoCreateConnectionMethodL( TUint32 aBearerType,
-                                       TCmPluginInitParam& aParams );
-
-        /**
-        * Creates a connection method does not belong to any destination
-        *
-        * @since 3.2
-        * @param aBearerType Implementation uid of the connection 
-        * method
-        * @param aParams Initialization params for the plugin.
-        * @param aConnMethodId Predefined id for the connection method.
-        * @return CCmPluginBaseEng*
-        */
-        CCmPluginBaseEng* DoCreateConnectionMethodL( TUint32 aBearerType,
-            TCmPluginInitParam& aParams, TUint32 aConnMethodId );
-
-    //=========================================================================
-    // Getter-Setter API
-    //
-    public:    
-            
-        /**
-        * Calls FeatureManager::FeatureSupported directly.
-        *
-        * @since 3.2
-        * @param aFeature feature ID
-        * @return feature support status
-        * @since 3.2
-        */
-        static TBool FeatureSupported( TInt aFeature );
-        
-        /**
-        * Obsolete
-        */
-        IMPORT_C CCmPluginBaseEng* ConnectionMethodL( TUint32 aCmId );
-
-        /**
-        * Return the connection method queried by it's ID
-        *
-        * @since 3.2
-        * @param aCmId
-        * @return CCmPluginBase*
-        */
-        IMPORT_C CCmPluginBase* GetConnectionMethodL( TUint32 aCmId );
-        
-        /**
-        * Return the list of connection methods do not belongs to any 
-        * destination
-        *
-        * @since 3.2
-        * @param aCMArray on return it is the array of IAP ids.
-        * @param aCheckBearerType If ETrue only connection methods with 
-        *                         supported bearer types are returned
-        * @param aLegacyOnly when set to ETrue only Legacy IAP ids will
-        *                         be returned
-        * @param aEasyWlan when set to ETrue EasyWlan id is returned, too
-        * @param aSortByBearer if ETrue the CMs will be ordered according
-        *                      to global bearer priority
-        */        
-        IMPORT_C void ConnectionMethodL( RArray<TUint32>& aCMArray,
-                                         TBool aCheckBearerType = ETrue,
-                                         TBool aLegacyOnly = ETrue,
-                                         TBool aEasyWlan = EFalse,
-                                         TBool aSortByBearer = EFalse );
-        /**
-        * Return an array of all destinations
-        *
-        * @since 3.2
-        * @param aDestArray on return it returns an array of destination ids
-        */
-        IMPORT_C void AllDestinationsL( RArray<TUint32>& aDestArray );
-
-        /**
-        * Return the number of destinations
-        *
-        * @since 3.2
-        * @return the number of destinations
-        */
-        inline TUint DestinationCountL() { return iDestinationCount; }
-
-        /**
-        * Return the destination implementation to which a specified 
-        * connection method belongs, search is by destination ID ( the
-        * id which is made by RECORD_FROM_ELEMENT_ID from the elementID)
-        * If the  destination implementation is allready in the  object
-        * pool returns it. If it is not in the pool than puts it in the
-        * pool using the GetDestinationL funciton.
-        *
-        * @since 3.2
-        * @param aId
-        * @return a pointer to a destination
-        */
-        IMPORT_C CCmDestinationImpl* DestinationL( TUint32 aId );
-        
-        /**
-        * Removes the destination implementation 
-        * from the object pool
-        *
-        * @since 3.2
-        * @param aId
-        */
-        IMPORT_C void RemoveDestFromPool( CCmDestinationImpl* aDestination );
-        
-        /**
-        * Removes the destination implementation 
-        * from the object pool
-        *
-        * @since 3.2
-        * @param aId
-        */
-        void RemoveDestFromPool( CCmDestinationData* aDestination );
-        
-        /**
-        * Removes the cm 
-        * from the object pool
-        *
-        * @since 3.2
-        */
-        void RemoveCMFromPoolL( CCmPluginBaseEng* aCM );
-        
-        /**
-        * Removes the cm 
-        * from the object pool
-        *
-        * @since 3.2
-        */
-        void RemoveCMFromPoolL( CCmPluginBase* aCM );
-
-        /**
-        * The destination have been updated if it was a new destination
-        * than the zero id must be changed to the new one 
-        *
-        * @param aDestination - the destination to change
-        */         
-        void DestinationUpdated( CCmDestinationImpl* aDestination );
-              
-        /**
-        * Copie a connection method belonging to one destination to 
-        * another. The connection method becomes shared.
-        *
-        * @since 3.2
-        * @param aTargetDestination target destination
-        * @param aConnectionMethodId connection method to be copied
-        * @return index in the Connection Method list
-        */
-        TInt CopyConnectionMethodL( CCmDestinationImpl& aTargetDestination,
-                                    CCmPluginBase& aConnectionMethod );
-        
-        /**
-        * Move a connection method belonging to one destination to 
-        * another. The connection method is removed from the source destination
-        *
-        * @since 3.2
-        * @param aSourceDestination source destination
-        * @param aTargetDestination target destination
-        * @param aConnectionMethod connection method to be moved
-        * @return index in the Connection Method list which the connection 
-        *         method has been moved to
-        */
-        TInt MoveConnectionMethodL( CCmDestinationImpl& aSourceDestination,
-                                    CCmDestinationImpl& aTargetDestination,
-                                    CCmPluginBase& aConnectionMethod );
-        
-        /**
-        * Remove connection method from the destination
-        *
-        * @since 3.2
-        * @param aDestination destination the connection method is attached to
-        * @param aConnectionMethod connection method to be removed
-        */
-        void RemoveConnectionMethodL( CCmDestinationImpl& aDestination,
-                                      CCmPluginBase& aConnectionMethod );
-
-        /**
-        * Return the copy of the bearer priority array. Ownership is passed.
-        *
-        * @since 3.2
-        * @param aArray bearer priority array
-        */          
-        void BearerPriorityArrayL( RArray<TBearerPriority>& aArray ) const;
-        
-        /*
-        * Update bearer priority array
-        *
-        * @since 3.2
-        * @param aArray array with new global bearer priority
-        */          
-        void UpdateBearerPriorityArrayL( const RArray<TBearerPriority>& aArray );
-        
-        /**
-        * Clean up passed global bearer priority array. Delete
-        * the elements and calls Reset and Close on the array.
-        *
-        * @since 3.2
-        * @param aArray array to be cleaned up
-        */
-        void CleanupGlobalPriorityArray( RArray<TBearerPriority>& aArray ) const;
-        
-        /**
-        * Search service type in the global priority table and
-        * Return its priority.
-        *
-        * @since 3.2
-        * @param aUiPriority ETrue if UI priority is requested
-        * @param aServiceType serched service type 
-        * @return priority of the service type or KErrNotFound
-        */
-        TInt GlobalBearerPriority( TBool aUiPriority, 
-                                   const TDesC& aServiceType ) const;
-                                   
-        /*
-        * Query all of the supported bearer types.
-        *
-        * @since 3.2
-        * @param aArray list of all supported bearer types.
-        */          
-        void SupportedBearersL( RArray<TUint32>& aArray ) const;
-        
-        /*
-        * Return "Uncategorized" icon.
-        * This fucton leaves if the client does not have a valid UI context
-        *
-        * @since 3.2
-        * @return CGulIcon icon of uncategorized connection methods.
-        */          
-        CGulIcon* UncategorizedIconL() const;
-
-        /**
-        * Returns the id of the EasyWlan connection method.
-        *
-        * @since S60 3.2
-        * @return id of the EasyWLan connection method. 0 if not found
-        */
-        IMPORT_C TUint32 EasyWlanIdL();
-
-        /**
-        * Create a SNAP record object and load it if record id not 0.
-        * @param aRecordId record Id. 0 means create only
-        * @return created/loaded SNAP record
-        */
-        CCDSnapRecord* SNAPRecordL( TUint32 aRecordId ) const;
-
-        CCDSnapRecord* CreateSNAPRecordL( TUint32 aRecordId ) const;
-    
-        /**
-        * Tells the CmManager that the given default connection is deleted,
-        * and it sets Default Connection to Always Ask (default value).
-        *
-        * @since S60 3.2
-        */
-        void HandleDefConnDeletedL( TCmDefConnValue& aDCSetting );
-        /**
-        * Returns the default connection method/SNAP.
-        *
-        * @since S60 3.2
-        */
-        void ReadDefConnL( TCmDefConnValue& aDCSetting );   
-        /**
-        * Stores the default connection method/SNAP.
-        *
-        * @since S60 3.2
-        */
-        void WriteDefConnL( const TCmDefConnValue& aDCSetting );  
-        /**
-        * Returns the default connection method/SNAP.
-        *
-        * @since S60 3.2
-        */
-        void ReadDefConnWoTransL( TCmDefConnValue& aDCSetting );   
-        /**
-        * Stores the default connection method/SNAP.
-        *
-        * @since S60 3.2
-        */
-        void WriteDefConnWoTransL( const TCmDefConnValue& aDCSetting );  
-        /**
-        * Returs ETrue if Default Connection feature is supported.
-        *
-        * @since S60 3.2
-        */        
-        TBool IsDefConnSupported();
-        /**
-        * Check if memory low so that process can continue
-        */
-        TBool IsMemoryLow(); 
-        /**
-        * Returns the general connection settings.
-        */
-        void ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings );
-        /**
-        * Replaces the general connection settings.
-        */
-        void ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
-        /**
-        * Writes the general connection settings.
-        */
-        void WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
-        
-                
-    //=========================================================================
-    // Resource handling
-    //
-    public:
-        
-        /** add resource file */
-        void AddResourceFileL( TFileName& aName );
-        
-        /** 
-        * Remove resource file from array only if
-        * the reference count is zero.
-        * @param aName name of the resource file to be removed
-        */
-        void RemoveResourceFile( TFileName& aName );
-
-        /**
-        * Read string from resource
-        *
-        * @since 3.2
-        * @param aResourceId resource id of the localized string
-        * @return localized string
-        */
-        HBufC* AllocReadL( TInt aResourceId ) const;    
-    
-    //=========================================================================
-    // CM related functions
-    //
-    public:
-        
-        /**
-        * Return the number of references to the given connection method id
-        * in the DN_IAP table
-        *
-        * @since 3.2
-        * @param aId ID of the connection method        
-        * @param aRecSet entire record set of the detination table
-        * @return number of references to the connection method in DN_IAP table
-        */
-        TUint32 NumOfConnMethodReferencesL( 
-            TUint32 aId,
-            CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* aRecSet = NULL 
-            );
-        
-        /**
-        * Indicates is at least one non-"level 1 protected" destinations
-        *
-        * @since S60 3.2
-        * @return ETrue if at least one level 1 protected destination
-        */
-        TBool HasUnprotectedDestinationsL();
-        
-        /**
-        * Walks through every connection methods to find out
-        * if the passed connection method is linked to any of them.
-        * @param aPlugin connection method to be checked
-        * @return ETrue if linked
-        */
-        TBool IsIapLinkedL( const CCmPluginBaseEng& aPlugin );
-        
-        /**
-        * Removes all references to this CM from SNAP table.
-        */
-        void RemoveAllReferencesL( const CCmPluginBaseEng& aPlugin );
-
-        /**
-        * Removes all references to this CM from SNAP table without
-        * transaction to commsdat.
-        */
-        void RemoveAllReferencesWoTransL( const CCmPluginBaseEng& aPlugin );
-
-        /**
-        * Return the bearer type of connection method.
-        *
-        * @since 3.2
-        * @param aId id of the connection method
-        * @return bearer type of the connection method
-        */
-        TUint32 BearerTypeFromCmIdL( TUint32 aCmId );
-                
-        /**
-        * Return the bearer type of connection method.
-        *
-        * @since 3.2
-        * @param aIapRecord CommsDat record of the connection method
-        * @return bearer type of the connection method
-        */
-        TUint32 BearerTypeFromIapRecordL( CommsDat::CCDIAPRecord* aIapRecord ) const;
-
-    private:
-    
-        /**
-        * Find and create a connection method.
-        *
-        * @since 3.2
-        * @param aCmId id of the connection method
-        * @aParentDest parent destination of the connection method. Can be NULL.
-        */
-        CCmPluginBase* DoFindConnMethodL( TUint32 aCmId, 
-                              CCmDestinationImpl* aParentDest );
-    
-        /**
-        * Find and create a connection method.
-        *
-        * @since 3.2
-        * @param aCmId id of the connection method
-        * @aParentDest parent destination of the connection method. Can be NULL.
-        */
-        CCmPluginBaseEng* DoFindConnMethL( TUint32 aCmId, 
-                               CCmDestinationImpl* aParentDest );
-
-        /**
-        * Check the existence of tables we need.
-        * Creates if it is not exist, get the table id otherwise
-        */
-        void CheckTablesL();
-
-    public:
-    
-        /**
-        * Return the destination network table ID
-        *
-        * @since 3.2
-        * @return iDestinationTableId element id of the destination table
-        */        
-        inline CommsDat::TMDBElementId DestinationTableId() const { return iDestinationTableId; };
-        
-        /**
-        * Return Global Bearer Type Priorization Table ID
-        *
-        * @since 3.2
-        * @return element id of the bearer type priority.
-        */        
-        inline CommsDat::TMDBElementId BearerTypePriorizationTableId() const { return iBearerTypePriorizationTableId; };
-        
-        /**
-        * Return the Destination network - Icon table ID
-        *
-        * @since 3.2
-        * @return element id of the icon table.
-        */        
-        inline CommsDat::TMDBElementId IconTableId() const { return iIconTableId; };
-        
-        /**
-        * Return true if help is on in the FeatureManager
-        *
-        * @since 3.2
-        * @return TBool.
-        */        
-        inline TBool IsHelpOn() const { return iHelp; };
-
-        /**
-        * Return the Seamlessness table ID
-        *
-        * @since 3.2
-        * @return element id of the seamlessness table.
-        */        
-        inline CommsDat::TMDBElementId SeamlessnessTableId() const { return iSeamlessnessTableId; };
-        
-        /**
-        * Checks if the current environment has the given capability.
-        * Leaves with KErrPermissionDenied if capability is missing. 
-        *
-        * @since 3.2
-        * @param aCapability capability to be checked
-        */
-        static void HasCapabilityL( TCapability aCapability );
-        
-        /**
-        * Return an array of all IAP records.
-        * @return array of all IAP records
-        */
-        CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* AllIapsL();
-        
-        /**
-        * Return all the SNAP record. Filtering can be made on 
-        * passed SNAP elemented id.
-        * @return array of SNAP records
-        */
-        CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* 
-                    CCmManagerImpl::AllSNAPRecordsL( TUint32 aSnapElementId );
-        
-    public:
-    
-        CommsDat::CMDBSession& Session() const;
-
-        /**
-        * Wraps this implementation to an RCmManagerExt. OWNERSHIP IS NOT PASSED
-        * , SO NEVER CLOSE aCmManagerExt!!!
-        *
-        * @since 3.2
-        * @param aCmManagerExt class to wrap implementation into
-        */
-        
-        IMPORT_C void WrapCmManager( RCmManagerExt& aCmManagerExt );
-     
-        /** Remove the virtual methods from the passed list
-        *
-        * @since 3.2
-        * @param aCmDataArray array that contains the connection methods to be filtered
-        */
-        IMPORT_C void FilterOutVirtualsL( RPointerArray<CCmPluginBase>& aCmDataArray );
-
-        /** Create a 'flat list' of connection methods of a given destination
-        * ( connection methods inside embedded destinations which are in the destination,
-        * are also present in the list ) and
-        * order them according to the bearer type prioritisation rules
-        * and return the result in aCmArray.        
-        *
-        * @since 3.2
-        * @param aDestination destination that contains the connection methods
-        * for uncategorised connection methods, use KDestItemUncategorized
-        * @param aCmArray array to return the result
-        */
-
-        IMPORT_C void CreateFlatCMListL( TUint32 aDestination ,
-                                        RPointerArray<CCmPluginBase>& aCmArray );        
-                                        
-        /** Create a 'flat list' of connection methods of a given destination
-        * ( connection methods inside embedded destinations which are in the destination,
-        * are also present in the list ) and
-        * order them according to the bearer type prioritisation rules
-        * and return the result in aCmArray.        
-        * LC version        
-        *
-        * @since 3.2
-        * @param aDestination destination that contains the connection methods
-        * for uncategorised connection methods, use KDestItemUncategorized
-        * @param aCmArray array to return the result
-        */
-        IMPORT_C void CreateFlatCMListLC( TUint32 aDestination ,
-                                        RPointerArray<CCmPluginBase>& aCmArray );        
-      
-        
-        /** Get a list of uncategorised connection methods in an RPointerArray 
-        * contains the parameters passed to ConnectionMethodL
-        *
-        * @since 3.2
-        * @param aCmArray the returned list of uncategorised connection methods
-        * @param aCheckBearerType see ConnectionMethodL
-        * @param aLegacyOnly see ConnectionMethodL
-        * @param aEasyWlan see ConnectionMethodL
-        * @param aSortByBearer see ConnectionMethodL
-        */
-        void AppendUncatCmListL(RPointerArray<CCmPluginBase>& aCmArray,
-                                         TBool aCheckBearerType = ETrue,
-                                         TBool aLegacyOnly = ETrue,
-                                         TBool aEasyWlan = EFalse,
-                                         TBool aSortByBearer = EFalse );
-        
-        /** Get a list of uncategorised connection methods in an RPointerArray 
-        * contains the parameters passed to ConnectionMethodL
-        * LC version
-        *
-        * @since 3.2
-        * @param aCmArray the returned list of uncategorised connection methods
-        * @param aCheckBearerType see ConnectionMethodL
-        * @param aLegacyOnly see ConnectionMethodL
-        * @param aEasyWlan see ConnectionMethodL
-        * @param aSortByBearer see ConnectionMethodL
-        */
-        void AppendUncatCmListLC(RPointerArray<CCmPluginBase>& aCmArray,
-                                         TBool aCheckBearerType = ETrue,
-                                         TBool aLegacyOnly = ETrue,
-                                         TBool aEasyWlan = EFalse,
-                                         TBool aSortByBearer = EFalse );
-        
-        /**
-        * Returns a list of references to the connection methods in the destination. 
-        *
-        * @since 3.2
-        * @param aPluginArray A pointer array to hold the values
-        * ownership is passed
-        */
-        void AppendCmListL( TUint32 aDestintaionId, RPointerArray<CCmPluginBase>& aCmArray);
-        
-        /**
-        * Returns a list of references to the connection methods in the destination. 
-        *
-        * @since 3.2
-        * @param aPluginArray A pointer array to hold the values
-        * ownership is passed
-        */
-        // and puts it on the CleanupStack
-        void AppendCmListLC( TUint32 aDestintaionId, RPointerArray<CCmPluginBase>& aCmArray);
-
-        /**
-        * Returns a list of references to the connection methods in the supported uid list . 
-        *
-        * @since 3.2
-        * @param aPluginArray A pointer array to hold the values
-        * ownership is passed
-        */
-        void AppendCmListFromUidsL( RArray<TUint32>& cmIdList, RPointerArray<CCmPluginBase>& aCMArray );        
-
-        /**
-        * Returns internet destination id. If internety destination is not found then -1 is returned.
-        *
-        * @since 5.0
-        * @return Internet destination id
-        */
-        TUint32 GetInternetDestinationIdL();
-        
-        /**
-        * Register aWatcher as watcher for change of CommsDat
-        */
-        IMPORT_C void WatcherRegisterL( MCmCommsDatWatcher* aWatcher );
-        
-        /**
-         * UnRegister current watcher
-         */
-        IMPORT_C void WatcherUnRegister();
-        
-        /*
-         * Find if aDest is still existed if some change is watched
-         */
-        IMPORT_C TBool DestinationStillExistedL( CCmDestinationImpl* aDest );
-        
-        /*
-         * Find if an Iap is still existed if some change is watched
-         * 
-         * The Iap, as parameter, is contained in the instance aPlugin
-         */        
-        IMPORT_C TBool IapStillExistedL( const CCmPluginBaseEng& aPlugin );
-        
-        /*
-         * Find if an Iap is still in aDest if some change is watched
-         * 
-         * The Iap, as parameter, is contained in the instance aPlugin
-         */
-        IMPORT_C TBool IsIapStillInDestL( CCmDestinationImpl* aDest, const CCmPluginBaseEng& aPlugin );
-
-    private:
-            
-        /**
-        * Creates bearer priority array
-        *
-        * @since 3.2
-        */          
-        void CreateBearerPriorityArrayL();   
-        
-        /**
-        * Look for the given resource file in the resource
-        * file array and return the index value of it.
-        *
-        * @since 3.2
-        * @param aName resource file name, not localized
-        * @return index of the resource file in the array
-        */
-        TInt FindResourceFile( TFileName& aName ) const;
-        
-        /**
-        * Build an array of all bearer specific plugins.
-        *
-        * @since 3.2
-        */
-        void BuildPluginArrayL();
-    
-        /**
-        * Return the copy of the bearer priority array. Ownership is passed.
-        *
-        * @since 3.2
-        * @param aArray bearer priority array
-        */          
-        void CopyBearerPriorityArrayL( RArray<TBearerPriority>& aArray ) const;
-        
-        /**
-        * Return if the IAP record points to an EasyWLan service record.
-        *
-        * @since 3.2
-        * @param aIapRecord IAP record to be checked
-        * @return ETrue if AP is EasyWLan
-        */
-        TBool IsEasyWLanL( CommsDat::CCDIAPRecord* aIapRecord ) const;
-        
-        /**
-        * Replaces the Default Connection record with the new one.
-        *
-        * @since 3.2
-        * @param aDCSetting Default Connection value to set
-        */
-        void ReplaceDefConnRecordL( const TCmDefConnValue aDCSetting );
-        
-        /**
-        * Combines two lists of CCmPluginBase pointers into one, according to default
-        * priority order
-        *
-        * @since 3.2
-        * @param aCmArray first list of connection methods to combine
-        * @param aCmLinkedArray second list of connection methods to combine
-        */
-        void CombineArraysForPriorityOrderL( 
-                                        RPointerArray<CCmPluginBase>& aCmArray , 
-                                        RPointerArray<CCmPluginBase>& aCmLinkedArray );        
-
-
-        /**
-        * Gets the destination for the given element ID
-        *
-        * @since 3.2
-        * @param aCmId The element ID of the destination
-        * @return Id of the parent
-        */
-        TUint32 ParentDestinationL( TUint32 aCmId );
-                
-        /**
-        * Returns the default general connection values.
-        *
-        * @since 9.2
-        * @param aGenConnSettings The general connection settings structure
-        */
-        void SetGenConnSettingsToDefault( TCmGenConnSettings& aGenConnSettings );
-        
-        /** 
-         * Leaves if no sufficient is available for creation operations
-         * 
-         * @since 9.2
-         */
-        void CheckAvailableSpaceL();
-        
-	    /**
-         * Get Snap Table ID from CommsDat
-         */
-        TUint32 GetSnapTableIdL();
-
-        /**
-         * Check if the attribute is bearerspecific
-         *
-         * @since 9.2
-         * @param aAttribute  attribute-id to be checked
-         * @return ETrue if aAttribute is bearerspecific, otherwise EFalse
-         */
-        TBool IsBearerSpecific( TUint32 aAttribute ) const;
-        
-#include "cmmanagerimpl.inl"               
-    //=========================================================================
-    // Member data
-        
-    private:
-    
-        CCmTransactionHandler*          iTrans;
-        
-        RFs                             iFs;
-        CArrayPtrFlat<TResourceFiles>*  iResourceFiles;
-        
-        // Destination network table ID
-        CommsDat::TMDBElementId iDestinationTableId;
-        //Global Bearer Type Priorization Table
-        CommsDat::TMDBElementId iBearerTypePriorizationTableId;
-        // Destination network - Icon table
-        CommsDat::TMDBElementId iIconTableId;
-        // Destination network - Icon table
-        CommsDat::TMDBElementId iSeamlessnessTableId;        
-        // Default Connection table
-        CommsDat::TMDBElementId iDefConnTableId;        
-        // Bearer priorities
-        RArray<TBearerPriority>* iBearerPriorityArray;
-        
-        CArrayPtrFlat<const CCmPluginBaseEng>* iPlugins;
-        
-        CCmConnectionMethodInfo* iPluginImpl;
-        
-        TUint iDestinationCount;
-        
-        CCMObjectPool* iObjectPool;
-              
-        // for the FeatureManager
-        TBool iIsFeatureManagerInitialised;
-        TBool iHelp;
-        TBool iDefConnSupported;
-        TBool iCreateTables;
-        TBool iWLan;
-               
-        // For CommsDat watcher
-        CCmCommsDatNotifier* iCommsDatIapNotifier;
-        CCmCommsDatNotifier* iCommsDatSnapNotifier;
-    private:
-    
-        friend class CCmDestinationImpl;
-        friend class CCMObjectPool;
-        friend class CCmConnectionMethodInfo;
-    };
-
-#endif // CMMANAGERIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmmanagerimpl.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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:  Implementation of connection method manager
-*
-*/
-
-#ifndef CMMANAGERIMPL_INL
-#define CMMANAGERIMPL_INL
-
-public:
-        /**
-        * The cm have been updated if it was a new cm
-        * than the zero id must be changed to the new one 
-        *
-        * @param aCM - the cm to change
-        */         
-        inline void ConnMethodUpdatedL( CCmPluginBaseEng* aCM )
-            {
-            iObjectPool->ConnMethodUpdatedL( aCM );
-            iPluginImpl->ResetIfInMemory( aCM );
-            }
-
-public:
-        template<typename TArrayToCleanup>
-        /*
-        * Pushes an array to the CleanupStack, calling it's ResetAndDestroy
-        * when destroying it.
-        */
-        static void CleanupResetAndDestroyPushL(TArrayToCleanup& aPtr)
-            {
-            void (*p)(TAny*) = CCmManagerImpl::ResetAndDestroy<TArrayToCleanup>;
-            CleanupStack::PushL( TCleanupItem(p, (void*)(&aPtr)) );
-            }
-private:
-        /**
-        * A cleanup function for TCleanupItem construction for
-        * cleanup of pointers in an RPointerArray
-        * usage: 
-        * CleanupStack::PushL( TCleanupItem( CCmManagerImpl::DestroyRPointerArray<ItemTypeName>, (void*)(PointerToArray)) )
-        * @return TInt
-        */        
-        template<typename TArrayToCleanup>
-        static void ResetAndDestroy(TAny* aPtr)
-        {
-        TArrayToCleanup *p = static_cast <TArrayToCleanup*> (aPtr);
-        p->ResetAndDestroy();
-        }   
-#endif // CMMANAGERIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmobjectpool.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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:  Object pool for storing destinations and connection
-*                methods.
-*
-*/
-
-#ifndef CMOBJECTPOOL_H
-#define CMOBJECTPOOL_H
-
-class CCmPluginBaseEng;
-class CCmPluginBase;
-class CCmManagerImpl;
-
-// User includes
-#include "cmdestinationimpl.h"
-#include <e32def.h>
-
-/**
- *  Object pool to  hold destination implementations and 
- *  connetion method implementations
- *
- *  The get and remove functions must be used in pairs
- */
-NONSHARABLE_CLASS( CCMObjectPool ) : public CBase
-	{
-
-	public:
-		CCMObjectPool(CCmManagerImpl& aCmManagerImpl);
-		virtual ~CCMObjectPool();
-        /**
-        * If the destinaton impl is in the pool returns a pointer to it. 
-        * If the destinaton impl is not in the pool creates it.
-        *
-        * @param aDestinationId - ID of the destination requested
-        * @return pointer to the destination - ownership passed
-        */         
-        CCmDestinationImpl* GetDestinationL( TUint32 aDestinationId );
-        /**
-        * If the destinaton impl is in the pool returns a pointer to it. 
-        * If the destinaton impl is not in the pool creates it.
-        *
-        * @param aName - name of the destination requested
-        * @return pointer to the destination - ownership passed
-        */         
-        CCmDestinationImpl* GetDestinationL( const TDesC& aName );
-
-        /**
-        * Creates a destination if it does not exist.
-        * 
-        * @param aName - name of the destination requested
-        * @param aDestId - predefined id for the destination
-        * @return pointer to the destination - ownership passed
-        */         
-        CCmDestinationImpl* CreateDestinationL( const TDesC& aName, TUint32 aDestId );
-
-        /**
-        * Returns a pointer to an allready existing connecton method
-        *
-        * @param aCmId - ID of the CM requested
-        * @param aParentDest - parent destination
-        * @return plugin instance - ownership passed
-        */         
-        CCmPluginBase* GetConnectionMethodL( TUint32             aCmId, 
-                                             CCmDestinationImpl* aParentDest );
-        /**
-        * Creates cm and places it into the pool.
-        *
-        * @param aImplementationUid - Bearer Type
-        * @param aParams Init params for the plugin
-        * @return plugin instance - ownership passed
-        */         
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aImplementationUid, 
-                                 TCmPluginInitParam& aParams );
-
-        /**
-        * Creates cm and places it into the pool.
-        *
-        * @param aImplementationUid - Bearer Type
-        * @param aParams Init params for the plugin
-        * @param aConnMethodId Predefined id for the connection method.
-        * @return plugin instance - ownership passed
-        */         
-        CCmPluginBase* CreateConnectionMethodL( TUint32 aImplementationUid, 
-                                                TCmPluginInitParam& aParams,
-                                                TUint32 aConnMethodId );
-
-        /**
-        * Creates cm and places it into the pool.
-        *
-        * @param pluginBaseEng - Object to put in the pool
-        * @return plugin instance - ownership passed
-        */         
-        CCmPluginBase* CreateConnectionMethodL( CCmPluginBaseEng* pluginBaseEng );
-
-        /**
-        * Insert cm and places it into the pool.
-        * API doesn't use CCmPluginBase. So, nothing returns
-        *
-        * @param pluginBaseEng - Object to put in the pool
-        */         
-        void InsertConnectionMethodL( CCmPluginBaseEng* pluginBaseEng );
-
-        /**
-        * Removes a destination impl from the object pool. 
-        *
-        * @param aDestination - the destination to remove
-        */         
-        void RemoveDestination( CCmDestinationImpl* aDestination );
-        
-        /**
-        * Removes a destination data from the object pool. 
-        *
-        * @param aDestination - the destination to remove
-        */         
-        void RemoveDestination( CCmDestinationData* aDestination );
-        
-        /**
-        * Removes a connection method impl from the object pool. 
-        *
-        * @param aDestinationId - ID of the connection method to remove
-        */         
-        void RemoveConnectionMethodL( CCmPluginBase* aCM );
-        
-        /**
-        * Removes a connection method impl from the object pool. 
-        *
-        * @param aDestinationId - ID of the connection method to remove
-        */         
-        void RemoveConnectionMethodL( CCmPluginBaseEng* aCM );
-
-        /**
-        * This is called after the new destination have been updated 
-        * This function updates the iDestinationId 
-        * field in the TObjectPoolDestinationItem
-        *
-        * @param aDestination - the destination to change
-        */         
-        void DestinationUpdated( CCmDestinationImpl* aDestination );
-
-        /**
-        * This is called after the new cm have been updated 
-        * This function updates the Id 
-        * field
-        *
-        * @param aCM - the CM to change
-        */         
-        void ConnMethodUpdatedL( CCmPluginBaseEng* aCM );
-        
-    private:
-		class TObjectPoolDestinationItem  
-		    {
-		    public:
-                TObjectPoolDestinationItem(
-                        CCmDestinationData* aDestinationItem, 
-                        TUint32             aDestinationId);  
-    		    TInt                iDestinationId;
-    		    CCmDestinationData* iDestinationItem;
-		    };
-		class TObjectPoolCMItem  
-		    {
-		    public:
-                TObjectPoolCMItem(
-                        CCmPluginBaseEng* iConnectionMethodItem, 
-                        TUint32           iConnectionMethodId); 
-    		    TInt                iConnectionMethodId;
-    		    CCmPluginBaseEng*   iConnectionMethodItem;
-		    };
-	private:
-	    CCmManagerImpl&                     iCmManagerImpl;
-	    // object pool for holding destination implementations
-	    RArray<TObjectPoolDestinationItem>  iDestinationArray;
-	    // object pool for holding connetion method implementations
-	    RArray<TObjectPoolCMItem>           iConnectionMethodArray;
-};
-
-#endif // CMOBJECTPOOL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmpluginmenucommands.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /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:  Menu command ids for connection method plugins
-*
-*/
-
-#ifndef CMPLUGINMENUCOMMANDS_HRH
-#define CMPLUGINMENUCOMMANDS_HRH
-
-enum TCmPluginMenuCommands  /// Commands.
-    {
-    EPluginBaseCmdChange = 202,
-    EPluginBaseCmdAdvanced,
-    EPluginBaseCmdExit
-    };
-
-#endif // CMPLUGINMENUCOMMANDS_HRH
--- a/cmmanager/cmmgr/Framework/Inc/cmpluginmultilinedialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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:  Declaration of class CCmPluginMultiLineDialog.
-*
-*/
-
-#ifndef CM_PLUGIN_MULTILINE_DIALOG_H
-#define CM_PLUGIN_MULTILINE_DIALOG_H
-
-// INCLUDE FILES
-#include <AknQueryDialog.h>
-
-/**
- *  A new class to extend the functionality of the existing 
- *  CAKnMultiLineIpQueryDialog to be able to accept 0 length settings...
- *  Nothing else is changed.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmPluginMultiLineDialog ) : 
-                    public CAknMultiLineDataQueryDialog
-    {
-    public:
-
-        /**
-        * Multiline data query dialog, 2 lines
-        * @param aText1 Text1
-        * @param aText2 Text2
-        * @param aTone Tone 
-        * @return A constructed CCmPluginMultiLineDialog
-        */
-       IMPORT_C static CCmPluginMultiLineDialog* NewL(
-                            TDes&  aText1, TDes&  aText2, 
-                            TTone aTone = ENoTone);
-
-    protected:
-
-        /**
-        * If the query text is ok (retrieved form query controls) then 
-        * display the left soft key, otherwise hide it.
-        */
-        void UpdateLeftSoftKeyL();
-
-    private:
-
-        /**
-        * Constructor
-        * @param aTone Tone
-        */
-        CCmPluginMultiLineDialog( const TTone& aTone );
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/cmsettingsuiimpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of setting UI
-*
-*/
-
-#ifndef C_CMSETTINGSUIIMPL_H
-#define C_CMSETTINGSUIIMPL_H
-
-#include <e32def.h>
-#include <e32base.h>
-#include <ConeResLoader.h>
-
-class CCmManagerImpl;
-
-/**
- *  Implementation of setting UI
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmSettingsUiImpl) : public CBase
-    {
-    public:
-
-        /** Epoc constructor */
-        static CCmSettingsUiImpl* NewL();
-
-        /** Destructor */
-        virtual ~CCmSettingsUiImpl();
-
-    //=========================================================================    
-    // UI API
-    //
-    public:
-
-        /**
-        * Launches the Settings UI 
-        * for handling Destinations and Connection Methods
-        * @since 3.2
-        */
-        TInt RunSettingsL();
-        
-        /**
-        * Launches a dialog with a list of Destination
-        * @since 3.2
-        * @param  aDestinationId ID of the selected Destination
-        * @return TBool
-        */
-        TBool SelectDestinationDlgL( TUint32& aDestinationId );
-        
-        /**
-        * Launches the dialog for adding connection methods
-        * @since 3.2.3
-        * @param  aDestUid destination id for the new cm
-        * @param  aBearerType bearer type for the new cm
-        * @return TUint32 id of the new cm
-        */
-        TUint32 AddCmL( TUint32& aDestUid, TUint32 aBearerType );
-
-        /**
-        * Launches the dialog for editing connection methods
-        * @since 3.2.3
-        * @param  aCmId id of the cm to edit
-        * @return TInt - KDialogUserExit or KDialogUserBack
-        */
-        TInt EditCmL( TUint32 aCmId );
-
-
-    private:
-
-        /** First stage constructor */
-        CCmSettingsUiImpl();
-
-        /** Epoc constructor */
-        void ConstructL();
-
-        /** Load resource */
-        TInt LoadResourceL ();
-
-    private: // data
-
-        CCmManagerImpl* iCmManagerImpl;
-        RConeResourceLoader iResourceReader;
-    };
-
-#endif // C_CMSETTINGSUIIMPL_H
--- a/cmmanager/cmmgr/Framework/Inc/cmtransactionhandler.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +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:  Implementation of transaction handler
-*
-*/
-
-#ifndef CMTRANSACTION_HANDLER_H
-#define CMTRANSACTION_HANDLER_H
-
-#include <commsdattypesv1_1.h>
-
-/**
- *  Transaction handler.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmTransactionHandler ) : public CBase
-    {
-    public:
-
-        /** Epoc constructor */
-        static CCmTransactionHandler* NewL( CommsDat::CMDBSession& aDb );
-        
-        // destructor is intentionally not virtual.
-        ~CCmTransactionHandler();
-
-    public:
-    
-        /**
-        * @return commsdat session
-        */
-        CommsDat::CMDBSession& Session()const{ return iDb; };
-        
-        /**
-        * - Checks if transaction is already opened
-        * - Set iOwnTransaction is not and opens it and
-        *   put 'this' on cleanup&close stack
-        */
-        void OpenTransactionLC( TBool aSetAttribs = ETrue );
-        
-        /**
-        * - Checks if the transaction is ours.
-        * - If yes, commits the transaction.
-        * - anyway does nothing
-        * @praram aError - error id
-        */
-        void CommitTransactionL( TInt aError = KErrNone );
-        
-        /**
-        * Performs RollbackTransactionL().
-        */
-        void Close();     
-
-    private:
-    
-        /** Constructor. */
-        CCmTransactionHandler( CommsDat::CMDBSession& aDb );
-
-        /**
-        * Second phase constructor. Leaves on failure.
-        */      
-        void ConstructL();
-
-    private: // data
-    
-        CommsDat::CMDBSession&    iDb;   ///< Not owned CommsDat session pointer
-        TUint32         iRefCount;
-        TUint32         iProtectionFlag;
-    };
-
-#endif // CMTRANSACTION_HANDLER
--- a/cmmanager/cmmgr/Framework/Inc/cmwizard.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +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:  Wizard used for adding connection methods
-*
-*/
-
-#ifndef T_TCMWIZARD_H
-#define T_TCMWIZARD_H
-
-// INCLUDE FILES
-#include <e32def.h>
-#include <AknProgressDialog.h>
-
-// FORWARD DECLARATIONS
-class CAknWaitDialog;
-class CCmDestinationImpl;
-class CCmManagerImpl;
-class CCmPluginBase;
-
-/**
- *  Connection Method wizard
- *
- *  Wizard used for creating a new Connection Method.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmWizard ) : public CBase,
-                                 public MProgressDialogCallback
-    {
-    public: // constructor
-
-        /**
-         * Constructor.
-         *
-         * @param aCmManager Connection Method Manager implementation passed
-         * for queries.
-         */
-        CCmWizard( CCmManagerImpl& aCmManager );
-
-        /**
-        * Destructor.
-        */
-        ~CCmWizard();
-
-    public: // public methods
-    
-        /**
-        * Key method for creating a new Connection Method. This function
-        * guides the user through several steps and then finally creates
-        * a new Connection Method based on the information the user has given.
-         * @param aTargetDestination Target destination to which the new
-         * connection method will be added. Can be NULL if the
-         * destination is to be selected by the user later on (via a dialog).
-        */
-        TInt CreateConnectionMethodL
-                            ( CCmDestinationImpl* aTargetDestination = NULL );
-
-    public: // from MProgressDialogCallback
-    
-        /**
-        * @see MProgressDialogCallback mixin for more details.
-        */
-        void DialogDismissedL( TInt aButtonId );
-
-    private: // internal helper methods
-    
-        /**
-        * Shows a dialog asking the user if he/she wants to have the available
-        * connection methods automatically checked for.
-        * @return ETrue if the user wants the conn methods be automatically
-        * discovered, EFalse if he/she wants to discover them manually.
-        */
-        TBool AutoCheckForCmsL() const;
-
-        /**
-        * If automatic CM detection has failed, the user is prompted a dialog
-        * asking if he/she wants to proceed with manual configuration.
-        * @return ETrue if the user wants to proceed with manual configuration,
-        * EFalse otherwise.
-        */
-        TBool ManualCheckForCmsL() const;
-
-        /**
-        * Checks for availability of packet data and WLAN bearer types. Shows
-        * a wait dialog until discovery is not complete.
-        * @param aCoverageArray This array is supposed to hold the UIDs of
-        * bearers that have network coverage for the moment.
-        */
-        void CheckForCmsL( RArray<TUint32>& aCoverageArray );
-        
-        
-        /**
-         * Finds the target destination to which the currently creted VPN
-         * connection method points. It can be a destination or the destination
-         * which includes the connection method to which the VPN points.
-         * @param aPlugin VPN plugin.
-         * @return the Id of the destination 
-         */
-        TUint32 FindTargetDestinationL( CCmPluginBase* aPlugin );
-
-        /**
-         * Finds the parent destination of a connection method.
-         * @param Id of the connection method
-         * @return Id of the destination which contains cmId 
-         */
-        TUint32 FindParentDestinationL( TUint32 aCmId );
-
-    private: // data
-    
-        CAknWaitDialog* iCheckConnDlg;  ///< Owned.
-        TBool iCheckConnDlgCancelled;
-        
-        CCmManagerImpl& iCmManager;     ///< Only a reference == not owned.
-        CActiveSchedulerWait    iWait;
-    };
-
-#endif // T_TCMWIZARD_H
--- a/cmmanager/cmmgr/Framework/Inc/destdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +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:  Dialog for displaying and editing destinations.
-*
-*/
-
-#ifndef DESTDIALOG_H
-#define DESTDIALOG_H
-
-//  INCLUDES
-#include <AknForm.h>
-#include <cmsettingsui.h>
-#include "destlistboxmodel.h"
-#include "destlistbox.h"
-#include "cmmanagerimpl.h"
-#include "cmconnsettingsuiimpl.h"
-#include <mcmdexec.h>
-#include "cmcommsdatnotifier.h"
-
-// CLASS DECLARATION
-class CEikStatusPane;
-class CAknTitlePane;
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class CCmWizard;
-class CCmdExec;
-
-/**
-*  Dialog for setting the gateway's IP address
-*/
-NONSHARABLE_CLASS( CDestDlg ) : public CAknDialog
-                              , MEikListBoxObserver
-                              , public MCmdExec
-                              , public MCmCommsDatWatcher
-    {
-    public :    // construction
-    
-        /**
-        * Default constructor.
-        */
-        CDestDlg();
-
-        /**
-        * Destructor.
-        */
-        ~CDestDlg();
-        
-         /**
-        * Create and launch dialog.
-        * @return           The code returned by the dialogs' ExecuteLD
-        */
-        TInt ConstructAndRunLD( CCmManagerImpl* aCmManager, TUint32 aHighLight, 
-                                TUint32& aSelected, TBool& aExiting );
-
-        // From MEikMenuObserver
-        virtual void DynInitMenuPaneL( TInt aResourceId, 
-                                       CEikMenuPane* aMenuPane );
-
-        // From MEikCommandObserver
-        virtual void ProcessCommandL( TInt aCommandId ) ; 
-
-        /**
-        * Updates listbox data
-        */
-        void HandleListboxDataChangeL();
-
-        /**
-        * Handle key event.
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return Response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL
-            ( const TKeyEvent& aKeyEvent, TEventCode aType );        
-        
-     
-	public:
-        /**
-         * From base class MCmdExec
-         */
-        void Execute();
-
-        /**
-         * From base class MCmdExec
-         */
-        void CDestDlg::HandleLeaveError( TInt aError );
-
-    public: // From CCoeControl
-    
-        /**
-        * Returns the help context
-        * From CCoeControl
-        * 
-        * @since S60 3.2
-        * @param aContext the returned help context
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-        /**
-        * Handles the resource change
-        * From CCoeControl
-        * 
-        * @since S60 5.0
-        * @param aType Type of the resource change
-        */
-		void HandleResourceChange( TInt aType );
-        
-        /**
-        * Show default connection note
-        * 
-        * @since S60 5.0
-        * @param aOldConn Old default connection
-        */
-        void ShowDefaultConnectionNoteL(TCmDefConnValue aOldDefConn);
-        
-    public: // From MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-        
-    protected :    // from CEikDialog
-    
-        /**
-        * Set the gateway's IP address, if the user pressed OK.
-        * @param aButtonId The ID of the pressed button.
-        * @return May the dialog exit?
-        */
-        TBool OkToExitL( TInt aButtonId ) ;
-        
-        void PreLayoutDynInitL();
-        
-        SEikControlInfo CreateCustomControlL ( TInt aControlType );
-
-        // From MEikListBoxObserver
-        void HandleListBoxEventL( CEikListBox* aListBox, 
-                                  TListBoxEvent aEventType );
-                                  
-        /**
-        * Sets the number of connections text on navi pane
-        */                                  
-        void SetNoOfDestsL(TInt aCount);                                  
-
-    private:
-    
-        /**
-        * Initialises listbox texts
-        */    
-        void InitTextsL();
-
-        /**
-        * Creates a new destination and adds it to Destination view.
-        */
-        void AddDestinationL();
-        
-        /**
-        * Called when user selected edit on a destination.
-        */
-        void OnCommandDestinationEditL();
-        
-        /**
-        * Called when user selected delete on a destination.
-        */
-        void OnCommandDestinationDeleteL();
-        
-        /**
-        * Called when user selected rename on a destination.
-        */
-        void OnCommandDestinationRenameL();
-        
-        /**
-        * Called when destination is about to be deleted.
-        */
-        TBool IsThereProtectedMethodL( CCmDestinationImpl* aDest );
-        
-        /**
-        * Sets the text of the middle soft key by the text resource. 
-        */
-        void CDestDlg::SetMskL( TInt aResourceId );
-        
-        /**
-        * Shows the 'Default set to:' note.
-        */
-        void ShowDefaultSetNoteL(TCmDefConnValue aSelection);
-        
-        /**
-        * Shows the 'Default:' in navi pane.
-        */
-        void SetDefaultNaviL( TCmDefConnValue aSelection );
-        
-        /**
-        * Counts how many CMs can be displayed.(Shouldn't display
-        * CMs for which the plugin is not loaded.)
-        */
-        TUint32 NumberOfCMsL( RArray<TUint32> cmArray );
-
-        /**
-        * Enforced to release allocated memory and reset protection
-        * when some exceptions occur
-        */
-        void EnforcedResetCDestDlg();
-     
-    protected:
-    
-        CDestListboxModel*      iModel;
-        CDestListbox*           iListbox;
-        TUint32                 iHighlight;
-        TUint32*                iSelected;           
-        TBool                   iModelPassed;
-        CEikStatusPane*         iStatusPane;    // NOT owned
-        CAknTitlePane*          iTitlePane;     // NOT owned
-        CAknNavigationControlContainer* iNaviPane;      // NOT owned
-        CAknNavigationDecorator*        iNaviDecorator; // owned
-        HBufC*                  iOldTitleText;
-        CCmManagerImpl*         iCmManagerImpl; // NOT owned
-        TInt                    iExitReason;    // Exit reason, can be 
-                                                // KUserExit or KUserBack
-                                                // used to pass user exit event   
-        CCmConnSettingsUiImpl* iConnSettingsImpl;
-        CCmdExec*             iCmdExec;        
-        
-     private:     
-
-        CCmWizard*          iCmWizard; // wizard for connection method creation
-        // Indicated that Escape has arrived and it should be forwarded when CmWizard
-        // finished its work
-        TBool               iEscapeArrived;
-        
-        // Indicates whether the Exit button was pressed. Not owned.
-        TBool*              iExiting;
-        
-        // This dialog shouldn't exit while processing in a plugin
-        // Indicates whether processing or not
-        TBool               iProcessing;
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/destlistbox.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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:  Declaration of class CDestListbox.
-*
-*/
-
-#ifndef APSELECTOR_LISTBOX_H
-#define APSELECTOR_LISTBOX_H
-
-// INCLUDE FILES
-#include <aknlists.h>
-
-// FORWARD DECLARATION
-class CDestListboxModel;
-
-/**
- *  Model for the destinations listbox. It is an array of CDestListItem
- *  pointers; items are owned.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CDestListbox ) : public CAknDoubleLargeStyleListBox
-    {
-    public:     // Construct / destruct
-
-        /**
-        * Two-phased constructor. Leaves on failure.
-        * @param aParent Parent control.
-        * @return The constructed listbox.
-        */
-        static CDestListbox* NewL
-            ( const CCoeControl* aParent );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CDestListbox();
-
-        /**
-        * Constructor.
-        */
-        CDestListbox();
-
-    public:
-    
-        /**
-        * Handle key event.
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return Response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL
-            ( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-        /**
-        * Handle focus change.
-        * @param aDrawNow Draw now?
-        */
-        void FocusChanged( TDrawNow aDrawNow );
-
-        /**
-        * Gets the UID from a given item
-        * @param    The index of the item
-        * @return   The UID of the item given by itemindex
-        */
-        TUint32 Uid4Item( TInt aItem ) const;
-
-        /**
-        * Gets the UID of the current item
-        * @return  The UID of the current item
-        */
-        TUint32 CurrentItemUid() const;
-
-        /**
-        * Gets the name of the current item
-        * @return The name of the current item
-        */
-        const TDesC& CurrentItemNameL();
-        
-
-        // from CCoeControl
-        void HandleResourceChange(TInt aType);
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/destlistboxmodel.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +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:  Declaration of class CDestListboxModel.
-*
-*/
-
-#ifndef DESTLISTBOX_LISTBOX_MODEL_H
-#define DESTLISTBOX_LISTBOX_MODEL_H
-
-// INCLUDE FILES
-#include <eikdialg.h>
-#include "destlistitemlist.h"
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat.h>
-#else
-#include <commsdat.h>
-#include <commsdat_partner.h>
-#endif
-
-// CONSTANTS
-// Granularity of the model array.
-const TInt KGranularity = 8;
-_LIT( KListItemFormatDestProt, "%d\t%S\t%S\t%d" );
-_LIT( KListItemFormatDest, "%d\t%S\t%S" );
-const TInt KMaxFormatSize = sizeof( KListItemFormatDest );
-const TInt KMaxListItemNameLength = CommsDat::KMaxTextLength;
-const TInt KMaxDestListboxName = KMaxListItemNameLength+KMaxFormatSize;
-
-/**
- *  Model for the destinations listbox.
- *  pointers; items are owned.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CDestListboxModel ) : public CDestListItemList
-                                       , public MDesCArray
-    {
-    public:     // Construct / Destruct
-
-        /**
-        * Constructor.
-        * @param aGraphicType   The used graphic type
-        */
-        CDestListboxModel();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CDestListboxModel();
-
-    public:     // from MDesCArray
-
-        /**
-        * Get number of items in the model.
-        * @return Number of items.
-        */
-        TInt MdcaCount() const;
-
-        /**
-        * Text to be displayed for this item.
-        * @param aIndex Index of item.
-        * @return TPtrC for this item text (text owned by the model).
-        */
-        TPtrC MdcaPoint( TInt aIndex ) const;
-
-    public:        
-        
-        /**
-        * Sets the icon offset
-        * @param aOffset    The offset of our icons in the iconarray
-        */
-        void SetOwnIconOffset( TInt aOffset );
-
-    private:    // data
-    
-        /**
-        * Formats the text of the listbox, calls the leaving version trapped.
-        * @param aIndex Index of item.
-        * @param aBuf Buffer to store formatted text.
-        */
-        void FormatListboxText( TInt aIndex, TDes& aBuf ) const;
-
-        /**
-        * Formats the text of the listbox, leaving version.
-        * @param aIndex Index of item.
-        * @param aBuf Buffer to store formatted text.
-        */
-        void FormatListboxTextL( TInt aIndex,
-                                                TDes& aBuf ) const;
-        /**
-        * MdcaPoint() cannot leave, so this buffer is allocated
-        * to allow formatting. Fortunately, doesn't have to be very
-        * large.
-        * We have to use MUTABLE CAST, as MdcaPoint is const (odd enough),
-        * so wouldn't allow formatting the text in a member...
-        */
-        __MUTABLE TBuf<KMaxDestListboxName> iBuf;
-        TInt iOffset;
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/destlistitem.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     Declaration of the CDestSelect class.
-*
-*/
-
-
-#ifndef CDESTLISTITEM_H
-#define CDESTLISTITEM_H
-
-#include <e32base.h>
-#include <cmmanagerdef.h>
-
-/**
- *  Representation of a destinations list item.
- *  This class is used to hold the main information of a destination.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CDestListItem ) : public CBase
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor. Leaves on failure, places instance
-        * on cleanup stack.
-        * @param aUid The ID of the destination
-        * @param aName The name of the destination
-        * @param aNumOfCMs the number of connection methods belonging to the destination
-        * @param aIconIndex The icon index of the destination
-        * @param aIsProtected Whether the given item is read-only or not
-        * @return The constructed CDestListItem.
-        */
-         static CDestListItem* NewLC( TUint32 aUid,
-                                      HBufC* aName,
-                                      TInt aNumOfCMs, 
-                                      TUint aIconIndex, 
-                                      CMManager::TProtectionLevel aProtectionLevel,
-                                      TBool aIsDefault );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CDestListItem();
-
-    protected:      // Constructors
-    
-        /**
-        * C++ default constructor.
-        */
-        CDestListItem( HBufC* aName );
-        
-        /**
-        * Second-phase constructor.
-        * @param aUid The ID of the destination
-        * @param aNumOfCMs the number of connection methods belonging to the destination
-        * @param aIconIndex The icon index of the destination
-        * @param aIsProtected Whether the given item is read-only or not
-        * @return The constructed CDestListItem.
-        */
-        void ConstructL( TUint32 aUid,
-                         TInt aNumOfCMs, 
-                         TUint aIconIndex, 
-                         CMManager::TProtectionLevel aProtectionLevel,
-                         TBool aIsDefault );
-    public: // New functions
-
-        /**
-        * Gets the name of the 'current' destination
-        * Ownership of the returned text is not passed.
-        * @return The name of the current destination
-        */
-        const TDesC& Name();
-
-        /**
-        * Gets the UID of the current destination
-        * @return The UID of the current destination
-        */
-        TUint32 Uid();
-
-        /**
-        * Gets the number of connection mehtods belonging to the current destination
-        * @return The number of connection mehtods belonging to the current destination
-        */
-        TInt NumOfCMs();
-         
-        /**
-        * Gets the IconIndex of the current destination
-        * @return The IconIndex of the current destination
-        */
-        TUint IconIndex();
-
-        /**
-        * Returns the destination's protected flag
-        * @return ETrue if the destination is protected
-        */ 
-        TUint IsProtected();
-        /**
-        * Returns the Protection Level
-        * @return TProtectionLevel
-        */ 
-        CMManager::TProtectionLevel GetProtectionLevel();
-        TUint IsDefault();
-
-    private:    // Data
-
-        TUint32         iUid;           ///< The ID of the destination
-        HBufC*          iName;          ///< The name of the destination
-        TInt            iNumOfCMs;      ///< The number of connection mehtods belonging to the
-                                        //// destination
-        TUint           iIconIndex;     ///< The iIconIndex of the destination
-        TBool           iIsProtected;   ///< The IsProtected flag of the destination
-        TBool           iIsDefault;   ///< The IsDefault flag of the destination
-        CMManager::TProtectionLevel iProtectionLevel;
-    };
-
-#endif      // CDESTLISTITEM_H
--- a/cmmanager/cmmgr/Framework/Inc/destlistitemlist.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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:  Declaration of the CDestListItemList class.
-*
-*/
-
-#ifndef CDestLISTITEMLIST_H
-#define CDestLISTITEMLIST_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATION
-class CDestListItem;
-
-/**
- *  A list of CDestListItem-s pointers; items are owned.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CDestListItemList ) : public CArrayPtrFlat<CDestListItem>
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CDestListItemList();
-
-        /**
-        * Destructor. Items in the list are destroyed.
-        */
-        virtual ~CDestListItemList();
-
-    public:  // New methods
-
-        /**
-        * Get pointer to the item having aUid,
-        * or NULL if no such item is in the
-        * list.
-        * @param aUid Uid of item to get.
-        * @return Pointer to the item having uid aUid, or NULL. Ownership
-        * not passed (the list still owns the item).
-        */
-        CDestListItem* ItemForUid( TUint32 aUid ) const;
-    };
-
-#endif
--- a/cmmanager/cmmgr/Framework/Inc/selectdestinationdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +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:  Shows the "Select destination:" dialog, where the user can 
-                 select one of the available destinations.
-*
-*/
-
-#ifndef SELECTDESTINATIONDLG_H
-#define SELECTDESTINATIONDLG_H
-
-// INCLUDES
-#include <aknlistquerydialog.h>
-
-// FORWARD DECLARATIONS
-class CCmManagerImpl;
-class CCmDestinationImpl;
-
-// CLASS DECLARATION
-
-/**
- *  Show a query containing a title, a message box (contain a short explanation
- *  of the query) and a listbox. The listbox contains a list of available
- *  destinations from which the user can choose.
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CSelectDestinationDlg ) : public CAknListQueryDialog
-    {
-    public: // Constructors, destructor
-    
-        /**
-        * Two-phase constructor.
-        * @param aDestinationId Variable reference used to hold the return
-        * value of list selection.
-        * @param aCmManager Reference to CM Manager implementation used for
-        * querying destination specific data.
-        * @return Newly created dialog object.
-        */
-        static CSelectDestinationDlg* NewL( 
-                                        TUint32& aDestinationId,
-                                        CCmManagerImpl& aCmManager,
-                                        RArray<TUint32>* aDestArray = NULL);
-
-        /**
-        * Two-phase constructor.
-        * @param aDestinationId Variable reference used to hold the return
-        * value of list selection.
-        * @param aCmManager Reference to CM Manager implementation used for
-        * querying destination specific data.
-        * @return Newly created dialog object.
-        */
-        static CSelectDestinationDlg* NewLC( 
-                                        TUint32& aDestinationId,
-                                        CCmManagerImpl& aCmManager,
-                                        RArray<TUint32>* aDestArray = NULL);
-
-        /**
-        * Destructor.
-        */
-        ~CSelectDestinationDlg();
-
-    private: // constructors
-    
-        /**
-        * Constructor.
-        */
-        CSelectDestinationDlg( TInt aDummyIndex, TUint32& aDestinationId );
-
-        /**
-        * Second-phase constructor.
-        * @param aCmManager Reference to CM Manager implementation used for
-        * querying destination specific data.
-        */
-        void ConstructL( CCmManagerImpl& aCmManager, 
-                         RArray<TUint32>* aDestArray );
-
-    private: // From CAknListQueryDialog
-    
-        /**
-        * @see CAknListQueryDialog
-        */
-        virtual void PreLayoutDynInitL();
-
-        /**
-        * @see CAknListQueryDialog
-        */
-        TBool OkToExitL( TInt aButtonId );
-
-    private: // internal helper methods
-    
-        /**
-        * Handle resource change events. 
-        * @param aType: The type of resources that have changed
-        */
-        void HandleResourceChange( TInt aType );
-
-    private:  // New functions
-
-        /**
-        * Sets graphic icons
-        */
-        void SetIconsL();
-
-    private: //data
-
-        TUint32& iDestinationId;
-        RPointerArray<CCmDestinationImpl> iDestinations;
-    };
-
-#endif  // SELECTDESTINATIONDLG_H
--- a/cmmanager/cmmgr/Framework/Inc/uncatdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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:  Dialog for displaying and editing legacy connection methods
-*
-*/
-
-#ifndef UNCATDIALOG_H
-#define UNCATDIALOG_H
-
-//  INCLUDES
-#include "cmdlg.h"
-
-// CLASS DECLARATION
-class CEikStatusPane;
-class CAknTitlePane;
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-
-typedef struct
-    {
-    CCmPluginBase*      iPlugin;
-    TUint32             iCmId;
-    }TUncatItem;
-    
-/**
- *  Dialog for displaying and editing legacy iaps
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CUncatDlg ) : public CCmDlg
-    {
-    public :    // construction
-    
-        /** Epoc constructor */
-        static CUncatDlg* NewL( CCmManagerImpl* aCmManager );
-
-        /** Destructor. */
-        ~CUncatDlg();
-        
-    public: // New functions
-    
-        /**
-        * Create and launch dialog.
-        * @return The code returned by the dialogs' ExecuteLD
-        */
-        TInt ConstructAndRunLD( TUint32 aHighLight, TUint32& aSelected );        
-
-        // From MEikMenuObserver
-        void DynInitMenuPaneL( TInt aResourceId, 
-                               CEikMenuPane* aMenuPane );
-
-        // From MEikCommandObserver
-        void ProcessCommandL( TInt aCommandId ) ; 
-        
-        /**
-        * Updates listbox data
-        */
-        void ConstructCMArrayL( RArray<TUint32>& aCmIds );
-        
-        /**
-        * Remove hidden Connection Methods from the Array
-        */
-        void ClearHiddenCMsFromArrayL( RArray<TUint32>& aCmIds );
-        
-    public: // From MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */        
-        void CommsDatChangesL();
-                
-       private:    // Constructor 
-        
-        /**
-        * Default constructor.
-        */
-        CUncatDlg( CCmManagerImpl* aCmManager );
-
-    private :    // from CEikDialog
-    
-        /**
-        * Set the gateway's IP address, if the user pressed OK.
-        * @param aButtonId The ID of the pressed button.
-        * @return May the dialog exit?
-        */
-        void InitTextsL();   
-        
-        /**
-        * Returns the currently focused connection method in the list
-        */
-        CCmPluginBase* CurrentCML(); 
-                
-        /**
-        * Returns the connection method in the list at the specified index
-        */
-        CCmPluginBase* CMByIndexL( TInt aIndex );
-       
-        /**
-        * Returns the connection mehtod count
-        */
-        TInt CMCount();
-        
-        /**
-        * Cleans up iCmUncatItems
-        *
-        * @param aReuse whether the array will be used again or not
-        * @since S60 3.2
-        */
-        void CleanupUncatArray( TBool aReuseArray = EFalse );
-
-    protected:
-    
-        RArray<TUncatItem>   iCmUncatItems;
-    };
-
-#endif
-
-// End of File
--- a/cmmanager/cmmgr/Framework/Src/ccmdexec.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Execute command without blocking the process. Needed for
-*                touch UI implementation.
-*
-*/
-
-#include <e32base.h>
-#include <mcmdexec.h>
-#include "ccmdexec.h"
-
-// ----------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that might leave.
-// ----------------------------------------------------------------------------
-//
-CCmdExec::CCmdExec(MCmdExec& aOwner) :
-    CActive( CActive::EPriorityStandard ),
-    iOwner(aOwner)
-    {
-    CActiveScheduler::Add(this);
-    }
-
-// ----------------------------------------------------------------------------
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CCmdExec::~CCmdExec()
-    {
-    Cancel();
-    }
-
-void CCmdExec::Execute()
-    {
-    // Cancel possible previous request
-    Cancel();
-    
-    // Do request
-    TRequestStatus *requestStatus = &iStatus;
-    User::RequestComplete(requestStatus, KErrNone);
-    SetActive();
-    }
-            
-void CCmdExec::RunL()
-    {
-    iOwner.Execute();
-    }
-
-TInt CCmdExec::RunError( TInt aError )
-    {
-    if (aError != 0)
-        iOwner.HandleLeaveError( aError );
-    return KErrNone;
-    }
-
-void CCmdExec::DoCancel()
-    {
-    
-    }
--- a/cmmanager/cmmgr/Framework/Src/ccmpluginbaseeng.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3531 +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:  Implementation of plugin base class
-*
-*/
-#include <cmmanager.rsg>
-#include <es_sock.h>    // RSocketServ, RConnection
-#include <in_sock.h>    // KAfInet
-#include <es_enum.h>    // TConnectionInfo
-#include <StringLoader.h>
-#include <AknUtils.h>
-#include <data_caging_path_literals.hrh>
-#include <sysutil.h> 
-
-#include <cmmanager.h>
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpsettingsconsts.h>
-#include "cmlogger.h"
-#include <cmcommonui.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// EXTERNAL LINKS
-
-// MACROS
-
-#undef _IPV6_DISABLED
-
-// CONSTANTS
-const TInt KApMaxConnNameLength = 30;
-_LIT(KFormatPostfix, "%02d");
-_LIT(KFormatLargePostfix, "%d");
-_LIT(KFormatNameWithPostfix, "%S(%S)" );
-_LIT(KFormatNoPostfix, "%S");
-const TInt KMaxPostfixLength = 5;
-const TInt KEstimatedOverhead = 8192;
-
-_LIT( KDefWapGatewayIpAddress, "0.0.0.0" );
-    
-_LIT( KLocationName, "Mobile" );
-
-static const TCmAttribConvTable SIapConvTbl[] = 
-    {
-    // iAttribId, iCommsDatId, iValidFuncL, 
-    // iTitleId, 
-    // iMaxLength, iAttribFlags, iDefValueResId, iEditorResId, iNotUsed1, iNotUsed2
-    // first element describes the min-max values, does not connects to DB!
-    { ECmName, ECmIapId, NULL },
-    { ECmName, KCDTIdRecordName, NULL,
-        R_CMMANAGERUI_CONNECTION_NAME,
-        KMaxConnNameLength, EConvNoZeroLength | EConvCompulsory, 
-        0, R_TEXT_SETTING_PAGE_CONN_NAME, NULL, NULL },
-    { ECmIapId, KCDTIdRecordTag, NULL },
-    { 0, 0, NULL },
-    };
-
-static const TCmAttribConvTable SProxyConvTbl[] = 
-    {
-    // iAttribId, iCommsDatId, iValidFuncL, 
-    // iTitleId, 
-    // iMaxLength, iAttribFlags, iDefValueResId, iEditorResId, iNotUsed1, iNotUsed2
-    { ECmProxyUsageEnabled, ECmProxyRangeMax, NULL },
-    { ECmProxyUsageEnabled, KCDTIdUseProxyServer, NULL },
-    { ECmProxyServerName,   KCDTIdServerName, &SetProxyServerNameL, 
-        R_QTN_SET_PROXY_SERVER_ADDRESS, 
-        KMaxProxyServerLength, 0, R_QTN_SET_PROXY_SERVER_ADDRESS_NONE, R_TEXT_SETTING_PAGE_PROXY_SERVER_ADDR, NULL, NULL },
-    { ECmProxyProtocolName, KCDTIdProtocolName, NULL },
-    { ECmProxyPortNumber,   KCDTIdPortNumber, &CheckPortNumberValidityL,
-        R_QTN_SET_PROXY_PORT_NUMBER,
-        KMaxProxyPortNumberLength, EConvNumber, 0, 0, NULL, NULL },
-    { ECmProxyExceptions,   KCDTIdExceptions, NULL },
-    { 0, 0, NULL },
-    };
-
-static const TCmAttribConvTable SChargeCardConvTbl[] =
-    {
-    { ECmChargeCardUsageEnabled, ECmChargeCardRangeMax, NULL },
-    { ECmChargeCardAccountNumber, KCDTIdAccountNo, NULL },
-    { ECmChargeCardPIN, KCDTIdPin, NULL },
-    { ECmChargeCardLocalRule, KCDTIdLocalRule, NULL },
-    { ECmChargeCardNatRule, KCDTIdNatRule, NULL },
-    { ECmChargeCardIntlRule, KCDTIdIntlRule, NULL },
-    { 0, 0, NULL },
-    };
-
-static const TCmAttribConvTable SLocationConvTbl[] =
-    {
-    { ECmLocationUsageEnabled, ECmLocationRangeMax, NULL },
-    { ECmLocationIntlPrefixCode, KCDTIdIntlPrefixCode, NULL },
-    { ECmLocationNatPrefixCode, KCDTIdNatPrefixCode, NULL },
-    { ECmLocationNatCode, KCDTIdNatCode, NULL },
-    { ECmLocationAreaCode, KCDTIdAreaCode, NULL },
-    { ECmLocationDialOutCode, KCDTIdDialOutCode, NULL },
-    { ECmLocationDisableCallWaitingCode, KCDTIdDisableCallWaitingCode, NULL },
-    { ECmLocationMobile, KCDTIdMobile, NULL },
-    { ECmLocationUsePulseDial, KCDTIdUsePulseDial, NULL },
-    { ECmLocationWaitForDialTone, KCDTIdWaitForDialTone, NULL },
-    { ECmLocationPauseAfterDialOut, KCDTIdPauseAfterDialOut, NULL },
-    { 0, 0, NULL },
-    };
-
-static const TCmAttribConvTable SWapConvTbl[] = 
-    {
-    { ECmWapIPGatewayAddress, ECmWapRangeMax, NULL },
-    { ECmWapIPGatewayAddress, KCDTIdWAPGatewayAddress, &CheckIPv4ValidityL },
-    { ECmWapIPWSPOption, KCDTIdWAPWSPOption, &CheckWAPWspOptionValidityL },
-    { ECmWapIPSecurity, KCDTIdWAPSecurity, NULL },
-    { ECmWapIPProxyPort, KCDTIdWAPProxyPort, &CheckPortNumberValidityL },
-    { ECmWapIPProxyLoginName, KCDTIdWAPProxyLoginName, NULL },
-    { ECmWapIPProxyLoginPass, KCDTIdWAPProxyLoginPass, NULL },
-    { 0, 0, NULL },
-    };
-
-static const TCmAttribConvTable SUiTable[] = 
-    {
-    { ECmName, 0, NULL,
-        R_CMMANAGERUI_CONNECTION_NAME,
-        KMaxConnNameLength, EConvNoZeroLength | EConvCompulsory, 0, R_TEXT_SETTING_PAGE_CONN_NAME, NULL, NULL },
-    { ECmBearerSettingName, 0, NULL,
-        R_PLUGIN_BASE_SET_AP_BEARER,
-        0, 0, 0, 0, NULL, NULL },
-    { ECmStartPage, 0, NULL,
-        R_QTN_SET_STARTING_PAGE,
-        KMaxStartPageLength, 0, R_QTN_SET_HOME_PAGE_NONE, R_TEXT_SETTING_PAGE_STARTING_PAGE, 
-        R_START_PAGE_DEF_VALUE, NULL, NULL },
-    { 0, 0, NULL,
-        0, 
-        0, 0, 0, NULL, NULL },
-    };
-
-/**
- * Private data of plugin base
- */
-NONSHARABLE_CLASS( CCmPluginBasePrivate ) : public CBase
-    {
-    public:
-    
-        CCmPluginBasePrivate();
-        ~CCmPluginBasePrivate();
-    
-    public:
-    
-        CCDWAPAccessPointRecord*    iWapAPRecord;
-        CCDWAPIPBearerRecord*       iWapIPBearerRecord;
-        CCDIAPMetadataRecord*       iMetaDataRecord;
-        
-        TNamingMethod   iNamingMethod;
-        
-        CArrayPtrFlat<TCmAttrConvArrayItem>*        iConvTblArray;
-        RArray<const TCmCommonAttrConvArrayItem*>   iCommonConvTblArray;
-        
-        TInt    iLoadResult;
-    };    
-
-// ======== LOCAL FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// ReadOnlyAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool ReadOnlyAttributeL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute,
-                                  const TAny* aValue )
-    {
-    User::Leave( KErrNotSupported );
-
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CheckIPv4ValidityL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CheckIPv4ValidityL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute,
-                                  const TAny* aValue )
-    {
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CheckIPv6ValidityL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CheckIPv6ValidityL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute,
-                                  const TAny* aValue )
-    {
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CheckPortNumberValidityL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CheckPortNumberValidityL( CCmPluginBaseEng* aThis, 
-                                        TUint32 aAttribute,
-                                        const TAny* aValue )
-    {
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CheckRecordIdValidityL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CheckRecordIdValidityL( CCmPluginBaseEng* aThis, 
-                                      TUint32 aAttribute,
-                                      const TAny* aValue )
-    {
-    TUint32 recId = *(TUint32*)aValue;
-    
-    if( recId < 1 || recId > 254 )
-        {
-        CLOG_WRITE_1_PTR( aThis, "Not valid Rec id: [%d]", recId );
-        User::Leave( KErrArgument );
-        }
-
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CheckWAPWspOptionValidityL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CheckWAPWspOptionValidityL( CCmPluginBaseEng* aThis, 
-                                          TUint32 aAttribute,
-                                          const TAny* aValue )
-    {
-    TUint32 wspOpt = (TUint32)aValue;
-    
-    
-    if( wspOpt != ECmWapWspOptionConnectionless &&
-        wspOpt != ECmWapWspOptionConnectionOriented )
-        {
-        User::Leave( KErrArgument );
-        }
-
-    (void)aThis;
-    (void)aAttribute;
-    (void)aValue;
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// IsUnspecifiedIPv4Address
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool IsUnspecifiedIPv4Address( const TDesC& aIpv4Address )
-    {
-    if( aIpv4Address.Length() == 0 ||
-        !aIpv4Address.CompareF( KUnspecifiedIPv4 ) )
-        {
-        return ETrue;
-        }
-        
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// ClassifyIPv6Address
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TIPv6Types ClassifyIPv6Address( const TDesC& aIpv6Address )
-    {
-    if( aIpv6Address.Length() == 0 ||
-        !aIpv6Address.CompareF( KDynamicIpv6Address ) )
-        {
-        return EIPv6Unspecified;
-        }
-    else if( !aIpv6Address.CompareF( KKnownIp6NameServer1 ) ||
-             !aIpv6Address.CompareF( KKnownIp6NameServer2 ) )
-        {
-        return EIPv6WellKnown;
-        }
-        
-    return EIPv6UserDefined;
-    }
-
-// ---------------------------------------------------------------------------
-// SetProxyServerNameL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool SetProxyServerNameL( CCmPluginBaseEng* aThis, 
-                                   TUint32 /*aAttribute*/, 
-                                   const TAny* aValue )
-    {
-    const TDesC* proxyServer = (const TDesC*)aValue;
-    
-    return aThis->SetProxyServerNameL( *proxyServer );
-    }
-    
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// TCmPluginInitParam::TCmPluginInitParam
-// ---------------------------------------------------------------------------
-//
-TCmPluginInitParam::TCmPluginInitParam( CCmManagerImpl& aCmMgr )
-    : iCmMgr( aCmMgr )
-    {
-    iParentDest = 0;
-    iNotused1 = NULL;
-    iNotused2 = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBasePrivate::CCmPluginBasePrivate
-// ---------------------------------------------------------------------------
-//
-CCmPluginBasePrivate::CCmPluginBasePrivate()
-    : iNamingMethod( ENamingUnique )
-    , iCommonConvTblArray( KDefAttrsArrayGranSize )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBasePrivate::~CCmPluginBasePrivate
-// ---------------------------------------------------------------------------
-//
-CCmPluginBasePrivate::~CCmPluginBasePrivate()
-    {
-    delete iWapAPRecord;
-    delete iWapIPBearerRecord;
-    delete iMetaDataRecord;
-    
-    if ( iConvTblArray )
-        {
-        iConvTblArray->ResetAndDestroy();
-        delete iConvTblArray;
-        }
-        
-    iCommonConvTblArray.Reset();
-    iCommonConvTblArray.Close();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CCmPluginBaseEng
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBaseEng::CCmPluginBaseEng( TCmPluginInitParam *aInitParam )
-    : iCmMgr( aInitParam->iCmMgr )
-    , iParentDest( aInitParam->iParentDest )
-    {
-    CLOG_CREATE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::~CCmPluginBaseEng
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBaseEng::~CCmPluginBaseEng()
-    {
-    Reset();
-    
-    delete iPriv;
-    
-    REComSession::DestroyedImplementation( iDtor_ID_Key );
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::ConstructL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::ConstructL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::ConstructL" );
-
-    iPriv = new (ELeave) CCmPluginBasePrivate;
-    
-    // 4 for our tables + 4 for bearer specific ones.
-    iPriv->iConvTblArray = new (ELeave)CArrayPtrFlat<TCmAttrConvArrayItem>( 8 );
-
-    AddConverstionTableL( (CCDRecordBase**)&iIapRecord, 
-                          NULL, SIapConvTbl );
-    AddConverstionTableL( (CCDRecordBase**)&iProxyRecord, 
-                          NULL, SProxyConvTbl );
-    AddConverstionTableL( (CCDRecordBase**)&iChargeCardRecord, 
-                          &iChargeCardEnabled, SChargeCardConvTbl );
-    AddConverstionTableL( (CCDRecordBase**)&iLocationRecord, 
-                          &iLocationEnabled, SLocationConvTbl );
-    AddConverstionTableL( (CCDRecordBase**)&iPriv->iWapIPBearerRecord, 
-                          NULL, SWapConvTbl );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GetIntAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TUint32 
-            CCmPluginBaseEng::GetIntAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetIntAttributeL" );
-
-    TUint32 retVal( 0 );
-    
-    switch ( aAttribute )
-        {
-        case ECmBearerIcon:
-            {
-            retVal = 0; // bearer doesn't provide any icon
-            }
-            break;
-            
-        case ECmBearerAvailableIcon:            
-            {
-            retVal = 0; // bearer doesn't provide any icon
-            }
-            break;
-            
-        case ECmId: // if the CM has an IapId than the ECmId is the ECmId
-        case ECmIapId:
-            {
-            retVal = iIapId;
-            }
-            break;
-        case ECmWapId:
-            {
-            retVal = iPriv->iWapIPBearerRecord->iWAPAccessPointId;
-            }
-            break;
-        case ECmIapServiceId:
-            {
-            retVal = TUint32(iIapRecord->iService);
-            }
-            break;
-        case ECmBearerType:
-            {
-            retVal = iBearerType;
-            }
-            break;
-            
-        case ECmDefaultPriority:
-            {
-            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
-            }
-            break;
-            
-        case ECmDefaultUiPriority:
-            {
-            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
-            }
-            break;
-            
-        case ECmNamingMethod:
-            {
-            retVal = iPriv->iNamingMethod;
-            }
-            break;
-            
-        case ECmExtensionLevel:
-            {
-            retVal = KExtensionBaseLevel;
-            }
-            break;
-            
-        case ECmInvalidAttribute:
-            {
-            retVal = iInvalidAttribute;
-            }
-            break;
-            
-        case ECmCommsDBBearerType:
-            {
-            User::Leave( KErrUnknown );
-            }
-            break;
-            
-        case ECmSeamlessnessLevel:
-            {
-            retVal = iPriv->iMetaDataRecord->iSeamlessness;
-            }
-            break;
-            
-        case ECmElementID:
-            {
-            if ( !iIapRecord )
-                {
-                User::Leave( KErrNotReady );
-                }
-                
-            retVal = (KCDMaskShowField & iIapRecord->ElementId());
-            }
-            break;
-            
-        case ECmLoadResult:
-            {
-            retVal = iPriv->iLoadResult;
-            }
-            break;
-            
-        case ECmNetworkId:
-            {
-            retVal = iIapRecord->iNetwork;
-            }
-            break;
-            
-        default:
-            {
-            TUint32 attribute = CheckForCommonAttribute( aAttribute );            
-            CMDBField<TUint32>* field;
-
-            FindFieldL( attribute, ECmInt, (CMDBElement*&)field );
-
-            retVal = *field;        
-            }
-            break;
-        }
-        
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GetBoolAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool 
-        CCmPluginBaseEng::GetBoolAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetBoolAttributeL" );
-
-    TBool retVal;
-
-    switch ( aAttribute )
-        {
-        case ECmProtected:
-            {
-            retVal = IsProtected();
-            }
-            break;
-            
-        case ECmHidden:
-            {
-            retVal = iIapRecord->Attributes() & ECDHidden;
-            }
-            break;
-
-        case ECmDestination:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmChargeCardUsageEnabled:
-            {
-            retVal = iChargeCardEnabled;
-            }
-            break;
-            
-        case ECmCoverage:
-            // In default the plugin has no network coverage
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmAddToAvailableList:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmBearerHasUi:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmMetaHighlight:
-            {
-            retVal = iPriv->iMetaDataRecord->iMetadata & EMetaHighlight;
-            }
-            break;
-            
-        case ECmMetaHiddenAgent:
-            {
-            retVal = iPriv->iMetaDataRecord->iMetadata & EMetaHiddenAgent;
-            }
-            break;
-            
-        case ECmIPv6Supported:
-            {
-            retVal = FeatureSupported( KFeatureIdIPv6 );
-            }
-            break;
-            
-        case ECmConnected:
-            {
-            retVal = CheckIfAlreadyConnected();
-            }
-            break;
-
-        case ECmVirtual:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmIsLinked:
-            {
-            retVal = iCmMgr.IsIapLinkedL( *this );
-            }
-            break;
-            
-        default:
-            {
-            TUint32 attribute = CheckForCommonAttribute( aAttribute );            
-            CMDBField<TBool>* field;
-
-            FindFieldL( attribute, ECmBool, (CMDBElement*&)field );
-
-            retVal = *field;        
-            }
-        }
-
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GetStringAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* 
-    CCmPluginBaseEng::GetStringAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetStringAttributeL" );
-
-    HBufC* retVal = NULL;
-    
-    switch ( aAttribute )
-        {
-        case ECmStartPage:
-            {
-            retVal = TPtrC(iPriv->iWapAPRecord->iWAPStartPage).AllocL();
-            }
-            break;
-            
-        case ECmName:
-            {
-            retVal = TPtrC(iIapRecord->iRecordName).AllocL();
-            }
-            break;
-
-        default:
-            {
-            TUint32 attribute = CheckForCommonAttribute( aAttribute );
-            CMDBField<TDesC>* field;
-            
-            FindFieldL( attribute, ECmText, (CMDBElement*&)field );
-
-            if ( !field->IsNull() )
-                {
-                retVal = field->GetL().AllocL();
-                }
-            else
-                {
-                retVal = KNullDesC().AllocL();
-                }
-            }
-        }
-        
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GetString8AttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* 
-    CCmPluginBaseEng::GetString8AttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetString8AttributeL" );
-
-    HBufC8* retVal = NULL;
-    
-    TUint32 attribute = CheckForCommonAttribute( aAttribute );
-    CMDBField<TDesC8>* field;
-                
-    FindFieldL( attribute, ECmText8, (CMDBElement*&)field );
-
-    if ( !field->IsNull() )
-        {
-        retVal = field->GetL().AllocL();
-        }
-    else
-        {
-        retVal = KNullDesC8().AllocL();
-        }
-        
-    return retVal;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetIntAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::SetIntAttributeL( const TUint32 aAttribute, 
-                                                  TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetIntAttributeL" );
-
-    switch ( aAttribute )
-        {
-        case ECmNamingMethod:
-            {
-            iPriv->iNamingMethod = (TNamingMethod)aValue;
-            }
-            break;
-
-        case ECmCommsDBBearerType:
-        case ECmElementID:
-        case ECmIapId:
-        case ECmId:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-            
-        case ECmSeamlessnessLevel:
-            {
-            if ( aValue == ESeamlessnessConfirmFirst ||
-                 aValue == ESeamlessnessShowprogress )
-                {
-                iPriv->iMetaDataRecord->iSeamlessness = aValue;
-                }
-            else
-                {
-                User::Leave( KErrNotSupported );
-                }
-            }
-            break;
-                                   
-        case ECmNetworkId:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-           
-        default:
-            {
-            TUint32 attribute = CheckForCommonAttribute( aAttribute );
-            CMDBField<TUint32>* field;
-            
-            TValidationFunctionL func = 
-                        FindFieldL( attribute, ECmInt, (CMDBElement*&)field );
-            
-            if( func )
-                {
-                func( this, attribute, (TAny*)aValue );
-                }
-                
-            *field = aValue;
-            }
-            break;
-        }
-        
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetBoolAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::SetBoolAttributeL( const TUint32 aAttribute, 
-                                                   TBool aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetBoolAttributeL" );
-
-    switch ( aAttribute )
-        {
-        case ECmProtected:
-            {
-            SetAttribute( iIapRecord, ECDProtectedWrite, aValue );
-            }
-            break;
-            
-        case ECmHidden:
-            {
-            // Check that this is not Default Connection
-            TCmDefConnValue defConn;
-            iCmMgr.ReadDefConnL( defConn );
-            if ( defConn.iType == ECmDefConnConnectionMethod &&
-                 defConn.iId == iIapRecord->RecordId() )
-                {
-                User::Leave( KErrArgument );
-                }
-            
-            SetAttribute( iIapRecord, ECDHidden, aValue );
-            }
-            break;
-            
-        case ECmProxyUsageEnabled:
-            {
-            EnableProxyL( aValue );
-            }
-            break;
-            
-        case ECmChargeCardUsageEnabled:
-            {
-            EnableChargeCardL( aValue );
-            }
-            break;
-            
-        case ECmLocationUsageEnabled:
-            {
-            EnableLocationL( aValue );
-            }
-            break;
-            
-        case ECmMetaHighlight:
-            {
-            if( aValue )
-                {
-                iPriv->iMetaDataRecord->iMetadata =
-                          EMetaHighlight | iPriv->iMetaDataRecord->iMetadata;
-                }
-            else
-                {
-                iPriv->iMetaDataRecord->iMetadata =
-                        ~EMetaHighlight & iPriv->iMetaDataRecord->iMetadata;
-                }
-            }
-            break;
-            
-        case ECmMetaHiddenAgent:
-            {
-            if( aValue )
-                {
-                iPriv->iMetaDataRecord->iMetadata =
-                        EMetaHiddenAgent | iPriv->iMetaDataRecord->iMetadata;
-                }
-            else
-                {
-                iPriv->iMetaDataRecord->iMetadata = 
-                      ~EMetaHiddenAgent & iPriv->iMetaDataRecord->iMetadata;
-                }
-            }
-            break;
-            
-        default:
-            {
-            TUint32 attribute = CheckForCommonAttribute( aAttribute );
-            CMDBField<TBool>* field;
-            
-            TValidationFunctionL func = 
-                        FindFieldL( attribute, ECmBool, (CMDBElement*&)field );
-            
-            if( func )
-                {
-                func( this, attribute, (const TAny*)aValue );
-                }
-                
-
-            *field = aValue;
-            }
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetStringAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::SetStringAttributeL( const TUint32 aAttribute, 
-                                                     const TDesC16& aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetStringAttributeL" );
-
-    TUint32 commonattribute = MappedCommonAttribute( aAttribute );
-    switch ( commonattribute )
-        {
-        case ECmStartPage:
-            {
-            iPriv->iWapAPRecord->iWAPStartPage.SetL( aValue );
-            }
-            break;
-            
-        case ECmName:
-            {
-            SetNameL( aValue );
-            }
-            break;
-        case ECmIPAddress:
-            {
-            GenericStringWriterL( commonattribute, aValue );
-            if (( aValue.Compare(KUnspecifiedIPv4) == 0) || ( aValue.Compare(KNullDesC)==0 ) )
-                {
-                SetBoolAttributeL( ECmIPAddFromServer, ETrue );
-                }
-            else
-                {
-                SetBoolAttributeL( ECmIPAddFromServer, EFalse );
-                }
-            }
-            break;
-        default:
-            {
-            GenericStringWriterL( commonattribute, aValue );
-            }
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetString8AttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::SetString8AttributeL( const TUint32 aAttribute, 
-                                                      const TDesC8& aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetString8AttributeL" );
-
-    TUint32 attribute = CheckForCommonAttribute( aAttribute );
-    CMDBField<TDesC8>* field;
-
-    TValidationFunctionL func = FindFieldL( attribute, ECmText8, (CMDBElement*&)field );
-
-    if( func )
-        {
-        func( this, attribute, (const TAny*)&aValue );
-        }
-
-    field->SetL( aValue );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::RestoreAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::RestoreAttributeL( const TUint32 aAttribute )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::RestoreAttributeL" );
-
-    TCmAttrConvArrayItem* item = ConversionTable( aAttribute );
-
-    TInt index( 0 );
-    CMDBElement& field = FieldByAttributeL( item, aAttribute, index );
-    
-    TRAPD( err, field.LoadL( Session() ) );
-    if( err == KErrNotFound )
-        {
-        switch ( field.Type() )
-            {
-            case EText:
-            case EMedText:
-            case ELongText:
-                {
-                CMDBField<TDesC>* textField = static_cast<CMDBField<TDesC>*>( &field );
-                
-                textField->SetL( KNullDesC );
-                }
-                break;
-
-            case EDesC8:
-                {
-                CMDBField<TDesC8>* textField = static_cast<CMDBField<TDesC8>*>( &field );
-                
-                textField->SetL( KNullDesC8 );
-                }
-                break;
-                
-            case EUint32:
-            case EInt:
-            case EBool:
-                {
-                CMDBField<TInt>* intField = static_cast<CMDBField<TInt>*>( &field );
-                
-                intField->SetL( 0 );
-                }
-                break;
-                
-            default:
-                {
-                User::Leave( KErrArgument );
-                }
-                break;
-            }
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::Destination
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmDestinationImpl* CCmPluginBaseEng::Destination() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::Destination" );
-
-    return NULL;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::UpdateL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateL" );
-
-    CheckSpaceBelowCriticalLevelL();
-
-    OpenTransactionLC();
-    
-    PrepareToUpdateRecordsL();
-    
-    UpdateChargeCardRecordL();
-    UpdateServiceRecordL();
-    
-    UpdateLocationRecordL();
-    UpdateNetworkRecordL();
-    
-    UpdateIAPRecordL();
-
-    UpdateWapRecordL();
-    UpdateProxyRecordL();
-    UpdateSeamlessnessRecordL();
-    UpdateConnPrefSettingL();
-    
-    UpdateAdditionalRecordsL();
-    
-    CommitTransactionL( 0 );
-    iCmMgr.ConnMethodUpdatedL( this );
-    iIdIsValid = ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::NumOfConnMethodReferencesL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CCmPluginBaseEng::NumOfConnMethodReferencesL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::NumOfConnMethodReferencesL" );
-
-    return iCmMgr.NumOfConnMethodReferencesL( iIapId );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::Session
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CMDBSession& CCmPluginBaseEng::Session()const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::Session" );
-
-    return iCmMgr.Session();
-    }
-
-// ---------------------------------------------------------------------------
-// Delete this connection methond.
-// Record ids are checked to be sure that we delete only records
-// that were loaded before.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmPluginBaseEng::DeleteL( TBool aForced,
-                                          TBool aOneRefAllowed )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::DeleteL" );
-    
-    if ( CheckIfAlreadyConnected() )
-        {
-        User::Leave( KErrInUse );
-        }
-
-    if( iPriv->iLoadResult )
-        // previous load failed -> do NOT delete this partially loaded cm.
-        {
-        User::Leave( KErrNotReady );
-        }
-        
-    if( GetBoolAttributeL( ECmIsLinked ) )
-        {
-        User::Leave( KErrLocked );
-        }
-        
-    // If there is no parent destination, we can delete
-    TBool retVal(ETrue);
-    
-    if( !aForced )
-        {
-        TInt refs = NumOfConnMethodReferencesL();
-        
-        switch ( refs )
-            {
-            case 0:
-                // no referencies to this cm
-                {
-                CLOG_WRITE( "No ref -> do delete it" );
-                }
-                break;
-                
-            case 1: 
-                // one reference
-                {
-                if ( !aOneRefAllowed )
-                    // this is not a legacy cm -> cannot be deleted.
-                    {
-                    retVal = EFalse;
-                    }
-                }
-                break;
-                
-            default:
-                // connection method is multiple referenced from
-                // destinations -> no delete
-                {
-                retVal = EFalse;
-                }
-                break;
-            }
-        }
-        
-    if ( retVal )
-        {
-        TCmDefConnValue deletedItem;
-        deletedItem.iType = ECmDefConnConnectionMethod;
-        deletedItem.iId = iIapId;
-        iCmMgr.HandleDefConnDeletedL( deletedItem );       
-
-        if( aForced )
-            {
-            iCmMgr.RemoveAllReferencesWoTransL( *this );
-            }
-
-        OpenTransactionLC();
-        // And now we have everything from CommsDat, 
-        // so we delete only those records.
-        PrepareToDeleteRecordsL();
-
-        if ( iIapRecord && iIapRecord->RecordId() )
-            {
-            iIapRecord->DeleteL( Session() );
-            }
-        
-        if ( iProxyRecord && iProxyRecord->RecordId() )
-            {
-            iProxyRecord->DeleteL( Session() );
-            }
-            
-        if ( iServiceRecord && iServiceRecord->RecordId() )
-            {
-            iServiceRecord->DeleteL( Session() );
-            }
-        
-        if ( iChargeCardRecord && iChargeCardRecord->RecordId() )
-            {
-            iChargeCardRecord->DeleteL( Session() );
-            }
-        
-        if ( iNetworkRecord && iNetworkRecord->RecordId() )
-            {
-            iNetworkRecord->DeleteL( Session() );
-            }
-        
-        if ( iLocationRecord && iLocationRecord->RecordId() )
-            {
-            iLocationRecord->DeleteL( Session() );
-            }
-        
-        if ( iPriv->iWapAPRecord && 
-            iPriv->iWapAPRecord->RecordId() )
-            {
-            iPriv->iWapAPRecord->DeleteL( Session() );
-            }
-        
-        if ( iPriv->iWapIPBearerRecord && 
-            iPriv->iWapIPBearerRecord->RecordId() )
-            {
-            iPriv->iWapIPBearerRecord->DeleteL( Session() );
-            }
-
-        if ( iPriv->iMetaDataRecord &&
-             iPriv->iMetaDataRecord->RecordId() )
-            {
-            iPriv->iMetaDataRecord->DeleteL( Session() );
-            }
-        
-        DeleteAdditionalRecordsL();
-
-        CommitTransactionL( KErrNone );
-        }
-
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::LoadL( TUint32 aIapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadL" );
-    CLOG_NAME_2( _L("plugin_0x%x_%d"), this, aIapId );
-
-    OpenTransactionLC();
-
-    // trap it to set iPriv->iLoadResult
-    TRAP( iPriv->iLoadResult, DoLoadL( aIapId ) );
-
-    User::LeaveIfError( iPriv->iLoadResult );
-    
-    RollbackTransaction();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CreateNewL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::CreateNewL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CreateNewL" );
-
-    CheckSpaceBelowCriticalLevelL();
-    
-    if ( iIapId )
-        // we already have IAP id ->
-        {
-        User::Leave( KErrAlreadyExists );
-        }
-
-    iPreDefIapId = 0;
-
-    // optional record are disable in default
-    iChargeCardEnabled = EFalse;
-    iLocationEnabled = EFalse;
-    
-    // create mandatory records
-    iIapRecord = static_cast<CCDIAPRecord *>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-    iNetworkRecord = static_cast<CCDNetworkRecord *>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdNetworkRecord));
-    iProxyRecord = static_cast<CCDProxiesRecord *>
-                  (CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
-    NewWapRecordL();
-    iPriv->iWapIPBearerRecord->iWAPGatewayAddress.SetL( 
-                                                    KDefWapGatewayIpAddress );
-    
-    iPriv->iMetaDataRecord = NewSeamlessnessRecordL( ETrue );
-
-    // call plugin to create its own records
-    CreateNewServiceRecordL();
-    CreateAdditionalRecordsL();
-
-    EnableProxyL( EFalse );
-
-    // Load default CM name from resource
-    HBufC* defApName = AllocReadL( R_CMMANAGERENG_DEFAULT_AP_NAME );
-    CleanupStack::PushL( defApName );
-
-    SetNameL( *defApName );
-
-    CleanupStack::PopAndDestroy( defApName );
-
-    iIapRecord->iNetworkWeighting = 0; // it's always 0.
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CreateCopyL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBaseEng* CCmPluginBaseEng::CreateCopyL() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CreateCopyL" );
-    CheckSpaceBelowCriticalLevelL();
-    
-    TCmPluginInitParam params( iCmMgr );
-    
-    CCmPluginBaseEng* copyInst = CreateInstanceL( params );
-    CleanupStack::PushL( copyInst );
-    
-    copyInst->CreateNewL();
-
-    TInt err( KErrNone );
-    TRAP( err, copyInst->SetBoolAttributeL( ECmChargeCardUsageEnabled, iChargeCardEnabled ) );
-    if( err != KErrNotSupported )
-        {
-        User::LeaveIfError( err );
-        }
-    TRAP( err, copyInst->SetBoolAttributeL( ECmLocationUsageEnabled, iLocationEnabled ) );
-    if( err != KErrNotSupported )
-        {
-        User::LeaveIfError( err );
-        }
-    copyInst->SetIntAttributeL( ECmNamingMethod, iPriv->iNamingMethod );
-    copyInst->SetStringAttributeL( ECmName, TPtrC( iIapRecord->iRecordName ) );
-    copyInst->SetStringAttributeL( ECmStartPage, TPtrC( iPriv->iWapAPRecord->iWAPStartPage ) );
-
-
-    PrepareToCopyDataL( *copyInst );
-
-    for ( TInt tblInd = 0; tblInd < iPriv->iConvTblArray->Count(); ++tblInd )
-        {
-        const TCmAttrConvArrayItem* item = (*iPriv->iConvTblArray)[tblInd];
-        
-        if ( item->iEnabled && !(*item->iEnabled) )
-            // Enabled flag is set to 'disabled' state
-            {
-            continue;
-            }
-            
-        if( !item->iRecord || 
-            (item->iRecord && !(*item->iRecord)) )
-            // no record
-            {
-            continue;
-            }
-                
-        for ( TInt attrInd = 1; item->iConvTable[attrInd].iAttribId; ++attrInd )
-            {
-            if( item->iConvTable[attrInd].iAttribFlags & EConvReadOnly )
-                // Read-only flags are not copied.
-                {
-                continue;
-                }
-                
-            TInt commsdatid( item->iConvTable[attrInd].iCommsDatId );
-
-            if ( !commsdatid )
-                { // not connected to the DB, calculated field, no copy
-                continue;
-                }
-                
-            CMDBElement* field = (*item->iRecord)->GetFieldByIdL( commsdatid );
-    
-            if( field->IsNull() )
-                {
-                continue;
-                }
-                
-            switch ( field->Type() )
-                {
-                case EText:
-                case EMedText:
-                case ELongText:
-                    {
-                    CMDBField<TDesC>* textField = (CMDBField<TDesC>*)field;
-                
-                    TRAP( err, copyInst->SetStringAttributeL( 
-                                            item->iConvTable[attrInd].iAttribId,
-                                            *textField ) );
-                    if( err != KErrNotSupported )
-                        {
-                        User::LeaveIfError( err );
-                        }
-                    }
-                    break;
-                    
-                case EDesC8:
-                    {
-                    CMDBField<TDesC8>* textField = (CMDBField<TDesC8>*)field;
-                
-                    TRAP( err, copyInst->SetString8AttributeL( 
-                                            item->iConvTable[attrInd].iAttribId,
-                                            *textField ) );
-                    if( err != KErrNotSupported )
-                        {
-                        User::LeaveIfError( err );
-                        }
-                    }
-                    break;
-                    
-                case EUint32:
-                case EInt:
-                    {
-                    CMDBField<TUint32>* intField = (CMDBField<TUint32>*)field;
-                    
-                    TRAP( err, copyInst->SetIntAttributeL( 
-                                            item->iConvTable[attrInd].iAttribId,
-                                            *intField ) );
-                    if ( !(( err == KErrNotSupported ) || ( err == KErrArgument )) )
-                        {
-                        User::LeaveIfError( err );
-                        }
-                    }
-                    break;
-                    
-                case EBool:
-                    {
-                    CMDBField<TBool>* intField = (CMDBField<TBool>*)field;
-                    
-                    TRAP( err, copyInst->SetBoolAttributeL( 
-                                            item->iConvTable[attrInd].iAttribId,
-                                            *intField ) );
-                    if( err != KErrNotSupported )
-                        {
-                        User::LeaveIfError( err );
-                        }
-                    }
-                    break;
-                    
-                case ELink: // links are not copied!
-                default:
-                    {
-                    }
-                    break;
-                }
-            }                    
-        }
-
-    CopyAdditionalDataL( *copyInst );
-    
-    CleanupStack::Pop( copyInst );
-    
-    return copyInst;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::AddResourceFileL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::AddResourceFileL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::AddResourceFileL" );
-    
-    CLOG_WRITE_1( "[%S]", &aName );
-    
-    TParse fp;
-    TInt err = fp.Set( aName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err != KErrNone)
-        {
-        User::Leave( err );
-        }
-        
-    TFileName fName;
-    
-    fName.Copy( fp.FullName() );
-
-    iCmMgr.AddResourceFileL( fName );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::RemoveResourceFile
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::RemoveResourceFile( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::RemoveResourceFileL" );
-
-    TParse fp;
-    TInt err = fp.Set( aName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    CLOG_WRITE_1( "Set: [%d]", err );
-        
-    TFileName fName;
-    
-    fName.Copy( fp.FullName() );
-
-    iCmMgr.RemoveResourceFile( fName );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::AllocReadL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CCmPluginBaseEng::AllocReadL( TInt aResourceId ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::AllocReadL" );
-
-    return iCmMgr.AllocReadL( aResourceId );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::OpenTransactionLC
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::OpenTransactionLC()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::OpenTransactionL" );
-
-    iCmMgr.OpenTransactionLC( ETrue );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::CommitTransactionL( TInt aError )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CommitTransactionL" );
-    
-    iCmMgr.CommitTransactionL( aError );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::RollbackTransaction
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::RollbackTransaction()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::RollbackTransaction" );
-    
-    iCmMgr.RollbackTransaction();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::PrepareToLoadRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::DoLoadL( TUint32 aIapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::DoLoadL" );
-
-    PrepareToLoadRecordsL();
-    
-    LoadIAPRecordL( aIapId );
-    LoadWapRecordL();
-    LoadSeamlessnessRecordL();
-    LoadNetworkSettingL();
-    LoadLocationSettingL();
-
-    // This is a connectionmethodinfo instance, that has no
-    // service and proxy setting.
-    if( KDummyBearerType != iBearerType )
-        {
-        LoadServiceSettingL();
-        LoadProxySettingL();
-        }
-
-    LoadAdditionalRecordsL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::PrepareToLoadRecordsL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::PrepareToLoadRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::PrepareToLoadRecordsL" );
-
-    iChargeCardEnabled = EFalse;
-    iLocationEnabled = EFalse;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadIAPRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadIAPRecordL( TUint32 aIapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadIAPRecordL" );
-
-    iIapId = aIapId;
-    
-    // Load IAP record
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-                            
-    CleanupStack::PushL( iapRecord );
-    
-    iapRecord->SetRecordId( iIapId );
-    
-    iapRecord->LoadL( Session() );
-    
-    CleanupStack::Pop( iapRecord );
-    
-    iIapRecord = iapRecord;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadProxySettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadProxySettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadProxySettingL" );
-    
-    // Load Proxy record
-    CMDBRecordSet<CCDProxiesRecord>* proxieRS = 
-              new(ELeave) CMDBRecordSet<CCDProxiesRecord>(KCDTIdProxiesRecord);
-    CleanupStack::PushL(proxieRS);
-
-    // Now try to find the linked proxy record
-    // create new record
-    CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord *>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
-
-    CleanupStack::PushL( proxyRecord );
-    
-    // Prime record
-    TPtrC serviceType( iIapRecord->iServiceType );
-    
-    proxyRecord->iServiceType.SetL( serviceType );
-    
-    proxieRS->iRecords.AppendL( proxyRecord );
-
-    CleanupStack::Pop( proxyRecord );
-    
-    proxyRecord = NULL;
-    
-    CLOG_WRITE_1( "Looking for proxy: [%d]", TUint32(iIapRecord->iService) );
-    
-    if ( proxieRS->FindL(Session()) )
-        {
-        TInt i(0);
-        while( i<proxieRS->iRecords.Count() )
-            // Now that we have a list of services with the proper service type 
-            // search for our proxy record and remove it from the array, 
-            // then destroy the array.
-            {
-            CCDProxiesRecord* proxyRecord = (*proxieRS)[i];
-            
-            // Compare the record id of these 2 services
-            if ( TUint32(proxyRecord->iService) == 
-                TUint32(iIapRecord->iService) )
-                {
-                iProxyRecord = proxyRecord;
-                // take ownership of this record
-                proxieRS->iRecords.Remove( i );
-                break;
-                }
-            ++i;
-            }
-        }
-    
-    proxieRS->iRecords.ResetAndDestroy();
-    
-    if( !iProxyRecord )
-        {
-        // This creates a proxy record, where usage is disabled.
-        EnableProxyL( EFalse );
-        }
-
-    CleanupStack::PopAndDestroy( proxieRS );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadServiceSettingL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadServiceSettingL" );
-    
-    if ( iServiceRecord )
-        {
-        iServiceRecord->SetRecordId( iIapRecord->iService );
-        TRAPD( err, iServiceRecord->LoadL( Session() ) );
-        if( err == KErrNotFound )
-            // record not found -> create a default one
-            {
-            CreateNewServiceRecordL();
-            }
-        else
-            {
-            User::LeaveIfError( err );
-            }
-        }
-    else
-        {
-        CLOG_WRITE( "CCmPluginBaseEng::LoadServiceSettingL: No service rec" );
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadChargeCardSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadChargeCardSettingL( TUint32 aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadChargeCardSettingL" );
-
-    if ( !aRecordId )
-        // No charge card is link to this IAP
-        {
-        iChargeCardEnabled = EFalse;
-        
-        CLOG_WRITE( "CCmPluginBaseEng::LoadChargeCardSettingL: No charge card" );
-        return;
-        }
-        
-    iChargeCardRecord = static_cast<CCDChargecardRecord *>
-                       (CCDRecordBase::RecordFactoryL(KCDTIdChargecardRecord));
-    iChargeCardRecord->SetRecordId( aRecordId );
-    TRAPD( err, iChargeCardRecord->LoadL( Session() ) );
-    if( err == KErrNotFound )
-        // referenced but doesn't exist. Try to fix it.
-        {
-        iChargeCardRecord->SetRecordId( KCDNewRecordRequest );
-        
-        // if it fails we can't do anything to solve this problem
-        iChargeCardRecord->StoreL( Session() );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-    
-    iChargeCardEnabled = ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadNetworkSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadNetworkSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadNetworkSettingL" );
-    
-    CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdNetworkRecord));
-    CleanupStack::PushL( networkRecord );
-                       
-    networkRecord->SetRecordId( iIapRecord->iNetwork );
-    TRAPD( err, networkRecord->LoadL( Session() ) );
-    if( err == KErrNotFound )
-        {
-        CleanupStack::PopAndDestroy( networkRecord );
-
-        networkRecord = static_cast<CCDNetworkRecord*>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdNetworkRecord));
-        }
-    else
-        // KErrNotFound -> doesn't matter. We will do it UpdateL()
-        {
-        User::LeaveIfError( err );
-
-        CleanupStack::Pop( networkRecord );
-        }
-
-    iNetworkRecord = networkRecord;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadLocationSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadLocationSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadLocationSettingL" );
-
-    CCDLocationRecord* locationRecord = static_cast<CCDLocationRecord*>
-                         (CCDRecordBase::RecordFactoryL(KCDTIdLocationRecord));
-         
-    CleanupStack::PushL( locationRecord );
-
-    locationRecord->SetRecordId( iIapRecord->iLocation );
-    if ( locationRecord->FindL(Session()) )
-        {
-        iLocationEnabled = ETrue;
-        
-        iLocationRecord = locationRecord;
-        
-        CleanupStack::Pop( locationRecord );
-        }
-    else
-        {
-        iLocationEnabled = EFalse;
-
-        CleanupStack::PopAndDestroy( locationRecord );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::PrepareToUpdateRecordsL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::PrepareToUpdateRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::PrepareToUpdateRecordsL" );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateIAPRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateIAPRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateIAPRecordL" );
-
-    if ( !iIapId )
-        {
-        if ( iPreDefIapId )
-            {
-            iIapRecord->SetRecordId( iPreDefIapId );
-            iPreDefIapId = 0;
-            }
-        else
-            {
-            iIapRecord->SetRecordId( KCDNewRecordRequest );
-            }
-
-        TUint32 id;
-        HBufC* name;
-        
-        ServiceRecordIdLC( name, id );
-        iIapRecord->iService = id;
-        iIapRecord->iServiceType.SetL( *name );
-        CleanupStack::PopAndDestroy( name );
-            
-        BearerRecordIdLC( name, id );
-        iIapRecord->iBearer = id;
-        iIapRecord->iBearerType.SetL( *name );
-        CleanupStack::PopAndDestroy( name );
-
-        iIapRecord->iNetwork = iNetworkRecord->RecordId();
-        
-        if ( iLocationRecord )
-            {
-            iIapRecord->iLocation = iLocationRecord->RecordId();
-            }
-            
-        iIapRecord->iLocation = GetLocationIdL();
-        
-        iIapRecord->StoreL( Session() );
-        iIapId = iIapRecord->RecordId();
-        
-        CLOG_NAME_2( _L("plugin_0x%x_%d"), this, iIapId );
-        CLOG_WRITE_1( "New IapId: [%d]", iIapId );
-        }
-    else
-        {
-        iIapRecord->ModifyL( Session() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateProxyRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateProxyRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateProxyRecordL" );
-
-    CopyAttributes( iIapRecord, iProxyRecord );
-    CheckIfNameModifiedL( iProxyRecord );
-    
-    if ( iProxyRecord->iUseProxyServer )
-        {
-        if ( !iProxyRecord->RecordId() )
-            // new proxy setting -> create new record
-            {
-            iProxyRecord->iService = iServiceRecord->RecordId();
-            iProxyRecord->iServiceType.SetL( iIapRecord->iServiceType );
-
-            // By default protocol is set to "http"
-            if ( TPtrC(iProxyRecord->iProtocolName).Length() == 0 )
-                {
-                iProxyRecord->iProtocolName.SetL(KDefProxyProtocolName);
-                }
-
-            iProxyRecord->SetRecordId( KCDNewRecordRequest );
-
-            iProxyRecord->StoreL( Session() );
-            }
-        else
-            // already existing record -> update only
-            {
-            iProxyRecord->ModifyL( Session() );
-            }        
-        }
-    else
-        {
-        if ( iProxyRecord->RecordId() )
-            {
-            iProxyRecord->DeleteL( Session() );
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateSeamlessnessRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateSeamlessnessRecordL" );
-
-    CopyAttributes( iIapRecord, iPriv->iMetaDataRecord );
-    CheckIfNameModifiedL( iPriv->iMetaDataRecord );
-    
-    if ( !iPriv->iMetaDataRecord->RecordId() )
-        {
-        iPriv->iMetaDataRecord->iIAP = IAPRecordElementId();
-        iPriv->iMetaDataRecord->SetRecordId( KCDNewRecordRequest );
-        iPriv->iMetaDataRecord->StoreL( Session() );
-        }
-    else
-        {
-        iPriv->iMetaDataRecord->ModifyL( Session() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateChargeCardRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateChargeCardRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateChargeCardRecordL" );
-    if ( iChargeCardEnabled )
-        {
-        CopyAttributes( iIapRecord, iChargeCardRecord );
-        CheckIfNameModifiedL( iChargeCardRecord );
-        
-        if ( !iChargeCardRecord->RecordId() )
-            {
-            iChargeCardRecord->SetRecordId( KCDNewRecordRequest );
-            iChargeCardRecord->StoreL( Session() );
-            }
-        else
-            {
-            iChargeCardRecord->ModifyL( Session() );
-            }
-        }
-    else
-        {
-        if ( iChargeCardRecord )
-            {
-            iChargeCardRecord->DeleteL( Session() );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateServiceRecordL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::UpdateServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateServiceRecordL" );
-    
-    if ( iServiceRecord )
-        {
-        CopyAttributes( iIapRecord, iServiceRecord );
-        CheckIfNameModifiedL( iServiceRecord );
-        
-        if ( !iServiceRecord->RecordId() )
-            {
-            iServiceRecord->SetRecordId( KCDNewRecordRequest );
-            iServiceRecord->StoreL( Session() );
-            }
-        else
-            {
-            iServiceRecord->ModifyL( Session() );
-            }
-        }
-    else
-        {
-        CLOG_WRITE( "No service record" );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateNetworkRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateNetworkRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateNetworkRecordL" );
-    
-    CopyAttributes( iIapRecord, iNetworkRecord );
-    if ( !iNetworkRecord->RecordId() )
-        {
-        CheckIfNameModifiedL( iNetworkRecord );
-        
-        iNetworkRecord->SetRecordId( KCDNewRecordRequest );
-        iNetworkRecord->StoreL( Session() );
-        }
-    else
-        {
-        iNetworkRecord->ModifyL( Session() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateLocationRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateLocationRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateLocationRecordL" );
-    if ( iLocationEnabled )
-        {
-        CopyAttributes( iIapRecord, iLocationRecord );
-        CheckIfNameModifiedL( iLocationRecord );
-                        
-        if ( !iLocationRecord->RecordId() )
-            {
-            iLocationRecord->SetRecordId( KCDNewRecordRequest );
-            iLocationRecord->StoreL( Session() );
-            }
-        else
-            {
-            iLocationRecord->ModifyL( Session() );
-            }
-        }
-    else
-        {
-        if ( iLocationRecord )
-            {
-            iLocationRecord->DeleteL( Session() );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateConnPrefSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateConnPrefSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateConnPrefSettingL" );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::EnableProxyL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::EnableProxyL( TBool aEnable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::EnableProxyL" );
-
-    if ( !iServiceRecord )
-        {
-        CLOG_WRITE( "No service record -> no proxy" );
-        User::Leave( KErrNotSupported );
-        }
-
-    if( !iProxyRecord )
-        {
-        iProxyRecord = static_cast<CCDProxiesRecord *>
-                      (CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
-        }
-        
-    iProxyRecord->iUseProxyServer = aEnable;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::EnableChargeCardL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::EnableChargeCardL( TBool aEnable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::EnableChargeCardL" );
-
-    if ( aEnable )
-        {
-        if ( !iChargeCardRecord )
-            {
-            iChargeCardRecord = static_cast<CCDChargecardRecord *>
-                       (CCDRecordBase::RecordFactoryL(KCDTIdChargecardRecord));
-            }
-        }
-    else
-        // charge card is disabled. To be deleted in UpdateL
-        // Nothing to do here
-        {
-        }
-        
-    iChargeCardEnabled = aEnable;        
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::EnableLocationL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::EnableLocationL( TBool aEnable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::EnableLocationL" );
-
-    if ( aEnable )
-        {
-        if ( !iLocationRecord )
-            {
-            iLocationRecord = static_cast<CCDLocationRecord *>
-                         (CCDRecordBase::RecordFactoryL(KCDTIdLocationRecord));
-            }
-        }
-    else
-        // location is disabled. To be deleted in UpdateL.
-        // Nothing to do here
-        {
-        }
-        
-    iLocationEnabled = aEnable;        
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadWapRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadWapRecordL" );
-
-    iPriv->iWapIPBearerRecord = FindWAPRecordL();
-    if ( iPriv->iWapIPBearerRecord )
-        {
-        CCDWAPAccessPointRecord *wapApRecord = static_cast<CCDWAPAccessPointRecord *>
-                   (CCDRecordBase::RecordFactoryL(KCDTIdWAPAccessPointRecord));
-                   
-        CleanupStack::PushL( wapApRecord );
-                                        
-        wapApRecord->SetRecordId( 
-                                iPriv->iWapIPBearerRecord->iWAPAccessPointId );
-        TRAPD( err, wapApRecord->LoadL( Session() ) );
-        if( err == KErrNotFound )
-            {
-            CleanupStack::PopAndDestroy( wapApRecord );
-            
-            wapApRecord = static_cast<CCDWAPAccessPointRecord *>
-                   (CCDRecordBase::RecordFactoryL(KCDTIdWAPAccessPointRecord));
-            }
-        else
-            {
-            CLOG_WRITE( "WAP bearer record found, WAP AP Not??" );
-
-            User::LeaveIfError( err );
-
-            CleanupStack::Pop( wapApRecord );
-            }
-        
-        iPriv->iWapAPRecord = wapApRecord;
-        }
-    else
-        // No WAP record found -> create a new one
-        {
-        NewWapRecordL();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::LoadSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::LoadSeamlessnessRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::LoadSeamlessnessRecordL" );
-
-    iPriv->iMetaDataRecord = FindSeamlessnessRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::UpdateWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::UpdateWapRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::UpdateWapRecordL" );
-    
-    if ( !iPriv->iWapIPBearerRecord )
-        // nothing to update
-        {
-        return;
-        }
-    
-    // we have the bearer but to make sure that we have WAP_AP, too.    
-    NewWapRecordL();
-    
-    CopyAttributes( iIapRecord, iPriv->iWapAPRecord );
-    CopyAttributes( iIapRecord, iPriv->iWapIPBearerRecord );
-    
-    CheckIfNameModifiedL( iPriv->iWapAPRecord );
-    CheckIfNameModifiedL( iPriv->iWapIPBearerRecord );
-
-    if ( !iPriv->iWapAPRecord->RecordId() )
-        {
-        iPriv->iWapAPRecord->SetRecordId( KCDNewRecordRequest );
-        iPriv->iWapAPRecord->StoreL( Session() );
-        }
-    else
-        {
-        iPriv->iWapAPRecord->ModifyL( Session() );
-        }
-    
-    if ( !iPriv->iWapIPBearerRecord->RecordId() )
-        {
-        iPriv->iWapIPBearerRecord->iWAPAccessPointId = iPriv->iWapAPRecord->RecordId();
-        iPriv->iWapIPBearerRecord->iWAPIAP = iIapId;
-        
-        iPriv->iWapIPBearerRecord->SetRecordId( KCDNewRecordRequest );
-        iPriv->iWapIPBearerRecord->StoreL( Session() );
-        }
-    else
-        {
-        iPriv->iWapIPBearerRecord->ModifyL( Session() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::NewWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::NewWapRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::NewWapBearerRecordL" );
-
-    if ( !iPriv->iWapIPBearerRecord )
-        {
-        iPriv->iWapIPBearerRecord = static_cast<CCDWAPIPBearerRecord *>
-                      (CCDRecordBase::RecordFactoryL(KCDTIdWAPIPBearerRecord));
-        iPriv->iWapIPBearerRecord->iWAPProxyPort = 0;
-        iPriv->iWapIPBearerRecord->iWAPWSPOption = ECmWapWspOptionConnectionOriented;
-        iPriv->iWapIPBearerRecord->iWAPSecurity = EFalse;
-        }
-
-    if ( !iPriv->iWapAPRecord )
-        {
-        iPriv->iWapAPRecord = static_cast<CCDWAPAccessPointRecord *>
-                   (CCDRecordBase::RecordFactoryL(KCDTIdWAPAccessPointRecord));
-        // SMS bearer is not supported by this version
-        iPriv->iWapAPRecord->iWAPCurrentBearer.SetL( 
-                                               TPtrC(KCDTypeNameWAPIPBearer) );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::NewSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-CCDIAPMetadataRecord* CCmPluginBaseEng::NewSeamlessnessRecordL( TBool aSetDef )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::NewSeamlessnessRecordL" );
-
-    CCDIAPMetadataRecord* record = new (ELeave) CCDIAPMetadataRecord( 
-                                          iCmMgr.SeamlessnessTableId() );
-                                          
-    if( aSetDef )
-        {
-        record->iSeamlessness = ESeamlessnessConfirmFirst;
-        }
-        
-    return record;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetAttribute
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::SetAttribute( CCDRecordBase* aRecord, 
-                                     TUint32 aAttribute, 
-                                     TBool aSet )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetAttribute" );
-   
-    if ( aSet )
-        {
-        aRecord->SetAttributes( aAttribute );
-        }
-    else
-        {
-        aRecord->ClearAttributes( aAttribute );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CopyAttributes
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::CopyAttributes( CCDRecordBase* aSrcRecord, 
-                                       CCDRecordBase* aDstRecord )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CopyAttributes" );
-
-    TMDBAttributeFlags attr( aSrcRecord->Attributes() );
-    
-    aDstRecord->SetAttributes( attr );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::FindWAPRecordL
-// ---------------------------------------------------------------------------
-//
-CCDWAPIPBearerRecord* CCmPluginBaseEng::FindWAPRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::FindWAPRecordL" );
-
-    CMDBRecordSet<CCDWAPIPBearerRecord>* wapRS = 
-            new(ELeave) 
-                   CMDBRecordSet<CCDWAPIPBearerRecord>(KCDTIdWAPIPBearerRecord);
-    CleanupStack::PushL( wapRS );
-    
-    CCDWAPIPBearerRecord* wapBearerRecord = static_cast<CCDWAPIPBearerRecord *>
-                      (CCDRecordBase::RecordFactoryL(KCDTIdWAPIPBearerRecord));
-                      
-    CleanupStack::PushL( wapBearerRecord );
-    
-    wapBearerRecord->iWAPIAP = iIapId;
-    wapRS->iRecords.AppendL( wapBearerRecord );
-    
-    CleanupStack::Pop( wapBearerRecord );
-    wapBearerRecord = NULL;
-    
-    if ( wapRS->FindL(Session()) )
-        {
-        CLOG_WRITE( "WAP bearer record found" );
-        
-        wapBearerRecord = 
-                        static_cast<CCDWAPIPBearerRecord *>(wapRS->iRecords[0]);
-
-        // we take over the ownership of this record
-        wapRS->iRecords.Remove( 0 );
-        }
-
-    CleanupStack::PopAndDestroy( wapRS );
-        
-    return wapBearerRecord;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::FindSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-CCDIAPMetadataRecord* CCmPluginBaseEng::FindSeamlessnessRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::FindSeamlessnessRecordL" );
-
-    CMDBRecordSet<CCDIAPMetadataRecord>* slnRS = 
-      new(ELeave) CMDBRecordSet<CCDIAPMetadataRecord>(iCmMgr.SeamlessnessTableId());
-    CleanupStack::PushL( slnRS );
-    
-    CCDIAPMetadataRecord* slnRecord = 
-            new (ELeave) CCDIAPMetadataRecord( iCmMgr.SeamlessnessTableId() );
-                                                                  
-    slnRecord->iIAP = IAPRecordElementId();
-    slnRS->iRecords.AppendL( slnRecord );
-    
-    slnRecord = NULL;
-    
-    if ( slnRS->FindL(Session()) )
-        {
-        CMDBRecordBase* record = slnRS->iRecords[0];
-
-        slnRecord = NewSeamlessnessRecordL( EFalse );
-        slnRecord->SetRecordId( record->RecordId() );
-        
-        // This can leave only in case of OOM.
-        slnRecord->LoadL( Session() );
-        }
-    else
-        {
-        slnRecord = NewSeamlessnessRecordL( ETrue );
-        }
-
-    CleanupStack::PopAndDestroy( slnRS );
-        
-    return slnRecord;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::DoMakeValidNameL
-// ---------------------------------------------------------------------------
-//
-HBufC* CCmPluginBaseEng::DoMakeValidNameL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::DoMakeValidNameL" );
-
-    TBool changed( EFalse );
-    HBufC* temp = HBufC::NewLC( KApMaxConnNameLength );
-    HBufC* temp2 = HBufC::NewLC( KApMaxConnNameLength );
-
-    HBufC* corrname = EnsureMaxLengthLC( aName, changed );
-    *temp = *corrname;
-    TInt postfix( 0 );
-    TInt pf( 0 );
-    TInt i( 0 );
-    TBool valid ( EFalse );
-
-    TPtrC prefix = GetPrefix( *corrname );
-    
-    postfix = GetPostfix( *temp, prefix );
-    postfix = -1;
-    do
-        {       
-        valid = IsValidNameL( *temp );
-        if ( !valid )
-            {
-            changed = ETrue;
-            postfix++;
-            // check the length of postfix, check text length accordingly
-            pf = postfix;
-            for (i=1; i<10; i++)
-                {
-                pf /= 10;
-                if ( !pf )
-                    {
-                    break;
-                    }
-                }
-            TPtr sgdptr( temp->Des() );
-            TPtr sgdptr2( temp2->Des() );
-            if ( postfix )
-                {
-                if ( postfix < 10 )
-                    {
-                    sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 3 );
-                    }
-                else
-                    {
-                    sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 2 );
-                    }
-                }
-            else
-                {
-                sgdptr2 = prefix.Left( KApMaxConnNameLength );
-                }
-            if ( postfix )
-                {
-                TBuf< KMaxPostfixLength > postfixString;
-                if ( postfix > 9 )
-                    {
-                    postfixString.Format( KFormatLargePostfix, postfix );
-                    AknTextUtils::LanguageSpecificNumberConversion( postfixString );
-                    }
-                else
-                    {
-                    postfixString.Format( KFormatPostfix, postfix );
-                    AknTextUtils::LanguageSpecificNumberConversion( postfixString );
-                    }
-                sgdptr.Format( KFormatNameWithPostfix, &sgdptr2,
-                                   &postfixString );
-                }
-            else
-                {
-                sgdptr.Format( KFormatNoPostfix, &sgdptr2 );
-                }
-            }
-        } while ( !valid );
-
-    CleanupStack::PopAndDestroy( corrname );
-    CleanupStack::PopAndDestroy( temp2 );
-
-    if ( changed )
-        {
-        CLOG_WRITE_1( "New name: [%S]", temp );
-        CleanupStack::Pop( temp );
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( temp );
-        temp = NULL;
-        }
-
-    return temp;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::EnsureMaxLengthLC
-// ---------------------------------------------------------------------------
-//
-HBufC* CCmPluginBaseEng::EnsureMaxLengthLC( const TDesC& aName, 
-                                            TBool& aChanged )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::EnsureMaxLengthLC" );
-
-    TInt length = aName.Length();
-    
-    aChanged = EFalse;
-    
-    if ( !length )
-        {
-        // Name is required.        
-        User::Leave( KErrArgument );
-        }
-
-    HBufC* corrname;
-    if ( KApMaxConnNameLength < length )
-        { // name too long, truncate.
-        corrname = aName.Left( KApMaxConnNameLength ).AllocLC();
-        aChanged = ETrue;
-        }
-    else
-        {
-        corrname = aName.AllocLC();
-        corrname->Des().Trim();
-        if ( corrname->Length() == 0 )
-            {
-            User::Leave( KErrArgument );
-            }
-        // comes here only if name is valid
-        if ( corrname->Length() != aName.Length() )
-            {
-            aChanged = ETrue;
-            }
-        }
-
-    return corrname;
-    }
-
-// ---------------------------------------------------------------------------
-// Given aName in the format <prefix> or <prefix><brace><integer><brace>,
-// return a pointer to the leading part.
-// That is, if there is trailing <space><integer>,
-// then that is excluded; if there is no trailing part, then the original
-// decriptor is returned.
-// Examples:
-//   - "Foo" returns "Foo";
-//   - "Foo 12" returns "Foo 12";
-//   - "Foo(12)" returns "Foo";
-//   - "Foo 12 (34)" returns "Foo 12 ";
-//   - "Foo bar" returns "Foo bar";
-//   - "Foo " returns "Foo ".
-// ---------------------------------------------------------------------------
-TPtrC CCmPluginBaseEng::GetPrefix( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetPrefix" );
-
-    TPtrC prefix = aName;
-    TInt lastBrace = aName.LocateReverse('(');
-    if ( lastBrace != KErrNotFound )
-        {
-        // aName looks like "<prefix><brace><something>".
-        // See if <something> is an integer number.
-        TPtrC num = aName.Right( aName.Length() - lastBrace - 1 );
-        TInt val;
-        TLex lex( num );
-        if ( lex.Val( val ) == KErrNone )
-            {
-            // Yes, the trailer is an integer.
-            prefix.Set( aName.Left( lastBrace ) );
-            }
-        }
-    return prefix;
-    }
-
-
-// ---------------------------------------------------------------------------
-// If aName is constructed from aPrefix with a postfix, get the numeric
-// value of the postfix, e.g:
-//   - GetPostfix( "Foo (3)", "Foo" ) == 3
-//   - GetPostfix( "Foo 23 (45)", "Foo 23" ) == 45
-// If aName is the same as aPrefix, return 0, e.g.:
-//   - GetPostfix( "Foo", "Foo" ) == 0
-// If aName is not constructed from aPrefix, return -1, e.g.:
-//   - GetPostfix( "Foobar", "Foo" ) == -1
-//   - GetPostfix( "Fo 23 45", "Foo" ) == -1
-// ---------------------------------------------------------------------------
-TInt CCmPluginBaseEng::GetPostfix( const TDesC& aName, const TDesC& aPrefix )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetPostfix" );
-    TInt postfix( KErrNotFound );
-    TInt nameLength = aName.Length();
-    TInt prefixLength = aPrefix.Length();
-    if ( nameLength >= prefixLength && aName.FindF( aPrefix ) == 0 )
-        {
-        // aName is longer or equal length, and
-        // aPrefix can be found in the beginning of aName.
-        if ( nameLength == prefixLength )
-            {
-            // They have the same length; they equal.
-            postfix = 0;
-            }
-        else
-            {
-            if ( prefixLength > 0 )
-                {
-                if ( aName[ prefixLength ] == '(' )
-                    {
-                    // (Now we know that aName is longer than aPrefix.)
-                    // aName looks like "aPrefix<brace><something>".
-                    // See if <something> is an integer number.
-                    TPtrC num = aName.Right( nameLength - prefixLength - 1 );
-                        TBuf< KApMaxConnNameLength > pf;
-                    pf = num;
-                    AknTextUtils::ConvertDigitsTo( pf, EDigitTypeWestern );
-                    TInt val;
-                    TLex lex( pf );
-                    if ( lex.Val( val ) == KErrNone )
-                        {
-                        // Yes, the trailer is an integer.
-                        if ( val > 0 )
-                            {
-                            postfix = val;
-                            }
-                        else
-                            {
-                            // signal that it is invalid...
-                            postfix = -1;
-                            }
-                        }
-	                }
-                }
-            else
-                {
-                postfix = -1;
-                }
-            }
-        }
-    return postfix;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::IsValidNameL
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginBaseEng::IsValidNameL( const TDesC& aNameText )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::IsValidNameL" );
-
-    TBool retVal( ETrue );
-    
-    OpenTransactionLC();
-    
-    CMDBRecordSet<CCDIAPRecord>* iapRS = 
-                      new(ELeave) CMDBRecordSet<CCDIAPRecord>(KCDTIdIAPRecord);
-    CleanupStack::PushL(iapRS);
-
-    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-
-    CleanupStack::PushL( iapRecord );
-    
-    // Prime record
-    iapRecord->iRecordName.SetL( aNameText );
-    
-    iapRS->iRecords.AppendL( iapRecord );
-
-    CleanupStack::Pop( iapRecord );
-    
-    iapRecord = NULL;
-    
-    if ( iapRS->FindL(Session()) )
-        {
-        if ( iIapId )
-            // this is not a new CM
-            {
-            for ( TInt i = 0; i < iapRS->iRecords.Count(); ++i )
-                {
-                if ( iapRS->iRecords[i]->RecordId() != iIapId )
-                    // duplication because it's not our name
-                    {
-                    retVal = EFalse;
-                    break;
-                    }
-                }
-            }
-        else
-            // new CM -> any occurence is a duplication
-            {
-            retVal = EFalse;
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( iapRS );
-    
-    RollbackTransaction();
-        
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::EscapeTextLC
-// ---------------------------------------------------------------------------
-//
-HBufC* CCmPluginBaseEng::EscapeTextLC( const TDesC& aLiteral )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::EscapeTextLC" );
-
-    TInt l( aLiteral.Length() );
-    //> 2*, to ensure correct esc. even if ALL chars are quotes...
-    HBufC* retbuf = HBufC::NewLC( 2*l );
-    TPtr ret = retbuf->Des();
-    TUint quote( '\'' );  // TChar gives warnings in THUMB & ARMI
-    TInt i( 0 );
-
-    for ( i=0; i<l; i++ )
-        {
-        ret.Append( aLiteral[i] );
-        if ( aLiteral[i] == quote )
-            {
-            // Duplicate quote.
-            ret.Append( quote );
-            }
-        }
-    return retbuf;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetNameL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBaseEng::SetNameL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetNameL" );
-    
-    if ( iPriv->iNamingMethod == ENamingNothing )
-        {
-        iIapRecord->iRecordName.SetL( aName );
-        }
-    else if ( iPriv->iNamingMethod == ENamingUnique )
-        {
-        HBufC* newName = DoMakeValidNameL( aName );
-        
-        if ( newName )
-            // name converted to unique
-            {
-            CleanupStack::PushL( newName );
-            iIapRecord->iRecordName.SetL( *newName );
-            CleanupStack::PopAndDestroy( newName );
-            }
-        else
-            {
-            iIapRecord->iRecordName.SetL( aName );
-            }
-        }
-    else if ( iPriv->iNamingMethod == ENamingNotAccept )
-        {
-        if ( IsValidNameL( aName ) )
-            {
-            iIapRecord->iRecordName.SetL( aName );
-            }
-        else
-            {
-            User::Leave( KErrArgument );
-            }
-        }
-    else
-        {
-        User::Leave( KErrCorrupt );
-        }
-        
-    CLOG_WRITE_1( "Finale name: [%S]", &FIELD_TO_TDESC(iIapRecord->iRecordName) );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::AddConverstionTableL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::AddConverstionTableL( CCDRecordBase* *aRecord,
-                           TBool* aEnabled,
-                           const TCmAttribConvTable* aConvTable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::AddConverstionTableL" );
-    TCmAttrConvArrayItem* item = new (ELeave) TCmAttrConvArrayItem;
-    
-    item->iRecord = aRecord;
-    item->iEnabled = aEnabled;
-    item->iConvTable = aConvTable;
-    
-    iPriv->iConvTblArray->AppendL( item );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::AddCommonConversionTableL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::AddCommonConversionTableL( 
-                                const TCmCommonAttrConvArrayItem* aConvTable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::AddCommonConversionTableL" );
-
-    User::LeaveIfError( iPriv->iCommonConvTblArray.Append( aConvTable ) );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::RemoveConversionTable
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::RemoveConversionTable( 
-                                    const TCmAttribConvTable* aConvTable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::RemoveConversionTable" );
-
-    for ( TInt i = 0; i < iPriv->iConvTblArray->Count(); ++i )
-        {
-        if ( (*iPriv->iConvTblArray)[i]->iConvTable == aConvTable )
-            {
-            delete (*iPriv->iConvTblArray)[i];
-            iPriv->iConvTblArray->Delete( i );
-            }
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::RemoveCommonConversionTable
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::RemoveCommonConversionTable( 
-                                 const TCmCommonAttrConvArrayItem* aConvTable )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::RemoveCommonConversionTable" );
-
-    // When calling Remove(), it's safer to loop starting from end.
-    for ( TInt i = iPriv->iCommonConvTblArray.Count()-1; i >= 0; i-- )
-        {
-        if ( iPriv->iCommonConvTblArray[i] == aConvTable )
-            {
-            iPriv->iCommonConvTblArray.Remove( i );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::FindFieldL
-// ---------------------------------------------------------------------------
-//
-TValidationFunctionL CCmPluginBaseEng::FindFieldL( TUint32 aAttribute,
-                                           TCMFieldTypes aType,
-                                           CMDBElement* &aElement ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::FindFieldL" );
-
-    TValidationFunctionL func = NULL;
-    const TCmAttrConvArrayItem* foundItem = ConversionTable( aAttribute );
-    
-    aElement = NULL;
-    
-    if( !foundItem )
-        {
-        User::Leave( KErrNotSupported );
-        }
-        
-    if ( foundItem->iEnabled )
-        {
-        if ( !(*foundItem->iEnabled) )
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-
-    if ( !(*foundItem->iRecord) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-            
-    TInt index( 0 );
-    CMDBElement& field = FieldByAttributeL( foundItem, aAttribute, index );
-    switch ( field.Type() )
-        {
-        case EText:
-        case EMedText:
-        case ELongText:
-            {
-            if ( aType == ECmText )
-                {
-                aElement = &field;
-                }
-            }
-            break;
-
-        case EDesC8:
-            {
-            if ( aType == ECmText8 )
-                {
-                aElement = &field;
-                }
-            }
-            break;
-            
-        case EUint32:
-        case EInt:
-        case EBool:
-            {
-            if ( aType == ECmInt ||
-                 aType == ECmBool )
-                {
-                aElement = &field;
-                }
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrArgument );
-            }
-            break;
-        }
-        
-    if( aElement )
-        {
-        func = foundItem->iConvTable[index].iValidFuncL;
-        }
-    else
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    return func;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::Reset
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::Reset()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::Reset" );
-
-    iIapId = 0;
-    
-    delete iIapRecord; iIapRecord = NULL;
-    delete iProxyRecord; iProxyRecord = NULL;
-    delete iServiceRecord; iServiceRecord = NULL;
-    delete iChargeCardRecord; iChargeCardRecord = NULL;
-    delete iNetworkRecord; iNetworkRecord = NULL;
-    delete iLocationRecord; iLocationRecord = NULL;
-    if ( iPriv )
-        {
-        iPriv->iLoadResult = KErrNone;
-        delete iPriv->iWapAPRecord; iPriv->iWapAPRecord = NULL;
-        delete iPriv->iWapIPBearerRecord; iPriv->iWapIPBearerRecord = NULL;
-        delete iPriv->iMetaDataRecord; iPriv->iMetaDataRecord = NULL;            
-        }
-    
-    iChargeCardEnabled = EFalse;
-    iLocationEnabled = EFalse;
-    }
-    
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CheckIfAlreadyConnected
-// ---------------------------------------------------------------------------
-EXPORT_C TBool CCmPluginBaseEng::CheckIfAlreadyConnected() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CheckIfAlreadyConnected" );
-
-    TBool retVal( EFalse );
-    RSocketServ serv;
-    RConnection connection;
-    TUint   count;
-
-    if ( serv.Connect() == KErrNone )
-        {
-        if ( connection.Open( serv, KAfInet ) == KErrNone )
-            {
-            if ( connection.EnumerateConnections( count ) == KErrNone )
-                {
-                TPckgBuf<TConnectionInfo> connInfo;
-
-                for ( TUint32 i = 1; i <= count; ++i )
-                    {
-                    connection.GetConnectionInfo( i, connInfo );
-
-                    if ( connInfo().iIapId == iIapId )
-                        {
-                        CLOG_WRITE( "Found connection" );
-                        retVal = ETrue;
-                        break;
-                        }
-                    }
-                }
-
-            connection.Close();
-            }
-
-        serv.Close();
-        }
-
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CheckIfNameModifiedL
-// ---------------------------------------------------------------------------
-EXPORT_C void 
-        CCmPluginBaseEng::CheckIfNameModifiedL( CCDRecordBase* aRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CheckIfNameModifiedL" );
-
-    if ( !TPtrC(iIapRecord->iRecordName).CompareF( TPtrC(aRecord->iRecordName)) )
-        // names matche
-        {
-        return;
-        }
-    
-    aRecord->iRecordName.SetL( TPtrC(iIapRecord->iRecordName) );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::IAPRecordElementId
-// ---------------------------------------------------------------------------
-TMDBElementId CCmPluginBaseEng::IAPRecordElementId() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::IAPRecordElementId" );
-    
-    return ( KCDMaskShowField & iIapRecord->ElementId() );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::IsProtected
-// ---------------------------------------------------------------------------
-TBool CCmPluginBaseEng::IsProtected() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::IsProtected" );
-
-    return ( iIapRecord->Attributes() & ECDProtectedWrite );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GetLocationIdL
-// ---------------------------------------------------------------------------
-TUint32 CCmPluginBaseEng::GetLocationIdL() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetLocationIdL" );
-
-    TUint32 locId( 0 );
-    CMDBRecordSet<CCDLocationRecord>* locRS = 
-            new(ELeave) CMDBRecordSet<CCDLocationRecord>(KCDTIdLocationRecord);
-    CleanupStack::PushL( locRS );
-    
-    CCDLocationRecord* locRecord = static_cast<CCDLocationRecord *>
-                         (CCDRecordBase::RecordFactoryL(KCDTIdLocationRecord));
-
-    CleanupStack::PushL( locRecord );
-    locRecord->iRecordName.SetL( KLocationName );                                            
-    locRS->iRecords.AppendL( locRecord );
-    CleanupStack::Pop( locRecord );
-   
-    if ( locRS->FindL(Session()) )
-        {
-        locRecord = static_cast<CCDLocationRecord *>(locRS->iRecords[0]);
-        
-        locId = locRecord->RecordId();
-        }
-    else
-        {
-        CLOG_WRITE( "Loc id not found" );
-        User::Leave( KErrNotFound );
-        }
-        
-    CleanupStack::PopAndDestroy( locRS );
-        
-    return locId;
-    }            
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CheckForCommonAttribute
-// ---------------------------------------------------------------------------
-TUint32 
-    CCmPluginBaseEng::CheckForCommonAttribute( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CheckForCommonAttribute" );
-
-    TUint32 convAttr( aAttribute );
-    
-    if ( iPriv->iCommonConvTblArray.Count() &&
-        aAttribute > ECmCommonAttributesStart &&
-        aAttribute < ECmCommonAttributesEnd )
-        {
-        for ( TInt i = 0; i < iPriv->iCommonConvTblArray.Count(); ++i )
-            {
-            const TCmCommonAttrConvArrayItem* convArray = 
-                                                iPriv->iCommonConvTblArray[i];
-            for ( TInt item = 0; convArray[item].iCommonAttribId; ++item )
-                {
-                if ( convArray[item].iCommonAttribId == aAttribute )
-                    {
-                    return convArray[item].iAttribId;
-                    }
-                }
-            }
-        }
-        
-    return convAttr;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CommonAttribute
-// ---------------------------------------------------------------------------
-/*TUint32 CCmPluginBaseEng::CommonAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CommonAttribute" );
-
-    if ( iPriv->iCommonConvTblArray.Count() )
-        {
-        for ( TInt i = 0; i < iPriv->iCommonConvTblArray.Count(); ++i )
-            {
-            const TCmCommonAttrConvArrayItem* convArray = 
-                                                iPriv->iCommonConvTblArray[i];
-            for ( TInt item = 0; convArray[item].iCommonAttribId; ++item )
-                {
-                if ( convArray[item].iAttribId == aAttribute )
-                    {
-                    return convArray[item].iCommonAttribId;
-                    }
-                }
-            }
-        }
-        
-    User::Leave( KErrArgument );
-    
-    return 0;
-    }*/
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::FeatureSupported
-// ---------------------------------------------------------------------------
-EXPORT_C TBool CCmPluginBaseEng::FeatureSupported( TInt aFeature )
-    {
-#ifdef _IPV6_DISABLED
-    if( aFeature == KFeatureIdIPv6 )
-        {
-        return EFalse;
-        }
-#endif
-    return CCmManagerImpl::FeatureSupported( aFeature );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GlobalBearerPriority
-// ---------------------------------------------------------------------------
-EXPORT_C TInt 
-    CCmPluginBaseEng::GlobalBearerPriority( const TDesC& aServiceType ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GlobalBearerPriority" );
-
-    return iCmMgr.GlobalBearerPriority( EFalse, aServiceType );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::GlobalUiBearerPriority
-// ---------------------------------------------------------------------------
-EXPORT_C TInt 
-    CCmPluginBaseEng::GlobalUiBearerPriority( const TDesC& aServiceType ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GlobalUiBearerPriority" );
-
-    return iCmMgr.GlobalBearerPriority( ETrue, aServiceType );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetProxyServerNameL
-// ---------------------------------------------------------------------------
-TBool CCmPluginBaseEng::SetProxyServerNameL( const TDesC& aProxyServer )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetProxyServerNameL" );
-
-    iProxyRecord->iServerName.SetL( aProxyServer );
-    if( !aProxyServer.Length() )
-        {
-        iProxyRecord->iPortNumber = 0;
-        iProxyRecord->iUseProxyServer = EFalse;
-        }
-    else
-        {
-        iProxyRecord->iUseProxyServer = ETrue;
-        }
-        
-    return ETrue;        
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::ConvTableItemL
-// ---------------------------------------------------------------------------
-EXPORT_C const TCmAttribConvTable* 
-                        CCmPluginBaseEng::ConvTableItem( TUint32 aAttribute )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::ConvTableItem" );
-
-    TInt i;
-    TCmAttrConvArrayItem* foundItem = ConversionTable( aAttribute );
-         
-    if( foundItem )
-        {
-        // From 2nd item, because the first one is for the range.            
-        for ( i = 1; foundItem->iConvTable[i].iAttribId; ++i )
-            {
-            if ( foundItem->iConvTable[i].iAttribId == aAttribute )
-                {
-                return &foundItem->iConvTable[i];
-                }
-            }
-        }
-    else
-        {
-        // I know that this is a not nice solution, but 
-        // I couldn't find any more inteligent way of adding
-        // ECmBearerSettingName to the array.
-        const TCmAttribConvTable* item = SUiTable;
-        
-        // This is a where use 
-        for ( i = 0; item[i].iAttribId; ++i )
-            {
-            if( item[i].iAttribId == aAttribute )
-                {
-                return &item[i];
-                }
-            }
-        }
-        
-    return NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::ConversionTable
-// ---------------------------------------------------------------------------
-TCmAttrConvArrayItem* 
-                CCmPluginBaseEng::ConversionTable( TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::ConversionTable" );
-
-    TCmAttrConvArrayItem* foundItem = NULL;
-    TInt i;
-    
-    for ( i = 0; i < iPriv->iConvTblArray->Count(); ++i )
-        {
-        TCmAttrConvArrayItem* item = (*iPriv->iConvTblArray)[i];
-        
-        if ( item->iConvTable[0].iAttribId <= aAttribute &&
-             item->iConvTable[0].iCommsDatId >= aAttribute )
-            {
-            foundItem = item;
-            break;
-            }
-        }
-        
-    return foundItem;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::FieldByAttributeL
-// ---------------------------------------------------------------------------
-CMDBElement& CCmPluginBaseEng::FieldByAttributeL( 
-                                            const TCmAttrConvArrayItem* aItem,
-                                            const TUint32 aAttribute,
-                                            TInt& aIndex ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::FieldByAttributeL" );
-
-    // From 2nd item, because the first one is for the range.            
-    for ( aIndex = 1; aItem->iConvTable[aIndex].iAttribId; ++aIndex )
-        {
-        if ( aItem->iConvTable[aIndex].iAttribId == aAttribute )
-            {
-            return *(*aItem->iRecord)->GetFieldByIdL( 
-                                      aItem->iConvTable[aIndex].iCommsDatId );
-            }
-        }
-        
-    User::Leave( KErrNotFound );
-    // Dead code
-    return *(CMDBElement*)1;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::SetDNSServerAddressL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::SetDNSServerAddressL( TUint32 aSrv1Attr,
-                                                      const TDesC& aSrv1,
-                                                      TUint32 aSrv2Attr,
-                                                      const TDesC& aSrv2,
-                                                      TUint32 aAddrFromSrvAttr,
-                                                      TBool aIPv6 )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetDNSServerAddressL" );
-
-    TBool undef1;
-    TBool undef2;
-    TPtrC dynamic;
-    
-    if( aIPv6 )
-        // IPv6
-        {
-        undef1 = ClassifyIPv6Address( aSrv1 ) == EIPv6Unspecified;
-        undef2 = ClassifyIPv6Address( aSrv2 ) == EIPv6Unspecified;
-        
-        dynamic.Set( KDynamicIpv6Address );
-        }
-    else
-        {
-        undef1 = IsUnspecifiedIPv4Address( aSrv1 );
-        undef2 = IsUnspecifiedIPv4Address( aSrv2 );
-        
-        dynamic.Set( KUnspecifiedIPv4 );
-        }
-        
-    if( undef1 )
-        {
-        SetStringAttributeL( aSrv1Attr, aSrv2 );
-        SetStringAttributeL( aSrv2Attr, dynamic );
-        
-        SetBoolAttributeL( aAddrFromSrvAttr, undef2 );
-        }
-    else
-        {
-        SetStringAttributeL( aSrv1Attr, aSrv1 );
-        SetStringAttributeL( aSrv2Attr, aSrv2 );
-
-        SetBoolAttributeL( aAddrFromSrvAttr, EFalse );
-        }        
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CheckDNSServerAddressL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBaseEng::CheckDNSServerAddressL( TBool aIPv6,
-                                                        CMDBField<TDesC>& aDNS1,
-                                                        CMDBField<TDesC>& aDNS2,
-                                                        CMDBField<TBool>& /*aDNSFromServer*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CheckDNSServerAddressL" );
-
-    // aDNSFromServer is commented out because the API must not set this
-    // field any more. It is only set from the UI
-    if( !(aDNS1.ElementId() & KCDChangedFlag) &&
-        !(aDNS2.ElementId() & KCDChangedFlag) )
-        // No change
-        {
-        return;
-        }
-
-    if( aIPv6 )
-        {
-        if( ClassifyIPv6Address( aDNS1 ) == EIPv6Unspecified )
-            {
-            if( ClassifyIPv6Address( aDNS2 ) != EIPv6Unspecified )
-                {
-                aDNS1.SetL( aDNS2 );
-                aDNS2.SetL( KDynamicIpv6Address );
-                }
-            }
-        }
-    else // IPv4
-        {
-        if( IsUnspecifiedIPv4Address( aDNS1 ) )
-            {
-            if( !IsUnspecifiedIPv4Address( aDNS2 ) )
-                {
-                aDNS1.SetL( aDNS2 );
-                aDNS2.SetL( KUnspecifiedIPv4 );
-                }
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::CheckSpaceBelowCriticalLevelL
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginBaseEng::CheckSpaceBelowCriticalLevelL() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::CheckSpaceBelowCriticalLevelL" );
-
-    // OOD handling. If disk space is low user is notified.
-    RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL<RFs>( fs );
-    
-    // Checks the FFS space "after" addition
-    TBool belowCL = SysUtil::FFSSpaceBelowCriticalLevelL
-            ( &fs, KEstimatedOverhead );
-    
-    CleanupStack::PopAndDestroy(); // fs
-    
-    if( belowCL )
-        {
-        // Raise a dialog to notify the user.
-        TCmCommonUi::ShowMemoryFullConfirmationQueryL();
-        // It must leave because it is the only way to notify the caller about
-        // the operation failed. (Its caller does not return indicator.)
-        // KLeaveWithoutAlert means no more dialog will raise
-        User::Leave( KLeaveWithoutAlert );
-        }
-        
-    // Return value keept to have a suitable API    
-    return belowCL;    
-    
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::IncrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmPluginBaseEng::IncrementRefCounter()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::IncrementRefCounter" );
-
-    iRefCounter++;
-    }
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::DecrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmPluginBaseEng::DecrementRefCounter()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::DecrementRefCounter" );
-
-    iRefCounter--;
-    }
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::GetRefCounter
-// -----------------------------------------------------------------------------
-TInt CCmPluginBaseEng::GetRefCounter()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetRefCounter" );
-
-    return iRefCounter;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::IdIsValid
-// -----------------------------------------------------------------------------
-TBool CCmPluginBaseEng::IdIsValid()
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::IdIsValid" );
-
-    return iIdIsValid;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::IdIsValid
-// -----------------------------------------------------------------------------
-void CCmPluginBaseEng::SetIdValidity(TBool validity)
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetIdValidity" );
-
-    iIdIsValid = validity;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmPluginBaseEng::GetRefCounter
-// -----------------------------------------------------------------------------
-void CCmPluginBaseEng::GenericStringWriterL( const TUint32 aAttribute, 
-                                             const TDesC16& aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GenericStringWriterL" );
-
-    TUint32 attribute = CheckForCommonAttribute( aAttribute );
-    CMDBField<TDesC>* field;
-    
-    TValidationFunctionL func = 
-                FindFieldL( attribute, ECmText, (CMDBElement*&)field );
-    
-    if( func )
-        {
-        func( this, attribute, (const TAny*)&aValue );
-        }
-        
-    field->SetL( aValue );    
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBaseEng::MappedCommonAttribute
-// ---------------------------------------------------------------------------
-TUint32 
-    CCmPluginBaseEng::MappedCommonAttribute( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::MappedCommonAttribute" );
-
-    TUint32 convAttr( aAttribute );
-    
-    if ( iPriv->iCommonConvTblArray.Count() )
-        {
-        for ( TInt i = 0; i < iPriv->iCommonConvTblArray.Count(); ++i )
-            {
-            const TCmCommonAttrConvArrayItem* convArray = 
-                                                iPriv->iCommonConvTblArray[i];
-            for ( TInt item = 0; convArray[item].iCommonAttribId; ++item )
-                {
-                if ( convArray[item].iAttribId == aAttribute )
-                    {
-                    return convArray[item].iCommonAttribId;
-                    }
-                }
-            }
-        }
-        
-    return convAttr;
-    }
-//-----------------------------------------------------------------------------
-// CCmPluginBaseEng::ParentDestination
-// -----------------------------------------------------------------------------
-EXPORT_C CCmDestinationImpl* CCmPluginBaseEng::ParentDestination() const
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::ParentDestination" );
-
-    if (iParentDest)
-        {
-        CCmDestinationImpl* parentDest = NULL;
-        TRAPD( err, parentDest = iCmMgr.DestinationL( iParentDest ) );
-        if ( !err )
-            {
-            return parentDest;
-            }
-        }
-    
-    return NULL;
-    }
-   
-//-----------------------------------------------------------------------------
-// CCmPluginBaseEng::GetAdditionalUids
-// -----------------------------------------------------------------------------
-EXPORT_C void CCmPluginBaseEng::GetAdditionalUids( RArray<TUint32>& /*aIapIds*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginBaseEng::GetAdditionalUids" );
-    }
-
-//-----------------------------------------------------------------------------
-// CCmPluginBaseEng::SetPreDefinedId
-// -----------------------------------------------------------------------------
-EXPORT_C void CCmPluginBaseEng::SetPreDefinedId( const TUint32 aPreDefId )
-	{
-    LOGGER_ENTERFN( "CCmPluginBaseEng::SetPreDefinedId" );
-
-	iPreDefIapId = aPreDefId;
-	}
-
--- a/cmmanager/cmmgr/Framework/Src/cmapplicationsettingsui.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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:  Application Setting UI
-*
-*/
-
-#include "cmapplicationsettingsui.h"
-#include <cmmanager.h>
-#include "cmconnsettingsuiimpl.h"
-#include "cmmanager.hrh"
-
-using namespace CMManager;
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::NewL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmApplicationSettingsUi* CCmApplicationSettingsUi::NewL()
-    {
-    CCmApplicationSettingsUi* self = new (ELeave) CCmApplicationSettingsUi();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );   // self
-    return self;
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::NewLC()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmApplicationSettingsUi* CCmApplicationSettingsUi::NewLC()
-    {
-    CCmApplicationSettingsUi* self = new (ELeave) CCmApplicationSettingsUi();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::CCmApplicationSettingsUi()
-//-----------------------------------------------------------------------------
-//
-CCmApplicationSettingsUi::CCmApplicationSettingsUi()
-    {
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::~CCmApplicationSettingsUi()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmApplicationSettingsUi::~CCmApplicationSettingsUi()
-    {
-    delete iImpl;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::ConstructL()
-//-----------------------------------------------------------------------------
-//
-void CCmApplicationSettingsUi::ConstructL()
-    {
-    iImpl = CCmConnSettingsUiImpl::NewWithoutTablesL();
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::RunSettingsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmApplicationSettingsUi::RunApplicationSettingsL( 
-                                               TCmSettingSelection& aSelection )
-    {
-    TBearerFilterArray aFilterArray;
-    return iImpl->RunApplicationSettingsL(  aSelection,
-                                            EShowDefaultConnection | 
-                                            EShowDestinations | 
-                                            EShowConnectionMethods,
-                                            aFilterArray );
-    }    
-    
-//-----------------------------------------------------------------------------
-//  CCmApplicationSettingsUi::RunSettingsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmApplicationSettingsUi::RunApplicationSettingsL( 
-                                        TCmSettingSelection& aSelection, 
-                                        TUint aListItems,
-                                        TBearerFilterArray& aFilterArray)
-    {
-    return iImpl->RunApplicationSettingsL(  aSelection,
-                                            aListItems,
-                                            aFilterArray );
-    }    
--- a/cmmanager/cmmgr/Framework/Src/cmapplicationsettingsuiimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +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:  Implementation of application setting UI.
-*
-*/
-
-#include <coemain.h>
-#include <featmgr.h>
-#include <data_caging_path_literals.hrh>
-#include <AknsUtils.h>
-
-#include "cmapplicationsettingsui.h"
-#include <cmmanager.h>
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include "cmapplicationsettingsuiimpl.h"
-
-using namespace CMManager;
-
-typedef struct
-    {
-    TInt                iCmIapId;
-    TInt                iCmDefaultPriority;
-    }TCmListItem;
-
-//---------------------------------------------------------------------------
-//  CCmApplicationSettingsUiImpl::NewL
-//---------------------------------------------------------------------------
-//
-EXPORT_C CCmApplicationSettingsUiImpl* CCmApplicationSettingsUiImpl::NewL()
-    {
-    return NULL;
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmApplicationSettingsUiImpl::RunSettingsL()
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmApplicationSettingsUiImpl::RunApplicationSettingsL( 
-                                          TCmSettingSelection& /*aSelection*/ )
-    {
-    return EFalse;
-    }    
-
--- a/cmmanager/cmmgr/Framework/Src/cmcommonui.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,687 +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:  Defines common UI methods.
-*
-*/
-
-#include <aknlists.h>       // CAknDoubleLargeGraphicPopupMenuStyleListBox
-#include <aknPopup.h>       // CAknPopupList
-#include <AknQueryDialog.h>
-#include <aknnotedialog.h>
-#include <badesca.h>        // CDesCArray
-#include <e32def.h>
-#include <e32std.h>
-#include <eikfrlb.h>        // CEikFormattedCellListBox
-#include <eiklbm.h>         // ELbmDoesNotOwnItemArray
-#include <gulicon.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-
-#include <cmcommonconstants.h>
-#include <cmcommonui.h>
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include "cmmanager.hrh"
-#include <cmconnectionmethoddef.h>
-
-using namespace CMManager;
-
-const TInt KDefaultListBoxFlags = 0;
-
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::CCmDesCArray::CCmDesCArray
-// ---------------------------------------------------------------------------
-//
-TCmCommonUi::CCmDesCArray::CCmDesCArray()
-    : CDesCArrayFlat( KCmArraySmallGranularity )
-    , iUids( KCmArraySmallGranularity )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::CCmDesCArray::~CCmDesCArray
-// ---------------------------------------------------------------------------
-//
-TCmCommonUi::CCmDesCArray::~CCmDesCArray()
-    {
-    iUids.Close();
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::CCmDesCArray::AppendL
-// ---------------------------------------------------------------------------
-//
-void TCmCommonUi::CCmDesCArray::AppendL( TUint aUid, const TDesC& aItem )
-    {
-    iUids.AppendL( aUid );
-    CDesCArray::AppendL( aItem );
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::CCmDesCArray::Uid
-// ---------------------------------------------------------------------------
-//
-TUint TCmCommonUi::CCmDesCArray::Uid( TInt aIndex ) const
-    {
-    return iUids[ aIndex ];
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowConfirmationQueryWithInputL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowConfirmationQueryWithInputL( TInt aResId, 
-                                                            TDes& aInput )
-    {
-    CLOG_ENTERFN_PTR( "ShowConfirmationQueryWithInputL" );
-    HBufC* prompt = CEikonEnv::Static()->AllocReadResourceAsDes16LC( aResId );
-    
-    CAknTextQueryDialog* dlg =
-                 CAknTextQueryDialog::NewL( aInput, CAknQueryDialog::ENoTone );
-    
-    // Handle the allowable enterable length of the text
-    CLOG_WRITE_1_PTR( NULL, "max length input: [%d   ]", aInput.MaxLength() );
-    dlg->SetMaxLength( aInput.MaxLength() );
-    
-    TInt retval = dlg->ExecuteLD( R_TEXT_QUERY, *prompt );
-    
-    CleanupStack::PopAndDestroy( prompt );
-    
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowConfirmationQueryL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowConfirmationQueryL( TInt aResId )
-    {
-    CLOG_ENTERFN_PTR( "ShowConfirmationQueryL" );
-    HBufC* prompt = CEikonEnv::Static()->AllocReadResourceL( aResId );
-
-    // Ownership (of 'prompt') is handed over to callee. That's why we don't
-    // bother with cleanup stack either - let it be the callee's problem.
-    return ShowConfirmationQueryL( prompt );
-    }    
-    
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowConfirmationQueryL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowConfirmationQueryL( TInt aResId, 
-                                                   const TDesC& aString )
-    {
-    CLOG_ENTERFN_PTR( "ShowConfirmationQueryL" );
-    HBufC* prompt = StringLoader::LoadL( aResId, aString );
-    
-    // Ownership (of 'prompt') is handed over to callee.
-    return ShowConfirmationQueryL( prompt );
-    }    
-    
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowAvailableMethodsL
-// ---------------------------------------------------------------------------
-//
-TUint32 TCmCommonUi::ShowAvailableMethodsL(
-                                    const RArray<TUint32>& aAvailableBearers,
-                                    const CCmManagerImpl& aCmManager )
-    {
-    CLOG_ENTERFN_PTR( "ShowAvailableMethodsL" );
-
-    TUint32 retval = 0;
-
-    // Create listbox and popup list and perform some initialization on them.
-    CEikFormattedCellListBox* listBox =
-                    new (ELeave) CAknDoubleLargeGraphicPopupMenuStyleListBox();
-    CleanupStack::PushL( listBox );
-    
-    CAknPopupList* popupList =
-         CAknPopupList::NewL( listBox,
-                              R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                              AknPopupLayouts::EMenuDoubleLargeGraphicWindow );
-    CleanupStack::PushL( popupList );
-
-    listBox->ConstructL( popupList, KDefaultListBoxFlags );
-    listBox->CreateScrollBarFrameL( ETrue );
-    listBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-                                                   CEikScrollBarFrame::EOff,
-                                                   CEikScrollBarFrame::EAuto );
-
-    // Create the icon and item text arrays.
-    CArrayPtr<CGulIcon>* icons =
-                new(ELeave) CArrayPtrFlat<CGulIcon>( KCmArraySmallGranularity );
-    CleanupStack::PushL( icons );
-
-    CCmDesCArray* itemArray = new (ELeave) CCmDesCArray();
-    listBox->Model()->SetItemTextArray( itemArray );
-    // just to be on the safe side: next line is not mandatory, but advisable
-    listBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
-
-    // Note: we don't have to put 'itemArray' on to the cleanup stack, as the
-    // model has already taken this object over.
-
-    // Fill up the arrays
-    for ( TInt i = 0; i < aAvailableBearers.Count(); i++ )
-        {
-        TUint32 bearerUid = aAvailableBearers[i];
-
-        // Add icons to the icon array
-        CGulIcon* icon = (CGulIcon*)(aCmManager.GetBearerInfoIntL(
-                                                  bearerUid,
-                                                  ECmBearerAvailableIcon ) );
-
-        if( !icon )
-            {
-            continue;
-            }
-                
-        CleanupStack::PushL( icon );
-        icons->AppendL( icon );
-        CleanupStack::Pop( icon );  // icon array took over ownership
-
-        // Add item text to the array.
-        // Query the name of the bearer first.
-        HBufC* firstLine = aCmManager.GetBearerInfoStringL(
-                                                  bearerUid,
-                                                  ECmBearerAvailableName );
-        CleanupStack::PushL( firstLine );
-
-        // Query the availability string of the bearer second.
-        HBufC* secondLine = aCmManager.GetBearerInfoStringL(
-                                                  bearerUid,
-                                                  ECmBearerAvailableText );
-        CleanupStack::PushL( secondLine );
-
-        // Third, combine these two strings along with an icon index.
-        HBufC* listBoxLine = FormattedTextForListBoxLC( i,
-                                                        *firstLine,
-                                                        *secondLine );
-
-        // Finally add the resulting string to the item array.
-        itemArray->AppendL( bearerUid, *listBoxLine );
-        
-        CLOG_WRITE_1_PTR( NULL, 
-                          "ShowAvailableMethodsL new listbox item: [%S]",
-                          listBoxLine );
-
-        // Clean-up: firstLine, secondLine, listBoxLine.
-        CleanupStack::PopAndDestroy( 3, firstLine );
-        }
-
-    // Handing over the ownership of the icon array to the listbox
-    listBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
-    
-    CleanupStack::Pop( icons ); // ownership already handed over
-
-    // Set title
-    HBufC* title = StringLoader::LoadLC( R_CMWIZARD_AVAILABLE_METHODS );
-    popupList->SetTitleL( *title );
-    CleanupStack::PopAndDestroy( title );
-    
-    if ( popupList->ExecuteLD() )
-        {
-        retval = itemArray->Uid( listBox->CurrentItemIndex() );
-        }
-
-    CleanupStack::Pop( popupList ); // ExecuteLD has already destroyed it
-    CleanupStack::PopAndDestroy( listBox );
-
-    CLOG_WRITE_1_PTR( NULL, "ShowAvailableMethodsL exit, retval: [%d]", retval );
-
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::SelectBearerL
-// ---------------------------------------------------------------------------
-//
-TUint32 TCmCommonUi::SelectBearerL( const CCmManagerImpl& aCmManager )
-    {
-    CLOG_ENTERFN_PTR( "SelectBearerL" );
-    TUint32 retval = 0;
-
-    CEikFormattedCellListBox* listBox =
-                    new (ELeave) CAknSingleGraphicPopupMenuStyleListBox();
-    CleanupStack::PushL( listBox );
-    
-    CAknPopupList* popupList =
-         CAknPopupList::NewL( listBox,
-                              R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                              AknPopupLayouts::EMenuGraphicWindow );
-    CleanupStack::PushL( popupList );
-
-    listBox->ConstructL( popupList, KDefaultListBoxFlags );
-    listBox->CreateScrollBarFrameL( ETrue );
-    listBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-                                                   CEikScrollBarFrame::EOff,
-                                                   CEikScrollBarFrame::EAuto );
-
-    RArray<TUint32> bearers( KCmArrayMediumGranularity );
-    CleanupClosePushL( bearers );
-    aCmManager.SupportedBearersL( bearers );
-    
-    TInt i;
-    
-    for ( i = 0; i < bearers.Count(); ++i )
-        {
-        if( !aCmManager.GetBearerInfoBoolL( bearers[i],
-                                            ECmBearerHasUi ) )
-            {
-            bearers.Remove( i );
-            --i;
-            }
-            
-        }
-
-    CArrayPtr<CGulIcon>* icons =
-              new(ELeave) CArrayPtrFlat<CGulIcon>( KCmArrayMediumGranularity );
-    CleanupStack::PushL( icons );
-
-    // Note: it's interesting that we, in fact, set up an *ordered* list of
-    // icons. Ordering of the icon array is based on the order of supported
-    // bearers.
-    for ( i = 0; i < bearers.Count(); ++i )
-        {
-        CGulIcon* icon = (CGulIcon*)(aCmManager.GetBearerInfoIntL(
-                                                bearers[i],
-                                                ECmBearerIcon ) );
-
-        if( !icon )
-            {
-            bearers.Remove( i );
-            --i;
-            continue;
-            }
-            
-        CleanupStack::PushL( icon );
-
-        icons->AppendL( icon );
-
-        CleanupStack::Pop( icon );  // icon array took over ownership
-        }
-
-    // Handing over the ownership of the icon array to the listbox
-    listBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
-    
-    CleanupStack::Pop( icons ); // ownership already handed over
-
-    CCmDesCArray* itemArray = new (ELeave) CCmDesCArray();
-    listBox->Model()->SetItemTextArray( itemArray );
-    // just to be on the safe side: next line is not mandatory, but advisable
-    listBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
-
-    // Note: we don't have to put 'itemArray' on to the cleanup stack, as the
-    // model has already taken this object over.
-
-    for ( TInt i = 0; i < bearers.Count(); i++ )
-        {
-        // Here we take advantage of the fact that our icon array is ordered.
-        // That is, the indices of the icons in the array will always be
-        // in sync with those in the item text array (i.e. each bearer will
-        // have the right icon associated with it).
-        HBufC* bearerName = aCmManager.GetBearerInfoStringL( bearers[i],
-                                                      ECmBearerSupportedName );
-        CleanupStack::PushL( bearerName );
-
-        HBufC* lineText = FormattedTextForListBoxLC( i, *bearerName );
-
-        itemArray->AppendL( bearers[i], *lineText );
-
-        CLOG_WRITE_1_PTR( NULL, "SelectBearerL new listbox item: [%S]",
-                               lineText );
-        
-        CleanupStack::PopAndDestroy( 2, bearerName ); // lineText, bearerName
-        }
-
-    CleanupStack::PopAndDestroy( &bearers );
-
-    // Set title
-    HBufC* title = StringLoader::LoadLC( R_CMWIZARD_SELECT_CONN_METHOD );
-    popupList->SetTitleL( *title );
-    CleanupStack::PopAndDestroy( title );
-    
-    if ( popupList->ExecuteLD() )
-        {
-        retval = itemArray->Uid( listBox->CurrentItemIndex() );
-        }
-
-    CleanupStack::Pop( popupList ); // ExecuteLD has already destroyed it
-    CleanupStack::PopAndDestroy( listBox );
-
-    CLOG_WRITE_1_PTR( NULL, "SelectBearerL exit, retval: [%d]", retval );
-
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowConfirmationQueryL
-// ---------------------------------------------------------------------------
-//
-TInt TCmCommonUi::ShowConfirmationQueryL( HBufC* aPrompt )
-    {
-    CLOG_ENTERFN_PTR( "ShowConfirmationQueryL" );
-
-    CleanupStack::PushL( aPrompt );
-    
-    CAknQueryDialog* dlg = 
-            CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
-    TInt retval = dlg->ExecuteLD( R_CONFIRMATION_QUERY, *aPrompt );
-
-    CleanupStack::PopAndDestroy( aPrompt );
-
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowMemoryFullConfirmationQueryL
-// ---------------------------------------------------------------------------
-//
-TInt TCmCommonUi::ShowMemoryFullConfirmationQueryL()
-    {
-    CLOG_ENTERFN_PTR( "ShowMemoryFullConfirmationQueryL" );
-
-    //  need to check if EikonEnv exists in this context
-    CEikonEnv* eikPtr = CEikonEnv::Static();
-    TInt retval( KErrNone ); 
-    if( eikPtr )
-        {        
-        HBufC* prompt = eikPtr->AllocReadResourceL( R_QTN_MEMLO_MEMORY_FULL );        
-        CleanupStack::PushL( prompt );
-        CAknQueryDialog* dlg = 
-            CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
-        retval = dlg->ExecuteLD( R_MEMORY_FULL_CONFIRMATION_QUERY, *prompt );
-        CleanupStack::PopAndDestroy( prompt );
-        }
-
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowNoteL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowNoteL( TInt aResId, TCmNoteType aNoteType )
-    {
-    CLOG_ENTERFN_PTR( "ShowNoteL" );
-    HBufC* prompt = CEikonEnv::Static()->AllocReadResourceLC( aResId );
-
-    TInt result = ShowNoteL( *prompt, aNoteType );
-
-    CleanupStack::PopAndDestroy( prompt );
-
-    return result;
-    }    
-    
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowNoteL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowNoteL( TInt aResId, const TDesC& aString,
-                                      TCmNoteType aNoteType )
-    {
-    CLOG_ENTERFN_PTR( "ShowNoteL" );
-    HBufC* prompt = StringLoader::LoadLC( aResId, aString );
-    
-    TInt result = ShowNoteL( *prompt, aNoteType );
-
-    CleanupStack::PopAndDestroy( prompt );
-
-    return result;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowNoteL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt TCmCommonUi::ShowNoteL( const TDesC& aPrompt, TCmNoteType aNoteType )
-    {
-    CLOG_ENTERFN_PTR( "ShowNoteL" );
-
-    CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(
-                             CAknNoteDialog::ENoTone,
-                             CAknNoteDialog::ELongTimeout );
-
-    TInt resId;
-    switch ( aNoteType )
-        {
-        case ECmOkNote:
-            {
-            resId = R_OK_NOTE;
-            break;
-            }
-        case ECmWarningNote:
-            {
-            resId = R_WARNING_NOTE;
-            break;
-            }
-        case ECmErrorNote:
-            {
-            resId = R_ERROR_NOTE;
-            break;
-            }
-        default:
-            {
-            resId = R_INFO_NOTE;
-            }
-        }
-
-    // no need to worry about LC (PrepareLC), RunLD takes care of it
-    dlg->PrepareLC( resId );
-    dlg->SetTextL( aPrompt );
-
-    return dlg->RunLD();
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::FormattedTextForListBoxLC
-// ---------------------------------------------------------------------------
-//
-HBufC* TCmCommonUi::FormattedTextForListBoxLC( TInt aIconIndex,
-                                               const TDesC& aLineText )
-    {
-    HBufC* formattedString =
-                HBufC::NewL( KNumberOfStaticCharsIn1LineFormattedString +
-                             aLineText.Length() );
-
-    TPtr des = formattedString->Des();
-    des.AppendFormat( KSingleNumberAsString, aIconIndex );
-    des.Append( TChar( KSettingsListBoxItemPrefix ) );
-    des.Append( aLineText );
-
-    CleanupStack::PushL( formattedString );
-
-    return formattedString;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::FormattedTextForListBoxLC
-// ---------------------------------------------------------------------------
-//
-HBufC* TCmCommonUi::FormattedTextForListBoxLC( TInt aIconIndex,
-                                               const TDesC& aFirstLine,
-                                               const TDesC& aSecondLine )
-    {
-    HBufC* formattedString =
-                HBufC::NewL( KNumberOfStaticCharsIn2LineFormattedString +
-                             aFirstLine.Length() +
-                             aSecondLine.Length() );
-
-    TPtr des = formattedString->Des();
-    des.AppendFormat( KSingleNumberAsString, aIconIndex );
-    des.Append( TChar( KSettingsListBoxItemPrefix ) );
-    des.Append( aFirstLine );
-    des.Append( TChar( KSettingsListBoxItemPrefix ) );
-    des.Append( aSecondLine );
-
-    CleanupStack::PushL( formattedString );
-
-    return formattedString;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::FormattedTextForListBoxLC
-// ---------------------------------------------------------------------------
-//
-HBufC* TCmCommonUi::FormattedTextForListBoxLC( TInt aIconIndex,
-                                               TInt aFirstLineResId,
-                                               TInt aSecondLineResId )
-    {
-    HBufC* secondLine = StringLoader::LoadLC( aSecondLineResId );
-
-    HBufC* formattedString = FormattedTextForListBoxL( aIconIndex,
-                                                       aFirstLineResId,
-                                                       *secondLine );
-
-    CleanupStack::PopAndDestroy( secondLine );
-
-    CleanupStack::PushL( formattedString );
-
-    return formattedString;
-    }
-
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::FormattedTextForListBoxLC
-// ---------------------------------------------------------------------------
-//
-HBufC* TCmCommonUi::FormattedTextForListBoxLC( TInt aIconIndex,
-                                               TInt aFirstLineResId,
-                                               TInt aSecondLineResId,
-                                               TInt aReplacementInSecondLine )
-    {
-    HBufC* secondLine = StringLoader::LoadLC( aSecondLineResId,
-                                              aReplacementInSecondLine );
-
-    HBufC* formattedString = FormattedTextForListBoxL( aIconIndex,
-                                                       aFirstLineResId,
-                                                       *secondLine );
-
-    CleanupStack::PopAndDestroy( secondLine );
-
-    CleanupStack::PushL( formattedString );
-
-    return formattedString;
-    }
-
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::FormattedTextForListBoxL
-// ---------------------------------------------------------------------------
-//
-HBufC* TCmCommonUi::FormattedTextForListBoxL( TInt aIconIndex,
-                                               TInt aFirstLineResId,
-                                               const TDesC& aSecondLine )
-    {
-    HBufC* firstLine = StringLoader::LoadLC( aFirstLineResId );
-    
-    HBufC* formattedString =
-                HBufC::NewL( KNumberOfStaticCharsIn2LineFormattedString +
-                             firstLine->Length() +
-                             aSecondLine.Length() );
-
-    TPtr des = formattedString->Des();
-    des.AppendFormat( KSingleNumberAsString, aIconIndex );
-    des.Append( TChar( KSettingsListBoxItemPrefix ) );
-    des.Append( *firstLine );
-    des.Append( TChar( KSettingsListBoxItemPrefix ) );
-    des.Append( aSecondLine );
-    
-    CleanupStack::PopAndDestroy( firstLine );
-
-    return formattedString;
-    }
-
-
-// --------------------------------------------------------------------------
-// TCmCommonUi::ShowPopupListL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool TCmCommonUi::ShowPopupListL( const TDesC& aTitle,
-                                            CDesCArrayFlat* aTextItems,
-                                            CArrayPtr<CGulIcon>* aIconArray,
-                                            const TUint aSoftKeys,
-                                            TInt& aSelection )
-    {
-    TBool retVal ( EFalse );
-    
-    // Prepare the dialog
-    CEikFormattedCellListBox* list = NULL;
-    if ( aIconArray )
-        {
-        list = new ( ELeave ) CAknSingleGraphicPopupMenuStyleListBox;
-        }
-    else
-        {
-        list = new ( ELeave ) CAknSinglePopupMenuStyleListBox;
-        }
-        
-    CleanupStack::PushL( list );
-    
-    CAknPopupList* popupList = CAknPopupList::NewL(
-                                       list, aSoftKeys,
-                                       AknPopupLayouts::EMenuWindow );
-    CleanupStack::PushL( popupList );
-
-    // initialise listbox.
-    list->ConstructL( popupList, CEikListBox::ELeftDownInViewRect );
-    list->CreateScrollBarFrameL( ETrue );
-    list->ScrollBarFrame()->SetScrollBarVisibilityL(
-                                               CEikScrollBarFrame::EOff,
-                                               CEikScrollBarFrame::EAuto );
-                                               
-    // Handing over the ownership of the icon array to the listbox
-    if ( aIconArray )
-        {
-        list->ItemDrawer()->FormattedCellData()->SetIconArrayL( aIconArray );
-        }
-	
-	// Items
-    list->Model()->SetItemTextArray( aTextItems );
-   
-    // Title
-    popupList->SetTitleL( aTitle );
-    
-    // Show the dialog
-    if ( popupList->ExecuteLD() )
-        {
-        aSelection = list->CurrentItemIndex();
-        retVal = ETrue;
-        }
-
-    CleanupStack::Pop( popupList );
-    CleanupStack::PopAndDestroy( list );
-    
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// TCmCommonUi::ShowAlwaysAskNoteL
-// ---------------------------------------------------------------------------
-//
-TBool TCmCommonUi::ShowAlwaysAskNoteL( TCmDefConnValue aOldDefConn,
-                                        CCmManagerImpl& aCmManagerImpl )
-    {
-    TCmDefConnValue newConn;
-    aCmManagerImpl.ReadDefConnL( newConn );
-    if ( newConn != aOldDefConn )
-        {
-         ShowNoteL( R_CMMANAGERUI_CONF_DEFAULT_ALWAYS_ASK,
-                                                TCmCommonUi::ECmOkNote );
-        return ETrue;
-        }
-    return EFalse;
-    }
-   
-    
--- a/cmmanager/cmmgr/Framework/Src/cmcommsdatnotifier.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2009- Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Listens for changes in one CommsDat table through CenRep.
-*
-*/
-
-#include <commsdat.h>
-#include <centralrepository.h>
-#include <cmcommonconstants.h>
-
-#include "cmcommsdatnotifier.h"
-#include "cmmanagerimpl.h"
-
-// Repository for CommsDat
-const TUid KCDCommsRepositoryId = { 0xCCCCCC00 };
-
-CCmCommsDatNotifier* CCmCommsDatNotifier::NewL( TUint32 aTableId )
-    {
-    CCmCommsDatNotifier* self = CCmCommsDatNotifier::NewLC( aTableId );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-CCmCommsDatNotifier* CCmCommsDatNotifier::NewLC( TUint32 aTableId )
-    {
-    CCmCommsDatNotifier* self = new( ELeave ) CCmCommsDatNotifier( aTableId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-CCmCommsDatNotifier::~CCmCommsDatNotifier()
-    {
-    // Cancel outstanding request, if exists
-    if( iWatcher )
-        {
-        Cancel();
-        }
-    delete iRepository;
-    
-    DeleteCallBackArray();
-    
-    iWatcher = NULL;
-    }
-
-void CCmCommsDatNotifier::DeleteCallBackArray()
-    {
-    TInt count = iCallBackArray->Count();
-    TInt index( 0 );
-    while( count > 0 )
-        {
-        iCallBackArray->Delete( index );
-        iCallBackArray->Compress();
-        
-        count = iCallBackArray->Count();
-        }
-    
-    delete iCallBackArray;
-    iCallBackArray = NULL;
-    }
-
-CCmCommsDatNotifier::CCmCommsDatNotifier( TUint32 aTableId )
-        :
-        CActive( EPriorityStandard ),
-        iTableId( aTableId ),
-        iWatcher( NULL )
-    {
-    iRepository = NULL;
-    }
-
-void CCmCommsDatNotifier::ConstructL()
-    {
-    iCallBackArray = new (ELeave) CCmCallBackArray( KCmArrayBigGranularity );
-    
-    iRepository = CRepository::NewL( KCDCommsRepositoryId );
-    CActiveScheduler::Add( this );
-    }
-
-void CCmCommsDatNotifier::WatcherRegisterL( MCmCommsDatWatcher* aWatcher )
-    {
-    if( !aWatcher )
-        {
-        return;
-        }
-    
-    if( !iWatcher )
-        {
-        TInt err( RequestNotifications() );
-        User::LeaveIfError( err );
-        }
-    
-    iCallBackArray->AppendL( aWatcher );
-    
-    iWatcher = aWatcher;
-    }
-
-void CCmCommsDatNotifier::WatcherUnRegister( )
-    {
-    TInt index = iCallBackArray->Count();
-    index --;
-    
-    if (index >= 0)
-        {
-        iCallBackArray->Delete( index );
-        iCallBackArray->Compress();
-        }
-    
-    index = iCallBackArray->Count();
-    index --;
-    if (index >= 0)
-        {
-        iWatcher = (*iCallBackArray)[index];
-        }
-    else
-        {
-        iWatcher = NULL;
-        }
-    
-    if( !iWatcher )
-        {
-        Cancel();
-        }
-    }
-
-TInt CCmCommsDatNotifier::RequestNotifications()
-    {
-    TInt err = iRepository->NotifyRequest( iTableId, KCDMaskShowRecordType, iStatus );
-
-    if ( KErrNone == err )
-        {
-        SetActive();
-        }
-        
-    return err;
-    }
-
-void CCmCommsDatNotifier::DoCancel()
-    {
-    iRepository->NotifyCancel( iTableId, KCDMaskShowRecordType );
-    }
-
-void CCmCommsDatNotifier::RunL()
-    {
-    if ( iStatus.Int() < KErrNone )
-        {
-        return;
-        }
-
-    if ( iWatcher )
-        {
-        iWatcher->CommsDatChangesL();
-        
-        RequestNotifications();
-        }
-    }
-
-// End-of-file
--- a/cmmanager/cmmgr/Framework/Src/cmconnectionmethod.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,433 +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:  Implementation of RCmConnectionMethod
-*
-*/
-
-// INCLUDES
-#include "cmmanagerimpl.h"
-#include <cmdestination.h>
-#include <cmpluginbase.h>
-#include <cmpluginbaseeng.h>
-#include <cmconnectionmethod.h>
-#include "cmdestinationimpl.h"
-
-using namespace CMManager;
-// ======== MEMBER FUNCTIONS ========
-
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::RCmConnectionMethod()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod::RCmConnectionMethod(
-                                const RCmConnectionMethod& aItem)
-    : iImplementation( aItem.iImplementation )
-    {
-    iImplementation->IncrementRefCounter();
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::Close()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::Close()
-    {
-    if( !iImplementation )
-        {
-        return;
-        }
-
-    TRAP_IGNORE( iImplementation->CmMgr().RemoveCMFromPoolL(iImplementation) );
-    iImplementation = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::~RCmConnectionMethod()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod::~RCmConnectionMethod()
-    {
-    Close();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::GetIntAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 
-            RCmConnectionMethod::GetIntAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetIntAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::GetBoolAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool 
-            RCmConnectionMethod::GetBoolAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetBoolAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::GetStringAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* 
-            RCmConnectionMethod::GetStringAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetStringAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::GetString8AttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* RCmConnectionMethod::GetString8AttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetString8AttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::SetIntAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::SetIntAttributeL( TUint32 aAttribute, 
-                                                        TUint32 aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    iImplementation->SetIntAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::SetBoolAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::SetBoolAttributeL( TUint32 aAttribute, 
-                                                      TBool aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    iImplementation->SetBoolAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::SetStringAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::SetStringAttributeL( TUint32 aAttribute, 
-                                                        const TDesC16& aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    iImplementation->SetStringAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::SetString8AttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::SetString8AttributeL( TUint32 aAttribute, 
-                                                         const TDesC8& aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    iImplementation->SetString8AttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::UpdateL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethod::UpdateL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    iImplementation->UpdateL();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::DeleteL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethod::DeleteL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can delete
-        // this destination
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-            
-    // Check it's not connected
-    if ( iImplementation->GetBoolAttributeL( ECmConnected ) )
-        {
-        User::Leave( KErrInUse );
-        }
-
-    // Check it's not referenced by Virtual CM
-    if( iImplementation->GetBoolAttributeL( ECmIsLinked ) )
-        {
-        User::Leave( KErrLocked );
-        }
-
-    // Check that it's not the last CM in a destination which is
-    // referenced by Virtual CM
-    CCmDestinationImpl* destImpl = iImplementation->ParentDestination();
-    TUint32 destId ( 0 );
-    TUint32 count( 0 ); 
-    
-    if ( destImpl )
-        {
-        destId = destImpl->Id();
-        count = destImpl->ConnectionMethodCount();
-        }
-    delete destImpl;
-    destImpl = NULL;
-
-    if ( count  == 1 )
-        {
-        // The IAP is in destination and it's the last one
-            // for each IAP in CM manager
-            //   1. check if it is virtual
-            //      if not => goto 1.
-            //      if yes:
-            //      2. check if it links to the destination of this CM
-            //         if yes => carryOn = EFalse, ERROR
-            //         if not: carryOn = ETrue
-        TBool carryOn = ETrue;
-        
-        CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* iaps = iImplementation->CmMgr().AllIapsL();
-        CleanupStack::PushL( iaps );
-
-        // for each IAP in CM manager
-        for ( TInt i = KCmInitIndex; carryOn && i < iaps->iRecords.Count(); ++i )
-            {
-            CommsDat::CCDIAPRecord* rec = (*iaps)[i];
-            TUint32 bearerType = 0;
-
-            TRAP_IGNORE( bearerType = iImplementation->CmMgr().BearerTypeFromIapRecordL( rec ) );
-            if ( !bearerType )
-                {
-                continue;
-                }
-
-            // check if it is virtual
-            if ( iImplementation->CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                // check if it links to the current destination
-                CCmPluginBase* plugin = NULL;            
-                TRAP_IGNORE( plugin = iImplementation->CmMgr().GetConnectionMethodL( rec->RecordId() ) );
-
-                if ( !plugin )
-                    {
-                    continue;
-                    }
-
-                if ( plugin->IsLinkedToSnap( destId ) )
-                    {
-                    // the CM links to this destination, deletion not allowed
-                    carryOn = EFalse;
-                    }
-
-                delete plugin;
-                }
-            }
-
-        CleanupStack::PopAndDestroy( iaps );
-
-        if ( !carryOn )
-            {
-            User::Leave( KErrLocked );
-            }
-        }
-        
-    // ETrue = delete it. It doesn't matter how many referencies there are.
-    TBool deleteRes = iImplementation->DeleteL( ETrue );
-    if( deleteRes )
-        {
-        CCmDestinationImpl* dest = iImplementation->ParentDestination();
-        if( dest )
-            {
-            CCmPluginBase* connMethod = new (ELeave) 
-                                    CCmPluginBase(iImplementation);
-            CleanupStack::PushL( connMethod );        
-            dest->ConnectionMethodDeletedL( *connMethod );
-            CleanupStack::PopAndDestroy(connMethod);//deletes iImplementation
-            iImplementation = NULL;
-            }
-        delete dest;
-        }
-        
-    return deleteRes;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::Destination()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination RCmConnectionMethod::DestinationL() const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }        
-    if (!iImplementation->Destination())
-        {
-        User::Leave(KErrNotSupported);
-        }
-    
-    RCmDestination dest;
-    dest.iDestinatonData = 
-                iImplementation->Destination()->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    return dest;
-    }
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::RCmConnectionMethod
-// --------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod::RCmConnectionMethod()
-    : iImplementation( NULL )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::operator=()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod& RCmConnectionMethod::operator=(
-                                const RCmConnectionMethod& aConnMethod)
-    {
-    if (this != &aConnMethod) 
-        {
-        Close();
-        iImplementation = aConnMethod.iImplementation;
-        iImplementation->IncrementRefCounter();
-        }
-    return *this;
-    }
-
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::operator==
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethod::operator==( 
-                                    RCmConnectionMethod& aConnMethod ) const
-    {
-    return ( iImplementation == aConnMethod.iImplementation );
-    };
-
-
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::operator!=
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethod::operator!=( 
-                                    RCmConnectionMethod& aConnMethod ) const
-    {
-    return !( iImplementation == aConnMethod.iImplementation );
-    };
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::CreateCopyL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod RCmConnectionMethod::CreateCopyL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethod cm;
-
-    cm.iImplementation = iImplementation->CreateCopyL();
-    cm.iImplementation->CmMgr().InsertConnectionMethodL(cm.iImplementation);
-
-    return cm;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmconnectionmethodext.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +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:  Implementation of RCmConnectionMethodExt
-*
-*/
-
-// INCLUDES
-#include "cmmanagerimpl.h"
-#include <cmdestinationext.h>
-#include <cmpluginbase.h>
-#include <cmconnectionmethodext.h>
-#include "cmdestinationimpl.h"
-
-using namespace CMManager;
-// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::RCmConnectionMethodExt()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt::RCmConnectionMethodExt(
-                                const RCmConnectionMethodExt& aItem)
-    : iImplementation( aItem.iImplementation )
-    {
-    iImplementation->IncrementRefCounter();
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::Close()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethodExt::Close()
-    {
-    if( !iImplementation )
-        {
-        return;
-        }
-
-    TRAP_IGNORE( iImplementation->CmMgr().RemoveCMFromPoolL(iImplementation) );
-    iImplementation = NULL;
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::CreateCopyL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt RCmConnectionMethodExt::CreateCopyL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    RCmConnectionMethodExt cm;
-    
-    cm.iImplementation = iImplementation->CreateCopyL();
-
-    cm.iImplementation->CmMgr().InsertConnectionMethodL(cm.iImplementation);
-    
-    return cm;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::GetIntAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 
-            RCmConnectionMethodExt::GetIntAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetIntAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::GetBoolAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool 
-           RCmConnectionMethodExt::GetBoolAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    
-    return iImplementation->GetBoolAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::GetStringAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* 
-        RCmConnectionMethodExt::GetStringAttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    
-    return iImplementation->GetStringAttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::GetString8AttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* 
-        RCmConnectionMethodExt::GetString8AttributeL( TUint32 aAttribute ) const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    return iImplementation->GetString8AttributeL( aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::SetIntAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethodExt::SetIntAttributeL( TUint32 aAttribute, 
-                                                        TUint32 aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    iImplementation->SetIntAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::SetBoolAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethodExt::SetBoolAttributeL( TUint32 aAttribute, 
-                                                         TBool aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    iImplementation->SetBoolAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::SetStringAttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void 
-            RCmConnectionMethodExt::SetStringAttributeL( TUint32 aAttribute, 
-                                                         const TDesC16& aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    iImplementation->SetStringAttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::SetString8AttributeL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void 
-            RCmConnectionMethodExt::SetString8AttributeL( TUint32 aAttribute, 
-                                                          const TDesC8& aValue )
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can modify
-        // protection setting!
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    iImplementation->SetString8AttributeL( aAttribute, aValue );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::UpdateL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmConnectionMethodExt::UpdateL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    iImplementation->UpdateL();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::DeleteL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethodExt::DeleteL()
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    if( iImplementation->GetBoolAttributeL( ECmProtected ) )
-        {
-        // Only clients with NetworkControl capability can delete
-        // this destination
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    // Check it's not connected
-    if ( iImplementation->GetBoolAttributeL( ECmConnected ) )
-        {
-        User::Leave( KErrInUse );
-        }
-
-    // Check it's not referenced by Virtual CM
-    if( iImplementation->GetBoolAttributeL( ECmIsLinked ) )
-        {
-        User::Leave( KErrLocked );
-        }
-
-    // Check that it's not the last CM in a destination which is
-    // referenced by Virtual CM
-    CCmDestinationImpl* destImpl = iImplementation->ParentDestination();
-    TUint32 destId ( 0 );
-    TUint32 count( 0 ); 
-    
-    if ( destImpl )
-        {
-        destId = destImpl->Id();
-        count = destImpl->ConnectionMethodCount();
-        }
-    delete destImpl;
-    destImpl = NULL;
-
-    if ( count  == 1 )
-        {
-        // The IAP is in destination and it's the last one
-            // for each IAP in CM manager
-            //   1. check if it is virtual
-            //      if not => goto 1.
-            //      if yes:
-            //      2. check if it links to the destination of this CM
-            //         if yes => carryOn = EFalse, ERROR
-            //         if not: carryOn = ETrue
-        TBool carryOn = ETrue;
-        
-        CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* iaps = iImplementation->CmMgr().AllIapsL();
-        CleanupStack::PushL( iaps );
-
-        // for each IAP in CM manager
-        for ( TInt i = KCmInitIndex; carryOn && i < iaps->iRecords.Count(); ++i )
-            {
-            CommsDat::CCDIAPRecord* rec = (*iaps)[i];
-            TUint32 bearerType = 0;
-
-            TRAP_IGNORE( bearerType = iImplementation->CmMgr().BearerTypeFromIapRecordL( rec ) );
-            if ( !bearerType )
-                {
-                continue;
-                }
-
-            // check if it is virtual
-            if ( iImplementation->CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                // check if it links to the current destination
-                CCmPluginBase* plugin = NULL;            
-                TRAP_IGNORE( plugin = iImplementation->CmMgr().GetConnectionMethodL( rec->RecordId() ) );
-
-                if ( !plugin )
-                    {
-                    continue;
-                    }
-
-                if ( plugin->IsLinkedToSnap( destId ) )
-                    {
-                    // the CM links to this destination, deletion not allowed
-                    carryOn = EFalse;
-                    }
-
-                delete plugin;
-                }
-            }
-
-        CleanupStack::PopAndDestroy( iaps );
-
-        if ( !carryOn )
-            {
-            User::Leave( KErrLocked );
-            }
-        }
-
-    // ETrue = delete it. It doesn't matter how many referencies there are.
-    TBool deleteRes = iImplementation->DeleteL( ETrue );
-    if( deleteRes )
-        {
-        CCmDestinationImpl* dest = iImplementation->ParentDestination();
-        if( dest )
-            {
-            CCmPluginBase* connMethod = new (ELeave) 
-                                    CCmPluginBase(iImplementation);
-            CleanupStack::PushL( connMethod );        
-            dest->ConnectionMethodDeletedL( *connMethod );
-            CleanupStack::PopAndDestroy(connMethod);//deletes iImplementation
-            iImplementation = NULL;
-            }
-        delete dest;
-        }
-        
-    return deleteRes;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::Destination()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt RCmConnectionMethodExt::DestinationL() const
-    {
-    if (!iImplementation)
-        {
-        User::Leave(KErrBadHandle);
-        }        
-    if (!iImplementation->Destination())
-        {
-        User::Leave(KErrNotSupported);
-        }
-    
-    RCmDestinationExt dest;
-    dest.iDestinatonData = 
-                iImplementation->Destination()->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    return dest;
-    }
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::RCmConnectionMethod
-// --------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt::RCmConnectionMethodExt()
-    : iImplementation( NULL )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethodExt::~RCmConnectionMethodExt()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt::~RCmConnectionMethodExt()
-    {
-    Close();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmConnectionMethod::operator=()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt& RCmConnectionMethodExt::operator=(
-                                const RCmConnectionMethodExt& aConnMethod)
-    {
-    if (this != &aConnMethod) 
-        {
-        Close();
-        iImplementation = aConnMethod.iImplementation;
-        iImplementation->IncrementRefCounter();
-        }
-    return *this;
-    }
-
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::operator==
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethodExt::operator==( 
-                                    RCmConnectionMethodExt& aConnMethod ) const
-    {
-    return ( iImplementation == aConnMethod.iImplementation );
-    };
-
-
-// --------------------------------------------------------------------------
-// RCmConnectionMethod::operator!=
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmConnectionMethodExt::operator!=( 
-                                    RCmConnectionMethodExt& aConnMethod ) const
-    {
-    return !( iImplementation == aConnMethod.iImplementation );
-    };
--- a/cmmanager/cmmgr/Framework/Src/cmconnectionmethodinfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +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:  Implementation of CCmConnectionMethodInfo
-*
-*/
-#include <cmpluginbase.h>
-#include "cmmanagerimpl.h"
-#include "cmlogger.h"
-#include "cmconnectionmethodinfo.h"
-
-using namespace CommsDat;
-
-// ======== LOCAL FUNCTIONS ========
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CCmConnectionMethodInfo
-// ---------------------------------------------------------------------------
-//
-CCmConnectionMethodInfo::CCmConnectionMethodInfo( 
-                                                TCmPluginInitParam *aInitParam )
-    : CCmPluginBaseEng( aInitParam )
-    {
-    CLOG_CREATE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::ConstructL()
-    {
-    // Dummy bearer type
-    iBearerType = KDummyBearerType;
-    
-    CCmPluginBaseEng::ConstructL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::NewL
-// ---------------------------------------------------------------------------
-//
-CCmConnectionMethodInfo* 
-                CCmConnectionMethodInfo::NewL( TCmPluginInitParam *aInitParam )
-    {
-    CCmConnectionMethodInfo* self = CCmConnectionMethodInfo::NewLC( aInitParam );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::NewLC
-// ---------------------------------------------------------------------------
-//
-CCmConnectionMethodInfo* 
-                CCmConnectionMethodInfo::NewLC( TCmPluginInitParam *aInitParam )
-    {
-    CCmConnectionMethodInfo* self = 
-                            new( ELeave ) CCmConnectionMethodInfo( aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::~CCmConnectionMethodInfo
-// ---------------------------------------------------------------------------
-//
-CCmConnectionMethodInfo::~CCmConnectionMethodInfo()
-    {
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::GetConnectionInfoIntL
-// ---------------------------------------------------------------------------
-//
-TUint32 CCmConnectionMethodInfo::GetConnectionInfoIntL( const TUint32 aIapId, 
-                                                 const TUint32 aAttribute )
-    {
-    CCmPluginBase* plugin = CmMgr().GetConnectionMethodL( aIapId );
-    CleanupStack::PushL( plugin );
-     
-    if ( !plugin ) 
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    ResetAndLoadL( aIapId );
-        
-    TUint32 info = plugin->GetIntAttributeL( aAttribute );
-    CleanupStack::PopAndDestroy( plugin );
-
-    return info;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::GetConnectionInfoBoolL
-// ---------------------------------------------------------------------------
-//
-TBool CCmConnectionMethodInfo::GetConnectionInfoBoolL( const TUint32 aIapId, 
-                                                const TUint32 aAttribute )
-    {
-    CCmPluginBase* plugin = CmMgr().GetConnectionMethodL( aIapId );
-    CleanupStack::PushL( plugin );
-    
-    if ( !plugin ) 
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    ResetAndLoadL( aIapId );
-        
-	TBool info = plugin->GetBoolAttributeL( aAttribute );
-    CleanupStack::PopAndDestroy( plugin );
-    
-    return info;
-	}
-                                 
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::GetConnectionInfoStringL
-// ---------------------------------------------------------------------------
-//
-HBufC* 
-   CCmConnectionMethodInfo::GetConnectionInfoStringL( const TUint32 aIapId, 
-                                                      const TUint32 aAttribute )
-    {
-    CCmPluginBase* plugin = CmMgr().GetConnectionMethodL( aIapId );
-    CleanupStack::PushL( plugin );
-    
-    if ( !plugin ) 
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    ResetAndLoadL( aIapId );
-
-    HBufC* info = plugin->GetStringAttributeL( aAttribute );
-    CleanupStack::PopAndDestroy( plugin );
-    
-    return info;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::GetConnectionInfoStringL
-// ---------------------------------------------------------------------------
-//
-HBufC8* CCmConnectionMethodInfo::GetConnectionInfoString8L( 
-                                                     const TUint32 aIapId, 
-                                                     const TUint32 aAttribute )
-    {
-    CCmPluginBase* plugin = CmMgr().GetConnectionMethodL( aIapId );
-    CleanupStack::PushL( plugin );
-    
-    if ( !plugin ) 
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    ResetAndLoadL( aIapId );
-
-    HBufC8* info = plugin->GetString8AttributeL( aAttribute );
-    CleanupStack::PopAndDestroy( plugin );
-    
-    return info;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::RunSettingsL
-// ---------------------------------------------------------------------------
-//
-TInt CCmConnectionMethodInfo::RunSettingsL()
-    {
-    User::Leave( KErrNotSupported );
-    return KErrNotSupported;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::InitializeWithUiL
-// ---------------------------------------------------------------------------
-//
-TBool CCmConnectionMethodInfo::InitializeWithUiL( TBool /*aManuallyConfigure*/ )
-    {
-    User::Leave( KErrNotSupported );
-
-    return ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CanHandleIapIdL
-// ---------------------------------------------------------------------------
-//
-TBool CCmConnectionMethodInfo::CanHandleIapIdL( TUint32 /*aIapId*/ ) const
-    {
-    User::Leave( KErrNotSupported );
-    
-    return EFalse;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CanHandleIapIdL
-// ---------------------------------------------------------------------------
-//
-TBool CCmConnectionMethodInfo::CanHandleIapIdL( 
-                                            CCDIAPRecord* /*aIapRecord*/ ) const
-    {
-    User::Leave( KErrNotSupported );
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::ServiceRecordIdLC
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::ServiceRecordIdLC( HBufC* &/*aBearerName*/, 
-                                         TUint32& /*aRecordId*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::BearerRecordIdLC
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::BearerRecordIdLC( HBufC* &/*aBearerName*/, 
-                                         TUint32& /*aRecordId*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CreateNewServiceRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::CreateNewServiceRecordL()
-    {
-    User::Leave( KErrNotSupported );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::ResetAndLoadL
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::ResetAndLoadL( TUint32 aIapId )
-    {
-    if( iIapId != aIapId )
-        {
-        Reset();
-        LoadL( aIapId );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CopyAdditionalDataL
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::CopyAdditionalDataL( CCmPluginBaseEng* /*aDestInst*/ )
-    {
-    User::Leave( KErrNotSupported );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CreateInstanceL
-// ---------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmConnectionMethodInfo::
-                CreateInstanceL( TCmPluginInitParam& /*aInitParam*/ ) const
-    {
-    User::Leave( KErrNotSupported );
-    
-    return NULL;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::CreateCopyL
-// ---------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmConnectionMethodInfo::CreateCopyL() const
-    {
-    User::Leave( KErrNotSupported );
-    
-    return NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmConnectionMethodInfo::ResetIfInMemory
-// ---------------------------------------------------------------------------
-//
-void CCmConnectionMethodInfo::ResetIfInMemory( CCmPluginBaseEng* aCM )
-    {
-    TUint32 cmId = 0;
-    TRAPD( err, cmId = aCM->GetIntAttributeL( CMManager::ECmId ) );
-    if ( KErrNone == err )
-        {
-        if( cmId > 0 && iIapId == cmId )
-            {
-            Reset();
-            TRAP_IGNORE( LoadL( cmId ) );
-            }
-        }
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmconnselectrbpage.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,426 +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:  Implementation of plugin base class
-*
-*/
-
-
-#include <cmmanager.rsg>
-#include <StringLoader.h>
-
-#include "cmconnselectrbpage.h"
-#include "cmmanager.hrh"
-#include "cmconnsettingsuiimpl.h"
-#include "cmlogger.h"
-
-using namespace CMManager;
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::CCMConnSelectRBPage
-// ---------------------------------------------------------------------------
-//
-CCMConnSelectRBPage::CCMConnSelectRBPage( TInt aDialogResourceId, 
-                                    TInt& aCurrentSelectionIndex, 
-                                    const MDesCArray* aItemArray, 
-                                    CCmManagerImpl& aCmManagerImpl, 
-                                    TCmDCSettingSelectionMode& aSelectionMode,
-                                    RArray<TUint32>& aDestinations,
-                                    TBool areDestinations,
-                                    TBool aOpenDestination,
-                                    TCoeContextName& aContext )
-    : CAknRadioButtonSettingPage( aDialogResourceId, 
-                                  aCurrentSelectionIndex, 
-                                  aItemArray )
-	, iDialogResourceId (aDialogResourceId)
-    , iCmManagerImpl( aCmManagerImpl )
-    , iSelectionMode( aSelectionMode )
-    , iDestinations( aDestinations )
-    , iAreDestinations( areDestinations )
-    , iOpenDestination( aOpenDestination )
-    , iHelpContext ( aContext )
-    , iFirstEnter( ETrue )
-    {
-    CLOG_CREATE;
-    iPrevItem = iDestinations[aCurrentSelectionIndex];
-    }
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::~CCMConnSelectRBPage
-// ---------------------------------------------------------------------------
-//
-CCMConnSelectRBPage::~CCMConnSelectRBPage()
-    {
-    CLOG_CLOSE;    
-    }
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// ---------------------------------------------------------------------------
-//
-TBool CCMConnSelectRBPage::OkToExitL( TInt aButtonId )
-    {
-    LOGGER_ENTERFN("CCMConnSelectRBPage::OkToExitL");
-
-    // Convert the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    if ( aButtonId ==  EAknSoftkeyOk )
-        {
-        ProcessCommandL( ECmManagerUiCmdDestSelect );
-        retval = ETrue;        
-        }
-    else 
-        {
-        if ( aButtonId == EAknSoftkeyOptions )
-            {
-            //*iSelected = iListbox->CurrentItemUid();
-            //retval = ETrue;
-            DisplayMenuL();
-            retval = EFalse;  
-            }
-        else
-            {
-           	retval = ETrue;
-            }
-        }
-
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::ProcessCommandL
-// ---------------------------------------------------------------------------
-//
-void CCMConnSelectRBPage::ProcessCommandL( TInt aCommandId )
-    {
-    LOGGER_ENTERFN("CCMConnSelectRBPage::ProcessCommandL");
-    
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-
-        case EAknSoftkeyCancel:
-            {
-            AttemptExitL(EFalse);   
-            break;
-            }
-
-        case EAknSoftkeyOk:                   
-        case EAknSoftkeySelect:                   
-        case ECmManagerUiCmdDestSelect:
-            {
-            TUint selectedItem = 
-                    iDestinations[ ListBoxControl()->CurrentItemIndex() ];
-            if ( selectedItem == KDestItemAlwaysAsk )
-                {
-                iSelectionMode = EDCAlwaysAsk;
-                }
-            else if ( selectedItem == KDestItemAskOnce )
-                {
-                iSelectionMode = EDCAskOnce;
-                }
-            else if ( selectedItem == KDestItemDefaultConnection )
-                {
-                iSelectionMode = EDCDefaultConnection;
-                }
-            else if ( selectedItem == KDestItemUncategorized )
-                {
-                iSelectionMode = EDCConnectionMethod;
-                }
-            else 
-                {
-                if (iAreDestinations)
-                    {
-                    iSelectionMode = EDCDestination;
-                    }
-                else
-                    {
-                    iSelectionMode = EDCConnectionMethod;                        
-                    }    
-                }
-            //iId is to be defined in the caller class   
-            SelectCurrentItemL();         
-            AttemptExitL(ETrue);
-            break;
-            }
-
-        case ECmManagerUiCmdCMSelect:
-            {
-            iSelectionMode = EDCConnectionMethod;
-            SelectCurrentItemL();         
-            AttemptExitL( ETrue );                   
-            break;
-            }
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                                    iEikonEnv->EikAppUi()->AppHelpContextL() );
-            }
-            break;
-        default:
-            {
-            break;
-            }
-        }
-    }    
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::DynInitMenuPaneL
-// ---------------------------------------------------------------------------
-//
-void CCMConnSelectRBPage::DynInitMenuPaneL( TInt aResourceId,
-                                         CEikMenuPane* aMenuPane )
-    {
-    LOGGER_ENTERFN("CCMConnSelectRBPage::DynInitMenuPaneL");
-
-    CAknSettingPage::DynInitMenuPaneL( aResourceId, aMenuPane );
-    if ( aResourceId == R_SELECT_NETW_CONN_MENU )
-        {
-    	if (!iCmManagerImpl.IsHelpOn())
-            {
-            aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-            }
-        TUint32 currentItem = 
-                    iDestinations[ ListBoxControl()->CurrentItemIndex() ];
-        
-        // Always Ask ( always the first item )
-        if ( (currentItem == KDestItemAlwaysAsk) || 
-             (currentItem == KDestItemAskOnce) || 
-             (currentItem == KDestItemDefaultConnection) ||
-              !iOpenDestination )
-            {
-            aMenuPane->SetItemDimmed( ECmManagerUiCmdCMSelect, ETrue );
-            }        
-        else if ( ( currentItem != KDestItemAlwaysAsk ) && 
-                  ( currentItem != KDestItemAskOnce ) && 
-                  ( currentItem != KDestItemDefaultConnection ) &&
-                  ( currentItem != KDestItemUncategorized ))
-            {
-            CCmDestinationImpl* destImpl = iCmManagerImpl.DestinationL( currentItem );
-            
-            if ( !destImpl->ConnectionMethodCount() )
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdCMSelect, ETrue );                
-                }
-                
-            delete destImpl;
-            }
-        else
-            {
-            RArray<TUint32> uncatArray( KCmArraySmallGranularity );
-            CleanupClosePushL( uncatArray );
-            iCmManagerImpl.ConnectionMethodL( uncatArray );
-            
-            // Uncategorised - cannot be selected
-            if ( currentItem == KDestItemUncategorized )
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestSelect, ETrue );
-                }
-            CleanupStack::PopAndDestroy( &uncatArray );
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CCMConnSelectRBPage::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                               TEventCode aType )    
-    {
-    LOGGER_ENTERFN("CCMConnSelectRBPage::OfferKeyEventL");
-    
-    TKeyResponse retVal ( EKeyWasNotConsumed );
-    // save for the future use
-    iPrevItem = iDestinations[ListBoxControl()->CurrentItemIndex()];
-    
-    TKeyEvent aKeyEventmy = aKeyEvent;
-    if ( aKeyEventmy.iCode == EKeyEnter )
-        {
-        if ( iFirstEnter )
-            {//pressing the enter key at the first time will be changed
-             //to an up arrow key so the first item in the list will be highlighted
-            iFirstEnter = EFalse;
-            aKeyEventmy.iScanCode = EStdKeyUpArrow;
-            aKeyEventmy.iCode = EKeyUpArrow;
-            }
-        else
-            {//change back to true for the next session
-            iFirstEnter=ETrue;
-            }
-        }
-    else if ( aKeyEventmy.iScanCode == EStdKeyDownArrow || aKeyEventmy.iScanCode == EStdKeyUpArrow )
-             {
-             //we will have highligt so the following enter key should select the item
-             iFirstEnter = EFalse;
-             }
-    
-    switch ( aKeyEventmy.iScanCode )
-        {
-        case EStdKeyDownArrow:
-        case EStdKeyUpArrow:
-            {
-            if ( iOpenDestination ) //only if we are on 'destination level' and we are able to
-                //open destinations
-                {            
-                // If focus is on the 'uncategorised' destination, 
-                // change the soft key to 'Open'
-                if ( iDestinations[ ListBoxControl()->CurrentItemIndex() ] == 
-                                                        KDestItemUncategorized )
-                    {
-                    HBufC* text = StringLoader::LoadLC( R_QTN_MSK_OPEN );
-                    Cba()->SetCommandL( EAknSoftkeySelect, *text );
-                    Cba()->DrawNow();
-                    CleanupStack::PopAndDestroy( text );                
-                    }
-                else
-                    {
-                    HBufC* text = StringLoader::LoadLC( R_QTN_MSK_SELECT );
-                    Cba()->SetCommandL( EAknSoftkeySelect, *text );
-                    Cba()->DrawNow();
-                    CleanupStack::PopAndDestroy( text );
-                    }
-                }
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    retVal = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEventmy, aType );
-    
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCMConnSelectRBPage::GetHelpContext
-// --------------------------------------------------------------------------
-//
-void CCMConnSelectRBPage::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    LOGGER_ENTERFN("CCMConnSelectRBPage::GetHelpContext");
-        
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = iHelpContext; 
-    }
-
-// ---------------------------------------------------------------------------
-// CCMConnSelectRBPage::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-//
-void CCMConnSelectRBPage::HandleListBoxEventL(CEikListBox* aListBox, 
-		MEikListBoxObserver::TListBoxEvent aEventType)
-	{
-    LOGGER_ENTERFN("CCMConnSelectRBPage::HandleListBoxEventL");
-        
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-
-		if (iDialogResourceId == R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL)
-			{
-			// Call base class implementation and return if no options menu
-			CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType);
-		
-	    	switch ( aEventType )
-    	    	{
-        		case EEventEnterKeyPressed:
-        		case EEventItemDoubleClicked:
-        		case EEventItemSingleClicked:
-				case EEventItemClicked:        	
-            		{
-            		ProcessCommandL(ECmManagerUiCmdDestSelect);
-            		break;
-            		}
-
-        		default:
-	            	{
-    	        	break;
-            		}
-        		}
-			return;
-			}
-		
-        switch ( aEventType )
-            {
-            // All these actions are activating the listbox item
-            case MEikListBoxObserver::EEventEnterKeyPressed:
-            case MEikListBoxObserver::EEventItemActioned:
-                CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType);
-                break;
-
-            case MEikListBoxObserver::EEventItemClicked:
-            case MEikListBoxObserver::EEventItemSingleClicked:
-                if (iPrevItem == iDestinations[ListBoxControl()->CurrentItemIndex()])
-                    {
-                    ProcessCommandL(ECmManagerUiCmdDestSelect);
-                    }
-                else
-                    {
-                    // save for the later use
-                    iPrevItem = iDestinations[ListBoxControl()->CurrentItemIndex()];
-					    
-		            if ( iOpenDestination ) //only if we are on 'destination level' and we are able to
-        		        //open destinations
-                	    {            
-                	    // If focus is on the 'uncategorised' destination, 
-                	    // change the soft key to 'Open'
-                	    if ( iDestinations[ ListBoxControl()->CurrentItemIndex() ] == 
-		                                                        KDestItemUncategorized )
-        		            {
-                	        HBufC* text = StringLoader::LoadLC( R_QTN_MSK_OPEN );
-                   		    Cba()->SetCommandL( EAknSoftkeySelect, *text );
-                   		    Cba()->DrawNow();
-                   		    CleanupStack::PopAndDestroy( text );                
-                   		    }
-                	    else
-                   		    {
-                   		    HBufC* text = StringLoader::LoadLC( R_QTN_MSK_SELECT );
-                   		    Cba()->SetCommandL( EAknSoftkeySelect, *text );
-                   		    Cba()->DrawNow();
-                   		    CleanupStack::PopAndDestroy( text );
-                   		    }
-                         CAknRadioButtonSettingPage::SelectCurrentItemL();
-                	     }
-                    }
-                break;
-                
-            case MEikListBoxObserver::EEventItemDoubleClicked:
-                ProcessCommandL(ECmManagerUiCmdDestSelect);
-                break;
-
-            default:
-                CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType);            
-                break;
-            }
-        }
-    else
-        {
-        CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType);
-		}		
-	}
-
-
--- a/cmmanager/cmmgr/Framework/Src/cmconnsettingsuiimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1163 +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:  Implementation of application setting UI.
-*
-*/
-
-#include <coemain.h>
-#include <featmgr.h>
-#include <data_caging_path_literals.hrh>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-#include <AknsUtils.h>
-#include <ConnectionUiUtilities.h>
-
-
-#include <cmcommonconstants.h>
-#include "cmapplicationsettingsui.h"
-#include <cmmanager.h>
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include "cmconnsettingsuiimpl.h"
-#include "cmconnselectrbpage.h"
-
-using namespace CMManager;
-
-typedef struct
-    {
-    TInt                iCmIapId;
-    TInt                iCmDefaultPriority;
-    }TCmListItem;
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::NewL
-//---------------------------------------------------------------------------
-//
-EXPORT_C CCmConnSettingsUiImpl* CCmConnSettingsUiImpl::NewL( CCmManagerImpl* aCCmManagerImpl )
-    {
-    CCmConnSettingsUiImpl* self = 
-                                new (ELeave) CCmConnSettingsUiImpl();
-    CleanupStack::PushL( self );
-    self->ConstructL( aCCmManagerImpl );
-    CleanupStack::Pop( self );   // self
-    return self;
-    }
-    
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::NewL
-//---------------------------------------------------------------------------
-//
-CCmConnSettingsUiImpl* CCmConnSettingsUiImpl::NewWithoutTablesL()
-    {
-    CCmConnSettingsUiImpl* self = 
-                                new (ELeave) CCmConnSettingsUiImpl();
-    CleanupStack::PushL( self );
-    self->iCreateTables = EFalse;
-    self->ConstructL( NULL );
-    CleanupStack::Pop( self );   // self
-    return self;
-    }    
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::TCmDCSettingSelection
-//---------------------------------------------------------------------------
-//
-CCmConnSettingsUiImpl::CCmConnSettingsUiImpl()
-    : iResourceReader( *CCoeEnv::Static() )
-    , iAreDestinations ( ETrue )
-    , iShowAlwaysAsk( EFalse )
-    , iShowEasyWlan( EFalse )
-    , iShowVirtualCMs( ETrue )
-    , iShowEmptyDestinations( EFalse )
-    , iShowAskOnce( EFalse )
-    , iShowUncat( EFalse )
-    , iShowDefConn( EFalse )
-    , iUsePassedDestinationArray( EFalse )
-    , iHelpContext ( KSET_HLP_APP_DEST_ASSOC_VIEW )
-    , iCreateTables( ETrue )
-    {
-    }
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::~TCmDCSettingSelection
-//---------------------------------------------------------------------------
-//
-CCmConnSettingsUiImpl::~CCmConnSettingsUiImpl()
-    {
-    if ( iOwnCmManager )
-        {
-        delete iCmManagerImpl;
-        }    
-    iResourceReader.Close();
-    iItems.Close();
-    iPassedDestinations.Close();
-    }
-
-//---------------------------------------------------------------------------
-// CCmConnSettingsUiImpl::LoadResourceL
-// Load the resource for the dll module
-//---------------------------------------------------------------------------
-//
-TInt CCmConnSettingsUiImpl::LoadResourceL ()
-    {    
-    // Add resource file.
-    TParse* fp = new(ELeave) TParse(); 
-    TInt err = fp->Set( KACMManagerResDirAndFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err != KErrNone)
-        {
-        User::Leave( err );
-        }   
-
-    TFileName resourceFileNameBuf = fp->FullName();
-    delete fp;
-
-    iResourceReader.OpenL( resourceFileNameBuf );
-    return err;
-    }
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::ConstructL()
-//---------------------------------------------------------------------------
-//
-void CCmConnSettingsUiImpl::ConstructL( CCmManagerImpl* aCCmManagerImpl )
-    {
-    iOwnCmManager = !(aCCmManagerImpl);
-    if ( iOwnCmManager )
-        {
-        if (iCreateTables)
-            {
-            iCmManagerImpl = CCmManagerImpl::NewL();            
-            }
-        else
-            {
-            iCmManagerImpl = CCmManagerImpl::NewL(EFalse);                            
-            }
-        }
-    else
-        {
-        iCmManagerImpl = aCCmManagerImpl;
-        }
-    LoadResourceL();
-    AknsUtils::SetAvkonSkinEnabledL( ETrue );
-    }
-
-//---------------------------------------------------------------------------
-// CCmConnSettingsUiImpl::ShowConnSelectRadioPageL
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::ShowConnSelectRadioPageL( 
-                                           TCmDCSettingSelection& aSelection, 
-                                           const TInt aTitleStringResource,
-                                           TBearerFilterArray& aFilterArray )
-    {
-    TBool retVal( EFalse );
-//    aSelection.iResult = EDCAlwaysAsk;
-
-    CDesCArrayFlat* items = 
-                    new ( ELeave ) CDesCArrayFlat( KCmArrayBigGranularity );
-    CleanupStack::PushL( items );
-    
-    if (iAreDestinations)
-        {
-        BuildDestinationArrayL( items, aFilterArray );        
-        }
-    else    
-        {
-        BuildCMArrayL( items, aFilterArray ); 
-               
-        }
-    // Uncategorized connection methods
-    RPointerArray<CCmPluginBase> uncatArray( KCmArraySmallGranularity );
-    CCmManagerImpl::CleanupResetAndDestroyPushL< RPointerArray<CCmPluginBase> >( uncatArray );
-    if ( iShowUncat )
-        {
-        BuildUncatArrayL( uncatArray, items,
-                    aFilterArray);
-        }
-    //appending items in reverse order of priority    
-    // Check if Ask Once should be shown 
-    if ( iShowAskOnce )
-        {
-        HBufC* buf = StringLoader::LoadLC( R_CMMANAGERUI_SETT_ASK_ONCE );
-        items->InsertL( 0, *buf );
-        iItems.InsertL( KDestItemAskOnce, 0 );
-        CleanupStack::PopAndDestroy( buf );    
-        }
-
-    // Check if Always Ask should be shown
-    if ( iShowAlwaysAsk )
-        {
-        HBufC* buf = StringLoader::LoadLC( R_CMMANAGERUI_SETT_ALWAYS_ASK );
-        items->InsertL( 0, *buf );
-        iItems.InsertL( KDestItemAlwaysAsk, 0 );
-        CleanupStack::PopAndDestroy( buf );    
-        }
-    // Check if Default Connection should be shown 
-    //feautre flag
-    if ( iCmManagerImpl->IsDefConnSupported() )
-        {
-        //client's selection
-        if ( iShowDefConn )
-            {
-            HBufC* buf = StringLoader::LoadLC( R_CMMANAGERUI_SETT_DEFAULT_CONNECTION );
-            items->InsertL( 0, *buf );
-            iItems.InsertL( KDestItemDefaultConnection, 0 );
-            CleanupStack::PopAndDestroy( buf );    
-            } 
-        }
-    if (!items->Count())
-        {
-        User::Leave(KErrConnectionNotFound);           
-        }
-    
-    TInt listIndex(0);
-    
-    if (iAreDestinations)
-        {
-        switch ( aSelection.iResult )
-                {
-                case EDCDestination:
-                    {
-                    TInt newIndex = iItems.Find(aSelection.iId);
-                    if (newIndex >=0)
-                        {
-                        listIndex = newIndex;
-                        }
-                    break;
-                    }
-                case EDCConnectionMethod:
-                    {
-                    TInt err(KErrNotFound);
-                    CCmPluginBase* cm = NULL;
-                    TRAP( err, cm = iCmManagerImpl->GetConnectionMethodL(aSelection.iId));
-                    if ( err == KErrNone )
-                        {
-                        // connection method is valid
-                        CleanupStack::PushL( cm );
-                        TUint32 parentId = 0;
-                        CCmDestinationImpl* parent = cm->ParentDestination();
-                        if (parent)
-                            {
-                            // it has a parent, get it's id
-                            parentId = parent->Id();
-                            delete parent;
-                            }
-                        else
-                            {
-                            // no parent means Uncategorised
-                            parentId = KDestItemUncategorized;
-                            }
-                        // get the index based on id    
-                        TInt tempIndex = iItems.Find( parentId );
-                        if ( tempIndex != KErrNotFound )
-                            {
-                            // found destination id in list
-                            listIndex = tempIndex;
-                            }                            
-                        CleanupStack::PopAndDestroy( cm );
-                        }
-                    break;
-                    }
-                case EDCDefaultConnection:
-                    {
-                    TInt newIndex = iItems.Find(KDestItemDefaultConnection);
-                    if (newIndex >=0)
-                        {
-                        listIndex = newIndex;
-                        }
-                    break;
-                    }
-                case EDCAlwaysAsk:
-                    {
-                    TInt newIndex = iItems.Find(KDestItemAlwaysAsk);
-                    if (newIndex >=0)
-                        {
-                        listIndex = newIndex;
-                        }
-                    break;
-                    }
-                case EDCAskOnce:
-                    {
-                    TInt newIndex = iItems.Find(KDestItemAskOnce);
-                    if (newIndex >=0)
-                        {
-                        listIndex = newIndex;
-                        }
-                    break;
-                    }                
-                default: // use default value (0)
-                    {
-                    break;
-                    }                            
-                }
-            }
-         else
-            {
-            if (aSelection.iResult == EDCConnectionMethod)
-                {
-                TInt newIndex = iItems.Find(aSelection.iId);
-                if (newIndex >=0)
-                    {
-                    listIndex = newIndex;
-                    }
-                }
-            }
-    
-    if ( aTitleStringResource == R_CMMANAGERUI_DEFAULT_CONNECTION_TITLE )
-        {
-        // It is not allowed to choose Connection Methods 
-        // in Default connection -dialog.
-        //
-        iOpenDestination = EFalse;
-        }
-    
-    if ( UserSelectionDlgL( listIndex, items, aSelection, 
-                            aTitleStringResource,
-                            iOpenDestination) )
-        {
-        // Handle selection
-        
-        switch ( aSelection.iResult )
-            {
-            case EDCConnectionMethod:
-                {
-                // from the first list?
-                if (!iAreDestinations)
-                    {
-                    aSelection.iId = iItems[listIndex];
-                    retVal = ETrue;                    
-                    }
-                else
-                    {
-                    // Uncategorised?
-                    TUint32 destId = iItems[ listIndex ];
-                    if ( destId == KDestItemUncategorized )
-                        {
-                        TBearerFilterArray emptyFilter;
-                        retVal = ShowConnectionMethodsL( uncatArray, 
-                                        aSelection, aTitleStringResource, emptyFilter );
-                        }
-                    else
-                        {
-                        RPointerArray<CCmPluginBase> cmArray ( KCmArrayMediumGranularity );
-                        if ( iShowVirtualCMs ) //create a flat list to show cms in embedded destinations
-                            {
-                            iCmManagerImpl->CreateFlatCMListLC( destId, cmArray);
-                            }
-                         else
-                            {
-                            //append only the cms in the destination
-                            iCmManagerImpl->AppendCmListLC( destId, cmArray ); 
-                            }
-                        retVal = ShowConnectionMethodsL( cmArray, 
-                                        aSelection, aTitleStringResource,
-                                        aFilterArray );
-                        CleanupStack::PopAndDestroy( &cmArray );
-                        }                    
-                    }
-                break;
-                }
-            case EDCDestination:
-                {
-                // Store the destination Id
-                aSelection.iId = iItems[listIndex];
-                retVal = ETrue;
-                break;
-                }
-            case EDCAlwaysAsk:
-                {
-                // nothing more to do
-                retVal = ETrue;
-                break;
-                }        
-            case EDCDefaultConnection:
-                {
-                // nothing more to do
-                retVal = ETrue;
-                break;
-                }            
-            case EDCAskOnce:
-                {
-                // nothing more to do
-                retVal = ETrue;
-                break;
-                }            
-            default:
-                {
-                break;
-                }
-            }
-        }
-
-    CleanupStack::PopAndDestroy( &uncatArray );
-    CleanupStack::PopAndDestroy( items );
-
-    return retVal;
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::RunSettingsL()
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmConnSettingsUiImpl::RunApplicationSettingsL( 
-                                        TCmSettingSelection& aSelection, 
-                                        TUint aListItems,
-                                        TBearerFilterArray& aFilterArray)
-    {
-    iItems.Close();
-    iAreDestinations = ETrue;
-    if (!aListItems)
-        {
-        User::Leave(KErrArgument);        
-        }
-    if ( !iCmManagerImpl->IsDefConnSupported() &&
-         !(aListItems & EShowAlwaysAsk) &&  
-         !(aListItems & EShowConnectionMethods) &&  
-         !(aListItems & EShowDestinations) 
-         )
-        {
-        // default conn would be the only one but not supported
-        User::Leave(KErrNotSupported);   
-        }
-
-    if ( aListItems & EShowDefaultConnection )
-        {
-        EnableDefConn( ETrue );        
-        }
-    else
-        {
-        EnableDefConn( EFalse );                
-        }
-    if (aListItems & EShowAlwaysAsk)
-        {
-        EnableAlwaysAsk( ETrue );
-        }
-    else
-        {
-        EnableAlwaysAsk( EFalse );
-        }
-    if ( (aListItems & EShowConnectionMethods) && (aListItems & EShowDestinations) )
-        {
-        iOpenDestination = ETrue;
-        iShowUncat = ETrue;
-        }
-    else
-        {
-        iOpenDestination = EFalse;
-        }
-    if ( (aListItems & EShowConnectionMethods) && !(aListItems & EShowDestinations) )
-        {
-        iAreDestinations = EFalse;
-        GetCMArrayL( );            
-        }
-    else if ( aListItems & EShowDestinations )
-        {
-        if (iUsePassedDestinationArray)
-            {
-            // now fill up iItems
-            for( TInt i=0; i<iPassedDestinations.Count(); i++)
-                {
-                iItems.Append(iPassedDestinations[i]);
-                }
-            }
-        else
-            {
-            iCmManagerImpl->AllDestinationsL( iItems );
-            TInt i( 0 );
-            TInt count = iItems.Count();
-            for ( i=0; i < count; i++ )
-                {
-                if ( iItems[i] > 0 && iItems[i] < 255 )
-                    {
-                    CCmDestinationImpl* dest = 
-        	                            iCmManagerImpl->DestinationL( iItems[i] );
-                    CleanupStack::PushL( dest );
-        	        if ( dest->IsHidden() )
-                        {
-                        iItems.Remove(i);
-                        i--;
-                        count = count-1;
-                        }
-                    CleanupStack::PopAndDestroy();
-                    }
-                }
-            iItems.Compress();
-            }
-        }
-
-    TBool ret = EFalse;
-    TCmDCSettingSelection userDefSelection;
-
-    // convert selection
-    switch ( aSelection.iResult )
-        {
-        case EDestination: 
-            {
-            userDefSelection.iResult = EDCDestination; 
-            userDefSelection.iId = aSelection.iId;        
-            break;
-            }
-            
-        case EConnectionMethod: 
-            {
-            userDefSelection.iResult = EDCConnectionMethod; 
-            userDefSelection.iId = aSelection.iId;        
-            break;
-            }
-
-        case EDefaultConnection: 
-            {
-            userDefSelection.iResult = EDCDefaultConnection; 
-            userDefSelection.iId = 0;
-            break;
-            }
-
-        case EAlwaysAsk: 
-            {
-            userDefSelection.iResult = EDCAlwaysAsk; 
-            userDefSelection.iId = 0;
-            break;
-            }
-
-        default: 
-            {
-            // do not leave, perhaps there was no default selection
-            }                            
-        }
-    
-    
-    
-    if ( ShowConnSelectRadioPageL( userDefSelection, 
-            R_CMMANAGERUI_SETT_DESTINATION , aFilterArray))
-        {
-        switch ( userDefSelection.iResult )
-            {
-            case EDCDestination:
-                {
-                aSelection.iResult = EDestination;
-                aSelection.iId = userDefSelection.iId;
-                break;
-                }
-            case EDCConnectionMethod:
-                {
-                aSelection.iResult = EConnectionMethod;
-                aSelection.iId = userDefSelection.iId;
-                break;
-                }
-            case EDCDefaultConnection:
-                {
-                aSelection.iResult = EDefaultConnection;
-                aSelection.iId = 0;
-                break;
-                }
-            case EDCAlwaysAsk:
-                {
-                aSelection.iResult = EAlwaysAsk;
-                aSelection.iId = 0;
-                break;
-                }
-            default: //should not ever get here, unhandled branch
-                {
-                User::Leave( KErrGeneral );
-                break;
-                }                            
-            }
-        ret = ETrue;
-        }
-    else
-        {
-        ret = EFalse;
-        }
-    return ret;        
-    }    
-
-    
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::RunDefaultConnecitonRBPageL()
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::RunDefaultConnecitonRBPageL( 
-                                          TCmDCSettingSelection& aSelection )
-    {
-    iHelpContext = KSET_HLP_DEFAULT_CONN;
-    iItems.Close();
-    iOpenDestination = ETrue;
-    iCmManagerImpl->AllDestinationsL( iItems );
-    EnableAlwaysAsk( EFalse );
-    EnableAskOnce( EFalse );
-    EnableUncat( EFalse );
-    TBearerFilterArray aFilterArray;
-    iAreDestinations = ETrue;
-    iShowEmptyDestinations = ETrue;
-    return  ShowConnSelectRadioPageL( aSelection , 
-        R_CMMANAGERUI_DEFAULT_CONNECTION_TITLE, aFilterArray );
-    }
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::GetCMArrayL()
-//---------------------------------------------------------------------------
-//
-void CCmConnSettingsUiImpl::GetCMArrayL( )
-    {
-    iCmManagerImpl->ConnectionMethodL( iItems, ETrue, EFalse,EFalse, ETrue );
-    TInt count = iItems.Count();
-
-    if ( !iShowVirtualCMs )
-        {
-        // Don't show virtual CMs
-        for ( TInt i = 0; i < count; i++ )
-            {
-            if ( IsCmVirtualL( iItems[i] ) )
-                {
-                iItems.Remove( i );
-                count--;
-                i--;
-                }
-            }
-        }
-    }
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::BuildCMArrayL()
-//---------------------------------------------------------------------------
-//
-void CCmConnSettingsUiImpl::BuildCMArrayL( CDesCArrayFlat* aItems, 
-                                           TBearerFilterArray& aFilterArray )
-    {
-    // Add the New Connection Item        
-    for ( TInt i = 0; i < iItems.Count(); i++ )
-        {
-        CCmPluginBase* cm = NULL;
-        TInt err(KErrNone);
-        TRAP( err, cm = iCmManagerImpl->GetConnectionMethodL(iItems[i]));
-        if (err == KErrNoMemory)
-        {
-            User::Leave(KErrNoMemory);
-        }
-        else if (err != KErrNone)
-        {
-            continue;
-        }                            
-        CleanupStack::PushL( cm );
-        if (aFilterArray.Count())
-            {
-            TUint cmBearerType = cm->GetIntAttributeL( ECmBearerType );
-            if ( aFilterArray.Find( cmBearerType ) == KErrNotFound )
-                {
-                CleanupStack::PopAndDestroy( cm );            
-                iItems.Remove(i);
-                i--;
-                continue;    
-                }
-            }
-        // CM Iap Id
-        TUint32 cmId = cm->GetIntAttributeL( ECmId );
-                                
-        // Should virtual bearer types be shown?
-        if ( iShowVirtualCMs || !IsCmVirtualL( cmId ) )
-            {
-            // CM name
-            HBufC* cmName = cm->GetStringAttributeL( ECmName );
-            CleanupStack::PushL( cmName );
-            // embedded destination has a special text format
-            aItems->AppendL( *cmName );
-            CleanupStack::PopAndDestroy( cmName );
-            }
-        CleanupStack::PopAndDestroy( cm );            
-        }
-    }
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::BuildDestinationArray()
-//---------------------------------------------------------------------------
-//
-void CCmConnSettingsUiImpl::BuildDestinationArrayL( CDesCArrayFlat* aItems, 
-                                         TBearerFilterArray& aFilterArray )
-    {
-    /*
-     * The behavior of this function is as follow.
-     * 1. If aFilterArray.Count() == 0 (This just means no filter provided by user) then the function will
-     *    show all of available destinations (if iShowVirtualCMs == ETrue; Otherwise, destination with only
-     *    virtualCMs will be filted out) (default).
-     * 2. If aFilterArray.Count() != 0 then destination with only unavailable bearer-type IAPs will be 
-     *    filted out.
-     */
-    TInt count = iItems.Count();           
-    // Add the New Connection Item
-    for ( TInt i = 0; i < count; i++ )
-        {
-        // Get the destinations from their IDs
-        CCmDestinationImpl* dest = 
-                            iCmManagerImpl->DestinationL( iItems[i] );
-        CleanupStack::PushL( dest );
-
-        TInt cmCount = dest->ConnectionMethodCount();
-        TInt validCmCount = cmCount;
-        
-        if ( !iUsePassedDestinationArray )
-            {
-            // Check if empty destinations should be displayed
-            if ( !iShowVirtualCMs || aFilterArray.Count())
-                {            
-                for ( TInt j = 0; j < cmCount; j++ )
-                    {
-                    CCmPluginBase& cm = *dest->GetConnectionMethodL(j);
-                    // check if this destination only contains virtual CMs
-                    if (!iShowVirtualCMs)// See if the virtual CM (Default in case no filter provided by user)
-                        {
-                        // CM Iap Id
-                        TUint32 cmIapId = cm.GetIntAttributeL( ECmId );                
-                        // real CMs were found
-                        if ( IsCmVirtualL( cmIapId ) )
-                            {
-                            validCmCount--;
-                            continue;
-                            }
-                        // We can not break the loop with else case here
-                        // for cm might be filted out by aFilterArray
-                        }
-                    
-                    if (aFilterArray.Count()) // See if the CM is filtered out
-                        {                       
-                        TUint cmBearerType = cm.GetIntAttributeL( ECmBearerType );
-                        if ( aFilterArray.Find( cmBearerType ) == KErrNotFound )
-                            {
-                            validCmCount--;
-                            }
-                        else
-                            {
-                            break;//there is at least one CM in this dest    
-                            }                    
-                        }
-                    }
-                }
-            }
-        
-        // check if the destination should be omitted
-        // check if empty destinations should be displayed
-        
-        // We can use a destination to make a connection only
-        // if it contains something else than an empty embedded
-        // destination. Otherwise, consider it empty.
-        TBool canUseDestToConnect = dest->CanUseToConnectL();
-        
-        if ( iDestinationToOmit != iItems[i] && 
-                            ( ( validCmCount && canUseDestToConnect )
-                               || iShowEmptyDestinations ) )
-            {
-            // Check whether the MMS SNAP is in question. 
-            // It should not be shown on the UI in the destinations list
-            TInt snapMetadata = 0;
-            TRAPD( metaErr, snapMetadata = dest->MetadataL( CMManager::ESnapMetadataPurpose ));
-            if ( metaErr == KErrNone && snapMetadata == CMManager::ESnapPurposeMMS )
-                {
-                iItems.Remove(i);
-                count--;
-                i--;
-                }
-            else
-                {
-                HBufC* destName = dest->NameLC();
-
-                aItems->AppendL( *destName );
-                CleanupStack::PopAndDestroy( destName );
-                }
-            }
-        else
-            {
-            iItems.Remove(i);
-            count--;
-            i--;
-            }
-            
-        CleanupStack::PopAndDestroy( dest );
-        }
-    }
-    
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::BuildUncatArrayL()
-//---------------------------------------------------------------------------
-//
-void CCmConnSettingsUiImpl::BuildUncatArrayL( RPointerArray<CCmPluginBase>& aUncatArray,
-                                           CDesCArrayFlat* aItems, 
-                                           TBearerFilterArray& aFilterArray )
-    {
-    if ( iShowEasyWlan )
-        {
-        // Get the uncategorised CMs including EasyWLAN
-        iCmManagerImpl->AppendUncatCmListL( aUncatArray, ETrue, ETrue, ETrue );
-        }
-    else
-        {
-        iCmManagerImpl->AppendUncatCmListL( aUncatArray );
-        }
-    
-    // Remove hidden Connection Methods
-    for ( TInt i = 0; i < aUncatArray.Count(); i++ )
-        {
-        if ( aUncatArray[i]->GetBoolAttributeL( ECmHidden ) )
-            {
-            delete aUncatArray[i];
-            aUncatArray.Remove(i);
-            i--;
-            }
-        }
-        
-    if (aFilterArray.Count())
-        {
-        for ( TInt i = 0; i < aUncatArray.Count(); i++ )
-            {
-            CCmPluginBase* cm = aUncatArray[i];
-            TUint cmBearerType = cm->GetIntAttributeL( ECmBearerType );
-            if ( aFilterArray.Find( cmBearerType ) == KErrNotFound )
-                {
-                delete aUncatArray[i];
-                aUncatArray.Remove(i);
-                i--;
-                }
-            }
-        }
-    TInt count = aUncatArray.Count();
-
-    if ( !iShowVirtualCMs )
-        {
-        // Don't show virtual CMs
-        for ( TInt i = 0; i < count; i++ )
-            {
-            if ( IsCmVirtualL( aUncatArray[i]->GetIntAttributeL( ECmId ) ) )
-                {
-                delete aUncatArray[i];
-                aUncatArray.Remove( i );
-                count--;
-                i--;
-                }
-            }
-        }
-    // Show the 'Uncategorised' destination
-    if ( count )
-        {
-        HBufC* buf = StringLoader::LoadLC( R_CMMANAGERUI_DEST_UNCATEGORIZED );
-        aItems->AppendL( *buf );
-        CleanupStack::PopAndDestroy( buf );        
-        iItems.AppendL( KDestItemUncategorized );
-        }
-    }
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::UserSelectionDlgL()
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::UserSelectionDlgL( 
-                                        TInt& aDestSelected, 
-                                        CDesCArrayFlat* aItems, 
-                                        TCmDCSettingSelection& aSelection, 
-                                        const TInt aTitleStringResource, 
-                                        TBool aOpenDestination)
-    {
-    // Should an item be highlighted?
-    if ( aSelection.iResult == EDCDestination )
-        {
-        for ( TInt i = 0; i < iItems.Count(); i++ )
-            {
-            if ( iItems[i] == aSelection.iId )
-                {
-                aDestSelected = i;
-                }
-            }
-        }
-    
-    HBufC* buf = StringLoader::LoadLC( aTitleStringResource );
-    TInt dialogResourceId = R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL;
-    if ( aOpenDestination ) // OPTIONS/CANCEL is available only if we can open
-                            //destinations
-        {
-        dialogResourceId = R_RADIO_BUTTON_SETTING_PAGE;
-        }
-    CCMConnSelectRBPage* page = 
-                        new ( ELeave ) CCMConnSelectRBPage( dialogResourceId,
-                                                         aDestSelected, 
-                                                         aItems,
-                                                         *iCmManagerImpl,
-                                                         aSelection.iResult,
-                                                         iItems,
-                                                         iAreDestinations,
-                                                         aOpenDestination ,
-                                                         iHelpContext );
-    CleanupStack::PushL( page );
-    page->SetSettingTextL( *buf );
-    CleanupStack::Pop( page );
-    
-    CleanupStack::PopAndDestroy( buf );
-    buf = NULL;
-    
-    return page->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );
-    }    
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::UserSelectedUncatItemL()
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::UserSelectedUncatItemL(
-                                           RPointerArray<CCmPluginBase>& aUncatArray,
-                                           TCmDCSettingSelection& aSelection, 
-                                        const TInt aTitleStringResource )
-    {
-    TBool retVal( EFalse );
-    CDesCArrayFlat* items = 
-                    new ( ELeave ) CDesCArrayFlat( KCmArrayBigGranularity );
-    CleanupStack::PushL( items );
-
-    TInt cmSelected( 0 );
-
-    TInt count = aUncatArray.Count();
-    for ( TInt i = 0; i < count; ++i )     
-        {
-        CCmPluginBase* cm = NULL;
-        TRAPD( err,
-               cm = iCmManagerImpl->GetConnectionMethodL( aUncatArray[i]->GetIntAttributeL( ECmId) ) 
-               );
-        
-        if ( !err )
-            {
-            CleanupStack::PushL( cm );
-            HBufC* cmName = cm->GetStringAttributeL( ECmName );
-            CleanupStack::PushL( cmName );
-            items->AppendL( *cmName );
-            
-            // Virtual CMs have underlying CMs, highlight
-            if ( cm->GetBoolAttributeL( ECmVirtual ) )
-                {
-                TUint32 iapId (0);
-                iapId = cm->GetIntAttributeL( ECmNextLayerIapId );
-                if ( iapId && iapId == aSelection.iId )
-                    {
-                    cmSelected = i;
-                    }
-                }            
-            CleanupStack::PopAndDestroy( 2, cm );
-            }
-        else
-            {
-            //not handled iap, remove from list
-            aUncatArray.Remove( i );
-            count--;
-            i--;
-            }
-        }
-    
-    
-    CAknRadioButtonSettingPage* rbPage = 
-                new ( ELeave ) CAknRadioButtonSettingPage(
-                                    R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL, 
-                                    cmSelected, 
-                                    items );
-    CleanupStack::PushL( rbPage );
-                        
-    HBufC* buf = StringLoader::LoadLC( aTitleStringResource );    
-    rbPage->SetSettingTextL( *buf );
-    CleanupStack::PopAndDestroy( buf );
-    
-    if ( rbPage->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-        CCmPluginBase* cm = 
-                iCmManagerImpl->GetConnectionMethodL( aUncatArray[cmSelected]->GetIntAttributeL( ECmId) );
-
-        // ECmIapId can be surely queried here. It won't leave, but PushL to be
-        // on the safe side
-        CleanupStack::PushL( cm );
-        aSelection.iId = cm->GetIntAttributeL( ECmId );
-        CleanupStack::PopAndDestroy( cm );
-
-        aSelection.iResult = EDCConnectionMethod; 
-        
-        retVal = ETrue;
-        }
-    CleanupStack::Pop( rbPage );
-    CleanupStack::PopAndDestroy( items );
-    
-    return retVal;
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::ShowConnectionMethodsL()
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::ShowConnectionMethodsL( 
-                    RPointerArray<CCmPluginBase>& aCmArray, TCmDCSettingSelection& aSelection, 
-                    const TInt aTitleStringResource,
-                    TBearerFilterArray& aFilterArray  )
-    {
-    TInt retVal ( EFalse );
-    
-    // List texts
-    CDesCArrayFlat* items = 
-            new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
-    CleanupStack::PushL( items );
-    
-    // keeps track of the CMs in the list
-    
-    // idArray is used to put valid IAP ID.
-    // aFilterArray might filt some of IAPs (e.g., virtual IAPs) out. In this case,
-    // aCmArray can not be used to select IAP. So, idArray may be used for IAP selection
-    // for it only stores valid IAPs (i.e., not filted-out IAPs).
-    RArray<TUint32> idArray;
-    TInt cmSelected( 0 );
-    TInt j( 0 );
-    
-    // Collect item texts
-    TInt cmCount = aCmArray.Count();
-    for ( TInt i = 0; i < cmCount; i++ )
-        {
-        // CM info
-        if (aFilterArray.Count())
-            {
-            TUint cmBearerType = aCmArray[i]->GetIntAttributeL( ECmBearerType );
-            if ( aFilterArray.Find( cmBearerType ) == KErrNotFound )
-                {
-                continue;    
-                }
-            }
-        
-        // CM Iap Id
-        TUint32 cmIapId = aCmArray[i]->GetIntAttributeL( ECmId );
-        
-        // Should virtual bearer types be shown?
-        if ( iShowVirtualCMs || !IsCmVirtualL( cmIapId ) )
-            {
-            // CM name
-            HBufC* name = aCmArray[i]->GetStringAttributeL( ECmName );
-            CleanupStack::PushL( name );
-            
-            items->AppendL( *name );
-            idArray.Append( cmIapId );
-            
-             // Virtual CMs have underlying CMs, highlight
-            if ( cmIapId == aSelection.iId )
-                {
-                cmSelected = j;
-                j++;
-                }
-            
-            CleanupStack::PopAndDestroy( name );
-            }
-        }
-    
-    // create the dialog             
-    CAknRadioButtonSettingPage* dlg = 
-                            new ( ELeave ) CAknRadioButtonSettingPage(
-                                    R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL,
-                                    cmSelected, 
-                                    items );
-    CleanupStack::PushL( dlg );
-    
-    // Title
-    HBufC* title = StringLoader::LoadLC ( aTitleStringResource );
-    dlg->SetSettingTextL( *title );
-    
-    // Show the dialog
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-        aSelection.iId = idArray[cmSelected];
-        aSelection.iResult = EDCConnectionMethod; 
-        retVal = ETrue;
-        }
-    idArray.Close();
-    
-    CleanupStack::PopAndDestroy( title );
-    CleanupStack::Pop( dlg );
-    CleanupStack::PopAndDestroy( items );
-    
-    return retVal;
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::IsCmVirtualL
-//---------------------------------------------------------------------------
-//
-TBool CCmConnSettingsUiImpl::IsCmVirtualL( TUint32 aIapId )
-    {
-    // check if bearer is virtual
-    TInt bearerType = iCmManagerImpl->GetConnectionMethodInfoIntL( 
-                                                aIapId, ECmBearerType );
-    return iCmManagerImpl->GetBearerInfoBoolL( bearerType, ECmVirtual );
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::CreateDefaultConnectionNameL
-//---------------------------------------------------------------------------
-//
-HBufC* CCmConnSettingsUiImpl::CreateDefaultConnectionNameL( 
-                                            TCmDefConnValue aSelection )
-    {
-    HBufC* ret = NULL;
-    switch ( aSelection.iType )
-        {
-        case ECmDefConnDestination:
-            {
-            CCmDestinationImpl* dest = 
-                        iCmManagerImpl->DestinationL( aSelection.iId );
-            CleanupStack::PushL( dest );
-            ret = dest->NameLC();
-            CleanupStack::Pop( ret );
-            CleanupStack::PopAndDestroy( dest );
-            break;
-            }
-        case ECmDefConnConnectionMethod:
-            {
-            ret = iCmManagerImpl->GetConnectionMethodInfoStringL( 
-                                                aSelection.iId, ECmName );
-            break;
-            }
-        }
-    return ret;
-    }
-   
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::SetDestinationArrayToUseL
-//---------------------------------------------------------------------------
-//
-EXPORT_C void CCmConnSettingsUiImpl::SetDestinationArrayToUseL(
-                                         RArray<TUint32> aDestinationArray )
-    {
-    iPassedDestinations.Close();
-    for (TInt i=0; i<aDestinationArray.Count(); i++)
-        {
-        iPassedDestinations.AppendL(aDestinationArray[i]);
-        }
-    
-    iUsePassedDestinationArray = ETrue;
-    }
-
-
-//---------------------------------------------------------------------------
-//  CCmConnSettingsUiImpl::ClearDestinationArrayToUse
-//---------------------------------------------------------------------------
-//
-EXPORT_C void CCmConnSettingsUiImpl::ClearDestinationArrayToUse()
-    {
-    iPassedDestinations.Close();
-    iUsePassedDestinationArray = EFalse;
-    }
-
-
--- a/cmmanager/cmmgr/Framework/Src/cmdesticondialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +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:  Implementation of CCmDestinationIconDialog
-*
-*/
-
-// INCLUDE FILES
-#include <uikon.hrh>
-#include <e32std.h>
-#include <eikcapc.h>
-
-#include <aknlayoutscalable_avkon.cdl.h>
-#include <layoutmetadata.cdl.h>
-
-#include <aknborders.h>
-#include <aknconsts.h>
-#include <AknUtils.h>
-#include <aknPopupHeadingPane.h>
-#include <AknSettingCache.h>
-
-#include <AknLayout.lag>
-#include <e32property.h>
-
-#include <cmmanager.rsg>
-
-#include "cmmanager.hrh"
-#include "cmdesticondialog.h"
-#include "cmdesticonmap.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// ----------------------------------------------------------------------------
-// CCmDestinationIconDialog class
-// CCmDestinationIconDialog() - constructor
-// ----------------------------------------------------------------------------
-//
-CCmDestinationIconDialog::CCmDestinationIconDialog( TInt& aIconIndex )
-    : iIconIndex(&aIconIndex)
-    {
-    CEikDialog::SetBorder( AknBorderId::EAknBorderNotePopup );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::~CCmDestinationIconDialog()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconDialog::~CCmDestinationIconDialog()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::HandleResourceChange()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::HandleResourceChange(TInt aType)
-    {
-    CAknDialog::HandleResourceChange(aType);
-
-    if (aType==KEikDynamicLayoutVariantSwitch)
-        {
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::OkToExitL()
-// -----------------------------------------------------------------------------
-//
-TBool CCmDestinationIconDialog::OkToExitL(TInt aButtonId)
-    {
-    CCmDestinationIconMap* iconmapControl = 
-        STATIC_CAST(CCmDestinationIconMap*, Control(ECmDestIconMapContentId));
-    // Selection key / select softkey adds a iconacter only if 5-key was not 
-    // used to select multiple icons before.
-    if ( aButtonId == EAknSoftkeyOk || aButtonId == EAknSoftkeySelect )
-        {
-        TKeyEvent key;
-        key.iCode=EKeyOK;
-        key.iModifiers=0;
-        iconmapControl->OfferKeyEventL(key, EEventKey);
-        }
-    return(ETrue);
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::PreLayoutDynInitL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::PreLayoutDynInitL()
-    {
-    CCmDestinationIconMap* iconmapControl = 
-       STATIC_CAST( CCmDestinationIconMap*, Control( ECmDestIconMapContentId ));
-    CAknPopupHeadingPane* headingPane =
-       STATIC_CAST( CAknPopupHeadingPane*, Control( EAknSCTQueryHeadingId ));
-
-    iconmapControl->SetIndex(*iIconIndex);    
-
-    SetLineNonFocusing(EAknSCTQueryHeadingId);
-
-    // add title    
-    CEikonEnv* env = CEikonEnv::Static();
-    HBufC* title = env->AllocReadResourceL( R_CMMANAGERUI_PRMPT_SELECT_ICON );
-    CleanupStack::PushL( title );
-    headingPane->SetTextL( *title );
-    CleanupStack::PopAndDestroy( title );
-    title = NULL;
-
-#ifdef RD_SCALABLE_UI_V2
-
-	iconmapControl->SetObserver(this);
-	
-#endif // RD_SCALABLE_UI_V2
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::SetSizeAndPosition()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::SetSizeAndPosition( const TSize& aSize )
-    {
-    SetBorder( TGulBorder::ENone ); // No Dialog borders in SCT.
-    CAknDialog::SetSizeAndPosition( aSize );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::OfferKeyEventL()
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CCmDestinationIconDialog::OfferKeyEventL(
-                             const TKeyEvent& aKeyEvent, TEventCode aModifiers )
-    {
-    if ( aModifiers == EEventKey )
-        {
-        TUint code=aKeyEvent.iCode;
-        CCmDestinationIconMap* iconmapControl =
-                            STATIC_CAST( CCmDestinationIconMap*, 
-                                         Control( ECmDestIconMapContentId ));
-
-        switch ( code )
-            {
-            case EKeyLeftArrow:
-            case EKeyRightArrow:
-            case EKeyUpArrow:
-            case EKeyDownArrow:
-                {
-                TKeyResponse res(
-                    iconmapControl->OfferKeyEventL( aKeyEvent, aModifiers ));
-                return res;
-                }
-                
-            case EKeyEnter:
-                // change fro EKeyEnter to EKeyOK
-                {
-                TKeyEvent keyEvent;
-                keyEvent.iCode = EKeyOK;
-                keyEvent.iScanCode = aKeyEvent.iScanCode;
-                keyEvent.iModifiers = aKeyEvent.iModifiers;
-                keyEvent.iRepeats = aKeyEvent.iRepeats;
-
-                TKeyResponse res( CEikDialog::OfferKeyEventL( keyEvent, aModifiers ) );
-                // It seems Avkon doesn't continue to call OkToExitL after this OfferKeyEventL.
-                // So, we may have to positively exit by calling TryExitL so that user's selected
-                // Icon will be return back to caller (i.e., CDestDlg).
-                TryExitL( EAknSoftkeyOk );
-                return res;
-                }
-                
-            default:
-                break;
-            }
-        }
-        
-    return CEikDialog::OfferKeyEventL( aKeyEvent, aModifiers );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::ExecuteLD()
-// -----------------------------------------------------------------------------
-//
-TInt CCmDestinationIconDialog::ExecuteLD()
-    {
-    // Prepare real icon map
-    CEikDialog::PrepareLC( R_ICONSEL_DIALOG );
-    return(RunLD());
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::CEikDialog_Reserved_1()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::CEikDialog_Reserved_1()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::CEikDialog_Reserved_2()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::CEikDialog_Reserved_2()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::CCmDestinationIconDialog_Reserved()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::CAknIconMapDialog_Reserved()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::CreateCustomControlL()
-// Virtual function override from the base class to implement the custom control
-// -----------------------------------------------------------------------------
-//    
-SEikControlInfo CCmDestinationIconDialog::CreateCustomControlL(
-    TInt aControlType)
-    {
-    CCmDestinationIconMap *control= NULL;
-    if ( aControlType == KCmDestIconMapType )
-        {
-        control = CCmDestinationIconMap::NewL();
-        }
-    SEikControlInfo info;
-    info.iControl = control;
-    info.iFlags = 0;
-    info.iTrailerTextId = 0;
-    return info;
-    }
-
-#ifdef RD_SCALABLE_UI_V2
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::HandleControlEventL
-// Handles the event.
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::HandleControlEventL( 
-                                                CCoeControl* /*aControl*/,
-                                                TCoeEvent aEventType )
-    {
-    if( aEventType == EEventStateChanged)
-		{
-	    iConSelected = ETrue;
-		}
-    } 
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconDialog::HandleDialogPageEventL
-// Handles the event.
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconDialog::HandleDialogPageEventL(TInt aEventID)
-	{
-    if ( AknLayoutUtils::PenEnabled() && ( aEventID == 
-         MEikDialogPageObserver::EDialogPageTapped && iConSelected ) )
-	    {
-	    TryExitL( EAknSoftkeyOk );
-	    }
-	}
-	
-#endif //RD_SCALABLE_UI_V2
-
-//  End of File
--- a/cmmanager/cmmgr/Framework/Src/cmdesticonmap.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2004 +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:  Implementation of CCmDestinationIconMap
-*
-*/
-
-#include <eikenv.h>
-#include <eiksbfrm.h>
-#include <eikscrlb.h>
-#include <bidivisual.h>
-#include <avkon.rsg>
-#include <AknPanic.h>
-#include <avkon.hrh>
-#include <AknUtils.h>
-#include <aknlayoutscalable_avkon.cdl.h>
-#include <layoutmetadata.cdl.h>
-#include <AknLayout.lag>
-#include <data_caging_path_literals.hrh>
-#include <aknappui.h>
-#include <aknconsts.h>
-#include <AknDef.h>
-#include <PUAcodes.hrh>
-#include <s32file.h>
-#include <eikscrlb.h>   // TEikScrollBarModelType
-#include <AknsDrawUtils.h>
-#include <featmgr.h>
-#include <AknsFrameBackgroundControlContext.h>
-#include <cmmanager.mbg>
-#include <cmcommonconstants.h>
-#include <touchfeedback.h>
-#include "cmdesticonmap.h"
-#include "cmmanagerimpl.h"
-
-// The offset because of CEikDialogPage
-const TInt KHorizontalDialogMargin = 0;
-const TInt KVerticalDialogMargin = 0;
-const TInt KAknSctCBaButtonDirections = 3; // bottom, right and left
-
-/**
- * Extension class to CCmDestinationIconMap
- *
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( CCmDestinationIconMapExtension ) : public CBase, 
-                                                      public MObjectProvider
-    {
-    public:
-    
-        CCmDestinationIconMapExtension();
-        ~CCmDestinationIconMapExtension();
-    
-    protected:
-    
-        TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
-        MObjectProvider* MopNext();
-    
-    public: // data
-        
-        MCoeControlObserver *iObserver;
-        
-        TUint iFlags;
-        MObjectProvider* iIconMap;       
-        TInt iMaxVisibleRows;
-        CAknsFrameBackgroundControlContext* iBgContext;
-    };
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMapExtension::CCmDestinationIconMapExtension
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMapExtension::CCmDestinationIconMapExtension()
-    : iMaxVisibleRows( 0 )
-    {
-    iObserver = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMapExtension::MopSupplyObject()
-// -----------------------------------------------------------------------------
-//
-TTypeUid::Ptr CCmDestinationIconMapExtension::MopSupplyObject( TTypeUid aId )
-    {
-    return MAknsControlContext::SupplyMopObject( aId, iBgContext );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMapExtension::MopNext()
-// -----------------------------------------------------------------------------
-//    
-MObjectProvider* CCmDestinationIconMapExtension::MopNext()
-    {
-    return iIconMap;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMapExtension::~CCmDestinationIconMapExtension()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMapExtension::~CCmDestinationIconMapExtension()
-    {
-    delete iBgContext;
-    iBgContext = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CCmDestinationIconMap
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMap::CCmDestinationIconMap() 
-    : iCursorPos( TPoint( 0,0 ) )
-    , iOldCursorPos( TPoint( 0,0 ) )
-    , iMaxColumns( -1 )
-    , iDragAlreadyActive( EFalse )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMap* CCmDestinationIconMap::NewL()
-    {
-    CCmDestinationIconMap* self = new( ELeave ) CCmDestinationIconMap();
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self ); //self
-    return self;    
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::ConstructL()
-    {
-    // Must be created here to get the member variables available
-    iExtension = new ( ELeave ) CCmDestinationIconMapExtension;
-    iExtension->iIconMap = this;
-        
-    iConsArray = new( ELeave ) CAknIconArray( KNumOfIcons );
-    
-    iExtension->iFlags = 0x00;
-        
-    DoLayout();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::~CCmDestinationIconMap()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMap::~CCmDestinationIconMap()
-    {
-    delete iSBFrame; iSBFrame = NULL;
-    
-    delete iOffscreenBg;
-    delete iBitmapDevice;
-    delete iBitmapGc;
-
-    delete iExtension; 
-    iExtension = ( CCmDestinationIconMapExtension* )NULL;
-    
-    if ( iConsArray )
-        {
-        iConsArray->ResetAndDestroy();
-        delete iConsArray;
-        iConsArray = NULL;
-        }
-   }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::DoLayout()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::DoLayout() 
-    {
-    TRAPD( err,LoadIconL() );
-    if ( err )
-        {
-        return;
-        }
-    
-    iIsMirrored = AknLayoutUtils::LayoutMirrored();
-    iDrawnBefore = EFalse;
-    CountMaxColumnsAndCellSizes();
-    SizeChanged();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::ConstructFromResourceL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::ConstructFromResourceL( 
-                                                TResourceReader& /*aReader*/ )
-    {
-    LoadIconL();
-    CreateScrollBarAndIconRowL();
-
-    iExtension->iBgContext = CAknsFrameBackgroundControlContext::NewL( 
-                                                            KAknsIIDQsnFrPopup, 
-                                                            TRect( 0, 0, 1, 1 ), 
-                                                            TRect( 0, 0, 1, 1 ), 
-                                                            EFalse );
-
-    if ( DrawableWindow() && AknLayoutUtils::PenEnabled() )
-        {
-        EnableDragEvents();       
-        SetGloballyCapturing( ETrue );
-        SetPointerCapture( ETrue );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::LoadIcons()
-// This actually load the all icons to be shown on dialog from icon file
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::LoadIconL()
-    { 
-    iConsArray->ResetAndDestroy();
-    // Draw all the Icons.
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                                     &KDC_APP_BITMAP_DIR, NULL ) );
-        
-    // Create icon bitmap and mask.
-    for ( TInt i( 0 ); i < ( KNumOfIcons * 2 ); i++ )
-        {
-        CFbsBitmap* bitmap = NULL;
-        CFbsBitmap* bitmapMask = NULL;
-        AknIconUtils::CreateIconLC( 
-                   bitmap, 
-                   bitmapMask, mbmFile.FullName(),
-                   EMbmCmmanagerQgn_prop_set_conn_dest_internet_small + i, 
-                   EMbmCmmanagerQgn_prop_set_conn_dest_internet_small + i + 1 );
-        i++;
-        AknIconUtils::SetSize( bitmap, 
-                               TSize( iGridItemWidth, iGridItemHeight ) );
-        AknIconUtils::SetSize( bitmapMask, 
-                               TSize( iGridItemWidth, iGridItemHeight ) );
-        CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
-        CleanupStack::PushL( icon );
-        iConsArray->AppendL( icon );       
-        CleanupStack::Pop( 3, bitmap );
-        }        
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::HeightInRows()
-// This actually returns the no of rows to be shown on a page
-// Depends upon the Layout size
-// -----------------------------------------------------------------------------
-//
-TInt CCmDestinationIconMap::HeightInRows()
-    {
-    return ( iRows );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CreateScrollBarAndIconRowL()
-// This actually creates the scroll bar sets the number of 
-// pages and rows on a page to be shown
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::CreateScrollBarAndIconRowL()
-    {
-    iRows = ( ( iConsArray->Count() - 1 ) / iMaxColumns ) + 1 ;
-    iFirstVisibleRow = 0;
-    iAnimated = EFalse;
-    iCursorPos = TPoint( 0, 0 );
-    
-    // Create and set the scb visible even though there is nothing to scroll   
-    delete iSBFrame; iSBFrame=NULL;
-
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        iSBFrame=new( ELeave ) CEikScrollBarFrame( this, this, ETrue ); 
-        }
-    else
-        {
-        iSBFrame=new( ELeave ) CEikScrollBarFrame( this, NULL, ETrue );
-        }
-    // Decide which type of scrollbar is shown
-    CAknAppUi* appUi = iAvkonAppUi;
-    if ( AknLayoutUtils::DefaultScrollBarType( appUi ) == 
-         CEikScrollBarFrame::EDoubleSpan )
-        {
-        // For EDoubleSpan type scrollbar
-        if ( AknLayoutUtils::PenEnabled() )
-            {
-            // window owning scrollbar
-            iSBFrame->CreateDoubleSpanScrollBarsL( ETrue, 
-                                                   EFalse, 
-                                                   ETrue, 
-                                                   EFalse );
-            }
-        else
-            {
-            // non-window owning scrollbar
-            iSBFrame->CreateDoubleSpanScrollBarsL( EFalse, 
-                                                   EFalse, 
-                                                   ETrue, 
-                                                   EFalse ); 
-            }
-        iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EDoubleSpan );
-        }
-    else
-        {
-        // For EArrowHead type scrollbar
-        iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EArrowHead );
-        }
-    
-    iSBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
-                                       CEikScrollBarFrame::EAuto );
-    iSBFrame->VerticalScrollBar()->SetMopParent( iExtension );
-    UpdateScrollIndicatorL();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::SetIndex
-// set the reference of the selected icon index from the table
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationIconMap::SetIndex( TInt& aIconIndex )
-    {
-    iIconIndex = &aIconIndex;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::MinimumSize
-// 
-// -----------------------------------------------------------------------------
-//
-TSize CCmDestinationIconMap::MinimumSize()
-    {    
-    iIsMirrored = AknLayoutUtils::LayoutMirrored();
-    CountMaxColumnsAndCellSizes();
-
-    TRect rect;
-    // Used the set rect, but resolution changes cannot be handled when it is used
-              
-    TAknLayoutRect dialogLayRect;
-        
-    // Main pane without softkeys
-    TRect mainPaneRect;
-    if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect ) )
-        {
-        mainPaneRect = iAvkonAppUi->ClientRect();
-        }
-    
-    // Dialog layout, check variety first
-    TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-               AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-    
-    // Calc the variety
-    TInt maxVariety = iconMapDialogVariety.LastVariety();
-    
-    // Check the CBA, if the orientation is not landscape 
-    // there is not so much varieties
-    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
-    // the offset for the certain cba location variety
-    TInt maxVarietyOffset = 0; 
-    // the number of varieties
-    TInt varietyOffset = maxVariety + 1;
-    
-    // landscape variety number must be calculated offset == number of varieties
-    // same applies to the variety number for the biggest sized layout for the 
-    // variety
-    if ( Layout_Meta_Data::IsLandscapeOrientation() )
-       {
-       // the offset for one variety
-       varietyOffset = ( maxVariety + 1 ) / KAknSctCBaButtonDirections;
-       }
-    
-    // for right and left cba buttons the max variety is not zero
-    // the varities are ordered by the location of the cba and the descending order
-    // e.g the biggest sized layout first, the smallest last
-    if ( location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       maxVarietyOffset = varietyOffset;
-       }
-    else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-       {
-       maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-       }
-    
-    TInt varietyNumber = varietyOffset - iRows - 1; 
-    
-    // if more lines than possible to show, use the default 
-    // ( the biggest grid ) variety
-    if ( varietyNumber < 0 )
-        {
-        varietyNumber = 0;
-        }
-    // if zero rows, use the minimum
-    else if ( iRows<=0 )
-        {
-        varietyNumber -= 1;
-        }
-    
-    //add the varietyoffset
-    varietyNumber += maxVarietyOffset;
-
-    if ( Layout_Meta_Data::IsLandscapeOrientation() && 
-        location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       varietyNumber = 10;
-       }
-    else
-        {
-        if( iRows == 0 )
-            {
-            varietyNumber = 5;
-            }
-        else
-            {
-            varietyNumber = 3;
-            }
-        }       
-    // Layout the dialog size
-    dialogLayRect.LayoutRect( mainPaneRect, 
-       AknLayoutScalable_Avkon::popup_grid_graphic_window( varietyNumber ) );
-       
-    // Layout the grid
-    TAknLayoutRect gridWithScrollLayRect;
-    gridWithScrollLayRect.LayoutRect( dialogLayRect.Rect(), 
-       AknLayoutScalable_Avkon::listscroll_popup_graphic_pane() );
-    
-    return TSize( dialogLayRect.Rect().Width(), 
-        gridWithScrollLayRect.Rect().Height() );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::ActivateL()
-// This method is needed to set correct initial value to scroll indicator.
-// -----------------------------------------------------------------------------
-//
- void CCmDestinationIconMap::ActivateL()
-    {
-    CCoeControl::ActivateL();
-    if ( iRows > iExtension->iMaxVisibleRows )
-        {
-        UpdateScrollIndicatorL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::OfferKeyEventL
-// Handles all the Keypad events
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CCmDestinationIconMap::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                    TEventCode /*aModifiers*/ )
-    {
-    TUint code=aKeyEvent.iCode;
-    
-    switch ( code )
-        {
-        case EKeyLeftArrow:
-        case '4':
-            MoveCursorL( -1,0 );
-            break;
-        case EKeyRightArrow:
-        case '6':
-            MoveCursorL( 1,0 );
-            break;
-        case EKeyUpArrow:
-        case '2':
-            MoveCursorL( 0,-1 );
-            break;
-        case EKeyDownArrow:
-        case '8':
-            MoveCursorL( 0,1 );
-            break;
-        case EKeyOK:
-        case '5':  
-        case EKeySpace:
-            {
-            if ( iConsArray )
-                {
-                TInt ret = iMaxColumns * 
-                           ( iFirstVisibleRow + iCursorPos.iY ) + 
-                           iCursorPos.iX;
-                if ( ret <= iConsArray->Count() )
-                    {
-                    *iIconIndex = ret;    
-                    }
-                else
-                    {
-                    *iIconIndex = -1;
-                    }
-                }
-               
-            }
-            break;
-        default:
-            return EKeyWasNotConsumed;
-
-        }
-    return EKeyWasConsumed;
-    }
-
-#ifdef RD_SCALABLE_UI_V2 
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::HandlePointerEventL
-// Handles all the Keypad events
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::HandlePointerEventL(
-                                const TPointerEvent& aPointerEvent )
-    {
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        TInt xInPixels = aPointerEvent.iPosition.iX - iGridTopLeft.iX;
-        TInt yInPixels = aPointerEvent.iPosition.iY - iGridTopLeft.iY;
-        TInt newGridX = xInPixels / iGridItemWidth;
-        TInt newGridY = yInPixels / iGridItemHeight;
-        TInt globalY = newGridY + iFirstVisibleRow;
-
-        // The pointer has been set down or dragged into the area of the grid. 
-        // Also, it may NOT be in the "empty slots" at the end of the grid.
-        if ( xInPixels >= 0 &&
-                yInPixels >= 0 && 
-                newGridX < iMaxColumns &&
-                yInPixels < iGridItemHeight * iExtension->iMaxVisibleRows &&
-                globalY * iMaxColumns + newGridX + 1 <= iConsArray->Count() )
-            {
-            // For any action to be taken, the pointer event must either be a
-            // Button1Down or a drag event which has originated from a
-            // Button1Down in to the grid.
-            if ( aPointerEvent.iType == TPointerEvent::EButton1Down ||
-                 aPointerEvent.iType == TPointerEvent::EDrag )
-                {
-                if ( aPointerEvent.iType == TPointerEvent::EDrag ) 
-                    {
-                    iDragAlreadyActive = ETrue;
-                    }
-
-                // The user tapps a cell which has no icon. it is ignored.
-                if ( iConsArray->Count() > globalY * iMaxColumns + newGridX )
-                    {
-              	    // If icon is already selected then on single tap it
-              	    // should select the icon.
-                    if( iCursorPos.iY == newGridY && 
-                        iCursorPos.iX == newGridX &&
-                        aPointerEvent.iType != TPointerEvent::EDrag )
-                        {
-                        if ( iExtension->iObserver )
-                            {
-                            iExtension->iObserver->HandleControlEventL( 
-                                  this, 
-                                  MCoeControlObserver::EEventStateChanged );
-                            } 
-                        }
-                    else if ( iCursorPos.iX + ( iCursorPos.iY + 
-                              iFirstVisibleRow ) * iMaxColumns  < 
-                              iConsArray->Count() )
-                        {
-                        iOldCursorPos = iCursorPos;
-                        iCursorPos.iY = newGridY;
-                        iCursorPos.iX = newGridX;
-                        DrawCursor();
-                        }
-                    else
-                        {
-                        iOldCursorPos.iX = 0;
-                        iOldCursorPos.iY = 0;
-                        }
-				    }
-                }
-            else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
-                {
-                // The pointer has been set and dragged into the area of 
-                // the grid.
-                if ( yInPixels >= 0 && yInPixels < iGridItemHeight * 
-                     iExtension->iMaxVisibleRows && 
-                     iDragAlreadyActive && 
-                     iOldCursorPos == iCursorPos &&
-                     (iConsArray->Count() > (globalY * iMaxColumns + newGridX)))
-                    {
-                    if ( iExtension->iObserver )
-                        {
-                        iExtension->iObserver->HandleControlEventL( 
-                                this, 
-                                MCoeControlObserver::EEventStateChanged );
-                        }
-                	iDragAlreadyActive = EFalse;    
-                    }
-                }
-
-            MTouchFeedback* feedback = MTouchFeedback::Instance();
-        
-            if ( feedback )
-                {
-                if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
-                    {
-                    feedback->InstantFeedback( this, ETouchFeedbackBasic );
-                    }
-                else if ( aPointerEvent.iType == TPointerEvent::EDrag && iCursorPos != iOldCursorPos )
-                    {
-                    feedback->InstantFeedback( this, ETouchFeedbackSensitive );	
-                    }
-                }
-            }
-        else // For a non window owning scrollbar.
-            {
-            if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
-                {
-                iDragAlreadyActive = EFalse;
-                }
-            }
-        
-        CCoeControl::HandlePointerEventL( aPointerEvent );
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::SetObserver
-// Sets the observer.
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::SetObserver( MCoeControlObserver* aObserver  )
-    {
-    if ( iExtension )
-        {
-        iExtension->iObserver = aObserver;
-        }
-    }
-
-#endif //RD_SCALABLE_UI_V2    
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::InputCapabilities()
-//
-// -----------------------------------------------------------------------------
-//
-TCoeInputCapabilities CCmDestinationIconMap::InputCapabilities() const
-    {
-    return TCoeInputCapabilities( TCoeInputCapabilities::EAllText );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::SizeChanged()
-// Control position of this control is registered for skin library when 
-// necessary in CEikDialogPage::SetDataPosition, so we do not do that in this 
-// method.
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::SizeChanged()
-    {
-    // Get the layout
-    
-    // Main pane without softkeys
-    TRect mainPaneRect;
-   
-    if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                             mainPaneRect ) )
-       {
-       mainPaneRect = iAvkonAppUi->ClientRect();
-       }
-    
-    // Dialog layout, check variety first
-    TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-               AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-    
-    TInt maxVariety = iconMapDialogVariety.LastVariety();
-    
-    // Check the CBA, if the orientation is not landscape 
-    // there is not so much varieties
-    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
-    // the offset for the certain cba location variety
-    TInt maxVarietyOffset = 0;
-    TInt varietyOffset = maxVariety + 1;
-    
-    // landscape variety number must be calculated offset == number of varieties
-    // same applies to the variety number for the biggest sized layout for the 
-    // variety
-    if ( Layout_Meta_Data::IsLandscapeOrientation() )
-       {
-       // the offset for one variety
-       varietyOffset = ( maxVariety + 1 ) / KAknSctCBaButtonDirections;
-       }
-    
-    // for right and left cba buttons the max variety is not zero
-    // the varities are ordered by the location of the cba and the descending 
-    // order e.g the biggest sized layout first, the smallest last
-    if ( location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       maxVarietyOffset = varietyOffset;
-       }
-    else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-       {
-       maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-       }
-    
-    TInt varietyNumber = varietyOffset - iRows - 1; 
-    
-    // if more lines than possible to show, use the default 
-    // ( the biggest grid ) variety
-    if ( varietyNumber < 0 )
-        {
-        varietyNumber = 0;
-        }
-    // if zero rows, use the minimum
-    else if ( iRows<=0 )
-        {
-        varietyNumber -= 1;
-        }
-
-    //add the varietyoffset
-    varietyNumber += maxVarietyOffset;
-    
-    if ( Layout_Meta_Data::IsLandscapeOrientation() && 
-         location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       varietyNumber = 10;
-       }
-    else
-        {
-        if ( iRows == 0 )
-            {
-            varietyNumber = 5;
-            }
-        else
-            {
-            varietyNumber = 3;
-            }
-        }
-
-    TAknLayoutRect popupGridLayRect;
-    popupGridLayRect.LayoutRect( mainPaneRect, 
-          AknLayoutScalable_Avkon::popup_grid_graphic_window( varietyNumber ) );
-    
-    // Calculate the size relatively
-    TRect relativeDialog( TPoint( 0,0 ),popupGridLayRect.Rect().Size() );
-    
-    // Get the layout of the actual icon grid with scrollbar
-    TAknLayoutRect gridWithScrollLayRect;
-    gridWithScrollLayRect.LayoutRect( relativeDialog, 
-       AknLayoutScalable_Avkon::listscroll_popup_graphic_pane() );
-            
-    // Then the grid area without scrollbar
-    // NOTE: The grid with scroll bar is used as reference
-    TAknLayoutRect gridLayRect;
-    gridLayRect.LayoutRect( gridWithScrollLayRect.Rect(), 
-       AknLayoutScalable_Avkon::grid_graphic_popup_pane( 0 ) );
-
-    // Different parent if SCT inside editing menu.
-    TRect contentRect = gridLayRect.Rect();
-
-    // The x coordinate is 3 pixels to right and y coordinate 3 pixels up 
-    // so substract from x coordinate and add to y coordinate
-    if ( iIsMirrored ) 
-        {
-        iOffset = TPoint( 
-            contentRect.iBr.iX - KHorizontalDialogMargin - iGridItemWidth + 1,  
-            contentRect.iTl.iY - KVerticalDialogMargin + 1 );
-        
-        iGridTopLeft.iX = contentRect.iBr.iX - 
-                          KHorizontalDialogMargin - 
-                          ( iMaxColumns * iGridItemWidth );
-        iGridTopLeft.iY = contentRect.iTl.iY - KVerticalDialogMargin;
-        }
-    else  // not mirrored
-        {
-        iOffset = TPoint( contentRect.iTl.iX - KHorizontalDialogMargin + 1, 
-                         contentRect.iTl.iY - KVerticalDialogMargin + 1 );
-        iGridTopLeft.iX = contentRect.iTl.iX - KHorizontalDialogMargin;
-        iGridTopLeft.iY = contentRect.iTl.iY - KVerticalDialogMargin;
-        }
-    
-       
-    // The last, update background context
-    if ( iExtension->iBgContext )
-       {            
-        TInt bgVariety = 0;
-        if ( Layout_Meta_Data::IsLandscapeOrientation() )
-            {
-            bgVariety = 1;
-            }
-            
-        TAknLayoutRect innerRect;
-        innerRect.LayoutRect( 
-                relativeDialog, 
-                AknLayoutScalable_Avkon::bg_popup_window_pane_g1( bgVariety ) );
-
-       iExtension->iBgContext->SetFrameRects( relativeDialog, 
-                                              innerRect.Rect() );
-       }
-    
-    TRAPD( err,UpdateScrollIndicatorL() );
-    if ( err )
-        {
-        return;
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::HandleResourceChange()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::HandleResourceChange( TInt aType )
-    {
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        // save the old info for the magnitudes of the SCT grid
-        TInt oldMaxColumns = iMaxColumns;
-
-        // calculate the new magnitudes
-        DoLayout();
-        
-        // then calculate the index position of the cursor in the icon table
-        // and update the x and y positions for the new grid with it
-        
-        TInt oldCursorPosition = ( iFirstVisibleRow + iOldCursorPos.iY ) * 
-                                 oldMaxColumns +
-                                 iOldCursorPos.iX;
-        
-        TInt currentCursorPosition = ( iFirstVisibleRow + iCursorPos.iY ) * 
-                                     oldMaxColumns +
-                                     iCursorPos.iX;
-        
-        // the new first row is the top row on the page where the new focus is
-        iFirstVisibleRow = iExtension->iMaxVisibleRows * 
-                           ( currentCursorPosition / 
-                           ( iMaxColumns * iExtension->iMaxVisibleRows ) );
-        
-        // the cursor positions are relative to current page
-        iCursorPos.iY = ( currentCursorPosition - 
-                        ( iMaxColumns * iFirstVisibleRow ) ) / 
-                        iMaxColumns;
-        iCursorPos.iX = currentCursorPosition - 
-                        ( iMaxColumns * iFirstVisibleRow ) - 
-                        ( iMaxColumns * iCursorPos.iY );
-           
-        iOldCursorPos.iY = ( oldCursorPosition - 
-                           ( iMaxColumns * iFirstVisibleRow ) ) / 
-                           iMaxColumns;
-        iOldCursorPos.iX = oldCursorPosition - 
-                           ( iMaxColumns * iFirstVisibleRow ) - 
-                           ( iMaxColumns * iOldCursorPos.iY );
-        }
-
-    if ( aType == KAknsMessageSkinChange )
-        {
-        iOffscreenBgDrawn = EFalse;
-        }
-        
-    CCoeControl::HandleResourceChange( aType );   
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::Draw()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::Draw( const TRect& /*aRect*/ ) const
-    {    
-    TInt cursorPos = 0;
-    CWindowGc& gc=SystemGc();
-    
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
-    
-    TRect rect = Rect();
-    
-    // Main pane without softkeys
-    TRect mainPaneRect;
-    if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                             mainPaneRect ) )
-       {
-       mainPaneRect = iAvkonAppUi->ClientRect();
-       }
-    
-    // Dialog layout, check variety first
-    TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-       AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-       
-    // The variety starts from 0 so add +1
-    TInt maxVariety = iconMapDialogVariety.LastVariety();
-    
-    // Check the CBA, if the orientation is not landscape 
-    // there is not so much varieties
-    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
-    // the offset for the certain cba location variety
-    TInt maxVarietyOffset = 0;
-    TInt varietyOffset = maxVariety + 1;
-    
-    // landscape variety number must be calculated offset == number of varieties
-    // same applies to the variety number for the biggest sized layout for the 
-    // variety
-    if ( Layout_Meta_Data::IsLandscapeOrientation() )
-       {
-       // the offset for one variety
-       varietyOffset = ( maxVariety + 1 )/KAknSctCBaButtonDirections;
-       }
-    
-    // for right and left cba buttons the max variety is not zero
-    // the varities are ordered by the location of the cba and the descending 
-    // order e.g the biggest sized layout first, the smallest last
-    if ( location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       maxVarietyOffset = varietyOffset;
-       }
-    else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-       {
-       maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-       }
-    
-    TInt varietyNumber = varietyOffset - iRows - 1; 
-    
-    // if more lines than possible to show, use the default 
-    // ( the biggest grid ) variety
-    if ( varietyNumber < 0 )
-        {
-        varietyNumber = 0;
-        }
-    // if zero rows, use the minimum
-    else if ( iRows<=0 )
-        {
-        varietyNumber -= 1;
-        }
-    
-    //add the varietyoffset
-    varietyNumber += maxVarietyOffset;
-
-    if ( Layout_Meta_Data::IsLandscapeOrientation() && 
-         location == AknLayoutUtils::EAknCbaLocationRight )
-        {
-        varietyNumber = 10;
-        }
-    else
-        {
-        varietyNumber = 3;
-        }    
-    // Layout the dialog size
-    TAknLayoutRect dialogLayRect;
-    dialogLayRect.LayoutRect( 
-           mainPaneRect, 
-          AknLayoutScalable_Avkon::popup_grid_graphic_window( varietyNumber ) );
-    
-    // Get the missing height for the background
-    TInt backgroundHeightOffset = dialogLayRect.Rect().Height() - rect.iBr.iY;
-    
-    rect.iBr.iY += backgroundHeightOffset;
-
-    // Check if we got an offscreen bitmap allocated for skin background and
-    // there is bitmap background in the current skin.
-    if ( iOffscreenBg && iHasBitmapBackground )
-        {
-        DrawOffscreenBackgroundIfRequired();
-        gc.BitBlt( rect.iTl, iOffscreenBg );
-        }
-    else
-        {
-        AknsDrawUtils::Background( skin, cc, this, gc, rect );
-        }
-
-    TInt numberOfIconsToBeDrawn = iConsArray->Count();
-    numberOfIconsToBeDrawn -= ( iFirstVisibleRow * iMaxColumns );
-    if ( numberOfIconsToBeDrawn > 0 )
-        {
-        if ( numberOfIconsToBeDrawn > 
-            ( iExtension->iMaxVisibleRows * iMaxColumns ) )
-            {
-            numberOfIconsToBeDrawn = iExtension->iMaxVisibleRows * iMaxColumns;
-            }
-
-        gc.SetPenStyle( CGraphicsContext::ESolidPen );    
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
-        gc.SetPenSize( TSize( 1,1 ) );
-
-        // 2 ) Draw the grid
-        const TSize gridItemRectSize( iGridItemWidth + 1, iGridItemHeight + 1 );
-             
-        TInt numberOfGridCellsToBeDrawn = numberOfIconsToBeDrawn;
-
-        TRgb colorLine = AKN_LAF_COLOR( 219 );
-        AknsUtils::GetCachedColor( skin, 
-                                   colorLine, 
-                                   KAknsIIDQsnLineColors, 
-                                   EAknsCIQsnLineColorsCG5 );
-        TRgb colorRecentLine = AKN_LAF_COLOR( 215 );
-        AknsUtils::GetCachedColor( skin, 
-                                   colorRecentLine, 
-                                   KAknsIIDQsnLineColors, 
-                                   EAknsCIQsnLineColorsCG7 );
-
-        // default pen color
-        gc.SetPenColor( colorLine );
-        
-        TInt fullRows = numberOfGridCellsToBeDrawn / iMaxColumns;
-
-        // how many left after the full rows
-        numberOfGridCellsToBeDrawn -= fullRows * iMaxColumns;
-
-        TPoint pos = iGridTopLeft;
-
-        TInt endX = pos.iX + iGridItemWidth * iMaxColumns;
-        TInt endY = pos.iY + iGridItemHeight * fullRows;
-
-        TInt ii = 0;
-
-        if ( fullRows )
-            {
-            // Draw full vertical lines
-            for ( ii = 0 ; ii <= iMaxColumns ; ii++ )
-                {
-                gc.SetPenColor( colorLine );
-                gc.SetPenSize( TSize( 1,1 ) );
-                gc.DrawLine( pos, TPoint( pos.iX, endY ) );
-                pos.iX += iGridItemWidth;
-                }
-
-            pos = iGridTopLeft;
-
-            // Draw full horizontal lines
-            for ( ii = 0 ; ii <= fullRows ; ii++ )
-                {
-                gc.SetPenSize( TSize( 1,1 ) );    
-                gc.SetPenColor( colorLine );
-                gc.DrawLine( pos, TPoint( endX, pos.iY ) );
-                pos.iY += iGridItemHeight;
-                }
-            gc.SetPenColor( colorLine );
-            gc.SetPenSize( TSize( 1,1 ) );    
-            }
-
-        if ( numberOfGridCellsToBeDrawn )
-            {
-            // Remaining cells in the last, non-full row
-            pos = iOffset;
-            // iOffset is cell area topLeft, grid is not included in it
-            pos.iX--;
-            pos.iY--;
-
-            pos.iY += iGridItemHeight * fullRows;
-
-            for ( ii = 0 ; ii < numberOfGridCellsToBeDrawn ; ii++ )
-                {
-                gc.DrawRect( TRect( pos, gridItemRectSize ) );
-
-                if ( iIsMirrored ) 
-                    pos.iX -= iGridItemWidth;
-                else // not mirrored
-                    pos.iX += iGridItemWidth; 
-                }
-            }
-        
-        TInt iconIndex = iFirstVisibleRow * iMaxColumns;
-        TInt lCnt = iConsArray->Count(); 
-        cursorPos = iCursorPos.iX + iCursorPos.iY * iMaxColumns;
-        if ( lCnt > 0 )
-            {
-            TRect cellRect( TPoint( 0,0 ), 
-                            TSize( iGridItemWidth - 1, iGridItemHeight - 1 ) );
-            for ( TInt j = iconIndex, i = 0; 
-                  j < lCnt && i < numberOfIconsToBeDrawn;
-                  j++, i++ )
-                {
-                DrawItem( gc, i, j, cursorPos == i, EFalse );        
-                }     
-            }
-            
-        }
-    iDrawnBefore = ETrue;
-    gc.DiscardFont();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::DrawItem()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::DrawItem( 
-    CWindowGc& aGc,
-    TInt index,
-    TInt aIconIndex,
-    TBool aHighlighted,
-    TBool aDrawBackground ) const
-    {
-    TRect sctPosition = CursorRect( index );
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
-    
-    TBool skins = AknsDrawUtils::Background( skin,cc,aGc, sctPosition );    
-    TRgb color;
-    if ( !skins )
-        {
-        aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        }
-    
-    if ( aHighlighted )
-        {
-        TRgb colorHightLightRect = AKN_LAF_COLOR( 215 );
-        AknsUtils::GetCachedColor( skin, 
-                                   colorHightLightRect, 
-                                   KAknsIIDQsnLineColors, 
-                                   EAknsCIQsnLineColorsCG7 );
-        aGc.SetPenColor( colorHightLightRect );
-        aGc.DrawRect( sctPosition );
-
-        // Shrink by one pixel in all directions.
-        TRect innerRect = sctPosition;
-        innerRect.Shrink( 1,1 );
-
-        color = AKN_LAF_COLOR( 210 );
-        AknsUtils::GetCachedColor( skin, 
-                                   color, 
-                                   KAknsIIDQsnHighlightColors, 
-                                   EAknsCIQsnHighlightColorsCG1 ); 
-        aGc.SetBrushColor( color );       
-        aGc.Clear( innerRect );
-        }
-    else if ( aDrawBackground )
-        {
-        TRect innerRect = sctPosition;
-        aGc.SetBrushColor( AKN_LAF_COLOR( 0 ) );
-        if ( !skins )
-            {
-            aGc.Clear( innerRect );
-            }
-        else 
-            {
-            AknsDrawUtils::Background( skin, cc, this, aGc, innerRect );
-            }
-        }
-    
-    if ( iConsArray )
-        {
-        TInt lCnt =  iConsArray->Count(); 
-        if ( lCnt > 0 && aIconIndex < lCnt && aIconIndex >= 0 )
-            {
-            TRect cellRect( TPoint( 0,0 ), 
-                            TSize( iGridItemWidth - 1, iGridItemHeight - 1 ) );
-
-            CGulIcon* bitmap = NULL;
-            bitmap = iConsArray->At( aIconIndex );
-
-            aGc.BitBltMasked( CursorPoint( index ),
-                            bitmap->Bitmap(),
-                            cellRect,
-                            bitmap->Mask(),
-                            EFalse );
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::DrawCursor()
-// Optimizes drawing. Only cursor is drawn.
-// -----------------------------------------------------------------------------
-void CCmDestinationIconMap::DrawCursor() const
-    {
-    // Whole Icon Map has to be drawn at least once. 
-    // If the user presses arrow key before Icon Map has been drawn,
-    // only cursor position is drawn without this check.
-    if ( !iDrawnBefore )
-        {
-        DrawNow();
-        }
-    // Only redraw old and new cursor position cells
-    ActivateGc();
-    CWindowGc& gc = SystemGc();
-
-    TInt cursorPos = iOldCursorPos.iX + iOldCursorPos.iY * iMaxColumns;   
-    DrawCell( cursorPos, EFalse );
-
-    cursorPos = iCursorPos.iX + iCursorPos.iY * iMaxColumns;
-    DrawCell( cursorPos, ETrue );
-
-    gc.DiscardFont();
-    DeactivateGc();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::DrawCell
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::DrawCell( 
-    TInt aCursorPos,
-    TBool aHighlighted ) const
-    {
-    // calculate icon index
-    TInt iconIndex = aCursorPos + iFirstVisibleRow * iMaxColumns;
-
-    // If we are only redrawing for animations, no need to draw non-animated
-    // items.
-    TRect rect = CursorRect( aCursorPos );
-
-    Window().Invalidate( rect );
-    Window().BeginRedraw( rect );
-    DrawItem( SystemGc(), aCursorPos, iconIndex, aHighlighted, ETrue );
-    Window().EndRedraw();
-    SystemGc().DiscardFont();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CursorRect
-// -----------------------------------------------------------------------------
-//
-TRect CCmDestinationIconMap::CursorRect( TInt aCursorPos ) const
-    {
-    TPoint pos = iOffset;
-
-    if ( iIsMirrored )
-        {
-        pos.iX -= ( aCursorPos % iMaxColumns ) * iGridItemWidth;
-        }
-    else // Not mirrored
-        {
-        pos.iX += ( aCursorPos % iMaxColumns ) * iGridItemWidth;
-        }
-
-    pos.iY += ( aCursorPos / iMaxColumns ) * iGridItemHeight; 
-    return TRect( pos, TSize( iGridItemWidth - 1, iGridItemHeight - 1 ) );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CursorPoint
-// -----------------------------------------------------------------------------
-//
-TPoint CCmDestinationIconMap::CursorPoint( TInt aCursorPos ) const
-    {
-    TPoint pos = iOffset;
-
-    if ( iIsMirrored )
-        {
-        pos.iX -= ( aCursorPos % iMaxColumns ) * iGridItemWidth;
-        }
-    else // Not mirrored
-        {
-        pos.iX += ( aCursorPos % iMaxColumns ) * iGridItemWidth;
-        }
-
-    pos.iY += ( aCursorPos / iMaxColumns ) * iGridItemHeight; 
-    return pos;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::MoveCursorL
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::MoveCursorL( TInt aDeltaX, TInt aDeltaY )
-    {           
-    if ( iIsMirrored )
-        {
-        aDeltaX = -aDeltaX;
-        }
-    
-    if ( ( iConsArray->Count() < 8 ) )
-        {
-        return;
-        }
-
-    iOldCursorPos = iCursorPos;
-    TInt oldFirstVisibleRow = iFirstVisibleRow;
-
-    TInt globalYPos = iCursorPos.iY + iFirstVisibleRow;
-    TInt lastColumnOnLastRow = ( ( iConsArray->Count() - 1 ) % iMaxColumns );
-
-    TInt skipicon = aDeltaX != 0 ? 1: 0;
-
-    if ( aDeltaX < 0 )
-        {
-        // Cursor was moved to left.
-        if ( iCursorPos.iX > skipicon - 1 )
-            {
-            iCursorPos.iX -= skipicon;
-            }
-        else
-            {
-            if ( skipicon > iMaxColumns )
-                {
-                globalYPos--;
-                iCursorPos.iX = iMaxColumns;
-                }
-            // Go to previous line
-            globalYPos--;
-            if ( globalYPos < 0 )
-                {
-                // Cursor was on the first line - go to last line.
-                globalYPos = iRows - 1;
-                // x - position to the last item on the last row.
-                iCursorPos.iX = lastColumnOnLastRow;
-                }
-            else
-                {
-                // x - position to last column.
-                iCursorPos.iX = iMaxColumns - skipicon;
-                }
-            }
-        }
-
-    if ( aDeltaX > 0 )
-        {
-        // Cursor was moved to right.
-        if ( globalYPos < iRows - 1 )
-            {
-            // Not in the last row.
-            if ( iCursorPos.iX < iMaxColumns - skipicon )
-                {
-                // If not on the last columns, move cursor to next column.
-                iCursorPos.iX += skipicon;
-                }
-            else
-                {
-                // Cursor was on last column,
-                // move to first column of the next line.
-                iCursorPos.iX = 0;
-                globalYPos++;
-                }
-            }
-        else
-            {
-            // Currently on the last row.
-            if ( iCursorPos.iX < lastColumnOnLastRow )
-                {
-                // If there are more items on this row, move cursor to next item.
-                iCursorPos.iX++;
-                }
-            else
-                {
-                // No more item on the current row.
-                // Move to first item on the first row.
-                iCursorPos.iX = 0;
-                globalYPos = 0;
-                }
-            }
-        }
-
-    if ( aDeltaY < 0 )
-        {
-        iCursorPos.iX -= skipicon;
-        if ( iCursorPos.iX < 0 )
-            {
-            iCursorPos.iX += ( iMaxColumns - 1 );
-            globalYPos--;
-            }
-        // Cursor was moved to up.
-        if ( globalYPos > 0 )
-            {
-            // Cursor was not on the first line - move it to previous row.
-            globalYPos--;
-            }
-        else
-            {
-            // Move cursot to last to row.
-            globalYPos = iRows - 1;
-            if ( iCursorPos.iX > lastColumnOnLastRow )
-                {
-                // No items in the current column on the last row - 
-                // move cursor to last item on the row.
-                iCursorPos.iX = lastColumnOnLastRow;
-                }
-            }
-        }
-    
-    if ( aDeltaY > 0 )
-        {
-        iCursorPos.iX = ( iCursorPos.iX + skipicon ) % iMaxColumns;
-        globalYPos += ( iCursorPos.iX + skipicon ) / iMaxColumns;
-        // Cursor was moved to down.
-        if ( globalYPos < iRows - 1 )
-            {
-            // Cursor is not on the last row. Move cursor to next row.
-            globalYPos++;
-            if ( globalYPos == iRows - 1 && 
-                 iCursorPos.iX > lastColumnOnLastRow )
-                {
-                // No items in the current column on the last row - 
-                // move cursor to last item on the row.
-                iCursorPos.iX = lastColumnOnLastRow;
-                }
-            }
-        else 
-            {
-            // Cursor was at the last row - move it to the first row.
-            globalYPos = 0;
-            }        
-        }
-    iCursorPos.iY = globalYPos - iFirstVisibleRow;
-
-    if ( globalYPos < iFirstVisibleRow )
-        {
-        // Cursor was moved from the top row.
-        if ( globalYPos <= 0 )
-            {
-            iFirstVisibleRow = 0;
-            iCursorPos = TPoint( iCursorPos.iX, 0 );
-            }
-        else
-            {
-            // If cursor was moved up out of the visible area - show it again.
-            iFirstVisibleRow -= iExtension->iMaxVisibleRows;
-            iCursorPos = TPoint( iCursorPos.iX, 
-                                 iExtension->iMaxVisibleRows - 1 );
-            }
-        }
-    
-    if ( globalYPos > iFirstVisibleRow + iExtension->iMaxVisibleRows - 1 )
-        {
-        if ( globalYPos == iRows - 1 )
-            {
-            // When cursor has moved from the top line,
-            // it is adjusted to a page boundary.
-            iCursorPos = TPoint( 
-                iCursorPos.iX,
-                ( iRows - 1 ) % iExtension->iMaxVisibleRows
-                );
-            iFirstVisibleRow = ( ( iRows - 1 ) / iExtension->iMaxVisibleRows ) * 
-                               iExtension->iMaxVisibleRows;
-            }
-        else
-            {
-            // If cursor was moved down out of the visible area - show it again.
-            iFirstVisibleRow += iExtension->iMaxVisibleRows;
-            iCursorPos = TPoint( iCursorPos.iX, 0 );
-            }
-        }
-       
-    if ( iRows > iExtension->iMaxVisibleRows && 
-        ( iOldCursorPos.iY + oldFirstVisibleRow != 
-          iCursorPos.iY + iFirstVisibleRow ) )
-        {
-        UpdateScrollIndicatorL();
-        }
-
-    if ( oldFirstVisibleRow == iFirstVisibleRow )
-        {
-        // Draw only cursor if the view to the content was not scrolled.
-        DrawCursor();
-        }
-    else
-        {
-        DrawNow();
-        }
-
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::UpdateScrollIndicatorL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::UpdateScrollIndicatorL()
-    {    
-    if ( !iSBFrame )
-        {
-        return;
-        }
-    TEikScrollBarModel hSbarModel;
-    TEikScrollBarModel vSbarModel;
-    
-    TEikScrollBarFrameLayout layout;
-    
-    // Main pane without softkeys
-    TRect mainPaneRect;
-    if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                             mainPaneRect ) )
-       {
-       mainPaneRect = iAvkonAppUi->ClientRect();
-       }
-        
-    // Dialog layout, check variety first
-    TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-       AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-    
-    TInt maxVariety = iconMapDialogVariety.LastVariety();
-    
-    // Check the CBA, if the orientation is not landscape 
-    // there is not so much varieties
-    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
-    // the offset for the certain cba location variety
-    TInt maxVarietyOffset = 0;
-    TInt varietyOffset = maxVariety + 1;
-    
-    // landscape variety number must be calculated offset == number of varieties
-    // same applies to the variety number for the biggest sized layout for the 
-    // variety
-    if ( Layout_Meta_Data::IsLandscapeOrientation() )
-       {
-       // the offset for one variety
-       varietyOffset = ( maxVariety + 1 )/KAknSctCBaButtonDirections;
-       }
-    
-    // for right and left cba buttons the max variety is not zero
-    // the varities are ordered by the location of the cba and the descending 
-    // order e.g the biggest sized layout first, the smallest last
-    if ( location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       maxVarietyOffset = varietyOffset;
-       }
-    else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-       {
-       maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-       }
-    
-    TInt varietyNumber = varietyOffset - iRows - 1; 
-    
-    // if more lines than possible to show, use the default 
-    // ( the biggest grid ) variety
-    if ( varietyNumber < 0 )
-        {
-        varietyNumber = 0;
-        }
-    // if zero rows, use the minimum
-    else if ( iRows <= 0 )
-        {
-        varietyNumber -= 1;
-        }
-    
-    //add the varietyoffset
-    varietyNumber += maxVarietyOffset;
-
-    if ( Layout_Meta_Data::IsLandscapeOrientation() && 
-         location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       varietyNumber = 10;
-       }
-    else
-        {
-        varietyNumber = 3;
-        }     
-    // Layout the dialog size
-    TAknLayoutRect dialogLayRect;
-    dialogLayRect.LayoutRect( mainPaneRect, 
-       AknLayoutScalable_Avkon::popup_grid_graphic_window( varietyNumber ) );
-    
-    TRect dialogRect = dialogLayRect.Rect();
-    
-    // Get the layout of the actual icon grid with scrollbar
-    TAknLayoutRect gridWithScrollLayRect;
-       
-    gridWithScrollLayRect.LayoutRect( 
-                    TRect( TPoint( 0,0 ),
-                    TSize( dialogRect.Size() ) ), 
-                    AknLayoutScalable_Avkon::listscroll_popup_graphic_pane() );
-
-    // Calculate the relative rect for the grid
-    TRect parent = gridWithScrollLayRect.Rect();
-    
-    TAknWindowComponentLayout scrollbarLayout = 
-                                    AknLayoutScalable_Avkon::scroll_pane_cp5();
-    
-    vSbarModel.iScrollSpan = iRows;
-    vSbarModel.iThumbSpan = iExtension->iMaxVisibleRows;
-    
-    if ( iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan )
-        {    
-        // For EDoubleSpan type scrollbar
-        vSbarModel.iThumbPosition = iFirstVisibleRow;
-        TAknDoubleSpanScrollBarModel hDsSbarModel( hSbarModel );
-        TAknDoubleSpanScrollBarModel vDsSbarModel( vSbarModel );
-        
-        // The y coordinate must be sifted 3 pixels up and x 3 to left
-        parent.iTl.iY -= KVerticalDialogMargin;
-        parent.iBr.iY -= KVerticalDialogMargin;        
-        parent.iTl.iX -= KHorizontalDialogMargin;
-        parent.iBr.iX -= KHorizontalDialogMargin;
-        
-        layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
-        iSBFrame->Tile( &vDsSbarModel ); 
-        AknLayoutUtils::LayoutVerticalScrollBar( iSBFrame, 
-                                                 parent, 
-                                                 scrollbarLayout );       
-        iSBFrame->SetVFocusPosToThumbPos( vDsSbarModel.FocusPosition() );
-        }
-    else
-        {
-        // For EArrowHead type scrollbar
-        vSbarModel.iThumbPosition = iCursorPos.iY + iFirstVisibleRow;
-        iSBFrame->TileL( &hSbarModel,&vSbarModel,parent,parent,layout );        
-        iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition );
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::Reserved_1()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::Reserved_1()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::Reserved_2()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::Reserved_2()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::DrawOffscreenBackgroundIfRequired
-// 
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::DrawOffscreenBackgroundIfRequired() const
-    {
-    if ( iOffscreenBg && iHasBitmapBackground )
-        {
-        if ( !iOffscreenBgDrawn )
-            {
-            TRect mainPaneRect;
-            if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                                     mainPaneRect ) )
-               {
-               mainPaneRect = iAvkonAppUi->ClientRect();
-               }
-            
-            // Dialog layout, check variety first
-            TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-               AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-            
-            TInt maxVariety = iconMapDialogVariety.LastVariety();
-            
-            // Check the CBA, if the orientation is not landscape 
-            // there is not so much varieties
-            AknLayoutUtils::TAknCbaLocation location = 
-                                                  AknLayoutUtils::CbaLocation();
-            // the offset for the certain cba location variety
-            TInt maxVarietyOffset = 0;
-            TInt varietyOffset = maxVariety + 1;
-            
-            // landscape variety number must be calculated offset == number of 
-            // varieties same applies to the variety number for the biggest 
-            // sized layout for the variety
-            if ( Layout_Meta_Data::IsLandscapeOrientation() )
-               {
-               // the offset for one variety
-               varietyOffset = ( maxVariety + 1 )/KAknSctCBaButtonDirections;
-               }
-            
-            // for right and left cba buttons the max variety is not zero
-            // the varities are ordered by the location of the cba and the 
-            // descending order e.g the biggest sized layout first, the smallest last
-            if ( location == AknLayoutUtils::EAknCbaLocationRight )
-               {
-               maxVarietyOffset = varietyOffset;
-               }
-            else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-               {
-               maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-               }
-
-            TInt varietyNumber = varietyOffset - iRows - 1; 
-            
-            // if more lines than possible to show, use the default 
-            // ( the biggest grid ) variety
-            if ( varietyNumber < 0 )
-                {
-                varietyNumber = 0;
-                }
-            // if zero rows, use the minimum
-            else if ( iRows<=0 )
-                {
-                varietyNumber -= 1;
-                }
-            
-            //add the varietyoffset
-            varietyNumber += maxVarietyOffset;
-                   
-            TAknLayoutRect popupGridLayRect;
-            popupGridLayRect.LayoutRect( mainPaneRect, 
-               AknLayoutScalable_Avkon::popup_grid_graphic_window( 5 ) );
-            
-            TRect popupGridRect = popupGridLayRect.Rect();
-            
-            // set the top left height as the control starting point
-            popupGridRect.iTl.iY = Rect().iTl.iY;
-            
-            //if ( popupGridRect.iBr.iY < mainPaneRect.iBr.iY )
-            //    popupGridRect.iBr.iY = mainPaneRect.iBr.iY
-            MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-            MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
-            
-            // draw to upper left corner, and normalize the retangle to 
-            // fact that the dialog starts from coordinates ( 0,0 ), 
-            // so the y-coordinate is correct ( heading pane ) 
-            // but x must be set to zero
-            TPoint point = TPoint( 0, 0 );
-            popupGridRect.Move( -popupGridRect.iTl.iX,0 );
-            
-            AknsDrawUtils::DrawBackground( skin,
-                                           cc,
-                                           this,
-                                           *iBitmapGc,
-                                           point,
-                                           popupGridRect,
-                                           KAknsDrawParamDefault );
-
-            iOffscreenBgDrawn = ETrue;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::ComponentControl( TInt aIndex ) const
-// Return the controll pointer
-// -----------------------------------------------------------------------------
-//
-CCoeControl* CCmDestinationIconMap::ComponentControl( TInt aIndex ) const
-    {
-    if ( aIndex == 0 && 
-         iSBFrame && 
-         iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan )
-        {    
-        return iSBFrame->VerticalScrollBar();
-        }
-    else
-        {
-        return NULL;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CountComponentControls()
-// Return no of controll to be placed on the container control
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationIconMap::CountComponentControls() const
-    {
-    if ( iSBFrame && 
-         iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan )
-        {    
-        return 1;
-        }
-    else
-        {
-        return 0;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::CountMaxColumnsAndCellSizes
-// Counts no of columns and the cell size will be displayed in the icon table
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationIconMap::CountMaxColumnsAndCellSizes()
-    {    
-    TRect cellRect; // retangle of one item in grid
-    TRect gridRect; // retangle of the grid contaning the items
-    
-    // 1. Get the layout 
-    
-    // Get the parent rect
-    TRect mainPaneRect;
-    if ( !AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                             mainPaneRect ) )
-       {
-       mainPaneRect = iAvkonAppUi->ClientRect();
-       }
-    
-    // Calculate the layout of the whole popup with the biggest possible -> 0
-    // Dialog layout, check variety first
-    
-    // Get the layout rect of the dialog
-    
-    // Check variety first
-    TAknLayoutScalableParameterLimits iconMapDialogVariety = 
-        AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-    
-    TInt maxVariety = iconMapDialogVariety.LastVariety();
-    
-    // Check the CBA, if the orientation is not landscape 
-    // there is not so much varieties
-    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
-    // the offset for the certain cba location variety
-    TInt maxVarietyOffset = 0;
-    TInt varietyOffset = maxVariety + 1; // the number of varieties
-        
-    // landscape variety number must be calculated offset == number of varieties
-    // same applies to the variety number for the biggest sized layout for the 
-    // variety
-    if ( Layout_Meta_Data::IsLandscapeOrientation() )
-       {
-       // the offset for one variety
-       varietyOffset = ( maxVariety + 1 ) / KAknSctCBaButtonDirections;
-       }
-       
-    if ( location == AknLayoutUtils::EAknCbaLocationRight )
-       {
-       maxVarietyOffset = varietyOffset;
-       }
-    else if ( location == AknLayoutUtils::EAknCbaLocationLeft )
-       {
-       maxVarietyOffset = varietyOffset + varietyOffset; // 2*
-       }
-    
-    TAknLayoutRect popupGridLayRect;
-    popupGridLayRect.LayoutRect( mainPaneRect,
-       AknLayoutScalable_Avkon::popup_grid_graphic_window( maxVarietyOffset ) );
-    
-    // Get the layout of the actual icon grid with scrollbar
-    TAknLayoutRect gridWithScrollLayRect;
-    gridWithScrollLayRect.LayoutRect( popupGridLayRect.Rect(), 
-       AknLayoutScalable_Avkon::listscroll_popup_graphic_pane() );
-    
-    // Then the grid area without scrollbar
-    // NOTE: The grid with scroll bar is used as reference
-    TAknLayoutRect gridLayRect;
-    gridLayRect.LayoutRect( gridWithScrollLayRect.Rect(), 
-       AknLayoutScalable_Avkon::grid_graphic_popup_pane( 0 ) );
-
-    // Different parent if SCT inside editing menu.
-    TRect rect = Rect();
-    gridRect = gridLayRect.Rect();
-    // cell size, AGAIN 7 item
-    TAknLayoutRect cellLayRect;
-    cellLayRect.LayoutRect( 
-                    gridRect, 
-                    AknLayoutScalable_Avkon::cell_graphic_popup_pane( 0,0,0 ) );
-
-    cellRect = cellLayRect.Rect();
-        
-    // 2. Calculate width related
-    // - item width
-    // - max number of columns
-    
-    // Width of the items area
-    TInt gridWidth = gridRect.Width();
-    
-    // Width of one item
-    TInt cellWidth = cellRect.Width();
-  
-     // ensure the item width and store it
-    TAknLayoutRect secondCellLayRect;
-    secondCellLayRect.LayoutRect( gridRect, 
-                    AknLayoutScalable_Avkon::cell_graphic_popup_pane( 0,1,0 ) );
-       
-    iGridItemWidth = secondCellLayRect.Rect().iTl.iX - 
-                     cellLayRect.Rect().iTl.iX;
-    
-    if ( iGridItemWidth < 0 )
-        {
-        // The result is negative with lay file data if the layout is mirrored.
-        iGridItemWidth = -iGridItemWidth;
-        }
-    
-    // Calculate the amount of columns
-    iMaxColumns = gridWidth / cellWidth;
-    
-    
-    // 2. Calculate height related
-    // - item height
-    // - max number of rows
-        
-    // Get the grid height
-    // NOTE: in landscape the LAF is wrong so use the main panes height
-    TInt gridHeight = gridRect.Height();
-    
-    // get the item height
-    TInt cellHeight = cellRect.Height();
-    
-    // calculate the number of items fitting to grid
-    iExtension->iMaxVisibleRows = 3; //gridHeight / cellHeight;
-    
-    // Store the item height
-    TAknLayoutRect secondRowLayRect;
-    secondRowLayRect.LayoutRect( gridLayRect.Rect(), 
-       AknLayoutScalable_Avkon::cell_graphic_popup_pane( 0,0,1 ) );
-
-    iGridItemHeight = secondRowLayRect.Rect().iTl.iY - 
-                      cellLayRect.Rect().iTl.iY;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::HandleScrollEventL
-// Handles the different scroll events so that the map reacts accordingly.
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationIconMap::HandleScrollEventL( CEikScrollBar* aScrollBar, 
-                                                TEikScrollEvent aEventType )
-    {
-    TBool update = EFalse;
-    
-    switch ( aEventType )
-        {       
-        case EEikScrollUp:
-        case EEikScrollPageUp:
-            {           
-            // nothing done if we are already on the first page.
-            if ( iFirstVisibleRow > 0 )
-                {
-                iFirstVisibleRow -= iExtension->iMaxVisibleRows;
-                if ( iFirstVisibleRow < 0 )
-                    {
-                    iFirstVisibleRow = 0;
-                    }
-                update = ETrue;
-                }
-            UpdateScrollIndicatorL();
-            }
-            break;
-        
-        case EEikScrollDown:
-        case EEikScrollPageDown:
-            {           
-            // nothing done if we are already on the last page.
-            if ( iFirstVisibleRow < iRows - iExtension->iMaxVisibleRows ) 
-                {
-                iFirstVisibleRow += iExtension->iMaxVisibleRows;
-                if ( iFirstVisibleRow > iRows - iExtension->iMaxVisibleRows )
-                    {   
-                    iFirstVisibleRow = iRows - iExtension->iMaxVisibleRows;
-                    }
-                update = ETrue;
-                }
-            UpdateScrollIndicatorL();
-            }
-            break;   
-               
-        case EEikScrollThumbDragVert:
-            {        	
-            // Ask which type of scrollbar is shown
-            TInt thumbPosition;
-            TBool isDoubleSpan = ( CEikScrollBarFrame::EDoubleSpan == iSBFrame->TypeOfVScrollBar() );
-            if ( isDoubleSpan )
-                {
-                thumbPosition = static_cast <const TAknDoubleSpanScrollBarModel*>( 
-                                            aScrollBar->Model() )->FocusPosition();
-                }
-            else
-                {
-                thumbPosition = aScrollBar->Model()->iThumbPosition;
-                }
-            
-            if ( thumbPosition != iFirstVisibleRow )
-                {
-                iFirstVisibleRow = thumbPosition;
-                update = ETrue;
-                }
-            }
-            break;
-        
-        case EEikScrollThumbReleaseVert:
-            {
-            // Ask which type of scrollbar is shown
-            TBool isDoubleSpan = 
-                CEikScrollBarFrame::EDoubleSpan == iSBFrame->TypeOfVScrollBar();
-            if ( isDoubleSpan )
-                {
-                iFirstVisibleRow = static_cast <const TAknDoubleSpanScrollBarModel*>( 
-                                            aScrollBar->Model() )->FocusPosition();
-                }
-            else
-                {
-                iFirstVisibleRow = aScrollBar->Model()->iThumbPosition;
-                }
-            update = ETrue;
-            UpdateScrollIndicatorL();
-            }
-            break;
-        
-        case EEikScrollLeft: // flow through            
-        case EEikScrollRight: // flow through
-        case EEikScrollPageLeft: // flow through
-        case EEikScrollPageRight: // flow through
-        case EEikScrollThumbDragHoriz: // flow through
-        case EEikScrollThumbReleaseHoriz: // flow through
-        default: 
-            // do nothing
-            break; 
-        }
-                
-    // to avoid flicker we draw only if there really was something new to draw.
-    if ( update )
-        {              
-        if ( iExtension->iObserver )
-            {
-            iExtension->iObserver->HandleControlEventL( 
-                                      this, 
-                                      MCoeControlObserver::EEventRequestFocus );
-            } 
-        DrawDeferred();    
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationIconMap::Extension
-// -----------------------------------------------------------------------------
-//
-CCmDestinationIconMapExtension* CCmDestinationIconMap::Extension() const
-    {
-    return iExtension;
-    }    
--- a/cmmanager/cmmgr/Framework/Src/cmdestination.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,662 +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:  Implementation of RCmDestination
-*
-*/
-
-#include <cmdestination.h>
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-
-using namespace CMManager;
-
-// -----------------------------------------------------------------------------
-// RCmDestination::Close()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmDestination::Close()
-    {
-    if( !iDestinatonData )
-        {
-        return;
-        }
-
-    iDestinatonData->Cmmgr()->RemoveDestFromPool(iDestinatonData);     
-    iDestinatonData = NULL;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// RCmDestination::~RCmDestination()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination::~RCmDestination()
-    {
-    Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmDestination::RCmDestination( RCmDestination& )
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination::RCmDestination(
-                                const RCmDestination& aCmDestination)    
-    : iDestinatonData( aCmDestination.iDestinatonData )
-    {
-    iDestinatonData->IncrementRefCounter();
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// RCmDestination::RCmDestination::operator=()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination& RCmDestination::operator=(
-                                const RCmDestination& aCmDestination)
-    {
-    if (this != &aCmDestination) 
-        {
-        delete iDestinatonData;
-        iDestinatonData = aCmDestination.iDestinatonData;        
-        iDestinatonData->IncrementRefCounter();
-        }
-    return *this;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::ConnectionMethodCount()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TInt RCmDestination::ConnectionMethodCount() const    
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), KErrBadHandle ) );
-
-    return iDestinatonData->ConnectionMethodCount();
-    };
-        
-// -----------------------------------------------------------------------------
-// RCmDestination::ConnectionMethodL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C RCmConnectionMethod 
-                            RCmDestination::ConnectionMethodL( TInt anIndex ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethod cm;
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    cm.iImplementation = 
-        aImplementation->GetConnectionMethodL( anIndex )->Plugin();
-    //CCmDestinationImpl::GetConnectionMethodL doesn't give ownership
-    cm.iImplementation->IncrementRefCounter();
-    CleanupStack::PopAndDestroy(aImplementation);
-    
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::ConnectionMethodByIDL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C RCmConnectionMethod 
-                        RCmDestination::ConnectionMethodByIDL( TInt aIapId ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethod cm;
-    
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    cm.iImplementation = 
-        aImplementation->ConnectionMethodByIDL( aIapId )->Plugin();
-    //CCmDestinationImpl::ConnectionMethodByIDL doesn't give ownership
-    cm.iImplementation->IncrementRefCounter();
-    CleanupStack::PopAndDestroy(aImplementation);
-    
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::PriorityL()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint RCmDestination::PriorityL(const RCmConnectionMethod& aCCMItem ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    TUint retValue = aImplementation->PriorityL( *aCCMItem.iImplementation );
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::NameLC()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C HBufC* RCmDestination::NameLC ( ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    HBufC* retValue = aImplementation->NameLC();
-    CleanupStack::Pop(retValue);
-    CleanupStack::PopAndDestroy(aImplementation);
-    CleanupStack::PushL(retValue);
-    return retValue;
-    };
-
-// -----------------------------------------------------------------------------
-// RCmDestination::Id()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint32 RCmDestination::Id() const
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-    
-    return iDestinatonData->Id();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::ElementId()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint32 RCmDestination::ElementId() const
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->ElementId();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::IconL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C CGulIcon* RCmDestination::IconL() const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CGulIcon* retValue = aImplementation->IconL();
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmDestination::MetadataL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C 
-    TUint32 RCmDestination::MetadataL( TSnapMetadataField aMetaField ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    return iDestinatonData->MetadataL( aMetaField );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::ProtectionLevel()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C TProtectionLevel RCmDestination::ProtectionLevel() const
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->ProtectionLevel();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::IsHidden()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C TBool RCmDestination::IsHidden() const
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    TBool hidden( EFalse );
-    TRAPD( err, hidden = iDestinatonData->IsHiddenL() );
-    __ASSERT_ALWAYS( err == KErrNone, User::Panic(_L( "CMManager" ), 
-                                                  KErrArgument ) );
-                                                  
-    return hidden;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethod RCmDestination::CreateConnectionMethodL
-   ( TUint32 aImplementationUid )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethod cm;
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* imp = aImplementation->CreateConnectionMethodL( 
-                                        aImplementationUid );
-    imp->IncrementRefCounter();
-    CleanupStack::PushL(imp);                                    
-    cm.iImplementation = imp->Plugin();
-    CleanupStack::PopAndDestroy(imp);
-    
-    CleanupStack::PopAndDestroy(aImplementation);
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethod RCmDestination::CreateConnectionMethodL( 
-    TUint32 aImplementationUid,
-    TUint32  aConnMethId )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethod cm;
-    CCmDestinationImpl* implementation = 
-                                     CCmDestinationImpl::NewLC( iDestinatonData );
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* imp = implementation->CreateConnectionMethodL( 
-                                                            aImplementationUid,
-                                                            aConnMethId );
-    imp->IncrementRefCounter();
-    CleanupStack::PushL(imp);                                    
-    cm.iImplementation = imp->Plugin();
-    CleanupStack::PopAndDestroy(imp);
-
-    CleanupStack::PopAndDestroy(implementation);
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::AddConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt RCmDestination::AddConnectionMethodL( 
-    RCmConnectionMethod aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-        
-    CCmDestinationImpl* implementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-
-    // Check if the given connection method exists already in this destination
-    if ( aConnectionMethod.iImplementation->IdIsValid() &&
-         implementation->CheckIfCMExistsL( *connMethod ) )
-        {
-        CleanupStack::PopAndDestroy( connMethod );
-        CleanupStack::PopAndDestroy( implementation );
-        User::Leave( KErrAlreadyExists );
-        }
-
-    TInt retValue =  implementation->AddConnectionMethodL( *connMethod );
-    CleanupStack::PopAndDestroy( connMethod );
-    CleanupStack::PopAndDestroy( implementation );
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::AddEmbeddedDestinationL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt RCmDestination::AddEmbeddedDestinationL( 
-    const RCmDestination& aDestination )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if ( this == &aDestination )
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting will decrement the ref counter
-    aImplementation->IncrementRefCounter();
-    CCmDestinationImpl* aDestToAdd = 
-            CCmDestinationImpl::NewLC(aDestination.iDestinatonData);
-    // Deleting will decrement the ref counter
-    aDestToAdd->IncrementRefCounter();
-        
-    TInt retValue =  aImplementation->AddEmbeddedDestinationL( 
-                                                *aDestToAdd );        
-    CleanupStack::PopAndDestroy(aDestToAdd);
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::DeleteConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void RCmDestination::DeleteConnectionMethodL( 
-    RCmConnectionMethod& aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    aImplementation->DeleteConnectionMethodL( 
-                                           *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestination::RemoveConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void RCmDestination::RemoveConnectionMethodL( 
-    RCmConnectionMethod aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->RemoveConnectionMethodL( 
-                                           *aConnectionMethod.iImplementation );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestination::ModifyPriorityL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestination::ModifyPriorityL( 
-    RCmConnectionMethod& aCCmItem, 
-    TUint aIndex )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aCCmItem.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    aImplementation->ModifyPriorityL( *connMethod, aIndex );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestination::SetNameL()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C void RCmDestination::SetNameL( const TDesC& aName )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetNameL( aName );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::SetIconL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestination::SetIconL( TUint32 anIndex )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    if ( anIndex > KNumOfIcons )
-        {
-        User::Leave( KErrArgument );
-        }
-        
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetIconL( anIndex );        
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::SetMetadataL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestination::SetMetadataL( TSnapMetadataField aMetaField, 
-                                            TUint32 aValue ) 
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetMetadataL( aMetaField, aValue );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::SetProtectionL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void RCmDestination::SetProtectionL( TProtectionLevel aProtLevel )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetProtectionL( aProtLevel );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::SetHiddenL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void RCmDestination::SetHiddenL( TBool aHidden )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetHiddenL( aHidden );         
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::UpdateL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void RCmDestination::UpdateL()
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->UpdateL();
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::DeleteLD()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmDestination::DeleteLD()
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->DeleteLD();  
-    CleanupStack::Pop(aImplementation);
-    iDestinatonData = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::IsConnectedL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestination::IsConnectedL() const 
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    TBool retValue = aImplementation->IsConnectedL();    
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestination::RCmDestination
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination::RCmDestination()    
-    : iDestinatonData( NULL )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestination::operator==
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestination::operator==(const RCmDestination& aDestination ) const
-    {
-    return ( iDestinatonData == aDestination.iDestinatonData );
-    };
-
-// -----------------------------------------------------------------------------
-// RCmDestination::operator!=
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestination::operator!=(const RCmDestination& aDestination ) const
-    {
-    return !( iDestinatonData == aDestination.iDestinatonData );
-    };
-    
-// End of file
--- a/cmmanager/cmmgr/Framework/Src/cmdestinationext.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,665 +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:  Implementation of RCmDestinationExt
-*
-*/
-
-#include <cmdestinationext.h>
-#include "cmdestinationimpl.h"
-#include <cmconnectionmethodext.h>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::Close()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmDestinationExt::Close()
-    {
-    if( !iDestinatonData )
-        {
-        return;
-        }
-
-    iDestinatonData->Cmmgr()->RemoveDestFromPool(iDestinatonData);     
-    iDestinatonData = NULL;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::~RCmDestinationExt()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt::~RCmDestinationExt()
-    {
-    Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::RCmDestinationExt( RCmDestinationExt& )
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt::RCmDestinationExt(
-                                const RCmDestinationExt& aCmDestination)    
-    : iDestinatonData( aCmDestination.iDestinatonData )
-    {
-    iDestinatonData->IncrementRefCounter();
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::RCmDestinationExt::operator=()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt& RCmDestinationExt::operator=(
-                                const RCmDestinationExt& aCmDestination)
-    {
-    if (this != &aCmDestination) 
-        {
-        Close();
-        iDestinatonData = aCmDestination.iDestinatonData;        
-        iDestinatonData->IncrementRefCounter();
-        }
-    return *this;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ConnectionMethodCount()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TInt RCmDestinationExt::ConnectionMethodCount()    
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->ConnectionMethodCount();
-    };
-    
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ConnectionMethodL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C RCmConnectionMethodExt 
-                            RCmDestinationExt::ConnectionMethodL( TInt anIndex )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethodExt cm;
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    cm.iImplementation = 
-        aImplementation->GetConnectionMethodL( anIndex )->Plugin();
-    //CCmDestinationImpl::GetConnectionMethodL doesn't give ownership
-    cm.iImplementation->IncrementRefCounter();
-    CleanupStack::PopAndDestroy(aImplementation);    
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ConnectionMethodByIDL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C RCmConnectionMethodExt 
-                        RCmDestinationExt::ConnectionMethodByIDL( TInt aIapId )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethodExt cm;
-    
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    cm.iImplementation = 
-        aImplementation->ConnectionMethodByIDL( aIapId )->Plugin();
-    //CCmDestinationImpl::ConnectionMethodByIDL doesn't give ownership
-    cm.iImplementation->IncrementRefCounter();
-    CleanupStack::PopAndDestroy(aImplementation);
-    
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::PriorityL()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint RCmDestinationExt::PriorityL(const RCmConnectionMethodExt& aCCMItem )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    TUint retValue = aImplementation->PriorityL( *aCCMItem.iImplementation );
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::NameLC()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C HBufC* RCmDestinationExt::NameLC ( )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    HBufC* retValue = aImplementation->NameLC();
-    CleanupStack::Pop(retValue);
-    CleanupStack::PopAndDestroy(aImplementation);
-    CleanupStack::PushL(retValue);
-    return retValue;
-    };
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::Id()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint32 RCmDestinationExt::Id() 
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->Id();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ElementId()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TUint32 RCmDestinationExt::ElementId() 
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->ElementId();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::IconL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C CGulIcon* RCmDestinationExt::IconL() 
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CGulIcon* retValue = aImplementation->IconL();
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::MetadataL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C 
-    TUint32 RCmDestinationExt::MetadataL( TSnapMetadataField aMetaField ) const
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-    return iDestinatonData->MetadataL( aMetaField );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ProtectionLevel()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C TProtectionLevel RCmDestinationExt::ProtectionLevel()
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    return iDestinatonData->ProtectionLevel();
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::IsHidden()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C TBool RCmDestinationExt::IsHidden()
-    {
-    __ASSERT_ALWAYS( iDestinatonData, User::Panic(_L( "CMManager" ), 
-                                                  KErrBadHandle ) );
-
-    TBool hidden( EFalse );
-    TRAPD( err, hidden = iDestinatonData->IsHiddenL() );
-    __ASSERT_ALWAYS( err == KErrNone, User::Panic(_L( "CMManager" ), 
-                                                  KErrArgument ) );
-                                                  
-    return hidden;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethodExt 
-        RCmDestinationExt::CreateConnectionMethodL( TUint32 aImplementationUid )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethodExt cm;
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* imp = aImplementation->CreateConnectionMethodL( 
-                                        aImplementationUid );
-    imp->IncrementRefCounter();
-    CleanupStack::PushL(imp);                                    
-    cm.iImplementation = imp->Plugin();
-    CleanupStack::PopAndDestroy(imp);
-    
-    CleanupStack::PopAndDestroy(aImplementation);
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL( 
-    TUint32 aImplementationUid,
-    TUint32  aConnMethId )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    RCmConnectionMethodExt cm;
-    CCmDestinationImpl* implementation = 
-                                     CCmDestinationImpl::NewLC( iDestinatonData );
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* imp = implementation->CreateConnectionMethodL( 
-                                                            aImplementationUid,
-                                                            aConnMethId );
-    imp->IncrementRefCounter();
-    CleanupStack::PushL(imp);                                    
-    cm.iImplementation = imp->Plugin();
-    CleanupStack::PopAndDestroy(imp);
-
-    CleanupStack::PopAndDestroy(implementation);
-    return cm;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::AddConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt RCmDestinationExt::AddConnectionMethodL( 
-                                      RCmConnectionMethodExt aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-        
-    CCmDestinationImpl* implementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-
-    // Check if the given connection method exists already in this destination
-    if ( aConnectionMethod.iImplementation->IdIsValid() &&
-         implementation->CheckIfCMExistsL( *connMethod ) )
-        {
-        CleanupStack::PopAndDestroy( connMethod );
-        CleanupStack::PopAndDestroy( implementation );
-        User::Leave( KErrAlreadyExists );
-        }
-
-    TInt retValue =  implementation->AddConnectionMethodL( *connMethod );
-    CleanupStack::PopAndDestroy( connMethod );
-    CleanupStack::PopAndDestroy( implementation );
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::AddEmbeddedDestinationL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt RCmDestinationExt::AddEmbeddedDestinationL( 
-                                           const RCmDestinationExt& aDestination )
-    {
-    if ( !iDestinatonData )
-        {
-        User::Leave(KErrBadHandle);
-        }
-    
-    if ( this == &aDestination )
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting will decrement the ref counter
-    aImplementation->IncrementRefCounter();
-    CCmDestinationImpl* aDestToAdd = 
-            CCmDestinationImpl::NewLC(aDestination.iDestinatonData);
-    // Deleting will decrement the ref counter
-    aDestToAdd->IncrementRefCounter();
-        
-    TInt retValue =  aImplementation->AddEmbeddedDestinationL( 
-                                                *aDestToAdd );        
-    CleanupStack::PopAndDestroy(aDestToAdd);
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::DeleteConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void RCmDestinationExt::DeleteConnectionMethodL( 
-                                      RCmConnectionMethodExt& aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    aImplementation->DeleteConnectionMethodL( 
-                                           *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::RemoveConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void RCmDestinationExt::RemoveConnectionMethodL( 
-                                      RCmConnectionMethodExt aConnectionMethod )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->RemoveConnectionMethodL( 
-                                           *aConnectionMethod.iImplementation );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::ModifyPriorityL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestinationExt::ModifyPriorityL( 
-                                                RCmConnectionMethodExt& aCCmItem, 
-                                                TUint aIndex )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aCCmItem.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    aImplementation->ModifyPriorityL( *connMethod, aIndex );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::SetNameL()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C void RCmDestinationExt::SetNameL( const TDesC& aName )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetNameL( aName );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::SetIconL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestinationExt::SetIconL( TUint32 anIndex )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-        
-    if ( anIndex > KNumOfIcons )
-        {
-        User::Leave( KErrArgument );
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetIconL( anIndex );        
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::SetMetadataL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void RCmDestinationExt::SetMetadataL( TSnapMetadataField aMetaField, 
-		                                       TUint32 aValue ) 
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetMetadataL( aMetaField, aValue );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::SetProtectionL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void RCmDestinationExt::SetProtectionL( TProtectionLevel aProtLevel )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetProtectionL( aProtLevel );
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::SetHiddenL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void RCmDestinationExt::SetHiddenL( TBool aHidden )
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->SetHiddenL( aHidden );         
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::UpdateL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void RCmDestinationExt::UpdateL()
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->UpdateL();
-    CleanupStack::PopAndDestroy(aImplementation);
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::DeleteLD()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RCmDestinationExt::DeleteLD()
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    iDestinatonData->IncrementRefCounter();
-    aImplementation->DeleteLD();  
-    CleanupStack::Pop(aImplementation);
-    iDestinatonData = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::IsConnectedL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestinationExt::IsConnectedL() const 
-    {
-    if (!iDestinatonData)
-        {
-        User::Leave(KErrBadHandle);
-        }
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    iDestinatonData->IncrementRefCounter();
-    TBool retValue = aImplementation->IsConnectedL();    
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retValue;
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::RCmDestinationExt
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt::RCmDestinationExt()    
-    : iDestinatonData( NULL )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::operator==
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestinationExt::operator==(const RCmDestinationExt& aDestination ) const
-    {
-    return ( iDestinatonData == aDestination.iDestinatonData );
-    };
-
-// -----------------------------------------------------------------------------
-// RCmDestinationExt::operator!=
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmDestinationExt::operator!=(const RCmDestinationExt& aDestination ) const
-    {
-    return !( iDestinatonData == aDestination.iDestinatonData );
-    };
-    
-// End of file
--- a/cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3499 +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:  Implementation of CCmDestinationImpl
-*
-*/
-
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include <cmmanager.h>
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdattypeinfov1_1_internal.h>
-#include <commsdattypesv1_1_partner.h> 
-#endif
-#include "cmlogger.h"
-#include "cmmanager.hrh"
-#include <cmcommonconstants.h>
-#include "datamobilitycommsdattypes.h"
-#include <cmpluginembdestinationdef.h>
-#include <cmmanagerdef.h>
-#include <data_caging_path_literals.hrh>
-#include <cmmanager.rsg>
-#include <cmmanager.mbg>   // icons
-#include <AknsUtils.h>
-#include <e32cmn.h>
-
-// System includes
-#include <ecom/ecom.h>        // For REComSession
-#include <commsdattypesv1_1.h>
-
-#include <in_sock.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-const TUint KDefaultTierManagerTagId = KAfInet;
-
-const TInt KDestinationIconConvTable[][4] = {
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnIndiSettProtectedAdd,
-      EMbmCmmanagerQgn_prop_set_conn_dest_internet, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_internet_mask },
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_wap, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_wap_mask },                   
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_mms, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_mms_mask },
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_intranet, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_intranet_mask },          
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_operator, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_operator_mask },
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon1, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon1_mask },     
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon2, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon2_mask },
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon3, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon3_mask },            
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon4, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon4_mask },       
-
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon5, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon5_mask }, 
-             
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon6, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_icon6_mask }, 
-      
-    { EAknsMajorGeneric, 
-      EAknsMinorGenericQgnPropWmlGprs,
-      EMbmCmmanagerQgn_prop_set_conn_dest_default, 
-      EMbmCmmanagerQgn_prop_set_conn_dest_default_mask },            
-    {0, 0, 0, 0}
-    };
-
-// ================= MEMBER FUNCTIONS =======================
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NewL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CCmDestinationImpl* 
-                           CCmDestinationImpl::NewL( CCmManagerImpl& aCmMgr,
-                                                     const TDesC& aName )
-    {
-    CCmDestinationImpl* dest = 
-                    new (ELeave) CCmDestinationImpl( aCmMgr );
-    CleanupStack::PushL( dest );
-    
-    dest->ConstructL( aName );
-    
-    CleanupStack::Pop( dest );
-    return dest;        
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NewL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CCmDestinationImpl* 
-                        CCmDestinationImpl::NewL( CCmManagerImpl& aCmMgr,
-                                                  TUint aDestinationId )
-    {
-    CCmDestinationImpl* dest = 
-                    new (ELeave) CCmDestinationImpl( aCmMgr );
-    CleanupStack::PushL( dest );
-    
-    dest->ConstructL( aDestinationId );
-    
-    CleanupStack::Pop( dest );
-    return dest;        
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NewL()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmDestinationImpl::NewL( CCmManagerImpl& aCmMgr,
-                                              CCmDestinationData* aData )
-    {
-    CCmDestinationImpl* dest = 
-                    new (ELeave) CCmDestinationImpl( aCmMgr );
-    dest->iData = aData;
-    return dest;        
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NewL()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmDestinationImpl::NewL( CCmManagerImpl& aCmMgr,
-                                              const TDesC& aName,
-                                              TUint32 aDestId)
-    {
-    CCmDestinationImpl* dest = 
-                              new (ELeave) CCmDestinationImpl( aCmMgr );
-    CleanupStack::PushL( dest );
-
-    dest->ConstructL( aName, aDestId );
-
-    CleanupStack::Pop( dest );
-    return dest;        
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NewLC()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmDestinationImpl::NewLC( CCmDestinationData* aData )
-    {
-    CCmDestinationImpl* dest = 
-                    new (ELeave) CCmDestinationImpl( aData->iCmMgr );
-    CleanupStack::PushL( dest );
-    dest->iData = aData;
-    return dest;        
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CCmDestinationImpl()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl::CCmDestinationImpl( CCmManagerImpl& aCmMgr )
-    : iCmMgr( aCmMgr )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationData::CCmDestinationData()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationData::CCmDestinationData( CCmManagerImpl& aCmMgr )
-    : iCmMgr( aCmMgr ),
-    iNewWithId ( EFalse )
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationData::~CCmDestinationData()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationData::~CCmDestinationData()
-    {
-    delete iMetaDataRec;
-    delete iNetworkRecord;
-    delete iDestAPRecord;
-
-    if (iConnMethodArray)
-        {
-        ResetAndDestroyArray( iConnMethodArray, ETrue );        
-        }
-    if (iDeleteCmArray)
-        {
-        ResetAndDestroyArray( iDeleteCmArray, ETrue );        
-        }
-    
-    CLOG_CLOSE;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::~CCmDestinationImpl()
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl::~CCmDestinationImpl()
-    {
-    if (iData)
-        {
-        if (GetRefCounter())
-            {
-            iCmMgr.RemoveDestFromPool(this);        
-            }
-        else //if leaves during construction refcounter is 0
-            {
-            delete iData; 
-            }        
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConstructL()
-// -----------------------------------------------------------------------------
-//    
-void CCmDestinationImpl::ConstructL( const TDesC& aName )
-    {
-    CLOG_CREATE;
-    CLOG_NAME_2( _L("Destination_0x%x_%S"), this, &aName );
-    
-    iData =  new (ELeave) CCmDestinationData(iCmMgr);
-    iData->iNetworkRecord = static_cast<CCDNetworkRecord *>(
-                         CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
-    
-    iData->iConnMethodArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-    iData->iDeleteCmArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-    
-    iData->iMetaDataRec = new (ELeave) CCDSNAPMetadataRecord( 
-                                       iCmMgr.IconTableId() );
-
-    iData->iDestAPRecord = static_cast<CCDAccessPointRecord *>(
-                    CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-
-    SetNameL( aName );
-
-    InitializeDestAPRecordL();
-
-    CPluginItem* item = new (ELeave) CPluginItem;
-    CleanupStack::PushL( item );
-
-    // create the new record
-    item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( item->iDNRecord );
-    
-    AddToArrayL( item );
-    
-    CleanupStack::Pop( 2, item );  // iDNRecord, item
-    iData->iIdIsValid = EFalse;// the Id is still zero here
-    } 
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConstructL()
-// -----------------------------------------------------------------------------
-//    
-void CCmDestinationImpl::ConstructL( const TDesC& aName, TUint32 aDestId )
-    {
-    CLOG_CREATE;
-    CLOG_NAME_2( _L("Destination_0x%x_%S"), this, &aName );
-
-    iData =  new (ELeave) CCmDestinationData(iCmMgr);
-    iData->iNetworkRecord = static_cast<CCDNetworkRecord *>(
-                    CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
-
-    iData->iConnMethodArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-    iData->iDeleteCmArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-
-    iData->iMetaDataRec = new (ELeave) CCDSNAPMetadataRecord( iCmMgr.IconTableId() );
-
-    iData->iDestAPRecord = static_cast<CCDAccessPointRecord *>(
-                    CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-
-    SetNameL( aName );
-    
-    TInt correctAPId = aDestId;
-    TInt correctNetworkId = aDestId;
-	
-    if ( aDestId > 0 && aDestId < 255 )
-        {
-        correctAPId = aDestId + KCmDefaultDestinationAPTagId;
-        }
-    else if ( aDestId > KCmDefaultDestinationAPTagId 
-              && ( aDestId < ( KCmDefaultDestinationAPTagId+255 ) ) )
-        {
-        correctNetworkId = aDestId - KCmDefaultDestinationAPTagId;
-        }
-    else
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    SetIdL( correctAPId );
-
-    InitializeDestAPRecordL();
-
-    CPluginItem* item = new (ELeave) CPluginItem;
-    CleanupStack::PushL( item );
-
-    // create the new record
-    iData->iNetworkRecord->SetRecordId( correctNetworkId );
-    iData->iNewWithId = ETrue;
-    item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( item->iDNRecord );
-
-    AddToArrayL( item );
-
-    CleanupStack::Pop( 2, item );  // iDNRecord, item
-    iData->iIdIsValid = EFalse;// the Id is still zero here
-    } 
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetIdL()
-// -----------------------------------------------------------------------------
-//        
-void CCmDestinationImpl::SetIdL( TInt aDestId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetIdL" );
-
-    TInt correctAPId( aDestId );
-    if ( aDestId > 0 && aDestId < 255 )
-        {
-        correctAPId = aDestId + KCmDefaultDestinationAPTagId;
-        }
-    else if ( aDestId < KCmDefaultDestinationAPTagId + 1
-             || aDestId > KCmDefaultDestinationAPTagId + 255 )
-        {
-        User::Leave( KErrArgument );
-        }
-        
-    CheckIfDestinationIdExistsL( correctAPId );
-
-    iData->iDestAPRecord->iRecordTag = correctAPId;
-    };
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfDestinationIdExistsL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::CheckIfDestinationIdExistsL( TUint32 aDestId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfDestinationNameExistL" );
-
-    CMDBRecordSet<CCDAccessPointRecord>*  ptrRecordSet = 
-          new (ELeave) CMDBRecordSet<CCDAccessPointRecord>( KCDTIdAccessPointRecord );
-    CleanupStack::PushL( ptrRecordSet );    
-
-    // Prime record
-    CCDAccessPointRecord* record = static_cast<CCDAccessPointRecord *>
-                                   ( CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-    CleanupStack::PushL( record );
-
-    record->iRecordTag = ( TInt )aDestId;
-
-    ptrRecordSet->iRecords.AppendL( record );
-
-    CleanupStack::Pop( record );
-    record = NULL;
-
-    if ( ptrRecordSet->FindL( Session() ) )
-        {
-        User::Leave( KErrAlreadyExists );      
-        }
-
-    ptrRecordSet->iRecords.ResetAndDestroy();
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-
-    iData->iDestAPRecord->iRecordTag = aDestId;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfDestinationNameExistL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::CheckIfDestinationNameExistL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfDestinationNameExistL" );
-    
-    CMDBRecordSet<CCDSnapRecord>*  ptrRecordSet = 
-                            new (ELeave) CMDBRecordSet<CCDSnapRecord>( 
-                                 iCmMgr.DestinationTableId() );
-    CleanupStack::PushL( ptrRecordSet );    
-    
-    // Prime record
-    CCDSnapRecord* record = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( record );
-    
-    record->iRecordName.SetL( aName );
-    
-    ptrRecordSet->iRecords.AppendL( record );
-
-    CleanupStack::Pop( record );
-    record = NULL;
-                
-    if ( ptrRecordSet->FindL( Session() ) )
-        {
-        User::Leave( KErrAlreadyExists );          
-        }
-        
-    ptrRecordSet->iRecords.ResetAndDestroy();
-    CleanupStack::PopAndDestroy( ptrRecordSet );            
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConstructL()
-// -----------------------------------------------------------------------------
-//    
-void CCmDestinationImpl::ConstructL( TUint aDestinationId )
-    {
-    CLOG_CREATE;
-    CLOG_NAME_2( _L("Destination_0x%x_%d"), this, aDestinationId );
-    iData =  new (ELeave) CCmDestinationData(iCmMgr);
-    OpenTransactionLC();
-    
-    iData->iNetworkRecord = static_cast<CCDNetworkRecord *>(
-                         CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
-
-    iData->iDestAPRecord = static_cast<CCDAccessPointRecord *>(
-                         CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-    
-    iData->iConnMethodArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-    iData->iDeleteCmArray = new (ELeave) CCmArray( KCmArrayBigGranularity );
-
-    TInt correctAPId = aDestinationId;
-    TInt correctNetworkId = aDestinationId;
-	
-    if ( aDestinationId > 0 && aDestinationId < 255 )
-        {
-        correctAPId = aDestinationId + KCmDefaultDestinationAPTagId;
-        }
-    else if ( aDestinationId > KCmDefaultDestinationAPTagId 
-              && ( aDestinationId < ( KCmDefaultDestinationAPTagId+255 ) ) )
-        {
-        correctNetworkId = aDestinationId - KCmDefaultDestinationAPTagId;
-        }
-    else
-        {
-        User::Leave( KErrArgument );
-        }
-        
-    LoadDestAPRecordL( correctAPId );
-    
-    LoadNetworkRecordL( correctNetworkId );
-
-    LoadConnectionMethodsL();
-    LoadSNAPMetadataTableL();
-    
-    RollbackTransaction();
-    
-    iData->iIdIsValid = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::Session()
-// -----------------------------------------------------------------------------
-//        
-CMDBSession& CCmDestinationImpl::Session()const
-    {
-    return iCmMgr.Session();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::OpenTransactionLC
-// ---------------------------------------------------------------------------
-//
-void CCmDestinationImpl::OpenTransactionLC()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::OpenTransactionL" );
-    // Do NOT call OpenTransactionLC() more then once!
-    iCmMgr.OpenTransactionLC( ETrue );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmDestinationImpl::CommitTransactionL( TInt aError )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CommitTransactionL" );
-    
-    iCmMgr.CommitTransactionL( aError );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::RollbackTransaction
-// ---------------------------------------------------------------------------
-//
-void CCmDestinationImpl::RollbackTransaction()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::RollbackTransaction" );
-    
-    iCmMgr.RollbackTransaction();
-    }
-
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::NameLC()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C HBufC* CCmDestinationImpl::NameLC( )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::NameLC" );
-
-    HBufC* name = NULL;
-    const TUint32 KSnapMetadataNameMask = 0x0000000F;
-
-    TUint32 val = TUint32(iData->iMetaDataRec->iMetadata) & KSnapMetadataNameMask;
-    TUint32 val2 = (TUint32(iData->iMetaDataRec->iMetadata) & ESnapMetadataDestinationIsLocalised)
-                     >> 4;                   
-    
-    if( (val == ESnapMetadataInternet) ||
-        (val2 == ELocalisedDestInternet) )
-        {
-        name = iCmMgr.AllocReadL( R_CMMANAGERUI_DEST_INTERNET );
-        }
-    else if ( val2 == ELocalisedDestWap )
-        {
-        name = iCmMgr.AllocReadL( R_CMMANAGERUI_DEST_WAP );
-        }
-    else if ( val2 == ELocalisedDestMMS )
-        {
-        name = iCmMgr.AllocReadL( R_CMMANAGERUI_DEST_MMS );
-        }
-    else if ( val2 == ELocalisedDestIntranet )
-        {
-        name = iCmMgr.AllocReadL( R_CMMANAGERUI_DEST_INTRANET );
-        }
-    else
-        {
-        name = TPtrC(iData->iNetworkRecord->iRecordName).AllocL();
-        }
-        
-    CleanupStack::PushL( name );
-        
-    return name;
-    };
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetNameL()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C void CCmDestinationImpl::SetNameL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetNameL" );
-
-    // Destination cannot be renamed if it's
-    // - protected
-    // - Internet    
-    if ( ProtectionLevel() == EProtLevel1 ||
-         ProtectionLevel() == EProtLevel2 ||
-         MetadataL( ESnapMetadataInternet ) )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    OpenTransactionLC();
-    CheckIfDestinationNameExistL( aName );
-    CommitTransactionL( KErrNone );        
-
-    iData->iNetworkRecord->iRecordName.SetL( aName );
-    iData->iDestAPRecord->iRecordName.SetL( aName );
-    };
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodCount()
-// -----------------------------------------------------------------------------
-//        
-TInt CCmDestinationData::ConnectionMethodCount()
-    {    
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodCount" );
-
-    return iConnMethodArray->Count() - KCmInitIndex;
-    };
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodCount()
-// -----------------------------------------------------------------------------
-//        
-EXPORT_C TInt CCmDestinationImpl::ConnectionMethodCount()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodCount" );
-    
-    return iData->ConnectionMethodCount();
-    };
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C CCmPluginBaseEng* CCmDestinationImpl::ConnectionMethodL( TInt /*aIndex*/ )
-    {
-    LOGGER_ENTERFN( "Error: Obsolete function CCmDestinationImpl::ConnectionMethodL used" );
-    User::Panic( _L("CMManager"), KErrNotSupported );
-    return NULL;    
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodL
-// -----------------------------------------------------------------------------
-//     
-EXPORT_C CCmPluginBase* CCmDestinationImpl::GetConnectionMethodL( TInt aIndex )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodL" );
-    // Initial entry!
-   
-    CCmPluginBase* retVal = NULL;    
-    TInt index = KCmInitIndex + aIndex;
-    CPluginItem* item = (*(iData->iConnMethodArray))[index];
-
-    LoadPluginL( *item );
-    retVal = item->iPlugin;
-    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodByIDL
-// -----------------------------------------------------------------------------
-//     
-CCmPluginBase* CCmDestinationImpl::ConnectionMethodByIDL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodByIDL" );
-
-    TInt found = ConnectionMethodIndex( aCmId );
-
-    if( found == KErrNotFound )
-        {
-        User::Leave( KErrNotFound );
-        }
-        
-    CPluginItem* item = (*(iData->iConnMethodArray))[found];
-
-    LoadPluginL( *item );
-    
-    return item->iPlugin;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectMethodIdArrayL
-// -----------------------------------------------------------------------------
-//     
-void CCmDestinationImpl::ConnectMethodIdArrayL( RArray<TUint32>& aCmIds )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectMethodIdArrayL" );
-
-    TInt count = iData->iConnMethodArray->Count();    
-
-    for( TInt i = KCmInitIndex; i < count; ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-
-        TUint32 elementId = item->iDNRecord->iIAP ?
-                          RECORD_FROM_ELEMENT_ID( TUint32(item->iDNRecord->iIAP) ) :
-                          TUint32( item->iDNRecord->iEmbeddedSNAP );
-                          
-        User::LeaveIfError( aCmIds.Append( elementId ) );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AddToArrayL
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationImpl::AddToArrayL( CPluginItem* aItem )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::AddToArrayL" );
-
-    TInt count = iData->iConnMethodArray->Count();    
-    if ( 0 == count  )
-        {
-        iData->iConnMethodArray->AppendL( aItem );
-        CLOG_WRITE_1( "inserted: [%d]", count );
-        return count;
-        }
-        
-    // Fill in SNAP record with IAP/EmbSNAP/SNAP values    
-    TMDBElementId iapElemetid( 0 );
-    TInt embDestId( 0 );
-
-    // No plugin means this is the template record.
-    TBool isDestination = aItem->iPlugin->GetBoolAttributeL( ECmDestination );
-    if ( isDestination )
-        {
-        embDestId = aItem->iPlugin->Destination()->Id();    
-        }
-    else
-        {
-        iapElemetid = aItem->iPlugin->IAPRecordElementId();   
-        }
-        
-    aItem->iDNRecord->iIAP = iapElemetid;
-    aItem->iDNRecord->iEmbeddedSNAP = embDestId;
-
-    TUint32 prio = 0;
-    TUint32 bearerType = 0;
-    TUint32 extLevel = 0;
-    
-    TBool isVirtual( EFalse );
-    
-    if ( count == KCmInitIndex )
-        {
-        if( !aItem->iDNRecord->iIAP && !aItem->iDNRecord->iEmbeddedSNAP )
-            {
-            iData->iConnMethodArray->AppendL( aItem );
-            }
-        else
-            {
-            isVirtual = PrioDataL( aItem, prio, bearerType, extLevel );
-            aItem->iDNRecord->iPriority = prio;
-            iData->iConnMethodArray->AppendL( aItem );
-            }
-        return count;
-        }
-    
-    TInt insertedAt( -1 );
-
-    if ( !isDestination )
-        {
-        // This function returns the info necessary for determining the priority
-        // It is the cm data in none VPN case 
-        // It is the data of the underlying cm in case of VPN over cm
-        // It is wildcard prio in case of VPN over destination
-        isVirtual = PrioDataL( aItem, prio, bearerType, extLevel );
-
-        CLOG_WRITE_3( "inserted item prio: [%d], bearer: [%x] ext: [%d]", 
-                       prio, bearerType, extLevel );
-
-        // wildcard priority goes to back
-        if ( KDataMobilitySelectionPolicyPriorityWildCard == prio ) 
-            {
-            // Set the default priority of a wildcard bearer
-            aItem->iDNRecord->iPriority = prio;
-            }   
-        else 
-            {
-            insertedAt = InsertSameMethodL( bearerType, isVirtual );
-            if( insertedAt == -1 )
-                {
-                insertedAt = InsertPriorityMethodL( prio, extLevel );
-                }
- 
-            } // if wildcard
-        } // if !destination
-   
-    if( insertedAt == -1 )
-        {
-        //Add to the end of the list        
-        iData->iConnMethodArray->AppendL( aItem );
-        insertedAt = iData->iConnMethodArray->Count()-1;
-        CLOG_WRITE_1( "inserted as last: [%d]", insertedAt );
-        }
-    else
-        {
-        iData->iConnMethodArray->InsertL( insertedAt, aItem );
-        }    
-
-    CLOG_WRITE_1( "inserted at: [%d]", insertedAt );
-        
-    return insertedAt;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::PrioDataL
-// -----------------------------------------------------------------------------
-// 
-TBool CCmDestinationImpl::PrioDataL( CPluginItem* aItem,  TUint32& aRetPrio, 
-                                     TUint32& aRetBearer, TUint32& aRetExtLevel )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::PrioDataL" );
-
-    // Gets the data affecting the priority of the plugin in the list.
-    // It means the VPN priory based on the barer priority of the underlying cm
-    // or "wildcard" if VPN points to a destination      
-    aRetPrio   = aItem->iPlugin->GetIntAttributeL( ECmDefaultPriority );
-    aRetBearer = aItem->iPlugin->GetIntAttributeL( ECmBearerType );
-    aRetExtLevel = aItem->iPlugin->GetIntAttributeL( ECmExtensionLevel );
-    
-    TBool isVirtual = aItem->iPlugin->GetBoolAttributeL( ECmVirtual );
-    if( isVirtual )
-        {
-        // Embeded destination is also virtual but further checking should
-        // not be done. 
-        TBool isDestination = aItem->iPlugin->GetBoolAttributeL( ECmDestination );
-        if( !isDestination )
-            {
-            TUint32 underlying = aItem->iPlugin->GetIntAttributeL( 
-                                                           ECmNextLayerIapId );
-            if ( underlying != 0 )
-                {
-                // Gets the bearer of the underlying cm
-                aRetBearer = iCmMgr.BearerTypeFromCmIdL( underlying );
-                // Gets the prio of the bearer
-                aRetPrio = 
-                iCmMgr.GetBearerInfoIntL( aRetBearer, ECmDefaultPriority );
-                aRetExtLevel = 
-                iCmMgr.GetBearerInfoIntL( aRetBearer, ECmExtensionLevel );
-                }
-            else
-                {
-                // VPN points to a destination so its priority is "wildcard"
-                aRetPrio = KDataMobilitySelectionPolicyPriorityWildCard;
-                }    
-            }
-        }
-
-    return isVirtual;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::InsertSameMethodL
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationImpl::InsertSameMethodL( TUint32 aBearerType, TBool aIsVirtual )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::InsertSameMethodL" );
-
-    TInt insertedAt( -1 );
-    TUint32 bearerInList( 0 );
-    TUint32 prioInList( 0 );
-    TUint32 extLevelInList( 0 ); 
-    TBool isVirtualInList( EFalse );
-     
-    TInt count = iData->iConnMethodArray->Count();    
-    // Loops throught the items in the list
-    for ( TInt i = count-1; ( i >= KCmInitIndex ) && ( insertedAt == -1) ; i-- )
-        {
-        // Loads the plugin
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        LoadPluginL( *item );
-        
-        // Gets the data of the list item    
-        isVirtualInList = PrioDataL( item, 
-                                    prioInList, bearerInList, extLevelInList );
-
-        CLOG_WRITE_4( "actual item [%d] prio: [%d], bearer: [%x] ext: [%d]", 
-                            i, prioInList, bearerInList, extLevelInList );
-          
-        // Bearer type the same
-        if( aBearerType == bearerInList )
-            {
-            // puts Virt/Virt or !Virt/!Virt or !Virt/Virt
-            if( ( aIsVirtual == isVirtualInList ) || ( aIsVirtual && !isVirtualInList ))
-                {
-                insertedAt = i+1;
-                CLOG_WRITE_1( "inserted same bearer: [%d]", insertedAt );
-                }
-            } // if bearer
-        } // for
-        return insertedAt;
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::InsertPriorityMethodL
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationImpl::InsertPriorityMethodL( TUint32 aPrio, TUint32 aExtLevel )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::InsertPriorityMethodL" );
-
-    TInt insertedAt = -1;
-    TUint32 bearerInList( 0 );
-    TUint32 prioInList( 0 );
-    TUint32 extLevelInList( 0 );
-
-    TInt count = iData->iConnMethodArray->Count();    
-    // Loops throught the items in the list
-    ////for ( TInt i = KCmInitIndex; ( i < count ) && ( insertedAt == -1) ; i++ )
-    TInt i ( count-1 );
-    for ( ; ( i >= KCmInitIndex ) && ( insertedAt == -1) ; i-- )
-        {
-        // Loads the plugin
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        LoadPluginL( *item );
-
-        // Gets the data of the list item    
-        PrioDataL( item, prioInList, bearerInList, extLevelInList );
-
-        CLOG_WRITE_4( "actual item [%d] prio: [%d], bearer: [%x] ext: [%d]", 
-                        i, prioInList, bearerInList, extLevelInList );
-        
-        // If the priority is the same then it should be inserted near here
-        if ( aPrio == prioInList )
-            {
-            if( aExtLevel <= extLevelInList )
-                {
-                insertedAt = i+1;
-                CLOG_WRITE_1( "inserted same bearer non virtual: [%d]", insertedAt );
-                }
-            }
-        // Insert in front of the higher priority (prio 1 is the highest ...)    
-        else if ( aPrio > prioInList )
-            {
-            insertedAt = i+1;
-            CLOG_WRITE_1( "inserted higher prio: [%d]", insertedAt );
-            } // if same prio
-            
-        } // for
-        
-    // This is the highest priority one. It should be inserted at the first pos. 
-    if( -1 == insertedAt )
-        {
-        insertedAt = KCmInitIndex;
-        CLOG_WRITE_1( "inserted first position: [%d]", insertedAt );
-        } // if same prio
-
-    return insertedAt;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationData::ProtectionLevel()
-// -----------------------------------------------------------------------------
-//  
-TProtectionLevel CCmDestinationData::ProtectionLevel()
-    {
-    TInt protection = TUint32(iMetaDataRec->iMetadata) & 
-                      KSnapMetadataProtecionLevelMask;
-    return TProtectionLevel(protection >> 28);
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ProtectionLevel()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C 
-    TProtectionLevel CCmDestinationImpl::ProtectionLevel()
-    {
-    return iData->ProtectionLevel();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetAttributeL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C void CCmDestinationImpl::SetProtectionL( TProtectionLevel aProtectionLevel )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetProtectionL" );
-    
-    CLOG_WRITE_1( "Level: [%d]", aProtectionLevel );
-
-    CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-    
-    // Make a destination protected.
-    TUint32 mask = ~KSnapMetadataProtecionLevelMask;
-    TUint32 temp = TUint32(iData->iMetaDataRec->iMetadata) & mask;    
-    iData->iMetaDataRec->iMetadata = aProtectionLevel << 28;
-    iData->iMetaDataRec->iMetadata = temp | TUint32(iData->iMetaDataRec->iMetadata);
-    
-    iData->iProtectionChanged = ETrue;
-    }
-        
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-CCmPluginBase* CCmDestinationImpl::CreateConnectionMethodL( 
-                                                   TUint32 aImplementationUid )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CreateConnectionMethodL" );
-
-    CCmPluginBase* retval = NULL;
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-    retval = iCmMgr.CreateConnectionMethodL(aImplementationUid, this);
-    CleanupStack::PushL(retval); 
-    AddConnectionMethodL(*retval);
-    CleanupStack::Pop(retval);
-    return retval;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-CCmPluginBase* CCmDestinationImpl::CreateConnectionMethodL( 
-    TUint32 aImplementationUid,
-    TUint32 aConnMthId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CreateConnectionMethodL" );
-
-    CCmPluginBase* retval = NULL;
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-
-    retval = iCmMgr.CreateConnectionMethodL( aImplementationUid,
-                                             aConnMthId,
-                                             this );
-    CleanupStack::PushL(retval);
-    AddConnectionMethodL(*retval);
-    CleanupStack::Pop(retval);
-    return retval;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AddConnectionMethodL()
-// -----------------------------------------------------------------------------
-//
-TInt CCmDestinationImpl::AddConnectionMethodL( 
-                                           CCmPluginBase& aConnectionMethod )
-    {    
-    LOGGER_ENTERFN( "CCmDestinationImpl::AddConnectionMethodL" );
-
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    TUint cmId = aConnectionMethod.GetIntAttributeL( ECmId );
-    
-    CPluginItem* item = new (ELeave) CPluginItem;
-    CleanupStack::PushL( item ); // 1
-    
-    // get the plugin
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.Plugin());
-    CleanupStack::PushL( connMethod );// 2           
-    connMethod->IncrementRefCounter();    
-    item->iPlugin = connMethod;
-
-    // create the new record
-    item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
-
-    CleanupStack::PushL( item->iDNRecord ); // 3
-    
-    // if the destination is protection level 1, the connection method must be protected
-    if ( ProtectionLevel() == EProtLevel1 )
-        {
-        item->iPlugin->SetBoolAttributeL( ECmProtected, ETrue );
-        }
-    
-    TInt index = AddToArrayL( item );
-    index = index - KCmInitIndex; //the array contains one initial item, so subtract KCmInitIndex from the index to get cm index!
-    
-    CleanupStack::Pop( 3, item ); // item, connMethod, iDNRecord
-    
-    return index;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AddEmbeddedDestinationL()
-// -----------------------------------------------------------------------------
-//
-TInt CCmDestinationImpl::AddEmbeddedDestinationL( 
-                                             CCmDestinationImpl& aDestination )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::AddEmbeddedDestinationL" );
-    
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    //Check to avoid multiple levels of embedding
-    CheckIfEmbeddedL( Id() );
-    
-    //Check to avoid multiple levels of embedding
-    if ( aDestination.HasEmbeddedL() )
-        {
-        User::Leave( KErrNotSupported );
-        }
-        
-    // Only one embedded destination per destination is allowed
-    if ( HasEmbeddedL() )
-        {
-        User::Leave( KErrNotSupported );
-        }
-           
-    CPluginItem* item = new (ELeave) CPluginItem;
-    CleanupStack::PushL( item ); // 1
-
-    CreateEmbeddedDestinationPluginL( *item, aDestination.Id() );
-     // create the new record
-    item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
-    item->iDNRecord->iPriority = KDataMobilitySelectionPolicyPriorityWildCard;
-
-    CleanupStack::PushL( item->iDNRecord ); // 2    
-    TInt index = AddToArrayL( item );
-    index = index - KCmInitIndex; //the array contains one initial item, so subtract KCmInitIndex from the index to get cm index!
-    
-    CleanupStack::Pop( 2, item ); // item, iDNRecord
-    
-    return index;   
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DeleteConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationImpl::DeleteConnectionMethodL( 
-                                        CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteConnectionMethodL" );
-    
-    if( ProtectionLevel() == EProtLevel1 ||
-        ProtectionLevel() == EProtLevel3 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    if ( aConnectionMethod.GetBoolAttributeL( ECmConnected ) )
-        {
-        User::Leave( KErrInUse );
-        }
-        
-    TInt index = FindConnectionMethodL( aConnectionMethod );
-
-    // move this method to the 'to be deleted' array         
-    CPluginItem* item = (*(iData->iConnMethodArray))[index];
-    
-    LoadPluginL( *item );
-    
-    if( item->iPlugin->GetBoolAttributeL( ECmIsLinked ) )
-        {
-        User::Leave( KErrLocked );
-        }
-
-    if ( ConnectionMethodCount() == 1 )
-        {
-        // Check if this destination is referenced by Virtual CM 
-        CheckIfReferencedByVirtualCML();
-        }
-
-    iData->iDeleteCmArray->AppendL( item );
-    iData->iConnMethodArray->Delete( index );
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::RemoveConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationImpl::RemoveConnectionMethodL( 
-                                     const CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteConnectionMethodL" );
-
-    if( ProtectionLevel() == EProtLevel1 ||
-        ProtectionLevel() == EProtLevel3 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-    
-    if ( ConnectionMethodCount() == 1 )
-        {
-        // Check if this destination is referenced by Virtual CM 
-        CheckIfReferencedByVirtualCML();
-        }
-        
-    TInt index = FindConnectionMethodL( aConnectionMethod );
-
-    // move this method to the 'to be deleted' array, but
-    // set remove only from, not to delete it on update.
-    CPluginItem* item = (*(iData->iConnMethodArray))[index];
-    
-    item->iFlags |= CPluginItem::ERemoveCm;
-   
-    iData->iDeleteCmArray->AppendL( item );
-    iData->iConnMethodArray->Delete( index );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfReferencedByVirtualCML()
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationImpl::CheckIfReferencedByVirtualCML()
-    {
-    // for each IAP in CM manager
-    //   1. check if it is virtual
-    //      if not => goto 1.
-    //      if yes:
-    //      2. check if it links to the destination of this CM
-    //         if yes => carryOn = EFalse, ERROR
-    //         if not: carryOn = ETrue
-    CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* iaps = iCmMgr.AllIapsL();
-    CleanupStack::PushL( iaps );
-
-    TBool carryOn = ETrue;
-    TUint32 destId = Id();
-
-    // for each IAP in CM manager
-    for ( TInt i = KCmInitIndex; carryOn && i < iaps->iRecords.Count(); ++i )
-        {
-        CommsDat::CCDIAPRecord* rec = (*iaps)[i];
-        TUint32 bearerType = 0;
-
-        TRAP_IGNORE( bearerType = iCmMgr.BearerTypeFromIapRecordL( rec ) );
-        if ( !bearerType )
-            {
-            continue;
-            }
-
-        // check if it is virtual
-        if ( iCmMgr.GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-            {
-            // check if it links to the current destination
-            CCmPluginBase* plugin = NULL;            
-            TRAP_IGNORE( plugin = iCmMgr.GetConnectionMethodL( rec->RecordId() ) );
-
-            if ( !plugin )
-                {
-                continue;
-                }
-
-            if ( plugin->IsLinkedToSnap( destId ) )
-                {
-                // the CM links to this destination, deletion not allowed
-                carryOn = EFalse;
-                }
-
-            delete plugin;
-            }
-        }
-
-    CleanupStack::PopAndDestroy( iaps );
-
-    if ( !carryOn )
-        {
-        User::Leave( KErrLocked );
-        }
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::RemoveConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationImpl::RemoveConnectionMethodL( 
-                                     const CCmPluginBaseEng& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteConnectionMethodL" );
-
-    if( ProtectionLevel() == EProtLevel1 ||
-        ProtectionLevel() == EProtLevel3 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    TInt index = FindConnectionMethodL( aConnectionMethod );
-
-    // move this method to the 'to be deleted' array, but
-    // set remove only from, not to delete it on update.
-    CPluginItem* item = (*(iData->iConnMethodArray))[index];
-    
-    item->iFlags |= CPluginItem::ERemoveCm;
-   
-    iData->iDeleteCmArray->AppendL( item );
-    iData->iConnMethodArray->Delete( index );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodDeletedL()
-// -----------------------------------------------------------------------------
-// 
-void CCmDestinationImpl::ConnectionMethodDeletedL( 
-                                    const CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodDeletedL" );
-
-    TInt found( KErrNotFound );
-    TUint32 aCmId = aConnectionMethod.GetIntAttributeL( ECmId );
-
-    found = ConnectionMethodIndex( aCmId );
-
-    if( found != KErrNotFound )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[found];
-        
-        (*(iData->iConnMethodArray))[found] = NULL;
-        iData->iConnMethodArray->Delete( found );
-        iData->iConnMethodArray->Compress();
-        
-        // The iPlugin is deleted in plugin interface function
-        // that called this function.
-        delete item->iDNRecord;
-        delete item;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::FindConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationImpl::FindConnectionMethodL( 
-                                     const CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::FindConnectionMethodL" );
-
-    TInt cmId = aConnectionMethod.GetIntAttributeL( ECmId );
-    TBool embeded = aConnectionMethod.GetBoolAttributeL( ECmDestination ) ?
-                      ETrue :
-                      EFalse;
-
-    CLOG_WRITE_2( "ID: [%d], embDest: [%d]", 
-                  cmId, 
-                  aConnectionMethod.GetBoolAttributeL( ECmDestination ) );
-    
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        if( embeded )
-            {
-            if( item->iDNRecord->iEmbeddedSNAP == cmId )
-                {
-                return i;
-                }        
-            }
-        else
-            {
-            if( RECORD_FROM_ELEMENT_ID(item->iDNRecord->iIAP) == cmId )
-                {
-                return i;
-                }
-            }
-        }
-        
-    CLOG_WRITE( "Not found" );
-    User::Leave( KErrNotFound );
-    
-    // dummy return value. never used.
-    return -1;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::FindConnectionMethodL()
-// -----------------------------------------------------------------------------
-// 
-TInt CCmDestinationImpl::FindConnectionMethodL( 
-                                     const CCmPluginBaseEng& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::FindConnectionMethodL" );
-
-    TInt cmId = aConnectionMethod.GetIntAttributeL( ECmId );
-    TBool embeded = aConnectionMethod.GetBoolAttributeL( ECmDestination ) ?
-                      ETrue :
-                      EFalse;
-
-    CLOG_WRITE_2( "ID: [%d], embDest: [%d]", 
-                  cmId, 
-                  aConnectionMethod.GetBoolAttributeL( ECmDestination ) );
-    
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        if( embeded )
-            {
-            if( item->iDNRecord->iEmbeddedSNAP == cmId )
-                {
-                return i;
-                }        
-            }
-        else
-            {
-            if( RECORD_FROM_ELEMENT_ID(item->iDNRecord->iIAP) == cmId )
-                {
-                return i;
-                }
-            }
-        }
-        
-    CLOG_WRITE( "Not found" );
-    User::Leave( KErrNotFound );
-    
-    // dummy return value. never used.
-    return -1;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ModifyPriorityL()
-// -----------------------------------------------------------------------------
-//      
-void CCmDestinationImpl::ModifyPriorityL( CCmPluginBase& aCCMItem, 
-                                          TUint aIndex )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ModifyPriorityL" );
-    
-    if (aCCMItem.GetBoolAttributeL(ECmDestination) ||
-        (aCCMItem.GetBoolAttributeL(ECmVirtual) &&
-         aCCMItem.GetIntAttributeL(ECmNextLayerSNAPId)))
-        {
-        // Priority can not be changed for this cm
-        return;
-        }
-        
-    if( ProtectionLevel() == EProtLevel1 ||
-        ProtectionLevel() == EProtLevel3 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    TBool found( EFalse );
-    TInt cm2 = aCCMItem.GetIntAttributeL( ECmId );
-    
-    if ( aIndex >= ( iData->iConnMethodArray->Count() - KCmInitIndex ) )
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); i++ )
-        {
-        LoadPluginL( *(*(iData->iConnMethodArray))[i] );
-            
-        // Compare the IAP IDs
-        TInt cm1 = (*(iData->iConnMethodArray))[i]->iPlugin->GetIntAttributeL( ECmId );        
-        
-        if ( cm1 == cm2 )
-            {
-            CPluginItem* item = (*(iData->iConnMethodArray))[i];
-            
-            TInt pri = (*(iData->iConnMethodArray))[i]->iDNRecord->iPriority;
-            if ( pri == KDataMobilitySelectionPolicyPriorityWildCard )
-                {
-                TUint32 prio = 0;
-                TUint32 bearerType = 0;
-                TUint32 extLevel = 0;
-                
-                TBool isVirtual = PrioDataL( item, prio, bearerType, extLevel );
-                if (prio != KDataMobilitySelectionPolicyPriorityWildCard)
-                    {
-                    // The priority will be changed later when UpdateL is called
-                    // So, the priority will simply be chnaged from
-                    // KDataMobilitySelectionPolicyPriorityWildCard to value i
-                    (*(iData->iConnMethodArray))[i]->iDNRecord->iPriority = i; 
-                    }
-                }
-            
-            (*(iData->iConnMethodArray))[i] = NULL;
-            
-            // remove from array
-            iData->iConnMethodArray->Delete( i );
-            iData->iConnMethodArray->Compress();
-            iData->iConnMethodArray->InsertL( KCmInitIndex + aIndex, item );
-            
-            found = ETrue;           
-            break;
-            }
-        }
-        
-    if ( !found )
-        {
-        User::Leave( KErrArgument );
-        }
-        
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::PriorityL()
-// -----------------------------------------------------------------------------
-//          
-TUint CCmDestinationImpl::PriorityL( CCmPluginBaseEng& aCCMItem )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::PriorityL" );
-
-    TInt index = FindConnectionMethodL( aCCMItem );
-    
-    return (*(iData->iConnMethodArray))[index]->iDNRecord->iPriority;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::PriorityL()
-// -----------------------------------------------------------------------------
-//          
-TUint CCmDestinationImpl::PriorityL( CCmPluginBase& aCCMItem )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::PriorityL" );
-
-    TInt index = FindConnectionMethodL( aCCMItem );
-    
-    return (*(iData->iConnMethodArray))[index]->iDNRecord->iPriority;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void CCmDestinationImpl::UpdateL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateL" );
-
-    // Connection methods and destination records are updated in 
-    // one transaction.
-    OpenTransactionLC();
-    
-    DeleteConnectionMethodsL();
-
-    // Update protection level of connection methods if it's changed in 
-    // the destination
-    UpdateProtectionL();
-    // Updates all modified connection methods.
-    UpdateConnectionMethodsL();
-    UpdateNetworkRecordL();
-    UpdateDestAPRecordL();
-    UpdateSNAPTableL();
-    UpdateSNAPMetadataTableL();
-        
-    CommitTransactionL( KErrNone );
-    
-    // set the last updated protection level of the destination
-    iData->iLastProtectionLevel = ProtectionLevel();
-
-    // Clear the modified flag
-    iData->iProtectionChanged = EFalse;
-
-    // empty the array, but do not delete it
-    iData->ResetAndDestroyArray( iData->iDeleteCmArray, EFalse );
-        
-    iCmMgr.DestinationUpdated(this);
-    iData->iIdIsValid = ETrue;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DeleteLD()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCmDestinationImpl::DeleteLD()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteLD" );
-
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    TInt count = iData->iConnMethodArray->Count();
-
-    if( IsConnectedL() )
-        {
-        User::Leave( KErrInUse );
-        }
-
-    // Check first that any of the CMs in this Destination is not
-    // referenced by Virtual CM
-    TInt i( 0 );
-    
-    for( i = KCmInitIndex; i < count; ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        
-        LoadPluginL( *item );
-            
-        if( item->iPlugin->GetBoolAttributeL( ECmIsLinked ) )
-            {
-            User::Leave( KErrLocked );
-            }
-        }
-    // Check that this Destination is not referenced by any Virtual CM
-    if ( ConnectionMethodCount() > 0 )
-        {
-        CheckIfReferencedByVirtualCML();
-        }
-
-    OpenTransactionLC();
-    TRAPD( err, DeleteRelatedRecordsL( count ) );
-    if ( err )
-        {
-        RollbackTransaction();
-        User::Leave( err );
-        }
-    CommitTransactionL(KErrNone);
-
-    delete this;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DeleteRelatedRecordsL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::DeleteRelatedRecordsL( TInt aCount )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteRelatedRecordsL" );
-
-    CleanUpEmbeddedL( Id() );
-
-    TCmDefConnValue deletedItem;
-    deletedItem.iType = ECmDefConnDestination;
-    deletedItem.iId = Id();
-    iCmMgr.HandleDefConnDeletedL( deletedItem );       
-    CMDBRecordBase* dnIapRecord;
-    TInt i;
-    
-    // Here we don't use KCmInitIndex becouse initial entry should be deleted
-    // too!
-    for ( i = 0; i < aCount; i++ )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        
-        // Delete the plugin
-        if ( i >= KCmInitIndex )
-            {
-            if ( !item->iPlugin->Plugin()->IdIsValid() )
-                {
-                // Delete incomplete plugin 
-                delete item->iPlugin;
-                item->iPlugin = NULL;
-                }
-            else
-                {
-                TRAPD( err, item->iPlugin->DeleteL( EFalse ) );
-                
-                if( err != KErrLocked &&
-                    err != KErrNotReady )
-                    {
-                    User::LeaveIfError( err );
-                    }
-                    
-                delete item->iPlugin;
-                item->iPlugin = NULL;
-                }
-            }  
-        
-        // Delete the DN-IAP record
-        dnIapRecord = item->iDNRecord;
-        
-        if ( dnIapRecord->RecordId() )
-            // If we have record Id, this record is already in CommsDat
-            {
-            dnIapRecord->DeleteL( Session() );
-            }   
-        delete item->iDNRecord;
-        item->iDNRecord = NULL;
-        }
-
-    iData->iDestAPRecord->DeleteL( Session() ); // deletes a record
-    iData->iNetworkRecord->DeleteL( Session() ); // deletes a record
-    
-    // Delete SNAPMetadata table    
-    CMDBRecordSet<CCDSNAPMetadataRecord>*  ptrRecordSet = 
-                    new (ELeave) CMDBRecordSet<CCDSNAPMetadataRecord>( 
-                                                 iCmMgr.IconTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-
-    // Prime record
-    CCDSNAPMetadataRecord* record = 
-        new (ELeave) CCDSNAPMetadataRecord( iCmMgr.IconTableId() );
-    CleanupStack::PushL( record );
-    record->iSNAP = Id();
-    ptrRecordSet->iRecords.AppendL( record );
-
-    CleanupStack::Pop( record );
-    record = NULL;
-                
-    if ( ptrRecordSet->FindL( Session() ) )
-        {
-        (*ptrRecordSet)[0]->DeleteL( Session() );          
-        }
-        
-    ptrRecordSet->iRecords.ResetAndDestroy();
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfEmbeddedL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::CheckIfEmbeddedL( TInt aId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfEmbeddedL" );
-    
-    CMDBRecordSet<CCDSnapRecord>*  ptrRecordSet = 
-                    new (ELeave) CMDBRecordSet<CCDSnapRecord>( 
-                                          iCmMgr.DestinationTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-
-    // Prime record
-    CCDSnapRecord* record = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( record );
-    record->iEmbeddedSNAP = aId;
-    ptrRecordSet->iRecords.AppendL( record );
-
-    CleanupStack::Pop( record );
-    record = NULL;
-        
-    OpenTransactionLC();    
-    if( ptrRecordSet->FindL( Session() ) )
-        // Match found - it's embedded
-        {
-        User::Leave( KErrNotSupported );          
-        }
-    RollbackTransaction();
-
-    ptrRecordSet->iRecords.ResetAndDestroy();
-    
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::HasEmbeddedL
-// -----------------------------------------------------------------------------
-//
-TBool CCmDestinationImpl::HasEmbeddedL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::HasEmbeddedL" );
-
-    return ( EmbeddedL() != NULL )? ETrue : EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::EmbeddedL
-// -----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmDestinationImpl::EmbeddedL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::EmbeddedL" );
-
-    CCmDestinationImpl* retVal = NULL;
-    // Check if the destination contains embedded destinations
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); i++ )
-        {
-        LoadPluginL( *(*(iData->iConnMethodArray))[i] );
-        // It's an embedded destination ( this is also true for VPN CMs )
-        retVal = (*(iData->iConnMethodArray))[i]->iPlugin->Destination();
-        if ( retVal )
-            {
-            // as there can be only one
-            // embedded destination, the first one is enough
-            break;
-            }
-        }
-    
-    return retVal;
-    }
- 
- // -----------------------------------------------------------------------------
-// CCmDestinationImpl::CanUseToConnectL
-// -----------------------------------------------------------------------------
-//
-TBool CCmDestinationImpl::CanUseToConnectL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CanUseToConnectL" );
-
-    const TInt KZeroItem = 0;
-    const TInt KOneItem = 1;
-    TInt cmCount = ConnectionMethodCount(); //without KCmInitIndex !!!
-    switch ( cmCount )
-        {
-        case KZeroItem:// no items at all
-            {
-            return EFalse;
-            }
-        case KOneItem:// One item, a possible empty embedded destination!
-            {
-            CCmDestinationImpl* embeddedDest = EmbeddedL();
-            if ( embeddedDest )
-                {
-                // If embeddedDest->ConnectionMethodCount() is not zero,
-                // we have something in the embedded destination
-                // which cannot be another embedded destination, 
-                // since multiple embedding is not allowed.
-                return embeddedDest->ConnectionMethodCount();
-                }
-             else
-                {
-                return ETrue; //not an embedded destination
-                }
-            }
-        default: // more than one item, only one can be an empty embedded
-                 // destination, so we surely contain a valid cm
-            {
-            return ETrue;
-            }
-            
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateNetworkRecordL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateNetworkRecordL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateNetworkRecordL" );
-
-    if ( !iData->iNetworkRecord->RecordId() || iData->iNewWithId )
-        {
-        CLOG_WRITE( "New Destination, create it!" );
-        //Create a network record, set the host name and add it to the database    
-
-        if ( !iData->iNewWithId )
-        	{
-        	iData->iNetworkRecord->SetRecordId(KCDNewRecordRequest);
-        	}
-
-        SetAttribute( iData->iNetworkRecord, 
-                      ECDProtectedWrite, 
-                      ProtectionLevel() == EProtLevel1 );
-
-        iData->iNetworkRecord->StoreL( Session() ); //adds a new record
-        iData->iNewWithId = EFalse;
-        }
-    else
-        {
-        SetAttribute( iData->iNetworkRecord, 
-                      ECDProtectedWrite, 
-                      ProtectionLevel() == EProtLevel1 );
-
-        iData->iNetworkRecord->ModifyL( Session() );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateDestAPRecordL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateDestAPRecordL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateDestAPRecordL" );
-
-    if ( !iData->iDestAPRecord->RecordId() )
-        {
-        CLOG_WRITE( "New Destination, create AP for it!" );
-        //Create an AP record, set the selection policy(network id)
-        //and add it to the database
-        iData->iDestAPRecord->SetRecordId(KCDNewRecordRequest);
-        iData->iDestAPRecord->iRecordTag = CreateDestinationAPTagIdL();
-        iData->iDestAPRecord->iCustomSelectionPolicy = iData->iNetworkRecord->RecordId();
-        iData->iDestAPRecord->iRecordName.SetL(iData->iNetworkRecord->iRecordName);
-        iData->iDestAPRecord->StoreL( Session() ); //adds a new record
-        }
-    else
-        {
-        iData->iDestAPRecord->iCustomSelectionPolicy = iData->iNetworkRecord->RecordId();
-        iData->iDestAPRecord->iRecordName.SetL(iData->iNetworkRecord->iRecordName);
-        iData->iDestAPRecord->ModifyL( Session() ); //modifies the existing
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CreateDestinationAPTagId()
-// -----------------------------------------------------------------------------
-//
-TUint32 CCmDestinationImpl::CreateDestinationAPTagIdL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CreateDestinationAPTagId" );
-
-    return KCmDefaultDestinationAPTagId + iData->iNetworkRecord->RecordId();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::GetDestinationAPTagId()
-// -----------------------------------------------------------------------------
-//
-TUint32 CCmDestinationImpl::GetDestinationAPTagId( )
-    {
-    return iData->iNetworkRecord->RecordId() + KCmDefaultDestinationAPTagId;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateProtectionL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateProtectionL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateProtectionL" );
-
-    if( !iData->iProtectionChanged )
-        // protection level not changed -> nothing to update here
-        {
-        return;
-        }
-        
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); i++ )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        
-        LoadPluginL( *item );
-        
-        switch ( ProtectionLevel() ) 
-            {
-            case EProtLevel0:
-            case EProtLevel2:
-                {
-                // from the protection level 0 to 2 and vice versa 
-                // the ECmProtected value of the CM is not changed                
-                if( iData->iLastProtectionLevel == EProtLevel1 ||
-                    iData->iLastProtectionLevel == EProtLevel3 )
-                    {
-                    item->iPlugin->SetBoolAttributeL( ECmProtected, EFalse );
-                    }
-                }
-              break;
-            case EProtLevel1:
-            case EProtLevel3:
-                {
-                item->iPlugin->SetBoolAttributeL( ECmProtected, ETrue );
-                }
-              break;
-            default:
-                {
-                //
-                }
-              break;              
-             }                      
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateConnectionMethodsL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateConnectionMethodsL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateConnectionMethodsL" );
-
-    for( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        
-        // If the plugin is not loaded, it means that this a old one, or nothing
-        // modified in it -> there's no need to update it.
-        if( item->iPlugin )
-            {
-            item->iPlugin->UpdateL();
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetAttribute()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::SetAttribute( CMDBRecordBase* aRecord, 
-                                       TUint32 aAttribute, TBool aSet )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetAttribute" );
-    
-    if ( aSet && !aRecord->IsSetAttribute( aAttribute ) )
-        {
-        aRecord->SetAttributes( aAttribute );
-        }
-    else if( !aSet && aRecord->IsSetAttribute( aAttribute ) )
-        {
-        aRecord->ClearAttributes( aAttribute );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateSNAPTableL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateSNAPTableL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateSNAPTableL" );
-    
-    TInt i;
-    CCDSnapRecord* dnIapRecord;
-
-    // Now we have only records of which are new or needs to be updated
-    for ( i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        TInt pri = (*(iData->iConnMethodArray))[i]->iDNRecord->iPriority;
-
-        if ( pri != i &&
-             pri != KDataMobilitySelectionPolicyPriorityWildCard )
-            // wildcard priority CM have to be the last one in the array.
-            // In theory they cannot be re-prioritized.
-            {
-            (*(iData->iConnMethodArray))[i]->iDNRecord->iPriority = i;
-            }
-        }
-
-    // Here we don't use KCmInitIndex becouse initial entry should be updated 
-    // too!
-    for ( i = 0; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        dnIapRecord = (*(iData->iConnMethodArray))[i]->iDNRecord;
-        
-        if( dnIapRecord->iIAP )
-            {
-            if( !RECORD_FROM_ELEMENT_ID( dnIapRecord->iIAP ) )
-                {
-                dnIapRecord->iIAP = (*(iData->iConnMethodArray))[i]->iPlugin->IAPRecordElementId();
-                }
-            }
-        
-        // Set protection on connection methods 
-        SetAttribute( dnIapRecord, 
-                      ECDProtectedWrite, 
-                      ProtectionLevel() == EProtLevel1 ? ETrue : EFalse );
-        // Metadata is used instead of ECDHidden Attribute                      
-        //SetAttribute( dnIapRecord, ECDHidden, iData->iNetworkRecord->Attributes() & ECDHidden );
-        CheckIfNameModifiedL( dnIapRecord );
-             
-        if ( dnIapRecord->RecordId() )
-            {           
-            dnIapRecord->ModifyL( Session() );
-            }
-        else
-            // this is a new record
-            {
-            dnIapRecord->SetRecordId(KCDNewRecordRequest);
-            dnIapRecord->iSNAP = Id();
-            dnIapRecord->StoreL( Session() );
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::UpdateSNAPMetadataTableL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::UpdateSNAPMetadataTableL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::UpdateSNAPMetadataTableL" );
-    
-    if( !iData->iMetaDataRec->RecordId() )
-        // new record
-        {
-        iData->iMetaDataRec->iSNAP = Id();
-        iData->iMetaDataRec->SetRecordId( KCDNewRecordRequest );
-        iData->iMetaDataRec->StoreL( Session() );
-        }
-    else
-        {
-        iData->iMetaDataRec->ModifyL( Session() );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadSNAPMetadataTableL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::LoadSNAPMetadataTableL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadSNAPMetadataTableL" );
-
-    iData->iMetaDataRec = new (ELeave) CCDSNAPMetadataRecord( 
-                                            iCmMgr.IconTableId() );
-
-    iData->iMetaDataRec->iSNAP = Id();
-                
-    if ( !iData->iMetaDataRec->FindL( Session() ) )
-        // Not found -> fill in with default values
-        {
-        iData->iMetaDataRec->iSNAP = Id();
-        iData->iMetaDataRec->iIcon = 0;
-        iData->iMetaDataRec->iMetadata = 0;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadNetworkRecordL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::LoadNetworkRecordL( TUint32 /*aDestinationId*/ )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadNetworkRecordL" );
-
-    // set the record ID
-    iData->iNetworkRecord->SetRecordId( iData->iDestAPRecord->iCustomSelectionPolicy );
-  
-    // load the record ID
-    iData->iNetworkRecord->LoadL( Session() );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadDestAPRecordL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::LoadDestAPRecordL( TUint32 aDestinationId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadDestAPRecordL" );
-
-    if ( aDestinationId > KCmDefaultDestinationAPTagId )
-        {
-        // set the record ID
-        iData->iDestAPRecord->iRecordTag = aDestinationId;
-        // load the record ID
-        if ( iData->iDestAPRecord->FindL( Session() ) )
-            {
-            iData->iDestAPRecord->LoadL( Session() );
-            }
-        else
-            {
-            User::Leave( KErrNotFound );
-            }
-        }
-    else
-        {
-        User::Leave( KErrArgument );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadConnectionMethodsL()
-// -----------------------------------------------------------------------------
-//    
-void CCmDestinationImpl::LoadConnectionMethodsL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadConnectionMethodsL" );
-    
-    CMDBRecordSet<CCDSnapRecord>*  ptrRecordSet = 
-                        new (ELeave) CMDBRecordSet<CCDSnapRecord>( 
-                                          iCmMgr.DestinationTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-
-    // Prime record
-    CCDSnapRecord* snapRec = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( snapRec );
-    snapRec->iSNAP = Id();
-    ptrRecordSet->iRecords.AppendL( snapRec );
-
-    CleanupStack::Pop( snapRec );
-    snapRec = NULL;
-
-    OpenTransactionLC();            
-    if ( !ptrRecordSet->FindL(Session()) )
-        // no conn method is to this destination -> it was not us who made it
-        {
-        CLOG_WRITE( "Empty destination" );
-        User::Leave( KErrUnderflow );
-        }
-
-    TLinearOrder<CMDBRecordBase> orderbyId( 
-                                    CCmDestinationImpl::SortRecordsByPriority );
-    ptrRecordSet->iRecords.Sort(orderbyId);
-
-    TInt count = ptrRecordSet->iRecords.Count();
-    
-    //Load IAP records to be used to check if the IAPs are existing
-    CMDBRecordSet<CCDIAPRecord>*  ptrIapSet = 
-                    new (ELeave) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
-    CleanupStack::PushL( ptrIapSet );
-    
-    TRAPD( err, ptrIapSet->LoadL( Session() ) );
-
-    if( !err )
-        {
-        CLOG_WRITE_1_PTR( NULL, "Record num [%d]", ptrIapSet->iRecords.Count() );
-        
-        // Here we don't use CM_INIT_INDEX because initial entry should be 
-        // loaded too!
-        for ( TInt i = 0; i < count; i++ )
-            {
-            snapRec = (*ptrRecordSet)[i];
-            TBool exist( EFalse );
-            
-            // Check if CM really exists, if not 
-            // it should be cleared from selection policy table
-            TInt32 embedded = QUERY_INT_FIELD( 
-                                snapRec, 
-                                KCDTIdDataMobilitySelectionPolicyEmbeddedSNAP );
-            TInt32 iap = RECORD_FROM_ELEMENT_ID( 
-                            QUERY_INT_FIELD( 
-                                       snapRec, 
-                                       KCDTIdDataMobilitySelectionPolicyIAP ) );
-            // Item could be embedded destination or iap
-            if ( embedded )
-                {
-                CCDAccessPointRecord * destAPRecord = static_cast<CCDAccessPointRecord *>(
-                                CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-                CleanupStack::PushL( destAPRecord );
-                destAPRecord->iRecordTag = embedded;
-                if ( !destAPRecord->FindL( Session() ) )
-                    {
-                    CleanUpSnapMetadataTableL( embedded );
-                    (*ptrRecordSet)[i]->DeleteL( Session() );
-                    }
-                else
-                    {
-                    exist = ETrue;
-                    }
-                    
-                CleanupStack::PopAndDestroy( destAPRecord );
-                }                
-            else if ( iap )
-                // This is an AP
-                {
-                for ( TInt iapInd = 0; iapInd < ptrIapSet->iRecords.Count(); ++iapInd )
-                    {
-                    CMDBRecordBase* iapRec = (*ptrIapSet)[iapInd];
-
-                    if ( iap == iapRec->RecordId() )
-                        {
-                        exist = ETrue;
-                        delete iapRec;
-                        // this way we can filter out duplicated CMs
-                        ptrIapSet->iRecords.Remove( iapInd );
-                        break;
-                        }
-                    }
-                if ( !exist )
-                    {
-                    DeleteIAPRecordsL( snapRec );
-                    }
-                }
-            
-            // The first record is a dummy one where iap and snap are zero
-            if ( exist || ( !embedded && !iap ) )
-                {
-                // The item may have to be loaded at this stage so that the supported can be checked 
-                // before it is put into iData->iConnMethodArray for the item may be unsupported.
-                TInt err( 0 );
-                
-                if ( i != 0 )
-                    {
-                    if ( embedded )
-                        {
-                        TRAP( err, TUint32 bearerType = iCmMgr.BearerTypeFromCmIdL( embedded ) );
-                        }
-                    else if ( iap )
-                        {
-                        TRAP( err, TUint32 bearerType = iCmMgr.BearerTypeFromCmIdL( iap ) );
-                        }
-                    }
-               
-                if ( !err )
-                    {
-                    CPluginItem* item = new (ELeave) CPluginItem;
-                    CleanupStack::PushL( item );
-                    
-                    item->iDNRecord = iCmMgr.SNAPRecordL( snapRec->RecordId() );
-                    item->iPlugin = NULL;
-
-                    iData->iConnMethodArray->AppendL( item );
-                
-                    CleanupStack::Pop( item );
-                    }
-                }
-            }
-        }
-    else
-        // There's no connection method in the phone
-        {
-        CPluginItem* item = new (ELeave) CPluginItem;
-        
-        CleanupStack::PushL( item );
-        
-        item->iDNRecord = iCmMgr.SNAPRecordL( (*ptrRecordSet)[0]->RecordId() );
-
-        iData->iConnMethodArray->AppendL( item );       
-        
-        CleanupStack::Pop( item );                 
-        }
-        
-    CleanupStack::PopAndDestroy( ptrIapSet );
-    RollbackTransaction();
-        
-    ptrRecordSet->iRecords.ResetAndDestroy();
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ReLoadConnectionMethodsL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::ReLoadConnectionMethodsL()
-    {
-    TInt count = iData->iConnMethodArray->Count();
-    //TInt index = KCmInitIndex;
-    TInt index = 0;
-    
-    while ( index < count )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[index];
-        item->iFlags |= CPluginItem::ERemoveCm;
-        
-        iData->iDeleteCmArray->AppendL( item );
-        iData->iConnMethodArray->Delete( index );
-        iData->iConnMethodArray->Compress();
-        
-        count = iData->iConnMethodArray->Count();
-        }
-    
-    // Empty the array, but do not delete it
-    iData->ResetAndDestroyArray( iData->iDeleteCmArray, EFalse );
-    
-    LoadConnectionMethodsL();
-    }
-    
-// ---------------------------------------------------------
-// CCmDestinationImpl::CleanUpEmbeddedL
-// ---------------------------------------------------------
-//
-void CCmDestinationImpl::CleanUpEmbeddedL(TUint32 aDestId)
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CleanUpEmbeddedL" );
-
-    TBool found = EFalse;
-    CMDBRecordSet<CCDSnapRecord>*  ptrRecordSet = 
-                        new (ELeave) CMDBRecordSet<CCDSnapRecord>( 
-                                          iCmMgr.DestinationTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-    // Prime record
-    CCDSnapRecord* snapRec = iCmMgr.SNAPRecordL( 0 );
-    CleanupStack::PushL( snapRec );
-    snapRec->iEmbeddedSNAP = aDestId;
-    ptrRecordSet->iRecords.AppendL( snapRec );
-    CleanupStack::Pop( snapRec );
-    snapRec = NULL;
-
-    if ( ptrRecordSet->FindL(Session()) )
-        {
-        for ( TInt i = 0; i <ptrRecordSet->iRecords.Count(); i++ )
-            {
-            (*ptrRecordSet)[i]->DeleteL( Session() );
-            }
-        found = ETrue;
-        }
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    if (found)
-        {
-        CleanUpSnapMetadataTableL(aDestId);    
-        }
-    }
-// ---------------------------------------------------------
-// CCmDestinationImpl::CleanUpSnapMetadataTableL
-// ---------------------------------------------------------
-//
-void CCmDestinationImpl::CleanUpSnapMetadataTableL( TUint32 aSnap )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CleanUpSnapMetadataTableL" );
-    
-    // Just to test how many record we have
-    CMDBRecordSet<CCDSNAPMetadataRecord>*  ptrRecordSet 
-                = new (ELeave) CMDBRecordSet<CCDSNAPMetadataRecord>( 
-                                                iCmMgr.IconTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-        
-    // Prime record
-    CCDSNAPMetadataRecord* record = 
-            new (ELeave) CCDSNAPMetadataRecord( iCmMgr.IconTableId() );
-    CleanupStack::PushL( record );
-    
-    record->iSNAP = aSnap;
-    ptrRecordSet->iRecords.AppendL( record );
-    
-    CleanupStack::Pop( record );
-    record = NULL;
-    
-    if ( ptrRecordSet->FindL( Session() ) )
-        {
-        for ( TInt i = 0; i <ptrRecordSet->iRecords.Count(); i++ )
-            {
-            (*ptrRecordSet)[i]->DeleteL( Session() );
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( ptrRecordSet );    //ptrRecordSet 
-    }
-
-// ---------------------------------------------------------
-// CCmDestinationImpl::CleanUpSeamlessnessTableL
-// ---------------------------------------------------------
-//
-void CCmDestinationImpl::CleanUpSeamlessnessTableL( TUint32 aIapId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CleanUpSeamlessnesstableL" );
-    
-    // Just to test how many record we have
-    CMDBRecordSet<CCDIAPMetadataRecord>*  ptrRecordSet 
-        = new (ELeave) CMDBRecordSet<CCDIAPMetadataRecord>( 
-                                        iCmMgr.SeamlessnessTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-        
-    // Prime record
-    CCDIAPMetadataRecord* record = 
-      new (ELeave) CCDIAPMetadataRecord( iCmMgr.SeamlessnessTableId() );
-    CleanupStack::PushL( record );
-    
-    TMDBElementId elementid = iCmMgr.SeamlessnessTableId() & 
-                              KCDTIdIAPMetadataIAP & 
-                              aIapId;
-    record->iSeamlessness = elementid;
-    ptrRecordSet->iRecords.AppendL( record );
-    
-    CleanupStack::Pop( record );
-    record = NULL;
-    
-    if ( ptrRecordSet->FindL( Session() ) )
-        {
-        for ( TInt i = 0; i <ptrRecordSet->iRecords.Count(); i++ )
-            {
-            (*ptrRecordSet)[i]->DeleteL( Session() );
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    }
-    
-// ---------------------------------------------------------
-// CCmDestinationImpl::SortRecordsByPriority
-// ---------------------------------------------------------
-//
-TInt CCmDestinationImpl::SortRecordsByPriority( const CMDBRecordBase& aLeft, 
-                                                const CMDBRecordBase& aRight )
-    {
-    TUint left = QUERY_INT_FIELD( const_cast<CMDBRecordBase*>(&aLeft), 
-                                  KCDTIdDataMobilitySelectionPolicyPriority );
-    TUint right = QUERY_INT_FIELD( const_cast<CMDBRecordBase*>(&aRight),
-                                   KCDTIdDataMobilitySelectionPolicyPriority );
-
-    /*
-    *   - negative value, if aLeft is less than aRight;
-    *   - 0,              if aLeft equals to aRight;
-    *   - positive value, if aLeft is greater than aRight.
-    */
-    if ( left == right )
-        {
-        return 0;
-        }
-    
-    return ( left < right ) ? -1 : 1;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IconL()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C CGulIcon* CCmDestinationImpl::IconL() 
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::IconL" );
-
-    return IconL( iData->iMetaDataRec->iIcon );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetIconL()
-// -----------------------------------------------------------------------------
-//      
-void CCmDestinationImpl::SetIconL( TUint32 anIndex )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetIconL" )
-    
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    iData->iMetaDataRec->iIcon = anIndex;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationData::MetadataL()
-// -----------------------------------------------------------------------------
-//
-TUint32 CCmDestinationData::MetadataL( TSnapMetadataField aMetaField ) const
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::MetadataL" )
-
-    TUint retVal( 0 );
-
-    switch( aMetaField )
-        {
-        case ESnapMetadataInternet:
-            {
-            retVal = TUint32(iMetaDataRec->iMetadata) & 
-                     ESnapMetadataInternet;
-            }
-            break;
-            
-        case ESnapMetadataHighlight:
-            {
-            retVal = TUint32(iMetaDataRec->iMetadata) & 
-                     ESnapMetadataHighlight;
-            }
-            break;
-            
-        case ESnapMetadataHiddenAgent:
-            {
-            retVal = TUint32(iMetaDataRec->iMetadata) &
-                     ESnapMetadataHiddenAgent;
-            }
-            break;
-
-        case ESnapMetadataDestinationIsLocalised:
-            {
-            retVal = (TUint32(iMetaDataRec->iMetadata) &
-                      ESnapMetadataDestinationIsLocalised) >> 4;
-            }
-            break;
-            
-        case ESnapMetadataPurpose:
-            {
-            retVal = (TUint32(iMetaDataRec->iMetadata) &
-                     ESnapMetadataPurpose) >> 8;
-            }
-            break;
-
-        default:
-            {
-            User::Leave( KErrArgument );
-            }
-        }
-    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::MetadataL()
-// -----------------------------------------------------------------------------
-//
-TUint32 CCmDestinationImpl::MetadataL( TSnapMetadataField aMetaField ) const
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::MetadataL" )
-    return iData->MetadataL(aMetaField);
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetMetadataL()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::SetMetadataL( TSnapMetadataField aMetaField, 
-		                               TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetMetadata" );
-    
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-        
-    switch( aMetaField )
-        {
-        case ESnapMetadataInternet:
-            {
-            if( aValue )
-                {
-                CheckIfInternetExistsL();
-                
-                iData->iMetaDataRec->iMetadata = 
-                        ESnapMetadataInternet | iData->iMetaDataRec->iMetadata;
-
-                // Set the new way, too!!!
-                SetMetadataL( ESnapMetadataDestinationIsLocalised, 
-                              ELocalisedDestInternet );
-                }
-            else
-                {
-                iData->iMetaDataRec->iMetadata =
-                        ~ESnapMetadataInternet & iData->iMetaDataRec->iMetadata;
-                // Clear the new way, too!!!
-                SetMetadataL( ESnapMetadataDestinationIsLocalised, 
-                              ENotLocalisedDest );                
-                }
-            }
-            break;
-
-        case ESnapMetadataDestinationIsLocalised:
-            {
-            // Check that aValue is within valid range.
-            if ( aValue > ELocalisedDestIntranet )
-                {
-                User::Leave( KErrArgument );
-                }
-            
-            TUint32 oldVal = TUint32(iData->iMetaDataRec->iMetadata) & 
-                             ESnapMetadataInternet;
-            if ( aValue != ENotLocalisedDest )
-                {
-                // check if already exists...
-                CheckIfLocalisedDestExistL( aValue );
-                // does not exists, first clear original value
-                // if old one was Internet, clear that, too:
-                if ( oldVal )
-                    {
-                    // copied here to avoid recursivity!!!
-                    // SetMetadataL(ESnapMetadataInternet, 0 );
-                    iData->iMetaDataRec->iMetadata =
-                        ~ESnapMetadataInternet & iData->iMetaDataRec->iMetadata;
-                    }
-                // clearing
-                iData->iMetaDataRec->iMetadata =
-                                                ~ESnapMetadataDestinationIsLocalised &
-                                                iData->iMetaDataRec->iMetadata;
-                // set new value
-                TUint32 mask = aValue << 4; 
-                iData->iMetaDataRec->iMetadata = 
-                                                mask | 
-                                                iData->iMetaDataRec->iMetadata;
-                // for backward compatibility, if it is internet, 
-                // set it the old way, too
-                if ( aValue == ELocalisedDestInternet )
-                    {
-                    // copied here to avoid recursivity!!!
-                    iData->iMetaDataRec->iMetadata = 
-                        ESnapMetadataInternet | iData->iMetaDataRec->iMetadata;
-                    // SetMetadataL(ESnapMetadataInternet, 1 );
-                    }
-                }
-            else
-                {
-                // not localised, set to ENotLocalisedDest = 0
-                // for backward compatibility, if it was internet, 
-                // set it the old way, too
-                if ( oldVal )
-                    {
-                    SetMetadataL(ESnapMetadataInternet, 0 );
-                    }
-                // clear the new way...
-                iData->iMetaDataRec->iMetadata =
-                                                ~ESnapMetadataDestinationIsLocalised &
-                                                iData->iMetaDataRec->iMetadata;
-                }
-
-            break;
-            }
-
-        case ESnapMetadataPurpose:
-            {
-            // Check that aValue is within valid range.
-            if ( aValue > ESnapPurposeIntranet )
-                {
-                User::Leave( KErrArgument );
-                }
-            
-            // Check if destination with the given purpose already
-            // exists
-            CheckIfPurposeExistL( aValue );
-            
-            // ESnapPurposeInternet and ESnapPurposeMMS need special
-            // handling
-            switch( aValue )
-                {
-                case ESnapPurposeUnknown:
-                    {
-                    // This also clears ESnapMetadataInternet
-                    SetMetadataL( ESnapMetadataDestinationIsLocalised, ENotLocalisedDest );
-                    break;
-                    }
-                case ESnapPurposeInternet:
-                    {
-                    // This sets ESnapMetadataInternet and
-                    // ELocalisedDestInternet
-                    SetMetadataL( ESnapMetadataInternet, 1 );
-                    }
-                    break;
-                case ESnapPurposeOperator:
-                    {
-                    SetMetadataL( ESnapMetadataDestinationIsLocalised, 
-                                  ELocalisedDestWap );
-                    }
-                	break;
-                case ESnapPurposeMMS:
-                    {
-                    SetMetadataL( ESnapMetadataDestinationIsLocalised, 
-                                  ELocalisedDestMMS );
-                    iData->iMetaDataRec->iMetadata = 
-                        ESnapMetadataHiddenAgent | iData->iMetaDataRec->iMetadata;
-                    }
-                    break;
-                case ESnapPurposeIntranet:
-                    {
-                    SetMetadataL( ESnapMetadataDestinationIsLocalised,
-                                  ELocalisedDestIntranet );
-                    }
-                    break;
-                default:
-                    break;
-                }
-            
-            TUint32 value = aValue << 8;
-            // reset the purpose bit
-            iData->iMetaDataRec->iMetadata = ~ESnapMetadataPurpose & iData->iMetaDataRec->iMetadata;
-            // set the purpose bit
-            iData->iMetaDataRec->iMetadata = value | iData->iMetaDataRec->iMetadata;
-            }
-            break;
-
-        case ESnapMetadataHighlight:
-            {
-            if( aValue )
-                {
-                iData->iMetaDataRec->iMetadata = 
-                        ESnapMetadataHighlight | iData->iMetaDataRec->iMetadata;
-                }
-            else
-                {
-                iData->iMetaDataRec->iMetadata =
-                        ~ESnapMetadataHighlight & iData->iMetaDataRec->iMetadata;
-                }
-            }
-            break;
-            
-        case ESnapMetadataHiddenAgent:
-            {
-            TUint32 internet = iData->iMetaDataRec->iMetadata & ESnapMetadataInternet;
-            TUint32 internetLocal = ( iData->iMetaDataRec->iMetadata & ESnapMetadataDestinationIsLocalised ) >> 4;
-            TUint32 internetPurpose = ( iData->iMetaDataRec->iMetadata & ESnapMetadataPurpose ) >> 8;
-            if( aValue )
-                {
-                if ( internet
-                     || ( internetLocal == ELocalisedDestInternet )
-                     || ( internetPurpose == ESnapPurposeInternet ) )
-                    {
-                    User::Leave( KErrArgument );
-                    }
-
-                iData->iMetaDataRec->iMetadata = 
-                        ESnapMetadataHiddenAgent | iData->iMetaDataRec->iMetadata;
-                }
-            else
-                {
-                iData->iMetaDataRec->iMetadata = 
-                        ~ESnapMetadataHiddenAgent & iData->iMetaDataRec->iMetadata;
-                }
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrArgument );
-            }
-        }
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CreateEmbeddedDestinationPluginL()
-// -----------------------------------------------------------------------------
-//      
-void CCmDestinationImpl::CreateEmbeddedDestinationPluginL( 
-                                                        CPluginItem& aItem, 
-                                                        TInt aDestinationId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CreateEmbeddedDestinationPluginL" );
-
-    aItem.iPlugin = iCmMgr.CreateConnectionMethodL(KUidEmbeddedDestination, this); 
-    CleanupStack::PushL( aItem.iPlugin );
-    // Load this destination
-    aItem.iPlugin->LoadL( aDestinationId );
-    CleanupStack::Pop( aItem.iPlugin );        
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadEmbeddedDestinationPluginL()
-// -----------------------------------------------------------------------------
-//      
-void CCmDestinationImpl::LoadEmbeddedDestinationPluginL( 
-                                                        CPluginItem& aItem )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadEmbeddedDestinationPluginL" );
-
-    CreateEmbeddedDestinationPluginL(aItem, aItem.iDNRecord->ElementId());
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::LoadPluginL()
-// -----------------------------------------------------------------------------
-//      
-void CCmDestinationImpl::LoadPluginL( CPluginItem& aItem )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::LoadPluginL" );
-    
-    if( aItem.iPlugin )
-        {
-        return;
-        }
-        
-    TUint32 cmId;
-    if ( aItem.iDNRecord->iEmbeddedSNAP )
-        // This is an embedded destination
-        {
-        cmId = aItem.iDNRecord->iEmbeddedSNAP;
-        
-        }
-    else
-        // Normal IAP id
-        {
-        cmId = RECORD_FROM_ELEMENT_ID( aItem.iDNRecord->iIAP );
-        }
-
-    aItem.iPlugin = iCmMgr.DoFindConnMethodL( 
-                        cmId, 
-                        this );
-                        
-    CLOG_ATTACH( aItem.iPlugin, this );
-    }    
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::PluginClosed()
-// -----------------------------------------------------------------------------
-//
-void CCmDestinationImpl::PluginClosed( CCmPluginBase* aPlugin )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::PluginClosed" );
-
-    if (iData->iConnMethodArray)
-        {
-        for ( TInt i = 0; i < iData->iConnMethodArray->Count(); ++i )
-            {
-            if ( (*(iData->iConnMethodArray))[i]->iPlugin == aPlugin )
-                {
-                // Must NOT delete it here. Simply forget that
-                // we had this plugin instance.
-                (*(iData->iConnMethodArray))[i]->iPlugin = NULL;
-                
-                break;
-                }
-            }        
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationData::IsHiddenL()
-// -----------------------------------------------------------------------------
-//          
-TBool CCmDestinationData::IsHiddenL()
-    {
-    TSnapMetadataField hiddenValue = ( TSnapMetadataField )MetadataL( ESnapMetadataHiddenAgent );
-    if ( hiddenValue == ESnapMetadataHiddenAgent )
-        {
-    	return ETrue;
-        }
-    else
-        {
-    	return EFalse;
-        }
-    }    
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IsHiddenL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C TBool CCmDestinationImpl::IsHidden()
-    {
-    TBool hidden( EFalse );
-    TRAPD( err, hidden = iData->IsHiddenL() );
-    __ASSERT_ALWAYS( err == KErrNone, User::Panic(_L( "CMManager" ), err ) );
-    
-    return hidden;
-    }    
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetHiddenL()
-// -----------------------------------------------------------------------------
-//          
-EXPORT_C void CCmDestinationImpl::SetHiddenL( TBool aHidden )
-    {
-    if( ProtectionLevel() == EProtLevel1 )
-        {
-        CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl );
-        }
-    SetMetadataL( ESnapMetadataHiddenAgent, aHidden );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DeleteConnectionMethodsL
-//
-// Can be called only during opened transaction. 
-// Array is emptied only after transaction commited!
-//
-// -----------------------------------------------------------------------------
-//          
-void CCmDestinationImpl::DeleteConnectionMethodsL()
-    {
-    LOGGER_ENTERFN( "DeleteConnectionMethodsL" );
-    
-    TInt i;
-    
-    for ( i = 0; i < iData->iDeleteCmArray->Count(); ++i )
-        {
-        CPluginItem* item = (*iData->iDeleteCmArray)[i];
-        
-        LoadPluginL( *item );   
-
-        if( !(item->iFlags & CPluginItem::ERemoveCm) )
-            {
-            item->iPlugin->DeleteL( EFalse );
-            }
-            
-        item->iDNRecord->DeleteL( Session() );
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationData::ResetAndDestroyArray
-// -----------------------------------------------------------------------------
-//          
-void CCmDestinationData::ResetAndDestroyArray( CCmArray* &aArray, TBool aDestroy )
-    {
-    if( aArray )
-        {
-        for ( TInt i = 0; i < aArray->Count(); ++i )
-            {
-            CPluginItem* item = (*aArray)[i];
-            
-            delete item->iPlugin;
-            delete item->iDNRecord;
-            }
-            
-        aArray->ResetAndDestroy();
-        
-        if( aDestroy )
-            {
-            delete aArray; aArray = NULL;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DeleteIAPRecordsL
-// -----------------------------------------------------------------------------
-//          
-void CCmDestinationImpl::DeleteIAPRecordsL( CMDBRecordBase* aSnapRecord )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::DeleteIAPRecordsL" );
-
-    // First delete the metadata record
-    CCDIAPMetadataRecord* metaRec = new (ELeave) CCDIAPMetadataRecord( 
-                                        iCmMgr.SeamlessnessTableId() );
-                                        
-    CleanupStack::PushL( metaRec );
-
-    metaRec->iIAP = RECORD_FROM_ELEMENT_ID( 
-                                QUERY_INT_FIELD( 
-                                       aSnapRecord, 
-                                       KCDTIdDataMobilitySelectionPolicyIAP ) );
-
-    if( metaRec->FindL( Session() ) )
-        {
-        metaRec->DeleteL( Session() );
-        }
-        
-    CleanupStack::PopAndDestroy( metaRec );
-    
-    // and now delete the SNAP record
-    aSnapRecord->DeleteL( Session() );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfNameModifiedL
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::CheckIfNameModifiedL( CCDSnapRecord* aRecord )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfNameModifiedL" );
-            
-    if ( !TPtrC(iData->iDestAPRecord->iRecordName).CompareF( TPtrC(aRecord->iRecordName) ) )
-        // names matches
-        {
-        return;
-        }
-    
-    aRecord->iRecordName.SetL( TPtrC(iData->iDestAPRecord->iRecordName) );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IsConnectedL
-// -----------------------------------------------------------------------------
-EXPORT_C TBool CCmDestinationImpl::IsConnectedL() const
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::IsConnectedL" );
-
-    CCmDestinationImpl* myThis = const_cast<CCmDestinationImpl*>( this );
-    TBool retVal( EFalse );
-    TInt i;
-    
-    for( i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        
-        myThis->LoadPluginL( *item );
-            
-        if( item->iPlugin->GetBoolAttributeL( ECmConnected ) )
-            {
-            retVal = ETrue;
-            break;
-            }
-        }
-        
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfInternetExistsL
-//
-// There can be only one SNAP with Internet metadata field set.
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::CheckIfInternetExistsL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfInternetExistsL" );
-
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet = 
-           new ( ELeave ) CMDBRecordSet<CCDSNAPMetadataRecord>( 
-                                                 iCmMgr.IconTableId() );
-    CleanupStack::PushL( metaSet );
-
-    TRAP_IGNORE( metaSet->LoadL( Session() ) );
-
-    for ( TInt i = 0; i < metaSet->iRecords.Count(); ++i )
-        {
-        TInt meta = QUERY_INT_FIELD( metaSet->iRecords[i], 
-                                     KCDTIdSNAPMetadataMetadata );
-
-        if( meta & ESnapMetadataInternet )
-            {
-            if( Id() != QUERY_INT_FIELD( metaSet->iRecords[i], 
-                                                KCDTIdSNAPMetadataSNAP ) )
-                {
-                User::Leave( KErrAlreadyExists );
-                }
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( metaSet );
-    
-    RollbackTransaction();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ConnectionMethodIndex
-// -----------------------------------------------------------------------------
-TInt CCmDestinationImpl::ConnectionMethodIndex( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::ConnectionMethodIndex" );
-
-    TInt found( KErrNotFound );
-    
-    for ( TInt i = KCmInitIndex; i < iData->iConnMethodArray->Count(); ++i )
-        {
-        CPluginItem* item = (*(iData->iConnMethodArray))[i];
-        if ( RECORD_FROM_ELEMENT_ID(item->iDNRecord->iIAP) == aCmId ||
-             (item->iDNRecord->iEmbeddedSNAP == aCmId && aCmId != 0) )
-            {
-            found = i;
-            break;
-            }        
-        }
-        
-    return found;
-    }        
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IconIdL
-// -----------------------------------------------------------------------------
-CGulIcon* CCmDestinationImpl::IconIdL( CCmManagerImpl& aCmMgr,
-                                       TMDBElementId aId )
-    {
-    CGulIcon* retVal = NULL;
-    CCDSNAPMetadataRecord* metaDataRec = new (ELeave) CCDSNAPMetadataRecord( 
-                                                        aCmMgr.IconTableId() );
-    CleanupStack::PushL( metaDataRec );
-    metaDataRec->iSNAP = aId;
-                
-    if ( metaDataRec->FindL( aCmMgr.Session() ) )
-        // Not found -> fill in with default values
-        {
-        retVal = IconL( metaDataRec->iIcon );
-        }
-    else
-        {
-        User::Leave( KErrNotFound );
-        }
-        
-    CleanupStack::PopAndDestroy( metaDataRec );
-    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ProtectionLevelL
-// -----------------------------------------------------------------------------
-TProtectionLevel CCmDestinationImpl::ProtectionLevelL( CCmManagerImpl& aCmMgr, 
-                                                       TMDBElementId aId ) 
-    {
-    TProtectionLevel retVal( EProtLevel0 );
-    CCDSNAPMetadataRecord* metaDataRec = new (ELeave) CCDSNAPMetadataRecord( 
-                                                        aCmMgr.IconTableId() );
-    CleanupStack::PushL( metaDataRec );
-    metaDataRec->iSNAP = aId;
-                
-    if ( metaDataRec->FindL( aCmMgr.Session() ) )
-        // Not found -> fill in with default values
-        {
-        retVal = ProtectionLevel( metaDataRec );
-        }
-    else
-        {
-        User::Leave( KErrNotFound );
-        }
-        
-    CleanupStack::PopAndDestroy( metaDataRec );
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ProtectionLevel
-// -----------------------------------------------------------------------------
-TProtectionLevel CCmDestinationImpl::ProtectionLevel( 
-                                           CCDSNAPMetadataRecord* aMetaDataRec )
-    {
-    TInt protection = TUint32(aMetaDataRec->iMetadata) & 
-                      KSnapMetadataProtecionLevelMask;
-    return TProtectionLevel(protection >> 28);
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::ProtectionLevelL
-// -----------------------------------------------------------------------------
-CGulIcon* CCmDestinationImpl::IconL( TInt aIconIndex )
-    {
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-           
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                                     &KDC_BITMAP_DIR, 
-                                     NULL ) );
-                                     
-    TAknsItemID aknItemID;
-    aknItemID.Set( KDestinationIconConvTable[aIconIndex][0],
-                   KDestinationIconConvTable[aIconIndex][1] );
-           
-    CGulIcon* icon = AknsUtils::CreateGulIconL( 
-                            skinInstance, 
-                            aknItemID,
-                            mbmFile.FullName(), 
-                            KDestinationIconConvTable[aIconIndex][2], 
-                            KDestinationIconConvTable[aIconIndex][3] );
-                            
-    return icon;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::RemoveFromPool
-// -----------------------------------------------------------------------------
-EXPORT_C void CCmDestinationImpl::RemoveFromPool()
-    {
-    iCmMgr.RemoveDestFromPool(this);            
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IncrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::IncrementRefCounter()
-    {
-    iData->IncrementRefCounter();
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::DecrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::DecrementRefCounter()
-    {
-    iData->DecrementRefCounter();
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationData::IncrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmDestinationData::IncrementRefCounter()
-    {
-    iRefCounter++;
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationData::DecrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmDestinationData::DecrementRefCounter()
-    {
-    iRefCounter--;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationData::GetRefCounter
-// -----------------------------------------------------------------------------
-TInt CCmDestinationData::GetRefCounter()
-    {
-    return iRefCounter;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::GetRefCounter
-// -----------------------------------------------------------------------------
-TInt CCmDestinationImpl::GetRefCounter()
-    {
-    return iData->iRefCounter;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::GetData
-// -----------------------------------------------------------------------------
-CCmDestinationData* CCmDestinationImpl::GetData()
-    {
-    return iData;
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetData
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetData(CCmDestinationData* aData)
-    {
-    iData = aData;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationData::IdIsValid
-// -----------------------------------------------------------------------------
-TBool CCmDestinationData::IdIsValid()
-    {
-    return iIdIsValid;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::IdIsValid
-// -----------------------------------------------------------------------------
-TBool CCmDestinationImpl::IdIsValid()
-    {
-    return iData->iIdIsValid;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::Cmmgr
-// -----------------------------------------------------------------------------
-CCmManagerImpl* CCmDestinationData::Cmmgr()
-    {
-    return &iCmMgr;    
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::Cmmgr
-// -----------------------------------------------------------------------------
-CCmManagerImpl* CCmDestinationImpl::Cmmgr()
-    {
-    return &iCmMgr;    
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfLocalisedDestExistL
-//
-// There can be only one SNAP with a certain localised metadata field set.
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::CheckIfLocalisedDestExistL( TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfLocalisedDestExistL" );
-
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet = 
-                new ( ELeave ) CMDBRecordSet<CCDSNAPMetadataRecord>( iCmMgr.IconTableId() );
-    CleanupStack::PushL( metaSet );
-
-    TRAP_IGNORE( metaSet->LoadL( Session() ) );
-
-    for ( TInt i = 0; i < metaSet->iRecords.Count(); ++i )
-        {
-        TInt meta = QUERY_INT_FIELD( metaSet->iRecords[i], 
-                                     KCDTIdSNAPMetadataMetadata );
-
-        if ( meta & ESnapMetadataDestinationIsLocalised )
-            {
-            TInt locval = (meta & ESnapMetadataDestinationIsLocalised) >> 4;
-            if ( aValue == locval )
-                {
-                if( Id() != QUERY_INT_FIELD( metaSet->iRecords[i], KCDTIdSNAPMetadataSNAP ) )
-                    {
-                    User::Leave( KErrAlreadyExists );
-                    }
-                }
-            if ( aValue ==  ELocalisedDestInternet )
-                { // internet might also be set the 'old way', check it!
-                if( meta & ESnapMetadataInternet )
-                    {
-                    if( Id() != QUERY_INT_FIELD( metaSet->iRecords[i], KCDTIdSNAPMetadataSNAP ) )
-                        {
-                        User::Leave( KErrAlreadyExists );
-                        }
-                    }                
-                }
-            }            
-        }
-
-    CleanupStack::PopAndDestroy( metaSet );
-
-    RollbackTransaction();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfPurposeExistL
-//
-// There can be only one SNAP with a certain purpose metadata field set.
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::CheckIfPurposeExistL( TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::CheckIfPurposeExistL" );
-
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet = 
-                new ( ELeave ) CMDBRecordSet<CCDSNAPMetadataRecord>( iCmMgr.IconTableId() );
-    CleanupStack::PushL( metaSet );
-
-    TRAP_IGNORE( metaSet->LoadL( Session() ) );
-
-    for ( TInt i = 0; i < metaSet->iRecords.Count(); ++i )
-        {
-        TInt meta = QUERY_INT_FIELD( metaSet->iRecords[i], 
-                                     KCDTIdSNAPMetadataMetadata );
-
-        if ( meta & ESnapMetadataPurpose )
-            {
-            TInt purVal = ( meta & ESnapMetadataPurpose ) >> 8;
-            if ( aValue == purVal )
-                {
-                if( Id() != QUERY_INT_FIELD( metaSet->iRecords[i], 
-                                        KCDTIdSNAPMetadataSNAP ) )
-                    {
-                    User::Leave( KErrAlreadyExists );
-                    }
-                }
-            }            
-        }
-
-    CleanupStack::PopAndDestroy( metaSet );
-
-    RollbackTransaction();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::InitializeDestAPRecordL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::InitializeDestAPRecordL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::InitializeDestAPRecordL" );
-
-    SetDefaultTierManagerL();
-    SetDefaultMCprL();
-    SetDefaultCprL();
-    SetDefaultSCprL();
-    SetDefaultProtocolL();
-    iData->iDestAPRecord->iCustomSelectionPolicy = 0;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetDefaultTierManagerL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetDefaultTierManagerL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetDefaultTierManagerL" );
-
-    CCDTierRecord* tierRec = static_cast<CCDTierRecord *>
-                               ( CCDRecordBase::RecordFactoryL( KCDTIdTierRecord ) );
-    CleanupStack::PushL( tierRec );
-
-    tierRec->iRecordTag = KDefaultTierManagerTagId;
-
-    if ( tierRec->FindL( Session() ) )
-        {
-        iData->iDestAPRecord->iTier = tierRec->ElementId();
-        }
-    else
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    CleanupStack::PopAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetDefaultMCprL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetDefaultMCprL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetDefaultMCprL" );
-
-    CCDMCprRecord* mcprRec = static_cast<CCDMCprRecord *>
-                             ( CCDRecordBase::RecordFactoryL( KCDTIdMCprRecord ) );
-    CleanupStack::PushL( mcprRec );
-
-    mcprRec->SetRecordId( 1 );
-
-    mcprRec->LoadL( Session() );
-	
-	iData->iDestAPRecord->iMCpr = mcprRec->ElementId();
-
-    CleanupStack::PopAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetDefaultCprL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetDefaultCprL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetDefaultCprL" );
-
-    CCDCprRecord* cprRec = static_cast<CCDCprRecord *>
-                             ( CCDRecordBase::RecordFactoryL( KCDTIdCprRecord ) );
-    CleanupStack::PushL( cprRec );
-
-    cprRec->SetRecordId( 1 );
-
-    cprRec->LoadL( Session() );
-	iData->iDestAPRecord->iCpr = cprRec->ElementId();
-
-    CleanupStack::PopAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetDefaultSCprL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetDefaultSCprL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetDefaultSCprL" );
-
-    CCDSCprRecord* scprRec = static_cast<CCDSCprRecord *>
-                             ( CCDRecordBase::RecordFactoryL( KCDTIdSCprRecord ) );
-    CleanupStack::PushL( scprRec );
-
-    scprRec->SetRecordId( 1 );
-
-    scprRec->LoadL( Session() );
-	iData->iDestAPRecord->iSCpr = scprRec->ElementId();
-
-    CleanupStack::PopAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::SetDefaultProtocolL
-//
-// 
-// -----------------------------------------------------------------------------
-void CCmDestinationImpl::SetDefaultProtocolL()
-    {
-    LOGGER_ENTERFN( "CCmDestinationImpl::SetDefaultProtocolL" );
-
-    CCDProtocolRecord* protocolRec = static_cast<CCDProtocolRecord *>
-                             ( CCDRecordBase::RecordFactoryL( KCDTIdProtocolRecord ) );
-    CleanupStack::PushL( protocolRec );
-
-    protocolRec->SetRecordId( 1 );
-
-    protocolRec->LoadL( Session() );
-	iData->iDestAPRecord->iProtocol = protocolRec->ElementId();
-
-    CleanupStack::PopAndDestroy();
-    }
-
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::CheckIfCMExists
-//
-// 
-// -----------------------------------------------------------------------------
-TBool CCmDestinationImpl::CheckIfCMExistsL( CCmPluginBase& aConnectionMethod )
-    {
-    TRAPD( err, (void)FindConnectionMethodL( aConnectionMethod ) );
-    if ( err )
-        {
-        if ( err == KErrNotFound )
-            {
-            return EFalse;
-            }
-        else
-            {
-            User::Leave( err );
-            }
-        }
-
-    return ETrue;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2032 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CCmDlg
-*
-*/
-
-#include <avkon.hrh>
-#include <eikdef.h>
-#include <eikenv.h>
-#include <eikedwin.h>
-#include <cmmanager.rsg>
-#include <data_caging_path_literals.hrh>
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <eikmenup.h>
-#include <StringLoader.h>
-#include <AknIconArray.h>
-#include <aknnavilabel.h>
-#include <cmmanager.mbg>
-#include <cmpluginembdestinationdef.h>
-#include <featmgr.h>
-
-#include <hlplch.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include "cmdlg.h"
-#include "cmmanager.hrh"
-#include "cmlistitem.h"
-#include "cmlistitemlist.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include "cmdestinationimpl.h"
-#include <cmcommonui.h>
-#include <cmcommonconstants.h>
-#include <cmpbasesettingsdlg.h>
-#include "cmwizard.h"
-#include "selectdestinationdlg.h"
-#include <cmmanagerdef.h>
-#include <mcmdexec.h>
-#include "ccmdexec.h"
-#include "destdlg.h"
-#include "cmlogger.h"
-#include "cmconnsettingsuiimpl.h"
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// ---------------------------------------------------------------------------
-// CCmDlg::ConstructAndRunLD
-// Constructs the dialog and runs it.
-// ---------------------------------------------------------------------------
-//
-TInt CCmDlg::ConstructAndRunLD(  TUint32 aHighlight,
-                                          TUint32& aSelected )
-    {
-    CleanupStack::PushL( this );
-
-    iHighlight = aHighlight;
-    iSelected = &aSelected;
-    
-    ConstructL( R_CM_MENUBAR );
-    PrepareLC( R_CM_DIALOG );
-    CleanupStack::Pop( this );
-
-    iModel = new( ELeave )CCmListboxModel();
-    
-    iCmDestinationImpl = iCmManager->DestinationL( iDestUid );
-    
-    iInfoPopupNoteController = CAknInfoPopupNoteController::NewL();
-    
-    // Trace changes in CommsDat
-    iCmManager->WatcherRegisterL( this );
-        
-    return RunLD();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// ---------------------------------------------------------------------------
-//
-CCmDlg* CCmDlg::NewL(CCmManagerImpl* aCmManager, TUint32 aDestUid,
-                     CDestDlg* aDestDlg)
-    {
-    CCmDlg* self = new (ELeave) CCmDlg( aCmManager, aDestUid, aDestDlg );
-    return self;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::CCmDlg()
-// ---------------------------------------------------------------------------
-//
-CCmDlg::CCmDlg( CCmManagerImpl* aCmManager, TUint32 aDestUid,
-                CDestDlg* aDestDlg )
-    : iModelPassed( EFalse )
-    , iCmManager( aCmManager )
-    , iDestUid ( aDestUid )
-    , iPrioritising ( EFalse )
-    , iExitReason( KDialogUserExit )
-    , iEscapeArrived( EFalse )
-    , iExitduringProcessing( EFalse )
-    , iBackduringProcessing( EFalse )
-    , iDestDlg( aDestDlg )
-    , iPluginExitExceptionally( EFalse )
-    {
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::~CCmDlg
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CCmDlg::~CCmDlg()
-    {
-    // iModel is deleted by the ListBox because LB owns the model...
-    // of course only after we passed ownership...
-    if ( !iModelPassed )
-        {
-        delete iModel;
-        }
-        
-    delete iNaviDecorator;
-    
-    if ( iTitlePane )
-        {
-        // set old text back, if we have it...
-        if ( iOldTitleText )
-            {
-            if ( iExitReason == KDialogUserBack || iPluginExitExceptionally  )
-                {
-                TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
-                }
-            delete iOldTitleText; iOldTitleText = NULL;
-            }
-        }    
-        
-    delete iOldTitleText;
-    
-    if(iCmDestinationImpl)
-        {
-        delete iCmDestinationImpl;
-        iCmDestinationImpl = NULL;
-        }    
-    
-    if ( iInfoPopupNoteController )
-        {
-        delete iInfoPopupNoteController;
-        }
-        
-    if( iCmWizard )
-        {
-        delete iCmWizard;
-        }
-    iItemIndex.Close();
-    
-    delete iCmdExec;
-    iCmdExec = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::PreLayoutDynInitL();
-// called by framework before dialog is shown
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::PreLayoutDynInitL()
-    {
-    iListbox = STATIC_CAST( CCmListbox*, Control( KCmListboxId ) );
-    iListbox->CreateScrollBarFrameL( ETrue );
-    iListbox->ScrollBarFrame()->SetScrollBarVisibilityL
-                        ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-    iListbox->SetListBoxObserver( this );
-
-    iListbox->Model()->SetItemTextArray( iModel );
-    iModelPassed = ETrue;
-    InitTextsL();
-    HandleListboxDataChangeL();
-    iListbox->HandleItemAdditionL();
-    
-    if ( iHighlight )
-        {
-        iListbox->ScrollToMakeItemVisible( iHighlight );
-        iListbox->SetCurrentItemIndex( iHighlight );
-        }    
-    }
-    
-// --------------------------------------------------------------------------
-// CCmDlg::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::DynInitMenuPaneL( TInt aResourceId,
-                                        CEikMenuPane* aMenuPane )
-    {
-    CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane );        
-    
-    if ( aResourceId == R_CM_MENU )
-        {
-    	if ( !iCmManager->IsHelpOn() )
-            {
-            aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-            }
-        // Menu items
-    	TBool hideEdit      ( EFalse );
-        TBool hideAdd       ( EFalse );
-        TBool hideRename    ( EFalse );
-        TBool hideDelete    ( EFalse );
-        TBool hideCopy      ( EFalse );
-        TBool hideMove      ( EFalse );
-        TBool hidePrioritise( EFalse );
-           
-        // Edit, Rename, Delete and Organise menu items are hidden if:
-        // 1. CM List is empty
-        // 2. Embedded Destinations
-        if ( !( iListbox->Model()->ItemTextArray()->MdcaCount() ) )
-            {
-            hidePrioritise = ETrue;
-            hideEdit = ETrue;
-            hideRename  = ETrue;
-            hideDelete  = ETrue;
-            hideCopy = ETrue;
-            hideMove = ETrue;
-            }
-        // Embedded destinations can be deleted but not edited
-        else if ( ( CurrentCML()->GetBoolAttributeL(ECmDestination) ) )
-            {
-            hideRename  = ETrue;
-            }
-        // Only one CM in the list OR highlighted CM is a virtual CM
-        else if ( ( iListbox->Model()->ItemTextArray()->MdcaCount() == 1 ) )
-            {
-            hidePrioritise = ETrue;
-            }            
-        // virtual CMs pointing to destinations
-        else if ( CurrentCML()->GetBoolAttributeL( ECmVirtual ) )
-            {
-            if ( CurrentCML()->GetIntAttributeL( ECmNextLayerSNAPId ) )
-                {
-                hidePrioritise = ETrue;
-                }
-            }
- 
-        // All item specific options need to be dimmed if in prioritising view
-        if ( iPrioritising )
-            {
-            hideEdit = ETrue;
-            hideAdd = ETrue;
-            hideRename = ETrue;
-            hideDelete = ETrue;
-            hideCopy = ETrue;
-            hideMove = ETrue;
-            hidePrioritise = ETrue;           
-            }
-
-        // Show or hide menu items
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmEdit,    hideEdit );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmAdd,     hideAdd );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmRename,  hideRename );            
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmDelete,  hideDelete );    
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmPrioritise, hidePrioritise );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmMoveToOtherDestination, hideMove );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmCopyToOtherDestination, hideCopy ); 
-        }   
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::InitTextsL
-// called before the dialog is shown
-// to initialize localized textual data
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    HBufC* primary = 
-              iEikonEnv->AllocReadResourceLC( R_CMMANAGERUI_EMPTY_METHOD_VIEW_PRIMARY );
-    HBufC* secondary = 
-              iEikonEnv->AllocReadResourceLC( R_CMMANAGERUI_EMPTY_METHOD_VIEW_SECONDARY );
-    CDesCArrayFlat* items = new (ELeave) CDesCArrayFlat(2);
-    CleanupStack::PushL(items);
-    items->AppendL(primary->Des()); 
-    items->AppendL(secondary->Des());      
-    HBufC* emptyText = 
-          StringLoader::LoadLC( R_TWO_STRING_FOR_EMPTY_VIEW , *items);              
-    iListbox->View()->SetListEmptyTextL( *emptyText );    
-    CleanupStack::PopAndDestroy( emptyText );
-    CleanupStack::PopAndDestroy( items );
-    CleanupStack::PopAndDestroy( secondary );
-    CleanupStack::PopAndDestroy( primary );
-
-    iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-    iTitlePane = ( CAknTitlePane* )iStatusPane->ControlL(
-                                          TUid::Uid( EEikStatusPaneUidTitle ) );
-
-    iOldTitleText = iTitlePane->Text()->AllocL();
-    HBufC* name = iCmDestinationImpl->NameLC();
-    iTitlePane->SetTextL( *name );
-    CleanupStack::PopAndDestroy( name );
-
-    iNaviPane = ( CAknNavigationControlContainer* ) 
-                    iStatusPane->ControlL( 
-                            TUid::Uid( EEikStatusPaneUidNavi ) );
-    iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-    iNaviPane->PushL( *iNaviDecorator );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::SetNoOfCMsL
-// ---------------------------------------------------------------------------
-//
-
-void CCmDlg::SetNoOfCMsL(TInt aCount)
-    {
-    if ( iNaviDecorator )
-        {
-        if ( iNaviDecorator->ControlType() == 
-             CAknNavigationDecorator::ENaviLabel)
-            {
-            CAknNaviLabel* naviLabel = 
-                            (CAknNaviLabel*)iNaviDecorator->DecoratedControl();
-            if (aCount)
-                {
-                HBufC* title = NULL;
-                
-                if (aCount == 1)
-                    {
-                    title = StringLoader::LoadLC( 
-                                           R_CMMANAGERUI_NAVI_ONE_CONN_METHOD );
-                    }
-                else
-                    {
-                    title = StringLoader::LoadLC( 
-                                           R_CMMANAGERUI_NAVI_MANY_CONN_METHODS, 
-                                           aCount );
-                    }
-                    
-                naviLabel->SetTextL(*title);
-                  CleanupStack::PopAndDestroy( title );
-                }
-            else
-                {
-                naviLabel->SetTextL(KNullDesC);
-                }
-                
-            iNaviPane->PushL( *iNaviDecorator );
-            }
-        }
-      
-    }
-
-//----------------------------------------------------------
-// CCmDlg::CreateCustomControlL
-//----------------------------------------------------------
-//
-SEikControlInfo CCmDlg::CreateCustomControlL( TInt aControlType )
-    {
-    SEikControlInfo controlInfo;
-    controlInfo.iTrailerTextId = 0;
-    controlInfo.iFlags = 0;
-    if ( aControlType == KCmListboxType )
-        {
-        controlInfo.iControl = new ( ELeave ) CCmListbox;
-        }
-    else
-        {
-        controlInfo.iControl = NULL;
-        }
-    return controlInfo;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// ---------------------------------------------------------------------------
-//
-TBool CCmDlg::OkToExitL( TInt aButtonId )
-    {
-    LOGGER_ENTERFN( "CCmDlg::OkToExitL" );
-
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    // Dialog should not exit
-    TBool retVal( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case ECmManagerUiCmdCmEdit:
-            {
-            if ( !iProcessing )
-                {
-                if ( CMCount() )
-                    {
-                    iProcessing = ETrue;
-                    ProcessCommandL( aButtonId );
-                    iProcessing = EFalse;
-                    }
-                else
-                    {
-                    iProcessing = ETrue;
-                    AddConnectionMethodL();
-                    iProcessing = EFalse;
-                    }
-                }
-            break;
-            }
-        case EAknSoftkeyClear:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }
-        case ECmManagerUiCmdCmPrioOk:
-            {
-            if ( iPrioritising )
-                {
-                FinishPriorizingL( ETrue );
-                }
-                
-            break;
-            }               
-       case ECmManagerUiCmdCmPrioCancel:            
-            {
-            if ( !MenuShowing() )            
-                {
-                if ( iPrioritising )
-                    {
-                    FinishPriorizingL( EFalse );
-                    }
-                }            
-            break;
-            }           
-        case ECmManagerUiCmdCmUserExit:
-            {
-            iCmManager->WatcherUnRegister();
-                        
-            iExitReason = KDialogUserExit;
-            break;
-            }
-        case EAknSoftkeyBack:
-            {
-            iCmManager->WatcherUnRegister();
-            iExitReason = KDialogUserBack;
-            
-            if ( !iProcessing )
-                {
-                *iSelected = 0;
-                TryExitL( iExitReason );
-                }
-            else
-                {
-                iBackduringProcessing = ETrue;
-                }
-            break;
-            }
-        default:
-            {
-            if ( !iProcessing )
-                {
-                if ( aButtonId == EAknSoftkeyOptions )
-                    {
-                    DisplayMenuL();
-                    }
-                else
-                    {
-                    retVal = ETrue;
-                    }
-                }
-            if ( iProcessing )
-                {
-                iExitduringProcessing = ETrue;
-                if( aButtonId == KDialogUserExit )
-                    {
-                    retVal = ETrue;
-                    } 
-                
-                if ( iPluginExitExceptionally )
-                    {
-                    retVal = ETrue;
-                    }
-                }
-            break;
-            }
-        }
-    return retVal;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                  TListBoxEvent aEventType )
-    {
-    LOGGER_ENTERFN( "CCmDlg::HandleListBoxEventL" );
-
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-            {
-            if ( iPrioritising )
-                {
-                FinishPriorizingL( ETrue );
-                }
-            else
-                {
-                if ( !iProcessing )
-                    {
-                    delete iCmdExec;
-                    iCmdExec = NULL;
-                    iCmdExec = new (ELeave) CCmdExec(*this);
-                    iCmdExec->Execute();
-                    }
-                }           
-            break;            
-            }
-        case EEventItemSingleClicked:
-            {
-            if ( !iProcessing )
-                {
-                delete iCmdExec;
-                iCmdExec = NULL;
-                iCmdExec = new (ELeave) CCmdExec(*this);
-                iCmdExec->Execute();
-                }
-            break;
-            }
-        case EEventEditingStarted:
-            {
-            break;
-            }
-        case EEventEditingStopped:
-            {
-            break;
-            }
-        default:
-            {
-            break;
-            };
-        };
-    }
-       
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::ProcessCommandL
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::ProcessCommandL( TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CCmDlg::ProcessCommandL" );
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {        
-        // Connection Method Modification Commands
-        case ECmManagerUiCmdCmAdd:
-            {
-            if ( !iProcessing )
-                {
-                iProcessing = ETrue;
-                TRAPD( err, AddConnectionMethodL() );
-                // Memory full
-                if (err == KLeaveWithoutAlert || err == KErrNoMemory)
-                    {
-                    iProcessing = EFalse;
-                    return;
-                    }
-                iProcessing = EFalse;
-
-                if ( iBackduringProcessing )
-                    {
-                    iBackduringProcessing = EFalse;
-                    TryExitL( KDialogUserBack );
-                    }
-                }
-            break;
-            }
-
-        case ECmManagerUiCmdCmRename:            
-            {
-            RenameConnectionMethodL();
-            break;
-            }
-            
-        case EAknSoftkeyClear:
-        case ECmManagerUiCmdCmDelete:            
-            {
-            if ( iPrioritising )
-                {
-                // Delete cannot be done if priorising has started.
-                break;
-                }
-            DeleteCurrentCmL();         
-            break;
-            }
-            
-        case ECmManagerUiCmdCmPrioritise:            
-            {
-            PrioritiseConnectionMethodL();
-            break;
-            }
-            
-        case ECmManagerUiCmdCmCopyToOtherDestination:            
-            {
-            CopyConnectionMethodL();            
-            break;
-            }
-            
-        case ECmManagerUiCmdCmMoveToOtherDestination:            
-            {            
-            MoveConnectionMethodL();
-            break;
-            }
-            
-        case EAknSoftkeyOk:
-        case ECmManagerUiCmdCmEdit:
-            {
-            EditConnectionMethodL();
-            break;
-            }   
-
-        // Button Selection commands
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-            
-        case ECmManagerUiCmdCmUserExit:
-            {
-            if (!iProcessing)
-                {
-                *iSelected = 0;
-                iExitReason = KDialogUserExit;
-                TryExitL( iExitReason );
-                }
-            break;
-            }
-            
-        case EAknSoftkeyBack:
-            {
-            if (!iProcessing)
-                {
-                *iSelected = 0;
-                iExitReason = KDialogUserBack;
-                TryExitL( iExitReason );
-                }
-            break;
-            }
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                                    iEikonEnv->EikAppUi()->AppHelpContextL() );
-            }
-            break;
-
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::DeleteCurrentCmL
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::DeleteCurrentCmL( )
-    {
-    LOGGER_ENTERFN( "CCmDlg::DeleteCurrentCmL" );
-
-    TCmDefConnValue oldConn;
-    if (iCmManager->IsDefConnSupported())
-        {
-        iCmManager->ReadDefConnL( oldConn );
-        }
-    CCmPluginBase* cm = CurrentCML();
-    if ( !cm )
-    	{
-    	return;
-    	}
-
-    if ( cm->GetBoolAttributeL( ECmProtected ) )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-                                
-        return;
-        }
-   
-    if ( cm->GetBoolAttributeL( ECmIsLinked ) )//same check as KErrLocked below
-        {
-        TCmCommonUi::ShowNoteL( 
-                            R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                            TCmCommonUi::ECmErrorNote );
-        
-        return;
-        }
-   
-    if ( cm->GetBoolAttributeL( ECmConnected ) )//same check as KErrInUse below
-        {
-        TCmCommonUi::ShowNoteL( R_CMMANAGERUI_INFO_CM_IN_USE_CANNOT_DELETE,
-                                TCmCommonUi::ECmErrorNote );
-        
-        return;
-        }
-
-    // EKOA-74KC3L: check if it is the last CM in a destination being referenced
-    // by a VPN
-    if ( iCmDestinationImpl &&
-         iCmDestinationImpl->ConnectionMethodCount() == 1 )
-        {
-        // it is definitely the last, but is it referenced?
-
-        // for each IAP in CM manager
-        //   1. check if it is virtual
-        //      if not => goto 1.
-        //      if yes:
-        //      2. check if it links to the destination of this CM
-        //         if yes => carryOn = EFalse, ERROR
-        //         if not: carryOn = ETrue
-
-        CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* iaps = 
-                                                    iCmManager->AllIapsL();
-        
-        CleanupStack::PushL( iaps );
-        
-        TBool carryOn = ETrue;
-        TUint32 destId = iCmDestinationImpl->Id();
-
-        // for each IAP in CM manager
-        for ( TInt i = 0; carryOn && i < iaps->iRecords.Count(); ++i )
-            {
-            CommsDat::CCDIAPRecord* rec = (*iaps)[i];
-            TUint32 bearerType = 0;
-            
-            TRAP_IGNORE( bearerType = 
-                             iCmManager->BearerTypeFromIapRecordL( rec ) );
-            if ( !bearerType )
-                {
-                continue;
-                }
-                
-            // check if it is virtual
-            if ( iCmManager->GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                // check if it links to the current destination
-                CCmPluginBase* plugin = NULL;            
-                TRAP_IGNORE( plugin = iCmManager->GetConnectionMethodL( 
-                                                           rec->RecordId() ) );
-
-                if ( !plugin )
-                    {
-                    continue;
-                    }
-                
-                if ( plugin->IsLinkedToSnap( destId ) )
-                    {
-                    // the CM links to this destination, deletion not allowed
-                    carryOn = EFalse;
-                    }
-
-                delete plugin;
-                }
-                    
-            }
-            
-        CleanupStack::PopAndDestroy( iaps );
-        
-        if ( !carryOn )
-            {
-            TCmCommonUi::ShowNoteL( R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                                TCmCommonUi::ECmErrorNote );
-            return;            
-            }
-        
-        }
-    
-
-    // If it's an embedded destination, show a warning
-    TBool showCmDeleteQuery( ETrue );
-    if ( cm->GetBoolAttributeL( ECmDestination ) )
-        {
-        if ( TCmCommonUi::ShowConfirmationQueryL(
-                            R_CMMANAGERUI_QUEST_EMBEDDED_DEST_DELETE ) )
-            {
-            // user wants to delete, set flag to avoid 2nd query message
-            showCmDeleteQuery = EFalse;
-            }
-        else
-            {
-            return; // user cancelled delete request
-            }
-        }
-
-    HBufC* cmName = cm->GetStringAttributeL( ECmName );
-    CleanupStack::PushL( cmName );
-    
-    // Query for CM deletion - which will be skipped in the case of embedded 
-    // destintations
-    // Protected CM's cannot be deleted either
-    if ( !showCmDeleteQuery || iAlreadyConfirmedDelete ||
-         TCmCommonUi::ShowConfirmationQueryL( 
-                                    R_CMMANAGERUI_QUEST_CM_DELETE,
-                                    *cmName ) )
-        {
-        TInt err = KErrNone;
-        if ( iCmDestinationImpl )
-            {
-            TRAP( err, iCmDestinationImpl->DeleteConnectionMethodL( *cm ) );
-            }
-        else
-            {
-            TRAP( err, (void)cm->DeleteL( ETrue ) );
-            }
-        
-        switch ( err )
-            {
-            case KErrInUse: //shouldn't get here, already checked above
-                {
-                TCmCommonUi::ShowNoteL
-                    ( R_CMMANAGERUI_INFO_CM_IN_USE_CANNOT_DELETE,
-                    TCmCommonUi::ECmErrorNote );
-                }
-                break;
-                
-            case KErrLocked://shouldn't get here, already checked above
-                {
-                TCmCommonUi::ShowNoteL
-                    ( R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                      TCmCommonUi::ECmErrorNote );
-                }
-                break;
-                
-            case KErrNone:
-                {
-                if ( iCmDestinationImpl )
-                    {
-                    iCmDestinationImpl->UpdateL();
-                    }
-                if (iCmManager->IsDefConnSupported())
-                    {
-                    iDestDlg->ShowDefaultConnectionNoteL( oldConn );
-                    }
-                HandleListboxDataChangeL();
-                iListbox->HandleItemRemovalL();
-                }
-                break;
-
-            default:
-                {
-                }
-                break;
-            }
-        }
-
-    CleanupStack::PopAndDestroy( cmName );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::RenameConnectionMethodL    
-// --------------------------------------------------------------------------
-//
-void CCmDlg::RenameConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::RenameConnectionMethodL" );
-
-    CCmPluginBase* cm = CurrentCML();
-    if ( !cm )
-        {
-        return;
-        }
-
-    if ( cm->GetBoolAttributeL( ECmProtected ) )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-
-    if ( CurrentCmInUseL() )
-        {
-        return;
-        } 
-           
-    TBuf<KConnMethodNameMaxLength> buf;
-    
-    HBufC* cmName = cm->GetStringAttributeL(ECmName);
-    CleanupStack::PushL(cmName);
-    buf.Copy(*cmName);
-    
-    // Saves the recent naming method and set it to "Not accept"
-    TUint32 savedNM = cm->GetIntAttributeL( ECmNamingMethod );
-    cm->SetIntAttributeL( ECmNamingMethod, ENamingNotAccept );
-
-    // Asks the new name
-    TBool go = ETrue;
-    TInt ret = TCmCommonUi::ShowConfirmationQueryWithInputL(
-                                                R_CMMANAGERUI_PRMPT_CM_MAME,
-                                                buf );
-    
-    // While the name is not unique or cancel pressed
-    while( ret && go )
-        {
-        // Tries to save the nem name. If it is not unique
-        // then ret == KErrArgument
-        TRAPD( err, cm->SetStringAttributeL( ECmName, buf ) );
-
-        if( KErrArgument == err )
-            {
-            // Opens a info note
-            HBufC* noteLine = StringLoader::LoadLC(
-                    R_CMMANAGERUI_INFO_CM_ALREADY_IN_USE, buf );
-
-            TCmCommonUi::ShowNoteL( *noteLine, TCmCommonUi::ECmInfoNote );
-
-            CleanupStack::PopAndDestroy( noteLine );
-
-            // Asks the new name again
-            ret = TCmCommonUi::ShowConfirmationQueryWithInputL(
-                                                R_CMMANAGERUI_PRMPT_CM_MAME,
-                                                buf );
-            }
-        else
-            {
-            // New name is unique loop can stop
-            go = EFalse;
-            }    
-        }
-
-    // Sets back the original naming method
-    cm->SetIntAttributeL( ECmNamingMethod, savedNM );
-
-    // If not cancel pressed the new name is set
-    if( ret )
-        {
-        cm->UpdateL();
-        
-        HandleListboxDataChangeL();
-        }
-   
-    CleanupStack::PopAndDestroy( cmName );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::PrioritiseConnectionMethodL    
-// --------------------------------------------------------------------------
-//
-void CCmDlg::PrioritiseConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::PrioritiseConnectionMethodL" );
-    
-    ButtonGroupContainer().SetCommandSetL( R_SOFTKEYS_PRIO_OK_CANCEL__OK );
-    iListbox->View()->SelectItemL( iListbox->CurrentItemIndex() );
-    iListbox->View()->DrawItem( iListbox->CurrentItemIndex() );
-    ButtonGroupContainer().DrawNow();
-    iPrioritising = ETrue;
-    iCmToPrioritise = iListbox->CurrentItemIndex();
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::AddConnectionMethodL    
-// --------------------------------------------------------------------------
-//
-void CCmDlg::AddConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::AddConnectionMethodL" );
-
-    // Check first if parent destination is protected
-    if ( iCmDestinationImpl && 
-         iCmDestinationImpl->ProtectionLevel() == CMManager::EProtLevel1 )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-
-    // Opens a Connection method creation wizard
-    iCmWizard = new (ELeave) CCmWizard( *iCmManager );
-
-    TInt itemstemp = iListbox->Model()->NumberOfItems();
-
-    TInt ret( KErrNone );
-    TRAPD( err, ret = iCmWizard->CreateConnectionMethodL( iCmDestinationImpl ) );
-    if ( err )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                TCmCommonUi::ECmErrorNote );
-        ret = KErrCancel;
-        }
-    delete iCmWizard;
-    iCmWizard = NULL;
-
-
-    // If application wanted to be closed before then RunAppShutter()
-    // should be called here                
-    if( iEscapeArrived )
-        {
-        ( ( CAknAppUi* )iEikonEnv->EikAppUi() )->RunAppShutter();
-        }
-    
-    if( ret != KErrCancel )
-        {
-        iHighlight = ret;
-
-
-        // Update the middle soft key if this is the first cm added
-        if ( CMCount() == 1 )
-            {
-            HBufC* text = StringLoader::LoadLC( R_QTN_MSK_EDIT );
-            ButtonGroupContainer().SetCommandL( ECmManagerUiCmdCmEdit, 
-                                                    *text );
-            CleanupStack::PopAndDestroy( text );
-            }
-        
-        //HandleListboxDataChangeL();
-        TRAP( err, HandleListboxDataChangeL() );
-        if ( err )
-            {
-            TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                    TCmCommonUi::ECmErrorNote );
-            return;
-            }
-        iListbox->HandleItemAdditionL();
-    
-        if (itemstemp < iListbox->Model()->NumberOfItems())
-            {
-            //first item cannot be deleted
-            iListbox->ScrollToMakeItemVisible( 
-                                    iListbox->Model()->NumberOfItems() -1 );
-            iListbox->SetCurrentItemIndex( iHighlight );
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::CopyConnectionMethodL    
-// --------------------------------------------------------------------------
-//
-void CCmDlg::CopyConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::CopyConnectionMethodL" );
-
-    CCmPluginBase* cm = CurrentCML();
-    if ( !cm )
-        {
-        return;
-        }
-    
-    if ( cm->GetBoolAttributeL( ECmProtected ) ||
-        ( iCmDestinationImpl && 
-         iCmDestinationImpl->ProtectionLevel() == CMManager::EProtLevel1 ) )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-
-    TUint32 destId( 0 );
-    
-    // build an array of possible parent destinations
-    TInt destCount=0;
-    TRAPD( retVal, destCount = iCmManager->DestinationCountL() );
-    if( retVal != KErrNone || destCount < 1 )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_DESTINATION,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-        
-    RArray<TUint32> destArray( iCmManager->DestinationCountL() );
-    CleanupClosePushL( destArray );
-    
-    iCmManager->AllDestinationsL( destArray );
-    
-    // drop current destination (don't ask why)
-    if ( iCmDestinationImpl ) 
-        {
-        destId = iCmDestinationImpl->Id();
-        
-        TInt index = destArray.Find( destId );
-        if ( index != KErrNotFound )
-            {
-            destArray.Remove( index );
-            }
-        }
-    
-    
-    // now filter the destinations
-    CurrentCML()->FilterPossibleParentsL( destArray );
-
-    // check if there are any remaining destinations
-    if ( !destArray.Count() )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_VPN_STACKING,
-                                TCmCommonUi::ECmErrorNote );        
-        CleanupStack::PopAndDestroy( &destArray );
-        return;
-        }
-
-    // create a copy of the current connection method
-    CCmPluginBase* cmCopy = cm->CreateCopyL();
-    CleanupStack::PushL( cmCopy );
-
-    // ok, there is at least 1, pop up the dialog
-    CSelectDestinationDlg* dlg = CSelectDestinationDlg::NewL( destId, 
-                                                              *iCmManager, 
-                                                              &destArray );
-
-    if ( dlg->ExecuteLD( R_CMMANAGER_LIST_QUERY_WITH_MSGBOX ) )
-        {
-        CCmDestinationImpl* dest = iCmManager->DestinationL( destId );
-        CleanupStack::PushL( dest ); 
-        if ( iCmDestinationImpl )
-            {
-            // store it in commsdat
-            cmCopy->UpdateL();
-            dest->AddConnectionMethodL( *cmCopy );
-            }
-        else
-            {
-            iCmManager->CopyConnectionMethodL( *dest, *( cm ) );
-            }
-
-        // Rare but UpdateL can leave that cause crash
-        TRAPD( err, dest->UpdateL() );
-        if( err < 0 )
-            {
-            CLOG_WRITE_1( "CCmDlg::CopyConnectionMethodL UpdateL: %d", err );
-            }
-    
-        CleanupStack::PopAndDestroy( dest );
-        HandleListboxDataChangeL();                             
-        }
-    CleanupStack::PopAndDestroy( cmCopy );
-    CleanupStack::PopAndDestroy( &destArray );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::MoveConnectionMethodL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::MoveConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::MoveConnectionMethodL" );
-
-    CCmPluginBase* cm = CurrentCML();
-    if ( !cm )
-        {
-        return;
-        }
-
-    if ( cm->GetBoolAttributeL( ECmProtected ) ||
-         iCmDestinationImpl->ProtectionLevel() == CMManager::EProtLevel1 )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-
-    if ( CurrentCmInUseL() )
-        {
-        return;
-        }
-
-    // build an array of possible parent destinations
-    RArray<TUint32> destArray( iCmManager->DestinationCountL() );
-    CleanupClosePushL( destArray );
-    
-    iCmManager->AllDestinationsL( destArray );
-    
-    TUint32 destId( 0 );
-
-    // first remove the current parent (makes no sense moving a CM to its
-    // original destination)
-    if ( iCmDestinationImpl ) 
-        {
-        destId = iCmDestinationImpl->Id();
-        
-        TInt index = destArray.Find( destId );
-        if ( index != KErrNotFound )
-            {
-            destArray.Remove( index );
-            }
-        }
-    
-    // now filter the destinations
-    CurrentCML()->FilterPossibleParentsL( destArray );
-
-    // check if there are any remaining destinations
-    if ( !destArray.Count() )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_VPN_STACKING,
-                                TCmCommonUi::ECmErrorNote );        
-        CleanupStack::PopAndDestroy( &destArray );
-        return;
-        }
-
-        
-    CSelectDestinationDlg* dlg = CSelectDestinationDlg::NewL( destId, 
-                                                              *iCmManager, 
-                                                              &destArray );
-                    
-    if ( dlg->ExecuteLD( R_CMMANAGER_LIST_QUERY_WITH_MSGBOX ) )
-        {
-        CCmDestinationImpl* dest = iCmManager->DestinationL( destId );
-        CleanupStack::PushL( dest );
-        iCmManager->MoveConnectionMethodL( *iCmDestinationImpl,
-                                            *dest,
-                                            *( CurrentCML() ) );
-        CleanupStack::PopAndDestroy( dest );
-        iCmDestinationImpl->UpdateL();                            
-
-        HandleListboxDataChangeL();
-        iListbox->HandleItemRemovalL();
-        }
-
-    CleanupStack::PopAndDestroy( &destArray );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::EditConnectionMethodL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::EditConnectionMethodL()
-    {
-    LOGGER_ENTERFN( "CCmDlg::EditConnectionMethodL" );
-
-    CCmPluginBase* cm = NULL;
-    
-    TRAPD( err, cm = CurrentCML() );
-    
-    if( err == KErrNotSupported )
-        {
-        return;
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-
-    if ( !cm )
-        {
-        return;
-        }
-
-    // Must reload here in case another app changed the data (CurrentCML loads
-    // only if not already loaded)   
-    cm->ReLoadL();
-    
-    if ( cm->GetBoolAttributeL( ECmProtected ) ||
-         cm->GetBoolAttributeL( ECmDestination ) )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );        
-        }
-    else if ( cm->GetBoolAttributeL( ECmBearerHasUi ) )
-        {
-        // check if the cm is in use
-        if ( !CurrentCmInUseL() )
-            {
-            TInt ret = cm->RunSettingsL();
-            if ( ret == KDialogUserExit )
-                {
-                if( IsExceptionExitL() )
-                    {
-                    iPluginExitExceptionally = ETrue;
-                    TryExitL( KDialogUserBack );
-                    }
-                else
-                    {
-                    TryExitL( KDialogUserExit );
-                    }
-                }
-            else
-                {
-                if ( ret == KDialogUserDeleteConfirmed )
-                    {
-                    iAlreadyConfirmedDelete = ETrue;
-                    DeleteCurrentCmL();
-                    iAlreadyConfirmedDelete = EFalse;
-                    }
-                if ( ret == KDialogUserDelete )
-                    {
-                    DeleteCurrentCmL();
-                    }
-                
-                // Reorder according to priorities, if needed
-                ReOrderCMsL();
-                
-                HandleListboxDataChangeL();
-                }
-            }
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CCmDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType )    
-    {
-    LOGGER_ENTERFN( "CCmDlg::OfferKeyEventL" );
-    CLOG_WRITE_1("Key iCode: %d", aKeyEvent.iCode );
-
-    TKeyResponse retVal ( EKeyWasNotConsumed );
-
-    if ( aKeyEvent.iCode == EKeyBackspace )
-        {
-        // While priorising delete item is disabled
-        if( !iPrioritising )
-            {
-            ProcessCommandL( ECmManagerUiCmdCmDelete );
-            }
-        retVal = EKeyWasConsumed;
-        }
-    else if ( aKeyEvent.iCode == EKeyEscape )
-        {
-        // Handling application close needs special care 
-        // because of iCmWizard 
-        if ( iCmWizard )
-            {
-            // if wizard alives then escape should do after wizard has ended.
-            CLOG_WRITE( "CCmDlg::OfferKeyEventL: Wizard in long process" );
-            iEscapeArrived = ETrue;
-            retVal = EKeyWasConsumed;
-            }
-        else    
-            {
-            CLOG_WRITE( "CCmDlg::OfferKeyEventL:Escape" );
-            retVal = CAknDialog::OfferKeyEventL( aKeyEvent, aType );
-            }
-        }
-    else
-        {
-        retVal = iListbox->OfferKeyEventL(aKeyEvent, aType);       
-        }
-
-    return retVal;
-    }
-// ---------------------------------------------------------------------------
-// CCmDlg::HandleInfoPopupNoteEvent
-// called before the dialog is shown to initialize listbox data
-// ---------------------------------------------------------------------------
-//    
-void CCmDlg::HandleInfoPopupNoteEvent(
-                                CAknInfoPopupNoteController* /*aController*/,
-                                TAknInfoPopupNoteEvent /*aEvent*/ )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::CurrentCML
-// Currently selected connection method in the list
-// ---------------------------------------------------------------------------
-//
-CCmPluginBase* CCmDlg::CurrentCML()
-    {
-    if ( iItemIndex.Count() == 0 )
-    	{
-    	return NULL;
-    	}
-    return iCmDestinationImpl->GetConnectionMethodL( 
-        iItemIndex[iListbox->CurrentItemIndex()]);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::CMByIndexL
-// a connection method in the list
-// ---------------------------------------------------------------------------
-//
-CCmPluginBase* CCmDlg::CMByIndexL( TInt aIndex )
-    {
-    return iCmDestinationImpl->GetConnectionMethodL( aIndex );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDlg::CMCount
-// number of cms in the list
-// ---------------------------------------------------------------------------
-//
-TInt CCmDlg::CMCount()
-    {
-    return iCmDestinationImpl->ConnectionMethodCount();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmDlg::HandleListboxDataChangeL
-// called before the dialog is shown to initialize listbox data
-// ---------------------------------------------------------------------------
-//
-void CCmDlg::HandleListboxDataChangeL()
-    {
-    TInt selected = 0;
-    if ( iListbox->CurrentItemIndex() )
-        {
-        selected = iListbox->CurrentItemIndex();
-        }
-    
-    LOGGER_ENTERFN( "CCmDlg::HandleListboxDataChangeL" );
-    iCmManager->OpenTransactionLC();
-
-    RArray<TUint32> cmIds;
-    ConstructCMArrayL( cmIds );
-    CleanupClosePushL( cmIds );
-    
-    // Remove hidden Connection Methods from the array if uncat folder
-    if ( !iCmDestinationImpl )
-        {
-        ClearHiddenCMsFromArrayL( cmIds );
-        }
-    
-    /// Using test values for now.
-    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KCMGranularity );
-    CleanupStack::PushL( icons );
-    iModel->ResetAndDestroy();
-    
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();        
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                                     &KDC_APP_BITMAP_DIR, 
-                                     NULL ) );        
-
-    
-    icons->AppendL( AknsUtils::CreateGulIconL( 
-                              skinInstance, 
-                              KAknsIIDQgnIndiSettProtectedAdd,
-                              mbmFile.FullName(), 
-                              EMbmCmmanagerQgn_indi_sett_protected_add, 
-                              EMbmCmmanagerQgn_indi_sett_protected_add_mask ) );  
-
-    //0..1 are reserved indexes!
-    CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask = NULL;
-
-    AknsUtils::CreateColorIconLC( skinInstance,
-                                  KAknsIIDQgnIndiDefaultConnAdd,
-                                  KAknsIIDQsnIconColors,
-                                  EAknsCIQsnIconColorsCG13,
-                                  bitmap,
-                                  mask,
-                                  mbmFile.FullName(),
-                                  EMbmCmmanagerQgn_indi_default_conn_add,
-                                  EMbmCmmanagerQgn_indi_default_conn_add_mask,
-                                  AKN_LAF_COLOR( 215 ) );
-
-    CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); // Ownership transferred
-    CleanupStack::Pop( 2 ); // bitmap, mask
-
-    CleanupStack::PushL( icon );
-    icons->AppendL( icon );
-    CleanupStack::Pop( icon );
-
-    RArray<TUint> bearerIdArray = RArray<TUint>( KCmArrayBigGranularity );
-    CleanupClosePushL( bearerIdArray );    
-    
-    TCmDefConnValue sel;
-    TInt defUid = KErrNotFound;
-    if ( iCmManager->IsDefConnSupported() )
-        {
-        iCmManager->ReadDefConnL(sel);
-        if ( sel.iType == EDCConnectionMethod )
-            {
-            defUid = sel.iId;
-            }
-        }
-    iItemIndex.Reset();
-    for ( TInt i = 0; i < cmIds.Count(); i++ )
-        {
-        TInt iconId = KErrNotFound;
-        CCDAccessPointRecord* destAPRecord = NULL;
-        CCDIAPRecord* iapRecord = NULL;
-        HBufC* name = NULL;
-        TBool isDest( cmIds[i] > KCmDefaultDestinationAPTagId );
-        TUint recId( 0 );
-        TBool protect;
-        TUint32 bearerType( 0 );
-        
-        if( isDest )
-            {
-            destAPRecord = static_cast<CCDAccessPointRecord *>(
-                           CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-            CleanupStack::PushL( destAPRecord );
-            destAPRecord->iRecordTag = cmIds[i];
-            if ( !destAPRecord->FindL( iCmManager->Session() ) )
-                {
-                User::Leave( KErrNotFound );
-                }
-            
-            name = TPtrC( destAPRecord->iRecordName ).AllocLC();
-
-            TProtectionLevel protLev = CCmDestinationImpl::ProtectionLevelL( *iCmManager, cmIds[i] );
-            
-            protect = (protLev == EProtLevel1) || (protLev == EProtLevel2);
-
-            HBufC* destName = StringLoader::LoadL( R_QTN_NETW_CONSET_EMBEDDED_DEST,
-                                                   *name );
-                                                   
-            CleanupStack::PopAndDestroy( name );            
-            name = destName;            
-            CleanupStack::PushL( name );
-            
-            bearerType = KUidEmbeddedDestination;
-            }
-        else
-            {
-            recId = cmIds[i];
-            iapRecord = static_cast<CCDIAPRecord *>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-            CleanupStack::PushL( iapRecord );
-            
-            iapRecord->SetRecordId( recId );
-            iapRecord->LoadL( iCmManager->Session() );
-            
-            TRAPD( err, bearerType = iCmManager->BearerTypeFromIapRecordL( iapRecord ) );
-            
-            if( err == KErrNotSupported )
-                // This is unsupported connection method -> don't add it to the list
-                {
-                CleanupStack::PopAndDestroy( iapRecord );
-                continue;
-                }
-            else
-                {
-                User::LeaveIfError( err );
-                }
-            name = TPtrC( iapRecord->iRecordName ).AllocLC();
-            protect = iapRecord->Attributes() & ECDProtectedWrite;
-
-            if ( bearerIdArray.Count() )
-                {
-                for ( TInt j = 0; j<bearerIdArray.Count(); j++ )
-                    {
-                    if ( bearerType == bearerIdArray[j] )
-                        {
-                        iconId = j+KCmReservedIconIndexCount;
-                        }
-                    }
-                }
-            }
-
-        if ( iconId == KErrNotFound )
-            {
-            TInt iconInt( 0 );
-            if( isDest )
-                // Embedded destinations has not constant icon.
-                {
-                iconInt = (TInt)CCmDestinationImpl::IconIdL( *iCmManager,
-                                                             cmIds[i] );
-                }
-            else
-                {
-                iconInt = iCmManager->GetBearerInfoIntL( bearerType, 
-                                                         ECmBearerIcon );
-                }
-
-            if (iconInt) 
-                {
-                if ( isDest )
-                    {
-                    // append zero - assuming that bearer type values differ from zero
-                    bearerIdArray.Append( 0 ); 
-                    }
-                else
-                    {
-                    bearerIdArray.Append( bearerType );
-                    }
-
-                icons->AppendL( (CGulIcon*)iconInt );
-                iconId = bearerIdArray.Count()-1+KCmReservedIconIndexCount;
-                }
-            else 
-                {
-                iconId = KCmReservedIconIndexCount;
-                }
-            }
-        TBool def = EFalse;
-        if ( defUid == recId ) 
-            {
-            def = ETrue;
-            }
-        
-        TInt nextLayerSnapId = 0;
-        if( !isDest ) 
-            {
-            // Check if it is VPN over destination    
-            // If yes the list item should have single line 
-            CCmPluginBase* plugin = iCmManager->GetConnectionMethodL( cmIds[i] );
-            CleanupStack::PushL( plugin );
-                   
-            if( plugin->GetBoolAttributeL( ECmVirtual ) )
-                {
-                nextLayerSnapId = plugin->GetIntAttributeL( ECmNextLayerSNAPId );
-                }
-                
-            CleanupStack::PopAndDestroy( plugin );
-            }
-
-        CCmListItem* item = 
-                CCmListItem::NewLC( 
-                            recId, 
-                            name,
-                            i, 
-                            iconId,
-                            protect,
-                            (nextLayerSnapId ? ETrue : EFalse),
-                            // reasons for single line
-                            ( isDest || !iCmDestinationImpl), 
-                            def );
-        CleanupStack::Pop( item );
-        CleanupStack::Pop( name );
-        CleanupStack::PopAndDestroy(); // iapRecord or nwRecord
-        CleanupStack::PushL( item );
-        iModel->AppendL( item );
-        CleanupStack::Pop( item );
-        iItemIndex.Append(i);
-        }
-    
-    TInt cmCount = iItemIndex.Count();
-    SetNoOfCMsL( cmCount );
-    
-    if ( !cmCount && iCmDestinationImpl )
-        {
-        HBufC* buf = 0;
-        // rare case probably only caused by bad configuration
-        if ( iCmDestinationImpl->ProtectionLevel() == EProtLevel1 )
-            {
-            buf = StringLoader::LoadLC( R_TEXT_SOFTKEY_OPTION );
-            }
-        else
-            {    
-            buf = StringLoader::LoadLC( R_CMMANAGERUI_MSK_ADD_METHOD );
-            }
-        ButtonGroupContainer().SetCommandL( ECmManagerUiCmdCmEdit, *buf );
-        ButtonGroupContainer().DrawDeferred();                                                    
-        CleanupStack::PopAndDestroy( buf );
-        }
-
-    CleanupStack::PopAndDestroy( &bearerIdArray );
-    
-    CArrayPtr<CGulIcon>* oldIcons = 
-                            iListbox->ItemDrawer()->ColumnData()->IconArray();
-    if ( oldIcons )
-        {
-        oldIcons->ResetAndDestroy();
-        delete oldIcons;
-        }
-    
-    iListbox->ItemDrawer()->ColumnData()->SetIconArray( icons );
-
-    CleanupStack::Pop( icons );
-    CleanupStack::PopAndDestroy( &cmIds ); 
-    
-    iCmManager->CommitTransactionL( KErrNone );
-
-    // Fix for the added IAP not showing in the list.
-    iListbox->HandleItemAdditionL();
-
-    iListbox->DrawNow();
-    iListbox->UpdateScrollBarsL();
-    
-    TInt count = iListbox->Model()->NumberOfItems();
-    if ( count )
-        {
-        if ( count <= selected )
-            {
-            selected = count - 1; // index, so --
-            }
-        if ( selected >= 0 )
-            {
-            iListbox->ScrollToMakeItemVisible( selected);
-            iListbox->SetCurrentItemIndex( selected );
-            }
-        }
-    }
-    
-
-// --------------------------------------------------------------------------
-// CCmDlg::CurrentCmInUseL
-// --------------------------------------------------------------------------
-//
-TBool CCmDlg::CurrentCmInUseL()
-    {
-    TBool retVal = CurrentCML()->GetBoolAttributeL( ECmConnected );
-    if ( retVal )
-        {
-        TCmCommonUi::ShowNoteL( R_QTN_SET_NOTE_AP_IN_USE_EDIT,
-                                TCmCommonUi::ECmErrorNote );
-        retVal = ETrue;
-        }
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::ConstructCMArrayL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::ConstructCMArrayL( RArray<TUint32>& aCmIds )
-    {
-    iCmDestinationImpl->ReLoadConnectionMethodsL();
-    iCmDestinationImpl->ConnectMethodIdArrayL( aCmIds );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::ClearHiddenCMsFromArrayL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::ClearHiddenCMsFromArrayL( RArray<TUint32>& aCmIds )
-    {
-    TBool hidden( EFalse );
-    TInt err( KErrNone );
-    for ( TInt index = 0; index < aCmIds.Count(); index++ )
-        {
-        TUint recId = aCmIds[index];
-        TRAP( err, hidden = iCmManager->GetConnectionMethodInfoBoolL( recId, ECmHidden ) );
-        if ( err || hidden )
-            {
-            aCmIds.Remove( index );
-            index--;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-void CCmDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_CONN_METHODS_VIEW;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmDlg::FinishPriorizingL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::FinishPriorizingL( TBool aOkPushed )
-    {
-    LOGGER_ENTERFN( "CCmDlg::FinishPriorizing" );
-
-    iListbox->ClearSelection();
-    iPrioritising = EFalse;
-    
-    if( aOkPushed )
-        {
-        if ( CurrentCML()->GetBoolAttributeL( ECmDestination ) ||
-             (CurrentCML()->GetBoolAttributeL( ECmVirtual ) &&
-              CurrentCML()->GetIntAttributeL( ECmNextLayerSNAPId )) )
-            {
-            // Priorising not possible
-            TCmCommonUi::ShowNoteL( R_CMMANAGERUI_INFO_PRIO_NOT_POSSIBLE,
-                                    TCmCommonUi::ECmInfoNote );
-            }
-        else
-            {
-            CCmPluginBase* cm = CMByIndexL(iCmToPrioritise);
-            iCmDestinationImpl->ModifyPriorityL( 
-                                *cm, 
-                                iListbox->CurrentItemIndex());
-            iCmDestinationImpl->UpdateL();
-            HandleListboxDataChangeL();
-            }
-        }
-     // Set the softkeys back    
-     ButtonGroupContainer().SetCommandSetL(
-                                    R_SOFTKEYS_OPTIONS_BACK__EDIT );
-     ButtonGroupContainer().DrawDeferred();
-     }
-
-
-// --------------------------------------------------------------------------
-// CCmDlg::Execute
-// --------------------------------------------------------------------------
-//
-void CCmDlg::Execute()
-    {
-    LOGGER_ENTERFN( "CCmDlg::Execute" );
-
-    iInfoPopupNoteController->HideInfoPopupNote();
-    
-    if(iPrioritising)
-    	{
-    	TRAPD( err, FinishPriorizingL( ETrue ) );
-    	if ( err )
-    	    {
-    	    HandleLeaveError( err );
-    	    }
-    	}
-    else
-    	{
-        iProcessing = ETrue;
-        
-        TRAPD( err, ProcessCommandL(ECmManagerUiCmdCmEdit) );
-    	if ( err )
-    	    {
-    	    HandleLeaveError( err );
-    	    }
-
-        iProcessing = EFalse;
-    	}
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::HandleLeaveError
-// --------------------------------------------------------------------------
-//
-void CCmDlg::HandleLeaveError( TInt /*aError*/ )
-    {
-    if(iProcessing)
-        {
-        iProcessing = EFalse;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::HandleResourceChange
-// --------------------------------------------------------------------------
-//
-void CCmDlg::HandleResourceChange( TInt aType )
-    {
-    CCoeControl::HandleResourceChange( aType ); 
-
-    if( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        DrawNow(); 
-        }
-        
-    CAknDialog::HandleResourceChange(aType);        
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::GetInsertIndexL
-// --------------------------------------------------------------------------
-//
-TInt CCmDlg::GetInsertIndexL( TInt aCount, TUint32 aPriority )
-    {
-    TInt ret = aCount;
-    TUint32 priority;
-    
-    
-    for ( TInt index = 0; index < aCount; index++ )
-        {
-        CCmPluginBase* cm = iCmDestinationImpl->GetConnectionMethodL( iItemIndex[index] );
-        
-        if ( cm->GetBoolAttributeL( ECmVirtual ) &&
-             !cm->GetIntAttributeL( ECmNextLayerSNAPId ) )
-             {
-             TUint32 underlying = cm->GetIntAttributeL( ECmNextLayerIapId );
-             if ( underlying != 0 )
-                {
-                // Find the index that this VPN Iap should be inserted
-                TUint32 underlyingBearer = iCmManager->BearerTypeFromCmIdL( underlying );
-                priority = iCmManager->GetBearerInfoIntL( underlyingBearer, ECmDefaultPriority );
-                }
-             else
-                {
-                priority = KDataMobilitySelectionPolicyPriorityWildCard;
-                }
-             }
-        else
-            {
-            priority = cm->Plugin()->GetIntAttributeL( ECmDefaultPriority );
-            }
-        
-        if (priority > aPriority)
-            {
-            ret = index;
-            break;
-            }
-        }
-    
-    return ret;
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::ReBuildItemIndexArrayL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::ReBuildItemIndexArrayL()
-    {
-    iCmManager->OpenTransactionLC();
-
-    RArray<TUint32> cmIds;
-    ConstructCMArrayL( cmIds );
-    CleanupClosePushL( cmIds );
-    
-    // Remove hidden Connection Methods from the array if uncat folder
-    if ( !iCmDestinationImpl )
-        {
-        ClearHiddenCMsFromArrayL( cmIds );
-        }
-
-    iItemIndex.Reset();
-    for ( TInt i = 0; i < cmIds.Count(); i++ )
-        {
-        iItemIndex.Append(i);
-        }
-
-    CleanupStack::PopAndDestroy( &cmIds ); 
-    
-    iCmManager->CommitTransactionL( KErrNone );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::ReOrderCMsL
-// --------------------------------------------------------------------------
-//
-void CCmDlg::ReOrderCMsL()
-    {
-    ReBuildItemIndexArrayL();
-    
-    TBool prioAllowed = ETrue;
-    TInt firstNotAllowedEntry = 0;
-    TInt index = 0;
-    TInt count = iItemIndex.Count();
-    
-    if (!iCmDestinationImpl)
-        {
-        return;
-        }
-   
-    // This part is to move a SANP-referred VPN Iap to the end of list if the VPN Iap is changed from
-    // IAP-referred to SNAP-referred. 
-    for ( index = 0; index < count; index++ )
-        {
-        CCmPluginBase* cm = iCmDestinationImpl->GetConnectionMethodL( iItemIndex[index] );
-        
-        if ( cm->GetBoolAttributeL( ECmDestination ) ||
-             (cm->GetBoolAttributeL( ECmVirtual ) &&
-              cm->GetIntAttributeL( ECmNextLayerSNAPId )) )
-            {
-            prioAllowed = EFalse;
-            firstNotAllowedEntry = index;
-            }
-        else
-            {
-            if ( !prioAllowed )
-                {
-                iCmDestinationImpl->ModifyPriorityL(*cm, firstNotAllowedEntry);
-                iCmDestinationImpl->UpdateL();
-                // start from the beginning
-                index = 0;
-                prioAllowed = ETrue;
-                continue;
-                }
-            }
-        }
-
-    // This part is to move a IAP-referred VPN Iap to a proper location of priority in list
-    // if the VAP Iap is changed from SNAP-referred to IAP-referred.
-    for ( index = 0; index < count; index++ )
-        {
-        CCmPluginBase* cm = iCmDestinationImpl->GetConnectionMethodL( iItemIndex[index] );
-
-        if ( cm->GetBoolAttributeL( ECmVirtual ) &&
-             !cm->GetIntAttributeL( ECmNextLayerSNAPId ) )
-            {
-            TUint32 underlying = cm->GetIntAttributeL( ECmNextLayerIapId );
-            if ( underlying != 0 )
-                {
-                // Find the index that this VPN Iap should be inserted
-                TUint32 underlyingBearer = iCmManager->BearerTypeFromCmIdL( underlying );
-                TUint32 underlyingPrio = iCmManager->GetBearerInfoIntL( underlyingBearer, ECmDefaultPriority );
-                TInt insertAt = GetInsertIndexL( index, underlyingPrio );
-                
-                // Modify the priority of this VPN Iap
-                iCmDestinationImpl->ModifyPriorityL( *cm, insertAt );
-                }
-            }
-        }
-        iCmDestinationImpl->UpdateL();
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::CommsDatChanges
-// --------------------------------------------------------------------------
-//
-void CCmDlg::CommsDatChangesL()
-    {
-    if (iCmDestinationImpl)
-        {
-        // If the destination that is currently working on disappears
-        // with some reason then go back to parent view
-        if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) )
-            {
-            iCmManager->WatcherUnRegister();
-            iExitReason = KDialogUserBack;
-            TryExitL( iExitReason );
-            return;
-            }
-        }
-    
-    // Update list box
-    HandleListboxDataChangeL();
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::IsExceptionExitL
-// --------------------------------------------------------------------------
-//
-TBool CCmDlg::IsExceptionExitL()
-    {
-    TBool retV( EFalse );
- 
-    if (iCmDestinationImpl)
-        {
-        // If the destination that is currently working on disappears
-        // with some reason then go back to parent view
-        if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) )
-            {
-            retV = ETrue;
-            }
-        }
-    
-    return retV;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmlistbox.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +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:  Implementation of CCmListbox
-*
-*/
-
-#include <eikclbd.h>
-#include <avkon.mbg>
-#include <aknkeys.h>
-#include <data_caging_path_literals.hrh>
-
-#include "cmlistbox.h"
-#include "cmlistboxmodel.h"
-#include "cmlistitem.h"
-
-
-// ---------------------------------------------------------------------------
-// CCmListbox::NewL
-// ---------------------------------------------------------------------------
-//
-CCmListbox* CCmListbox::NewL( const CCoeControl* aParent )
-    {
-    CCmListbox* listbox = new ( ELeave ) CCmListbox();
-    CleanupStack::PushL( listbox );
-    listbox->ConstructL( aParent, EAknListBoxSelectionList );
-    CleanupStack::Pop( listbox );    
-    return listbox;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::CCmListbox
-// ---------------------------------------------------------------------------
-//
-CCmListbox::CCmListbox()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::~CCmListbox
-// ---------------------------------------------------------------------------
-//
-CCmListbox::~CCmListbox()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CCmListbox::OfferKeyEventL
-( const TKeyEvent& aKeyEvent, TEventCode aType )
-    {
-    if ( aKeyEvent.iCode == EKeyOK &&
-         !( aKeyEvent.iModifiers & EModifierShift ) )
-        {
-        // Enter pressed (not Shift-Enter). This will report an
-        // EEnterKeyPressed event sent to the observer (the view), which may
-        // delete this listbox. The code which processes keypresses by
-        // default, will continue (on the already deleted listbox), and
-        // will crash. So we grab this keypress here, and generate the
-        // same event, but after that, quit immediately!
-        ReportListBoxEventL( MEikListBoxObserver::EEventEnterKeyPressed );
-        // By now the listbox may have been deleted!
-        // Do not access it after this point!
-        return EKeyWasConsumed;
-        }
-    else
-        {
-        return CAknDoubleGraphicStyleListBox::OfferKeyEventL
-            ( aKeyEvent, aType );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::FocusChanged
-// ---------------------------------------------------------------------------
-//
-void CCmListbox::FocusChanged( TDrawNow aDrawNow )
-    {
-    // Do nothing until the listbox is fully constructed
-    // The dialogpage sets the focus before calling ConstructL
-    if ( iView )
-        {
-        CAknDoubleGraphicStyleListBox::FocusChanged( aDrawNow );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::Uid4Item
-// ---------------------------------------------------------------------------
-//
-TUint32 CCmListbox::Uid4Item( TInt aItem ) const
-    {
-    CCmListboxModel* lbmodel =
-        STATIC_CAST( CCmListboxModel*, Model()->ItemTextArray() );
-    return lbmodel->At( aItem )->Uid();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::CurrentItemUid
-// ---------------------------------------------------------------------------
-//
-TUint32 CCmListbox::CurrentItemUid() const
-    {
-    CCmListboxModel* lbmodel =
-        STATIC_CAST( CCmListboxModel*, Model()->ItemTextArray() );
-    TInt idx = CurrentItemIndex();
-    TUint32 retval( 0 );
-    if ( idx >= 0 )
-        {
-        retval = lbmodel->At( idx )->Uid();
-        }
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::CurrentItemNameL
-// ---------------------------------------------------------------------------
-//
-const TDesC& CCmListbox::CurrentItemNameL()
-    {
-    CCmListboxModel* lbmodel = new( ELeave )CCmListboxModel;
-    lbmodel = STATIC_CAST( CCmListboxModel*, Model()->ItemTextArray() );
-    return lbmodel->At( CurrentItemIndex() )->Name();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListbox::HandleResourceChange
-// ---------------------------------------------------------------------------
-//
-void CCmListbox::HandleResourceChange(TInt aType)
-    {
-    if ( aType == KAknsMessageSkinChange )
-        {
-        SizeChanged();
-        }
-        
-    CAknDoubleGraphicStyleListBox::HandleResourceChange( aType );     
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmlistboxmodel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +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:  Implementation of CCmListboxModel
-*
-*/
-
-#include <AknIconArray.h>
-#include <aknlists.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-
-#include "cmlistboxmodel.h"
-#include "cmlistitem.h"
-#include <cmcommonconstants.h>
-#include "cmlistitemlist.h"
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::CCmListboxModel
-// ---------------------------------------------------------------------------
-//
-CCmListboxModel::CCmListboxModel()
-    : iOffset( 0 )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::~CCmListboxModel
-// ---------------------------------------------------------------------------
-//
-CCmListboxModel::~CCmListboxModel()
-    {
-    //ResetAndCmroy(); // deletes all elements...
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::MdcaCount
-// ---------------------------------------------------------------------------
-//
-TInt CCmListboxModel::MdcaCount() const
-    {
-    return Count();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::SetOwnIconOffset
-// ---------------------------------------------------------------------------
-//
-void CCmListboxModel::SetOwnIconOffset( TInt aOffset )
-    {
-    iOffset = aOffset;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::MdcaPoint
-// ---------------------------------------------------------------------------
-//
-TPtrC CCmListboxModel::MdcaPoint( TInt aIndex ) const
-    {
-    // We need to cast away the const-ness from the buffer.
-    // It was definitely made for formatting!
-    FormatListboxText( aIndex,
-                       MUTABLE_CAST( TBuf<KMaxCmListboxName>&, iBuf ) );
-
-    return iBuf;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmListboxModel::FormatListboxText
-// ---------------------------------------------------------------------------
-//
-void CCmListboxModel::FormatListboxText( TInt aIndex,
-                                         TDes& aBuf ) const
-    {
-    TRAP_IGNORE( FormatListboxTextL( aIndex, aBuf ) );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmListboxModel::FormatListboxTextL
-// ---------------------------------------------------------------------------
-//
-void CCmListboxModel::FormatListboxTextL( TInt aIndex,
-                                          TDes& aBuf ) const
-    {
-    aBuf.Zero();
-    TUint icon = At( aIndex )->IconIndex();
-    if ( At(aIndex)->IsSingleLine() )
-        {
-        if ( At(aIndex)->IsProtected() )
-            {
-            aBuf.Format( KListItemFormatEmbDestProt, 
-                         icon, 
-                         &At( aIndex )->Name(), 
-                         KCmReservedIconIndexProtected );
-            }
-        else            
-            {
-            aBuf.Format( KListItemFormatEmbDest, 
-                         icon,
-                         &At( aIndex )->Name() );            
-            }
-        }
-     else
-        {
-        HBufC* secondLine;
-        secondLine = StringLoader::LoadLC( R_CMMANAGERUI_METHOD_PRIORITY_OTHER,
-                                           At( aIndex )->Priority() + 1 );
-    if ( At( aIndex )->IsDefault() )
-        {
-            aBuf.Format( KListItemFormatCmProt,
-                         icon, 
-                         &At( aIndex )->Name(), 
-                         secondLine, 
-                         KCmReservedIconIndexDefaultConn );
-        }
-    else
-        {
-        if ( At(aIndex)->IsProtected() )
-            {
-            aBuf.Format( KListItemFormatCmProt, 
-                         icon, 
-                         &At( aIndex )->Name(), 
-                         secondLine, 
-                         KCmReservedIconIndexProtected );    
-            }
-        else if ( At(aIndex)->IsVpnOverDestination() )
-            {
-            CleanupStack::PopAndDestroy( secondLine );
-            
-            secondLine = StringLoader::LoadLC( R_QTN_NETW_CONSET_METHOD_PRIORITY_AUTO);
-
-            aBuf.Format( KListItemFormatCm, 
-                         icon,
-                         &At( aIndex )->Name(),
-                         secondLine );
-            }
-        else
-            {
-            aBuf.Format( KListItemFormatCm, 
-                         icon, 
-                         &At( aIndex )->Name(), 
-                         secondLine );
-            }
-         }
-            
-        CleanupStack::PopAndDestroy( secondLine );
-        }
-    }
-
--- a/cmmanager/cmmgr/Framework/Src/cmlistitem.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CCmListItem
-*
-*/
-
-#include <eikdef.h>
-#include "cmlistitem.h"
-
-// ---------------------------------------------------------
-// CCmListItem::NewLC
-// ---------------------------------------------------------
-//
-CCmListItem* CCmListItem::NewLC( TUint32 aUid,
-                                 HBufC* aName,
-                                 TInt aPriority, 
-                                 TUint aIconIndex, 
-                                 TBool aIsProtected, 
-                                 TBool aIsVpnOverDestination,
-                                 TBool aIsSingleLine,
-                                 TBool aIsDefault )
-    {
-
-    CCmListItem* db = new( ELeave ) CCmListItem( aName );
-    CleanupStack::PushL( db );
-    db->ConstructL( aUid, 
-                    aPriority, 
-                    aIconIndex, 
-                    aIsProtected,
-                    aIsVpnOverDestination, 
-                    aIsSingleLine,
-                    aIsDefault );
-    return db;
-    }
-// ---------------------------------------------------------
-// CCmListItem::~CCmListItem
-// ---------------------------------------------------------
-//
-CCmListItem::~CCmListItem()
-    {
-    delete iName;
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::CCmListItem
-// ---------------------------------------------------------
-//
-CCmListItem::CCmListItem( HBufC* aName )
-    : iName( aName )
-    {
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::ConstructL
-// ---------------------------------------------------------
-//
-void CCmListItem::ConstructL( TUint32 aUid,
-                              TInt aPriority, 
-                              TUint aIconIndex, 
-                              TBool aIsProtected, 
-                              TBool aIsVpnOverDestination,
-                              TBool aIsSingleLine,
-                              TBool aIsDefault )
-    {
-    iPriority = aPriority;
-    iIconIndex = aIconIndex;
-    iIsProtected =  aIsProtected;
-    iIsSingleLine =  aIsSingleLine;
-    iIsDefault =  aIsDefault;
-    iIsVpnOverDestination = aIsVpnOverDestination;
-        
-    iUid = aUid;
-    }
-// ---------------------------------------------------------
-// CCmListItem::Name
-// ---------------------------------------------------------
-//
-const TDesC& CCmListItem::Name()
-    {
-    return *iName;
-    }
-
-
-// ---------------------------------------------------------
-// CCmListItem::Uid
-// ---------------------------------------------------------
-//
-TUint32 CCmListItem::Uid()
-    {
-    return iUid;
-    }
-    
-// ---------------------------------------------------------
-// CCmListItem::IconIndex
-// ---------------------------------------------------------
-//
-TUint CCmListItem::IconIndex()
-    {
-    return iIconIndex;
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::Priority
-// ---------------------------------------------------------
-//
-TInt CCmListItem::Priority()
-    {
-    return iPriority;
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::IsProtected
-// ---------------------------------------------------------
-//
-TBool CCmListItem::IsProtected()
-    {
-    return iIsProtected;
-    }
-    
-// ---------------------------------------------------------
-// CCmListItem::IsSingleLine
-// ---------------------------------------------------------
-//
-TBool CCmListItem::IsSingleLine()
-    {
-    return iIsSingleLine;
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::IsDefault
-// ---------------------------------------------------------
-//    
-TBool CCmListItem::IsDefault()
-    {
-    return iIsDefault;
-    }
-
-// ---------------------------------------------------------
-// CCmListItem::IsVpnOverDestination
-// ---------------------------------------------------------
-//    
-TBool CCmListItem::IsVpnOverDestination()
-    {
-    return iIsVpnOverDestination;
-    }
-
-    
--- a/cmmanager/cmmgr/Framework/Src/cmlistitemlist.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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:  Implementation of CCmListItemList
-*
-*/
-
-#include "cmlistitemlist.h"
-#include "cmlistitem.h"
-
-
-LOCAL_D const TInt KGranularity = 4;    ///< Granularity of the list.
-
-// ---------------------------------------------------------
-// CCmListItemList::CCmListItemList
-// ---------------------------------------------------------
-//
-CCmListItemList::CCmListItemList()
-    : CArrayPtrFlat<CCmListItem>( KGranularity )
-    {
-    }
-
-// ---------------------------------------------------------
-// CCmListItemList::~CCmListItemList
-// ---------------------------------------------------------
-//
-CCmListItemList::~CCmListItemList()
-    {
-    ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------
-// CCmListItemList::ItemForUid
-// ---------------------------------------------------------
-//
-CCmListItem* CCmListItemList::ItemForUid( TUint32 aUid ) const
-    {
-    // This method cannot return "const CCmListItem*", because all methods
-    // of CCmListItem are non-const -> if the returned item was const, it
-    // would be unusable.
-    TInt i;
-    TInt count = Count();
-    for ( i = 0; i < count; i++ )
-        {
-        if ( At( i )->Uid() == aUid )
-            {
-            return At( i );
-            }
-        }
-
-    return NULL;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmlogger.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +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:  Implementation of TLogger
-*
-*/
-
-#include    "cmlogger.h"
-
-#ifdef __CONNECTION_METHOD_LOG__
-
-_LIT( KDeclareLoggerName, "<DECLARE_LOGGER_NAME>< %S >" );
-_LIT( KAttachLogger, "<ATTACH_LOGGER><%x>to<%x>" );
-_LIT( KOwnerLog, "<%x> -\t" );
-_LIT8( KOwnerLog8, "<%x> -\t" );
-_LIT( KLoggerCreated, "<LOGGER_CREATED>" );
-_LIT( KLoggerClosed, "<LOGGER_CLOSED>" );
-_LIT( KLoggerName, "[CMManager]" );
-_LIT8( KLoggerName8, "[CMManager]" );
-
-// ---------------------------------------------------------
-// CFunctionEntryExit::CFunctionEntryExit()
-// ---------------------------------------------------------
-//
-CFunctionEntryExit::CFunctionEntryExit( const TAny* aOwner, 
-                                        TRefByValue<const TDesC> aFunc )
-    : iOwner( aOwner )
-    {
-    iEntryTime.UniversalTime();
-
-    iFunc.Set( aFunc );
-        
-    TLogger::LogIt( aOwner, _L("-> <%S>"), &iFunc );
-    }
-    
-// ---------------------------------------------------------
-// CFunctionEntryExit::~CFunctionEntryExit()
-// ---------------------------------------------------------
-//
-CFunctionEntryExit::~CFunctionEntryExit() 
-    {
-    TTime exitTime;
-    
-    exitTime.UniversalTime();
-    TLogger::LogIt( iOwner, _L("<- <%S><%d>"), 
-                      &iFunc, 
-                      I64LOW( exitTime.MicroSecondsFrom( iEntryTime ).Int64()));
-    }
-
-// ---------------------------------------------------------
-// TLogger::CreateFlogger()
-// ---------------------------------------------------------
-//
-void TLogger::CreateLogger( TAny* aOwner )
-    {
-    LogIt( aOwner, KLoggerCreated );
-    }
-    
-// ---------------------------------------------------------
-// TLogger::CloseLogger()
-// ---------------------------------------------------------
-//
-void TLogger::CloseLogger( TAny* aOwner )
-    {
-    LogIt( aOwner, KLoggerClosed );
-    }
-
-// ---------------------------------------------------------
-// TLogger::AttachFLogger()
-// ---------------------------------------------------------
-//
-void TLogger::AttachLogger( const TAny* aOwner,
-                               const TAny* aAttach1, 
-                               const TAny* aAttach2 )
-    {
-    LogIt( aOwner, KAttachLogger, aAttach1, aAttach2 );
-    }
-    
-// ---------------------------------------------------------
-// TLogger::NameIt()
-// ---------------------------------------------------------
-//
-void TLogger::NameIt( const TAny* aOwner, TRefByValue<const TDesC> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    
-    TBuf<KLogBufferSize> nameBuf;
-    TBuf<KLogBufferSize> logBuf;
-    
-    nameBuf.FormatList( aFmt, list );
-    logBuf.Format( KDeclareLoggerName, &nameBuf );
-
-    VA_END(list);
-    
-    TBuf<32> tempBuf;
-    
-#ifdef _LOG_MICRO_TIME_
-    TTime timeNull( 0 );
-    TTime timeNow;
-    
-    timeNow.UniversalTime();
-    
-    tempBuf.Format( _L(" - %Li - "), timeNow.MicroSecondsFrom(timeNull));
-    
-    logBuf.Insert( 0, timeBuf );
-#endif    
-
-    tempBuf.Format( KOwnerLog, aOwner );
-    logBuf.Insert( 0, tempBuf );
-    logBuf.Insert( 0, KLoggerName );
-
-    RDebug::Print( logBuf );
-    }
-    
-// ---------------------------------------------------------
-// TLogger::LogIt()
-// ---------------------------------------------------------
-//
-void TLogger::LogIt( const TAny* aOwner, 
-                       TRefByValue<const TDesC> aFmt, 
-                       VA_LIST aList )
-    {
-    TBuf<KLogBufferSize> logBuf;
-
-    logBuf.FormatList( aFmt, aList );
-
-    TBuf<32> tempBuf;
-
-#ifdef _LOG_MICRO_TIME_
-    TTime timeNull( 0 );
-    TTime timeNow;
-    
-    timeNow.UniversalTime();
-    
-    tempBuf.Format( _L(" - %Li - "), timeNow.MicroSecondsFrom(timeNull));
-    
-    logBuf.Insert( 0, timeBuf );
-#endif    
-
-    tempBuf.Format( KOwnerLog, aOwner );
-    logBuf.Insert( 0, tempBuf );
-    logBuf.Insert( 0, KLoggerName );
-
-    RDebug::Print( logBuf );
-    }
-    
-// ---------------------------------------------------------
-// TLogger::LogIt()
-// ---------------------------------------------------------
-//
-void TLogger::LogIt( const TAny* aOwner, 
-                     TRefByValue<const TDesC8> aFmt, 
-                     VA_LIST aList )
-    {
-    TBuf8<KLogBufferSize> logBuf;
-    
-    logBuf.FormatList( aFmt, aList );
-
-    TBuf8<32> tempBuf8;
-
-#ifdef _LOG_MICRO_TIME_
-    TTime timeNull( 0 );
-    TTime timeNow;
-    
-    timeNow.UniversalTime();
-    
-    
-    tempBuf8.Format( _L8(" - %Li - "), timeNow.MicroSecondsFrom(timeNull));
-    
-    logBuf.Insert( 0, tempBuf );
-#endif    
-
-    tempBuf8.Format( KOwnerLog8, aOwner );
-    logBuf.Insert( 0, tempBuf8 );
-    logBuf.Insert( 0, KLoggerName8 );
-
-    RDebug::RawPrint( logBuf );
-    }
-
-// ---------------------------------------------------------
-// TLogger::LogIt()
-// ---------------------------------------------------------
-//
-void TLogger::LogIt( const TAny* aOwner, TRefByValue<const TDesC> aFmt, ...)
-
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    
-    TLogger::LogIt( aOwner, aFmt, list );
-
-    VA_END(list);
-    }
-
-// ---------------------------------------------------------
-// TLogger::LogIt()
-// ---------------------------------------------------------
-//
-void TLogger::LogIt( const TAny* aOwner, TRefByValue<const TDesC8> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    
-    TLogger::LogIt( aOwner, aFmt, list );
-
-    VA_END(list);
-    }
-
-#endif  // __CONNECTION_METHOD_LOG__
--- a/cmmanager/cmmgr/Framework/Src/cmmanager.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,555 +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:  Implementation of RCmManager.
-*
-*/
-
-#include <cmmanager.h>
-#include <cmconnectionmethod.h>
-#include <cmdestination.h>
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include "cmmanager.hrh"
-#include <cmcommonconstants.h>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-
-//-----------------------------------------------------------------------------
-//  RCmManager::Close()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::Close()
-    {
-    CLOG_WRITE( "RCmManagerExt::Close()" );
-    delete iImplementation;
-    iImplementation = NULL;
-    
-    CLOG_CLOSE;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::OpenL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::OpenL()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("Manager_0x%x"), this );
-    iImplementation = CCmManagerImpl::NewL(EFalse);
-    CLOG_ATTACH( iImplementation, this );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::CreateTablesAndOpenL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::CreateTablesAndOpenL()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("Manager_0x%x"), this );
-    iImplementation = CCmManagerImpl::NewL();
-    CLOG_ATTACH( iImplementation, this );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::OpenLC()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::OpenLC()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("Manager_0x%x"), this );
-    CleanupClosePushL(*this);
-    iImplementation = NULL;
-    iImplementation = CCmManagerImpl::NewL();
-    CLOG_ATTACH( iImplementation, this );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::ConnectionMethodL( TUint aId )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethod RCmManager::ConnectionMethodL( 
-                                                    TUint32 aIapId ) const
-    {
-    RCmConnectionMethod cm;
-    CCmPluginBase* cM =  iImplementation->GetConnectionMethodL( aIapId );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-    
-    return cm;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::GetBearerInfoIntL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 RCmManager::GetBearerInfoIntL( TUint32 aBearerType,
-                                                TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoIntL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::GetBearerInfoBoolL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmManager::GetBearerInfoBoolL( TUint32 aBearerType,
-                                               TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoBoolL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::GetBearerInfoStringL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* RCmManager::GetBearerInfoStringL( TUint32 aBearerType,
-                                                  TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoStringL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::GetBearerInfoStringL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* RCmManager::GetBearerInfoString8L( TUint32 aBearerType,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoString8L( aBearerType,
-                                                       aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManager::GetConnectionMethodInfoIntL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 RCmManager::GetConnectionMethodInfoIntL( 
-                                                    TUint32 aIapId,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoIntL( aIapId, aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManager::GetConnectionMethodInfoBoolL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmManager::GetConnectionMethodInfoBoolL( 
-                                                    TUint32 aIapId,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoBoolL( aIapId, aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManager::GetConnectionMethodInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* RCmManager::GetConnectionMethodInfoStringL( 
-                                                    TUint32 aIapId,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoStringL( aIapId, aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManager::GetConnectionMethodInfoString8L()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* RCmManager::GetConnectionMethodInfoString8L( 
-                                                    TUint32 aIapId,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoString8L( aIapId, aAttribute );
-    }
-    
-//=============================================================================
-// CREATION / DELETION API
-//=============================================================================
-//
-
-//-----------------------------------------------------------------------------
-//  RCmManager::CreateDestinationL( const TDesC& aName )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination RCmManager::CreateDestinationL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "RCmManager::CreateDestinationL" );
-
-    RCmDestination dest;
-    
-    CCmDestinationImpl* destImp = iImplementation->CreateDestinationL( aName );
-    dest.iDestinatonData = destImp->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    delete destImp;
-    
-    return dest;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManager::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
-    TUint32 aImplementationUid )
-    {
-    LOGGER_ENTERFN( "RCmManager::CreateConnectionMethodL" );
-
-    RCmConnectionMethod cm;
-        
-    CCmPluginBase* cM =  
-        iImplementation->CreateConnectionMethodL( aImplementationUid );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-
-    return cm;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManager::CopyL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TInt RCmManager::CopyConnectionMethodL(
-    RCmDestination& aTargetDestination,
-    RCmConnectionMethod& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "RCmManager::CopyConnectionMethodL" );
-
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    aImplementation->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    TInt retVal = iImplementation->CopyConnectionMethodL( 
-                                           *aImplementation, 
-                                           *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retVal;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManager::MoveConnMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TInt RCmManager::MoveConnectionMethodL( 
-    RCmDestination& aSourceDestination,
-    RCmDestination& aTargetDestination,
-    RCmConnectionMethod& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "RCmManager::MoveConnectionMethodL" );
-
-    CCmDestinationImpl* aSourceImpl = 
-            CCmDestinationImpl::NewLC(aSourceDestination.iDestinatonData);
-    aSourceImpl->IncrementRefCounter();
-    CCmDestinationImpl* aTargetImpl = 
-            CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
-    aTargetImpl->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    TInt retVal = iImplementation->MoveConnectionMethodL( 
-                    *aSourceImpl, 
-                    *aTargetImpl, 
-                    *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aTargetImpl);
-    CleanupStack::PopAndDestroy(aSourceImpl);
-    return retVal;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManager::RemoveConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::RemoveConnectionMethodL( 
-    RCmDestination& aDestination,
-    RCmConnectionMethod& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "RCmManager::RemoveConnectionMethodL" );
-
-    CCmDestinationImpl* aDestImpl = 
-            CCmDestinationImpl::NewLC(aDestination.iDestinatonData);
-    aDestImpl->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-
-    iImplementation->RemoveConnectionMethodL( *aDestImpl, *connMethod );
-
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aDestImpl);
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManager::RemoveAllReferencesL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::RemoveAllReferencesL( 
-    RCmConnectionMethod& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "RCmManager::RemoveAllReferencesL" );
-
-    iImplementation->RemoveAllReferencesL( *aConnectionMethod.iImplementation );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::ConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::ConnectionMethodL( RArray<TUint32>& aCMArray,
-                                             TBool aCheckBearerType,
-                                             TBool aLegacyOnly,
-                                             TBool aEasyWlan ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::ConnectionMethodL" );
-
-    return iImplementation->ConnectionMethodL( aCMArray, 
-                                               aCheckBearerType, 
-                                               aLegacyOnly,
-                                               aEasyWlan );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::AllDestinationsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::AllDestinationsL( RArray<TUint32>& aDestArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::AllDestinationsL" );
-
-    return iImplementation->AllDestinationsL( aDestArray );
-    }
-
-
-//-----------------------------------------------------------------------------
-//  RCmManager::DestinationL()
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C RCmDestination RCmManager::DestinationL( TUint32 aId ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::DestinationL" );
-
-    RCmDestination dest;
-    
-    CCmDestinationImpl* aDestImpl = iImplementation->DestinationL( aId );
-    dest.iDestinatonData = aDestImpl->GetData( );
-    dest.iDestinatonData->IncrementRefCounter();
-    delete aDestImpl;
-    
-    return dest;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::BearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::BearerPriorityArrayL( 
-                                        RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::BearerPriorityArray" );
-
-    iImplementation->BearerPriorityArrayL( aArray ); 
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::UpdateBearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::UpdateBearerPriorityArrayL( 
-    const RArray<TBearerPriority>& aArray )
-    {
-    LOGGER_ENTERFN( "RCmManager::UpdateBearerPriorityArray" );    
-
-    iImplementation->UpdateBearerPriorityArrayL( aArray );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::CleanupGlobalPriorityArray()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::CleanupGlobalPriorityArray( 
-    RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::CleanupGlobalPriorityArray" );
-
-    iImplementation->CleanupGlobalPriorityArray( aArray ); 
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::SupportedBearers()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManager::SupportedBearersL( RArray<TUint32>& aArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManager::SupportedBearersL" );
-
-    return iImplementation->SupportedBearersL( aArray );        
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::UncategorizedIconL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C CGulIcon* RCmManager::UncategorizedIconL() const
-    {
-    LOGGER_ENTERFN( "RCmManager::UncategorizedIconL" );
-
-    return iImplementation->UncategorizedIconL();        
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::EasyWlanIdL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C TUint32 RCmManager::EasyWlanIdL() const
-    {
-    LOGGER_ENTERFN( "RCmManager::EasyWlanIdL" );
-
-    return iImplementation->EasyWlanIdL();        
-    }
-    
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ReadDefConnL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C void RCmManager::ReadDefConnL( TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "RCmManager::ReadDefConnL" );
-
-    return iImplementation->ReadDefConnL( aDCSetting );        
-    }
-    
-//-----------------------------------------------------------------------------
-//  RCmManager::WriteDefConnL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C void RCmManager::WriteDefConnL( const  TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "RCmManager::WriteDefConnL" );
-
-    return iImplementation->WriteDefConnL( aDCSetting );        
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManager::ReadGenConnSettingsL()
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C void RCmManager::ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings )
-{
-    LOGGER_ENTERFN( "RCmManager::ReadGenConnSettingsL" );
-
-    return iImplementation->ReadGenConnSettingsL( aGenConnSettings ); 
-}
-
-//-----------------------------------------------------------------------------
-//  RCmManager::WriteGenConnSettingsL()
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C void RCmManager::WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
-{
-    LOGGER_ENTERFN( "RCmManager::WriteGenConnSettingsL" );
-
-    return iImplementation->WriteGenConnSettingsL( aGenConnSettings ); 
-}
-
-//-----------------------------------------------------------------------------
-//  RCmManager::CreateDestinationL( const TDesC& aName,
-//                                     TUint32 aDestId )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestination RCmManager::CreateDestinationL(
-    const TDesC& aName,
-    TUint32 aDestId )
-    {
-    LOGGER_ENTERFN( "RCmManager::CreateDestinationL" );
-
-    if ( aDestId == 0 )
-        {
-        return CreateDestinationL( aName );
-        }
-
-    // Check if there already exists a destination with the same Id
-    RArray<TUint32> destIdArray = RArray<TUint32>( KCmArrayBigGranularity );
-    iImplementation->AllDestinationsL( destIdArray );
-    for ( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        if ( aDestId > 0 && aDestId < 255 )
-            {
-            aDestId = aDestId + KCmDefaultDestinationAPTagId;
-            }
-        else if ( aDestId < KCmDefaultDestinationAPTagId+1 
-                  && ( aDestId > ( KCmDefaultDestinationAPTagId+255 ) ) )
-            {
-            User::Leave( KErrArgument );
-            }
-        if ( aDestId == destIdArray[i] )
-            {
-            destIdArray.Close();
-            User::Leave( KErrAlreadyExists );
-            }
-        }
-    destIdArray.Close();
-
-    RCmDestination dest;
-
-    CCmDestinationImpl* destImp =
-                        iImplementation->CreateDestinationL( aName,
-                                                             aDestId );
-    dest.iDestinatonData = destImp->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    delete destImp;
-
-    return dest;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManager::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
-    TUint32 aImplementationUid,
-    TUint32 aConnMethodId )
-    {
-    LOGGER_ENTERFN( "RCmManager::CreateConnectionMethodL" );
-
-    if ( aConnMethodId == 0 )
-        {
-        return CreateConnectionMethodL( aImplementationUid );
-        }
-
-    RCmConnectionMethod cm;
-
-    CCmPluginBase* cM =
-                   iImplementation->CreateConnectionMethodL( aImplementationUid,
-                                                             aConnMethodId );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-
-    return cm;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmmanagerext.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +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:  Implementation of RCmManagerExt
-*
-*/
-
-#include <cmmanagerext.h>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include <cmdestinationext.h>
-#include "cmlogger.h"
-#include "cmmanager.hrh"
-#include <cmcommonconstants.h>
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include "cmmanager.hrh"
-#include <data_caging_path_literals.hrh>
-
-#include <StringLoader.h>
-#include <e32cmn.h>
-#include <cmmanager.rsg>    // resource
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::~RCmManagerExt()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::Close()
-    {
-    CLOG_WRITE( "RCmManagerExt::Close()" );
-    delete iImplementation;
-    iImplementation = NULL;
-    
-    CLOG_CLOSE;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ConstructL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::OpenL()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("ManagerExt_0x%x"), this );
-    iImplementation = CCmManagerImpl::NewL(EFalse);
-    CLOG_ATTACH( iImplementation, this );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ConstructL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::CreateTablesAndOpenL()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("ManagerExt_0x%x"), this );
-    iImplementation = CCmManagerImpl::NewL();
-    CLOG_ATTACH( iImplementation, this );
-    }
-    
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::OpenLC()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::OpenLC()
-    {
-    CLOG_CREATE;
-    CLOG_NAME_1( _L("Manager_0x%x"), this );
-    CleanupClosePushL(*this);
-    iImplementation = NULL;
-    iImplementation = CCmManagerImpl::NewL();
-    CLOG_ATTACH( iImplementation, this );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::GetBearerInfoIntL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 RCmManagerExt::GetBearerInfoIntL( TUint32 aBearerType,
-                                                   TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoIntL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::GetBearerInfoBoolL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmManagerExt::GetBearerInfoBoolL( TUint32 aBearerType,
-                                                  TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoBoolL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::GetBearerInfoStringL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* RCmManagerExt::GetBearerInfoStringL( TUint32 aBearerType,
-                                                     TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoStringL( aBearerType,
-                                                       aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::GetBearerInfoString8L()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* 
-                RCmManagerExt::GetBearerInfoString8L( TUint32 aBearerType,
-                                                      TUint32 aAttribute ) const
-    {
-    return iImplementation->GetBearerInfoString8L( aBearerType,
-                                                   aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManagerExt::GetConnectionMethodInfoIntL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 RCmManagerExt::GetConnectionMethodInfoIntL( TUint32 aIapId,
-                                     TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoIntL( aIapId, aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManagerExt::GetConnectionMethodInfoBoolL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RCmManagerExt::GetConnectionMethodInfoBoolL( TUint32 aIapId,
-                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoBoolL( aIapId, aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManagerExt::GetConnectionMethodInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* RCmManagerExt::GetConnectionMethodInfoStringL( TUint32 aIapId,
-                                       TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoStringL( aIapId, 
-                                                            aAttribute );
-    }
-    
-// -----------------------------------------------------------------------------
-// RCmManagerExt::GetConnectionMethodInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* 
-    RCmManagerExt::GetConnectionMethodInfoString8L( TUint32 aIapId,
-                                                    TUint32 aAttribute ) const
-    {
-    return iImplementation->GetConnectionMethodInfoString8L( aIapId, aAttribute );
-    }
-    
-//=============================================================================
-// CREATION / DELETION API
-//=============================================================================
-//
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::CreateDestinationL( const TDesC& aName )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C 
-    RCmDestinationExt RCmManagerExt::CreateDestinationL( const TDesC& aName )
-    {
-    RCmDestinationExt dest;
-    
-    CCmDestinationImpl* destImp = iImplementation->CreateDestinationL( aName );
-    dest.iDestinatonData = destImp->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    delete destImp;
-    
-    return dest;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManagerExt::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethodExt 
-        RCmManagerExt::CreateConnectionMethodL( TUint32 aImplementationUid )
-    {
-    RCmConnectionMethodExt cm;
-        
-    CCmPluginBase* cM =  
-        iImplementation->CreateConnectionMethodL( aImplementationUid );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-
-    return cm;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManagerExt::CopyL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TInt RCmManagerExt::CopyConnectionMethodL( 
-                                      RCmDestinationExt& aTargetDestination,
-                                      RCmConnectionMethodExt& aConnectionMethod )
-    {
-    CCmDestinationImpl* aImplementation = 
-            CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
-    // Deleting aImplementation will decrement the ref counter
-    aImplementation->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    TInt retVal = iImplementation->CopyConnectionMethodL( 
-                                           *aImplementation, 
-                                           *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aImplementation);
-    return retVal;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManagerExt::MoveConnMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C TInt RCmManagerExt::MoveConnectionMethodL( 
-                                      RCmDestinationExt& aSourceDestination,
-                                      RCmDestinationExt& aTargetDestination,
-                                      RCmConnectionMethodExt& aConnectionMethod )
-    {
-    CCmDestinationImpl* aSourceImpl = 
-            CCmDestinationImpl::NewLC(aSourceDestination.iDestinatonData);
-    aSourceImpl->IncrementRefCounter();
-    CCmDestinationImpl* aTargetImpl = 
-            CCmDestinationImpl::NewLC(aTargetDestination.iDestinatonData);
-    aTargetImpl->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    TInt retVal = iImplementation->MoveConnectionMethodL( 
-                    *aSourceImpl, 
-                    *aTargetImpl, 
-                    *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aTargetImpl);
-    CleanupStack::PopAndDestroy(aSourceImpl);
-    return retVal;
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManagerExt::RemoveConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::RemoveConnectionMethodL( 
-                                      RCmDestinationExt& aDestination,
-                                      RCmConnectionMethodExt& aConnectionMethod )
-    {
-    CCmDestinationImpl* aDestImpl = 
-            CCmDestinationImpl::NewLC(aDestination.iDestinatonData);
-    aDestImpl->IncrementRefCounter();
-    CCmPluginBase* connMethod = new (ELeave) 
-                            CCmPluginBase(aConnectionMethod.iImplementation);
-    connMethod->IncrementRefCounter();    
-    CleanupStack::PushL( connMethod );        
-    iImplementation->RemoveConnectionMethodL( 
-                    *aDestImpl, 
-                    *connMethod );
-    CleanupStack::PopAndDestroy(connMethod);
-    CleanupStack::PopAndDestroy(aDestImpl);
-    }
-
-//-----------------------------------------------------------------------------
-// RCmManagerExt::RemoveAllReferencesL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::RemoveAllReferencesL( 
-                                    RCmConnectionMethodExt& aConnectionMethod )
-    {
-    iImplementation->RemoveAllReferencesL( *aConnectionMethod.iImplementation );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ConnectionMethodExtL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C RCmConnectionMethodExt 
-                              RCmManagerExt::ConnectionMethodL( TUint32 aIapId )
-    {
-    RCmConnectionMethodExt cm;
-    CCmPluginBase* cM =  iImplementation->GetConnectionMethodL( aIapId );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-        
-    return cm;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::ConnectionMethodL( RArray<TUint32>& aCMArray,
-                                                TBool aCheckBearerType,
-                                                TBool aLegacyOnly,
-                                                TBool aEasyWlan )
-    {
-    iImplementation->ConnectionMethodL( aCMArray, 
-                                               aCheckBearerType,
-                                               aLegacyOnly,
-                                               aEasyWlan );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::DestinationL()
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C RCmDestinationExt RCmManagerExt::DestinationL( TUint32 aId )
-    {
-    RCmDestinationExt dest;
-    
-    CCmDestinationImpl* aDestImpl = iImplementation->DestinationL( aId );
-    dest.iDestinatonData = aDestImpl->GetData( );
-    dest.iDestinatonData->IncrementRefCounter();
-    delete aDestImpl;
-    
-    return dest;
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::AllDestinationsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::AllDestinationsL( RArray<TUint32>& aDestArray )
-    {   
-    return iImplementation->AllDestinationsL( aDestArray );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::BearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::BearerPriorityArrayL( 
-                                        RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManagerExt:BearerPriorityArray" );
-    iImplementation->BearerPriorityArrayL( aArray ); 
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::UpdateBearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::UpdateBearerPriorityArrayL( 
-                                        const RArray<TBearerPriority>& aArray )
-    {
-    LOGGER_ENTERFN( "RCmManagerExt::UpdateBearerPriorityArray" );    
-    iImplementation->UpdateBearerPriorityArrayL( aArray );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::CleanupGlobalPriorityArray()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::CleanupGlobalPriorityArray( 
-                                        RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "RCmManagerExt:CleanupGlobalPriorityArray" );
-    iImplementation->CleanupGlobalPriorityArray( aArray ); 
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::SupportedBearers()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void RCmManagerExt::SupportedBearersL( RArray<TUint32>& aArray ) const
-    {
-    return iImplementation->SupportedBearersL( aArray );        
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::UncategorizedIconL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C CGulIcon* RCmManagerExt::UncategorizedIconL() const
-    {
-    return iImplementation->UncategorizedIconL();        
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::EasyWlanIdL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C TUint32 RCmManagerExt::EasyWlanIdL()
-    {
-    return iImplementation->EasyWlanIdL();        
-    }
-    
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::ReadDefConnL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C void RCmManagerExt::ReadDefConnL( TCmDefConnValue& aDCSetting )
-    {
-    return iImplementation->ReadDefConnL( aDCSetting );        
-    }
-    
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::WriteDefConnL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C void RCmManagerExt::WriteDefConnL( const  TCmDefConnValue& aDCSetting )
-    {
-    return iImplementation->WriteDefConnL( aDCSetting );        
-    }
-
- 
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::CreateDestinationL( const TDesC& aName,
-//                                     TUint32 aDestId )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C RCmDestinationExt RCmManagerExt::CreateDestinationL(
-    const TDesC& aName,
-    TUint32 aDestId )
-    {
-    if ( aDestId == 0 )
-        {
-        return CreateDestinationL( aName );
-        }
-
-    // Check if there already exists a destination with the same Id
-    RArray<TUint32> destIdArray = RArray<TUint32>( KCmArrayBigGranularity );
-    iImplementation->AllDestinationsL( destIdArray );
-    for ( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        if ( aDestId > 0 && aDestId < 255 )
-            {
-            aDestId = aDestId + KCmDefaultDestinationAPTagId;
-            }
-        else if ( aDestId < KCmDefaultDestinationAPTagId+1 
-                  && ( aDestId > ( KCmDefaultDestinationAPTagId+255 ) ) )
-            {
-            User::Leave( KErrArgument );
-            }
-        if ( aDestId == destIdArray[i] )
-            {
-            destIdArray.Close();
-            User::Leave( KErrAlreadyExists );
-            }
-        }
-    destIdArray.Close();
-
-    RCmDestinationExt dest;
-
-    CCmDestinationImpl* destImp =
-                        iImplementation->CreateDestinationL( aName,
-                                                             aDestId );
-    dest.iDestinatonData = destImp->GetData();
-    dest.iDestinatonData->IncrementRefCounter();
-    delete destImp;
-
-    return dest;
-    }
-
-// -----------------------------------------------------------------------------
-// RCmManagerExt::CreateConnectionMethodL()
-// -----------------------------------------------------------------------------
-//  
-EXPORT_C RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(
-    TUint32 aImplementationUid,
-    TUint32 aConnMethodId )
-    {
-    if ( aConnMethodId == 0 )
-        {
-        return CreateConnectionMethodL( aImplementationUid );
-        }
-
-    RCmConnectionMethodExt cm;
-
-    CCmPluginBase* cM =
-                   iImplementation->CreateConnectionMethodL( aImplementationUid,
-                                                             aConnMethodId );
-    cm.iImplementation = cM->Plugin();
-    cm.iImplementation->IncrementRefCounter();
-    delete cM;
-
-    return cm;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmmanagerimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3058 +0,0 @@
-/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CCmManagerImpl.
-*
-*/
-
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include <cmdestination.h>
-#include <cmdestinationext.h>
-#include "cmdestinationimpl.h"
-#include "cmtransactionhandler.h"
-#include "cmlogger.h"
-#include "cmmanager.hrh"
-#include <cmcommonconstants.h>
-#include <cmmanagerext.h>
-#include <cmpluginembdestinationdef.h>
-#include "cmobjectpool.h"
-#include "cmcommsdatnotifier.h"
-
-#include <sysutil.h>
-#include <featmgr.h>
-#include <wlancontainer.h>  // CCDWlanServiceRecord
-#include <StringLoader.h>
-#include <commsdattypesv1_1.h>
-#include <e32cmn.h>
-#include <bautils.h>        // BaflUtils
-#include <cmmanager.rsg>    // resource
-#include <data_caging_path_literals.hrh>
-#include <ecom/ecom.h>        // For REComSession
-#include <cmmanagerext.h> 
-
-#include <cmmanager.mbg>   // icons
-#include <AknsUtils.h>
-
-#include <commsdattypesv1_1.h>
-#include <rconnmon.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// CONSTANTS
-
-const TInt KResFileGranularity = 5;
-const TInt KPluginGranularity = 3;
-// if a CmId is grater than KMaxIapId, than it has no iap record
-// Otherwise cmId is the same as the IapId
-const TUint32 KMaxIapID = 255;
-// Safety margin when checking disk space
-const TUint32 KBytesToWrite = 8000; 
-
-const TUint32 KEndOfArray = KMaxTUint;
-/**
-* This array lists all the bearerspecific attributes.
-* The bearerspecific attributes can be queried via both 
-* the manager interface's and connection method interface's ::Get functions.
-*/
-static const TUint32 KBearerSpecificAttributes[]=
-    {
-    /**
-    */
-    ECmCoverage,                        
-    ECmDefaultPriority,                        
-    ECmDestination,     
-    ECmBearerHasUi,   
-    ECmIPv6Supported,           
-    ECmDefaultUiPriority,
-    ECmBearerIcon,
-    ECmBearerAvailableIcon,
-    ECmBearerAvailableName,
-    ECmBearerSupportedName,
-    ECmBearerAvailableText,                        
-    ECmBearerNamePopupNote,
-    ECmCommsDBBearerType,   
-    ECmBearerSettingName,
-    ECmVirtual,
-    ECmExtensionLevel,
-    ECmAddToAvailableList,
-    KEndOfArray
-    };
-
-// -----------------------------------------------------------------------------
-// Test functions
-// -----------------------------------------------------------------------------
-//
-/*#ifdef _DEBUG
-void DumIapTableL( CMDBSession& aSession )
-    {
-    CMDBRecordSet<CCDIAPRecord>*  ptrRecordSet = 
-                    new (ELeave) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
-    CleanupStack::PushL( ptrRecordSet );
-    
-    TRAP_IGNORE( ptrRecordSet->LoadL( aSession ) );
-    
-    TInt iapRecords = ptrRecordSet->iRecords.Count();
-    CLOG_WRITE_1_PTR( NULL, "Dumping IAP Table\nNo. of IAPs: [%d]", iapRecords );
-    for ( TInt i = 0; i < iapRecords; i++ )
-        {
-        CCDIAPRecord* iapRecord = (*ptrRecordSet)[i];
-
-        CLOG_WRITE_4_PTR( NULL, "Rec id:[%d] - Name: [%S] - Service Type: [%S] - Bearer Type: [%S]",
-                                iapRecord->RecordId(),
-                                &FIELD_TO_TDESC( iapRecord->iRecordName ),
-                                &FIELD_TO_TDESC( iapRecord->iServiceType ),
-                                &FIELD_TO_TDESC( iapRecord->iBearerType )
-                                );
-        }
-
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    }
-#endif */ // _DEBUG
-
-//=============================================================================
-// CONSTRUCTION / DESTRUCTION API
-//=============================================================================
-//
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::NewL()
-//-----------------------------------------------------------------------------
-//
-CCmManagerImpl* CCmManagerImpl::NewL( TBool aCreateTables )
-    {
-    CCmManagerImpl* self = new (ELeave) CCmManagerImpl();
-    CleanupStack::PushL( self );
-    self->iCreateTables = aCreateTables;
-    self->ConstructL();
-    CleanupStack::Pop( self );   // self
-    
-    return self;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CCmManagerImpl()
-//-----------------------------------------------------------------------------
-//
-CCmManagerImpl::CCmManagerImpl()
-:iDefConnSupported(EFalse),iCreateTables(ETrue)
-    {
-    CLOG_CREATE;
-
-    Dll::SetTls( this );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::~CCmManagerImpl()
-//-----------------------------------------------------------------------------
-//
-CCmManagerImpl::~CCmManagerImpl()
-    {
-    CLOG_WRITE( "CCmManagerImpl::~CCmManagerImpl" );
-    
-    if ( iBearerPriorityArray )
-        {
-        CleanupGlobalPriorityArray( *iBearerPriorityArray );
-        delete iBearerPriorityArray;
-        }
-
-    if ( iPlugins )
-        {
-        iPlugins->ResetAndDestroy();
-        delete iPlugins;
-        }
-    
-    
-    if ( iResourceFiles )
-        {
-        TInt resCount = iResourceFiles->Count();
-        for ( TInt i = 0; i < resCount; ++i )
-            {
-            // close the resource file
-            (*iResourceFiles)[0]->iFile.Close();
-            // delete the structure
-            delete (*iResourceFiles)[0];
-            // delete array item
-            iResourceFiles->Delete( 0 );
-            }
-            
-        iResourceFiles->Reset();        
-        delete iResourceFiles;
-        }
-    
-    iFs.Close();
-    
-    delete iPluginImpl;
-
-    if (iTrans)
-        {
-        delete &Session();
-        delete iTrans;
-        }
-
-    if( iIsFeatureManagerInitialised )
-        {
-        FeatureManager::UnInitializeLib();
-        }
-
-    REComSession::FinalClose();
-    
-    delete iObjectPool;
-    
-    delete iCommsDatIapNotifier;
-    delete iCommsDatSnapNotifier;
-
-    CLOG_CLOSE;
-    }
-
-      
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::CheckTablesL()
-// -----------------------------------------------------------------------------
-//     
-void CCmManagerImpl::CheckTablesL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CheckDestinationNetworkTableL" );
-    
-    TInt err( 0 );
-
-    CLOG_WRITE( "Destination network" );
-    if (iCreateTables)
-        {
-        TRAP( err, iDestinationTableId = 
-                        CCDDataMobilitySelectionPolicyRecord::TableIdL( Session() ));
-        CLOG_WRITE_1( "err: [%d]", err );
-        if( err == KErrNotFound )
-            {
-            iDestinationTableId = 
-                       CCDDataMobilitySelectionPolicyRecord::CreateTableL( Session() );
-            }
-        else
-            {
-            User::LeaveIfError( err );
-            }        
-        }
-    else
-        {
-        iDestinationTableId = 
-                        CCDDataMobilitySelectionPolicyRecord::TableIdL( Session() );        
-        }
-        
-    CLOG_WRITE( "Global Bearer Type Priorization Table" );
-    TRAP( err, iBearerTypePriorizationTableId = 
-                CCDGlobalBearerTypePriorizationRecord::TableIdL( Session() ) );
-    CLOG_WRITE_1( "err: [%d]", err );
-    if( err == KErrNotFound )
-        {
-        iBearerTypePriorizationTableId = 
-               CCDGlobalBearerTypePriorizationRecord::CreateTableL( Session() );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-    
-    CLOG_WRITE( "Destination network - Icon table" );        
-    TRAP( err, iIconTableId = CCDSNAPMetadataRecord::TableIdL( Session() ) );
-    if( err == KErrNotFound )
-        {
-        iIconTableId = CCDSNAPMetadataRecord::CreateTableL( Session() );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-        
-    CLOG_WRITE( "Seamlessness table" );
-    TRAP( err, iSeamlessnessTableId = CCDIAPMetadataRecord::TableIdL( Session() ) );
-    CLOG_WRITE_1( "err: [%d]", err );
-    if( err == KErrNotFound )
-        {
-        iSeamlessnessTableId = CCDIAPMetadataRecord::CreateTableL( Session() );
-        }
-    else
-        {
-        User::LeaveIfError( err );
-        }
-    if ( IsDefConnSupported() )
-        {
-        CLOG_WRITE( "Default connection table" );
-        TRAP( err, iDefConnTableId = CCDDefConnRecord::TableIdL( Session() ) );
-        CLOG_WRITE_1( "err: [%d]", err );
-        if( err == KErrNotFound )
-            {
-            iDefConnTableId = CCDDefConnRecord::CreateTableL( Session() );
-            }
-        else
-            {
-            User::LeaveIfError( err );
-            }   
-        }
-    }
-     
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CreateBearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::CreateBearerPriorityArrayL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl:CreateBearerPriorityArray" );
-
-    iBearerPriorityArray = 
-                new ( ELeave ) RArray<TBearerPriority>( KCmArrayBigGranularity );
-
-    CMDBRecordSet<CCmBearerPriRec>* bpRS = 
-                new (ELeave) CMDBRecordSet<CCmBearerPriRec>( 
-                                               iBearerTypePriorizationTableId );
-    CleanupStack::PushL( bpRS );
-        
-    OpenTransactionLC();        
-    TRAP_IGNORE( bpRS->LoadL( Session() ) );
-    RollbackTransaction();
-    
-    TInt bpCount = bpRS->iRecords.Count();
-    TInt i( 0 );
-    
-    while ( i < bpCount ) // loop the Bearer Priority table
-        {
-        // Bearer Priority record ID
-        HBufC* bpServiceType = QUERY_HBUFC_FIELD( (*bpRS)[i], 
-                                                  KCDTIdGlobalServiceType );
-        
-        TInt bpPriority = ( QUERY_INT_FIELD( (*bpRS)[i], 
-                                             KCDTIdGlobalServicePriority ) );
-        TInt uiPriority = ( QUERY_INT_FIELD( (*bpRS)[i], 
-                                             KCDTIdGlobalServiceUIPriority ) );                                    
-        CLOG_WRITE( "Bearer Priority Table Values" );
-        CLOG_WRITE_1( "Service Type: [%S]", bpServiceType );
-        CLOG_WRITE_1( "Bearer Priority: [%d]", bpPriority );
-        CLOG_WRITE_1( "UI Priority: [%d]", uiPriority );                          
-        TBearerPriority bp;
-        bp.iServiceType = bpServiceType->AllocL();
-        bp.iPriority = bpPriority;
-        bp.iUIPriority = uiPriority;
-        iBearerPriorityArray->AppendL( bp );
-        i++;
-        }
-    
-    CleanupStack::PopAndDestroy( bpRS );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::BearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::BearerPriorityArrayL( RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl:BearerPriorityArray" );
-    TRAPD( err, CopyBearerPriorityArrayL( aArray ) );
-    if( err )
-        // in case of any problem we clean up this array
-        {
-        User::Leave( err );
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CopyBearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::CopyBearerPriorityArrayL( 
-                                        RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl:BearerPriorityArray" );
-    for ( TInt i = 0; i < iBearerPriorityArray->Count(); i++ )
-        {
-        TBearerPriority item;
-        
-        TBearerPriority* orgItem = &(*iBearerPriorityArray)[i];
-        
-        item.iServiceType = HBufC::NewLC( orgItem->iServiceType->Length() );
-        item.iServiceType->Des().Copy( *orgItem->iServiceType );
-        item.iPriority = orgItem->iPriority;
-        item.iUIPriority = orgItem->iUIPriority;
-                          
-        User::LeaveIfError( aArray.Append( item ) );
-        
-        CleanupStack::Pop(); // item->iServiceType
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::UpdateBearerPriorityArrayL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::UpdateBearerPriorityArrayL( 
-                                        const RArray<TBearerPriority>& aArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::UpdateBearerPriorityArray" );    
-    
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCmBearerPriRec>* bpRS = new (ELeave) 
-            CMDBRecordSet<CCmBearerPriRec>( iBearerTypePriorizationTableId );
-    CleanupStack::PushL( bpRS ); // 1
-    TRAP_IGNORE( bpRS->LoadL( Session() ) );
-    
-    // Delete the old record
-    for ( TInt i = 0; i < bpRS->iRecords.Count(); ++i )
-        {
-        bpRS->iRecords[i]->DeleteL( Session() );
-        }
-    
-    CleanupGlobalPriorityArray( *iBearerPriorityArray );
-            
-    CleanupStack::PopAndDestroy( bpRS );
-    bpRS = NULL;
-    
-    // Add the new content
-    CCmBearerPriRec* bpRcd = 
-            new (ELeave) CCmBearerPriRec( iBearerTypePriorizationTableId );
-    CleanupStack::PushL( bpRcd ); // 2
-
-    CLOG_WRITE( "Store bearer info to table" );
-    for ( TInt i = 0; i < aArray.Count(); ++i )
-        {        
-        bpRcd->SetRecordId( KCDNewRecordRequest );
-        
-        HBufC* serviceTypeVal = aArray[i].iServiceType;
-        TInt priorityVal = aArray[i].iPriority;
-        TInt uiPriorityVal = aArray[i].iUIPriority;
-        
-        CLOG_WRITE_FORMAT( "Set service type: [%S   ]", serviceTypeVal );
-        SET_HBUFC_FIELD(    bpRcd, 
-                            KCDTIdGlobalServiceType, 
-                            serviceTypeVal );
-        CLOG_WRITE_1( "Set priority: [%d]", priorityVal );
-        SET_INT_FIELD(  bpRcd, 
-                        KCDTIdGlobalServicePriority, 
-                        priorityVal );
-        CLOG_WRITE_1( "Set uipriority: [%d]", uiPriorityVal );
-        SET_INT_FIELD(  bpRcd, 
-                        KCDTIdGlobalServiceUIPriority, 
-                        uiPriorityVal );                        
-        bpRcd->StoreL( Session() );
-        
-        TBearerPriority item;
-        
-        item.iServiceType = serviceTypeVal->AllocLC();
-        item.iPriority = priorityVal;
-        item.iUIPriority = uiPriorityVal;
-        iBearerPriorityArray->AppendL( item );
-        CleanupStack::Pop( item.iServiceType );
-        }
-
-    CleanupStack::PopAndDestroy( bpRcd );
-
-    CommitTransactionL( KErrNone );
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::GlobalBearerPriority()
-//-----------------------------------------------------------------------------
-//
-TInt CCmManagerImpl::GlobalBearerPriority( TBool aUiPriority, 
-                                           const TDesC& aServiceType ) const
-    {
-    for ( TInt i = 0; i < iBearerPriorityArray->Count(); ++i )
-        {
-        if ( !aServiceType.CompareF( *(*iBearerPriorityArray)[i].iServiceType ) )
-            {
-            if( aUiPriority )
-                {
-                return (*iBearerPriorityArray)[i].iUIPriority;
-                }
-            else
-                {
-                return (*iBearerPriorityArray)[i].iPriority;
-                }
-            }
-        }
-        
-    return KDataMobilitySelectionPolicyPriorityWildCard;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CleanupGlobalPriorityArray()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::CleanupGlobalPriorityArray(
-                                        RArray<TBearerPriority>& aArray ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CleanupGlobalPriorityArray" );
-
-    for ( TInt i = 0; i < aArray.Count(); ++i )
-        {
-        delete aArray[i].iServiceType;
-        }
-        
-    aArray.Reset();
-    aArray.Close();
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::AddResourceFileL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::AddResourceFileL( TFileName& aName )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AddResourceFileL" );
-    
-    TInt index = FindResourceFile( aName );
-    
-    if ( index != KErrNotFound )
-        {
-        ++(*iResourceFiles)[index]->iRefs;
-        return;
-        }
-        
-    TResourceFiles* newRes = new (ELeave) TResourceFiles;
-    CleanupStack::PushL( newRes );
-
-    RResourceFile resFile;
-    resFile.OpenL( iFs, aName );
-    CleanupClosePushL( resFile );
-    
-    resFile.ConfirmSignatureL(0); 
-    
-    newRes->iFile = resFile;
-    newRes->iFName.Copy( aName );
-    newRes->iRefs = 1;  // 1 reference to this resource file
-    
-    iResourceFiles->AppendL( newRes );
-    
-    CleanupStack::Pop( 2 ); // resFile, newRes
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::RemoveResourceFile()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::RemoveResourceFile( TFileName& aName )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveResourceFile" );
-
-    TInt index = FindResourceFile( aName );
-    
-    if ( index == KErrNotFound )
-        {
-        return;
-        }
-        
-    if ( !--(*iResourceFiles)[index]->iRefs )
-        // it was the last reference
-        {
-        (*iResourceFiles)[index]->iFile.Close();
-        delete (*iResourceFiles)[index];
-        
-        iResourceFiles->Delete( index );
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::FindResourceFile()
-//-----------------------------------------------------------------------------
-//
-TInt CCmManagerImpl::FindResourceFile( TFileName& aName ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::FindResourceFile" );
-
-    BaflUtils::NearestLanguageFile( iFs, aName );
-    
-    for ( TInt i = 0; i < iResourceFiles->Count(); ++i )
-        {
-        if ( !(*iResourceFiles)[i]->iFName.CompareF( aName ) )
-            {
-            return i;
-            }
-        }
-    
-    return KErrNotFound;
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::AllocReadL()
-//-----------------------------------------------------------------------------
-//
-HBufC* CCmManagerImpl::AllocReadL( TInt aResourceId ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AllocReadL" );
-
-    HBufC* retVal = NULL;
-    
-    // Scan all resource files to find owner
-    for (TInt i=0; i < iResourceFiles->Count(); i++)
-        { 
-        RResourceFile& file=(*iResourceFiles)[i]->iFile;
-        if ( file.OwnsResourceId(aResourceId) )
-            {
-            HBufC8* readBuffer = file.AllocReadLC( aResourceId );
-            // as we are expecting HBufC16...
-            const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(),
-                                         readBuffer->Length() >> 1 );
-            retVal=HBufC16::NewL( ptrReadBuffer.Length() );
-            retVal->Des().Copy( ptrReadBuffer );
-            CleanupStack::PopAndDestroy( readBuffer ); // readBuffer
-            
-            // exit from loop
-            break;
-            }
-        }
-
-    return retVal;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::ConstructL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ConstructL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ConstructL" );
-    CLOG_NAME_1( _L("ManagerImpl_0x%x"), this );
-    
-    iObjectPool = new (ELeave) CCMObjectPool(*this);
-            
-    FeatureManager::InitializeLibL();
-    iIsFeatureManagerInitialised = ETrue;
-    iHelp = FeatureManager::FeatureSupported( KFeatureIdHelp ); 
-    iDefConnSupported = ETrue;
-    //iDefConnSupported = FeatureManager::FeatureSupported( KFeatureIdDefaultConnection );    
-    iWLan = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-
-    CMDBSession* db = CMDBSession::NewL( KCDVersion1_2 );
-    
-    iTrans = CCmTransactionHandler::NewL( *db );
-    CLOG_ATTACH( iTrans, this );
-    
-    User::LeaveIfError( iFs.Connect() );
-  
-    iResourceFiles = new (ELeave) CArrayPtrFlat<TResourceFiles>( 
-                                                          KResFileGranularity );
-    
-    TParse fp;
-    TInt err = fp.Set( KACMManagerResDirAndFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    CLOG_WRITE_1( "Set: [%d]", err );
-    if ( err != KErrNone)
-        {
-        User::Leave( err );
-        }
-        
-    TFileName fName;
-    
-    fName.Copy( fp.FullName() );
-    
-    AddResourceFileL( fName );
-        
-    CheckTablesL();
-    CreateBearerPriorityArrayL();
-        
-    BuildPluginArrayL();
-        
-    TCmPluginInitParam params( *this );
-    
-    params.iParentDest = NULL;
-    iPluginImpl = CCmConnectionMethodInfo::NewL( &params );
-    CLOG_ATTACH( iPluginImpl, this );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmManagerImpl::OpenTransactionLC
-// ---------------------------------------------------------------------------
-//
-void CCmManagerImpl::OpenTransactionLC( TBool aSetAttribs )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::OpenTransactionL" );
-
-    iTrans->OpenTransactionLC(  aSetAttribs );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmManagerImpl::CommitTransactionL( TInt aError )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CommitTransactionL" );
-
-    iTrans->CommitTransactionL( aError );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmManagerImpl::RollbackTransaction()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RollbackTransaction" );
-    CleanupStack::Pop( iTrans );
-    iTrans->Close();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmDestinationImpl::StartCommsDatNotifier
-// ---------------------------------------------------------------------------
-//
-void CCmManagerImpl::StartCommsDatNotifierL()
-    {
-    // Two instances of class CCmCommsDatNotifier are created here and
-    // referred by all watchers in CmManager. One is to watch change in Iap Table
-    // and the other is to watch change in Snap Table.
-    
-    if ( iCommsDatIapNotifier == NULL )
-        {
-        iCommsDatIapNotifier = CCmCommsDatNotifier::NewL( KCDTIdIAPRecord );
-        }
-    
-    if ( iCommsDatSnapNotifier == NULL )
-        {
-        TUint32 snapTableId = GetSnapTableIdL();
-        iCommsDatSnapNotifier = CCmCommsDatNotifier::NewL( snapTableId );
-        }
-    }
-
-//=============================================================================
-// CREATION / DELETION API
-//=============================================================================
-//
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CreateDestinationL( const TDesC& aName )
-//-----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmManagerImpl::CreateDestinationL( const TDesC& aName )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateDestinationL" );
-    
-    CheckAvailableSpaceL();
-    
-    if ( aName.Length() == 0 )
-        {
-        User::Leave( KErrArgument );
-        }
-    
-    return iObjectPool->GetDestinationL( aName );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::CreateDestinationL( const TDesC& aName, TUint32
-//  aDestId )
-//-----------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmManagerImpl::CreateDestinationL(
-    const TDesC& aName,
-    TUint32 aDestId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateDestinationL" );
-
-    CheckAvailableSpaceL();
-    
-    if ( aName.Length() == 0 )
-        {
-        User::Leave( KErrArgument );
-        }
-
-    if ( aDestId == 0 )
-        {
-        return CreateDestinationL( aName );
-        }
-
-    return iObjectPool->CreateDestinationL( aName, aDestId );
-    }
-
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::DestinationUpdated( CCmDestinationImpl* aDestination )
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::DestinationUpdated( CCmDestinationImpl* aDestination )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::DestinationUpdatedL" );
-    iObjectPool->DestinationUpdated( aDestination );
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CreateConnectionMethodL()
-// --------------------------------------------------------------------------
-//  
-CCmPluginBase* 
-        CCmManagerImpl::CreateConnectionMethodL( CCmPluginBaseEng* pluginBaseEng )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateConnectionMethodL 2" );
-
-    CheckAvailableSpaceL();        
-
-    return iObjectPool->CreateConnectionMethodL( pluginBaseEng );
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::InsertConnectionMethodL()
-// --------------------------------------------------------------------------
-//
-void CCmManagerImpl::InsertConnectionMethodL( CCmPluginBaseEng* pluginBaseEng )
-    {
-    iObjectPool->InsertConnectionMethodL( pluginBaseEng );
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CreateConnectionMethodL()
-// --------------------------------------------------------------------------
-//  
-CCmPluginBase* 
-        CCmManagerImpl::CreateConnectionMethodL( TUint32 aImplementationUid,
-                                    CCmDestinationImpl* aParentDestination )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateConnectionMethodL" );
-    
-    CheckAvailableSpaceL();
-    
-    TCmPluginInitParam params( *this );
-    if (aParentDestination)
-        {
-        params.iParentDest = aParentDestination->Id();        
-        }
-
-    return iObjectPool->CreateConnectionMethodL( aImplementationUid, params );
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CreateConnectionMethodL()
-// --------------------------------------------------------------------------
-//  
-CCmPluginBase* 
-        CCmManagerImpl::CreateConnectionMethodL( TUint32 aImplementationUid,
-                                    TUint32 aConnMethodId,
-                                    CCmDestinationImpl* aParentDestination )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateConnectionMethodL" );
-    
-    CheckAvailableSpaceL();
-         
-    TCmPluginInitParam params( *this );
-    if ( aParentDestination )
-        {
-        params.iParentDest = aParentDestination->Id();        
-        }
-
-    return iObjectPool->CreateConnectionMethodL( aImplementationUid,
-    		                                     params,
-    		                                     aConnMethodId);
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::DoCreateConnectionMethodL()
-// --------------------------------------------------------------------------
-//  
-CCmPluginBaseEng* 
-        CCmManagerImpl::DoCreateConnectionMethodL( TUint32 aImplementationUid,
-                                     TCmPluginInitParam& aParams )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::DoCreateConnectionMethodL" );
-
-    const TUid KMCMmImplementationUid = { aImplementationUid };    
-    TAny* ptr = REComSession::CreateImplementationL( KMCMmImplementationUid, 
-                                                     _FOFF( CCmPluginBaseEng, 
-                                                            iDtor_ID_Key ), 
-                                                     (TAny*)&aParams );
-
-    CCmPluginBaseEng* plugin = STATIC_CAST( CCmPluginBaseEng*, ptr );
-    CleanupStack::PushL( plugin );
-
-    plugin->CreateNewL(); 
-    plugin->SetIdValidity(EFalse);   
-    CleanupStack::Pop( plugin );  // plugin
-        
-    return plugin;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::DoCreateConnectionMethodL()
-// --------------------------------------------------------------------------
-//  
-CCmPluginBaseEng* 
-   CCmManagerImpl::DoCreateConnectionMethodL( TUint32 aImplementationUid,
-                                              TCmPluginInitParam& aParams,
-                                              TUint32 aConnMethodId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::DoCreateConnectionMethodL" );
-
-    const TUid KMCMmImplementationUid = { aImplementationUid };    
-    TAny* ptr = REComSession::CreateImplementationL( KMCMmImplementationUid, 
-                                                    _FOFF( CCmPluginBaseEng, 
-                                                           iDtor_ID_Key ), 
-                                                    (TAny*)&aParams );
-
-    CCmPluginBaseEng* plugin = STATIC_CAST( CCmPluginBaseEng*, ptr );
-    CleanupStack::PushL( plugin );
-
-    plugin->CreateNewL(); 
-    plugin->SetIdValidity( EFalse );
-    plugin->SetPreDefinedId( aConnMethodId );
-    CleanupStack::Pop( plugin );  // plugin
-
-    return plugin;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::ConnectionMethodL( TUint aId )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBaseEng* 
-                      CCmManagerImpl::ConnectionMethodL( TUint32 /*aCmId*/ )
-    {
-    LOGGER_ENTERFN( "Error: Obsolete function CCmManagerImpl::ConnectionMethodL used" );
-    User::Panic( _L("CMManager"), KErrNotSupported );
-    return NULL;    
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::GetConnectionMethodL( TUint aId )
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBase* 
-                      CCmManagerImpl::GetConnectionMethodL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetConnectionMethodL" );
-    
-    CCmPluginBase* plugin = DoFindConnMethodL( aCmId, NULL );
-                                      
-    return plugin;
-    }
-
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::AppendUncatCmListL
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::AppendUncatCmListL( RPointerArray<CCmPluginBase>& aCMArray,
-                                        TBool aCheckBearerType,
-                                        TBool aLegacyOnly,
-                                        TBool aEasyWlan,
-                                        TBool aSortByBearer )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AppendUncatCmListL" );
-
-    RArray<TUint32> cmUidArray;
-    CleanupClosePushL(cmUidArray);
-    ConnectionMethodL(cmUidArray, aCheckBearerType, aLegacyOnly, aEasyWlan, aSortByBearer);
-    AppendCmListFromUidsL( cmUidArray, aCMArray );
-
-    CleanupStack::PopAndDestroy(&cmUidArray);
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::AppendUncatCmListLC
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::AppendUncatCmListLC( RPointerArray<CCmPluginBase>& aCMArray,
-                                        TBool aCheckBearerType,
-                                        TBool aLegacyOnly,
-                                        TBool aEasyWlan,
-                                        TBool aSortByBearer )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AppendUncatCmListLC" );
-
-    AppendUncatCmListL( aCMArray, aCheckBearerType, aLegacyOnly, aEasyWlan, aSortByBearer);
-    
-    CleanupResetAndDestroyPushL< RPointerArray<CCmPluginBase> >( aCMArray );
-    }
-        
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AppendCmListLC
-// -----------------------------------------------------------------------------
-//     
-void CCmManagerImpl::AppendCmListLC( TUint32 aDestintaionId, RPointerArray<CCmPluginBase>& aCMArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AppendCmListLC" );
-
-    AppendCmListL( aDestintaionId, aCMArray );
-    CCmManagerImpl::CleanupResetAndDestroyPushL< RPointerArray<CCmPluginBase> >( aCMArray );
-    }
-         
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AppendCmListL
-// -----------------------------------------------------------------------------
-//     
-void CCmManagerImpl::AppendCmListL( TUint32 aDestintaionId, RPointerArray<CCmPluginBase>& aCMArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AppendCmListL" );
-
-    CCmDestinationImpl* dest = DestinationL( aDestintaionId );
-    CleanupStack::PushL(dest); 
-    RArray<TUint32> cmIdList;
-    CleanupClosePushL(cmIdList);
-    dest->ConnectMethodIdArrayL( cmIdList );
-    AppendCmListFromUidsL( cmIdList, aCMArray );
-    CleanupStack::PopAndDestroy(&cmIdList);  
-    CleanupStack::PopAndDestroy(dest);  
-    }
-// -----------------------------------------------------------------------------
-// CCmDestinationImpl::AppendCmListFromUidsL
-// -----------------------------------------------------------------------------
-//     
-void CCmManagerImpl::AppendCmListFromUidsL( RArray<TUint32>& cmIdList, RPointerArray<CCmPluginBase>& aCMArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AppendCmListFromUidsL" );
-
-    TInt count = cmIdList.Count();
-    for ( TInt i = 0; i< count; i++ )
-        {
-        CCmPluginBase* cm = NULL;
-        TRAPD( err,cm = GetConnectionMethodL( cmIdList[i] ));
-        if (err == KErrNone)
-            {
-            aCMArray.AppendL( cm );
-            }
-        }
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::ConnectionMethodL
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::ConnectionMethodL( RArray<TUint32>& aCMArray,
-                                        TBool aCheckBearerType,
-                                        TBool aLegacyOnly,
-                                        TBool aEasyWlan,
-                                        TBool aSortByBearer )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ConnectionMethodL" );
-
-    OpenTransactionLC();
-    
-    CMDBRecordSet<CCDIAPRecord>* ptrRecordSet = AllIapsL();
-    CleanupStack::PushL( ptrRecordSet );
-    
-    TInt iapRecords = ptrRecordSet->iRecords.Count();
-    CLOG_WRITE_1_PTR( NULL, "Record num [%d]", iapRecords );
-    
-    // Time optimization to load the entire destination table
-    TInt destTblId = DestinationTableId();
-    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>*  ptrDestSet = 
-            new (ELeave) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>( 
-                                                                    destTblId );
-    CleanupStack::PushL( ptrDestSet );
-    TRAP_IGNORE( ptrDestSet->LoadL( Session() ) );
-    
-    for ( TInt i = 0; i < iapRecords; i++ )
-        {
-        TUint32 iapId = (*ptrRecordSet)[i]->RecordId();
-        CLOG_WRITE_1_PTR( NULL, "IAP ID [%d]", iapId );
-        if ( aCheckBearerType )
-            {
-            TUint32 bearerType( 0 );
-            TRAPD( err, 
-                   bearerType = BearerTypeFromIapRecordL( (*ptrRecordSet)[i] ));
-            if ( !err && bearerType )
-                {
-                // append the IAP id - if aLegacyOnly is ETrue, only for legacy IAPs
-                if ( !aLegacyOnly || 
-                     !NumOfConnMethodReferencesL( iapId, ptrDestSet ) )
-                    {
-                    if( !aEasyWlan && IsEasyWLanL( (*ptrRecordSet)[i] ) )
-                        {
-                        continue;
-                        }
-                        
-                    aCMArray.Append( iapId );
-                    }
-                }
-            }
-        else
-            {
-            // append the IAP id - if aLegacyOnly is ETrue, only for legacy IAPs
-            if ( !aLegacyOnly ||
-                 !NumOfConnMethodReferencesL( iapId, ptrDestSet ) )
-                {
-                if( !aEasyWlan && IsEasyWLanL( (*ptrRecordSet)[i] ) )
-                    {
-                    continue;
-                    }
-                    
-                aCMArray.Append( iapId );
-                }
-            }
-        }
-    
-    // Re-order the array according to the global bearer ordering rules
-    if ( aSortByBearer )
-        {        
-        RArray<TUint32> bearers( KCmArrayMediumGranularity );
-        CleanupClosePushL( bearers );
-        SupportedBearersL( bearers );
-        
-        TInt prevInsertedPos = -1;
-        for ( TInt i = 0; i < bearers.Count(); i++ )
-            {
-            for ( TInt j = prevInsertedPos + 1; j < aCMArray.Count(); j++ )
-                {
-                // Check if CM belongs to this bearer
-                TUint cmBearerId = GetConnectionMethodInfoIntL( aCMArray[j],
-                                                             ECmBearerType );
-                if ( cmBearerId == bearers[i] )
-                    {
-                    // copy the cm id to the next 'sorted position' in the array
-                    // the item removed will always be after the insertion position
-                    TUint cmId = aCMArray[j];
-                    aCMArray.Remove(j);                    
-                    aCMArray.Insert( cmId, ++prevInsertedPos );
-                    }
-                }
-            }
-        
-        CleanupStack::PopAndDestroy( &bearers );
-        }
-    
-    CleanupStack::PopAndDestroy( 2, ptrRecordSet );
-    
-    RollbackTransaction();
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::DoFindConnMethodL
-//-----------------------------------------------------------------------------
-//
-CCmPluginBase* CCmManagerImpl::DoFindConnMethodL( TUint32 aCmId, 
-                                      CCmDestinationImpl* aParentDest )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::DoFindConnMethodL" );
-    return iObjectPool->GetConnectionMethodL(aCmId, aParentDest);        
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::FindConnMethodL
-//-----------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmManagerImpl::DoFindConnMethL( TUint32 aCmId, 
-                                       CCmDestinationImpl* aParentDest )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::FindConnMethodL" );
-
-    // Step through each bearer to find which the CMId belongs to
-    CCmPluginBaseEng* plugin = NULL;
-    
-    TCmPluginInitParam params( *this );
-    if (aParentDest)
-        {
-        params.iParentDest = aParentDest->Id();        
-        }
-    else
-        {
-        params.iParentDest = ParentDestinationL( aCmId );        
-        }
-        
-    TUint32 bearerType = BearerTypeFromCmIdL( aCmId );
-
-    for ( TInt i=0; i<iPlugins->Count(); i++ )
-        {
-        if( (*iPlugins)[i]->GetIntAttributeL( ECmBearerType ) == bearerType )
-            {
-            plugin = (*iPlugins)[i]->CreateInstanceL( params );
-            break;
-            }
-        }    
-        
-    if ( !plugin )
-        {
-        return plugin;
-        }
-    
-    CleanupStack::PushL( plugin );
-    
-    plugin->LoadL( aCmId );
-                    
-    CleanupStack::Pop( plugin ); // 1
-    plugin->SetIdValidity(ETrue);
-        
-    return plugin;
-    }
- 
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::BearerTypeFromIapL( TUint aId )
-//-----------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::BearerTypeFromCmIdL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::BearerTypeFromIapL" );
-    TUint32 bearerType;
-    if ( aCmId > KMaxIapID )
-        {
-        bearerType = KUidEmbeddedDestination;  
-        }
-    else
-        {//aCmId is an IapId
-         // Load this IAP record from the IAP table
-        // This is an optimization that plugins doesn't have
-        // to do it every time the CanHandleIapIdL() is called.    
-        CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                                   (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));     
-        CleanupStack::PushL( iapRecord ); // 1
-        iapRecord->SetRecordId( aCmId );
-
-        OpenTransactionLC();
-        iapRecord->LoadL( Session() );
-        RollbackTransaction();
-        
-        bearerType = BearerTypeFromIapRecordL( iapRecord );
-
-        CleanupStack::PopAndDestroy( iapRecord ); // 0        
-        }    
-    return bearerType;
-    }
-   
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::BearerTypeFromIapRecordL( CCDIAPRecord* aIapRecord )
-//-----------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::BearerTypeFromIapRecordL( CCDIAPRecord* aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::BearerTypeFromIapRecordL" );
-
-    CLOG_WRITE_1( "Plugin count: [%d]", iPlugins->Count() );
-    
-    TInt err( KErrNone );
-    TUint32 extLevel( 0 );
-    TInt bearerType( 0 );
-    TBool canHandle( EFalse );
-    
-    // Check which bearer handles the given IAPid
-    for ( TInt i=0; i<iPlugins->Count(); i++ )
-        {
-        // a defective, or a wrong AP can't cause any trouble.
-        TRAP( err, canHandle = (*iPlugins)[i]->CanHandleIapIdL( aIapRecord ) );
-        CLOG_WRITE_3( "plugin [%d] returned with error %d, CanH: %d", 
-                       i, err, TUint32(canHandle) );
-        if ( !err && canHandle )
-            {
-            if ( extLevel < 
-                (*iPlugins)[i]->GetIntAttributeL( ECmExtensionLevel ) )
-                {
-                extLevel = (*iPlugins)[i]->GetIntAttributeL(ECmExtensionLevel);
-                bearerType = (*iPlugins)[i]->GetIntAttributeL( ECmBearerType );
-                }
-            }
-        else if ( err == KErrNoMemory )
-            {
-            User::Leave( err );
-            }
-        }
-        
-    if ( !bearerType )
-        // No supporting plugin found.
-        {
-        CLOG_WRITE( "Plugin not found, Leaving." );
-        User::Leave( KErrNotSupported );
-        }
-    CLOG_WRITE_1( "Returning bearertype: [%d]", bearerType );
-    return bearerType;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::AllDestinationsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::AllDestinationsL( RArray<TUint32>& aDestArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AllDestinationsL" );
-
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* destRecordSet = 
-           new ( ELeave ) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>( 
-                                                             iDestinationTableId );
-    CleanupStack::PushL( destRecordSet );
-
-    TRAP_IGNORE( destRecordSet->LoadL( Session() ) );
-    
-    iDestinationCount = destRecordSet->iRecords.Count();
-
-    //=========================================================================
-    // Step through every item in the NW Table and check whether it is linked
-    // in the DN_IAP table
-    //
-    for ( TInt i = 0; i < iDestinationCount; ++i )
-        {
-        TInt nwId = QUERY_INT_FIELD( destRecordSet->iRecords[i], 
-                                     KCDTIdDataMobilitySelectionPolicyNetwork );
-        TBool found( EFalse );
-        
-        for ( TInt j = 0; j < aDestArray.Count(); ++j )
-            {
-            if ( aDestArray[j] == nwId )
-                {
-                found = ETrue;
-                break;
-                }
-            }
-            
-        if ( !found )
-            {
-            aDestArray.AppendL( nwId );
-            CLOG_WRITE_2( "Dest(%d): [%d]", aDestArray.Count(), nwId );
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( destRecordSet );
-    
-    RollbackTransaction();
-   
-    CLOG_WRITE_1( "No. of dests found: [%d] ", aDestArray.Count() );
-    }
-        
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::DestinationL()
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C CCmDestinationImpl* CCmManagerImpl::DestinationL( TUint32 aId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::DestinationL" );
-        
-    // Create destination object
-    return iObjectPool->GetDestinationL( aId );
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::RemoveDestFromPool
-//-----------------------------------------------------------------------------
-//  
-EXPORT_C void CCmManagerImpl::RemoveDestFromPool( CCmDestinationImpl* aDestination )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveDestFromPool" );
-    iObjectPool->RemoveDestination(aDestination);
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::RemoveDestFromPool
-//-----------------------------------------------------------------------------
-//  
-void CCmManagerImpl::RemoveDestFromPool( CCmDestinationData* aDestination )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveDestFromPool" );
-    iObjectPool->RemoveDestination(aDestination);
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::RemoveCMFromPool
-//-----------------------------------------------------------------------------
-//  
-void CCmManagerImpl::RemoveCMFromPoolL( CCmPluginBaseEng* aCM )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveCMFromPool" );
-    iObjectPool->RemoveConnectionMethodL( aCM );
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::RemoveCMFromPool
-//-----------------------------------------------------------------------------
-//  
-void CCmManagerImpl::RemoveCMFromPoolL( CCmPluginBase* aCM )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveCMFromPool" );
-    iObjectPool->RemoveConnectionMethodL( aCM );
-    }
-
-//-----------------------------------------------------------------------------
-// CCmManagerImpl::CopyConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-TInt CCmManagerImpl::CopyConnectionMethodL( 
-                                    CCmDestinationImpl& aTargetDestination,
-                                    CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CopyConnectionMethodL" );    
-    
-    OpenTransactionLC();
-    TInt index = aTargetDestination.AddConnectionMethodL( aConnectionMethod );
-    aTargetDestination.UpdateL();
-    CommitTransactionL( 0 );
-    
-    return index;
-    }    
-    
-//-----------------------------------------------------------------------------
-// CCmManagerImpl::MoveConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-TInt CCmManagerImpl::MoveConnectionMethodL( 
-                                    CCmDestinationImpl& aSourceDestination,
-                                    CCmDestinationImpl& aTargetDestination,
-                                    CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::MoveConnectionMethodL" );
-    
-    OpenTransactionLC();
-    
-    TInt index = CopyConnectionMethodL( aTargetDestination, aConnectionMethod );
-    aSourceDestination.RemoveConnectionMethodL( aConnectionMethod );
-    aSourceDestination.UpdateL();
-    
-    CommitTransactionL( KErrNone );
-    
-    return index;
-    }
-    
-//-----------------------------------------------------------------------------
-// CCmManagerImpl::RemoveConnectionMethodL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::RemoveConnectionMethodL( 
-                                         CCmDestinationImpl& aDestination,
-                                         CCmPluginBase& aConnectionMethod )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveConnectionMethodL" );    
-    
-    OpenTransactionLC();
-    aDestination.RemoveConnectionMethodL( aConnectionMethod );
-    aDestination.UpdateL();
-    CommitTransactionL( 0 );
-    }
-
-//-----------------------------------------------------------------------------
-//  RCmManagerExt::SupportedBearers()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::SupportedBearersL( RArray<TUint32>& aArray ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::SupportedBearersL" );
-
-    for ( TInt i = 0; i < iPlugins->Count(); i++ )
-        {
-        TUint32 bearerType( (*iPlugins)[i]->GetIntAttributeL(ECmBearerType) );
-        
-        if ( KUidEmbeddedDestination != bearerType )
-            {
-            aArray.AppendL( (*iPlugins)[i]->GetIntAttributeL(ECmBearerType) );
-            }
-        }       
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::NumOfConnMethodReferencesL()
-// -----------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::NumOfConnMethodReferencesL( 
-        TUint32 aId,
-        CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* aRecSet )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::NumOfConnMethodReferencesL" );
-
-    OpenTransactionLC();
-    
-    TUint32 retVal( 0 );
-   
-    if ( aRecSet )
-        {
-        TMDBElementId id( IAP_ELEMENT_ID(aId) );
-        
-        for ( TInt i = 0; i < aRecSet->iRecords.Count(); ++i )
-            {
-            if ( QUERY_UINT32_FIELD( (*aRecSet)[i], 
-                                    KCDTIdDataMobilitySelectionPolicyIAP ) == 
-                id )
-                {
-                ++retVal;
-                }
-            }
-        }
-    else
-        {
-        // Just to test how many record we have
-        TInt destTblId = DestinationTableId();
-        CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>*  ptrRecordSet =
-             new (ELeave) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>( 
-                                                                    destTblId );
-        CleanupStack::PushL( ptrRecordSet );
-
-        // Prime record
-        CCDDataMobilitySelectionPolicyRecord* record = 
-                              new (ELeave) CCDDataMobilitySelectionPolicyRecord( 
-                                                            DestinationTableId() );
-        CleanupStack::PushL( record );
-
-        record->iIAP = IAP_ELEMENT_ID( aId );
-        ptrRecordSet->iRecords.AppendL( record );
-        
-        CleanupStack::Pop( record );
-        record = NULL;
-            
-        if ( ptrRecordSet->FindL(Session()) )
-            {
-            // we have a match
-            retVal = ptrRecordSet->iRecords.Count();
-            CLOG_WRITE_1( "Found: [%d]", retVal );
-            }
-        else
-            {
-            CLOG_WRITE( "Nothing" );
-            }
-            
-        CleanupStack::PopAndDestroy( ); //  ptrRecordSet
-        }
-            
-    RollbackTransaction();
-    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::HasUnprotectedDestinationsL
-// -----------------------------------------------------------------------------
-//
-TBool CCmManagerImpl::HasUnprotectedDestinationsL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::HasUnprotectedDestinationsL" );
-
-    TBool hasUnprotectedDests( EFalse );
-    
-    RArray<TUint32> destIdArray( KCmArrayBigGranularity );
-    AllDestinationsL( destIdArray );
-    CleanupClosePushL( destIdArray );
-    
-    CCmDestinationImpl* dest = NULL;
-    for ( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        dest = DestinationL( destIdArray[i] );
-        CleanupStack::PushL( dest );
-        if ( dest->ProtectionLevel() != EProtLevel1 )
-            {
-            hasUnprotectedDests = ETrue;
-            CleanupStack::PopAndDestroy( dest );
-            break;
-            }            
-        CleanupStack::PopAndDestroy( dest );
-        }
-        
-    CleanupStack::PopAndDestroy( &destIdArray );
-    
-    return hasUnprotectedDests;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::BuildPluginArrayL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::BuildPluginArrayL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::BuildPluginArrayL" );
-    iPlugins = new (ELeave) CArrayPtrFlat<const CCmPluginBaseEng>( 
-                                                           KPluginGranularity );
-
-    // Get a list of all the bearer types
-    RImplInfoPtrArray implArray;
-    REComSession::ListImplementationsL( TUid::Uid( KCMPluginInterfaceUid ), 
-                                        implArray );
-
-    CleanupClosePushL( implArray ); // 1
-
-    CCmPluginBaseEng* plugin = NULL;
-    for ( TInt i=0; i<implArray.Count(); i++ )
-        {
-        TCmPluginInitParam params( *this );
-        params.iParentDest = NULL;
-
-        // This is the Util implementation        
-        // Trap it to be able to work even if there's a faulty plugin installed
-        // in the phone.
-        TRAPD( err, plugin = STATIC_CAST( CCmPluginBaseEng*, 
-                                        REComSession::CreateImplementationL( 
-                                        (implArray)[i]->ImplementationUid(),
-                                        _FOFF( CCmPluginBaseEng, 
-                                               iDtor_ID_Key ),
-                                        (TAny*)&params )) );
-
-        if ( !err )
-            {
-            CLOG_ATTACH( plugin, this );
-            
-            CleanupStack::PushL( plugin );
-            
-            TBool inserted( EFalse );
-            TInt defaultPriority( KDataMobilitySelectionPolicyPriorityWildCard );
-            
-            // No UI priority -> wildcard
-            TRAP_IGNORE( defaultPriority = plugin->GetIntAttributeL( ECmDefaultUiPriority ) );
-            
-            for( TInt j( 0 ); j < iPlugins->Count(); ++j )
-                {
-                if( defaultPriority > (*iPlugins)[j]->GetIntAttributeL( ECmDefaultUiPriority ) )
-                    {
-                    continue;
-                    }
-                else if( defaultPriority == (*iPlugins)[j]->GetIntAttributeL( ECmDefaultUiPriority ) )
-                    {
-                    if( plugin->GetIntAttributeL( ECmExtensionLevel ) > 
-                        (*iPlugins)[j]->GetIntAttributeL( ECmExtensionLevel ) )
-                        {
-                        iPlugins->InsertL( j, plugin );
-                        inserted = ETrue;
-                        break;
-                        }
-                    }
-                else
-                    {
-                    iPlugins->InsertL( j, plugin );
-                    inserted = ETrue;
-                    break;
-                    }
-                }
-            
-            if( !inserted )
-                {
-                iPlugins->AppendL( plugin );
-                }
-
-            CleanupStack::Pop( plugin );
-            }
-        }
-    
-    implArray.ResetAndDestroy();
-        
-    CleanupStack::PopAndDestroy();  // implArray;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetBearerInfoIntL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CCmManagerImpl::GetBearerInfoIntL( TUint32 aBearerType,
-                                           TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetBearerInfoIntL" );
-    if( !IsBearerSpecific( aAttribute ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    for ( TInt i = 0; i < iPlugins->Count(); ++i )
-        {
-        if ( aBearerType == (*iPlugins)[i]->GetIntAttributeL( ECmBearerType ) )
-            {
-            return (*iPlugins)[i]->GetIntAttributeL( aAttribute );
-            }
-        }
-        
-    User::Leave( KErrNotSupported );
-    
-    return 0;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetBearerInfoBoolL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmManagerImpl::GetBearerInfoBoolL( TUint32 aBearerType,
-                                          TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetBearerInfoBoolL" );
-    if( !IsBearerSpecific( aAttribute ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-        
-    for ( TInt i = 0; i < iPlugins->Count(); ++i )
-        {
-        if ( aBearerType == (*iPlugins)[i]->GetIntAttributeL( ECmBearerType ) )
-            {
-            return (*iPlugins)[i]->GetBoolAttributeL( aAttribute );
-            }
-        }
-        
-    User::Leave( KErrNotSupported );
-    
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetBearerInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CCmManagerImpl::GetBearerInfoStringL( TUint32 aBearerType,
-                                             TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetBearerInfoStringL" );
-    if( !IsBearerSpecific( aAttribute ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    for ( TInt i = 0; i < iPlugins->Count(); ++i )
-        {
-        if ( aBearerType == (*iPlugins)[i]->GetIntAttributeL( ECmBearerType ) )
-            {
-            return (*iPlugins)[i]->GetStringAttributeL( aAttribute );
-            }
-        }
-        
-    User::Leave( KErrNotSupported );
-    
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetBearerInfoString8L()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* CCmManagerImpl::GetBearerInfoString8L( TUint32 aBearerType,
-                                               TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetBearerInfoStringL" );
-    if( !IsBearerSpecific( aAttribute ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    for ( TInt i = 0; i < iPlugins->Count(); ++i )
-        {
-        if ( aBearerType == (*iPlugins)[i]->GetIntAttributeL( ECmBearerType ) )
-            {
-            return (*iPlugins)[i]->GetString8AttributeL( aAttribute );
-            }
-        }
-        
-    User::Leave( KErrNotSupported );
-    
-    return NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetConnectionMethodInfoIntL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CCmManagerImpl::GetConnectionMethodInfoIntL( TUint32 aCmId,
-                                                     TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetConnectionMethodInfoIntL" );
-
-    if ( aAttribute == ECmBearerType )
-        {
-        return const_cast<CCmManagerImpl*>(this)->BearerTypeFromCmIdL( aCmId );
-        }
-    else
-        {
-        return iPluginImpl->GetConnectionInfoIntL( aCmId, aAttribute );
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetConnectionMethodInfoBoolL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmManagerImpl::GetConnectionMethodInfoBoolL( TUint32 aCmId,
-                                                    TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetConnectionMethodInfoBoolL" );
-
-    TBool retval = EFalse;
-    if ( aAttribute == ECmVirtual )
-        {
-        TUint32 b = GetConnectionMethodInfoIntL( aCmId, ECmBearerType );
-        retval = GetBearerInfoBoolL( b, ECmVirtual );
-        }
-    else
-        {
-        retval = iPluginImpl->GetConnectionInfoBoolL( aCmId, aAttribute );
-        }
-    return retval;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetConnectionMethodInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CCmManagerImpl::GetConnectionMethodInfoStringL( 
-                                                    TUint32 aCmId,
-                                                    TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetConnectionMethodInfoStringL" );
-
-    return iPluginImpl->GetConnectionInfoStringL( aCmId, aAttribute );
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::GetConnectionMethodInfoStringL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* CCmManagerImpl::GetConnectionMethodInfoString8L( 
-                                                     TUint32 aCmId,
-                                                     TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::GetConnectionMethodInfoString8L" );
-
-    return iPluginImpl->GetConnectionInfoString8L( aCmId, aAttribute );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::UncategorizedIconL()
-//-----------------------------------------------------------------------------
-//    
-CGulIcon* CCmManagerImpl::UncategorizedIconL() const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::UncategorizedIconL" );
-    
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-           
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                                     &KDC_BITMAP_DIR, 
-                                     NULL ) );
-           
-    CGulIcon* icon = AknsUtils::CreateGulIconL( 
-                            skinInstance, 
-                            KAknsIIDQgnPropSetConnDestUncategorized,
-                            mbmFile.FullName(), 
-                            EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized, 
-                            EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized_mask );
-                            
-    return icon;            
-    }    
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::UncategorizedIconL()
-//-----------------------------------------------------------------------------
-//    
-CMDBSession& CCmManagerImpl::Session() const
-    { 
-    return iTrans->Session(); 
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::HasCapabilityL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::HasCapabilityL( TCapability aCapability )
-    {
-    TSecurityInfo info;
-
-    info.SetToCurrentInfo();
-    
-    if( !info.iCaps.HasCapability( aCapability ) )
-        {
-        User::Leave( KErrPermissionDenied );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmManagerImpl::FeatureSupported
-// ---------------------------------------------------------------------------
-TBool CCmManagerImpl::FeatureSupported( TInt aFeature )
-    {
-    return FeatureManager::FeatureSupported( aFeature );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmManagerImpl::IsEasyWLan
-//
-// We can't have any dependecy to WLan plugin, but
-// in some cases we need to filter out EasyWLan access points.
-// ---------------------------------------------------------------------------
-TBool CCmManagerImpl::IsEasyWLanL( CCDIAPRecord* aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::IsEasyWLanL" );
-    if (!iWLan)
-        {
-        return EFalse;    
-        }
-    if( (TPtrC(aIapRecord->iServiceType) != TPtrC(KCDTypeNameLANService) ) ||
-        TPtrC(aIapRecord->iBearerType) != TPtrC(KCDTypeNameLANBearer) )
-        {
-        return EFalse;
-        }
-        
-    TBool retVal( EFalse );
-    TUint32 serviceId = aIapRecord->iService;
-    
-    CCDWlanServiceRecord* wLanServ = 
-            new (ELeave) CCDWlanServiceRecord( CCDWlanServiceRecord::TableIdL( Session() ) );
-
-    CleanupStack::PushL( wLanServ );
-                
-    wLanServ->iWlanServiceId.SetL( serviceId );
-    
-    if( wLanServ->FindL( Session() ) )
-        {
-        wLanServ->LoadL( Session() );
-
-        if( wLanServ->iWLanSSID.IsNull() ||
-            !TPtrC(wLanServ->iWLanSSID).Compare( KNullDesC ) )
-            {
-            retVal = ETrue;
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( wLanServ );
-    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::EasyWlanIdL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CCmManagerImpl::EasyWlanIdL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::EasyWlanId" );
-
-    OpenTransactionLC();
-    
-    TUint32 easyId( 0 );
-
-    CMDBRecordSet<CCDIAPRecord>*  ptrRecordSet = AllIapsL();
-    CleanupStack::PushL( ptrRecordSet );
-    TInt iapRecords = ptrRecordSet->iRecords.Count();
-    CLOG_WRITE_1_PTR( NULL, "Record num [%d]", iapRecords );
-
-    for ( TInt i = 0; i < iapRecords; i++ )
-        {
-        CCDIAPRecord* iapRecord = (*ptrRecordSet)[i];
-        
-        if( (TPtrC(iapRecord->iServiceType) == TPtrC(KCDTypeNameLANService) ) &&
-            TPtrC(iapRecord->iBearerType) == TPtrC(KCDTypeNameLANBearer) )
-            {
-            if( IsEasyWLanL( iapRecord ) )
-                {
-                easyId = (*ptrRecordSet)[i]->RecordId();
-                break;
-                }
-            }
-        }
-
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-
-    RollbackTransaction();
-            
-    return easyId;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::AllIapsL()
-// -----------------------------------------------------------------------------
-//
-CMDBRecordSet<CCDIAPRecord>* CCmManagerImpl::AllIapsL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AllIapsL" );
-
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDIAPRecord>*  ptrRecordSet = 
-                    new (ELeave) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
-    
-    TRAP_IGNORE( ptrRecordSet->LoadL( Session() ) );
-    
-    RollbackTransaction();
-    
-    return ptrRecordSet;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::AllSNAPRecordsL()
-// -----------------------------------------------------------------------------
-//
-CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* 
-                    CCmManagerImpl::AllSNAPRecordsL( TUint32 aSnapElementId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::AllSNAPRecordsL" );
-
-    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>*  ptrRecordSet = 
-              new (ELeave) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>(  
-                                                        DestinationTableId() );
-    CleanupStack::PushL( ptrRecordSet );
-
-    OpenTransactionLC();    
-    if( aSnapElementId )
-        {
-        // Prime record
-        CCDSnapRecord* record = SNAPRecordL( 0 );
-        CleanupStack::PushL( record );
-        record->iEmbeddedSNAP = aSnapElementId;
-        ptrRecordSet->iRecords.AppendL( record );
-
-        CleanupStack::Pop( record );
-        record = NULL;
-            
-        ptrRecordSet->FindL( Session() );
-        }
-    else
-        {
-        ptrRecordSet->LoadL( Session() );
-        }
-        
-    RollbackTransaction();
-    
-    return ptrRecordSet;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::IsIapLinkedL()
-// -----------------------------------------------------------------------------
-//
-TBool CCmManagerImpl::IsIapLinkedL( const CCmPluginBaseEng& aPlugin )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::IsIapLinkedL" );
-    
-    TUint32 iapId = aPlugin.GetIntAttributeL( ECmId );
-    CMDBRecordSet<CCDIAPRecord>*  ptrRecordSet = AllIapsL();
-    CleanupStack::PushL( ptrRecordSet );
-
-    TInt iapRecords = ptrRecordSet->iRecords.Count();
-    CLOG_WRITE_1_PTR( NULL, "Record num [%d]", iapRecords );
-
-    TBool linked( EFalse );
-    for ( TInt i = 0; !linked && i < iapRecords; i++ )
-        {
-        CCDIAPRecord* iapRecord = (*ptrRecordSet)[i];
-        
-        if( iapRecord->RecordId() == iapId )
-            {
-            continue;
-            }
-            
-        TUint32 bearerType( 0 );
-        
-        TRAP_IGNORE( bearerType = BearerTypeFromIapRecordL( iapRecord ) );
-        if( bearerType )
-            {
-            if( GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                CCmPluginBase* plugin = NULL;
-                
-                TRAP_IGNORE( plugin = GetConnectionMethodL( iapRecord->RecordId() ) );
-                if( plugin )
-                    {
-                    linked = plugin->IsLinkedToIap( iapId );
-                    }
-                    
-                delete plugin;
-                }
-            }
-        }
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    
-    return linked;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::RemoveAllReferencesL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::RemoveAllReferencesL( const CCmPluginBaseEng& aPlugin )
-    {
-    RArray<TUint32> dests;
-    CleanupClosePushL( dests );    
-    OpenTransactionLC();
-
-    AllDestinationsL( dests );
-    
-    for( TInt i = 0; i < dests.Count(); ++i )
-        {
-        CCmDestinationImpl* dest = DestinationL( dests[i] );
-        CleanupStack::PushL( dest );
-        TRAPD( err, dest->RemoveConnectionMethodL( aPlugin ) );
-        
-        if( err != KErrNotFound )
-            {
-            User::LeaveIfError( err );
-
-            dest->UpdateL();
-            }
-        
-        CleanupStack::PopAndDestroy( dest );
-        }
-    
-    CommitTransactionL( 0 );
-    CleanupStack::PopAndDestroy( &dests );   
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::RemoveAllReferencesLWoTransL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::RemoveAllReferencesWoTransL( const CCmPluginBaseEng& aPlugin )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::RemoveAllReferencesWoTransL" );
-
-    RArray<TUint32> dests;
-    CleanupClosePushL( dests );    
-
-    AllDestinationsL( dests );
-
-    for( TInt i = 0; i < dests.Count(); ++i )
-        {
-        CCmDestinationImpl* dest = DestinationL( dests[i] );
-        CleanupStack::PushL( dest );
-        TRAPD( err, dest->RemoveConnectionMethodL( aPlugin ) );
-
-        if( err != KErrNotFound )
-            {
-            User::LeaveIfError( err );
-
-            dest->UpdateL();
-            }
-
-        CleanupStack::PopAndDestroy( dest );
-        }
-    CleanupStack::PopAndDestroy( &dests );   
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::HandleDefConnDeletedL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::HandleDefConnDeletedL( TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::HandleDefConnDeletedL" );
-
-    if ( IsDefConnSupported() )
-        {
-        TCmDefConnValue defConn;
-        ReadDefConnWoTransL(defConn);
-        if ( defConn == aDCSetting )
-            {
-            // Default connection deleted, setting it to default value.
-            TUint32 destId = GetInternetDestinationIdL();
-
-            if ( destId && ( destId != aDCSetting.iId ) )
-                {
-                defConn.iType = ECmDefConnDestination;
-                defConn.iId = destId;                
-                }
-            else
-                {
-                // Internet destination not found. Initialise to zero.
-                defConn.iType = TCmDefConnType ( 0 );
-                defConn.iId = 0;
-                }    
-
-            WriteDefConnWoTransL( defConn );
-            }
-        } // do nothing if default connection is not supported
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::ReadDefConnWoTransL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ReadDefConnWoTransL( TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ReadDefConnWoTransL" );
-    if ( IsDefConnSupported() )
-        {
-        CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet = 
-            new ( ELeave ) CMDBRecordSet<CCDDefConnRecord>( iDefConnTableId );
-        CleanupStack::PushL( defConnRecordSet );
-
-        TRAPD( err,  defConnRecordSet->LoadL( Session() ) );
-        if (err == KErrNone)
-            {
-            TInt mode = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], 
-                                         KCDTIdDefConnType );
-            aDCSetting.iType= TCmDefConnType (mode);
-
-            aDCSetting.iId = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], 
-                                              KCDTIdDefConnUid );
-            CLOG_WRITE( "Default Connection read OK " );
-            }
-        else
-            {
-            //deleting old record, writing Always Ask (default value)
-            //aDCSetting.iType = ECmDefConnAlwaysAsk;
-            //aDCSetting.iId = 0;
-            TUint32 destId = GetInternetDestinationIdL();
-
-            if ( destId )
-                {
-                aDCSetting.iType = ECmDefConnDestination;
-                aDCSetting.iId = destId;                
-                }
-            else
-                {                
-                // Internet destination not found. Initialise to zero.
-                aDCSetting.iType = TCmDefConnType ( 0 );
-                aDCSetting.iId = 0;
-                }    
-
-            CLOG_WRITE( "Default Connection read FAILED, storing Always Ask! " );
-            ReplaceDefConnRecordL( aDCSetting );
-            }
-        CleanupStack::PopAndDestroy( defConnRecordSet );
-        }
-    else
-        {
-        CLOG_WRITE( "Default Connection NOT supported, leaving with KErrNotSupported" );
-        User::Leave(KErrNotSupported);
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::WriteDefConnWoTransL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::WriteDefConnWoTransL( const TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::WriteDefConnWoTransL" );
-
-    if ( IsDefConnSupported() )
-        {
-        ReplaceDefConnRecordL( aDCSetting );
-        }
-    else
-        {
-        CLOG_WRITE( "Default Connection NOT supported, leaving with KErrNotSupported" );
-        User::Leave(KErrNotSupported);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::ReadDefConnL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ReadDefConnL( TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ReadDefConn" );
-
-    if ( IsDefConnSupported() )
-        {
-        OpenTransactionLC();
-        CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet = 
-               new ( ELeave ) CMDBRecordSet<CCDDefConnRecord>( iDefConnTableId );
-        CleanupStack::PushL( defConnRecordSet );
-     
-        TRAPD( err,  defConnRecordSet->LoadL( Session() ) );
-        if (err == KErrNone)
-            {
-             TInt mode = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], 
-                                             KCDTIdDefConnType );
-              aDCSetting.iType= TCmDefConnType ( mode );
-            
-            aDCSetting.iId = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], 
-                                             KCDTIdDefConnUid );
-            CleanupStack::PopAndDestroy( defConnRecordSet );
-            RollbackTransaction();                                 
-            }
-        else
-            {
-            //deleting old record, writing Always Ask (default value)
-            //aDCSetting.iType = ECmDefConnAlwaysAsk;
-            //aDCSetting.iId = 0;
-            
-            TUint32 destId = GetInternetDestinationIdL();
-
-            if ( destId )
-                {
-                aDCSetting.iType = ECmDefConnDestination;
-                aDCSetting.iId = destId;                
-                }
-            else
-                {                
-                // Internet destination not found. Initialise to zero.
-                aDCSetting.iType = TCmDefConnType ( 0 );
-                aDCSetting.iId = 0;
-                }    
-
-            CLOG_WRITE( "Default Connection read FAILED, storing Always Ask! " );
-            ReplaceDefConnRecordL( aDCSetting );
-            
-            CleanupStack::PopAndDestroy( defConnRecordSet );
-            CommitTransactionL( KErrNone );
-            }
-        }
-    else
-        {
-        CLOG_WRITE( "Default Connection NOT supported" );
-        User::Leave(KErrNotSupported);
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::ReplaceDefConnRecordL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ReplaceDefConnRecordL( const TCmDefConnValue aDCSetting )
-    {
-    	
-    LOGGER_ENTERFN( "CCmManagerImpl::ReplaceDefConnRecordL" );	
-    // Check the Id first (that it exists)
-    if ( aDCSetting.iType == ECmDefConnConnectionMethod )
-        {
-        CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord *>
-                                  ( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
-        CleanupStack::PushL( iapRecord );
-        iapRecord->SetRecordId( aDCSetting.iId );
-        TRAPD( err, iapRecord->LoadL( Session() ) );
-        if ( err == KErrNotFound )
-            {
-            User::Leave( KErrArgument );
-            }
-        CleanupStack::PopAndDestroy( iapRecord );
-        
-        // Check that Connection Method is not hidden
-        if ( GetConnectionMethodInfoBoolL( aDCSetting.iId, ECmHidden ) )
-            {
-            User::Leave( KErrArgument );
-            }
-        }
-    else if ( aDCSetting.iType == ECmDefConnDestination )
-        {
-        TUint32 destId = GetInternetDestinationIdL();
-        
-        // Allow empty Internet destination, others must have some content
-        if ( destId != aDCSetting.iId )
-            {
-            CCDAccessPointRecord* destAPRecord = static_cast<CCDAccessPointRecord *>(
-                           CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
-            CleanupStack::PushL( destAPRecord );
-            
-            destAPRecord->iRecordTag = aDCSetting.iId;
-            if ( !destAPRecord->FindL( Session() ) )
-                {
-                User::Leave( KErrArgument );
-                }
-            CleanupStack::PopAndDestroy( destAPRecord );
-         		}
-        }
-
-    TInt ret = KErrNone;
-    TCmGenConnSettings genConnSettings;
-    
-    SetGenConnSettingsToDefault( genConnSettings );
-
-    CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet = 
-           new ( ELeave ) CMDBRecordSet<CCDDefConnRecord>( iDefConnTableId );
-    CleanupStack::PushL( defConnRecordSet );
-    
-    TRAP( ret, defConnRecordSet->LoadL( Session() ) );
-    
-    if (ret == KErrNone)
-        {
-        TInt value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdUsageOfWlan );
-        genConnSettings.iUsageOfWlan = TCmUsageOfWlan( value );
-
-        value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdCellularDataUsageHome );
-        genConnSettings.iCellularDataUsageHome = TCmCellularDataUsage( value );
-
-        value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdCellularDataUsageVisitor );
-        genConnSettings.iCellularDataUsageVisitor = TCmCellularDataUsage( value );
-        }
-
-    TInt typeVal = aDCSetting.iType;
-    TInt uidVal = aDCSetting.iId;
-
-    // Delete the old record
-    for ( TInt i = 0; i < defConnRecordSet->iRecords.Count(); ++i )
-        {
-        defConnRecordSet->iRecords[i]->DeleteL( Session() );
-        }
-    CleanupStack::PopAndDestroy( defConnRecordSet );
-
-    CCDDefConnRecord* dcRcd = 
-        new (ELeave) CCDDefConnRecord( iDefConnTableId );
-    CleanupStack::PushL( dcRcd ); // 2
-            
-    dcRcd->SetRecordId( KCDNewRecordRequest );
-
-    SET_INT_FIELD(dcRcd, KCDTIdUsageOfWlan, genConnSettings.iUsageOfWlan );
-    SET_INT_FIELD(dcRcd, KCDTIdCellularDataUsageHome, genConnSettings.iCellularDataUsageHome );
-    SET_INT_FIELD(dcRcd, KCDTIdCellularDataUsageVisitor, genConnSettings.iCellularDataUsageVisitor );
-
-    CLOG_WRITE_FORMAT( "Set default connection type: [%d]", typeVal );
-    SET_INT_FIELD(    dcRcd, 
-                        KCDTIdDefConnType, 
-                        typeVal );
-    CLOG_WRITE_1( "Set uid: [%d]", uidVal );
-    SET_INT_FIELD(  dcRcd, 
-                    KCDTIdDefConnUid, 
-                    uidVal );
-    dcRcd->StoreL( Session() );    
-    CleanupStack::PopAndDestroy( dcRcd );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::WriteDefConnL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::WriteDefConnL( const TCmDefConnValue& aDCSetting )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::WriteDefConnL" );
-    
-    if ( ( aDCSetting.iType == ECmDefConnAlwaysAsk ) ||
-         ( aDCSetting.iType == ECmDefConnAskOnce ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    if ( IsDefConnSupported() )
-        {
-        OpenTransactionLC();
-
-        ReplaceDefConnRecordL( aDCSetting );
-        CommitTransactionL( KErrNone );
-        }
-    else
-        {
-        CLOG_WRITE( "Default Connection NOT supported, leaving with KErrNotSupported" );
-        User::Leave(KErrNotSupported);
-        }
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::IsDefConnSupported()
-//-----------------------------------------------------------------------------
-//
-TBool CCmManagerImpl::IsDefConnSupported(  )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::IsDefConnSupported" );
-
-    return iDefConnSupported;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::ReadGenConneSettingsL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ReadGenConnSettingsL" );
-
-    OpenTransactionLC();
-    CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet = 
-        new ( ELeave ) CMDBRecordSet<CCDDefConnRecord>( iDefConnTableId );
-    CleanupStack::PushL( defConnRecordSet );
-     
-    defConnRecordSet->LoadL( Session() );
-
-    TInt value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdUsageOfWlan );
-    aGenConnSettings.iUsageOfWlan = TCmUsageOfWlan( value );
-
-    value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdCellularDataUsageHome );
-    aGenConnSettings.iCellularDataUsageHome = TCmCellularDataUsage( value );
-
-    value = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdCellularDataUsageVisitor );
-    aGenConnSettings.iCellularDataUsageVisitor = TCmCellularDataUsage( value );
-            
-    CleanupStack::PopAndDestroy( defConnRecordSet );
-    RollbackTransaction();
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::ReplaceGenConnSettingsL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
-    {
-    
-    LOGGER_ENTERFN( "CCmManagerImpl::ReplaceGenConnSettingsL" );	
-    	
-    TInt ret = KErrNone;
-    TCmDefConnValue defConn;
-
-    defConn.iType = TCmDefConnType ( 0 );
-    defConn.iId = 0;
-    
-    CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet = 
-           new ( ELeave ) CMDBRecordSet<CCDDefConnRecord>( iDefConnTableId );
-    CleanupStack::PushL( defConnRecordSet );
-    
-    TRAP(ret, defConnRecordSet->LoadL(Session()));
-    
-    if (ret == KErrNone)
-        {
-        TInt type = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdDefConnType);
-        defConn.iType = TCmDefConnType( type );
-        TInt id = QUERY_INT_FIELD( defConnRecordSet->iRecords[0], KCDTIdDefConnUid);
-        defConn.iId = id;
-        }
-    
-    TInt usageOfNewWlan = aGenConnSettings.iUsageOfWlan;
-    TInt cellularDataUsageHome    = aGenConnSettings.iCellularDataUsageHome;
-    TInt cellularDataUsageVisitor = aGenConnSettings.iCellularDataUsageVisitor;
-    
-    // Delete the old record
-    for ( TInt i = 0; i < defConnRecordSet->iRecords.Count(); ++i )
-        {
-        defConnRecordSet->iRecords[i]->DeleteL( Session() );
-        }
-    CleanupStack::PopAndDestroy( defConnRecordSet );
-
-    CCDDefConnRecord* dcRcd = 
-        new (ELeave) CCDDefConnRecord( iDefConnTableId );
-    CleanupStack::PushL( dcRcd ); // 2
-            
-    dcRcd->SetRecordId( KCDNewRecordRequest );
-
-    SET_INT_FIELD(dcRcd, KCDTIdDefConnType, defConn.iType);
-    SET_INT_FIELD(dcRcd, KCDTIdDefConnUid, defConn.iId);
-
-    CLOG_WRITE_1( "Set wlan usage: [%d]", usageOfNewWlan );
-    SET_INT_FIELD(dcRcd, KCDTIdUsageOfWlan, usageOfNewWlan );
-
-    CLOG_WRITE_1( "Set cellularDataUsageHome: [%d]", cellularDataUsageHome );
-    SET_INT_FIELD(dcRcd, KCDTIdCellularDataUsageHome, cellularDataUsageHome );
-
-    CLOG_WRITE_1( "Set cellularDataUsageVisitor: [%d]", cellularDataUsageVisitor );
-    SET_INT_FIELD(dcRcd, KCDTIdCellularDataUsageVisitor, cellularDataUsageVisitor );
-
-    dcRcd->StoreL( Session() );    
-    CleanupStack::PopAndDestroy( dcRcd );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::WriteGenConnSettingsL()
-//-----------------------------------------------------------------------------
-//
-void CCmManagerImpl::WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::WriteGenConnSettingsL" );    
-
-    OpenTransactionLC();
-
-    ReplaceGenConnSettingsL( aGenConnSettings );
-    CommitTransactionL( KErrNone );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::IsMemoryLow()
-//-----------------------------------------------------------------------------
-//
-TBool CCmManagerImpl::IsMemoryLow()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::IsMemoryLow" );
-
-    TBool ret( EFalse );
-    // Any plugin can be used here, because CheckSpaceBelowCriticalLevelL
-    // is defined in their father class CCmPluginBaseEng
-    TRAPD( err, ret = (*iPlugins)[0]->CheckSpaceBelowCriticalLevelL() );
-    if( err != KErrNone )
-        {
-        ret = ETrue;
-        return ret;
-        }
-    return ret;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::SNAPRecordL
-// -----------------------------------------------------------------------------
-CCDSnapRecord* CCmManagerImpl::SNAPRecordL( TUint32 aRecordId ) const
-    {
-    CCDSnapRecord* record = new (ELeave) CCDSnapRecord( 
-                                 DestinationTableId() );
-
-    if( aRecordId )
-        {
-        record->SetRecordId( aRecordId );
-        
-        CleanupStack::PushL( record );
-        record->LoadL( Session() );
-        CleanupStack::Pop( record );
-        }
-    
-    return record;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::SNAPRecordL
-// -----------------------------------------------------------------------------
-CCDSnapRecord* CCmManagerImpl::CreateSNAPRecordL( TUint32 aRecordId ) const
-    {
-    CCDSnapRecord* record = new (ELeave) CCDSnapRecord( 
-        DestinationTableId() );
-
-    if( aRecordId )
-        {
-        record->SetRecordId( aRecordId );
-        }
-
-    return record;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmManagerImpl::WrapCmManager()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::WrapCmManager( RCmManagerExt& aCmManagerExt )
-    {
-    aCmManagerExt.iImplementation = this;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::FilterOutVirtualsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::FilterOutVirtualsL( RPointerArray<CCmPluginBase>& aCmDataArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::FilterOutVirtualsL" );
-
-    for ( TInt i = 0; i < aCmDataArray.Count(); i++ )
-        {
-        if ( aCmDataArray[i]->GetBoolAttributeL( ECmVirtual ) )
-            {
-            delete aCmDataArray[i];
-            aCmDataArray.Remove(i);
-            i--;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CreateFlatCMListLC
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::CreateFlatCMListLC( TUint32 aDestinationId , 
-                                                RPointerArray<CCmPluginBase>& aCmArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateFlatCMListLC" );
-
-    CreateFlatCMListL(aDestinationId, aCmArray);
-    CleanupResetAndDestroyPushL< RPointerArray<CCmPluginBase> >(aCmArray);
-    }
-    
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CreateFlatCMListL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::CreateFlatCMListL( TUint32 aDestinationId , 
-                                                RPointerArray<CCmPluginBase>& aCmArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CreateFlatCMListL" );
-    // get the uncategorised connection methods
-    if ( aDestinationId == KDestItemUncategorized ) 
-        {
-        AppendUncatCmListLC( aCmArray);
-        }
-    else
-        {
-        // Get the CM ids from the destination
-        AppendCmListLC( aDestinationId, aCmArray );
-        }
-    
-    // get the possible embedded destinations to be able to list their content, too
-    // we only have to check in cmArray
-    // put them in a sep. array and get their data into another.    
-    RArray<TUint32> cmEmbDestArray ( KCmArrayMediumGranularity );
-    CleanupClosePushL( cmEmbDestArray );
-    for ( TInt i = 0; i < aCmArray.Count(); i++ )
-        {
-        if ( aCmArray[i]->GetBoolAttributeL( ECmDestination ) )
-            {
-            cmEmbDestArray.AppendL( aCmArray[i]->GetIntAttributeL( ECmId ) );
-            //remove embedded destination right now
-            delete aCmArray[i];
-            aCmArray.Remove(i);
-            i--; // Array gets re-indexed after calling Remove().
-            }
-        }
-    // now we stored the needed emb.dest, 
-    // we can filter out all virtual ones
-    //iCmManager.FilterOutVirtualsL( cmArray ); //no filtering here, we can do it later
-    
-    // now we have the list of emb.dest. inside current destination, 
-    // now get their CM's data appended to one flat list
-    RPointerArray<CCmPluginBase> cmLinkedDataArray ( KCmArrayMediumGranularity );
-    CleanupResetAndDestroyPushL< RPointerArray<CCmPluginBase> >( cmLinkedDataArray );
-    TInt embdestcount = cmEmbDestArray.Count();
-    for ( TInt i = 0; i < embdestcount; i++ )
-        {
-        // get the list of CM's
-        CCmPluginBase* emdestcm = 
-                    GetConnectionMethodL( cmEmbDestArray[i] );
-        CleanupStack::PushL( emdestcm );
-        TUint destUid = emdestcm->Destination()->Id();
-        AppendCmListL( destUid, cmLinkedDataArray );
-        CleanupStack::PopAndDestroy( emdestcm );    
-        }
-    // filter out virtuals
-    //iCmManager.FilterOutVirtualsL( cmLinkedDataArray ); //still no filtering here
-
-    // now we have the original, sorted list and an unsorted cmLinkedDataArray,
-    // add each element to original array with sorting
-
-    CombineArraysForPriorityOrderL( aCmArray, cmLinkedDataArray );
-
-    // now we do no longer need the linked array
-    CleanupStack::Pop( &cmLinkedDataArray );   // don't destroy the cm objects!
-    
-    cmLinkedDataArray.Close();                 // they are appended to aCmArray!!!
-    CleanupStack::PopAndDestroy( &cmEmbDestArray ); 
-    
-    CleanupStack::Pop(&aCmArray);     
-    }
-    
-// --------------------------------------------------------------------------
-// CCmManagerImpl::CombineCmListsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::CombineArraysForPriorityOrderL( 
-                                        RPointerArray<CCmPluginBase>& aCmArray , 
-                                        RPointerArray<CCmPluginBase>& aCmLinkedArray )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CombineArraysForPriorityOrderL" );
-
-    // now we have two arrays, the first is sorted as needed,
-    // the second is not.
-    // we have to insert the items from the second to the first into their 
-    // correct position based on the bearer type priorities
-    
-    // so loop on the second array, and for ech element, find it's place
-    TInt count = aCmLinkedArray.Count();
-    for ( TInt i = 0; i < count; i++ )
-        {
-        TUint32 linkedpriority( aCmLinkedArray[i]->GetIntAttributeL( ECmDefaultPriority ) );
-        // InsertItemL( aCmArray, aCmLinkedArray[i]);
-        // higher priority means smaller number
-        // if same priority elements exist, then 
-        // - we need to insert our element inside the elements 
-        //   of the same priority according to 
-        //   bearetypes and extension levels
-        // or before the first element having higher priority numbers.
-        TInt cc = aCmArray.Count();
-        if ( cc )
-            {
-            TInt ii = 0;
-            for ( ; ii < cc; ii++ )
-                {
-                if ( linkedpriority < aCmArray[ii]->GetIntAttributeL( ECmDefaultPriority ) )
-                    {
-                    // the next element already has larger number, 
-                    // we must insert it HERE
-                    break;
-                    }
-                else
-                    {
-                    // priorities either same, then we need to check bearer, 
-                    // ext.level, etc
-                    // or we simply still need to go to next element
-                    if ( linkedpriority == aCmArray[ii]->GetIntAttributeL( ECmDefaultPriority ))
-                        {
-                        // check if the same bearer
-                        if ( aCmArray[ii]->GetIntAttributeL( ECmBearerType ) == 
-                                    aCmLinkedArray[i]->GetIntAttributeL( ECmBearerType ) )
-                            {
-                            // we need to find the last one of these bearers, 
-                            // and insert after the last one
-                            do
-                                {
-                                ii++;
-                                }while ( ( ii < cc )
-                                        &&  (aCmArray[ii]->GetIntAttributeL( ECmBearerType ) == 
-                                            aCmLinkedArray[i]->GetIntAttributeL( ECmBearerType )) );
-                            // now we either found a correct place or 
-                            // we are at the end of the list
-                            break;
-                            }
-                        else
-                            {
-                            // diff. bearers, check Ext.level
-                            if ( aCmArray[ii]->GetIntAttributeL( ECmExtensionLevel ) < aCmLinkedArray[i]->GetIntAttributeL( ECmExtensionLevel ) )
-                                {
-                                break;
-                                }
-                            // if not, then go for the next one...
-                            }
-                        }
-                    }
-                }
-                // now we either found a correct place or 
-                // we are at the end of the list
-                // ( we break-ed for cycle when found the correct place )
-            if ( ii == cc )
-                {
-                // end of the list, append
-                aCmArray.AppendL( aCmLinkedArray[i]);
-                }
-            else
-                {
-                // we found the place to be inserted
-                aCmArray.InsertL( aCmLinkedArray[i], ii );
-                }   
-            }
-        else
-            {
-            // no elements in original array yet, 
-            // so simply append
-            aCmArray.AppendL( aCmLinkedArray[i]);
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::ParentDestinationL
-// --------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::ParentDestinationL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::ParentDestinationL" );
-
-    TUint32 retval(0);
-    
-    TUint32 destTblId = DestinationTableId();
-    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>*  ptrRecordSet =
-         new (ELeave) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>( 
-                                                                destTblId );
-    CleanupStack::PushL( ptrRecordSet );
-
-    // Prime record
-    CCDDataMobilitySelectionPolicyRecord* record = 
-                          new (ELeave) CCDDataMobilitySelectionPolicyRecord( 
-                                                        DestinationTableId() );
-    CleanupStack::PushL( record );
-    
-    record->iIAP = IAP_ELEMENT_ID( aCmId );
-    ptrRecordSet->iRecords.AppendL( record );
-    
-    CleanupStack::Pop( record );
-    record = NULL;
-            
-    if ( ptrRecordSet->FindL(Session()) )
-        {
-        // we have a match
-        retval = QUERY_INT_FIELD( (*ptrRecordSet)[0],
-                             KCDTIdDataMobilitySelectionPolicyNetwork );
-        
-        }
-    CleanupStack::PopAndDestroy( ptrRecordSet );        
-
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::GetInternetDestinationIdL
-// --------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::GetInternetDestinationIdL()
-    {
-    
-    LOGGER_ENTERFN( "CCmManagerImpl::GetInternetDestinationIdL" );
-   
-    TUint32 destId = 0;
-    
-    // Get all destinations
-    RArray<TUint32> destIdArray( KCmArrayBigGranularity );
-    AllDestinationsL( destIdArray );
-    CleanupClosePushL( destIdArray );
-    
-    CCmDestinationImpl* dest = NULL;
-    
-    for ( TInt i = 0; i < destIdArray.Count(); i++ )
-        {
-        dest = DestinationL( destIdArray[i] );
-        CleanupStack::PushL( dest );
-        
-        // Check if destination is internet
-        if ( dest->MetadataL(ESnapMetadataInternet) )
-            {
-            destId = destIdArray[i];
-            }
-
-        CleanupStack::PopAndDestroy( dest );
-
-        if ( destId )
-            {
-            break;
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( &destIdArray );    
-    
-    return destId;    
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::SetGenConnSettingsToDefault()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::SetGenConnSettingsToDefault( TCmGenConnSettings& aGenConnSettings )
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::SetGenConnSettingsToDefault" );	
-    	
-    aGenConnSettings.iUsageOfWlan = ECmUsageOfWlanKnown;
-    aGenConnSettings.iCellularDataUsageHome    = ECmCellularDataUsageAutomatic;
-    aGenConnSettings.iCellularDataUsageVisitor = ECmCellularDataUsageConfirm;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::CheckAvailableSpaceL()
-// -----------------------------------------------------------------------------
-//
-void CCmManagerImpl::CheckAvailableSpaceL()
-    {
-    LOGGER_ENTERFN( "CCmManagerImpl::CheckAvailableSpaceL" );
-    TBool belowCritical = SysUtil::FFSSpaceBelowCriticalLevelL( &(this->iFs), KBytesToWrite );
-    CLOG_WRITE_1( "belowCritical: [%d]", belowCritical );
-    if ( belowCritical )
-        {
-        User::Leave( KErrDiskFull );
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::WatcherRegisterL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CCmManagerImpl::WatcherRegisterL( MCmCommsDatWatcher* aWatcher )
-    {
-    iCommsDatIapNotifier->WatcherRegisterL( aWatcher );
-    iCommsDatSnapNotifier->WatcherRegisterL( aWatcher );
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::WatcherUnRegister
-// --------------------------------------------------------------------------
-//    
-EXPORT_C void CCmManagerImpl::WatcherUnRegister()
-    {
-    iCommsDatIapNotifier->WatcherUnRegister();
-    iCommsDatSnapNotifier->WatcherUnRegister();
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::DestinationStillExistedL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmManagerImpl::DestinationStillExistedL( CCmDestinationImpl* aDest )
-    {
-    TUint32 destId = aDest->Id();
-    TBool found( EFalse );
-    TInt count;
-    
-    OpenTransactionLC();
-
-    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* destRecordSet = 
-           new ( ELeave ) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>( 
-                                                             iDestinationTableId );
-    CleanupStack::PushL( destRecordSet );
-
-    TRAP_IGNORE( destRecordSet->LoadL( Session() ) );
-    
-    count = destRecordSet->iRecords.Count();
-    
-    for ( TInt i = 0; i < count; ++i )
-        {
-        TInt nwId = QUERY_INT_FIELD( destRecordSet->iRecords[i], 
-                                     KCDTIdDataMobilitySelectionPolicyNetwork );
-        //nwId = RECORD_FROM_ELEMENT_ID( nwId );
-        
-        if(  nwId == destId )
-            {
-            found = ETrue;
-            break;
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( destRecordSet );
-    
-    RollbackTransaction();
-    
-    return found;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::IapStillExistedL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmManagerImpl::IapStillExistedL( const CCmPluginBaseEng& aPlugin )
-    {
-    TUint32 iapId = aPlugin.GetIntAttributeL( ECmId );
-    CMDBRecordSet<CCDIAPRecord>*  ptrRecordSet = AllIapsL();
-    CleanupStack::PushL( ptrRecordSet );
-
-    TInt iapRecords = ptrRecordSet->iRecords.Count();
-
-    TBool found( EFalse );
-    for ( TInt i = 0; !found && i < iapRecords; i++ )
-        {
-        CCDIAPRecord* iapRecord = (*ptrRecordSet)[i];
-        
-        if( iapRecord->RecordId() == iapId )
-            {
-            found = ETrue;
-            break;
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( ptrRecordSet );
-    
-    return found;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::IsIapStillInDestL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmManagerImpl::IsIapStillInDestL( 
-        CCmDestinationImpl* aDest, 
-        const CCmPluginBaseEng& aPlugin )
-    {
-    TUint32 iapId = aPlugin.GetIntAttributeL( ECmId );
-    
-    aDest->ReLoadConnectionMethodsL();
-    RArray<TUint32> cmIds;
-    aDest->ConnectMethodIdArrayL( cmIds );
-    CleanupClosePushL( cmIds );
-
-    TBool found( EFalse );
-    for ( TInt i = 0; i < cmIds.Count(); i++ )
-        {
-        if( cmIds[i] == iapId )
-            {
-            found = ETrue;
-            break;
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( &cmIds );
-    
-    return found;
-    }
-
-// --------------------------------------------------------------------------
-// CCmManagerImpl::GetSnapTableIdL
-// --------------------------------------------------------------------------
-//
-TUint32 CCmManagerImpl::GetSnapTableIdL()
-    {
-    TUint32 snapTableId;
-    
-    CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() );
-    db->SetAttributeMask( ECDHidden | ECDProtectedWrite );
-
-    snapTableId = CCDDataMobilitySelectionPolicyRecord::TableIdL( *db );
-
-    CleanupStack::PopAndDestroy( db );
-    
-    return snapTableId;
-    }
-
-// -----------------------------------------------------------------------------
-// CCmManagerImpl::IsBearerSpecific()
-// -----------------------------------------------------------------------------
-//
-TBool CCmManagerImpl::IsBearerSpecific( TUint32 aAttribute ) const
-    {
-    TUint32 i = 0;
-    while( KBearerSpecificAttributes[i] != KEndOfArray )
-        {
-        if( KBearerSpecificAttributes[i] == aAttribute )
-            {
-            return ETrue;
-            }
-        i++;
-        }        
-    return EFalse;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmobjectpool.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +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:  Implementation of CCMObjectPool.
-*
-*/
-
-
-#include "cmobjectpool.h"
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include <cmconnectionmethoddef.h>
-
-#include <e32def.h>
-#include <e32std.h>
-
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-const TInt KDestGranularity     = 20;
-const TInt KCMethodGranularity  = 20;
-CCMObjectPool::CCMObjectPool(CCmManagerImpl& aCmManagerImpl) :
-        iCmManagerImpl(aCmManagerImpl),    
-        iDestinationArray(KDestGranularity, 
-            _FOFF(TObjectPoolDestinationItem,iDestinationId)),
-        iConnectionMethodArray(KCMethodGranularity, 
-            _FOFF(TObjectPoolCMItem,iConnectionMethodId))
-    {
-    }
-
-CCMObjectPool::~CCMObjectPool()
-    {
-    // The get and remove functions must be used in pairs
-    // If the arrays have any element here than the client 
-    // of this class made a programming error
-    for (TInt index = 0; index < iDestinationArray.Count(); index++)
-        {
-        delete iDestinationArray[index].iDestinationItem;
-        }    
-    for (TInt index = 0; index < iConnectionMethodArray.Count(); index++)
-        {
-        delete iConnectionMethodArray[index].iConnectionMethodItem;
-        }
-    iDestinationArray.Close();
-    iConnectionMethodArray.Close();
-    }
-
-CCMObjectPool::TObjectPoolDestinationItem::TObjectPoolDestinationItem(
-                        CCmDestinationData*   aDestinationItem, 
-                        TUint32               aDestinationId) : 
-                            iDestinationId(aDestinationId),
-                            iDestinationItem(aDestinationItem)
-    {
-    }
-    
-CCMObjectPool::TObjectPoolCMItem::TObjectPoolCMItem(
-                        CCmPluginBaseEng* aConnectionMethodItem, 
-                        TUint32           aConnectionMethodId) : 
-                            iConnectionMethodId(aConnectionMethodId),
-                            iConnectionMethodItem(aConnectionMethodItem)
-    {
-    }
-
-CCmDestinationImpl* CCMObjectPool::GetDestinationL( TUint32 aDestinationId )
-    {
-    TUint32 destinationId( aDestinationId );
-    if ( destinationId > 0 && destinationId < 255 )
-        {
-        destinationId += KCmDefaultDestinationAPTagId;
-        }
-    TObjectPoolDestinationItem findD( NULL, destinationId );
-    TInt index = iDestinationArray.FindInUnsignedKeyOrder(findD);
-    if (index == KErrNotFound)
-        {
-        // If the destinaton is not in the pool create it than return it.
-        CCmDestinationImpl* dest = CCmDestinationImpl::NewL( iCmManagerImpl, 
-                                                             destinationId );
-        TObjectPoolDestinationItem aDest( 
-            dest->GetData(),
-            destinationId );
-        User::LeaveIfError(
-            iDestinationArray.InsertInUnsignedKeyOrder(aDest));
-        dest->IncrementRefCounter();
-        return dest;
-        }
-    else
-        {
-        // If the destination is allready in the pool than return it.
-        CCmDestinationImpl* dest = CCmDestinationImpl::NewL( iCmManagerImpl, 
-                                iDestinationArray[index].iDestinationItem );
-        iDestinationArray[index].iDestinationItem->IncrementRefCounter();
-        return dest;    
-        }
-    }
-
-CCmPluginBase* CCMObjectPool::GetConnectionMethodL( TUint32 aCmId, 
-                                        CCmDestinationImpl* aParentDest )
-    {
-    CCmPluginBase* connMethod = NULL;
-    TObjectPoolCMItem findCM( NULL, aCmId );
-    TInt index = iConnectionMethodArray.FindInUnsignedKeyOrder(findCM);
-    if (index == KErrNotFound)
-        {
-        CCmPluginBaseEng* pluginBaseEng = iCmManagerImpl.DoFindConnMethL(
-                                                        aCmId, aParentDest);        
-        if (!pluginBaseEng) User::Leave(KErrNotFound); //There is no such plugin
-        CleanupStack::PushL( pluginBaseEng );        
-        connMethod = new (ELeave) CCmPluginBase(pluginBaseEng); 
-        CleanupStack::PushL( connMethod );        
-        TObjectPoolCMItem aCM( pluginBaseEng, aCmId );
-        User::LeaveIfError(
-            iConnectionMethodArray.InsertInUnsignedKeyOrder(aCM));
-        pluginBaseEng->IncrementRefCounter();
-        CleanupStack::Pop( connMethod );
-        CleanupStack::Pop( pluginBaseEng );
-        }
-    else
-        {
-        // If the cm is allready in the pool than return it.
-        iConnectionMethodArray[index].iConnectionMethodItem->IncrementRefCounter();
-        connMethod = new (ELeave) CCmPluginBase(
-                iConnectionMethodArray[index].iConnectionMethodItem); 
-        }
-    return connMethod;            
-    }
-
-CCmPluginBase* CCMObjectPool::CreateConnectionMethodL( CCmPluginBaseEng* pluginBaseEng )
-    {
-    CCmPluginBase* connMethod = new (ELeave) CCmPluginBase(pluginBaseEng); 
-    CleanupStack::PushL( connMethod );        
-    TObjectPoolCMItem aCM( pluginBaseEng, 0 );//The new id is zero till update
-    User::LeaveIfError(
-        iConnectionMethodArray.InsertInUnsignedKeyOrderAllowRepeats(aCM));
-    pluginBaseEng->IncrementRefCounter();
-    CleanupStack::Pop( connMethod );
-    return connMethod;            
-    }
-
-void CCMObjectPool::InsertConnectionMethodL( CCmPluginBaseEng* pluginBaseEng )
-    {       
-    TObjectPoolCMItem aCM( pluginBaseEng, 0 );//The new id is zero till update
-    User::LeaveIfError(
-        iConnectionMethodArray.InsertInUnsignedKeyOrderAllowRepeats(aCM));
-    pluginBaseEng->IncrementRefCounter();
-    }
-
-CCmPluginBase* CCMObjectPool::CreateConnectionMethodL( TUint32 aImplementationUid, 
-                                        TCmPluginInitParam& aParams )
-    {
-    CCmPluginBaseEng* pluginBaseEng = iCmManagerImpl.DoCreateConnectionMethodL(
-                                            aImplementationUid, aParams);
-    CleanupStack::PushL( pluginBaseEng );        
-    CCmPluginBase* connMethod = new (ELeave) CCmPluginBase(pluginBaseEng); 
-    CleanupStack::PushL( connMethod );        
-    TObjectPoolCMItem aCM( pluginBaseEng, 0 );//The new id is zero till update
-    User::LeaveIfError(
-        iConnectionMethodArray.InsertInUnsignedKeyOrderAllowRepeats(aCM));
-    pluginBaseEng->IncrementRefCounter();
-    CleanupStack::Pop( connMethod );
-    CleanupStack::Pop( pluginBaseEng );
-    return connMethod;            
-    }
-
-CCmPluginBase* CCMObjectPool::CreateConnectionMethodL( TUint32 aImplementationUid, 
-                                                       TCmPluginInitParam& aParams,
-                                                       TUint32 aConnMethodId )
-	{
-    CCmPluginBaseEng* pluginBaseEng = iCmManagerImpl.DoCreateConnectionMethodL(
-                                            aImplementationUid, 
-                                            aParams,
-                                            aConnMethodId);
-    CleanupStack::PushL( pluginBaseEng );
-    CCmPluginBase* connMethod = new (ELeave) CCmPluginBase(pluginBaseEng); 
-    CleanupStack::PushL( connMethod );        
-    TObjectPoolCMItem aCM( pluginBaseEng, 0 );//The new id is zero till update
-    User::LeaveIfError(
-        iConnectionMethodArray.InsertInUnsignedKeyOrderAllowRepeats(aCM));
-    pluginBaseEng->IncrementRefCounter();
-    CleanupStack::Pop( connMethod );
-    CleanupStack::Pop( pluginBaseEng );
-    return connMethod;            
-	}
-
-CCmDestinationImpl* CCMObjectPool::GetDestinationL( const TDesC& aName )
-    {
-    // CmManagerImpl.GetDestinationL will leave with KErrAlreadyExists 
-    // if the destination already exists
-    CCmDestinationImpl* destImpl = CCmDestinationImpl::NewL( iCmManagerImpl,
-         aName );
-    // Yet destImpl->Id() == 0
-    TObjectPoolDestinationItem aDest( destImpl->GetData(), destImpl->Id() );
-    // InsertInUnsignedKeyOrderAllowRepeats is used because all
-    // new destinations' Id is zero   
-    User::LeaveIfError(
-        iDestinationArray.InsertInUnsignedKeyOrderAllowRepeats(aDest) );
-    destImpl->IncrementRefCounter();
-    return destImpl;            
-    }
-
-CCmDestinationImpl* CCMObjectPool::CreateDestinationL( const TDesC& aName,
-                                                       TUint32 aDestId )
-    {
-    // CmManagerImpl.GetDestinationL will leave with KErrAlreadyExists 
-    // if the destination already exists
-    CCmDestinationImpl* destImpl = CCmDestinationImpl::NewL( iCmManagerImpl,
-                                                             aName,
-                                                             aDestId);
-    // Yet destImpl->Id() == 0
-    TObjectPoolDestinationItem aDest( destImpl->GetData(), destImpl->Id() );
-    // InsertInUnsignedKeyOrderAllowRepeats is used because all
-    // new destinations' Id is zero   
-    User::LeaveIfError(
-                   iDestinationArray.InsertInUnsignedKeyOrderAllowRepeats(aDest) );
-    destImpl->IncrementRefCounter();
-    return destImpl;            
-    }
-
-
-void CCMObjectPool::RemoveDestination( CCmDestinationData* aDestination )
-    {
-    if (aDestination->IdIsValid())
-        {
-        aDestination->DecrementRefCounter();
-        if (!aDestination->GetRefCounter())
-            {// this was the last reference -> must delete        
-            TObjectPoolDestinationItem findD( NULL, aDestination->Id() );
-            TInt index = iDestinationArray.FindInUnsignedKeyOrder(findD);
-            iDestinationArray.Remove(index);
-            delete aDestination;
-            }        
-        }
-    else
-        { // this is a new destination which hasn't been updated yet
-        // there may be more than one dest with id 0 -> must search by 
-        // iDestinationItem        
-        for (TInt index = 0; index < iDestinationArray.Count(); index++)
-            {
-            if ( iDestinationArray[index].iDestinationItem == 
-                 aDestination )
-                {
-                aDestination->DecrementRefCounter();
-                if (!aDestination->GetRefCounter())
-                    {// this was the last reference -> must delete        
-                    iDestinationArray.Remove(index);
-                    delete aDestination;
-                    }
-                break;    
-                }
-            }                
-        }
-    }
-
-void CCMObjectPool::RemoveDestination( CCmDestinationImpl* aDestination )
-    {
-    RemoveDestination(aDestination->GetData());
-    aDestination->SetData(NULL);
-    }
-
-void CCMObjectPool::DestinationUpdated( CCmDestinationImpl* aDestination )
-    {
-    // there may be more than one dest with id 0 -> must search by 
-    // iDestinationItem        
-    for (TInt index = 0; index < iDestinationArray.Count(); index++)
-        {
-        if ( iDestinationArray[index].iDestinationItem == 
-                aDestination->GetData() )
-            {
-            if (aDestination->IdIsValid()) break; //allready updated
-            iDestinationArray[index].iDestinationId = aDestination->Id();
-            iDestinationArray.SortUnsigned();
-            break;    
-            }
-        }        
-    }
-
-void CCMObjectPool::ConnMethodUpdatedL( CCmPluginBaseEng* aCM )
-    {
-    // there may be more than one dest with id 0 -> must search by 
-    // iDestinationItem        
-    for (TInt index = 0; index < iConnectionMethodArray.Count(); index++)
-        {
-        if ( iConnectionMethodArray[index].iConnectionMethodItem == 
-                aCM )
-            {
-            TInt cmId = aCM->GetIntAttributeL(CMManager::ECmId);
-            iConnectionMethodArray[index].iConnectionMethodId = cmId;
-            iConnectionMethodArray.SortUnsigned();
-            break;    
-            }
-        }        
-    }
-
-void CCMObjectPool::RemoveConnectionMethodL( CCmPluginBase* aCM)
-    {
-    RemoveConnectionMethodL(aCM->Plugin());
-    aCM->SetPlugin(NULL);
-    }
-
-void CCMObjectPool::RemoveConnectionMethodL( CCmPluginBaseEng* aCM)
-    {
-    if (aCM->IdIsValid())
-        {
-        aCM->DecrementRefCounter();
-        if (!aCM->GetRefCounter())
-            {// this was the last reference -> must delete        
-            TUint32 cmId = aCM->GetIntAttributeL(CMManager::ECmId);
-            TObjectPoolCMItem findD( NULL, cmId );
-            TInt index = iConnectionMethodArray.FindInUnsignedKeyOrder(findD);
-            iConnectionMethodArray.Remove(index);
-            delete aCM;
-            }        
-        }
-    else
-        { // this is a new cm which hasn't been updated yet
-        // there may be more than one cm with id 0 -> must search by pointer
-        for (TInt index = 0; index < iConnectionMethodArray.Count(); index++)
-            {
-            if ( iConnectionMethodArray[index].iConnectionMethodItem == aCM )
-                {
-                aCM->DecrementRefCounter();
-                if (!aCM->GetRefCounter())
-                    {// this was the last reference -> must delete        
-                    iConnectionMethodArray.Remove(index);
-                    delete aCM;
-                    }
-                break;    
-                }
-            }
-        }
-    }
-
--- a/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1517 +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:  base class for connection method plugin dialogs
-*
-*/
-
-
-// INCLUDE FILES
-
-// System
-#include <cmmanager.rsg>
-#include <aknnavide.h>
-#include <StringLoader.h>
-#include <akntitle.h>
-#include <aknradiobuttonsettingpage.h>
-#include <data_caging_path_literals.hrh>
-#include <akntextsettingpage.h>
-#include <aknpasswordsettingpage.h>
-#include <in_sock.h>
-#include <aknmfnesettingpage.h>
-#include <AknQueryDialog.h>
-#include <featmgr.h>
-
-#include <hlplch.h>
-
-// User
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include <cmmanager.h>
-#include <cmpluginbaseeng.h>
-#include "cmmanagerimpl.h"
-#include "cmmanager.hrh"
-#include <cmcommonui.h>
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmpluginmultilinedialog.h"
-#include "cmlogger.h"
-#include "ccmdexec.h"
-
-using namespace CMManager;
-
-// Maximum speed mapping
-struct TIPv6DNSMapping
-    {
-    TInt iResId;
-    TInt iSettingValue;
-    };
-
-// Mapping for IPv6 DNS types
-const TIPv6DNSMapping KTIPv6DNSItems[] =
-    {
-    { R_QTN_SET_DNS_SERVERS_AUTOMATIC, EIPv6Unspecified },
-    { R_QTN_SET_IP_WELL_KNOWN,         EIPv6WellKnown },
-    { R_QTN_SET_IP_USER_DEFINED,       EIPv6UserDefined },
-    { 0, 0 }
-    };
-    
-const TUint32 KMaxInt32Length = 10;
-
-// ================= MEMBER FUNCTIONS =======================================
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ConstructAndRunLD
-// Constructs the dialog and runs it.
-// --------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::ConstructAndRunLD( )
-    {
-    CleanupStack::PushL( this );
-    FeatureManager::InitializeLibL();
-    iHelp = FeatureManager::FeatureSupported( KFeatureIdHelp ); 
-    FeatureManager::UnInitializeLib();
-    ConstructL( R_PLUGIN_BASE_MENUBAR );
-    PrepareLC( R_PLUGIN_BASE_DIALOG );
-    CleanupStack::Pop( this );
-    iSettingIndex = new ( ELeave ) CArrayFixFlat<TUint>( 4 );
-
-    if (!iHasSettingChanged)
-	    {
-        iHasSettingChanged = ETrue;
-        }
-
-    return RunLD();
-    }
-    
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::CmPluginBaseSettingsDlg()
-// --------------------------------------------------------------------------
-//
-EXPORT_C  CmPluginBaseSettingsDlg::CmPluginBaseSettingsDlg( 
-                                          CCmPluginBaseEng& aCmPluginBase ) :
-        iCmPluginBaseEng( aCmPluginBase ),
-        iExitReason( KDialogUserBack ),
-        iResourceReader( *CCoeEnv::Static() ),
-        iIsPossibleToSaveSetting( ETrue ),
-        iHasSettingChanged( EFalse )
-    {
-    }
-   
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::~CApSelectorDialog
-// --------------------------------------------------------------------------
-//
-EXPORT_C CmPluginBaseSettingsDlg::~CmPluginBaseSettingsDlg()
-    {
-    // iModel is deleted by the ListBox because LB owns the model...
-    // of course only after we passed ownership...
-    if ( iNaviDecorator )
-        {
-        delete iNaviDecorator;
-        }
-    if ( iTitlePane )
-        {
-        // set old text back, if we have it...
-        if ( iOldTitleText )
-            {
-            TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
-            delete iOldTitleText;
-            }
-        }       
-    if ( iSettingIndex )
-        {
-        delete iSettingIndex;
-        }
-    iResourceReader.Close();        
-
-    delete iCmdExec;
-    iCmdExec = NULL;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::PreLayoutDynInitL();
-// called by framework before dialog is shown
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::PreLayoutDynInitL()
-    {
-    iListbox = STATIC_CAST( CAknSettingStyleListBox*, 
-                                           Control( KPluginBaseListboxId ) );
-    iListbox->CreateScrollBarFrameL( ETrue );
-    iListbox->ScrollBarFrame()->SetScrollBarVisibilityL
-                    ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-    iListbox->SetListBoxObserver( this );
-
-    HandleListboxDataChangeL();
-    iListbox->HandleItemAdditionL();
-    InitTextsL();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::UpdateListBoxContentL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::UpdateListBoxContentL()
-    {        
-    // Must save listbox indexes because content will be deleted
-    TInt lastListBoxPos = iListbox->CurrentItemIndex();
-    TInt lastListBoxTopPos = iListbox->TopItemIndex();
-
-    // deleting listbox content
-    MDesCArray* itemList = iListbox->Model()->ItemTextArray();
-    CDesCArray* itemArray = (CDesCArray*)itemList;
-    
-    while ( itemArray->Count() )
-        {
-        itemArray->Delete( 0 );
-        }
-    while ( iSettingIndex->Count() )
-        {
-        iSettingIndex->Delete( 0 );
-        }
-
-    // CONNECTION NAME
-    AppendSettingTextsL( *itemArray, ECmName );
-
-    // BEARER SPECIFIC SETTINGS
-    UpdateListBoxContentBearerSpecificL( *itemArray );
-
-    //-----------------------------------------------------------------------
-    // Handle content changes
-    iListbox->Reset();
-    iListbox->HandleItemAdditionL();
-    
-    // Listbox might not have index
-    if ( lastListBoxPos != -1 )
-        {
-        iListbox->SetCurrentItemIndex( lastListBoxPos );
-        iListbox->SetTopItemIndex( lastListBoxTopPos );
-        }
-    iListbox->DrawNow();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::AppendSettingTextsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::AppendSettingTextsL( 
-                                                    CDesCArray& aItemArray,
-                                                    const TInt aSettingItemId,
-                                                    const TInt aValueResId )
-    {
-    HBufC* value = StringLoader::LoadLC( aValueResId );
-
-    AppendSettingTextsL( aItemArray, aSettingItemId, value );
-    
-    CleanupStack::PopAndDestroy( value );
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::AppendSettingTextsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::AppendSettingTextsL( 
-                                            CDesCArray& aItemArray,
-                                            const TInt aSettingItemId,
-                                            const HBufC* aValueString )
-    {
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aSettingItemId );
-    HBufC* value = NULL;
-    
-    if ( aValueString )
-        {
-        value = (HBufC*)aValueString;
-        }
-    else
-        {
-        if ( convItem->iAttribFlags & EConvNumber )
-            {
-            TUint32 num = iCmPluginBaseEng.GetIntAttributeL( aSettingItemId );
-            
-            if( !num && convItem->iDefSettingResId )
-                {
-                value = StringLoader::LoadL( convItem->iDefSettingResId );
-                }
-            else
-                {
-                value = HBufC::NewL( KMaxInt32Length );
-                value->Des().AppendNum( num );
-
-                TPtr number( value->Des() );
-                AknTextUtils::LanguageSpecificNumberConversion( number );
-                }
-            }
-        else
-            {
-            if( convItem->iAttribFlags & EConv8Bits )
-                // make 16bits copy of this 8bits buffer
-                {
-                HBufC8* value8 = iCmPluginBaseEng.GetString8AttributeL( aSettingItemId );
-                CleanupStack::PushL( value8 );
-                value = HBufC::NewL( value8->Length() );
-                value->Des().Copy( *value8 );
-                CleanupStack::PopAndDestroy( value8 );
-                }
-            else
-                {   
-                value = iCmPluginBaseEng.GetStringAttributeL( aSettingItemId );
-                }
-                
-            if ( convItem->iDefSettingResId )
-                // We have default value in resource.
-                // Check if we have use it, instead of current value.
-                {
-                if ( convItem->iAttribFlags & EConvIPv4 )
-                    // This is an IPv4 text attribute
-                    {
-                    if ( IsUnspecifiedIPv4Address( *value ) )
-                        // Use default value from resource instead of
-                        // displaying unspecified IP address
-                        {
-                        delete value; value = NULL;
-                        }
-                    }
-                else if ( convItem->iAttribFlags & EConvIPv6 )
-                    // This is an IPv4 text attribute
-                    {
-                    }
-                else if( convItem->iAttribFlags & EConvPassword )
-                    // In case of password, we can show only the resource 
-                    // string.
-                    {
-                    delete value; value = NULL;
-                    }
-                else if ( *value == KNullDesC && convItem->iDefSettingResId )
-                    // empty string, but it has a default value in resource
-                    // Use the resource value.
-                    {
-                    delete value; value = NULL;
-                    }
-                    
-                if ( !value )
-                    // use default value from resource.
-                    {
-                    value = StringLoader::LoadL( convItem->iDefSettingResId );
-                    }
-                }
-            }
-
-        CleanupStack::PushL( value );
-        }
-
-    HBufC* title = StringLoader::LoadLC( convItem->iTitleId );
-
-    _LIT( KSettingListFormat, "\t%S\t\t%S" );
-    HBufC* itemTextBuf = HBufC::NewLC( KSettingListFormat().Length() + 
-                                       title->Length() +
-                                       value->Length() + 
-                                       KTxtCompulsory().Length() );
-                                       
-    TPtr itemText = itemTextBuf->Des();
-
-    itemText.Format( KSettingListFormat, title, value ); 
-    
-    // indicator for compulsory settings
-    if ( convItem->iAttribFlags & EConvCompulsory )
-        {
-        itemText.Append( KTxtCompulsory );        
-        }
-        
-    aItemArray.AppendL( itemText );
-    CleanupStack::PopAndDestroy( 2, title ); // itemTextBuf, title
-
-    if ( !aValueString )
-        {
-        CleanupStack::PopAndDestroy( (HBufC*)value );
-        }
-        
-    iSettingIndex->AppendL( aSettingItemId );
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::AppendSettingTextsL
-// --------------------------------------------------------------------------
-//
-
-EXPORT_C void CmPluginBaseSettingsDlg::AppendSettingTextsL(   
-                                              CDesCArray& aItemArray,
-                                              const TInt aSettingItemId,
-                                              const TInt aTitleResId,
-                                              const TInt aValueResId,
-                                              const TBool aCompulsory ) const
-    {
-    HBufC* value = NULL;
-    if ( aValueResId )
-        {
-        value = StringLoader::LoadLC( aValueResId );
-        }
-    else
-        {   
-        value = KNullDesC().AllocL();
-        CleanupStack::PushL( value );
-        }        
-    TPtr ptrValue = value->Des();
-    
-    AppendSettingTextsL( aItemArray, aSettingItemId, 
-                                        aTitleResId, ptrValue, aCompulsory );
-    
-    CleanupStack::PopAndDestroy( value );
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::AppendSettingTextsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::AppendSettingTextsL(   
-                                              CDesCArray& aItemArray,
-                                              const TInt aSettingItemId,
-                                              const TInt aTitleResId,
-                                              const TDesC& aValueString,
-                                              const TBool aCompulsory ) const
-    {
-    // Title
-    HBufC* title = StringLoader::LoadLC( aTitleResId );
-
-    _LIT( KSettingListFormat, "\t%S\t\t%S" );
-    HBufC* itemTextBuf = HBufC::NewLC( KSettingListFormat().Length() + 
-                                       title->Length() +
-                                       aValueString.Length() + 
-                                       KTxtCompulsory().Length() );
-                                       
-    TPtr itemText = itemTextBuf->Des();
-
-    itemText.Format( KSettingListFormat, title, &aValueString ); 
-    
-    // indicator for compulsory settings
-    if ( aCompulsory )
-        {
-        itemText.Append( KTxtCompulsory );        
-        }
-        
-    aItemArray.AppendL( itemText );
-    CleanupStack::PopAndDestroy( 2, title ); // itemTextBuf, title
-    iSettingIndex->AppendL( aSettingItemId );
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::DynInitMenuPaneL( 
-                                               TInt aResourceId,
-                                               CEikMenuPane* aMenuPane  )
-    {
-    CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane );
-        
-    if ( aResourceId == R_PLUGIN_BASE_MENU )
-        {
-    	if (!iHelp)
-            {
-            aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-            }
-        TInt currentItem = iSettingIndex->At( iListbox->CurrentItemIndex() );
-        if ( currentItem == ECmBearerSettingName )
-            {
-            
-            aMenuPane->SetItemDimmed( EPluginBaseCmdChange, ETrue );
-            }
-        }
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::ProcessCommandL( TInt aCommandId )
-    {
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        case EPluginBaseCmdExit:
-            {
-            iExitReason = KDialogUserExit;
-            if( iIsPossibleToSaveSetting && iHasSettingChanged )
-            {
-                iCmPluginBaseEng.UpdateL();
-                iHasSettingChanged = EFalse;
-            }
-
-            TryExitL( iExitReason );
-            break;
-            }
-        case EAknSoftkeyOk:
-        case EAknSoftkeyChange:
-            {
-            // Function CheckSpaceBelowCriticalLevelL may User::Leave with KLeaveWithoutAlert
-            // if no space available to save changes. The User::Leave message will be caught
-            // by iCmdExec. So,it is not caught here.
-            iCmPluginBaseEng.CheckSpaceBelowCriticalLevelL();
-
-            ShowPopupSettingPageL( 
-                    iSettingIndex->At( iListbox->CurrentItemIndex() ), 
-                                        aCommandId );
-
-            break;            
-            }
-        case EAknCmdHelp:
-            {
-            // Help context (the default value) has been set so this value is used.
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                                iEikonEnv->EikAppUi()->AppHelpContextL() );
-            }
-            break;
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::InitTextsL
-// called before the dialog is shown
-// to initialize localized textual data
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    if ( iEikonEnv )
-        {
-        iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-        iTitlePane = ( CAknTitlePane* )iStatusPane->ControlL(
-                                TUid::Uid( EEikStatusPaneUidTitle ) );
-
-        iOldTitleText = iTitlePane->Text()->AllocL();
-        HBufC* pdConnName = iCmPluginBaseEng.GetStringAttributeL( ECmName );
-        CleanupStack::PushL( pdConnName ); // 1
-                
-        if ( pdConnName )
-            {
-            iTitlePane->SetTextL( *pdConnName );
-            }
-        else
-            {
-            iTitlePane->SetTextL( KNullDesC );
-            }        
-        CleanupStack::PopAndDestroy( pdConnName ); // 0
-
-
-        iNaviPane = ( CAknNavigationControlContainer* )iStatusPane->ControlL(
-                                        TUid::Uid( EEikStatusPaneUidNavi ) );
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-        iNaviPane->PushL( *iNaviDecorator );
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::OkToExitL( TInt aButtonId )
-    {
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case EAknSoftkeyChange:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }        
-        case EAknSoftkeyBack:
-        case EAknSoftkeyExit:
-        case KDialogUserExit:
-            {
-            
-            if ( iIsPossibleToSaveSetting && iHasSettingChanged )
-                {
-                iCmPluginBaseEng.UpdateL();
-                iHasSettingChanged = EFalse;
-                }
-            retval = ETrue;
-            break;
-            }
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        default:
-            {
-            retval = ETrue;
-            break;
-            }
-        }
-
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::HandleListBoxEventL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::HandleListBoxEventL( 
-                        CEikListBox* /*aListBox*/, TListBoxEvent aEventType )
-    {
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemSingleClicked:
-            {
-            if ( !iProcessing )
-                {
-                delete iCmdExec;
-                iCmdExec = NULL;
-                iCmdExec = new (ELeave) CCmdExec(*this);
-                iCmdExec->Execute();
-                }
-            break;
-            }
-        case EEventEditingStarted:
-            {
-            break;
-            }
-        case EEventEditingStopped:
-            {
-            break;
-            }
-        default:
-            {
-            break;
-//            User::Leave( KErrNotSupported );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TKeyResponse CmPluginBaseSettingsDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                       TEventCode aType )    
-    {
-    TKeyResponse retVal ( EKeyWasNotConsumed );
-    switch( aKeyEvent.iCode )
-        {
-        // Add processing for case EKeyEscape to support status pane event in IAP-related editing 
-        // views (Dlg view, AdvDlg view and IPv4 and IPv6 views and so on)
-        case EKeyEscape:
-            TryExitL( iExitReason );
-            retVal = EKeyWasConsumed;
-            break;
-        default:
-            retVal = iListbox->OfferKeyEventL( aKeyEvent, aType ); 
-            break;
-        }
-        
-    return retVal;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::LoadResourceL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::LoadResourceL ( 
-                                                const TDesC& aResFileName )
-    {
-    TInt err( KErrNone );
-    // Add resource file.
-    TParse* fp = new ( ELeave ) TParse();
-    err = fp->Set( aResFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err )
-        {
-        User::Leave( err );
-        }   
-
-    TFileName resourceFileNameBuf = fp->FullName();
-    delete fp;
-
-    iResourceReader.OpenL( resourceFileNameBuf );
-    return err;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::HandleListboxDataChangeL
-// called before the dialog is shown to initialize listbox data
-//---------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::HandleListboxDataChangeL()
-    {
-    UpdateListBoxContentL();
-    iListbox->HandleItemAdditionL();
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupSettingPageL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupSettingPageL( 
-                                           TUint32 aAttribute, TInt /*aCommandId*/ )
-    {
-    TBool retval( EFalse );
-    
-    switch ( aAttribute )
-        {
-        case ECmBearerSettingName:
-            {
-            TCmCommonUi::ShowNoteL ( R_PLUGIN_BASE_INFO_BEARER_NOT_EDITABLE,
-                                                  TCmCommonUi::ECmInfoNote );
-            break;
-            }
-        case ECmName:
-        default:
-            {
-            retval = ShowPopupTextSettingPageL( aAttribute );
-            break;
-            }
-        }
-    return retval;
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::SelectItem
-//---------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::SelectItem( TInt aItemIndex )
-    {
-    iListbox->ScrollToMakeItemVisible( aItemIndex );
-    iListbox->SetCurrentItemIndexAndDraw( aItemIndex );
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::StringAttributeWithDefaultL
-//---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CmPluginBaseSettingsDlg::StringAttributeWithDefaultL( 
-                                        TUint32 aAttribute, TUint32 aDefRes )
-    {
-    HBufC* value = iCmPluginBaseEng.GetStringAttributeL( aAttribute );
-    if ( *value == KNullDesC )
-        {
-        delete value;
-        value = NULL;
-        value = StringLoader::LoadL( aDefRes );
-        }
-
-    return value;
-    }
-   
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = iHelpContext;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupIpSettingPageL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupIpSettingPageL( 
-                                                            TUint32 aAttribute,
-                                                            TUint32 aTitleId )
-    
-    {
-    TBool retval = EFalse;
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aAttribute );
-    
-    HBufC* servName = HBufC::NewLC( convItem->iMaxLength );
-    TPtr ptrServName ( servName->Des() );
-     
-    HBufC* orig = iCmPluginBaseEng.GetStringAttributeL( aAttribute );    
-    CleanupStack::PushL( orig );
-    ptrServName.Copy( *orig );
-    
-    TInetAddr addr;
-    addr.Input( ptrServName );
-    
-    TInt resId = EditorId( convItem->iEditorResId, R_TEXT_SETTING_PAGE_IP );
-    
-    CAknIpFieldSettingPage* dlg = 
-                    new ( ELeave ) CAknIpFieldSettingPage( 
-                                       resId, 
-                                       addr );
-
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, convItem->iTitleId, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) )
-        {
-        addr.Output( ptrServName );
-        
-        if ( orig->Des().CompareF( ptrServName ) )
-            // User modified IP address
-            {
-            iCmPluginBaseEng.SetStringAttributeL( aAttribute, ptrServName );
-            retval = ETrue;  
-            UpdateListBoxContentL();                                                                                     
-            }
-        }
-
-    CleanupStack::PopAndDestroy( 2, servName ); // orig, servName
-    return retval;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL( 
-                                                const TUint32* aResIds, 
-                                                TInt& aCurrentItem,
-                                                TUint32 aTitleId )
-    {
-    CDesCArrayFlat* items = 
-                   new ( ELeave ) CDesCArrayFlat( KCmArraySmallGranularity );
-            
-    CleanupStack::PushL( items );
-    TInt count( 0 );       
-    for( ; aResIds[count]; ++count )
-        {
-        HBufC* item = StringLoader::LoadLC( aResIds[count] );
-        items->AppendL( *item );
-        }
-        
-    TUint32 resId = EditorId( 0, R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL );
-    CAknRadioButtonSettingPage* dlg = 
-                            new ( ELeave ) CAknRadioButtonSettingPage(
-                                    resId,
-                                    aCurrentItem, 
-                                    items );
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, 0, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    TBool retVal = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );    
-    
-    CleanupStack::PopAndDestroy( count );   // selection items
-    CleanupStack::PopAndDestroy( items );
-    
-    return retVal;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL( 
-                                                CDesCArrayFlat& aItems, 
-                                                TInt& aCurrentItem,
-                                                TUint32 aTitleId )
-    {
-    TUint32 resId = EditorId( 0, R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL );
-    CAknRadioButtonSettingPage* dlg = 
-                            new ( ELeave ) CAknRadioButtonSettingPage(
-                                    resId,
-                                    aCurrentItem, 
-                                    &aItems );
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, 0, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    TBool retVal = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );    
-
-    return retVal;
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupTextSettingPageL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupTextSettingPageL( 
-                                                            TUint32 aAttribute,
-                                                            TUint32 aTitleId )
-    {    
-    TBool retval( EFalse );
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aAttribute );
-    
-    HBufC* textToChange = HBufC::NewLC( convItem->iMaxLength );
-    TPtr ptrTextToChange( textToChange->Des() );
-
-    HBufC* value = HBufC::NewLC( convItem->iMaxLength );
-    if ( convItem->iAttribFlags & EConv8Bits )
-        // convert 8bits attribute to 16bits
-        {
-        HBufC8* stringFromCm = 
-                iCmPluginBaseEng.GetString8AttributeL( aAttribute );
-        value->Des().Copy( *stringFromCm );
-
-        delete stringFromCm; stringFromCm = NULL;
-        }
-    else
-        {
-        HBufC* stringFromCm = 
-                iCmPluginBaseEng.GetStringAttributeL( aAttribute );
-        value->Des().Copy( *stringFromCm );
-
-        delete stringFromCm; stringFromCm = NULL;
-        }
-        
-    if( *value == KNullDesC && convItem->iDefValueResId )
-        // empty string is replaced with the default value from resource
-        {
-        HBufC* stringFromCm = StringLoader::LoadL( convItem->iDefValueResId );
-                
-        value->Des().Copy( *stringFromCm );
-
-        delete stringFromCm; stringFromCm = NULL;
-        }
-   
-    TPtr ptrValue( value->Des() );
-    ptrTextToChange.Copy( ptrValue );
-    
-    TInt textSettingPageFlags( EAknSettingPageNoOrdinalDisplayed );
-    
-    if ( !(convItem->iAttribFlags & EConvNoZeroLength) )
-        {
-        textSettingPageFlags = CAknTextSettingPage::EZeroLengthAllowed;
-        }
-
-    TUint32 resId = EditorId( convItem->iEditorResId, 0 );
-
-    CAknTextSettingPage* dlg = new ( ELeave ) CAknTextSettingPage( 
-                                    resId, 
-                                    ptrTextToChange, 
-                                    textSettingPageFlags );
-
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, convItem->iTitleId, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) )
-        {
-        if ( aAttribute == ECmName )
-            {
-            iTitlePane->SetTextL( ptrTextToChange );                                                                          
-            }
-        if ( ptrTextToChange.Compare( ptrValue ) )
-            // user modified the value
-            {
-            if ( convItem->iAttribFlags & EConv8Bits )
-                // convert back from 16bits to 8bits
-                {
-                HBufC8* stringTo = HBufC8::NewLC( ptrTextToChange.Length() );
-                
-                stringTo->Des().Copy( ptrTextToChange );
-                iCmPluginBaseEng.SetString8AttributeL( aAttribute, *stringTo );
-                                                                   
-                CleanupStack::PopAndDestroy( stringTo );
-                }
-            else
-                {
-                if( aAttribute == ECmName )
-                    {
-                    SetUniqueNameL( ptrTextToChange );
-                    }
-                else
-                    {
-                    iCmPluginBaseEng.SetStringAttributeL( aAttribute, 
-                                                      ptrTextToChange );
-                    }    
-                }
-                
-            retval = ETrue;
-            UpdateListBoxContentL();
-            }
-        }
-
-    CleanupStack::PopAndDestroy( 2, textToChange );
-    return retval;
-    }
-
-
-void CmPluginBaseSettingsDlg::SetUniqueNameL( TPtr aPtrTextToChange )
-    {
-     // Saves the recent naming method and set it to "Not accept"
-    TUint32 savedNM = iCmPluginBaseEng.GetIntAttributeL( ECmNamingMethod );
-    iCmPluginBaseEng.SetIntAttributeL( ECmNamingMethod, ENamingNotAccept );
-
-    // Tries to save the nem name. If it is not unique
-    // then ret == KErrArgument
-    TRAPD( err, iCmPluginBaseEng.SetStringAttributeL( ECmName, aPtrTextToChange ) );
-
-    if( KErrArgument == err )
-        {
-        // Opens a info note
-        HBufC* noteLine = StringLoader::LoadLC(
-                    R_CMMANAGERUI_INFO_DEST_ALREADY_IN_USE, aPtrTextToChange );
-
-        TCmCommonUi::ShowNoteL( *noteLine, TCmCommonUi::ECmInfoNote );
-
-        CleanupStack::PopAndDestroy( noteLine );
-        }
-
-    // Sets back the original naming method
-    iCmPluginBaseEng.SetIntAttributeL( ECmNamingMethod, savedNM );
-    }
-
-
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupPasswordSettingPageL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupPasswordSettingPageL( 
-                                                        TUint32 aAttribute,
-                                                        TUint32 aTitleId )
-    {
-    TBool retVal( EFalse );
-
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aAttribute );
-    HBufC* newPassword = HBufC::NewLC( KCmMaxPasswordLength );
-    TPtr16 ptrNewPassword = newPassword->Des();
-    
-    HBufC* oldPassword = NULL;
-    oldPassword = iCmPluginBaseEng.GetStringAttributeL( aAttribute );
-    CleanupStack::PushL( oldPassword );   
-    
-    TUint32 resId = EditorId( convItem->iEditorResId, 
-                              R_TEXT_SETTING_PAGE_PASSWD );
-    CAknAlphaPasswordSettingPage* dlg = 
-                    new ( ELeave ) CAknAlphaPasswordSettingPage(
-                                            resId,
-                                            ptrNewPassword,
-                                            *oldPassword );
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, convItem->iTitleId, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-        iCmPluginBaseEng.SetStringAttributeL( aAttribute, newPassword->Des() );
-        UpdateListBoxContentL();
-
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( 2, newPassword );
-    
-    return retVal;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowNumSettingPageL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupPortNumSettingPageL( 
-                                    TUint32 aAttribute, TUint32 aTitleId )
-    {
-    TBool retVal( EFalse );
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aAttribute );
-
-    TInt value( 0 );
-    value = iCmPluginBaseEng.GetIntAttributeL( aAttribute );
-
-    TInt origVal = value;
-    
-    HBufC* buf = HBufC::NewLC( convItem->iMaxLength );
-    TPtr ptr( buf->Des() );
-    
-    ptr.Num( value );
-    
-    TInt flags = EAknSettingPageNoOrdinalDisplayed;
-    
-    if ( !(convItem->iAttribFlags & EConvNoZeroLength) )
-        {
-        flags |= CAknTextSettingPage::EZeroLengthAllowed;
-        }
-    
-    TUint32 resId = EditorId( convItem->iEditorResId, 
-                              R_PORT_NUMBER_SETTING_PAGE );
-    CAknTextSettingPage* dlg = new ( ELeave ) CAknTextSettingPage( 
-                                    resId,
-                                    ptr, 
-                                    flags );
-
-    CleanupStack::PushL( dlg );
-    SetTitleL( dlg, convItem->iTitleId, aTitleId );
-    CleanupStack::Pop( dlg );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) )
-        {
-        TLex lex ( buf->Des() );
-
-        // An empty string should be treated as default        
-        if ( buf->Des() == KNullDesC )
-            {
-            value = 0;
-            }
-        else
-            {
-            lex.Val( value );
-            }
-        if ( value != origVal )
-            {
-            iCmPluginBaseEng.SetIntAttributeL( aAttribute, value );
-            retVal = ETrue;
-            UpdateListBoxContentL();
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( buf );
-    return retVal;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupIPv4DNSEditorL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlg::ShowPopupIPv4DNSEditorL(
-                                            TUint32 aDNSUsageAttribute,
-                                            TUint32 aDNS1ServAttribute,
-                                            TUint32 aDNS2ServAttribute,
-                                            TUint32 aTitleId )
-    {
-    // In default the return value is 'Automatic'
-    TBool retVal( EFalse );
-    // In default DNS setting is automatic.
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( aDNSUsageAttribute );
-
-    HBufC* primServ = iCmPluginBaseEng.GetStringAttributeL( aDNS1ServAttribute );
-    CleanupStack::PushL( primServ );
-    HBufC* secServ = iCmPluginBaseEng.GetStringAttributeL( aDNS2ServAttribute );
-    CleanupStack::PushL( secServ );
-    
-    TBuf<KIpAddressWidth> newPrim;
-    TBuf<KIpAddressWidth> newSec;
-    
-    newPrim.Copy( *primServ );
-    newSec.Copy( *secServ );
-    
-    TInetAddr dns1Addr;
-    TInetAddr dns2Addr;
-    
-    dns1Addr.Input( newPrim );
-    dns2Addr.Input( newSec );
-    
-    CAknMultiLineIpQueryDialog* dlg = 
-            CAknMultiLineIpQueryDialog::NewL( dns1Addr, 
-                                              dns2Addr );
-    
-    CleanupStack::PushL( dlg );
-
-    TUint32 editorId = EditorId( convItem->iEditorResId, R_DNSIP4_QUERY );
-    dlg->PrepareLC( editorId );
-
-    TUint32 titleId = TitleId( convItem->iTitleId, aTitleId );
-    if ( titleId )
-        {
-        dlg->SetTitleL( titleId );
-        }
-        
-    CleanupStack::Pop( dlg );
-    
-    if ( dlg->RunLD() )
-        {
-        dns1Addr.Output( newPrim );
-        dns2Addr.Output( newSec );
-        
-        if ( newPrim.CompareF( *primServ ) ||
-             newSec.CompareF( *secServ ) )
-            // User modified the DNS setting
-            {
-            iCmPluginBaseEng.SetDNSServerAddressL( 
-                                aDNS1ServAttribute,
-                                newPrim,
-                                aDNS2ServAttribute, 
-                                newSec,
-                                aDNSUsageAttribute,
-                                EFalse );
-                
-            UpdateListBoxContentL();
-            
-            retVal = ETrue;
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( 2, primServ );
-    
-    return retVal;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::ShowPopupIPv6DNSEditorL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::ShowPopupIPv6DNSEditorL(
-                                            const TUint32* aSelectionItems,
-                                            TUint32 aDNSUsageAttribute,
-                                            TUint32 aDNS1ServAttribute,
-                                            TUint32 aDNS2ServAttribute )
-    {
-    TBool update( EFalse );
-    TInt selected = GetIPv6DNSTypeL( aDNS1ServAttribute, aDNS2ServAttribute );
-    
-    // convert the current setting value to the selection index
-    TInt resId = KTIPv6DNSItems[selected].iResId;    
-    TInt i = 0;
-    while ( aSelectionItems[i] )
-        {
-        if ( resId == aSelectionItems[i] )
-            {
-            selected = i;
-            break;
-            }
-        i++;
-        }
-    
-    if ( ShowRadioButtonSettingPageL( aSelectionItems, 
-                                      selected, 
-                                      R_QTN_SET_DNS_SERVERS_IP ) )
-        {
-        // convert the selection to the setting value
-        resId = aSelectionItems[selected];
-        TInt j = 0;
-        
-        while ( KTIPv6DNSItems[j].iResId )
-            {
-            if ( resId == KTIPv6DNSItems[j].iResId )
-                {
-                selected = KTIPv6DNSItems[j].iSettingValue;
-                break;
-                }
-            j++;
-            }
-        
-        switch ( selected )
-            {
-            case EIPv6WellKnown: 
-                {
-                iCmPluginBaseEng.SetStringAttributeL( 
-                        aDNS1ServAttribute, KKnownIp6NameServer1 );
-                iCmPluginBaseEng.SetStringAttributeL( 
-                        aDNS2ServAttribute, KKnownIp6NameServer2 );
-                        
-                iCmPluginBaseEng.SetBoolAttributeL( 
-                        aDNSUsageAttribute, EFalse );
-                        
-                update = ETrue;
-                }
-                break;
-
-            case EIPv6Unspecified: 
-                {
-                iCmPluginBaseEng.SetStringAttributeL( 
-                        aDNS1ServAttribute, KDynamicIpv6Address );
-                iCmPluginBaseEng.SetStringAttributeL( 
-                        aDNS2ServAttribute, KDynamicIpv6Address );               
-                iCmPluginBaseEng.SetBoolAttributeL( 
-                        aDNSUsageAttribute, ETrue );
-                        
-                update = ETrue;
-                }
-                break;
-
-            case EIPv6UserDefined:                 
-                {
-                TInt err1;
-                TInt err2;
-                TBool cancelled(EFalse);
-                do
-                    {
-                    // These has to be reset to KErrNone in case of
-                    // inputting an invalid address (DLAN-7FJD68). 
-                    err1 = KErrNone;
-                    err2 = KErrNone;
-             
-                    HBufC* dns1 = HBufC::NewLC( KMaxIPv6NameServerLength );
-                    HBufC* dns2 = HBufC::NewLC( KMaxIPv6NameServerLength );
-                    
-                    TPtr dns1ptr( dns1->Des() );
-                    TPtr dns2ptr( dns2->Des() );
-                    
-                    HBufC* temp = iCmPluginBaseEng.GetStringAttributeL(
-                                                aDNS1ServAttribute );
-                    dns1ptr.Copy( *temp );
-                    delete temp; temp = NULL;
-                    
-                    temp = iCmPluginBaseEng.GetStringAttributeL( 
-                                                aDNS2ServAttribute );
-                    dns2ptr.Copy( *temp );
-                    delete temp; temp = NULL;
-
-                    // KDynamicIpv6Address is offered instead of empty string 
-                    if ( dns1ptr.Length() == 0 )
-                        { 
-                        dns1ptr = KDynamicIpv6Address;
-                        }
-                    if ( dns2ptr.Length() == 0 )
-                        { 
-                        dns2ptr = KDynamicIpv6Address;
-                        }
-
-                        
-                    if ( ( dns1ptr.Compare( KKnownIp6NameServer1 ) == 0 ) && 
-                         ( dns2ptr.Compare( KKnownIp6NameServer2 ) == 0 ) )
-                        { // special value, well-known
-                        // in this case 'dynamic' string must be offered so 
-                        // temp data must be changed to 'dynamic'
-                        dns1ptr = KDynamicIpv6Address;
-                        dns2ptr = KDynamicIpv6Address;
-                        }
-
-                    CCmPluginMultiLineDialog* ipquery = 
-                        CCmPluginMultiLineDialog::NewL( dns1ptr, 
-                                                        dns2ptr );
-
-                    if ( ipquery->ExecuteLD( R_DNSIP6_QUERY ) )
-                        {
-                        TInetAddr dns1Addr;
-                        TInetAddr dns2Addr;
-
-                        if ( dns1ptr.Compare( KNullDesC ) )
-                            {
-                            err1 = dns1Addr.Input( dns1ptr );
-                            }
-                        if ( dns2ptr.Compare( KNullDesC ) )
-                            {
-                            err2 = dns2Addr.Input( dns2ptr );
-                            }
-                        if ( err1 || err2 )
-                            {
-                            TCmCommonUi::ShowNoteL
-                                ( R_QTN_SET_INFO_INVALID_IP,
-                                TCmCommonUi::ECmErrorNote );
-                            }
-                        else
-                            {
-                            iCmPluginBaseEng.SetDNSServerAddressL( 
-                                                aDNS1ServAttribute,
-                                                dns1ptr,
-                                                aDNS2ServAttribute, 
-                                                dns2ptr,
-                                                aDNSUsageAttribute,
-                                                ETrue );
-
-                            update = ETrue;
-                            }
-                        }
-                    else
-                        {
-                        cancelled = ETrue;
-                        }
-                    CleanupStack::PopAndDestroy( dns2 );
-                    CleanupStack::PopAndDestroy( dns1 );                            
-                    } while ( (err1 || err2) && (!cancelled) );
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                }
-            }
-        }
-
-    if( update )
-        {
-        UpdateListBoxContentL();
-        }
-                
-    return selected;
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::TitleId
-//---------------------------------------------------------------------------
-//
-TUint32 CmPluginBaseSettingsDlg::TitleId( TUint32 aConvTitleId,
-                                          TUint32 aTitleId ) const
-    {
-    TUint32 titleId( 0 );
-    if ( aTitleId )
-        {
-        titleId = aTitleId;
-        }
-    else if ( !titleId )
-        {
-        titleId = aConvTitleId;
-        }
-        
-    return titleId;
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::SetTitleL
-//---------------------------------------------------------------------------
-//
-void CmPluginBaseSettingsDlg::SetTitleL( CAknSettingPage* aDlg,
-                                         TUint32 aConvTitleId,
-                                         TUint32 aTitleId ) const
-    {
-    TUint32 titleId( TitleId( aConvTitleId, aTitleId ) );
-        
-    if ( titleId )
-        {
-        HBufC* title = StringLoader::LoadLC( titleId );
-        aDlg->SetSettingTextL( *title );
-        CleanupStack::PopAndDestroy( title );
-        }
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::EditorId
-//---------------------------------------------------------------------------
-//
-TUint32 CmPluginBaseSettingsDlg::EditorId( TUint32 aConvEditorId,
-                                           TUint32 aEditorId ) const
-    {
-    TUint32 resId( 0 );
-    if ( aConvEditorId )
-        {
-        resId = aConvEditorId;
-        }
-    if ( !resId )
-        {
-        resId = aEditorId;
-        }
-
-    return resId;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::GetIPv6DNSTypeL
-// --------------------------------------------------------------------------
-//
-EXPORT_C TInt CmPluginBaseSettingsDlg::GetIPv6DNSTypeL( 
-                                                TUint32 aDNS1ServAttribute,
-                                                TUint32 aDNS2ServAttribute )
-    {
-    TIPv6Types retval( EIPv6UserDefined );
-
-    HBufC* priServ = NULL;
-    priServ = iCmPluginBaseEng.GetStringAttributeL( aDNS1ServAttribute );
-    CleanupStack::PushL( priServ );
-    TPtr16 ptr1( priServ->Des() );
-       
-    HBufC* secServ = NULL;
-    secServ = iCmPluginBaseEng.GetStringAttributeL( aDNS2ServAttribute );
-    CleanupStack::PushL( secServ );
-    TPtr16 ptr2( secServ->Des() );
-    
-    // net type 6: if IspIPv6NameServ <> 0.0.0.0 
-    // => User defined OR well-known
-    
-    if ( ( !ptr1.Compare( KKnownIp6NameServer1 ) )
-        && ( !ptr2.Compare( KKnownIp6NameServer2 ) ) )
-        { // special value, well-known
-        retval = EIPv6WellKnown;
-        }
-    else
-        { 
-        // dynamic, if 0:0:...
-        // OR EMPTY text...
-        if ( ( ( !ptr1.Compare( KDynamicIpv6Address ) )
-               || ( !ptr1.Compare( KNullDesC ) ) )
-           &&( ( !ptr2.Compare( KDynamicIpv6Address ) ) 
-               ||( !ptr2.Compare( KDynamicIpv6Address ) ) ) )
-            { // dynamic, 0:0:...
-            retval = EIPv6Unspecified;
-            }
-        else
-            { // other value, user defined
-            retval = EIPv6UserDefined;
-            }
-        }
-
-    CleanupStack::PopAndDestroy( 2, priServ );
-
-    return retval;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::HandleResourceChange
-// --------------------------------------------------------------------------
-//
-
-EXPORT_C void CmPluginBaseSettingsDlg::HandleResourceChange( TInt aType )
-    {
-    CCoeControl::HandleResourceChange( aType ); 
-
-    CAknDialog::HandleResourceChange(aType);
-
-    if( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        DrawNow(); 
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::Execute
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::Execute()
-    {
-    iProcessing = ETrue;
-    
-    TRAPD( err, ProcessCommandL( EAknSoftkeyChange ) );
-    if ( err )
-        {
-        HandleLeaveError( err );
-        }
-    iProcessing = EFalse;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::HandleLeaveError
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlg::HandleLeaveError( TInt aError )
-{
-    switch( aError )
-    {
-        case KLeaveWithoutAlert:
-        case KErrNoMemory:
-            // Indicate no memory to save setting changes
-            iIsPossibleToSaveSetting = EFalse;
-
-            if (iProcessing)
-            {
-                // Release processing protection so that the next processing can be done
-                iProcessing = EFalse;
-            }
-            break;
-        default:
-            // More leave errors may be handled if necessary
-            // Now other leave errors are ignored here
-            break;
-    }
-}
--- a/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlgadv.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +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:  Dialog for advanced settings for plugin base.
-*
-*/
-
-#include <avkon.hrh>
-#include <eikdef.h>
-#include <eikenv.h>
-#include <eikedwin.h>
-#include <cmmanager.rsg>
-#include <data_caging_path_literals.hrh>
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <eikmenup.h>
-#include <StringLoader.h>
-#include <akntextsettingpage.h>
-#include <cmconnectionmethoddef.h>
-
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgadv.h>
-#include "cmpluginmenucommands.hrh"
-#include "cmmanager.hrh"
-
-using namespace CMManager;
-
-enum TSMTPSettingIds
-    {
-    EPluginBaseCmCmdSmtp
-    };
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::CmPluginBaseSettingsDlgAdv()
-// --------------------------------------------------------------------------
-//
-EXPORT_C CmPluginBaseSettingsDlgAdv::CmPluginBaseSettingsDlgAdv( 
-                                           CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlg( aCmPluginBase )
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::~CmPluginBaseSettingsDlgAdv
-// Destructor
-// --------------------------------------------------------------------------
-//
-EXPORT_C  CmPluginBaseSettingsDlgAdv::~CmPluginBaseSettingsDlgAdv()
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgAdv::DynInitMenuPaneL( 
-                                                    TInt aResourceId,
-                                                    CEikMenuPane* aMenuPane )
-    {
-    CmPluginBaseSettingsDlg::DynInitMenuPaneL( aResourceId, aMenuPane );
-    if ( aResourceId == R_PLUGIN_BASE_MENU )
-        {
-        aMenuPane->SetItemDimmed( EPluginBaseCmdAdvanced, ETrue  );           
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginBaseSettingsDlgAdv::UpdateListBoxContentBearerSpecificL( 
-                                                 CDesCArray& /*aItemArray*/ )
-    {
-    // Empty implementation - forced by inheritance
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::RunAdvancedSettingsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgAdv::RunAdvancedSettingsL()
-    {
-    // Empty implementation. This function has no meaning here
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgAdv::UpdateListBoxContentL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgAdv::UpdateListBoxContentL()
-    {
-    // Must save listbox indexes because content will be deleted
-    TInt lastListBoxPos = iListbox->CurrentItemIndex();
-    TInt lastListBoxTopPos = iListbox->TopItemIndex();
-
-    // deleting listbox content
-    MDesCArray* itemList = iListbox->Model()->ItemTextArray();
-    CDesCArray* itemArray = (CDesCArray*)itemList;
-    while ( itemArray->Count() )
-        {
-        itemArray->Delete( 0 );
-        }
-    while ( iSettingIndex->Count() )
-        {
-        iSettingIndex->Delete( 0 );
-        }
-
-    UpdateListBoxContentBearerSpecificL( *itemArray );
-                     
-    // Handle content changes
-    iListbox->Reset();
-    
-    iListbox->HandleItemAdditionL();
-    
-    // Listbox might not have index
-    if ( lastListBoxPos != -1 )
-        {
-        iListbox->SetCurrentItemIndex( lastListBoxPos );
-        iListbox->SetTopItemIndex( lastListBoxTopPos );
-        }
-    // Draw it
-    iListbox->DrawNow();
-    }
-
-//---------------------------------------------------------------------------         
-// CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL
-//---------------------------------------------------------------------------
-//
-EXPORT_C TBool CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL( 
-                                           TInt aAttribute, TInt aCommandId )
-    {
-    TBool retval( EFalse );
-    
-    switch ( aAttribute )
-        {
-        case EPluginBaseCmCmdSmtp:
-            {
-            // Show the SMTP settings page
-            User::Leave( KErrNotSupported );
-            break;
-            }      
-        default:
-            {
-            CmPluginBaseSettingsDlg::ProcessCommandL( aCommandId );
-            break;
-            }
-        }
-    return retval;
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlgip.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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:  Dialog for IPv4 settings for plugin base.
-*
-*/
-
-#include <cmmanager.rsg>
-
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgip.h>
-#include <cmmanagerdef.h>
-#include "cmmanager.hrh"
-
-using namespace CMManager;
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp()
-// --------------------------------------------------------------------------
-//
-EXPORT_C CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp( 
-                                           CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlg( aCmPluginBase )
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp
-// Destructor
-// --------------------------------------------------------------------------
-//
-EXPORT_C CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp()
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgIp::DynInitMenuPaneL( 
-                                                    TInt aResourceId,
-                                                    CEikMenuPane* aMenuPane )
-    {
-    CmPluginBaseSettingsDlg::DynInitMenuPaneL( aResourceId, aMenuPane );
-    if ( aResourceId == R_PLUGIN_BASE_MENU )
-        {
-        aMenuPane->SetItemDimmed( EPluginBaseCmdAdvanced, ETrue  );           
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginBaseSettingsDlgIp::UpdateListBoxContentBearerSpecificL( 
-                                                 CDesCArray& /*aItemArray*/ )
-    {
-    // Empty implementation - forced by inheritance
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL()
-    {
-    // Empty implementation. This function has no meaning here
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlgIp::UpdateListBoxContentL
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CmPluginBaseSettingsDlgIp::UpdateListBoxContentL()
-    {
-    // Must save listbox indexes because content will be deleted
-    TInt lastListBoxPos = iListbox->CurrentItemIndex();
-    TInt lastListBoxTopPos = iListbox->TopItemIndex();
-
-    // deleting listbox content
-    MDesCArray* itemList = iListbox->Model()->ItemTextArray();
-    CDesCArray* itemArray = (CDesCArray*)itemList;
-    while ( itemArray->Count() )
-        {
-        itemArray->Delete( 0 );
-        }
-    while ( iSettingIndex->Count() )
-        {
-        iSettingIndex->Delete( 0 );
-        }
-
-    UpdateListBoxContentBearerSpecificL( *itemArray );
-                        
-    // Handle content changes
-    iListbox->Reset();
-    // Listbox might not have index
-    if ( lastListBoxPos != -1 )
-        {
-        iListbox->SetCurrentItemIndex( lastListBoxPos );
-        iListbox->SetTopItemIndex( lastListBoxTopPos );
-        }
-    // Draw it
-    iListbox->DrawNow();
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmpluginbase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,823 +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:  Implementation of plugin base class
-*
-*/
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat_partner.h>
-#endif
-#include <cmmanager.rsg>
-#include <es_sock.h>    // RSocketServ, RConnection
-#include <in_sock.h>    // KAfInet
-#include <es_enum.h>    // TConnectionInfo
-#include <StringLoader.h>
-#include <AknUtils.h>
-#include <data_caging_path_literals.hrh>
-#include <sysutil.h> 
-#include <cmpluginbase.h>
-
-#include <cmmanager.h>
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include <cmpluginbase.h>
-#include <cmpsettingsconsts.h>
-#include "cmlogger.h"
-#include <cmcommonui.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CCmPluginBase
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBase::CCmPluginBase( CCmPluginBaseEng* plugin )
-    : iPlugin( plugin )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::~CCmPluginBase
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBase::~CCmPluginBase()
-    {
-    if (iPlugin)
-        {
-        TRAP_IGNORE( CmMgr().RemoveCMFromPoolL(this) );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::ConstructL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::ConstructL()
-    {
-    iPlugin->ConstructL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::ConstructL
-// ---------------------------------------------------------------------------
-//
- CCmPluginBase* CCmPluginBase::CreateInstanceL( TCmPluginInitParam& aInitParam )
-    {
-    CCmPluginBaseEng* plugin = iPlugin->CreateInstanceL(aInitParam);
-	CleanupStack::PushL( plugin );
-    CCmPluginBase* connMethod = new (ELeave) CCmPluginBase(plugin);     
-    CleanupStack::Pop( plugin );  // plugin        
-    return connMethod;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::RunSettingsL
-// ---------------------------------------------------------------------------
-//
-TInt CCmPluginBase::RunSettingsL()
-    {
-    return iPlugin->RunSettingsL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::InitializeWithUiL
-// ---------------------------------------------------------------------------
-//
-TInt CCmPluginBase::InitializeWithUiL(TBool aManuallyConfigure)
-    {
-    return iPlugin->InitializeWithUiL(aManuallyConfigure);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CanHandleIapIdL
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginBase::CanHandleIapIdL(TUint32 aIapId) const
-    {
-    return iPlugin->CanHandleIapIdL(aIapId);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CanHandleIapIdL
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginBase::CanHandleIapIdL(CommsDat::CCDIAPRecord* aIapRecord) const
-    {
-    return iPlugin->CanHandleIapIdL(aIapRecord);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::AdditionalReset
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::AdditionalReset()
-    {
-    iPlugin->AdditionalReset();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::ServiceRecordIdLC
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::ServiceRecordIdLC(HBufC* &aServiceName, 
-                                       TUint32& aRecordId)
-    {
-    iPlugin->ServiceRecordIdLC(aServiceName, aRecordId);
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::BearerRecordIdLC
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::BearerRecordIdLC(HBufC* &aBearerName, 
-                                       TUint32& aRecordId)
-    {
-    iPlugin->BearerRecordIdLC(aBearerName, aRecordId);
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::PrepareToDeleteRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::PrepareToDeleteRecordsL()
-    {
-    iPlugin->PrepareToDeleteRecordsL();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::DeleteAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::DeleteAdditionalRecordsL()
-    {
-    iPlugin->DeleteAdditionalRecordsL();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CreateNewServiceRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::CreateNewServiceRecordL()
-    {
-    iPlugin->CreateNewServiceRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::CreateAdditionalRecordsL()
-    {
-    iPlugin->CreateAdditionalRecordsL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::PrepareToCopyDataL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::PrepareToCopyDataL(CCmPluginBaseEng& aDestInst) const
-    {
-    iPlugin->PrepareToCopyDataL(aDestInst);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CopyAdditionalDataL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::CopyAdditionalDataL(CCmPluginBaseEng& aDestInst) const
-    {
-    iPlugin->CopyAdditionalDataL(aDestInst);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadAdditionalRecordsL()
-    {
-    iPlugin->LoadAdditionalRecordsL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateAdditionalRecordsL()
-    {
-    iPlugin->UpdateAdditionalRecordsL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::IsLinkedToIap
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmPluginBase::IsLinkedToIap( TUint32 aIapId )
-    {
-    return iPlugin->IsLinkedToIap( aIapId );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::IsLinkedToIap
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmPluginBase::IsLinkedToSnap( TUint32 aSnapId )
-    {
-    return iPlugin->IsLinkedToSnap( aSnapId );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::GetIntAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TUint32 
-            CCmPluginBase::GetIntAttributeL( const TUint32 aAttribute ) const
-    {
-    return iPlugin->GetIntAttributeL(aAttribute);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::GetBoolAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool 
-        CCmPluginBase::GetBoolAttributeL( const TUint32 aAttribute ) const
-    {
-    return iPlugin->GetBoolAttributeL(aAttribute);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::GetStringAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* 
-    CCmPluginBase::GetStringAttributeL( const TUint32 aAttribute ) const
-    {
-    return iPlugin->GetStringAttributeL(aAttribute);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::GetString8AttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC8* 
-    CCmPluginBase::GetString8AttributeL( const TUint32 aAttribute ) const
-    {
-    return iPlugin->GetString8AttributeL(aAttribute);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::SetIntAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::SetIntAttributeL( const TUint32 aAttribute, 
-                                                  TUint32 aValue )
-    {
-    iPlugin->SetIntAttributeL(aAttribute, aValue);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::SetBoolAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::SetBoolAttributeL( const TUint32 aAttribute, 
-                                                   TBool aValue )
-    {
-    iPlugin->SetBoolAttributeL(aAttribute, aValue);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::SetStringAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::SetStringAttributeL( const TUint32 aAttribute, 
-                                                     const TDesC16& aValue )
-    {
-    iPlugin->SetStringAttributeL(aAttribute, aValue);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::SetString8AttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::SetString8AttributeL( const TUint32 aAttribute, 
-                                                      const TDesC8& aValue )
-    {
-    iPlugin->SetString8AttributeL(aAttribute, aValue);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::RestoreAttributeL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::RestoreAttributeL( const TUint32 aAttribute )
-    {
-    iPlugin->RestoreAttributeL(aAttribute);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::Destination
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmDestinationImpl* CCmPluginBase::Destination() const
-    {
-    return iPlugin->Destination();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::UpdateL()
-    {
-    iPlugin->UpdateL();
-    iPlugin->SetIdValidity(ETrue);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::NumOfConnMethodReferencesL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CCmPluginBase::NumOfConnMethodReferencesL()
-    {
-    return iPlugin->NumOfConnMethodReferencesL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::Session
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CMDBSession& CCmPluginBase::Session()const
-    {
-    return iPlugin->Session();
-    }
-
-// ---------------------------------------------------------------------------
-// Delete this connection methond.
-// Record ids are checked to be sure that we delete only records
-// that were loaded before.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CCmPluginBase::DeleteL( TBool aForced,
-                                          TBool aOneRefAllowed )
-    {
-    return iPlugin->DeleteL(aForced, aOneRefAllowed);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::LoadL( TUint32 aIapId )
-    {
-    iPlugin->LoadL(aIapId);
-    CmMgr().ConnMethodUpdatedL( this->Plugin() );
-    iPlugin->SetIdValidity(ETrue);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::ReLoadL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::ReLoadL()
-    {
-    TUint32 cmID = iPlugin->GetIntAttributeL( ECmId );    
-    TUint32 refCounter = iPlugin->iRefCounter;
-    
-    iPlugin->iRefCounter = 1;
-    CCmManagerImpl* mgr = &CmMgr();
-    mgr->RemoveCMFromPoolL(iPlugin);
-    iPlugin = NULL;
-    CCmPluginBase* cm = mgr->GetConnectionMethodL( cmID );
-    iPlugin = cm->iPlugin;
-    cm->iPlugin = NULL;
-    delete cm;
-    iPlugin->SetIdValidity(ETrue);
-    iPlugin->iRefCounter = refCounter;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CreateNewL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::CreateNewL()
-    {
-    iPlugin->CreateNewL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CreateCopyL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginBase* CCmPluginBase::CreateCopyL() const
-    {
-    CCmPluginBaseEng* plugin = iPlugin->CreateCopyL();
-	CleanupStack::PushL( plugin );    
-    CCmPluginBase* connMethod = CmMgr().CreateConnectionMethodL(plugin);
-    CleanupStack::Pop( plugin );      
-    return connMethod;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::AddResourceFileL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::AddResourceFileL( const TDesC& aName )
-    {
-    iPlugin->AddResourceFileL(aName);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::RemoveResourceFile
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::RemoveResourceFile( const TDesC& aName )
-    {
-    iPlugin->RemoveResourceFile(aName);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::AllocReadL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CCmPluginBase::AllocReadL( TInt aResourceId ) const
-    {
-    return iPlugin->AllocReadL( aResourceId );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::OpenTransactionLC
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::OpenTransactionLC()
-    {
-    iPlugin->OpenTransactionLC();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::CommitTransactionL( TInt aError )
-    {
-    iPlugin->CommitTransactionL(aError);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::PrepareToLoadRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::DoLoadL( TUint32 aIapId )
-    {
-    iPlugin->CommitTransactionL(aIapId);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::PrepareToLoadRecordsL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::PrepareToLoadRecordsL()
-    {
-    iPlugin->PrepareToLoadRecordsL();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadIAPRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadIAPRecordL( TUint32 aIapId )
-    {
-    iPlugin->LoadIAPRecordL(aIapId);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadProxySettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadProxySettingL()
-    {
-    iPlugin->LoadProxySettingL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadServiceSettingL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::LoadServiceSettingL()
-    {
-    iPlugin->LoadServiceSettingL();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadChargeCardSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadChargeCardSettingL( TUint32 aRecordId )
-    {
-    iPlugin->LoadChargeCardSettingL(aRecordId);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadNetworkSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadNetworkSettingL()
-    {
-    iPlugin->LoadNetworkSettingL();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadLocationSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadLocationSettingL()
-    {
-    iPlugin->LoadLocationSettingL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::PrepareToUpdateRecordsL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::PrepareToUpdateRecordsL()
-    {
-    iPlugin->PrepareToUpdateRecordsL();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateIAPRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateIAPRecordL()
-    {
-    iPlugin->UpdateIAPRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateProxyRecordL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::UpdateProxyRecordL()
-    {
-    iPlugin->UpdateProxyRecordL();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateSeamlessnessRecordL()
-    {
-    iPlugin->UpdateSeamlessnessRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateChargeCardRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateChargeCardRecordL()
-    {
-    iPlugin->UpdateChargeCardRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateServiceRecordL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::UpdateServiceRecordL()
-    {
-    iPlugin->UpdateServiceRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateNetworkRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateNetworkRecordL()
-    {
-    iPlugin->UpdateNetworkRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateLocationRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateLocationRecordL()
-    {
-    iPlugin->UpdateLocationRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateConnPrefSettingL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateConnPrefSettingL()
-    {
-    iPlugin->UpdateConnPrefSettingL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::EnableProxyL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::EnableProxyL( TBool aEnable )
-    {
-    iPlugin->EnableProxyL(aEnable);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::EnableChargeCardL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::EnableChargeCardL( TBool aEnable )
-    {
-    iPlugin->EnableChargeCardL(aEnable);
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginBase::EnableLocationL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginBase::EnableLocationL( TBool aEnable )
-    {
-    iPlugin->EnableLocationL(aEnable);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadWapRecordL()
-    {
-    iPlugin->LoadWapRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::LoadSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::LoadSeamlessnessRecordL()
-    {
-    iPlugin->LoadSeamlessnessRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::UpdateWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::UpdateWapRecordL()
-    {
-    iPlugin->UpdateWapRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::NewWapRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::NewWapRecordL()
-    {
-    iPlugin->NewWapRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::NewSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-CCDIAPMetadataRecord* CCmPluginBase::NewSeamlessnessRecordL( TBool aSetDef )
-    {
-    return iPlugin->NewSeamlessnessRecordL(aSetDef);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::SetAttribute
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::SetAttribute( CCDRecordBase* aRecord, 
-                                     TUint32 aAttribute, 
-                                     TBool aSet )
-    {
-    iPlugin->SetAttribute(aRecord, aAttribute, aSet);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CopyAttributes
-// ---------------------------------------------------------------------------
-//
-void CCmPluginBase::CopyAttributes( CCDRecordBase* aSrcRecord, 
-                                       CCDRecordBase* aDstRecord )
-    {
-    iPlugin->CopyAttributes(aSrcRecord, aDstRecord);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::FindWAPRecordL
-// ---------------------------------------------------------------------------
-//
-CCDWAPIPBearerRecord* CCmPluginBase::FindWAPRecordL()
-    {
-    return iPlugin->FindWAPRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::FindSeamlessnessRecordL
-// ---------------------------------------------------------------------------
-//
-CCDIAPMetadataRecord* CCmPluginBase::FindSeamlessnessRecordL()
-    {
-    return iPlugin->FindSeamlessnessRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::IAPRecordElementId
-// ---------------------------------------------------------------------------
-TMDBElementId CCmPluginBase::IAPRecordElementId() const
-    {
-    return iPlugin->IAPRecordElementId();
-    }
-// ---------------------------------------------------------------------------
-// CCmPluginBase::ParentDestination
-// ---------------------------------------------------------------------------
-EXPORT_C CCmDestinationImpl* CCmPluginBase::ParentDestination() const 
-    { 
-    return iPlugin->ParentDestination();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::CmMgr
-// ---------------------------------------------------------------------------
-EXPORT_C CCmManagerImpl& CCmPluginBase::CmMgr() const 
-    { 
-    return iPlugin->CmMgr();
-    };
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::Plugin
-// ---------------------------------------------------------------------------
-void CCmPluginBase::SetPlugin(CCmPluginBaseEng* aPlugin) 
-    { 
-    iPlugin = aPlugin;
-    };
-
-// ---------------------------------------------------------------------------
-// CCmPluginBase::Plugin
-// ---------------------------------------------------------------------------
-EXPORT_C CCmPluginBaseEng* CCmPluginBase::Plugin() const 
-    { 
-    return iPlugin;
-    };
-    
-// -----------------------------------------------------------------------------
-// CCmPluginBase::IncrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmPluginBase::IncrementRefCounter()
-    {
-    iPlugin->IncrementRefCounter();
-    }
-// -----------------------------------------------------------------------------
-// CCmPluginBase::DecrementRefCounter
-// -----------------------------------------------------------------------------
-void CCmPluginBase::DecrementRefCounter()
-    {
-    iPlugin->DecrementRefCounter();
-    }
-// -----------------------------------------------------------------------------
-// CCmPluginBase::GetRefCounter
-// -----------------------------------------------------------------------------
-TInt CCmPluginBase::GetRefCounter()
-    {
-    return iPlugin->GetRefCounter();
-    }
-                                                                    
-// -----------------------------------------------------------------------------
-// CCmPluginBase::GetAdditionalUids
-// -----------------------------------------------------------------------------
-EXPORT_C void CCmPluginBase::GetAdditionalUids( RArray<TUint32>& aIapIds )
-    {
-    iPlugin->GetAdditionalUids( aIapIds );
-    }
-
-//-----------------------------------------------------------------------------
-// CCmPluginBase::FilterPossibleParentsL
-// -----------------------------------------------------------------------------
-void CCmPluginBase::FilterPossibleParentsL( RArray<TUint32>& aDests )
-    {
-    iPlugin->FilterPossibleParentsL( aDests );
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmpluginlanbase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +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:  Implementation of base for Lan Plugin interface 
-*                for Lan Bearer.
-*
-*/
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat_partner.h>
-#endif
-#include <cmpluginlanbase.h>
-#include "cmlogger.h"
-#include <ecom/ecom.h>        // For REComSession
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include "cmmanagerimpl.h"
-#include <cmmanager.rsg>
-#include <cmpsettingsconsts.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// default values for fields...
-// CONSTANTS
-_LIT( KEmpty, "");
-
-_LIT( KLanBearerName, "LANBearer" );
-_LIT( KLanBearerAgent, "lanagt.agt" );
-_LIT( KLanBearerNif, "lannif" );
-
-_LIT( KLanLDDName, "not used" );
-_LIT( KLanPDDName, "not used" );
-
-const TInt KLanLastSocketActivityTimeout = -1;
-const TInt KLanLastSocketClosedTimeout = -1;
-
-const TBool KDefIpAddrFromServer = ETrue;
-const TBool KDefIpDnsAddrFromServer = ETrue;
-const TBool KDefIp6DnsAddrFromServer = ETrue;
-
-static const TCmAttribConvTable SLanConvTbl[] = 
-    {
-    { ELanBaseIfNetworks, ELanBaseRangeMax, NULL },
-    { ELanBaseIfNetworks, KCDTIdLANIfNetworks, NULL },        
-    { ELanBaseIpNetMask, KCDTIdLANIpNetMask, &CheckIPv4ValidityL,
-      R_QTN_NETW_SETT_SUBNET_MASK,
-      KIpAddressWidth, EConvCompulsory | EConvIPv4, R_QTN_SELEC_SETTING_COMPULSORY, 0, NULL, NULL },
-    { ELanBaseIpGateway, KCDTIdLANIpGateway, &CheckIPv4ValidityL,
-      R_QTN_NETW_SETT_DEFAULT_GATEWAY,
-      KIpAddressWidth, EConvCompulsory | EConvIPv4, R_QTN_SELEC_SETTING_COMPULSORY, 0, NULL, NULL },
-    { ELanBaseIpAddrFromServer, KCDTIdLANIpAddrFromServer, NULL },
-    { ELanBaseIpAddr, KCDTIdLANIpAddr, &CheckIPv4ValidityL,
-      R_QTN_SET_IP_ADDRESS,
-      KIpAddressWidth, EConvIPv4, R_QTN_SET_IP_ADDRESS_DYNAMIC, 0, NULL, NULL },
-    { ELanBaseIpDNSAddrFromServer, KCDTIdLANIpDNSAddrFromServer, NULL,
-      R_QTN_SET_DNS_SERVERS_IP,
-      0, 0, 0, 0, NULL, NULL },
-    { ELanBaseIpNameServer1, KCDTIdLANIpNameServer1, &CheckIPv4ValidityL,
-      R_QTN_SET_PRIMARY_DNS,
-      KMaxIPv4NameServerLength, EConvIPv4, R_QTN_SET_DNS_SERVERS_AUTOMATIC, 0, NULL, NULL },
-    { ELanBaseIpNameServer2, KCDTIdLANIpNameServer2, &CheckIPv4ValidityL,
-      R_QTN_SET_SECONDARY_DNS,
-      KMaxIPv4NameServerLength, EConvIPv4, R_QTN_SET_DNS_SERVERS_AUTOMATIC, 0, NULL, NULL },    
-    { ELanBaseIp6DNSAddrFromServer, KCDTIdLANIp6DNSAddrFromServer, NULL,
-      R_QTN_SET_DNS_SERVERS_IP,
-      0, 0, 0, 0, NULL, NULL },
-    { ELanBaseIp6NameServer1, KCDTIdLANIp6NameServer1, &CheckIPv6ValidityL },
-    { ELanBaseIp6NameServer2, KCDTIdLANIp6NameServer2, &CheckIPv6ValidityL },
-    { ELanBaseIpAddrLeaseValidFrom, KCDTIdLANIpAddrLeaseValidFrom, NULL },
-    { ELanBaseIpAddrLeaseValidTo, KCDTIdLANIpAddrLeaseValidTo, NULL },
-    { ELanBaseConfigDaemonManagerName, KCDTIdLANConfigDaemonManagerName, NULL },
-    { ELanBaseConfigDaemonName, KCDTIdLANConfigDaemonName, NULL },
-    { ELanBaseServiceExtensionTableName, KCDTIdLANServiceExtensionTableName, NULL },
-    { ELanBaseServiceExtensionTableRecordId, KCDTIdLANServiceExtensionTableRecordId, &CheckRecordIdValidityL },
-    { 0,0, NULL }
-    };
-
-static const TCmCommonAttrConvArrayItem SCommonConvTbl[] =
-{
-    { ELanBaseIfNetworks, ECmIFNetworks },
-    { ELanBaseIpNetMask, ECmIPNetmask },
-    { ELanBaseIpGateway, ECmIPGateway },
-    { ELanBaseIpAddrFromServer, ECmIPAddFromServer },
-    { ELanBaseIpAddr, ECmIPAddress },
-    { ELanBaseIpDNSAddrFromServer, ECmIPDNSAddrFromServer },
-    { ELanBaseIpNameServer1, ECmIPNameServer1 },
-    { ELanBaseIpNameServer2, ECmIPNameServer2 },
-    { ELanBaseIp6DNSAddrFromServer, ECmIP6DNSAddrFromServer },
-    { ELanBaseIp6NameServer1, ECmIP6NameServer1 },
-    { ELanBaseIp6NameServer2, ECmIP6NameServer2 },
-    { ELanBaseIpAddrLeaseValidFrom, ECmIPAddrLeaseValidFrom },
-    { ELanBaseIpAddrLeaseValidTo, ECmIPAddrLeaseValidTo },
-    { ELanBaseConfigDaemonManagerName, ECmConfigDaemonManagerName },
-    { ELanBaseConfigDaemonName, ECmConfigDaemonName },
-    { 0, 0 }
-    };
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::CCmPluginLanBase()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginLanBase::CCmPluginLanBase( TCmPluginInitParam* aInitParam )
-    : CCmPluginBaseEng( aInitParam )
-    {
-    CLOG_CREATE;
-
-
-    }
-
-EXPORT_C CCmPluginLanBase::~CCmPluginLanBase()
-    {
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::ConstructL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginLanBase::ConstructL()
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::ConstructL" );
-    
-    CCmPluginBaseEng::ConstructL();
-    
-    AddConverstionTableL( (CCDRecordBase**)&iServiceRecord, NULL, SLanConvTbl );
-	AddCommonConversionTableL( SCommonConvTbl );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::RunSettingsL()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C TInt CCmPluginLanBase::RunSettingsL()
-    {
-    User::Leave( KErrNotSupported );
-    return 0;
-    }
-        
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::InitializeWithUiL()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C TBool CCmPluginLanBase::InitializeWithUiL( 
-                                            TBool /*aManuallyConfigure*/ )
-    {
-    User::Leave(KErrNotSupported);
-    return ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::LoadServiceSettingL()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C void CCmPluginLanBase::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::LoadServiceSettingL" );
-    
-    if( TPtrC(KCDTypeNameLANService) == iIapRecord->iServiceType  )
-        {
-        iServiceRecord = static_cast<CCDLANServiceRecord *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
-        }
-    else
-        // this IAP service is not supported by this plugin.
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-    CCmPluginBaseEng::LoadServiceSettingL();
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::ServiceRecord()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C CCDLANServiceRecord& CCmPluginLanBase::ServiceRecord()const
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::ServiceRecord" );
-    return *static_cast<CCDLANServiceRecord*>(iServiceRecord);
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::ServiceRecordIdLC
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CCmPluginLanBase::ServiceRecordIdLC( HBufC* &aName, 
-                                                   TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::ServiceRecordIdLC" );
-
-    aName = TPtrC( KCDTypeNameLANService ).AllocLC();    
-    aRecordId = iServiceRecord->RecordId();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::BearerRecordIdLC()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C void CCmPluginLanBase::BearerRecordIdLC( HBufC* &aBearerName, 
-                                                  TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::BearerRecordIdLC" );
-                
-    CCDLANBearerRecord* tmprec = static_cast<CCDLANBearerRecord*>
-                        (CCDRecordBase::RecordFactoryL( KCDTIdLANBearerRecord ));
-    CleanupStack::PushL( tmprec );
-
-    tmprec->iRecordName.SetL( TPtrC(iBearerRecName) );
-    if ( !tmprec->FindL( Session() ) )
-        { // bearer not found -> create dummy values
-        CLOG_WRITE( "No bearer found" );
-
-        tmprec->SetRecordId( KCDNewRecordRequest );
-        tmprec->iBearerAgent = KLanBearerAgent;
-        tmprec->iRecordName = KLanBearerName;
-        tmprec->iLanBearerNifName = KLanBearerNif;
-        tmprec->iLanBearerLddName = KLanLDDName;
-        tmprec->iLanBearerPddName = KLanPDDName;
-        tmprec->iLastSocketActivityTimeout = 
-                                        (TUint32)KLanLastSocketActivityTimeout;
-        tmprec->iLastSocketClosedTimeout = 
-                                        (TUint32)KLanLastSocketClosedTimeout;
-
-        tmprec->StoreL( Session() );
-        }
-
-    aRecordId = tmprec->RecordId();
-    
-    CLOG_WRITE_2( "Name: [%S], id: [%d]", 
-                  &tmprec->iRecordName.GetL(), 
-                  aRecordId );
-
-    CleanupStack::PopAndDestroy( tmprec );
-
-    aBearerName = TPtrC(KCDTypeNameLANBearer).AllocLC();    
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginLanBase::CreateNewServiceRecordL()
-// ---------------------------------------------------------------------------
-//        
-EXPORT_C void CCmPluginLanBase::CreateNewServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::CreateNewServiceRecordL" );
-
-    delete iServiceRecord; 
-    iServiceRecord = NULL;
-    
-    iServiceRecord = static_cast<CCDServiceRecordBase *>
-                (CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
-
-    // I do not think that we have to use the default record,
-    // but for compatibility with ApEngine, we write all fields 
-
-    CCDLANServiceRecord* record = 
-                            static_cast<CCDLANServiceRecord *>(iServiceRecord);
-
-
-    if( FeatureSupported( KFeatureIdIPv6 ) )
-        {
-        record->iIfNetworks.SetL( KDefIspIfNetworksIPv4IPv6LAN );
-        }
-    else
-        {
-        record->iIfNetworks.SetL( KDefIspIfNetworksIPv4 );
-        }
-
-//    record->iIpNetmask.SetL();
-    
-    record->iIpGateway.SetL( KUnspecifiedIPv4 );        
-    record->iIpAddrFromServer.SetL( KDefIpAddrFromServer );
-    
-    record->iIpAddr.SetL( KUnspecifiedIPv4 );
-    
-    record->iIpDnsAddrFromServer.SetL( KDefIpDnsAddrFromServer );
-    
-    record->iIpNameServer1.SetL( KUnspecifiedIPv4 );
-    record->iIpNameServer2.SetL( KUnspecifiedIPv4 );
-    record->iIp6DnsAddrFromServer.SetL( KDefIp6DnsAddrFromServer );
-    record->iIp6NameServer1.SetL( KDynamicIpv6Address );
-    record->iIp6NameServer2.SetL( KDynamicIpv6Address );
-        
-//        record->iIpAddrLeaseValidFrom.SetL();
-//        record->iIpAddrLeaseValidTo.SetL();
-        
-    if ( KDefIpAddrFromServer )
-        {
-        record->iConfigDaemonManagerName.SetL( KDaemonManagerName );
-        record->iConfigDaemonName.SetL( KConfigDaemonName );
-        }
-    else
-        {
-        record->iConfigDaemonManagerName.SetL( KEmpty );
-        record->iConfigDaemonName.SetL( KEmpty );
-        }
-
-//        record->iServiceExtensionTableName.SetL();
-//        record->iServiceExtensionTableRecordId.SetL();
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginLanBase::PrepareToUpdateRecordsL()
-// --------------------------------------------------------------------------
-//        
-EXPORT_C void CCmPluginLanBase::PrepareToUpdateRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::PrepareToUpdateRecordsL" );
-    
-    CheckDNSServerAddressL( ETrue, 
-                            ServiceRecord().iIp6NameServer1,
-                            ServiceRecord().iIp6NameServer2,
-                            ServiceRecord().iIp6DnsAddrFromServer );
-                            
-    CheckDNSServerAddressL( EFalse,
-                            ServiceRecord().iIpNameServer1,
-                            ServiceRecord().iIpNameServer2,
-                            ServiceRecord().iIpDnsAddrFromServer );
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmpluginmultilinedialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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:  Implementation of CCmPluginMultiLineDialog.
-*
-*/
-
-#include "cmpluginmultilinedialog.h"
-
-// ---------------------------------------------------------------------------
-// CCmPluginMultiLineDialog::NewL
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CCmPluginMultiLineDialog* CCmPluginMultiLineDialog::NewL(
-                           TDes&  aText1, TDes&  aText2,
-                           TTone aTone )
-    {
-    CCmPluginMultiLineDialog* self = 
-        new (ELeave) CCmPluginMultiLineDialog(aTone);
-    CleanupStack::PushL(self);
-
-    self->SetDataL( aText1, aText2 );
-
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginMultiLineDialog::CCmPluginMultiLineDialog
-// ---------------------------------------------------------------------------
-//
-CCmPluginMultiLineDialog::CCmPluginMultiLineDialog( const TTone& aTone )
-: CAknMultiLineDataQueryDialog( aTone )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginMultiLineDialog::UpdateLeftSoftKeyL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginMultiLineDialog::UpdateLeftSoftKeyL()
-    {
-    CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL();
-    MakeLeftSoftkeyVisible( ETrue );
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmsettingsui.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CCmSettingsUi.
-*
-*/
-
-//This include contains full path because there is 
-//an other version of the same file available in the public
-//SDK and we want to make sure that the internal header is used.
-#include <platform/mw/cmsettingsui.h> 
-#include "cmsettingsuiimpl.h"
-#include <cmcommonconstants.h>
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::NewL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmSettingsUi* CCmSettingsUi::NewL()
-    {
-    CCmSettingsUi* self = new (ELeave) CCmSettingsUi();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );   // self
-    return self;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::CCmSettingsUi()
-//-----------------------------------------------------------------------------
-//
-CCmSettingsUi::CCmSettingsUi()
-    {
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::~CCmSettingsUi()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmSettingsUi::~CCmSettingsUi()
-    {
-    delete iImpl;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::ConstructL()
-//-----------------------------------------------------------------------------
-//
-void CCmSettingsUi::ConstructL()
-    {
-    iImpl = CCmSettingsUiImpl::NewL();
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::RunSettingsL()
-//-----------------------------------------------------------------------------
-//
-EXPORT_C CCmSettingsUi::TResult CCmSettingsUi::RunSettingsL()
-    {
-    if ( iImpl->RunSettingsL() == KDialogUserExit )
-        {
-        return EExit;
-        }
-     else
-        {
-        return EBack;
-        }
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::SelectDestinationDlgL()
-//-----------------------------------------------------------------------------
-//    
-EXPORT_C TBool CCmSettingsUi::SelectDestinationDlgL( TUint32& aDestinationId )
-    {
-    return iImpl->SelectDestinationDlgL( aDestinationId );
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::AddCmL()
-//-----------------------------------------------------------------------------
-//    
-
-EXPORT_C TUint32 CCmSettingsUi::AddCmL( TUint32& aDestUid, TUint32 aBearerType )
-    {
-    return iImpl->AddCmL( aDestUid, aBearerType );
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUi::EditCmL()
-//-----------------------------------------------------------------------------
-//
-
-EXPORT_C CCmSettingsUi::TResult CCmSettingsUi::EditCmL( TUint32 aCmId )
-    {
-    if ( iImpl->EditCmL( aCmId ) == KDialogUserExit )
-        {
-        return EExit;
-        }
-     else
-        {
-        return EBack;
-        }
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmsettingsuiimpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CCmSettingsUiImpl.
-*
-*/
-
-#include <cmmanager.rsg>
-
-#include "cmsettingsuiimpl.h"
-#include "cmmanagerimpl.h"
-#include "destdlg.h"
-#include <cmcommonui.h>
-#include <cmpluginbase.h>
-#include <cmmanagerdef.h>
-#include <cmcommonconstants.h>
-#include <cmpluginwlandef.h>
-#include "selectdestinationdlg.h"
-#include <data_caging_path_literals.hrh>
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::NewL()
-//-----------------------------------------------------------------------------
-//
-CCmSettingsUiImpl* CCmSettingsUiImpl::NewL()
-    {
-    CCmSettingsUiImpl* self = new (ELeave) CCmSettingsUiImpl();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::CCmSettingsUiImpl
-//-----------------------------------------------------------------------------
-//
-CCmSettingsUiImpl::CCmSettingsUiImpl():
-    iResourceReader( *CCoeEnv::Static() )
-    {
-    }
-
-//-----------------------------------------------------------------------------
-// CCmSettingsUiImpl::LoadResourceL
-// Load the resource for the dll module
-// ----------------------------------------------------------------------------
-//
-TInt CCmSettingsUiImpl::LoadResourceL ()
-    {    
-    // Add resource file.
-    TParse* fp = new(ELeave) TParse(); 
-    TInt err = fp->Set( KACMManagerResDirAndFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err != KErrNone)
-        {
-        User::Leave( err );
-        }   
-
-    TFileName resourceFileNameBuf = fp->FullName();
-    delete fp;
-
-    iResourceReader.OpenL (resourceFileNameBuf);
-    return err;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::~CCmSettingsUiImpl
-//-----------------------------------------------------------------------------
-//
-CCmSettingsUiImpl::~CCmSettingsUiImpl()
-    {
-    delete iCmManagerImpl;
-    iResourceReader.Close();    
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::ConstructL
-//-----------------------------------------------------------------------------
-//
-void CCmSettingsUiImpl::ConstructL()
-    {
-    iCmManagerImpl = CCmManagerImpl::NewL();
-    LoadResourceL();
-    AknsUtils::SetAvkonSkinEnabledL( ETrue );
-    }
-    
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::RunSettingsL
-//-----------------------------------------------------------------------------
-//
-TInt CCmSettingsUiImpl::RunSettingsL()
-    {
-    CDestDlg* destDlg = new (ELeave) CDestDlg;
-
-    TUint32 selected = 0;
-    // No need to push it on to the cleanup stack as CEikDialog::PrepareLC
-    // does this favour for us.
-    
-    TBool exiting = EFalse;
-    
-    TInt result = destDlg->ConstructAndRunLD( 
-                                        iCmManagerImpl, 0, selected, exiting );
-        
-    return ( exiting ) ? KDialogUserExit: KDialogUserBack;
-    }    
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::SelectDestinationDlgL
-//-----------------------------------------------------------------------------
-//
-TBool CCmSettingsUiImpl::SelectDestinationDlgL( TUint32& aDestinationId )
-    {
-    CSelectDestinationDlg* dlg = CSelectDestinationDlg::NewL( aDestinationId,
-                                                              *iCmManagerImpl );
-                                                              
-    return dlg->ExecuteLD( R_CMMANAGER_LIST_QUERY_WITH_MSGBOX );    
-    }
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::AddCmL
-//-----------------------------------------------------------------------------
-//
-TUint32 CCmSettingsUiImpl::AddCmL( TUint32& aDestUid, TUint32 aBearerType )
-    {
-    // Add new connection method
-    TUint32 addedIapId(0);
-
-    CCmDestinationImpl* destImpl = iCmManagerImpl->DestinationL( aDestUid );
-    CleanupStack::PushL(destImpl);
-    
-    // Check first if parent destination is protected
-    if ( destImpl->ProtectionLevel() == CMManager::EProtLevel1 )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        }
-    else
-        {
-        // Automatically check for available conn methods?
-    
-        TBool manualConfigure = ETrue;    
-        if (aBearerType == KUidWlanBearerType)
-            {
-            TInt retval =
-                    TCmCommonUi::ShowConfirmationQueryL( R_CMWIZARD_AUTOMATIC_CHECK );
-    
-            manualConfigure = ( retval == EAknSoftkeyYes || retval == EAknSoftkeyOk )
-                                      ?  EFalse : ETrue;
-            }
-            
-        CCmPluginBase* plugin = destImpl->CreateConnectionMethodL( aBearerType );
-        CleanupStack::PushL( plugin );
-       
-        // Bearer-specific UI-supported initialization is done by plug-ins
-        if ( plugin->InitializeWithUiL( manualConfigure ) )
-            {
-            destImpl->UpdateL();  // commit changes
-
-            RArray<TUint32> additionalCms;
-            CleanupClosePushL (additionalCms);
-            plugin->GetAdditionalUids( additionalCms );
-            //if there are additional cms created, move them to the target destination as well
-            for ( TInt i = 0; i<additionalCms.Count(); i++)
-                {
-                CCmPluginBase* cm = iCmManagerImpl->GetConnectionMethodL( additionalCms[i] );
-                CleanupStack::PushL(cm);
-                iCmManagerImpl->CopyConnectionMethodL( *destImpl, *cm );
-                CleanupStack::PopAndDestroy( cm );
-                }
-            CleanupStack::PopAndDestroy( &additionalCms );   
-            addedIapId = plugin->GetIntAttributeL( CMManager::ECmIapId );
-            }
-        CleanupStack::PopAndDestroy(plugin);
-        }    
-    CleanupStack::PopAndDestroy(destImpl);
-    
-    return addedIapId;
-    }
-
-//-----------------------------------------------------------------------------
-//  CCmSettingsUiImpl::EditCmL
-//-----------------------------------------------------------------------------
-//
-TInt CCmSettingsUiImpl::EditCmL( TUint32 aCmId )
-    {
-    // Edit connection method  
-    TInt ret( KDialogUserBack );
-    
-    CCmPluginBase* cm = iCmManagerImpl->GetConnectionMethodL( aCmId );
-    CleanupStack::PushL( cm );
-    
-    cm->ReLoadL();
-    if ( cm->GetBoolAttributeL( CMManager::ECmProtected ) ||
-         cm->GetBoolAttributeL( CMManager::ECmDestination ) )
-        {
-        TCmCommonUi::ShowNoteL( R_CMMANAGERUI_INFO_PROTECTED_CANNOT_EDIT,
-                                            TCmCommonUi::ECmErrorNote );
-        }
-   else if ( cm->GetBoolAttributeL( CMManager::ECmBearerHasUi ) )
-        {
-        // check if the cm is in use
-        if ( cm->GetBoolAttributeL( CMManager::ECmConnected ) )
-            {
-            TCmCommonUi::ShowNoteL( R_QTN_SET_NOTE_AP_IN_USE_EDIT,
-                                    TCmCommonUi::ECmErrorNote );
-            }
-        else
-            {
-            //Makes sure that the commsdat notifier is initialized.           
-            cm->CmMgr().StartCommsDatNotifierL();
-            ret = cm->RunSettingsL();
-            }
-        }
-    CleanupStack::PopAndDestroy(cm);
-    return ret;
-    }
-
--- a/cmmanager/cmmgr/Framework/Src/cmtransactionhandler.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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:  Common transaction handler of framework and plugins.
-*
-*/
-
-#include <e32std.h>
-#include <e32base.h>
-
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include "cmtransactionhandler.h"
-
-using namespace CommsDat;
-
-const TUint32 KMaxOpenTransAttempts = 10;
-const TUint32 KRetryAfter = 100000;
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CCmTransactionHandler* CCmTransactionHandler::NewL( CMDBSession& aDb )
-    {
-    CCmTransactionHandler* self = new (ELeave) CCmTransactionHandler( aDb );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );   // self
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::CCmTransactionHandler
-// ---------------------------------------------------------------------------
-//
-CCmTransactionHandler::CCmTransactionHandler( CMDBSession& aDb )
-    : iDb( aDb )
-    {
-    CLOG_CREATE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CCmTransactionHandler::ConstructL()
-    {
-    TRAPD( err, CCmManagerImpl::HasCapabilityL( ECapabilityNetworkControl ) );
-    
-    if( !err )
-        {
-        iProtectionFlag = ECDProtectedWrite;
-        }
-    else
-        {
-        iProtectionFlag = 0;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::~CCmTransactionHandler
-// ---------------------------------------------------------------------------
-//
-CCmTransactionHandler::~CCmTransactionHandler()
-    {
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::OpenTransactionLC
-// ---------------------------------------------------------------------------
-//
-void CCmTransactionHandler::OpenTransactionLC( TBool aSetAttribs )
-    {
-    LOGGER_ENTERFN( "CCmTransactionHandler::OpenTransactionL" );
-
-    ++iRefCount;
-    CLOG_WRITE_1( "Refs: [%d]", iRefCount );
-
-    // To call ::Close() on leave
-    CleanupClosePushL( *this );
-
-    // We don't have parent destination -> Session is opened only once        
-    if( !iDb.IsInTransaction() )
-        {
-        TInt err( KErrNone );
-        TUint32 attempts( KMaxOpenTransAttempts );
-        
-        do
-            {
-            CLOG_WRITE( "Opening" );
-            TRAP( err, iDb.OpenTransactionL() );
-            CLOG_WRITE_1( "Error: [%d]", err );
-            
-            if( err )
-                {
-                User::After( KRetryAfter );
-                }
-            }while( err && attempts-- );
-
-        User::LeaveIfError( err );
-        
-        if( aSetAttribs )
-            {
-            iDb.SetAttributeMask( ECDHidden | iProtectionFlag );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::CommitTransactionL
-// ---------------------------------------------------------------------------
-//
-void CCmTransactionHandler::CommitTransactionL( TInt aError )
-    {
-    LOGGER_ENTERFN( "CCmTransactionHandler::CommitTransactionL" );
-    
-    --iRefCount;
-    CLOG_WRITE_1( "ref: [%d]", iRefCount );
-    CLOG_WRITE_1( "Error: [%d]", aError );
-
-    CleanupStack::Pop( this );
-
-    if( !iRefCount )
-        {
-        if( aError )
-            {
-            iDb.RollbackTransactionL();
-            }
-        else
-            {
-            iDb.CommitTransactionL();
-            }
-
-        iDb.ClearAttributeMask( ECDHidden | ECDProtectedWrite );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmTransactionHandler::Close
-// ---------------------------------------------------------------------------
-//
-void CCmTransactionHandler::Close()
-    {
-    LOGGER_ENTERFN( "CCmTransactionHandler::Close" );
-    
-    if( 0 == iRefCount )
-        {
-        CLOG_WRITE( "No active transaction. Do nothing" );
-        return;
-        }
-
-    if( !iDb.IsInTransaction() )
-        // Sometimes CommsDat closes the transaction 
-        // on its own decision w/o any notification or reaseon.
-        // e.g. when you try to delete a non-existing record.
-        // It leaves with KErrNotFound, but rolls back the transaction.
-        {
-        CLOG_WRITE( "CommsDat already rolled back transaction. :(((" );
-        iRefCount = 0;
-        }
-    else
-        {
-        --iRefCount;
-        CLOG_WRITE_1( "ref: [%d]", iRefCount );
-
-        if( !iRefCount )
-            {
-            iDb.ClearAttributeMask( ECDHidden | ECDProtectedWrite );
-            
-            if( iDb.IsInTransaction() )
-                {
-                TRAP_IGNORE( iDb.RollbackTransactionL() );
-                }
-            }
-        }
-    }
--- a/cmmanager/cmmgr/Framework/Src/cmwizard.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,494 +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:  Wizard used for adding connection methods
-*
-*/
-
-#include <AknWaitDialog.h>
-#include <cmmanager.rsg>
-#include <StringLoader.h>
-#include <avkon.hrh>
-#include "cmwizard.h"
-#include <cmcommonconstants.h>
-#include <cmcommonui.h>
-#include "cmdestinationimpl.h"
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include "selectdestinationdlg.h"
-
-using namespace CMManager;
-
-// ---------------------------------------------------------------------------
-// CCmWizard::CCmWizard
-// ---------------------------------------------------------------------------
-//
-CCmWizard::CCmWizard( CCmManagerImpl& aCmManager ) 
-    : iCmManager( aCmManager )
-    {
-    CLOG_CREATE;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmWizard::~CCmWizard
-// ---------------------------------------------------------------------------
-//
-CCmWizard::~CCmWizard()
-    {
-    if( iCheckConnDlg )
-        {
-        delete iCheckConnDlg;
-        }
-    CLOG_CLOSE;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmWizard::CreateConnectionMethodL
-// ---------------------------------------------------------------------------
-//
-TInt CCmWizard::CreateConnectionMethodL
-                                    ( CCmDestinationImpl* aTargetDestination )
-    {
-    TInt index( KErrCancel );
-    
-    LOGGER_ENTERFN( "CCmWizard::CreateConnectionMethodL" );
-    TBool wizardCancelled = EFalse; // indicates if the wizard has got cancelled
-    TUint32 bearerType = 0;
-    TBool manuallyConfigure ( EFalse );
-    
-    if ( AutoCheckForCmsL() )
-        {
-        RArray<TUint32> availableBearers( KCmArrayMediumGranularity );
-        CleanupClosePushL( availableBearers );
-
-        CLOG_WRITE( "CCmWizard::Starting CheckForCms" );
-        CheckForCmsL( availableBearers );
-
-        // If user has cancelled the dialog, then (s)he wanted to terminate
-        // the whole procedure.
-        if ( iCheckConnDlgCancelled )
-            {
-            CLOG_WRITE( "CCmWizard::wizardCancelled" );
-            wizardCancelled = ETrue;
-            }
-        else
-            {
-            // If there's coverage for at least one of the bearer types
-            if ( availableBearers.Count() )
-                {
-                CLOG_WRITE_1( "CCmWizard::CreateConnectionMethodL av. bearers: [%d]",
-                               availableBearers.Count() );
-                // Show available conn methods in a list from which user has to
-                // select.
-                bearerType = TCmCommonUi::ShowAvailableMethodsL
-                                                ( availableBearers,
-                                                  iCmManager );
-                if ( !bearerType )
-                    {
-                    wizardCancelled = ETrue;
-                    CLOG_WRITE( "CCmWizard::wizardCancelled" );
-                    }
-                }
-            else    // no coverage at all
-                {
-                CLOG_WRITE( "CCmWizard::CreateConnectionMethodL no available bearers, manual selection." );
-                // "Do you want to configure conn methods manually?"
-                if ( ManualCheckForCmsL() )
-                    {
-                    // Yes, select a bearer manually
-                    bearerType = TCmCommonUi::SelectBearerL( iCmManager );
-                    if ( !bearerType )
-                        {
-                        // Cancelled dialog
-                        wizardCancelled = ETrue;
-                        }
-                    else
-                        {
-                        manuallyConfigure = ETrue;
-                        }
-                    }
-                else
-                    {
-                    // No, user has cancelled the dialog
-                    wizardCancelled = ETrue;
-                    }
-                }
-            }
-
-        CleanupStack::PopAndDestroy( &availableBearers );
-        }
-    else    // "No" for checking conn methods automatically
-        {
-        CLOG_WRITE( "CCmWizard::AutoCheckForCmsL returned FALSE" );
-        // Manual bearer selection
-        bearerType = TCmCommonUi::SelectBearerL( iCmManager );
-        if ( !bearerType )
-            {
-            // Cancelled dialog
-            wizardCancelled = ETrue;
-            }
-        else
-            {
-            manuallyConfigure = ETrue;
-            }
-        }
-
-    if ( !wizardCancelled )
-        {
-        CCmPluginBase* plugin = iCmManager.CreateConnectionMethodL(
-                                            bearerType, aTargetDestination );
-        CleanupStack::PushL( plugin );
-
-        CLOG_WRITE( "CCmWizard::CreateConnectionMethodL plugin created, starting initialization" );
-
-        // Bearer-specific UI-supported initialization is done by plug-ins
-	    TBool ret = EFalse;
-	    TRAPD(err, ret = plugin->InitializeWithUiL( manuallyConfigure ) );
-        if ( err == KErrNone && ret )
-            {
-            CCmDestinationImpl* targetDest = aTargetDestination;
-            // If target destination is not yet specified...
-            if ( !aTargetDestination )
-                {
-                // For virtual bearers: eliminated the underlying destination 
-                // from the destination selection dialog
-                TUint32 targetDestId( 0 );
-                
-                RArray<TUint32> destArray( iCmManager.DestinationCountL() );
-                CleanupClosePushL( destArray );
-                iCmManager.AllDestinationsL( destArray );
-                // now do the filtering
-                plugin->FilterPossibleParentsL( destArray );
-                
-                if ( !destArray.Count() )
-                    {
-                    // there are no destinations to put the CM into
-                    TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_VPN_STACKING,
-                                            TCmCommonUi::ECmErrorNote );
-        
-                    CleanupStack::PopAndDestroy( &destArray );
-                    CleanupStack::PopAndDestroy( plugin );
-        
-                    CLOG_WRITE_1( "CCmWizard::CreateConnectionMethodL no valid parents after filtering, index: [%d]", index );
-                    return index;
-                    }
-                    
-                // ... then let the user select a destination.
-                CSelectDestinationDlg* dlg = CSelectDestinationDlg::NewL( targetDestId,
-                                                                          iCmManager,
-                                                                          &destArray );
-                dlg->ExecuteLD( R_CMMANAGER_LIST_QUERY_WITH_MSGBOX );
-        
-                CleanupStack::PopAndDestroy( &destArray );
-        
-                if ( targetDestId )
-                    {
-                    // CREATE an object based on an ID.
-                    targetDest = iCmManager.DestinationL( targetDestId );
-                    CleanupStack::PushL( targetDest );
-                    }
-                }
-
-            CLOG_WRITE_1( "CCmWizard::CreateConnectionMethodL target dest: [0x%x]",
-                           targetDest );
-    
-            // If the target destination is still unspecified at this point,
-            // then the only reason could be that the previous dialog was
-            // cancelled ==> do something only if we have the target 
-            // destination
-            if ( targetDest )
-                {
-                plugin->UpdateL();  // commit changes
-    
-                index = iCmManager.CopyConnectionMethodL( *targetDest,
-                                                                    *plugin );
-
-                RArray<TUint32> additionalCms;
-                CleanupClosePushL (additionalCms);
-                plugin->GetAdditionalUids( additionalCms );
-                if ( additionalCms.Count() )
-                    {//if there are additional cms created, move them to the target destination as well
-                    for ( TInt i = 0; i<additionalCms.Count(); i++)
-                        {
-                        CCmPluginBase* cm = iCmManager.GetConnectionMethodL( additionalCms[i] );
-                        CleanupStack::PushL(cm);
-                        iCmManager.CopyConnectionMethodL( *targetDest,
-                                                                    *cm );
-                        CleanupStack::PopAndDestroy( cm );
-                        }
-                    }
-                CleanupStack::PopAndDestroy( &additionalCms );
-
-                HBufC* destName = targetDest->NameLC();
-    
-                CleanupStack::PopAndDestroy( destName );
-    
-                // Here's a tricky one: if 'aTargetDestination' was NULL, then
-                // I had to create 'targetDest' myself (with
-                // iCmManager.DestinationL), consequently I have to
-                // free it up, too.
-                if ( !aTargetDestination )
-                    {
-                    CleanupStack::PopAndDestroy( targetDest );
-                    }
-                }
-            else // Wi-Fi may have set IAP in database. So, delete it.
-                {
-                CLOG_WRITE( "CCmWizard::CreateConnectionMethodL, handling cancel add destination -- start" );                                   
-                RArray<TUint32> additionalCms;
-                CleanupClosePushL (additionalCms);
-    
-                plugin->GetAdditionalUids( additionalCms );
-                CLOG_WRITE_1( "CCmWizard::CreateConnectionMethodL, addtionalCms count [%d]", additionalCms.Count() );
-                for ( TInt i = 0; i<additionalCms.Count(); i++)
-                    {
-                    CCmPluginBase* cm = iCmManager.GetConnectionMethodL( additionalCms[i] );
-                    CleanupStack::PushL(cm);
-                    cm->DeleteL( ETrue );
-                    CleanupStack::PopAndDestroy( cm );
-                    }
-                // If plugin hasn't got Iap Id, it's "normal" CM which has not been saved
-                // into CommsDat yet. Otherwise it's Wifi CM and has to be deleted by using
-                // DeleteL() method. 
-                if( plugin->GetIntAttributeL( ECmIapId ) )
-                    {
-                    plugin->DeleteL( ETrue );
-                    }
-    
-                CleanupStack::PopAndDestroy( &additionalCms );
-                CLOG_WRITE( "CCmWizard::CreateConnectionMethodL, handling cancel add destination -- end" );
-                }
-    		    }
-        CleanupStack::PopAndDestroy( plugin );
-        }
-       
-    return index;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmWizard::DialogDismissedL
-// ---------------------------------------------------------------------------
-//
-void CCmWizard::DialogDismissedL( TInt aButtonId )
-    {
-    LOGGER_ENTERFN( "CCmWizard::DialogDismissedL" );
-
-    CLOG_WRITE_1( "CCmWizard::DialogDismissedL, aButtonId: [%d]", aButtonId );
-    if ( aButtonId == EAknSoftkeyCancel )
-        {
-        if ( iCheckConnDlg != NULL )
-            {
-            CLOG_WRITE( "CCmWizard::CheckConnDlg is not NULL" );
-            iCheckConnDlgCancelled = ETrue;
-            }
-        }
-    
-    if ( iWait.IsStarted() )
-        {
-        iWait.AsyncStop();
-        }
-    iCheckConnDlg = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmWizard::AutoCheckForCmsL
-// ---------------------------------------------------------------------------
-//
-TBool CCmWizard::AutoCheckForCmsL() const
-    {
-    LOGGER_ENTERFN( "CCmWizard::AutoCheckForCmsL" );
-    // Automatically check for available conn methods?
-    TInt retval =
-            TCmCommonUi::ShowConfirmationQueryL( R_CMWIZARD_AUTOMATIC_CHECK );
-
-    return ( retval == EAknSoftkeyYes || retval == EAknSoftkeyOk )
-            ? ETrue : EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmWizard::ManualCheckForCmsL
-// ---------------------------------------------------------------------------
-//
-TBool CCmWizard::ManualCheckForCmsL() const
-    {
-    LOGGER_ENTERFN( "CCmWizard::ManualCheckForCmsL" );
-    // Manually configure CMs?
-    TInt retval =
-            TCmCommonUi::ShowConfirmationQueryL(    
-                                             R_CMWIZARD_MANUAL_CONFIGURATION );
-
-    return ( retval == EAknSoftkeyYes || retval == EAknSoftkeyOk )
-            ? ETrue : EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmWizard::CheckForCmsL
-// ---------------------------------------------------------------------------
-//
-void CCmWizard::CheckForCmsL( RArray<TUint32>& aCoverageArray )
-    {
-    LOGGER_ENTERFN( "CCmWizard::CheckForCmsL" );
-    // Show a wait dialog
-    iCheckConnDlgCancelled = FALSE;
-    iCheckConnDlg = new (ELeave) CAknWaitDialog(
-                          ( REINTERPRET_CAST( CEikDialog**, &iCheckConnDlg )) );
-    
-    iCheckConnDlg->SetCallback( this );
-    
-    iCheckConnDlg->SetTone( CAknNoteDialog::EConfirmationTone );
-
-    HBufC* text = StringLoader::LoadLC( R_CMWIZARD_CHECKING_METHODS );
-    iCheckConnDlg->SetTextL( *text );
-    CleanupStack::PopAndDestroy( text );
-
-    iCheckConnDlg->ExecuteLD( R_CMMANAGER_WAIT_NOTE );
-
-    RArray<TUint32> bearers( KCmArrayMediumGranularity );
-    CleanupClosePushL( bearers );
-
-    iCmManager.SupportedBearersL( bearers );
-
-    for ( TInt i = 0; i < bearers.Count() && !iCheckConnDlgCancelled; i++ )
-        {
-        TBool avail( EFalse );
-        
-        TRAPD( err, avail = iCmManager.GetBearerInfoBoolL( bearers[i], ECmCoverage ) );
-
-        CLOG_WRITE_2( "CCmWizard::CheckForCms, bearer [%d] coverage error [%d]", i, err );
-        
-        if( err )
-            {
-            continue;
-            }
-            
-
-        if ( avail &&
-             iCmManager.GetBearerInfoBoolL( bearers[i], ECmAddToAvailableList ) )
-            {
-            aCoverageArray.AppendL( bearers[i] );
-            CLOG_WRITE_1( "CCmWizard::CheckForCms, bearer [%d] appended", i );
-            }
-        }
-
-    CleanupStack::PopAndDestroy( &bearers );
-
-    // Dismiss wait dialog
-    if( !iCheckConnDlgCancelled )
-        {
-        CLOG_WRITE( "CCmWizard::CheckForCms, cancelling wait dlg" );
-        iCheckConnDlg->ProcessFinishedL();
-        
-        // Wait here in case wait note has not yet been dismissed.
-        // This happens in hw when Themes/effects is enabled.
-        if ( iCheckConnDlg != NULL )
-            {
-            iWait.Start();
-            }
-        CLOG_WRITE( "CCmWizard::CheckForCms, wait dialog deleted" );
-        }
-    else
-        {
-        CLOG_WRITE( "CCmWizard::CheckForCms, wait dlg was already cancelled" );
-        }
-
-    // Set the member to NULL every case
-    iCheckConnDlg = NULL;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CCmWizard::FindTargetDestinationL
-// ---------------------------------------------------------------------------
-//
-TUint32 CCmWizard::FindTargetDestinationL( CCmPluginBase* aPlugin )
-    {
-    LOGGER_ENTERFN( "CCmWizard::FindTargetDestinationL" );
-
-    // Tries to read the destination id
-    TUint32 targetDestId (0); 
-    TRAPD( err, targetDestId = 
-                aPlugin->GetIntAttributeL( ECmNextLayerSNAPId ) );
-                
-    // only supported by virtual bearers, don't leave        
-    if ( err && err != KErrNotSupported )
-       {
-       User::Leave( err );
-       }
-                
-    // targetDestId == 0 means that not destination but a connection 
-    // method have been selected
-    if ( targetDestId == 0 )
-        {
-        // Now the destination containing the connection method 
-        // should be obtained
-        TUint32 targetCmId (0); 
-        TRAPD( err, targetCmId = 
-                    aPlugin->GetIntAttributeL( ECmNextLayerIapId ) );
-        
-        // only supported by virtual bearers, don't leave        
-        if ( err && err != KErrNotSupported )
-            {
-            User::Leave( err );
-            }
-            
-        targetDestId = FindParentDestinationL( targetCmId );   
-        }
-        
-    return targetDestId;    
-    }
- 
-// ---------------------------------------------------------------------------
-// CCmWizard::FindParentDestinationL
-// ---------------------------------------------------------------------------
-//
-TUint32 CCmWizard::FindParentDestinationL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmWizard::FindParentDestinationL" );
-
-    TBool found = EFalse;
-    TUint32 targetDestId (0); 
-    
-    RArray<TUint32> destinations;
-   
-    iCmManager.AllDestinationsL( destinations );
-    CleanupClosePushL( destinations );
-    
-    RArray<TUint32> cms;
-    
-    for ( TInt i = 0; i < destinations.Count() && !found; i++ )
-        {            
-        CCmDestinationImpl* dest = 
-                          iCmManager.DestinationL( destinations[i] );
-        CleanupStack::PushL( dest );
-        dest->ConnectMethodIdArrayL( cms );
-        CleanupClosePushL( cms );
-
-        for ( TInt j = 0; j < cms.Count() && !found; j++ )
-            {
-            if( cms[j] == aCmId)
-                {
-                targetDestId = destinations[i];
-                found = ETrue;
-                }
-            }
-        CleanupStack::PopAndDestroy( &cms );
-        CleanupStack::PopAndDestroy( dest );
-        }
-
-    CleanupStack::PopAndDestroy( &destinations );
-
-    return targetDestId;    
-    }
--- a/cmmanager/cmmgr/Framework/Src/destdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1700 +0,0 @@
-/*
-* Copyright (c) 2006-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:  Dialog for setting the gateway. It's used temporarily.
-*
-*/
-
-#include <avkon.hrh>
-#include <eikdef.h>
-#include <eikenv.h>
-#include <eikedwin.h>
-#include <gulicon.h>
-#include <cmmanager.rsg>
-#include <data_caging_path_literals.hrh>
-#include <cmmanager.mbg> 
-#include <badesca.h>        // CDesCArray
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <eikmenup.h>
-#include <StringLoader.h>
-#include <AknIconArray.h>
-#include <aknnavilabel.h>
-#include <textresolver.h>
-
-#include <hlplch.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include <cmcommonconstants.h>
-#include <cmdestination.h>
-#include <cmcommonui.h>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-
-#include "cmmanager.hrh"
-#include "destlistitem.h"
-#include "destlistitemlist.h"
-#include "destdlg.h"
-#include "cmwizard.h"
-#include "uncatdlg.h"
-#include "cmdlg.h"    
-#include "cmdesticondialog.h"
-#include "cmlistboxmodel.h"
-#include "cmlistitem.h"
-#include <mcmdexec.h>
-#include "ccmdexec.h"
-#include "cmlogger.h"
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// ---------------------------------------------------------------------------
-// CDestDlg::ConstructAndRunLD
-// Constructs the dialog and runs it.
-// ---------------------------------------------------------------------------
-//
-TInt CDestDlg::ConstructAndRunLD( CCmManagerImpl* aCmManagerImpl,  
-                                  TUint32 aHighlight,
-                                  TUint32& aSelected,
-                                  TBool& aExiting )
-    {
-    iHighlight = aHighlight;
-    iSelected = &aSelected;
-    iCmManagerImpl = aCmManagerImpl;
-    iExiting = &aExiting;
-    *iExiting = EFalse;
-    
-    iCmdExec = new (ELeave) CCmdExec(*this);
-
-    ConstructL( R_DEST_MENUBAR );
-    PrepareLC( R_DEST_DIALOG );    
-    iModel = new( ELeave )CDestListboxModel();
-    iConnSettingsImpl = CCmConnSettingsUiImpl::NewL( iCmManagerImpl );
-
-    // CommsDat notifier should be started with this first UI view for
-    // it will create active object
-    iCmManagerImpl->StartCommsDatNotifierL();
-    iCmManagerImpl->WatcherRegisterL( this );
-    
-    return RunLD();
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestDlg::CDestDlg()
-// ---------------------------------------------------------------------------
-//
-CDestDlg::CDestDlg() 
-    : iModelPassed( EFalse )
-    , iExitReason( KDialogUserExit )
-    , iEscapeArrived( EFalse )
-    {
-    CLOG_CREATE;
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestDlg::~CApSelectorDialog
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDestDlg::~CDestDlg()
-    {
-    // iModel is deleted by the ListBox because LB owns the model...
-    // of course only after we passed ownership...
-    if ( !iModelPassed )
-        {
-        delete iModel;
-        }
-    if ( iNaviDecorator )
-        {
-        delete iNaviDecorator;
-        }
-    if ( iTitlePane )
-        {
-        // set old text back, if we have it and if we are going back to
-        // Connectivity Settings view
-        if ( iOldTitleText )
-            {
-            if ( iExitReason == KDialogUserBack )
-                {
-                TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
-                }
-            delete iOldTitleText;
-            }
-        }
-    if ( iConnSettingsImpl )
-        {
-        delete iConnSettingsImpl;            
-        }
-
-    if( iCmWizard )
-        {
-        delete iCmWizard;
-        }
-    
-    delete iCmdExec;
-    
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestDlg::PreLayoutDynInitL();
-// called by framework before dialog is shown
-// ---------------------------------------------------------------------------
-//
-void CDestDlg::PreLayoutDynInitL()
-    {
-    iListbox =
-        STATIC_CAST( CDestListbox*, Control( KDestListboxId ) );
-    iListbox->CreateScrollBarFrameL( ETrue );
-    iListbox->ScrollBarFrame()->SetScrollBarVisibilityL
-        ( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-    iListbox->SetListBoxObserver( this );
-
-    iListbox->Model()->SetItemTextArray( iModel );
-    iModelPassed = ETrue;
-    InitTextsL();    
-    HandleListboxDataChangeL();
-    iListbox->HandleItemAdditionL();
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::DynInitMenuPaneL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::DynInitMenuPaneL( TInt aResourceId,
-                                        CEikMenuPane* aMenuPane )
-    {
-    switch ( aResourceId )
-        {
-        case R_DEST_MENU:
-            {            
-            // Check if it is the 'New connection' list item 
-            // rather than a real destination
-            TUint32 listItemUid = iListbox->CurrentItemUid();
-           if ( listItemUid == KDestItemNewConnection ) 
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestEdit, ETrue );
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestRename, ETrue );                
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestDelete, ETrue );                
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestChangeIcon, ETrue );   
-                } 
-            if ( !iCmManagerImpl->IsDefConnSupported() )
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestDefaultConnection, ETrue );
-                }
-        	if (!iCmManagerImpl->IsHelpOn())
-                {
-                aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-                }
-            break;
-            }
-        default:
-            break;
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CDestDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                       TEventCode aType )    
-    {
-    LOGGER_ENTERFN( "CDestDlg::OfferKeyEventL" );
-    CLOG_WRITE_1("Key iCode: %d", aKeyEvent.iCode );
-    
-    TKeyResponse retVal ( EKeyWasNotConsumed );
-    
-    TBool down( EFalse );
-    
-    switch ( aKeyEvent.iCode )
-        {
-        case EKeyEscape:
-            {
-            // Handling application close needs special care 
-            // because of iCmWizard 
-            if ( iCmWizard )
-                {
-                // if wizard alives then escape should do after wizard has ended.
-                CLOG_WRITE( "CDestDlg::OfferKeyEventL: Wizard in long process" );
-                iEscapeArrived = ETrue;
-                retVal = EKeyWasConsumed;
-                }
-            else    
-               {
-                CLOG_WRITE( "CDestDlg::OfferKeyEventL:Escape" );
-                retVal = CAknDialog::OfferKeyEventL( aKeyEvent, aType );
-               }
-            break;
-            }
-        case EKeyBackspace:
-            {
-            ProcessCommandL( ECmManagerUiCmdDestDelete );
-            retVal = EKeyWasConsumed;
-            break;
-            }
-        case EKeyDownArrow:
-            {
-            down = ETrue;
-            // intended flow-through
-            }
-        case EKeyUpArrow:
-            {
-            // When moving from the 'New connection' (first) item, MSK should be 'Open'
-            if ( iListbox->CurrentItemUid() == KDestItemNewConnection )
-                {
-                SetMskL( R_QTN_MSK_OPEN );
-                }                    
-            
-            // When moving to the 'New connection' (first item)
-            else if ( ( iListbox->CurrentItemIndex() == 1 && !down ) || 
-                      ( iListbox->CurrentItemIndex() + 1 == 
-                        iModel->MdcaCount() && down ) )
-                {
-                SetMskL( R_QTN_MSK_SELECT );
-                }    
-            // flow through to 'default' intended
-            }
-        default:
-            {
-            retVal = iListbox->OfferKeyEventL(aKeyEvent, aType);
-            break;
-            }
-        }
-    return retVal;
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::ShowDefaultSetNoteL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::ShowDefaultSetNoteL( TCmDefConnValue aSelection )
-    {
-    switch ( aSelection.iType )
-        {
-        case ECmDefConnDestination:
-        case ECmDefConnConnectionMethod:
-            {
-            HBufC* connName =  iConnSettingsImpl->CreateDefaultConnectionNameL( aSelection );
-            CleanupStack::PushL(connName);
-            TCmCommonUi::ShowNoteL( R_CMMANAGERUI_DEFAULT_CONNECTION_SET_TO,
-                                                *connName,
-                                                TCmCommonUi::ECmOkNote );
-            CleanupStack::PopAndDestroy( connName );
-            }
-        }
-    }
-
-
-// ----------------------------------------------------------------------------
-// CDestDlg::SetDefaultNaviL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::SetDefaultNaviL( TCmDefConnValue aSelection )    
-    {
-    HBufC* title = NULL;
-    
-    switch ( aSelection.iType )
-        {
-        case ECmDefConnDestination:
-        case ECmDefConnConnectionMethod:
-            {
-            HBufC* connName =  iConnSettingsImpl->CreateDefaultConnectionNameL( aSelection );
-            CleanupStack::PushL(connName);
-            title = StringLoader::LoadL( R_CMMANAGERUI_NAVI_DEFAULT, *connName );
-            CleanupStack::PopAndDestroy( connName );
-            CleanupStack::PushL( title );
-            break;
-            }
-        }    
-    
-    if ( iNaviDecorator )
-        {
-        if ( iNaviDecorator->ControlType() == 
-             CAknNavigationDecorator::ENaviLabel )
-            {
-            CAknNaviLabel* naviLabel = 
-                (CAknNaviLabel*)iNaviDecorator->DecoratedControl();
-            if ( title )
-                {
-                naviLabel->SetTextL(*title);
-                }
-            else
-                {
-                naviLabel->SetTextL( KNullDesC );
-                }
-            
-            iNaviPane->PushL( *iNaviDecorator );
-            }
-        }
-        
-    if ( title )
-        {
-        CleanupStack::PopAndDestroy( title );
-        }
-    }
-    
-// ----------------------------------------------------------------------------
-// CDestDlg::ProcessCommandL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::ProcessCommandL( TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CDestDlg::ProcessCommandL" );
-    CLOG_WRITE_1("Command: %d", aCommandId );
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        case ECmManagerUiCmdDestUserExit:
-            {
-            CLOG_WRITE( "CDestDlg::ProcessCommandL command: exit");
-            iExitReason = KDialogUserExit;
-            iCmManagerImpl->WatcherUnRegister();
-            TryExitL( iExitReason );
-            break;            
-            }
-        case EAknSoftkeyBack:
-            {
-            iExitReason = KDialogUserBack;
-            iCmManagerImpl->WatcherUnRegister();
-            TryExitL( iExitReason );
-            break;
-            }
-        case ECmManagerUiCmdDestEdit:
-            {
-            OnCommandDestinationEditL();
-            break;
-            }            
-        case ECmManagerUiCmdDestDefaultConnection:
-            {
-            TCmDCSettingSelection selection;
-            TCmDefConnValue defConnValue;
-            iCmManagerImpl->ReadDefConnL( defConnValue );
-            switch (defConnValue.iType)
-                {
-                case ECmDefConnConnectionMethod:
-                    {
-                    selection.iResult = EDCConnectionMethod;
-                    selection.iId = defConnValue.iId;
-                    break;
-                    }
-                case ECmDefConnDestination:
-                    {
-                    selection.iResult = EDCDestination;
-                    selection.iId = defConnValue.iId;
-                    break;
-                    }
-                default:
-                    {
-                    break;
-                    }
-                }
-            if ( iConnSettingsImpl->RunDefaultConnecitonRBPageL( selection ) )
-                {
-                defConnValue = selection.ConvertToDefConn();                
-                
-                iCmManagerImpl->WriteDefConnL( defConnValue );
-                HandleListboxDataChangeL();
-                }
-            break;
-            }
-            
-        case ECmManagerUiCmdDestChangeIcon:
-            {
-            // Check if this is UnCat
-            if ( iListbox->CurrentItemUid() == KDestItemUncategorized )
-                {
-                TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                        TCmCommonUi::ECmErrorNote );
-                break;
-                }
-
-            // Check that destination is not protected
-            CCmDestinationImpl* dest =
-                       iCmManagerImpl->DestinationL( iListbox->CurrentItemUid() );
-            CleanupStack::PushL( dest );
-            if ( dest->ProtectionLevel() )
-                {
-                TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                        TCmCommonUi::ECmErrorNote );
-
-                CleanupStack::PopAndDestroy( dest );
-                break;
-                }
-
-            TInt iconSelected = 0;
-            CCmDestinationIconDialog* popup = 
-                          new (ELeave) CCmDestinationIconDialog( iconSelected );  
-            if ( popup->ExecuteLD() )
-                {
-                dest->SetIconL( iconSelected ); // subclass implements
-                dest->UpdateL();
-                CleanupStack::PopAndDestroy( dest ); 
-                
-                HandleListboxDataChangeL();
-                break;
-                }
-
-            CleanupStack::PopAndDestroy( dest );
-
-            break;
-            
-            }
-
-            
-       case ECmManagerUiCmdDestAdd:
-            {
-            AddDestinationL();
-            break;           
-            }
-            
-        case EAknSoftkeyClear:
-        case ECmManagerUiCmdDestDelete:            
-            {
-            OnCommandDestinationDeleteL();
-            break;
-            
-            }            
-            
-        case ECmManagerUiCmdDestRename:
-            {
-            OnCommandDestinationRenameL();
-            break;
-            }
-
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                                    iEikonEnv->EikAppUi()->AppHelpContextL() );
-            }
-            break;
-        
-        default:
-            {
-            break;
-            }
-        }
-    } 
-    
-// ---------------------------------------------------------------------------
-// CDestDlg::InitTextsL
-// called before the dialog is shown
-// to initialize localized textual data
-// ---------------------------------------------------------------------------
-//
-void CDestDlg::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    if ( iEikonEnv )
-        {
-        iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-        iTitlePane =
-            ( CAknTitlePane* )iStatusPane->ControlL(
-                                TUid::Uid( EEikStatusPaneUidTitle ) );
-
-        iOldTitleText = iTitlePane->Text()->AllocL();
-        iTitlePane->SetTextL( 
-                        *(StringLoader::LoadLC( R_CMMANAGERUI_NAVI )) );
-
-        CleanupStack::PopAndDestroy(); // resource R_CMMANAGERUI_NAVI
-        iNaviPane = ( CAknNavigationControlContainer* ) 
-                        iStatusPane->ControlL( 
-                                TUid::Uid( EEikStatusPaneUidNavi ) );
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-        iNaviPane->PushL( *iNaviDecorator );
-        if ( iCmManagerImpl->IsDefConnSupported() )
-            {
-            TCmDefConnValue selection;
-            selection.iType = ECmDefConnAlwaysAsk;
-            iCmManagerImpl->ReadDefConnL( selection );
-            SetDefaultNaviL( selection );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CDestDlg::SetNoOfDestsL
-// ---------------------------------------------------------------------------
-//
-void CDestDlg::SetNoOfDestsL( TInt aCount )
-    {
-    HBufC* title = NULL;
-    
-    if ( aCount == 1 )
-        {
-        title = StringLoader::LoadLC( R_QTN_NETW_CONSET_NAVI_ONE_DESTINATION );
-        }
-    else
-        {
-        title = StringLoader::LoadLC( R_QTN_NETW_CONSET_NAVI_NOF_DESTINATIONS,
-                                         aCount );
-        }
-    if (iNaviDecorator)
-        {
-        if ( iNaviDecorator->ControlType() == 
-             CAknNavigationDecorator::ENaviLabel )
-            {
-            CAknNaviLabel* naviLabel = 
-                            (CAknNaviLabel*)iNaviDecorator->DecoratedControl();
-            naviLabel->SetTextL(*title);
-            iNaviPane->PushL( *iNaviDecorator );
-            }
-        }
-        
-      CleanupStack::PopAndDestroy( title );
-    }
-
-// ---------------------------------------------------------------------------
-// CDestDlg::CreateCustomControlL
-// ---------------------------------------------------------------------------
-//
-SEikControlInfo CDestDlg::CreateCustomControlL
-( TInt aControlType )
-    {
-    SEikControlInfo controlInfo;
-    controlInfo.iTrailerTextId = 0;
-    controlInfo.iFlags = 0;
-    if ( aControlType == KDestListboxType )
-        {
-        controlInfo.iControl = new ( ELeave ) CDestListbox;
-        }
-    else
-        {
-        controlInfo.iControl = NULL;
-        }
-    return controlInfo;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestDlg::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// ---------------------------------------------------------------------------
-//
-TBool CDestDlg::OkToExitL( TInt aButtonId )
-    {
-    CLOG_WRITE_1( "CDestDlg::OkToExitL buttonId: %d", aButtonId );
-    
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case EAknSoftkeySelect:
-        case ECmManagerUiCmdCmAdd:
-            {
-            if ( !iProcessing )
-                {
-                iProcessing = ETrue;
-                ProcessCommandL( ECmManagerUiCmdDestEdit );
-                iProcessing = EFalse;
-                }
-            break;
-            }
-        case EAknSoftkeyBack:
-            {
-            if (!iProcessing)
-                {
-                *iExiting = EFalse;
-                iExitReason = KDialogUserBack;
-                retval = ETrue;                
-                }
-            break;
-            }
-        case EAknSoftkeyOptions:
-            {
-            if ( !iProcessing )
-                {
-                DisplayMenuL();
-                }
-            break;
-            }
-        default:
-            {
-
-            CLOG_WRITE_1( "CDestDlg::OkToExitL: High level stop %d", aButtonId );
-
-            *iExiting = ETrue;
-            retval = ETrue;
-            break;
-            }
-        }
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestDlg::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-void CDestDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                    TListBoxEvent aEventType )
-    {
-    LOGGER_ENTERFN( "CDestDlg::HandleListBoxEventL" );
-
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemSingleClicked:
-            {
-            if ( !iProcessing )
-                {
-                iCmdExec->Execute();
-                }
-            break;
-            }
-        case EEventEditingStarted:
-            {
-            break;
-            }
-        case EEventEditingStopped:
-            {
-            break;
-            }
-        default:
-            {
-            break;
-            };
-        };
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::HandleListboxDataChangeL
-// called before the dialog is shown to initialize listbox data
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::HandleListboxDataChangeL()
-    {
-    LOGGER_ENTERFN( "CDestDlg::HandleListboxDataChangeL" );
-
-    iCmManagerImpl->OpenTransactionLC();
-    
-    iModel->ResetAndDestroy();
-    RArray<TUint32> destIdArray = RArray<TUint32>( KCmArrayBigGranularity );
-
-    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity );
-    CleanupStack::PushL( icons );
-
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-    
-    iCmManagerImpl->AllDestinationsL(destIdArray);
-    
-    // Append the destinations to the list
-    CleanupClosePushL( destIdArray ); // 1
-    
-   TCmDefConnValue defConnSel;
-   defConnSel.iType = ECmDefConnAlwaysAsk;//default value
-   if ( iCmManagerImpl->IsDefConnSupported() )
-       {
-        //refresh default connection in navi pane
-        iCmManagerImpl->ReadDefConnL(defConnSel);
-        SetDefaultNaviL( defConnSel );                                        
-       }
-   else        
-        {
-        SetNoOfDestsL( destIdArray.Count() );
-        }
-    ///!!!TEMP, no icon for add connection yet
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                                     &KDC_APP_BITMAP_DIR, 
-                                     NULL ) );
-
-    CGulIcon* icon = AknsUtils::CreateGulIconL( //second, KDestReservedIconIndexProtected 
-                        skinInstance, 
-                        KAknsIIDQgnPropSetConnDestAdd,
-                        mbmFile.FullName(), 
-                        EMbmCmmanagerQgn_prop_set_conn_dest_add, 
-                        EMbmCmmanagerQgn_prop_set_conn_dest_add_mask ); 
-    CleanupStack::PushL( icon );
-    icons->AppendL( icon );
-    CleanupStack::Pop( icon );
-    
-   icon = AknsUtils::CreateGulIconL( //second, KDestReservedIconIndexProtected 
-                        skinInstance, 
-                        KAknsIIDQgnIndiSettProtectedAdd,
-                        mbmFile.FullName(), 
-                        EMbmCmmanagerQgn_indi_sett_protected_add, 
-                        EMbmCmmanagerQgn_indi_sett_protected_add_mask );
-   
-
-// Previous must me changed to following if any problems with theme colours
-/*    AknsUtils::CreateColorIconLC( skinInstance,
-                                  KAknsIIDQgnIndiSettProtectedAdd,
-                                  KAknsIIDQsnIconColors,
-                                  EAknsCIQsnIconColorsCG13,
-                                  bitmap,
-                                  mask,
-                                  mbmFile.FullName(),
-                                  EMbmCmmanagerQgn_indi_sett_protected_add,
-                                  EMbmCmmanagerQgn_indi_sett_protected_add_mask,
-                                  AKN_LAF_COLOR( 215 ) );
-
-    icon = CGulIcon::NewL( bitmap, mask ); // Ownership transferred
-    CleanupStack::Pop( 2 ); // bitmap, mask*/
-                        
-    CleanupStack::PushL( icon );
-    icons->AppendL( icon );
-    CleanupStack::Pop( icon );
-    
-    //third, uncategorized KDestReservedIconIndexUncategorized
-    icons->AppendL( iCmManagerImpl->UncategorizedIconL() );
-    
-    //0..3 are reserved indexes!
-    CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask = NULL;
-    
-    AknsUtils::CreateColorIconLC( skinInstance,
-                                  KAknsIIDQgnIndiDefaultConnAdd,
-                                  KAknsIIDQsnIconColors,
-                                  EAknsCIQsnIconColorsCG13,
-                                  bitmap,
-                                  mask,
-                                  mbmFile.FullName(),
-                                  EMbmCmmanagerQgn_indi_default_conn_add,
-                                  EMbmCmmanagerQgn_indi_default_conn_add_mask,
-                                  AKN_LAF_COLOR( 215 ) );
-
-    icon = CGulIcon::NewL( bitmap, mask ); // Ownership transferred
-    CleanupStack::Pop( 2 ); // bitmap, mask
-
-    CleanupStack::PushL( icon );
-    icons->AppendL( icon );
-    CleanupStack::Pop( icon );
-       
-    // Add the New Connection Item
-    HBufC* newConnection = StringLoader::LoadLC( 
-                                    R_CMMANAGERUI_NEW_CONNECTION ); // 2
-        
-    CDestListItem* newConnItem = 
-                    CDestListItem::NewLC( 
-                            KDestItemNewConnection,
-                            newConnection,
-                            0,
-                            KDestReservedIconIndexNewConn, EProtLevel0, EFalse  ); // 3
-    iModel->AppendL( newConnItem ); // ownership relinquished
-    CleanupStack::Pop( newConnItem );
-    CleanupStack::Pop( newConnection );
-    
-    TTime destTime;
-
-//refresh default connection icon in list - no effect if feature flag is off (defConnSel
-// is ECmDefConnAlwaysAsk)
-    TInt defUid = KErrNotFound;
-    if ( defConnSel.iType == ECmDefConnDestination )
-        {
-        defUid = defConnSel.iId;
-        }
-
-    
-    for (TInt i = 0; i < destIdArray.Count(); i++)
-        {
-        // Get the destinations from their IDs
-        CCmDestinationImpl* dest = NULL;
-        
-        
-        TRAPD( err, dest = iCmManagerImpl->DestinationL( destIdArray[i] ) );
-        if( err )
-            {
-            continue;
-            }
-        CleanupStack::PushL( dest ); 
-
-        // Check whether the MMS SNAP is in question. 
-        // It should not be shown on the UI in the destinations list
-        TInt snapMetadata = 0;
-        TRAPD(metaErr, snapMetadata = dest->MetadataL( CMManager::ESnapMetadataPurpose ));
-        if ( metaErr == KErrNone && snapMetadata == CMManager::ESnapPurposeMMS )
-            {
-            // This is the MMS SNAP, skip this item
-            if( dest )
-                {
-                CleanupStack::PopAndDestroy( dest );
-                dest = NULL;
-                }  
-            continue;
-            }
-
-        // Also hidden destinations are shown (TSW id ERUN-79KFAK)
-        icons->AppendL( dest->IconL() );            
-        HBufC* name =  dest->NameLC(); // 3
-        TBool def = EFalse;
-        if ( defUid == dest->Id() ) //this is the default destination, indicate it!
-            {
-            def = ETrue;
-            }
-        
-        // The connection methods bound to this destination may have to be checked with
-        // validity. Some connection methods might be invalid.
-        TInt numOfCms = dest->ConnectionMethodCount();
-        if (numOfCms > 0)
-            {
-            RArray<TUint32> cmIds;
-            dest->ConnectMethodIdArrayL( cmIds );
-            CleanupClosePushL( cmIds );
-
-            for ( TInt j = 0; j < cmIds.Count(); j++ )
-                {
-                TUint recId = cmIds[j];
-
-                TRAP( err, TUint32 bearerType = iCmManagerImpl->BearerTypeFromCmIdL( recId ) );
-                if( err == KErrNotSupported )
-                    {
-                    CLOG_WRITE_1( "CDestDlg::HandleListboxDataChangeL, IAP(%d) unsupported", recId );
-                    numOfCms = numOfCms -1;
-                    }
-                }
-
-            CleanupStack::PopAndDestroy( &cmIds );
-            }
-        
-        CDestListItem* item = CDestListItem::NewLC( 
-                                    dest->Id(),
-                                    name,
-                                    numOfCms,
-                                    icons->Count()-1, dest->ProtectionLevel(), def ); // 4
-        iModel->AppendL( item );        // ownership passed
-        CleanupStack::Pop( item );
-        CleanupStack::Pop( name );
-        if( dest )
-            {
-            CleanupStack::PopAndDestroy( dest );
-            dest = NULL;
-            }    
-        }
-        
-    // Add the Uncategorised Item
-    RArray<TUint32> uncatArray(KCmArraySmallGranularity);
-    CleanupClosePushL(uncatArray);
-    
-    iCmManagerImpl->ConnectionMethodL( uncatArray, ETrue );
-    TUint32 numberOfCMs = NumberOfCMsL( uncatArray );
-    if ( numberOfCMs )
-        {
-        icon = AknsUtils::CreateGulIconL(
-                        skinInstance, 
-                        KAknsIIDQgnPropSetConnDestUncategorized,
-                        mbmFile.FullName(), 
-                        EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized, 
-                        EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized_mask ); 
-        CleanupStack::PushL( icon );
-        icons->AppendL( icon );
-        CleanupStack::Pop( icon );
-
-        HBufC* uncat = StringLoader::LoadLC( 
-                                    R_CMMANAGERUI_DEST_UNCATEGORIZED ); // 2
-        
-        // Check the hidden connection methods
-        for ( TInt k = 0; k < uncatArray.Count(); k++ )
-            {
-            TUint recId = uncatArray[k];
-            if ( iCmManagerImpl->GetConnectionMethodInfoBoolL( recId, ECmHidden ) )
-                {
-                numberOfCMs = numberOfCMs -1;
-                }
-            }
-        
-        CDestListItem* uncatItem = 
-                        CDestListItem::NewLC( 
-                                KDestItemUncategorized,
-                                uncat,
-                                numberOfCMs,
-                                icons->Count()-1, EProtLevel0, EFalse ); // 3
-        iModel->AppendL( uncatItem ); // ownership relinquished
-        CleanupStack::Pop( uncatItem );
-        CleanupStack::Pop( uncat );
-        }
-
-    CleanupStack::PopAndDestroy( 2, &destIdArray ); // destIdArray
-        
-    CArrayPtr<CGulIcon>* oldIcons = 
-                            iListbox->ItemDrawer()->ColumnData()->IconArray();
-    if( oldIcons )
-        {
-        oldIcons->ResetAndDestroy();
-        delete oldIcons;
-        }
-    
-    iListbox->ItemDrawer()->ColumnData()->SetIconArray( icons );
-    iListbox->HandleItemAdditionL();
-    iListbox->UpdateScrollBarsL();
-
-    if ( !iListbox->CurrentItemUid() && !numberOfCMs )
-        {
-        // selection is out of range (e.g. Uncategorized deleted)
-        iListbox->SetCurrentItemIndexAndDraw( 0 );
-        }
-
-    CleanupStack::Pop( icons );
-    
-    iCmManagerImpl->RollbackTransaction();   
-    }
-    
-// ----------------------------------------------------------------------------
-// CDestDlg::NumberOfCMsL
-// ----------------------------------------------------------------------------
-//
-TUint32 CDestDlg::NumberOfCMsL(RArray<TUint32> cmArray)
-    {
-    LOGGER_ENTERFN( "CDestDlg::NumberOfCMsL" );
-
-    TUint32 cmCount = cmArray.Count();
-    TUint32 retValue = cmArray.Count();
-    CCDIAPRecord* iapRecord = NULL;
-    for ( TInt i = 0; i < cmCount; i++ )
-        {
-        if ( cmArray[i] <= 255 )// not embedded destination 
-            {
-            iapRecord = static_cast<CCDIAPRecord *>
-                          (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-            CleanupStack::PushL( iapRecord );
-            
-            iapRecord->SetRecordId( cmArray[i] );
-            iapRecord->LoadL( iCmManagerImpl->Session() );
-            
-            TRAPD( err, iCmManagerImpl->BearerTypeFromIapRecordL( iapRecord ) );
-            
-            if( err == KErrNotSupported )
-                // This is unsupported connection method -> don't display
-                {
-                retValue--;
-                }
-            else
-                {
-                User::LeaveIfError( err );
-                }
-            CleanupStack::PopAndDestroy( iapRecord );
-            }
-        }
-    return retValue;
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::AddDestinationL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::AddDestinationL()
-    {
-    LOGGER_ENTERFN( "CDestDlg::AddDestinationL" );
-
-    TBuf<KDestinationNameMaxLength> destName;    
-    
-    TBool okToAdd = EFalse;
-    TBool nameAccepted = ETrue;
-    do 
-        {
-        okToAdd = TCmCommonUi::ShowConfirmationQueryWithInputL(
-                                           R_CMMANAGERUI_PRMPT_DESTINATION_NAME,
-                                           destName );
-        if ( okToAdd )
-            {
-            CCmDestinationImpl* dest = NULL;
-            
-            TRAPD(err, dest = iCmManagerImpl->CreateDestinationL( destName ) );
-            if ( err == KErrAlreadyExists )
-                {
-                nameAccepted = EFalse;
-                TCmCommonUi::ShowNoteL
-                    ( R_CMMANAGERUI_INFO_DEST_ALREADY_IN_USE,
-                    destName,
-                    TCmCommonUi::ECmErrorNote );                        
-                }
-            else if ( err == KErrDiskFull )
-                {
-                CTextResolver* iTextResolver = CTextResolver::NewLC(*iCoeEnv); 
-                okToAdd = EFalse;
-                TPtrC buf;
-                buf.Set(iTextResolver->ResolveErrorString(err)); 
-                TCmCommonUi::ShowNoteL( buf, TCmCommonUi::ECmErrorNote );
-                CleanupStack::PopAndDestroy( iTextResolver );
-                }
-            else if ( err == KErrNone )
-                {
-                CleanupStack::PushL( dest );
-                nameAccepted = ETrue;
-                TInt index = 0;
-                TInt iconSelected = 0;
-                CCmDestinationIconDialog* popup = 
-                      new (ELeave) CCmDestinationIconDialog( iconSelected );  
-                
-                // Show the icon dialogs
-                if ( popup->ExecuteLD() )
-                    {
-                    index = iconSelected;
-                    
-                    dest->SetIconL( index ); // subclass implements
-                    //dest->UpdateL();
-                    TRAPD( err, dest->UpdateL() );
-                    if( err )
-                        {
-                        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-                        }
-                    else
-                        {
-                        TRAP( err, HandleListboxDataChangeL() );
-                        if ( err )
-                            {
-                            TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                    TCmCommonUi::ECmErrorNote );
-                            }
-                        }
-                    
-                    CDestListboxModel* lbmodel = 
-                              STATIC_CAST( CDestListboxModel*,
-                                           iListbox->Model()->ItemTextArray() );
-                    CDestListItem* lbitem = 
-                                        lbmodel->At( lbmodel->MdcaCount() - 1 );
-
-                    //returns null if item is not present                                        
-                    if ( lbitem->Uid() == KDestItemUncategorized  )
-                        {
-                        //last item is uncategorized
-                        iListbox->ScrollToMakeItemVisible( 
-                                                    lbmodel->MdcaCount() - 2 );
-                        //last item is uncategorized
-                        iListbox->SetCurrentItemIndexAndDraw( 
-                                                    lbmodel->MdcaCount() - 2 );
-                        }
-                     else
-                        {
-                        iListbox->ScrollToMakeItemVisible( 
-                                                    lbmodel->MdcaCount() - 1 );
-                        iListbox->SetCurrentItemIndexAndDraw( 
-                                                    lbmodel->MdcaCount() - 1 );
-                        }                    
-
-                    iListbox->HandleItemAdditionL();
-               
-                    // Sets the mittle soft key text to "Open"                        
-                    SetMskL( R_QTN_MSK_OPEN );
-                                            
-                    }
-                if(dest)
-                    {
-                    CleanupStack::PopAndDestroy( dest );
-                    dest = NULL;
-                    }    
-                }
-            }
-        } while ( !nameAccepted && okToAdd );
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::OnCommandDestinationEdit
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::OnCommandDestinationEditL()
-    {
-    LOGGER_ENTERFN( "CDestDlg::OnCommandDestinationEditL" );
-
-    // Check if memory full
-    TBool ret ( EFalse );
-    ret = iCmManagerImpl->IsMemoryLow();
-    if( ret )
-        {
-        CLOG_WRITE( "CDestDlg::OnCommandDestinationEditL: Memory Full, return!" );
-        return;
-        }
-
-    if ( iListbox->CurrentItemUid() == KDestItemNewConnection )
-        {
-        // If there's at least one uprotected destination available
-        if ( iCmManagerImpl->DestinationCountL() )
-            {
-            if ( iCmManagerImpl->HasUnprotectedDestinationsL() )
-                {
-                // Opens a Connection method creation wizard
-                CLOG_WRITE( "CDestDlg::OnCommandDestinationEditL iCmWizard constructing" );
-                iCmWizard = new (ELeave) CCmWizard( *iCmManagerImpl );
-                TInt ret( KErrNone );
-                TRAPD( err, ret = iCmWizard->CreateConnectionMethodL() );
-                if ( err == KErrDiskFull )
-                    {
-                    CTextResolver* iTextResolver = CTextResolver::NewLC(*iCoeEnv); 
-                    ret = KErrCancel;
-                    TPtrC buf;
-                    buf.Set(iTextResolver->ResolveErrorString(err)); 
-                    TCmCommonUi::ShowNoteL( buf, TCmCommonUi::ECmErrorNote );
-                    CleanupStack::PopAndDestroy( iTextResolver );
-                    }
-                else if ( err )
-                    {
-                    TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                            TCmCommonUi::ECmErrorNote );
-                    ret = KErrCancel;
-                    }
-                delete iCmWizard;
-                iCmWizard = NULL;
-                CLOG_WRITE_1( "CDestDlg::iCmWizard ret %d", ret );
-
-                // If application wanted to be closed before then RunAppShutter()
-                // should be called here                
-                if( iEscapeArrived )
-                    {
-                    CLOG_WRITE_1( "CDestDlg::iEscapeArrived %d", iEscapeArrived );
-                    ( ( CAknAppUi* )iEikonEnv->EikAppUi() )->RunAppShutter();
-                    }
-                else
-                    {
-                    if( ret != KErrCancel )
-                        {
-                        TRAP( err, HandleListboxDataChangeL() );
-                        if ( err )
-                            {
-                            TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                    TCmCommonUi::ECmErrorNote );
-                            return;
-                            }
-                        }
-                    }
-
-                }
-            else
-                {
-                // Show a warning here
-                TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_UNPROTECTED_DESTINATION,
-                                        TCmCommonUi::ECmWarningNote );
-                }
-            }
-        else
-            {
-            // ... otherwise show a warning.
-            TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_DESTINATION,
-                                    TCmCommonUi::ECmWarningNote );
-            }
-        }
-    else
-        {
-        if ( iListbox->CurrentItemUid() == KDestItemUncategorized )                
-            {
-            CUncatDlg* uncatDlg = CUncatDlg::NewL( iCmManagerImpl );
-
-            TUint32 selected = 0;
-            if ( uncatDlg->ConstructAndRunLD( 0, selected ) == 
-                 KDialogUserExit)
-                {
-                TryExitL(ETrue);
-                }
-            else
-                {
-                HandleListboxDataChangeL();                
-                }
-            }
-        else
-            {
-            CCmDlg* cmDlg = CCmDlg::NewL( iCmManagerImpl , 
-                iListbox->CurrentItemUid(), this );
-
-            TUint32 selected = 0;
-            if ( cmDlg->ConstructAndRunLD( 0, selected ) == 
-                 KDialogUserExit )
-                {
-                TryExitL(ETrue);
-                }
-            else
-                {
-                HandleListboxDataChangeL();                
-                }
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::OnCommandDestinationDelete
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::OnCommandDestinationDeleteL()
-    {
-    LOGGER_ENTERFN( "CDestDlg::OnCommandDestinationDeleteL" );
-
-    TCmDefConnValue oldConn;
-    if (iCmManagerImpl->IsDefConnSupported())
-        {    
-        iCmManagerImpl->ReadDefConnL( oldConn );
-        }
-    TUint32 listItemUid = iListbox->CurrentItemUid();
-    
-    if ( listItemUid == KDestItemNewConnection )
-        {
-        // ignore this command - it's not a destination
-        return;
-        }            
-    
-    if ( listItemUid == KDestItemUncategorized )
-        {
-        // Cannot delete Uncategoried Destination
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-                                
-        return;
-        }
-
-    TBool carryOn( ETrue );
-    // Cannot delete if the destination is embedded somewhere                                
-    CCmDestinationImpl* dest = 
-         iCmManagerImpl->DestinationL( iListbox->CurrentItemUid() );
-    CleanupStack::PushL( dest );
-    // We need this trap only because this function is called from a trap
-    TRAPD( err, dest->CheckIfEmbeddedL( dest->Id() ) );
-    if ( err == KErrNotSupported )
-        {
-        CleanupStack::PopAndDestroy( dest );
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-    else if ( err )
-        {
-        CleanupStack::PopAndDestroy( dest );
-        User::Leave(err);
-        }
-    
-    // Show an error message to the user
-    if ( dest->ProtectionLevel() )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        carryOn = EFalse;
-        }
-        
-    if( carryOn )
-        {
-        if( dest->IsConnectedL() )
-            {
-            TCmCommonUi::ShowNoteL( 
-                       R_CMMANAGERUI_INFO_DEST_IN_USE_CANNOT_DELETE,
-                       TCmCommonUi::ECmErrorNote );
-            carryOn = EFalse;
-            }
-        }
-    
-    // check if it is linked by anybody
-    
-    if ( carryOn )
-        {
-        // for each IAP in CM manager
-        //   1. check if it is virtual
-        //      if not => goto 1.
-        //      if yes:
-        //      2. check if it links to the destination to be deleted
-        //         if yes => carryOn = EFalse, ERROR
-        //         if not:
-        //         3. check if it links to any of the CMs in this destination
-        //            if not => goto 1.
-        //            if yes:
-        //            4. check if it is also in this destination
-        //               if not => carryOn = EFalse, ERROR
-        //               if yes => goto 1.
-        // As we need different notes in different cases:
-        TUint32 noteresId = R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED;
-        CommsDat::CMDBRecordSet<CommsDat::CCDIAPRecord>* iaps = 
-                                                    iCmManagerImpl->AllIapsL();
-        
-        CleanupStack::PushL( iaps );
-        
-        // for each IAP in CM manager
-        for ( TInt i = 0; carryOn && i < iaps->iRecords.Count(); ++i )
-            {
-            CommsDat::CCDIAPRecord* rec = (*iaps)[i];
-            TUint32 bearerType = 0;
-            
-            TRAP_IGNORE( bearerType = 
-                             iCmManagerImpl->BearerTypeFromIapRecordL( rec ) );
-            if ( !bearerType )
-                {
-                continue;
-                }
-                
-            // check if it is virtual
-            if ( iCmManagerImpl->GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                // check if it links to the destination to be deleted
-                CCmPluginBase* plugin = NULL;            
-                TRAP_IGNORE( plugin = iCmManagerImpl->GetConnectionMethodL( 
-                                                           rec->RecordId() ) );
-
-                if ( !plugin )
-                    {
-                    continue;
-                    }
-                
-                CleanupStack::PushL( plugin );
-
-                if ( plugin->IsLinkedToSnap( dest->Id() ) )
-                    {
-                    // the CM links to this destination, deletion not allowed
-                    carryOn = EFalse;
-                    noteresId = R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED;
-                    }
-                else
-                    {
-                    
-                    // check if the CM links to any of the CMs in this destination
-                    for ( TInt j = 0; j < dest->ConnectionMethodCount(); ++j )
-                        {
-                        CCmPluginBase* destPlugin = NULL;
-                        
-                        TRAP_IGNORE( destPlugin = dest->GetConnectionMethodL( j ) );
-                        if ( !destPlugin )
-                            {
-                            continue;
-                            }
-                        
-                        if ( destPlugin->GetIntAttributeL( ECmId ) == 
-                                                               rec->RecordId() )
-                            {
-                            // the CM shouldn't be compared to itself
-                            continue;
-                            }
-                            
-                        if ( plugin->IsLinkedToIap( 
-                                    destPlugin->GetIntAttributeL( ECmId ) ) )
-                            {
-                            // the CM links to at least one CM in this destination
-                            carryOn = EFalse; 
-                            noteresId = R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF;
-                            break;
-                            }
-                        }
-
-                    }
-
-                CleanupStack::PopAndDestroy( plugin );                    
-                }
-                
-                    
-            }
-            
-        CleanupStack::PopAndDestroy( iaps );
-
-        if ( !carryOn )
-            {
-            TCmCommonUi::ShowNoteL(
-                       noteresId,
-                       TCmCommonUi::ECmErrorNote );
-            }
-        }
-    
-        
-    // check if it has protected method
-    if( carryOn )
-        {
-        if( IsThereProtectedMethodL( dest ) )
-            {
-            TCmCommonUi::ShowNoteL( 
-                       R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_DEST_PROT_CM,
-                       TCmCommonUi::ECmErrorNote );
-            carryOn = EFalse;
-            }
-        }
-        
-    if( carryOn )
-        {
-        HBufC* destName = dest->NameLC(); // 2
-        if ( TCmCommonUi::ShowConfirmationQueryL(
-                              R_CMMANAGERUI_QUEST_DEST_DELETE, *destName ) )
-            {
-            CleanupStack::PopAndDestroy( destName );   
-            TRAPD( err, dest->DeleteLD() );
-            switch ( err )
-                {
-                case KErrInUse:
-                    {
-                    TCmCommonUi::ShowNoteL( 
-                               R_CMMANAGERUI_INFO_DEST_IN_USE_CANNOT_DELETE,
-                               TCmCommonUi::ECmErrorNote );
-                    }
-                    break;
-
-                case KErrLocked:
-                    {
-                    TCmCommonUi::ShowNoteL
-                        ( R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                          TCmCommonUi::ECmErrorNote );
-                    }
-                    break;
-                    
-                case KErrNone:
-                    {
-                    if (iCmManagerImpl->IsDefConnSupported())
-                        {         
-                        ShowDefaultConnectionNoteL(oldConn);
-                        } 
-                    CleanupStack::Pop( dest ); 
-                    dest = NULL;  
-                    
-                    TInt selected = iListbox->CurrentItemIndex();
-
-                    HandleListboxDataChangeL();
-
-                    if ( iListbox->Model()->NumberOfItems() )
-                        {
-                        if( selected == iListbox->Model()->NumberOfItems() )
-                            {
-                            --selected;
-                            }
-
-                        //first item cannot be deleted
-                        iListbox->ScrollToMakeItemVisible( selected);
-                        iListbox->SetCurrentItemIndexAndDraw( selected );                            
-                        }
-                    }
-                    break;
-                    
-                default:
-                    {
-                    }
-                }                          
-            }
-        else
-            {
-            CleanupStack::PopAndDestroy( destName );   
-            }                          
-        }
-
-    if( dest )
-        {
-        CleanupStack::PopAndDestroy( dest );
-        }
-
-    }
-
-   
-// ----------------------------------------------------------------------------
-// CDestDlg::OnCommandDestinationRenameL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::OnCommandDestinationRenameL()
-    {
-    LOGGER_ENTERFN( "CDestDlg::OnCommandDestinationRenameL" );
-
-    // Check if this is UnCat
-    if ( iListbox->CurrentItemUid() == KDestItemUncategorized )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-        return;
-        }
-    
-    // Get currently selected destination.
-    CCmDestinationImpl* dest =
-          iCmManagerImpl->DestinationL( iListbox->CurrentItemUid() );
-    CleanupStack::PushL( dest );
-
-    // Show an error message to the user
-    if ( dest->ProtectionLevel() )
-        {
-        TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                TCmCommonUi::ECmErrorNote );
-
-        CleanupStack::PopAndDestroy( dest );
-        return;
-        }
-
-    // Allocate max length for the buffer, since we don't know how long
-    // the new name will be. Copy the actual name of the destination
-    // into the buffer.
-    TBuf< KDestinationNameMaxLength > destName;
-    destName.Copy( *( dest->NameLC() ) );
-    
-    TBool okToRename = EFalse;
-    TBool nameAccepted = ETrue;
-    do 
-        {
-        okToRename = TCmCommonUi::ShowConfirmationQueryWithInputL(
-                                           R_CMMANAGERUI_PRMPT_DESTINATION_NAME,
-                                           destName );
-        if ( okToRename )
-            {
-            TRAPD(err, dest->SetNameL( destName ));
-            if ( err == KErrAlreadyExists )
-                {
-                nameAccepted = EFalse;
-                TCmCommonUi::ShowNoteL( R_CMMANAGERUI_INFO_DEST_ALREADY_IN_USE,
-                                        destName,
-                                        TCmCommonUi::ECmErrorNote );                        
-                }
-             else if ( err == KErrNone )
-                {
-                nameAccepted = ETrue;
-                dest->UpdateL();
-                HandleListboxDataChangeL();
-                }
-            }
-        } while ( !nameAccepted && okToRename );
-
-    // dest->NameLC()
-    CleanupStack::PopAndDestroy( );
-    CleanupStack::PopAndDestroy( dest );
-    }
-
-// ----------------------------------------------------------------------------
-// CDestDlg::IsThereProtectedMethodL
-// ----------------------------------------------------------------------------
-//
-TBool CDestDlg::IsThereProtectedMethodL( CCmDestinationImpl* aDest )
-    {
-    LOGGER_ENTERFN( "CDestDlg::IsThereProtectedMethodL" );
-
-    TInt count( aDest->ConnectionMethodCount() );
-
-    for( TInt i = 0; i < count; ++i )
-        {
-        CCmPluginBase* cm = aDest->GetConnectionMethodL( i );
-        
-        if( cm->GetBoolAttributeL( ECmProtected ) )
-            {
-            return ETrue;
-            }
-        }
-        
-    return EFalse;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CDestDlg::SetMskL
-// ----------------------------------------------------------------------------
-//
-void CDestDlg::SetMskL( TInt aResourceId )
-    {
-    HBufC* text = StringLoader::LoadLC( aResourceId );
-    ButtonGroupContainer().SetCommandL( EAknSoftkeySelect, *text );
-    ButtonGroupContainer().DrawDeferred();
-    CleanupStack::PopAndDestroy( text );
-                
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-void CDestDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_CONN_DEST_VIEW;
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::Execute
-// --------------------------------------------------------------------------
-//
-void CDestDlg::Execute()
-    {
-    LOGGER_ENTERFN( "CDestDlg::Execute" );
-    iProcessing = ETrue;
-    
-    TRAPD( err, ProcessCommandL(ECmManagerUiCmdDestEdit) );
-    if ( err )
-        {
-        HandleLeaveError( err );
-        }
-
-    iProcessing = EFalse;
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::HandleResourceChange
-// --------------------------------------------------------------------------
-//
-
-void CDestDlg::HandleResourceChange( TInt aType )
-    {
-    CCoeControl::HandleResourceChange( aType ); 
-
-    if( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        DrawNow(); 
-        }
-        
-    CAknDialog::HandleResourceChange(aType);        
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::HandleLeaveError
-// --------------------------------------------------------------------------
-//
-void CDestDlg::HandleLeaveError( TInt aError )
-    {
-    LOGGER_ENTERFN( "CDestDlg::HandleLeaveError" );
-
-    switch( aError )
-        {
-            case KLeaveWithoutAlert:
-            case KErrNoMemory:
-                EnforcedResetCDestDlg();
-                break;
-            default:
-                // More leave errors may be handled if necessary
-                // Now other leave errors are ignored here
-                break;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::EnforcedResetCDestDlg
-// --------------------------------------------------------------------------
-//
-void CDestDlg::EnforcedResetCDestDlg()
-    {
-    LOGGER_ENTERFN( "CDestDlg::EnforcedResetCDestDlg" );
-
-    if( iCmWizard != NULL )
-        {
-        delete iCmWizard;
-        iCmWizard = NULL;
-        }
-
-    if( iProcessing )
-        {
-        iProcessing = EFalse;
-        }
-}
-
-// --------------------------------------------------------------------------
-// CDestDlg::ShowDefaultConnectionNoteL
-// --------------------------------------------------------------------------
-//
-void CDestDlg::ShowDefaultConnectionNoteL(TCmDefConnValue aOldDefConn)
-    {
-    LOGGER_ENTERFN( "CDestDlg::ShowDefaultConnectionNoteL" );
-    TCmDefConnValue newConn;
-        
-    iCmManagerImpl->ReadDefConnL( newConn );
-
-    if ( newConn != aOldDefConn )
-        {
-        ShowDefaultSetNoteL( newConn );
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CDestDlg::CommsDatChanges
-// --------------------------------------------------------------------------
-//
-void CDestDlg::CommsDatChangesL()
-    {
-    // Update list box
-    HandleListboxDataChangeL();
-    }
--- a/cmmanager/cmmgr/Framework/Src/destlistbox.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +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:  Implementation of CDestListbox
-*
-*/
-
-#include <eikclbd.h>
-#include <avkon.mbg>
-#include <aknkeys.h>
-#include <data_caging_path_literals.hrh>
-#include <cmmanager.mbg> 
-
-#include "destlistbox.h"
-#include "destlistboxmodel.h"
-#include "destlistitem.h"
-
-// ---------------------------------------------------------------------------
-// CDestListbox::NewL
-// ---------------------------------------------------------------------------
-//
-CDestListbox* CDestListbox::NewL( const CCoeControl* aParent )
-    {
-    CDestListbox* listbox = new ( ELeave ) CDestListbox();
-    CleanupStack::PushL( listbox );
-    listbox->ConstructL( aParent, EAknListBoxSelectionList );
-    CleanupStack::Pop( listbox );
-    return listbox;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::CDestListbox
-// ---------------------------------------------------------------------------
-//
-CDestListbox::CDestListbox()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::~CDestListbox
-// ---------------------------------------------------------------------------
-//
-CDestListbox::~CDestListbox()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CDestListbox::OfferKeyEventL
-( const TKeyEvent& aKeyEvent, TEventCode aType )
-    {
-    if ( aKeyEvent.iCode == EKeyOK &&
-         !( aKeyEvent.iModifiers & EModifierShift ) )
-        {
-        // Enter pressed (not Shift-Enter). This will report an
-        // EEnterKeyPressed event sent to the observer (the view), which may
-        // delete this listbox. The code which processes keypresses by
-        // default, will continue (on the already deleted listbox), and
-        // will crash. So we grab this keypress here, and generate the
-        // same event, but after that, quit immediately!
-        ReportListBoxEventL( MEikListBoxObserver::EEventEnterKeyPressed );
-        // By now the listbox may have been deleted!
-        // Do not access it after this point!
-        return EKeyWasConsumed;
-        }
-    else
-        {
-        return CAknDoubleLargeStyleListBox::OfferKeyEventL( aKeyEvent, aType );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::FocusChanged
-// ---------------------------------------------------------------------------
-//
-void CDestListbox::FocusChanged( TDrawNow aDrawNow )
-    {
-    // Do nothing until the listbox is fully constructed
-    // The dialogpage sets the focus before calling ConstructL
-    if ( iView )
-        {
-        CAknDoubleLargeStyleListBox::FocusChanged( aDrawNow );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::Uid4Item
-// ---------------------------------------------------------------------------
-//
-TUint32 CDestListbox::Uid4Item( TInt aItem ) const
-    {
-    CDestListboxModel* lbmodel =
-        STATIC_CAST( CDestListboxModel*, Model()->ItemTextArray() );
-    return lbmodel->At( aItem )->Uid();
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::CurrentItemUid
-// ---------------------------------------------------------------------------
-//
-TUint32 CDestListbox::CurrentItemUid() const
-    {
-    CDestListboxModel* lbmodel =
-        STATIC_CAST( CDestListboxModel*, Model()->ItemTextArray() );
-    TInt idx = CurrentItemIndex();
-    TUint32 retval( 0 );
-    if ( idx >= 0 )
-        {
-        retval = lbmodel->At( idx )->Uid();
-        }
-    return retval;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::CurrentItemNameL
-// ---------------------------------------------------------------------------
-//
-const TDesC& CDestListbox::CurrentItemNameL()
-    {
-    CDestListboxModel* lbmodel = new( ELeave )CDestListboxModel;
-    lbmodel = STATIC_CAST( CDestListboxModel*, Model()->ItemTextArray() );
-    return lbmodel->At( CurrentItemIndex() )->Name();
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListbox::HandleResourceChange
-// ---------------------------------------------------------------------------
-//
-void CDestListbox::HandleResourceChange(TInt aType)
-    {
-    if ( aType == KAknsMessageSkinChange )
-        {
-        SizeChanged();
-        }
-        
-    CAknDoubleLargeStyleListBox::HandleResourceChange( aType );     
-    }
-
--- a/cmmanager/cmmgr/Framework/Src/destlistboxmodel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +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:  Implementation of CDestListboxModel
-*
-*/
-
-#include <AknIconArray.h>
-#include <aknlists.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-
-#include "destlistboxmodel.h"
-#include "destlistitem.h"
-#include "destlistitemlist.h"
-#include <cmcommonconstants.h>
-
-using namespace CMManager;
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::CDestListboxModel
-// ---------------------------------------------------------------------------
-//
-CDestListboxModel::CDestListboxModel()
-    : iOffset( 0 )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::~CDestListboxModel
-// ---------------------------------------------------------------------------
-//
-CDestListboxModel::~CDestListboxModel()
-    {
-    ResetAndDestroy(); // deletes all elements...
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::MdcaCount
-// ---------------------------------------------------------------------------
-//
-TInt CDestListboxModel::MdcaCount() const
-    {
-    return Count();
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::SetOwnIconOffset
-// ---------------------------------------------------------------------------
-//
-void CDestListboxModel::SetOwnIconOffset( TInt aOffset )
-    {
-    iOffset = aOffset;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::MdcaPoint
-// ---------------------------------------------------------------------------
-//
-TPtrC CDestListboxModel::MdcaPoint( TInt aIndex ) const
-    {
-    // We need to cast away the const-ness from the buffer.
-    // It was definitely made for formatting!
-    FormatListboxText( aIndex,
-        ( MUTABLE_CAST(  TBuf<KMaxDestListboxName>&, iBuf ) ) );
-
-    return iBuf;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListboxModel::FormatListboxTextL
-// ---------------------------------------------------------------------------
-//
-void CDestListboxModel::FormatListboxTextL( TInt aIndex,
-                                                TDes& aBuf ) const
-    {
-    aBuf.Zero();
-    HBufC* secondLine;
-    if ( At(aIndex)->NumOfCMs()  )
-        {
-        if ( At(aIndex)->NumOfCMs()  == 1 )
-            {
-            secondLine = 
-                  StringLoader::LoadLC( R_CMMANAGERUI_CONN_METHODS_AMOUNT_ONE );
-            }
-         else
-            {
-            secondLine = 
-                   StringLoader::LoadLC( R_CMMANAGERUI_CONN_METHODS_AMOUNT_MANY, 
-                                         At( aIndex )->NumOfCMs() );
-            }
-        }
-     else
-        {
-        if ( At( aIndex )->Uid() == KDestItemNewConnection )
-            {
-            //add cm if list is empty
-            secondLine = 
-                    StringLoader::LoadLC( R_CMMANAGERUI_ADD_CONNECTION_METHOD );
-            }
-         else
-            {
-            secondLine = 
-                 StringLoader::LoadLC( R_CMMANAGERUI_CONN_METHODS_AMOUNT_NONE );
-            }
-        }
-        
-    if ( At( aIndex )->IsDefault() )
-        {
-            aBuf.Format( KListItemFormatDestProt,
-                         At(aIndex)->IconIndex(), 
-                         &At(aIndex)->Name(), 
-                         secondLine, 
-                         KDestReservedIconIndexDefaultConn );
-        }
-    else
-        {
-        // Protected icon must be put only if the protection level is 1
-        if ( At( aIndex )->GetProtectionLevel() == EProtLevel1 )
-            {
-            aBuf.Format( KListItemFormatDestProt,
-                         At(aIndex)->IconIndex(), 
-                         &At(aIndex)->Name(), 
-                         secondLine, 
-                         KDestReservedIconIndexProtected );
-            }
-         else
-            {
-            aBuf.Format( KListItemFormatDest,
-                         At(aIndex)->IconIndex(), 
-                         &At(aIndex)->Name(), 
-                         secondLine );
-            }
-        }
-    CleanupStack::PopAndDestroy( secondLine );
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestListboxModel::FormatListboxText
-// ---------------------------------------------------------------------------
-//
-
-void CDestListboxModel::FormatListboxText( TInt aIndex,
-                                           TDes& aBuf ) const
-    {
-    TRAP_IGNORE( FormatListboxTextL( aIndex, aBuf ) );
-    }
--- a/cmmanager/cmmgr/Framework/Src/destlistitem.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +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:  Implementation of CDestListItem.
-*
-*/
-
-#include <eikdef.h>
-#include "destlistitem.h"
-#include <cmmanagerdef.h>
-
-using namespace CMManager;
-
-// ---------------------------------------------------------------------------
-// CDestListItem::NewLC
-// ---------------------------------------------------------------------------
-//
-CDestListItem* CDestListItem::NewLC( TUint32 aUid,
-                                     HBufC* aName,
-                                     TInt aNumOfCMs, 
-                                     TUint aIconIndex, 
-                                     TProtectionLevel aProtectionLevel,
-                                     TBool aIsDefault )
-    {
-    CDestListItem* db = new( ELeave ) CDestListItem( aName );
-    CleanupStack::PushL( db );
-    db->ConstructL( aUid, aNumOfCMs, aIconIndex , 
-                    aProtectionLevel, aIsDefault );
-    return db;
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestListItem::~CDestListItem
-// ---------------------------------------------------------------------------
-//
-CDestListItem::~CDestListItem()
-    {
-    delete iName;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::CDestListItem
-// ---------------------------------------------------------------------------
-//
-CDestListItem::CDestListItem( HBufC* aName )
-    : iName( aName )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CDestListItem::ConstructL( TUint32 aUid,
-                                TInt aNumOfCMs, 
-                                TUint aIconIndex, 
-                                TProtectionLevel aProtectionLevel,
-                                TBool aIsDefault )
-    {
-    iProtectionLevel = aProtectionLevel;
-    if (aProtectionLevel == EProtLevel0)
-        {
-        iIsProtected = EFalse;        
-        }
-    else
-        {
-        iIsProtected = ETrue;        
-        }
-    iIconIndex = aIconIndex;
-    iNumOfCMs = aNumOfCMs;
-    iIsDefault = aIsDefault;
-    iUid = aUid;
-    }
-// ---------------------------------------------------------------------------
-// CDestListItem::Name
-// ---------------------------------------------------------------------------
-//
-const TDesC& CDestListItem::Name()
-    {
-    return *iName;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::Uid
-// ---------------------------------------------------------------------------
-//
-TUint32 CDestListItem::Uid()
-    {
-    return iUid;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::NumOfCMs
-// ---------------------------------------------------------------------------
-//
-TInt CDestListItem::NumOfCMs()
-    {
-    return iNumOfCMs;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::IconIndex
-// ---------------------------------------------------------------------------
-//
-TUint CDestListItem::IconIndex()
-    {
-    return iIconIndex;
-    }
-
-// ---------------------------------------------------------------------------
-// CDestListItem::IsProtected
-// ---------------------------------------------------------------------------
-//
-TUint CDestListItem::IsProtected()
-    {
-    return iIsProtected;
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestListItem::IsProtected
-// ---------------------------------------------------------------------------
-//
-TProtectionLevel CDestListItem::GetProtectionLevel()
-    {
-    return iProtectionLevel;
-    }
-    
-// ---------------------------------------------------------------------------
-// CDestListItem::IsDefault
-// ---------------------------------------------------------------------------
-//
-TUint CDestListItem::IsDefault()
-    {
-    return iIsDefault;
-    }
-
--- a/cmmanager/cmmgr/Framework/Src/destlistitemlist.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +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:  Implementation of CDestListItemList
-*
-*/
-
-#include "destlistitemlist.h"
-#include "destlistitem.h"
-
-LOCAL_D const TInt KGranularity = 4;    ///< Granularity of the list.
-
-// ---------------------------------------------------------
-// CDestListItemList::CDestListItemList
-// ---------------------------------------------------------
-//
-CDestListItemList::CDestListItemList()
-    : CArrayPtrFlat<CDestListItem>( KGranularity )
-    {
-    }
-
-// ---------------------------------------------------------
-// CDestListItemList::~CDestListItemList
-// ---------------------------------------------------------
-//
-CDestListItemList::~CDestListItemList()
-    {
-    ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------
-// CDestListItemList::ItemByUid
-// ---------------------------------------------------------
-//
-CDestListItem* CDestListItemList::ItemForUid( TUint32 aUid ) const
-    {
-    // This method cannot return "const CDestListItem*", because all methods
-    // of CDestListItem are non-const -> if the returned item was const, it
-    // would be unusable.
-    TInt i;
-    TInt count = Count();
-    for ( i = 0; i < count; i++ )
-        {
-        if ( At( i )->Uid() == aUid )
-            {
-            return At( i );
-            }
-        }
-
-    return NULL;
-    }
--- a/cmmanager/cmmgr/Framework/Src/selectdestination.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +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:  Shows the "Select destination:" dialog, where the user can 
-*                select one of the available destinations.
-*
-*/
-
-#include <AknUtils.h>
-#include <badesca.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-#include "selectdestinationdlg.h"
-#include <cmcommonconstants.h>
-#include <cmcommonui.h>
-#include "cmdestinationimpl.h"
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-
-#include <cmmanagerdef.h>
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::CSelectDestinationDlg
-// ----------------------------------------------------------------------------
-//
-CSelectDestinationDlg::CSelectDestinationDlg( TInt aDummyIndex,
-                                              TUint32& aDestinationId )
-    : CAknListQueryDialog( &aDummyIndex )
-    , iDestinationId( aDestinationId )
-    , iDestinations( KCmArrayMediumGranularity )
-    {
-    CLOG_CREATE;
-    }
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CSelectDestinationDlg::ConstructL( CCmManagerImpl& aCmManager,
-                                        RArray<TUint32>* aDestArray )
-    {
-    LOGGER_ENTERFN( "CSelectDestinationDlg::ConstructL" );
-    RArray<TUint32> destinations( KCmArrayMediumGranularity );
-    CleanupClosePushL( destinations );
-
-    aCmManager.AllDestinationsL( destinations );
-
-    TBool mmsFound = EFalse;
-    for ( TInt i = 0; i < destinations.Count(); i++ )
-        {
-        CCmDestinationImpl* dest = aCmManager.DestinationL( destinations[i] );
-        CleanupStack::PushL( dest );   
-             
-        // Don't count the current destination
-        if ( dest->Id() == iDestinationId )
-            {
-            CleanupStack::PopAndDestroy( dest );
-            continue;
-            }
-               
-        // Do not give the option to copy into a Level 1 Protected Destination
-        if ( dest->ProtectionLevel() == CMManager::EProtLevel1 )
-            {
-            CleanupStack::PopAndDestroy( dest );
-            continue;
-            }
-
-        // check if the destination is valid as parent (e.g. for VPN)
-        if ( aDestArray && aDestArray->Find( dest->Id() ) == KErrNotFound )
-            {
-            CleanupStack::PopAndDestroy( dest );
-            continue;
-            }
-        
-        // Skip the MMS Snap, it it not shown in the list
-        if ( !mmsFound )
-            {
-            TInt snapMetadata = 0;
-            TRAPD(metaErr, snapMetadata = dest->MetadataL( CMManager::ESnapMetadataPurpose ));
-            if ( metaErr == KErrNone && snapMetadata == CMManager::ESnapPurposeMMS )
-                {
-                CleanupStack::PopAndDestroy( dest );
-                mmsFound = ETrue;
-                continue;
-                }
-            }
-        
-        iDestinations.AppendL( dest );
-        CleanupStack::Pop( dest );
-        }
-    CleanupStack::PopAndDestroy( &destinations );
-    }
-    
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::~CSelectDestinationDlg
-// ----------------------------------------------------------------------------
-//
-CSelectDestinationDlg::~CSelectDestinationDlg()
-    {
-    for ( TInt i = 0; i < iDestinations.Count(); i++ )
-        {
-        delete iDestinations[i];
-        }
-    iDestinations.Close();
-    CLOG_CLOSE;
-    }
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::NewL
-// ----------------------------------------------------------------------------
-//
-CSelectDestinationDlg* CSelectDestinationDlg::NewL( TUint32& aDestinationId,
-                                                    CCmManagerImpl& aCmManager,
-                                                    RArray<TUint32>* aDestArray )
-    {
-    CSelectDestinationDlg* self = NewLC( aDestinationId, aCmManager, aDestArray );
-
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::NewLC
-// ----------------------------------------------------------------------------
-//
-CSelectDestinationDlg* CSelectDestinationDlg::NewLC( TUint32& aDestinationId,
-                                                     CCmManagerImpl& aCmManager,
-                                                     RArray<TUint32>* aDestArray )
-    {
-    CSelectDestinationDlg* self =
-                    new (ELeave) CSelectDestinationDlg( 0, aDestinationId );
-
-    CleanupStack::PushL( self );
-
-    self->ConstructL( aCmManager, aDestArray );
-
-    return self;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::OkToExitL
-// ----------------------------------------------------------------------------
-//
-TBool CSelectDestinationDlg::OkToExitL( TInt aButtonId )
-    {
-    TBool result = EFalse;
-    
-    if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk )
-        {
-        iDestinationId = iDestinations[ ListBox()->CurrentItemIndex() ]->Id();
-
-        result = ETrue;
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        iDestinationId = 0;
-
-        result = ETrue;
-        }
-
-    CLOG_WRITE_2( "CSelectDestinationDlg::OkToExitL dest ID: [%d], result: [%d]",
-                   iDestinationId, result );
-
-    return result;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::PreLayoutDynInitL
-// ----------------------------------------------------------------------------
-//
-void CSelectDestinationDlg::PreLayoutDynInitL()
-    {
-    LOGGER_ENTERFN( "CSelectDestinationDlg::PreLayoutDynInitL" );
-    // Let the base class do its job first
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    // Set the description field on the query
-    HBufC* desc =
-              StringLoader::LoadLC( R_CMWIZARD_SELECT_DESTINATION_DESCRIPTION );
-
-    MessageBox()->SetMessageTextL( desc );
-    CleanupStack::PopAndDestroy( desc );
-
-    // Specify the item text array
-    CDesCArrayFlat* itemArray =
-                      new (ELeave) CDesCArrayFlat( KCmArrayMediumGranularity );
-    SetItemTextArray( itemArray );
-    SetOwnershipType( ELbmOwnsItemArray );
-
-    // Note: we don't have to put 'itemArray' on to the cleanup stack, as the
-    // model has already taken this object over.
-    
-    for ( TInt i = 0; i < iDestinations.Count(); i++ )
-        {       
-        // Here we take advantage of the fact that our icon array is ordered.
-        // That is, the indices of the icons in the array will always be
-        // in sync with those in the item text array (i.e. each bearer will
-        // have the right icon associated with it).
-        HBufC* destName = iDestinations[i]->NameLC();
-        HBufC* lineText =
-            TCmCommonUi::FormattedTextForListBoxLC( i, *destName );
-
-        itemArray->AppendL( *lineText );
-        CleanupStack::PopAndDestroy( 2, destName ); // destName, lineText
-        }
-
-    // Icons ...
-    SetIconsL();
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectDestinationDlg::SetIconsL()
-// ----------------------------------------------------------------------------
-//
-void CSelectDestinationDlg::SetIconsL()
-    {
-    CArrayPtr<CGulIcon>* icons =
-             new (ELeave) CArrayPtrFlat<CGulIcon>( KCmArrayMediumGranularity );
-    CleanupStack::PushL( icons );
-
-    for ( TInt i = 0; i < iDestinations.Count(); i++ )
-        {
-        CGulIcon* icon = iDestinations[i]->IconL();
-        CleanupStack::PushL( icon );
-
-        icons->AppendL( icon );
-
-        CleanupStack::Pop( icon );  // icon array took over ownership
-        }
-
-    SetIconArrayL( icons ); // ownership passed, too
-
-    CleanupStack::Pop( icons );
-    }
-
-
-// ----------------------------------------------------------------------------
-// void CSelectDestinationDlg::HandleResourceChange
-// ----------------------------------------------------------------------------
-//
-void CSelectDestinationDlg::HandleResourceChange( TInt aType )
-    {
-    if ( aType == KAknsMessageSkinChange )
-        {
-        CAknListQueryDialog::HandleResourceChange( aType );
-
-        TRAP_IGNORE( SetIconsL() );
-
-        SizeChanged();
-        }
-    else
-        {
-        if ( aType == KEikDynamicLayoutVariantSwitch )
-            {
-            TRect mainPaneRect;
-            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
-                                               mainPaneRect );
-
-            TAknLayoutRect layoutRect;
-            layoutRect.LayoutRect( TRect( TPoint( 0, 0 ), 
-                                   mainPaneRect.Size() ),
-                                   AKN_LAYOUT_WINDOW_list_gen_pane( 0 ) );
-
-            ListBox()->SetRect( layoutRect.Rect() );
-            }
-
-        // Base call
-        CAknListQueryDialog::HandleResourceChange( aType );
-        }
-    }
--- a/cmmanager/cmmgr/Framework/Src/uncatdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,455 +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:  Implementation of CUncatDlg.
-*
-*/
-
-#include <avkon.hrh>
-#include <eikdef.h>
-#include <eikenv.h>
-#include <eikedwin.h>
-#include <cmmanager.rsg>
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <eikmenup.h>
-#include <data_caging_path_literals.hrh>
-#include <StringLoader.h>
-#include <AknIconArray.h>
-
-#include "cmmanager.hrh"
-#include "uncatdlg.h"
-#include "cmlistitem.h"
-#include "cmlistitemlist.h"
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include "cmdestinationimpl.h"
-#include <cmcommonui.h>
-#include <cmcommonconstants.h>    
-#include <cmpbasesettingsdlg.h>
-#include "cmlistboxmodel.h"
-#include "selectdestinationdlg.h"
-#include "cmlogger.h"
-
-using namespace CMManager;
-
-// ---------------------------------------------------------------------------
-// CUncatDlg::ConstructAndRunLD
-// Constructs the dialog and runs it.
-// ---------------------------------------------------------------------------
-//
-TInt CUncatDlg::ConstructAndRunLD( TUint32 aHighlight,
-                                   TUint32& aSelected )
-    {
-    CleanupStack::PushL( this );
-    iHighlight = aHighlight;
-    iSelected = &aSelected;
-    ConstructL( R_CM_MENUBAR );
-    PrepareLC(R_CM_DIALOG);
-    CleanupStack::Pop( this );  // it will be PushL-d by ExecuteLD...
-    iModel = new( ELeave ) CCmListboxModel();
-    //destructed in base class destructor
-    iInfoPopupNoteController = CAknInfoPopupNoteController::NewL();
-
-    // Trace changes in CommsDat
-    iCmManager->WatcherRegisterL( this );
-    
-    return RunLD();
-    }
-    
-// ---------------------------------------------------------------------------
-// CUncatDlg::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// ---------------------------------------------------------------------------
-//
-CUncatDlg* CUncatDlg::NewL(CCmManagerImpl* aCmManager )
-    {
-    CUncatDlg* self = new (ELeave) CUncatDlg( aCmManager );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CUncatDlg::CUncatDlg()
-// ---------------------------------------------------------------------------
-//
-CUncatDlg::CUncatDlg( CCmManagerImpl* aCmManager )
-    : CCmDlg( aCmManager, NULL, NULL )
-    , iCmUncatItems(KCmArraySmallGranularity)
-    {
-    CLOG_CREATE;
-    CLOG_ATTACH( this, iCmManager );
-    }
-    
-// ---------------------------------------------------------------------------
-// CUncatDlg::~CUncatDlg
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CUncatDlg::~CUncatDlg()
-    {
-    CLOG_WRITE( "CUncatDlg::~CUncatDlg" );
-    CleanupUncatArray();   
-    CLOG_CLOSE;
-    }
-
-// ---------------------------------------------------------------------------
-// CUncatDlg::DynInitMenuPaneL
-// ---------------------------------------------------------------------------
-//
-void CUncatDlg::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
-    {
-    TBool hideAdd ( EFalse );
-    TBool hideMove ( EFalse );
-    TBool hideCopy( EFalse );
-    TBool hidePrioritise( EFalse );
-    
-    CCmDlg::DynInitMenuPaneL( aResourceId, aMenuPane );
-    if ( aResourceId == R_CM_MENU )
-        {
-        // There are no destinatons to move to OR
-        // the highlighted connection method is in use
-        if ( !iCmManager->DestinationCountL() )
-            {
-            hideMove = ETrue;
-            }
-
-        // No priorities in Uncategorized -> always disabled
-        hidePrioritise = ETrue;
-
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmAdd, hideAdd );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmPrioritise, hidePrioritise  );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmCopyToOtherDestination, hideCopy );
-        aMenuPane->SetItemDimmed( ECmManagerUiCmdCmCopyToOtherDestination, hideMove );
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// CUncatDlg::InitTextsL
-// called before the dialog is shown
-// to initialize localized textual data
-// ---------------------------------------------------------------------------
-//
-void CUncatDlg::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    HBufC* primary = 
-              iEikonEnv->AllocReadResourceLC( R_CMMANAGERUI_EMPTY_METHOD_VIEW_PRIMARY );
-    HBufC* secondary = 
-              iEikonEnv->AllocReadResourceLC( R_CMMANAGERUI_EMPTY_METHOD_VIEW_SECONDARY );
-    CDesCArrayFlat* items = new (ELeave) CDesCArrayFlat(2);
-    CleanupStack::PushL(items);
-    items->AppendL(primary->Des()); 
-    items->AppendL(secondary->Des());      
-    HBufC* emptyText = 
-          StringLoader::LoadLC( R_TWO_STRING_FOR_EMPTY_VIEW , *items);              
-    iListbox->View()->SetListEmptyTextL( *emptyText );    
-    CleanupStack::PopAndDestroy( emptyText );
-    CleanupStack::PopAndDestroy( items );
-    CleanupStack::PopAndDestroy( secondary );
-    CleanupStack::PopAndDestroy( primary );
-
-    iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-    iTitlePane =
-        ( CAknTitlePane* )iStatusPane->ControlL(
-                            TUid::Uid( EEikStatusPaneUidTitle ) );
-
-    iOldTitleText = iTitlePane->Text()->AllocL();
-    HBufC* name = StringLoader::LoadLC( R_CMMANAGERUI_DEST_UNCATEGORIZED );
-    iTitlePane->SetTextL( *name );
-    CleanupStack::PopAndDestroy( name );
-    iNaviPane = ( CAknNavigationControlContainer* ) 
-                    iStatusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
-    iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-    iNaviPane->PushL( *iNaviDecorator );
-    }
-
-// ---------------------------------------------------------------------------
-// CUncatDlg::ProcessCommandL
-// ---------------------------------------------------------------------------
-//
-void CUncatDlg::ProcessCommandL( TInt aCommandId )
-    {
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {
-        case ECmManagerUiCmdCmMoveToOtherDestination:
-            {
-            if ( CurrentCML()->GetBoolAttributeL( ECmConnected ) )
-                    {
-                TCmCommonUi::ShowNoteL( R_QTN_SET_NOTE_AP_IN_USE_EDIT,
-                                    TCmCommonUi::ECmErrorNote );
-                }
-            else
-                {
-                // The selected item will be at the same position
-                TInt selected = iListbox->CurrentItemIndex();
-                TInt noi = iListbox->Model()->NumberOfItems();
-                // If it is the last then the previous will be selected.
-                if( ( selected == noi-1 ) && ( selected > 0 ))
-                    {
-                    selected--;
-                    }
-                
-                TRAPD( err, CCmDlg::ProcessCommandL(
-                                ECmManagerUiCmdCmCopyToOtherDestination ) );
-                if ( err == KErrCancel )
-                    {
-                    break;
-                    }
-                else
-                    {
-                    User::LeaveIfError( err );
-                    }
-                    
-                if ( iListbox->Model()->NumberOfItems() )
-                    {
-                    //first item cannot be deleted
-                    iListbox->ScrollToMakeItemVisible( selected);
-                    iListbox->SetCurrentItemIndexAndDraw( selected );                            
-                    }
-                else
-                    {
-                    TCmCommonUi::ShowNoteL( R_QTN_NETW_CONSET_INFO_UNCAT_EMPTY,
-                                            TCmCommonUi::ECmInfoNote );
-                    iCmManager->WatcherUnRegister();       
-                    TryExitL( KDialogUserBack );                                
-                    }
-                }
-            }
-            break;
-            
-        case EAknSoftkeyClear:
-        case ECmManagerUiCmdCmDelete:            
-            {
-            CCmPluginBase* cm = CurrentCML();
-            
-            if ( cm->GetBoolAttributeL( ECmProtected ) )
-                {
-                TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                        TCmCommonUi::ECmErrorNote );
-                                        
-                break;
-                }
-           
-            if ( cm->GetBoolAttributeL( ECmIsLinked ) )//same check as KErrLocked below
-                {
-                TCmCommonUi::ShowNoteL( R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                                        TCmCommonUi::ECmErrorNote );
-                
-                break;
-                }
-           
-            if ( cm->GetBoolAttributeL( ECmConnected ) )//same check as KErrInUse below
-                {
-                TCmCommonUi::ShowNoteL( R_CMMANAGERUI_INFO_CM_IN_USE_CANNOT_DELETE,
-                                        TCmCommonUi::ECmErrorNote );
-                
-                break;
-                }
-
-            HBufC* cmName = cm->GetStringAttributeL(ECmName);
-            CleanupStack::PushL(cmName);
-            
-            if ( TCmCommonUi::ShowConfirmationQueryL( 
-                                    R_CMMANAGERUI_QUEST_CM_DELETE, *cmName ) )
-                {
-                TRAPD( err, CurrentCML()->DeleteL( ETrue ) );
-
-                switch ( err )
-                    {
-                    case KErrInUse:
-                        {
-                        TCmCommonUi::ShowNoteL
-                            ( R_CMMANAGERUI_INFO_CM_IN_USE_CANNOT_DELETE,
-                              TCmCommonUi::ECmErrorNote );
-                        }
-                        break;
-                        
-                    case KErrLocked:
-                        {
-                        TCmCommonUi::ShowNoteL
-                            ( R_QTN_NETW_CONSET_INFO_CANNOT_DELETE_VIRTUAL_REF,
-                              TCmCommonUi::ECmErrorNote );
-                        }
-                        break;
-                        
-                    case KErrNone:
-                        {
-                        HandleListboxDataChangeL();
-                        iListbox->HandleItemRemovalL();
-
-                        if ( !iListbox->Model()->NumberOfItems() )
-                            {
-                            TCmCommonUi::ShowNoteL( R_QTN_NETW_CONSET_INFO_UNCAT_EMPTY,
-                                                    TCmCommonUi::ECmInfoNote );
-                            iCmManager->WatcherUnRegister();       
-                            TryExitL( KDialogUserBack );                                
-                            }
-                        }
-                        break;
-
-                    default:
-                        {
-                        }
-                    }
-
-                }
-            CleanupStack::PopAndDestroy( cmName );         
-         
-            }
-            break;
-            
-        case ECmManagerUiCmdCmAdd:
-        case ECmManagerUiCmdCmCopyToOtherDestination:
-        case ECmManagerUiCmdCmPrioritise:
-            {
-            TCmCommonUi::ShowNoteL( R_CMWIZARD_CANNOT_PERFORM_FOR_PROTECTED,
-                                    TCmCommonUi::ECmErrorNote );
-            }
-            break;
-            
-        default:
-            {
-            CCmDlg::ProcessCommandL(aCommandId);
-            }        
-        }        
-    }
-    
-// ---------------------------------------------------------------------------
-// CUncatDlg::CurrentCML
-// called before the dialog is shown to initialize listbox data
-// ---------------------------------------------------------------------------
-//
-CCmPluginBase* CUncatDlg::CurrentCML()
-    {
-    return CMByIndexL( iListbox->CurrentItemIndex() );
-    }    
-    
-// ---------------------------------------------------------------------------
-// CUncatDlg::CMByIndexL
-// a connection method in the list
-// ---------------------------------------------------------------------------
-//
-CCmPluginBase* CUncatDlg::CMByIndexL( TInt aIndex )
-    {
-    TInt anIndex = iItemIndex[aIndex];    
-    if( !iCmUncatItems[anIndex].iPlugin )
-        {
-        iCmUncatItems[anIndex].iPlugin = 
-                                iCmManager->GetConnectionMethodL( 
-                                                iCmUncatItems[anIndex].iCmId );
-        }
-    return iCmUncatItems[anIndex].iPlugin;
-    }
-
-// ---------------------------------------------------------------------------
-// CUncatDlg::CMCount
-// number of cms in the list
-// ---------------------------------------------------------------------------
-//
-TInt CUncatDlg::CMCount()
-    {
-    return iCmUncatItems.Count();
-    }
-
-// --------------------------------------------------------------------------
-// CUncatDlg::ConstructCMArrayL
-// --------------------------------------------------------------------------
-//
-void CUncatDlg::ConstructCMArrayL( RArray<TUint32>& aCmIds )
-    {
-    // empty the array - reuse
-    CleanupUncatArray( ETrue );
-    iCmManager->ConnectionMethodL( aCmIds, EFalse );
-    CleanupClosePushL( aCmIds );
-    
-    for( TInt i = 0; i < aCmIds.Count(); ++i )
-        {
-        TUncatItem item;
-        
-        item.iPlugin = NULL;
-        item.iCmId = aCmIds[i];
-        
-        User::LeaveIfError( iCmUncatItems.Append( item ) );
-        }
-    
-    CleanupStack::Pop( &aCmIds );
-    }
-
-// --------------------------------------------------------------------------
-// CCmDlg::ClearHiddenCMsFromArrayL
-// --------------------------------------------------------------------------
-//
-void CUncatDlg::ClearHiddenCMsFromArrayL( RArray<TUint32>& aCmIds )
-    {
-    TBool hidden( EFalse );
-    TInt err( KErrNone );
-    for ( TInt index = 0; index < aCmIds.Count(); index++ )
-        {
-        TUint recId = aCmIds[index];
-        TRAP( err, hidden = iCmManager->GetConnectionMethodInfoBoolL( recId, ECmHidden ) );
-        if ( err || hidden )
-            {
-            aCmIds.Remove( index );
-            index--;
-            // Remove the same item from iCmUncatItems array
-            for( TInt i = 0; i < iCmUncatItems.Count(); i++ )
-                {
-                if( iCmUncatItems[i].iCmId == recId )
-                    {
-                    iCmUncatItems.Remove( i );
-                    break;
-                    }
-                }
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CUncatDlg::CleanupUncatArray
-// --------------------------------------------------------------------------
-//
-void CUncatDlg::CleanupUncatArray( TBool aReuseArray )
-    {
-    CLOG_WRITE( "CUncatDlg::CleanupUncatArray" );
-    for ( TInt i = 0; i < iCmUncatItems.Count(); ++i )
-        {
-        CCmPluginBase* cm = iCmUncatItems[i].iPlugin;
-        delete cm;
-        }
-    
-    if ( aReuseArray )
-        {
-        iCmUncatItems.Reset();
-        }
-    else
-        {
-        iCmUncatItems.Close();
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CUncatDlg::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CUncatDlg::CommsDatChangesL()
-    {
-    // Update list box
-    HandleListboxDataChangeL();
-    }
--- a/cmmanager/cmmgr/Framework/SrcData/cmmanager.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1406 +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:  Resource file.
-*
-*/
-
-//  RESOURCE IDENTIFIER
-NAME    CMMG // 4 letter ID
-
-// INCLUDES
-
-// System
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>	
-#include <avkon.loc>
-#include <uikon.rh>
-#include <CommonDialogs.rh>
-#include <pathconfiguration.hrh>
-#include <data_caging_paths_strings.hrh>
-#include <cmmanager.mbg>
-
-// User
-#include <cmmanager.loc>
-#include <cmpsettingsconsts.h>
-#include "cmmanager.hrh"
-
-//For Ip address editor
-#define IPADDRESS_MIN_FIRST_FIELD_VALUE     0
-#define IPADDRESS_MIN_SECOND_FIELD_VALUE    0
-#define IPADDRESS_MIN_THIRD_FIELD_VALUE     0
-#define IPADDRESS_MIN_FOURTH_FIELD_VALUE    0
-#define IPADDRESS_MAX_FIRST_FIELD_VALUE     255
-#define IPADDRESS_MAX_SECOND_FIELD_VALUE    255
-#define IPADDRESS_MAX_THIRD_FIELD_VALUE     255
-#define IPADDRESS_MAX_FOURTH_FIELD_VALUE    255
-
-//  RESOURCE DEFINITIONS
-RESOURCE RSS_SIGNATURE {}
-
-RESOURCE TBUF R_CMMANAGER_CM_NAME_DEFAULT   
-        { buf = "Default Connection Method"; }
-
-// NON-LOCALIZED STRINGS
-RESOURCE TBUF r_start_page_def_value
-    { buf = "http://"; }
-
-// LOCALISED STRINGS
-RESOURCE TBUF r_qtn_netw_conset_info_cannot_delete_dest_prot_cm
-    { buf = qtn_netw_conset_info_cannot_delete_dest_prot_cm; }
-
-RESOURCE TBUF r_qtn_netw_sett_subnet_mask
-    { buf = qtn_netw_sett_subnet_mask; }
-
-RESOURCE TBUF r_qtn_netw_sett_default_gateway
-    { buf = qtn_netw_sett_default_gateway; }
-
-RESOURCE TBUF r_qtn_selec_setting_compulsory
-    { buf = qtn_selec_setting_compulsory; }
-
-RESOURCE TBUF r_qtn_set_dns_servers_automatic
-    { buf = qtn_set_dns_servers_automatic; }
-
-RESOURCE TBUF r_qtn_set_passwd_aut
-    { buf = qtn_set_passwd_aut; }
-
-RESOURCE TBUF r_qtn_set_ap_passwd
-    { buf = qtn_set_ap_passwd; }
-
-RESOURCE TBUF r_qtn_set_prompt_passwd_yes
-    { buf = qtn_set_prompt_passwd_yes; }
-
-RESOURCE TBUF r_qtn_set_prompt_passwd_no
-    { buf = qtn_set_prompt_passwd_no; }
-
-RESOURCE TBUF r_qtn_set_prompt_passwd
-    { buf = qtn_set_prompt_passwd; }
-
-RESOURCE TBUF r_qtn_set_ap_username_none
-    { buf = qtn_set_ap_username_none; }
-
-RESOURCE TBUF r_qtn_set_passwd_aut_normal
-    { buf = qtn_set_passwd_aut_normal; }
-
-RESOURCE TBUF r_qtn_set_passwd_aut_secure
-    { buf = qtn_set_passwd_aut_secure; }
-
-RESOURCE TBUF r_qtn_set_ap_username
-    { buf = qtn_set_ap_username; }
-
-RESOURCE TBUF r_qtn_set_ip_well_known
-    { buf = qtn_set_ip_well_known; }
-
-RESOURCE TBUF r_qtn_set_dns_servers_ip
-    { buf = qtn_set_dns_servers_ip; }
-
-RESOURCE TBUF r_qtn_set_secondary_dns
-    { buf = qtn_set_secondary_dns; }
-
-RESOURCE TBUF r_qtn_set_primary_dns
-    { buf = qtn_set_primary_dns; }
-
-RESOURCE TBUF r_qtn_set_ip_address_dynamic
-    { buf = qtn_set_ip_address_dynamic; }
-
-RESOURCE TBUF r_qtn_set_ip_address
-    { buf = qtn_set_ip_address; }
-
-RESOURCE TBUF r_qtn_set_ipv6_settings
-    { buf = qtn_set_ipv6_settings; }
-
-RESOURCE TBUF r_qtn_set_ipv4_settings
-    { buf = qtn_set_ipv4_settings; }
-
-RESOURCE TBUF r_qtn_set_ip_user_defined
-    { buf = qtn_set_ip_user_defined; }
-
-RESOURCE TBUF r_qtn_netw_quest_iap_incomplete_delete
-    { buf = qtn_netw_quest_iap_incomplete_delete; }
-
-RESOURCE TBUF r_qtn_set_info_invalid_ip
-    { buf = qtn_set_info_invalid_ip; }
-
-RESOURCE TBUF r_qtn_set_proxy_server_address
-    { buf = qtn_set_proxy_server_address; }
-    
-RESOURCE TBUF r_qtn_set_proxy_server_address_none
-    { buf = qtn_set_proxy_server_address_none; }
-    
-RESOURCE TBUF r_qtn_set_proxy_port_number
-    { buf = qtn_set_proxy_port_number; }
-    
-RESOURCE TBUF r_qtn_set_home_page_none
-    { buf = qtn_set_home_page_none; }
-    
-RESOURCE TBUF r_qtn_set_starting_page
-    { buf = qtn_set_starting_page; }
-    
-RESOURCE TBUF r_qtn_netw_conset_info_cannot_delete_virtual_ref
-    { buf = qtn_netw_conset_info_cannot_delete_virtual_ref; }
-    
-RESOURCE TBUF64 r_cmmanagereng_default_ap_name        
-    { buf =  qtn_set_ap_default_name; }
-
-RESOURCE TBUF r_qtn_netw_conset_info_uncat_empty 
-    { buf = qtn_netw_conset_info_uncat_empty ; }
-    
-RESOURCE TBUF r_qtn_netw_conset_embedded_dest 
-    { buf = qtn_netw_conset_embedded_dest ; }
-
-RESOURCE TBUF r_cmmanagerui_add_connection_method       
-    { buf = qtn_netw_conset_add_connection_method; }
-RESOURCE TBUF r_cmmanagerui_new_connection              
-    { buf = qtn_netw_conset_add_connection; }
-
-RESOURCE TBUF r_cmmanagerui_conn_methods_amount_many 
-    { buf = qtn_netw_conset_conn_methods_amount_many; }
-
-RESOURCE TBUF r_cmmanagerui_conn_methods_amount_one 
-    { buf = qtn_netw_conset_conn_methods_amount_one; }
-
-RESOURCE TBUF r_cmmanagerui_conn_methods_amount_none 
-    { buf = qtn_netw_conset_conn_methods_amount_none; }
-
-RESOURCE TBUF r_cmmanagerui_method_priority_other 
-    { buf = qtn_netw_conset_method_priority_other; }
-
-RESOURCE TBUF r_qtn_netw_conset_method_priority_auto
-    { buf = qtn_netw_conset_method_priority_auto; }
-
-RESOURCE TBUF r_cmmanagerui_navi 
-    { buf = qtn_netw_conset_network_connections_title; }
-
-RESOURCE TBUF r_cmmanagerui_empty_method_view_primary 
-    { buf = qtn_netw_conset_empty_method_view_primary; }
-
-RESOURCE TBUF r_cmmanagerui_empty_method_view_secondary 
-    { buf = qtn_netw_conset_empty_method_view_secondary; }
-
-RESOURCE TBUF r_cmmanagerui_connection_name           	
-    { buf = qtn_set_ap_conn_name; }
-
-RESOURCE TBUF r_cmmanagerui_prmpt_cm_mame
-    { buf = qtn_netw_conset_prmpt_method_name; }
-
-RESOURCE TBUF r_cmmanagerui_prmpt_destination_name           	
-    { buf =qtn_netw_conset_prmpt_destination_name;}
-
-RESOURCE TBUF r_cmmanagerui_quest_cm_delete           	
-    { buf = qtn_netw_conset_quest_delete_method;}
-
-RESOURCE TBUF r_cmmanagerui_info_cm_protected_cannot_delete           	
-    { buf = qtn_netw_conset_info_cannot_delete_protected_method;}
-
-RESOURCE TBUF r_cmmanagerui_info_cm_in_use_cannot_delete           	
-    { buf = qtn_netw_conset_info_cannot_delete_method_in_use;}
-
-RESOURCE TBUF r_cmmanagerui_quest_dest_delete           	
-    {  buf = qtn_netw_conset_quest_delete_destination; }
-
-RESOURCE TBUF r_cmmanagerui_info_dest_in_use_cannot_delete             	
-    {  buf = qtn_netw_conset_info_cannot_delete_dest_in_use; }
-
-RESOURCE TBUF r_qtn_set_note_ap_in_use_edit
-    { buf = qtn_set_note_ap_in_use_edit; }
-
-RESOURCE TBUF r_cmmanagerui_info_dest_protected_cannot_delete           	
-    { buf = qtn_netw_conset_info_cannot_delete_dest_protected;}
-
-RESOURCE TBUF r_cmmanagerui_dest_uncategorized           	
-    { buf = qtn_netw_conset_dest_uncategorized; }
-
-RESOURCE TBUF r_cmmanagerui_dest_internet           	
-    { buf = qtn_netw_conset_dest_internet; }
-
-RESOURCE TBUF r_cmmanagerui_dest_wap           	
-    { buf = qtn_netw_conset_dest_wap; }
-
-RESOURCE TBUF r_cmmanagerui_dest_mms           	
-    { buf = qtn_netw_conset_dest_mms; }
-
-RESOURCE TBUF r_cmmanagerui_dest_intranet           	
-   { buf = qtn_netw_conset_dest_intranet; }
-
-RESOURCE TBUF r_cmmanagerui_msk_add_method
-    { buf = qtn_msk_add_method; }
-
-RESOURCE TBUF r_plugin_base_options_change    
-	{ buf = qtn_set_options_change; }
-	
-RESOURCE TBUF r_plugin_base_options_ap_advanced                       
-	{ buf = qtn_set_options_ap_advanced; }
-
-RESOURCE TBUF r_plugin_base_cmd_exit                                  
-    { buf = qtn_set_options_exit; }
-			
-RESOURCE TBUF r_cmwizard_automatic_check
-    { buf = qtn_netw_conset_quest_check_conn_methods; }
-
-RESOURCE TBUF r_cmwizard_checking_methods
-    { buf = qtn_netw_conset_wait_checking_methods; }
-
-RESOURCE TBUF r_cmwizard_manual_configuration
-    { buf = qtn_netw_conset_quest_conf_method_manually; }
-
-RESOURCE TBUF r_cmwizard_available_methods
-    { buf = qtn_netw_conset_prmpt_available_methods; }
-
-RESOURCE TBUF r_cmwizard_bearer_available_wlan
-    { buf = qtn_netw_conset_bearer_available_wlan; }
-
-RESOURCE TBUF r_cmwizard_one_wlan_nw_available
-    { buf = qtn_netw_conset_one_wlan_nw_available; }
-
-RESOURCE TBUF r_cmwizard_many_wlan_nw_available
-    { buf = qtn_netw_conset_many_wlan_nw_available; }
-
-RESOURCE TBUF r_cmwizard_select_conn_method
-    { buf = qtn_netw_conset_prmpt_select_conn_method; }
-
-RESOURCE TBUF r_cmwizard_select_destination_description
-    { buf = qtn_netw_conset_detail_add_to_destination; }
-
-RESOURCE TBUF r_cmwizard_no_destination
-    { buf = qtn_netw_conset_info_no_destinations; }
-    
-RESOURCE TBUF r_cmwizard_no_unprotected_destination
-    { buf = qtn_new_conset_info_cannot_add_all_dest_protected; }
-
-RESOURCE TBUF r_cmwizard_no_unprotected_destination_dup
-    { buf = qtn_netw_conset_info_cannot_add_all_dest_protected; }
-
-RESOURCE TBUF r_cmwizard_cannot_perform_for_protected
-    { buf = qtn_netw_conset_info_cannot_perform_for_protected; }
-
-RESOURCE TBUF r_cmwizard_no_vpn_stacking
-    { buf = qtn_netw_conset_info_no_vpn_stacking; }
-
-RESOURCE TBUF r_cmmanagerui_sett_destination     
-    { buf = qtn_netw_conset_sett_destination; }
-
-RESOURCE TBUF r_cmmanagerui_sett_always_ask     
-    { buf = qtn_netw_conset_sett_always_ask; }
-
-RESOURCE TBUF r_cmmanagerui_sett_ask_once      	
-    { buf = qtn_netw_conset_sett_ask_once;  }
-
-RESOURCE TBUF r_cmmanagerui_sett_default_connection      	
-    { buf = qtn_netw_conset_sett_default_connection;  }
-
-RESOURCE TBUF r_cmmanagerui_sett_user_defined      	
-    { buf = qtn_netw_conset_sett_user_defined;  }
-
-RESOURCE TBUF r_cmmanagerui_navi_default 
-    { buf = qtn_netw_conset_navi_default; }
-
-RESOURCE TBUF r_cmmanagerui_navi_default_always_ask 
-    { buf = qtn_netw_conset_navi_default_always_ask; }
-
-RESOURCE TBUF r_cmmanagerui_navi_default_ask_once
-    { buf = qtn_netw_conset_navi_default_ask_once; }
-
-RESOURCE TBUF r_cmmanagerui_default_connection_set_to 
-    { buf = qtn_netw_conset_default_connection_set_to; }
-
-RESOURCE TBUF r_cmmanagerui_conf_default_always_ask 
-    { buf = qtn_netw_conset_conf_default_always_ask; }
-
-RESOURCE TBUF r_cmmanagerui_conf_default_ask_once 
-    { buf = qtn_netw_conset_conf_default_ask_once; }
-
-RESOURCE TBUF r_cmmanagerui_default_connection_title 
-    { buf = qtn_netw_conset_default_connection_title; }
-
-RESOURCE TBUF r_qtn_netw_conset_navi_nof_destinations 
-    { buf = qtn_netw_conset_navi_nof_destinations; }
-
-RESOURCE TBUF r_qtn_netw_conset_navi_one_destination 
-    { buf = qtn_netw_conset_navi_one_destination; }
-
-RESOURCE TBUF r_cmmanagerui_navi_one_conn_method 
-    { buf = qtn_netw_conset_navi_one_conn_method; }
-
-RESOURCE TBUF r_cmmanagerui_navi_many_conn_methods 
-    { buf = qtn_netw_conset_navi_many_conn_methods; }
-
-RESOURCE TBUF r_cmmanagerui_popup_title_data_bearer 
-    { buf = qtn_netw_conset_popup_title_data_bearer; }
-
-RESOURCE TBUF r_cmmanagerui_prmpt_select_icon 
-    { buf = qtn_netw_conset_prmpt_select_icon; }
-
-RESOURCE TBUF r_cmmanagerui_info_dest_already_in_use 
-    { buf = qtn_netw_conset_info_name_already_in_use; }
-
-RESOURCE TBUF r_plugin_base_set_ap_bearer
-    { buf = qtn_set_ap_bearer; }
-
-RESOURCE TBUF r_plugin_base_info_bearer_not_editable 
-    { buf = qtn_netw_conset_info_bearer_not_editable; }
-
-RESOURCE TBUF r_plugin_base_sett_smtp_override 
-    { buf = qtn_netw_conset_sett_smtp_override; }
-
-RESOURCE TBUF r_cmmanagerui_info_prio_not_possible 
-    { buf = qtn_netw_conset_info_prio_not_possible; }
-
-RESOURCE TBUF r_cmmanagerui_info_protected_cannot_edit      
-    { buf = qtn_netw_conset_info_cannot_edit_protected; }
-
-RESOURCE TBUF r_cmmanagerui_quest_embedded_dest_delete      
-    { buf = qtn_netw_conset_quest_delete_embedded_dest; }    
-
-// SMTP settings
-RESOURCE TBUF r_plugin_base_sett_smtp_outgoing_mail_server
-    { buf = qtn_mce_settings_mail_sending_h; }
-
-RESOURCE TBUF r_plugin_base_sett_smtp_user_name
-    { buf = qtn_mce_settings_mail_user_name; }
-
-RESOURCE TBUF r_plugin_base_sett_smtp_password
-    { buf = qtn_mce_settings_mail_password; }
-    
-RESOURCE TBUF r_plugin_base_prompt_server_addr
-    { buf = qtn_mbxs_settings_mail_srvr_prompt; }
-
-RESOURCE TBUF r_plugin_base_sett_smtp_security
-    { buf = qtn_mce_settings_mail_security; }
-    
-RESOURCE TBUF r_plugin_base_sett_security_on_starttls
-    { buf = qtn_mbxs_settings_mail_sec_starttls; }
-    
-RESOURCE TBUF r_plugin_base_sett_security_on_ssltls
-    { buf = qtn_mbxs_settings_mail_sec_ssltls; }
-
-RESOURCE TBUF r_plugin_base_sett_security_off
-    { buf = qtn_mbxs_settings_mail_sec_off; }
-
-RESOURCE TBUF r_plugin_base_sett_port_default
-    { buf = qtn_mbxs_settings_mail_port_def; }
-    
-RESOURCE TBUF r_plugin_base_sett_smtp_port 
-    { buf = qtn_mce_settings_mail_port; }
-
-RESOURCE TBUF r_plugin_base_sett_port_userdef
-    { buf = qtn_mbxs_settings_mail_port_userdef; }
-    
-RESOURCE TBUF r_text_softkey_option
-    {
-    buf = text_softkey_option;
-    }
-
-RESOURCE TBUF r_qtn_memlo_memory_full
-    {
-    buf = qtn_memlo_memory_full;
-    }
-
-RESOURCE TBUF r_qtn_fldr_name_already_used
-    {
-    buf = qtn_fldr_name_already_used;
-    }
-
-RESOURCE TBUF r_cmmanagerui_info_cm_already_in_use 
-    { buf = qtn_netw_conset_info_name_already_in_use; }
-
-
-    
-RESOURCE TBUF r_two_string_for_empty_view { buf = "%0U\n%1U"; }
-
-// --------------------------------------------------------------------------
-// Menu bars
-// --------------------------------------------------------------------------
-//   
-//    r_dest_menubar
-//    menubar for the settings view 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_dest_menubar
-	{
-    titles=
-		{
-        MENU_TITLE { menu_pane=r_dest_menu; 
-                     txt="App"; }
-	    };
-	}
-// -----------------------------------------------------------------------------
-//   
-//    r_dest_menu
-//    menu pane for destination list 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_dest_menu
-	{
-    items=
-        {
-        MENU_ITEM 
-            { 
-             command = ECmManagerUiCmdDestEdit; 
-             txt = qtn_options_open; 
-             flags = EEikMenuItemAction;
-             },
-        MENU_ITEM 
-            { 
-             command = ECmManagerUiCmdDestDefaultConnection; 
-             txt = qtn_netw_conset_options_default_connection; 
-             },
-        MENU_ITEM 
-            {
-            command = ECmManagerUiCmdDestAdd; 
-            txt = qtn_netw_conset_options_add_destination;
-            },
-        MENU_ITEM 
-            { 
-            command = ECmManagerUiCmdDestRename; 
-            txt = qtn_netw_conset_options_rename_destination;
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = ECmManagerUiCmdDestChangeIcon; 
-            txt = qtn_netw_conset_options_change_dest_icon; 
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = ECmManagerUiCmdDestDelete; 
-            txt = qtn_netw_conset_options_delete_destination;
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdHelp; 
-            txt = qtn_options_help;
-            },
-        MENU_ITEM 
-            { 
-            command = ECmManagerUiCmdDestUserExit; 
-            txt=qtn_options_exit; 
-            }
-         };
-  }
-  
-// -----------------------------------------------------------------------------
-//   
-//    r_select_netw_conn_menubar
-//    menubar for the settings view 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_select_netw_conn_menubar
-	{
-    titles=
-		{
-        MENU_TITLE { menu_pane=r_select_netw_conn_menu; 
-                     txt="App"; }
-	    };
-	}		
-	
-// -----------------------------------------------------------------------------
-//   
-//    r_select_netw_conn_menu
-//    menu pane for destination list 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_select_netw_conn_menu
-	{
-    items=
-		    {
-		     MENU_ITEM 
-		         { 
-		          command = ECmManagerUiCmdDestSelect; 
-              txt = qtn_set_cmd_select;
-              }
-         ,MENU_ITEM 
-              {
-            	command = ECmManagerUiCmdCMSelect;
-            	txt = qtn_netw_conset_options_select_method;
-            	}            
-          ,MENU_ITEM 
-            	{
-            	command = EAknCmdHelp; 
-            	txt = qtn_options_help;
-            	}
-				};
-	}
-
-// -----------------------------------------------------------------------------
-//
-//    r_dest_dialog
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_dest_dialog
-    {
-    flags = EEikDialogFlagWait | 
-            EEikDialogFlagNoDrag |
-            EEikDialogFlagNoTitleBar | 
-            EEikDialogFlagFillAppClientRect |
-            EEikDialogFlagCbaButtons;
-    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT;
-    items =
-        {
-        DLG_LINE
-            {
-            type = KDestListboxType;
-            id = KDestListboxId;
-            itemflags = EEikDlgItemTakesEnterKey;
-            control= LISTBOX { flags = EAknListBoxSelectionList;};
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//   
-//   r_dest_listbox 
-//   List of individual settings
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_dest_listbox
-	{
-	flags = EAknListBoxSelectionList;
-	}
-
-
-//-----------------------------------------------------------------------------
-// Menu bars
-// -----------------------------------------------------------------------------
-//   
-//    r_cm_menubar
-//    menubar for the settings view 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cm_menubar
-	{
-    titles=
-		{
-        MENU_TITLE { menu_pane=r_cm_menu; txt="App"; }
-	    };
-	}
-// -----------------------------------------------------------------------------
-//   
-//    r_cm_menu
-//    menu pane for cmination list 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cm_menu
-  {
-    items=
-        {
-         MENU_ITEM 
-             { 
-              command = ECmManagerUiCmdCmEdit; 
-              txt = qtn_netw_conset_options_edit; 
-              flags = EEikMenuItemAction;
-              },
-         MENU_ITEM 
-             { 
-        			command = ECmManagerUiCmdCmAdd; 
-        			txt = qtn_netw_conset_options_add_method;
-            	},
-     		 MENU_ITEM 
-        		 { 
-        			command = ECmManagerUiCmdCmRename; 
-        			txt = qtn_netw_conset_options_rename_method;
-            	flags = EEikMenuItemSpecific;
-        			},
-         MENU_ITEM 
-          		{ 
-        			command = ECmManagerUiCmdCmDelete; 
-            	txt = qtn_netw_conset_options_delete_method;
-            	flags = EEikMenuItemSpecific;
-            	},
-        	MENU_ITEM 
-          	  {
-            	command = ECmManagerUiCmdCmPrioritise; 
-            	txt = qtn_netw_conset_options_prioritise; 
-            	flags = EEikMenuItemSpecific;
-            	},
-        	MENU_ITEM 
-           	 { 
-            	command = ECmManagerUiCmdCmMoveToOtherDestination; 
-            	txt = qtn_netw_conset_options_move_to_dest;
-            	flags = EEikMenuItemSpecific;
-            	},
-        	MENU_ITEM 
-            	{ 
-            	command = ECmManagerUiCmdCmCopyToOtherDestination; 
-            	txt = qtn_netw_conset_options_copy_to_dest;
-            	flags = EEikMenuItemSpecific;
-            	},
-        	MENU_ITEM 
-            	{ 
-            	command = EAknCmdHelp; 
-            	txt = qtn_options_help;
-            	},
-        	MENU_ITEM 
-          	  { 
-            	command = ECmManagerUiCmdCmUserExit; 
-            	txt = qtn_options_exit; 
-            	}
-    		};
-  }
-
-// -----------------------------------------------------------------------------
-// r_softkeys_options_cancel__connect
-// option/add method/cancel button set
-// -----------------------------------------------------------------------------
-RESOURCE CBA r_softkeys_options_back__edit
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyOptions;       txt = text_softkey_option; },
-        CBA_BUTTON { id = EAknSoftkeyBack;          txt = text_softkey_back; },
-        CBA_BUTTON { id = ECmManagerUiCmdCmEdit;    txt = qtn_msk_edit; }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-// r_softkeys_prio_ok_cancel__ok
-// ok/ok/cancel button set for prioritise
-// -----------------------------------------------------------------------------
-RESOURCE CBA r_softkeys_prio_ok_cancel__ok
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = ECmManagerUiCmdCmPrioOk;       txt = text_softkey_ok; },
-        CBA_BUTTON { id = ECmManagerUiCmdCmPrioCancel;   txt = text_softkey_cancel; },
-        CBA_BUTTON { id = ECmManagerUiCmdCmPrioOk;       txt = text_softkey_ok; }
-        };
-    }
-
-    
-// -----------------------------------------------------------------------------
-//
-//    r_cm_dialog
-//
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_cm_dialog
-    {
-    flags = EEikDialogFlagWait | 
-            EEikDialogFlagNoDrag |
-            EEikDialogFlagNoTitleBar | 
-            EEikDialogFlagFillAppClientRect |
-            EEikDialogFlagCbaButtons | 
-            EEikDialogFlagNotifyEsc;
-    buttons = r_softkeys_options_back__edit;
-    items =
-        {
-        DLG_LINE
-            {
-            type = KCmListboxType;
-            id = KCmListboxId;
-            itemflags = EEikDlgItemTakesEnterKey;
-            control= LISTBOX { flags = EAknListBoxSelectionList;};
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//   r_cm_listbox 
-//   List of individual settings
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_cm_listbox
-	{
-	flags = EAknListBoxSelectionList;
-	}
-	
-// -----------------------------------------------------------------------------
-//    r_plugin_base_menubar
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_plugin_base_menubar
-    {
-    titles=
-        {
-        MENU_TITLE { menu_pane=r_plugin_base_menu; txt="A"; }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//    r_plugin_base_menu
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_plugin_base_menu
-    {
-    items=
-        {
-        MENU_ITEM 
-            { 
-            command = EPluginBaseCmdChange; 
-            txt = qtn_set_options_change; 
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM 
-            { 
-            command = EPluginBaseCmdAdvanced;
-            txt = qtn_set_options_ap_advanced; 
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdHelp; 
-            txt=qtn_options_help;
-            },
-        MENU_ITEM 
-            { 
-            command = EPluginBaseCmdExit; 
-            txt = qtn_options_exit; 
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-// r_softkeys_options_back__change
-// option/add connection/cancel button set
-// -----------------------------------------------------------------------------
-RESOURCE CBA r_softkeys_options_back__change
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyOptions;   txt = text_softkey_option; },
-        CBA_BUTTON { id = EAknSoftkeyBack;      txt = text_softkey_back; },
-        CBA_BUTTON { id = EAknSoftkeyChange;    txt = qtn_msk_change; }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//    r_plugin_base_dialog
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_plugin_base_dialog
-    {
-    flags= EEikDialogFlagWait | 
-           EEikDialogFlagNoDrag | 
-           EEikDialogFlagNoTitleBar |
-           EEikDialogFlagFillAppClientRect |
-           EEikDialogFlagCbaButtons;
-
-    buttons = r_softkeys_options_back__change;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtSettingListBox;
-            id = KPluginBaseListboxId;
-            control= LISTBOX { flags = EEikListBoxMultipleSelection;};
-            }
-        };
-    }
-
-RESOURCE LISTBOX r_listbox_ap_settings
-    {
-    flags = EEikListBoxMultipleSelection;
-    }
-    
-// Ap data editor resources
-// Connection name
-
-RESOURCE EDWIN r_setting_app_edwin_conn_name
-    {
-    width=KConnNameWidth;
-    lines=KConnNameLines;
-    maxlength=KMaxConnNameLength;
-    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorTextInputMode;
-    flags= EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
-    }
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_conn_name
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_ap_conn_name;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_conn_name;
-    }
-    
-RESOURCE DIALOG r_ok_note
-    {
-    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EGeneralLayout;
-                animation = R_QGN_NOTE_OK_ANIM;
-                };
-            }
-        };
-    }    
-
-RESOURCE DIALOG r_info_note
-    {
-    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EGeneralLayout;
-                animation = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }    
-
-
-RESOURCE DIALOG r_warning_note
-    {
-    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EGeneralLayout;
-                animation = R_QGN_NOTE_WARNING_ANIM;
-                };
-            }
-        };
-    }    
-
-
-RESOURCE DIALOG r_error_note
-    {
-    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons | EEikDialogFlagWait;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EGeneralLayout;
-                animation = R_QGN_NOTE_ERROR_ANIM;
-                };
-            }
-        };
-    }    
-
-
-RESOURCE DIALOG r_confirmation_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationLayout;
-                };  // AVKON_CONFIRMATION_QUERY
-            }   // DLG_LINE
-        };  // items
-    }   // DIALOG
-
-RESOURCE DIALOG r_memory_full_confirmation_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationLayout;
-                animation = R_QGN_NOTE_WARNING_ANIM;
-                };  // AVKON_CONFIRMATION_QUERY
-            }   // DLG_LINE
-        };  // items
-    }   // DIALOG    
-
-RESOURCE DIALOG r_text_query
-    {
-    flags = EEikDialogFlagWait | EEikDialogFlagNoDrag |
-            EEikDialogFlagNoTitleBar | EEikDialogFlagCbaButtons |
-            EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_DATA_QUERY
-                {
-                layout = EDataLayout;
-                control = EDWIN
-                    {
-                    flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
-                    };  // EDWIN
-                };  // AVKON_DATA_QUERY
-            }   // DLG_LINE
-        };  // items
-    }   // DIALOG
-
-RESOURCE LISTBOX r_setting_app_listbox
-    {
-    flags = EEikListBoxMultipleSelection;
-    }
-
-RESOURCE AVKON_SETTING_PAGE r_radio_button_setting_page
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OPTIONS_CANCEL__SELECT;
-    menubar = r_select_netw_conn_menubar;
-    type =  EAknSetListBox;
-    editor_resource_id= r_setting_app_listbox;
-    }
-
-RESOURCE AVKON_SETTING_PAGE r_radio_button_setting_page_ok_cancel
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type =  EAknSetListBox;
-    editor_resource_id= r_setting_app_listbox;
-    }
-
-// --------------------------------------------------------------------------
-// 
-// Generic numeric setting edwin
-// --------------------------------------------------------------------------
-//
-RESOURCE EDWIN r_edwin_port_number_setting_page
-    {
-    width=KNumericPageWidth;
-    lines=KNumericPageLines;
-    maxlength=KMaxProxyPortNumberLength;
-    allowed_input_modes = EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorNumericInputMode;
-    default_case = EAknEditorLowerCase;
-    flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
-    avkon_flags = EAknEditorFlagLatinInputModesOnly;
-    numeric_keymap = EAknEditorPlainNumberModeKeymap;
-    }
-
-// --------------------------------------------------------------------------
-// r_port_number_setting_page
-// Port number setting page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_port_number_setting_page
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EEikCtEdwin;
-    editor_resource_id = r_edwin_port_number_setting_page;
-    }
-    
-
-RESOURCE DIALOG r_cmmanager_wait_note
-    {
-    flags = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = ECmWaitDialog;
-            control= AVKON_NOTE
-                {
-                layout = EWaitLayout;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-
-
-RESOURCE AVKON_LIST_QUERY r_cmmanager_list_query_with_msgbox
-    {
-    softkeys = R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT;
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagWait;
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            id = EListQueryControl;
-            control = AVKON_LIST_QUERY_CONTROL_WITH_MSGBOX
-                {
-                actuallisttype = EAknCtSingleGraphicPopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    flags = EAknListBoxSelectionList;
-                    };
-
-                heading = qtn_netw_conset_prmpt_add_to_destination;
-                };
-            }
-        };
-    }
-    
-// -----------------------------------------------------------------------------
-//
-//    r_iconsel_dialog
-//
-//
-// -----------------------------------------------------------------------------
-//
-
-RESOURCE DIALOG r_iconsel_dialog
-    {
-    flags = EGeneralQueryFlags | 
-            EEikDialogFlagNoBorder |
-            EEikDialogFlagNoShadow;
-    buttons =
-            R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupHeadingPane;
-            id = EAknSCTQueryHeadingId;
-            control = AVKON_HEADING
-                {
-                headinglayout = R_AVKON_SCT_LIST_HEADING_PANE;
-                };
-            },
-        DLG_LINE
-            {
-            type = KCmDestIconMapType;//0x2001
-            id = ECmDestIconMapContentId;
-            }
-        };
-    }    
-
-// ---------------------------------------------------------------------------
-// r_setting_app_edwin_proxy_server_addr
-// edwin for proxy server address setting page
-// ---------------------------------------------------------------------------
-//
-RESOURCE EDWIN r_setting_app_edwin_proxy_server_addr
-    {
-    width = KProxyServerWidth;
-    lines = KProxyServerLines;
-    maxlength = KMaxProxyServerLength;
-    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;
-    allowed_case_modes = EAknEditorLowerCase | EAknEditorUpperCase;
-    avkon_flags = EAknEditorFlagLatinInputModesOnly | EAknEditorFlagUseSCTNumericCharmap;
-    flags = EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks;
-    }
-
-// --------------------------------------------------------------------------
-// r_text_setting_page_proxy_server_addr
-// Proxy server address page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_proxy_server_addr
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_proxy_server_address;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_proxy_server_addr;
-    }
-
-// --------------------------------------------------------------------------
-// r_setting_app_edwin_starting_page
-// Starting Page edwin
-// --------------------------------------------------------------------------
-//
-RESOURCE EDWIN r_setting_app_edwin_starting_page
-    {
-    width=KStartPageWidth;
-    lines=KStartPageLines;
-    maxlength=KMaxStartPageLength;
-    numeric_keymap=EAknEditorAlphanumericNumberModeKeymap;
-    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_text_setting_page_starting_page
-// starting page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_starting_page
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_starting_page;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_starting_page;
-    }
-
-// ---------------------------------------------------------------------------
-// r_setting_app_edwin_login_name
-// edwin for login name page
-// ---------------------------------------------------------------------------   
-RESOURCE EDWIN r_setting_app_edwin_login_name
-    {
-    width = KLoginNameWidth;
-    lines = KLoginNameLines;
-    maxlength = KMaxLoginNameLength;
-    allowed_input_modes = EAknEditorTextInputMode | 
-                          EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorTextInputMode;
-    default_case = EAknEditorLowerCase;
-    flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
-    avkon_flags = EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly;    
-    }
-
-// ---------------------------------------------------------------------------
-// r_text_setting_page_login_name
-// setting page for login name
-// ---------------------------------------------------------------------------   
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_login_name
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label = qtn_set_ap_username;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_login_name;
-    }
-
-// --------------------------------------------------------------------------
-// r_setting_app_ip_editor
-// IP Editor
-// --------------------------------------------------------------------------
-//
-RESOURCE IP_FIELD_EDITOR r_setting_app_ip_editor
-    {
-    min_field_values = IP_FIELD
-        {
-        first_field = 0;
-        second_field = 0;
-        third_field = 0;
-        fourth_field = 0;
-        };
-    max_field_values = IP_FIELD
-        {
-        first_field = 255;
-        second_field = 255;
-        third_field = 255;
-        fourth_field = 255;
-        };
-    flags = 0;
-    }
-
-// --------------------------------------------------------------------------
-// r_text_setting_page_ip_addr
-// IspIPAddr page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_ip_addr
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_ip_address;
-    type = EAknCtIpFieldEditor;
-    editor_resource_id = r_setting_app_ip_editor;
-    }
-    
-// --------------------------------------------------------------------------
-// r_dnsip4_query
-// IP4 dialog
-// --------------------------------------------------------------------------
-//    
-RESOURCE DIALOG r_dnsip4_query
-	{
-	flags=EGeneralQueryFlags;
-	buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-	items=
-		{
-		DLG_LINE
-			{
-			type=EAknExtCtMultilineQuery;
-			id=EMultilineFirstLine;
-			control = AVKON_DATA_QUERY
-				{ 
-				layout = EMultiDataFirstIpEd;
-                label = qtn_set_primary_dns;
-                control = IP_FIELD_EDITOR
-                    {
- 					min_field_values = IP_FIELD
- 						{ 
- 						first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE;
- 						second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE;
- 						third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE;
- 						fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE;
- 						};
- 					max_field_values = IP_FIELD
- 						{
-						first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE;
-						second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE;
-						third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE;
-						fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE;
- 						};
- 					flags = 0;
-					};
- 				};
-			},
-		DLG_LINE
-			{
-             type = EAknExtCtMultilineQuery;
-             id = EMultilineSecondLine;
-             control = AVKON_DATA_QUERY
-                 {
-                 layout = EMultiDataSecondIpEd;
-                 label = qtn_set_secondary_dns;
-                 control = IP_FIELD_EDITOR
-                     {
-                     min_field_values = IP_FIELD
- 						{ 
-						first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE;
-						second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE;
-						third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE;
-						fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE;
- 						};
- 					max_field_values = IP_FIELD
- 						{
-						first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE;
-						second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE;
-						third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE;
-						fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE;
- 						};
- 					flags = 0;
-					};
- 				};
-			}
-		};
-	}
-
-// --------------------------------------------------------------------------
-// r_dnsip6_query
-// IP6 dialog
-// --------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_dnsip6_query
-	{
-	flags=EGeneralQueryFlags;
-	buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-	items=
-		{
-		DLG_LINE
-			{
-			type=EAknCtMultilineQuery;
-			id=EMultilineFirstLine;
-			control = AVKON_DATA_QUERY
-				{ 
-				layout = EMultiDataFirstEdwin;
-				label = qtn_set_primary_dns;
-				control = EDWIN
-				    {
-			    	avkon_flags = EAknEditorFlagLatinInputModesOnly;
-					flags=0;
-					width=16;
-					lines=1;
-					maxlength=KMaxIPv6NameServerLength;
-					default_input_mode = EAknEditorNumericInputMode;
-					};
-				};
-			},
-		DLG_LINE
-			{
-			type=EAknCtMultilineQuery;
-			id=EMultilineSecondLine;
-			control= AVKON_DATA_QUERY 
-				{ 
-				layout = EMultiDataSecondEdwin;
-				label = qtn_set_secondary_dns;
-				control=EDWIN 
-				    {
-                	avkon_flags = EAknEditorFlagLatinInputModesOnly;
-					flags= 0;
-					width=16;
-					lines=1;
-					maxlength=KMaxIPv6NameServerLength;
-					default_input_mode = EAknEditorNumericInputMode;
-					};
-				};
-			}
-		};
-	}
-
-// --------------------------------------------------------------------------
-// r_text_setting_page_ip
-// IPNameServer1 page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_ip
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_primary_dns;
-    type = EAknCtIpFieldEditor;
-    editor_resource_id = r_setting_app_ip_editor;
-    }
-
-// --------------------------------------------------------------------------
-// r_setting_app_edwin_passwd
-// login password secret input box
-// --------------------------------------------------------------------------
-//
-RESOURCE SECRETED r_setting_app_edwin_passwd
-    {
-    num_letters=KMaxLoginPasswordLength;
-    }
-    
-// --------------------------------------------------------------------------
-// r_text_setting_page_login_passwd
-// login password page
-// --------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_passwd
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_ap_passwd;
-    type = EEikCtSecretEd;
-    editor_resource_id = r_setting_app_edwin_passwd;
-    }
-
Binary file cmmanager/cmmgr/Framework/conf/cmmanager.confml has changed
Binary file cmmanager/cmmgr/Framework/conf/cmmanager_10207376.crml has changed
--- a/cmmanager/cmmgr/Framework/loc/cmmanager.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1070 +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:  Localization file.
-*
-*/
-
-//  LOCALISATION STRINGS
-
-//============================================================================
-// GENERAL SETTINGS VIEW
-//============================================================================
-//d: Network destinations setting item under General Settings/Connection Settings
-//l: list_single_large_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_network_connections "Network destinations"
-
-//=============================================================================
-//  DESTINATION VIEW
-//=============================================================================
-
-//-----------------------------------------------------------------------------
-// Options Menu Items
-//-----------------------------------------------------------------------------
-
-//d: Options menu text. Edit the highlighted item, used for destination and 
-//d: connection methods views
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_edit    "Edit"
-
-
-//d: Options menu text. Opens a radio button page to select default conneciton
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_default_connection "Default Connection"
-
-//d: Options menu text, subitem of Manage. Adds a new destination
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_add_destination    "Add destination"
-
-//d:Options menu text, subitem of Manage
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_rename_destination    "Rename destination"
-
-//d:Options menu text, subitem of Manage
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_change_dest_icon    "Change icon"
-
-//d:Options menu text, subitem of Manage
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_delete_destination    "Delete destination"
-
-
-//d: Destination name query prompt text 
-//l: popup_query_data_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_destination_name "Destination name: "
-
-//d: Title text for destination icon selection dialog.
-//l: heading_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_select_icon "Select an icon:"
-
-
-//d: Connection method name query prompt text 
-//l: popup_query_data_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_method_name "Connection method name:"
-
-//d: Connection method delete query text 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_delete_method "Delete connection method ’%U’?"
-
-//d: Connection method delete info text 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_protected_method "Unable to delete protected connection method"
-
-//d: Connection method delete info text 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_method_in_use "Connection method currently in use. Unable to delete."
-
-//d: Destination delete query text 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_delete_destination "Delete destination ’%U’ and associated connection methods?"
-
-//d: Destination delete info text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_dest_in_use "Destination currently in use. Unable to delete."
-
-//d: Note to indicate the the selected connection method cannot be currently edited as it is being used
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_set_note_ap_in_use_edit "Connection method is currently in use. Unable to edit."
-
-//d: Destination delete info text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_dest_protected  "Unable to delete protected destination"
-
-//d: Destination name info text, shown when destination name already exists
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_name_already_in_use  "Name ’%U’ already in use"
-
-//d: Embedded Destination delete query text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_delete_embedded_dest  "Link cannot be restored by user. Delete anyway?"
-
-//d: Common text used to indicate that a destination or connection method
-//d: cannot be edited if it is protected
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_edit_protected  "Unable to edit protected settings"
-
-//-----------------------------------------------------------------------------
-// List Items
-//-----------------------------------------------------------------------------
-
-//d: The name of a new, default connection. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_add_connection "Add connection"
-
-//d: The group of legacy access points
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_dest_uncategorized "Uncategorized"
-
-//d: Destination list text. The second line for qtn_netw_conset_add_connection 
-//d: Indicates that selecting the item will start the UI for adding a
-//d: a connection method
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_add_connection_method "New connection method"
-
-//d: Destination list text, notes the number of connections methods
-//d: belonging to the destination
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conn_methods_amount_many    "%N connection methods"
-
-//d: Destination list text. Notes that the destination has one 
-//d: connection method
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conn_methods_amount_one      "1 connection method"
-
-//d: Destination list text. Notes that the destination is empty
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conn_methods_amount_none      "No connection methods"
-
-//-----------------------------------------------------------------------------
-// Status Pane
-//-----------------------------------------------------------------------------
-
-//d: Destination list title text
-//l: title_pane_t2/opt9
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_network_connections_title "Network destinations"
-
-//d: Destination list text. Shows the number of configured destinations in the 
-//d: navi pane
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_nof_destinations "%N destinations defined"
-
-//d: Destination list text. Shows the number of configured destinations in the 
-//d: navi pane
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_one_destination "1 destination defined"
-
-//d: Destination list text. Shows the default connection in the 
-//d: navi pane
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_default "Default: %U"
-
-//d: Destination list text. Shows that the default connection
-//d: is Always ask
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_default_always_ask "Default: Always ask"
-
-//d: Destination list text. Shows that the default connection
-//d: is Ask once
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_default_ask_once "Default: Ask once"
-
-//=============================================================================
-//  CONNECTION METHOD VIEW
-//=============================================================================
-
-//-----------------------------------------------------------------------------
-// Options Menu Items
-//-----------------------------------------------------------------------------
-
-//d: Connection method list text. Starts a wizard for adding a 
-//d: new connection method
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_add_method "Add connection method"
-
-//d: Connection method list text. Renames the highlighted connection methof
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_rename_method "Rename"
-
-//d: Connection method list text. Deletes the highlighted connection method
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_delete_method "Delete"
-
-
-//d:Connection method list text. Prioritise the highlighted connecton method
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_prioritise "Prioritise"
-
-//d: Connection method list text. Moves the highlighted connection method
-//d: to a selected target destination
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_move_to_dest "Move to other destination"
-
-//d: Connection method list text. Copies the highlighted connection method
-//d: to a selected target destination
-//l: list_single_popup_submenu_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_copy_to_dest "Copy to other destination"
-
-//-----------------------------------------------------------------------------
-// List Items
-//-----------------------------------------------------------------------------
-
-//d: Connection method list text. Indicates the priority of the 
-//d: connection method
-//l: list_double_graphic_pane_t2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_method_priority_other "Priority %N connection method "
-
-//d: Shown if the method is bound to a destination.
-//l: list_double_graphic_pane_t2
-//w:
-//r: 5.1
-//
-#define qtn_netw_conset_method_priority_auto "Priority: Automatic"
-
-//d: Connection method list text. The name of an embedded destination
-//l: list_double_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_embedded_dest "Link to '%U'"
-
-//d: Connection method list popup note. Text shown in a toolip (info popup)
-//d: which is prefixed to the Bearer type of the highlighted connection method
-//l: popup_preview_text_window_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_popup_title_data_bearer "Data Bearer: "
-
-//d: Connection method list popup note. WLAN Bearer type shown in info popup
-//l: popup_preview_text_window_t1
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_popup_bearer_wlan "Wireless LAN"
-
-//d: Connection method list popup note. 
-//d: Packet Data Bearer type shown in info popup
-//l: popup_preview_text_window_t1
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_popup_bearer_packet_data "Packet data"
-
-//d: Connection method list empty text. 
-//d: Shown if there are no connection methods
-//l: main_pane_empty_t1/opt2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_empty_method_view_primary "No connection methods"
-
-//d: Connection method list empty text. Second line in the list item if
-//d: no connection methods exist. Indicates how to create one.
-//l: main_list_empty_pane/opt2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_empty_method_view_secondary "Select Add connection method from Options menu to define a method "
-
-//d: radio button popup menu title text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_destination "Network connection"
-
-//d: radio button popup menu title text
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_always_ask "Always ask"
-
-
-//d: radio button popup menu title text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_default_connection_title "Default connection"
-
-//d: radio button popup menu text
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_ask_once "Ask Once"
-
-//d: radio button popup menu text
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_default_connection "Default Connection"
-
-//d: radio button popup menu text
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_user_defined "User Defined"
-
-//d: radio button popup options menu text
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_set_cmd_select "Select"
-
-//d: popup options menu text
-//l: list_single_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_options_select_method "Choose connection method"
-
-//d: First line of a double large graphic style listbox - WLAN specific
-//l: list_double_large_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_available_wlan "Wireless LAN"
-
-//d: Second line of a double large graphic style listbox - WLAN specific
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_one_wlan_nw_available "1 network available"
-
-//d: Second line of a double large graphic style listbox - WLAN specific
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_many_wlan_nw_available "%N networks available"
-
-//-----------------------------------------------------------------------------
-// Status Pane
-//-----------------------------------------------------------------------------
-
-//d: Connection method view. Indicates that there is one connection method 
-//d: in the current destination
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_one_conn_method "1 conn. method"
-
-//d: Connection method view. Indicates the number of connection methods 
-//d: in the current destination
-//l: navi_text_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_navi_many_conn_methods "%N conn. methods"
-
-//-----------------------------------------------------------------------------
-// Soft Keys
-//-----------------------------------------------------------------------------
-
-//d: Middle soft key whose action is to start the wizard for adding 
-//d: a connection method from the connection method view
-//d: 
-//l: control_pane_t3/opt7
-//w: 
-//r: 3.2
-//
-#define qtn_msk_add_method "Add method"
-
-//-----------------------------------------------------------------------------
-// Strings used in dialogs
-//-----------------------------------------------------------------------------
-
-//d: Confirmation query used to ask the user if he/she wants to check for
-//d: available connection methods automatically.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_check_conn_methods "Automatically check for available connection methods?"
-
-//d: String used to inform user what is going on while the dialog is displayed.
-//l: popup_note_wait_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_wait_checking_methods "Checking connection methods..."
-
-//d: Question asked from the user when automatic configuration has failed. User
-//d: must answer if he/she wants to proceed with manual configuration.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_conf_method_manually "Could not automatically detect availability. Do you want to configure manually?"
-
-//d: Title of "Available methods:" list query.
-//l: heading_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_available_methods "Available methods:"
-
-//d: Title of "Select connection method:" list query.
-//l: heading_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_select_conn_method "Select connection method:"
-
-//d: Title of "Select destination:" list query.
-//l: heading_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_add_to_destination "Select destination:"
-
-//d: Heading text used in "Select destination:" list query.
-//l: loc_type_pane
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_detail_add_to_destination "What destination or service you want to access via this method?"
-
-//d: Text of an information note used to ensure the user the a new connection
-//d: method has been added successfully.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conf_new_method_added "New connection method for '%U' added"
-
-//d: Text of an information note used to ensure the user the a new destination
-//d: has been created successfully.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conf_new_dest_added "New destination '%U' created"
-
-//d: Confirmation query text shown when user enters empty Conn methods view.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_quest_add_method "No connection methods for '%U' defined. Define one now?"
-
-//d: Warning about having no destinations in Destinations view when trying to
-//d: create a new connection method.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_no_destinations "No destinations defined. Create one first."
-
-//d: Warning about having no unprotected destinations in Destinations view when trying to
-//d: create a new connection method.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_new_conset_info_cannot_add_all_dest_protected "Unable to add to any existing destination. All destinations are protected. Create a new one."
-
-//d: Warning shown when user tries to prioritise a conn. method 'over' an embedded destination
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_prio_not_possible "Priority not possible"
-
-
-//d: Text of an information note used to ensure the user the a new default destination
-//d: has been set successfully.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-
-#define qtn_netw_conset_default_connection_set_to "Default connection set to '%U'"
-
-//d: Text of an information note used to ensure the user the new default destination
-//d: has been set successfully when it is set to always ask
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conf_default_always_ask "Default connection set to 'Always Ask'"
-
-//d: Text of an information note used to ensure the user the new default destination
-//d: has been set successfully when it is set to ask once
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conf_default_ask_once "Default connection set to 'Ask Once'"
-
-//=============================================================================
-// FRAMEWORK BASE STRINGS
-//=============================================================================
-
-//d: The name of a Internet destination. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_dest_internet "Internet"
-
-//d: The name of a "WAP services" destination. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_dest_wap "WAP services"
-
-//d: The name of a "Multimedia message" destination. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_dest_mms "Multimedia message"
-
-//d: The name of a "Intranet" destination. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_double_large_graphic_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_dest_intranet "Intranet"
-
-//=============================================================================
-// PLUGIN BASE STRINGS
-//=============================================================================
-
-//d: Item text in setting list.
-//d: The name of the connection
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_set_ap_conn_name "Connection name"
-
-//d: Name of the data bearer.
-//d: Used in Connection method view.
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_ap_bearer "Data bearer"
-
-//d: Command in options menu in access points view.
-//d: Modifies the currently selected access point.
-//l: list_single_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_set_options_change "Change"
-
-
-//d: Command in options menu in access points view.
-//d: Opens advanced settings for the access point.
-//l: list_single_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_set_options_ap_advanced "Advanced settings"
-
-//d: Command in options menu.
-//d: Opens help application with context sensitive help.
-//l: list_single_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_set_options_help "Help"
-
-
-//d: Command in options menu.
-//d: Exits access point settings.
-//l: list_single_pane_t1_cp2
-//w:
-//r: 3.2
-//
-#define qtn_set_options_exit "Exit"
-
-//d: Bearer type cannot be modified info text 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_bearer_not_editable "Unable to edit data bearer type once selected. Define a new connection method."
-
-//d:Item text in setting list for password.
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_ap_passwd "Password"
-
-//
-//SMTP Settings
- 
-//d: Setting list item text to access smtp settings.
-//l: list_double2_pane
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_sett_smtp_override "Outgoing mail server settings"
-
-//d: SMTP outgoing mail server setting text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mce_settings_mail_sending_h "Outgoing mail server"
-
-//d: Error note for when invalid server/IP data is input
-//d: in relation to the Outgoing mail server setting
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_srvr_prompt "Please, insert proper server name."
-
-//d: SMTP User name setting text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mce_settings_mail_user_name "User name"
-
-//d: SMTP Password setting text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mce_settings_mail_password "Password"
-
-//d: SMTP Security setting text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mce_settings_mail_security "Security"
-
-//d: Security setting is set to 'on' with Start TLS
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_sec_starttls "STARTTLS"
-
-//d: Security setting is set to 'on' with SSL TLS
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_sec_ssltls "SSL/TLS"
-
-//d: Security setting set to 'off'
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_sec_off "Off"
-
-//d: SMTP Port number setting text
-//l: list_setting_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mce_settings_mail_port "Port"
-
-//d: SMTP Port number setting to 'default'
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_port_def "Default"
-
-//d: SMTP Port number setting to 'User defined'
-//l: list_set_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_mbxs_settings_mail_port_userdef "User defined"
-
-//d: Note after the last legacy IAP from "Uncategorized" group
-//d: is deleted
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_uncat_empty "Uncategorized folder is empty and will be removed"
-
-//d: The name of a new, default connection. Max.30 chars, 
-//d: longer ones will be truncated.
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_ap_default_name "Connection"
-
-//d: Error message when user wants to delete a connection method that is 
-//d: linked to a virtual connection method.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_virtual_ref "Unable to delete referenced method"
-
-//d: Item text in setting list.
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_starting_page "Homepage"
-
-//d: Connection method list text
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_home_page_none "None"
-
-//d: Invalid ip address note text
-//l: popup_note_window
-//w:
-//r: 3.2
-//
-#define qtn_set_info_invalid_ip "Invalid IP address"
-
-//d: Connection method settings query text 
-//d: displayed when there are empty compulsory settings 
-//d: and user presses 'back' from settings view 
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_quest_iap_incomplete_delete "Incomplete access point details. Exit without saving?"
-
-//d:Domain name servers 'User defined'
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-#define qtn_set_ip_user_defined "User defined"
-
-//d:Item text in setting list. Offers IPv4 settings to be changed
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define  qtn_set_ipv4_settings "IPv4 settings"
-
-//d:Item text in setting list. Offers IPv6 settings to be changed
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define  qtn_set_ipv6_settings "IPv6 settings"
-
-//d:Item text in setting list. "Phone IP address"
-//l:list_setting_pane_t1 
-//w:
-//r:3.2
-//
-#define qtn_set_ip_address "Phone IP address"
-
-//d:Default value for "Phone ip address" item. 'Automatic'
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-#define qtn_set_ip_address_dynamic "Automatic"
-
-//d:Item text in setting list.
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_primary_dns "Primary Name Server"
-
-//d:Item text in setting list.
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_secondary_dns "Secondary Name Server"
-
-//d:Item text in setting list. "Proxy server address"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_proxy_server_address "Proxy server address"
-
-//d: Proxy server address 'None'
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_proxy_server_address_none "None"
-
-//d: Item text in setting list  for Proxy port number
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_proxy_port_number "Proxy port number"
-
-//d:Item text in setting list. Entrance for the Domain name servers settings
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define  qtn_set_dns_servers_ip "Domain name servers"
-
-//d:Domain name servers 'Automatic'
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-#define qtn_set_dns_servers_automatic "Automatic"
-
-//d:Domain name servers 'Well-known'
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-#define qtn_set_ip_well_known "Well-known"
-
-//d: Item text in setting list. "User name"
-//l: list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_ap_username "User name"
-
-//d: Answer to: qtn_set_passwd_aut,
-//d: whether password authentication is secure or normal
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_passwd_aut_secure "Secure"
-
-//d: Answer to: qtn_set_passwd_aut,
-//d: whether password authentication is secure or normal
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_passwd_aut_normal "Normal"
-
-//d: Item text for empty user name in setting list
-//l: list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_ap_username_none "None"
-
-//d: Item text in setting list. "Prompt password"
-//l: list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_prompt_passwd "Prompt password"
-
-//d: Item text in setting list for not prompting for password.
-//l: list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_prompt_passwd_no "No"
-
-//d: Item text in setting list for prompting for password.
-//l: list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_set_prompt_passwd_yes "Yes"
-
-//d: Item text in setting list.
-//d: Indicates whther password authentication is secure or normal
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_passwd_aut "Authentication"
-
-//d:Defines the WLAN subnet mask to be used
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_sett_subnet_mask "Subnet mask"
-
-//d:Defines the WLAN default gateway to be used
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_sett_default_gateway "Default gateway"
-
-//d: Error note when user tries to delete a destination 
-//d: which contains one or more protected connection methods
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_delete_dest_prot_cm "Unable to delete destination; contains protected connection methods."
-
-//d: Denied execution of management-like functions on protected destinations info text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_perform_for_protected "Unable to perform due to protection"
-
-//d: No existing unprotected destinations to add to info text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_cannot_add_all_dest_protected "Unable to add to any existing destination. Destinations are protected. Create a new one."
-
-//d: VPN CM (re)placement failure (due to circular referencing) info text
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_no_vpn_stacking "Unable to proceed. VPN connections cannot be stacked."
-
-// End of file
--- a/cmmanager/cmmgr/Plugins/Group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information for the Plugins \ Connection Method manager
-*
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// None
-
-PRJ_MMPFILES
-// None
-
-
-#include "../cmpluginpacketdata/group/bld.inf"
-#include "../cmpluginlan/group/bld.inf"
-#include "../cmpluginwlan/group/bld.inf"
-#include "../cmpluginembdestination/group/bld.inf"
-#include "../cmpluginvpn/group/bld.inf"
-
-// End of File
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/data/1020737D.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:  Embedded Destination Plug-in resource file
-*
-*/
-
-#include "ecom/registryinfo.rh"
-
-// Because attribute enums had to be added to namespace CMManager
-// it's not possible to included cmpluginpacketdata.hrh.
-// Thus bearer type id had to be redefine here.
-#define KEmbeddedDestination  0x10207379
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid = 0x1020737D;
-	interfaces = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = KEmbeddedDestination;
-					version_no = 1;
-					display_name = "Embedded Destination";
-					default_data = "EmbeddedDestination";
-					opaque_data = "";
-					}
-				};
-			}
-		};
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/data/cmpluginembdestinationui.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +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:  Embedded Destination plug-in's UI resources
-*
-*/
-
-#include <avkon.rsg>
-#include <avkon.rh>	
-#include <avkon.loc>
-#include <uikon.rh>
-#include <eikon.rh>
-#include "eikon.rsg"
-#include <AvkonIcons.hrh>
-
-NAME    EDES
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf = "cmpluginembdestination"; }
-
-
-// LOCALISED STRINGS
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information for the Embedded Destination plug-in.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-./cmpluginembdestination.mmp
-
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/group/cmpluginembdestination.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project specification for Embedded Destination plug-in
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET      cmpluginembdestination.dll
-UID         0x10009D8D 0x1020737D
-
-TARGETTYPE		PLUGIN
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH  ../src
-
-SOURCE      cmpluginembdestinationproxy.cpp
-SOURCE      cmpluginembdestination.cpp
-SOURCE      ../../../Framework/Src/cmlogger.cpp
-
-SOURCEPATH  ../data
-
-START RESOURCE 1020737D.rss
-TARGET cmpluginembdestination.rsc
-END
-
-START RESOURCE cmpluginembdestinationui.rss
-HEADER
-TARGETPATH   RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE     ../../../Framework/Inc
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY	ECOM.LIB
-LIBRARY cmmanager.lib
-LIBRARY COMMSDAT.lib
-LIBRARY	CommonEngine.lib
-LIBRARY cone.lib
-LIBRARY efsrv.lib
-LIBRARY bafl.lib
-DEBUGLIBRARY flogger.lib
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/inc/cmpluginembdestination.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +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:  Declaration of CCmPluginEmbDestination
-*
-*/
-
-#ifndef EMBEDDEDDESTINATION_PLUGIN_H
-#define EMBEDDEDDESTINATION_PLUGIN_H
-
-#include <cmpluginbaseeng.h>
-#include <cmpluginembdestinationdef.h>
-
-/**
- *  Embedded Destination Plugin IF implementation class
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmPluginEmbDestination) : public CCmPluginBaseEng
-    {
-    public:     // Constructors and destructor
-
-        /**
-        * Two phased constructor. Leaves on failure.
-        * @param - aInitParam initialization parameters for plug-ins.
-        * @return The created object.
-        */      
-        static CCmPluginEmbDestination* NewL( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Destructor.
-        */      
-        virtual ~CCmPluginEmbDestination();
-
-        virtual CCmPluginBaseEng* CreateInstanceL( 
-                                        TCmPluginInitParam& aInitParam ) const;
-
-    public: // From CCmPluginBaseEng
-
-        virtual TUint32 GetIntAttributeL( const TUint32 aAttribute ) const;
-        virtual TBool GetBoolAttributeL( const TUint32 aAttribute ) const;
-        virtual HBufC* GetStringAttributeL( const TUint32 aAttribute ) const;
-        virtual HBufC8* GetString8AttributeL( const TUint32 aAttribute ) const;
-        virtual void SetBoolAttributeL( const TUint32 aAttribute, 
-                                        TBool aValue );
-        virtual void SetStringAttributeL( const TUint32 aAttribute, 
-                                          const TDesC16& aValue );
-        virtual void UpdateL();
-        virtual CCmDestinationImpl* Destination() const;
-
-        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        virtual TBool CanHandleIapIdL( CommsDat::CCDIAPRecord *aIapRecord ) const;
-
-        virtual TBool DeleteL( TBool aForced,
-                               TBool aOneRefAllowed = ETrue );
-        virtual void LoadL( TUint32 aIapId );
-        virtual void CreateNewL();
-
-        virtual TInt RunSettingsL();
-
-        /**
-        * From CCmPluginBaseEng
-        * see base class definition
-        *
-        * @since S60 3.2
-        */
-        virtual TBool InitializeWithUiL( TBool aManuallyConfigure );
-
-        virtual TBool IsMultipleReferencedL();
-
-        virtual void LoadServiceSettingL();
-        virtual void LoadBearerSettingL();
-
-        virtual void ServiceRecordIdLC( HBufC* &aServiceName, 
-                                        TUint32& aRecordId );
-
-        virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                       TUint32& aRecordId);
-
-        virtual void AdditionalReset(){};
-
-        virtual CCmPluginBaseEng* CreateCopyL() const;
-        
-        virtual TBool IsLinkedToSnap( TUint32 aSnapId );
-
-    private: // Constructors
-
-        /**
-        * Constructor.
-        */      
-        CCmPluginEmbDestination( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Second phase constructor. Leaves on failure.
-        * @param
-        */      
-        void ConstructL();
-
-    private: // From CCmPluginBaseEng
-
-        virtual void CreateNewServiceRecordL();
-        virtual void CreateNewBearerRecordL();
-        virtual void CopyAdditionalDataL( CCmPluginBaseEng* aDestInst ) const;
-
-    private: // Data
-
-        CCmDestinationImpl* iDestination;
-        TInt                iLoadResult;
-        TUint32             iCmId;
-	};
-
-#endif // EMBEDDEDDESTINATION_PLUGIN_H
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/src/cmpluginembdestination.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,624 +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:  Implementation of CCmPluginEmbDestination
-*
-*/
-
-#include "cmdestinationimpl.h"
-#include "cmpluginembdestination.h"
-#include "datamobilitycommsdattypes.h"
-#include "cmmanagerimpl.h"
-#include "cmlogger.h"
-#include <ecom/ecom.h>		// For REComSession
-#include <StringLoader.h>
-#include <cmpluginembdestinationui.rsg>
-#include <data_caging_path_literals.hrh>
-#include <cmmanager.rsg>
-#include <bautils.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-_LIT( KPluginEmbDestinationDataResDirAndFileName, 
-      "z:cmpluginembdestinationui.rsc" );
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::NewL()
-// ---------------------------------------------------------------------------
-//
-CCmPluginEmbDestination* CCmPluginEmbDestination::NewL( 
-                                                TCmPluginInitParam* aInitParam )
-	{
-	CCmPluginEmbDestination* self = 
-	                        new( ELeave ) CCmPluginEmbDestination( aInitParam );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::~CCmPluginEmbDestination()
-// ---------------------------------------------------------------------------
-//
-CCmPluginEmbDestination::~CCmPluginEmbDestination()
-	{
-	RemoveResourceFile( KPluginEmbDestinationDataResDirAndFileName );
-	
-    if(iDestination)
-        {
-        delete iDestination;
-        iDestination = NULL;
-        }	
-	
-	CLOG_CLOSE;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginEmbDestination::CreateInstanceL
-// ----------------------------------------------------------------------------
-//
-CCmPluginBaseEng* 
-    CCmPluginEmbDestination::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
-    {
-    CCmPluginEmbDestination* self = new( ELeave ) CCmPluginEmbDestination( &aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CCmPluginEmbDestination()
-// ---------------------------------------------------------------------------
-//
-CCmPluginEmbDestination::CCmPluginEmbDestination( 
-                                                TCmPluginInitParam* aInitParam )
-    : CCmPluginBaseEng( aInitParam )
-	{
-	CLOG_CREATE;
-	
-	iBearerType = KUidEmbeddedDestination;
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::ConstructL()
-	{
-	// Nothing is needed from CCmPluginBaseEng.
-	AddResourceFileL( KPluginEmbDestinationDataResDirAndFileName );
-	}
-	
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::GetIntAttributeL()
-// ---------------------------------------------------------------------------
-//
-TUint32 
-    CCmPluginEmbDestination::GetIntAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::GetIntAttributeL" );
-
-	TUint32 retVal( 0 );
-	
-    switch( aAttribute )
-        {
-        case ECmBearerType:
-            {
-            retVal = iBearerType;
-            }
-            break;
-            
-        case ECmId: 
-            {
-            retVal = iCmId;
-            }
-            break;
-        
-        case ECmIapId:
-            {
-            User::Leave(KErrNotSupported);
-            }
-            break;
-        
-        case ECmBearerIcon:
-            {
-            retVal = (TUint32)iDestination->IconL();    
-            }
-            break;
-            
-        case ECmDefaultPriority:
-        case ECmDefaultUiPriority:
-            {
-            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
-            }
-            break;
-            
-        case ECmExtensionLevel:
-            {
-            retVal = KExtensionBaseLevel;
-            }
-            break;
-            
-        case ECmInvalidAttribute:
-            {
-            retVal = 0;
-            }
-            break;
-
-        case ECmLoadResult:
-            {
-            retVal = iLoadResult;
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-    
-    return retVal;
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::GetBoolAttributeL()
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginEmbDestination::GetBoolAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::GetBoolAttributeL" );
-
-	TBool retVal( EFalse );
-
-    switch( aAttribute )
-        {
-        case ECmDestination:
-            {
-            retVal = ETrue;
-            }
-            break;
-            
-        case ECmCoverage:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmProtected:
-            {
-            if( iDestination->ProtectionLevel() == EProtLevel1 ||
-                iDestination->ProtectionLevel() == EProtLevel2 )
-                {
-                retVal = ETrue;
-                }
-            else
-                {
-                retVal = EFalse;
-                }
-            }
-            break;
-            
-        case ECmHidden:
-            {
-            retVal = iDestination->IsHidden();
-            }
-            break;
-            
-        case ECmBearerHasUi:
-        case ECmAddToAvailableList:
-            {
-            retVal = EFalse;
-            }
-            break;
-
-        case ECmVirtual:
-            {
-            retVal = ETrue;
-            }
-            break;
-
-        case ECmIPv6Supported:
-            {
-            retVal = CCmPluginBaseEng::GetBoolAttributeL( aAttribute );
-            }
-            break;
-
-        case ECmIsLinked:
-            {
-            retVal = EFalse;
-            }
-            break;
-                        
-        case ECmConnected:
-            {
-            retVal = iDestination->IsConnectedL();
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-        
-    return retVal;
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::GetStringAttributeL()
-// ---------------------------------------------------------------------------
-//
-HBufC* 
-  CCmPluginEmbDestination::GetStringAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::GetStringAttributeL" );
-
-    HBufC* retVal = NULL;
-
-    switch( aAttribute )
-        {
-        case ECmName:
-    	    {
-            RFs fs;
-            CleanupClosePushL<RFs>( fs );
-            User::LeaveIfError( fs.Connect() );
-
-            // There may not be a UI context yet....
-            TFileName resourceFile;
-            _LIT( KDriveZ, "z:" );
-            resourceFile.Append( KDriveZ );
-            resourceFile.Append( KDC_RESOURCE_FILES_DIR );
-            _LIT( KCmmResFileName, "cmmanager.rsc" );
-            resourceFile.Append( KCmmResFileName );
-            BaflUtils::NearestLanguageFile( fs, resourceFile );
-
-            RResourceFile rf;
-            CleanupClosePushL<RResourceFile>( rf );
-            rf.OpenL( fs, resourceFile );
-            rf.ConfirmSignatureL( 0 );
-            HBufC8* readBuffer = rf.AllocReadLC( R_QTN_NETW_CONSET_EMBEDDED_DEST );
-            const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(),
-                                         ( readBuffer->Length() + 1 ) >> 1 );
-            HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() );
-            CleanupStack::PushL( textBuffer );
-            *textBuffer=ptrReadBuffer;
-    
-            TPtr format = textBuffer->Des();
-            _LIT(KPercentS,"%S");
-            _LIT(KPercentU,"%U");
-            TInt puPos = format.Find(KPercentU);
-            if ( puPos >= 0 )
-                {
-                format.Replace( puPos, 
-                    static_cast<TDesC>(KPercentS).Length(), KPercentS );                
-                }
-            HBufC* desName = iDestination->NameLC();
-            TPtr16 destName = desName->Des();
-            retVal = HBufC::NewL( format.Length() + destName.Length() );
-            retVal->Des().Format(format,  &destName);
-
-            CleanupStack::PopAndDestroy( desName ); 
-            CleanupStack::PopAndDestroy( textBuffer ); 
-            CleanupStack::PopAndDestroy( readBuffer ); 
-            CleanupStack::PopAndDestroy(); //rf
-            CleanupStack::PopAndDestroy(); //fs
-            }
-    	    break;
-    	    
-    	default:
-    	    {
-    	    User::Leave( KErrNotSupported );
-    	    }
-        }
-    
-    return retVal;
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::GetString8AttributeL
-// ---------------------------------------------------------------------------
-//
-HBufC8* 
-    CCmPluginEmbDestination::GetString8AttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::GetString8AttributeL" );
-
-    switch( aAttribute )
-        {
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-        
-    // dead code
-    return NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::SetBoolAttributeL()
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::SetBoolAttributeL( const TUint32 aAttribute, 
-                                                 TBool /*aValue*/ )
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::SetBoolAttributeL" );
-
-    switch( aAttribute )
-        {
-        case ECmProtected:
-        case ECmHidden:
-            break;
-                    
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::SetStringAttributeL()
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::SetStringAttributeL( const TUint32 aAttribute, 
-                                                   const TDesC16&  )
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::SetStringAttributeL" );
-
-    switch( aAttribute )
-        {
-        case ECmName:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-	}
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CanHandleIapIdL()
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginEmbDestination::CanHandleIapIdL( TUint32 /*aIapId*/ ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CanHandleIapIdL" );
-
-    // Embedded Destination cannot handle any IAP id.
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CanHandleIapIdL()
-// ---------------------------------------------------------------------------
-//
-TBool 
-  CCmPluginEmbDestination::CanHandleIapIdL( CCDIAPRecord* /*aIapRecord*/ ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CanHandleIapIdL" );
-
-    // Embedded Destination cannot handle any IAP id.
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// ?description_if_needed
-// ---------------------------------------------------------------------------
-//
-CCmDestinationImpl* CCmPluginEmbDestination::Destination() const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::Destination" );
-
-    return iDestination;
-    }
-    
-// ---------------------------------------------------------------------------
-// ?description_if_needed
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::UpdateL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::UpdateL" );
-
-    iDestination->UpdateL();
-    }
-
-// ---------------------------------------------------------------------------
-// Delete embedded destination.
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginEmbDestination::DeleteL( TBool aForced, 
-                                        TBool aOneRefAllowed )
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::DeleteL" );
-    
-    (void)aForced;
-    (void)aOneRefAllowed;
-    
-    // Embedded destination cannot be deleted.
-    return EFalse;
-    }
-    
-// ---------------------------------------------------------------------------
-// ?description_if_needed
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::LoadL( TUint32 aCmId)
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::LoadL" );
-
-    if (!iDestination)
-        {
-        iCmId = aCmId;
-        iDestination = iCmMgr.DestinationL( aCmId );        
-        }
-   }
-
-// ---------------------------------------------------------------------------
-// ?description_if_needed
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::CreateNewL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CreateNewL" );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::RunSettingsL()
-// ---------------------------------------------------------------------------
-//        
-TInt CCmPluginEmbDestination::RunSettingsL()
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::RunSettingsL" );
-
-    return 0;
-	}
-        
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::InitializeWithUiL()
-// ---------------------------------------------------------------------------
-//        
-TBool CCmPluginEmbDestination::InitializeWithUiL( 
-                                            TBool /*aManuallyConfigure*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::InitializeWithUiL" );
-
-    // Has no UI
-    return ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::IsMultipleReferencedL()
-// ---------------------------------------------------------------------------
-//        
-TBool CCmPluginEmbDestination::IsMultipleReferencedL()
-	{
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::IsMultipleReferencedL" );
-
-	return EFalse;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::LoadServiceSettingL()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::LoadServiceSettingL" );
-    
-    User::Leave( KErrNotSupported );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::LoadBearerRecordL()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::LoadBearerSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::LoadBearerSettingL" );
-    
-    User::Leave( KErrNotSupported );
-    }
-	
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CreateNewServiceRecordL()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::CreateNewServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CreateNewServiceRecordL" );
-    
-    User::Leave( KErrNotSupported );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CreateNewBearerRecordL()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::CreateNewBearerRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CreateNewBearerRecordL" );
-
-    User::Leave( KErrNotSupported );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::ServiceRecordIdLC()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::ServiceRecordIdLC( HBufC* &/*aBearerName*/, 
-                                                TUint32& /*aRecordId*/)
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::ServiceRecordIdLC" );
-
-    User::Leave( KErrNotSupported );
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::BearerRecordIdLC()
-// ---------------------------------------------------------------------------
-//        
-void CCmPluginEmbDestination::BearerRecordIdLC( HBufC* &/*aBearerName*/, 
-                                                TUint32& /*aRecordId*/)
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::BearerRecordIdLC" );
-
-    User::Leave( KErrNotSupported );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CopyAdditionalDataL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginEmbDestination::CopyAdditionalDataL( CCmPluginBaseEng* /*aDestInst*/ ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CopyAdditionalDataL" );
-
-    User::Leave( KErrNotSupported );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::CreateCopyL
-// ---------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmPluginEmbDestination::CreateCopyL() const
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::CreateCopyL" );
-
-    User::Leave(KErrNotSupported);
-    return NULL;    
-    }
-    
-// ---------------------------------------------------------------------------
-// CCmPluginEmbDestination::IsLinkedToSnap
-// ---------------------------------------------------------------------------
-//
-TBool CCmPluginEmbDestination::IsLinkedToSnap( TUint32 aSnapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginEmbDestination::IsLinkedToSnap" );
-
-    return ( aSnapId == iDestination->Id() );
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginembdestination/src/cmpluginembdestinationproxy.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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:  Implementation of Embedded Destination plug-in proxy table
-*
-*/
-
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-#include "cmpluginembdestination.h"
-
-// Exported proxy for instantiation method resolution
-// Define the interface UIDs
-const TImplementationProxy ImplementationTable[] = 
-	{
-	IMPLEMENTATION_PROXY_ENTRY( KUidEmbeddedDestination, 
-	                            CCmPluginEmbDestination::NewL)
-	};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
-	{
-	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-
-	return ImplementationTable;
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/data/1020737B.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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: 
-*     PacketData PlugIn's resource file
-*     
-*
-*/
-
-
-#include "ecom/registryinfo.rh"
-
-// Because attribute enums had to be added to namespace CMManager
-// it's not possible to included cmpluginlanbasedef.h
-// Thus bearer type id had to be redefine here.
-#define KUidLanBearerType  0x1020737A
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid = 0x1020737B;
-	interfaces = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = KUidLanBearerType;
-					version_no = 1;
-					display_name = "Lan";
-					default_data = "Lan";
-					opaque_data = "";
-					}
-				};
-			}
-		};
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Build information for the LAN plugin.   
-*      
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-./cmpluginlan.mmp
-
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/group/cmpluginlan.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Project specification for LAN Plugin.   
-*      
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET      cmpluginlan.dll
-UID         0x10009D8D 0x1020737B
-
-TARGETTYPE		PLUGIN
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH  ../src
-
-SOURCE      cmpluginlanproxy.cpp
-SOURCE      cmpluginlan.cpp
-SOURCE      ../../../Framework/Src/cmlogger.cpp
-
-SOURCEPATH  ../data
-
-START RESOURCE 1020737B.rss
-TARGET cmpluginlan.rsc
-END
-
-USERINCLUDE     ../../../Framework/Inc
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY	ECOM.LIB
-LIBRARY cmmanager.lib
-LIBRARY COMMSDAT.lib
-DEBUGLIBRARY flogger.lib
-
-// Temporary usega for icons
-LIBRARY AknSkins.lib
-LIBRARY efsrv.lib
\ No newline at end of file
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/inc/cmpluginlan.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +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: 
-*      Declaration of Lan interface implementation 
-*      for "LAN" plugin
-*      
-*
-*/
-
-
-#ifndef LAN_PLUGIN_H
-#define LAN_PLUGIN_H
-
-// INCLUDES
-
-#include <cmpluginlandef.h>
-#include <cmpluginlanbase.h>
-
-#include <e32base.h>
-#include <eikdoc.h>
-#include <apparc.h>
-
-
-// FORWARD DECLARATION
-class CommsDat::CCDLANServiceRecord;
-
-// CLASS DECLARATION
-
-/**
-*  LAN Plugin IF implementation class
-*  @since Series60_3.2
-*/
-NONSHARABLE_CLASS(CCmPluginLan) : public CCmPluginLanBase
-    {
-
-    public:     // Constructors and destructor
-
-        /**
-        * Two phased constructor. Leaves on failure.
-        * @param - aUrl
-        * @return The created object.
-        */      
-		static CCmPluginLan* NewL( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Destructor.
-        */      
-        virtual ~CCmPluginLan();
-
-        virtual CCmPluginBaseEng* CreateInstanceL( TCmPluginInitParam& aInitParam ) const;
-        
-    public: // From CCmPluginBaseEng
-
-		/**
-		* Gets the value for a TInt attribute.
-		* @param aAttribute Identifies the attribute to be retrived.
-        * @return contains the requested TInt attribute.
-		*/
-        virtual TUint32 GetIntAttributeL( const TUint32 aAttribute ) const;
-        
-        /**
-        * Checks if the plug-in can handle the given AP.
-        * @param aIapId IAPId of the AP to be checked
-        * @return ETrue if plug-in can handle the IAP
-        */
-        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        
-        /**
-        * Checks if the plug-in can handle the given AP.
-        * @param aIapRecord IAP record to be checked
-        * @return ETrue if plug-in can handle the IAP
-        */
-        virtual TBool CanHandleIapIdL( CommsDat::CCDIAPRecord* aIapRecord ) const;
-
-        virtual void AdditionalReset();
-        
-    private: // Constructors
-
-        /**
-        * Constructor.
-        */      
-		CCmPluginLan( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Second phase constructor. Leaves on failure.
-		* @param
-        */      
-		void ConstructL();
-
-    private: // Data
-
-	};
-
-#endif // LAN_PLUGIN_H
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/src/cmpluginlan.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +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: 
-*      Implementation of Lan Plugin interface implementation 
-*      for Lan Bearer
-*      
-*
-*/
-
- 
-// INCLUDE FILES
-
-#include "cmpluginlan.h"
-#include "cmlogger.h"
-#include "datamobilitycommsdattypes.h"
-#include <cmmanagerdef.h>
-#include <ecom/ecom.h>		// For REComSession
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-
-#include <cmpluginpacketdata.mbg>           // icons
-#include <data_caging_path_literals.hrh>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// ================= CONSTANTS =======================
-const TUint32 KDefaultPriorityLAN = 0;
-
-static const TCmAttribConvTable SLanConvTbl[] = 
-    {
-        { ELanIfNetworks, ELanRangeMax, NULL },
-        { ELanIfNetworks, KCDTIdLANIfNetworks, NULL },        
-        { ELanIpNetMask, KCDTIdLANIpNetMask, &CheckIPv4ValidityL },
-        { ELanIpGateway, KCDTIdLANIpGateway, &CheckIPv4ValidityL },
-        { ELanIpAddrFromServer, KCDTIdLANIpAddrFromServer, NULL },
-        { ELanIpAddr, KCDTIdLANIpAddr, &CheckIPv4ValidityL },
-        { ELanIpDNSAddrFromServer, KCDTIdLANIpDNSAddrFromServer, NULL },
-        { ELanIpNameServer1, KCDTIdLANIpNameServer1, &CheckIPv4ValidityL },
-        { ELanIpNameServer2, KCDTIdLANIpNameServer2, &CheckIPv4ValidityL },
-        { ELanIp6DNSAddrFromServer, KCDTIdLANIp6DNSAddrFromServer, NULL },
-        { ELanIp6NameServer1, KCDTIdLANIp6NameServer1, &CheckIPv4ValidityL },
-        { ELanIp6NameServer2, KCDTIdLANIp6NameServer2, &CheckIPv4ValidityL },
-        { ELanIpAddrLeaseValidFrom, KCDTIdLANIpAddrLeaseValidFrom, NULL },
-        { ELanIpAddrLeaseValidTo, KCDTIdLANIpAddrLeaseValidTo, NULL },
-        { ELanConfigDaemonManagerName, KCDTIdLANConfigDaemonManagerName, NULL },
-        { ELanConfigDaemonName, KCDTIdLANConfigDaemonName, NULL },
-        { ELanServiceExtensionTableName, KCDTIdLANServiceExtensionTableName, NULL },
-        { ELanServiceExtensionTableRecordId, KCDTIdLANServiceExtensionTableRecordId, NULL },
-        { 0, 0, NULL }
-    };
-
-
-static const TCmCommonAttrConvArrayItem SCommonConvTbl[] =
-{
-    { ELanIfNetworks, ECmIFNetworks },
-    { ELanIpNetMask, ECmIPNetmask },
-    { ELanIpGateway, ECmIPGateway },
-    { ELanIpAddrFromServer, ECmIPAddFromServer },
-    { ELanIpAddr, ECmIPAddress },
-    { ELanIpDNSAddrFromServer, ECmIPDNSAddrFromServer },
-    { ELanIpNameServer1, ECmIPNameServer1 },
-    { ELanIpNameServer2, ECmIPNameServer2 },
-    { ELanIp6DNSAddrFromServer, ECmIP6DNSAddrFromServer },
-    { ELanIp6NameServer1, ECmIP6NameServer1 },
-    { ELanIp6NameServer2, ECmIP6NameServer2 },
-    { ELanIpAddrLeaseValidFrom, ECmIPAddrLeaseValidFrom },
-    { ELanIpAddrLeaseValidTo, ECmIPAddrLeaseValidTo },
-    { ELanConfigDaemonManagerName, ECmConfigDaemonManagerName },
-    { ELanConfigDaemonName, ECmConfigDaemonName },
-    { 0, 0 }
-    };
-
-
-_LIT( KPacketDataFileIcons, "z:cmpluginpacketdata.mbm" );
-    
-
-// ======== LOCAL FUNCTIONS ========
-    
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------
-// CCmPluginLan::NewOutgoingL()
-// ---------------------------------------------------------
-//
-CCmPluginLan* CCmPluginLan::NewL( TCmPluginInitParam* aInitParam )
-	{
-	CCmPluginLan* self = new( ELeave ) CCmPluginLan( aInitParam );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( /*self*/ );
-
-	return self;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginLan::CreateInstanceL
-// ----------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmPluginLan::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
-    {
-    CCmPluginLan* self = new( ELeave ) CCmPluginLan( &aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// ---------------------------------------------------------
-// CCmPluginLan::~CCmPluginLan()
-// ---------------------------------------------------------
-//
-CCmPluginLan::~CCmPluginLan()
-	{
-	AdditionalReset();
-	
-	CLOG_CLOSE;
-	}
-
-
-// ---------------------------------------------------------
-// CCmPluginLan::CCmPluginLan()
-// ---------------------------------------------------------
-//
-CCmPluginLan::CCmPluginLan( TCmPluginInitParam* aInitParam )
-    : CCmPluginLanBase( aInitParam )
-	{
-	CLOG_CREATE;
-	
-	iBearerType = KUidLanBearerType;
-	}
-
-
-// ---------------------------------------------------------
-// CCmPluginLan::ConstructL()
-// ---------------------------------------------------------
-//
-void CCmPluginLan::ConstructL()
-	{
-	CCmPluginLanBase::ConstructL();
-	
-    iBearerRecName = KCDTypeNameLANBearer;
-	
-	AddConverstionTableL( (CCDRecordBase**)&iServiceRecord, NULL, SLanConvTbl );
-	
-	AddCommonConversionTableL( SCommonConvTbl );
-	}
-	
-
-// ---------------------------------------------------------
-// CCmPluginLan::GetIntAttributeL()
-// ---------------------------------------------------------
-//
-TUint32 CCmPluginLan::GetIntAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::GetIntAttributeL" );
-
-    TUint32 retVal;
-    
-    switch( aAttribute )
-        {
-        // LAN bearer has no icon, but added temporary 
-        // to help work on emulator.
-        case ECmBearerIcon:
-            {
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KPacketDataFileIcons, 
-                                                    &KDC_BITMAP_DIR, NULL ) );
-
-                   
-            retVal = (TUint32)AknsUtils::CreateGulIconL( 
-                                    skinInstance, 
-                                    KAknsIIDQgnPropWmlGprs,
-                                    mbmFile.FullName(), 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs, 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs_mask );
-            }
-            break;
-               
-        // LAN bearer has no icon, but added temporary 
-        // to help work on emulator.
-        case ECmBearerAvailableIcon:
-            {
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KPacketDataFileIcons, &KDC_BITMAP_DIR, NULL ) );
-
-                   
-            retVal = (TUint32)AknsUtils::CreateGulIconL( 
-                                    skinInstance, 
-                                    KAknsIIDQgnPropWmlGprs,
-                                    mbmFile.FullName(), 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs, 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs_mask );
-            }
-            break;
-            
-        case ECmCommsDBBearerType:
-            {
-            retVal = KCommDbBearerLAN;
-            }
-            break;
-            
-        case ECmDefaultUiPriority:
-        case ECmDefaultPriority:
-            {
-            retVal = aAttribute == ECmDefaultPriority ?
-                        GlobalBearerPriority( TPtrC(KCDTypeNameLANService) ) :
-                        GlobalUiBearerPriority( TPtrC(KCDTypeNameLANService) );
-            
-            if( retVal == KDataMobilitySelectionPolicyPriorityWildCard )
-                {
-                retVal = KDefaultPriorityLAN;
-                }
-            }
-            break;
-            
-        default:
-            {
-            retVal = CCmPluginBaseEng::GetIntAttributeL( aAttribute );
-            }
-        }
-        
-    return retVal;
-    }
-    
-// ---------------------------------------------------------
-// CCmPluginLan::CanHandleIapIdL()
-// ---------------------------------------------------------
-//
-TBool CCmPluginLan::CanHandleIapIdL( TUint32 aIapId ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::CanHandleIapIdL1" );
-    CLOG_WRITE_1( "IapId: [%d]", aIapId );
-    
-    TBool retVal( EFalse );
-    
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-        
-    CleanupStack::PushL( iapRecord );
-    iapRecord->SetRecordId( aIapId );
-    
-    TRAPD( err, iapRecord->LoadL( Session() ));
-
-    if( !err )
-        {
-        CanHandleIapIdL( iapRecord );
-        }
-    
-    CleanupStack::PopAndDestroy( iapRecord );
-    return retVal;
-    }
-
-// ---------------------------------------------------------
-// CCmPluginLan::CanHandleIapIdL()
-// ---------------------------------------------------------
-//
-TBool CCmPluginLan::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginLanBase::CanHandleIapIdL2" );
-
-    CLOG_WRITE_1( "IapId: [%d]", aIapRecord->RecordId() );
-    
-    TBool retVal( EFalse );
-    
-    CLOG_WRITE_2( "IAP record: [%S][%S]",
-                    &FIELD_TO_TDESC(aIapRecord->iServiceType), 
-                    &FIELD_TO_TDESC(aIapRecord->iBearerType)
-                );
-    
-    if( (TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameLANService) ) &&
-        TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameLANBearer) )
-        {
-        CLOG_WRITE( "I can." );
-        retVal = ETrue;
-        }
-
-    return retVal;
-    }
-
-// ---------------------------------------------------------
-// CCmPluginLan::AdditionalReset()
-// ---------------------------------------------------------
-//        
-void CCmPluginLan::AdditionalReset()
-    {
-    }
-
-//  End of File
--- a/cmmanager/cmmgr/Plugins/cmpluginlan/src/cmpluginlanproxy.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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: 
-*      Implementation of Lan Plugin proxy table
-*      
-*
-*/
-
-
-#include "cmpluginlan.h"
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// Exported proxy for instantiation method resolution
-// Define the interface UIDs
-const TImplementationProxy ImplementationTable[] = 
-	{
-	IMPLEMENTATION_PROXY_ENTRY( KUidLanBearerType, CCmPluginLan::NewL)
-	};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-	{
-	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-
-	return ImplementationTable;
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/data/1020737C.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:  Resource definitions for project cmpluginpacketdata
-*
-*/
-
-#include "ecom/registryinfo.rh"
-
-// Because attribute enums had to be added to namespace CMManager
-// it's not possible to included cmpluginpacketdatadef.h.
-// Thus bearer type id had to be redefine here.
-#define KPacketDataBearerType   0x10207378
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid = 0x1020737C;
-	interfaces = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = KPacketDataBearerType;
-					version_no = 1;
-					display_name = "Packet Data";
-					default_data = "PacketData";
-					opaque_data = "";
-					}
-				};
-			}
-		};
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/data/cmpacketdataui.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +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:  Resource definitions for project cmpluginpacketdata
-*
-*/
-
-
-NAME    PDPL
-
-// INCLUDES
-#include <avkon.rsg>
-#include <avkon.rh>    
-#include <avkon.loc>
-#include <uikon.rh>
-#include <eikon.rh>
-#include <cmpsettingsconsts.h>
-#include <eikon.rsg>
-#include <AvkonIcons.hrh>
-#include <cmmanager.loc>
-#include <cmmanager.rsg>
-
-#include <cmpluginpacketdata.loc>
-
-// RESOURCE IDENTIFIERS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf = "cmpacketdataplugin"; }
-
-// CONSTANTS
-
-//For Ip address editor
-#define IPADDRESS_MIN_FIRST_FIELD_VALUE     0
-#define IPADDRESS_MIN_SECOND_FIELD_VALUE    0
-#define IPADDRESS_MIN_THIRD_FIELD_VALUE     0
-#define IPADDRESS_MIN_FOURTH_FIELD_VALUE    0
-#define IPADDRESS_MAX_FIRST_FIELD_VALUE     255
-#define IPADDRESS_MAX_SECOND_FIELD_VALUE    255
-#define IPADDRESS_MAX_THIRD_FIELD_VALUE     255
-#define IPADDRESS_MAX_FOURTH_FIELD_VALUE    255
-
-
-// RESOURCE DEFINITIONS
-
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_view_ap_name
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_view_ap_name                              
-    {
-    buf = qtn_set_access_point_name;
-    }
-                
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_sett_val_field_none
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_sett_val_field_none
-    {
-    buf = qtn_selec_sett_val_field_none;
-    }
-                
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_view_pdp_type
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_view_pdp_type
-    {
-    buf = qtn_set_network_type;
-    }
-
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_view_pdp_type_ipv4
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_view_pdp_type_ipv4
-    {
-    buf = qtn_set_nw_type_ipv4;
-    }
-
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_view_pdp_type_ipv6
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_view_pdp_type_ipv6
-    {
-    buf = qtn_set_nw_type_ipv6;
-    }
-
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_apn_prompt
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_apn_prompt             
-    {
-    buf = qtn_netw_conset_prmpt_packet_data_apn;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_bearer_supported_packet_data
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_qtn_netw_conset_bearer_supported_packet_data
-    {
-    buf = qtn_netw_conset_bearer_supported_packet_data;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_bearer_available_packet_data
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_qtn_netw_conset_bearer_available_packet_data
-    {
-    buf = qtn_netw_conset_bearer_available_packet_data;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_packet_data_available
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_qtn_netw_conset_packet_data_available
-    {
-    buf = qtn_netw_conset_packet_data_available;
-    }
-
-// ---------------------------------------------------------------------------
-// r_gprs_plugin_view_set_bearer_packet_data
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_gprs_plugin_view_set_bearer_packet_data
-    {
-    buf = qtn_set_bearer_packet_data;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_popup_bearer_packet_data
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_qtn_netw_conset_popup_bearer_packet_data
-    {
-    buf = qtn_netw_conset_popup_bearer_packet_data;
-    }
-                
-// ---------------------------------------------------------------------------
-// r_qtn_set_bearer_packet_data
-// localised string
-// ---------------------------------------------------------------------------
-RESOURCE TBUF r_qtn_set_bearer_packet_data
-    {
-    buf = qtn_set_bearer_packet_data;
-    }
-
-// ---------------------------------------------------------------------------
-// r_setting_app_edwin_gprsap_name
-// edwin for packet data access point name setting page
-// ---------------------------------------------------------------------------
-RESOURCE EDWIN r_setting_app_edwin_gprsap_name
-    {
-    width=KGprsApNameWidth;
-    lines=KGprsApNameLines;
-    maxlength=KMaxGprsApNameLength;
-    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorTextInputMode;
-    default_case = EAknEditorLowerCase;
-    avkon_flags = EAknEditorFlagLatinInputModesOnly;
-    flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
-    }
-
-// ---------------------------------------------------------------------------
-// r_text_setting_page_gprsap_name
-// setting page for packet data access point name
-// ---------------------------------------------------------------------------
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_gprsap_name
-    {
-    number= EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_set_access_point_name;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_gprsap_name;
-    }
-
-// ---------------------------------------------------------------------------
-// r_apn_name_query
-// 
-// ---------------------------------------------------------------------------
-RESOURCE DIALOG r_apn_name_query
-    {
-    flags = EGeneralQueryFlags | EEikDialogFlagNoShadow;
-    buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_DATA_QUERY 
-                { 
-                layout = EDataLayoutAllowEmptyInput;
-                control = EDWIN
-                    {
-                    maxlength=KMaxGprsApNameLength;
-                    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
-                    default_input_mode = EAknEditorTextInputMode;
-                    avkon_flags = EAknEditorFlagLatinInputModesOnly;
-                    flags = EEikEdwinNoHorizScrolling;
-                    default_case = EAknEditorLowerCase;
-                    };
-                };
-            }
-        };
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information file for project cmpluginpacketdata
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export localised loc file
-../loc/cmpluginpacketdata.loc	MW_LAYER_LOC_EXPORT_PATH(cmpluginpacketdata.loc)
-
-PRJ_MMPFILES
-cmpluginpacketdata.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE cmpluginpacketdata.mif
-OPTION HEADERFILE cmpluginpacketdata.mbg
-OPTION SOURCES -c8,1 qgn_prop_wml_gprs\
-               -c8,8 qgn_prop_set_conn_bearer_avail_packetdata
-END
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project definition file for project cmpluginpacketdata
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET      cmpluginpacketdata.dll
-UID         0x10009D8D 0x1020737C
-
-TARGETTYPE		PLUGIN
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH  ../src
-
-SOURCE      cmpluginpacketdataproxy.cpp
-SOURCE      cmpluginpacketdata.cpp
-SOURCE      ../../../Framework/Src/cmlogger.cpp
-SOURCE      cmppacketdatasettingsdlg.cpp
-SOURCE      cmppacketdatasettingsdlgadv.cpp
-
-SOURCEPATH  ../data
-
-START RESOURCE 1020737C.rss
-TARGET cmpluginpacketdata.rsc
-END
-
-START RESOURCE cmpacketdataui.rss
-DEPENDS cmmanager.rsg
-HEADER
-TARGETPATH   RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE     ../../../Framework/Inc
-USERINCLUDE     ../../../Framework/SrcData
-USERINCLUDE     ../data
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY	ECOM.LIB
-LIBRARY cmmanager.lib
-LIBRARY COMMSDAT.lib
-DEBUGLIBRARY flogger.lib
-LIBRARY		CommonUI.LIB
-LIBRARY	CommonEngine.lib
-LIBRARY	bafl.lib
-LIBRARY eikcoctl.lib avkon.lib eikdlg.lib
-LIBRARY insock.lib
-LIBRARY etel.lib        // coverage check
-LIBRARY ETELPCKT.lib    // coverage check
-
-LIBRARY eikcore.lib egul.lib
-LIBRARY eikctl.lib  cone.lib 
-LIBRARY fbscli.lib efsrv.lib
-LIBRARY featmgr.lib
-LIBRARY centralrepository.lib 
-
-LIBRARY AknSkins.lib
\ No newline at end of file
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/pluginpacketdata_icons.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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:  icons makefile for project cmpluginpacketdata
-#
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cmpluginpacketdata.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cmpluginpacketdata.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,1 qgn_prop_wml_gprs.bmp \
-                /c8,8 qgn_prop_set_conn_bearer_avail_packetdata.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmpacketdatacommonconstants.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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:  constants for the packet data plugin
-*
-*/
-
-#ifndef CMPACKETDATACOMMONCONSTANTS_H
-#define CMPACKETDATACOMMONCONSTANTS_H
-
-// CONSTANTS
-_LIT( KPluginPacketDataResDirAndFileName, "z:cmpacketdataui.rsc" );
-_LIT( KEmptyAddress, "http://" );
-
-#endif  // CMPACKETDATACOMMONCONSTANTS_H
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmpluginpacketdata.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +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:  Declaration of CCmPluginPacketData.
-*
-*/
-
-#ifndef PACKETDATA_PLUGIN_H
-#define PACKETDATA_PLUGIN_H
-
-#include <cmpluginbaseeng.h>
-#include <cmpluginpacketdatadef.h>
-
-/**
-*  CCmPluginPacketData dialog class
-*  @since S60 v3.2
-*/
-NONSHARABLE_CLASS( CCmPluginPacketData ) : public CCmPluginBaseEng
-    {
-
-    public: // Constructors and destructor
-
-        static CCmPluginPacketData* NewL( TCmPluginInitParam* aInitParam );
-
-        virtual ~CCmPluginPacketData();
-
-        virtual CCmPluginBaseEng* CreateInstanceL( TCmPluginInitParam& aInitParam ) const;
-        
-    public: // From CCmPluginBaseEng
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        */
-        virtual TUint32 GetIntAttributeL( const TUint32 aAttribute ) const;
-
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        */
-		virtual TBool GetBoolAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        */
-		virtual HBufC* GetStringAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aValue
-        */
-		virtual void SetIntAttributeL( const TUint32 aAttribute, 
-		                                                    TUint32 aValue );
-
-		
-		/**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aValue
-        */
-		virtual void SetBoolAttributeL( const TUint32 aAttribute, 
-		                                                    TBool aValue );
-
-		/**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aValue
-        */
-		virtual void SetStringAttributeL( const TUint32 aAttribute, 
-		                                            const TDesC16& aValue );
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aIapId
-        */
-        virtual void PrepareToUpdateRecordsL();
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aIapId
-        */
-		virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aIapRecord
-        */
-		virtual TBool CanHandleIapIdL( CommsDat::CCDIAPRecord *aIapRecord ) const;
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        */
-		virtual TInt RunSettingsL();
-        
-	    /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        */
-		virtual void LoadServiceSettingL();
-
-	    /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        */
-		virtual TBool InitializeWithUiL( TBool aManuallyConfigure );
-	    
-        /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aServiceName
-        * @param aRecordId
-        */
-		virtual void ServiceRecordIdLC( HBufC* &aServiceName, 
-                                                        TUint32& aRecordId );
-
-	    /**
-        * From CCmPluginBaseEng
-        * see base class
-        *
-        * @since S60 3.2
-        * @param aBearerName
-        * @param aRecordId
-        */
-		virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                                        TUint32& aRecordId );
-                                       
-    public: // New functions
-    
-        /**
-        * @param aPdpType PDP type to be set
-        */     
-        void SetPDPTypeL( RPacketContext::TProtocolType aPdpType );
-
-        /**
-        * @since S60 3.2
-        * @return the service record
-        */
-		CommsDat::CCDWCDMAPacketServiceRecord& ServiceRecord() const;
-        
-    protected: // From CCmPluginBaseEng
-    
-        /**
-        * From CCmPluginBaseEng
-        *
-        * @since S60 3.2
-		*/      
-		virtual void AdditionalReset();
-
-        /**
-        * From CCmPluginBaseEng
-        *
-        * @since S60 5.2
-		*/      
-        virtual void CreateAdditionalRecordsL();
-
-        /**
-        * From CCmPluginBaseEng
-        *
-        * @since S60 5.2
-		*/      
-        virtual void DeleteAdditionalRecordsL();
-
-        /**
-        * From CCmPluginBaseEng
-        *
-        * @since S60 5.2
-		*/      
-        virtual void LoadAdditionalRecordsL();
-
-        /**
-        * From CCmPluginBaseEng
-        *
-        * @since S60 5.2
-		*/      
-        virtual void UpdateAdditionalRecordsL();
-
-	private: // Constructors
-
-        /**
-        * Constructor
-        *
-        * @since S60 3.2
-        * @param aInitParam
-        * @param aOutgoing
-        */      
-		CCmPluginPacketData( TCmPluginInitParam* aInitParam, 
-		                     TBool aOutgoing );
-
-        /**
-        * Second phase constructor    
-        *
-        * @since S60 3.2
-		*/      
-		void ConstructL();
-
-    private: // from CCmPluginBaseEng
-    
-        /**
-        * Second phase constructor    
-        *
-        * @since S60 3.2
-		*/      
-		virtual void CreateNewServiceRecordL();
-		
-		virtual void PrepareToCopyDataL( CCmPluginBaseEng* aDestInst ) const;
-        
-        /**
-        * Sets the daemon name. Starts DHCP if set.
-        *
-        * @since S60 3.2
-        */
-        void SetDaemonNameL();
-
-    private:
-    
-	    /**
-        * @since S60 3.2
-        * @return if there is network coverage
-        */
-		TBool CheckNetworkCoverageL() const;
-        
-	private: // Data
-	    
-        TBool   iOutgoing;  ///< EPacketDataOutGoing
-
-        CommsDat::CCDUmtsR99QoSAndOnTableRecord* iPacketDataQoSRecord; // Owned
-	};
-
-#endif // PACKETDATA_PLUGIN_H
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +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:  Declares a settings dialog for a packet data connection 
-*                method plugin
-*
-*/
-
-#ifndef CMPLUGINPACKETDATA_SETTINGS_DLG_H
-#define CMPLUGINPACKETDATA_SETTINGS_DLG_H
-
-// INCLUDES
-#include <cmpluginbaseeng.h>
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include "cmcommsdatnotifier.h"
-
-// CLASS DECLARATION
-
-/**
- *  CmPluginPacketDataSettingsDlg dialog class
- *
- *  Displays the Packet data settings
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginPacketDataSettingsDlg ) : 
-                                               public CmPluginBaseSettingsDlg
-                                               , public MCmCommsDatWatcher
-                                               , public CCmParentViewNotifier
-    {
-    public: // Constructors and destructor
-    
-        /**
-        * Two-phase constructor
-        *
-        * @since S60 3.2
-        * @param aCmPluginBaseEng  The connection method to use
-        * @return instance of the class
-        */
-        static CmPluginPacketDataSettingsDlg* NewL( CCmPluginBaseEng& 
-                                                        aCmPluginBaseEng );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CmPluginPacketDataSettingsDlg();
-    
-    public: // From CmPluginBaseSettingsDlg
-    
-        /**
-        * From CmPluginBaseSettingsDlg
-        * constructor for the dialog
-        *
-        * @since S60 3.2
-        */
-        virtual TInt ConstructAndRunLD( );
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the packet data specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        virtual void UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray );
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * displays the advanced settings dialog
-        *
-        * @since S60 3.2
-        */
-        virtual void RunAdvancedSettingsL();
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-        
-    public: // from class CCmParentViewNotifier
-        
-        void NotifyParentView( TInt aValue );
-        
-    protected:
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-        
-    private: // Constructors
-    
-        CmPluginPacketDataSettingsDlg( CCmPluginBaseEng& aCmPluginBaseEng );    
-        
-    private: // From CmPluginBaseSettingsDlg
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Redraws the list box
-        *
-        * @since S60 3.2
-        */
-        virtual void UpdateListBoxContentL();
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * according to the setting type the correct edit dialog is displayed
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aCommandId
-        */
-        virtual TBool ShowPopupSettingPageL( TUint32 aAttribute, 
-                                             TInt aCommandId  );
-                                             
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Get help contest of the plugin
-        *
-        * @since S60 5.0
-        */
-				virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-    private: // From MEikCommandObserver
-                
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        virtual void ProcessCommandL( TInt aCommandId );
-        
-    private: // New functions
-            
-        /**
-        * Shows the bool setting page for a certain setting or
-        * simply changes the setting if ok key was pressed
-        * @since S60 3.2
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId Command id, to make difference between ok and change commands
-        * @return the new setting value
-        */  
-        TBool ChangeBoolSettingL( TUint32 aAttribute, TInt aCommandId );
-        
-        void HandleCommsDatChangeL();
-        
-    private:
-        
-        TInt iNotifyFromSon;
-    };
-
-#endif // CMPLUGINPACKETDATA_SETTINGS_DLG_H
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlgadv.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +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:  Declares an advanved settings dialog for a packet data 
-*                connection method plugin
-*
-*/
-
-#ifndef CMPLUGINPACKETDATA_SETTINGS_DLG_ADV_H
-#define CMPLUGINPACKETDATA_SETTINGS_DLG_ADV_H
-
-// INCLUDES
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgadv.h>
-#include <cmpluginbaseeng.h>
-#include <in_sock.h>
-#include "cmcommsdatnotifier.h"
-
-// FORWARD DECLARATIONS
-class CCmPluginBaseEng;
-
-// CLASS DECLARATION
-
-/**
- *  CmPluginPacketDataSettingsDlgAdv dialog class
- *
- *  displays the packet data advanced settings dialog
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginPacketDataSettingsDlgAdv ) : 
-                                            public CmPluginBaseSettingsDlgAdv ,
-                                            public MCmCommsDatWatcher
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phase construction
-        *
-        * @since S60 3.2
-        * @param aCmPluginBaseEng  The connection method to use
-        * @return instance of the class
-        */
-        static CmPluginPacketDataSettingsDlgAdv* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-
-        /**
-        * Destructor
-        */
-        virtual ~CmPluginPacketDataSettingsDlgAdv();
-
-    public: // From CmPluginBaseSettingsDlg
-    
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the packet data specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * displays the advanced settings dialog
-        *
-        * @since S60 3.2
-        */
-        void RunAdvancedSettingsL() {;}
-        
-    public: // from base class
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Create and launch dialog
-        *
-        * @since S60 v3.2
-        * @return The code returned by the dialog's ExecuteLD
-        */
-        TInt ConstructAndRunLD();
-        
-    public:
-        
-        /**
-         * Record the object of parent view
-         */
-        void RegisterParentView( CCmParentViewNotifier* aParent );
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-        
-    protected:
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-
-    private:
-    
-        /** 
-        * C++ constructor
-        */
-        CmPluginPacketDataSettingsDlgAdv( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-        
-    private: // From CmPluginBaseSettingsDlg
-    
-        /**
-        * From CmPluginBaseSettingsDlg
-        * according to the setting type the correct edit dialog is displayed
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aCommandId
-        */
-        TBool ShowPopupSettingPageL( TUint32 aAttribute, TInt aCommandId  );
-        
-    private: // From MEikCommandObserver
-        
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */        
-        virtual void ProcessCommandL( TInt aCommandId );
-        
-    private: // New functions
-
-        /**
-        * Shows the setting page for IP DNS address
-        * 
-        * @since S60 3.2
-        */
-        void ShowPopupPacketDataIPDNSAddrFromServerL( );
-        
-        /**
-        * Show the setting page for PDP type
-        *
-        * @since S60 3.2
-        * @param aAttribute the setting to be changed
-        */
-        void ShowPDPTypeRBPageL( TUint32 aAttribute );
-        
-    private:  // Data Members
-
-        /**
-        * indicates if IPv6 is supported
-        */
-        TBool iIpv6Supported;
-                
-        CCmParentViewNotifier* iParent;
-    };
-
-#endif // CMPLUGINPACKETDATA_SETTINGS_DLG_ADV_H
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/loc/cmpluginpacketdata.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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:  Localization strings for project cmpluginpacketdata
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-//d: The name of a new, default connection. Max.30 chars, longer ones will be truncated.
-//d: Used in Connection method view.
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_access_point_name "Access point name"
-
-//d: Item text in setting list. Gives the network type 
-//d: (whether it is IP4 or IP6)
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_network_type "Network type"
-
-//d: States that the network type is IPv4
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_nw_type_ipv4 "IPv4"
-
-//d: States that the network type is IPv6
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_nw_type_ipv6 "IPv6"
-
-//d: Connection method list text
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_selec_sett_val_field_none "None"
-
-//d: Prompt for Access Point Name query window.
-//l: popup_query_data_window
-//w:
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_packet_data_apn "Packet data access point name (APN):"
-
-//d: Name of packet data bearer type shown in a list of supported bearers.
-//l: list_single_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_supported_packet_data "Packet data"
-
-//d: First line of a double large graphic style listbox - packet data specific
-//l: list_double_large_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_available_packet_data "Packet data"
-
-//d: Second line of a double large graphic style listbox - packet data specific
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_packet_data_available "Available"
-
-//d: Name of the data bearer displayed in 'data bearer' setting
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_set_bearer_packet_data "Packet data"
-
-//d: Data bearer of the highlighted connection method.
-//l: popup_preview_text_window_t1
-//r: 3.2
-#define qtn_netw_conset_popup_bearer_packet_data "Packet data"
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1212 +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:  Dialog for editing settings for a packet data connection 
-*
-*/
-
-
-// INCLUDE FILES
-
-// System
-#include <AknsUtils.h>
-#include <data_caging_path_literals.hrh>
-#include <cmpluginpacketdata.mbg>           // icons
-#include <cmpacketdataui.rsg>
-#include <AknQueryDialog.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-#include <featmgr.h>                     // FeatureManager
-#include <centralrepository.h>           // CRepository 
-#include <CoreApplicationUIsSDKCRKeys.h> // KCRUidCoreApplicationUIs, 
-
-// User
-#include "cmpluginpacketdata.h"
-#include <cmpluginpacketdatadef.h>
-#include "cmpacketdatacommonconstants.h"
-#include "cmlogger.h"
-#include "cmppacketdatasettingsdlg.h"
-#include <cmpsettingsconsts.h>
-#include "datamobilitycommsdattypes.h"
-#include <cmcommonconstants.h>
-#include <cmmanagerdef.h>
-
-using namespace CMManager;
-using namespace CommsDat;
-
-// ================= CONSTANTS =======================
-
-const TUint32 KDefaultPriorityPacketData = 1;
-
-/// Modem bearer names for GPRS/WCDMA Access Points
-_LIT( KModemBearerPacketData, "GPRS Modem" );
-_LIT( KPacketDataFileIcons, "z:cmpluginpacketdata.mbm" );
-_LIT( KDefaultQosDataRecordName, "PRIMARY1" );
-_LIT( KDefaultQosDataRecordNamewithSpace, "PRIMARY1 " );
-
-// ================= LOCAL PROTOTYPES =======================
-
-/**
-* Function to check and set PDP type and IfNetwork.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param aValue TInt* IPv4 address buffer to be checked
-*/
-static TBool SetPDPTypeL( CCmPluginBaseEng* aThis, 
-                   TUint32 aAttribute, 
-                   const TAny* aValue );
-
-static const TCmAttribConvTable SPacketDataConvTbl[] = 
-    {
-    // iAttribId, iCommsDatId, iValidFuncL, 
-    // iTitleId, 
-    // iMaxLength, iAttribFlags, iDefValueResId, iEditorResId, iNotUsed1, iNotUsed2
-    { EPacketDataAPName, EGPRSReqTrafficClass-1, NULL,
-      0,
-      0, 0, 0, NULL, NULL },
-    { EPacketDataAPName, KCDTIdAPN, NULL,
-      R_GPRS_PLUGIN_VIEW_AP_NAME,
-      KMaxGprsApNameLength, 0, R_GPRS_PLUGIN_SETT_VAL_FIELD_NONE, R_TEXT_SETTING_PAGE_GPRSAP_NAME, NULL, NULL },
-    { EPacketDataPDPType, KCDTIdWCDMPDPType, &SetPDPTypeL,
-      R_GPRS_PLUGIN_VIEW_PDP_TYPE,
-      0, 0, 0, NULL, NULL },
-    { EPacketDataPDPAddress, KCDTIdWCDMAPDPAddress, NULL },
-    { EPacketDataReqPrecedence, KCDTIdReqPrecedence, NULL },
-    { EPacketDataReqDelay, KCDTIdReqDelay, NULL },
-    { EPacketDataReliability, KCDTIdReqReliability, NULL },
-    { EPacketDataPeakThroughput, KCDTIdReqPeakThroughput, NULL },
-    { EPacketDataMeanThroughput, KCDTIdReqMeanThroughput, NULL },
-    { EPacketDataMinPrecedence, KCDTIdMinPrecedence, NULL },
-    { EPacketDataMinDelay, KCDTIdMinDelay, NULL },
-    { EPacketDataMinReliability, KCDTIdMinReliability, NULL },
-    { EPacketDataMinPeakThroughput, KCDTIdMinPeakThroughput, NULL },
-    { EPacketDataMinMeanThroughput, KCDTIdMinMeanThroughput, NULL },
-    { EPacketDataDataCompression, KCDTIdWCDMADataCompression, NULL },
-    { EPacketDataHeaderCompression, KCDTIdWCDMAHeaderCompression, NULL },
-    { EPacketDataUseEdge, KCDTIdWCDMAUseEdge, NULL },
-    { EPacketDataAnonymousAccess, KCDTIdWCDMAAnonymousAccess, NULL },
-    { EPacketDataIFParams, KCDTIdWCDMAIfParams, NULL },
-    { EPacketDataIFNetworks, KCDTIdWCDMAIfNetworks, NULL },
-    { EPacketDataIFPromptForAuth, KCDTIdWCDMAIfPromptForAuth, NULL,
-      R_QTN_SET_PROMPT_PASSWD,
-      0, 0, 0, NULL, NULL },
-    { EPacketDataIFAuthName, KCDTIdWCDMAIfAuthName, NULL,
-      R_QTN_SET_AP_USERNAME,
-      KMaxLoginNameLength, 0, R_QTN_SET_AP_USERNAME_NONE, R_TEXT_SETTING_PAGE_LOGIN_NAME, NULL, NULL },
-    { EPacketDataIFAuthPass, KCDTIdWCDMAIfAuthPass, NULL,
-      R_QTN_SET_AP_PASSWD,
-      KCmMaxPasswordLength, EConvPassword, R_AVKON_NUMERIC_PASSWORD_BLANKING_TEXT, NULL, NULL },
-    { EPacketDataIFAuthRetries, KCDTIdWCDMAIfAuthRetries, NULL },
-    { EPacketDataIPNetmask, KCDTIdWCDMAIPNetMask, &CheckIPv4ValidityL },
-    { EPacketDataIPGateway, KCDTIdWCDMAIPGateway, &CheckIPv4ValidityL },
-    { EPacketDataIPAddrFromServer, KCDTIdWCDMAIPAddrFromServer, NULL },
-    { EPacketDataIPAddr, KCDTIdWCDMAIPAddr, &CheckIPv4ValidityL,
-      R_QTN_SET_IP_ADDRESS,
-      KIpAddressWidth, EConvIPv4, R_QTN_SET_IP_ADDRESS_DYNAMIC, 0, NULL, NULL },
-    { EPacketDataIPDNSAddrFromServer, KCDTIdWCDMAIPDNSAddrFromServer, NULL,
-      R_QTN_SET_DNS_SERVERS_IP,
-      0, 0, 0, 0, NULL, NULL },
-    { EPacketDataIPNameServer1, KCDTIdWCDMAIPNameServer1, &CheckIPv4ValidityL,
-      R_QTN_SET_PRIMARY_DNS,
-      KMaxIPv4NameServerLength, EConvIPv4, R_QTN_SET_DNS_SERVERS_AUTOMATIC, 0, NULL, NULL },
-    { EPacketDataIPNameServer2, KCDTIdWCDMAIPNameServer2, &CheckIPv4ValidityL,
-      R_QTN_SET_SECONDARY_DNS,
-      KMaxIPv4NameServerLength, EConvIPv4, R_QTN_SET_DNS_SERVERS_AUTOMATIC, 0, NULL, NULL },
-    { EPacketDataIPIP6DNSAddrFromServer, KCDTIdWCDMAIP6DNSAddrFromServer, NULL,
-      R_QTN_SET_DNS_SERVERS_IP,
-      0, 0, 0, NULL, NULL },
-    { EPacketDataIPIP6NameServer1, KCDTIdWCDMAIP6NameServer1, &CheckIPv6ValidityL },
-    { EPacketDataIPIP6NameServer2, KCDTIdWCDMAIP6NameServer2, &CheckIPv6ValidityL },
-    { EPacketDataIPAddrLeaseValidFrom, KCDTIdWCDMAIPAddrLeaseValidFrom, NULL },
-    { EPacketDataIPAddrLeaseValidTo, KCDTIdWCDMAIPAddrLeaseValidTo, NULL },
-    { EPacketDataConfigDaemonManagerName, KCDTIdWCDMAConfigDaemonManagerName, NULL },
-    { EPacketDataConfigDaemonName, KCDTIdWCDMAConfigDaemonName, NULL },
-    { EPacketDataEnableLcpExtension, KCDTIdWCDMAEnableLCPExtensions, NULL },
-    { EPacketDataDisablePlainTextAuth, KCDTIdWCDMADisablePlainTextAuth, NULL,
-      R_QTN_SET_PASSWD_AUT,
-      0, 0, 0, NULL, NULL },
-    { EPacketDataApType, KCDTIdAPType, NULL },
-    { EPacketDataQoSWarningTimeOut, KCDTIdQOSWarningTimeOut, NULL },
-    { EPacketDataServiceEnableLLMNR, KCDTIdServiceEnableLlmnr, NULL },
-    { 0, 0, NULL }
-};
-
-static const TCmAttribConvTable SQoSDataConvTbl[] =
-    {
-    // iAttribId, iCommsDatId, iValidFuncL, 
-    // iTitleId, 
-    // iMaxLength, iAttribFlags, iDefValueResId, iEditorResId, iNotUsed1, iNotUsed2
-    { EGPRSReqTrafficClass, EPacketDataRangeMax, NULL },
-    { EGPRSReqTrafficClass, KCDTIdWCDMAReqTrafficClass, NULL },
-    { EGPRSMinTrafficClass, KCDTIdWCDMAMinTrafficClass, NULL },
-    { EGPRSReqDeliveryOrder, KCDTIdWCDMAReqDeliveryOrder, NULL },
-    { GPRSMinDeliveryOrder, KCDTIdWCDMAMinDeliveryOrder, NULL },
-    { EGPRSReqDeliverErroneousSDU, KCDTIdWCDMAReqDeliverErroneousSDU, NULL },
-    { EGPRSMinDeliverErroneousSDU, KCDTIdWCDMAMinDeliverErroneousSDU, NULL },
-    { EGPRSReqMaxSDUSize, KCDTIdWCDMAReqMaxSDUSize, NULL },
-    { EGPRSMinAcceptableMaxSDUSize, KCDTIdWCDMAMinAcceptableMaxSDUSize, NULL },
-    { EGPRSReqMaxUplinkRate, KCDTIdWCDMAReqMaxUplinkRate, NULL },
-    { EGPRSReqMinUplinkRate, KCDTIdWCDMAReqMinUplinkRate, NULL },
-    { EGPRSReqMaxDownlinkRate, KCDTIdWCDMAReqMaxDownlinkRate, NULL },
-    { EGPRSReqMinDownlinkRate, KCDTIdWCDMAReqMinDownlinkRate, NULL },
-    { EGPRSReqBER, KCDTIdWCDMAReqBER, NULL },
-    { EGPRSMaxBER, KCDTIdWCDMAMaxBER, NULL },
-    { EGPRSReqSDUErrorRatio, KCDTIdWCDMAReqSDUErrorRatio, NULL },
-    { EGPRSMaxSDUErrorRatio, KCDTIdWCDMAMaxSDUErrorRatio, NULL },
-    { EGPRSReqTrafficHandlingPriority, KCDTIdWCDMAReqTrafficHandlingPriority, NULL },
-    { EGPRSMinTrafficHandlingPriority, KCDTIdWCDMAMinTrafficHandlingPriority, NULL },
-    { EGPRSReqTransferDelay, KCDTIdWCDMAReqTransferDelay, NULL },
-    { EGPRSMaxTransferDelay, KCDTIdWCDMAMaxTransferDelay, NULL },
-    { EGPRSReqGuaranteedUplinkRate, KCDTIdWCDMAReqGuaranteedUplinkRate, NULL },
-    { EGPRSMinGuaranteedUplinkRate, KCDTIdWCDMAMinGuaranteedUplinkRate, NULL },
-    { EGPRSReqGuaranteedDownlinkRate, KCDTIdWCDMAReqGuaranteedDownlinkRate, NULL },
-    { EGPRSMinGuaranteedDownlinkRate, KCDTIdWCDMAMinGuaranteedDownlinkRate, NULL },
-    { EGPRSSignallingIndication, KCDTIdWCDMASignallingIndication, NULL },
-    { EGPRS_ImCnSignallingIndication, KCDTIdWCDMAImCmSignallingIndication, NULL },
-    { EGPRSSourceStatisticsDescriptor, KCDTIdWCDMASourceStatisticsDescriptor, NULL },
-    { 0, 0, NULL }
-    };
-
-static const TCmCommonAttrConvArrayItem SCommonConvTbl[] =
-{
-    { EPacketDataIFParams, ECmIFParams },
-    { EPacketDataIFNetworks, ECmIFNetworks },
-    { EPacketDataIFPromptForAuth, ECmIFPromptForAuth },
-    { EPacketDataIFAuthName, ECmIFAuthName },
-    { EPacketDataIFAuthPass, ECmIFAuthPass },
-    { EPacketDataIFAuthRetries, ECmIFAuthRetries },
-    { EPacketDataIPNetmask, ECmIPNetmask },
-    { EPacketDataIPGateway, ECmIPGateway },
-    { EPacketDataIPAddrFromServer, ECmIPAddFromServer },
-    { EPacketDataIPAddr, ECmIPAddress },
-    { EPacketDataIPDNSAddrFromServer, ECmIPDNSAddrFromServer },
-    { EPacketDataIPNameServer1, ECmIPNameServer1 },
-    { EPacketDataIPNameServer2, ECmIPNameServer2 },
-    { EPacketDataIPIP6DNSAddrFromServer, ECmIP6DNSAddrFromServer },
-    { EPacketDataIPIP6NameServer1, ECmIP6NameServer1 },
-    { EPacketDataIPIP6NameServer2, ECmIP6NameServer2 },
-    { EPacketDataIPAddrLeaseValidFrom, ECmIPAddrLeaseValidFrom },
-    { EPacketDataIPAddrLeaseValidTo, ECmIPAddrLeaseValidTo },
-    { EPacketDataConfigDaemonManagerName, ECmConfigDaemonManagerName },
-    { EPacketDataConfigDaemonName, ECmConfigDaemonName },
-    { EPacketDataEnableLcpExtension, ECmEnableLPCExtension },
-    { EPacketDataDisablePlainTextAuth, ECmDisablePlainTextAuth },
-    { 0, 0 }
-    };
-    
-// ======== LOCAL FUNCTIONS ========
-    
-static TBool SetPDPTypeL( CCmPluginBaseEng* aThis, 
-                          TUint32 aAttribute, 
-                          const TAny* aValue )
-    {
-    (void)aAttribute;
-    CCmPluginPacketData* myThis = static_cast<CCmPluginPacketData*>( aThis );
-    
-    myThis->SetPDPTypeL( (RPacketContext::TProtocolType)(TInt)aValue );
-    
-    return ETrue;
-    }
-
-// ======== MEMBER FUNCTIONS ========
-
-class CCmPDCoverageCheck : public CActive
-    {        
-    public:
-    
-        CCmPDCoverageCheck();
-        ~CCmPDCoverageCheck();
-        
-        TBool IsThereCoverageL();
-        
-    protected:  // from CActive
-    
-        virtual void DoCancel();
-        virtual void RunL();
-        
-    private:
-
-        TBool IsPhoneOfflineL() const;     	        
-
-    private:
-
-        TBool                   iCoverage;
-        CActiveSchedulerWait    iWait;    
-        RTelServer              iServer;
-        RPhone                  iPhone;
-        RPacketService          iService;
-        RPacketService::TRegistrationStatus iNwRegStatus;        
-    };
-
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::CCmPDCoverageCheck()
-// ----------------------------------------------------------------------------
-//
-CCmPDCoverageCheck::CCmPDCoverageCheck() : CActive( EPriorityStandard )
-    {
-    CActiveScheduler::Add( this );
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::~CCmPDCoverageCheck()
-// ----------------------------------------------------------------------------
-//
-CCmPDCoverageCheck::~CCmPDCoverageCheck()
-    {
-    Cancel();
-
-    iService.Close();
-    iPhone.Close();
-    iServer.Close();
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::DoCancel
-// ----------------------------------------------------------------------------
-//
-void CCmPDCoverageCheck::DoCancel()
-    {
-    iWait.AsyncStop();
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::RunL
-// ----------------------------------------------------------------------------
-//
-void CCmPDCoverageCheck::RunL()
-    {
-    if( !iStatus.Int() )
-        {
-        CLOG_WRITE_1( "CCmPDCoverageCheck::RunL: iNwRegStatus: [%d]", iNwRegStatus );
-        	
-        if ( iNwRegStatus == RPacketService::ERegisteredOnHomeNetwork ||
-             iNwRegStatus == RPacketService::ERegisteredRoaming ||
-             iNwRegStatus == RPacketService::ENotRegisteredButAvailable )
-            {
-            iCoverage = ETrue;	
-            }	
-        iWait.AsyncStop();
-        }
-    else
-        // something went wrong -> no coverage.
-        {
-        CLOG_WRITE_1( "CCmPDCoverageCheck::RunL: FAILED: [%d]", iStatus.Int() );        	
-        iWait.AsyncStop();
-        }
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::IsThereCoverageL
-// ----------------------------------------------------------------------------
-//
-TBool CCmPDCoverageCheck::IsThereCoverageL()
-    {
-    iCoverage = EFalse;
-    
-    if ( !IsPhoneOfflineL() )
-        {
-        User::LeaveIfError( iServer.Connect() );
-        CLOG_WRITE( "Server open" );
-    
-        RTelServer::TPhoneInfo info;
-        User::LeaveIfError( iServer.GetPhoneInfo( 0, info ) );
-        CLOG_WRITE( "Phone info ok" );
-    
-        User::LeaveIfError( iPhone.Open(iServer, info.iName ) );
-        CLOG_WRITE( "Phone open" );
-
-        User::LeaveIfError( iService.Open( iPhone ) );
-        CLOG_WRITE( "service ok" );
-
-        iService.GetNtwkRegStatus( iStatus, iNwRegStatus );
-        SetActive();
-        iWait.Start();
-    
-        User::LeaveIfError( iStatus.Int() );  	
-        }
-    
-    return iCoverage;
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPDCoverageCheck::IsPhoneOfflineL
-// ----------------------------------------------------------------------------
-//
-TBool CCmPDCoverageCheck::IsPhoneOfflineL() const
-    {
-    if ( FeatureManager::FeatureSupported( KFeatureIdOfflineMode ) )
-        {
-        CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs );
-        TInt connAllowed( ECoreAppUIsNetworkConnectionAllowed );
-        
-        repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed );
-        CleanupStack::PopAndDestroy( repository );
-        	 
-        if ( !connAllowed )
-            {
-            CLOG_WRITE( "Phone is in offline mode." );
-            return ETrue;
-            }
-        }
-        
-    CLOG_WRITE( "Phone is NOT in offline mode." );
-    return EFalse;
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::NewOutgoingL
-// ----------------------------------------------------------------------------
-//
-CCmPluginPacketData* CCmPluginPacketData::NewL(
-                                            TCmPluginInitParam* aInitParam )
-	{
-	CCmPluginPacketData* self = new ( ELeave ) CCmPluginPacketData( 
-	                                                    aInitParam, ETrue );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	return self;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::~CCmPluginPacketData
-// ----------------------------------------------------------------------------
-//
-CCmPluginPacketData::~CCmPluginPacketData()
-	{
-	CCmPluginPacketData::AdditionalReset();	
-	RemoveResourceFile( KPluginPacketDataResDirAndFileName );	
-	CLOG_CLOSE;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CreateInstanceL
-// ----------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmPluginPacketData::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
-    {
-    CCmPluginPacketData* self = new( ELeave ) CCmPluginPacketData( &aInitParam, ETrue );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CCmPluginPacketData
-// ----------------------------------------------------------------------------
-//
-CCmPluginPacketData::CCmPluginPacketData( TCmPluginInitParam* aInitParam,
-                                          TBool aOutgoing )
-    : CCmPluginBaseEng( aInitParam )
-    , iOutgoing( aOutgoing )
-	{
-	CLOG_CREATE;
-	
-	iBearerType = KUidPacketDataBearerType;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::ConstructL()
-	{
-	CCmPluginBaseEng::ConstructL();
-
-    AddResourceFileL( KPluginPacketDataResDirAndFileName );
-	AddConverstionTableL( (CCDRecordBase**)&iServiceRecord, NULL, SPacketDataConvTbl );
-    AddConverstionTableL( (CCDRecordBase**)&iPacketDataQoSRecord, NULL, SQoSDataConvTbl );
-	AddCommonConversionTableL( SCommonConvTbl );
-	}
-	
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::GetIntAttributeL()
-// ----------------------------------------------------------------------------
-//
-TUint32 CCmPluginPacketData::GetIntAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::GetIntAttributeL" );
-
-    TUint32 retVal( 0 );
-    
-    switch( aAttribute )
-        {
-        case ECmBearerIcon:
-            {
-            TAknsItemID id;
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KPacketDataFileIcons, 
-                                                    &KDC_BITMAP_DIR, NULL ) );
-
-                   
-            retVal = (TUint32)AknsUtils::CreateGulIconL( 
-                                    skinInstance, 
-                                    id,
-                                    mbmFile.FullName(), 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs, 
-                                    EMbmCmpluginpacketdataQgn_prop_wml_gprs_mask );
-            }
-            break;
-               
-        case ECmBearerAvailableIcon:
-            {
-            TAknsItemID id;
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KPacketDataFileIcons, &KDC_BITMAP_DIR, NULL ) );
-                   
-            retVal = (TUint32)AknsUtils::CreateGulIconL( 
-                    skinInstance, 
-                    id,
-                    mbmFile.FullName(), 
-                    EMbmCmpluginpacketdataQgn_prop_set_conn_bearer_avail_packetdata, 
-                    EMbmCmpluginpacketdataQgn_prop_set_conn_bearer_avail_packetdata_mask );
-            }
-            break;
-            
-        case ECmCommsDBBearerType:
-            {
-            retVal = KCommDbBearerWcdma;
-            }
-            break;
-            
-        case ECmDefaultUiPriority:
-        case ECmDefaultPriority:
-            {
-            TPtrC buf;
-            
-            if( iOutgoing )
-                {
-                buf.Set( KCDTypeNameOutgoingWCDMA );
-                }
-            else
-                {
-                buf.Set( KCDTypeNameIncomingWCDMA );
-                }
-
-            retVal = aAttribute == ECmDefaultPriority ?
-                     GlobalBearerPriority( buf ) :
-                     GlobalUiBearerPriority( buf );
-            
-            if( retVal == KDataMobilitySelectionPolicyPriorityWildCard )
-                {
-                retVal = KDefaultPriorityPacketData;
-                }
-            }
-            break;
-            
-        default:
-            {
-            retVal = CCmPluginBaseEng::GetIntAttributeL( aAttribute );
-            }
-            break;
-        }
-        
-    return retVal;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::GetBoolAttributeL()
-// ----------------------------------------------------------------------------
-//
-TBool CCmPluginPacketData::GetBoolAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::GetBoolAttributeL" );
-
-    TBool retVal( EFalse );
-
-    switch( aAttribute )
-        {
-        case EPacketDataOutGoing:
-            {
-            retVal = iOutgoing;
-            }
-            break;
-            
-        case ECmCoverage:
-            // In default the plugin has no network coverage
-            {
-            retVal = CheckNetworkCoverageL();
-            }
-            break;
-            
-        case ECmAddToAvailableList:
-            {
-            retVal = ETrue;
-            }
-            break;
-            
-        case ECmBearerHasUi:
-            {
-            retVal = ETrue;
-            }
-            break;
-            
-        default:
-            {
-            retVal = CCmPluginBaseEng::GetBoolAttributeL( aAttribute );
-            }
-        }
-        
-    return retVal;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::GetStringAttributeL()
-// ----------------------------------------------------------------------------
-//
-HBufC* CCmPluginPacketData::GetStringAttributeL( const TUint32 aAttribute ) const
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::GetStringAttributeL" );
-
-	HBufC* retVal = NULL;
-	
-	switch( aAttribute )
-	    {
-	    case ECmBearerAvailableName:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_BEARER_AVAILABLE_PACKET_DATA );
-	        }
-	        break;
-	        
-	    case ECmBearerSupportedName:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_BEARER_SUPPORTED_PACKET_DATA );
-	        }
-	        break;
-	        
-        case ECmBearerAvailableText:
-            {
-            retVal = AllocReadL( R_QTN_NETW_CONSET_PACKET_DATA_AVAILABLE );
-            }
-            break;
-            
-	    case ECmBearerNamePopupNote:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_POPUP_BEARER_PACKET_DATA );
-	        }
-	        break;
-
-	    case ECmBearerSettingName:
-	        {
-	        retVal = AllocReadL( R_QTN_SET_BEARER_PACKET_DATA );
-	        }
-	        break;
-	        
-	    default:
-	        {
-	        retVal = CCmPluginBaseEng::GetStringAttributeL( aAttribute );
-	        }
-	        break;
-	    }
-	    
-    return retVal;
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::SetIntAttributeL()
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::SetIntAttributeL( const TUint32 aAttribute, 
-                                            TUint32 aValue )
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::SetIntAttributeL" );
-
-    switch( aAttribute )
-        {
-        default:
-            {
-            CCmPluginBaseEng::SetIntAttributeL( aAttribute, aValue );
-            }
-        }
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::SetBoolAttributeL()
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::SetBoolAttributeL( const TUint32 aAttribute, 
-                                             TBool aValue )
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::SetBoolAttributeL" );
-
-    switch( aAttribute )
-        {
-        case EPacketDataOutGoing:
-            {
-            iOutgoing = aValue;
-            CreateNewServiceRecordL();
-            }
-            break;
-        
-        default:
-            {
-            CCmPluginBaseEng::SetBoolAttributeL( aAttribute, aValue );
-            }
-        }
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::SetStringAttributeL()
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::SetStringAttributeL( const TUint32 aAttribute, 
-                                               const TDesC16& aValue )
-	{
-    LOGGER_ENTERFN( "CCmPluginPacketData::SetStringAttributeL" );
-
-    switch( aAttribute )
-        {
-        default:
-            {
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            }
-        }
-	}
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::PrepareToUpdateRecordsL()
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::PrepareToUpdateRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::PrepareToUpdateRecordsL" );
-
-    CheckDNSServerAddressL( ETrue, 
-                            ServiceRecord().iGPRSIP6NameServer1,
-                            ServiceRecord().iGPRSIP6NameServer2,
-                            ServiceRecord().iGPRSIP6DNSAddrFromServer );
-                            
-    CheckDNSServerAddressL( EFalse,
-                            ServiceRecord().iGPRSIPNameServer1,
-                            ServiceRecord().iGPRSIPNameServer2,
-                            ServiceRecord().iGPRSIPDNSAddrFromServer );
-    SetDaemonNameL();
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CanHandleIapIdL()
-// ----------------------------------------------------------------------------
-//
-TBool CCmPluginPacketData::CanHandleIapIdL( TUint32 aIapId ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::CanHandleIapIdL1" );
-    CLOG_WRITE_1( "IapId: [%d]", aIapId );
-    
-    TBool retVal( EFalse );
-    
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-        
-    CleanupStack::PushL( iapRecord );
-    iapRecord->SetRecordId( aIapId );
-    
-    TRAPD( err, iapRecord->LoadL( Session() ));
-
-    if( !err )
-        {
-        CanHandleIapIdL( iapRecord );
-        }
-    
-    CleanupStack::PopAndDestroy( iapRecord );
-    return retVal;
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CanHandleIapIdL()
-// ----------------------------------------------------------------------------
-//
-TBool CCmPluginPacketData::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::CanHandleIapIdL2" );
-    CLOG_WRITE_1( "IapId: [%d]", aIapRecord->RecordId() );
-    
-    TBool retVal( EFalse );
-    
-    CLOG_WRITE_2( "IAP record: [%S][%S]",
-                    &FIELD_TO_TDESC(aIapRecord->iServiceType), 
-                    &FIELD_TO_TDESC(aIapRecord->iBearerType)
-                );
-    
-    if( (TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameOutgoingWCDMA) ||
-        TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameIncomingWCDMA)) &&
-        TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameModemBearer) )
-        {
-        CLOG_WRITE( "I can." );
-        retVal = ETrue;
-        }
-
-    return retVal;
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::RunSettingsL()
-// ----------------------------------------------------------------------------
-//        
-TInt CCmPluginPacketData::RunSettingsL()
-	{
-    CmPluginPacketDataSettingsDlg* settingsDlg = 
-                                CmPluginPacketDataSettingsDlg::NewL( *this );
-    return settingsDlg->ConstructAndRunLD( );       
-    }        
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::LoadServiceSettingL()
-// ----------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::LoadServiceSettingL" );
-    
-    if( TPtrC(KCDTypeNameOutgoingWCDMA) == iIapRecord->iServiceType  )
-        {
-        iServiceRecord = static_cast<CCDServiceRecordBase *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdOutgoingGprsRecord));
-        iOutgoing = ETrue;
-        }
-    else if( TPtrC(KCDTypeNameIncomingWCDMA) == iIapRecord->iServiceType )
-        {
-        iServiceRecord = static_cast<CCDServiceRecordBase *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdIncomingGprsRecord));
-        iOutgoing = EFalse;
-        }
-    else
-        // this IAP service is not supported by this plugin.
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-    CCmPluginBaseEng::LoadServiceSettingL();
-
-    CLOG_WRITE_1( "APName: [%S]", &FIELD_TO_TDESC( ServiceRecord().iGPRSAPN ) );
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::InitializeWithUiL()
-// ----------------------------------------------------------------------------
-//        
-TBool CCmPluginPacketData::InitializeWithUiL( TBool /*aManuallyConfigure*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::InitializeWithUiL" );    
-    TBool retval = ETrue;   // meaning that everything was fine.
-
-    // Add resource file for the duration of this method only.
-    TParse parser;
-    User::LeaveIfError( parser.Set( KPluginPacketDataResDirAndFileName, 
-                                    &KDC_RESOURCE_FILES_DIR, 
-                                    NULL ) );
-
-    TFileName resourceFileNameBuf = parser.FullName();
-
-    RConeResourceLoader resLoader( *CEikonEnv::Static() ) ;
-    resLoader.OpenL( resourceFileNameBuf );
-    CleanupClosePushL( resLoader );
-
-    // Show dialog
-    TBuf<KMaxGprsApNameLength> buf;
-    CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialog( buf );
-
-    // Must use PrepareLC instead of ExecuteLD in order for
-    // MakeLeftSoftkeyVisible() call to work.
-    dlg->PrepareLC( R_APN_NAME_QUERY );
-
-    dlg->SetMaxLength( KMaxGprsApNameLength );
-    dlg->MakeLeftSoftkeyVisible( ETrue );   // Empty input accepted.
-
-    HBufC* prompt = StringLoader::LoadLC( R_GPRS_PLUGIN_APN_PROMPT );
-    dlg->SetPromptL( *prompt );
-    CleanupStack::PopAndDestroy( prompt );
-
-    // Strange, but true: RunLD returns 0 (instead of the actual command id)
-    // if Cancel button was pressed, thus we have to check against zero here.
-    if ( dlg->RunLD() )
-        {
-        // Change APN attribute in connection method
-        SetStringAttributeL( EPacketDataAPName, buf );
-        
-        if( buf.Length() )
-            {
-            SetStringAttributeL( ECmName, buf );
-            }
-        }
-    else
-        {
-        retval = EFalse;    // indicating cancellation.
-        }
-
-    // Clean-up
-    CleanupStack::PopAndDestroy( &resLoader );
-
-    return retval;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::ServiceRecord()
-// ----------------------------------------------------------------------------
-//        
-CCDWCDMAPacketServiceRecord& CCmPluginPacketData::ServiceRecord() const
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::ServiceRecord" );
-
-    return *static_cast<CCDWCDMAPacketServiceRecord*>(iServiceRecord);
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CreateNewServiceRecordL()
-// ----------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::CreateNewServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::CreateNewServiceRecordL" );
-
-    delete iServiceRecord; iServiceRecord = NULL;
-    
-    if( iOutgoing )
-        {
-        iServiceRecord = static_cast<CCDServiceRecordBase *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdOutgoingGprsRecord));
-        }
-    else
-        {
-        iServiceRecord = static_cast<CCDServiceRecordBase *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdIncomingGprsRecord));
-        }
-
-    ServiceRecord().iGPRSAPN.SetL( KNullDesC );
-    ServiceRecord().iGPRSPDPType.SetL( RPacketContext::EPdpTypeIPv4 );
-    ServiceRecord().iGPRSReqPrecedence = 0;
-	ServiceRecord().iGPRSReqDelay = 0;
-	ServiceRecord().iGPRSReqReliability = 0;
-	ServiceRecord().iGPRSReqPeakThroughput = 0;
-	ServiceRecord().iGPRSReqMeanThroughput = 0;
-	ServiceRecord().iGPRSMinPrecedence = 0;
-	ServiceRecord().iGPRSMinDelay = 0;
-	ServiceRecord().iGPRSMinReliability = 0;
-	ServiceRecord().iGPRSMinPeakThroughput = 0;
-	ServiceRecord().iGPRSMinMeanThroughput = 0;
-	ServiceRecord().iGPRSDataCompression = 0;
-	ServiceRecord().iGPRSHeaderCompression = 0;
-	ServiceRecord().iGPRSAnonymousAccess = 0;
-    ServiceRecord().iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv4 );
-    ServiceRecord().iGPRSIfPromptForAuth = EFalse;
-    ServiceRecord().iGPRSIfAuthRetries = 0;
-    ServiceRecord().iGPRSIPGateway.SetL( KUnspecifiedIPv4 );
-    ServiceRecord().iGPRSIPAddrFromServer = ETrue;
-    ServiceRecord().iGPRSIPAddr.SetL( KUnspecifiedIPv4 );
-    ServiceRecord().iGPRSIPDNSAddrFromServer = ETrue;
-    ServiceRecord().iGPRSIPNameServer1.SetL( KUnspecifiedIPv4 );
-    ServiceRecord().iGPRSIPNameServer2.SetL( KUnspecifiedIPv4 );
-    ServiceRecord().iGPRSIP6DNSAddrFromServer = ETrue;
-    ServiceRecord().iGPRSIP6NameServer1.SetL( KDynamicIpv6Address );
-    ServiceRecord().iGPRSIP6NameServer2.SetL( KDynamicIpv6Address );
-    ServiceRecord().iGPRSEnableLCPExtension = EFalse;
-    ServiceRecord().iGPRSDisablePlainTextAuth = ETrue;
-    ServiceRecord().iGPRSAPType = EPacketDataBoth;
-    ServiceRecord().iGPRSQOSWarningTimeOut = TUint32(-1);
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::ServiceRecordIdLC
-// ----------------------------------------------------------------------------
-//
-void CCmPluginPacketData::ServiceRecordIdLC( HBufC* &aName, 
-                                             TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::ServiceRecordIdLC" );
-
-    if( iOutgoing )
-        {
-        aName = TPtrC( KCDTypeNameOutgoingWCDMA ).AllocLC();
-        }
-    else
-        {
-        aName = TPtrC( KCDTypeNameIncomingWCDMA ).AllocLC();
-        }
-        
-    aRecordId = iServiceRecord->RecordId();
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::BearerRecordIdLC()
-// ----------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::BearerRecordIdLC( HBufC* &aBearerName, 
-                                            TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::BearerRecordIdLC" );
-
-	CMDBRecordSet<CCDModemBearerRecord>* bearerRS = 
-	        new(ELeave) CMDBRecordSet<CCDModemBearerRecord>(KCDTIdModemBearerRecord);
-	CleanupStack::PushL( bearerRS );
-    
-    CCDModemBearerRecord* bearerRecord = static_cast<CCDModemBearerRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdModemBearerRecord));
-                                    
-    CleanupStack::PushL( bearerRecord );
-    
-    bearerRecord->iRecordName.SetL( KModemBearerPacketData );
-    bearerRS->iRecords.AppendL( bearerRecord );
-    CleanupStack::Pop( bearerRecord );
-    
-    if( bearerRS->FindL( Session() ) )
-        {
-        CLOG_WRITE_1( "Bearers: [%d]", bearerRS->iRecords.Count() );
-
-        bearerRecord = static_cast<CCDModemBearerRecord*>(bearerRS->iRecords[0]);
-        aRecordId = bearerRecord->RecordId();
-        }
-    else
-        // bearer not found -> create dummy values
-        {
-        CLOG_WRITE( "No bearer record found" );
-
-        bearerRecord->SetRecordId( KCDNewRecordRequest );
-        bearerRecord->StoreL( Session() );
-        
-        aRecordId = bearerRecord->RecordId();
-        }
-
-    CleanupStack::PopAndDestroy( bearerRS );
-
-    aBearerName = TPtrC(KCDTypeNameModemBearer).AllocLC();
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::CheckNetworkCoverageL()
-// ----------------------------------------------------------------------------
-//        
-TBool CCmPluginPacketData::CheckNetworkCoverageL() const
-    {
-    LOGGER_ENTERFN("CCmPluginPacketData::CheckNetworkCoverageL");
-    
-    TBool retVal( EFalse );
-    
-#ifdef __WINS__
-    retVal = ETrue;
-#else
-    CCmPDCoverageCheck* coverage = new (ELeave) CCmPDCoverageCheck;
-    CleanupStack::PushL( coverage );
-    
-    retVal = coverage->IsThereCoverageL();
-    
-    CleanupStack::PopAndDestroy( coverage );
-    
-#endif  // __WINS
-    return retVal;
-    }
-
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::SetPDPTypeL()
-// ----------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::SetPDPTypeL( RPacketContext::TProtocolType aPdpType )
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::SetPDPTypeL" );
-
-    if( aPdpType != RPacketContext::EPdpTypeIPv4 &&
-        aPdpType != RPacketContext::EPdpTypeIPv6 )
-        {
-        User::Leave( KErrArgument );
-        }
-        
-    if( FeatureSupported( KFeatureIdIPv6 ) && aPdpType == 
-        RPacketContext::EPdpTypeIPv6 )
-        {
-        ServiceRecord().iGPRSPDPType = RPacketContext::EPdpTypeIPv6;
-        ServiceRecord().iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv6 );
-        }
-    else
-        {
-        if( aPdpType == RPacketContext::EPdpTypeIPv6 )
-            {
-            User::Leave( KErrNotSupported );
-            }
-            
-        ServiceRecord().iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv4 );
-        ServiceRecord().iGPRSPDPType = RPacketContext::EPdpTypeIPv4;
-        }
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmPluginPacketData::AdditionalReset()
-// ----------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::AdditionalReset()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::AdditionalReset" );
-
-    delete iPacketDataQoSRecord;
-    iPacketDataQoSRecord = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginPacketData::PrepareToCopyDataL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginPacketData::PrepareToCopyDataL( CCmPluginBaseEng* aDestInst ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::PrepareToCopyDataL" );
-
-    aDestInst->SetBoolAttributeL( EPacketDataOutGoing, iOutgoing );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginPacketData::SetDaemonNameL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginPacketData::SetDaemonNameL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::SetDaemonNameL" );
-
-    // use DHCP if we can
-    TBool ipfromSrv = GetBoolAttributeL( ECmIPAddFromServer );
-    if ( ipfromSrv )
-        {
-        SetStringAttributeL( ECmConfigDaemonManagerName, 
-                           KDaemonManagerName );
-        SetStringAttributeL( ECmConfigDaemonName, 
-                           KConfigDaemonName );
-        }
-    else
-        {
-        if ( FeatureSupported( KFeatureIdIPv6 ) )
-            {
-            SetStringAttributeL( ECmConfigDaemonManagerName, 
-                               KDaemonManagerName );
-            SetStringAttributeL( ECmConfigDaemonName, 
-                               KConfigDaemonName );
-            }
-        else
-            {
-            SetStringAttributeL( ECmConfigDaemonManagerName, 
-                               KNullDesC() );
-            SetStringAttributeL( ECmConfigDaemonName, 
-                               KNullDesC() );
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginPacketData::CreateAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginPacketData::CreateAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::CreateAdditionalRecordsL" );
-
-    delete iPacketDataQoSRecord;
-    iPacketDataQoSRecord = NULL;
-
-    iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord *>
-                           (CCDRecordBase::RecordFactoryL(KCDTIdUmtsR99QoSAndOnTableRecord));
-
-    iPacketDataQoSRecord->iGPRSReqTrafficClass = RPacketQoS::ETrafficClassUnspecified;
-    iPacketDataQoSRecord->iGPRSMinTrafficClass = RPacketQoS::ETrafficClassUnspecified;
-    iPacketDataQoSRecord->iGPRSReqDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
-    iPacketDataQoSRecord->iGPRSMinDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
-    iPacketDataQoSRecord->iGPRSReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
-    iPacketDataQoSRecord->iGPRSMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
-    iPacketDataQoSRecord->iGPRSReqMaxSDUSize = 0;
-    iPacketDataQoSRecord->iGPRSMinAcceptableMaxSDUSize = 0;
-    iPacketDataQoSRecord->iGPRSReqMaxUplinkRate = 0;
-    iPacketDataQoSRecord->iGPRSReqMinUplinkRate = 0;
-    iPacketDataQoSRecord->iGPRSReqMaxDownlinkRate = 0;
-    iPacketDataQoSRecord->iGPRSReqMinDownlinkRate = 0;
-    iPacketDataQoSRecord->iGPRSReqBER = RPacketQoS::EBERUnspecified;
-    iPacketDataQoSRecord->iGPRSMaxBER = RPacketQoS::EBERUnspecified;
-    iPacketDataQoSRecord->iGPRSReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-    iPacketDataQoSRecord->iGPRSMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-    iPacketDataQoSRecord->iGPRSReqTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
-    iPacketDataQoSRecord->iGPRSMinTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
-    iPacketDataQoSRecord->iGPRSReqTransferDelay = 0;
-    iPacketDataQoSRecord->iGPRSMaxTransferDelay = 0;
-    iPacketDataQoSRecord->iGPRSReqGuaranteedUplinkRate = 0;
-    iPacketDataQoSRecord->iGPRSMinGuaranteedUplinkRate = 0;
-    iPacketDataQoSRecord->iGPRSReqGuaranteedDownlinkRate = 0;
-    iPacketDataQoSRecord->iGPRSMinGuaranteedDownlinkRate = 0;
-    iPacketDataQoSRecord->iGPRSSignallingIndication = EFalse;
-    iPacketDataQoSRecord->iGPRS_ImCnSignallingIndication = EFalse;
-    iPacketDataQoSRecord->iGPRSSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginPacketData::DeleteAdditionalRecordsL
-// --------------------------------------------------------------------------
-//
-void CCmPluginPacketData::DeleteAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::DeleteAdditionalRecordsL" );    
-
-    // If packet record is common with other packet iaps, do not delete it!
-    if ( !TPtrC(iPacketDataQoSRecord->iRecordName).CompareF( KDefaultQosDataRecordName ) 
-         || !TPtrC(iPacketDataQoSRecord->iRecordName).CompareF( KDefaultQosDataRecordNamewithSpace ) )
-        {
-        return;
-        }
-    
-    iPacketDataQoSRecord->DeleteL( Session() );
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginPacketData::LoadAdditionalRecordsL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginPacketData::LoadAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::LoadAdditionalRecordsL" );
-
-    if ( ServiceRecord().iUmtsR99QoSAndOnTable )
-        {
-        iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord *>
-                           (CCDRecordBase::RecordFactoryL(KCDTIdUmtsR99QoSAndOnTableRecord));
-        
-        iPacketDataQoSRecord->SetRecordId( ServiceRecord().iUmtsR99QoSAndOnTable );
-
-        iPacketDataQoSRecord->LoadL( Session() );
-                
-//        AddConverstionTableL( (CCDRecordBase**)&iPacketDataQoSRecord, NULL, SQoSDataConvTbl );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginPacketData::UpdateAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginPacketData::UpdateAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginPacketData::UpdateAdditionalRecordsL" );
-
-    if( !iPacketDataQoSRecord->RecordId() )
-        {
-        iPacketDataQoSRecord->SetRecordId( KCDNewRecordRequest );
-        iPacketDataQoSRecord->StoreL( Session() );
-        }
-    else
-        {
-        iPacketDataQoSRecord->ModifyL( Session() );
-        }
-    // Set service record to point to QoS record if it does not yet
-    if ( !ServiceRecord().iUmtsR99QoSAndOnTable )
-        {
-        ServiceRecord().iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
-        ServiceRecord().ModifyL( Session() );
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdataproxy.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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:  Implementation of packet data Plugin proxy table
-*
-*/
-
-
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-#include "cmpluginpacketdata.h"
-
-// Exported proxy for instantiation method resolution
-// Define the interface UIDs
-const TImplementationProxy ImplementationTable[] = 
-	{
-	IMPLEMENTATION_PROXY_ENTRY( KUidPacketDataBearerType, CCmPluginPacketData::NewL)
-	};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-	{
-	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-
-	return ImplementationTable;
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +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:  Dialog for editing packet data settings for a packet data
-*                connection method
-*
-*/
-
-// INCLUDE FILES
-
-// System
-#include <StringLoader.h>
-#include <akntextsettingpage.h>
-#include <cmpacketdataui.rsg>
-#include <cmmanager.rsg>
-#include <csxhelp/cp.hlp.hrh>
-
-// User
-#include "cmlogger.h"
-#include "cmpacketdatacommonconstants.h"
-#include <cmpluginpacketdatadef.h>
-#include "cmppacketdatasettingsdlg.h"
-#include "cmppacketdatasettingsdlgadv.h"
-#include "cmpluginpacketdata.h"
-#include "cmpluginmenucommands.hrh"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-const TUint32 KPlainAuthSelectionItems[] =
-    {
-    R_QTN_SET_PASSWD_AUT_NORMAL,
-    R_QTN_SET_PASSWD_AUT_SECURE,
-    0
-    };
-
-const TUint32 KPromptForAuthSelectionItems[] = 
-    {
-    R_QTN_SET_PROMPT_PASSWD_NO,
-    R_QTN_SET_PROMPT_PASSWD_YES,
-    0
-    };
-
-// ================= MEMBER FUNCTIONS =======================================
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlg* CmPluginPacketDataSettingsDlg::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginPacketDataSettingsDlg* self = 
-	           new ( ELeave ) CmPluginPacketDataSettingsDlg( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::CmPluginPacketDataSettingsDlg()
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlg::CmPluginPacketDataSettingsDlg( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlg( aCmPluginBase )
-    , iNotifyFromSon( KCmNotifiedNone )
-    {
-    
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::UpdateListBoxContentL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::UpdateListBoxContentL()
-    {
-    CmPluginBaseSettingsDlg::UpdateListBoxContentL();
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-
-TInt CmPluginPacketDataSettingsDlg::ConstructAndRunLD( )
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CleanupStack::PushL( this );
-    LoadResourceL( KPluginPacketDataResDirAndFileName );
-    CleanupStack::Pop( this );
-   
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-
-    return CmPluginBaseSettingsDlg::ConstructAndRunLD( );
-    }
-
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::~CmPluginPacketDataSettingsDlg
-// Destructor
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlg::~CmPluginPacketDataSettingsDlg()
-    {
-    iResourceReader.Close();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::RunAdvancedSettingsL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::RunAdvancedSettingsL()
-    {
-    CmPluginPacketDataSettingsDlgAdv* advDlg = 
-            CmPluginPacketDataSettingsDlgAdv::NewL( iCmPluginBaseEng );
-    
-    // This view may have to un-register as watcher here
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherUnRegister();
-    
-    advDlg->RegisterParentView( this );
-    TInt ret = advDlg->ConstructAndRunLD();
-
-    if( iNotifyFromSon == KCmNotifiedNone )
-        {
-        if( ret == KDialogUserExit )
-            {
-            iExitReason = KDialogUserExit;
-            TryExitL( iExitReason );
-            }
-        else
-            {
-            // Re-register as watcher if advanced view comes back or exists normally
-            cmMgr.WatcherRegisterL( this );
-            }
-        }
-    else
-        {
-        HandleCommsDatChangeL();
-        }
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::UpdateListBoxContentBearerSpecificL" );
-
-    TBool boolSettingVal( EFalse ); // just for helping make code readable
-        
-    // DATA BEARER - only for real bearer types
-    AppendSettingTextsL( aItemArray, ECmBearerSettingName );
-    // AP NAME
-    AppendSettingTextsL( aItemArray, EPacketDataAPName );
-    // USER NAME
-    AppendSettingTextsL( aItemArray, EPacketDataIFAuthName );
-    // PROMPT PASSWORD
-    boolSettingVal = iCmPluginBaseEng.GetBoolAttributeL( 
-                                                EPacketDataIFPromptForAuth );
-    AppendSettingTextsL( aItemArray, EPacketDataIFPromptForAuth,
-                        boolSettingVal ? 
-                                      R_QTN_SET_PROMPT_PASSWD_YES :
-                                      R_QTN_SET_PROMPT_PASSWD_NO );
-    // PASSWORD
-    AppendSettingTextsL( aItemArray, EPacketDataIFAuthPass );
-    // PASSWORD AUTHENTICATION
-    boolSettingVal = iCmPluginBaseEng.GetBoolAttributeL( 
-                                           EPacketDataDisablePlainTextAuth );
-    AppendSettingTextsL( aItemArray,
-                                EPacketDataDisablePlainTextAuth,
-                                boolSettingVal ?
-                                   R_QTN_SET_PASSWD_AUT_SECURE :
-                                   R_QTN_SET_PASSWD_AUT_NORMAL );
-    // HOMEPAGE
-    AppendSettingTextsL( aItemArray, ECmStartPage );
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::ChangeBoolSettingL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginPacketDataSettingsDlg::ChangeBoolSettingL( TUint32 aAttribute, 
-                                                         TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::ChangeBoolSettingL" );
-
-    if ( aCommandId == EPluginBaseCmdChange )
-        {
-        const TUint32* items = NULL;
-        TInt titleResId(0);
-        
-        // Add the list items
-        switch ( aAttribute )
-            {
-            case EPacketDataDisablePlainTextAuth:
-                {
-                titleResId = R_QTN_SET_PASSWD_AUT;
-                items = KPlainAuthSelectionItems;
-                break;
-                }
-            case EPacketDataIFPromptForAuth:
-                {
-                titleResId = R_QTN_SET_PROMPT_PASSWD;
-                items = KPromptForAuthSelectionItems;
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                }
-            }
-        
-        TInt selected = iCmPluginBaseEng.GetBoolAttributeL( aAttribute );
-        TInt originalValue = selected;        
-        if ( ShowRadioButtonSettingPageL( items, 
-                                          selected,
-                                          titleResId ) && 
-                                          originalValue != selected )
-             {
-             iCmPluginBaseEng.SetBoolAttributeL( aAttribute, selected );
-             UpdateListBoxContentL();             
-             }
-
-        return selected;
-        }
-    else        
-        {
-        TBool boolFromCM = boolFromCM = 
-                            iCmPluginBaseEng.GetBoolAttributeL( aAttribute );
-        iCmPluginBaseEng.SetBoolAttributeL( aAttribute, !boolFromCM );
-        UpdateListBoxContentL();
-        return !boolFromCM;
-        }
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::ShowPopupSettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginPacketDataSettingsDlg::ShowPopupSettingPageL( 
-                                           TUint32 aAttribute, TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::ShowPopupSettingPageL" );
-
-    TBool retval = EFalse;
-    switch ( aAttribute )
-        {
-        case EPacketDataIFAuthPass:
-            {
-            retval = ShowPopupPasswordSettingPageL( aAttribute );
-            break;
-            }
-        case EPacketDataDisablePlainTextAuth:            
-        case EPacketDataIFPromptForAuth:
-            {
-            ChangeBoolSettingL( aAttribute, aCommandId );
-            break;
-            } 
-        default:
-            {
-            CmPluginBaseSettingsDlg::ShowPopupSettingPageL( aAttribute, 
-                                                            aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-    
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::ProcessCommandL( TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::ProcessCommandL" );
-
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-    
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdAdvanced:
-            {
-            RunAdvancedSettingsL();
-            break;
-            }
-        case EPluginBaseCmdChange: // flow to EAknSoftkeyOk
-        case EAknSoftkeyOk:
-            {
-            TInt attrib = iSettingIndex->At( iListbox->CurrentItemIndex() );
-            ShowPopupSettingPageL( attrib, aCommandId );            
-            break;
-            }         
-        default:
-            {
-            CmPluginBaseSettingsDlg::ProcessCommandL( aCommandId );
-            break;            
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::OkToExitL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginPacketDataSettingsDlg::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EPluginBaseCmdExit:
-        case EAknSoftkeyBack:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            }
-        default:
-            {
-            retval = CmPluginBaseSettingsDlg::OkToExitL( aButtonId );
-            break;
-            }
-        }
-    
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-    
-void CmPluginPacketDataSettingsDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::GetHelpContext" );
-
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_AP_SETTING_GPRS;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            iExitReason = KDialogUserExit;
-            iCanEditingContinue = EFalse;
-            
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-        
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::NotifyParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::NotifyParentView( TInt aValue )
-    {
-    iNotifyFromSon = aValue;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlg::HandleCommsDatChangeL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlg::HandleCommsDatChangeL()
-    {
-    if ( iCanEditingContinue )
-        {
-        // Set iCanEditingContinue to False so that exit fromn this view without update editings
-        iCanEditingContinue = EFalse;
-        }
-    
-    if( iNotifyFromSon == KCmNotifiedIapIsNotInThisDestination || 
-            iNotifyFromSon == KCmNotifiedIapDisappear )
-        {
-        TryExitL( iExitReason );
-        }
-    else if( iNotifyFromSon == KCmNotifiedDestinationDisappear )
-        {
-        iExitReason = KDialogUserExit;
-        TryExitL( iExitReason );
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlgadv.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,498 +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:  Dialog for setting packet data plugin advanced settings
-*
-*/
-
-// INCLUDE FILES
-
-#include <cmpacketdataui.rsg>
-#include <cmmanager.rsg>
-#include <StringLoader.h>
-#include <akntextsettingpage.h>
-#include <aknradiobuttonsettingpage.h>
-#include <aknmfnesettingpage.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include <cmpluginpacketdatadef.h>
-#include "cmppacketdatasettingsdlgadv.h"
-#include "cmpacketdatacommonconstants.h"
-#include "cmpluginmultilinedialog.h"
-#include <cmcommonui.h>
-#include "cmpluginmenucommands.hrh"
-#include "cmpluginpacketdata.h"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-const TUint32 KDNSSelectionItems[] = 
-    { 
-    R_QTN_SET_IP_ADDRESS_DYNAMIC,
-    R_QTN_SET_IP_WELL_KNOWN,
-    R_QTN_SET_IP_USER_DEFINED,
-    0
-    };            
-
-const TUint32 KPDPSelectionItems[] =
-    {
-    R_GPRS_PLUGIN_VIEW_PDP_TYPE_IPV4,
-    R_GPRS_PLUGIN_VIEW_PDP_TYPE_IPV6,
-    0
-    };
-    
-// ================= MEMBER FUNCTIONS =======================================
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlgAdv* CmPluginPacketDataSettingsDlgAdv::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginPacketDataSettingsDlgAdv* self = 
-	        new ( ELeave ) CmPluginPacketDataSettingsDlgAdv( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::CmPluginPacketDataSettingsDlgAdv()
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlgAdv::CmPluginPacketDataSettingsDlgAdv( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlgAdv( aCmPluginBase )
-    , iIpv6Supported( aCmPluginBase.FeatureSupported( KFeatureIdIPv6 ) )
-    , iParent( NULL )
-    {
-    iHelpContext = KSET_HLP_AP_SETTING_GPRS_AS;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::~CmPluginPacketDataSettingsDlgAdv
-// Destructor
-// --------------------------------------------------------------------------
-//
-CmPluginPacketDataSettingsDlgAdv::~CmPluginPacketDataSettingsDlgAdv()
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-TInt CmPluginPacketDataSettingsDlgAdv::ConstructAndRunLD()
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlgAdv::ConstructAndRunLD();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    TInt valueResId = 0;    
-    TInt pdpType = RPacketContext::EPdpTypeIPv4;
-    
-    // Get the PDP type - EPdpTypeIPv4 by default
-    if ( iIpv6Supported )
-        {
-        pdpType = iCmPluginBaseEng.GetIntAttributeL( EPacketDataPDPType );
-        
-        // NETWORK (PDP) TYPE
-        AppendSettingTextsL( aItemArray,
-                             EPacketDataPDPType,
-                             pdpType == RPacketContext::EPdpTypeIPv6 ? 
-                                R_GPRS_PLUGIN_VIEW_PDP_TYPE_IPV6 :
-                                R_GPRS_PLUGIN_VIEW_PDP_TYPE_IPV4 );
-        }    
-    
-    if ( pdpType != RPacketContext::EPdpTypeIPv6 )
-        {
-        // IP ADDRESS
-        AppendSettingTextsL( aItemArray, EPacketDataIPAddr );
-        }
-        
-    if ( iIpv6Supported )
-        {
-        // DNS SERVERS IP ADDRESS
-        if ( pdpType == RPacketContext::EPdpTypeIPv6 )
-            {
-            switch ( GetIPv6DNSTypeL( EPacketDataIPIP6NameServer1,
-                                      EPacketDataIPIP6NameServer2 ) )
-                {
-                case EIPv6Unspecified:
-                    {
-                    valueResId = R_QTN_SET_IP_ADDRESS_DYNAMIC;
-                    break;
-                    }
-                case EIPv6WellKnown:
-                    {
-                    valueResId = R_QTN_SET_IP_WELL_KNOWN;
-                    break;
-                    }
-                case EIPv6UserDefined:
-                    {
-                    valueResId = R_QTN_SET_IP_USER_DEFINED;
-                    break;
-                    }
-                default:
-                    {                    
-                    User::Leave( KErrNotSupported );
-                    break;
-                    }
-                }
-            }
-        else
-            {
-            if ( !iCmPluginBaseEng.GetBoolAttributeL( 
-                                           EPacketDataIPDNSAddrFromServer ) )
-                {
-                valueResId = R_QTN_SET_IP_USER_DEFINED;
-                }
-            else
-                {
-                valueResId = R_QTN_SET_DNS_SERVERS_AUTOMATIC;
-                }
-            }    
-        AppendSettingTextsL( aItemArray,
-                             EPacketDataIPIP6DNSAddrFromServer,
-                             valueResId );
-        }
-    else            
-        {
-        // PRIMARY NAME SERVER
-        AppendSettingTextsL( aItemArray, EPacketDataIPNameServer1 );
-        AppendSettingTextsL( aItemArray, EPacketDataIPNameServer2 );
-        }
-
-    // PROXY SETTINGS
-    // PROXY SERVER ADDRESS
-    AppendSettingTextsL( aItemArray, ECmProxyServerName );
-    // PROXY PORT NUMBER
-    AppendSettingTextsL( aItemArray, ECmProxyPortNumber );
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::ShowPopupPacketDataIPDNSAddrFromServerL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::
-                                    ShowPopupPacketDataIPDNSAddrFromServerL()
-    {
-    TInt PDPType = iCmPluginBaseEng.GetIntAttributeL( EPacketDataPDPType );
-
-    if ( PDPType == RPacketContext::EPdpTypeIPv6 )
-        {
-        ShowPopupIPv6DNSEditorL( KDNSSelectionItems,
-                                 EPacketDataIPIP6DNSAddrFromServer,
-                                 EPacketDataIPIP6NameServer1,
-                                 EPacketDataIPIP6NameServer2 );
-        }
-    else //ipv4
-        {
-        ShowPopupIPv4DNSEditorL( EPacketDataIPDNSAddrFromServer,
-                                 EPacketDataIPNameServer1,
-                                 EPacketDataIPNameServer2 );
-        }        
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::ShowPopupSettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginPacketDataSettingsDlgAdv::ShowPopupSettingPageL( 
-                                           TUint32 aAttribute, TInt aCommandId )
-    {    
-    TBool retval = EFalse;
-    
-    switch ( aAttribute )
-        {
-        // IPDNS Settings
-        case EPacketDataIPDNSAddrFromServer:
-        case EPacketDataIPIP6DNSAddrFromServer:        
-            {
-            ShowPopupPacketDataIPDNSAddrFromServerL();
-            break;
-            }
-        case EPacketDataPDPType:            
-            {
-            if ( aCommandId == EAknSoftkeyOk )
-                {
-                TInt intFromCM = 0;
-                TRAPD( err, intFromCM = iCmPluginBaseEng.GetIntAttributeL( 
-                                                              aAttribute ) );
-                
-                if ( !err )
-                    {
-                    intFromCM == RPacketContext::EPdpTypeIPv6 ? 
-                                intFromCM = RPacketContext::EPdpTypeIPv4 : 
-                                intFromCM = RPacketContext::EPdpTypeIPv6;
-                    }
-                else    
-                    {
-                    User::Leave( KErrNotSupported );
-                    }
-                              
-                iCmPluginBaseEng.SetIntAttributeL( aAttribute, intFromCM );
-                UpdateListBoxContentL();  
-                }
-            else
-                {
-                if ( aCommandId == EPluginBaseCmdChange )
-                
-                    {
-                    ShowPDPTypeRBPageL( aAttribute );
-                    }
-                else
-                    {
-                    TInt pdpType = iCmPluginBaseEng.GetIntAttributeL( EPacketDataPDPType );
-                    pdpType = pdpType == RPacketContext::EPdpTypeIPv4 ? 
-                                            RPacketContext::EPdpTypeIPv6 : 
-                                            RPacketContext::EPdpTypeIPv4;
-                    iCmPluginBaseEng.SetIntAttributeL( aAttribute, pdpType );
-                    UpdateListBoxContentL();
-                    }
-                }
-            break;
-            }
-        // IP Setting Page
-        case EPacketDataIPNameServer1:                
-        case EPacketDataIPNameServer2:
-        case EPacketDataIPAddr:
-            {
-            ShowPopupIpSettingPageL( aAttribute );
-            break;
-            }
-        // Text Settings        
-        case ECmProxyServerName:
-            {
-            retval = ShowPopupTextSettingPageL( aAttribute );
-            break;
-            }
-        // Numeric Settings
-        case ECmProxyPortNumber:
-            {
-            if ( ShowPopupPortNumSettingPageL( aAttribute ) )
-                {
-                retval = ETrue;
-                }
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL( aAttribute, 
-                                                               aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdExit:
-            {
-            iExitReason = KDialogUserExit; //  flow to EAknSoftkeyBack
-            }            
-        case EAknSoftkeyBack:
-            {
-            TryExitL( iExitReason );
-            break;
-            }  
-        case EAknSoftkeyOk:                     
-        case EPluginBaseCmdChange:
-            {
-            TInt attrib = iSettingIndex->At( iListbox->CurrentItemIndex() );
-            ShowPopupSettingPageL( attrib, aCommandId );
-
-            if ( iHasSettingChanged )
-                {
-                iHasSettingChanged = EFalse; // Don't call UpdateL at this stage
-                }
-            break;
-            }         
-        default:
-            {
-            CmPluginBaseSettingsDlgAdv::ProcessCommandL( aCommandId );
-
-            if ( iHasSettingChanged )
-                {
-                iHasSettingChanged = EFalse; // Don't call UpdateL at this stage
-                }
-            break;            
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::OkToExitL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginPacketDataSettingsDlgAdv::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-    
-    TBool retval( EFalse );
-    switch ( aButtonId )
-        {
-        case EPluginBaseCmdExit:
-        case EAknSoftkeyBack:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            
-            iExitReason = KDialogUserBack;
-            retval = ETrue;
-            }
-            break;
-        default:
-            {
-            retval = CmPluginBaseSettingsDlgAdv::OkToExitL( aButtonId );
-            break;
-            }
-        }
-    
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::ShowPDPTypeRBPageL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::ShowPDPTypeRBPageL( TUint32 aAttribute )
-    {
-    TInt selected = iCmPluginBaseEng.GetIntAttributeL( aAttribute );
-    
-    TInt originalValue = selected;
-    
-    if ( ShowRadioButtonSettingPageL( KPDPSelectionItems, 
-                                      selected, 
-                                      R_GPRS_PLUGIN_VIEW_PDP_TYPE ) && 
-         originalValue != selected )
-        {
-        iCmPluginBaseEng.SetIntAttributeL( aAttribute , selected );
-        UpdateListBoxContentL();             
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::RegisterParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::RegisterParentView( CCmParentViewNotifier* aParent )
-    {
-    iParent = aParent;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginPacketDataSettingsDlgAdv::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginPacketDataSettingsDlgAdv::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            if( iParent )
-                {
-                iParent->NotifyParentView( KCmNotifiedDestinationDisappear );
-                }
-            
-            iCanEditingContinue = EFalse;
-            iExitReason = KDialogUserExit;
-            
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/data/10281BBE.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECom resource descriptor for VPN plug-in
-*
-*/
-
-#include "ecom/registryinfo.rh"
-
-// Because attribute enums had to be added to namespace CMManager
-// it's not possible to included cmpluginvpndef.h.
-// Thus bearer type id had to be redefined here.
-#define KPluginVPNBearerTypeUid   0x10281BBD
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid = 0x10281BBE;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x10207377; // = KCMPluginInterfaceUid. Do NOT modify it!!!
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = KPluginVPNBearerTypeUid;
-                    version_no = 1;
-                    display_name = "VPN";
-                    default_data = "VPN";
-                    opaque_data = "";
-                    }
-                };
-            }
-        };
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/data/cmpluginvpnui.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,317 +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:  Localisation file for VPN plug-in
-*
-*/
-
-#include <avkon.rsg>
-#include <avkon.rh>	
-#include <avkon.loc>
-#include <uikon.rh>
-#include <eikon.rh>
-#include <cmpsettingsconsts.h>
-#include <eikon.rsg>
-#include <AvkonIcons.hrh>
-#include <cmmanager.loc>
-
-#include <cmpluginvpn.loc>
-#include "cmmanager.hrh"
-
-NAME    CMVP
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf = "VPN"; }
-
-// --------------------------------------------------------------------------
-// r_qtn_netw_conset_bearer_supported_vpn 
-// localised string
-// returned string the attribute: ECmBearerSupportedName 
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_bearer_supported_vpn
-    {
-    buf = qtn_netw_conset_bearer_supported_vpn;
-    }
-
-// --------------------------------------------------------------------------
-// r_qtn_netw_conset_method_name_vpn 
-// localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_method_name_vpn
-    {
-    buf = qtn_netw_conset_method_name_vpn;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_info_vpn_iap_incomplete
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_info_vpn_iap_incomplete
-    {
-    buf = qtn_vpn_info_vpn_iap_incomplete;
-    }
-    
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_sett_vpn_iap_policy_reference
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_sett_vpn_iap_policy_reference
-    {
-    buf = qtn_vpn_sett_vpn_iap_policy_reference;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_info_no_policies_installed
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_info_no_policies_installed
-    {
-    buf = qtn_vpn_info_no_policies_installed;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_sett_vpn_iap_real_netw_reference
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_sett_vpn_iap_real_netw_reference
-    {
-    buf = qtn_vpn_sett_vpn_iap_real_netw_reference;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_sett_vpn_iap_policy_reference_compulsory
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_sett_vpn_iap_policy_reference_compulsory
-    {
-    buf = qtn_vpn_sett_vpn_iap_policy_reference_compulsory;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_sett_vpn_iap_policy_reference_compulsory
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_sett_vpn_iap_real_netw_ref_compulsory
-    {
-    buf = qtn_vpn_sett_vpn_iap_real_netw_ref_compulsory;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_info_mgmt_ui_not_accessible
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_info_mgmt_ui_not_accessible
-    {
-    buf = qtn_vpn_info_mgmt_ui_not_accessible;
-    }
-
-
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_prmpt_vpn_policy
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_vpn_policy
-    {
-    buf = qtn_netw_conset_prmpt_vpn_policy;
-    }
-    
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_prmpt_vpn_real_connection
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_vpn_real_connection
-    {
-    buf = qtn_netw_conset_prmpt_vpn_real_connection;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_conn_methods_amount_many
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_conn_methods_amount_many
-    {
-    buf = qtn_netw_conset_conn_methods_amount_many;
-    }
-    
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_conn_methods_amount_many
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_conn_methods_amount_one
-    {
-    buf = qtn_netw_conset_conn_methods_amount_one;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_vpn_easy_wlan
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_vpn_easy_wlan
-    {
-    buf = qtn_netw_conset_vpn_easy_wlan;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_vpn_easy_wlan_prompt
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_vpn_easy_wlan_prompt
-    {
-    buf = qtn_netw_conset_vpn_easy_wlan_prompt;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_netw_conset_info_no_cm_to_bind_to
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_info_no_cm_to_bind_to
-    {
-    buf = qtn_netw_conset_info_no_cm_to_bind_to;
-    }
-
-// --------------------------------------------------------------------------
-//  r_qtn_vpn_quest_vpn_iap_incomplete_delete
-//  localised string
-// --------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_vpn_quest_vpn_iap_incomplete_delete
-    {
-    buf = qtn_vpn_quest_vpn_iap_incomplete_delete;
-    }
-
-// -----------------------------------------------------------------------------
-// r_softkeys_options_back__options
-// option/options/cancel button set
-// -----------------------------------------------------------------------------
-RESOURCE CBA r_softkeys_options_cancel__select
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyOptions;       txt = text_softkey_option; },
-        CBA_BUTTON { id = EAknSoftkeyBack;          txt = text_softkey_cancel; },
-        CBA_BUTTON { id = ECmManagerUiCmdDestSelect;txt = text_softkey_select; }
-        };
-    }
-
-// --------------------------------------------------------------------------
-// r_vpn_real_cm_selection_list
-// real connection selection dialog with destination support
-// --------------------------------------------------------------------------
-RESOURCE AVKON_LIST_QUERY r_vpn_real_cm_selection_list
-    {
-    flags = EGeneralQueryFlags;
-    softkeys = r_softkeys_options_cancel__select;
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            control = AVKON_LIST_QUERY_CONTROL
-                {
-                listtype = EAknCtDoubleLargeGraphicPopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    flags = EAknListBoxSelectionList;
-                    };
-                heading = qtn_netw_conset_prmpt_vpn_real_connection;
-                };
-            }
-        };    
-    }
-
-
-// --------------------------------------------------------------------------
-// r_vpn_real_cm_radio_button_setting_page
-// underlying connection _method_ setting page
-// --------------------------------------------------------------------------
-
-RESOURCE LISTBOX r_vpn_setting_app_listbox
-    {
-    flags = EEikListBoxMultipleSelection;
-    }
-    
-RESOURCE AVKON_SETTING_PAGE r_vpn_real_cm_radio_button_setting_page
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT;
-    type =  EAknSetListBox;
-    editor_resource_id= r_vpn_setting_app_listbox;
-    }
-    
-    
-// --------------------------------------------------------------------------
-// Menu bars
-// --------------------------------------------------------------------------
-//   
-//    r_vpn_real_cm_selection_menubar
-//    menubar for the VPN real connection selection dialog
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_vpn_real_cm_selection_menubar
-	{
-    titles =
-		{
-        MENU_TITLE
-            {
-            menu_pane = r_vpn_real_cm_selection_menu; 
-            txt = "App";
-            }
-	    };
-	}
-// -----------------------------------------------------------------------------
-//   
-//    r_vpn_real_cm_selection_menu
-//    menu pane for destination list 
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_vpn_real_cm_selection_menu
-	{
-    items =
-		{
-		MENU_ITEM
-		    {
-		    command = ECmManagerUiCmdDestSelect; 
-            txt = qtn_set_cmd_select;
-            flags = EEikMenuItemAction;
-            }
-        ,MENU_ITEM
-            {
-            command = ECmManagerUiCmdCMSelect;
-            txt = qtn_netw_conset_options_select_method;
-            flags = EEikMenuItemSpecific;
-            }
-        ,MENU_ITEM
-            {
-            command = EAknCmdHelp;
-            txt = qtn_options_help;
-            }
-		};
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information file for VPN plug-in
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export localised loc file
-../loc/cmpluginvpn.loc	MW_LAYER_LOC_EXPORT_PATH(cmpluginvpn.loc)
-
-PRJ_MMPFILES
-cmpluginvpn.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE cmpluginvpn.mif
-OPTION HEADERFILE cmpluginvpn.mbg
-OPTION SOURCES -c8,1 qgn_prop_vpn_access_point
-END
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/group/cmpluginvpn.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Project specification for VPN plug-in
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET      cmpluginvpn.dll
-UID         0x10009D8D 0x10281BBE
-
-TARGETTYPE        PLUGIN
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH  ../src
-
-SOURCE      cmpluginproxyvpn.cpp
-SOURCE      cmpluginvpn.cpp
-SOURCE      cmpvpnsettingsdlg.cpp
-SOURCE      cmpvpnpolicyselectiondlg.cpp
-SOURCE      cmpvpnnextlayerselectdlg.cpp
-SOURCE      ../../../Framework/Src/cmlogger.cpp
-
-SOURCEPATH  ../data
-
-START RESOURCE 10281BBE.rss
-TARGET cmpluginvpn.rsc
-END
-
-START RESOURCE cmpluginvpnui.rss
-HEADER
-TARGETPATH   RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE     ../data
-USERINCLUDE     ../../../Framework/Inc
-USERINCLUDE     ../../../Framework/SrcData
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-APP_LAYER_SYSTEMINCLUDE
-#endif
-
-LIBRARY hlplch.lib
-LIBRARY euser.lib
-LIBRARY ecom.lib
-LIBRARY cmmanager.lib
-LIBRARY commsdat.lib
-LIBRARY aknskins.lib
-LIBRARY efsrv.lib 
-LIBRARY	CommonEngine.lib
-LIBRARY cone.lib eikcore.lib avkon.lib
-LIBRARY eikcoctl.lib eikdlg.lib
-LIBRARY bafl.lib
-LIBRARY vpnapi.lib
-LIBRARY centralrepository.lib
-LIBRARY featmgr.lib
-LIBRARY cmmanagerdatabase.lib
-DEBUGLIBRARY flogger.lib
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/group/cmpluginvpn_icons.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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:  Makefile for icons of VPN plug-in
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cmpluginvpn.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cmpluginvpn.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,1 qgn_prop_vpn_access_point.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpluginvpn.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,313 +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:  VPN plugin IF implementation class.
-*
-*/
-
-#ifndef VPN_PLUGIN_INCLUDED
-#define VPN_PLUGIN_INCLUDED
-
-#include <e32base.h>
-#include <StringLoader.h>
-#include <in_sock.h>
-
-#include <cmpluginbaseeng.h>
-
-#include <cmpluginvpndef.h>
-
-using namespace CommsDat;
-
-class CCDVirtualIAPNextLayerRecord;
-
-/**
- *  VPN Plugin IF implementation class
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS(CCmPluginVpn) : public CCmPluginBaseEng
-    {
-
-    public:     // Constructors and destructor
-
-        /**
-        * Two phased constructor. Leaves on failure.
-        * @return The created object.
-        */      
-        static CCmPluginVpn* NewL( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Destructor.
-        */      
-        virtual ~CCmPluginVpn();
-        
-        virtual CCmPluginBaseEng* CreateInstanceL( TCmPluginInitParam& aInitParam ) const;
-        
-    public: 
-        
-        /**
-        * Gets the value for a TInt attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TInt attribute.
-        * @return None.
-        */
-        virtual TUint32 GetIntAttributeL( const TUint32 aAttribute ) const;
-
-        /**
-        * Gets the value for a TBool attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TBool attribute.
-        * @return None.
-        */
-        virtual TBool GetBoolAttributeL( const TUint32 aAttribute ) const;
-
-        /**
-        * Gets the value for a String16 attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TDes16 attribute.
-        * @return None.
-        */
-        virtual HBufC* GetStringAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-		* Gets the value for a String8 attribute.
-		* @param aAttribute Identifies the attribute to be retrived.
-        * @return copy of the requested attribute. Ownership is passed.
-		*/
-		virtual HBufC8* GetString8AttributeL( const TUint32 aAttribute ) const;
-
-        /**
-        * Sets the value for a TInt attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        virtual void SetIntAttributeL( const TUint32 aAttribute, TUint32 aValue );
-
-        /**
-        * Sets the value for a TBool attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        virtual void SetBoolAttributeL( const TUint32 aAttribute, TBool aValue );
-
-        /**
-        * Sets the value for a String16 attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        virtual void SetStringAttributeL( const TUint32 aAttribute, 
-                                          const TDesC16& aValue );
-
-		/**
-		* Sets the value for a String8 attribute.
-		* @param aAttribute Identifies the attribute to be set.
-		* @param aValue The value to be set.
-        * @return None.
-		*/
-		virtual void SetString8AttributeL( const TUint32 aAttribute, 
-		                                   const TDesC8& aValue );
-
-
-		void UpdatePolicyNameL();
-		
-        /**
-        * Puts the currently available bindable destinations into the 
-        * passed array. The array is emptied before appending the values.
-        * It contains only real destinations, no uncategorised 
-        * or any other, created ones (Always ask, DefaultConnection, etc)
-        */
-        void BindableDestinationsL( RArray<TUint32>& aDestinationArray );
-        
-        /**
-        * Change the VPN connection method name when using 
-        * 'Search for WLAN' functionality
-        */
-        HBufC* GenerateVPNPointToWLANNetworkLC(RResourceFile& rf, HBufC*& aName);
-		
-    public: // From CCmPluginBaseEng        
-
-        /**
-        * Restore the original value of the attribute from commsdat field.
-        * Base implementation can be used only with attributes 
-        * stored directly in commsdat.
-        * @param aAttribute attribute to be restored
-        */
-        virtual void RestoreAttributeL( const TUint32 aAttribute );
-        
-        /**
-        * Override the load to be able to handle post-processing
-        *
-        */
-        virtual void LoadL( TUint32 aIapId );
-        
-        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        virtual TBool CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const;
-        
-        virtual TInt RunSettingsL();
-        virtual void LoadServiceSettingL();
-        virtual void LoadAdditionalRecordsL();
-        
-        virtual void UpdateAdditionalRecordsL();
-
-        virtual TBool InitializeWithUiL( TBool aManuallyConfigure  );
-        
-        virtual void ServiceRecordIdLC( HBufC* &aServiceName, 
-                                        TUint32& aRecordId );
-
-        virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                       TUint32& aRecordId );
-                                       
-        virtual void PrepareToUpdateRecordsL();
-        
-        virtual TBool IsLinkedToIap( TUint32 aIapId );
-        virtual TBool IsLinkedToSnap( TUint32 aSnapId );
-        
-        virtual void CreateNewL();
-
-        /**
-        * From CCmPluginBaseEng
-        * Deletes additional records, in this case, the WLAN records
-        *
-        * @since S60 3.2
-        */
-        void DeleteAdditionalRecordsL();
-        
-    protected:
-    
-        virtual void AdditionalReset();
-    
-    private: // Constructors
-
-        /**
-        * Constructor.
-        */      
-        CCmPluginVpn( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Second phase constructor. Leaves on failure.
-        * @param
-        */      
-        void ConstructL();
-
-    private:
-    
-        CCDVPNServiceRecord& ServiceRecord() const;
-
-        TBool ServiceRecordExists() const;
-        
-        virtual void CreateNewServiceRecordL();
-        virtual void CreateAdditionalRecordsL();
-        
-        virtual void UpdateServiceRecordL();
-        
-        /**
-        * Displays a list of installed VPN policies for user selection
-        * and updates the setting
-        *
-        * @since S60 3.2
-        * @return the soft key selection
-        */
-        TBool ShowPolicySelectionDlgL();
-        
-        /**
-        * Shows a dialog for selecting the underlying connection method
-        *
-        * @since S60 3.2
-        * @return ETrue if success
-        */
-        TBool ShowRealConnectionSelectionDlgL();
-        
-        /**
-        * Checks whether there are connection methods or destinations which
-        * the VPN connection method can bind to
-        * 
-        * @since S60 3.2
-        * @return ETrue found
-        */
-        TBool BindableRealConnectionsExistL();
-
-        void GenerateDefaultCmNameL();  
-        
-        /**
-        * Returns whether the passed destination can be used as an underlying
-        * connection method for this particular CM.
-        * It can be used if it does not points to VPN in any way, directly or
-        * indirectly, it has at least one, non-virtual CM and
-        * it does not links back to our parent destination.
-        * The returned value is a bit field defined in the src file and 
-        * it holds the following informations: 
-        * IsEmpty, ContainsVPN(in any link), LinksBackToPArentDest and
-        * HasNonVirtualCM to be able to decide if it is suitable.
-        * Used only internally.
-        */
-        TUint32 CanDestUsedAsUnderlyingConnectionL( TUint32 aDestinationId );
-
-
-        /**
-        * Checks whether the destination/CM passed to it has a VPN connection
-        * up-stream (there is a path from a VPN to this item through indirections).
-        * 
-        * @param aId The id of the destination/connmethod in question.
-        * @param aIsDestination ETrue if the passed id is to be considered 
-        *                       that of a destination, EFalse otherwise.
-        * @return ETrue if this entity is pointed to (in/directly) by a VPN.
-        */
-        TBool HasUpstreamVpnL( TUint32 aId, TBool aIsDestination );
-
-        /**
-        * Checks and converts the id of the destination if needed
-        * 
-        * @param aDestination the id of the destination
-        * @since S60 5.2
-        * @return the correct id of the destination 
-        *         or leaves with the error code KErrArgument 
-        */                    
-        TInt CheckValidityAndConvertDestinationIdL( TUint32 aDestinationId );
-        
-        /**
-        * Retrieves default APs from the Tier Record of given identifier.
-        * 
-        * @param aTierIdentifier identifier for tier record.
-        * @since S60 5.2
-        * @return an elementid id of the default AP record in tier record. 
-        */                    
-        TMDBElementId DefaultAPRecordL( const TInt aTierIdentifier = KAfInet );
-
-    public:                
-        /**
-        * Scans aDests for destinations that may be valid parents 
-        * for this plugin and removes those that may not.
-        * @param aDests The array of destination IDs to be filtered.
-        */
-        virtual void FilterPossibleParentsL( RArray<TUint32>& aDests );
-
-        // finds the parent destination of the connmethod with the given ID
-        TUint32 FindParentDestinationL( TUint32 aCmId );
-        
-    private: // Data
-    
-        CCmPluginBaseEng*       iRealCM;
-        CCDVirtualIAPNextLayerRecord*   iVirtualRecord;
-        TMDBElementId           iVirtualTableId;
-        HBufC*                  iPolicyName;
-        
-        /**
-         * An array of the bindable destinations, 
-         * including (if supported) the uncategorised destation and easy wlan
-         */
-        RArray<TUint32> iBindableMethods;
-    };
-
-#endif // VPN_PLUGIN_INCLUDED
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnnextlayerselectdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +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:  Popup for selecting the underlying connection method or 
-*                destination for a VPN connection method
-*
-*/
-
-#ifndef CMPVPN_NEXT_LAYER_SELECT_DLG_H
-#define CMPVPN_NEXT_LAYER_SELECT_DLG_H
-
-#include <e32base.h>
-#include <aknlistquerydialog.h> // CAknListQueryDialog
-
-#include <ConeResLoader.h> // resource reader
-
-class CEikonEnv;
-class CCmPluginBaseEng;
-class CCmManagerImpl;
-class CGulIcon;
-
-
-    
-/**
- *  CmPluginVpnNextLayerSelectDlg dialog class
- *
- *  
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginVpnNextLayerSelectDlg ) : public CAknListQueryDialog
-    {
-    public: // Constructors and destructor
-    
-        static CmPluginVpnNextLayerSelectDlg* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng,
-                                        RArray<TUint32>& aBindableMethods,
-                                        TBool& aSnapSelected,
-                                        TUint32& aNextLayerId );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CmPluginVpnNextLayerSelectDlg();
-
-
-    private: // Constructor
-    
-        /**
-        * Constructor.
-        */      
-        CmPluginVpnNextLayerSelectDlg( CCmPluginBaseEng& aCmPluginBaseEng,
-                                       RArray<TUint32>& aBindableMethods,
-                                       TBool& aSnapSelected,
-                                       TUint32& aNextLayerId,
-                                       TInt aDummyIndex );
-        
-        /**
-        * Second phase constructor. Leaves on failure.
-        */      
-        void ConstructL();
-        
-    public: // new
-        
-        static TInt CancelAsynchronouslyL( TAny* aObject );
-                                             
-        
-    protected: // From CAknListQueryDialog
-    
-        /**
-        * @see CAknListQueryDialog
-        */
-        virtual void PreLayoutDynInitL();
-        
-        /**
-        * @see CAknListQueryDialog
-        */
-        TBool OkToExitL( TInt aButtonId );
-
-    public: // From CAknListQueryDialog
-        
-        /**
-         * @see CAknListQueryDialog
-         */
-        void ProcessCommandL( TInt aCommandId );
-              
-        /**
-         * @see CAknListQueryDialog
-         */
-        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
-        /**
-         * @see CAknListQueryDialog
-         */
-        void HandleListBoxEventL( CEikListBox* aListBox, 
-                                  TListBoxEvent aEventType );
-
-        
-    public: // From CCoeControl
-    
-        /**
-        * Returns the help context
-        * From CCoeControl
-        * 
-        * @since S60 3.2
-        * @param aContext the returned help context
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-                
-        /**
-        * From CCoeControl
-        *
-        * @since S60 3.2
-        * @param aKeyEvent The key event.
-        * @param aType Key event type.
-        * @return key response (was the key event consumed?).
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType );
- 
-                                        
-    private: // new functions
-    
-        /*
-        * Load the given resource file
-        *
-        * @since S60 3.2
-        * @param aResFileName
-        */
-        void LoadResourceL( const TDesC& aResFileName );
-        
-        /*
-        * Formats the texts for the list items using given resources
-        *
-        * @param aFirstLineResId the resource Id for the first line
-        * @param aSecondLineResId the resource Id for the second line
-        * @param aIconIndex the icon's index value
-        * @return the formatted text
-        */
-        HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
-                                      TInt aSecondLineResId,
-                                      TInt aIconIndex );
-                        
-        /**
-        */
-        HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
-                                      const TDesC& aSecondLineText,
-                                      TInt aIconIndex );
-                                      
-        /**
-        */
-        HBufC* FormatListItemTextsLC( const TDesC& aFirstLineResId,
-                                      const TDesC& aSecondLineText,
-                                      TInt aIconIndex );
-                                      
-        /**
-        */
-        HBufC* FormatListItemTextsL( const TDesC& aFirstLineText,
-                                     const TDesC& aSecondLineText,
-                                     TInt aIconIndex );
-                                     
-        /**
-        * Displays a radio button selection dialog to select the 
-        * underlying connection method
-        *
-        * @since S60 3.2
-        * @param aDestinationId the destination id to search
-        * @param aCmId the selection as a return value
-        * @return ETrue if selection made EFalse if cancelled
-        */
-        TBool ShowCMSelectionDlgL( TUint32 aDestinationId, 
-                                   TUint32& aCmId );
-
-        void SetTextsAndIconsL();
-        
-        void AppendDestinationTextsL( CCmDestinationImpl& aDestination,
-                                 TInt aNumCms,
-                                 CDesCArray& aItems,
-                                 CArrayPtr<CGulIcon>& aIcons );
-                                       
-        void AppendUncatDestinationL( CDesCArray& aItems,
-                                      CArrayPtr<CGulIcon>& aIcons );
-                                    
-        void AppendEasyWlanL( CDesCArray& aItems,
-                              CArrayPtr<CGulIcon>& aIcons );
-                                   
-
-    private: // data members
-  
-        /**
-         * Eikon environment
-         */
-        CEikonEnv& iMyEikonEnv;        
-       
-        /**
-         * base class not owned
-         */
-        CCmPluginBaseEng& iCmPluginBaseEng;
-        
-        /**
-         * Result of selection: ETrue if a SNAP was selected
-         */
-        TBool& iSnapSelected;
-        
-        /**
-         * Result of selection: The ID of the connection method or SNAP
-         */
-        TUint32& iNextLayerId;
-                 
-        /**
-         * Resource reader
-         */
-        RConeResourceLoader iResourceReader;
-                 
-        /**
-         * An array containing all of the destination's ids
-         */
-        RArray<TUint32>& iDestinations;
-        
-        /**
-         * The id of EasyWlan ( zero if none )
-         */
-        TUint32 iEasyWlanId;
-        
-        /**
-         * access to the cmmanager
-         */
-        CCmManagerImpl& iCmManager; // not owned
-        
-        /**
-         * Flag to determine if there are uncategorised connection methods
-         */
-        TBool iUncatItems;
-        
-        /**
-         * One shot active object for asynchronous exiting with Cancel
-         */
-        CAsyncCallBack* iAsyncCancel; 
-        
-        
-    };
-#endif // CMPVPN_NEXT_LAYER_SELECT_DLG_H
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnpolicyselectiondlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +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:  Displays a selection list of VPN policies
-*
-*/
-
-#ifndef CMPLUGINVPN_POLICYSELECTION_DLG_H
-#define CMPLUGINVPN_POLICYSELECTION_DLG_H
-
-// includes
-#include <e32base.h>
-#include <ConeResLoader.h>
-#include <vpnapi.h>
-
-// forward declarations
-class CCmPluginBaseEng;
-
-/**
- *  CmPluginPacketDataSettingsDlg dialog class
- *
- *  
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginVpnPolicySelectionDlg ) : public CBase
-    {
-    public: // Constructors and destructor
-    
-        static CmPluginVpnPolicySelectionDlg* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CmPluginVpnPolicySelectionDlg();
-        
-    public: // New functions
-    
-        /**
-        * Shows the VPN policies in and a popup list and if a selection is
-        * made, EVpnServicePolicyName is set
-        * 
-        * @since S60 3.2
-        * @return ETrue if a selection was made
-        */
-        TBool ShowPolicySelectionListL();
-        
-        /**
-        * Shows the VPN policies in and a radio button list and if a selection is
-        * made, EVpnServicePolicyName is set
-        * 
-        * @since S60 3.2
-        * @return ETrue if a selection was made
-        */
-        TBool ShowPolicySelectionDlgL();
-
-    private: // Constructor
-    
-        /**
-        * Constructor.
-        */      
-        CmPluginVpnPolicySelectionDlg( CCmPluginBaseEng& aCmPluginBaseEng );
-        
-        /**
-        * Second phase constructor. Leaves on failure.
-        */      
-        void ConstructL();
-    
-    private: // New functions
-            
-        /**
-        * Loads a resource file.
-        *
-        * @since S60 3.2
-        * @param aResFileName the resource file name.
-        */
-        void LoadResourceL( const TDesC& aResFileName );
-        
-        /**
-        * Pop-up note that VPN client is inaccessible
-        *
-        * @since S60 3.2
-        */
-        void VpnClientInaccessibleL();
-        
-    private: // data members
-        
-        /**
-         * base class reference, NOT OWNED
-         */
-        CCmPluginBaseEng&   iCmPluginBaseEng;
-        
-        /**
-         * resource reader
-         */
-        RConeResourceLoader iResourceReader;
-        
-        /**
-         * VPN server
-         */
-        RVpnServ iVpnServ;
-        
-        /**
-         * array of VPN policies - OWNED
-         */
-        CArrayFixFlat<TVpnPolicyInfo>* iPolicyInfoList;
-        
-        /**
-         * flag for when vpn is not accessible. used to make sure the 
-         * dialog indicating it is inaccessible is not displayed both 
-         * on connect and close
-         */
-        TBool iVpnClientUnaccessible;
-        
-        /**
-        * the number of VPN policies
-        */
-        TInt iNumPolicies;
-    };
-
-#endif // CMPLUGINVPN_POLICYSELECTION_DLG_H
\ No newline at end of file
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnsettingsdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +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:  Declares a settings dialog for a VPN connection 
-*                method plugin
-*
-*/
-
-#ifndef CMPLUGINVPN_SETTINGS_DLG_H
-#define CMPLUGINVPN_SETTINGS_DLG_H
-
-// INCLUDES
-#include <cmpluginbaseeng.h>
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include "cmcommsdatnotifier.h"
-
-// CLASS DECLARATION
-
-/**
- *  CmPluginVpnSettingsDlg dialog class
- *
- *  Displays the VPN data settings
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginVpnSettingsDlg ) : public CmPluginBaseSettingsDlg
-                                            , public MCmCommsDatWatcher
-    {
-    public: // Constructors and destructor
-    
-        /**
-        * Two-phase constructor
-        *
-        * @since S60 3.2
-        * @param aCmPluginBaseEng  The connection method to use
-        * @return instance of the class
-        */
-        static CmPluginVpnSettingsDlg* NewL( CCmPluginBaseEng& 
-                                                        aCmPluginBaseEng );
-                                                        
-        /**
-        * Destructor.
-        */
-        virtual ~CmPluginVpnSettingsDlg();
-    
-    public: // From CmPluginBaseSettingsDlg
-    
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * constructor for the dialog
-        *
-        * @since S60 3.2
-        */
-        virtual TInt ConstructAndRunLD();
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the VPN specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        virtual void UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray );
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * displays the advanced settings dialog
-        *
-        * @since S60 3.2
-        */
-        virtual void RunAdvancedSettingsL();
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-   
-    protected:  // From MEikMenuObserver 
-    
-        /**
-        * From MEikMenuObserver
-        * displays the options menu
-        *
-        * @param aResourceId the options menu to use
-        * @param aMenuPane a pointer to the menu pane control
-        * @since S60 3.2
-        */
-        virtual void DynInitMenuPaneL( TInt aResourceId, 
-                                             CEikMenuPane* aMenuPane ) ;
-
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-    
-    private: // Constructors
-    
-        CmPluginVpnSettingsDlg( CCmPluginBaseEng& aCmPluginBaseEng );    
-    
-    private: // From CmPluginBaseSettingsDlg
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * according to the setting type the correct edit dialog is displayed
-        *
-        * @since S60 3.2
-        * @param aAttribute
-        * @param aCommandId
-        */
-        virtual TBool ShowPopupSettingPageL( TUint32 aAttribute, 
-                                             TInt aCommandId  );
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Get help contest of the plugin
-        *
-        * @since S60 5.0
-        */
-				virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
-                                             
-    private: // New functions
-    
-        /**
-        * Displays a radio button dialog for user selection of connection
-        * methods (filters out VPN connection method) takes responsibility
-        * for updating the setting value
-        *
-        * @since S60 3.2
-        * @returns ETrue if update was made
-        */
-        TBool ShowIapSelectionSettingPageL();
-        
-    private: // From MEikCommandObserver
-    
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        virtual void ProcessCommandL( TInt aCommandId );
-
-
-        /**
-        * Checks whether the compulsory fields have been filled or not.
-        *
-        * @since S60 3.2
-        * @return Whether the compulsory fields have been filled or not.
-        */
-        TBool CompulsoryFilledL();
-        
-    };
-
-#endif // CMPLUGINVPN_SETTINGS_DLG_H
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmvpncommonconstants.h	Thu Aug 19 10:18:49 2010 +0300
+++ /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:  constants for the VPN plugin
-*
-*/
-
-#ifndef CMVPNCOMMONCONSTANTS_H
-#define CMVPNCOMMONCONSTANTS_H
-
-// CONSTANTS
-_LIT( KPluginVPNResDirAndFileName, "z:cmpluginvpnui.rsc" );
-
-// Do not change this default to other value because proxy number is using this value as default port number
-const TInt KVpnProxyPortNumberDefault = 0;
-
-#endif  // CMVPNCOMMONCONSTANTS_H
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/loc/cmpluginvpn.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +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:  Resource definitions for project VPN Plugin
-*
-*/
-
-//  LOCALISATION STRINGS
-
-//d: First line of a double large graphic style listbox - VPN specific
-//l: list_single_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_supported_vpn "VPN"
-
-//d: The name for the newly created connection method
-//l: list_double_graphic_pane_t1
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_method_name_vpn "VPN over ’%U’"
-
-
-//d: Note displayed upon opening the VPN connection method settings
-//d: if the VPN connection method is invalid
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_vpn_info_vpn_iap_incomplete "VPN access point is incomplete. Try reconfiguring the access point."
-
-//d: VPN policy setting
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_vpn_sett_vpn_iap_policy_reference "VPN policy"
-
-//d: Possible value for VPN policy setting
-//l: list_set_graphic_pane_t1
-//w:
-//r: 5.1
-//
-#define qtn_vpn_sett_vpn_iap_policy_reference_compulsory "Must be defined"
-
-//d: Information note indicatinf that no VPN policies are installed and that
-//d: one is needed if a VPN connection method is to be used
-//l: popup_note_window
-//w:
-//r: 3.2
-//
-#define qtn_vpn_info_no_policies_installed "No VPN policies installed. Please install a policy via VPN policies view."
-
-//d: Internet access point setting
-//l: list_setting_pane_t1
-//w:
-//r: 3.2
-//
-#define qtn_vpn_sett_vpn_iap_real_netw_reference "Network connection"
-
-//d: Setting value text in internet access point settings view
-//l: list_set_graphic_pane_t1
-//w:
-//r: 5.1
-//
-#define qtn_vpn_sett_vpn_iap_real_netw_ref_compulsory "Must be defined"
-
-//d: Note displayed to indicate that the VPN client is not available
-//d: and new VPN connection methods cannot be added. This may be 
-//d: due to the VPN client residing on a disconnected memory card
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_vpn_info_mgmt_ui_not_accessible "Unable to access VPN data. Memory card might not be accessible."
-
-//d: Title of Select VPN Policy list query.
-//l: heading_pane_t1 
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_vpn_policy "Select VPN policy:"
-
-//d: Title of Select VPN real connection selection query list box
-//l: heading_pane_t1 
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_prmpt_vpn_real_connection "Select connection:"
-
-//d: Primary item in 'Select VPN real connection selection query'
-//d: for selecting a WLAN network as an underlying VPN connection method
-//l: list_double_large_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_vpn_easy_wlan "WLAN network"
-
-//d: Secondary item in the 'Select VPN real connection selection query'
-//d: paired with the WLAN network primary item
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_vpn_easy_wlan_prompt "Prompt for WLAN"
-
-//d: Destination list text, notes the number of connections methods
-//d: belonging to the destination
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conn_methods_amount_many    "%N connection methods"
-
-//d: Destination list text. Notes that the destination has one 
-//d: connection method
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_conn_methods_amount_one      "1 connection method"
-
-//d: Note shown when attempting to create a VPN access point using the wizard.
-//d: Shown if there are no valid underlying connection methods to select.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_info_no_cm_to_bind_to "Unable to add. No valid destinations or connection methods to be used exist."
-
-//d: Query displayed when an incomplete VPN connection method is tried to be saved
-//d: Operation is confirmed with this confirmation query.
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_vpn_quest_vpn_iap_incomplete_delete "Incomplete VPN access point details. Exit without saving?"
-
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginproxyvpn.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +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:  VPN plug-in's ECom proxy descriptor.
-*
-*/
-
-#include "cmpluginvpn.h"
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// Exported proxy for instantiation method resolution
-// Define the interface UIDs
-const TImplementationProxy ImplementationTable[] = 
-    {
-    IMPLEMENTATION_PROXY_ENTRY( KPluginVPNBearerTypeUid, CCmPluginVpn::NewL)
-    };
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
-    {
-    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
-
-    return ImplementationTable;
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2133 +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:  VPN plug-in IF implementation class.
-*
-*/
-
-#include <AknsUtils.h>
-#include <cmpluginvpn.mbg>
-#include <cmpluginvpnui.rsg>
-#include <cmmanager.rsg>
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-#include <cmcommonui.h>
-#include <aknPopup.h>
-#include <aknlistquerydialog.h>
-#include <AknIconArray.h>
-#include <vpnapidefs.h>
-#include <cmpluginwlandef.h>
-// #include <vpnapi.h>
-#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
-#include <featmgr.h>
-#include <ConeResLoader.h>
-#include <bautils.h>
-
-#include <commsdattypesv1_1_partner.h>
-#include <commsdattypeinfov1_1_internal.h>
-
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include "cmdestinationimpl.h"
-#include "cmvpncommonconstants.h"
-#include <cmcommonconstants.h>
-#include "cmpluginvpn.h"
-#include "cmpvpnsettingsdlg.h"
-#include "cmpvpnpolicyselectiondlg.h"
-#include "cmpvpnnextlayerselectdlg.h"
-
-using namespace CMManager;
-
-_LIT( KPluginVpnFileIcons, "z:cmpluginvpn.mbm" );
-//_LIT(KListItemFormat, "%d\t%S\t%S");
-
-static const TCmAttribConvTable SVpnConvTbl[] = 
-    {
-        { EVpnServicePolicyName, EPluginVpnAttribRangeMax, NULL },
-        { EVpnServicePolicy, KCDTIdVPNPolicyName, NULL,
-          R_QTN_VPN_SETT_VPN_IAP_POLICY_REFERENCE,
-          0, EConvCompulsory, R_QTN_VPN_SETT_VPN_IAP_POLICY_REFERENCE_COMPULSORY, 0, NULL, NULL },
-        { EVpnServicePolicyName, 0, NULL,
-          R_QTN_VPN_SETT_VPN_IAP_POLICY_REFERENCE,
-          0, EConvCompulsory, R_QTN_VPN_SETT_VPN_IAP_POLICY_REFERENCE_COMPULSORY, 0, NULL, NULL },
-        { EVpnIapId, KCDTIdVPNIAPRecord, NULL },
-        { EVpnNetworkId, KCDTIdVPNNetwork, &ReadOnlyAttributeL },
-        { 0, 0, NULL }
-    };
-
-static const TCmAttribConvTable SVpnVirtualIAPNextLayerConvTbl[] = 
-    {
-        { ECmNextLayerIapId, ECmNextLayerSNAPId+1, NULL },
-        { ECmNextLayerIapId, KCDTIdVirtualNextLayerIAP, NULL },
-        { ECmNextLayerSNAPId, KCDTIdVirtualNextLayerSNAP, NULL },
-        { 0, 0, NULL }
-    };
-    
-_LIT( KVpnVirtualBearerName, "vpnbearer" );
-_LIT( KVpnVirtualBearerAgent, "vpnconnagt.agt" );
-_LIT( KVpnVirtualBearerNif, "tunnelnif" );
-
-// constants needed for the virtualbearer table
-const TInt KNoTimeout = -1;
-const TUint32 KLastSessionTimeout = 3;
-
-
-const TUint32 KContainsVpn =        0x01;
-const TUint32 KLinksBackToParent =  0x02;
-const TUint32 KEmptyDest =          0x04;
-const TUint32 KNoNonVirtuals =      0x08;
-
-const TUint32 KBindDenied = KLinksBackToParent | KContainsVpn;
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::NewL()
-// --------------------------------------------------------------------------
-//
-CCmPluginVpn* CCmPluginVpn::NewL( TCmPluginInitParam* aInitParam )
-    {
-
-    CRepository* repository = CRepository::NewLC(KCRUidCommunicationSettings);
-
-    TInt vpnSupported;
-    repository->Get(KSettingsVPNSupported, vpnSupported);
-
-    CleanupStack::PopAndDestroy(repository);
-
-    if( !vpnSupported )
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-    CCmPluginVpn* self = new( ELeave ) CCmPluginVpn( aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::~CCmPluginVpn()
-// --------------------------------------------------------------------------
-//
-CCmPluginVpn::~CCmPluginVpn()
-    {
-    CCmPluginVpn::AdditionalReset();
-    
-    RemoveResourceFile( KPluginVPNResDirAndFileName );
-    
-    iBindableMethods.Reset();
-    iBindableMethods.Close();
-    delete iPolicyName;
-    CLOG_CLOSE;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CreateInstanceL
-// --------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmPluginVpn::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
-    {
-    CCmPluginVpn* self = new( ELeave ) CCmPluginVpn( &aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CCmPluginVpn()
-// --------------------------------------------------------------------------
-//
-CCmPluginVpn::CCmPluginVpn( TCmPluginInitParam* aInitParam )
-    : CCmPluginBaseEng( aInitParam )
-    , iBindableMethods( KCmArraySmallGranularity )
-    {
-    CLOG_CREATE;
-    iBearerType = KPluginVPNBearerTypeUid;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::ConstructL()
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::ConstructL()
-    {
-    CCmPluginBaseEng::ConstructL();
-
-    TRAP_IGNORE( iVirtualTableId = 
-                        CCDVirtualIAPNextLayerRecord::TableIdL( Session() ) );
-    if( !iVirtualTableId )
-        {
-        iVirtualTableId = CCDVirtualIAPNextLayerRecord::CreateTableL( Session() );
-        }
-
-    AddResourceFileL( KPluginVPNResDirAndFileName );
-    
-    AddConverstionTableL( (CCDRecordBase**)&iServiceRecord, NULL, SVpnConvTbl );
-    
-    iPolicyName = KNullDesC().AllocL();
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GetIntAttributeL()
-// --------------------------------------------------------------------------
-//
-TUint32 CCmPluginVpn::GetIntAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GetIntAttributeL" );
-
-    TUint32 retVal( 0 );
-    
-    switch( aAttribute )
-        {
-        case ECmBearerIcon:
-            {
-            TAknsItemID id;
-            
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KPluginVpnFileIcons, 
-                                             &KDC_BITMAP_DIR, 
-                                             NULL ) );
-                   
-            retVal = (TUint32)AknsUtils::CreateGulIconL( 
-                                    skinInstance, 
-                                    id,
-                                    mbmFile.FullName(), 
-                                    EMbmCmpluginvpnQgn_prop_vpn_access_point, 
-                                    EMbmCmpluginvpnQgn_prop_vpn_access_point_mask );
-            }
-            break;
-               
-        case ECmCommsDBBearerType:
-            {
-            retVal = KCommDbBearerVirtual;
-            }
-            break;
-        
-        case ECmDefaultUiPriority:
-        case ECmDefaultPriority:            
-            {
-            retVal = aAttribute == ECmDefaultPriority ?
-                        GlobalBearerPriority( TPtrC(KCDTypeNameVPNService) ) :
-                        GlobalUiBearerPriority( TPtrC(KCDTypeNameVPNService) );
-            }
-            break;  
-            
-        case EVpnIapId:
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-
-            retVal = ServiceRecord().iServiceIAP;
-            }
-            break;
-        case EVpnNetworkId:
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-
-            TUint32 snapId = iVirtualRecord->iNextLayerSNAP;
-            if ( snapId > KCmDefaultDestinationAPTagId &&
-                    snapId < ( KCmDefaultDestinationAPTagId+255 ) )
-                {
-                retVal = snapId - KCmDefaultDestinationAPTagId;
-                }
-            else
-                {
-                retVal = 0;
-                }
-            }
-            break;
-        case ECmNextLayerIapId:    
-            {
-            retVal = iVirtualRecord->iNextLayerIAP;
-            }  
-            break;
-        case ECmNextLayerSNAPId:           
-            {
-            retVal = iVirtualRecord->iNextLayerSNAP;
-            }  
-            break;
-        case ECmIapId:
-        case ECmId:
-        case ECmWapId:
-        case ECmIapServiceId:
-        case ECmInvalidAttribute:
-        case ECmLoadResult:
-        case ECmBearerType:
-        case ECmSeamlessnessLevel:
-        case ECmElementID:
-        case ECmNetworkId:
-        case ECmProxyPortNumber:
-        case ECmExtensionLevel:
-        case ECmWapIPWSPOption:
-        case ECmWapIPProxyPort:
-        case ECmNamingMethod:
-            {
-            retVal = CCmPluginBaseEng::GetIntAttributeL( aAttribute );
-            }
-            break;
-        
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-        
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GetBoolAttributeL()
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginVpn::GetBoolAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GetBoolAttributeL" );
-
-    TBool retVal( EFalse );
-
-    switch( aAttribute )
-        {
-        case ECmAddToAvailableList:
-            {
-            retVal = EFalse;
-            }
-            break;
-            
-        case ECmChargeCardUsageEnabled:
-            {
-            retVal = EFalse;
-            }
-            break;
-        case ECmBearerHasUi:
-            {
-            retVal = ETrue;
-            break;
-            }
-        case ECmCoverage:
-        case ECmDestination:
-        case ECmIPv6Supported:
-        case ECmHidden:
-        case ECmProtected:
-        case ECmMetaHighlight:
-        case ECmMetaHiddenAgent:
-        case ECmProxyUsageEnabled:
-        case ECmConnected:
-        case ECmIsLinked:
-        case ECmWapIPSecurity:
-            {
-            retVal = CCmPluginBaseEng::GetBoolAttributeL( aAttribute );
-            }
-            break;
-        case ECmVirtual:
-            {
-            return ETrue;
-            }           
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            
-            }
-        }
-        
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GetStringAttributeL()
-// --------------------------------------------------------------------------
-//
-HBufC* CCmPluginVpn::GetStringAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GetStringAttributeL" );
-
-    HBufC* retVal = NULL;
-    
-    switch( aAttribute )
-        {           
-        case ECmBearerSupportedName:
-            {
-            retVal = AllocReadL( R_QTN_NETW_CONSET_BEARER_SUPPORTED_VPN );
-            }
-            break;
-        
-        case EVpnServicePolicyName:
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-            else 
-                {
-                CCmPluginVpn* tmp = const_cast< CCmPluginVpn * >( this );
-                tmp->UpdatePolicyNameL();
-                }
-            retVal = iPolicyName->AllocL();
-            break;
-            }
-        case EVpnServicePolicy:
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-
-            if( !ServiceRecord().iServicePolicy.IsNull() )
-                {
-                retVal = ServiceRecord().iServicePolicy.GetL().AllocL();
-                } 
-            else
-                {
-                retVal = KNullDesC().AllocL();
-                }
-            }
-            break;
-            
-        case ECmName:   
-        case ECmProxyServerName:
-        case ECmProxyProtocolName:
-        case ECmProxyExceptions:
-        case ECmWapIPGatewayAddress:
-        case ECmWapIPProxyLoginName:
-        case ECmWapIPProxyLoginPass:
-        case ECmStartPage:
-            {
-            retVal = CCmPluginBaseEng::GetStringAttributeL( aAttribute );
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-        
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GetString8AttributeL()
-// --------------------------------------------------------------------------
-//
-HBufC8* CCmPluginVpn::GetString8AttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GetString8AttributeL" );
-
-    HBufC8* retVal = NULL;
-    
-    switch( aAttribute )
-        {
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-        
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::SetIntAttributeL()
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::SetIntAttributeL( const TUint32 aAttribute, 
-                                            TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::SetIntAttributeL" );
-
-    switch( aAttribute )
-        {
-        case ECmNextLayerIapId: 
-        case EVpnIapId:
-            {
-            CheckRecordIdValidityL( this, EVpnIapId, &aValue );
-            
-            // ServiceRecord.iServiceIAP should be 0 according to 
-            // DM CommsDat Contents v1.4, but for now it is made
-            // backward compatible
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-            
-            ServiceRecord().iServiceIAP = aValue;
-            ServiceRecord().iServiceNetwork = 0;
-            ServiceRecord().iServiceSNAP = 0;
-            iVirtualRecord->iNextLayerIAP = aValue;
-            iVirtualRecord->iNextLayerSNAP = 0;            
-            }
-            break;
-
-        case EVpnNetworkId:
-        case ECmNextLayerSNAPId:
-            {
-            // To keep backwards compability, keep these 2 attributes
-            // (EVpnNetworkId & ECmNextLayerSNAPId) together even though
-            // network id and destination id are no longer exactly the same.
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-
-            TInt destinationId( 0 );
-            destinationId = CheckValidityAndConvertDestinationIdL( aValue );
-            TMDBElementId defaultAP = DefaultAPRecordL();
-            
-            ServiceRecord().iServiceIAP = 0;
-            ServiceRecord().iServiceNetwork = 0;
-            ServiceRecord().iServiceSNAP = defaultAP;
-            iVirtualRecord->iNextLayerIAP = 0;
-            iVirtualRecord->iNextLayerSNAP = destinationId;
-            }
-            break;
-
-        case ECmSeamlessnessLevel:
-        case ECmProxyPortNumber:
-        case ECmNamingMethod:
-        case ECmWapIPWSPOption:
-        case ECmWapIPProxyPort:
-            {
-            CCmPluginBaseEng::SetIntAttributeL( aAttribute, aValue );
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::SetBoolAttributeL()
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::SetBoolAttributeL( const TUint32 aAttribute, 
-                                      TBool aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::SetBoolAttributeL" );
-
-    switch( aAttribute )
-        {
-        case ECmChargeCardUsageEnabled:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-
-        case ECmHidden:
-        case ECmProtected:
-        case ECmMetaHighlight:
-        case ECmMetaHiddenAgent:
-        case ECmProxyUsageEnabled:
-        case ECmWapIPSecurity:
-            {
-            CCmPluginBaseEng::SetBoolAttributeL( aAttribute, aValue );
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::SetStringAttributeL()
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::SetStringAttributeL( const TUint32 aAttribute, 
-                                        const TDesC16& aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::SetStringAttributeL" );
-
-    switch( aAttribute )
-        {
-        case EVpnServicePolicyName:
-            {
-            HBufC* tmp = aValue.AllocLC();
-            delete iPolicyName;
-            iPolicyName = tmp;
-            CleanupStack::Pop( tmp );
-            break;
-            }        
-        case EVpnServicePolicy:
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-            
-            CLOG_WRITE_1( "New policy set:[%S]", &aValue );
-            ServiceRecord().iServicePolicy.SetL( aValue );
-            }
-            break;
-        case ECmProxyServerName:
-            {
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            if( !aValue.Length() || !iProxyRecord->iPortNumber )
-                {
-                iProxyRecord->iPortNumber = KVpnProxyPortNumberDefault;
-                }
-            }
-            break;
-
-        case ECmName:
-        case ECmProxyProtocolName:
-        case ECmProxyExceptions:
-        case ECmWapIPGatewayAddress:
-        case ECmWapIPProxyLoginName:
-        case ECmWapIPProxyLoginPass:
-        case ECmStartPage:
-            {
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            }
-            break;
-
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::SetString8AttributeL()
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::SetString8AttributeL( const TUint32 aAttribute, 
-                                         const TDesC8& /*aValue*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::SetString8AttributeL" );
-
-    switch( aAttribute )
-        {
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-            break;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CanHandleIapIdL()
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginVpn::CanHandleIapIdL( TUint32 aIapId ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::CanHandleIapIdL1" );
-    TBool retVal( EFalse );
-    
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                            (CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
-        
-    CleanupStack::PushL( iapRecord );
-    iapRecord->SetRecordId( aIapId );
-    
-    TRAPD( err, iapRecord->LoadL( Session() ));
-
-    if( !err )
-        {
-        CanHandleIapIdL( iapRecord );
-        }
-    
-    CleanupStack::PopAndDestroy( iapRecord );
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CanHandleIapIdL()
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginVpn::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::CanHandleIapIdL" );
-    
-    TBool retVal( EFalse );
-    
-    if( TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameVPNService) ||
-        TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameVirtualBearer) )
-        {
-        // Further comparision is to find exact info that the IAP can handle by this plugin
-        CMDBRecordSet<CCDVirtualBearerRecord>* bearersRS = 
-                new(ELeave) CMDBRecordSet<CCDVirtualBearerRecord>
-                                                   (KCDTIdVirtualBearerRecord);
-        CleanupStack::PushL( bearersRS );
-
-        CCDVirtualBearerRecord* bearerRecord = 
-                static_cast<CCDVirtualBearerRecord *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
-
-        CleanupStack::PushL( bearerRecord );
-    
-        // Find entries used "vpnconnagt.agt" as agent from Table VirtualBearer
-        bearerRecord->iBearerAgent.SetL( KVpnVirtualBearerAgent );
-    
-        bearersRS->iRecords.AppendL( bearerRecord );
-
-        CleanupStack::Pop( bearerRecord );
-        bearerRecord = NULL;
-        
-        if ( bearersRS->FindL( Session() ) )
-            {
-            TUint32 recordId = (*bearersRS)[0]->RecordId();
-            TPtrC bearerName( (*bearersRS)[0]->iRecordName.GetL() );
-        
-            // Further comparing record ID referred to by this VPN IAP with entry ID in table VirtualBearer
-            // And also comparing bear name with our expected one "vpnbearer"
-            if( recordId == aIapRecord->iBearer && bearerName 
-                == TPtrC( KVpnVirtualBearerName ) )
-                {
-                retVal = ETrue;
-                }
-            }
-        
-        CleanupStack::PopAndDestroy( bearersRS );
-        }
-
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::RunSettingsL()
-// --------------------------------------------------------------------------
-//        
-TInt CCmPluginVpn::RunSettingsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::RunSettingsL" );
-    CmPluginVpnSettingsDlg* dlg = CmPluginVpnSettingsDlg::NewL( *this );
-    
-    return dlg->ConstructAndRunLD();
-    }        
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::LoadServiceSettingL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::LoadServiceSettingL" );
-    
-    if( TPtrC(KCDTypeNameVPNService) == iIapRecord->iServiceType  )
-        {
-        iServiceRecord = static_cast<CCDVPNServiceRecord *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdVPNServiceRecord));
-        }
-    else
-        // this IAP service is not supported by this plugin.
-        {
-        User::Leave( KErrNotSupported );
-        }
-
-        
-    CCmPluginBaseEng::LoadServiceSettingL();
-    }
-    
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::LoadAdditionalRecordsL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::LoadAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::LoadAdditionalRecordsL" );
-
-    iVirtualRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
-    
-    CMDBRecordSet<CCDVirtualIAPNextLayerRecord>* virtualRS = 
-              new(ELeave) CMDBRecordSet<CCDVirtualIAPNextLayerRecord>( iVirtualTableId );
-    CleanupStack::PushL( virtualRS );
-    
-    CCDVirtualIAPNextLayerRecord* record = 
-                            new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
-    
-    record->iIAP = iIapId;
-    CleanupStack::PushL( record );
-    virtualRS->iRecords.AppendL( record );
-    CleanupStack::Pop( record );
-    record = NULL;
-    
-    if( virtualRS->FindL( Session() ) )
-        {
-        iVirtualRecord->SetRecordId( (*virtualRS)[0]->RecordId() );
-        
-        iVirtualRecord->LoadL( Session() );
-        
-        CLOG_WRITE_3( "Next layer: IAP[%d], NextSNAP[%d], NextIAP[%d]",
-                      TUint( iVirtualRecord->iIAP ),
-                      TUint( iVirtualRecord->iNextLayerSNAP ),
-                      TUint( iVirtualRecord->iNextLayerIAP ) );
-        }
-    else
-        {
-        CLOG_WRITE( "Virtual records not found" );
-        }
-    
-    CleanupStack::PopAndDestroy( virtualRS );
-    AddConverstionTableL( (CCDRecordBase**)&iVirtualRecord, NULL, SVpnVirtualIAPNextLayerConvTbl );
-    
-    if (iIapRecord->iRecordName.GetL() == KNullDesC) 
-        {
-        //now we have next layer info, so generate default cm name if name is empty (new cm)
-        GenerateDefaultCmNameL();
-        }
-        
-    if ( !iProxyRecord->iPortNumber )
-        {
-        iProxyRecord->iPortNumber = KVpnProxyPortNumberDefault;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::InitializeWithUiL()
-// --------------------------------------------------------------------------
-//        
-TBool CCmPluginVpn::InitializeWithUiL( TBool /*aManuallyConfigure*/ )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::InitializeWithUiL" );
-    TInt retVal( EFalse );
-    
-    // Compile a list of bindable methods, issue a warning if none found
-    if ( BindableRealConnectionsExistL() )
-        {
-        // check if the intended destination is not available for VPN,
-        // or, if the destination has not been set yet, whether there is 
-        // at least one suitable destination to place it in
-        TBool validParent = EFalse;
-        
-        if ( iParentDest )
-            {
-            // parent destination is known
-            // check if it is not linked by any other VPN
-            validParent = !HasUpstreamVpnL( iParentDest, ETrue );
-            }
-        else
-            {
-            // parent destination is not known yet
-            // check if there is any destination into which this VPN could be put
-
-            // trigger the recalculation
-            RArray<TUint32> parents ( CmMgr().DestinationCountL() );
-            CleanupClosePushL( parents );
-            
-            CmMgr().AllDestinationsL( parents );
-            
-            FilterPossibleParentsL( parents );
-
-            // if there is only one such destination, we should filter out 
-            // that one from the underlying candidates
-            if ( parents.Count() == 1 )
-                {
-                TInt destIndex = iBindableMethods.Find( parents[0] );
-                if ( destIndex != KErrNotFound )
-                    {
-                    // got it, now remove
-                    iBindableMethods.Remove( destIndex );
-                    }
-
-                if ( iBindableMethods.Count() )
-                    {
-                    // if there are still some methods to bind to,
-                    // mark the destination as valid
-                    validParent = ETrue;
-                    }
-                    
-                }
-            else 
-                {
-                validParent = ( parents.Count() > 0 );
-                }
-                
-            CleanupStack::PopAndDestroy( &parents );
-            }
-
-        if ( !validParent )
-            {
-            TCmCommonUi::ShowNoteL( R_CMWIZARD_NO_VPN_STACKING,
-                                    TCmCommonUi::ECmErrorNote );
-            
-            return retVal;
-            }
-              
-        
-        // Check VPN policies installed on the device
-        if ( ShowPolicySelectionDlgL() )
-            {
-            retVal = ShowRealConnectionSelectionDlgL();
-
-            if ( retVal )
-                {
-                if ( iIapRecord->iRecordName.GetL() == KNullDesC ) 
-                    {
-                    // now we have next layer info, so generate default cm name 
-                    GenerateDefaultCmNameL();
-                    }
-                
-                }
-            }
-        }
-    else
-        {
-        HBufC* buf = AllocReadL( R_QTN_NETW_CONSET_INFO_NO_CM_TO_BIND_TO );
-        TPtr ptr ( buf->Des() );
-        CleanupStack::PushL( buf );
-        TCmCommonUi::ShowNoteL( ptr, TCmCommonUi::ECmErrorNote );
-        CleanupStack::PopAndDestroy( buf );
-        }              
-    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::ServiceRecord()
-// --------------------------------------------------------------------------
-//        
-CCDVPNServiceRecord& CCmPluginVpn::ServiceRecord() const
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::ServiceRecord" );
-    return *static_cast<CCDVPNServiceRecord*>( iServiceRecord );
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::ServiceRecordExists()
-// --------------------------------------------------------------------------
-// 
-TBool CCmPluginVpn::ServiceRecordExists() const
-    {
-    if ( !iServiceRecord )
-        {
-        return EFalse;
-        }
-    return ETrue;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CreateNewServiceRecordL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::CreateNewServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::CreateNewServiceRecordL" );
-
-    delete iServiceRecord; iServiceRecord = NULL;
-    
-    iServiceRecord = static_cast<CCDVPNServiceRecord *>
-                    (CCDRecordBase::RecordFactoryL( KCDTIdVPNServiceRecord ));
-
-    CLOG_WRITE("New service record, policy emptied");
-    ServiceRecord().iServicePolicy.SetL( KNullDesC );
-    ServiceRecord().iServiceIAP = 0;
-    ServiceRecord().iServiceNetwork = 0;
-    ServiceRecord().iServiceSNAP = 0;
-
-    
-    iProxyRecord->iPortNumber = KVpnProxyPortNumberDefault;
-
-    SetIntAttributeL( ECmSeamlessnessLevel, ESeamlessnessShowprogress );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginVpn::CreateAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginVpn::CreateAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::CreateAdditionalRecordsL" );
-
-    delete iVirtualRecord;
-    iVirtualRecord = NULL;
-    
-    iVirtualRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginVpn::UpdateServiceRecordL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginVpn::UpdateServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::UpdateServiceRecordL" );
-
-    CCmPluginBaseEng::UpdateServiceRecordL();
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginVpn::UpdateAdditionalRecordsL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginVpn::UpdateAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::UpdateAdditionalRecordsL" );
-
-    CheckIfNameModifiedL( iVirtualRecord );
-    
-    if( !iVirtualRecord->RecordId() )
-        {
-        iVirtualRecord->SetRecordId( KCDNewRecordRequest );
-        
-        iVirtualRecord->iIAP = iIapId;
-        iVirtualRecord->StoreL( Session() );
-        }
-    else
-        {
-        iVirtualRecord->ModifyL( Session() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginVpn::ServiceRecordIdLC
-// ---------------------------------------------------------------------------
-//
-void CCmPluginVpn::ServiceRecordIdLC( HBufC* &aName, 
-                                      TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::ServiceRecordIdLC" );
-
-    aName = TPtrC( KCDTypeNameVPNService ).AllocLC();
-    aRecordId = iServiceRecord->RecordId();
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::BearerRecordIdLC()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::BearerRecordIdLC( HBufC* &aBearerName, 
-                                     TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::BearerRecordIdLC" );
-
-    CMDBRecordSet<CCDVirtualBearerRecord>* bearersRS = 
-              new(ELeave) CMDBRecordSet<CCDVirtualBearerRecord>
-                                                   (KCDTIdVirtualBearerRecord);
-    CleanupStack::PushL( bearersRS );
-
-    // Now try to find the linked proxy record
-    // create new record
-    CCDVirtualBearerRecord* bearerRecord = 
-                static_cast<CCDVirtualBearerRecord *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
-
-    CleanupStack::PushL( bearerRecord );
-    
-    bearerRecord->iBearerAgent.SetL( KVpnVirtualBearerAgent );
-    
-    bearersRS->iRecords.AppendL( bearerRecord );
-
-    CleanupStack::Pop( bearerRecord );
-    bearerRecord = NULL;
-    
-    CLOG_WRITE_1( "Looking for bearer: [%d]", TUint32(iIapRecord->iService) );
-    
-    if ( !bearersRS->FindL( Session() ) )
-        // No bearer record found -> create a default one.
-        {
-        bearerRecord = static_cast<CCDVirtualBearerRecord *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
-        CleanupStack::PushL(bearerRecord);
-
-        bearerRecord->iRecordName.SetL( KVpnVirtualBearerName );
-        bearerRecord->iBearerAgent.SetL( KVpnVirtualBearerAgent );
-        bearerRecord->iVirtualBearerNifName.SetL(KVpnVirtualBearerNif);
-        bearerRecord->iLastSocketActivityTimeout = (TUint32)KNoTimeout;
-        bearerRecord->iLastSessionClosedTimeout = KLastSessionTimeout;
-        bearerRecord->iLastSocketClosedTimeout = (TUint32)KNoTimeout;
-        
-        bearerRecord->SetRecordId( KCDNewRecordRequest );
-        bearerRecord->StoreL( Session() );
-        
-        aRecordId = bearerRecord->RecordId();
-
-        CleanupStack::PopAndDestroy(bearerRecord);
-        }
-    else
-        {
-        aRecordId = (*bearersRS)[0]->RecordId();
-        }
-
-    CleanupStack::PopAndDestroy( bearersRS );
-
-    aBearerName = TPtrC( KCDTypeNameVirtualBearer ).AllocLC();
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::AdditionalReset()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::AdditionalReset()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::AdditionalReset" );
-
-    delete iNetworkRecord;
-    iNetworkRecord = NULL;
-
-    delete iVirtualRecord;
-    iVirtualRecord = NULL;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::PrepareToUpdateRecordsL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginVpn::PrepareToUpdateRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::PrepareToUpdateRecordsL" );
-    // Check here if every data of the connection method is valid
-    // before records were saved to CommsDat.
-    // Set incorrect attribute id in iInvalidAttribute and leave
-    // with KErrArgument.
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::ShowPolicySelectionDlgL
-// --------------------------------------------------------------------------
-//  
-TBool CCmPluginVpn::ShowPolicySelectionDlgL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::ShowPolicySelectionDlgL" );
-
-    TBool retVal ( EFalse );
-    
-    CmPluginVpnPolicySelectionDlg* dlg = 
-                                CmPluginVpnPolicySelectionDlg::NewL( *this );
-    CleanupStack::PushL( dlg );
-    retVal = dlg->ShowPolicySelectionListL();
-    CleanupStack::PopAndDestroy();
-    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::BindableRealConnectionsExistL
-// --------------------------------------------------------------------------
-//  
-TBool CCmPluginVpn::BindableRealConnectionsExistL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::BindableRealConnectionsExistL" );
-
-    TBool retVal ( EFalse );
-    
-    iBindableMethods.Close();
-    
-    // Compile and array of destination IDs which the VPN CM can be bound to
-    // includes Uncategorised destination and Easy WLAN if valid
-    CmMgr().AllDestinationsL( iBindableMethods );
-
-    // Filter out invalid methods
-    for ( TInt i = 0; i < iBindableMethods.Count(); i++ )
-        {
-        TUint32 bindresult = 
-                CanDestUsedAsUnderlyingConnectionL( iBindableMethods[i] );
-                
-        if ( bindresult & (KBindDenied | KNoNonVirtuals | KEmptyDest ) )
-            {
-            iBindableMethods.Remove( i );
-            i--;
-            }
-        }
-    
-    // If there are destination IDs which the VPN CM can be bound to.
-    if( iBindableMethods.Count() )
-        {
-        retVal = ETrue;
-        }
-
-    // 2. Are there uncategorised connection methods which aren't virtual?
-    RArray<TUint32> cmArray ( KCmArrayMediumGranularity );
-    CleanupClosePushL( cmArray );
-    CmMgr().ConnectionMethodL( cmArray, EFalse );
-    
-    for ( TInt k = 0; k < cmArray.Count(); k++ )
-        {
-        TInt bearerType (0);
-        TRAPD( err, bearerType = CmMgr().GetConnectionMethodInfoIntL( 
-            cmArray[k], ECmBearerType ););
-
-        //if no plugin is found to handle the bearertype, GetConnectionMethodInfoIntL leaves with KErrNotSupported
-        if ( err == KErrNotSupported )				
-            {
-            //continue with the next element in the array
-            continue;
-            }
-                                                
-        // uncategorised contains a non-virtual connection method
-        if ( !CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-            {
-            retVal = ETrue;
-            iBindableMethods.Append( KDestItemUncategorized );
-            break;
-            }
-        }
-    CleanupStack::PopAndDestroy( &cmArray );
-    
-    // 3. Is Easy WLAN available?
-    if ( FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
-        {        
-        // easy wlan is available
-        if ( CmMgr().EasyWlanIdL() )
-            {
-            iBindableMethods.Append( KDestItemEasyWlan );
-            retVal = ETrue;
-            }
-        }
-    
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::ShowRealConnectionSelectionDlgL
-// --------------------------------------------------------------------------
-//  
-TBool CCmPluginVpn::ShowRealConnectionSelectionDlgL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::ShowRealConnectionSelectionDlgL" );
-    TBool retVal ( EFalse );
-
-    TBool snapSelected ( EFalse );
-    TUint32 nextLayerId ( 0 );
-    
-    CmPluginVpnNextLayerSelectDlg* dlg = 
-                    CmPluginVpnNextLayerSelectDlg::NewL( *this,
-                                                         iBindableMethods,
-                                                         snapSelected,
-                                                         nextLayerId );
-    if ( dlg->ExecuteLD( R_VPN_REAL_CM_SELECTION_LIST ) )
-        {
-        // Handle results
-        retVal = ETrue;
-        }
-
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::IsLinkedToIap
-// --------------------------------------------------------------------------
-//  
-TBool CCmPluginVpn::IsLinkedToIap( TUint32 aIapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::IsLinkedToIap" );
-
-    return ( ServiceRecord().iServiceIAP == aIapId );
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::IsLinkedToSnap
-// --------------------------------------------------------------------------
-//  
-TBool CCmPluginVpn::IsLinkedToSnap( TUint32 aSnapId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::IsLinkedToSnap" );
-
-    return ( iVirtualRecord->iNextLayerSNAP == aSnapId );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCmPluginVpn::RestoreAttributeL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginVpn::RestoreAttributeL( const TUint32 aAttribute )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::RestoreAttributeL" );
-        
-    if ( aAttribute == EVpnServicePolicyName )
-        {
-        // also restore policy name
-        RVpnServ ps;
-        CleanupClosePushL<RVpnServ>( ps );
-        
-        TInt err = ps.Connect();
-        
-        if ( !err )
-            {
-            if( !ServiceRecordExists() )
-                {
-                User::Leave( KErrNotSupported );
-                }
-
-            CCDVPNServiceRecord *r = &(ServiceRecord());
-            TVpnPolicyName pId( r->iServicePolicy );
-            
-            TInt policyCount(0);
-            err = ps.EnumeratePolicies(policyCount);
-            if ( !err && policyCount)
-                {                
-                CArrayFixFlat<TVpnPolicyInfo>* policyList;
-                policyList = new (ELeave) CArrayFixFlat<TVpnPolicyInfo>(policyCount);
-                CleanupStack::PushL(policyList);
-
-                err = ps.GetPolicyInfoList(policyList);
-                
-                TBool found(EFalse);
-                
-                if ( err == KErrNone )
-                    {
-                    for (TInt i(0); i<policyList->Count(); ++i)
-                        {
-                        if (pId.Compare((*policyList)[i].iId) == 0 )
-                            {
-                            SetStringAttributeL( EVpnServicePolicyName,
-                                (*policyList)[i].iName );
-                            found = ETrue;
-                            break;    
-                            }
-                        }                    
-                    }
-                    
-                if ( err || (!found) )
-                    {
-                    CLOG_WRITE_1("Error when restoring policy attribute, [%d]", err );
-                    // the set policies are not installed,
-                    // or we can not access vpn client:
-                    // Must be defined qtn_selec_setting_compulsory is displayed 
-                    // for the invalid settings.                           
-                    // reset policy to compulsory
-                    SetStringAttributeL( EVpnServicePolicyName,
-                                                          KNullDesC() );
-                    SetStringAttributeL( EVpnServicePolicy, 
-                                                          KNullDesC() );                        
-                    }
-                CleanupStack::PopAndDestroy(policyList);              
-                }
-            }
-        CleanupStack::PopAndDestroy(); // ps.Close
-        }
-    // Type of EVpnIapId is ELink. This is plugin specified type.
-    // So, it should be handled here.
-    else if( aAttribute == EVpnIapId )
-        {
-        if( !ServiceRecordExists() )
-            {
-            User::Leave( KErrNotSupported );
-            }
-
-        ServiceRecord().iServiceIAP = 0;
-        iVirtualRecord->iNextLayerIAP = 0;
-        iVirtualRecord->iNextLayerSNAP = 0;
-        }
-    else
-        {
-        CCmPluginBaseEng::RestoreAttributeL( aAttribute );
-        }
-    }
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GenerateDefaultCmNameL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::GenerateDefaultCmNameL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GenerateDefaultCmNameL" );
-
-    //create default string
-    RFs fs;
-    CleanupClosePushL<RFs>( fs );
-    User::LeaveIfError( fs.Connect() );
-
-    // There may not be a UI context yet....
-    TFileName resourceFile;
-    _LIT( KDriveZ, "z:" );
-    resourceFile.Append( KDriveZ );
-    resourceFile.Append( KDC_RESOURCE_FILES_DIR );
-    _LIT( KCmmResFileName, "cmpluginvpnui.rsc" );
-    resourceFile.Append( KCmmResFileName );
-    BaflUtils::NearestLanguageFile( fs, resourceFile );
-
-    RResourceFile rf;
-    CleanupClosePushL<RResourceFile>( rf );
-    rf.OpenL( fs, resourceFile );
-    rf.ConfirmSignatureL( 0 );
-    HBufC8* readBuffer = rf.AllocReadLC( R_QTN_NETW_CONSET_METHOD_NAME_VPN );
-    const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(),
-                                 ( readBuffer->Length() + 1 ) >> 1 );
-    HBufC16* textBuffer=HBufC16::NewL( ptrReadBuffer.Length() );
-    CleanupStack::PushL( textBuffer );
-    *textBuffer=ptrReadBuffer;
-
-    // Find %U and replace it with %S
-    TPtr sourceString = textBuffer->Des();
-    _LIT(KPercentS,"%S");
-    _LIT(KPercentU,"%U");
-    TInt puPos = sourceString.Find(KPercentU);
-    if ( puPos >= 0 )
-        {
-        sourceString.Replace( puPos, 
-            static_cast<TDesC>(KPercentS).Length(), KPercentS );                
-        }
-
-    // Check if there is a length defined in copy of the recourse string e.g. "VPN(%U[08])"
-    // If it's found convert it to integer and remove it from the string.
-    TInt maxDataLength( 0 );
-    TInt perceLength = static_cast<TDesC>(KPercentS).Length();
-    if ( sourceString[puPos+perceLength] == '[' )
-        {
-        // Key includes max datalength 
-        maxDataLength = 10*( sourceString[puPos+perceLength+1]-'0' ) 
-                           + ( sourceString[puPos+perceLength+2]-'0' );
-        sourceString.Delete(puPos+perceLength,4);
-        }
-
-    // Get the IAP name which the VPM Connection Method points to
-    HBufC* refName = NULL;
-
-    if( !ServiceRecordExists() )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    
-    if ( ServiceRecord().iServiceIAP )
-        {
-        // ask for the bearer type
-        TUint32 bearerType = CmMgr().GetConnectionMethodInfoIntL( 
-                ServiceRecord().iServiceIAP, ECmBearerType );
-        
-        if ( iCmMgr.EasyWlanIdL() && bearerType == KUidWlanBearerType )
-            {           
-            refName = GenerateVPNPointToWLANNetworkLC(rf, refName);
-            }
-        else
-            {
-            refName = iCmMgr.GetConnectionMethodInfoStringL(
-                                                ServiceRecord().iServiceIAP,
-                                                ECmName );
-            CleanupStack::PushL( refName );
-            }
-        }
-    else
-        {
-        CCmDestinationImpl* dest = iCmMgr.DestinationL( 
-                                            iVirtualRecord->iNextLayerSNAP );
-        CleanupStack::PushL( dest );
-        refName = dest->NameLC();
-        CleanupStack::Pop( refName ); 
-        CleanupStack::PopAndDestroy( dest );
-        CleanupStack::PushL( refName );
-        }
-    
-    TPtr16 refNamePtr = refName->Des();
-    // If there was a length definition e.g. [08]--> length is 8 the CM or
-    // Destination name must be cut to length - 1 and copy the ellipsis(shown as
-    // "...") to the end.
-    if( maxDataLength > 0 && refName->Length() > maxDataLength )
-        {
-        refNamePtr.Delete( maxDataLength-1, refName->Length()-maxDataLength+1);
-        TText ellipsis(KEllipsis);
-        refNamePtr.Insert( maxDataLength-1, TPtrC(&ellipsis,1) );
-        }
-        
-    if ( maxDataLength == 0 )
-        {
-        // Length not defined in resource string so set it to refName length
-        maxDataLength = refNamePtr.Length();
-        }
-    
-    HBufC* cmName = HBufC::NewL( sourceString.Length() + maxDataLength );
-    CleanupStack::PushL( cmName );
-    cmName->Des().Format(sourceString,  &refNamePtr);
-    SetStringAttributeL( ECmName,  *cmName );
-    CleanupStack::PopAndDestroy( cmName );
-    CleanupStack::PopAndDestroy( refName ); 
-    CleanupStack::PopAndDestroy( textBuffer ); 
-    CleanupStack::PopAndDestroy( readBuffer ); 
-    CleanupStack::PopAndDestroy( &rf );
-    CleanupStack::PopAndDestroy( &fs );
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GenerateDefaultCmNameL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::CreateNewL()
-    {
-    CCmPluginBaseEng::CreateNewL();
-
-    iIapRecord->iRecordName.SetL( KNullDesC );
-    }
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::LoadL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::LoadL( TUint32 aIapId )
-    {
-    CCmPluginBaseEng::LoadL( aIapId );
-    if ( iServiceRecord )
-        {
-//      UpdatePolicyNameL();
-        }
-    }
-        
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::UpdatePolicyNameL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::UpdatePolicyNameL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::UpdatePolicyNameL" );
-    // now get policy name from ID
-    
-    RVpnServ ps;
-    CleanupClosePushL<RVpnServ>( ps );
-    TInt err = ps.Connect();
-
-    CLOG_WRITE_1( "Connected to VPN server, err [%d]", err ); 
-    
-    if (! err )        
-        {
-        if( !ServiceRecordExists() )
-            {
-            User::Leave( KErrNotSupported );
-            }
-
-        CCDVPNServiceRecord *r = &(ServiceRecord());
-        TVpnPolicyName pId( r->iServicePolicy );
-        TInt policyCount(0);
-        err = ps.EnumeratePolicies(policyCount);
-        if ( !err && policyCount)
-            {                
-            CArrayFixFlat<TVpnPolicyInfo>* policyList;
-            policyList = new (ELeave) CArrayFixFlat<TVpnPolicyInfo>(policyCount);
-            CleanupStack::PushL(policyList);
-
-            err = ps.GetPolicyInfoList(policyList);
-            if ( err )
-                {
-                // the set policies are not installed, 
-                // Must be defined qtn_selec_setting_compulsory is displayed 
-                // for the invalid settings.                           
-                // reset policy to compulsory
-                SetStringAttributeL( EVpnServicePolicyName,
-                                                      KNullDesC() );
-                SetStringAttributeL( EVpnServicePolicy, 
-                                                      KNullDesC() );                        
-                }
-            else
-                {
-                for (TInt i(0); i<policyList->Count(); ++i)
-                    {
-                    if (pId.Compare((*policyList)[i].iId) == 0 )
-                        {
-                        SetStringAttributeL( EVpnServicePolicyName,
-                            (*policyList)[i].iName );
-                        break;    
-                        }
-                    }
-                }
-            CleanupStack::PopAndDestroy(policyList);              
-            }
-        }
-    CleanupStack::PopAndDestroy(); // ps.close 
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CanDestUsedAsUnderlyingConnectionL
-// --------------------------------------------------------------------------
-//
-TUint32 CCmPluginVpn::CanDestUsedAsUnderlyingConnectionL( TUint32 aDestinationId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::CanDestUsedAsUnderlyingConnectionL" );
-
-    TUint32 retval(KEmptyDest);
-    
-    TBool hasNonVirtualCm(EFalse);
-    
-    CCmDestinationImpl* dest = CmMgr().DestinationL( aDestinationId );
-    CleanupStack::PushL( dest );
-    
-    // is this our parent destination (if there is one)
-    CCmDestinationImpl* parentDest = ParentDestination();
-    if ( parentDest )
-        {
-        if ( dest->Id() == parentDest->Id() )
-            {
-            retval |= KLinksBackToParent;
-            }
-        }
-    delete parentDest;    
-    if ( !( retval & KBindDenied ) )
-        {
-        // filter out:
-        //      empty destinations
-        //      destinations containing VPN in or linked in
-        //      destinations containing emb. dest. if the linked dest is empty
-        
-        // so if we found a VPN inside, or a VPN linked through an amb. dest, 
-        // than it should be filtered out. 
-        // it also should be filtered out if it links back 
-        // to our parent dest. in any way...
-        
-        TInt count = dest->ConnectionMethodCount();
-        
-        if ( count )
-            {
-            // has at least one CM
-            retval &= ~KEmptyDest;
-            for ( TInt j = 0; j < dest->ConnectionMethodCount(); j++ )
-                {
-                CCmPluginBase* cm = dest->GetConnectionMethodL( j );
-                CleanupStack::PushL( cm );
-                TUint32 cmId = cm->GetIntAttributeL( ECmId );
-                
-                TInt bearerType = CmMgr().GetConnectionMethodInfoIntL( 
-                                        cmId, ECmBearerType );
-                if ( !CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                    {
-                    // found a non-virtual connection method
-                    hasNonVirtualCm = ETrue;
-                    }
-                else
-                    {
-                    // now we have to check if it is an emb.dest., if it is, 
-                    // check if the referenced destination is not empty,
-                    // it has at least one, non-virtual CM, 
-                    // OR it has another emb.dest., then recurse it...
-                    if ( CmMgr().GetBearerInfoBoolL( bearerType, ECmDestination ) )
-                        { // it is an emb. destination
-                        // get the emb. destination
-                        CCmDestinationImpl* embdest = cm->Destination();
-                        TUint32 emdestId = embdest->Id();
-                        // check if the embeded destination can be used
-                        TUint32 res = CanDestUsedAsUnderlyingConnectionL( emdestId );
-                        if ( res & KBindDenied )
-                            {
-                            // emb. dest. can not be used
-                            retval |= (res & KBindDenied );
-                            }
-                        else
-                            {
-                            // if binding is not denied, still what to do with 
-                            // KEmptyDest & KNoNonVirtuals?
-                            // if it does not return KNoNonVirtuals, then it 
-                            // has at least one, non-virt. CM
-                            if ( res & KNoNonVirtuals )
-                                {
-                                // if we already have a non-virt, then it is no
-                                // problem, no need to change hasNonVirtualCm
-                                // as it starts from EFalse.
-                                }
-                            else
-                                {
-                                // if it is not empty, than 
-                                // it has at least one, non-virt. CM, so:
-                                if ( !( res & KEmptyDest ) )
-                                    {
-                                    hasNonVirtualCm = ETrue;
-                                    }
-                                }                                
-                            // if it is an empty dest., then:
-                            // if we still have the base as empty, then 
-                            // there is nothing to do.
-                            // if the base is non-empty, again, nothing to do 
-                            if ( !(res & KEmptyDest ) )
-                                { 
-                                // not empty dest, so set base 
-                                // value to reflect it
-                                hasNonVirtualCm = ETrue;
-                                }
-                            }
-                        }
-                    else
-                        {
-                        // virtual, but not emb. dest
-                        // check if it is VPN
-                        // if it is VPN, 
-                        if ( bearerType == KPluginVPNBearerTypeUid )
-                            {
-                            retval |= KContainsVpn;
-                            }
-                        }
-                    }
-                CleanupStack::Pop( cm );
-                cm = NULL; // not owned                    
-                if ( retval & KBindDenied )
-                    { // binding is already denied, we can break...
-                    break;
-                    }
-                }
-            if ( !hasNonVirtualCm )
-                {
-                retval |= KNoNonVirtuals;
-                }
-            }
-        else
-            {
-            retval |= KEmptyDest;
-            }
-        }
-    CleanupStack::PopAndDestroy( dest );
-    
-    return retval;
-    }
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::BindableDestinationsL
-// --------------------------------------------------------------------------
-//  
-void CCmPluginVpn::BindableDestinationsL( RArray<TUint32>& aDestinationArray )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::BindableDestinationsL" );
-    TUint32 upLimit = KCmDefaultDestinationAPTagId + 0xff;
-    
-    aDestinationArray.Close();
-    if ( BindableRealConnectionsExistL() )
-        {
-        for (TInt i=0; i<iBindableMethods.Count(); i++)
-            {
-            if ( iBindableMethods[i] <= KDestMaxId ||
-                    (iBindableMethods[i] > KCmDefaultDestinationAPTagId && iBindableMethods[i] <= upLimit) )
-                {
-                aDestinationArray.AppendL( iBindableMethods[i] );
-                }
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::HasUpstreamVpnL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginVpn::HasUpstreamVpnL( TUint32 aId, TBool aIsDestination )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::HasUpstreamVpnL" );
-        
-    // the function returns true if:
-    //  - the destination given is referenced by a CM which is either VPN or 
-    //    has an upstream VPN
-    //  - the CM given is linked by a VPN or the CM or its destination have 
-    //    an upstream VPN
-    TBool hasUpstreamVpn( EFalse );
-
-    // array of destinations
-    RArray<TUint32> destArray( CmMgr().DestinationCountL() );
-    CleanupClosePushL( destArray );
-    
-    // get all destinations
-    CmMgr().AllDestinationsL( destArray );
-    
-    CLOG_WRITE( "CCmPluginVpn::HasUpstreamVpnL checking destinations..." );
-    
-    for ( TInt i = 0; !hasUpstreamVpn && i < destArray.Count(); ++i )
-        {
-        if ( aIsDestination && destArray[i] == aId )
-            {
-            // connection methods cannot link to their parent destination
-            // so we can skip this round
-            continue;
-            }
-
-        CCmDestinationImpl* dest = CmMgr().DestinationL( destArray[i] );
-        CleanupStack::PushL( dest );
-
-        // check out all CM's from destinations
-        TInt cmCount = dest->ConnectionMethodCount();
-        
-        for ( TInt j = 0; j < cmCount; ++j )
-            {
-            // instantiate a connmethod
-            CCmPluginBase* cm = dest->GetConnectionMethodL( j );
-            CleanupStack::PushL( cm );
-
-            TUint32 cmId = cm->GetIntAttributeL( ECmId );
-
-            // ask for the bearer type
-            TUint32 bearerType = CmMgr().GetConnectionMethodInfoIntL( 
-                                                        cmId, ECmBearerType );
-            
-            // is it virtual? if not, there's nothing to do
-            if ( CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-                {
-                // it is virtual
-
-                if ( CmMgr().GetBearerInfoBoolL( bearerType, ECmDestination ) )
-                    {
-                    // what's more, it is an embedded destination
-                    if ( aIsDestination && cm->IsLinkedToSnap( aId ) )
-                        {
-                        hasUpstreamVpn = 
-                            HasUpstreamVpnL( cmId, EFalse ) ||
-                            HasUpstreamVpnL( dest->Id(), ETrue );
-                        }
-                    }
-                else
-                    {
-                    // it is not an emb.dest.
-                    if ( aIsDestination )
-                        {
-                        // does it link to this destination?
-                        if ( cm->IsLinkedToSnap( aId ) )
-                            {
-                            hasUpstreamVpn = 
-                                ( bearerType == KPluginVPNBearerTypeUid ) ||
-                                HasUpstreamVpnL( cmId, EFalse ) ||
-                                HasUpstreamVpnL( dest->Id(), ETrue );
-                            }
-                        }
-                    else
-                        {
-                        CCmPluginBase* targetCm = 
-                                            CmMgr().GetConnectionMethodL( aId );
-                        CleanupStack::PushL( targetCm );
-                        
-                        // does it link to this CM or to its destination?
-                        if ( cm->IsLinkedToIap( aId ) )
-                            {
-                            hasUpstreamVpn = 
-                                ( bearerType == KPluginVPNBearerTypeUid ) ||
-                                HasUpstreamVpnL( cmId, EFalse );
-                            }
-/************** after cmmanager fix **************
-    CCmDestinationImpl* parentDest = targetCm->ParentDestination();
-                        else if ( parentDest &&
-                                  cm->IsLinkedToSnap( 
-                                        parentDest->Id() ) )
-                            {
-                            hasUpstreamVpn = 
-                                ( bearerType == KPluginVPNBearerTypeUid ) ||
-                                HasUpstreamVpnL( cmId, EFalse ) ||
-                                HasUpstreamVpnL( dest->Id(), ETrue );
-                            }
-     delete parentDest;
-***************************************************/
-                        else
-                            {
-                            TUint32 parent( 0 );
-                            parent = FindParentDestinationL( aId );
-                            
-                            if ( parent && cm->IsLinkedToSnap( parent ) )
-                                {
-                                hasUpstreamVpn = 
-                                    ( bearerType == KPluginVPNBearerTypeUid ) ||
-                                    HasUpstreamVpnL( cmId, EFalse ) ||
-                                    HasUpstreamVpnL( dest->Id(), ETrue );
-                                }
-                            
-                            }
-
-                        CleanupStack::PopAndDestroy( targetCm );
-                        }
-                    
-                    } // if !emb.dest.
-
-                } // if virtual
-
-            CleanupStack::Pop( cm );
-            } // for j
-
-        CleanupStack::PopAndDestroy( dest );
-        } // for i
-    
-    CleanupStack::PopAndDestroy( &destArray );
-    
-    
-    // if we already know the answer, jump out here
-    if (hasUpstreamVpn) 
-        {
-        return hasUpstreamVpn;
-        } 
-        
-
-    CLOG_WRITE( "CCmPluginVpn::HasUpstreamVpnL checking uncategorized group..." );    
-    
-    // we have to check the uncategorized, too
-    
-    RArray<TUint32> cmArray ( KCmArrayMediumGranularity );
-    CleanupClosePushL( cmArray );
-    
-    CmMgr().ConnectionMethodL( cmArray );
-
-    // search for virtual CM's
-    for ( TInt k = 0; !hasUpstreamVpn && k < cmArray.Count(); ++k )
-        {
-        TInt bearerType = CmMgr().GetConnectionMethodInfoIntL( cmArray[k], 
-                                                               ECmBearerType );
-                                                
-        if ( CmMgr().GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-            {
-            // if virtual, does it link to this destination?
-
-            CCmPluginBase* cm = CmMgr().GetConnectionMethodL( cmArray[k] );
-            CleanupStack::PushL( cm );
-            
-            TUint32 cmId = cm->GetIntAttributeL( ECmId );
-
-            if ( aIsDestination )
-                {
-                // does it link to this destination?
-                if ( cm->IsLinkedToSnap( aId ) )
-                    {
-                    hasUpstreamVpn = 
-                        ( bearerType == KPluginVPNBearerTypeUid ) ||
-                        HasUpstreamVpnL( cmId, EFalse );
-                    }
-                }
-            else
-                {
-                // does it link to this CM?           
-                if ( cm->IsLinkedToIap( aId ) )
-                    {
-                    hasUpstreamVpn = 
-                        ( bearerType == KPluginVPNBearerTypeUid ) ||
-                        HasUpstreamVpnL( cmId, EFalse );
-                    }
-                     
-                }
-
-            CleanupStack::PopAndDestroy( cm );
-            } // if virtual
-            
-        } // for k
-    
-
-    CleanupStack::PopAndDestroy( &cmArray );
-
-    return hasUpstreamVpn;
-    }
-    
-
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::FilterPossibleParentsL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::FilterPossibleParentsL( RArray<TUint32>& aDests )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::FilterPossibleParentsL" );
-
-    // check if there is any destination into which this VPN could be put
-    
-    // Filter out invalid destinations
-    for ( TInt i = 0; i < aDests.Count(); ++i )
-        {
-        if ( HasUpstreamVpnL( aDests[i], ETrue ) )
-            {
-            aDests.Remove( i );
-            --i;
-            }
-        }
-
-    // also filter out the underlying connection's destination
-    if ( aDests.Count() )
-        {
-        // still have work to do
-        TUint32 destId = 0;
-        
-        if ( iVirtualRecord->iNextLayerSNAP )
-            {
-            // the VPN links to a destination
-            destId = iVirtualRecord->iNextLayerSNAP;
-            }
-        else if ( iVirtualRecord->iNextLayerIAP )
-            {
-            // the VPN links to a connmethod, find out parent destination id
-
-/********** after CmManager fix ***********************
-            CCmPluginBase* cm = CmMgr().GetConnectionMethodL( 
-                                               iVirtualRecord->iNextLayerIAP );
-            
-            CCmDestinationImpl* parentDest = cm->ParentDestination();
-            if ( parentDest )
-                {
-                // take the id only if cm has a parent
-                destId = parentDest->Id();
-                }
-            
-            delete cm;
-            delete parentDest;
-*******************************************************/
-            destId = FindParentDestinationL( iVirtualRecord->iNextLayerIAP );
-            }
-
-            
-        // now search for the id
-        if ( destId )
-            {
-            TInt index = aDests.Find( destId );
-            if ( index != KErrNotFound )
-                {
-                // got it, remove
-                aDests.Remove( index );
-                }
-            }
-        
-        } // if aDests.Count
-        
-        
-    }
-
-
-TUint32 CCmPluginVpn::FindParentDestinationL( TUint32 aCmId )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::FindParentDestinationL" );
-
-    TBool found = EFalse;
-    TUint32 targetDestId( 0 ); 
-    
-    RArray<TUint32> destinations( CmMgr().DestinationCountL() );
-   
-    CmMgr().AllDestinationsL( destinations );
-    CleanupClosePushL( destinations );
-    
-    for ( TInt i = 0; i < destinations.Count() && !found; i++ )
-        {            
-        CCmDestinationImpl* dest = 
-                          CmMgr().DestinationL( destinations[i] );
-        CleanupStack::PushL( dest );
-
-        TInt cmCount = dest->ConnectionMethodCount();
-
-        for ( TInt j = 0; j < cmCount && !found; j++ )
-            {
-            // instantiate a connmethod
-            CCmPluginBase* cm = dest->GetConnectionMethodL( j );
-            CleanupStack::PushL( cm );
-            TUint32 cmId = cm->GetIntAttributeL( ECmId );
-
-            if ( cmId == aCmId)
-                {
-                targetDestId = destinations[i];
-                found = ETrue;
-                }
-                
-            CleanupStack::Pop( cm );
-            }
-
-        CleanupStack::PopAndDestroy( dest );
-        }
-
-    CleanupStack::PopAndDestroy( &destinations );
-    
-    return targetDestId;    
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::DeleteAdditionalRecordsL
-// --------------------------------------------------------------------------
-//
-void CCmPluginVpn::DeleteAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::DeleteAdditionalRecordsL" );    
-
-    // Virtual record must be deleted
-    iVirtualRecord->DeleteL( Session() );
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::GenerateVPNPointToEasyWLANLC
-// --------------------------------------------------------------------------
-//
-HBufC* CCmPluginVpn::GenerateVPNPointToWLANNetworkLC(RResourceFile& rf, HBufC*& aName)
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::GenerateVPNPointToWLANNetworkLC" );
-    aName = NULL;
-
-    HBufC8* readBuffer2 = rf.AllocReadLC( R_QTN_NETW_CONSET_VPN_EASY_WLAN );
-    const TPtrC16 ptrReadBuffer2( (TText16*) readBuffer2->Ptr(),
-                                 ( readBuffer2->Length() + 1 ) >> 1 );
-    aName = HBufC16::NewL( ptrReadBuffer2.Length() );
-    *aName = ptrReadBuffer2;
-    
-    CleanupStack::PopAndDestroy( readBuffer2 );
-    CleanupStack::PushL( aName );
-    
-    return aName;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginVpn::CheckValidityAndConvertDestinationIdL
-// --------------------------------------------------------------------------
-//
-TInt CCmPluginVpn::CheckValidityAndConvertDestinationIdL( TUint32 aDestId )
-    {
-    TInt id( 0 );
-
-    if ( aDestId > 0 && aDestId < 255 )
-         {
-         id = aDestId + KCmDefaultDestinationAPTagId;
-         }
-     else if ( aDestId > KCmDefaultDestinationAPTagId 
-               && ( aDestId < ( KCmDefaultDestinationAPTagId+255 ) ) )
-         {
-         id = aDestId;
-         }
-     else
-         {
-         User::Leave( KErrArgument );
-         }
-    
-    return id;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginVpn::DefaultAPRecordL
-// --------------------------------------------------------------------------
-//
-TMDBElementId CCmPluginVpn::DefaultAPRecordL( const TInt aTierIdentifier )
-    {
-    LOGGER_ENTERFN( "CCmPluginVpn::DefaultAPRecordL" );
-    // Resolve the Default SNAP AP elementid 
-    //
-    CCDTierRecord* tierRecord = static_cast<CCDTierRecord *>(
-            CCDRecordBase::RecordFactoryL( KCDTIdTierRecord ) );
-    
-    CleanupStack::PushL( tierRecord );
-
-    // Find the correct tier table based on given identifier.
-    //
-    tierRecord->iRecordTag = aTierIdentifier;
-    if ( !tierRecord->FindL( Session() ) )
-        {
-        User::Leave( KErrCorrupt );
-        }
-    
-    // Find out the default AP for IP connections.
-    //
-    TMDBElementId defaultAP = tierRecord->iDefaultAccessPoint;
-
-    // Cleanup tier record.
-    //
-    CleanupStack::PopAndDestroy( tierRecord );
-        
-    return defaultAP;
-    }
-
-// eof
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnnextlayerselectdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,804 +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:  Popup for selecting the underlying connection method or 
-*                destination for a VPN connection method
-*
-*/
-
-
-// includes
-#include <badesca.h> // arrays
-#include <gulicon.h> // icons
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <featmgr.h>
-#include <cmpluginvpn.mbg>
-#include <cmpluginvpnui.rsg>
-#include <cmmanager.rsg>
-#include <cmmanager.mbg> 
-#include <eikenv.h>
-#include <aknlists.h>
-#include <eikfrlb.h> // CEikFormattedCellListBox
-#include <aknradiobuttonsettingpage.h>
-#include <cmpluginbaseeng.h>
-#include <cmpluginbase.h>
-
-#include <hlplch.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include "cmlogger.h"
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-#include "cmpvpnnextlayerselectdlg.h"
-#include "cmvpncommonconstants.h"
-#include <cmcommonconstants.h>
-#include <cmpluginvpndef.h>
-
-using namespace CMManager;
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::NewL
-// --------------------------------------------------------------------------
-//
-CmPluginVpnNextLayerSelectDlg* CmPluginVpnNextLayerSelectDlg::NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng,
-                                        RArray<TUint32>& aBindableMethods,
-                                        TBool& aSnapSelected,
-                                        TUint32& aNextLayerId )
-    {
-    CmPluginVpnNextLayerSelectDlg* self = 
-            new ( ELeave ) CmPluginVpnNextLayerSelectDlg( aCmPluginBaseEng,
-                                                          aBindableMethods,
-                                                          aSnapSelected,
-                                                          aNextLayerId,
-                                                          0 );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-      
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::CmPluginVpnNextLayerSelectDlg
-// --------------------------------------------------------------------------
-//
-CmPluginVpnNextLayerSelectDlg::CmPluginVpnNextLayerSelectDlg(
-                                        CCmPluginBaseEng& aCmPluginBaseEng,
-                                        RArray<TUint32>& aBindableMethods,
-                                        TBool& aSnapSelected,
-                                        TUint32& aNextLayerId,
-                                        TInt aDummyIndex )
-    : CAknListQueryDialog( &aDummyIndex )
-    , iMyEikonEnv( *CEikonEnv::Static() )
-    , iCmPluginBaseEng( aCmPluginBaseEng )
-    , iSnapSelected( aSnapSelected )
-    , iNextLayerId( aNextLayerId )
-    , iResourceReader( *CCoeEnv::Static() )
-    , iDestinations( aBindableMethods )
-    , iEasyWlanId(0)  
-    , iCmManager( iCmPluginBaseEng.CmMgr() ) 
-    , iUncatItems( EFalse )
-    {
-    ;
-    }
-    
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::~CmPluginVpnPolicySelectionDlg
-// --------------------------------------------------------------------------
-//
-CmPluginVpnNextLayerSelectDlg::~CmPluginVpnNextLayerSelectDlg()
-    {
-    if (  iAsyncCancel )
-        {
-        delete  iAsyncCancel;
-        iAsyncCancel = NULL;
-        }
-    
-    iResourceReader.Close();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::ConstructL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::ConstructL()
-    {    
-    LoadResourceL( KPluginVPNResDirAndFileName );
-    
-    // get the EasyWlan id if it's supported
-    if ( FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
-        {
-        iEasyWlanId = iCmManager.EasyWlanIdL();
-        }   
-    }
-
-// ---------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::CancelAsynchronouslyL
-// ---------------------------------------------------------------------------
-TInt CmPluginVpnNextLayerSelectDlg::CancelAsynchronouslyL( TAny* aObject )
-    {
-    CmPluginVpnNextLayerSelectDlg* myself =
-        static_cast< CmPluginVpnNextLayerSelectDlg* >( aObject );
-    
-    myself->TryExitL( EAknSoftkeyCancel );
-    return 0;
-    }
-    
-// ----------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::PreLayoutDynInitL
-// ----------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::PreLayoutDynInitL()
-    {
-    CAknDialog::ConstructL( R_VPN_REAL_CM_SELECTION_MENUBAR );
-    
-    // Let the base class do its job first
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    SetTextsAndIconsL();
-    }
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::OkToExitL
-// ----------------------------------------------------------------------------
-//
-TBool CmPluginVpnNextLayerSelectDlg::OkToExitL( TInt aButtonId )
-    {
-    TBool result = EFalse;
-    
-    if ( aButtonId == EAknSoftkeyDone  || aButtonId == EAknSoftkeyOk )
-        {
-        result = ETrue;
-        }
-    else if ( aButtonId == EAknSoftkeySelect )
-        {
-        ProcessCommandL( ECmManagerUiCmdDestSelect );
-        }    
-    else if ( aButtonId == EAknSoftkeyOptions )
-        {
-        ProcessCommandL( EAknSoftkeyOptions );
-        }
-    else if ( aButtonId == EAknSoftkeyBack || aButtonId == EAknSoftkeyCancel )
-        {
-        result = ETrue;
-        }
-    else
-        {
-    
-        }
-
-    return result;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::SetTextsAndIconsL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::SetTextsAndIconsL()
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::SetTextsAndIconsL" );
-    
-    // Item text array
-    CDesCArray* itemArray =
-                new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
-    CleanupStack::PushL( itemArray );
-    SetItemTextArray( itemArray ); // ownership taken
-    SetOwnershipType( ELbmOwnsItemArray );
-    CleanupStack::Pop( itemArray ); // as ownership is taken
-                    
-    // Icon array
-    CArrayPtr<CGulIcon>* icons =
-         new ( ELeave ) CArrayPtrFlat<CGulIcon>( KCmArrayMediumGranularity );
-    CleanupStack::PushL( icons );
-    SetIconArrayL( icons );
-    // ownership taken by SetIconArrayL!
-    CleanupStack::Pop( icons ); // as ownership is taken
-    
-    // Step through the Destinations - do not show:
-    // Parent Destinations or Destinations with no non-virtual CMs
-    // Show Uncategorised if valid and EasyWlan if supported
-    TInt destCount = iDestinations.Count();
-    for ( TInt i = 0; i < destCount; i++ )
-        {        
-        switch ( iDestinations[i] )
-            {
-            case KDestItemUncategorized:
-                {
-                // Append 'Uncategorised' if necessary
-                AppendUncatDestinationL( *itemArray, *icons );
-                break;
-                }
-            case KDestItemEasyWlan:
-                {
-                // Append 'EasyWlan' if supported
-                TRAPD( err, AppendEasyWlanL( *itemArray, *icons ) );
-                if ( err != KErrNotSupported )
-                    {
-                    User::LeaveIfError( err );
-                    }
-                break;
-                }
-            // normal destination
-            default:
-                {
-                CCmDestinationImpl* dest = 
-                iCmManager.DestinationL( iDestinations[i] );
-                CleanupStack::PushL( dest );
-                TInt numCms = dest->ConnectionMethodCount();        
-                AppendDestinationTextsL( *dest,numCms, *itemArray, *icons );                
-                CleanupStack::PopAndDestroy( dest );
-                break;
-                }                    
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::AppendDestinationsTextsL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::AppendDestinationTextsL(
-                                            CCmDestinationImpl& aDestination,
-                                            TInt aNumCms,
-                                            CDesCArray& aItems,
-                                            CArrayPtr<CGulIcon>& aIcons )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::AppendDestinationL" );
-    // icon
-    CGulIcon* icon = ( CGulIcon* ) aDestination.IconL();
-    CleanupStack::PushL( icon );
-    aIcons.AppendL( icon );
-    TInt iconIndex = aIcons.Count() - 1;
-    CleanupStack::Pop( icon ); // icon array took over ownership
-    
-    // compile the list item
-    HBufC* firstLine = aDestination.NameLC();
-    HBufC* secondLine;
-    
-    if ( aNumCms == 1 )
-        {
-        secondLine = StringLoader::LoadLC(
-                        R_CMMANAGERUI_CONN_METHODS_AMOUNT_ONE );
-        }
-    else
-        {
-        secondLine = StringLoader::LoadLC( 
-                        R_CMMANAGERUI_CONN_METHODS_AMOUNT_MANY,
-                        aNumCms );
-        }
-        
-    HBufC* item = FormatListItemTextsLC( *firstLine, 
-                                         *secondLine,
-                                         iconIndex );
-    aItems.AppendL( *item );
-
-    CleanupStack::PopAndDestroy( item );
-    CleanupStack::PopAndDestroy( secondLine );
-    CleanupStack::PopAndDestroy( firstLine );
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::AppendUncatDestinationL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::AppendUncatDestinationL( 
-                                                CDesCArray& aItems,
-                                                CArrayPtr<CGulIcon>& aIcons )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::AppendUncatDestinationL" );
-
-    TParse mbmFile;
-    User::LeaveIfError( mbmFile.Set( KManagerIconFilename, 
-                        &KDC_APP_BITMAP_DIR, 
-                        NULL ) );
-    
-    // icon
-    CGulIcon* icon = AknsUtils::CreateGulIconL(
-                AknsUtils::SkinInstance(), 
-                KAknsIIDQgnPropSetConnDestUncategorized,
-                mbmFile.FullName(), 
-                EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized, 
-                EMbmCmmanagerQgn_prop_set_conn_dest_uncategorized_mask );
-    CleanupStack::PushL( icon );
-    aIcons.AppendL( icon );
-    CleanupStack::Pop( icon );  // icon array took over ownership
-    TInt iconIndex = aIcons.Count() - 1;
-    
-    // remove virtual CMs
-    RArray<TUint32> uncatCms ( KCmArraySmallGranularity );    
-    iCmManager.ConnectionMethodL( uncatCms );
-    CleanupClosePushL( uncatCms );
-    
-    for ( TInt i = 0; i < uncatCms.Count(); i++ )
-        {
-        TInt bearerType = iCmManager.GetConnectionMethodInfoIntL( 
-                                        uncatCms[i], ECmBearerType );
-        
-        if ( iCmManager.GetBearerInfoBoolL( bearerType, ECmVirtual ) )
-            {
-            uncatCms.Remove(i);
-            i--;
-            }        
-        }
-    
-    // second line text
-    HBufC* secondLine;            
-    if ( uncatCms.Count() == 1 )
-        {
-        secondLine = StringLoader::LoadLC(
-                            R_CMMANAGERUI_CONN_METHODS_AMOUNT_ONE );
-        }
-    else
-        {
-        secondLine = StringLoader::LoadLC( 
-                            R_CMMANAGERUI_CONN_METHODS_AMOUNT_MANY,
-                            uncatCms.Count() );
-        }    
-
-    // compile the texts
-    HBufC* item = FormatListItemTextsLC( R_CMMANAGERUI_DEST_UNCATEGORIZED,
-                                         *secondLine,
-                                         iconIndex );            
-    aItems.AppendL( *item );
-
-    CleanupStack::PopAndDestroy( item );
-    CleanupStack::PopAndDestroy( secondLine );
-    CleanupStack::PopAndDestroy( &uncatCms );
-    }
-                                                 
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::AppendEasyWlanL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::AppendEasyWlanL( 
-                                                CDesCArray& aItems,
-                                                CArrayPtr<CGulIcon>& aIcons )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::AppendEasyWlanL" );
-
-    // icon
-    CCmPluginBase* cm = iCmManager.GetConnectionMethodL( iEasyWlanId );
-    CleanupStack::PushL( cm );
-    CGulIcon* icon = ( CGulIcon* ) cm->GetIntAttributeL( ECmBearerIcon );
-    CleanupStack::PushL( icon );
-    aIcons.AppendL( icon );  // ownership passed to array
-    TInt iconIndex = aIcons.Count() - 1;
-    CleanupStack::Pop( icon );
-    CleanupStack::PopAndDestroy( cm );
-    
-    // compile the texts
-    HBufC* easyWlan = FormatListItemTextsLC( 
-                                R_QTN_NETW_CONSET_VPN_EASY_WLAN,
-                                R_QTN_NETW_CONSET_VPN_EASY_WLAN_PROMPT,
-                                iconIndex );
-    aItems.AppendL( *easyWlan );
-    
-    CleanupStack::PopAndDestroy( easyWlan );
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::DynInitMenuPaneL( 
-                                TInt aResourceId, CEikMenuPane* aMenuPane )
-    {
-    if ( aResourceId == R_VPN_REAL_CM_SELECTION_MENU )
-        {
-    	if (!iCmManager.IsHelpOn())
-            {
-            aMenuPane->DeleteMenuItem( EAknCmdHelp );		    
-            }
-        TUint32 highlighted = iDestinations[ ListBox()->CurrentItemIndex() ];
-        
-        switch ( highlighted )
-            {
-            case KDestItemUncategorized:
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdDestSelect, ETrue );
-                break;                
-                }
-            case KDestItemEasyWlan:
-                {
-                aMenuPane->SetItemDimmed( ECmManagerUiCmdCMSelect, ETrue );
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::ProcessCommandL( TInt aCommandId )
-    {
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        case ECmManagerUiCmdDestSelect:
-            {            
-            TUint32 destId = iDestinations[ ListBox()->CurrentItemIndex() ];
-            
-            if ( destId != KDestItemUncategorized )
-                {
-                TUint32 attribute = ECmNextLayerSNAPId;
-                
-                // EasyWlan was selected
-                if ( destId == KDestItemEasyWlan )
-                    {
-                    attribute = ECmNextLayerIapId;
-                    destId = iEasyWlanId;
-                    }
-                iCmPluginBaseEng.SetIntAttributeL( attribute, destId );
-
-                // We cannot use TryExitL here, since if the pointer event
-                // handling is ongoing, i.e., we got here from this class's
-                // HandleListBoxEventL, there will be a KERN-EXEC 3 panic.
-                // Calling base class HandleListBoxEventL will exit the
-                // dialog asynchronously with return value ETrue.
-                CAknListQueryDialog::HandleListBoxEventL( ListBox(),
-                     EEventItemSingleClicked );
-                break;
-                }
-            
-            // For uncategorised destinations, flow through to ECmManagerUiCmdCMSelect
-            }
-        case ECmManagerUiCmdCMSelect:
-            {
-            // select a connection method from the highlighted destination
-            TUint32 destId = iDestinations[ ListBox()->CurrentItemIndex() ];
-            TUint32 cmId (0);
-            if ( ShowCMSelectionDlgL( destId, cmId ) )
-                {
-                iCmPluginBaseEng.SetIntAttributeL( ECmNextLayerIapId, cmId );
-                
-                // We cannot use TryExitL here, since if the pointer event
-                // handling is ongoing, i.e., we got here from this class's
-                // HandleListBoxEventL, there will be a KERN-EXEC 3 panic.
-                // Calling base class HandleListBoxEventL will exit the
-                // dialog asynchronously with return value ETrue.
-                CAknListQueryDialog::HandleListBoxEventL( ListBox(),
-                                     EEventItemSingleClicked );
-                }
-            else
-                {
-                // We need to exit asynchronously, in case we ended up here
-                // from HandleListBoxEventL. The callback function will exit
-                // the dialog with return value EFalse.
-                TCallBack cb( CancelAsynchronouslyL, this );
-                iAsyncCancel = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );
-                iAsyncCancel->CallBack();
-                }
-            break;
-            }
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                                    iEikonEnv->EikAppUi()->AppHelpContextL() );
-            }
-            break;
-        case EAknSoftkeyBack:
-            {
-            TryExitL( EAknSoftkeyBack );
-            break;
-            } 
-        default:
-            {
-            CAknListQueryDialog::ProcessCommandL( aCommandId );
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CmPluginVpnNextLayerSelectDlg::OfferKeyEventL( 
-                                                const TKeyEvent& aKeyEvent, 
-                                                TEventCode aType )    
-    {
-    TKeyResponse retVal ( EKeyWasNotConsumed );
-    TUint highlighted = iDestinations[ ListBox()->CurrentItemIndex() ];
-    
-    switch ( aKeyEvent.iScanCode )
-        {
-        case EStdKeyDownArrow:
-        case EStdKeyUpArrow:
-            {
-            // If focus is on the 'uncategorised' destination, 
-            // change the soft key to 'Open'
-            if ( highlighted == KDestItemUncategorized )
-                {
-                ButtonGroupContainer().SetCommandL( 
-                                ECmManagerUiCmdDestSelect, 
-                                *( StringLoader::LoadLC( R_QTN_MSK_OPEN ) ) 
-                                                    );
-                ButtonGroupContainer().DrawDeferred();
-                CleanupStack::PopAndDestroy();
-                }
-            else
-                {
-                ButtonGroupContainer().SetCommandL( 
-                               ECmManagerUiCmdDestSelect, 
-                               *( StringLoader::LoadLC( R_QTN_MSK_SELECT ) ) 
-                                                    );
-                ButtonGroupContainer().DrawDeferred();
-                CleanupStack::PopAndDestroy();
-                }
-            break;
-            }
-        case EStdKeyNo:
-            {
-            TryExitL( EAknSoftkeyCancel );
-            return EKeyWasConsumed;
-            }
-        default:
-            {
-            // If focus is on the 'uncategorised' destination, 
-            // change the soft key to 'Open'
-            if ( highlighted == KDestItemUncategorized )
-                {
-                ButtonGroupContainer().SetCommandL( 
-                                ECmManagerUiCmdDestSelect, 
-                                *( StringLoader::LoadLC( R_QTN_MSK_OPEN ) ) 
-                                                    );
-                ButtonGroupContainer().DrawDeferred();
-                CleanupStack::PopAndDestroy();
-                }
-                
-            if ( aKeyEvent.iCode == EKeyEscape )
-                {
-                TryExitL( EAknSoftkeyCancel );
-                return EKeyWasConsumed;
-                }
-            }
-        }
-    retVal = ListBox()->OfferKeyEventL( aKeyEvent, aType );
-    
-    return retVal;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-void CmPluginVpnNextLayerSelectDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                    TListBoxEvent aEventType )
-    {
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemSingleClicked:
-            {
-            ProcessCommandL( ECmManagerUiCmdDestSelect );
-            
-            break;
-            }
-        default:
-            {
-            break;
-            };
-        };
-    }
-
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::LoadResourceL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::LoadResourceL( 
-                                                const TDesC& aResFileName )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::LoadResourceL" );
-    TInt err ( KErrNone );
-    
-    // Add resource file.
-    TParse* fp = new ( ELeave ) TParse();
-    err = fp->Set( aResFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err )
-        {
-        User::Leave( err );
-        }   
-
-    TFileName resourceFileNameBuf = fp->FullName();
-    delete fp;
-
-    iResourceReader.OpenL( resourceFileNameBuf );
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC
-// --------------------------------------------------------------------------
-//
-HBufC* CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC( 
-                                                TInt aFirstLineResId,
-                                                TInt aSecondLineResId,
-                                                TInt aIconIndex )
-    {
-    HBufC* firstLine = StringLoader::LoadLC( aFirstLineResId );
-    HBufC* secondLine = StringLoader::LoadLC( aSecondLineResId );
-    
-    HBufC* retVal = FormatListItemTextsL( *firstLine,
-                                          *secondLine,
-                                          aIconIndex );
-    CleanupStack::PopAndDestroy( secondLine );
-    CleanupStack::PopAndDestroy( firstLine );
-    CleanupStack::PushL( retVal );
-    return retVal;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC
-// --------------------------------------------------------------------------
-//
-HBufC* CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC( 
-                                                const TDesC& aFirstLine,
-                                                const TDesC& aSecondLine,
-                                                TInt aIconIndex )
-    {
-    HBufC* retVal = FormatListItemTextsL( aFirstLine,
-                                          aSecondLine,
-                                          aIconIndex );
-    CleanupStack::PushL( retVal );
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC
-// --------------------------------------------------------------------------
-//
-HBufC* CmPluginVpnNextLayerSelectDlg::FormatListItemTextsLC( 
-                                                TInt aFirstLineResId,
-                                                const TDesC& aSecondLine,
-                                                TInt aIconIndex )
-    {
-    // Load the first string
-    HBufC* firstLine = StringLoader::LoadLC( aFirstLineResId );
-    
-    HBufC* retVal = FormatListItemTextsL( *firstLine,
-                                          aSecondLine,
-                                          aIconIndex );
-    CleanupStack::PopAndDestroy( firstLine );
-    CleanupStack::PushL( retVal );
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::FormatListItemTextsL
-// --------------------------------------------------------------------------
-//
-HBufC* CmPluginVpnNextLayerSelectDlg::FormatListItemTextsL( 
-                                                const TDesC& aFirstLine,
-                                                const TDesC& aSecondLine,
-                                                TInt aIconIndex )
-    {
-    HBufC* retVal = HBufC::NewL( aFirstLine.Length() + 
-                           aSecondLine.Length() + 
-                           KNumberOfStaticCharsIn2LineFormattedString );
-    
-    TPtr ptr ( retVal->Des() );
-    ptr.AppendNum( aIconIndex );
-    ptr.Append( TChar( KSettingsListBoxItemPrefix ) );
-    ptr.Append( aFirstLine );
-    ptr.Append( TChar( KSettingsListBoxItemPrefix ) );
-    ptr.Append( aSecondLine );
-    
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::ShowCMSelectionDlgL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnNextLayerSelectDlg::ShowCMSelectionDlgL( 
-                                                    TUint32 aDestinationId,
-                                                    TUint32& aCmId )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::ShowCMSelectionDlgL" );
-    TBool retVal ( EFalse );
-        
-    // Collect item texts
-    CDesCArrayFlat* items = 
-            new ( ELeave ) CDesCArrayFlat( KCmArraySmallGranularity );
-    CleanupStack::PushL( items );
-    
-    RPointerArray<CCmPluginBase> cmDataArray ( KCmArrayMediumGranularity );
-    iCmManager.CreateFlatCMListLC( aDestinationId , cmDataArray );
-    CleanupStack::Pop( &cmDataArray );
-    CCmManagerImpl::CleanupResetAndDestroyPushL(cmDataArray);
-    iCmManager.FilterOutVirtualsL( cmDataArray );
-
-
-    // after it, get the names for each element
-    // and finally make up the real items array.
-    
-    // Get the names of the connection methods
-    // virtuals are already filtered out, 
-    TInt count = cmDataArray.Count();
-    for ( TInt i = 0; i < count; i++ )
-        {
-        HBufC* cmName = 
-            iCmManager.GetConnectionMethodInfoStringL( cmDataArray[i]->GetIntAttributeL( ECmId ),
-                                                       ECmName );
-        CleanupStack::PushL( cmName );
-            
-        // append the name to the string
-        items->AppendL( *cmName );
-            
-        CleanupStack::PopAndDestroy( cmName );
-        }
-        
-    // Display the radio button page
-    TInt selected ( 0 );
-    TInt resId( R_VPN_REAL_CM_RADIO_BUTTON_SETTING_PAGE );
-        
-    CAknRadioButtonSettingPage* dlg = 
-                            new ( ELeave ) CAknRadioButtonSettingPage(
-                                    resId,
-                                    selected, 
-                                    items );
-    CleanupStack::PushL( dlg );
-    dlg->SetSettingTextL(
-                *StringLoader::LoadLC( R_CMWIZARD_SELECT_CONN_METHOD ) );
-    CleanupStack::PopAndDestroy();            
-    CleanupStack::Pop( dlg );
-
-    TInt result = 0;
-    TRAPD( err, result = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) );
-
-    User::LeaveIfError( err );
-
-    if ( result )
-
-        {
-        // store result
-        aCmId = cmDataArray[ selected ]->GetIntAttributeL( ECmId );
-        retVal = ETrue;
-        }
-    
-    CleanupStack::PopAndDestroy( &cmDataArray );
-    CleanupStack::PopAndDestroy( items );
-    return retVal;
-    }
-    
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::GetHelpContext( 
-                                            TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_VPN_DEST_ASSOC_VIEW;
-    }
-
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnpolicyselectiondlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +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:  Displays a radio button selection list of VPN policies
-*
-*/
-
-
-// includes
-#include <aknPopup.h>
-// #include <vpnapidefs.h>
-#include <aknlists.h>
-#include <cmmanager.rsg>
-#include <cmpluginvpnui.rsg>
-#include <cmcommonui.h>
-#include <cmpluginbaseeng.h>
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <aknradiobuttonsettingpage.h>
-
-#include "cmlogger.h"
-#include "cmpvpnpolicyselectiondlg.h"
-#include "cmvpncommonconstants.h"
-#include <cmpluginvpndef.h>
-#include <cmcommonconstants.h>
-
-using namespace CMManager;
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::NewL
-// ----------------------------------------------------------------------------
-//
-CmPluginVpnPolicySelectionDlg* CmPluginVpnPolicySelectionDlg::NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng )
-    {
-    CmPluginVpnPolicySelectionDlg* self = 
-            new ( ELeave ) CmPluginVpnPolicySelectionDlg( aCmPluginBaseEng );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::~CmPluginVpnPolicySelectionDlg
-// ----------------------------------------------------------------------------
-//
-CmPluginVpnPolicySelectionDlg::~CmPluginVpnPolicySelectionDlg()
-    {
-
-    iVpnServ.Close();
-
-    delete iPolicyInfoList;
-
-    iResourceReader.Close();
-    }
-    
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::CmPluginVpnPolicySelectionDlg
-// ----------------------------------------------------------------------------
-//
-CmPluginVpnPolicySelectionDlg::CmPluginVpnPolicySelectionDlg(
-                        CCmPluginBaseEng& aCmPluginBaseEng )
-    : iCmPluginBaseEng( aCmPluginBaseEng )
-    , iResourceReader( *CCoeEnv::Static() )
-    , iVpnClientUnaccessible ( EFalse )
-    {
-    }
-    
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CmPluginVpnPolicySelectionDlg::ConstructL()
-    {
-    LoadResourceL( KPluginVPNResDirAndFileName );
-    
-    // Get the policies
-    iPolicyInfoList = 
-        new (ELeave) CArrayFixFlat<TVpnPolicyInfo>( KCmArrayMediumGranularity );
-    
-    TInt err( iVpnServ.Connect() );
-    
-    // Vpn client is inaccessible
-    if ( err )
-        {
-        VpnClientInaccessibleL();
-        }
-    else
-        {
-        iVpnServ.GetPolicyInfoList( iPolicyInfoList );        
-        iVpnServ.EnumeratePolicies( iNumPolicies );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::LoadResourceL
-// ----------------------------------------------------------------------------
-//
-void CmPluginVpnPolicySelectionDlg::LoadResourceL( const TDesC& aResFileName )
-    {
-    TInt err( KErrNone );
-    
-    // Add resource file.
-    TParse* fp = new ( ELeave ) TParse();
-    err = fp->Set( aResFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ); 
-    if ( err )
-        {
-        User::Leave( err );
-        }   
-
-    TFileName resourceFileNameBuf = fp->FullName();
-    delete fp;
-
-    iResourceReader.OpenL( resourceFileNameBuf );
-    }
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::ShowPolicySelectionListL
-// ----------------------------------------------------------------------------
-//
-TBool CmPluginVpnPolicySelectionDlg::ShowPolicySelectionListL()
-    {
-    LOGGER_ENTERFN( "CmPluginVpnPolicySelectionDlg::ShowPolicySelectionListL" );
-    TBool retVal ( EFalse );
-    
-    CEikTextListBox* list = new ( ELeave ) CAknSinglePopupMenuStyleListBox;
-    CleanupStack::PushL( list );
-             
-    // Create popup list
-    CAknPopupList* popupList = CAknPopupList::NewL(
-                                       list, 
-                                       R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                                       AknPopupLayouts::EMenuWindow);
-    CleanupStack::PushL( popupList );
-
-    // initialise listbox.
-    list->ConstructL(popupList, CEikListBox::ELeftDownInViewRect);
-    list->CreateScrollBarFrameL( ETrue );
-    list->ScrollBarFrame()->SetScrollBarVisibilityL(
-                               CEikScrollBarFrame::EOff,
-                               CEikScrollBarFrame::EAuto);
-
-
-    MDesCArray* itemList = list->Model()->ItemTextArray();
-	CDesCArray* items = ( CDesCArray* ) itemList;	
-	
-    // collect the item texts    
-    if ( iNumPolicies )
-        {
-        for ( TInt i = 0; i < iNumPolicies; i++ )
-            {
-            HBufC* polName = ( iPolicyInfoList->At(i) ).iName.AllocLC();
-            items->AppendL( *polName );
-            CleanupStack::PopAndDestroy( polName );
-            }
-        
-        // title
-        HBufC* title = StringLoader::LoadLC( R_QTN_NETW_CONSET_PRMPT_VPN_POLICY );
-        popupList->SetTitleL( *title );
-        CleanupStack::PopAndDestroy( title );
-        
-        // dislay dialog
-        CleanupStack::Pop( popupList );
-        if ( popupList->ExecuteLD() )
-            {
-            TInt ix = list->CurrentItemIndex();
-            
-            // Set VPN Policy to be used
-            HBufC* polName = ( iPolicyInfoList->At(ix) ).iName.AllocLC();
-            HBufC* polId = ( iPolicyInfoList->At(ix) ).iId.AllocLC();
-            
-            CLOG_WRITE_2( "New policy settings:[%S], [%S]", polName, polId );
-
-            iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicyName, *polName );
-            iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicy, *polId );
-            CleanupStack::PopAndDestroy( polId );
-            CleanupStack::PopAndDestroy( polName );
-            
-            retVal = ETrue;
-            }
-        }
-    else
-        {
-        if (!iVpnClientUnaccessible)
-        	{
-        	// display error note
-        	HBufC* text = StringLoader::LoadLC( R_QTN_VPN_INFO_NO_POLICIES_INSTALLED );
-        	TCmCommonUi::ShowNoteL( *text, TCmCommonUi::ECmInfoNote );
-        	CleanupStack::PopAndDestroy( text );
-        	}
-        CleanupStack::PopAndDestroy( popupList );
-        }
-
-
-	CleanupStack::PopAndDestroy( list );
-    return retVal;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::ShowPolicySelectionDlgL
-// ----------------------------------------------------------------------------
-//
-TBool CmPluginVpnPolicySelectionDlg::ShowPolicySelectionDlgL()
-    {
-    LOGGER_ENTERFN( "CmPluginVpnPolicySelectionDlg::ShowPolicySelectionDlgL" );
-    TBool retVal ( EFalse );
-    
-    TInt selection(0);
-    
-    // Compile the list items
-    CDesCArrayFlat* items = 
-            new ( ELeave ) CDesCArrayFlat( KCmArraySmallGranularity );
-    CleanupStack::PushL( items );
-    
-    TInt vpnerr;
-    vpnerr = iVpnServ.EnumeratePolicies( iNumPolicies );
-    
-    if ( vpnerr )
-        {
-        VpnClientInaccessibleL();
-        }
-    else
-        {        
-        if ( iNumPolicies )
-            {
-            vpnerr = iVpnServ.GetPolicyInfoList( iPolicyInfoList );
-            if ( vpnerr == 0 )
-                {
-                for ( TInt i = 0; i < iNumPolicies; i++ )
-                    {
-                    HBufC* policyName = 
-                            ( iPolicyInfoList->At(i) ).iName.AllocLC();
-                    
-                            
-                    // indicate if this policy is the one in the settings
-                    HBufC* val = iCmPluginBaseEng.GetStringAttributeL( 
-                                                        EVpnServicePolicyName );
-                    
-                    if ( !( val->Compare( policyName->Des() ) ) )
-                        {
-                        selection = i;
-                        }
-                    delete val;
-                    
-                    items->AppendL( *policyName );
-                    CleanupStack::PopAndDestroy( policyName );
-                    }
-                // Create the dialog
-                CAknRadioButtonSettingPage* dlg = 
-                                    new ( ELeave ) CAknRadioButtonSettingPage(
-                                            R_RADIO_BUTTON_SETTING_PAGE_OK_CANCEL,
-                                            selection, 
-                                            items );
-                CleanupStack::PushL( dlg );
-                
-                // set title
-                HBufC* title = StringLoader::LoadLC( 
-                                        R_QTN_VPN_SETT_VPN_IAP_POLICY_REFERENCE );
-                dlg->SetSettingTextL( *title );
-                CleanupStack::PopAndDestroy( title );
-
-                // display dialog
-                CleanupStack::Pop();
-                if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-                    {
-                    HBufC* polId = 
-                            ( iPolicyInfoList->At( selection ) ).iId.AllocLC();
-                    HBufC* polName = 
-                            ( iPolicyInfoList->At( selection ) ).iName.AllocLC();
-                    iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicyName,
-                                                          *polName );
-                    
-                    CLOG_WRITE_2( "New policy settings:[%S], [%S]", polName, polId );
-                    
-                    iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicy, 
-                                                          *polId );
-                    CleanupStack::PopAndDestroy( polName );
-                    CleanupStack::PopAndDestroy( polId );
-                    retVal = ETrue;
-                    }
-                }
-            }
-        else
-            {
-            // note: no VPN policies installed, reset policy to compulsory
-            CLOG_WRITE("No policy installed, reset policies");
-            
-            HBufC* text = StringLoader::LoadLC( 
-                                        R_QTN_VPN_INFO_NO_POLICIES_INSTALLED );
-            TCmCommonUi::ShowNoteL( *text, TCmCommonUi::ECmInfoNote );
-            CleanupStack::PopAndDestroy( text );
-            vpnerr = -1;
-            }
-        }
-
-    if ( vpnerr )
-        {
-        // note: no VPN policies installed or any other vpn error,
-        //  reset policy to compulsory
-        CLOG_WRITE("Reset policies");
-        
-        iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicyName,
-                                              KNullDesC() );
-        iCmPluginBaseEng.SetStringAttributeL( EVpnServicePolicy, 
-                                              KNullDesC() );
-        
-        }
-
-    CleanupStack::PopAndDestroy( items );
-    return retVal;
-    }
-    
-    
-// ----------------------------------------------------------------------------
-// CmPluginVpnPolicySelectionDlg::VpnClientInaccessibleL
-// ----------------------------------------------------------------------------
-//
-void CmPluginVpnPolicySelectionDlg::VpnClientInaccessibleL()
-    {
-    LOGGER_ENTERFN( "CmPluginVpnPolicySelectionDlg::VpnClientInaccessibleL" );
-    HBufC* text = StringLoader::LoadLC( R_QTN_VPN_INFO_MGMT_UI_NOT_ACCESSIBLE );
-    TCmCommonUi::ShowNoteL( *text, TCmCommonUi::ECmInfoNote );
-    CleanupStack::PopAndDestroy( text );
-    iVpnClientUnaccessible = ETrue;
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnsettingsdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,627 +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:  Dialog for editing VPN settings for a VPN
-*                connection method
-*
-*/
-
-// INCLUDE FILES
-#include <cmpluginbaseeng.h>
-#include <cmpluginvpn.mbg>
-#include <cmpluginvpnui.rsg>
-#include <AknDialog.h>
-#include <StringLoader.h>
-#include <cmmanager.rsg>
-#include <akntextsettingpage.h>
-#include <akntitle.h>
-#include <cmcommonui.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include "cmlogger.h"
-#include "cmmanagerimpl.h"
-#include "cmpluginvpn.h"
-#include "cmpvpnsettingsdlg.h"
-#include "cmvpncommonconstants.h"
-#include <cmpluginvpndef.h>
-#include "cmpvpnpolicyselectiondlg.h"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmconnsettingsuiimpl.h"
-#include "cmdestinationimpl.h"
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-
-// ================= MEMBER FUNCTIONS =======================================
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginVpnSettingsDlg* CmPluginVpnSettingsDlg::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginVpnSettingsDlg* self = 
-	                new ( ELeave ) CmPluginVpnSettingsDlg( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::CmPluginVpnSettingsDlg()
-// --------------------------------------------------------------------------
-//
-CmPluginVpnSettingsDlg::CmPluginVpnSettingsDlg( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlg( aCmPluginBase )
-    {
-    
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-TInt CmPluginVpnSettingsDlg::ConstructAndRunLD( )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::ConstructAndRunLD" );
-    
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CleanupStack::PushL( this );
-    LoadResourceL( KPluginVPNResDirAndFileName );
-    
-    // check if VPN is available, as if not, we can not show the details...
-    RVpnServ ps;
-    CleanupClosePushL<RVpnServ>( ps );
-    TInt err = ps.Connect();
-    if ( err )
-        {
-        // show note
-        HBufC* text = StringLoader::LoadLC( 
-                                    R_QTN_VPN_INFO_MGMT_UI_NOT_ACCESSIBLE );
-        TCmCommonUi::ShowNoteL( *text, TCmCommonUi::ECmInfoNote );
-        CleanupStack::PopAndDestroy( text );        
-        User::Leave( KLeaveWithoutAlert );
-        }
-    CleanupStack::PopAndDestroy(); // ps.close
-    
-    // check for compulsory fields missing & display note about it
-    // information note VPN access point is incomplete. Try reconfiguring 
-    // the access point. §qtn.vpn.info.vpn.iap.incomplete§ is displayed and 
-    // Must be defined qtn_selec_setting_compulsory is displayed 
-    // for the invalid settings.               
-    if ( !CompulsoryFilledL() )
-        {
-        // show note
-        HBufC* text = StringLoader::LoadLC( 
-                                    R_QTN_VPN_INFO_VPN_IAP_INCOMPLETE );
-        TCmCommonUi::ShowNoteL( *text, TCmCommonUi::ECmInfoNote );
-        CleanupStack::PopAndDestroy( text );
-        }
-    
-    CleanupStack::Pop( this );
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlg::ConstructAndRunLD( );
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::~CmPluginVpnSettingsDlg
-// Destructor
-// --------------------------------------------------------------------------
-//
-CmPluginVpnSettingsDlg::~CmPluginVpnSettingsDlg()
-    {
-    iResourceReader.Close();
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnSettingsDlg::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::UpdateListBoxContentBearerSpecificL" );
-    HBufC* value = NULL;
-        
-    // VPN policy - Compulsory field
-    AppendSettingTextsL( aItemArray, EVpnServicePolicyName );
-    
-    TUint32 iapId = iCmPluginBaseEng.GetIntAttributeL( EVpnIapId );
-    TUint32 destId = iCmPluginBaseEng.GetIntAttributeL( ECmNextLayerSNAPId );
-    
-    CCmDestinationImpl* dest = NULL;
-    
-    // The underlying CM is a Destination
-    if ( destId )
-        {
-        dest = iCmPluginBaseEng.CmMgr().DestinationL( destId );
-        CleanupStack::PushL( dest );
-//        CleanupReleasePushL( dest );
-        value = dest->NameLC();
-        }
-    // The underlying CM is a CM
-    else if ( iapId )
-        {
-        value = iCmPluginBaseEng.CmMgr().GetConnectionMethodInfoStringL( 
-                                                           iapId, ECmName );
-        CleanupStack::PushL( value );
-        }
-    else
-        {
-        // Must be defined
-        value = StringLoader::LoadLC( R_QTN_VPN_SETT_VPN_IAP_REAL_NETW_REF_COMPULSORY );
-        }
-    
-    AppendSettingTextsL( aItemArray,
-                         ECmNextLayerIapId,
-                         R_QTN_VPN_SETT_VPN_IAP_REAL_NETW_REFERENCE,
-                         *value,
-                         ETrue );
-    CleanupStack::PopAndDestroy( value );
-
-    if ( destId )
-        {
-        CleanupStack::PopAndDestroy( dest );
-        }
-                         
-    // Proxy server address
-    AppendSettingTextsL( aItemArray, ECmProxyServerName );
-    // Proxy port number
-    AppendSettingTextsL( aItemArray, ECmProxyPortNumber );
-    
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::RunAdvancedSettingsL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnSettingsDlg::RunAdvancedSettingsL()
-    {
-    /* empty functionality */
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::DynInitMenuPaneL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnSettingsDlg::DynInitMenuPaneL( TInt aResourceId,
-                                               CEikMenuPane* aMenuPane )
-   {
-   if ( aResourceId == R_PLUGIN_BASE_MENU )
-        {
-        aMenuPane->SetItemDimmed( EPluginBaseCmdAdvanced, ETrue  );           
-        }
-    }
-        
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::ShowPopupSettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnSettingsDlg::ShowPopupSettingPageL( TUint32 aAttribute, 
-                                                     TInt aCommandId )
-    {
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::ShowPopupSettingPageL" );
-    TBool retVal = EFalse;
-    switch ( aAttribute )
-        {
-        case EVpnServicePolicyName:        
-            {
-            CmPluginVpnPolicySelectionDlg* dlg = 
-                    CmPluginVpnPolicySelectionDlg::NewL( iCmPluginBaseEng );
-            CleanupStack::PushL( dlg );
-            retVal = dlg->ShowPolicySelectionDlgL();
-            UpdateListBoxContentL();
-            CleanupStack::PopAndDestroy();
-            break;
-            }
-        case ECmProxyServerName:
-            {
-            retVal = ShowPopupTextSettingPageL( aAttribute );
-            break;
-            }
-        case EVpnIapId:
-        case ECmNextLayerIapId:
-            {
-            ShowIapSelectionSettingPageL();
-            break;
-            }
-        case ECmProxyPortNumber:
-            {
-            HBufC* proxyName = iCmPluginBaseEng.GetStringAttributeL( ECmProxyServerName );
-            if( !proxyName )
-                {
-                break;
-                }
-            CleanupStack::PushL( proxyName );
-            if( proxyName->Length() )
-                { // Port number is allowed to set after proxy address is set.
-                retVal = ShowPopupPortNumSettingPageL( aAttribute );
-                }
-            CleanupStack::PopAndDestroy(); // proxyName
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlg::ShowPopupSettingPageL( aAttribute, 
-                                                            aCommandId );
-            break;
-            }
-        }
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::ShowIapSelectionSettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnSettingsDlg::ShowIapSelectionSettingPageL()
-    {  
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::ShowIapSelectionSettingPageL" ); 
-    TBool retVal( EFalse );
-    
-    CCmConnSettingsUiImpl* settings = 
-                                CCmConnSettingsUiImpl::NewL();
-    CleanupStack::PushL( settings );
-    settings->EnableEasyWlan( ETrue );
-    settings->EnableEmptyDestinations( EFalse );
-    settings->EnableVirtualCMs( EFalse );
-    
-    CCmDestinationImpl* d = iCmPluginBaseEng.ParentDestination();
-    if ( d )
-        {
-        settings->SetDestinationToOmit( d->Id() );
-//        settings->EnableUncat( ETrue );
-        }
-    else
-        {
-//        settings->EnableUncat( EFalse );
-        }
-    delete d;
-    settings->EnableUncat( ETrue );
-    
-    CCmPluginVpn* plugin = static_cast<CCmPluginVpn *>
-                    ( &iCmPluginBaseEng );
-    
-    RArray<TUint32> cmArray ( KCmArrayMediumGranularity );
-    CleanupClosePushL( cmArray );
-    
-    plugin->BindableDestinationsL( cmArray );
-    
-    settings->SetDestinationArrayToUseL( cmArray );
-    
-    TCmSettingSelection selection;
-    
-    // Get the underlying CM
-    selection.iId = iCmPluginBaseEng.GetIntAttributeL( ECmNextLayerIapId );
-    
-    if ( selection.iId )
-        {
-        selection.iResult = EConnectionMethod;
-        }
-    // The underlying CM is a destination
-    else
-        {        
-        selection.iResult = EDestination;
-        selection.iId = iCmPluginBaseEng.GetIntAttributeL( ECmNextLayerSNAPId );
-        }
-    
-    TBearerFilterArray aFilterArray;
-    if ( settings->RunApplicationSettingsL( selection,
-                                            EShowDestinations |
-                                            EShowConnectionMethods , 
-                                            aFilterArray ) )
-        {
-        switch ( selection.iResult )
-            {
-            case EDestination:
-                {
-                iCmPluginBaseEng.SetIntAttributeL( ECmNextLayerSNAPId, selection.iId );
-                break;
-                }
-            case EConnectionMethod:
-                {
-                
-                iCmPluginBaseEng.SetIntAttributeL( ECmNextLayerIapId, selection.iId );
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                }
-            }
-        UpdateListBoxContentL();
-        
-        // update the title pane with the new name
-        HBufC* newCmName = iCmPluginBaseEng.GetStringAttributeL( ECmName );
-        CleanupStack::PushL( newCmName );
-        iTitlePane->SetTextL( *newCmName );
-        CleanupStack::PopAndDestroy( newCmName );
-        
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( &cmArray );
-    CleanupStack::PopAndDestroy( settings );
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnSettingsDlg::ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyOk:
-        case EPluginBaseCmdChange:
-            {
-            ShowPopupSettingPageL( 
-                    iSettingIndex->At( iListbox->CurrentItemIndex() ), 
-                                        aCommandId );
-            break;            
-            }
-        case EVpnIapId:
-        case ECmNextLayerIapId:
-        case ECmProxyServerName:
-        case ECmProxyPortNumber:
-            {
-            TInt attrib = iSettingIndex->At( iListbox->CurrentItemIndex() );
-            ShowPopupSettingPageL( attrib, aCommandId );  
-            break;
-            }
-        case EVpnServicePolicyName:
-            {
-            CmPluginVpnPolicySelectionDlg* dlg = 
-                    CmPluginVpnPolicySelectionDlg::NewL( iCmPluginBaseEng );
-            CleanupStack::PushL( dlg );
-            if ( dlg->ShowPolicySelectionDlgL() )
-                {
-                // update the setting
-                UpdateListBoxContentL();
-                }
-            // we might need to update even if not accepted
-            
-            CleanupStack::PopAndDestroy();
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlg::ProcessCommandL( aCommandId );
-            break;            
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::CompulsoryFilledL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnSettingsDlg::CompulsoryFilledL()
-    {
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::CompulsoryFilledL" );
-    
-    TBool retval = ETrue;
-    // compulsory settings are ECmName, EVpnIapId, EVpnServicePolicy
-    
-    // check name first
-    HBufC* name = iCmPluginBaseEng.GetStringAttributeL( ECmName );
-    if ( ( name->Compare( KNullDesC() ) ) == 0 )
-        {
-        retval = EFalse;
-        }        
-    delete name;
-    
-    // check VPN IAP ID
-    TUint32 iapid = iCmPluginBaseEng.GetIntAttributeL( EVpnIapId );
-    if ( !iapid )
-        {
-        TUint32 nextiapid = iCmPluginBaseEng.GetIntAttributeL( ECmNextLayerIapId  );
-        TUint32 snapid = iCmPluginBaseEng.GetIntAttributeL( ECmNextLayerSNAPId );
-        if ( !(nextiapid ^ snapid) )
-            {
-            retval = EFalse;
-            }
-        }
-        
-    // check policy
-    HBufC* polId = iCmPluginBaseEng.GetStringAttributeL( EVpnServicePolicy );
-    if ( ( polId->Compare( KNullDesC() ) ) == 0 )
-        {
-        retval = EFalse;
-        }
-    delete polId;
-
-    // check policy name
-    HBufC* polname = iCmPluginBaseEng.GetStringAttributeL( EVpnServicePolicyName );
-    if ( ( polname->Compare( KNullDesC() ) ) == 0 )
-        {
-        retval = EFalse;
-        }
-    delete polname;
-    
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnSettingsDlg::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-    
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyBack:
-            {
-            if ( CompulsoryFilledL() )
-                {
-                if( iIsPossibleToSaveSetting && iHasSettingChanged )
-                {
-                    iCmPluginBaseEng.UpdateL();
-                    iHasSettingChanged = EFalse;
-                }
-                retval = ETrue;
-
-                iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-                }
-            else
-                {
-                // If there are compulsory fields empty, a confirmation query
-                // Incomplete VPN access point details. Exit without saving?
-                // §qtn.vpn.quest.vpn.iap.incomplete.delete§ is displayed.
-                // show note that compulsory settings are not filled
-                TInt res = TCmCommonUi::ShowConfirmationQueryL( 
-                                R_QTN_VPN_QUEST_VPN_IAP_INCOMPLETE_DELETE );
-                if ( res )
-                    { // quit without save
-                    retval = ETrue;
-                    TUint32 id = iCmPluginBaseEng.GetIntAttributeL( ECmId );
-                    iCmPluginBaseEng.RestoreAttributeL( ECmName );
-                    iCmPluginBaseEng.RestoreAttributeL( EVpnServicePolicyName );
-                    // EVpnServicePolicy has been restored when EVpnServicePolicyName
-                    // is restored.
-                    //iCmPluginBaseEng.RestoreAttributeL( EVpnServicePolicy );
-                    iCmPluginBaseEng.RestoreAttributeL( EVpnIapId );
-                    iCmPluginBaseEng.RestoreAttributeL( ECmNextLayerIapId );
-                    iCmPluginBaseEng.RestoreAttributeL( ECmNextLayerSNAPId );
-                    iCmPluginBaseEng.RestoreAttributeL( ECmProxyServerName );
-                    iCmPluginBaseEng.RestoreAttributeL( ECmProxyPortNumber );
-                    
-                    iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-                    }
-                else
-                    { // do not save, reconfigure
-                    retval = EFalse;                    
-                    }
-                }
-            break;
-            }
-        default:
-            {
-            if( aButtonId == EPluginBaseCmdExit )
-                {
-                iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-                }
-            
-            retval = CmPluginBaseSettingsDlg::OkToExitL( aButtonId );
-            break;
-            }
-        }
-
-    return retval;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-    
-void CmPluginVpnSettingsDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::GetHelpContext" );
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_VPN_AP_SETTINGS_VIEW;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnSettingsDlg::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnSettingsDlg::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            // If parent destination diappears with some reason 
-            // then the view must exit back to main view for it
-            // may be danger if going back to parent view
-            iExitReason = KDialogUserExit;
-            iCanEditingContinue = EFalse;
-
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-        
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/data/10281BB2.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:  Resource definitions for project cmpluginwlan
-*
-*/
-
-#include "ecom/registryinfo.rh"
-
-// Because attribute enums had to be added to namespace CMManager
-// it's not possible to included cmpluginwlandef.h
-// Thus bearer type id had to be redefine here.
-#define KUidWlanBearerType  0x10281BB1
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid = 0x10281BB2;
-    interfaces = 
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x10207377; // = KCMPluginInterfaceUid
-            implementations = 
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = KUidWlanBearerType;
-                    version_no = 1;
-                    display_name = "Wlan";
-                    default_data = "Wlan";
-                    opaque_data = "";
-                    }
-                };
-            }
-        };
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/data/cmwlanui.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,641 +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:  Resource definitions for project cmpluginwlan
-*
-*/
-#include <avkon.rsg>
-#include <avkon.rh>    
-#include <avkon.loc>
-#include <avkon.mbg>
-#include <uikon.rh>
-#include <eikon.rsg>
-#include <eikon.rh>
-#include <AvkonIcons.hrh>
-#include <cmpsettingsconsts.h>
-#include <cmmanager.rsg>
-
-#include <cmpluginwlan.loc>
-
-NAME    WLPL
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf = "cmwlanplugin"; }
-
-
-// LOCALISED STRINGS
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_bearer_supported_wlan
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_bearer_supported_wlan
-    {
-    buf = qtn_netw_conset_bearer_supported_wlan;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_bearer_available_wlan
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_bearer_available_wlan
-    {
-    buf = qtn_netw_conset_bearer_available_wlan;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_one_wlan_nw_available
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_one_wlan_nw_available
-    {
-    buf = qtn_netw_conset_one_wlan_nw_available;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_many_wlan_nw_available
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_many_wlan_nw_available
-    {
-    buf = qtn_netw_conset_many_wlan_nw_available;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_name
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_name
-    {
-    buf = qtn_wlan_sett_network_name;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_prmpt_network_name
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_prmpt_network_name
-    {
-    buf = qtn_wlan_prmpt_network_name;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_hidden_network
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_hidden_network
-    {
-    buf = qtn_wlan_sett_hidden_network;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_mode
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_mode
-    {
-    buf = qtn_wlan_sett_network_mode;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode
-    {
-    buf = qtn_wlan_sett_security_mode;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_settings
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_settings
-    {
-    buf = qtn_wlan_sett_security_settings;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_hidden_network_no
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_hidden_network_no
-    {
-    buf = qtn_wlan_sett_hidden_network_no;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_hidden_network_yes
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_hidden_network_yes
-    {
-    buf = qtn_wlan_sett_hidden_network_yes;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_mode_infra
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_mode_infra
-    {
-    buf = qtn_wlan_sett_network_mode_infra;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_prmpt_wlan_nw_mode_and_status
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_wlan_nw_mode_and_status
-    {
-    buf = qtn_netw_conset_prmpt_wlan_nw_mode_and_status;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_network_mode_infra_public
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_network_mode_infra_public
-    {
-    buf = qtn_wlan_network_mode_infra_public;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_network_mode_infra_hidden
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_network_mode_infra_hidden
-    {
-    buf = qtn_wlan_network_mode_infra_hidden;
-    }
-    
- // ---------------------------------------------------------------------------
-// r_qtn_wlan_network_mode_adhoc_public
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_network_mode_adhoc_public
-    {
-    buf = qtn_wlan_network_mode_adhoc_public;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_network_mode_adhoc_hidden
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_network_mode_adhoc_hidden
-    {
-    buf = qtn_wlan_network_mode_adhoc_hidden;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_prmpt_wlan_nw_security_mode
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_wlan_nw_security_mode
-    {
-    buf = qtn_netw_conset_prmpt_wlan_nw_security_mode;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_wlan_security_mode_open
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wlan_security_mode_open
-    {
-    buf = qtn_netw_conset_wlan_security_mode_open;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_wlan_security_mode_wep
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wlan_security_mode_wep
-    {
-    buf = qtn_netw_conset_wlan_security_mode_wep;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_wlan_security_mode_802_1x
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wlan_security_mode_802_1x
-    {
-    buf = qtn_netw_conset_wlan_security_mode_802_1x;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_wlan_security_mode_wpa
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wlan_security_mode_wpa
-    {
-    buf = qtn_netw_conset_wlan_security_mode_wpa;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode_open
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode_open
-    {
-    buf = qtn_wlan_sett_security_mode_open;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode_wep
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode_wep
-    {
-    buf = qtn_wlan_sett_security_mode_wep;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode_802_1x
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode_802_1x
-    {
-    buf = qtn_wlan_sett_security_mode_802_1x;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_wlan_sett_security_mode_wpa
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wlan_sett_security_mode_wpa
-    {
-    buf = qtn_netw_conset_wlan_sett_security_mode_wpa;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode_wapi
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode_wapi
-    {
-    buf = qtn_wlan_sett_security_mode_wapi;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_prmpt_wlan_wpa_mode
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_wlan_wpa_mode
-    {
-    buf = qtn_netw_conset_prmpt_wlan_wpa_mode;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_prmpt_wpa_mode_eap
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_wpa_mode_eap
-    {
-    buf = qtn_netw_conset_prmpt_wpa_mode_eap;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_prmpt_wpa_mode_psk
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_prmpt_wpa_mode_psk
-    {
-    buf = qtn_netw_conset_prmpt_wpa_mode_psk;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_info_eap_settings_default
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_info_eap_settings_default
-    {
-    buf = qtn_netw_conset_info_eap_settings_default;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_security_mode_wpa
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_security_mode_wpa
-    {
-    buf = qtn_wlan_sett_security_mode_wpa;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_name_user_defined
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_name_user_defined
-    {
-    buf = qtn_wlan_sett_network_name_user_defined;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_name_scan
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_name_scan
-    {
-    buf = qtn_wlan_sett_network_name_scan;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_network_mode_adhoc
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_network_mode_adhoc
-    {
-    buf = qtn_wlan_sett_network_mode_adhoc;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_adhoc_channel
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_adhoc_channel
-    {
-    buf = qtn_wlan_sett_adhoc_channel;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_prmpt_adhoc_channel
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_prmpt_adhoc_channel
-    {
-    buf = qtn_wlan_prmpt_adhoc_channel;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_adhoc_channel_automatic
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_adhoc_channel_automatic
-    {
-    buf = qtn_wlan_sett_adhoc_channel_automatic;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_adhoc_channel_user_defined
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_adhoc_channel_user_defined
-    {
-    buf = qtn_wlan_sett_adhoc_channel_user_defined; 
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_info_no_security_settings
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_info_no_security_settings
-    {
-    buf = qtn_wlan_info_no_security_settings;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_netw_conset_popup_bearer_wlan
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_popup_bearer_wlan
-    {
-    buf = qtn_netw_conset_popup_bearer_wlan;
-    }
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_quest_nw_name_not_defined
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_quest_nw_name_not_defined
-    {
-    buf = qtn_wlan_quest_nw_name_not_defined;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_quest_security_settings_empty
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_quest_security_settings_empty
-    {
-    buf = qtn_wlan_quest_security_settings_empty;
-    }
-  
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_bearer_wlan
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_bearer_wlan
-    {
-    buf = qtn_wlan_sett_bearer_wlan;
-    }
-
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_ssid_roaming
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_ssid_roaming
-    {
-    buf = qtn_wlan_sett_ssid_roaming;
-    }
-
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_ssid_roaming_enabled
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_ssid_roaming_enabled
-    {
-    buf = qtn_wlan_sett_ssid_roaming_enabled;
-    }
-
-
-// ---------------------------------------------------------------------------
-// r_qtn_wlan_sett_ssid_roaming_disabled
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_wlan_sett_ssid_roaming_disabled
-    {
-    buf = qtn_wlan_sett_ssid_roaming_disabled;
-    }
-
-// ---------------------------------------------------------------------------
-// qtn_wlan_info_no_networks_found;
-// localised string
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_info_no_networks_found
-    { 
-    buf = qtn_wlan_info_no_networks_found;
-    }
-
-// ---------------------------------------------------------------------------
-// r_setting_app_edwin_netw_name
-// edwin for network name setting page
-// ---------------------------------------------------------------------------
-//
-RESOURCE EDWIN r_setting_app_edwin_netw_name
-    {
-    width = KNetworkNameWidth;
-    lines = KNetworkNameLines;
-    maxlength = KMaxNetworkNameLength;
-    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
-    default_input_mode = EAknEditorTextInputMode;
-    flags = EEikEdwinAutoSelection | EEikEdwinNoLineOrParaBreaks;
-    }
-
-    
-// ---------------------------------------------------------------------------
-// r_text_setting_page_netw_name
-// setting page for network name
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_netw_name
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label = qtn_wlan_sett_network_name;
-    type = EEikCtEdwin;
-    editor_resource_id = r_setting_app_edwin_netw_name;
-    }
-
-// ---------------------------------------------------------------------------
-// r_text_setting_page_gw_addr
-// setting page for WAP gateway address
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_gw_addr
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label= qtn_netw_sett_default_gateway;
-    type = EAknCtIpFieldEditor;
-    editor_resource_id = R_SETTING_APP_IP_EDITOR;
-    }
-    
-// ---------------------------------------------------------------------------
-// r_text_setting_page_subnet_addr
-// setting page for subnet mask setting
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_text_setting_page_subnet_addr
-    {
-    number = EAknSettingPageNoOrdinalDisplayed;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    label = qtn_netw_sett_subnet_mask;
-    type = EAknCtIpFieldEditor;
-    editor_resource_id = R_SETTING_APP_IP_EDITOR;
-    }
-
-// --------------------------------------------------------------------------
-// r_numeric_query
-// number query
-// --------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_numeric_query
-	{
-	flags = EGeneralQueryFlags | EEikDialogFlagNoShadow;
-	buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-	items=
-		{
-		DLG_LINE
-			{
-			type = EAknCtQuery;
-			id = EGeneralQuery;
-			control = AVKON_DATA_QUERY 
-				{ 
-				layout = EStaticSizeDataLayout;
-				control = EDWIN
-					{
-					flags = EEikEdwinNoHorizScrolling;
-                    default_input_mode = EAknEditorNumericInputMode;
-					};
-				};
-			}
-		};
-	}
-
-
-RESOURCE DIALOG r_searching_wlan_wait_note
-	{
-	flags = EAknWaitNoteFlags;
-	buttons=R_AVKON_SOFTKEYS_EMPTY;
-    items=
-		{
-		DLG_LINE
-			{
-			type = EAknCtNote;
-			id = EGeneralNote; 
-			control= AVKON_NOTE 
-                { 
-				layout = EWaitLayout;
-				singular_label = qtn_wlan_wait_searching_networks;				
-                imagefile = AVKON_ICON_FILE;
-				imageid = EMbmAvkonQgn_note_progress;
-				imagemask = EMbmAvkonQgn_note_progress_mask;
-				animation = R_QGN_GRAF_WAIT_BAR_ANIM;				
-				};
-			}
-		};
-	}
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Build information for the WLAN plugin.   
-*      
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export localised loc file
-../loc/cmpluginwlan.loc	MW_LAYER_LOC_EXPORT_PATH(cmpluginwlan.loc)
-
-PRJ_MMPFILES
-cmpluginwlan.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE cmpluginwlan.mif
-OPTION HEADERFILE cmpluginwlan.mbg
-OPTION SOURCES -c8,1 qgn_prop_wlan_bearer\
-               -c8,8 qgn_prop_set_conn_bearer_avail_wlan\
-               -c8,1 qgn_prop_set_conn_wlan_easy
-END
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/group/cmpluginwlan.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Project specification for LAN Plugin.   
-*      
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET      cmpluginwlan.dll
-UID         0x10009D8D 0x10281BB2
-
-TARGETTYPE		PLUGIN
-
-CAPABILITY      CAP_ECOM_PLUGIN
-VENDORID        VID_DEFAULT
-
-SOURCEPATH  ../src
-
-SOURCE      cmpluginwlanproxy.cpp
-SOURCE      cmpluginwlan.cpp
-SOURCE      cmpluginwlandata.cpp
-SOURCE      cmpluginwlandataarray.cpp
-SOURCE      ../../../Framework/Src/cmlogger.cpp
-SOURCE      cmpwlansettingsdlg.cpp
-SOURCE      cmpwlansettingsdlgadv.cpp
-SOURCE      cmpwlansettingsdlgipv4.cpp
-SOURCE      cmpwlansettingsdlgipv6.cpp
-SOURCE      cmwlancoveragecheck.cpp
-SOURCE      cmpwlanactivewaiter.cpp
-
-SOURCEPATH  ../data
-
-START RESOURCE 10281BB2.rss
-TARGET cmpluginwlan.rsc
-END
-
-START RESOURCE cmwlanui.rss
-DEPENDS cmmanager.rsg
-HEADER
-TARGETPATH   RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-USERINCLUDE     ../../../Framework/Inc
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../../../inc
-   
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY     euser.lib
-LIBRARY 	efsrv.lib
-LIBRARY	    ECOM.LIB
-LIBRARY     cmmanager.lib
-LIBRARY     COMMSDAT.lib
-LIBRARY     WEPSecuritySettingsUi.lib
-LIBRARY     WPASecuritySettingsUi.lib
-LIBRARY     wapisecuritysettingsui.lib
-LIBRARY     AknSkins.lib
-LIBRARY     ConnectionUiUtilities.lib
-LIBRARY     cmmanagerdatabase.lib
-
-DEBUGLIBRARY flogger.lib
-
-LIBRARY	CommonUI.LIB
-LIBRARY	CommonEngine.lib
-LIBRARY	bafl.lib
-LIBRARY eikcoctl.lib avkon.lib eikdlg.lib
-LIBRARY insock.lib
-LIBRARY FeatMgr.lib
-   
-LIBRARY eikcore.lib egul.lib
-LIBRARY eikctl.lib  cone.lib 
-LIBRARY fbscli.lib
-LIBRARY AknCapServerClient.lib
-LIBRARY aknnotify.lib
-
-LIBRARY	wifiprotplugin.lib
-LIBRARY charconv.lib
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/group/pluginwlan_icons.mk	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:  Makefile for icons of ApSettingsHandlerUi
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cmpluginwlan.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cmpluginwlan.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,1 qgn_prop_wlan_bearer.bmp \
-                /c8,8 qgn_prop_set_conn_bearer_avail_wlan.bmp \
-                /c8,1 qgn_prop_set_conn_wlan_easy.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
-	@echo $(HEADERFILENAME)&& \
-	@echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlan.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,617 +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:  Declaration of WLAN interface implementation for WLAN plugin
-*
-*/
-
-#ifndef WLAN_PLUGIN_H
-#define WLAN_PLUGIN_H
-
-// INCLUDES
-#include <cmpluginlanbase.h>
-#include <cmpluginwlandef.h>
-#include <e32base.h>
-#include <eikdoc.h>
-#include <apparc.h>
-#include <eikenv.h>
-#include <wlanmgmtcommon.h>
-#include <wifiprotreturn.h>
-
-// FORWARD DECLARATION
-class CCDWlanServiceRecord;
-class CWEPSecuritySettings;
-class CWEPSecuritySettingsUi;
-class CWPASecuritySettings;
-class CWPASecuritySettingsUi;
-class RConeResourceLoader;
-class CConnectionUiUtilities;
-class CCmPluginWlanDataArray;
-class CAknWaitDialog;
- 
-class CWAPISecuritySettings;
-class CWAPISecuritySettingsUi;
-
-/** 
- * WPA Mode
- */
-enum TWpaMode
-    {
-    EWpaModeUndefined = -1,
-    EWpaModeEap,
-    EWpaModePreSharedKey
-    };
-
-/**
- *  WLAN Plugin IF implementation class
- *
- *  ?more_complete_description
- *
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CCmPluginWlan ) : public CCmPluginLanBase
-    {
-
-    public: // Constructors and destructor
-
-        /**
-        * Two phased constructor
-        *
-        * @since S60 3.2
-        * @param aInitParam
-        * @return The created object.
-        */      
-		static CCmPluginWlan* NewL( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Destructor.
-        */      
-        virtual ~CCmPluginWlan();
-        
-        virtual CCmPluginBaseEng* CreateInstanceL( TCmPluginInitParam& aInitParam ) const;
-        
-    public: // from base class
-        
-		/**
-		* From CCmPluginBaseEng
-		* Gets the value for a TUint32 attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be retrived
-		* @return the requested TUint32 value
-		*/
-		TUint32 GetIntAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-		* From CCmPluginBaseEng
-		* Gets the value for a TBool attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be retrived
-        * @return the requested TBool value
-		*/
-		TBool GetBoolAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-		* From CCmPluginBaseEng
-		* Gets the value for a TDes16 attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be retrived
-        * @return the requested string value
-		*/
-		HBufC* GetStringAttributeL( const TUint32 aAttribute ) const;
-
-		/**
-		* From CCmPluginBaseEng
-		* Sets the value for a TInt attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be set.
-		* @param aValue The value to be set
-        */
-		void SetIntAttributeL( const TUint32 aAttribute, TUint32 aValue );
-
-		/**
-		* * From CCmPluginBaseEng
-		* Sets the value for a TBool attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be set.
-		* @param aValue The value to be set
-        */
-		void SetBoolAttributeL( const TUint32 aAttribute, TBool aValue );
-
-		/**
-		* From CCmPluginBaseEng
-		* Sets the value for a TDesC attribute
-		*
-		* @since S60 3.2
-		* @param aAttribute Identifies the attribute to be set.
-		* @param aValue The value to be set
-        */
-		void SetStringAttributeL( const TUint32 aAttribute, const TDesC16& aValue );
-      
-        /**
-		* From CCmPluginBaseEng
-		* Checks if the plug-in can handle the given AP.
-		*
-		* @since S60 3.2
-		* @param aIapId
-		* @return ETrue if plug-in can handle the IAP
-        */        
-        TBool CanHandleIapIdL( TUint32 aIapId ) const;
-        
-        /**
-		* From CCmPluginBaseEng
-        * Checks if the plug-in can handle the given AP
-        *
-        * @since S60 3.2
-        * @param aIapRecord IAP record to be checked
-        * @return ETrue if plug-in can handle the IAP
-        */
-        TBool CanHandleIapIdL( CommsDat::CCDIAPRecord *aIapRecord ) const;
-
-        /**
-        * From CCmPluginBaseEng
-        * Launches the WLAN settings dialog
-        *
-        * @since S60 3.2
-        * @return soft key selection
-        */
-        TInt RunSettingsL();
-        
-        /**
-        * From CCmPluginBaseEng
-        * see base class definition
-        *
-        * @since S60 3.2
-        */
-	    TBool InitializeWithUiL( TBool aManuallyConfigure );
-
-        /**
-        * From CCmPluginBaseEng
-        * see base class definition
-        *
-        * @since S60 3.2
-        */      
-	    void LoadServiceSettingL();
-	    
-	    /**
-        * From CCmPluginBaseEng
-        * see base class definition
-        *
-        * @since S60 3.2
-        */
-	    void AdditionalReset();
-	    
-    public: // New functions
-	    /**
-	    * Edits the security settings for the current connection method
-	    *
-        * @since S60 3.2
-        * @param aEikonEnv Eikon environment to use
-        * @return exit reason
-	    */	  
-	    TInt EditSecuritySettingsL( CEikonEnv& aEikonEnv );
-	    
-	    /**
-	    * Returns the security settings validity for the current connection method
-	    *
-	    * @since S60 3.2
-	    * @return Validity of the current security settings
-	    */	    
-        TBool AreSecuritySettingsValidL();
-
-	    /**
-	    * Loads the security settings for the current connection method
-	    *
-	    * @since S60 3.2
-	    */
-	    void LoadSecuritySettingsL();
-
-    protected:
-    
-        /**
-        * From CCmPluginBaseEng
-        * see base class definition
-        *
-        * @since S60 3.2
-        */
-	    virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                   TUint32& aRecordId );
-
-
-        /**
-        * Copy data of the connection method that is not 
-        * added to the conversion table. (e.g. bearer specific
-        * flags)
-        *
-        * @param aDestInst copy attributes into this plugin instance
-        */    
-        void CopyAdditionalDataL( CCmPluginBaseEng& aDestInst ) const;
-        
-        
-	private: // construction
-
-        /**
-        * Constructor
-        *
-        * @since S60 3.2
-        */      
-		CCmPluginWlan( TCmPluginInitParam* aInitParam );
-
-        /**
-        * Second phase constructor
-        *
-        * @since S60 3.2
-        */      
-		void ConstructL();
-
-    private: // from base class
-    
-        /**
-        * From CCmPluginBaseEng
-        * Updates additional records, in this case, the WLAN records.
-        *
-        * @since S60 3.2
-        */
-        void UpdateAdditionalRecordsL();
-
-        /**
-        * From CCmPluginBaseEng
-        * Deletes additional records, in this case, the WLAN records
-        *
-        * @since S60 3.2
-        */
-        void DeleteAdditionalRecordsL();
-
-        /**
-        * From CCmPluginBaseEng
-        * Loads additional records, in this case, the WLAN records
-        *
-        * @since S60 3.2
-        */
-        void LoadAdditionalRecordsL();
-    
-	    /**
-        * From CCmPluginBaseEng
-        * Creates a new service record for this bearer
-        *
-        * @since S60 3.2
-        */
-	    void CreateNewServiceRecordL();
-	    
-	    /**
-        * From CCmPluginBaseEng
-        * Creates the WLAN service record used by this WLAN
-        *
-        * @since S60 3.2
-        */
-
-	    void CreateWlanServiceRecordL();
-	    
-        /**
-        * From CCmPluginBaseEng
-        */
-        virtual void PrepareToUpdateRecordsL();
-
-        /**
-        * Appends uids of connection methods - which were also created during connection method
-        * creation - to the array given as parameter 
-        * @param aIapIds the array the additonal cm uids are appended to
-        */        
-        virtual void GetAdditionalUids( RArray<TUint32>& aIapIds );
-	    
-    private: // new functions
-    	    
-        /**
-        * Updates the security settings for the current WLAN connection method
-        *
-        * @since S60 3.2
-        */
-        void UpdateSecuritySettingsL();
-
-        /**
-        * Allocates a string specified by aResId and replaces %N in the
-        * resource with aInt
-        *
-        * @since S60 3.2
-        * @param aResId Resource ID to be read from resource file.
-        * @param aInt Integer that will replace %N in the string.
-        * @return String read from resource file, specified by aResId,
-        * containing aInt.
-        */
-        HBufC* ReadResourceL( TInt aResId, TInt aInt ) const;
-
-        /**
-        * The UI for manually configuring a WLAN connection method
-        * 
-        * @since S60 3.2
-        * @return ETrue if the configuration was successful
-        */
-        TBool ManuallyConfigureL();
-        
-        /**
-        * Continuing with Manual configuration from step 4
-        * called from ManuallyConfigureL or AutomaticallyConfigureL in case the
-        * specicfied network was not found (reverting to fully manual setup)
-        * 
-        * @since S60 3.2
-        * @param TBool aAskNWModeAndSec if set to ETrue, NW mode and Security 
-        * mode dialogs are shown. If EFalse, these values are taken from
-        * the corresponding parameters of this function
-        * @param TWlanNetMode& aNwMode NW mode used if aAskNWModeAndSec is EFalse
-        * @param TWlanConnectionExtentedSecurityMode& aSecurityMode 
-        * Security mode used if aAskNWModeAndSec is EFalse
-        * @param TWpaMode& aWpaMode WPA mode
-        * @return ETrue if the configuration was successful
-        */
-        TBool ProceedWithManualL( TBool aAskNWModeAndSec,
-                                  CMManager::TWlanNetMode aNwMode = CMManager::EInfra, 
-                                  TWlanConnectionExtentedSecurityMode aSecurityMode = EWlanConnectionExtentedSecurityModeOpen,
-                                  TWpaMode aWpaMode = EWpaModeUndefined );
-        /**
-        * The UI for automatically configuring a WLAN connection method
-        * 
-        * @since S60 3.2
-        * @return ETrue if the configuration was successful
-        */
-        TBool AutomaticallyConfigureL();
-
-        /*
-        * Loads a specific resource, leaves the resource loader on the 
-        * cleanup stack
-        * 
-        * @since S60 3.2
-        * @param aResourceLoader
-        */
-        void LoadResourceLC( RConeResourceLoader& aResourceLoader ) const;
-        
-        /*
-        * Prompt for the Network Name of the new WLAN connection method
-        * sets the network name and SSID settings 
-        *
-        * @since S60 3.2
-        * @param 
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool ShowNWNameQueryL( TDes& aName );
-        
-        /*
-        * Scans for a WLAN network by a given SSID
-        * initially makes a broadcast scan and if not found a direct scan.
-        * Sets the scan ssid setting
-        *
-        * @since S60 3.2
-        * @param aSsid the SSID to scan for
-        * @return ETrue if a network has been found with the SSID
-        */
-        TBool ScanForWlanNwL( TWlanSsid& aSsid, 
-                              CMManager::TWlanNetMode& aNetworkMode,
-                              TWlanConnectionExtentedSecurityMode& aSecurityMode,
-                              TBool& aProtectedSetupSupported  );
-
-        /*
-        * Selection list for Network Mode
-        *
-        * @since S60 3.2
-        * @param aNWMode (return value) network mode selected
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool SelectNWModeL( CMManager::TWlanNetMode& aNWMode );
-        
-        /*
-        * Displays a user selection dialog of Security Modes
-        * 
-        * @since S60 3.2
-        * @param aNwMode which network mode was selected
-        * @param aSecurityMode returns the selection
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool ShowNWSecurityDlgL( CMManager::TWlanNetMode aNwMode, 
-                                  TWlanConnectionExtentedSecurityMode& aSecurityMode );
-        
-        /*
-        * Triggers the WEP key input query  
-        *
-        * @since S60 3.2
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool EnterWEPKeyL();
-        
-        /*
-        * Triggers the pre-shared key for WPA WLAN query
-        *
-        * @since S60 3.2
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool EnterWpaPreSharedKeyL();
-        
-        /*
-        * Shows the WPA/WPA2 mode dialog
-        * 
-        * @since S60 3.2
-        * @param aWpaMode return value
-        * @return ETrue if selection made
-        */
-        TBool SelectWpaModeDialogL( TWpaMode& aWpaMode );
-        
-        /**
-        * Reloads internal security settings modules according to the changes
-        * @since S60 3.2
-        */
-        void UpdateSecurityModeL();
-        
-    
-        /**
-        * Called from another CM-s CopyAdditionalDataL, on the passed 
-        * copied CM, and marks this as a copy of the original CM which 
-        * has an IAP ID of aBaseIapID
-        *
-        * @since S60 3.2
-        */
-        void SetAsCopyOf( TUint32 aBaseIapID );
-
-        /**
-        * Deletes the security settings related to this connection method.
-        *
-        * @since S60 3.2
-        */
-        void DeleteSecuritySettingsL();
-
-        
-        /**
-        * Set the EWlanIpDNSAddrFromServer according to the 
-        * current name server values.
-        *
-        * @since S60 3.2
-        */
-        void SetDnsIpFromServerL();
-
-
-        /**
-        * Set the EWlanIp6DNSAddrFromServer according to the 
-        * current name server values.
-        *
-        * @since S60 3.2
-        */
-        void SetDns6IpFromServerL();
-
-
-	    /**
-	    * Checks for coveradge and number of WLAN connections available
-        * @since S60 3.2
-        * @return The number of available WLAN network connections
-        */
-        TInt CheckNetworkCoverageL() const;
-
-
-	    /**
-	    * Converts security mode from TWlanConnectionSecurityMode to 
-        * TWlanSecMode
-        * @since S60 3.2
-        * @return The security mode as TWlanSecMode
-        */
-        CMManager::TWlanSecMode ConvertConnectionSecurityModeToSecModeL(
-                                    TWlanConnectionExtentedSecurityMode aSecurityMode );
-
-
-	    /**
-	    * Converts security mode from TWlanSecMode to 
-        * TWlanConnectionSecurityMode
-        * @since S60 3.2
-        * @return The security mode as TWlanConnectionSecurityMode
-        */
-        TWlanConnectionExtentedSecurityMode ConvertSecModeToConnectionSecurityModeL(
-                                    CMManager::TWlanSecMode aSecMode );
-
-        /**
-        * Destroy wait dialog 
-        */
-        void DestroyWaitDialog();
-
-
-        /**
-        * Sets the daemon name. Starts DHCP if set.
-        *
-        * @since S60 3.2
-        */
-        void SetDaemonNameL();
-
-
-        /**
-        * Converts the possible WLAN connection states from TWlanConnectionMode
-        * to TWlanNetMode.
-        * @since S60 3.2
-        * @return The WLAN connection mode as TWlanNetMode
-        */
-        CMManager::TWlanNetMode ConvertWLANConnectionStatesL( 
-                                    TWlanConnectionMode aConnectionMode );
-
-        WiFiProt::TWiFiReturn ProtectedSetupL(TWlanSsid& aSsid );
-
-        /*
-        * Triggers the pre-shared key for WAPI WLAN query
-        *
-        * @since S60 5.1
-        * @return ETrue if a selection was made, EFalse if cancelled
-        */
-        TBool EnterWAPIPreSharedKeyL();
-        
-	private: // Data
-
-        /**
-         * WLan service record
-         * Own
-         */         
-        CCDWlanServiceRecord* iWlanServiceRecord; // owned
-        
-        /**
-         * WLAN table id
-         */
-        CommsDat::TMDBElementId iWlanTableId;
-
-        /**
-         * WEP settings data
-         * Own
-         */
-        CWEPSecuritySettings* iWepSecSettings;
-        
-        /**
-         * WPA settings data
-         * Own
-         */
-        CWPASecuritySettings* iWpaSecSettings;
-        
-        /**
-         * Number of networks
-         */
-        TInt iWlanNetworks;
-        
-        /**
-         * Connection UI utilities pointer
-         * Own
-         */
-        CConnectionUiUtilities* iConnUiUtils; // owned
-
-        /**
-        * Signals that this connection method is a copy of another WLAN CM.
-        */
-        TBool iIsCopy;
-        
-        /**
-        * The IAP ID of the CM from which this copy had been made. 
-        */
-        TUint32 iCopiedFromIapId;
-
-        /**
-        * "Searching WLAN networks" wait dialog.
-        */
-        CAknWaitDialog* iWaitDialog;
-        
-        RArray<TUint32> iAdditionalCmsCreated;
-
-        /**
-         * Asked from the Feature manager at the constructor phase
-         */
-        TBool iIsWAPISupported;
-        
-        /**
-        * WAPI settings data
-        * Own
-        */
-        CWAPISecuritySettings* iWAPISecSettings;
-	};
-
-#endif // WLAN_PLUGIN_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlandata.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +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:  Declaration of WLAN data holder for WLAN plugin
-*
-*/
-
-#ifndef WLAN_DATA_H
-#define WLAN_DATA_H
-
-// INCLUDES
-#include    <e32base.h>
-
-
-/**
-* Possible values of SignalStrength of a network
-*/
-enum TSignalStrength
-    {
-    ESignalStrengthMax = 60,
-    ESignalStrengthGood = 74,
-    ESignalStrengthLow = 87,
-    ESignalStrengthMin = 100
-    };
-
-// FORWARD DECLARATION
-/*
-class CCDWlanServiceRecord;
-class CWEPSecuritySettings;
-class CWEPSecuritySettingsUi;
-class CWPASecuritySettings;
-class CWPASecuritySettingsUi;
-class RConeResourceLoader;
-class CConnectionUiUtilities;
-*/
-
-
-/**
- *  WLAN Plugin data holder class
- *
- *  ?more_complete_description
- *
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CCmPluginWlanData ) : public CBase
-    {
-
-    public: // Constructors and destructor
-    
-        /**
-        * Two-phased constructor. Leaves on failure, places instance
-        * on cleanup stack.
-        *
-        * @since S60 3.2
-        * @return The constructed CCmPluginWlanData.
-        */
-        static CCmPluginWlanData* NewLC();
-    
-        /**
-        * Destructor
-        *
-        * @since S60 3.2
-        */
-        virtual ~CCmPluginWlanData();
-
-    protected:
-        /**
-        * Constructor
-        *
-        * @since S60 3.2
-        */
-        CCmPluginWlanData();
-
-
-        /**
-        * Second-phase constructor.
-        *
-        * @since S60 3.2
-        */
-        void ConstructL();
-        
-
-
-    public: // New functions
-    
-        /**
-        * Gives back the name of network (SSID)
-        *
-        * @since S60 3.2
-        * @return the name of network 
-        */
-//        HBufC* GetNameLC() const;
-
-        /**
-        * Gives back current SignalStrength
-        *
-        * @since S60 3.2
-        * @return iSignalStrength
-        */        
-//        TSignalStrength GetSignalStrength() const;
-        
-        
-	public: // Data
-
-        /**
-        * The name of network (from SSID)
-        */
-        HBufC*                              iNetworkName;
-        
-        /**
-        * Signale strength of network
-        */
-        TSignalStrength                     iSignalStrength;
-
-	};
-
-#endif // WLAN_DATA_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpluginwlandataarray.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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:  Declaration of WLAN data holder array for WLAN plugin
-*
-*/
-
-#ifndef WLAN_DATA_ARRAY_H
-#define WLAN_DATA_ARRAY_H
-
-// INCLUDES
-#include    <e32base.h>
-
-class CCmPluginWlanData;
-
-/**
- *  WLAN Plugin data holder class
- *  A list of CCmPluginWlanData-s pointers; items are owned.
- *
- *  ?more_complete_description
- *
- *  @since S60 3.2
- */
-NONSHARABLE_CLASS( CCmPluginWlanDataArray ) : public CArrayPtrFlat<CCmPluginWlanData>
-    {
-
-    public:  // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CCmPluginWlanDataArray();
-
-        /**
-        * Destructor. Items in the list are destroyed.
-        */
-        virtual ~CCmPluginWlanDataArray();
-
-	};
-
-#endif // WLAN_DATA_ARRAY_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlanactivewaiter.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +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:  Declaration of CCmPluginWlanActiveWaiter
-*
-*/
-
-
-
-#ifndef __WLAN_PLUGIN_ACTIVE_WAITER_H__
-#define __WLAN_PLUGIN_ACTIVE_WAITER_H__
-
-// INCLUDES
-#include <e32base.h>
-
-/**
- * CCmPluginWlanActiveWaiter class,
- * an active object to replace User::WaitForRequest
- * 
- * Usage:
- * CCmPluginWlanActiveWaiter* waiter = CCmPluginWlanActiveWaiter::NewL();
- * CleanupStack::PushL( waiter );
- * server.AsyncFunction( waiter->iStatus );
- * if ( waiter->WaitForRequest() == KErrNone )
- *      {
- *      // handle success
- *      }
- *      else 
- *      {
- *      // handle failure
- *      }
- * CleanupStack::PopAndDestroy( waiter );
- * 
- */     
-NONSHARABLE_CLASS( CCmPluginWlanActiveWaiter ) : public CActive
-    {
-    public:
-        /**
-        * NewL function
-        * @param  aPlugin a pointer to notifier plugin
-        */
-        static CCmPluginWlanActiveWaiter* NewL( );
-
-        /**
-        * Destructor
-        */    
-        virtual ~CCmPluginWlanActiveWaiter();          
-
-        /**
-        * Waits for it's TRequestStatus to be completed
-        * @return Error code returned from server after request is
-        * completed
-        */
-        TInt WaitForRequest( );
-        
-    protected:
-        /**
-        * ConstructL 
-        */
-        void ConstructL();
-    
-        /**
-        * Constructor
-        * @param  aPlugin a pointer to notifier plugin    
-        */    
-        CCmPluginWlanActiveWaiter();
-            
-        /**
-        * DoCancel from CActive
-        */    
-        virtual void DoCancel();
-      
-        /**
-        * RunL from CActive
-        */      
-        virtual void RunL();
-    
-    protected:
-        CActiveSchedulerWait iWait;
-    };     
-
-#endif // __WLAN_PLUGIN_ACTIVE_WAITER_H__
-
-// End of file
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +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:  Declares dialog for a wlan cm plugin view/edit
-*
-*/
-
-#ifndef CMPLUGINWLAN_SETTINGS_DLG_H
-#define CMPLUGINWLAN_SETTINGS_DLG_H
-
-// INCLUDES
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include "cmcommsdatnotifier.h"
-
-// FORWARD DECLARATIONS
-class CCmPluginBaseEng;
-
-// CLASS DECLARATION
-/**
-* CmPluginWlanSettingsDlg dialog class
-*
-*/
-NONSHARABLE_CLASS( CmPluginWlanSettingsDlg ) : public CmPluginBaseSettingsDlg
-                                             , public MCmCommsDatWatcher
-                                             , public CCmParentViewNotifier
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phase construction
-        *
-        * @since S60 3.2
-        * @param aCmPluginBaseEng  The connection method object to use
-        */
-        static CmPluginWlanSettingsDlg* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-
-        /**
-        * Destructor.
-        */
-        ~CmPluginWlanSettingsDlg();
-    
-    public: // from base class
-    
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Create and launch dialog
-        *
-        * @since S60 3.2
-        * @return The code returned by the dialog's ExecuteLD
-        */
-        TInt ConstructAndRunLD( );
-    
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Updates bearer specific listbox contents
-        *
-        * @since S60 3.2
-        * @param aItemArray item array containing the setting texts
-        */
-        void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
-                
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-        
-    public: // from class CCmParentViewNotifier
-        
-        void NotifyParentView( TInt aValue );
-        
-    private:
-    
-        /**
-        * C++ constructor
-        *
-        * @since S60 3.2
-        */        
-        CmPluginWlanSettingsDlg( CCmPluginBaseEng& aCmPluginBaseEng );
-
-
-    protected:
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-        
-    private: // from base class
-    
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        void ProcessCommandL( TInt aCommandId ) ;    
-
-        // From CmPluginBaseSettingsDlg 
-        
-        /**
-        * From CmPluginBaseSettingsDlg 
-        * Determines which type of setting page should be shown
-        *
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId The command the attribute is changed with (ok/change key pressed)
-        * @return the soft key selection
-        */  
-        TBool ShowPopupSettingPageL ( TUint32 aAttribute, TInt aCommandId  );
-
-        /**
-        * From CmPluginBaseSettingsDlg 
-        * launches the advances settings dialog
-        *
-        * @since S60 3.2
-        */
-        virtual void RunAdvancedSettingsL();
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Get help contest of the plugin
-        *
-        * @since S60 5.0
-        */
-		virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-    private:  // New functions
-        
-        /**
-        * Shows the bool setting page for a certain setting or
-        * simply changes the setting if ok key was pressed
-        *
-        * @since S60 3.2
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId Command id, to make difference between ok and change commands
-        */  
-        void ChangeBoolSettingL( TUint32 aAttribute, TInt aCommandId );
-                
-        /**
-        * displays security setting page
-        *
-        * @since S60 3.2        
-        */  
-        void ShowSecurityModeRBPageL();    
-        
-        /**
-        * Shows network mode setting page
-        *
-        * @since S60 3.2
-        */  
-        void ShowNetworkModeRBPageL();
-        
-        /**
-        * Show the setting page for the WLAN Network Name settings
-        *
-        * @since S60 3.2
-        */
-        void ShowWlanNWNamePageL();
-        
-        /**
-        * Exits plugin settings if compulsory values are filled
-        *
-        * @since S60 3.2
-        * @param aConfirm ask user confirmation or not
-        */  
-        void ExitSettingsL( TBool aConfirm );
-        
-        void HandleCommsDatChangeL();
-    private:
-        TBool iSecDialExit;
-        
-        TInt iNotifyFromAdv;
-        
-    };
-
-
-/** WLAN Network name setting items - zero indexed for the ui */    
-enum TWlanNwName
-    {
-    EWlanNwNameUserDefined = 0, // radio button page commands
-    EWlanNwNameScan
-    };
-
-#endif // CMPLUGINWLAN_SETTINGS_DLG_H
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgadv.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +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:  declares dialog for wlan cm plugin advanced view/edit.
-*
-*/
-
-#ifndef CMPLUGINWLANADV_SETTINGS_DLG_ADV_H
-#define CMPLUGINWLANADV_SETTINGS_DLG_ADV_H
-
-// INCLUDES
-#include <in_sock.h>
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgadv.h>
-#include "cmcommsdatnotifier.h"
-
-// FORWARD DECLARATIONS
-class CCmPluginBaseEng;
-
-/**
- *  CmPluginWlanSettingsDlgAdv dialog class
- *
- *  shows the advanced WLAN settings
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginWlanSettingsDlgAdv ) : 
-                                            public CmPluginBaseSettingsDlgAdv ,
-                                            public MCmCommsDatWatcher ,
-                                            public CCmParentViewNotifier
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phase construction
-        *
-        * @since S60 v3.2
-        * @param aCmPluginBaseEng
-        */
-        static CmPluginWlanSettingsDlgAdv* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-        /**
-        * Destructor.
-        */
-        ~CmPluginWlanSettingsDlgAdv();
-
-    public: // from base class
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Create and launch dialog
-        *
-        * @since S60 v3.2
-        * @return The code returned by the dialog's ExecuteLD
-        */
-        TInt ConstructAndRunLD();
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Updates bearer specific listbox contents
-        *
-        * @since S60 v3.2
-        * @param aItemArray item array containing the setting texts
-        */
-        void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
-        
-    public:
-        
-        /**
-         * Record the object of parent view
-         */
-        void RegisterParentView( CCmParentViewNotifier* aParent );
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-        
-    public: // from class CCmParentViewNotifier
-        
-        void NotifyParentView( TInt aValue );
-
-    private: // construction
-    
-        /**
-        * C++ constructor
-        */
-        CmPluginWlanSettingsDlgAdv( CCmPluginBaseEng& aCmPluginBaseEng );
-        
-    protected:
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-
-    private: // From MEikCommandObserver
-
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        void ProcessCommandL( TInt aCommandId );
-
-    private: // From CmPluginBaseSettingsDlg 
-    
-        /**
-        * From CmPluginBaseSettingsDlg 
-        * Determines which type of setting page should be shown
-        *
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId The command the attribute is changed with (ok/change key pressed)
-        * @return the soft key selection
-        */   
-        TBool ShowPopupSettingPageL( TUint32 aAttribute, TInt aCommandId );
-
-        TBool ShowIpv4SettingPageL();
-        
-        TBool ShowIpv6SettingPageL();
-        
-        /**
-        * Shows a radio button page for selecting the ad-hoc channel setting value
-        * If 'User defined' is selected a numeric query dialog is displayed for entering the 
-        * channel number
-        * 
-        * @since S60 3.2
-        * @return ETrue if the setting value has been changed
-        */
-        TBool ShowAdhocChannelSettingPageL();
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the packet data specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        TBool UpdateListBoxContentBearerSpecificL( TUint32 aAttribute );
-        
-        void HandleCommsDatChangeL();
-                
-    private:  // data
-
-        /**
-        * IPv6 supported indicator
-        */
-        TBool iIpv6Supported;
-        
-        CCmParentViewNotifier* iParent;
-        TInt iNotifyFromIp;
-    };
-
-/** menu commands for IPv setting pages */
-enum TWlanIpvMenuCommands
-    {
-    ESettingPageCmdIpv4,
-    ESettingPageCmdIpv6
-    };
-
-/** Adhoc channel setting values */
-enum TAdhocChannel
-    {
-    EAdhocAutomatic = 0, //radio button page commands
-    EAdhocUserDefined
-    };
-
-#endif // CMPLUGINWLANADV_SETTINGS_DLG_ADV_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgipv4.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +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:  Declares dialog for wlan cm plugin ipv4 settings view/edit
-*
-*/
-
-#ifndef CMPLUGINWLANIPV4_SETTINGS_DLG_H
-#define CMPLUGINWLANIPV4_SETTINGS_DLG_H
-
-// INCLUDES
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgip.h>
-#include "cmcommsdatnotifier.h"
-
-// FORWARD DECLARATIONS
-class CCmPluginBaseEng;
-
-/**
- *  CmPluginWlanSettingsDlgIpv4 dialog class
- *
- *  shows settings for WLAN IPv4
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginWlanSettingsDlgIpv4 ) : 
-                                            public CmPluginBaseSettingsDlgIp ,
-                                            public MCmCommsDatWatcher
-    {
-    public: // Constructors and destructor
-    
-        /**
-        * Two-phase construction
-        * @since S60 v3.2
-        * @param aCmPluginBaseEng
-        */
-        static CmPluginWlanSettingsDlgIpv4* NewL(
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-
-        /**
-        * Destructor.
-        */
-        ~CmPluginWlanSettingsDlgIpv4();
-
-    public: // from base class
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Create and launch dialog
-        *
-        * @since S60 v3.2
-        * @return The code returned by the dialog's ExecuteLD
-        */
-        TInt ConstructAndRunLD();
-        
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Updates bearer specific listbox contents
-        *
-        * @since S60 v3.2
-        * @param aItemArray item array containing the setting texts
-        */
-        void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
-        
-    public:
-        
-        /**
-         * Record the object of parent view
-         */
-        void RegisterParentView( CCmParentViewNotifier* aParent );
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-
-    protected:
-    
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-
-    private: // construction
-        
-        /**
-        * C++ constructor
-        */
-        CmPluginWlanSettingsDlgIpv4( CCmPluginBaseEng& aCmPluginBaseEng );
-        
-    private: // From MEikCommandObserver
-
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        void ProcessCommandL( TInt aCommandId );
-        
-    private: // From CmPluginBaseSettingsDlg         
-
-        /**
-        * From CmPluginBaseSettingsDlg 
-        * Determines which type of setting page should be shown
-        *
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId The command the attribute is changed with (ok/change key pressed)
-        * @return the soft key selection
-        */ 
-        TBool ShowPopupSettingPageL ( TUint32 aAttribute, TInt aCommandId  );
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the packet data specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        TBool UpdateListBoxContentBearerSpecificL( TUint32 aAttribute );
-        
-    private:  // New functions
-
-        /**
-        * Checks the temp attributes, saves them if necessary,
-        * prompts user if there are incomplete values 
-        *
-        * @since S60 v3.2
-        * @return ETrue if success
-        */
-        TBool ValidateAttribsL();
-        
-        /**
-        * Text intialisation
-        *
-        * @since S60 v3.2
-        */
-        void InitTextsL();
-        
-    private:
-        
-        CCmParentViewNotifier* iParent;
-    };
-
-#endif // CMPLUGINWLANIPV4_SETTINGS_DLG_ADV_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlgipv6.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declares dialog for wlan cm plugin ipv6 settings view/edit
-*
-*/
-
-#ifndef CMPLUGINWLANIPV6_SETTINGS_DLG_H
-#define CMPLUGINWLANIPV6_SETTINGS_DLG_H
-
-// INCLUDES
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlgip.h>
-#include "cmcommsdatnotifier.h"
-
-// FORWARD DECLARATIONS
-class CCmPluginBaseEng;
-
-/**
- *  CmPluginWlanSettingsDlgIpv6 dialog class
- *
- *  shows settings for WLAN IPv6
- *
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS( CmPluginWlanSettingsDlgIpv6 ) : 
-                                            public CmPluginBaseSettingsDlgIp ,
-                                            public MCmCommsDatWatcher
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Two-phase construction.
-        * @param aCmPluginBaseEng  wlan plugin to edit
-        */
-        static CmPluginWlanSettingsDlgIpv6* NewL( 
-                                        CCmPluginBaseEng& aCmPluginBaseEng );
-
-        /**
-        * Destructor.
-        */
-        ~CmPluginWlanSettingsDlgIpv6();
-        
-    public: // from base class
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Create and launch dialog
-        *
-        * @since S60 v3.2
-        * @return The code returned by the dialog's ExecuteLD
-        */
-        TInt ConstructAndRunLD();
-
-    public: // From CmPluginBaseSettingsDlg
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Updates bearer specific listbox contents
-        *
-        * @since S60 v3.2
-        * @param aItemArray item array containing the setting texts
-        */
-        void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
-        
-    public:
-        
-        /**
-         * Record the object of parent view
-         */
-        void RegisterParentView( CCmParentViewNotifier* aParent );
-        
-    public: // from class MCmCommsDatWatcher
-        
-        /**
-         * Watch changes in CommsDat
-         */
-        void CommsDatChangesL();
-
-    protected:
-    
-        /** From CAknDialog */
-        TBool OkToExitL( TInt aButtonId );
-                
-    private: // construction
-    
-        CmPluginWlanSettingsDlgIpv6( CCmPluginBaseEng& aCmPluginBaseEng );
-
-    private: // From MEikCommandObserver
-
-        /**
-        * From MEikCommandObserver
-        * see base class for description
-        *
-        * @since S60 3.2
-        * @param aCommandId
-        */
-        void ProcessCommandL( TInt aCommandId );
-
-    private: // From CmPluginBaseSettingsDlg
-
-        /**
-        * From CmPluginBaseSettingsDlg 
-        * Determines which type of setting page should be shown
-        *
-        * @param aAttribute The setting to be changed by the setting page
-        * @param aCommandId The command the attribute is changed with (ok/change key pressed)
-        * @return the soft key selection
-        */ 
-        TBool ShowPopupSettingPageL ( TUint32 aAttribute, TInt aCommandId );
-
-        /**
-        * From CmPluginBaseSettingsDlg
-        * Collects the packet data specific setting information for 
-        * displaying
-        *
-        * @since S60 3.2
-        * @param aItemArray an array of setting information
-        */
-        TBool UpdateListBoxContentBearerSpecificL( TUint32 aAttribute );
-        
-    private: // new functions
-    
-        /**
-        * Text intialisation
-        *
-        * @since S60 v3.2
-        */
-        void InitTextsL();
-        
-    private:
-        
-        CCmParentViewNotifier* iParent;
-        
-        TBool iIspossibleExit;
-        TBool iExitImediate;
-    };
-
-/** IPv6 types */
-enum TIpv6DNSTypes
-    {
-    EIpv6DNSDynamic = 0, //radio button page commands
-    EIpv6DNSWellKnown,
-    EIpv6DNSUserDefined
-    };
-
-
-#endif // CMPLUGINWLANIPV6_SETTINGS_DLG_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmwlancommonconstants.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:  commonly used constants for the WLAN plugin
-*
-*/
-
-#ifndef CMWLANCOMMONCONSTANTS_H
-#define CMWLANCOMMONCONSTANTS_H
-
-// CONSTANTS
-_LIT( KPluginWlanResDirAndFileName, "z:cmwlanui.rsc" );
-_LIT( KEmptyAddress, "http://" );
-
-/// 'Dynamic' IP address to use in comparisons
-_LIT( KDynIpAddress, "0.0.0.0" );
-
-_LIT( KDynIpv6Address, "0:0:0:0:0:0:0:0" );
-
-const TInt KCmArrayGranularity = 10;
-const TInt KCmAdhocChannelMaxLength = 2;
-const TInt KCmAdhocChannelMinValue = 1;
-const TInt KCmAdhocChannelDefaultValue = 7;
-const TInt KCmAdhocChannelMaxValue = 11;
-const TInt KCmWlanNWNameMaxLength = 32;
-
-#endif  // CMWLANCOMMONCONSTANTS_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmwlancoveragecheck.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +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:  Declaration of WLAN Coverage Check class
-*
-*/
-
-#ifndef CMWLANCOVERAGECHECK_H
-#define CMWLANCOVERAGECHECK_H
-
-// INCLUDES
-#include <e32base.h>
-#include <cmpluginwlandef.h>
-
-
-// FORWARD DECLARATION
-class CCmPluginWlanDataArray;
- 
-using namespace CMManager;
-
-/**
- *  WLAN Coverage Check
- *
- *  ?more_complete_description
- *
- *  @since S60 3.2
- */
-class CCmWlanCoverageCheck : public CActive
-    {
-    enum EWlanCoverageState
-        {
-        EServiceStatus,
-        EScanning,
-        EDone,                        
-        };
-        
-    public:
-    
-        CCmWlanCoverageCheck();
-        ~CCmWlanCoverageCheck();
-        
-        TInt GetCoverageL();
-
-        TBool ScanForPromptedSsidL( TWlanSsid aEnteredSsid, TBool aBroadcast,
-                                TWlanNetMode& aNetworkMode,
-                                TWlanConnectionExtentedSecurityMode& aSecurityMode,
-                                TBool& aProtectedSetupSupported );
-
-        /**
-        * Returns whether the passed ssid and length results in a hidden or 
-        * a non-hidden ssid.
-        *
-        * @since S60 3.2
-        * @param aSsidLength The length of the ssid
-        * @param aSsid The ssid
-        * @return ETrue if the ssid is hidden.
-        */
-        TBool IsHiddenSsid( TUint aSsidLength, const TUint8* aSsid ) const;
-        
-        /**
-        * Adds the passed WLAN network data to the container array
-        * if it is not already there, and sets the highest signal 
-        * strength if it is already in the array.
-        *
-        * @since S60 3.2
-        * @param aArray The array to be checked
-        * @param aRXLevel The signal level of this WLAN
-        * @param aNetworkName The network name (SSID) of this WLAN.
-        */
-        void AddToArrayIfNeededL( 
-                            CCmPluginWlanDataArray& aArray, 
-                            TInt aRXLevel, 
-                            TDesC& aNetworkName ) const;
-                
-                
-    protected:  // from CActive
-    
-        virtual void DoCancel();
-        virtual void RunL();
-
-    private:
-
-        TUint32                 iProgState;
-        TInt                    iCoverage;
-        CActiveSchedulerWait    iWait;    
-    };
-
-
-#endif // CMWLANCOVERAGECHECK_H
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/loc/cmpluginwlan.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,389 +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:  Localization strings for project cmpluginwlan
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-//d: Name of wlan bearer type shown in a list of supported bearers.
-//l: list_single_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_supported_wlan "Wireless LAN"
-
-//d: First line of a double large graphic style listbox - wlan specific
-//l: list_double_large_graphic_pane_t1_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_bearer_available_wlan "Wireless LAN"
-
-//d: Second line of a double large graphic style listbox - wlan specific
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_one_wlan_nw_available "1 network available"
-
-//d: Second line of a double large graphic style listbox - wlan specific
-//l: list_double_large_graphic_pane_t2_cp2
-//w: 
-//r: 3.2
-//
-#define qtn_netw_conset_many_wlan_nw_available "%N networks available"
-
-// Setting list items
-
-//d:Item text in setting list. "The WLAN network name"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_name "WLAN network name"
-
-
-//d: Text shown in a text query dialog for the WLAN network name setting
-//d: user defined value
-//l: heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_prmpt_network_name "WLAN network name:"
-
-//d:Item text in setting list "Network status"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_hidden_network "Network status"
-
-//d:Item text in setting list "WLAN network mode"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_mode "WLAN network mode"
-
-//d:Item text in setting list "WLAN security mode"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode "WLAN security mode"
-
-//d:Item text in setting list "WLAN security settings"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_settings "WLAN security settings"
-
-// Setting list options and/or default values
-
-//d:Defines if the WLAN network name (SSID) is not hidden
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_hidden_network_no "Public"
-
-//d:Defines if the WLAN network name (SSID) is  hidden (Default)
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_hidden_network_yes "Hidden"
-
-//d:Default value for WLAN network mode
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_mode_infra "Infrastructure"
-
-//d: Title of the Network mode dialog
-//d: in the manual configuration of a new WLAN connection method
-//l: heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_prmpt_wlan_nw_mode_and_status "Network mode and status:"
-
-//d:Network mode selection list, sets the network mode setting 
-//d:to 'infrastructure' and network status to 'Public'
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_wlan_network_mode_infra_public "Infrastructure (public)"
-
-//d:Network mode selection list, sets the network mode setting 
-//d:to 'infrastructure' and network status to 'hidden'
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_wlan_network_mode_infra_hidden "Infrastructure (hidden)"
-
-//d:Network mode selection list, sets the network mode setting 
-//d:to 'Ad-hoc' and network status to 'Public'
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_wlan_network_mode_adhoc_public "Ad-hoc (public)"
-
-//d:Network mode selection list, sets the network mode setting 
-//d:to 'Ad-hoc' and network status to 'Hidden'
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_wlan_network_mode_adhoc_hidden "Ad-hoc (hidden)"
-
-//d:Default value for WLAN security mode
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode_open "Open network"
-
-//d:Security settings mode "WEP"
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode_wep "WEP"
-
-//d:Security settings mode "802.1x"
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode_802_1x "802.1x"
-
-//d:Security settings mode "WPA/WPA2"
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode_wpa "WPA/WPA2"
-
-//d:Security settings mode "WAPI"
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_security_mode_wapi "WAPI"
-
-//d: Title of the Security Mode selection dialog
-//d: in the manual configuration of a new WLAN connection method
-//l: heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_prmpt_wlan_nw_security_mode "Security Mode:"
-
-//d:Default value for WLAN security mode
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wlan_security_mode_open "Open network"
-
-//d:Security settings mode "WEP"
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wlan_security_mode_wep "WEP"
-
-//d:Security settings mode "802.1x"
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wlan_security_mode_802_1x "802.1x"
-
-//d:Security settings mode "WPA/WPA2"
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wlan_security_mode_wpa "WPA/WPA2"
-
-//d: Title of the WPA/WPA2 mode selection dialog in the manual
-//d: configuration of a new WLAN connection method
-//l: heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_prmpt_wlan_wpa_mode "WPA/WPA2 mode:"
-
-//d:EAP item in the WPA/WPA2 mode selection dialog
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_prmpt_wpa_mode_eap "EAP"
-
-//d:Pre-shared item item in the WPA/WPA2 mode selection dialog
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_prmpt_wpa_mode_psk "Pre-shared key"
-
-//d: Note to indicate to user that the default EAP values have
-//d: been set and advanced values can be edited in the 
-//d: security settings of the connection method
-//l: popup_note_window
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_info_eap_settings_default "Default EAP values set. Configure advanced settings by editing the method."
-
-//d:Specifies that the WLAN network name is user defined
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_name_user_defined "User defined"
-
-
-//d:Specifies that the WLAN network name is selected from a scanned list
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_name_scan "Scan for networks"
-
-
-//d:Specifies that the network mode is Ad-hoc
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_network_mode_adhoc "Ad-hoc"
-
-//d:Setting item text for Ad-hoc channel.
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_adhoc_channel "Ad-hoc channel"
-
-//d:Title in a numeric query dialog for the ad-hoc channel setting value
-//l: popup_query_data_window
-//w:
-//r:3.2
-//
-#define qtn_wlan_prmpt_adhoc_channel "Ad-hoc channel:"
-
-//d:Defines the ad-hoc channel to be automatic
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_adhoc_channel_automatic "Automatic"
-
-
-//d:Defines the ad-hoc channel to be user defined
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_adhoc_channel_user_defined "User defined"
-
-//d: wlan plugin info note text shown when user tries to edit
-//d: security settings for open network
-//l: popup_note_window
-//w: 
-//r: 3.2
-//
-#define qtn_wlan_info_no_security_settings "No security settings for ’Open network’"
-
-//d: Data bearer of the highlighted connection method.
-//l: popup_preview_text_window_t1
-//w:
-//r: 3.2
-#define qtn_netw_conset_popup_bearer_wlan "Wireless LAN"
-
-//d: Connection method settings query text 
-//d: displayed when network name is not defined 
-//d: and user presses 'back' from settings view 
-//l: popup_note_window
-//w:
-//r: 3.2
-//
-#define qtn_wlan_quest_nw_name_not_defined "Incomplete details. WLAN network name must be defined. Delete access point?"
-
-//d: Connection method settings query text 
-//d: displayed when security settings are empty 
-//d: and user presses 'back' from settings view 
-//l: popup_note_window
-//w:
-//r: 3.2
-//
-#define qtn_wlan_quest_security_settings_empty "Security settings for the selected security mode are incomplete. Delete access point?"
-
-//d: Name of the data bearer used when accessing external network.
-//l: list_set_graphic_pane_t1
-//w:
-//r: 3.2
-#define qtn_wlan_sett_bearer_wlan "Wireless LAN"
-
-
-//d:Item text in setting list "WLAN base station selection"
-//l:list_setting_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_ssid_roaming "WLAN base station selection"
-
-
-//d:Value for WLAN base station selection, allows roaming
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_ssid_roaming_enabled "Roam to best"
-
-
-//d:Value for WLAN base station selection, disallows roaming
-//l:list_set_graphic_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_wlan_sett_ssid_roaming_disabled "Stay in first"
-
-
-//d:Wait note during scanning of wlan networks
-//l:popup_note_wait_window
-//w:
-//r:3.2
-//
-#define qtn_wlan_wait_searching_networks         "Searching WLAN networks"
-
-
-//d:"Search for WLAN" - information note
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_wlan_info_no_networks_found         "No WLAN networks found"
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlan.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2853 +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:  Implementation of WLAN Plugin interface implementation 
-*                for WLAN Bearer
-*
-*/
-
-
-#include <commdb.h>
-#include <ecom/ecom.h>		// For REComSession
-#include <f32file.h>    // for TParse
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <ConnectionUiUtilities.h>
-
-#include <cmpluginbaseeng.h>
-#include <cmpluginlanbase.h>
-#include <mcmdexec.h>
-#include <cmpbasesettingsdlg.h>
-#include <cmpluginwlan.mbg>
-#include <cmwlanui.rsg>
-#include <cmmanager.rsg>
-#include <cmcommonui.h>
-#include <wlancontainer.h>
-
-#include <WEPSecuritySettingsUI.h>
-#include <WPASecuritySettingsUI.h>
-#include <featmgr.h>
-#include <ConeResLoader.h>
-#include <AknWaitDialog.h>
-#include <uikon/eiksrvui.h>
-#include <AknGlobalNote.h>
-
-#include "cmwlancommonconstants.h"
-#include "cmpluginwlan.h"
-#include "cmwlancoveragecheck.h"
-#include "cmlogger.h"
-#include "cmpwlansettingsdlg.h"
-#include <cmpluginwlandef.h>
-#include <cmcommonconstants.h>
-#include "cmmanagerimpl.h"
-#include "cmpwlanactivewaiter.h"
-
-#include <wifiprotuiinprocess.h>
-#include <utf.h>
-
-using namespace CMManager;
-
-#include "wapisecuritysettingsui.h"
-
-// CONSTANTS
-const TUint32 KDefaultPriorityWLan = 0;
-
-const TInt KWlanSingleNetwork = 1; // Number of WLAN networks is 1
-const TInt KWlanMaxKeyLength = 64;
-const TInt KWlanLastSocketActivityTimeout = -1;
-const TInt KWlanLastSessionClosedTimeout = 1;
-const TInt KWlanLastSocketClosedTimeout = -1;
-const TUint32 KEndOfArray = KMaxTUint;
-
-// Daemon manager name for Easy WLAN IAP
-_LIT( KHotspotDaemonManagerName, "NetCfgExtnHotSpot" );
-_LIT( KEasyWlanName, "Easy WLAN" );
-
-// Modem bearer names for WLAN connection methods
-_LIT( KModemBearerWLAN, "WLANBearer" );
-
-_LIT( KWlanFileIcons, "z:cmpluginwlan.mbm" );
-_LIT( KWlanBearerName, "WLANBearer" );
-_LIT( KWlanBearerAgent, "wlanagt.agt" );
-_LIT( KWlanBearerNif, "wlannif" );
-
-_LIT( KWlanLDDName, "not used" );
-_LIT( KWlanPDDName, "not used" );
-
-static const TCmAttribConvTable SWlanConvTbl[] = 
-    {
-    // iAttribId, iCommsDatId, iValidFuncL, 
-    // iTitleId, 
-    // iMaxLength, iAttribFlags, iDefValueResId, iEditorResId, iNotUsed1, iNotUsed2
-    { EWlanServiceId,           EWlanRangeMax,          NULL },        
-    { EWlanServiceId,           KCDTIdWlanServiceId,    NULL },
-    { EWlanConnectionMode,      KCDTIdWlanConnMode,     NULL,
-      R_QTN_WLAN_SETT_NETWORK_MODE,
-       },
-    { EWlanSSID,                KCDTIdWlanSSID,         NULL,
-      R_QTN_WLAN_SETT_NETWORK_NAME,
-      KCmWlanNWNameMaxLength, EConvCompulsory | EConvNoZeroLength, R_QTN_SELEC_SETTING_COMPULSORY, R_TEXT_SETTING_PAGE_NETW_NAME, NULL, NULL },
-    { EWlanUsedSSID,            KCDTIdWlanUsedSSID,     NULL },
-    { EWlanSecurityMode,        KCDTIdWlanSecMode,      NULL,
-      R_QTN_WLAN_SETT_SECURITY_MODE,
-      0, 0, 0, 0, NULL, NULL },
-    { EWlanAuthenticationMode,  KCDTIdWlanAuthMode,     NULL },
-    { EWlanScanSSID,            KCDTIdWlanScanSSID,     NULL,
-      R_QTN_WLAN_SETT_HIDDEN_NETWORK,
-      0, 0, 0, 0, NULL, NULL },
-    { EWlanChannelID,           KCDTIdWlanChannelID,    NULL,
-      R_QTN_WLAN_SETT_ADHOC_CHANNEL,
-      KCmAdhocChannelMaxLength, EConvNumber, R_QTN_WLAN_SETT_ADHOC_CHANNEL_AUTOMATIC, 0, NULL, NULL },   
-    { EWlanAllowSSIDRoaming,  KCDTIdWlanAllowSSIDRoaming,     NULL, 
-      R_QTN_WLAN_SETT_SSID_ROAMING,
-      0, 0, 0, 0, NULL, NULL },
-    { 0,0 }
-    };
-
-
-static const TCmCommonAttrConvArrayItem SCommonConvTbl[] =
-{
-    { EWlanIfNetworks, ECmIFNetworks },
-    { EWlanIpNetMask, ECmIPNetmask },
-    { EWlanIpGateway, ECmIPGateway },
-    { EWlanIpAddrFromServer, ECmIPAddFromServer },
-    { EWlanIpAddr, ECmIPAddress },
-    { EWlanIpDNSAddrFromServer, ECmIPDNSAddrFromServer },
-    { EWlanIpNameServer1, ECmIPNameServer1 },
-    { EWlanIpNameServer2, ECmIPNameServer2 },
-    { EWlanIp6DNSAddrFromServer, ECmIP6DNSAddrFromServer },
-    { EWlanIp6NameServer1, ECmIP6NameServer1 },
-    { EWlanIp6NameServer2, ECmIP6NameServer2 },
-    { EWlanIpAddrLeaseValidFrom, ECmIPAddrLeaseValidFrom },
-    { EWlanIpAddrLeaseValidTo, ECmIPAddrLeaseValidTo },
-    { EWlanConfigDaemonManagerName, ECmConfigDaemonManagerName },
-    { EWlanConfigDaemonName, ECmConfigDaemonName },
-    { 0, 0 }
-    };
-
-
-/**
- * struct for security mode conversion table
- */
-typedef struct
-    {
-    TUint32 iSecurityMode;
-    TUint32 iNWModeSelectionDlgIndex;
-    TUint32 iRBSettingPageIndex;
-    TUint32 iResId;
-    } TCmSecurityModeConvTable;
-
-/**
- * Conversion table for the correct positioning of WLAN security types 
- * in WLAN UI components
- */  
-const TCmSecurityModeConvTable KWlanSecurityModeConvTable[] =
-    {                              
-        { EWlanSecModeOpen,   0, 0, R_QTN_NETW_CONSET_WLAN_SECURITY_MODE_OPEN   },
-        { EWlanSecModeWep,    1, 1, R_QTN_NETW_CONSET_WLAN_SECURITY_MODE_WEP    },
-        { EWlanSecMode802_1x, 2, 2, R_QTN_NETW_CONSET_WLAN_SECURITY_MODE_802_1X },
-        { EWlanSecModeWpa,    3, 3, R_QTN_NETW_CONSET_WLAN_SECURITY_MODE_WPA    },
-     // { EWlanSecModeWpa2,   3, 3, R_QTN_NETW_CONSET_WLAN_SECURITY_MODE_WPA2   },
-        { EWlanSecModeWAPI,   4, 4, R_QTN_WLAN_SETT_SECURITY_MODE_WAPI   },
-        { KEndOfArray, KEndOfArray, KEndOfArray, KEndOfArray }
-    };
-
-/**
- * struct for the network mode conversion table
- */
-typedef struct
-    {
-    TUint32 iNwMode;
-    TBool   iHidden;
-    TUint32 iResId;
-    } TCmNetworkModeConvTable;
-
-/**
- * Conversion table for the correct positioning of WLAN network modes
- */
-const TCmNetworkModeConvTable KWlanNetworkModeConvTable[] =
-    {
-        { EInfra, EFalse, R_QTN_WLAN_NETWORK_MODE_INFRA_PUBLIC }, // Infrastructure (public)
-        { EInfra, ETrue,  R_QTN_WLAN_NETWORK_MODE_INFRA_HIDDEN }, // Infrastructure (hidden)
-        { EAdhoc, EFalse, R_QTN_WLAN_NETWORK_MODE_ADHOC_PUBLIC }, // Ad-hoc (public)
-//        { EAdhoc, ETrue,  R_QTN_WLAN_NETWORK_MODE_ADHOC_HIDDEN }, // Ad-hoc (hidden)
-        { KEndOfArray, EFalse, KEndOfArray }
-    };
-
-// ======================= MEMBER FUNCTIONS =================================
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::NewL
-// --------------------------------------------------------------------------
-//
-CCmPluginWlan* CCmPluginWlan::NewL( TCmPluginInitParam* aInitParam )
-    {
-    if ( !FeatureSupported( KFeatureIdProtocolWlan ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-        
-    CCmPluginWlan* self = new( ELeave ) CCmPluginWlan( aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::~CCmPluginWlan
-// --------------------------------------------------------------------------
-//
-CCmPluginWlan::~CCmPluginWlan()
-    {
-    AdditionalReset();
-    DestroyWaitDialog();
-    RemoveResourceFile( KPluginWlanResDirAndFileName );    
-    delete iConnUiUtils; iConnUiUtils = NULL;
-    
-    iAdditionalCmsCreated.Close();
-
-    CLOG_CLOSE;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CreateInstanceL
-// --------------------------------------------------------------------------
-//
-CCmPluginBaseEng* CCmPluginWlan::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
-    {
-    CCmPluginWlan* self = new( ELeave ) CCmPluginWlan( &aInitParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CCmPluginWlan
-// --------------------------------------------------------------------------
-//
-CCmPluginWlan::CCmPluginWlan( TCmPluginInitParam* aInitParam )
-    : CCmPluginLanBase( aInitParam )
-    {
-    CLOG_CREATE;
-    iWlanTableId = 0;
-    iBearerType = KUidWlanBearerType;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ConstructL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::ConstructL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ConstructL" );
-    
-    CCmPluginLanBase::ConstructL();
-
-    iBearerRecName = KModemBearerWLAN;
-    
-    // get WLAN table id
-    TRAP_IGNORE( iWlanTableId = CCDWlanServiceRecord::TableIdL( Session() ) );
-
-    if( !iWlanTableId )
-        {
-        iWlanTableId = CCDWlanServiceRecord::CreateTableL( Session() );
-
-        TMDBElementId tableId = 0;
-
-        TRAP_IGNORE( tableId = CCDWlanDeviceSettingsRecord::TableIdL( Session() ) );
-        if( !tableId )
-            {
-            CCDWlanDeviceSettingsRecord::CreateTableL( Session() );
-            }
-        
-        TRAP_IGNORE( tableId = CCDWLANSecSSIDTable::TableIdL( Session() ) );
-        if( !tableId )
-            {
-            CCDWLANSecSSIDTable::CreateTableL( Session() );
-            }
-
-        TRAP_IGNORE( tableId = CCDDestNWTable::TableIdL( Session() ) );
-        if( !tableId )
-            {
-            CCDDestNWTable::CreateTableL( Session() );
-            }
-        }
-
-    AddResourceFileL( KPluginWlanResDirAndFileName );
-    
-    AddConverstionTableL( ( CCDRecordBase** )&iWlanServiceRecord, 
-                            NULL, 
-                            SWlanConvTbl );
-    AddCommonConversionTableL( SCommonConvTbl );
-    
-    iIsWAPISupported = FeatureManager::FeatureSupported( KFeatureIdFfWlanWapi );
-    }
-    
-	
-// --------------------------------------------------------------------------
-// CCmPluginWlan::GetIntAttributeL
-// --------------------------------------------------------------------------
-//
-TUint32 CCmPluginWlan::GetIntAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::GetIntAttributeL" );
-    
-    TInt retval;
-    switch ( aAttribute )
-        {
-        case ECmExtensionLevel:
-            {
-    	    retval = CCmPluginLanBase::GetIntAttributeL( aAttribute );
-    	    retval++;
-            break;
-            }        
-        case ECmBearerIcon:
-            {
-            TAknsItemID id;
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KWlanFileIcons, 
-                                &KDC_BITMAP_DIR,
-                                NULL ) );
-
-            // default - WLAN icon
-            TInt icon = EMbmCmpluginwlanQgn_prop_wlan_bearer;
-            TInt mask = EMbmCmpluginwlanQgn_prop_wlan_bearer_mask;
-            
-            // Easy WLAN icon
-            TUint32 easyWlanId = iCmMgr.EasyWlanIdL();
-            if ( easyWlanId && GetIntAttributeL( ECmId ) == easyWlanId )
-                {
-                icon = EMbmCmpluginwlanQgn_prop_set_conn_wlan_easy;
-                mask = EMbmCmpluginwlanQgn_prop_set_conn_wlan_easy_mask;
-                }
-            
-            retval = (TUint32)AknsUtils::CreateGulIconL( 
-                                skinInstance, 
-                                id,
-                                mbmFile.FullName(), 
-                                icon, 
-                                mask );
-            break;
-            }  
-        case ECmBearerAvailableIcon:
-            {
-            TAknsItemID id;
-            MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-                   
-            TParse mbmFile;
-            User::LeaveIfError( mbmFile.Set( KWlanFileIcons, 
-                                &KDC_BITMAP_DIR,
-                                NULL ) );
-
-            retval = (TUint32)AknsUtils::CreateGulIconL( 
-                                skinInstance, 
-                                id,
-                                mbmFile.FullName(), 
-                                EMbmCmpluginwlanQgn_prop_set_conn_bearer_avail_wlan, 
-                                EMbmCmpluginwlanQgn_prop_set_conn_bearer_avail_wlan_mask );
-            break;
-            }
-        case ECmCommsDBBearerType:
-            {
-            retval = KCommDbBearerWLAN;
-            break;
-            }
-            
-        case ECmDefaultUiPriority:
-            {
-            retval = GlobalUiBearerPriority( TPtrC(KCDTypeNameWLANServiceExt) );
-            
-            if( retval == KDataMobilitySelectionPolicyPriorityWildCard )
-                {
-                retval = KDefaultPriorityWLan;
-                }
-            }
-            break;
-        case ECmDefaultPriority:
-            {
-            retval = GlobalBearerPriority( TPtrC(KCDTypeNameWLANServiceExt) );
-            
-            if( retval == KDataMobilitySelectionPolicyPriorityWildCard )
-                {
-                retval = KDefaultPriorityWLan;
-                }
-            }
-            break;
-        case EWlanServiceId:
-            {
-            if ( iWlanServiceRecord )
-                {
-                retval = iWlanServiceRecord->RecordId();
-                break;
-                }
-            }
-        default:
-            {
-    	    retval = CCmPluginBaseEng::GetIntAttributeL( aAttribute );
-            break;
-            }
-        }
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::GetBoolAttributeL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::GetBoolAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::GetBoolAttributeL" );
-    
-    TBool retval( EFalse );
-
-    switch ( aAttribute )
-        {
-        case ECmCoverage:
-            {
-#ifndef __WINS__
-            TInt& networks = CONST_CAST( TInt&, iWlanNetworks );
-            networks = 0;
-
-            networks = CheckNetworkCoverageL();
-            
-            // If there's at least one WLAN network around, then there IS
-            // coverage.
-            retval = ( networks ? ETrue : EFalse );
-#else
-
-            TInt& networks = CONST_CAST( TInt&, iWlanNetworks );
-            ////networks = 0;
-            ////retval = EFalse;
-
-            networks = 1;
-            retval = ETrue;
-
-
-
-#endif
-            }
-            break;
-
-        case ECmAddToAvailableList:
-            {
-            retval = ETrue;
-            }
-            break;
-            
-        case ECmBearerHasUi:
-            {
-            retval = ETrue;
-            }
-            break;
-            
-        default:
-            {
-            retval = CCmPluginBaseEng::GetBoolAttributeL( aAttribute );
-            break;
-            }
-        }
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::GetStringAttributeL
-// --------------------------------------------------------------------------
-//
-HBufC* CCmPluginWlan::GetStringAttributeL( const TUint32 aAttribute ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::GetStringAttributeL" );
-
-	HBufC* retVal = NULL;
-	
-	switch( aAttribute )
-	    {
-	    case ECmBearerAvailableName:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_BEARER_AVAILABLE_WLAN );
-	        }
-	        break;
-	        
-        case ECmBearerAvailableText:
-            {
-            if ( CEikonEnv::Static() )
-                {
-                if ( iWlanNetworks == KWlanSingleNetwork )
-                    {
-                    retVal = AllocReadL( 
-                                    R_QTN_NETW_CONSET_ONE_WLAN_NW_AVAILABLE );
-                    }
-                else
-                    {
-                    retVal = ReadResourceL( 
-                                    R_QTN_NETW_CONSET_MANY_WLAN_NW_AVAILABLE,
-                                    iWlanNetworks );
-                    }
-                }
-            else
-                {   // ReadResourceL does not work without a valid EikonEnv, so
-                    // to have a consistent behaviour when there is one or more
-                    // wlan networks for ECmBearerAvailableText, we always 
-                    // leave when called without valid EikonEnv
-                User::Leave( KErrNotSupported );
-                }
-            }
-            break;
-
-	    case ECmBearerSupportedName:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_BEARER_SUPPORTED_WLAN );
-	        }
-	        break;
-	        
-	    case ECmBearerNamePopupNote:
-	        {
-	        retVal = AllocReadL( R_QTN_NETW_CONSET_POPUP_BEARER_WLAN );
-	        }
-	        break;
-	        
-	    case ECmBearerSettingName:
-	        {
-	        retVal = AllocReadL( R_QTN_WLAN_SETT_BEARER_WLAN );
-	        }
-	        break;
-
-	    default:
-	        {
-	        retVal = CCmPluginBaseEng::GetStringAttributeL( aAttribute );
-	        }
-	        break;
-	    }	    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SetIntAttributeL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::SetIntAttributeL( const TUint32 aAttribute, 
-                                            TUint32 aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetIntAttributeL" );
-
-    CCmPluginBaseEng::SetIntAttributeL( aAttribute, aValue );
-    if ( aAttribute == EWlanSecurityMode )
-        {
-        UpdateSecurityModeL();
-        }
-    }
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SetBoolAttributeL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::SetBoolAttributeL( const TUint32 aAttribute, 
-                                             TBool aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetBoolAttributeL" );
-    
-    CCmPluginBaseEng::SetBoolAttributeL( aAttribute, aValue );
-    }
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SetStringAttributeL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::SetStringAttributeL( const TUint32 aAttribute, 
-                                               const TDesC16& aValue )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetStringAttributeL" );
-        
-    switch( aAttribute )
-        {
-        case ECmName:
-            {
-            CCmPluginLanBase::SetStringAttributeL( aAttribute, aValue );
-            break;
-            }
-        case EWlanIpNameServer1:
-        case EWlanIpNameServer2:
-            {
-            // when setting nameservers, must set EWlanIpDNSAddrFromServer
-            // according to current nameserver settings
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            break;
-            }
-        case EWlanIp6NameServer1:
-        case EWlanIp6NameServer2:
-            {
-            // when setting nameservers, must set EWlanIpDNSAddrFromServer
-            // according to current nameserver settings
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            break;
-            }
-        default:
-            {
-            CCmPluginBaseEng::SetStringAttributeL( aAttribute, aValue );
-            break;
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::UpdateAdditionalRecordsL
-// --------------------------------------------------------------------------
-//     
-void CCmPluginWlan::UpdateAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::UpdateAdditionalRecordsL" );
-    
-    CheckIfNameModifiedL( iWlanServiceRecord );
-
-    iWlanServiceRecord->iWlanServiceId.SetL( iIapRecord->iService );
-    
-    if ( !iWlanServiceRecord->RecordId() )
-        {
-        iWlanServiceRecord->SetRecordId( KCDNewRecordRequest );
-        iWlanServiceRecord->StoreL( Session() );
-        }
-    else
-        {
-        iWlanServiceRecord->ModifyL( Session() );
-        }
-    UpdateSecuritySettingsL();        
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CanHandleIapIdL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::CanHandleIapIdL( TUint32 aIapId ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::CanHandleIapIdL1" );
-    CLOG_WRITE_1( "IapId: [%d]", aIapId );
-    
-    TBool retVal( EFalse );
-    
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
-                        ( CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord) );
-        
-    CleanupStack::PushL( iapRecord );
-    iapRecord->SetRecordId( aIapId );
-    
-    TRAPD( err, iapRecord->LoadL( Session() ) );
-
-    if( !err )
-        {
-        CanHandleIapIdL( iapRecord );
-        }
-    
-    CleanupStack::PopAndDestroy( iapRecord );
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CanHandleIapIdL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::CanHandleIapIdL2" );
-
-    CLOG_WRITE_1( "IapId: [%d]", aIapRecord->RecordId() );
-   
-    
-    TBool retVal( EFalse );
-    
-    CLOG_WRITE_2( "IAP record: [%S][%S]",
-                    &FIELD_TO_TDESC( aIapRecord->iServiceType ),
-                    &FIELD_TO_TDESC( aIapRecord->iBearerType ) 
-                );
-    
-    if( (TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameLANService) ) &&
-        TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameLANBearer) )
-        {
-        // check if there is a WLAN record with 
-        // an iServiceId == iIapRecord->iService;
-        CCDWlanServiceRecord* tmprec = new ( ELeave ) 
-                                       CCDWlanServiceRecord ( iWlanTableId );
-        CleanupStack::PushL( tmprec );
-
-        TInt service = aIapRecord->iService;
-        
-        tmprec->iWlanServiceId.SetL( (TUint32)service );
-        if ( tmprec->FindL( Session() ) )
-            {
-            // we found at least one WLAN using this IAP, 
-            retVal = ETrue;
-            tmprec->LoadL( Session() );
-            CLOG_WRITE( "I can." );
-            }
-        else
-            {
-            // not found -> not our
-            CLOG_WRITE_1( "Wlan with Service ID: [%d] NOT found ", 
-                          service );
-            }
-        CleanupStack::PopAndDestroy(tmprec);        
-        }
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::DeleteAdditionalRecordsL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::DeleteAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::DeleteAdditionalRecordsL" );    
-    
-    // as base class deletes service record, in this case LAN, 
-    // only WLAN related stuff needs to be deleted
-    // also security settings, too!
-    DeleteSecuritySettingsL();
-    iWlanServiceRecord->DeleteL( Session() );
-    }      
-    
-        
-// --------------------------------------------------------------------------
-// CCmPluginWlan::RunSettingsL
-// --------------------------------------------------------------------------
-//        
-TInt CCmPluginWlan::RunSettingsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::RunSettingsL" );
-    
-    CmPluginWlanSettingsDlg* cmDlg = CmPluginWlanSettingsDlg::NewL( *this );
-    return cmDlg->ConstructAndRunLD( );       
-    }
-
-	
-// --------------------------------------------------------------------------
-// CCmPluginWlan::LoadServiceSettingL
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::LoadServiceSettingL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::LoadServiceSettingL" );
-        
-    if( TPtrC(KCDTypeNameLANService) == iIapRecord->iServiceType  )
-        {
-        iServiceRecord = static_cast<CCDServiceRecordBase *>
-                    (CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
-        iServiceRecord->SetRecordId( iIapRecord->iService );
-        CLOG_WRITE_1( "ID: [%d]", iServiceRecord->RecordId() );
-        iServiceRecord->LoadL(Session());        
-        }
-    else
-        // this IAP service is not supported by this plugin.
-        {
-        User::Leave( KErrNotSupported );
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::LoadAdditionalRecordsL
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::LoadAdditionalRecordsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::LoadAdditionalRecordsL" );
-    
-    if (!iWlanServiceRecord) 
-        {
-        iWlanServiceRecord = 
-                        new ( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
-        }
-    iWlanServiceRecord->SetRecordId( 0 );
-
-    iWlanServiceRecord->iWlanServiceId.SetL( ( TUint32 )
-                                                ( iIapRecord->iService ) );
-    
-    if ( iWlanServiceRecord->FindL( Session() ) )
-        {
-        iWlanServiceRecord->LoadL( Session() );
-        LoadSecuritySettingsL();
-        }
-    else
-        {
-        // not found -> error
-        CLOG_WRITE_1( "Wlan with Service ID: [%d] NOT found ", 
-                      iServiceRecord->RecordId() );
-        User::Leave(KErrNotFound);
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CreateNewServiceRecordL
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::CreateNewServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::CreateNewServiceRecordL" );
-        
-    // create base (LAN) service record:
-    CCmPluginLanBase::CreateNewServiceRecordL();
-    CCDLANServiceRecord* tmp = 
-                static_cast<CCDLANServiceRecord *>(iServiceRecord);
-    if( FeatureSupported( KFeatureIdIPv6 ) )
-        {
-        tmp->iIfNetworks.SetL( KDefIspIfNetworksIPv4IPv6 );
-        }
-    else
-        {
-        tmp->iIfNetworks.SetL( KDefIspIfNetworksIPv4 );
-        }
-
-    // create WLAN service record:
-    CreateWlanServiceRecordL();
-    
-    // In case of WLan 'show progress' is the default value
-    SetIntAttributeL( ECmSeamlessnessLevel, ESeamlessnessShowprogress );
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CreateWlanServiceRecordL
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::CreateWlanServiceRecordL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::CreateWlanServiceRecordL" );
-
-    delete iWlanServiceRecord; 
-    iWlanServiceRecord = NULL;
-    
-    iWlanServiceRecord = new ( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
-    iWlanServiceRecord->SetRecordId( KCDNewRecordRequest );
-
-	iWlanServiceRecord->iRecordTag.SetL( 1 );
-	iWlanServiceRecord->iRecordName.SetL( iIapRecord->iRecordName );
-    iWlanServiceRecord->iWlanConnMode.SetL( EInfra );
-    iWlanServiceRecord->iWlanSecMode.SetL( EWlanSecModeOpen );
-    iWlanServiceRecord->iWlanScanSSID.SetL( EFalse );
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmPluginWlan::PrepareToUpdateRecordsL()
-// ----------------------------------------------------------------------------
-//
-void CCmPluginWlan::PrepareToUpdateRecordsL()
-    {
-    CCDLANServiceRecord* tmprec = static_cast<CCDLANServiceRecord*>(iServiceRecord);
-
-    CheckDNSServerAddressL( ETrue, 
-                            tmprec->iIp6NameServer1,
-                            tmprec->iIp6NameServer2,
-                            tmprec->iIp6DnsAddrFromServer );
-                            
-    CheckDNSServerAddressL( EFalse,
-                            tmprec->iIpNameServer1,
-                            tmprec->iIpNameServer2,
-                            tmprec->iIpDnsAddrFromServer );
-    SetDaemonNameL();
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::LoadSecuritySettingsL
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::LoadSecuritySettingsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::LoadSecuritySettingsL" );
-
-    TUint32 secmode = iWlanServiceRecord->iWlanSecMode;
-    TUint32 iapid = iIapRecord->iService;
-                   
-    switch ( secmode )
-        {
-        case EWlanSecModeOpen:
-            {
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            if ( !iWepSecSettings )
-                {
-                iWepSecSettings = CWEPSecuritySettings::NewL();
-                }
-                iWepSecSettings->LoadL( iapid, Session() );
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityMode8021x );
-                }
-            iWpaSecSettings->LoadL( iapid, Session() );
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityModeWpa );
-                }
-			iWpaSecSettings->LoadL( iapid, Session() );
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                if ( !iWAPISecSettings )
-                    {
-                    iWAPISecSettings = CWAPISecuritySettings::NewL();
-                    }
-                iWAPISecSettings->LoadL( iIapRecord->RecordId(), Session() );
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            // do nothing in urel
-            break;
-            }
-        }
-    }
-    
-
-// ----------------------------------------------------------------------------
-// CCmPluginWlan::EditSecuritySettingsL
-// ----------------------------------------------------------------------------
-//        
-TInt CCmPluginWlan::EditSecuritySettingsL( CEikonEnv& aEikonEnv )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::EditSecuritySettingsL" );
-
-    TInt ret = KErrNotFound;
-
-    TUint32 secmode = iWlanServiceRecord->iWlanSecMode;
-
-    HBufC* title = GetStringAttributeL(ECmName);
-    CleanupStack::PushL( title );   
-    switch ( secmode )
-        {
-        case EWlanSecModeOpen:
-            {
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            CWEPSecuritySettingsUi* ui = 
-                            CWEPSecuritySettingsUi::NewL(aEikonEnv);
-            CleanupStack::PushL( ui );
-            if ( !iWepSecSettings )
-                {
-                iWepSecSettings = CWEPSecuritySettings::NewL();
-                }            
-            ret = iWepSecSettings->EditL( *ui, *title );
-            CleanupStack::PopAndDestroy( ui );
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            CWPASecuritySettingsUi* ui = 
-                            CWPASecuritySettingsUi::NewL(aEikonEnv);
-            CleanupStack::PushL(ui);
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                            CWPASecuritySettings::NewL( ESecurityMode8021x );
-                }                        
-            ret = iWpaSecSettings->EditL( *ui, *title );
-            CleanupStack::PopAndDestroy( ui );
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            CWPASecuritySettingsUi* ui = 
-                            CWPASecuritySettingsUi::NewL(aEikonEnv);
-            CleanupStack::PushL( ui );
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityModeWpa );
-                }                        
-            ret = iWpaSecSettings->EditL( *ui, *title );
-            CleanupStack::PopAndDestroy( ui );
-            break;
-            }            
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                CWAPISecuritySettingsUi* ui =
-                            CWAPISecuritySettingsUi::NewL( aEikonEnv );
-                CleanupStack::PushL( ui );
-                if ( !iWAPISecSettings )
-                    {
-                    iWAPISecSettings = CWAPISecuritySettings::NewL();
-                    }
-                ret = iWAPISecSettings->EditL( *ui, *title );
-                CleanupStack::PopAndDestroy( ui );
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            break;
-            }
-        default:
-            {
-            // do nothing in urel
-            break;
-            }
-        }
-    CleanupStack::PopAndDestroy( title );
-    return ret;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::AreSecuritySettingsValidL
-// --------------------------------------------------------------------------
-//        
-TBool CCmPluginWlan::AreSecuritySettingsValidL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::AreSecuritySettingsValidL" );
-  
-    TBool ret = EFalse;
-
-    TUint32 secmode = iWlanServiceRecord->iWlanSecMode;
-                
-    switch ( secmode )
-        {
-        case EWlanSecModeOpen:
-            {
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            if ( !iWepSecSettings )
-                {
-                iWepSecSettings = CWEPSecuritySettings::NewL();
-                }            
-            ret = iWepSecSettings->IsValid();
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityMode8021x );
-                }
-            ret = iWpaSecSettings->IsValid();
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityModeWpa );
-                }
-            ret = iWpaSecSettings->IsValid();
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                if ( !iWAPISecSettings )
-                    {
-                    iWAPISecSettings = CWAPISecuritySettings::NewL();
-                    }
-                ret = iWAPISecSettings->IsValid();
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            break;
-            }
-        default:
-            {
-            // do nothing in urel
-            break;
-            }
-        }        
-    return ret;
-    }
-
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::UpdateSecuritySettingsL()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::UpdateSecuritySettingsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::UpdateSecuritySettingsL" );
-
-    TUint32 oldwlaniapid(0);
-    TUint32 wlaniapid = iIapRecord->iService;
-    
-    TUint32 secmode = iWlanServiceRecord->iWlanSecMode;    
-    CLOG_WRITE_1( "Sec mode: [%d]", secmode );
-
-    TTypeOfSaving savetype( ESavingBrandNewAP );
-    
-    if (iWlanServiceRecord->RecordId())
-        {
-        savetype = ESavingEditedAP;
-        oldwlaniapid = wlaniapid;
-        }
-
-    if ( iIsCopy )
-        {
-        oldwlaniapid = iCopiedFromIapId;
-        savetype = ESavingNewAPAsACopy;
-        
-        switch ( secmode )
-            {
-            case EWlanSecModeOpen:
-                {
-                break;
-                }
-            case EWlanSecModeWep:
-                {
-                // this is a brand new copy of another CM
-                // we have to load the settings for the old wlan
-                // and save with the new one.
-                // first delete possibly existing other settings
-                if ( iWepSecSettings )
-                    {
-                    delete iWepSecSettings;
-                    iWepSecSettings = NULL;
-                    }
-                break;
-                }
-            case EWlanSecMode802_1x:
-                {
-                // this is a brand new copy of another CM
-                // we have to load the settings for the old wlan
-                // and save with the new one.
-                // first delete possibly existing other settings
-                if ( iWpaSecSettings )
-                    {
-                    delete iWpaSecSettings;
-                    iWpaSecSettings = NULL;
-                    }
-                break;
-                }
-            case EWlanSecModeWpa:
-            case EWlanSecModeWpa2:
-                {
-                // this is a brand new copy of another CM
-                // we have to load the settings for the old wlan
-                // and save with the new one.
-                // first delete possibly existing other settings
-                if ( iWpaSecSettings )
-                    {
-                    delete iWpaSecSettings;
-                    iWpaSecSettings = NULL;
-                    }
-                break;
-                }
-            case EWlanSecModeWAPI:
-                {
-                if ( iIsWAPISupported )
-                    {
-                    if ( iWAPISecSettings )
-                        {
-                        delete iWAPISecSettings;
-                        iWAPISecSettings = NULL;
-                        }
-                    }
-                else
-                    {
-                    User::Leave( KErrCorrupt );
-                    }
-                break;
-                }
-            default:
-                {
-                CLOG_WRITE( "Unknown secmode" );
-                // do nothing in urel
-                break;
-                }
-            }
-        }
-    // now save, & load if still needed
-    switch ( secmode )
-        {
-        case EWlanSecModeOpen:
-            {
-            // Extra fileds are deleted from WLANServiceTable
-            // when security mode is changed from WPA to Open
-            if ( iWpaSecSettings )
-                {
-                iWpaSecSettings->DeleteL( wlaniapid );
-                }
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            // Extra fileds are deleted from WLANServiceTable
-            // when security mode is changed from WPA to WEP
-            if ( iWpaSecSettings )
-                {
-                iWpaSecSettings->DeleteL( wlaniapid );
-                }
-
-            // we have to try to save if:
-            // 1. it is a changed AP, it is possible that only 
-            // sec. settings have been changed. 
-            // In this case, iWepSecSettings might be NULL!!
-            // 2. it's sec. settings had been edited
-            
-            if ( !iWepSecSettings )
-                {
-                iWepSecSettings = CWEPSecuritySettings::NewL();
-                iWepSecSettings->LoadL( oldwlaniapid, Session() );
-                }
-            // save WEP settings, too, into same transaction...
-            iWepSecSettings->SaveL( wlaniapid, Session() );
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                    CWPASecuritySettings::NewL( ESecurityMode8021x );
-                iWpaSecSettings->LoadL( oldwlaniapid, Session() );
-                }                            
-            // save WPA settings, too, into same transaction...
-            iWpaSecSettings->SaveL( wlaniapid, Session(), savetype, oldwlaniapid );
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            if ( !iWpaSecSettings )
-                {
-                iWpaSecSettings = 
-                      CWPASecuritySettings::NewL( ESecurityModeWpa );
-                iWpaSecSettings->LoadL( oldwlaniapid, Session() );
-                }
-            
-            // save WPA settings, too, into same transaction...
-            iWpaSecSettings->SaveL( wlaniapid, Session(), savetype, oldwlaniapid );
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                if ( !iWAPISecSettings )
-                    {
-                    iWAPISecSettings = CWAPISecuritySettings::NewL();
-                    iWAPISecSettings->LoadL( iIapRecord->RecordId(), Session() );
-                    }
-                // save WAPI settings
-                TRAPD( err, iWAPISecSettings->SaveL( iIapRecord->RecordId(), Session() ) );
-                if ( err )
-                    {
-                    if ( err != KErrArgument )
-                        {
-                        User::Leave( err );
-                        }
-                    }
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            break;
-            }
-        default:
-            {
-            CLOG_WRITE( "Unknown secmode" );
-            // do nothing in urel
-            break;
-            }
-        }
-    // clean up copy flags
-    if ( iIsCopy )
-        {
-        iIsCopy = EFalse;
-        iCopiedFromIapId = 0;
-        }
-    }
-    
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::AdditionalReset()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::AdditionalReset()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::AdditionalReset" );
-    
-    delete iWlanServiceRecord;
-    iWlanServiceRecord = NULL;
-    
-    delete iWepSecSettings;
-    iWepSecSettings = NULL;
-    
-    delete iWpaSecSettings;
-    iWpaSecSettings = NULL;
-
-    if ( iIsWAPISupported )
-        {
-        delete iWAPISecSettings;
-        iWAPISecSettings = NULL;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::BearerRecordIdLC()
-// --------------------------------------------------------------------------
-//        
-void CCmPluginWlan::BearerRecordIdLC( HBufC* &aBearerName, 
-                                                  TUint32& aRecordId )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::BearerRecordIdLC" );
-
-	CCDLANBearerRecord* tmprec = static_cast<CCDLANBearerRecord*>
-                ( CCDRecordBase::RecordFactoryL( KCDTIdLANBearerRecord ) );
-    CleanupStack::PushL( tmprec );
-
-    tmprec->iRecordName.SetL( TPtrC( iBearerRecName ) );
-    if ( !tmprec->FindL( Session() ) )
-        { // bearer not found -> create dummy values
-        CLOG_WRITE( "No bearer found" );
-        
-        tmprec->SetRecordId( KCDNewRecordRequest );
-        
-        tmprec->iBearerAgent.SetL( KWlanBearerAgent );
-        tmprec->iRecordName.SetL( KWlanBearerName );
-        tmprec->iLanBearerNifName.SetL( KWlanBearerNif );
-        tmprec->iLanBearerLddName.SetL( KWlanLDDName );
-        tmprec->iLanBearerPddName.SetL( KWlanPDDName );
-        tmprec->iLastSocketActivityTimeout.SetL(
-                                ( TUint32 )KWlanLastSocketActivityTimeout );
-        tmprec->iLastSessionClosedTimeout.SetL(
-                                (TUint32 )KWlanLastSessionClosedTimeout );
-        tmprec->iLastSocketClosedTimeout.SetL(
-                                ( TUint32 )KWlanLastSocketClosedTimeout );
-        tmprec->StoreL( Session() );
-        }
-
-    aRecordId = tmprec->RecordId();
-    
-    CLOG_WRITE_2( "Name: [%S], id: [%d]", 
-                  &tmprec->iRecordName.GetL(),
-                  aRecordId );
-
-    CleanupStack::PopAndDestroy( tmprec );
-
-    aBearerName = TPtrC(KCDTypeNameLANBearer).AllocLC();
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ReadResourceL()
-// --------------------------------------------------------------------------
-//        
-HBufC* CCmPluginWlan::ReadResourceL( TInt aResId, TInt aInt ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ReadResourceL" );
-    
-    HBufC* retval = NULL;
-
-    RConeResourceLoader resourceLoader( *CEikonEnv::Static() );
-    LoadResourceLC( resourceLoader );
-    retval = StringLoader::LoadL( aResId, aInt );
-
-    // Clean-up
-    CleanupStack::PopAndDestroy();
-
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::LoadResourceL()
-// --------------------------------------------------------------------------
-//  
-void CCmPluginWlan::LoadResourceLC( 
-                                RConeResourceLoader& aResourceLoader ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::LoadResourceLC" );
-    
-    // Add resource file.
-    TParse fp;
-    User::LeaveIfError( fp.Set( KPluginWlanResDirAndFileName, 
-                        &KDC_RESOURCE_FILES_DIR, 
-                        NULL ) );
-    TFileName resourceFileNameBuf = fp.FullName();
-
-    CleanupClosePushL( aResourceLoader );
-    aResourceLoader.OpenL( resourceFileNameBuf );
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::InitializeWithUiL
-// --------------------------------------------------------------------------
-//        
-TBool CCmPluginWlan::InitializeWithUiL( TBool aManuallyConfigure )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::InitializeWithUiL" );
-    
-    TBool retVal ( EFalse );
-    RConeResourceLoader resourceLoader( *CEikonEnv::Static() );
-    LoadResourceLC( resourceLoader );
-    if ( aManuallyConfigure )
-        {
-        retVal = ManuallyConfigureL();
-        }
-    else
-        {
-        retVal = AutomaticallyConfigureL();
-        }
-    // Clean-up
-    CleanupStack::PopAndDestroy();
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ProtectedSetupL
-// --------------------------------------------------------------------------
-//
-WiFiProt::TWiFiReturn CCmPluginWlan::ProtectedSetupL( TWlanSsid& aSsid )
-    {
-    RCmManagerExt packedCmManager;
-    iCmMgr.WrapCmManager( packedCmManager );
-    CWifiProtUiInProcess* wifi = CWifiProtUiInProcess::NewL(
-                             &packedCmManager );
-    CleanupStack::PushL( wifi );
-    WiFiProt::TWiFiReturn wifiret = wifi->StartFromUiL( aSsid, EFalse, iAdditionalCmsCreated);                         
-    CleanupStack::PopAndDestroy( wifi );                                         
-    switch ( wifiret )
-        {
-        case WiFiProt::EWiFiCancel:
-            {
-            break;
-            }
-        case WiFiProt::EWiFiOK:
-            {
-            if (iAdditionalCmsCreated.Count())
-                {
-                // Loading the first item in the array
-                // to the actual plugin
-                Reset();
-                AdditionalReset();
-                LoadL( iAdditionalCmsCreated[0] );
-                iAdditionalCmsCreated.Remove(0);
-                }
-             else 
-                {//no settings configured, do the same as cancel case
-                return WiFiProt::EWiFiCancel;
-                }
-                
-            break;
-            }
-        case WiFiProt::EWifiNoAuto:
-            {
-            break;
-            }  
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            break;
-            }                                              
-        }    
-    return wifiret;
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::AutomaticallyConfigureL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::AutomaticallyConfigureL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::AutomaticallyConfigureL" );
-    
-    TBool retval ( ETrue );
-    
-    if ( !iConnUiUtils )
-        {
-        iConnUiUtils = CConnectionUiUtilities::NewL();
-        }
-
-    // Let's search for a WLAN network
-    TWlanSsid ssid;
-    TWlanConnectionMode connectionMode;
-    TWlanConnectionExtentedSecurityMode securityMode;
-
-    TUint32 secmode( EWlanSecModeOpen );
-    
-    // Fortunately user will not see WLAN networks with empty ssid in the list
-    // shown by next call.
-    CCmPluginWlanActiveWaiter* waiter = CCmPluginWlanActiveWaiter::NewL();
-    CleanupStack::PushL( waiter );
-
-    TBool isProtectedSetupSupported;
-    iConnUiUtils->SearchWLANNetworkAsync( waiter->iStatus, ssid, connectionMode, securityMode, isProtectedSetupSupported );
-
-    TInt searchWlanReturn = waiter->WaitForRequest();
-    CleanupStack::PopAndDestroy( waiter );
-
-    if ( searchWlanReturn == KErrNone)
-        {
-        if ( isProtectedSetupSupported )
-            {
-            TBool wifiret = ProtectedSetupL( ssid );
-            switch ( wifiret )
-                {
-                case WiFiProt::EWiFiCancel: //cancel pressed, cancel process
-                    {
-                    return EFalse;
-                    //break;
-                    }
-                case WiFiProt::EWiFiOK: //settings configured already, we can return
-                    {
-                    return ETrue;
-                    //break;
-                    }
-                case WiFiProt::EWifiNoAuto://proceed with normal setup
-                    {
-                    break;
-                    }  
-                default:
-                    {
-                    User::Leave( KErrNotSupported );
-                    break;
-                    }                                              
-                }    
-            }
-        switch( securityMode )
-            {
-            case EWlanConnectionExtentedSecurityModeOpen:
-                {
-                secmode = EWlanSecModeOpen;
-                }
-                break;
-                
-            case EWlanConnectionExtentedSecurityModeWepOpen:
-            case EWlanConnectionExtentedSecurityModeWepShared:
-                {
-                secmode = EWlanSecModeWep;
-                }
-                break;
-                
-            case EWlanConnectionExtentedSecurityMode802d1x:
-                {
-                secmode = EWlanSecMode802_1x;
-                }
-                break;
-                
-            case EWlanConnectionExtentedSecurityModeWpa:
-            case EWlanConnectionExtentedSecurityModeWpaPsk:
-                {
-                secmode = EWlanSecModeWpa;
-                }
-                break;
-                
-            case EWlanConnectionExtentedSecurityModeWpa2:
-            case EWlanConnectionExtentedSecurityModeWpa2Psk:
-                {
-                secmode = EWlanSecModeWpa2;
-                }
-                break;
-            case EWlanConnectionExtentedSecurityModeWapi:
-            case EWlanConnectionExtentedSecurityModeWapiPsk:
-                {
-                if ( iIsWAPISupported )
-                    {
-                    secmode = EWlanSecModeWAPI;
-                    }
-                else
-                    {
-                    User::Leave( KErrCorrupt );
-                    }
-                }
-                break;
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                }
-            }
-
-        // Let's check the security mode and if it's other than "none", then
-        // ask for the key.
-        HBufC* key = HBufC::NewLC( KWlanMaxKeyLength );    // security key
-        TPtr keyPtr( key->Des() );
-        TBool wepKeyInAsciiFormat;
-        switch( securityMode )
-            {
-            case EWlanConnectionExtentedSecurityModeWepOpen:
-            case EWlanConnectionExtentedSecurityModeWepShared:
-                {
-    	          retval = iConnUiUtils->EasyWepDlg( &keyPtr, wepKeyInAsciiFormat );
-                break;
-                }
-            case EWlanConnectionExtentedSecurityModeWpaPsk:
-            case EWlanConnectionExtentedSecurityModeWpa2Psk:
-                {
-            	  retval = iConnUiUtils->EasyWpaDlg( &keyPtr );
-                break;
-                }
-            case EWlanConnectionExtentedSecurityModeWapiPsk:
-                {
-                retval = iConnUiUtils->EasyWapiDlg( &keyPtr );
-                break;
-                }
-            case EWlanConnectionExtentedSecurityModeOpen:
-            case EWlanConnectionExtentedSecurityMode802d1x:
-            case EWlanConnectionExtentedSecurityModeWpa:
-            case EWlanConnectionExtentedSecurityModeWpa2:
-            case EWlanConnectionExtentedSecurityModeWapi:
-            default:
-                {
-                break;
-                }
-            }
-
-        // If retval is not ETrue here, then most probably the user has
-        // cancelled the password dialog ==> she has cancelled the whole
-        // process.
-        if ( retval )
-            {
-            // We have to convert the 8-bit SSID to 16-bit for CommsDat.
-            HBufC* ssid16 = HBufC::NewLC( ssid.Length() );
-            TPtr ssid16Ptr( ssid16->Des() );
-            
-            // save iap name as unicode
-            TInt error = CnvUtfConverter::ConvertToUnicodeFromUtf8( ssid16Ptr, ssid );
-            if ( error )
-                {
-                ssid16Ptr.Copy( ssid );                  	
-                }
-            SetStringAttributeL( ECmName, *ssid16 );
-            
-            // save ssid as UTF8
-            ssid16Ptr.Zero();
-            ssid16Ptr.FillZ();
-            ssid16Ptr.Copy( ssid ); 
-            SetStringAttributeL( EWlanSSID, *ssid16 );
-            // ConvertWLANConnectionStatesL( )converts WLAN connection state 
-            // (TWlanConnectionMode) into EInfra or EAdhoc (TWlanNetMode)
-            SetIntAttributeL( EWlanConnectionMode, 
-                    (TUint32) ConvertWLANConnectionStatesL( connectionMode ) );
-            SetIntAttributeL( EWlanSecurityMode, secmode );
-
-            // Check if the network is hidden
-            TBool hidden( EFalse );
-
-            // These values we already have so we are not interested of
-            // them
-            TWlanNetMode tempNetworkMode;
-            TWlanConnectionExtentedSecurityMode tempSecurityMode;
-
-            TBool tempProtectedSetupSupported;
-
-            TInt retVal( KErrNone );
-
-            CCmWlanCoverageCheck* coverage = new( ELeave )CCmWlanCoverageCheck;
-            CleanupStack::PushL( coverage );
-
-	          // We need to catch leave value of Wlan scanning
-	          TRAPD( err, retVal = coverage->ScanForPromptedSsidL( ssid, ETrue, 
-                   tempNetworkMode, 
-                   tempSecurityMode,
-                   tempProtectedSetupSupported ) );
-            if ( !retVal || err != KErrNone)
-                {
-                TRAPD( err, retVal = coverage->ScanForPromptedSsidL( ssid,
-								     EFalse,
-								     tempNetworkMode, 
-								     tempSecurityMode,
-								     tempProtectedSetupSupported ) );
-                if ( err == KErrNone && retVal )
-                    {
-                    hidden = ETrue;
-                    }
-                else // direct scan is ok, but network could not found with given ssid
-		            {
-                CleanupStack::PopAndDestroy( coverage ); // coverage
-                CleanupStack::PopAndDestroy( ssid16 );
-                CleanupStack::PopAndDestroy( key );
-			
-                TCmCommonUi::ShowNoteL( R_QTN_NETW_QUEST_IAP_INCOMPLETE_DELETE, TCmCommonUi::ECmOkNote );
-                return EFalse;
-		            }
-            }
-
-            CleanupStack::PopAndDestroy( coverage ); // coverage
-            
-            SetBoolAttributeL( EWlanScanSSID, hidden );
-            CLOG_WRITE_1( "Is hidden[%d]", (TInt) hidden );
-
-            // We have to store the security key as well.
-            if ( securityMode == EWlanConnectionExtentedSecurityModeWepOpen )
-                {
-                if ( !iWepSecSettings )
-                    {
-                    iWepSecSettings = CWEPSecuritySettings::NewL();
-                    }
-                iWepSecSettings->SetKeyDataL( 0, *key,
-                                             wepKeyInAsciiFormat );
-                // Note that the key will NOT be persisted at this very
-                // point, but only after SaveL, which will be called
-                // later on.
-                }
-            else if ( securityMode == EWlanConnectionExtentedSecurityModeWpaPsk
-                      || securityMode == EWlanConnectionExtentedSecurityModeWpa2Psk )
-                {
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityModeWpa );
-                    }
-                iWpaSecSettings->SetWPAPreSharedKey( *key );
-
-                // Note that the key will NOT be persisted at this very
-                // point, but only after SaveL, which will be called
-                // later on.
-                }
-            else if ( securityMode == EWlanConnectionExtentedSecurityModeWapiPsk )
-                {
-                if ( !iWAPISecSettings )
-                    {
-                    iWAPISecSettings = CWAPISecuritySettings::NewL();
-                    }
-                
-                iWAPISecSettings->SetPreSharedKeyL( CWAPISecuritySettings::EWapiKeyAscii, *key );
-                // Note that the key will NOT be persisted at this very
-                // point, but only after SaveL, which will be called
-                // later on.
-                }
-
-            CLOG_WRITE( "InitializeWithUiL stored everything successfully" );
-
-            CleanupStack::PopAndDestroy( ssid16 );
-            }
-        CleanupStack::PopAndDestroy( key );
-        }
-    else
-        {
-        if ( searchWlanReturn == KErrNotFound )
-            {
-            // no Wlan network found, continuing process...
-            HBufC* ssid16 = HBufC::NewLC( ssid.Length() );
-            TPtr ssid16Ptr( ssid16->Des() );
-            
-            // save iap name as unicode
-            TInt error = CnvUtfConverter::ConvertToUnicodeFromUtf8( ssid16Ptr, ssid );
-            if ( error )
-                {
-                ssid16Ptr.Copy( ssid );	
-                }			
-            SetStringAttributeL( ECmName, *ssid16 );
-            
-            // save ssid as UTF8
-            ssid16Ptr.Zero();
-            ssid16Ptr.FillZ();
-            ssid16Ptr.Copy( ssid ); 
-            
-            // write ssid and go on...            
-            SetStringAttributeL( EWlanSSID, *ssid16 );
-            CleanupStack::PopAndDestroy( ssid16 );
-            retval = ProceedWithManualL( ETrue ); // revert to fully manual...
-            }
-        else
-            {
-            retval = EFalse;
-            }
-        }
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ManuallyConfigureL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::ManuallyConfigureL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ManuallyConfigureL" );
-    
-    TBool proceed ( EFalse );
-    
-    // Step 1 - WLAN Network Name query (SSID)
-    // sets: ECmName, EWlanSSID
-    RBuf nwName;
-    nwName.CreateL( KCmWlanNWNameMaxLength );
-    CleanupClosePushL( nwName );
-
-    proceed = ShowNWNameQueryL( nwName );
-
-    if ( proceed )
-        {
-        TWlanNetMode nwMode( EInfra );
-
-        TWlanConnectionExtentedSecurityMode securityMode =
-                                        EWlanConnectionExtentedSecurityModeOpen;
-        
-        TWpaMode wpaMode = EWpaModeUndefined;
-        
-        proceed = ProceedWithManualL ( ETrue, nwMode, securityMode, wpaMode  );
-        }
-    CleanupStack::PopAndDestroy( &nwName );
-
-    return proceed;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ProceedWithManualL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::ProceedWithManualL( TBool aAskNWModeAndSec,
-                                         TWlanNetMode aNwMode, 
-                                         TWlanConnectionExtentedSecurityMode aSecurityMode,
-                                         TWpaMode aWpaMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ProceedWithManualL" );
-
-    TInt proceed = ETrue;
-    if ( aAskNWModeAndSec )
-        {
-        // Step 3 - Network Mode
-        // sets: EWlanConnectionMode
-        //       EWlanScanSSID
-        proceed = SelectNWModeL( aNwMode );
-
-        // Step 4 - Network security
-        // sets: EWlanSecurityMode
-        // Open       - finished
-        // WEP        - go to step 5
-        // WPA/802.1x - go to step 6
-        // WAPI       - go to step 9
-        if ( proceed )
-            {
-            proceed = ShowNWSecurityDlgL( aNwMode, aSecurityMode );
-            }
-        }
-        
-    // Security settings - Steps 5-8
-    if ( proceed && aSecurityMode != EWlanConnectionExtentedSecurityModeOpen )
-        {
-        switch ( aSecurityMode )
-            {
-            // Step 5 - Enter WEP key
-            // sets: wep key
-            // finished
-            case EWlanConnectionExtentedSecurityModeWepOpen:
-            case EWlanConnectionExtentedSecurityModeWepShared:
-                {
-                proceed = EnterWEPKeyL();
-                break;
-                }
-            // Step 6 - WPA/WPA2 mode
-            // sets: wpa/802.1x keys
-            // Pre-shared - go to step 7
-            // EAP        - go to step 8
-            case EWlanConnectionExtentedSecurityMode802d1x:
-                TCmCommonUi::ShowNoteL( *( StringLoader::LoadLC( 
-                    R_QTN_NETW_CONSET_INFO_EAP_SETTINGS_DEFAULT ) ),
-                    TCmCommonUi::ECmInfoNote );
-                CleanupStack::PopAndDestroy();
-                break;
-                
-            case EWlanConnectionExtentedSecurityModeWpa:
-            case EWlanConnectionExtentedSecurityModeWpaPsk:
-            case EWlanConnectionExtentedSecurityModeWpa2:
-            case EWlanConnectionExtentedSecurityModeWpa2Psk:
-                {
-                if ( aWpaMode == EWpaModeUndefined )
-                    {
-                    proceed = SelectWpaModeDialogL( aWpaMode );
-                    }
-
-                if ( proceed )
-                    {
-                    // Step 7 - Pre-shared key
-                    // sets: pre-shared key
-                    // finished
-                    if ( aWpaMode == EWpaModePreSharedKey )
-                        {
-                        proceed = EnterWpaPreSharedKeyL();
-                        }
-                    // Step 8 - EAP selection note
-                    else
-                        {
-                        TCmCommonUi::ShowNoteL( *( StringLoader::LoadLC( 
-                            R_QTN_NETW_CONSET_INFO_EAP_SETTINGS_DEFAULT ) ),
-                            TCmCommonUi::ECmInfoNote );
-                        CleanupStack::PopAndDestroy();
-                        }
-                    }
-                break;
-                }
-            // Step 9
-            case EWlanConnectionExtentedSecurityModeWapi:
-            case EWlanConnectionExtentedSecurityModeWapiPsk:
-                {
-                if ( iIsWAPISupported )
-                    {
-                    if ( aSecurityMode == EWlanConnectionExtentedSecurityModeWapiPsk )
-                        {
-                        proceed = EnterWAPIPreSharedKeyL();
-                        }
-                    }
-                else
-                    {
-                    User::Leave( KErrCorrupt );
-                    }
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                break;
-                }
-            }
-        }
-        
-    // Store all the unsaved settings
-  /* if ( proceed )
-        {
-        UpdateSecuritySettingsL();
-        }*/
-    return proceed;
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ShowNWNameQueryL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::ShowNWNameQueryL( TDes& aNwName )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ShowNWNameQueryL" );
-    
-    TBool retVal ( EFalse );
-    
-    retVal = TCmCommonUi::ShowConfirmationQueryWithInputL( 
-                                            R_QTN_WLAN_PRMPT_NETWORK_NAME,
-                                            aNwName );
-    if ( retVal )
-        {
-        // save iap name as unicode
-        SetStringAttributeL( ECmName, aNwName );
-        
-        // save ssid as UTF8
-        TWlanSsid ssid;
-        TInt err = CnvUtfConverter::ConvertFromUnicodeToUtf8( ssid, aNwName );
-        if ( err == KErrNone )
-            {
-            aNwName.Copy( ssid );
-            }
-        SetStringAttributeL( EWlanSSID, aNwName );
-        	
-        retVal = ETrue;
-        }
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ScanForWlanNwL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::ScanForWlanNwL( 
-#ifdef __WINS__
-                         TWlanSsid& /*aSsid*/, TWlanNetMode& /*aNetworkMode*/,
-                         TWlanConnectionExtentedSecurityMode& /*aSecurityMode*/,
-                         TBool& /*aProtectedSetupSupported*/ )
-#else
-                         TWlanSsid& aSsid, TWlanNetMode& aNetworkMode,
-                         TWlanConnectionExtentedSecurityMode& aSecurityMode,
-                         TBool& aProtectedSetupSupported )
-#endif  // __WINS__
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ScanForWlanNwL" );
-    
-    TBool retVal ( EFalse );
-
-    DestroyWaitDialog();
-
-    iWaitDialog = new( ELeave )CAknWaitDialog
-                    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ), ETrue );
-    iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE ); 
-
-#ifndef __WINS__
-    TBool hidden ( EFalse );
-    
-    CCmWlanCoverageCheck* coverage = new( ELeave )CCmWlanCoverageCheck;
-    CleanupStack::PushL( coverage );
-
-    CLOG_WRITE( "Coverage created, calling ScanForPromptedSsidL, broadcast" );
-    retVal = coverage->ScanForPromptedSsidL( aSsid, ETrue, aNetworkMode, 
-                                             aSecurityMode,
-                                             aProtectedSetupSupported );
-    CLOG_WRITE( "ScanForPromptedSsidL returned" );
-    
-    if ( !retVal )
-        {
-        CLOG_WRITE( "Calling ScanForPromptedSsidL, direct" );
-        retVal = coverage->ScanForPromptedSsidL( aSsid, EFalse, aNetworkMode, 
-                                                 aSecurityMode,
-                                                 aProtectedSetupSupported );
-        CLOG_WRITE( "ScanForPromptedSsidL returned" );
-
-        if ( retVal )
-            {
-            hidden = ETrue;
-            }
-        }
-
-    CleanupStack::PopAndDestroy( coverage );
-
-    if ( retVal )
-        {
-        CLOG_WRITE( "Ssid has been found" );
-
-        // Network mode
-        SetIntAttributeL( EWlanConnectionMode, aNetworkMode );
-        // Security mode
-        SetIntAttributeL( EWlanSecurityMode, 
-                          ConvertConnectionSecurityModeToSecModeL( 
-                          aSecurityMode ) );
-        // Hidden
-        SetBoolAttributeL( EWlanScanSSID, hidden );    
-        }
-    else    
-#else   // __WINS
-  if ( !retVal )  
-#endif  // __WINS
-        {
-        HBufC* stringLabel = StringLoader::LoadLC( 
-                                        R_INFO_NO_NETWORKS_FOUND );
-
-        CAknGlobalNote * note = CAknGlobalNote::NewL();
-        CleanupStack::PushL(note);
-        note->ShowNoteL(EAknGlobalInformationNote, *stringLabel);
-        CleanupStack::PopAndDestroy(note);
-        CleanupStack::PopAndDestroy( stringLabel );        
-        }
-
-
-    DestroyWaitDialog();
-
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SelectNWModeL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::SelectNWModeL( TWlanNetMode& aNwMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SelectNWModeL" );
-    
-    TBool retVal ( EFalse );
-    
-    // Title
-    HBufC* title = StringLoader::LoadLC( 
-                        R_QTN_NETW_CONSET_PRMPT_WLAN_NW_MODE_AND_STATUS );
-    TPtr ptrTitle ( title->Des() );
-    
-    // Items
-    CDesCArrayFlat* items = 
-	            new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
-    CleanupStack::PushL( items );
-    
-    TInt i = 0;
-    while ( KWlanNetworkModeConvTable[i].iResId != KEndOfArray )
-        {
-        items->AppendL( 
-            *StringLoader::LoadLC( KWlanNetworkModeConvTable[i].iResId ) );
-        CleanupStack::PopAndDestroy(); 
-        i++;
-        }
-        
-    // Show the dialog
-    TInt selection(0);
-    if ( TCmCommonUi::ShowPopupListL( ptrTitle , 
-                                      items,
-                                      NULL,
-                                      R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                                      selection ) )
-        {
-        // result:        
-        i = 0;
-        
-        aNwMode = 
-            ( TWlanNetMode ) KWlanNetworkModeConvTable[selection].iNwMode;
-        
-        // Network mode
-        SetIntAttributeL( EWlanConnectionMode, aNwMode );
-        
-        // Network status
-        SetBoolAttributeL( EWlanScanSSID, 
-                           KWlanNetworkModeConvTable[selection].iHidden );
-                           
-        retVal = ETrue;
-        }
-                                      
-    CleanupStack::Pop( items );
-    CleanupStack::PopAndDestroy( title );
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ShowNWSecurityDlgL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::ShowNWSecurityDlgL( TWlanNetMode aNwMode, 
-                                TWlanConnectionExtentedSecurityMode& aSecurityMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ShowNWSecurityDlgL" );
-
-    TBool retVal ( EFalse );    
-
-    // Collect NW Security Mode items
-	CDesCArrayFlat* items = 
-	            new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
-    
-    TInt i = 0;
-    while ( KWlanSecurityModeConvTable[i].iResId != KEndOfArray )
-        {
-        TWlanSecMode secMode = 
-                ( TWlanSecMode ) KWlanSecurityModeConvTable[i].iSecurityMode;
-        
-        if ( ( secMode == EWlanSecModeOpen || secMode == EWlanSecModeWep )
-                || aNwMode == EInfra )
-             {
-            items->AppendL( *StringLoader::LoadLC( 
-                                KWlanSecurityModeConvTable[i].iResId ) );
-            CleanupStack::PopAndDestroy(); 
-            }
-        i++;
-        // don't show WAPI if it's not supported
-        if ( !iIsWAPISupported )
-            {
-            if ( KWlanSecurityModeConvTable[i].iSecurityMode == EWlanSecModeWAPI )
-                {
-                break;
-                }
-            }
-        }
-   
-    // Title
-    HBufC* title = StringLoader::LoadLC( 
-                            R_QTN_NETW_CONSET_PRMPT_WLAN_NW_SECURITY_MODE );
-    TPtr ptrTitle ( title->Des() );
-    
-    TInt selection = 0;
-    
-    // Show the dialog
-    if ( TCmCommonUi::ShowPopupListL( ptrTitle , 
-                                      items,
-                                      NULL,
-                                      R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                                      selection ) )
-        {
-        // result:
-        aSecurityMode = 
-                ConvertSecModeToConnectionSecurityModeL( ( TWlanSecMode )
-                        KWlanSecurityModeConvTable[selection].iSecurityMode );
-        SetIntAttributeL( EWlanSecurityMode, 
-                        KWlanSecurityModeConvTable[selection].iSecurityMode );
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( title );
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::EnterWEPKeyL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::EnterWEPKeyL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::EnterWEPKeyL" );
-    
-    TBool retVal ( EFalse );
-    
-    // Security key
-    HBufC* key = HBufC::NewLC( KWlanMaxKeyLength );
-    TPtr keyPtr( key->Des() );
-    TBool wepKeyInAsciiFormat ( EFalse );
-    
-    if ( !iConnUiUtils )
-        {
-        iConnUiUtils = CConnectionUiUtilities::NewL();
-        }
-    
-    if ( iConnUiUtils->EasyWepDlg( &keyPtr, wepKeyInAsciiFormat ) )
-        {
-        if ( !iWepSecSettings )
-            {
-            iWepSecSettings = CWEPSecuritySettings::NewL();
-            }       
-        iWepSecSettings->SetKeyDataL( 0, 
-                                      *key,
-                                      wepKeyInAsciiFormat );
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( key );    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::EnterWpaPreSharedKeyL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::EnterWpaPreSharedKeyL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::EnterWpaPreSharedKeyL" );
-    
-    TBool retVal ( EFalse );
-    
-    HBufC* key = HBufC::NewLC( KWlanMaxKeyLength );
-    TPtr keyPtr( key->Des() );
-
-    if ( !iConnUiUtils )
-        {
-        iConnUiUtils = CConnectionUiUtilities::NewL();
-        }
-    
-    if ( iConnUiUtils->EasyWpaDlg( &keyPtr ) )
-        {
-        if ( !iWpaSecSettings )
-            {
-            iWpaSecSettings = CWPASecuritySettings::NewL( ESecurityModeWpa );
-            }
-        iWpaSecSettings->SetWPAPreSharedKey( *key );
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( key );  
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SelectWpaModeDialogL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::SelectWpaModeDialogL( TWpaMode& aWpaMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SelectWpaModeDialogL" );
-    
-    TBool retVal ( EFalse );
-    
-    // Collect NW Security Mode items
-    CDesCArrayFlat* items = 
-	            new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
-   
-    // Title
-    HBufC* title = 
-            StringLoader::LoadLC( R_QTN_NETW_CONSET_PRMPT_WLAN_WPA_MODE );
-    TPtr ptrTitle ( title->Des() );
-    
-    TInt selection = 0;
-    
-    // EWpaModeEap
-    items->AppendL( *StringLoader::LoadLC(
-                                    R_QTN_NETW_CONSET_PRMPT_WPA_MODE_EAP ) );
-    CleanupStack::PopAndDestroy(); 
-    
-    // EWpaModePreSharedKey
-    items->AppendL( *StringLoader::LoadLC( 
-                                    R_QTN_NETW_CONSET_PRMPT_WPA_MODE_PSK ) );
-    CleanupStack::PopAndDestroy(); 
-        
-    // Show the dialog    
-    if( TCmCommonUi::ShowPopupListL( ptrTitle, 
-                                     items,
-                                     NULL,
-                                     R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
-                                     selection ) )
-        {
-        aWpaMode = ( TWpaMode ) selection;
-        retVal = ETrue;
-        }
-    
-    CleanupStack::PopAndDestroy( title );
-    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::UpdateSecurityModeL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::UpdateSecurityModeL( )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::UpdateSecurityModeL" );
-    
-    TUint32 secmode = GetIntAttributeL( EWlanSecurityMode );
-
-    TUint32 wlaniapid = iIapRecord->iService;
-
-    switch ( secmode )
-        {
-        case EWlanSecModeOpen:
-            {
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            if ( iWepSecSettings )
-                {
-                delete iWepSecSettings;
-                iWepSecSettings = NULL;
-                }
-            iWepSecSettings = CWEPSecuritySettings::NewL();
-            iWepSecSettings->LoadL( wlaniapid, Session() );
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            if ( iWpaSecSettings )
-                {
-                delete iWpaSecSettings;
-                iWpaSecSettings = NULL;
-                }
-            iWpaSecSettings = 
-                CWPASecuritySettings::NewL( ESecurityMode8021x );
-            iWpaSecSettings->LoadL( wlaniapid, Session() );
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            if ( iWpaSecSettings )
-                {
-                delete iWpaSecSettings;
-                iWpaSecSettings = NULL;
-                }
-            iWpaSecSettings = 
-                  CWPASecuritySettings::NewL( ESecurityModeWpa );
-            iWpaSecSettings->LoadL( wlaniapid, Session() );
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                if ( iWAPISecSettings )
-                    {
-                    delete iWAPISecSettings;
-                    iWAPISecSettings = NULL;
-                    }
-                iWAPISecSettings = CWAPISecuritySettings::NewL();
-                if ( iIapRecord->RecordId() )
-                    {
-                    iWAPISecSettings->LoadL( iIapRecord->RecordId(), Session() );
-                    }
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            break;
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::CopyAdditionalDataL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::CopyAdditionalDataL( CCmPluginBaseEng& aDestInst ) const
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::CopyAdditionalDataL" );
-    
-    STATIC_CAST( CCmPluginWlan*, &aDestInst )->
-                    SetAsCopyOf( iIapRecord->iService );
-    }
-    
-
-// --------------------------------------------------------------------------
-// CCmPluginWlan::SetAsCopyOf
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlan::SetAsCopyOf( TUint32 aBaseIapID )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetAsCopyOf" );
-    
-    iIsCopy = ETrue;
-    
-    iCopiedFromIapId = aBaseIapID;    
-    }
-
-// ---------------------------------------------------------
-// CCmPluginWlan::DeleteSecuritySettingsL
-// ---------------------------------------------------------
-//    
-void CCmPluginWlan::DeleteSecuritySettingsL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::DeleteSecuritySettingsL" );
-
-    TUint32 wlaniapid = iIapRecord->iService;
-    
-    // check security mode and existence of sec.settings
-    if (iWlanServiceRecord->RecordId() )
-        {// ha sat least WLAN service record, may start to wonder...
-        // wlan service record will be deleted separatelly!
-        // get current security mode
-        TUint32 secmode = iWlanServiceRecord->iWlanSecMode;
-     
-        switch ( secmode )
-            {     
-            case EWlanSecModeOpen:
-            case EWlanSecModeWep:
-                {
-                // nothing to do here
-                break;
-                }
-            case EWlanSecMode802_1x:
-                {                
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityMode8021x );
-                    }
-                iWpaSecSettings->DeleteL( wlaniapid );
-                break;
-                }
-            case EWlanSecModeWpa:
-            case EWlanSecModeWpa2:
-                {
-                if ( !iWpaSecSettings )
-                    {
-                    iWpaSecSettings = 
-                        CWPASecuritySettings::NewL( ESecurityModeWpa );
-                    }
-                iWpaSecSettings->DeleteL( wlaniapid );
-                break;
-                }
-            case EWlanSecModeWAPI:
-                if ( iIsWAPISupported )
-                    {
-                    if ( !iWAPISecSettings )
-                        {
-                        iWAPISecSettings = CWAPISecuritySettings::NewL();
-                        }
-                    TUint32 serviceId = iWlanServiceRecord->RecordId();
-                    iWAPISecSettings->DeleteAPSpecificDataL( serviceId );
-                    }
-                else
-                    {
-                    User::Leave( KErrCorrupt );
-                    }
-                break;
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                // do nothing in urel
-                break;
-                }
-            }
-        }
-    // if there is no wlan service record, 
-    // then there can be no security settings, skipping...
-    }
-
-
-// ---------------------------------------------------------
-// CCmPluginWlan::SetDnsIpFromServer
-// ---------------------------------------------------------
-//    
-void CCmPluginWlan::SetDnsIpFromServerL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetDnsIpFromServer" );
-    
-    HBufC* ip1 = GetStringAttributeL( EWlanIpNameServer1 );
-    CleanupStack::PushL( ip1 );
-
-    HBufC* ip2 = GetStringAttributeL( EWlanIpNameServer2 );
-    CleanupStack::PushL( ip2 );
-    
-
-    if ( ( ip1->Compare( KDynIpAddress ) == 0 ) &&
-         ( ip2->Compare( KDynIpAddress ) == 0 ) )
-        {
-        SetBoolAttributeL( EWlanIpDNSAddrFromServer, ETrue );
-        }
-    else
-        {
-        SetBoolAttributeL( EWlanIpDNSAddrFromServer, EFalse );
-        }
-    CleanupStack::PopAndDestroy( 2,ip1 );
-    }
-
-
-// ---------------------------------------------------------
-// CCmPluginWlan::SetDns6IpFromServer
-// ---------------------------------------------------------
-//
-void CCmPluginWlan::SetDns6IpFromServerL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetDns6IpFromServer" );
-
-    HBufC* ip1 = GetStringAttributeL( EWlanIp6NameServer1 );
-    CleanupStack::PushL( ip1 );
-
-    HBufC* ip2 = GetStringAttributeL( EWlanIp6NameServer2 );
-    CleanupStack::PushL( ip2 );
-
-    if ( ( ip1->Compare( KDynIpv6Address ) == 0 ) &&
-         ( ip2->Compare( KDynIpv6Address ) == 0 ) )
-        {
-        SetBoolAttributeL( EWlanIp6DNSAddrFromServer, ETrue );
-        }
-    else
-        {
-        SetBoolAttributeL( EWlanIp6DNSAddrFromServer, EFalse );
-        }
-    CleanupStack::PopAndDestroy( 2,ip1 );
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmPluginWlan::CheckNetworkCoverageL()
-// ----------------------------------------------------------------------------
-//        
-TInt CCmPluginWlan::CheckNetworkCoverageL() const
-    {
-    LOGGER_ENTERFN("CCmPluginWlan::CheckNetworkCoverageL");
-    
-    TInt retVal( 0 ); 
-    
-#ifdef __WINS__
-    retVal = 1;
-#else
-    CCmWlanCoverageCheck* coverage = new (ELeave) CCmWlanCoverageCheck;
-    CleanupStack::PushL( coverage );
-
-    CLOG_WRITE( "Coverage created, calling GetCoverageL" );
-    retVal = coverage->GetCoverageL();
-    CLOG_WRITE( "GetCoverageL returned" );
-    
-    CleanupStack::PopAndDestroy( coverage );
-#endif  // __WINS
-    return retVal;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmPluginWlan::ConvertConnectionSecurityModeToSecModeL()
-// ----------------------------------------------------------------------------
-//        
-TWlanSecMode CCmPluginWlan::ConvertConnectionSecurityModeToSecModeL(
-                                    TWlanConnectionExtentedSecurityMode aSecurityMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ConvertConnectionSecurityModeToSecModeL " );
-
-    switch( aSecurityMode )
-        {
-        case EWlanConnectionExtentedSecurityModeOpen:
-            {
-            return EWlanSecModeOpen;
-            }
-        
-        case EWlanConnectionExtentedSecurityModeWepOpen:
-        case EWlanConnectionExtentedSecurityModeWepShared:
-            {
-            return EWlanSecModeWep;
-            }
-        
-        case EWlanConnectionExtentedSecurityMode802d1x:
-            {
-            return EWlanSecMode802_1x;
-            }
-        
-        case EWlanConnectionExtentedSecurityModeWpa:
-        case EWlanConnectionExtentedSecurityModeWpaPsk:
-        case EWlanConnectionExtentedSecurityModeWpa2:
-        case EWlanConnectionExtentedSecurityModeWpa2Psk:
-            {
-            return EWlanSecModeWpa;
-            }
-        case EWlanConnectionExtentedSecurityModeWapi:
-        case EWlanConnectionExtentedSecurityModeWapiPsk:
-            {
-            if ( iIsWAPISupported )
-                {
-                return EWlanSecModeWAPI;
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-
-    return EWlanSecModeOpen;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmPluginWlan::ConvertSecModeToConnectionSecurityModeL()
-// ----------------------------------------------------------------------------
-//        
-TWlanConnectionExtentedSecurityMode 
-        CCmPluginWlan::ConvertSecModeToConnectionSecurityModeL(
-                                                        TWlanSecMode aSecMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ConvertSecModeToConnectionSecurityModeL " );
-
-    switch( aSecMode )
-        {
-        case EWlanSecModeOpen:
-            {
-            return EWlanConnectionExtentedSecurityModeOpen;
-            }
-        
-        case EWlanSecModeWep:
-            {
-            return EWlanConnectionExtentedSecurityModeWepOpen;
-            }
-        
-        case EWlanSecMode802_1x:
-            {
-            return EWlanConnectionExtentedSecurityMode802d1x;
-            }
-        
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            return EWlanConnectionExtentedSecurityModeWpa;
-            }
-        case EWlanSecModeWAPI:
-            {
-            if ( iIsWAPISupported )
-                {
-                return EWlanConnectionExtentedSecurityModeWapi;
-                }
-            else
-                {
-                User::Leave( KErrCorrupt );
-                }
-            }
-        
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            }
-        }
-
-    return EWlanConnectionExtentedSecurityModeOpen;
-    }
-
-
-// ---------------------------------------------------------
-// CCmPluginWlan::DestroyWaitDialog()
-// ---------------------------------------------------------
-//
-void CCmPluginWlan::DestroyWaitDialog()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::DestroyWaitDialog " );
-
-    delete iWaitDialog;
-    iWaitDialog = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CCmPluginWlan::SetDaemonNameL
-// ---------------------------------------------------------------------------
-//
-void CCmPluginWlan::SetDaemonNameL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::SetDaemonNameL" );
-
-    // we have to check first that these values has not been 
-    // set(or changed) by any 3rd party sw to ensure that
-    // we don't break their settings
-    HBufC* daemonName = GetStringAttributeL( ECmConfigDaemonManagerName );
-    if ( daemonName )
-        {
-        if ( daemonName->Compare( KDaemonManagerName ) != 0 )
-    	    {
-    	    delete daemonName;
-            return;
-    	    }
-        delete daemonName;
-        }
-       
-    // check if Easy WLAN IAP since it has different config daemon
-    // manager name
-    HBufC* iapName = GetStringAttributeL( ECmName );
-    if ( iapName )
-        {
-        CleanupStack::PushL( iapName );
-        if ( iapName->Compare( KEasyWlanName ) == 0 )
-            {
-            SetStringAttributeL( ECmConfigDaemonManagerName, 
-                                  KHotspotDaemonManagerName );
-            SetStringAttributeL( ECmConfigDaemonName, 
-                                   KConfigDaemonName );
-            CleanupStack::PopAndDestroy( iapName );
-            return;
-            }
-        CleanupStack::PopAndDestroy( iapName );
-        }
-        
-    // use DHCP if we can
-    TBool ipfromSrv = GetBoolAttributeL( ECmIPAddFromServer );
-    if ( ipfromSrv )
-        {
-        SetStringAttributeL( ECmConfigDaemonManagerName, 
-                           KDaemonManagerName );
-        SetStringAttributeL( ECmConfigDaemonName, 
-                           KConfigDaemonName );
-        }
-    else
-        {
-        if ( FeatureSupported( KFeatureIdIPv6 ) )
-            {
-            SetStringAttributeL( ECmConfigDaemonManagerName, 
-                               KDaemonManagerName );
-            SetStringAttributeL( ECmConfigDaemonName, 
-                               KConfigDaemonName );
-            }
-        else
-            {
-            SetStringAttributeL( ECmConfigDaemonManagerName, 
-                               KNullDesC() );
-            SetStringAttributeL( ECmConfigDaemonName, 
-                               KNullDesC() );
-            }
-        }
-    }
-    
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::ConvertWLANConnectionStatesL
-// --------------------------------------------------------------------------
-//
-TWlanNetMode CCmPluginWlan::ConvertWLANConnectionStatesL(
-                                    TWlanConnectionMode aConnectionMode )
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::ConvertWLANConnectionStatesL " );
-    
-    switch ( aConnectionMode )
-        {
-        /** Values for possible WLAN connection states. */
-        /** Connection to an infrastructure network is active. */
-        case EWlanConnectionModeInfrastructure:    
-            {
-            return EInfra;
-            }
-        /** Connection to an ad-hoc network is active. */
-        case EWlanConnectionModeAdhoc:
-            {
-            return EAdhoc;
-            }
-        default:
-        	/**
-        	 * The connection mode. This can be either Ad-hoc or infrastructure.
-        	 * TWlanNetMode enum is to be used.
-        	 * ( TUint32 - default: EInfra )
-        	 */
-            {
-            return EInfra;
-            }
-        }
-    }
-  
-// ---------------------------------------------------------------------------
-// CCmPluginWlan::GetAdditionalUids
-// ---------------------------------------------------------------------------
-//
-void CCmPluginWlan::GetAdditionalUids( RArray<TUint32>& aIapIds )
-    {
-    for (TInt i = 0; i<iAdditionalCmsCreated.Count(); i++ )
-        {
-        aIapIds.Append(iAdditionalCmsCreated[i]);
-        }
-    }
-    
-// --------------------------------------------------------------------------
-// CCmPluginWlan::EnterWAPIPreSharedKeyL
-// --------------------------------------------------------------------------
-//
-TBool CCmPluginWlan::EnterWAPIPreSharedKeyL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlan::EnterWAPIPreSharedKeyL" );
-    
-    TBool retVal ( EFalse );
-    
-    HBufC* key = HBufC::NewLC( KWlanMaxKeyLength );
-    TPtr keyPtr( key->Des() );
-
-    if ( !iConnUiUtils )
-        {
-        iConnUiUtils = CConnectionUiUtilities::NewL();
-        }
-    
-    if ( iConnUiUtils->EasyWapiDlg( &keyPtr ) )
-        {
-        if ( !iWAPISecSettings )
-            {
-            iWAPISecSettings = CWAPISecuritySettings::NewL();
-            }
-        iWAPISecSettings->SetPreSharedKeyL( CWAPISecuritySettings::EWapiKeyAscii, *key );
-        retVal = ETrue;
-        }
-    CleanupStack::PopAndDestroy( key );
-    
-    return retVal;
-    }
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlandata.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:  Implementation of WLan network data holder class
-*
-*/
-
-#include <e32std.h>
-#include "cmpluginwlandata.h"
-#include "cmlogger.h"
-
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlanData::NewLC
-// --------------------------------------------------------------------------
-//
-CCmPluginWlanData* CCmPluginWlanData::NewLC()
-    {
-    CCmPluginWlanData* self = new( ELeave ) CCmPluginWlanData();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;    
-    }
-    
-    
-
-// --------------------------------------------------------------------------
-// CCmPluginWlanData::~CCmPluginWlanData
-// --------------------------------------------------------------------------
-//
-CCmPluginWlanData::~CCmPluginWlanData()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlanData::~CCmPluginWlanData" );
-    
-    delete iNetworkName;
-    iNetworkName = NULL;
-    CLOG_CLOSE;
-    }
-    
-    
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlanData::CCmPluginWlanData
-// --------------------------------------------------------------------------
-//
-CCmPluginWlanData::CCmPluginWlanData()
-    {
-    CLOG_CREATE;
-    }
-
-
-
-
-// --------------------------------------------------------------------------
-// CCmPluginWlanData::ConstructL
-// --------------------------------------------------------------------------
-//
-void CCmPluginWlanData::ConstructL()
-    {
-    LOGGER_ENTERFN( "CCmPluginWlanData::ConstructL" );
-    
-    iNetworkName = NULL;
-    }
-
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlandataarray.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +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:  Implementation of WLan network data holder class
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "cmpluginwlandata.h"
-#include "cmpluginwlandataarray.h"
-
-
-// CONSTANTS
-
-LOCAL_D const TInt KGranularity = 4;    ///< Granularity of the list.
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code that
-// might leave.
-//
-// ---------------------------------------------------------
-// CCmPluginWlanDataArray::CCmPluginWlanDataArray
-// ---------------------------------------------------------
-//
-CCmPluginWlanDataArray::CCmPluginWlanDataArray()
-: CArrayPtrFlat<CCmPluginWlanData>( KGranularity )
-    {
-    }
-
-// Destructor
-// ---------------------------------------------------------
-// CCmPluginWlanDataArray::~CCmPluginWlanDataArray
-// ---------------------------------------------------------
-//
-CCmPluginWlanDataArray::~CCmPluginWlanDataArray()
-    {
-
-    ResetAndDestroy();
-
-    }
-
-
-//  End of File
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpluginwlanproxy.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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:  Implementation of WLan Plugin proxy table
-*
-*/
-
-#include "cmpluginwlan.h"
-#include <e32std.h>
-#include <ecom/implementationproxy.h>
-
-// Exported proxy for instantiation method resolution
-// Define the interface UIDs
-const TImplementationProxy ImplementationTable[] = 
-	{
-	IMPLEMENTATION_PROXY_ENTRY( KUidWlanBearerType, CCmPluginWlan::NewL )
-	};
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
-                                                        TInt& aTableCount )
-	{
-	aTableCount = sizeof( ImplementationTable ) / 
-	                                        sizeof( TImplementationProxy );
-
-	return ImplementationTable;
-	}
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlanactivewaiter.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +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:  Implementation of CCmPluginWlanActiveWaiter.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cmpwlanactivewaiter.h"
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter* CCmPluginWlanActiveWaiter::NewL()
-// ---------------------------------------------------------
-//
-CCmPluginWlanActiveWaiter* CCmPluginWlanActiveWaiter::NewL( )
-    {
-    CCmPluginWlanActiveWaiter* self = 
-                         new ( ELeave ) CCmPluginWlanActiveWaiter( );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    return self;        
-    }
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::ConstructL()
-// ---------------------------------------------------------
-//
-void CCmPluginWlanActiveWaiter::ConstructL()
-    {     
-    CActiveScheduler::Add( this );            
-    }
-
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::CCmPluginWlanActiveWaiter()
-// ---------------------------------------------------------
-//
-CCmPluginWlanActiveWaiter::CCmPluginWlanActiveWaiter( )
-: CActive( KErrNone )
-    {
-    }
-    
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::~CCmPluginWlanActiveWaiter()
-// ---------------------------------------------------------
-//    
-CCmPluginWlanActiveWaiter::~CCmPluginWlanActiveWaiter()
-    {
-    Cancel();
-    }
-
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::DoCancel()
-// ---------------------------------------------------------
-// 
-void CCmPluginWlanActiveWaiter::DoCancel()
-    {
-    }
-     
- 
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::RunL()
-// ---------------------------------------------------------
-//     
-void CCmPluginWlanActiveWaiter::RunL()
-    {
-    if ( iWait.IsStarted() )
-        {
-        iWait.AsyncStop();
-        }
-    }
-
-// ---------------------------------------------------------
-// CCmPluginWlanActiveWaiter::WaitForRequest()
-// ---------------------------------------------------------
-// 
-TInt CCmPluginWlanActiveWaiter::WaitForRequest()
-    {
-    SetActive(); 
-    iWait.Start();
-    return iStatus.Int();
-    }    
-// End of File
-
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,976 +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:  Dialog for editing wlan settings for a wlan connection method
-*
-*/
-
-#include <badesca.h>
-#include <cmcommonui.h>
-#include <WEPSecuritySettingsUI.h>
-#include <WPASecuritySettingsUI.h>
-#include <wapisecuritysettingsui.h>
-#include <StringLoader.h>
-#include <akntextsettingpage.h>
-#include <cmwlanui.rsg>
-#include <ConnectionUiUtilities.h>
-#include <csxhelp/cp.hlp.hrh>
-#include <featmgr.h>
-#include "cmlogger.h"
-#include "cmwlancommonconstants.h"
-#include "cmpwlansettingsdlg.h"
-#include "cmpwlansettingsdlgadv.h"
-#include <cmpluginwlandef.h>
-#include "cmpluginwlan.h"
-#include "cmpluginmenucommands.hrh"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-const TUint32 KScanSSIDSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_HIDDEN_NETWORK_NO,
-    R_QTN_WLAN_SETT_HIDDEN_NETWORK_YES,
-    0
-    };
-
-const TUint32 KSecModeRBSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_SECURITY_MODE_OPEN,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WEP,
-    0
-    };
-
-const TUint32 KSecModeRBIRSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_SECURITY_MODE_OPEN,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WEP,
-    R_QTN_WLAN_SETT_SECURITY_MODE_802_1X,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WPA,
-    0
-    };
-
-const TUint32 KSecModeRBIRSelectionItemsWAPI[] = 
-    {
-    R_QTN_WLAN_SETT_SECURITY_MODE_OPEN,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WEP,
-    R_QTN_WLAN_SETT_SECURITY_MODE_802_1X,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WPA,
-    R_QTN_WLAN_SETT_SECURITY_MODE_WAPI,
-    0
-    };
-
-const TUint32 KNetworkRBSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_NETWORK_MODE_INFRA,
-    R_QTN_WLAN_SETT_NETWORK_MODE_ADHOC,
-    0
-    };
-
-const TUint32 KNWNameSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_NETWORK_NAME_USER_DEFINED,
-    R_QTN_WLAN_SETT_NETWORK_NAME_SCAN,
-    0
-    };
-    
-// ================= MEMBER FUNCTIONS =======================================
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::NewL()
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlg* CmPluginWlanSettingsDlg::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginWlanSettingsDlg* self = 
-	                new (ELeave) CmPluginWlanSettingsDlg( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::CmPluginWlanSettingsDlg()
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlg::CmPluginWlanSettingsDlg(
-                                            CCmPluginBaseEng& aCmPluginBase )
-    : CmPluginBaseSettingsDlg( aCmPluginBase )
-    , iNotifyFromAdv( KCmNotifiedNone )
-    {
-    
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-TInt CmPluginWlanSettingsDlg::ConstructAndRunLD( )
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CleanupStack::PushL( this );
-    LoadResourceL( KPluginWlanResDirAndFileName );
-    CleanupStack::Pop( this );
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlg::ConstructAndRunLD( );
-    }
-
-// ---------------------------------------------------------
-// CmPluginWlanSettingsDlg::~CmPluginWlanSettingsDlg
-// Destructor
-// ---------------------------------------------------------
-//
-CmPluginWlanSettingsDlg::~CmPluginWlanSettingsDlg()
-    {
-    iResourceReader.Close();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::RunAdvancedSettingsL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::RunAdvancedSettingsL()
-    {
-    CmPluginWlanSettingsDlgAdv* AdvDlg = 
-                        CmPluginWlanSettingsDlgAdv::NewL( iCmPluginBaseEng );
-
-    if (!iHasSettingChanged)
-        {
-        iHasSettingChanged = ETrue;
-        }                      
-    
-    // This view may have to un-register as watcher here
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherUnRegister();
-    
-    AdvDlg->RegisterParentView( this );
-    TInt ret = AdvDlg->ConstructAndRunLD();
-
-    if( iNotifyFromAdv == KCmNotifiedNone )
-        {
-        if( ret == KDialogUserExit )
-            {
-            iExitReason = KDialogUserExit;
-            ExitSettingsL(EFalse);
-            }
-        else
-            {
-            // Re-register as watcher if advanced view comes back or exists normally
-            cmMgr.WatcherRegisterL( this );
-            }
-        }
-    else
-        {
-        HandleCommsDatChangeL();
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginBaseSettingsDlg::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    TBool boolSettingVal( EFalse ); // just for helping make code readable
-    TInt valResId(0);
-    
-    // DATA BEARER - only for real bearer types
-    AppendSettingTextsL( aItemArray, ECmBearerSettingName );
-    // NETWORK NAME
-    AppendSettingTextsL( aItemArray, EWlanSSID );
-    // NETWORK STATUS
-    boolSettingVal = iCmPluginBaseEng.GetBoolAttributeL( EWlanScanSSID );
-    AppendSettingTextsL( aItemArray,
-                         EWlanScanSSID,
-                         boolSettingVal ? 
-                            R_QTN_WLAN_SETT_HIDDEN_NETWORK_YES :
-                            R_QTN_WLAN_SETT_HIDDEN_NETWORK_NO );
-    // WLAN NETWORK MODE    
-    switch( iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode ) )
-        {
-        case EAdhoc:
-            {
-            valResId = R_QTN_WLAN_SETT_NETWORK_MODE_ADHOC;
-            break;
-            }
-        case EInfra:
-            // fall-through intended here
-        default:
-            {
-            valResId = R_QTN_WLAN_SETT_NETWORK_MODE_INFRA;
-            break;
-            }
-        }
-    
-    AppendSettingTextsL( aItemArray, EWlanConnectionMode, valResId );
-    // WLAN SECURITY MODE
-    switch( iCmPluginBaseEng.GetIntAttributeL( EWlanSecurityMode ) )
-        {
-        case EWlanSecModeWep :
-            {
-            valResId = R_QTN_WLAN_SETT_SECURITY_MODE_WEP;
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            valResId = R_QTN_WLAN_SETT_SECURITY_MODE_802_1X;
-            break;
-            }
-        case EWlanSecModeWpa:
-        case EWlanSecModeWpa2:
-            {
-            valResId = R_QTN_WLAN_SETT_SECURITY_MODE_WPA;
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            valResId = R_QTN_WLAN_SETT_SECURITY_MODE_WAPI;
-            break;
-            }
-        case EWlanSecModeOpen:
-            // fall-through intended here
-        default:
-            {
-            valResId = R_QTN_WLAN_SETT_SECURITY_MODE_OPEN;
-            break;
-            }
-        }
-    AppendSettingTextsL( aItemArray, EWlanSecurityMode, valResId );
-    // WLAN SECURITY SETTINGS
-    AppendSettingTextsL( aItemArray,
-                         EWlanSecuritySettings,
-                         R_QTN_WLAN_SETT_SECURITY_SETTINGS,
-                         0 );
-    // HOMEPAGE
-    AppendSettingTextsL( aItemArray, ECmStartPage );
-    }
-
-    
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ChangeBoolSettingL
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::ChangeBoolSettingL( TUint32 aAttribute, 
-                                                  TInt aCommandId )
-    {
-    // Change was selected from menu
-    if ( aCommandId == EPluginBaseCmdChange )
-        {
-        TInt selected = 
-                    iCmPluginBaseEng.GetBoolAttributeL( aAttribute );
-        TInt origVal = selected;
-                    
-        if ( ShowRadioButtonSettingPageL( KScanSSIDSelectionItems, 
-                                          selected,
-                                          R_QTN_WLAN_SETT_HIDDEN_NETWORK ) &&
-             origVal != selected )
-             {
-             iCmPluginBaseEng.SetBoolAttributeL( aAttribute, 
-                                                 selected );
-             UpdateListBoxContentL();
-             }
-        }
-    // Selection key was selected
-    else        
-        {
-        switch ( aAttribute )
-            {
-            case EWlanScanSSID:
-                {        
-                TBool boolFromCM = EFalse;
-                boolFromCM = iCmPluginBaseEng.GetBoolAttributeL( aAttribute );
-                iCmPluginBaseEng.SetBoolAttributeL( aAttribute , !boolFromCM );
-                UpdateListBoxContentL();              
-                break;
-                }
-            case EWlanConnectionMode:
-                {        
-                TInt intFromCM = 0;
-                intFromCM = iCmPluginBaseEng.GetIntAttributeL( aAttribute );
-                iCmPluginBaseEng.SetIntAttributeL( aAttribute , !intFromCM );
-                UpdateListBoxContentL();              
-                break;
-                }
-            }
-        }
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ShowSecurityModeRBPageL
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::ShowSecurityModeRBPageL()
-    {   
-    TInt selected = 0;
-    TInt secMode = iCmPluginBaseEng.GetIntAttributeL( EWlanSecurityMode );
-    const TUint32* items = NULL;
-    
-    //converting secMode to idex
-    switch ( secMode ) 
-        {
-        case EWlanSecModeOpen:
-            {
-            selected = 0;
-            break;
-            }
-        case EWlanSecModeWep:
-            {
-            selected = 1;
-            break;
-            }
-        case EWlanSecMode802_1x:
-            {
-            selected = 2;
-            break;
-            }
-        case EWlanSecModeWpa:
-            {
-            selected = 3;
-            break;
-            }
-        // is this a real case?
-        case EWlanSecModeWpa2:
-            {
-            selected = 3;
-            break;
-            }
-        case EWlanSecModeWAPI:
-            {
-            selected = 4;
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            break;
-            }
-        }
-        
-    if ( iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode ) == EInfra )
-        {
-        if ( !FeatureManager::FeatureSupported( KFeatureIdFfWlanWapi ) )
-            {
-            items = KSecModeRBIRSelectionItems;
-            }
-        else
-            {
-            items = KSecModeRBIRSelectionItemsWAPI;
-            }
-        }
-    else
-        {
-        items = KSecModeRBSelectionItems;
-        }
-
-    TInt origVal = selected;
-    if ( ShowRadioButtonSettingPageL( items, 
-                                      selected, 
-                                      R_QTN_WLAN_SETT_SECURITY_MODE ) && 
-                                      origVal != selected )
-        {
-        if ( !iHasSettingChanged )
-            {
-            iHasSettingChanged = ETrue;
-            }
-		
-        switch ( selected )
-            {
-            case 0:
-                {
-                secMode = EWlanSecModeOpen;
-                break;
-                }
-            case 1:
-                {
-                secMode = EWlanSecModeWep;
-                break;
-                }
-            case 2:
-                {
-                secMode = EWlanSecMode802_1x;
-                break;
-                }
-            case 3:
-                {
-                secMode = EWlanSecModeWpa;
-                break;
-                }
-            case 4:
-                {
-                secMode = EWlanSecModeWAPI;
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                break;
-                }
-            }
-        iCmPluginBaseEng.SetIntAttributeL( EWlanSecurityMode , secMode );
-        UpdateListBoxContentL();
-        }
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ShowNetworkModeRBPageL
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg:: ShowNetworkModeRBPageL()
-    {   
-    const TUint32* items = KNetworkRBSelectionItems;
-    
-    TInt selected;
-    
-    // convert values to indices for UI
-    TInt netMode = iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode );
-    switch ( netMode )
-        {
-        case EAdhoc:
-            {
-            selected = 1;
-            break;
-            }
-        case EInfra:
-            {
-            selected = 0;
-            break;
-            }
-        }
-    
-    TInt origVal = selected;
-    if ( ShowRadioButtonSettingPageL( items, 
-                                      selected,
-                                      R_QTN_WLAN_SETT_NETWORK_MODE ) && 
-         origVal != selected )
-        {
-        // convert indices back to proper values
-        switch ( selected )
-            {
-            case 0:
-                {
-                netMode = EInfra;
-                break;
-                }
-            case 1:
-                {
-                netMode = EAdhoc;
-                TInt secMode = iCmPluginBaseEng.GetIntAttributeL( 
-                                                        EWlanSecurityMode );
-                if( secMode != EWlanSecModeOpen &&
-                    secMode != EWlanSecModeWep )
-                    {
-                    iCmPluginBaseEng.SetIntAttributeL( EWlanSecurityMode,
-                                                       EWlanSecModeOpen );
-                    }
-                break;
-                }
-            default:
-                {
-                User::Leave( KErrNotSupported );
-                break;
-                }
-            }
-        iCmPluginBaseEng.SetIntAttributeL( EWlanConnectionMode , netMode );
-        UpdateListBoxContentL();
-        }    
-    }  
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ShowWlanNWNamePageL
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::ShowWlanNWNamePageL()
-    {
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( EWlanSSID );
-    
-    const TUint32* items = KNWNameSelectionItems;
-    TInt selected ( EWlanNwNameUserDefined );
-    
-    // Display a radio button page with options: User defined and Scan for Networks
-    if ( ShowRadioButtonSettingPageL( items, 
-                                      selected,
-                                      R_QTN_WLAN_SETT_NETWORK_NAME ) )
-        {
-        if ( selected == EWlanNwNameUserDefined )
-            {
-            HBufC* oldssId = iCmPluginBaseEng.GetStringAttributeL( EWlanSSID );
-            CleanupStack::PushL( oldssId );
-            
-            TBuf<KCmWlanNWNameMaxLength> buf;
-            buf.Copy( *oldssId );
-
-            if ( TCmCommonUi::ShowConfirmationQueryWithInputL(
-                                           R_QTN_WLAN_PRMPT_NETWORK_NAME,
-                                           buf ) )
-                {
-                if( buf.Compare( *oldssId ) )
-                    // SSID is changed
-                    {
-                    iCmPluginBaseEng.SetStringAttributeL( EWlanSSID, buf );
-                    UpdateListBoxContentL();
-                    }
-                }
-            CleanupStack::PopAndDestroy( oldssId );
-            }
-        else
-            {
-            // Let's search for a WLAN network
-            TWlanSsid ssid;
-            TWlanConnectionMode connectionMode;
-            TWlanConnectionSecurityMode securityMode;
-
-            CConnectionUiUtilities* uiUtils = CConnectionUiUtilities::NewL();
-            CleanupStack::PushL( uiUtils );
-
-            if ( uiUtils->SearchWLANNetwork( ssid, connectionMode, securityMode ) )
-                {
-                HBufC* temp = HBufC::NewLC( convItem->iMaxLength );
-                temp->Des().Copy( ssid );
-                iCmPluginBaseEng.SetStringAttributeL( EWlanSSID, *temp );
-                CleanupStack::PopAndDestroy( temp );
-                
-                UpdateListBoxContentL();
-                }                
-            CleanupStack::PopAndDestroy( uiUtils );
-            }
-        }
-    }
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ShowPopupSettingPageL
-//---------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlg::ShowPopupSettingPageL( TUint32 aAttribute, 
-                                                      TInt aCommandId )
-    {    
-    TBool retval = EFalse;
-    switch( aAttribute )
-        {
-        // Boolean settings
-        case EWlanScanSSID:            
-            {
-            ChangeBoolSettingL( aAttribute, aCommandId );
-            break;
-            }
-        // Textual Settings
-        case ECmStartPage:                
-            {
-            ShowPopupTextSettingPageL( aAttribute );
-            break;
-            }
-        case EWlanSecurityMode:            
-            {
-            ShowSecurityModeRBPageL();
-            break;
-            }
-        case EWlanSecuritySettings:
-            {
-            TInt secmode = iCmPluginBaseEng.GetIntAttributeL( EWlanSecurityMode );
-            if(  secmode == EWlanSecModeOpen )
-                {
-                TCmCommonUi::ShowNoteL( R_QTN_WLAN_INFO_NO_SECURITY_SETTINGS, 
-                                        TCmCommonUi::ECmInfoNote);
-                }
-            else
-                {
-                TInt exitValue = 
-                    STATIC_CAST( CCmPluginWlan*, &iCmPluginBaseEng )->
-                           EditSecuritySettingsL( *( CEikonEnv::Static() ) );
-                if ( secmode == EWlanSecModeWep )
-                    { // WEP
-                    if ( exitValue & CWEPSecuritySettings::EExitReq )
-                        {
-                        iSecDialExit = ETrue;
-                        iExitReason = KDialogUserExit;
-                        ExitSettingsL(EFalse);
-                        }                    
-                    }
-                else if ( secmode == EWlanSecModeWAPI )
-                    {
-                    if ( exitValue & CWAPISecuritySettings::EExitReq )
-                        {
-                        iSecDialExit = ETrue;
-                        iExitReason = KDialogUserExit;
-                        ExitSettingsL(EFalse);
-                        }
-                    }
-                else
-                    {// 802.1x, WPA/WPA2
-                    if ( exitValue & CWPASecuritySettings::EExitReq )
-                        {
-                        iSecDialExit = ETrue;
-                        iExitReason = KDialogUserExit;
-                        ExitSettingsL(EFalse);
-                        }
-                    }
-                }
-            break;
-            }
-        case EWlanConnectionMode:
-            {
-            if ( aCommandId == EPluginBaseCmdChange )
-                {
-                ShowNetworkModeRBPageL();
-                }
-            else
-                {
-                TInt netMode = 
-                    iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode );
-                // OK has been used: switch the value without opening the setting page
-                if ( netMode == EInfra )
-                    {
-                    netMode = EAdhoc;
-                    TInt secMode = iCmPluginBaseEng.GetIntAttributeL( 
-                                                            EWlanSecurityMode );
-                    if( secMode != EWlanSecModeOpen &&
-                        secMode != EWlanSecModeWep )
-                        {
-                        iCmPluginBaseEng.SetIntAttributeL( EWlanSecurityMode,
-                                                           EWlanSecModeOpen );
-                        }
-                    }
-                else
-                    {
-                    netMode = EInfra;
-                    }
-                iCmPluginBaseEng.SetIntAttributeL( EWlanConnectionMode, netMode );
-                UpdateListBoxContentL();
-                }
-            break;
-            }
-        case EWlanSSID:
-            {
-            ShowWlanNWNamePageL();
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlg::ShowPopupSettingPageL( aAttribute, 
-                                                            aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-    
-        
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ExitSettingsL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::ExitSettingsL( TBool aConfirm )
-    {
-     if ( STATIC_CAST( CCmPluginWlan*, &iCmPluginBaseEng )->
-                                            AreSecuritySettingsValidL()  )
-        {
-        if ( iIsPossibleToSaveSetting && iHasSettingChanged )
-            {
-            iCmPluginBaseEng.UpdateL();
-            iHasSettingChanged = EFalse;
-            }
-        TryExitL( iExitReason );
-        }
-     else
-        {
-        HBufC* netwName = iCmPluginBaseEng.GetStringAttributeL( EWlanSSID );
-        TBool noNetwName = ETrue;
-        CleanupStack::PushL( netwName );
-        if ( *netwName != KNullDesC )
-            {
-            noNetwName = EFalse;
-            }
-        CleanupStack::PopAndDestroy( netwName );
-        
-        if ( noNetwName )
-            {
-            if ( aConfirm )
-                {                    
-                if ( TCmCommonUi::ShowConfirmationQueryL( 
-                                    R_QTN_WLAN_QUEST_NW_NAME_NOT_DEFINED ) )
-                    {
-                    iExitReason = KDialogUserDelete;
-                    TryExitL( iExitReason );
-                    }
-                else
-                    {
-                    // Find the index of the EWlanSSID item
-                    for ( TInt i = 0; i < iSettingIndex->Count(); i++ )
-                        {
-                        if ( iSettingIndex->At(i) == EWlanSSID )
-                            {
-                            SelectItem(i);
-                            break;
-                            }
-                        }
-                    }
-                }
-            else
-                {
-                TryExitL( iExitReason );
-                }
-            }
-        else
-            {
-            if ( iCmPluginBaseEng.GetIntAttributeL( EWlanSecurityMode ) == 
-                                                           EWlanSecModeOpen )
-                {
-                if ( iIsPossibleToSaveSetting && iHasSettingChanged)
-                {
-                    iCmPluginBaseEng.UpdateL();
-                    iHasSettingChanged = EFalse;
-                }
-                TryExitL( iExitReason );
-                }
-            else
-                {
-                if ( aConfirm )
-                    {                    
-                    if ( TCmCommonUi::ShowConfirmationQueryL( 
-                            R_QTN_WLAN_QUEST_SECURITY_SETTINGS_EMPTY ) )
-                        {
-                        iExitReason = KDialogUserDeleteConfirmed;
-                        TryExitL( iExitReason );
-                        }
-                     else                    
-                        {
-                        // Show the securitysettings page for WEP, other security mode
-                        // is not supported here(WPA has a default value)...
-                        ShowPopupSettingPageL( EWlanSecuritySettings, EWlanSecModeWep );
-                        }
-                    }
-                else
-                    {
-                    TryExitL( iExitReason );
-                    }
-                }
-            }
-        }
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlg::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-    
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case EAknSoftkeyChange:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }        
-        case EAknSoftkeyBack:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        case KDialogUserExit:
-            {
-            if ( iSecDialExit )
-                {
-                iSecDialExit = EFalse;
-                }
-            retval=ETrue;
-            break;
-            }
-        default:
-            {
-            retval = ETrue;
-            break;
-            }
-        }
-
-    return retval;
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdExit:
-            {
-            iExitReason = KDialogUserExit;
-            }            
-        case EAknSoftkeyBack:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            
-            ExitSettingsL(ETrue);
-            break;
-            }           
-        case EPluginBaseCmdAdvanced:
-            {
-            RunAdvancedSettingsL();
-            break;
-            }
-        case EPluginBaseCmdChange:
-        case EAknSoftkeyOk:
-            {
-            TUint32 attrib = iSettingIndex->At( iListbox->CurrentItemIndex() );
-            ShowPopupSettingPageL( attrib, aCommandId );
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlg::ProcessCommandL( aCommandId );
-            break;            
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::GetHelpContext
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    LOGGER_ENTERFN( "CmPluginWlanSettingsDlg::GetHelpContext" );	
-    aContext.iMajor = KHelpUidPlugin;
-    aContext.iContext = KSET_HLP_AP_SETTING_WLAN;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            // If parent destination is deleted by somebody then the dialog must exit back to main view
-            iExitReason = KDialogUserExit;
-            iCanEditingContinue = EFalse;
-
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-        
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        iCanEditingContinue = EFalse;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::NotifyParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::NotifyParentView( TInt aValue )
-    {
-    iNotifyFromAdv = aValue;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlg::HandleCommsDatChangeL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlg::HandleCommsDatChangeL()
-    {
-    if ( iCanEditingContinue )
-        {
-        // Set iCanEditingContinue to False so that exit fromn this view without update editings
-        iCanEditingContinue = EFalse;
-        }
-    
-    if( iNotifyFromAdv == KCmNotifiedIapIsNotInThisDestination || 
-            iNotifyFromAdv == KCmNotifiedIapDisappear )
-        {
-        TryExitL( iExitReason );
-        }
-    else if( iNotifyFromAdv == KCmNotifiedDestinationDisappear )
-        {
-        iExitReason = KDialogUserExit;
-        TryExitL( iExitReason );
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgadv.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,640 +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:  Dialog for setting WLAN plugin advanced settings
-*
-*/
-
-#include <StringLoader.h>
-#include <akntextsettingpage.h>
-#include <aknmfnesettingpage.h> // for IP dialog
-#include <cmcommonui.h>
-#include <cmwlanui.rsg>
-#include <AknQueryDialog.h>
-#include <cmpluginbaseeng.h>
-#include <cmmanager.rsg>
-#include <csxhelp/cp.hlp.hrh>
-
-#include "cmpluginwlan.h"
-#include <cmpluginwlandef.h>
-#include "cmpwlansettingsdlgadv.h"
-#include "cmpwlansettingsdlgipv4.h"
-#include "cmpwlansettingsdlgipv6.h"
-#include "cmwlancommonconstants.h"
-#include <cmpbasesettingsdlg.h>
-#include "cmpluginmenucommands.hrh"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-const TUint32 KAdhocChannelSelectionItems[] = 
-    {
-    R_QTN_WLAN_SETT_ADHOC_CHANNEL_AUTOMATIC,
-    R_QTN_WLAN_SETT_ADHOC_CHANNEL_USER_DEFINED,
-    0
-    };
-
-// ================= MEMBER FUNCTIONS =========================================
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::NewL()
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgAdv* CmPluginWlanSettingsDlgAdv::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginWlanSettingsDlgAdv* self = 
-	                new (ELeave) CmPluginWlanSettingsDlgAdv( aCmPluginBase );
-	return self;
-	}
-	
-	
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ConstructAndRunLD
-// Constructs the dialog and runs it.
-// --------------------------------------------------------------------------
-//
-TInt CmPluginWlanSettingsDlgAdv::ConstructAndRunLD( )
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlgAdv::ConstructAndRunLD();
-    }
-    	
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::CmPluginWlanSettingsDlgAdv()
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgAdv::CmPluginWlanSettingsDlgAdv( 
-                                        CCmPluginBaseEng& aCmPluginBase ) :
-    CmPluginBaseSettingsDlgAdv( aCmPluginBase ),
-    iIpv6Supported( aCmPluginBase.FeatureSupported( KFeatureIdIPv6 ) ),
-    iParent( NULL )
-    {
-    iHelpContext = KSET_HLP_AP_SETTING_WLAN_AS;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::~CmPluginWlanSettingsDlgAdv
-// Destructor
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgAdv::~CmPluginWlanSettingsDlgAdv()
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    if ( iIpv6Supported )
-        {
-        // IPV4 SETTINGS
-        AppendSettingTextsL( aItemArray,
-                             ESettingPageCmdIpv4,
-                             R_QTN_SET_IPV4_SETTINGS,
-                             0 );
-        // IPV6 SETTINGS
-        AppendSettingTextsL( aItemArray,
-                             ESettingPageCmdIpv6,
-                             R_QTN_SET_IPV6_SETTINGS,
-                             0 );
-        }
-    else
-        {
-        // PHONE IP ADDRESS
-        AppendSettingTextsL( aItemArray, EWlanIpAddr );
-        HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr );
-        TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr );
-        delete ipAddr; ipAddr = NULL;
-
-        if ( !isUnspec )
-            {
-            // SUBNET MASK
-            AppendSettingTextsL( aItemArray, EWlanIpNetMask );
-            // DEFAULT GATEWAY
-            AppendSettingTextsL( aItemArray, EWlanIpGateway );
-            }
-                
-        // PRIMARY NAME SERVER
-        AppendSettingTextsL( aItemArray, EWlanIpNameServer1 );
-        // SECONDARY NAME SERVER
-        AppendSettingTextsL( aItemArray, EWlanIpNameServer2 );
-        }
-    
-    // AD-HOC CHANNEL
-    if ( iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode ) == EAdhoc )
-        {
-        AppendSettingTextsL( aItemArray, EWlanChannelID );
-        }
-    
-    // PROXY SERVER ADDRESS
-    AppendSettingTextsL( aItemArray, ECmProxyServerName );            
-    // PROXY PORT NUMBER
-    AppendSettingTextsL( aItemArray, ECmProxyPortNumber );
-/*    
-    TInt valResId(0);
-    // Allow SSID Roaming?
-
-    TBool res = iCmPluginBaseEng.GetBoolAttributeL( EWlanAllowSSIDRoaming );
-    if ( res )
-        {
-        valResId = R_QTN_WLAN_SETT_SSID_ROAMING_ENABLED;
-        }
-    else
-        {
-        valResId = R_QTN_WLAN_SETT_SSID_ROAMING_DISABLED;
-        }    
-        
-    AppendSettingTextsL( aItemArray, EWlanAllowSSIDRoaming, valResId  );
-*/    
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ShowPopupSettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgAdv::ShowPopupSettingPageL( TUint32 aAttribute,
-                                                         TInt aCommandId )
-    {    
-    TBool retval = EFalse;
-    switch ( aAttribute )
-        {
-        case EWlanIpAddr:
-        case EWlanIpNetMask:
-        case EWlanIpGateway:
-        case EWlanIpNameServer1:
-        case EWlanIpNameServer2:        
-            {
-            ShowPopupIpSettingPageL( aAttribute );
-            break;
-            }        
-        case ESettingPageCmdIpv4:                
-            {
-            ShowIpv4SettingPageL();
-            break;
-            }
-        case ESettingPageCmdIpv6:                
-            {
-            ShowIpv6SettingPageL();
-            break;
-            }
-        case ECmProxyServerName:                
-            {
-            retval = ShowPopupTextSettingPageL( aAttribute );
-            break;
-            }
-        case ECmProxyPortNumber:                
-            {
-            retval = ShowPopupPortNumSettingPageL( aAttribute );
-            break;
-            }
-        case EWlanChannelID: // may not be correct
-            {
-            retval = ShowAdhocChannelSettingPageL();
-            break;
-            }
-        case EWlanAllowSSIDRoaming:
-            {
-//            retval = ShowAdhocChannelSettingPageL();
-            break;            
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL( aAttribute, aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ShowIpv4SettingPageL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgAdv::ShowIpv4SettingPageL()
-    {
-    TInt retVal( EFalse );
-    CmPluginWlanSettingsDlgIpv4* ipv4Dlg = 
-                    CmPluginWlanSettingsDlgIpv4::NewL( iCmPluginBaseEng );
-
-    // This view may have to un-register as watcher here
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherUnRegister();
-    
-    ipv4Dlg->RegisterParentView( this );
-    TInt ret = ipv4Dlg->ConstructAndRunLD();
-    
-    if( iNotifyFromIp == KCmNotifiedNone )
-        {
-        if ( ret == KDialogUserExit )
-            {
-            retVal = ETrue;
-            TryExitL( KDialogUserExit );
-            }
-        else
-            {
-            // Re-register as watcher if advanced view comes back or exists normally
-            cmMgr.WatcherRegisterL( this );
-            }
-        }
-    else
-        {
-        HandleCommsDatChangeL();
-        }
-    
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ShowIpv6SettingPageL
-// --------------------------------------------------------------------------
-//    
-TBool CmPluginWlanSettingsDlgAdv::ShowIpv6SettingPageL()
-    {
-    TInt retVal( EFalse );
-    CmPluginWlanSettingsDlgIpv6* ipv6Dlg = 
-                    CmPluginWlanSettingsDlgIpv6::NewL( iCmPluginBaseEng );
-
-    // This view may have to un-register as watcher here
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherUnRegister();
- 
-    ipv6Dlg->RegisterParentView( this );
-    TInt ret = ipv6Dlg->ConstructAndRunLD();
- 
-    if( iNotifyFromIp == KCmNotifiedNone )
-        {
-        if ( ret == KDialogUserExit )
-            {
-            retVal = ETrue;
-            TryExitL( KDialogUserExit );
-            }
-        else
-            {
-            // Re-register as watcher if advanced view comes back or exists normally
-            cmMgr.WatcherRegisterL( this );
-            }
-        }
-    else
-        {
-        HandleCommsDatChangeL();
-        }
-    
-    return retVal;
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ShowAdhocChannelSettingPageL
-// --------------------------------------------------------------------------
-//    
-TBool CmPluginWlanSettingsDlgAdv::ShowAdhocChannelSettingPageL()
-    {
-    TInt retVal( EFalse );
-    const TCmAttribConvTable* convItem = 
-                        iCmPluginBaseEng.ConvTableItem( EWlanChannelID );
-    const TUint32* items = KAdhocChannelSelectionItems;
-    TInt value = iCmPluginBaseEng.GetIntAttributeL( EWlanChannelID );
-    
-    TInt selected = value ? EAdhocUserDefined : EAdhocAutomatic;
-        
-    // Show the dialog  
-    if ( ShowRadioButtonSettingPageL( items, 
-                                      selected,
-                                      R_QTN_WLAN_SETT_ADHOC_CHANNEL ) )
-        {
-        // 'User defined' selected
-        if ( selected == EAdhocUserDefined )
-            {
-            // if EWlanChannelID doesn't have a valid number, use the defaul
-            if ( value < KCmAdhocChannelMinValue || value > KCmAdhocChannelMaxValue )
-                {
-                value = KCmAdhocChannelDefaultValue;
-                }
-            
-            TBool loop ( ETrue );
-            
-            do
-                {
-                HBufC* buf = HBufC::NewLC( convItem->iMaxLength );
-                TPtr ptr ( buf->Des() );
-                ptr.AppendNum( value );
-                
-                // Display a numeric query dialog
-                CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( ptr );
-                
-                dlg->PrepareLC( R_NUMERIC_QUERY );
-                dlg->SetMaxLength( convItem->iMaxLength );
-                dlg->SetDefaultInputMode( EAknEditorNumericInputMode );
-                dlg->MakeLeftSoftkeyVisible( EFalse );
-                
-                HBufC* prompt = StringLoader::LoadLC( 
-                                                R_QTN_WLAN_PRMPT_ADHOC_CHANNEL );
-                dlg->SetPromptL( *prompt );
-                CleanupStack::PopAndDestroy( prompt );
-                
-                // Show the popup
-                if ( dlg->RunLD() )
-                    {
-                    TLex lex ( ptr );
-                    lex.Val( value );
-                    
-                    // Check valid limits
-                    if ( value >= KCmAdhocChannelMinValue && 
-                         value <= KCmAdhocChannelMaxValue )
-                        {
-                        // set result                
-                        iCmPluginBaseEng.SetIntAttributeL( EWlanChannelID, value );
-                        loop = EFalse;
-                        UpdateListBoxContentL();
-                        retVal = ETrue;
-                        }
-                    else
-                        {
-                        value = value <  KCmAdhocChannelMinValue ? 
-                                         KCmAdhocChannelMinValue : 
-                                         KCmAdhocChannelMaxValue;
-                        }
-                    }
-                else
-                    {
-                    loop = EFalse;
-                    }
-                CleanupStack::PopAndDestroy( buf );
-                } while ( loop );
-            }
-        else
-            {
-            iCmPluginBaseEng.SetIntAttributeL( EWlanChannelID, EAdhocAutomatic );
-            UpdateListBoxContentL();
-            retVal = ETrue;
-            }        
-        }
-        
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv:: ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-    
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdExit:
-            {
-            iExitReason = KDialogUserExit;
-            }            
-        case EAknSoftkeyBack:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            
-            HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr );
-            TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr );
-            delete ipAddr; ipAddr = NULL;
-            
-            if ( !isUnspec )
-                {
-                ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpNetMask );
-                TBool isUnspec1 = IsUnspecifiedIPv4Address( *ipAddr );
-                delete ipAddr;
-                ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpGateway );
-                TBool isUnspec2 = IsUnspecifiedIPv4Address( *ipAddr );
-                delete ipAddr;
-                
-                if ( isUnspec1 || isUnspec2 )
-                    {
-                    if ( TCmCommonUi::ShowConfirmationQueryL(
-                            R_QTN_NETW_QUEST_IAP_INCOMPLETE_DELETE ) )
-                        {
-                        iCmPluginBaseEng.RestoreAttributeL( EWlanIpAddr );
-                        iCmPluginBaseEng.RestoreAttributeL( EWlanIpNetMask );
-                        iCmPluginBaseEng.RestoreAttributeL( EWlanIpGateway );
-                        iCmPluginBaseEng.RestoreAttributeL( EWlanIpDNSAddrFromServer );
-                        TryExitL( iExitReason );
-                        }
-                    }
-                 else
-                    {
-                    TryExitL( iExitReason );
-                    }
-                }
-            else
-                {
-                TryExitL( iExitReason );
-                }
-            break;
-            }  
-        case EAknSoftkeyOk:                    
-        case EPluginBaseCmdChange:
-            {
-            ShowPopupSettingPageL( 
-                        iSettingIndex->At( iListbox->CurrentItemIndex() ),
-                        aCommandId );
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgAdv::ProcessCommandL( aCommandId );
-            break;            
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::OkToExitL
-// Good to know : EAknSoftkeyCancel is never called, because
-// EEikDialogFlagNotifyEsc flag is not set in the resource.
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgAdv::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-
-    // Translate the button presses into commands for the appui & current
-    // view to handle
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case EAknSoftkeyChange:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }        
-        case EAknSoftkeyBack:
-            {
-            ProcessCommandL( aButtonId );
-            break;
-            }
-        case EAknSoftkeyOptions:
-            {
-            DisplayMenuL();
-            break;
-            }
-        default:
-            {
-            retval = ETrue;
-            break;
-            }
-        }
-
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::RegisterParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv::RegisterParentView( CCmParentViewNotifier* aParent )
-    {
-    iParent = aParent;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            if( iParent )
-                {
-                iParent->NotifyParentView( KCmNotifiedDestinationDisappear );
-                }
-            
-            // If parent destination is deleted by somebody then the dialog must exit back to main view
-            iExitReason = KDialogUserExit;
-            iCanEditingContinue = EFalse;
-
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-        
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::NotifyParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv::NotifyParentView( TInt aValue )
-    {
-    iNotifyFromIp = aValue;
-    
-    if( iParent )
-        {
-        iParent->NotifyParentView( aValue );
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgAdv::HandleCommsDatChangeL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgAdv::HandleCommsDatChangeL()
-    {
-    if ( iCanEditingContinue )
-        {
-        // Set iCanEditingContinue to False so that exit fromn this view without update editings
-        iCanEditingContinue = EFalse;
-        }
-    
-    if( iNotifyFromIp == KCmNotifiedIapIsNotInThisDestination || 
-            iNotifyFromIp == KCmNotifiedIapDisappear )
-        {
-        TryExitL( iExitReason );
-        }
-    else if( iNotifyFromIp == KCmNotifiedDestinationDisappear )
-        {
-        iExitReason = KDialogUserExit;
-        TryExitL( iExitReason );
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv4.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,397 +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:  WLAN Ipv4 settings dialog
-*
-*/
-
-#include <StringLoader.h>
-#include <akntitle.h>
-#include <akntextsettingpage.h>
-#include <aknmfnesettingpage.h>  // for IP dialog
-#include <cmcommonui.h>
-#include <cmwlanui.rsg>
-#include <cmmanager.rsg>
-#include <csxhelp/cp.hlp.hrh>
-
-#include <cmpluginbaseeng.h>
-#include <cmpluginwlandef.h>
-#include "cmpwlansettingsdlgipv4.h"
-#include "cmwlancommonconstants.h"
-#include "cmpluginmenucommands.hrh"
-#include "cmpluginmultilinedialog.h"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-// ================= MEMBER FUNCTIONS =========================================
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::NewL
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv4* CmPluginWlanSettingsDlgIpv4::NewL(
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginWlanSettingsDlgIpv4* self = 
-	            new ( ELeave ) CmPluginWlanSettingsDlgIpv4( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::CmPluginWlanSettingsDlgIpv4
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv4::CmPluginWlanSettingsDlgIpv4( 
-                                        CCmPluginBaseEng& aCmPluginBase ) :
-    CmPluginBaseSettingsDlgIp( aCmPluginBase ) ,
-    iParent( NULL )
-    {
-    iHelpContext = KSET_HLP_AP_WLAN_AS_IPV4;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-TInt CmPluginWlanSettingsDlgIpv4::ConstructAndRunLD()
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlgIp::ConstructAndRunLD();
-    }
-    
-// ---------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::~CmPluginWlanSettingsDlgIpv4
-// Destructor
-// ---------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv4::~CmPluginWlanSettingsDlgIpv4()
-    {
-    }
-
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv4::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    // PHONE IP ADDRESS
-    AppendSettingTextsL( aItemArray, EWlanIpAddr );
-    HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr );
-    TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr );
-    delete ipAddr; ipAddr = NULL;
-    
-    if ( !isUnspec )
-        {
-        // SUBNET MASK
-        AppendSettingTextsL( aItemArray, EWlanIpNetMask );
-        // DEFAULT GATEWAY
-        AppendSettingTextsL( aItemArray, EWlanIpGateway );
-        }
-
-    // DNS SERVERS IP ADDRESS
-    TBool boolValue = iCmPluginBaseEng.GetBoolAttributeL( 
-                                                EWlanIpDNSAddrFromServer );
-    AppendSettingTextsL( aItemArray,
-                         EWlanIpDNSAddrFromServer,
-                         boolValue ? 
-                                R_QTN_SET_DNS_SERVERS_AUTOMATIC : 
-                                R_QTN_SET_IP_USER_DEFINED );
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::ShowPopupSettingPageL
-//---------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgIpv4::ShowPopupSettingPageL( TUint32 aAttribute, 
-                                                          TInt aCommandId )
-    {
-    TBool retval = EFalse;
-    switch ( aAttribute )
-        {
-        case EWlanIpDNSAddrFromServer:
-            {
-            ShowPopupIPv4DNSEditorL( EWlanIpDNSAddrFromServer, 
-                                     EWlanIpNameServer1,
-                                     EWlanIpNameServer2 );
-            break;
-            }
-        case EWlanIpAddr:
-        case EWlanIpNetMask:
-        case EWlanIpGateway:
-            {
-            ShowPopupIpSettingPageL( aAttribute );
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgIp::ShowPopupSettingPageL( aAttribute, 
-                                                               aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::ProcessCommandL
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv4::ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdExit:
-            {
-            if ( ValidateAttribsL() )
-                {
-                CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-                cmMgr.WatcherUnRegister();
-                
-                iExitReason = KDialogUserExit;
-                TryExitL( iExitReason );
-                }
-            break;
-            }       
-        case EPluginBaseCmdChange:
-            {
-            ShowPopupSettingPageL( 
-                        iSettingIndex->At( iListbox->CurrentItemIndex() ),
-                        aCommandId );
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgIp::ProcessCommandL( aCommandId );
-            break;            
-            }
-       }
-   }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::OkToExitL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgIpv4::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-    
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyOk:
-        case EAknSoftkeyChange:
-            {
-            ProcessCommandL( EPluginBaseCmdChange );
-            break;
-            }
-        case EAknSoftkeyBack:
-            {
-            if ( ValidateAttribsL() )
-                {
-                CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-                cmMgr.WatcherUnRegister();
-                
-                iExitReason = KDialogUserBack;
-                retval = ETrue;
-                }
-            break;
-            }
-        default:
-            {
-            retval = CmPluginBaseSettingsDlgIp::OkToExitL( aButtonId );
-            break;
-            }
-        }
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::ValidateAttribsL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgIpv4::ValidateAttribsL()
-    {
-    TBool retVal ( EFalse );
-    HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr );
-    TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr );
-    delete ipAddr; ipAddr = NULL;
-    
-    if ( !isUnspec )
-        {
-        ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpNetMask );
-        TBool isUnspec1 = IsUnspecifiedIPv4Address( *ipAddr );
-        delete ipAddr;
-        ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpGateway );
-        TBool isUnspec2 = IsUnspecifiedIPv4Address( *ipAddr );
-        delete ipAddr;
-        
-        if ( isUnspec1 || isUnspec2 )
-            {
-            if ( TCmCommonUi::ShowConfirmationQueryL(
-                    R_QTN_NETW_QUEST_IAP_INCOMPLETE_DELETE ) )
-                {
-                // quit without saving, so restore attributes
-                iCmPluginBaseEng.RestoreAttributeL( EWlanIpAddr );
-                iCmPluginBaseEng.RestoreAttributeL( EWlanIpNetMask );
-                iCmPluginBaseEng.RestoreAttributeL( EWlanIpGateway );
-                iCmPluginBaseEng.RestoreAttributeL( EWlanIpDNSAddrFromServer );
-                retVal = ETrue;
-                }
-            }
-         else
-            {
-            retVal = ETrue;
-            }
-        }
-    else
-        {
-        retVal = ETrue;
-        }
-
-    return retVal;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::InitTextsL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv4::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    if ( iEikonEnv )
-        {
-        iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-        iTitlePane =
-            ( CAknTitlePane* )iStatusPane->ControlL(
-                                TUid::Uid( EEikStatusPaneUidTitle ) );
-
-        iOldTitleText = iTitlePane->Text()->AllocL();
-        HBufC* title = StringLoader::LoadLC ( R_QTN_SET_IPV4_SETTINGS );
-        iTitlePane->SetTextL( *title ) ;
-        CleanupStack::PopAndDestroy(title);                         
-        iNaviPane = ( CAknNavigationControlContainer* ) 
-                        iStatusPane->ControlL( 
-                                TUid::Uid( EEikStatusPaneUidNavi ) );
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-        iNaviPane->PushL( *iNaviDecorator );
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::RegisterParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv4::RegisterParentView( CCmParentViewNotifier* aParent )
-    {
-    iParent = aParent;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv4::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv4::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-    
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            if( iParent )
-                {
-                iParent->NotifyParentView( KCmNotifiedDestinationDisappear );
-                }
-            
-            // If parent destination is deleted by somebody then the dialog must exit back to main view
-            iExitReason = KDialogUserExit;
-            iCanEditingContinue = EFalse;
-     
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-        
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else // Legacy
-        {
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv6.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,351 +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:  WLAN Ipv6 settings dialog
-*
-*/
-
-#include <StringLoader.h>
-#include <akntitle.h>
-#include <aknnavide.h>
-#include <cmcommonui.h>
-#include <cmwlanui.rsg>
-#include <cmmanager.rsg>
-#include <csxhelp/cp.hlp.hrh>
-
-#include <cmpluginwlandef.h>
-#include "cmpluginwlan.h"
-#include "cmpwlansettingsdlgipv6.h"
-#include "cmwlancommonconstants.h"
-#include "cmpluginmenucommands.hrh"
-#include "cmpluginmultilinedialog.h"
-#include <cmcommonconstants.h>
-#include <cmpsettingsconsts.h>
-#include "cmmanagerimpl.h"
-
-using namespace CMManager;
-
-const TUint32 KIPv6SelectionItems[] = 
-    {
-    R_QTN_SET_DNS_SERVERS_AUTOMATIC,
-    R_QTN_SET_IP_WELL_KNOWN,
-    R_QTN_SET_IP_USER_DEFINED,
-    0
-    };
-    
-// ================= MEMBER FUNCTIONS =======================================
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::NewL
-// Two-phase dconstructor, second phase is ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv6* CmPluginWlanSettingsDlgIpv6::NewL( 
-                                            CCmPluginBaseEng& aCmPluginBase )
-	{
-	CmPluginWlanSettingsDlgIpv6* self = 
-	            new (ELeave) CmPluginWlanSettingsDlgIpv6( aCmPluginBase );
-	return self;
-	}
-	
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::CmPluginWlanSettingsDlgIpv6
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv6::CmPluginWlanSettingsDlgIpv6( 
-                                         CCmPluginBaseEng& aCmPluginBase ):
-    CmPluginBaseSettingsDlgIp( aCmPluginBase ) ,
-    iParent( NULL )
-    {
-    iHelpContext = KSET_HLP_AP_WLAN_AS_IPV6;
-    }
-    
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::~CmPluginWlanSettingsDlgIpv6
-// --------------------------------------------------------------------------
-//
-CmPluginWlanSettingsDlgIpv6::~CmPluginWlanSettingsDlgIpv6()
-    {
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::ConstructAndRunLD
-// --------------------------------------------------------------------------
-//
-TInt CmPluginWlanSettingsDlgIpv6::ConstructAndRunLD()
-    {
-    // Set this flag to allow edit continue
-    iCanEditingContinue = ETrue;
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    cmMgr.WatcherRegisterL( this );
-    
-    return CmPluginBaseSettingsDlgIp::ConstructAndRunLD();
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::UpdateListBoxContentBearerSpecificL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv6::UpdateListBoxContentBearerSpecificL( 
-                                                    CDesCArray& aItemArray )
-    {
-    TInt value( 0 );
-    
-    // DNS SERVERS IP ADDRESS
-    switch ( GetIPv6DNSTypeL( EWlanIp6NameServer1,
-                              EWlanIp6NameServer2 ) )
-        {
-        case EIpv6DNSDynamic:
-            {
-            value = R_QTN_SET_DNS_SERVERS_AUTOMATIC;
-            break;
-            }
-        case EIpv6DNSWellKnown:
-            {
-            value = R_QTN_SET_IP_WELL_KNOWN;
-            break;
-            }
-        case EIpv6DNSUserDefined:
-            {
-            value = R_QTN_SET_IP_USER_DEFINED;
-            break;
-            }
-        default:
-            {
-            User::Leave( KErrNotSupported );
-            break;
-            }
-        }
-    AppendSettingTextsL( aItemArray,
-                         EWlanIp6DNSAddrFromServer,
-                         value );
-    }    
-
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::ShowPopupSettingPageL
-//---------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgIpv6::ShowPopupSettingPageL( TUint32 aAttribute, 
-                                                          TInt aCommandId )
-    {    
-    TBool retval = EFalse;
-    switch ( aAttribute )
-        {
-        case EWlanIp6DNSAddrFromServer:        
-            {
-            ShowPopupIPv6DNSEditorL( KIPv6SelectionItems, 
-                                     EWlanIp6DNSAddrFromServer,
-                                     EWlanIp6NameServer1,
-                                     EWlanIp6NameServer2 );
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgIp::ShowPopupSettingPageL( aAttribute, 
-                                                               aCommandId );
-            break;            
-            }
-        }
-    return retval;
-    }
-    
-//---------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::InitTextsL
-// called before the dialog is shown to initialize localized textual data
-//---------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv6::InitTextsL()
-    {
-    // set pane text if neccessary...
-    // pane text needed if not pop-up...
-    if ( iEikonEnv )
-        {
-        iStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
-        iTitlePane = ( CAknTitlePane* )iStatusPane->ControlL(
-                                TUid::Uid( EEikStatusPaneUidTitle ) );
-
-        iOldTitleText = iTitlePane->Text()->AllocL();
-        HBufC* title = StringLoader::LoadLC ( R_QTN_SET_IPV6_SETTINGS );
-        iTitlePane->SetTextL( *title ) ;
-        CleanupStack::PopAndDestroy(title);                         
-        iNaviPane = ( CAknNavigationControlContainer* ) 
-                        iStatusPane->ControlL( 
-                                TUid::Uid( EEikStatusPaneUidNavi ) );
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-        iNaviPane->PushL( *iNaviDecorator );
-        }
-    }    
-    
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::ProcessCommandL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv6:: ProcessCommandL( TInt aCommandId )
-    {
-    if ( !iCanEditingContinue )
-        {
-        // We have to block all editing activity if database changed by
-        // other application
-        return;
-        }
-    
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-    
-    switch ( aCommandId )
-        {
-        case EPluginBaseCmdExit:
-            {
-            iExitReason = KDialogUserExit;
-            }
-        // fall-through intended here
-        case EAknSoftkeyBack:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            
-            TryExitL( iExitReason );
-            break;
-            }           
-        case EAknSoftkeyOk:
-        case EPluginBaseCmdChange:
-            {
-            TInt attrib = iSettingIndex->At( iListbox->CurrentItemIndex() );
-            ShowPopupSettingPageL( attrib, aCommandId);
-            break;
-            }
-        default:
-            {
-            CmPluginBaseSettingsDlgIp::ProcessCommandL( aCommandId );
-            break;            
-            }
-        }
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::OkToExitL
-// --------------------------------------------------------------------------
-//
-TBool CmPluginWlanSettingsDlgIpv6::OkToExitL( TInt aButtonId )
-    {
-    // Database has been changed by other application so exit from this view
-    // without update editings to database
-    if ( !iCanEditingContinue )
-        {
-        if ( iExitReason == KDialogUserExit )
-            {
-            iCmPluginBaseEng.CmMgr().WatcherUnRegister();
-            
-            // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call
-            TInt exitValue = KDialogUserExit;
-            iExitReason = KDialogUserBack;
-            // If destination has been deleted by other application
-            // then we may have to exit from Cmmgr
-            TryExitL( exitValue );
-            return EFalse;
-            }
-        else
-            {
-            // Exit from this view here to avoid possible update to databse
-            return ETrue;
-            }
-        }
-
-    TBool retval( EFalse );
-    
-    switch ( aButtonId )
-        {
-        case EAknSoftkeyBack:
-        case EAknSoftkeyExit:
-        case KDialogUserExit:
-            {
-            CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-            cmMgr.WatcherUnRegister();
-            
-            iExitReason = KDialogUserBack;
-            retval = ETrue;
-            }
-            break;
-        default:
-            {
-            retval = CmPluginBaseSettingsDlgIp::OkToExitL( aButtonId );
-            break;
-            }
-        }
-    return retval;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::RegisterParentView
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv6::RegisterParentView( CCmParentViewNotifier* aParent )
-    {
-    iParent = aParent;
-    }
-
-// --------------------------------------------------------------------------
-// CmPluginWlanSettingsDlgIpv6::CommsDatChangesL
-// --------------------------------------------------------------------------
-//
-void CmPluginWlanSettingsDlgIpv6::CommsDatChangesL()
-    {
-    if ( !iCanEditingContinue )
-        {
-        return;
-        }
-    
-    CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr();
-    CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination();
-    
-    if ( parentDest )
-        {
-        if( !cmMgr.DestinationStillExistedL( parentDest ) )
-            {
-            if( iParent )
-                {
-                iParent->NotifyParentView( KCmNotifiedDestinationDisappear );
-                }
-            
-            // If parent destination is deleted by somebody then the dialog must exit back to main view
-            iExitReason = KDialogUserExit; 
-            iCanEditingContinue = EFalse;
-
-            cmMgr.RemoveDestFromPool( parentDest );
-            delete parentDest;
-            return;
-            }
-
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-
-        cmMgr.RemoveDestFromPool( parentDest );
-        delete parentDest;
-        }
-    else
-        {
-        // We may have to go back to parent view if database is changed by other application
-        if( iParent )
-            {
-            iParent->NotifyParentView( KCmNotifiedIapDisappear );
-            }
-        iCanEditingContinue = EFalse;
-        }
-    }
--- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmwlancoveragecheck.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,413 +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:  Implementation of WLAN Coverage Check class
-*
-*/
-
-
-#include <wlanmgmtclient.h>
-
-#include "cmwlancoveragecheck.h"
-#include "cmpluginwlan.h"
-#include "cmpluginwlandata.h"
-#include "cmpluginwlandataarray.h"
-#include "cmlogger.h"
-
-
-/**
-* Management frame information element IDs.
-* needed to determine coverage
-*/
-enum T802Dot11InformationElementID
-    {
-    E802Dot11SsidIE                 = 0,
-    E802Dot11SupportedRatesIE       = 1,
-    E802Dot11FhParameterSetIE       = 2,
-    E802Dot11DsParameterSetIE       = 3,
-    E802Dot11CfParameterSetIE       = 4,
-    E802Dot11TimIE                  = 5,
-    E802Dot11IbssParameterSetIE     = 6,
-    E802Dot11CountryIE              = 7,
-    E802Dot11HoppingPatternParamIE  = 8,
-    E802Dot11HoppingPatternTableIE  = 9,
-    E802Dot11RequestIE              = 10,
-
-    E802Dot11ChallengeTextIE        = 16,
-    // Reserved for challenge text extension 17 - 31
-    E802Dot11ErpInformationIE       = 42,
-    E802Dot11ExtendedRatesIE        = 50,
-    E802Dot11AironetIE              = 133,
-    E802Dot11ApIpAddressIE          = 149,
-    E802Dot11RsnIE                  = 221
-    };
-
-
-/**
-* Bit masks for Capability Information field.
-*/
-enum T802Dot11CapabilityBitMask
-    {
-    E802Dot11CapabilityEssMask          = 0x0001,
-    E802Dot11CapabilityIbssMask         = 0x0002,
-    E802Dot11CapabilityCfPollableMask   = 0x0004,
-    E802Dot11CapabilityCfPollRequestMask= 0x0008,
-    E802Dot11CapabilityPrivacyMask      = 0x0010,
-    E802Dot11ShortPreambleMask          = 0x0020,
-    E802Dot11PbccMask                   = 0x0040,      
-    E802Dot11ChannelAgilityMask         = 0x0080
-    };
-
-
-// ======================= MEMBER FUNCTIONS =================================
-
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::CCmWlanCoverageCheck()
-// ----------------------------------------------------------------------------
-//
-CCmWlanCoverageCheck::CCmWlanCoverageCheck() : CActive( EPriorityStandard )
-    {
-    CActiveScheduler::Add( this );
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::~CCmWlanCoverageCheck()
-// ----------------------------------------------------------------------------
-//
-CCmWlanCoverageCheck::~CCmWlanCoverageCheck()
-    {
-    Cancel();
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::DoCancel
-// ----------------------------------------------------------------------------
-//
-void CCmWlanCoverageCheck::DoCancel()
-    {
-    iWait.AsyncStop();
-    }
-    
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::RunL
-// ----------------------------------------------------------------------------
-//
-void CCmWlanCoverageCheck::RunL()
-    {
-    CLOG_WRITE( "RunL entered" );
-    switch( iProgState )
-        {
-        case EScanning:
-            {
-             if( !iStatus.Int() )
-                // The list is ready 
-                {
-                iProgState = EDone;
-                iWait.AsyncStop();
-                }
-            else
-                // something went wrong -> no coverage.
-                {
-                iWait.AsyncStop();
-                }
-            }
-            break;            
-        case EDone:
-            {
-            iWait.AsyncStop();
-            }
-            break;
-            
-        default:
-            {
-            User::Leave( KErrCorrupt );
-            }
-        }
-    }
-
-
-
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::GetCoverageL
-// ----------------------------------------------------------------------------
-//
-TInt CCmWlanCoverageCheck::GetCoverageL()
-    {
-    LOGGER_ENTERFN( "CCmWlanCoverageCheck::GetCoverageL" );
-
-    iProgState = EServiceStatus;
-    iCoverage = 0;
-    
-    CWlanMgmtClient* wlanMgmt = CWlanMgmtClient::NewL();
-    CleanupStack::PushL( wlanMgmt );
-
-    CWlanScanInfo* scanInfo = CWlanScanInfo::NewL();
-    CleanupStack::PushL( scanInfo );
-
-    iProgState = EScanning;
-    
-    wlanMgmt->GetScanResults( iStatus, *scanInfo );
-    
-    SetActive();
-    iWait.Start();
-    
-    // now we have the results and might start to work on them...
-    if ( iProgState == EDone )
-        { //finished without error, work on the result...
-        CCmPluginWlanDataArray* wlandataarray = new ( ELeave ) 
-            CCmPluginWlanDataArray();
-        CleanupStack::PushL( wlandataarray );
-
-        for ( scanInfo->First(); !scanInfo->IsDone(); scanInfo->Next() )
-            {
-            // iWlanNetworks cannot be modified 'directly' in
-            // a const method (like GetBoolAttributeL), so we have to
-            // cast away the constness.
-            
-            // not simply count as before, but check if it is hidden,
-            // and do not allow duplicates...
-            TBool isHidden( EFalse );
-            
-            TUint8 ieLen( 0 );
-            const TUint8* ieData;
-            TBuf8<KWlanMaxSsidLength> ssid8;
-            
-            TInt ret = scanInfo->InformationElement( E802Dot11SsidIE, ieLen, 
-                                                      &ieData );
-            if ( ret == KErrNone ) 
-                {               
-                isHidden = IsHiddenSsid( ieLen, ieData );
-                if ( !isHidden )
-                    {
-                    // get the ssid
-                    ssid8.Copy( ieData, ieLen );
-                    HBufC* tmp = HBufC::NewLC(KWlanMaxSsidLength);
-                    TPtr tmpptr( tmp->Des() );
-                    
-                    tmpptr.Copy(ssid8);
-                    // get the signal strength                        
-                    TUint8 rxLevel8 = scanInfo->RXLevel();
-                    TInt rxLevel = static_cast< TInt >( rxLevel8 );
-                    
-                    // now add it to an array of CCmPluginWlanData,
-                    // as it is not hidden
-                    // the adding function should handle uniqeness and 
-                    // signal strength checking, it should contain only
-                    // the strongest signal!                        
-                    AddToArrayIfNeededL( *wlandataarray, rxLevel, tmpptr );
-                    
-                    CleanupStack::PopAndDestroy( tmp );
-                    }                
-                }
-            else
-                {
-                User::Leave( ret );
-                }
-            }
-        iCoverage = wlandataarray->Count();
-        
-        CleanupStack::PopAndDestroy( wlandataarray );
-
-        CleanupStack::PopAndDestroy( 2, wlanMgmt );
-        }
-    else
-        {
-        User::LeaveIfError( iStatus.Int() );        
-        }        
-        
-    return iCoverage;
-    }
-
-// ---------------------------------------------------------
-// CCmWlanCoverageCheck::IsHiddenSsid
-// ---------------------------------------------------------
-//    
-TBool CCmWlanCoverageCheck::IsHiddenSsid( TUint aSsidLength, 
-                                   const TUint8* aSsid ) const
-    {
-    LOGGER_ENTERFN( "CCmWlanCoverageCheck::IsHiddenSsid" );
-    
-    const TUint8 CSPACE = 0x20; 
-    TBool result( EFalse );
-    TBool result2( ETrue );
-
-    if ( !aSsidLength )
-        {
-        result = ETrue;
-        }
-
-    TInt count( 0 );
-    TUint8 temp( 0x00 );
-    
-    for ( TUint i( 0 ); i < aSsidLength; ++i )
-        {
-        temp = aSsid[i];
-        count += temp; // in hidden networks characters are: 0x00
-        result2 &= temp == CSPACE ;
-        }
-
-    if( !count || result2 )
-        {
-        result = ETrue;
-        }
-        
-    return result;    
-    }
-
-
-// ---------------------------------------------------------
-// CCmWlanCoverageCheck::AddToArrayIfNeededL
-// ---------------------------------------------------------
-//    
-void CCmWlanCoverageCheck::AddToArrayIfNeededL( 
-                            CCmPluginWlanDataArray& aArray, 
-                            TInt aRXLevel, 
-                            TDesC& aNetworkName ) const
-    {
-    LOGGER_ENTERFN( "CCmWlanCoverageCheck::AddToArrayIfNeededL" );
-
-    // first check if it is already in the array
-    
-    TBool found( EFalse );
-    TInt index( 0 );
-    TInt count = aArray.Count();
-    
-    while( ( index <  count ) && !found  )
-        {
-        if( ( aArray )[index]->iNetworkName->Compare( aNetworkName ) )
-            {
-            ++index;   
-            }
-        else
-            {
-            found = ETrue;
-            }
-        }
-
-    TSignalStrength strength = ( TSignalStrength )aRXLevel;
-    if ( found )
-        {
-        // if already exists, check signal strengths
-        TSignalStrength signal = ( aArray )[index]->iSignalStrength;
-        
-        // set to higher value
-        ( aArray )[index]->iSignalStrength = 
-                              signal < strength ? signal : strength ;
-        }
-    else
-        {
-        // new element, add it to array with signal strength!!
-        CCmPluginWlanData* data = CCmPluginWlanData::NewLC();
-        data->iNetworkName = aNetworkName.AllocL();
-        data->iSignalStrength = strength;
-        aArray.AppendL( data );
-        CleanupStack::Pop( data ); // item owned by list!
-        }    
-    }
-
-
-// ----------------------------------------------------------------------------
-// CCmWlanCoverageCheck::ScanForPromptedSsidL
-// ----------------------------------------------------------------------------
-//
-TBool CCmWlanCoverageCheck::ScanForPromptedSsidL( TWlanSsid aEnteredSsid,
-                                TBool aBroadcast,
-                                TWlanNetMode& aNetworkMode, 
-                                TWlanConnectionExtentedSecurityMode& aSecurityMode,
-                                TBool& aProtectedSetupSupported )
-    {
-    LOGGER_ENTERFN( "CCmWlanCoverageCheck::ScanForPromptedSsidL" );
-    
-    TBool found = EFalse;
-
-    iProgState = EServiceStatus;
-       
-    CWlanMgmtClient* wlanMgmt = CWlanMgmtClient::NewL();
-    CleanupStack::PushL( wlanMgmt );
-
-    CWlanScanInfo* scanInfo = CWlanScanInfo::NewL();
-    CleanupStack::PushL( scanInfo );
-
-    iProgState = EScanning;
-    
-    if ( aBroadcast )
-        {
-        wlanMgmt->GetScanResults( iStatus, *scanInfo );
-        }
-    else
-        {
-        wlanMgmt->GetScanResults( aEnteredSsid, iStatus, *scanInfo );
-        }
-
-    SetActive();
-    iWait.Start();
-    
-    // now we have the results and might start to work on them...
-    if ( iProgState == EDone )
-        {       //finished without error, work on the result...
-        TSignalStrength signalStrength = ESignalStrengthMin;
-
-        for ( scanInfo->First(); !scanInfo->IsDone(); scanInfo->Next() )
-            {
-            TUint8 ieLen( 0 );
-            const TUint8* ieData;
-            TBuf8<KWlanMaxSsidLength> ssid8;
-            
-            TInt ret = scanInfo->InformationElement( E802Dot11SsidIE, ieLen, 
-                                                     &ieData );
-            if ( ret == KErrNone ) 
-                {               
-                // get the ssid
-                ssid8.Copy( ieData, ieLen );
-                
-                if ( !aEnteredSsid.Compare( ssid8 ) )
-                    {
-                    // get the signal strength                        
-                    TUint8 rxLevel8 = scanInfo->RXLevel();
-                    TInt rxLevel = static_cast< TInt >( rxLevel8 );
-            
-                    TSignalStrength strength = ( TSignalStrength )rxLevel;
-                    if ( !found || ( found && strength < signalStrength ) )
-                        {
-                        found = ETrue;
-                        signalStrength = strength;
-
-                        aNetworkMode = ( scanInfo->Capability() & 
-                                         E802Dot11CapabilityEssMask ) ?
-                                       EInfra : EAdhoc;
-                        aSecurityMode = scanInfo->ExtendedSecurityMode();
-
-                        aProtectedSetupSupported = 
-                                        scanInfo->IsProtectedSetupSupported();
-                        }
-                    }
-                }
-            else
-                {
-                User::Leave( ret );
-                }
-        
-            }
-        
-        CleanupStack::PopAndDestroy( scanInfo );
-        CleanupStack::PopAndDestroy( wlanMgmt );
-        }
-    else
-        {
-        User::LeaveIfError( iStatus.Int() );        
-        }
-    
-    return found;
-    }
-
-
--- a/cmmanager/cmmgr/Rom/CmManager.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __CMMANAGER_IBY__
-#define __CMMANAGER_IBY__
-
-
-file=ABI_DIR\BUILD_DIR\cmmanager.dll     SHARED_LIB_DIR\cmmanager.dll
-SCALABLE_IMAGE(APP_RESOURCE_DIR,APP_RESOURCE_DIR,cmmanager)
-
-
-
-#endif // __CMMANAGER_IBY__
-
--- a/cmmanager/cmmgr/Rom/CmManagerResources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CMMANAGER_RESOURCES_IBY__
-#define __CMMANAGER_RESOURCES_IBY__
-
-
-
-data=ZRESOURCE\cmmanager.rsc                                  RESOURCE_FILES_DIR\cmmanager.rsc
-
-
-#endif
\ No newline at end of file
--- a/cmmanager/cmmgr/Rom/cmplugincsd.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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 __CMPLUGINCSD_IBY__
-#define __CMPLUGINCSD_IBY__
-
-
-ECOM_PLUGIN(cmplugincsd.dll,10281BB6.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,cmplugincsd)
-
-
-#endif // __CMPLUGINCSD_IBY__
--- a/cmmanager/cmmgr/Rom/cmplugincsdresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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 __CMPLUGINCSD_RESOURCES_IBY__
-#define __CMPLUGINCSD_RESOURCES_IBY__
-
-
-data = DATAZ_\RESOURCE_FILES_DIR\cmplugincsdui.rsc RESOURCE_FILES_DIR\cmplugincsdui.rsc
-
-
-#endif // __CMPLUGINCSD_RESOURCES_IBY__
\ No newline at end of file
--- a/cmmanager/cmmgr/Rom/cmpluginembdestination.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __CMPLUGIN_EMBDESTINATION_IBY__
-#define __CMPLUGIN_EMBDESTINATION_IBY__
-
-
-ECOM_PLUGIN(cmpluginembdestination.dll,1020737D.rsc)
-
-
-#endif // __CMPLUGIN_EMBDESTINATION_IBY__
--- a/cmmanager/cmmgr/Rom/cmpluginembdestinationresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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 __CMPLUGIN_EMBDESTINATION_RESOURCES_IBY__
-#define __CMPLUGIN_EMBDESTINATION_RESOURCES_IBY__
-
-
-data = DATAZ_\RESOURCE_FILES_DIR\cmpluginembdestinationui.rsc RESOURCE_FILES_DIR\cmpluginembdestinationui.rsc
-
-
-#endif // __CMPLUGIN_EMBDESTINATION_RESOURCES_IBY__
\ No newline at end of file
--- a/cmmanager/cmmgr/Rom/cmpluginpacketdata.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CMPLUGINPACKETDATA_IBY__
-#define __CMPLUGINPACKETDATA_IBY__
-
-
-ECOM_PLUGIN(cmpluginpacketdata.dll,1020737C.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,cmpluginpacketdata)
-
-
-#endif
--- a/cmmanager/cmmgr/Rom/cmpluginpacketdataresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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 __CMPLUGINPACKETDATA_RESOURCES_IBY__
-#define __CMPLUGINPACKETDATA_RESOURCES_IBY__
-
-
-data = DATAZ_\RESOURCE_FILES_DIR\cmpacketdataui.RSC     RESOURCE_FILES_DIR\cmpacketdataui.RSC
-
-
-#endif
\ No newline at end of file
--- a/cmmanager/cmmgr/Rom/cmpluginvpn.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CMPLUGINVPN_IBY__
-#define __CMPLUGINVPN_IBY__
-
-
-ECOM_PLUGIN(cmpluginvpn.dll,10281BBD.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,cmpluginvpn)
-
-
-#endif
--- a/cmmanager/cmmgr/Rom/cmpluginvpnresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /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 __CMPLUGINVPN_RESOURCES_IBY__
-#define __CMPLUGINVPN_RESOURCES_IBY__
-
-
-data = DATAZ_\RESOURCE_FILES_DIR\cmpluginvpnui.rsc     RESOURCE_FILES_DIR\cmpluginvpnui.rsc
-
-#
-#endif
\ No newline at end of file
--- a/cmmanager/cmmgr/Rom/cmpluginwlan.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __CMPLUGINWLAN_IBY__
-#define __CMPLUGINWLAN_IBY__
-
-#if defined( __PROTOCOL_WLAN ) 
-
-ECOM_PLUGIN(cmpluginwlan.dll,10281BB2.rsc)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,cmpluginwlan)
-
-#endif //   __PROTOCOL_WLAN
-
-#endif // __CMPLUGINWLAN_IBY__
--- a/cmmanager/cmmgr/Rom/cmpluginwlanresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __CMPLUGINWLAN_RESOURCES_IBY__
-#define __CMPLUGINWLAN_RESOURCES_IBY__
-
-#if (  defined( __PROTOCOL_WLAN ) )
-
-data = DATAZ_\RESOURCE_FILES_DIR\cmwlanui.rsc RESOURCE_FILES_DIR\cmwlanui.rsc
-
-#endif //  __PROTOCOL_WLAN
-
-#endif // __CMPLUGINWLAN_RESOURCES_IBY__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/BWinsCw/CmManager_prot_setupU.DEF	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,398 @@
+EXPORTS
+	??0CCmPluginBaseEng@@IAE@PAVTCmPluginInitParam@@@Z @ 1 NONAME ABSENT ; CCmPluginBaseEng::CCmPluginBaseEng(class TCmPluginInitParam *)
+	??0CCmPluginLanBase@@IAE@PAVTCmPluginInitParam@@@Z @ 2 NONAME ABSENT ; CCmPluginLanBase::CCmPluginLanBase(class TCmPluginInitParam *)
+	??0CmPluginBaseSettingsDlg@@QAE@AAVCCmPluginBaseEng@@@Z @ 3 NONAME ABSENT ; CmPluginBaseSettingsDlg::CmPluginBaseSettingsDlg(class CCmPluginBaseEng &)
+	??0CmPluginBaseSettingsDlgAdv@@QAE@AAVCCmPluginBaseEng@@@Z @ 4 NONAME ABSENT ; CmPluginBaseSettingsDlgAdv::CmPluginBaseSettingsDlgAdv(class CCmPluginBaseEng &)
+	??0CmPluginBaseSettingsDlgIp@@QAE@AAVCCmPluginBaseEng@@@Z @ 5 NONAME ABSENT ; CmPluginBaseSettingsDlgIp::CmPluginBaseSettingsDlgIp(class CCmPluginBaseEng &)
+	??0RCmDestination@@QAE@ABV0@@Z @ 6 NONAME ; RCmDestination::RCmDestination(class RCmDestination const &)
+	??0RCmDestinationExt@@QAE@ABV0@@Z @ 7 NONAME ; RCmDestinationExt::RCmDestinationExt(class RCmDestinationExt const &)
+	??1CCmApplicationSettingsUi@@UAE@XZ @ 8 NONAME ; CCmApplicationSettingsUi::~CCmApplicationSettingsUi(void)
+	??1CCmPluginBaseEng@@UAE@XZ @ 9 NONAME ABSENT ; CCmPluginBaseEng::~CCmPluginBaseEng(void)
+	??1CCmPluginLanBase@@MAE@XZ @ 10 NONAME ABSENT ; CCmPluginLanBase::~CCmPluginLanBase(void)
+	??1CCmSettingsUi@@UAE@XZ @ 11 NONAME ABSENT ; CCmSettingsUi::~CCmSettingsUi(void)
+	??1CmPluginBaseSettingsDlg@@UAE@XZ @ 12 NONAME ABSENT ; CmPluginBaseSettingsDlg::~CmPluginBaseSettingsDlg(void)
+	??1CmPluginBaseSettingsDlgAdv@@UAE@XZ @ 13 NONAME ABSENT ; CmPluginBaseSettingsDlgAdv::~CmPluginBaseSettingsDlgAdv(void)
+	??1CmPluginBaseSettingsDlgIp@@UAE@XZ @ 14 NONAME ABSENT ; CmPluginBaseSettingsDlgIp::~CmPluginBaseSettingsDlgIp(void)
+	??1RCmDestination@@QAE@XZ @ 15 NONAME ; RCmDestination::~RCmDestination(void)
+	??1RCmDestinationExt@@QAE@XZ @ 16 NONAME ; RCmDestinationExt::~RCmDestinationExt(void)
+	??4RCmDestination@@QAEAAV0@ABV0@@Z @ 17 NONAME ; class RCmDestination & RCmDestination::operator=(class RCmDestination const &)
+	??4RCmDestinationExt@@QAEAAV0@ABV0@@Z @ 18 NONAME ; class RCmDestinationExt & RCmDestinationExt::operator=(class RCmDestinationExt const &)
+	?AddCommonConversionTableL@CCmPluginBaseEng@@IAEXPBUTCmCommonAttrConvArrayItem@@@Z @ 19 NONAME ABSENT ; void CCmPluginBaseEng::AddCommonConversionTableL(struct TCmCommonAttrConvArrayItem const *)
+	?AddConnectionMethodL@RCmDestinationExt@@QAEHVRCmConnectionMethodExt@@@Z @ 20 NONAME ; int RCmDestinationExt::AddConnectionMethodL(class RCmConnectionMethodExt)
+	?AddConverstionTableL@CCmPluginBaseEng@@IAEXPAPAVCCDRecordBase@CommsDat@@PAHPBUTCmAttribConvTable@@@Z @ 21 NONAME ABSENT ; void CCmPluginBaseEng::AddConverstionTableL(class CommsDat::CCDRecordBase * *, int *, struct TCmAttribConvTable const *)
+	?AddEmbeddedDestinationL@RCmDestinationExt@@QAEHABV1@@Z @ 22 NONAME ; int RCmDestinationExt::AddEmbeddedDestinationL(class RCmDestinationExt const &)
+	?AddResourceFileL@CCmPluginBaseEng@@IAEXABVTDesC16@@@Z @ 23 NONAME ABSENT ; void CCmPluginBaseEng::AddResourceFileL(class TDesC16 const &)
+	?AllDestinationsL@CCmManagerImpl@@QAEXAAV?$RArray@K@@@Z @ 24 NONAME ABSENT ; void CCmManagerImpl::AllDestinationsL(class RArray<unsigned long> &)
+	?AllDestinationsL@RCmManager@@QBEXAAV?$RArray@K@@@Z @ 25 NONAME ; void RCmManager::AllDestinationsL(class RArray<unsigned long> &) const
+	?AllDestinationsL@RCmManagerExt@@QAEXAAV?$RArray@K@@@Z @ 26 NONAME ; void RCmManagerExt::AllDestinationsL(class RArray<unsigned long> &)
+	?AllocReadL@CCmPluginBaseEng@@IBEPAVHBufC16@@H@Z @ 27 NONAME ABSENT ; class HBufC16 * CCmPluginBaseEng::AllocReadL(int) const
+	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IAEXAAVCDesC16Array@@HH@Z @ 28 NONAME ABSENT ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int)
+	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IAEXAAVCDesC16Array@@HPBVHBufC16@@@Z @ 29 NONAME ABSENT ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, class HBufC16 const *)
+	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IBEXAAVCDesC16Array@@HHABVTDesC16@@H@Z @ 30 NONAME ABSENT ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int, class TDesC16 const &, int) const
+	?AppendSettingTextsL@CmPluginBaseSettingsDlg@@IBEXAAVCDesC16Array@@HHHH@Z @ 31 NONAME ABSENT ; void CmPluginBaseSettingsDlg::AppendSettingTextsL(class CDesC16Array &, int, int, int, int) const
+	?BearerPriorityArrayL@RCmManager@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 32 NONAME ; void RCmManager::BearerPriorityArrayL(class RArray<class TBearerPriority> &) const
+	?BearerPriorityArrayL@RCmManagerExt@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 33 NONAME ; void RCmManagerExt::BearerPriorityArrayL(class RArray<class TBearerPriority> &) const
+	?BearerRecordIdLC@CCmPluginLanBase@@MAEXAAPAVHBufC16@@AAK@Z @ 34 NONAME ABSENT ; void CCmPluginLanBase::BearerRecordIdLC(class HBufC16 * &, unsigned long &)
+	?CheckDNSServerAddressL@CCmPluginBaseEng@@QAEXHAAV?$CMDBField@VTDesC16@@@CommsDat@@0AAV?$CMDBField@H@3@@Z @ 35 NONAME ABSENT ; void CCmPluginBaseEng::CheckDNSServerAddressL(int, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<int> &)
+	?CheckIPv4ValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 36 NONAME ABSENT ; int CheckIPv4ValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?CheckIPv6ValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 37 NONAME ABSENT ; int CheckIPv6ValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?CheckIfAlreadyConnected@CCmPluginBaseEng@@MBEHXZ @ 38 NONAME ABSENT ; int CCmPluginBaseEng::CheckIfAlreadyConnected(void) const
+	?CheckIfNameModifiedL@CCmPluginBaseEng@@IBEXPAVCCDRecordBase@CommsDat@@@Z @ 39 NONAME ABSENT ; void CCmPluginBaseEng::CheckIfNameModifiedL(class CommsDat::CCDRecordBase *) const
+	?CheckPortNumberValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 40 NONAME ABSENT ; int CheckPortNumberValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?CheckRecordIdValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 41 NONAME ABSENT ; int CheckRecordIdValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?CheckWAPWspOptionValidityL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 42 NONAME ABSENT ; int CheckWAPWspOptionValidityL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?ClassifyIPv6Address@@YA?AW4TIPv6Types@CMManager@@ABVTDesC16@@@Z @ 43 NONAME ABSENT ; enum CMManager::TIPv6Types ClassifyIPv6Address(class TDesC16 const &)
+	?CleanupGlobalPriorityArray@RCmManager@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 44 NONAME ; void RCmManager::CleanupGlobalPriorityArray(class RArray<class TBearerPriority> &) const
+	?CleanupGlobalPriorityArray@RCmManagerExt@@QBEXAAV?$RArray@VTBearerPriority@@@@@Z @ 45 NONAME ; void RCmManagerExt::CleanupGlobalPriorityArray(class RArray<class TBearerPriority> &) const
+	?Close@CCmTransactionHandler@@QAEXXZ @ 46 NONAME ABSENT ; void CCmTransactionHandler::Close(void)
+	?Close@RCmConnectionMethod@@QAEXXZ @ 47 NONAME ; void RCmConnectionMethod::Close(void)
+	?Close@RCmConnectionMethodExt@@QAEXXZ @ 48 NONAME ; void RCmConnectionMethodExt::Close(void)
+	?Close@RCmDestination@@QAEXXZ @ 49 NONAME ; void RCmDestination::Close(void)
+	?Close@RCmDestinationExt@@QAEXXZ @ 50 NONAME ; void RCmDestinationExt::Close(void)
+	?Close@RCmManager@@QAEXXZ @ 51 NONAME ; void RCmManager::Close(void)
+	?Close@RCmManagerExt@@QAEXXZ @ 52 NONAME ; void RCmManagerExt::Close(void)
+	?ConnectionMethodByIDL@RCmDestination@@QBE?AVRCmConnectionMethod@@H@Z @ 53 NONAME ; class RCmConnectionMethod RCmDestination::ConnectionMethodByIDL(int) const
+	?ConnectionMethodByIDL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@H@Z @ 54 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodByIDL(int)
+	?ConnectionMethodCount@CCmDestinationImpl@@QAEHXZ @ 55 NONAME ABSENT ; int CCmDestinationImpl::ConnectionMethodCount(void)
+	?ConnectionMethodCount@RCmDestination@@QBEHXZ @ 56 NONAME ; int RCmDestination::ConnectionMethodCount(void) const
+	?ConnectionMethodCount@RCmDestinationExt@@QAEHXZ @ 57 NONAME ; int RCmDestinationExt::ConnectionMethodCount(void)
+	?ConnectionMethodL@CCmDestinationImpl@@QAEPAVCCmPluginBaseEng@@H@Z @ 58 NONAME ABSENT ; class CCmPluginBaseEng * CCmDestinationImpl::ConnectionMethodL(int)
+	?ConnectionMethodL@CCmManagerImpl@@QAEPAVCCmPluginBaseEng@@K@Z @ 59 NONAME ABSENT ; class CCmPluginBaseEng * CCmManagerImpl::ConnectionMethodL(unsigned long)
+	?ConnectionMethodL@CCmManagerImpl@@QAEXAAV?$RArray@K@@HHHH@Z @ 60 NONAME ABSENT ; void CCmManagerImpl::ConnectionMethodL(class RArray<unsigned long> &, int, int, int, int)
+	?ConnectionMethodL@RCmDestination@@QBE?AVRCmConnectionMethod@@H@Z @ 61 NONAME ; class RCmConnectionMethod RCmDestination::ConnectionMethodL(int) const
+	?ConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@H@Z @ 62 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodL(int)
+	?ConnectionMethodL@RCmManager@@QBE?AVRCmConnectionMethod@@K@Z @ 63 NONAME ; class RCmConnectionMethod RCmManager::ConnectionMethodL(unsigned long) const
+	?ConnectionMethodL@RCmManager@@QBEXAAV?$RArray@K@@HHH@Z @ 64 NONAME ; void RCmManager::ConnectionMethodL(class RArray<unsigned long> &, int, int, int) const
+	?ConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 65 NONAME ; class RCmConnectionMethodExt RCmManagerExt::ConnectionMethodL(unsigned long)
+	?ConnectionMethodL@RCmManagerExt@@QAEXAAV?$RArray@K@@HHH@Z @ 66 NONAME ; void RCmManagerExt::ConnectionMethodL(class RArray<unsigned long> &, int, int, int)
+	?ConstructAndRunLD@CmPluginBaseSettingsDlg@@QAEHXZ @ 67 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ConstructAndRunLD(void)
+	?ConstructL@CCmPluginBaseEng@@MAEXXZ @ 68 NONAME ABSENT ; void CCmPluginBaseEng::ConstructL(void)
+	?ConstructL@CCmPluginLanBase@@MAEXXZ @ 69 NONAME ABSENT ; void CCmPluginLanBase::ConstructL(void)
+	?ConvTableItem@CCmPluginBaseEng@@QAEPBUTCmAttribConvTable@@K@Z @ 70 NONAME ABSENT ; struct TCmAttribConvTable const * CCmPluginBaseEng::ConvTableItem(unsigned long)
+	?CopyConnectionMethodL@RCmManagerExt@@QAEHAAVRCmDestinationExt@@AAVRCmConnectionMethodExt@@@Z @ 71 NONAME ; int RCmManagerExt::CopyConnectionMethodL(class RCmDestinationExt &, class RCmConnectionMethodExt &)
+	?CreateConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 72 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(unsigned long)
+	?CreateConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@K@Z @ 73 NONAME ; class RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(unsigned long)
+	?CreateCopyL@CCmPluginBaseEng@@UBEPAV1@XZ @ 74 NONAME ABSENT ; class CCmPluginBaseEng * CCmPluginBaseEng::CreateCopyL(void) const
+	?CreateCopyL@RCmConnectionMethodExt@@QAE?AV1@XZ @ 75 NONAME ; class RCmConnectionMethodExt RCmConnectionMethodExt::CreateCopyL(void)
+	?CreateDestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@ABVTDesC16@@@Z @ 76 NONAME ; class RCmDestinationExt RCmManagerExt::CreateDestinationL(class TDesC16 const &)
+	?CreateNewL@CCmPluginBaseEng@@UAEXXZ @ 77 NONAME ABSENT ; void CCmPluginBaseEng::CreateNewL(void)
+	?CreateNewServiceRecordL@CCmPluginLanBase@@MAEXXZ @ 78 NONAME ABSENT ; void CCmPluginLanBase::CreateNewServiceRecordL(void)
+	?DeleteConnectionMethodL@RCmDestinationExt@@QAEXAAVRCmConnectionMethodExt@@@Z @ 79 NONAME ; void RCmDestinationExt::DeleteConnectionMethodL(class RCmConnectionMethodExt &)
+	?DeleteL@CCmPluginBaseEng@@UAEHHH@Z @ 80 NONAME ABSENT ; int CCmPluginBaseEng::DeleteL(int, int)
+	?DeleteL@RCmConnectionMethodExt@@QAEHXZ @ 81 NONAME ; int RCmConnectionMethodExt::DeleteL(void)
+	?DeleteLD@CCmDestinationImpl@@QAEXXZ @ 82 NONAME ABSENT ; void CCmDestinationImpl::DeleteLD(void)
+	?DeleteLD@RCmDestinationExt@@QAEXXZ @ 83 NONAME ; void RCmDestinationExt::DeleteLD(void)
+	?Destination@CCmPluginBaseEng@@UBEPAVCCmDestinationImpl@@XZ @ 84 NONAME ABSENT ; class CCmDestinationImpl * CCmPluginBaseEng::Destination(void) const
+	?DestinationL@CCmManagerImpl@@QAEPAVCCmDestinationImpl@@K@Z @ 85 NONAME ABSENT ; class CCmDestinationImpl * CCmManagerImpl::DestinationL(unsigned long)
+	?DestinationL@RCmConnectionMethod@@QBE?AVRCmDestination@@XZ @ 86 NONAME ; class RCmDestination RCmConnectionMethod::DestinationL(void) const
+	?DestinationL@RCmConnectionMethodExt@@QBE?AVRCmDestinationExt@@XZ @ 87 NONAME ; class RCmDestinationExt RCmConnectionMethodExt::DestinationL(void) const
+	?DestinationL@RCmManager@@QBE?AVRCmDestination@@K@Z @ 88 NONAME ; class RCmDestination RCmManager::DestinationL(unsigned long) const
+	?DestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@K@Z @ 89 NONAME ; class RCmDestinationExt RCmManagerExt::DestinationL(unsigned long)
+	?DynInitMenuPaneL@CmPluginBaseSettingsDlg@@MAEXHPAVCEikMenuPane@@@Z @ 90 NONAME ABSENT ; void CmPluginBaseSettingsDlg::DynInitMenuPaneL(int, class CEikMenuPane *)
+	?DynInitMenuPaneL@CmPluginBaseSettingsDlgAdv@@UAEXHPAVCEikMenuPane@@@Z @ 91 NONAME ABSENT ; void CmPluginBaseSettingsDlgAdv::DynInitMenuPaneL(int, class CEikMenuPane *)
+	?DynInitMenuPaneL@CmPluginBaseSettingsDlgIp@@UAEXHPAVCEikMenuPane@@@Z @ 92 NONAME ABSENT ; void CmPluginBaseSettingsDlgIp::DynInitMenuPaneL(int, class CEikMenuPane *)
+	?EasyWlanIdL@CCmManagerImpl@@QAEKXZ @ 93 NONAME ABSENT ; unsigned long CCmManagerImpl::EasyWlanIdL(void)
+	?EasyWlanIdL@RCmManager@@QBEKXZ @ 94 NONAME ; unsigned long RCmManager::EasyWlanIdL(void) const
+	?EasyWlanIdL@RCmManagerExt@@QAEKXZ @ 95 NONAME ; unsigned long RCmManagerExt::EasyWlanIdL(void)
+	?ElementId@RCmDestination@@QBEKXZ @ 96 NONAME ; unsigned long RCmDestination::ElementId(void) const
+	?ElementId@RCmDestinationExt@@QAEKXZ @ 97 NONAME ; unsigned long RCmDestinationExt::ElementId(void)
+	?EnableChargeCardL@CCmPluginBaseEng@@AAEXH@Z @ 98 NONAME ABSENT ; void CCmPluginBaseEng::EnableChargeCardL(int)
+	?EnableLocationL@CCmPluginBaseEng@@AAEXH@Z @ 99 NONAME ABSENT ; void CCmPluginBaseEng::EnableLocationL(int)
+	?EnableProxyL@CCmPluginBaseEng@@AAEXH@Z @ 100 NONAME ABSENT ; void CCmPluginBaseEng::EnableProxyL(int)
+	?FeatureSupported@CCmPluginBaseEng@@SAHH@Z @ 101 NONAME ABSENT ; int CCmPluginBaseEng::FeatureSupported(int)
+	?GetBearerInfoBoolL@CCmManagerImpl@@QBEHKK@Z @ 102 NONAME ABSENT ; int CCmManagerImpl::GetBearerInfoBoolL(unsigned long, unsigned long) const
+	?GetBearerInfoBoolL@RCmManager@@QBEHKK@Z @ 103 NONAME ; int RCmManager::GetBearerInfoBoolL(unsigned long, unsigned long) const
+	?GetBearerInfoBoolL@RCmManagerExt@@QBEHKK@Z @ 104 NONAME ; int RCmManagerExt::GetBearerInfoBoolL(unsigned long, unsigned long) const
+	?GetBearerInfoIntL@CCmManagerImpl@@QBEKKK@Z @ 105 NONAME ABSENT ; unsigned long CCmManagerImpl::GetBearerInfoIntL(unsigned long, unsigned long) const
+	?GetBearerInfoIntL@RCmManager@@QBEKKK@Z @ 106 NONAME ; unsigned long RCmManager::GetBearerInfoIntL(unsigned long, unsigned long) const
+	?GetBearerInfoIntL@RCmManagerExt@@QBEKKK@Z @ 107 NONAME ; unsigned long RCmManagerExt::GetBearerInfoIntL(unsigned long, unsigned long) const
+	?GetBearerInfoString8L@CCmManagerImpl@@QBEPAVHBufC8@@KK@Z @ 108 NONAME ABSENT ; class HBufC8 * CCmManagerImpl::GetBearerInfoString8L(unsigned long, unsigned long) const
+	?GetBearerInfoString8L@RCmManager@@QBEPAVHBufC8@@KK@Z @ 109 NONAME ; class HBufC8 * RCmManager::GetBearerInfoString8L(unsigned long, unsigned long) const
+	?GetBearerInfoString8L@RCmManagerExt@@QBEPAVHBufC8@@KK@Z @ 110 NONAME ; class HBufC8 * RCmManagerExt::GetBearerInfoString8L(unsigned long, unsigned long) const
+	?GetBearerInfoStringL@CCmManagerImpl@@QBEPAVHBufC16@@KK@Z @ 111 NONAME ABSENT ; class HBufC16 * CCmManagerImpl::GetBearerInfoStringL(unsigned long, unsigned long) const
+	?GetBearerInfoStringL@RCmManager@@QBEPAVHBufC16@@KK@Z @ 112 NONAME ; class HBufC16 * RCmManager::GetBearerInfoStringL(unsigned long, unsigned long) const
+	?GetBearerInfoStringL@RCmManagerExt@@QBEPAVHBufC16@@KK@Z @ 113 NONAME ; class HBufC16 * RCmManagerExt::GetBearerInfoStringL(unsigned long, unsigned long) const
+	?GetBoolAttributeL@CCmPluginBaseEng@@UBEHK@Z @ 114 NONAME ABSENT ; int CCmPluginBaseEng::GetBoolAttributeL(unsigned long) const
+	?GetBoolAttributeL@RCmConnectionMethod@@QBEHK@Z @ 115 NONAME ; int RCmConnectionMethod::GetBoolAttributeL(unsigned long) const
+	?GetBoolAttributeL@RCmConnectionMethodExt@@QBEHK@Z @ 116 NONAME ; int RCmConnectionMethodExt::GetBoolAttributeL(unsigned long) const
+	?GetConnectionMethodInfoBoolL@CCmManagerImpl@@QBEHKK@Z @ 117 NONAME ABSENT ; int CCmManagerImpl::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoBoolL@RCmManager@@QBEHKK@Z @ 118 NONAME ; int RCmManager::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoBoolL@RCmManagerExt@@QBEHKK@Z @ 119 NONAME ; int RCmManagerExt::GetConnectionMethodInfoBoolL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoIntL@CCmManagerImpl@@QBEKKK@Z @ 120 NONAME ABSENT ; unsigned long CCmManagerImpl::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoIntL@RCmManager@@QBEKKK@Z @ 121 NONAME ; unsigned long RCmManager::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoIntL@RCmManagerExt@@QBEKKK@Z @ 122 NONAME ; unsigned long RCmManagerExt::GetConnectionMethodInfoIntL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoString8L@CCmManagerImpl@@QBEPAVHBufC8@@KK@Z @ 123 NONAME ABSENT ; class HBufC8 * CCmManagerImpl::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoString8L@RCmManager@@QBEPAVHBufC8@@KK@Z @ 124 NONAME ; class HBufC8 * RCmManager::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoString8L@RCmManagerExt@@QBEPAVHBufC8@@KK@Z @ 125 NONAME ; class HBufC8 * RCmManagerExt::GetConnectionMethodInfoString8L(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoStringL@CCmManagerImpl@@QBEPAVHBufC16@@KK@Z @ 126 NONAME ABSENT ; class HBufC16 * CCmManagerImpl::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoStringL@RCmManager@@QBEPAVHBufC16@@KK@Z @ 127 NONAME ; class HBufC16 * RCmManager::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
+	?GetConnectionMethodInfoStringL@RCmManagerExt@@QBEPAVHBufC16@@KK@Z @ 128 NONAME ; class HBufC16 * RCmManagerExt::GetConnectionMethodInfoStringL(unsigned long, unsigned long) const
+	?GetHelpContext@CmPluginBaseSettingsDlg@@UBEXAAVTCoeHelpContext@@@Z @ 129 NONAME ABSENT ; void CmPluginBaseSettingsDlg::GetHelpContext(class TCoeHelpContext &) const
+	?GetIPv6DNSTypeL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 130 NONAME ABSENT ; int CmPluginBaseSettingsDlg::GetIPv6DNSTypeL(unsigned long, unsigned long)
+	?GetIntAttributeL@CCmPluginBaseEng@@UBEKK@Z @ 131 NONAME ABSENT ; unsigned long CCmPluginBaseEng::GetIntAttributeL(unsigned long) const
+	?GetIntAttributeL@RCmConnectionMethod@@QBEKK@Z @ 132 NONAME ; unsigned long RCmConnectionMethod::GetIntAttributeL(unsigned long) const
+	?GetIntAttributeL@RCmConnectionMethodExt@@QBEKK@Z @ 133 NONAME ; unsigned long RCmConnectionMethodExt::GetIntAttributeL(unsigned long) const
+	?GetString8AttributeL@CCmPluginBaseEng@@UBEPAVHBufC8@@K@Z @ 134 NONAME ABSENT ; class HBufC8 * CCmPluginBaseEng::GetString8AttributeL(unsigned long) const
+	?GetString8AttributeL@RCmConnectionMethod@@QBEPAVHBufC8@@K@Z @ 135 NONAME ; class HBufC8 * RCmConnectionMethod::GetString8AttributeL(unsigned long) const
+	?GetString8AttributeL@RCmConnectionMethodExt@@QBEPAVHBufC8@@K@Z @ 136 NONAME ; class HBufC8 * RCmConnectionMethodExt::GetString8AttributeL(unsigned long) const
+	?GetStringAttributeL@CCmPluginBaseEng@@UBEPAVHBufC16@@K@Z @ 137 NONAME ABSENT ; class HBufC16 * CCmPluginBaseEng::GetStringAttributeL(unsigned long) const
+	?GetStringAttributeL@RCmConnectionMethod@@QBEPAVHBufC16@@K@Z @ 138 NONAME ; class HBufC16 * RCmConnectionMethod::GetStringAttributeL(unsigned long) const
+	?GetStringAttributeL@RCmConnectionMethodExt@@QBEPAVHBufC16@@K@Z @ 139 NONAME ; class HBufC16 * RCmConnectionMethodExt::GetStringAttributeL(unsigned long) const
+	?GlobalBearerPriority@CCmPluginBaseEng@@IBEHABVTDesC16@@@Z @ 140 NONAME ABSENT ; int CCmPluginBaseEng::GlobalBearerPriority(class TDesC16 const &) const
+	?GlobalUiBearerPriority@CCmPluginBaseEng@@IBEHABVTDesC16@@@Z @ 141 NONAME ABSENT ; int CCmPluginBaseEng::GlobalUiBearerPriority(class TDesC16 const &) const
+	?HandleListBoxEventL@CmPluginBaseSettingsDlg@@MAEXPAVCEikListBox@@W4TListBoxEvent@MEikListBoxObserver@@@Z @ 142 NONAME ABSENT ; void CmPluginBaseSettingsDlg::HandleListBoxEventL(class CEikListBox *, enum MEikListBoxObserver::TListBoxEvent)
+	?HandleListboxDataChangeL@CmPluginBaseSettingsDlg@@QAEXXZ @ 143 NONAME ABSENT ; void CmPluginBaseSettingsDlg::HandleListboxDataChangeL(void)
+	?IAPRecordElementId@CCmPluginBaseEng@@QBEKXZ @ 144 NONAME ABSENT ; unsigned long CCmPluginBaseEng::IAPRecordElementId(void) const
+	?IconL@CCmDestinationImpl@@QAEPAVCGulIcon@@XZ @ 145 NONAME ABSENT ; class CGulIcon * CCmDestinationImpl::IconL(void)
+	?IconL@RCmDestination@@QBEPAVCGulIcon@@XZ @ 146 NONAME ABSENT ; class CGulIcon * RCmDestination::IconL(void) const
+	?IconL@RCmDestinationExt@@QAEPAVCGulIcon@@XZ @ 147 NONAME ABSENT ; class CGulIcon * RCmDestinationExt::IconL(void)
+	?Id@RCmDestination@@QBEKXZ @ 148 NONAME ; unsigned long RCmDestination::Id(void) const
+	?Id@RCmDestinationExt@@QAEKXZ @ 149 NONAME ; unsigned long RCmDestinationExt::Id(void)
+	?InitTextsL@CmPluginBaseSettingsDlg@@UAEXXZ @ 150 NONAME ABSENT ; void CmPluginBaseSettingsDlg::InitTextsL(void)
+	?InitializeWithUiL@CCmPluginLanBase@@UAEHH@Z @ 151 NONAME ABSENT ; int CCmPluginLanBase::InitializeWithUiL(int)
+	?IsConnectedL@CCmDestinationImpl@@QBEHXZ @ 152 NONAME ABSENT ; int CCmDestinationImpl::IsConnectedL(void) const
+	?IsConnectedL@RCmDestination@@QBEHXZ @ 153 NONAME ; int RCmDestination::IsConnectedL(void) const
+	?IsConnectedL@RCmDestinationExt@@QBEHXZ @ 154 NONAME ; int RCmDestinationExt::IsConnectedL(void) const
+	?IsHidden@CCmDestinationImpl@@QAEHXZ @ 155 NONAME ABSENT ; int CCmDestinationImpl::IsHidden(void)
+	?IsHidden@RCmDestination@@QBEHXZ @ 156 NONAME ; int RCmDestination::IsHidden(void) const
+	?IsHidden@RCmDestinationExt@@QAEHXZ @ 157 NONAME ; int RCmDestinationExt::IsHidden(void)
+	?IsProtected@CCmPluginBaseEng@@QBEHXZ @ 158 NONAME ABSENT ; int CCmPluginBaseEng::IsProtected(void) const
+	?IsUnspecifiedIPv4Address@@YAHABVTDesC16@@@Z @ 159 NONAME ABSENT ; int IsUnspecifiedIPv4Address(class TDesC16 const &)
+	?LoadL@CCmPluginBaseEng@@UAEXK@Z @ 160 NONAME ABSENT ; void CCmPluginBaseEng::LoadL(unsigned long)
+	?LoadResourceL@CmPluginBaseSettingsDlg@@IAEHABVTDesC16@@@Z @ 161 NONAME ABSENT ; int CmPluginBaseSettingsDlg::LoadResourceL(class TDesC16 const &)
+	?LoadServiceSettingL@CCmPluginBaseEng@@MAEXXZ @ 162 NONAME ABSENT ; void CCmPluginBaseEng::LoadServiceSettingL(void)
+	?LoadServiceSettingL@CCmPluginLanBase@@UAEXXZ @ 163 NONAME ABSENT ; void CCmPluginLanBase::LoadServiceSettingL(void)
+	?MetadataL@RCmDestination@@QBEKW4TSnapMetadataField@CMManager@@@Z @ 164 NONAME ; unsigned long RCmDestination::MetadataL(enum CMManager::TSnapMetadataField) const
+	?MetadataL@RCmDestinationExt@@QBEKW4TSnapMetadataField@CMManager@@@Z @ 165 NONAME ; unsigned long RCmDestinationExt::MetadataL(enum CMManager::TSnapMetadataField) const
+	?ModifyPriorityL@RCmDestinationExt@@QAEXAAVRCmConnectionMethodExt@@I@Z @ 166 NONAME ; void RCmDestinationExt::ModifyPriorityL(class RCmConnectionMethodExt &, unsigned int)
+	?MoveConnectionMethodL@RCmManagerExt@@QAEHAAVRCmDestinationExt@@0AAVRCmConnectionMethodExt@@@Z @ 167 NONAME ; int RCmManagerExt::MoveConnectionMethodL(class RCmDestinationExt &, class RCmDestinationExt &, class RCmConnectionMethodExt &)
+	?NameLC@CCmDestinationImpl@@QAEPAVHBufC16@@XZ @ 168 NONAME ABSENT ; class HBufC16 * CCmDestinationImpl::NameLC(void)
+	?NameLC@RCmDestination@@QBEPAVHBufC16@@XZ @ 169 NONAME ; class HBufC16 * RCmDestination::NameLC(void) const
+	?NameLC@RCmDestinationExt@@QAEPAVHBufC16@@XZ @ 170 NONAME ; class HBufC16 * RCmDestinationExt::NameLC(void)
+	?NewL@CCmApplicationSettingsUi@@SAPAV1@XZ @ 171 NONAME ; class CCmApplicationSettingsUi * CCmApplicationSettingsUi::NewL(void)
+	?NewL@CCmApplicationSettingsUiImpl@@SAPAV1@XZ @ 172 NONAME ABSENT ; class CCmApplicationSettingsUiImpl * CCmApplicationSettingsUiImpl::NewL(void)
+	?NewL@CCmConnSettingsUiImpl@@SAPAV1@PAVCCmManagerImpl@@@Z @ 173 NONAME ABSENT ; class CCmConnSettingsUiImpl * CCmConnSettingsUiImpl::NewL(class CCmManagerImpl *)
+	?NewL@CCmDestinationImpl@@SAPAV1@AAVCCmManagerImpl@@ABVTDesC16@@@Z @ 174 NONAME ABSENT ; class CCmDestinationImpl * CCmDestinationImpl::NewL(class CCmManagerImpl &, class TDesC16 const &)
+	?NewL@CCmDestinationImpl@@SAPAV1@AAVCCmManagerImpl@@I@Z @ 175 NONAME ABSENT ; class CCmDestinationImpl * CCmDestinationImpl::NewL(class CCmManagerImpl &, unsigned int)
+	?NewL@CCmPluginMultiLineDialog@@SAPAV1@AAVTDes16@@0W4TTone@CAknQueryDialog@@@Z @ 176 NONAME ABSENT ; class CCmPluginMultiLineDialog * CCmPluginMultiLineDialog::NewL(class TDes16 &, class TDes16 &, enum CAknQueryDialog::TTone)
+	?NewL@CCmSettingsUi@@SAPAV1@XZ @ 177 NONAME ABSENT ; class CCmSettingsUi * CCmSettingsUi::NewL(void)
+	?NewLC@CCmApplicationSettingsUi@@SAPAV1@XZ @ 178 NONAME ; class CCmApplicationSettingsUi * CCmApplicationSettingsUi::NewLC(void)
+	?NumOfConnMethodReferencesL@CCmPluginBaseEng@@UAEHXZ @ 179 NONAME ABSENT ; int CCmPluginBaseEng::NumOfConnMethodReferencesL(void)
+	?OkToExitL@CmPluginBaseSettingsDlg@@MAEHH@Z @ 180 NONAME ABSENT ; int CmPluginBaseSettingsDlg::OkToExitL(int)
+	?OpenL@RCmManager@@QAEXXZ @ 181 NONAME ; void RCmManager::OpenL(void)
+	?OpenL@RCmManagerExt@@QAEXXZ @ 182 NONAME ; void RCmManagerExt::OpenL(void)
+	?OpenLC@RCmManager@@QAEXXZ @ 183 NONAME ; void RCmManager::OpenLC(void)
+	?OpenLC@RCmManagerExt@@QAEXXZ @ 184 NONAME ; void RCmManagerExt::OpenLC(void)
+	?PreLayoutDynInitL@CmPluginBaseSettingsDlg@@MAEXXZ @ 185 NONAME ABSENT ; void CmPluginBaseSettingsDlg::PreLayoutDynInitL(void)
+	?PrepareToLoadRecordsL@CCmPluginBaseEng@@MAEXXZ @ 186 NONAME ABSENT ; void CCmPluginBaseEng::PrepareToLoadRecordsL(void)
+	?PrepareToUpdateRecordsL@CCmPluginBaseEng@@MAEXXZ @ 187 NONAME ABSENT ; void CCmPluginBaseEng::PrepareToUpdateRecordsL(void)
+	?PrepareToUpdateRecordsL@CCmPluginLanBase@@UAEXXZ @ 188 NONAME ABSENT ; void CCmPluginLanBase::PrepareToUpdateRecordsL(void)
+	?PriorityL@CCmDestinationImpl@@QAEIAAVCCmPluginBaseEng@@@Z @ 189 NONAME ABSENT ; unsigned int CCmDestinationImpl::PriorityL(class CCmPluginBaseEng &)
+	?PriorityL@RCmDestination@@QBEIABVRCmConnectionMethod@@@Z @ 190 NONAME ; unsigned int RCmDestination::PriorityL(class RCmConnectionMethod const &) const
+	?PriorityL@RCmDestinationExt@@QAEIABVRCmConnectionMethodExt@@@Z @ 191 NONAME ; unsigned int RCmDestinationExt::PriorityL(class RCmConnectionMethodExt const &)
+	?ProcessCommandL@CmPluginBaseSettingsDlg@@UAEXH@Z @ 192 NONAME ABSENT ; void CmPluginBaseSettingsDlg::ProcessCommandL(int)
+	?ProtectionLevel@CCmDestinationImpl@@QAE?AW4TProtectionLevel@CMManager@@XZ @ 193 NONAME ABSENT ; enum CMManager::TProtectionLevel CCmDestinationImpl::ProtectionLevel(void)
+	?ProtectionLevel@RCmDestination@@QBE?AW4TProtectionLevel@CMManager@@XZ @ 194 NONAME ; enum CMManager::TProtectionLevel RCmDestination::ProtectionLevel(void) const
+	?ProtectionLevel@RCmDestinationExt@@QAE?AW4TProtectionLevel@CMManager@@XZ @ 195 NONAME ; enum CMManager::TProtectionLevel RCmDestinationExt::ProtectionLevel(void)
+	?ReadDefConnL@RCmManager@@QAEXAAUTCmDefConnValue@@@Z @ 196 NONAME ; void RCmManager::ReadDefConnL(struct TCmDefConnValue &)
+	?ReadDefConnL@RCmManagerExt@@QAEXAAUTCmDefConnValue@@@Z @ 197 NONAME ; void RCmManagerExt::ReadDefConnL(struct TCmDefConnValue &)
+	?ReadOnlyAttributeL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 198 NONAME ABSENT ; int ReadOnlyAttributeL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?RemoveAllReferencesL@RCmManagerExt@@QAEXAAVRCmConnectionMethodExt@@@Z @ 199 NONAME ; void RCmManagerExt::RemoveAllReferencesL(class RCmConnectionMethodExt &)
+	?RemoveCommonConversionTable@CCmPluginBaseEng@@IAEXPBUTCmCommonAttrConvArrayItem@@@Z @ 200 NONAME ABSENT ; void CCmPluginBaseEng::RemoveCommonConversionTable(struct TCmCommonAttrConvArrayItem const *)
+	?RemoveConnectionMethodL@RCmDestinationExt@@QAEXVRCmConnectionMethodExt@@@Z @ 201 NONAME ; void RCmDestinationExt::RemoveConnectionMethodL(class RCmConnectionMethodExt)
+	?RemoveConnectionMethodL@RCmManagerExt@@QAEXAAVRCmDestinationExt@@AAVRCmConnectionMethodExt@@@Z @ 202 NONAME ; void RCmManagerExt::RemoveConnectionMethodL(class RCmDestinationExt &, class RCmConnectionMethodExt &)
+	?RemoveConversionTable@CCmPluginBaseEng@@IAEXPBUTCmAttribConvTable@@@Z @ 203 NONAME ABSENT ; void CCmPluginBaseEng::RemoveConversionTable(struct TCmAttribConvTable const *)
+	?RemoveFromPool@CCmDestinationImpl@@QAEXXZ @ 204 NONAME ABSENT ; void CCmDestinationImpl::RemoveFromPool(void)
+	?RemoveResourceFile@CCmPluginBaseEng@@IAEXABVTDesC16@@@Z @ 205 NONAME ABSENT ; void CCmPluginBaseEng::RemoveResourceFile(class TDesC16 const &)
+	?Reset@CCmPluginBaseEng@@IAEXXZ @ 206 NONAME ABSENT ; void CCmPluginBaseEng::Reset(void)
+	?RestoreAttributeL@CCmPluginBaseEng@@UAEXK@Z @ 207 NONAME ABSENT ; void CCmPluginBaseEng::RestoreAttributeL(unsigned long)
+	?RunAdvancedSettingsL@CmPluginBaseSettingsDlgAdv@@UAEXXZ @ 208 NONAME ABSENT ; void CmPluginBaseSettingsDlgAdv::RunAdvancedSettingsL(void)
+	?RunAdvancedSettingsL@CmPluginBaseSettingsDlgIp@@UAEXXZ @ 209 NONAME ABSENT ; void CmPluginBaseSettingsDlgIp::RunAdvancedSettingsL(void)
+	?RunApplicationSettingsL@CCmApplicationSettingsUi@@QAEHAAUTCmSettingSelection@@@Z @ 210 NONAME ; int CCmApplicationSettingsUi::RunApplicationSettingsL(struct TCmSettingSelection &)
+	?RunApplicationSettingsL@CCmApplicationSettingsUi@@QAEHAAUTCmSettingSelection@@IAAV?$RArray@K@@@Z @ 211 NONAME ; int CCmApplicationSettingsUi::RunApplicationSettingsL(struct TCmSettingSelection &, unsigned int, class RArray<unsigned long> &)
+	?RunApplicationSettingsL@CCmApplicationSettingsUiImpl@@QAEHAAUTCmSettingSelection@@@Z @ 212 NONAME ABSENT ; int CCmApplicationSettingsUiImpl::RunApplicationSettingsL(struct TCmSettingSelection &)
+	?RunApplicationSettingsL@CCmConnSettingsUiImpl@@QAEHAAUTCmSettingSelection@@IAAV?$RArray@K@@@Z @ 213 NONAME ABSENT ; int CCmConnSettingsUiImpl::RunApplicationSettingsL(struct TCmSettingSelection &, unsigned int, class RArray<unsigned long> &)
+	?RunSettingsL@CCmPluginLanBase@@UAEHXZ @ 214 NONAME ABSENT ; int CCmPluginLanBase::RunSettingsL(void)
+	?RunSettingsL@CCmSettingsUi@@QAE?AW4TResult@1@XZ @ 215 NONAME ABSENT ; enum CCmSettingsUi::TResult CCmSettingsUi::RunSettingsL(void)
+	?SelectDestinationDlgL@CCmSettingsUi@@QAEHAAK@Z @ 216 NONAME ABSENT ; int CCmSettingsUi::SelectDestinationDlgL(unsigned long &)
+	?SelectItem@CmPluginBaseSettingsDlg@@IAEXH@Z @ 217 NONAME ABSENT ; void CmPluginBaseSettingsDlg::SelectItem(int)
+	?ServiceRecord@CCmPluginLanBase@@ABEAAVCCDLANServiceRecord@CommsDat@@XZ @ 218 NONAME ABSENT ; class CommsDat::CCDLANServiceRecord & CCmPluginLanBase::ServiceRecord(void) const
+	?ServiceRecordIdLC@CCmPluginLanBase@@MAEXAAPAVHBufC16@@AAK@Z @ 219 NONAME ABSENT ; void CCmPluginLanBase::ServiceRecordIdLC(class HBufC16 * &, unsigned long &)
+	?Session@CCmPluginBaseEng@@QBEAAVCMDBSession@CommsDat@@XZ @ 220 NONAME ABSENT ; class CommsDat::CMDBSession & CCmPluginBaseEng::Session(void) const
+	?SetBoolAttributeL@CCmPluginBaseEng@@UAEXKH@Z @ 221 NONAME ABSENT ; void CCmPluginBaseEng::SetBoolAttributeL(unsigned long, int)
+	?SetBoolAttributeL@RCmConnectionMethodExt@@QAEXKH@Z @ 222 NONAME ; void RCmConnectionMethodExt::SetBoolAttributeL(unsigned long, int)
+	?SetDNSServerAddressL@CCmPluginBaseEng@@QAEXKABVTDesC16@@K0KH@Z @ 223 NONAME ABSENT ; void CCmPluginBaseEng::SetDNSServerAddressL(unsigned long, class TDesC16 const &, unsigned long, class TDesC16 const &, unsigned long, int)
+	?SetHiddenL@CCmDestinationImpl@@QAEXH@Z @ 224 NONAME ABSENT ; void CCmDestinationImpl::SetHiddenL(int)
+	?SetHiddenL@RCmDestinationExt@@QAEXH@Z @ 225 NONAME ; void RCmDestinationExt::SetHiddenL(int)
+	?SetIconL@CCmDestinationImpl@@QAEXK@Z @ 226 NONAME ABSENT ; void CCmDestinationImpl::SetIconL(unsigned long)
+	?SetIconL@RCmDestinationExt@@QAEXK@Z @ 227 NONAME ABSENT ; void RCmDestinationExt::SetIconL(unsigned long)
+	?SetIntAttributeL@CCmPluginBaseEng@@UAEXKK@Z @ 228 NONAME ABSENT ; void CCmPluginBaseEng::SetIntAttributeL(unsigned long, unsigned long)
+	?SetIntAttributeL@RCmConnectionMethodExt@@QAEXKK@Z @ 229 NONAME ; void RCmConnectionMethodExt::SetIntAttributeL(unsigned long, unsigned long)
+	?SetMetadataL@RCmDestinationExt@@QAEXW4TSnapMetadataField@CMManager@@K@Z @ 230 NONAME ; void RCmDestinationExt::SetMetadataL(enum CMManager::TSnapMetadataField, unsigned long)
+	?SetNameL@CCmDestinationImpl@@QAEXABVTDesC16@@@Z @ 231 NONAME ABSENT ; void CCmDestinationImpl::SetNameL(class TDesC16 const &)
+	?SetNameL@RCmDestinationExt@@QAEXABVTDesC16@@@Z @ 232 NONAME ; void RCmDestinationExt::SetNameL(class TDesC16 const &)
+	?SetProtectionL@CCmDestinationImpl@@QAEXW4TProtectionLevel@CMManager@@@Z @ 233 NONAME ABSENT ; void CCmDestinationImpl::SetProtectionL(enum CMManager::TProtectionLevel)
+	?SetProtectionL@RCmDestinationExt@@QAEXW4TProtectionLevel@CMManager@@@Z @ 234 NONAME ; void RCmDestinationExt::SetProtectionL(enum CMManager::TProtectionLevel)
+	?SetProxyServerNameL@@YAHPAVCCmPluginBaseEng@@KPBX@Z @ 235 NONAME ABSENT ; int SetProxyServerNameL(class CCmPluginBaseEng *, unsigned long, void const *)
+	?SetString8AttributeL@CCmPluginBaseEng@@UAEXKABVTDesC8@@@Z @ 236 NONAME ABSENT ; void CCmPluginBaseEng::SetString8AttributeL(unsigned long, class TDesC8 const &)
+	?SetString8AttributeL@RCmConnectionMethodExt@@QAEXKABVTDesC8@@@Z @ 237 NONAME ; void RCmConnectionMethodExt::SetString8AttributeL(unsigned long, class TDesC8 const &)
+	?SetStringAttributeL@CCmPluginBaseEng@@UAEXKABVTDesC16@@@Z @ 238 NONAME ABSENT ; void CCmPluginBaseEng::SetStringAttributeL(unsigned long, class TDesC16 const &)
+	?SetStringAttributeL@RCmConnectionMethodExt@@QAEXKABVTDesC16@@@Z @ 239 NONAME ; void RCmConnectionMethodExt::SetStringAttributeL(unsigned long, class TDesC16 const &)
+	?ShowConfirmationQueryL@TCmCommonUi@@SAHH@Z @ 240 NONAME ABSENT ; int TCmCommonUi::ShowConfirmationQueryL(int)
+	?ShowConfirmationQueryL@TCmCommonUi@@SAHHABVTDesC16@@@Z @ 241 NONAME ABSENT ; int TCmCommonUi::ShowConfirmationQueryL(int, class TDesC16 const &)
+	?ShowConfirmationQueryWithInputL@TCmCommonUi@@SAHHAAVTDes16@@@Z @ 242 NONAME ABSENT ; int TCmCommonUi::ShowConfirmationQueryWithInputL(int, class TDes16 &)
+	?ShowNoteL@TCmCommonUi@@SAHABVTDesC16@@W4TCmNoteType@1@@Z @ 243 NONAME ABSENT ; int TCmCommonUi::ShowNoteL(class TDesC16 const &, enum TCmCommonUi::TCmNoteType)
+	?ShowNoteL@TCmCommonUi@@SAHHABVTDesC16@@W4TCmNoteType@1@@Z @ 244 NONAME ABSENT ; int TCmCommonUi::ShowNoteL(int, class TDesC16 const &, enum TCmCommonUi::TCmNoteType)
+	?ShowNoteL@TCmCommonUi@@SAHHW4TCmNoteType@1@@Z @ 245 NONAME ABSENT ; int TCmCommonUi::ShowNoteL(int, enum TCmCommonUi::TCmNoteType)
+	?ShowPopupIPv4DNSEditorL@CmPluginBaseSettingsDlg@@QAEHKKKK@Z @ 246 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupIPv4DNSEditorL(unsigned long, unsigned long, unsigned long, unsigned long)
+	?ShowPopupIPv6DNSEditorL@CmPluginBaseSettingsDlg@@QAEHPBKKKK@Z @ 247 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupIPv6DNSEditorL(unsigned long const *, unsigned long, unsigned long, unsigned long)
+	?ShowPopupIpSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 248 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupIpSettingPageL(unsigned long, unsigned long)
+	?ShowPopupListL@TCmCommonUi@@SAHABVTDesC16@@PAVCDesC16ArrayFlat@@PAV?$CArrayPtr@VCGulIcon@@@@IAAH@Z @ 249 NONAME ABSENT ; int TCmCommonUi::ShowPopupListL(class TDesC16 const &, class CDesC16ArrayFlat *, class CArrayPtr<class CGulIcon> *, unsigned int, int &)
+	?ShowPopupPasswordSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 250 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupPasswordSettingPageL(unsigned long, unsigned long)
+	?ShowPopupPortNumSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 251 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupPortNumSettingPageL(unsigned long, unsigned long)
+	?ShowPopupSettingPageL@CmPluginBaseSettingsDlg@@MAEHKH@Z @ 252 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupSettingPageL(unsigned long, int)
+	?ShowPopupSettingPageL@CmPluginBaseSettingsDlgAdv@@MAEHHH@Z @ 253 NONAME ABSENT ; int CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL(int, int)
+	?ShowPopupTextSettingPageL@CmPluginBaseSettingsDlg@@QAEHKK@Z @ 254 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowPopupTextSettingPageL(unsigned long, unsigned long)
+	?ShowRadioButtonSettingPageL@CmPluginBaseSettingsDlg@@QAEHAAVCDesC16ArrayFlat@@AAHK@Z @ 255 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL(class CDesC16ArrayFlat &, int &, unsigned long)
+	?ShowRadioButtonSettingPageL@CmPluginBaseSettingsDlg@@QAEHPBKAAHK@Z @ 256 NONAME ABSENT ; int CmPluginBaseSettingsDlg::ShowRadioButtonSettingPageL(unsigned long const *, int &, unsigned long)
+	?StringAttributeWithDefaultL@CmPluginBaseSettingsDlg@@IAEPAVHBufC16@@KK@Z @ 257 NONAME ABSENT ; class HBufC16 * CmPluginBaseSettingsDlg::StringAttributeWithDefaultL(unsigned long, unsigned long)
+	?SupportedBearersL@RCmManagerExt@@QBEXAAV?$RArray@K@@@Z @ 258 NONAME ; void RCmManagerExt::SupportedBearersL(class RArray<unsigned long> &) const
+	?UncategorizedIconL@RCmManagerExt@@QBEPAVCGulIcon@@XZ @ 259 NONAME ABSENT ; class CGulIcon * RCmManagerExt::UncategorizedIconL(void) const
+	?UpdateBearerPriorityArrayL@RCmManagerExt@@QAEXABV?$RArray@VTBearerPriority@@@@@Z @ 260 NONAME ; void RCmManagerExt::UpdateBearerPriorityArrayL(class RArray<class TBearerPriority> const &)
+	?UpdateL@CCmDestinationImpl@@QAEXXZ @ 261 NONAME ABSENT ; void CCmDestinationImpl::UpdateL(void)
+	?UpdateL@CCmPluginBaseEng@@UAEXXZ @ 262 NONAME ABSENT ; void CCmPluginBaseEng::UpdateL(void)
+	?UpdateL@RCmConnectionMethodExt@@QAEXXZ @ 263 NONAME ; void RCmConnectionMethodExt::UpdateL(void)
+	?UpdateL@RCmDestinationExt@@QAEXXZ @ 264 NONAME ; void RCmDestinationExt::UpdateL(void)
+	?UpdateListBoxContentL@CmPluginBaseSettingsDlg@@MAEXXZ @ 265 NONAME ABSENT ; void CmPluginBaseSettingsDlg::UpdateListBoxContentL(void)
+	?UpdateListBoxContentL@CmPluginBaseSettingsDlgAdv@@MAEXXZ @ 266 NONAME ABSENT ; void CmPluginBaseSettingsDlgAdv::UpdateListBoxContentL(void)
+	?UpdateListBoxContentL@CmPluginBaseSettingsDlgIp@@MAEXXZ @ 267 NONAME ABSENT ; void CmPluginBaseSettingsDlgIp::UpdateListBoxContentL(void)
+	?UpdateProxyRecordL@CCmPluginBaseEng@@AAEXXZ @ 268 NONAME ABSENT ; void CCmPluginBaseEng::UpdateProxyRecordL(void)
+	?UpdateServiceRecordL@CCmPluginBaseEng@@MAEXXZ @ 269 NONAME ABSENT ; void CCmPluginBaseEng::UpdateServiceRecordL(void)
+	?WriteDefConnL@RCmManagerExt@@QAEXABUTCmDefConnValue@@@Z @ 270 NONAME ; void RCmManagerExt::WriteDefConnL(struct TCmDefConnValue const &)
+	??0RCmDestination@@QAE@XZ @ 271 NONAME ; RCmDestination::RCmDestination(void)
+	??0RCmDestinationExt@@QAE@XZ @ 272 NONAME ; RCmDestinationExt::RCmDestinationExt(void)
+	??8RCmDestination@@QBEHABV0@@Z @ 273 NONAME ; int RCmDestination::operator==(class RCmDestination const &) const
+	??8RCmDestinationExt@@QBEHABV0@@Z @ 274 NONAME ; int RCmDestinationExt::operator==(class RCmDestinationExt const &) const
+	??9RCmDestination@@QBEHABV0@@Z @ 275 NONAME ; int RCmDestination::operator!=(class RCmDestination const &) const
+	??9RCmDestinationExt@@QBEHABV0@@Z @ 276 NONAME ; int RCmDestinationExt::operator!=(class RCmDestinationExt const &) const
+	??0CCmPluginBase@@QAE@PAVCCmPluginBaseEng@@@Z @ 277 NONAME ABSENT ; CCmPluginBase::CCmPluginBase(class CCmPluginBaseEng *)
+	??1CCmPluginBase@@UAE@XZ @ 278 NONAME ABSENT ; CCmPluginBase::~CCmPluginBase(void)
+	?AddResourceFileL@CCmPluginBase@@IAEXABVTDesC16@@@Z @ 279 NONAME ABSENT ; void CCmPluginBase::AddResourceFileL(class TDesC16 const &)
+	?AllocReadL@CCmPluginBase@@IBEPAVHBufC16@@H@Z @ 280 NONAME ABSENT ; class HBufC16 * CCmPluginBase::AllocReadL(int) const
+	?CmMgr@CCmPluginBase@@QBEAAVCCmManagerImpl@@XZ @ 281 NONAME ABSENT ; class CCmManagerImpl & CCmPluginBase::CmMgr(void) const
+	?ConstructL@CCmPluginBase@@IAEXXZ @ 282 NONAME ABSENT ; void CCmPluginBase::ConstructL(void)
+	?CreateCopyL@CCmPluginBase@@QBEPAV1@XZ @ 283 NONAME ABSENT ; class CCmPluginBase * CCmPluginBase::CreateCopyL(void) const
+	?CreateNewL@CCmPluginBase@@QAEXXZ @ 284 NONAME ABSENT ; void CCmPluginBase::CreateNewL(void)
+	?DeleteL@CCmPluginBase@@QAEHHH@Z @ 285 NONAME ABSENT ; int CCmPluginBase::DeleteL(int, int)
+	?Destination@CCmPluginBase@@QBEPAVCCmDestinationImpl@@XZ @ 286 NONAME ABSENT ; class CCmDestinationImpl * CCmPluginBase::Destination(void) const
+	?EnableChargeCardL@CCmPluginBase@@AAEXH@Z @ 287 NONAME ABSENT ; void CCmPluginBase::EnableChargeCardL(int)
+	?EnableLocationL@CCmPluginBase@@AAEXH@Z @ 288 NONAME ABSENT ; void CCmPluginBase::EnableLocationL(int)
+	?EnableProxyL@CCmPluginBase@@AAEXH@Z @ 289 NONAME ABSENT ; void CCmPluginBase::EnableProxyL(int)
+	?GetBoolAttributeL@CCmPluginBase@@QBEHK@Z @ 290 NONAME ABSENT ; int CCmPluginBase::GetBoolAttributeL(unsigned long) const
+	?GetConnectionMethodL@CCmDestinationImpl@@QAEPAVCCmPluginBase@@H@Z @ 291 NONAME ABSENT ; class CCmPluginBase * CCmDestinationImpl::GetConnectionMethodL(int)
+	?GetConnectionMethodL@CCmManagerImpl@@QAEPAVCCmPluginBase@@K@Z @ 292 NONAME ABSENT ; class CCmPluginBase * CCmManagerImpl::GetConnectionMethodL(unsigned long)
+	?GetIntAttributeL@CCmPluginBase@@QBEKK@Z @ 293 NONAME ABSENT ; unsigned long CCmPluginBase::GetIntAttributeL(unsigned long) const
+	?GetString8AttributeL@CCmPluginBase@@QBEPAVHBufC8@@K@Z @ 294 NONAME ABSENT ; class HBufC8 * CCmPluginBase::GetString8AttributeL(unsigned long) const
+	?GetStringAttributeL@CCmPluginBase@@QBEPAVHBufC16@@K@Z @ 295 NONAME ABSENT ; class HBufC16 * CCmPluginBase::GetStringAttributeL(unsigned long) const
+	?IAPRecordElementId@CCmPluginBase@@QBEKXZ @ 296 NONAME ABSENT ; unsigned long CCmPluginBase::IAPRecordElementId(void) const
+	?LoadL@CCmPluginBase@@QAEXK@Z @ 297 NONAME ABSENT ; void CCmPluginBase::LoadL(unsigned long)
+	?LoadServiceSettingL@CCmPluginBase@@IAEXXZ @ 298 NONAME ABSENT ; void CCmPluginBase::LoadServiceSettingL(void)
+	?NumOfConnMethodReferencesL@CCmPluginBase@@QAEHXZ @ 299 NONAME ABSENT ; int CCmPluginBase::NumOfConnMethodReferencesL(void)
+	?ParentDestination@CCmPluginBase@@QBEPAVCCmDestinationImpl@@XZ @ 300 NONAME ABSENT ; class CCmDestinationImpl * CCmPluginBase::ParentDestination(void) const
+	?Plugin@CCmPluginBase@@QBEPAVCCmPluginBaseEng@@XZ @ 301 NONAME ABSENT ; class CCmPluginBaseEng * CCmPluginBase::Plugin(void) const
+	?PrepareToLoadRecordsL@CCmPluginBase@@IAEXXZ @ 302 NONAME ABSENT ; void CCmPluginBase::PrepareToLoadRecordsL(void)
+	?PrepareToUpdateRecordsL@CCmPluginBase@@IAEXXZ @ 303 NONAME ABSENT ; void CCmPluginBase::PrepareToUpdateRecordsL(void)
+	?RemoveResourceFile@CCmPluginBase@@IAEXABVTDesC16@@@Z @ 304 NONAME ABSENT ; void CCmPluginBase::RemoveResourceFile(class TDesC16 const &)
+	?RestoreAttributeL@CCmPluginBase@@QAEXK@Z @ 305 NONAME ABSENT ; void CCmPluginBase::RestoreAttributeL(unsigned long)
+	?Session@CCmPluginBase@@QBEAAVCMDBSession@CommsDat@@XZ @ 306 NONAME ABSENT ; class CommsDat::CMDBSession & CCmPluginBase::Session(void) const
+	?SetBoolAttributeL@CCmPluginBase@@QAEXKH@Z @ 307 NONAME ABSENT ; void CCmPluginBase::SetBoolAttributeL(unsigned long, int)
+	?SetIntAttributeL@CCmPluginBase@@QAEXKK@Z @ 308 NONAME ABSENT ; void CCmPluginBase::SetIntAttributeL(unsigned long, unsigned long)
+	?SetString8AttributeL@CCmPluginBase@@QAEXKABVTDesC8@@@Z @ 309 NONAME ABSENT ; void CCmPluginBase::SetString8AttributeL(unsigned long, class TDesC8 const &)
+	?SetStringAttributeL@CCmPluginBase@@QAEXKABVTDesC16@@@Z @ 310 NONAME ABSENT ; void CCmPluginBase::SetStringAttributeL(unsigned long, class TDesC16 const &)
+	?UpdateL@CCmPluginBase@@QAEXXZ @ 311 NONAME ABSENT ; void CCmPluginBase::UpdateL(void)
+	?UpdateProxyRecordL@CCmPluginBase@@AAEXXZ @ 312 NONAME ABSENT ; void CCmPluginBase::UpdateProxyRecordL(void)
+	?UpdateServiceRecordL@CCmPluginBase@@IAEXXZ @ 313 NONAME ABSENT ; void CCmPluginBase::UpdateServiceRecordL(void)
+	??0RCmConnectionMethod@@QAE@XZ @ 314 NONAME ; RCmConnectionMethod::RCmConnectionMethod(void)
+	??0RCmConnectionMethodExt@@QAE@XZ @ 315 NONAME ; RCmConnectionMethodExt::RCmConnectionMethodExt(void)
+	??4RCmConnectionMethod@@QAEAAV0@ABV0@@Z @ 316 NONAME ; class RCmConnectionMethod & RCmConnectionMethod::operator=(class RCmConnectionMethod const &)
+	??4RCmConnectionMethodExt@@QAEAAV0@ABV0@@Z @ 317 NONAME ; class RCmConnectionMethodExt & RCmConnectionMethodExt::operator=(class RCmConnectionMethodExt const &)
+	??8RCmConnectionMethod@@QBEHAAV0@@Z @ 318 NONAME ; int RCmConnectionMethod::operator==(class RCmConnectionMethod &) const
+	??8RCmConnectionMethodExt@@QBEHAAV0@@Z @ 319 NONAME ; int RCmConnectionMethodExt::operator==(class RCmConnectionMethodExt &) const
+	??9RCmConnectionMethod@@QBEHAAV0@@Z @ 320 NONAME ; int RCmConnectionMethod::operator!=(class RCmConnectionMethod &) const
+	??9RCmConnectionMethodExt@@QBEHAAV0@@Z @ 321 NONAME ; int RCmConnectionMethodExt::operator!=(class RCmConnectionMethodExt &) const
+	??1RCmConnectionMethod@@QAE@XZ @ 322 NONAME ; RCmConnectionMethod::~RCmConnectionMethod(void)
+	??1RCmConnectionMethodExt@@QAE@XZ @ 323 NONAME ; RCmConnectionMethodExt::~RCmConnectionMethodExt(void)
+	?ClearDestinationArrayToUse@CCmConnSettingsUiImpl@@QAEXXZ @ 324 NONAME ABSENT ; void CCmConnSettingsUiImpl::ClearDestinationArrayToUse(void)
+	?SetDestinationArrayToUseL@CCmConnSettingsUiImpl@@QAEXV?$RArray@K@@@Z @ 325 NONAME ABSENT ; void CCmConnSettingsUiImpl::SetDestinationArrayToUseL(class RArray<unsigned long>)
+	?GetAdditionalUids@CCmPluginBase@@QAEXAAV?$RArray@K@@@Z @ 326 NONAME ABSENT ; void CCmPluginBase::GetAdditionalUids(class RArray<unsigned long> &)
+	?GetAdditionalUids@CCmPluginBaseEng@@UAEXAAV?$RArray@K@@@Z @ 327 NONAME ABSENT ; void CCmPluginBaseEng::GetAdditionalUids(class RArray<unsigned long> &)
+	?WrapCmManager@CCmManagerImpl@@QAEXAAVRCmManagerExt@@@Z @ 328 NONAME ABSENT ; void CCmManagerImpl::WrapCmManager(class RCmManagerExt &)
+	?CombineArraysForPriorityOrderL@CCmManagerImpl@@AAEXAAV?$RPointerArray@VCCmPluginBase@@@@0@Z @ 329 NONAME ABSENT ; void CCmManagerImpl::CombineArraysForPriorityOrderL(class RPointerArray<class CCmPluginBase> &, class RPointerArray<class CCmPluginBase> &)
+	?CreateFlatCMListL@CCmManagerImpl@@QAEXKAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 330 NONAME ABSENT ; void CCmManagerImpl::CreateFlatCMListL(unsigned long, class RPointerArray<class CCmPluginBase> &)
+	?FilterOutVirtualsL@CCmManagerImpl@@QAEXAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 331 NONAME ABSENT ; void CCmManagerImpl::FilterOutVirtualsL(class RPointerArray<class CCmPluginBase> &)
+	?CreateFlatCMListLC@CCmManagerImpl@@QAEXKAAV?$RPointerArray@VCCmPluginBase@@@@@Z @ 332 NONAME ABSENT ; void CCmManagerImpl::CreateFlatCMListLC(unsigned long, class RPointerArray<class CCmPluginBase> &)
+	??0RCmConnectionMethod@@QAE@ABV0@@Z @ 333 NONAME ; RCmConnectionMethod::RCmConnectionMethod(class RCmConnectionMethod const &)
+	??0RCmConnectionMethodExt@@QAE@ABV0@@Z @ 334 NONAME ; RCmConnectionMethodExt::RCmConnectionMethodExt(class RCmConnectionMethodExt const &)
+	?IsLinkedToIap@CCmPluginBase@@QAEHK@Z @ 335 NONAME ABSENT ; int CCmPluginBase::IsLinkedToIap(unsigned long)
+	?IsLinkedToSnap@CCmPluginBase@@QAEHK@Z @ 336 NONAME ABSENT ; int CCmPluginBase::IsLinkedToSnap(unsigned long)
+	?ParentDestination@CCmPluginBaseEng@@QBEPAVCCmDestinationImpl@@XZ @ 337 NONAME ABSENT ; class CCmDestinationImpl * CCmPluginBaseEng::ParentDestination(void) const
+	?CreateTablesAndOpenL@RCmManagerExt@@QAEXXZ @ 338 NONAME ; void RCmManagerExt::CreateTablesAndOpenL(void)
+	?CreateConnectionMethodL@RCmDestinationExt@@QAE?AVRCmConnectionMethodExt@@KK@Z @ 339 NONAME ; class RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(unsigned long, unsigned long)
+	?CreateConnectionMethodL@RCmManagerExt@@QAE?AVRCmConnectionMethodExt@@KK@Z @ 340 NONAME ; class RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(unsigned long, unsigned long)
+	?CreateDestinationL@RCmManagerExt@@QAE?AVRCmDestinationExt@@ABVTDesC16@@K@Z @ 341 NONAME ; class RCmDestinationExt RCmManagerExt::CreateDestinationL(class TDesC16 const &, unsigned long)
+	?SetPreDefinedId@CCmPluginBaseEng@@QAEXK@Z @ 342 NONAME ABSENT ; void CCmPluginBaseEng::SetPreDefinedId(unsigned long)
+	?HandleResourceChange@CmPluginBaseSettingsDlg@@UAEXH@Z @ 343 NONAME ABSENT ; void CmPluginBaseSettingsDlg::HandleResourceChange(int)
+	?Execute@CmPluginBaseSettingsDlg@@UAEXXZ @ 344 NONAME ABSENT ; void CmPluginBaseSettingsDlg::Execute(void)
+	?CheckSpaceBelowCriticalLevelL@CCmPluginBaseEng@@QBEHXZ @ 345 NONAME ABSENT ; int CCmPluginBaseEng::CheckSpaceBelowCriticalLevelL(void) const
+	?HandleLeaveError@CmPluginBaseSettingsDlg@@UAEXH@Z @ 346 NONAME ABSENT ; void CmPluginBaseSettingsDlg::HandleLeaveError(int)
+	?AddConnectionMethodL@RCmDestination@@QAEHVRCmConnectionMethod@@@Z @ 347 NONAME ; int RCmDestination::AddConnectionMethodL(class RCmConnectionMethod)
+	?AddEmbeddedDestinationL@RCmDestination@@QAEHABV1@@Z @ 348 NONAME ; int RCmDestination::AddEmbeddedDestinationL(class RCmDestination const &)
+	?CopyConnectionMethodL@RCmManager@@QAEHAAVRCmDestination@@AAVRCmConnectionMethod@@@Z @ 349 NONAME ; int RCmManager::CopyConnectionMethodL(class RCmDestination &, class RCmConnectionMethod &)
+	?CreateConnectionMethodL@RCmDestination@@QAE?AVRCmConnectionMethod@@K@Z @ 350 NONAME ; class RCmConnectionMethod RCmDestination::CreateConnectionMethodL(unsigned long)
+	?CreateConnectionMethodL@RCmDestination@@QAE?AVRCmConnectionMethod@@KK@Z @ 351 NONAME ; class RCmConnectionMethod RCmDestination::CreateConnectionMethodL(unsigned long, unsigned long)
+	?CreateConnectionMethodL@RCmManager@@QAE?AVRCmConnectionMethod@@K@Z @ 352 NONAME ; class RCmConnectionMethod RCmManager::CreateConnectionMethodL(unsigned long)
+	?CreateConnectionMethodL@RCmManager@@QAE?AVRCmConnectionMethod@@KK@Z @ 353 NONAME ; class RCmConnectionMethod RCmManager::CreateConnectionMethodL(unsigned long, unsigned long)
+	?CreateCopyL@RCmConnectionMethod@@QAE?AV1@XZ @ 354 NONAME ; class RCmConnectionMethod RCmConnectionMethod::CreateCopyL(void)
+	?CreateDestinationL@RCmManager@@QAE?AVRCmDestination@@ABVTDesC16@@@Z @ 355 NONAME ; class RCmDestination RCmManager::CreateDestinationL(class TDesC16 const &)
+	?CreateDestinationL@RCmManager@@QAE?AVRCmDestination@@ABVTDesC16@@K@Z @ 356 NONAME ; class RCmDestination RCmManager::CreateDestinationL(class TDesC16 const &, unsigned long)
+	?CreateTablesAndOpenL@RCmManager@@QAEXXZ @ 357 NONAME ; void RCmManager::CreateTablesAndOpenL(void)
+	?DeleteConnectionMethodL@RCmDestination@@QAEXAAVRCmConnectionMethod@@@Z @ 358 NONAME ; void RCmDestination::DeleteConnectionMethodL(class RCmConnectionMethod &)
+	?DeleteL@RCmConnectionMethod@@QAEHXZ @ 359 NONAME ; int RCmConnectionMethod::DeleteL(void)
+	?DeleteLD@RCmDestination@@QAEXXZ @ 360 NONAME ; void RCmDestination::DeleteLD(void)
+	?ModifyPriorityL@RCmDestination@@QAEXAAVRCmConnectionMethod@@I@Z @ 361 NONAME ; void RCmDestination::ModifyPriorityL(class RCmConnectionMethod &, unsigned int)
+	?MoveConnectionMethodL@RCmManager@@QAEHAAVRCmDestination@@0AAVRCmConnectionMethod@@@Z @ 362 NONAME ; int RCmManager::MoveConnectionMethodL(class RCmDestination &, class RCmDestination &, class RCmConnectionMethod &)
+	?RemoveAllReferencesL@RCmManager@@QAEXAAVRCmConnectionMethod@@@Z @ 363 NONAME ; void RCmManager::RemoveAllReferencesL(class RCmConnectionMethod &)
+	?RemoveConnectionMethodL@RCmDestination@@QAEXVRCmConnectionMethod@@@Z @ 364 NONAME ; void RCmDestination::RemoveConnectionMethodL(class RCmConnectionMethod)
+	?RemoveConnectionMethodL@RCmManager@@QAEXAAVRCmDestination@@AAVRCmConnectionMethod@@@Z @ 365 NONAME ; void RCmManager::RemoveConnectionMethodL(class RCmDestination &, class RCmConnectionMethod &)
+	?SetBoolAttributeL@RCmConnectionMethod@@QAEXKH@Z @ 366 NONAME ; void RCmConnectionMethod::SetBoolAttributeL(unsigned long, int)
+	?SetHiddenL@RCmDestination@@QAEXH@Z @ 367 NONAME ; void RCmDestination::SetHiddenL(int)
+	?SetIconL@RCmDestination@@QAEXK@Z @ 368 NONAME ABSENT ; void RCmDestination::SetIconL(unsigned long)
+	?SetIntAttributeL@RCmConnectionMethod@@QAEXKK@Z @ 369 NONAME ; void RCmConnectionMethod::SetIntAttributeL(unsigned long, unsigned long)
+	?SetMetadataL@RCmDestination@@QAEXW4TSnapMetadataField@CMManager@@K@Z @ 370 NONAME ; void RCmDestination::SetMetadataL(enum CMManager::TSnapMetadataField, unsigned long)
+	?SetNameL@RCmDestination@@QAEXABVTDesC16@@@Z @ 371 NONAME ; void RCmDestination::SetNameL(class TDesC16 const &)
+	?SetProtectionL@RCmDestination@@QAEXW4TProtectionLevel@CMManager@@@Z @ 372 NONAME ; void RCmDestination::SetProtectionL(enum CMManager::TProtectionLevel)
+	?SetString8AttributeL@RCmConnectionMethod@@QAEXKABVTDesC8@@@Z @ 373 NONAME ; void RCmConnectionMethod::SetString8AttributeL(unsigned long, class TDesC8 const &)
+	?SetStringAttributeL@RCmConnectionMethod@@QAEXKABVTDesC16@@@Z @ 374 NONAME ; void RCmConnectionMethod::SetStringAttributeL(unsigned long, class TDesC16 const &)
+	?SupportedBearersL@RCmManager@@QBEXAAV?$RArray@K@@@Z @ 375 NONAME ; void RCmManager::SupportedBearersL(class RArray<unsigned long> &) const
+	?UncategorizedIconL@RCmManager@@QBEPAVCGulIcon@@XZ @ 376 NONAME ABSENT ; class CGulIcon * RCmManager::UncategorizedIconL(void) const
+	?UpdateBearerPriorityArrayL@RCmManager@@QAEXABV?$RArray@VTBearerPriority@@@@@Z @ 377 NONAME ; void RCmManager::UpdateBearerPriorityArrayL(class RArray<class TBearerPriority> const &)
+	?UpdateL@RCmConnectionMethod@@QAEXXZ @ 378 NONAME ; void RCmConnectionMethod::UpdateL(void)
+	?UpdateL@RCmDestination@@QAEXXZ @ 379 NONAME ; void RCmDestination::UpdateL(void)
+	?WriteDefConnL@RCmManager@@QAEXABUTCmDefConnValue@@@Z @ 380 NONAME ; void RCmManager::WriteDefConnL(struct TCmDefConnValue const &)
+	?WriteGenConnSettingsL@RCmManager@@QAEXABUTCmGenConnSettings@@@Z @ 381 NONAME ; void RCmManager::WriteGenConnSettingsL(struct TCmGenConnSettings const &)
+	?ReadGenConnSettingsL@RCmManager@@QAEXAAUTCmGenConnSettings@@@Z @ 382 NONAME ; void RCmManager::ReadGenConnSettingsL(struct TCmGenConnSettings &)
+	?WatcherRegisterL@CCmManagerImpl@@QAEXPAVMCmCommsDatWatcher@@@Z @ 383 NONAME ABSENT ; void CCmManagerImpl::WatcherRegisterL(class MCmCommsDatWatcher *)
+	?DestinationStillExistedL@CCmManagerImpl@@QAEHPAVCCmDestinationImpl@@@Z @ 384 NONAME ABSENT ; int CCmManagerImpl::DestinationStillExistedL(class CCmDestinationImpl *)
+	?IsIapStillInDestL@CCmManagerImpl@@QAEHPAVCCmDestinationImpl@@ABVCCmPluginBaseEng@@@Z @ 385 NONAME ABSENT ; int CCmManagerImpl::IsIapStillInDestL(class CCmDestinationImpl *, class CCmPluginBaseEng const &)
+	?IapStillExistedL@CCmManagerImpl@@QAEHABVCCmPluginBaseEng@@@Z @ 386 NONAME ABSENT ; int CCmManagerImpl::IapStillExistedL(class CCmPluginBaseEng const &)
+	?WatcherUnRegister@CCmManagerImpl@@QAEXXZ @ 387 NONAME ABSENT ; void CCmManagerImpl::WatcherUnRegister(void)
+	?RemoveDestFromPool@CCmManagerImpl@@QAEXPAVCCmDestinationImpl@@@Z @ 388 NONAME ABSENT ; void CCmManagerImpl::RemoveDestFromPool(class CCmDestinationImpl *)
+	?OfferKeyEventL@CmPluginBaseSettingsDlg@@MAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 389 NONAME ABSENT ; enum TKeyResponse CmPluginBaseSettingsDlg::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?GetUncategorizedIconL@RCmManager@@QBEPAVHBufC16@@XZ @ 390 NONAME ; class HBufC16 * RCmManager::GetUncategorizedIconL(void) const
+	?GetIconL@RCmDestination@@QBEPAVHBufC16@@XZ @ 391 NONAME ; class HBufC16 * RCmDestination::GetIconL(void) const
+	?GetIconL@RCmConnectionMethod@@QBEPAVHBufC16@@XZ @ 392 NONAME ; class HBufC16 * RCmConnectionMethod::GetIconL(void) const
+	?SetIconL@RCmConnectionMethod@@QAEXABVTDesC16@@@Z @ 393 NONAME ; void RCmConnectionMethod::SetIconL(class TDesC16 const &)
+	?SetIconL@RCmDestination@@QAEXABVTDesC16@@@Z @ 394 NONAME ; void RCmDestination::SetIconL(class TDesC16 const &)
+	?RefreshL@RCmConnectionMethod@@QAEXXZ @ 395 NONAME ; void RCmConnectionMethod::RefreshL(void)
+	?RefreshL@RCmDestination@@QAEXXZ @ 396 NONAME ; void RCmDestination::RefreshL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/EABI/CmManager_prot_setupU.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,445 @@
+EXPORTS
+	_Z18CheckIPv4ValidityLP16CCmPluginBaseEngmPKv @ 1 NONAME ABSENT
+	_Z18CheckIPv6ValidityLP16CCmPluginBaseEngmPKv @ 2 NONAME ABSENT
+	_Z18ReadOnlyAttributeLP16CCmPluginBaseEngmPKv @ 3 NONAME ABSENT
+	_Z19ClassifyIPv6AddressRK7TDesC16 @ 4 NONAME ABSENT
+	_Z19SetProxyServerNameLP16CCmPluginBaseEngmPKv @ 5 NONAME ABSENT
+	_Z22CheckRecordIdValidityLP16CCmPluginBaseEngmPKv @ 6 NONAME ABSENT
+	_Z24CheckPortNumberValidityLP16CCmPluginBaseEngmPKv @ 7 NONAME ABSENT
+	_Z24IsUnspecifiedIPv4AddressRK7TDesC16 @ 8 NONAME ABSENT
+	_Z26CheckWAPWspOptionValidityLP16CCmPluginBaseEngmPKv @ 9 NONAME ABSENT
+	_ZN10RCmManager12ReadDefConnLER15TCmDefConnValue @ 10 NONAME
+	_ZN10RCmManager5CloseEv @ 11 NONAME
+	_ZN10RCmManager5OpenLEv @ 12 NONAME
+	_ZN10RCmManager6OpenLCEv @ 13 NONAME
+	_ZN11TCmCommonUi14ShowPopupListLERK7TDesC16P16CDesC16ArrayFlatP9CArrayPtrI8CGulIconEjRi @ 14 NONAME ABSENT
+	_ZN11TCmCommonUi22ShowConfirmationQueryLEi @ 15 NONAME ABSENT
+	_ZN11TCmCommonUi22ShowConfirmationQueryLEiRK7TDesC16 @ 16 NONAME ABSENT
+	_ZN11TCmCommonUi31ShowConfirmationQueryWithInputLEiR6TDes16 @ 17 NONAME ABSENT
+	_ZN11TCmCommonUi9ShowNoteLERK7TDesC16NS_11TCmNoteTypeE @ 18 NONAME ABSENT
+	_ZN11TCmCommonUi9ShowNoteLEiNS_11TCmNoteTypeE @ 19 NONAME ABSENT
+	_ZN11TCmCommonUi9ShowNoteLEiRK7TDesC16NS_11TCmNoteTypeE @ 20 NONAME ABSENT
+	_ZN13CCmSettingsUi12RunSettingsLEv @ 21 NONAME ABSENT
+	_ZN13CCmSettingsUi21SelectDestinationDlgLERm @ 22 NONAME ABSENT
+	_ZN13CCmSettingsUi4NewLEv @ 23 NONAME ABSENT
+	_ZN13CCmSettingsUiD0Ev @ 24 NONAME ABSENT
+	_ZN13CCmSettingsUiD1Ev @ 25 NONAME ABSENT
+	_ZN13CCmSettingsUiD2Ev @ 26 NONAME ABSENT
+	_ZN13RCmManagerExt11EasyWlanIdLEv @ 27 NONAME
+	_ZN13RCmManagerExt12DestinationLEm @ 28 NONAME
+	_ZN13RCmManagerExt12ReadDefConnLER15TCmDefConnValue @ 29 NONAME
+	_ZN13RCmManagerExt13WriteDefConnLERK15TCmDefConnValue @ 30 NONAME
+	_ZN13RCmManagerExt16AllDestinationsLER6RArrayImE @ 31 NONAME
+	_ZN13RCmManagerExt17ConnectionMethodLER6RArrayImEiii @ 32 NONAME
+	_ZN13RCmManagerExt17ConnectionMethodLEm @ 33 NONAME
+	_ZN13RCmManagerExt18CreateDestinationLERK7TDesC16 @ 34 NONAME
+	_ZN13RCmManagerExt20RemoveAllReferencesLER22RCmConnectionMethodExt @ 35 NONAME
+	_ZN13RCmManagerExt21CopyConnectionMethodLER17RCmDestinationExtR22RCmConnectionMethodExt @ 36 NONAME
+	_ZN13RCmManagerExt21MoveConnectionMethodLER17RCmDestinationExtS1_R22RCmConnectionMethodExt @ 37 NONAME
+	_ZN13RCmManagerExt23CreateConnectionMethodLEm @ 38 NONAME
+	_ZN13RCmManagerExt23RemoveConnectionMethodLER17RCmDestinationExtR22RCmConnectionMethodExt @ 39 NONAME
+	_ZN13RCmManagerExt26UpdateBearerPriorityArrayLERK6RArrayI15TBearerPriorityE @ 40 NONAME
+	_ZN13RCmManagerExt5CloseEv @ 41 NONAME
+	_ZN13RCmManagerExt5OpenLEv @ 42 NONAME
+	_ZN13RCmManagerExt6OpenLCEv @ 43 NONAME
+	_ZN14CCmManagerImpl11EasyWlanIdLEv @ 44 NONAME ABSENT
+	_ZN14CCmManagerImpl12DestinationLEm @ 45 NONAME ABSENT
+	_ZN14CCmManagerImpl16AllDestinationsLER6RArrayImE @ 46 NONAME ABSENT
+	_ZN14CCmManagerImpl17ConnectionMethodLER6RArrayImEiiii @ 47 NONAME ABSENT
+	_ZN14CCmManagerImpl17ConnectionMethodLEm @ 48 NONAME ABSENT
+	_ZN14RCmDestination5CloseEv @ 49 NONAME
+	_ZN14RCmDestinationC1ERKS_ @ 50 NONAME
+	_ZN14RCmDestinationC2ERKS_ @ 51 NONAME
+	_ZN14RCmDestinationD1Ev @ 52 NONAME
+	_ZN14RCmDestinationD2Ev @ 53 NONAME
+	_ZN14RCmDestinationaSERKS_ @ 54 NONAME
+	_ZN16CCmPluginBaseEng10ConstructLEv @ 55 NONAME ABSENT
+	_ZN16CCmPluginBaseEng10CreateNewLEv @ 56 NONAME ABSENT
+	_ZN16CCmPluginBaseEng12EnableProxyLEi @ 57 NONAME ABSENT
+	_ZN16CCmPluginBaseEng13ConvTableItemEm @ 58 NONAME ABSENT
+	_ZN16CCmPluginBaseEng15EnableLocationLEi @ 59 NONAME ABSENT
+	_ZN16CCmPluginBaseEng16AddResourceFileLERK7TDesC16 @ 60 NONAME ABSENT
+	_ZN16CCmPluginBaseEng16FeatureSupportedEi @ 61 NONAME ABSENT
+	_ZN16CCmPluginBaseEng16SetIntAttributeLEmm @ 62 NONAME ABSENT
+	_ZN16CCmPluginBaseEng17EnableChargeCardLEi @ 63 NONAME ABSENT
+	_ZN16CCmPluginBaseEng17RestoreAttributeLEm @ 64 NONAME ABSENT
+	_ZN16CCmPluginBaseEng17SetBoolAttributeLEmi @ 65 NONAME ABSENT
+	_ZN16CCmPluginBaseEng18RemoveResourceFileERK7TDesC16 @ 66 NONAME ABSENT
+	_ZN16CCmPluginBaseEng18UpdateProxyRecordLEv @ 67 NONAME ABSENT
+	_ZN16CCmPluginBaseEng19LoadServiceSettingLEv @ 68 NONAME ABSENT
+	_ZN16CCmPluginBaseEng19SetStringAttributeLEmRK7TDesC16 @ 69 NONAME ABSENT
+	_ZN16CCmPluginBaseEng20AddConverstionTableLEPPN8CommsDat13CCDRecordBaseEPiPK18TCmAttribConvTable @ 70 NONAME ABSENT
+	_ZN16CCmPluginBaseEng20SetDNSServerAddressLEmRK7TDesC16mS2_mi @ 71 NONAME ABSENT
+	_ZN16CCmPluginBaseEng20SetString8AttributeLEmRK6TDesC8 @ 72 NONAME ABSENT
+	_ZN16CCmPluginBaseEng20UpdateServiceRecordLEv @ 73 NONAME ABSENT
+	_ZN16CCmPluginBaseEng21PrepareToLoadRecordsLEv @ 74 NONAME ABSENT
+	_ZN16CCmPluginBaseEng21RemoveConversionTableEPK18TCmAttribConvTable @ 75 NONAME ABSENT
+	_ZN16CCmPluginBaseEng22CheckDNSServerAddressLEiRN8CommsDat9CMDBFieldI7TDesC16EES4_RNS1_IiEE @ 76 NONAME ABSENT
+	_ZN16CCmPluginBaseEng23PrepareToUpdateRecordsLEv @ 77 NONAME ABSENT
+	_ZN16CCmPluginBaseEng25AddCommonConversionTableLEPK26TCmCommonAttrConvArrayItem @ 78 NONAME ABSENT
+	_ZN16CCmPluginBaseEng26NumOfConnMethodReferencesLEv @ 79 NONAME ABSENT
+	_ZN16CCmPluginBaseEng27RemoveCommonConversionTableEPK26TCmCommonAttrConvArrayItem @ 80 NONAME ABSENT
+	_ZN16CCmPluginBaseEng5LoadLEm @ 81 NONAME ABSENT
+	_ZN16CCmPluginBaseEng5ResetEv @ 82 NONAME ABSENT
+	_ZN16CCmPluginBaseEng7DeleteLEii @ 83 NONAME ABSENT
+	_ZN16CCmPluginBaseEng7UpdateLEv @ 84 NONAME ABSENT
+	_ZN16CCmPluginBaseEngC2EP18TCmPluginInitParam @ 85 NONAME ABSENT
+	_ZN16CCmPluginBaseEngD0Ev @ 86 NONAME ABSENT
+	_ZN16CCmPluginBaseEngD1Ev @ 87 NONAME ABSENT
+	_ZN16CCmPluginBaseEngD2Ev @ 88 NONAME ABSENT
+	_ZN16CCmPluginLanBase10ConstructLEv @ 89 NONAME ABSENT
+	_ZN16CCmPluginLanBase12RunSettingsLEv @ 90 NONAME ABSENT
+	_ZN16CCmPluginLanBase16BearerRecordIdLCERP7HBufC16Rm @ 91 NONAME ABSENT
+	_ZN16CCmPluginLanBase17InitializeWithUiLEi @ 92 NONAME ABSENT
+	_ZN16CCmPluginLanBase17ServiceRecordIdLCERP7HBufC16Rm @ 93 NONAME ABSENT
+	_ZN16CCmPluginLanBase19LoadServiceSettingLEv @ 94 NONAME ABSENT
+	_ZN16CCmPluginLanBase23CreateNewServiceRecordLEv @ 95 NONAME ABSENT
+	_ZN16CCmPluginLanBase23PrepareToUpdateRecordsLEv @ 96 NONAME ABSENT
+	_ZN16CCmPluginLanBaseC2EP18TCmPluginInitParam @ 97 NONAME ABSENT
+	_ZN16CCmPluginLanBaseD0Ev @ 98 NONAME ABSENT
+	_ZN16CCmPluginLanBaseD1Ev @ 99 NONAME ABSENT
+	_ZN16CCmPluginLanBaseD2Ev @ 100 NONAME ABSENT
+	_ZN17RCmDestinationExt10SetHiddenLEi @ 101 NONAME
+	_ZN17RCmDestinationExt12SetMetadataLEN9CMManager18TSnapMetadataFieldEm @ 102 NONAME
+	_ZN17RCmDestinationExt14SetProtectionLEN9CMManager16TProtectionLevelE @ 103 NONAME
+	_ZN17RCmDestinationExt15ModifyPriorityLER22RCmConnectionMethodExtj @ 104 NONAME
+	_ZN17RCmDestinationExt15ProtectionLevelEv @ 105 NONAME
+	_ZN17RCmDestinationExt17ConnectionMethodLEi @ 106 NONAME
+	_ZN17RCmDestinationExt20AddConnectionMethodLE22RCmConnectionMethodExt @ 107 NONAME
+	_ZN17RCmDestinationExt21ConnectionMethodByIDLEi @ 108 NONAME
+	_ZN17RCmDestinationExt21ConnectionMethodCountEv @ 109 NONAME
+	_ZN17RCmDestinationExt23AddEmbeddedDestinationLERKS_ @ 110 NONAME
+	_ZN17RCmDestinationExt23CreateConnectionMethodLEm @ 111 NONAME
+	_ZN17RCmDestinationExt23DeleteConnectionMethodLER22RCmConnectionMethodExt @ 112 NONAME
+	_ZN17RCmDestinationExt23RemoveConnectionMethodLE22RCmConnectionMethodExt @ 113 NONAME
+	_ZN17RCmDestinationExt2IdEv @ 114 NONAME
+	_ZN17RCmDestinationExt5CloseEv @ 115 NONAME
+	_ZN17RCmDestinationExt5IconLEv @ 116 NONAME ABSENT
+	_ZN17RCmDestinationExt6NameLCEv @ 117 NONAME
+	_ZN17RCmDestinationExt7UpdateLEv @ 118 NONAME
+	_ZN17RCmDestinationExt8DeleteLDEv @ 119 NONAME
+	_ZN17RCmDestinationExt8IsHiddenEv @ 120 NONAME
+	_ZN17RCmDestinationExt8SetIconLEm @ 121 NONAME ABSENT
+	_ZN17RCmDestinationExt8SetNameLERK7TDesC16 @ 122 NONAME
+	_ZN17RCmDestinationExt9ElementIdEv @ 123 NONAME
+	_ZN17RCmDestinationExt9PriorityLERK22RCmConnectionMethodExt @ 124 NONAME
+	_ZN17RCmDestinationExtC1ERKS_ @ 125 NONAME
+	_ZN17RCmDestinationExtC2ERKS_ @ 126 NONAME
+	_ZN17RCmDestinationExtD1Ev @ 127 NONAME
+	_ZN17RCmDestinationExtD2Ev @ 128 NONAME
+	_ZN17RCmDestinationExtaSERKS_ @ 129 NONAME
+	_ZN18CCmDestinationImpl10SetHiddenLEi @ 130 NONAME ABSENT
+	_ZN18CCmDestinationImpl14RemoveFromPoolEv @ 131 NONAME ABSENT
+	_ZN18CCmDestinationImpl14SetProtectionLEN9CMManager16TProtectionLevelE @ 132 NONAME ABSENT
+	_ZN18CCmDestinationImpl15ProtectionLevelEv @ 133 NONAME ABSENT
+	_ZN18CCmDestinationImpl17ConnectionMethodLEi @ 134 NONAME ABSENT
+	_ZN18CCmDestinationImpl21ConnectionMethodCountEv @ 135 NONAME ABSENT
+	_ZN18CCmDestinationImpl4NewLER14CCmManagerImplRK7TDesC16 @ 136 NONAME ABSENT
+	_ZN18CCmDestinationImpl4NewLER14CCmManagerImplj @ 137 NONAME ABSENT
+	_ZN18CCmDestinationImpl5IconLEv @ 138 NONAME ABSENT
+	_ZN18CCmDestinationImpl6NameLCEv @ 139 NONAME ABSENT
+	_ZN18CCmDestinationImpl7UpdateLEv @ 140 NONAME ABSENT
+	_ZN18CCmDestinationImpl8DeleteLDEv @ 141 NONAME ABSENT
+	_ZN18CCmDestinationImpl8IsHiddenEv @ 142 NONAME ABSENT
+	_ZN18CCmDestinationImpl8SetNameLERK7TDesC16 @ 143 NONAME ABSENT
+	_ZN18CCmDestinationImpl9PriorityLER16CCmPluginBaseEng @ 144 NONAME ABSENT
+	_ZN19RCmConnectionMethod5CloseEv @ 145 NONAME
+	_ZN21CCmConnSettingsUiImpl23RunApplicationSettingsLER19TCmSettingSelectionjR6RArrayImE @ 146 NONAME ABSENT
+	_ZN21CCmConnSettingsUiImpl4NewLEP14CCmManagerImpl @ 147 NONAME ABSENT
+	_ZN21CCmTransactionHandler5CloseEv @ 148 NONAME ABSENT
+	_ZN22RCmConnectionMethodExt11CreateCopyLEv @ 149 NONAME
+	_ZN22RCmConnectionMethodExt16SetIntAttributeLEmm @ 150 NONAME
+	_ZN22RCmConnectionMethodExt17SetBoolAttributeLEmi @ 151 NONAME
+	_ZN22RCmConnectionMethodExt19SetStringAttributeLEmRK7TDesC16 @ 152 NONAME
+	_ZN22RCmConnectionMethodExt20SetString8AttributeLEmRK6TDesC8 @ 153 NONAME
+	_ZN22RCmConnectionMethodExt5CloseEv @ 154 NONAME
+	_ZN22RCmConnectionMethodExt7DeleteLEv @ 155 NONAME
+	_ZN22RCmConnectionMethodExt7UpdateLEv @ 156 NONAME
+	_ZN23CmPluginBaseSettingsDlg10InitTextsLEv @ 157 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg10SelectItemEi @ 158 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg13LoadResourceLERK7TDesC16 @ 159 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg15GetIPv6DNSTypeLEmm @ 160 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg15ProcessCommandLEi @ 161 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg16DynInitMenuPaneLEiP12CEikMenuPane @ 162 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg17ConstructAndRunLDEv @ 163 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg17PreLayoutDynInitLEv @ 164 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16ArrayiPK7HBufC16 @ 165 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16Arrayii @ 166 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 167 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg21ShowPopupSettingPageLEmi @ 168 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg21UpdateListBoxContentLEv @ 169 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg23ShowPopupIPv4DNSEditorLEmmmm @ 170 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg23ShowPopupIPv6DNSEditorLEPKmmmm @ 171 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg23ShowPopupIpSettingPageLEmm @ 172 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg24HandleListboxDataChangeLEv @ 173 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg25ShowPopupTextSettingPageLEmm @ 174 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg27ShowRadioButtonSettingPageLEPKmRim @ 175 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg27ShowRadioButtonSettingPageLER16CDesC16ArrayFlatRim @ 176 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg27StringAttributeWithDefaultLEmm @ 177 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg28ShowPopupPortNumSettingPageLEmm @ 178 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg29ShowPopupPasswordSettingPageLEmm @ 179 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg9OkToExitLEi @ 180 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlgC2ER16CCmPluginBaseEng @ 181 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlgD0Ev @ 182 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlgD1Ev @ 183 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlgD2Ev @ 184 NONAME ABSENT
+	_ZN24CCmApplicationSettingsUi23RunApplicationSettingsLER19TCmSettingSelection @ 185 NONAME
+	_ZN24CCmApplicationSettingsUi23RunApplicationSettingsLER19TCmSettingSelectionjR6RArrayImE @ 186 NONAME
+	_ZN24CCmApplicationSettingsUi4NewLEv @ 187 NONAME
+	_ZN24CCmApplicationSettingsUi5NewLCEv @ 188 NONAME
+	_ZN24CCmApplicationSettingsUiD0Ev @ 189 NONAME
+	_ZN24CCmApplicationSettingsUiD1Ev @ 190 NONAME
+	_ZN24CCmApplicationSettingsUiD2Ev @ 191 NONAME
+	_ZN24CCmPluginMultiLineDialog4NewLER6TDes16S1_N15CAknQueryDialog5TToneE @ 192 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIp16DynInitMenuPaneLEiP12CEikMenuPane @ 193 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIp20RunAdvancedSettingsLEv @ 194 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIp21UpdateListBoxContentLEv @ 195 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIpC1ER16CCmPluginBaseEng @ 196 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIpC2ER16CCmPluginBaseEng @ 197 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIpD0Ev @ 198 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIpD1Ev @ 199 NONAME ABSENT
+	_ZN25CmPluginBaseSettingsDlgIpD2Ev @ 200 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdv16DynInitMenuPaneLEiP12CEikMenuPane @ 201 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdv20RunAdvancedSettingsLEv @ 202 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdv21ShowPopupSettingPageLEii @ 203 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdv21UpdateListBoxContentLEv @ 204 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdvC1ER16CCmPluginBaseEng @ 205 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdvC2ER16CCmPluginBaseEng @ 206 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdvD0Ev @ 207 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdvD1Ev @ 208 NONAME ABSENT
+	_ZN26CmPluginBaseSettingsDlgAdvD2Ev @ 209 NONAME ABSENT
+	_ZN28CCmApplicationSettingsUiImpl23RunApplicationSettingsLER19TCmSettingSelection @ 210 NONAME ABSENT
+	_ZN28CCmApplicationSettingsUiImpl4NewLEv @ 211 NONAME ABSENT
+	_ZNK10RCmManager11EasyWlanIdLEv @ 212 NONAME
+	_ZNK10RCmManager12DestinationLEm @ 213 NONAME
+	_ZNK10RCmManager16AllDestinationsLER6RArrayImE @ 214 NONAME
+	_ZNK10RCmManager17ConnectionMethodLER6RArrayImEiii @ 215 NONAME
+	_ZNK10RCmManager17ConnectionMethodLEm @ 216 NONAME
+	_ZNK10RCmManager17GetBearerInfoIntLEmm @ 217 NONAME
+	_ZNK10RCmManager18GetBearerInfoBoolLEmm @ 218 NONAME
+	_ZNK10RCmManager20BearerPriorityArrayLER6RArrayI15TBearerPriorityE @ 219 NONAME
+	_ZNK10RCmManager20GetBearerInfoStringLEmm @ 220 NONAME
+	_ZNK10RCmManager21GetBearerInfoString8LEmm @ 221 NONAME
+	_ZNK10RCmManager26CleanupGlobalPriorityArrayER6RArrayI15TBearerPriorityE @ 222 NONAME
+	_ZNK10RCmManager27GetConnectionMethodInfoIntLEmm @ 223 NONAME
+	_ZNK10RCmManager28GetConnectionMethodInfoBoolLEmm @ 224 NONAME
+	_ZNK10RCmManager30GetConnectionMethodInfoStringLEmm @ 225 NONAME
+	_ZNK10RCmManager31GetConnectionMethodInfoString8LEmm @ 226 NONAME
+	_ZNK13RCmManagerExt17GetBearerInfoIntLEmm @ 227 NONAME
+	_ZNK13RCmManagerExt17SupportedBearersLER6RArrayImE @ 228 NONAME
+	_ZNK13RCmManagerExt18GetBearerInfoBoolLEmm @ 229 NONAME
+	_ZNK13RCmManagerExt18UncategorizedIconLEv @ 230 NONAME ABSENT
+	_ZNK13RCmManagerExt20BearerPriorityArrayLER6RArrayI15TBearerPriorityE @ 231 NONAME
+	_ZNK13RCmManagerExt20GetBearerInfoStringLEmm @ 232 NONAME
+	_ZNK13RCmManagerExt21GetBearerInfoString8LEmm @ 233 NONAME
+	_ZNK13RCmManagerExt26CleanupGlobalPriorityArrayER6RArrayI15TBearerPriorityE @ 234 NONAME
+	_ZNK13RCmManagerExt27GetConnectionMethodInfoIntLEmm @ 235 NONAME
+	_ZNK13RCmManagerExt28GetConnectionMethodInfoBoolLEmm @ 236 NONAME
+	_ZNK13RCmManagerExt30GetConnectionMethodInfoStringLEmm @ 237 NONAME
+	_ZNK13RCmManagerExt31GetConnectionMethodInfoString8LEmm @ 238 NONAME
+	_ZNK14CCmManagerImpl17GetBearerInfoIntLEmm @ 239 NONAME ABSENT
+	_ZNK14CCmManagerImpl18GetBearerInfoBoolLEmm @ 240 NONAME ABSENT
+	_ZNK14CCmManagerImpl20GetBearerInfoStringLEmm @ 241 NONAME ABSENT
+	_ZNK14CCmManagerImpl21GetBearerInfoString8LEmm @ 242 NONAME ABSENT
+	_ZNK14CCmManagerImpl27GetConnectionMethodInfoIntLEmm @ 243 NONAME ABSENT
+	_ZNK14CCmManagerImpl28GetConnectionMethodInfoBoolLEmm @ 244 NONAME ABSENT
+	_ZNK14CCmManagerImpl30GetConnectionMethodInfoStringLEmm @ 245 NONAME ABSENT
+	_ZNK14CCmManagerImpl31GetConnectionMethodInfoString8LEmm @ 246 NONAME ABSENT
+	_ZNK14RCmDestination12IsConnectedLEv @ 247 NONAME
+	_ZNK14RCmDestination15ProtectionLevelEv @ 248 NONAME
+	_ZNK14RCmDestination17ConnectionMethodLEi @ 249 NONAME
+	_ZNK14RCmDestination21ConnectionMethodByIDLEi @ 250 NONAME
+	_ZNK14RCmDestination21ConnectionMethodCountEv @ 251 NONAME
+	_ZNK14RCmDestination2IdEv @ 252 NONAME
+	_ZNK14RCmDestination5IconLEv @ 253 NONAME ABSENT
+	_ZNK14RCmDestination6NameLCEv @ 254 NONAME
+	_ZNK14RCmDestination8IsHiddenEv @ 255 NONAME
+	_ZNK14RCmDestination9ElementIdEv @ 256 NONAME
+	_ZNK14RCmDestination9MetadataLEN9CMManager18TSnapMetadataFieldE @ 257 NONAME
+	_ZNK14RCmDestination9PriorityLERK19RCmConnectionMethod @ 258 NONAME
+	_ZNK16CCmPluginBaseEng10AllocReadLEi @ 259 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng11CreateCopyLEv @ 260 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng11DestinationEv @ 261 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng16GetIntAttributeLEm @ 262 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng17GetBoolAttributeLEm @ 263 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng19GetStringAttributeLEm @ 264 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng20CheckIfNameModifiedLEPN8CommsDat13CCDRecordBaseE @ 265 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng20GetString8AttributeLEm @ 266 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng20GlobalBearerPriorityERK7TDesC16 @ 267 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng22GlobalUiBearerPriorityERK7TDesC16 @ 268 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng23CheckIfAlreadyConnectedEv @ 269 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng7SessionEv @ 270 NONAME ABSENT
+	_ZNK16CCmPluginLanBase13ServiceRecordEv @ 271 NONAME ABSENT
+	_ZNK17RCmDestinationExt12IsConnectedLEv @ 272 NONAME
+	_ZNK17RCmDestinationExt9MetadataLEN9CMManager18TSnapMetadataFieldE @ 273 NONAME
+	_ZNK18CCmDestinationImpl12IsConnectedLEv @ 274 NONAME ABSENT
+	_ZNK19RCmConnectionMethod12DestinationLEv @ 275 NONAME
+	_ZNK19RCmConnectionMethod16GetIntAttributeLEm @ 276 NONAME
+	_ZNK19RCmConnectionMethod17GetBoolAttributeLEm @ 277 NONAME
+	_ZNK19RCmConnectionMethod19GetStringAttributeLEm @ 278 NONAME
+	_ZNK19RCmConnectionMethod20GetString8AttributeLEm @ 279 NONAME
+	_ZNK22RCmConnectionMethodExt12DestinationLEv @ 280 NONAME
+	_ZNK22RCmConnectionMethodExt16GetIntAttributeLEm @ 281 NONAME
+	_ZNK22RCmConnectionMethodExt17GetBoolAttributeLEm @ 282 NONAME
+	_ZNK22RCmConnectionMethodExt19GetStringAttributeLEm @ 283 NONAME
+	_ZNK22RCmConnectionMethodExt20GetString8AttributeLEm @ 284 NONAME
+	_ZNK23CmPluginBaseSettingsDlg14GetHelpContextER15TCoeHelpContext @ 285 NONAME ABSENT
+	_ZNK23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16ArrayiiRK7TDesC16i @ 286 NONAME ABSENT
+	_ZNK23CmPluginBaseSettingsDlg19AppendSettingTextsLER12CDesC16Arrayiiii @ 287 NONAME ABSENT
+	_ZTI16CCmPluginBaseEng @ 288 NONAME ABSENT ; #<TI>#
+	_ZTI16CCmPluginLanBase @ 289 NONAME ABSENT ; #<TI>#
+	_ZTI23CmPluginBaseSettingsDlg @ 290 NONAME ABSENT ; #<TI>#
+	_ZTI25CmPluginBaseSettingsDlgIp @ 291 NONAME ABSENT ; #<TI>#
+	_ZTI26CmPluginBaseSettingsDlgAdv @ 292 NONAME ABSENT ; #<TI>#
+	_ZTIN11TCmCommonUi12CCmDesCArrayE @ 293 NONAME ABSENT ; #<TI>#
+	_ZTV16CCmPluginBaseEng @ 294 NONAME ABSENT ; #<VT>#
+	_ZTV16CCmPluginLanBase @ 295 NONAME ABSENT ; #<VT>#
+	_ZTV23CmPluginBaseSettingsDlg @ 296 NONAME ABSENT ; #<VT>#
+	_ZTV25CmPluginBaseSettingsDlgIp @ 297 NONAME ABSENT ; #<VT>#
+	_ZTV26CmPluginBaseSettingsDlgAdv @ 298 NONAME ABSENT ; #<VT>#
+	_ZTVN11TCmCommonUi12CCmDesCArrayE @ 299 NONAME ABSENT ; #<VT>#
+	_ZThn156_N23CmPluginBaseSettingsDlg15ProcessCommandLEi @ 300 NONAME ABSENT ; #<thunk>#
+	_ZThn156_N23CmPluginBaseSettingsDlg16DynInitMenuPaneLEiP12CEikMenuPane @ 301 NONAME ABSENT ; #<thunk>#
+	_ZThn156_N25CmPluginBaseSettingsDlgIp16DynInitMenuPaneLEiP12CEikMenuPane @ 302 NONAME ABSENT ; #<thunk>#
+	_ZThn156_N26CmPluginBaseSettingsDlgAdv16DynInitMenuPaneLEiP12CEikMenuPane @ 303 NONAME ABSENT ; #<thunk>#
+	_ZThn176_N23CmPluginBaseSettingsDlg19HandleListBoxEventLEP11CEikListBoxN19MEikListBoxObserver13TListBoxEventE @ 304 NONAME ABSENT ; #<thunk>#
+	_ZN14RCmDestinationC1Ev @ 305 NONAME
+	_ZN14RCmDestinationC2Ev @ 306 NONAME
+	_ZN17RCmDestinationExtC1Ev @ 307 NONAME
+	_ZN17RCmDestinationExtC2Ev @ 308 NONAME
+	_ZNK14RCmDestinationeqERKS_ @ 309 NONAME
+	_ZNK14RCmDestinationneERKS_ @ 310 NONAME
+	_ZNK17RCmDestinationExteqERKS_ @ 311 NONAME
+	_ZNK17RCmDestinationExtneERKS_ @ 312 NONAME
+	_ZN13CCmPluginBase10ConstructLEv @ 313 NONAME ABSENT
+	_ZN13CCmPluginBase10CreateNewLEv @ 314 NONAME ABSENT
+	_ZN13CCmPluginBase12EnableProxyLEi @ 315 NONAME ABSENT
+	_ZN13CCmPluginBase15EnableLocationLEi @ 316 NONAME ABSENT
+	_ZN13CCmPluginBase16AddResourceFileLERK7TDesC16 @ 317 NONAME ABSENT
+	_ZN13CCmPluginBase16SetIntAttributeLEmm @ 318 NONAME ABSENT
+	_ZN13CCmPluginBase17EnableChargeCardLEi @ 319 NONAME ABSENT
+	_ZN13CCmPluginBase17RestoreAttributeLEm @ 320 NONAME ABSENT
+	_ZN13CCmPluginBase17SetBoolAttributeLEmi @ 321 NONAME ABSENT
+	_ZN13CCmPluginBase18RemoveResourceFileERK7TDesC16 @ 322 NONAME ABSENT
+	_ZN13CCmPluginBase18UpdateProxyRecordLEv @ 323 NONAME ABSENT
+	_ZN13CCmPluginBase19LoadServiceSettingLEv @ 324 NONAME ABSENT
+	_ZN13CCmPluginBase19SetStringAttributeLEmRK7TDesC16 @ 325 NONAME ABSENT
+	_ZN13CCmPluginBase20SetString8AttributeLEmRK6TDesC8 @ 326 NONAME ABSENT
+	_ZN13CCmPluginBase20UpdateServiceRecordLEv @ 327 NONAME ABSENT
+	_ZN13CCmPluginBase21PrepareToLoadRecordsLEv @ 328 NONAME ABSENT
+	_ZN13CCmPluginBase23PrepareToUpdateRecordsLEv @ 329 NONAME ABSENT
+	_ZN13CCmPluginBase26NumOfConnMethodReferencesLEv @ 330 NONAME ABSENT
+	_ZN13CCmPluginBase5LoadLEm @ 331 NONAME ABSENT
+	_ZN13CCmPluginBase7DeleteLEii @ 332 NONAME ABSENT
+	_ZN13CCmPluginBase7UpdateLEv @ 333 NONAME ABSENT
+	_ZN13CCmPluginBaseC1EP16CCmPluginBaseEng @ 334 NONAME ABSENT
+	_ZN13CCmPluginBaseC2EP16CCmPluginBaseEng @ 335 NONAME ABSENT
+	_ZN13CCmPluginBaseD0Ev @ 336 NONAME ABSENT
+	_ZN13CCmPluginBaseD1Ev @ 337 NONAME ABSENT
+	_ZN13CCmPluginBaseD2Ev @ 338 NONAME ABSENT
+	_ZN14CCmManagerImpl20GetConnectionMethodLEm @ 339 NONAME ABSENT
+	_ZN18CCmDestinationImpl20GetConnectionMethodLEi @ 340 NONAME ABSENT
+	_ZNK13CCmPluginBase10AllocReadLEi @ 341 NONAME ABSENT
+	_ZNK13CCmPluginBase11CreateCopyLEv @ 342 NONAME ABSENT
+	_ZNK13CCmPluginBase11DestinationEv @ 343 NONAME ABSENT
+	_ZNK13CCmPluginBase16GetIntAttributeLEm @ 344 NONAME ABSENT
+	_ZNK13CCmPluginBase17GetBoolAttributeLEm @ 345 NONAME ABSENT
+	_ZNK13CCmPluginBase17ParentDestinationEv @ 346 NONAME ABSENT
+	_ZNK13CCmPluginBase19GetStringAttributeLEm @ 347 NONAME ABSENT
+	_ZNK13CCmPluginBase20GetString8AttributeLEm @ 348 NONAME ABSENT
+	_ZNK13CCmPluginBase5CmMgrEv @ 349 NONAME ABSENT
+	_ZNK13CCmPluginBase6PluginEv @ 350 NONAME ABSENT
+	_ZNK13CCmPluginBase7SessionEv @ 351 NONAME ABSENT
+	_ZTI13CCmPluginBase @ 352 NONAME ABSENT ; #<TI>#
+	_ZTV13CCmPluginBase @ 353 NONAME ABSENT ; #<VT>#
+	_ZN19RCmConnectionMethodC1Ev @ 354 NONAME
+	_ZN19RCmConnectionMethodC2Ev @ 355 NONAME
+	_ZN19RCmConnectionMethodaSERKS_ @ 356 NONAME
+	_ZN22RCmConnectionMethodExtC1Ev @ 357 NONAME
+	_ZN22RCmConnectionMethodExtC2Ev @ 358 NONAME
+	_ZN22RCmConnectionMethodExtaSERKS_ @ 359 NONAME
+	_ZNK19RCmConnectionMethodeqERS_ @ 360 NONAME
+	_ZNK19RCmConnectionMethodneERS_ @ 361 NONAME
+	_ZNK22RCmConnectionMethodExteqERS_ @ 362 NONAME
+	_ZNK22RCmConnectionMethodExtneERS_ @ 363 NONAME
+	_ZN19RCmConnectionMethodD1Ev @ 364 NONAME
+	_ZN19RCmConnectionMethodD2Ev @ 365 NONAME
+	_ZN22RCmConnectionMethodExtD1Ev @ 366 NONAME
+	_ZN22RCmConnectionMethodExtD2Ev @ 367 NONAME
+	_ZN21CCmConnSettingsUiImpl25SetDestinationArrayToUseLE6RArrayImE @ 368 NONAME ABSENT
+	_ZN21CCmConnSettingsUiImpl26ClearDestinationArrayToUseEv @ 369 NONAME ABSENT
+	_ZN13CCmPluginBase17GetAdditionalUidsER6RArrayImE @ 370 NONAME ABSENT
+	_ZN14CCmManagerImpl13WrapCmManagerER13RCmManagerExt @ 371 NONAME ABSENT
+	_ZN16CCmPluginBaseEng17GetAdditionalUidsER6RArrayImE @ 372 NONAME ABSENT
+	_ZN14CCmManagerImpl17CreateFlatCMListLEmR13RPointerArrayI13CCmPluginBaseE @ 373 NONAME ABSENT
+	_ZN14CCmManagerImpl18FilterOutVirtualsLER13RPointerArrayI13CCmPluginBaseE @ 374 NONAME ABSENT
+	_ZN14CCmManagerImpl30CombineArraysForPriorityOrderLER13RPointerArrayI13CCmPluginBaseES3_ @ 375 NONAME ABSENT
+	_ZN14CCmManagerImpl18CreateFlatCMListLCEmR13RPointerArrayI13CCmPluginBaseE @ 376 NONAME ABSENT
+	_ZN19RCmConnectionMethodC1ERKS_ @ 377 NONAME
+	_ZN19RCmConnectionMethodC2ERKS_ @ 378 NONAME
+	_ZN22RCmConnectionMethodExtC1ERKS_ @ 379 NONAME
+	_ZN22RCmConnectionMethodExtC2ERKS_ @ 380 NONAME
+	_ZN13CCmPluginBase13IsLinkedToIapEm @ 381 NONAME ABSENT
+	_ZN13CCmPluginBase14IsLinkedToSnapEm @ 382 NONAME ABSENT
+	_ZNK16CCmPluginBaseEng17ParentDestinationEv @ 383 NONAME ABSENT
+	_ZN13RCmManagerExt20CreateTablesAndOpenLEv @ 384 NONAME
+	_ZN13RCmManagerExt18CreateDestinationLERK7TDesC16m @ 385 NONAME
+	_ZN13RCmManagerExt23CreateConnectionMethodLEmm @ 386 NONAME
+	_ZN16CCmPluginBaseEng15SetPreDefinedIdEm @ 387 NONAME ABSENT
+	_ZN17RCmDestinationExt23CreateConnectionMethodLEmm @ 388 NONAME
+	_ZN23CmPluginBaseSettingsDlg20HandleResourceChangeEi @ 389 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg7ExecuteEv @ 390 NONAME ABSENT
+	_ZThn180_N23CmPluginBaseSettingsDlg7ExecuteEv @ 391 NONAME ABSENT ; #<thunk>#
+	_ZN23CmPluginBaseSettingsDlg16HandleLeaveErrorEi @ 392 NONAME ABSENT
+	_ZThn180_N23CmPluginBaseSettingsDlg16HandleLeaveErrorEi @ 393 NONAME ABSENT ; #<thunk>#
+	_ZN10RCmManager13WriteDefConnLERK15TCmDefConnValue @ 394 NONAME
+	_ZN10RCmManager18CreateDestinationLERK7TDesC16 @ 395 NONAME
+	_ZN10RCmManager18CreateDestinationLERK7TDesC16m @ 396 NONAME
+	_ZN10RCmManager20CreateTablesAndOpenLEv @ 397 NONAME
+	_ZN10RCmManager20RemoveAllReferencesLER19RCmConnectionMethod @ 398 NONAME
+	_ZN10RCmManager21CopyConnectionMethodLER14RCmDestinationR19RCmConnectionMethod @ 399 NONAME
+	_ZN10RCmManager21MoveConnectionMethodLER14RCmDestinationS1_R19RCmConnectionMethod @ 400 NONAME
+	_ZN10RCmManager23CreateConnectionMethodLEm @ 401 NONAME
+	_ZN10RCmManager23CreateConnectionMethodLEmm @ 402 NONAME
+	_ZN10RCmManager23RemoveConnectionMethodLER14RCmDestinationR19RCmConnectionMethod @ 403 NONAME
+	_ZN10RCmManager26UpdateBearerPriorityArrayLERK6RArrayI15TBearerPriorityE @ 404 NONAME
+	_ZN14RCmDestination10SetHiddenLEi @ 405 NONAME
+	_ZN14RCmDestination12SetMetadataLEN9CMManager18TSnapMetadataFieldEm @ 406 NONAME
+	_ZN14RCmDestination14SetProtectionLEN9CMManager16TProtectionLevelE @ 407 NONAME
+	_ZN14RCmDestination15ModifyPriorityLER19RCmConnectionMethodj @ 408 NONAME
+	_ZN14RCmDestination20AddConnectionMethodLE19RCmConnectionMethod @ 409 NONAME
+	_ZN14RCmDestination23AddEmbeddedDestinationLERKS_ @ 410 NONAME
+	_ZN14RCmDestination23CreateConnectionMethodLEm @ 411 NONAME
+	_ZN14RCmDestination23CreateConnectionMethodLEmm @ 412 NONAME
+	_ZN14RCmDestination23DeleteConnectionMethodLER19RCmConnectionMethod @ 413 NONAME
+	_ZN14RCmDestination23RemoveConnectionMethodLE19RCmConnectionMethod @ 414 NONAME
+	_ZN14RCmDestination7UpdateLEv @ 415 NONAME
+	_ZN14RCmDestination8DeleteLDEv @ 416 NONAME
+	_ZN14RCmDestination8SetIconLEm @ 417 NONAME ABSENT
+	_ZN14RCmDestination8SetNameLERK7TDesC16 @ 418 NONAME
+	_ZN19RCmConnectionMethod11CreateCopyLEv @ 419 NONAME
+	_ZN19RCmConnectionMethod16SetIntAttributeLEmm @ 420 NONAME
+	_ZN19RCmConnectionMethod17SetBoolAttributeLEmi @ 421 NONAME
+	_ZN19RCmConnectionMethod19SetStringAttributeLEmRK7TDesC16 @ 422 NONAME
+	_ZN19RCmConnectionMethod20SetString8AttributeLEmRK6TDesC8 @ 423 NONAME
+	_ZN19RCmConnectionMethod7DeleteLEv @ 424 NONAME
+	_ZN19RCmConnectionMethod7UpdateLEv @ 425 NONAME
+	_ZNK10RCmManager17SupportedBearersLER6RArrayImE @ 426 NONAME
+	_ZNK10RCmManager18UncategorizedIconLEv @ 427 NONAME ABSENT
+	_ZN10RCmManager20ReadGenConnSettingsLER18TCmGenConnSettings @ 428 NONAME
+	_ZN10RCmManager21WriteGenConnSettingsLERK18TCmGenConnSettings @ 429 NONAME
+	_ZN14CCmManagerImpl16IapStillExistedLERK16CCmPluginBaseEng @ 430 NONAME ABSENT
+	_ZN14CCmManagerImpl16WatcherRegisterLEP18MCmCommsDatWatcher @ 431 NONAME ABSENT
+	_ZN14CCmManagerImpl17IsIapStillInDestLEP18CCmDestinationImplRK16CCmPluginBaseEng @ 432 NONAME ABSENT
+	_ZN14CCmManagerImpl17WatcherUnRegisterEv @ 433 NONAME ABSENT
+	_ZN14CCmManagerImpl18RemoveDestFromPoolEP18CCmDestinationImpl @ 434 NONAME ABSENT
+	_ZN14CCmManagerImpl24DestinationStillExistedLEP18CCmDestinationImpl @ 435 NONAME ABSENT
+	_ZN23CmPluginBaseSettingsDlg14OfferKeyEventLERK9TKeyEvent10TEventCode @ 436 NONAME ABSENT
+	_ZN14RCmDestination8SetIconLERK7TDesC16 @ 437 NONAME
+	_ZN19RCmConnectionMethod8SetIconLERK7TDesC16 @ 438 NONAME
+	_ZNK10RCmManager21GetUncategorizedIconLEv @ 439 NONAME
+	_ZNK14RCmDestination8GetIconLEv @ 440 NONAME
+	_ZNK19RCmConnectionMethod8GetIconLEv @ 441 NONAME
+	_ZN14RCmDestination8RefreshLEv @ 442 NONAME
+	_ZN19RCmConnectionMethod8RefreshLEv @ 443 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Build file for Connection Method Manager's framework.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmapi.iby    CORE_MW_LAYER_IBY_EXPORT_PATH(cmmapi.iby)
+
+PRJ_MMPFILES
+cmmapi.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/group/cmmapi.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Makefile of Connection Method Manager's framework.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET          cmmanager.dll
+TARGETTYPE      dll
+UID             0x1000008d 0x10207376
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID VID_DEFAULT
+
+SOURCEPATH      ../../cmmcommon/src
+SOURCE          cmmclistatic.cpp
+
+SOURCEPATH      ../src
+SOURCE          cmmanager.cpp
+SOURCE          cmmanagerapi.cpp
+SOURCE          cmdestination.cpp
+SOURCE          cmdestinationwrapper.cpp
+SOURCE          cmdestinationapi.cpp
+SOURCE          cmconnectionmethod.cpp
+SOURCE          cmconnectionmethodwrapper.cpp
+SOURCE          cmconnectionmethodapi.cpp
+SOURCE          cmmanagerext.cpp
+SOURCE          cmdestinationext.cpp
+SOURCE          cmconnectionmethodext.cpp
+SOURCE          cmapplicationsettingsui.cpp
+
+// Component specific internal headers
+USERINCLUDE         ../inc
+USERINCLUDE         ../../cmmcommon/inc
+USERINCLUDE         ../traces
+
+// ADO specific internal headers
+SYSTEMINCLUDE       ../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY         euser.lib
+
+#if defined(ARMCC)
+DEFFILE ../EABI/CmManager_prot_setup.def
+#elif defined( WINSCW )
+DEFFILE ../BWinsCw/CmManager_prot_setup.DEF
+#elif defined( WINS )
+DEFFILE ../BWins/CmManager_prot_setup.def
+#else
+DEFFILE ../BMarm/CmManager_prot_setup.def
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/inc/cmconnectionmethodapi.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#ifndef CMCONNECTIONMETHODAPI_H
+#define CMCONNECTIONMETHODAPI_H
+
+#include <e32std.h>
+
+
+NONSHARABLE_CLASS( RCmConnectionMethodApi ) : public RSubSessionBase
+    {
+public:
+    RCmConnectionMethodApi();
+    TBool SessionConnected() const;
+
+public:
+    void ConnectAndGetConnMethodWithIdL(
+            const RSessionBase& aSession,
+            const TUint32 aIapId,
+            TInt& aExistingHandle );
+    void ConnectAndGetConnMethodFromDestWithIndexL(
+            const RSessionBase& aSession,
+            const TInt aDestHandle,
+            const TInt aIndex,
+            TInt& aExistingHandle );
+    void ConnectAndGetConnMethodFromDestWithIdL(
+            const RSessionBase& aSession,
+            const TInt aDestHandle,
+            const TInt aIapId,
+            TInt& aExistingHandle );
+    void ConnectAndCreateConnMethodL(
+            const RSessionBase& aSession,
+            const TUint32 aBearerType );
+    void ConnectAndCreateConnMethodWithIdL(
+            const RSessionBase& aSession,
+            const TUint32 aBearerType,
+            const TUint32 aIapId );
+    TInt ConnectAndCreateConnMethodCopy(
+            const RSessionBase& aSession,
+            const TInt aConnMethodHandle );
+    void ConnectAndCreateConnMethodToDestL(
+            const RSessionBase& aSession,
+            const TInt aDestHandle,
+            const TUint32 aBearerType );
+    void ConnectAndCreateConnMethodToDestWithIdL(
+            const RSessionBase& aSession,
+            const TInt aDestHandle,
+            const TUint32 aBearerType,
+            const TUint32 aIapId );
+
+    void Close();
+
+    TInt GetIntAttribute(
+            const TUint32 aAttribute,
+            TUint32& aValue );
+    TInt GetBoolAttribute(
+            const TUint32 aAttribute,
+            TBool& aValue );
+    TInt GetStringAttribute(
+            const TUint32 aAttribute,
+            HBufC* aBuffer );
+    TInt GetString8Attribute(
+            const TUint32 aAttribute,
+            HBufC8* aBuffer8 );
+
+    TInt SetIntAttribute(
+            const TUint32 aAttribute,
+            const TUint32 aValue );
+    TInt SetBoolAttribute(
+            const TUint32 aAttribute,
+            const TBool aValue );
+    TInt SetStringAttribute(
+            const TUint32 aAttribute,
+            const TDesC16& aValue );
+    TInt SetString8Attribute(
+            const TUint32 aAttribute,
+            const TDesC8& aValue );
+
+    TInt Update();
+    TInt Refresh();
+    TInt Delete( TBool& aResult );
+    TInt IsEqual( const TInt aHandle, TBool& aResult );
+
+private:
+    // True when a subsession is established to the server.
+    TBool iSessionConnected;
+    };
+
+#endif // CMCONNECTIONMETHODAPI_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/inc/cmconnectionmethodwrapper.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Collects API calls from RCmConnectionMethod- and
+* RCmConnectionMethodExt-classes.
+*
+*/
+
+
+#ifndef CMCONNECTIONMETHODWRAPPER_H
+#define CMCONNECTIONMETHODWRAPPER_H
+
+#include <e32base.h>
+#include "cmconnectionmethodapi.h"
+
+class RCmManagerApi;
+
+
+NONSHARABLE_CLASS( CCmConnectionMethodWrapper ) : public CBase
+    {
+public:
+    static CCmConnectionMethodWrapper* NewL();
+    static CCmConnectionMethodWrapper* NewLC();
+    virtual ~CCmConnectionMethodWrapper();
+
+public:
+    CCmConnectionMethodWrapper();
+
+public:
+    void GetConnMethodWithIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TUint32 aIapId,
+            TInt& aExistingHandle );
+    void GetConnMethodFromDestWithIndexL(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aDestHandle,
+            const TInt aIndex,
+            TInt& aExistingHandle );
+    void GetConnMethodFromDestWithIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aDestHandle,
+            const TInt aIapId,
+            TInt& aExistingHandle );
+    void CreateConnMethodL(
+            RCmManagerApi* aCmManagerApi,
+            const TUint32 aBearerType );
+    void CreateConnMethodWithIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TUint32 aBearerType,
+            const TUint32 aIapId );
+    TInt CreateConnMethodCopy(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aConnMethodHandle );
+    void CreateConnMethodToDestL(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aDestHandle,
+            const TUint32 aBearerType );
+    void CreateConnMethodToDestWithIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aDestHandle,
+            const TUint32 aBearerType,
+            const TUint32 aIapId );
+
+    TInt GetIntAttribute(
+            const TUint32 aAttribute,
+            TUint32& aValue );
+    TInt GetBoolAttribute(
+            const TUint32 aAttribute,
+            TBool& aValue );
+    TInt GetStringAttribute(
+            const TUint32 aAttribute,
+            HBufC* aBuffer );
+    TInt GetString8Attribute(
+            const TUint32 aAttribute,
+            HBufC8* aBuffer );
+
+    TInt SetIntAttribute(
+            const TUint32 aAttribute,
+            const TUint32 aValue );
+    TInt SetBoolAttribute(
+            const TUint32 aAttribute,
+            const TBool aValue );
+    TInt SetStringAttribute(
+            const TUint32 aAttribute,
+            const TDesC16& aValue );
+    TInt SetString8Attribute(
+            const TUint32 aAttribute,
+            const TDesC8& aValue );
+
+    TInt Update();
+    TInt Refresh();
+    TInt Delete( TBool& aResult );
+    TInt IsEqual( const TInt aHandle, TBool& aResult );
+
+    TBool SessionConnected() const;
+    void CloseSession();
+    TInt GetHandle() const;
+    RCmManagerApi* GetMainSession() const;
+
+    void IncreaseReferenceCounter();
+    TInt DecreaseReferenceCounter();
+
+private:
+    // Subsession to server representing this connection method handle.
+    RCmConnectionMethodApi iCmConnectionMethodApi;
+
+    // Pointer for main session to server.
+    RCmManagerApi* iCmManagerApi; // Not owned.
+
+    // Counts the number of references client has to this specific handle.
+    TInt iReferenceCounter;
+    };
+
+#endif // CMCONNECTIONMETHODWRAPPER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/inc/cmdestinationapi.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#ifndef CMDESTINATIONAPI_H
+#define CMDESTINATIONAPI_H
+
+#include <e32std.h>
+
+
+NONSHARABLE_CLASS( RCmDestinationApi ) : public RSubSessionBase
+    {
+public:
+    RCmDestinationApi();
+    TBool SessionConnected();
+
+public:
+    void ConnectAndGetDestWithIdL(
+            const RSessionBase& aSession,
+            const TUint32 aId,
+            TInt& aExistingHandle );
+    void ConnectAndCreateDestWithNameL(
+            const RSessionBase& aSession,
+            const TDesC& aName );
+    void ConnectAndCreateDestWithNameAndIdL(
+            const RSessionBase& aSession,
+            const TDesC& aName,
+            const TUint32 aId );
+    void ConnectAndGetConnMethodAsEmbeddedDestL(
+            const RSessionBase& aSession,
+            const TInt aConnMethodHandle,
+            TInt& aExistingHandle );
+
+    void Close();
+    TInt ConnectionMethodCount( TInt& aCount );
+
+    TInt Priority( const TInt aHandle, TUint& aPriority );
+    TInt GetName( HBufC* aBuffer );
+
+    TInt GetId( TUint32& aId );
+    TInt GetElementId( TUint32& aElementId );
+    TInt GetMetadata(
+            const TUint32 aMetadataField,
+            TUint32& aValue );
+    TInt GetProtectionLevel( TInt& aProtectionLevel );
+
+    TInt AddConnectionMethod(
+            const TInt aConnMethodHandle,
+            TInt& aIndex );
+    TInt AddEmbeddedDestination(
+            const TInt aDestHandle,
+            TInt& aIndex );
+    TInt DeleteConnectionMethod(
+            const TInt aConnMethodHandle );
+    TInt RemoveConnectionMethod(
+            const TInt aConnMethodHandle );
+
+    TInt ModifyPriority(
+            const TInt aConnMethodHandle,
+            const TUint aIndex );
+    TInt SetName( const TDesC& aValue );
+    TInt SetMetadata(
+            const TUint32 aMetaField,
+            const TUint32 aValue );
+    TInt SetProtection( const TInt aValue );
+    TInt SetHidden( const TBool aHidden );
+    TInt Update();
+    TInt Refresh();
+    TInt Delete();
+    TInt IsConnected( TBool& aResult );
+    TInt IsHidden( TBool& aResult );
+    TInt IsEqual( const TInt aHandle, TBool& aResult );
+    TInt GetIcon( HBufC* aBuffer );
+    TInt SetIcon( const TDesC& aValue );
+
+private:
+    // True when a subsession is established to the server.
+    TBool iSessionConnected;
+    };
+
+#endif // CMDESTINATIONAPI_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/inc/cmdestinationwrapper.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Collects API calls from RCmDestination- and RCmDestinationExt-classes.
+*
+*/
+
+
+#ifndef CMDESTINATIONWRAPPER_H
+#define CMDESTINATIONWRAPPER_H
+
+
+#include <e32base.h>
+#include "cmdestinationapi.h"
+
+class RCmManagerApi;
+
+
+NONSHARABLE_CLASS( CCmDestinationWrapper ) : public CBase
+    {
+public:
+    static CCmDestinationWrapper* NewL();
+    static CCmDestinationWrapper* NewLC();
+    virtual ~CCmDestinationWrapper();
+
+public:
+    CCmDestinationWrapper();
+
+public:
+    void GetDestWithIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TUint32 aId,
+            TInt& aExistingHandle );
+    void CreateDestByNameL(
+            RCmManagerApi* aCmManagerApi,
+            const TDesC& aName );
+    void CreateDestByNameAndIdL(
+            RCmManagerApi* aCmManagerApi,
+            const TDesC& aName,
+            const TUint32 aId );
+    void GetConnMethodAsEmbeddedDestL(
+            RCmManagerApi* aCmManagerApi,
+            const TInt aConnMethodHandle,
+            TInt& aExistingHandle );
+
+    TInt ConnectionMethodCount( TInt& aCount );
+    TInt Priority( const TInt aHandle, TUint& aPriority );
+    TInt GetName( HBufC* aBuffer );
+    TInt GetId( TUint32& aId );
+    TInt GetElementId( TUint32& aElementId );
+    TInt GetMetadata(
+            const TUint32 aMetadataField,
+            TUint32& aValue );
+    TInt GetProtectionLevel( TInt& aProtectionLevel );
+
+    TInt AddConnectionMethod(
+            const TInt aConnMethodHandle,
+            TInt& aIndex );
+    TInt AddEmbeddedDestination(
+            const TInt aDestHandle,
+            TInt& aIndex );
+    TInt DeleteConnectionMethod(
+            const TInt aConnMethodHandle);
+    TInt RemoveConnectionMethod(
+            const TInt aConnMethodHandle );
+
+    TInt ModifyPriority(
+            const TInt aConnMethodHandle,
+            const TUint aIndex );
+    TInt SetName( const TDesC& aValue );
+    TInt SetMetadata(
+            const TUint32 aMetaField,
+            const TUint32 aValue );
+    TInt SetProtection( const TInt aValue );
+    TInt SetHidden( const TBool aHidden );
+    TInt Update();
+    TInt Refresh();
+    TInt Delete();
+    TInt IsConnected( TBool& aResult );
+    TInt IsHidden( TBool& aResult );
+    TInt IsEqual( const TInt aHandle, TBool& aResult );
+    TInt GetIcon( HBufC* aBuffer );
+    TInt SetIcon( const TDesC& aValue);
+
+    TBool SessionConnected();
+    void CloseSession();
+    TInt GetHandle() const;
+    RCmManagerApi* GetMainSession() const;
+
+    void IncreaseReferenceCounter();
+    TInt DecreaseReferenceCounter();
+
+private:
+    // Subsession to server representing this destination handle.
+    RCmDestinationApi iCmDestinationApi;
+
+    // Pointer for main session to server.
+    RCmManagerApi* iCmManagerApi; // Not owned.
+
+    // Counts the number of references client has to this specific handle.
+    TInt iReferenceCounter;
+    };
+
+#endif // CMDESTINATIONWRAPPER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/inc/cmmanagerapi.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#ifndef CMMANAGERAPI_H
+#define CMMANAGERAPI_H
+
+#include <e32std.h>
+#include <cmdefconnvalues.h>
+#include <cmgenconnsettings.h>
+
+class CCmDestinationWrapper;
+class CCmConnectionMethodWrapper;
+class TBearerPriority;
+class TCmmIpcStructGetConnMethods;
+class TCmmIpcStructMoveConnMethod;
+
+
+NONSHARABLE_CLASS( RCmManagerApi ) : public RSessionBase
+    {
+public:
+    /**
+     * Constructor.
+     */
+    RCmManagerApi();
+
+public:
+    /**
+     * Opens a connection (session) to the CMM server.
+     * @return KErrNone if the connection succeeds, a system-wide error code
+     * if not.
+     */
+    TInt Connect();
+
+    /**
+     * Closes the connection (session).
+     */
+    void Close();
+
+    TInt StoreDestinationWrapper(
+            CCmDestinationWrapper* aDestinationWrapper );
+    TInt RemoveDestinationWrapper(
+            CCmDestinationWrapper* aDestinationWrapper );
+    CCmDestinationWrapper* GetDestinationWrapperL( const TInt aHandle );
+
+    TInt StoreConnMethodWrapper(
+            CCmConnectionMethodWrapper* aConnMethodWrapper );
+    TInt RemoveConnMethodWrapper(
+            CCmConnectionMethodWrapper* aConnMethodWrapper );
+    CCmConnectionMethodWrapper* GetConnMethodWrapperL( const TInt aHandle );
+
+    TInt GetBearerInfoInt(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute,
+            TUint32& aValue );
+    TInt GetBearerInfoBool(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute,
+            TBool& aValue );
+    TInt GetBearerInfoString(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute,
+            HBufC* aBuffer );
+    TInt GetBearerInfoString8(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute,
+            HBufC8* aBuffer8 );
+
+    TInt GetConnectionMethodInfoInt(
+            const TUint32 aIapId,
+            const TUint32 aAttribute,
+            TUint32& aValue );
+    TInt GetConnectionMethodInfoBool(
+            const TUint32 aIapId,
+            const TUint32 aAttribute,
+            TBool& aValue );
+    TInt GetConnectionMethodInfoString(
+            const TUint32 aIapId,
+            const TUint32 aAttribute,
+            HBufC* aBuffer );
+    TInt GetConnectionMethodInfoString8(
+            const TUint32 aIapId,
+            const TUint32 aAttribute,
+            HBufC8* aBuffer8 );
+
+    void GetConnMethodsL(
+            const TCmmIpcStructGetConnMethods& aParameters,
+            RArray<TUint32>& aCmArray );
+    void GetAllDestinationsL(
+            RArray<TUint32>& aDestArray );
+
+    void GetBearerPriorityArrayL( RArray<TBearerPriority>& aArray );
+    void SetBearerPriorityArrayL( const RArray<TBearerPriority>& aArray );
+
+    void GetSupportedBearersL( RArray<TUint32>& aArray );
+
+    TInt GetEasyWlanId( TUint32& aValue );
+
+    TInt ReadDefaultConnection(
+            TCmDefConnValue& aDefConnSetting );
+    TInt WriteDefaultConnection(
+            const TCmDefConnValue& aDefConnSetting );
+
+    TInt ReadGeneralConnectionSettings(
+            TCmGenConnSettings& aGenConnSettings );
+    TInt WriteGeneralConnectionSettings(
+            const TCmGenConnSettings& aGenConnSettings );
+
+    TInt CopyConnectionMethod(
+            const TInt aTargetDestHandle,
+            const TInt aConnMethodHandle,
+            TInt& aIndex );
+    TInt MoveConnectionMethod(
+            TCmmIpcStructMoveConnMethod& aPkgData );
+    TInt RemoveConnectionMethod(
+            const TInt aTargetDestHandle,
+            const TInt aConnMethodHandle );
+    TInt RemoveAllReferences(
+            const TInt aConnMethodHandle );
+    TInt GetUncategorizedIcon( HBufC* aBuffer );
+
+private:
+    // Array of destination handles opened through this session.
+    // Does not have ownership of contained objects.
+    RPointerArray<CCmDestinationWrapper> iDestinations;
+
+    // Array of connection method handles opened through this session.
+    // Does not have ownership of contained objects.
+    RPointerArray<CCmConnectionMethodWrapper> iConnMethods;
+
+    // True when a session is established to the server.
+    TBool iConnected;
+
+    // True when using smaller buffer for ConnectionMethodL(array)-query.
+    // Bigger buffer is taken into use if needed.
+    TBool iSmallBufsForDestinations;
+
+    // True when using smaller buffer for AllDestinationsL(array)-query.
+    // Bigger buffer is taken into use if needed.
+    TBool iSmallBufsForConnMethods;
+    };
+
+#endif // CMMANAGERAPI_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/rom/cmmapi.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmmanager.dll to ROM.
+*
+*/
+
+#ifndef CMMAPI_IBY__
+#define CMMAPI_IBY__
+
+file=ABI_DIR\BUILD_DIR\cmmanager.dll     SHARED_LIB_DIR\cmmanager.dll
+
+
+#endif // CMMAPI_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmapplicationsettingsui.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Application Setting UI
+*
+*/
+
+// Dummy implementation not to break the build.
+// Not working at the moment due to cmmanager refactoring work.
+
+#include "cmapplicationsettingsui.h"
+//#include <cmmanager.h>
+//#include "cmconnsettingsuiimpl.h"
+//#include "cmmanager.hrh"
+
+using namespace CMManager;
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::NewL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C CCmApplicationSettingsUi* CCmApplicationSettingsUi::NewL()
+    {
+    /*
+    CCmApplicationSettingsUi* self = new (ELeave) CCmApplicationSettingsUi();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );   // self
+    return self;
+    */
+    return NULL;
+    }
+    
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::NewLC()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C CCmApplicationSettingsUi* CCmApplicationSettingsUi::NewLC()
+    {
+    /*
+    CCmApplicationSettingsUi* self = new (ELeave) CCmApplicationSettingsUi();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    */
+    return NULL;
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::CCmApplicationSettingsUi()
+//-----------------------------------------------------------------------------
+//
+CCmApplicationSettingsUi::CCmApplicationSettingsUi()
+    {
+    iImpl = NULL;
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::~CCmApplicationSettingsUi()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C CCmApplicationSettingsUi::~CCmApplicationSettingsUi()
+    {
+    // delete iImpl;
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::ConstructL()
+//-----------------------------------------------------------------------------
+//
+void CCmApplicationSettingsUi::ConstructL()
+    {
+    // iImpl = CCmConnSettingsUiImpl::NewWithoutTablesL(); */
+    }
+    
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::RunSettingsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool CCmApplicationSettingsUi::RunApplicationSettingsL( 
+                                               TCmSettingSelection& aSelection )
+    {
+    /*
+    TBearerFilterArray aFilterArray;
+    return iImpl->RunApplicationSettingsL(  aSelection,
+                                            EShowDefaultConnection | 
+                                            EShowDestinations | 
+                                            EShowConnectionMethods,
+                                            aFilterArray );
+                                            */
+    (void) aSelection;
+    return NULL;
+    }    
+    
+//-----------------------------------------------------------------------------
+//  CCmApplicationSettingsUi::RunSettingsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool CCmApplicationSettingsUi::RunApplicationSettingsL( 
+                                        TCmSettingSelection& aSelection, 
+                                        TUint aListItems,
+                                        TBearerFilterArray& aFilterArray)
+    {
+    /*
+    return iImpl->RunApplicationSettingsL(  aSelection,
+                                            aListItems,
+                                            aFilterArray );
+    */
+    (void) aSelection;
+    (void) aListItems;
+    (void) aFilterArray;
+    return NULL;
+    }    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmconnectionmethod.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,557 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmConnectionMethod.
+*
+*/
+
+
+#include <cmconnectionmethod.h>
+#include <cmdestination.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmdestinationwrapper.h"
+#include "cmconnectionmethodwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmconnectionmethodTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::RCmConnectionMethod()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod::RCmConnectionMethod(
+        const RCmConnectionMethod& aConnMethod )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY );
+
+    this->iCmConnectionMethodWrapper = aConnMethod.iCmConnectionMethodWrapper;
+    if ( iCmConnectionMethodWrapper )
+        {
+        iCmConnectionMethodWrapper->IncreaseReferenceCounter();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::Close()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_CLOSE_ENTRY );
+
+    if ( iCmConnectionMethodWrapper )
+        {
+        if ( iCmConnectionMethodWrapper->DecreaseReferenceCounter() <= 0 )
+            {
+            delete iCmConnectionMethodWrapper;
+            }
+        iCmConnectionMethodWrapper = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::~RCmConnectionMethod()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod::~RCmConnectionMethod()
+    {
+    OstTraceFunctionEntry0( DUP1_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY );
+    Close();
+    OstTraceFunctionExit0( DUP1_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::CreateCopyL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmConnectionMethod::CreateCopyL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_CREATECOPYL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt connMethodHandle = iCmConnectionMethodWrapper->GetHandle();
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+
+    TInt err = cmWrapper->CreateConnMethodCopy(
+            iCmConnectionMethodWrapper->GetMainSession(),
+            connMethodHandle );
+    User::LeaveIfError( err );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_CREATECOPYL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::GetIntAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmConnectionMethod::GetIntAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_GETINTATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmConnectionMethodWrapper->GetIntAttribute( aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_GETINTATTRIBUTEL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::GetBoolAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethod::GetBoolAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_GETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmConnectionMethodWrapper->GetBoolAttribute( aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_GETBOOLATTRIBUTEL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::GetStringAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmConnectionMethod::GetStringAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_GETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmConnectionMethodWrapper->GetStringAttribute( aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_GETSTRINGATTRIBUTEL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::GetString8AttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmConnectionMethod::GetString8AttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_GETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmConnectionMethodWrapper->GetString8Attribute( aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_GETSTRING8ATTRIBUTEL_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::SetIntAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::SetIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_SETINTATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetIntAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_SETINTATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::SetBoolAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::SetBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_SETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetBoolAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_SETBOOLATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::SetStringAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::SetStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_SETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetStringAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_SETSTRINGATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::SetString8AttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::SetString8AttributeL(
+        TUint32 aAttribute,
+        const TDesC8& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_SETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetString8Attribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_SETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::UpdateL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::UpdateL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_UPDATEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->Update();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_UPDATEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::DeleteL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethod::DeleteL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_DELETEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool result( ETrue );
+    TInt err = iCmConnectionMethodWrapper->Delete( result );
+    User::LeaveIfError( err );
+
+    // Instead of calling Close(), we need to force this handle closed even if
+    // copies have been made. So we delete the destination wrapper directly.
+    delete iCmConnectionMethodWrapper;
+    iCmConnectionMethodWrapper = NULL;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_DELETEL_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::DestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination RCmConnectionMethod::DestinationL() const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_DESTINATIONL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // If client already has a handle open to this destination, give a
+    // reference to it.
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    TInt connMethodHandle = iCmConnectionMethodWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    destWrap->GetConnMethodAsEmbeddedDestL(
+            iCmConnectionMethodWrapper->GetMainSession(),
+            connMethodHandle,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( destWrap );
+        destWrap = iCmConnectionMethodWrapper->GetMainSession()->GetDestinationWrapperL(
+                existingHandle );
+        destWrap->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( destWrap );
+        }
+
+    RCmDestination dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_DESTINATIONL_EXIT );
+    return dest;
+    }
+
+//--------------------------------------------------------------------------
+//  RCmConnectionMethod::RCmConnectionMethod()
+//--------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod::RCmConnectionMethod() : iCmConnectionMethodWrapper( NULL )
+    {
+    OstTraceFunctionEntry0( DUP2_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY );
+    OstTraceFunctionExit0( DUP2_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::operator=()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod& RCmConnectionMethod::operator=(
+        const RCmConnectionMethod& aConnMethod )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_OPERATOR_ENTRY );
+
+    if ( this != &aConnMethod )
+        {
+        Close();
+        this->iCmConnectionMethodWrapper = aConnMethod.iCmConnectionMethodWrapper;
+        if ( iCmConnectionMethodWrapper )
+            {
+            iCmConnectionMethodWrapper->IncreaseReferenceCounter();
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_OPERATOR_EXIT );
+    return *this;
+    }
+
+//--------------------------------------------------------------------------
+//  RCmConnectionMethod::operator==()
+//--------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethod::operator==( RCmConnectionMethod& aConnMethod ) const
+    {
+    OstTraceFunctionEntry0( DUP1_RCMCONNECTIONMETHOD_OPERATOR_ENTRY );
+
+    TBool result( EFalse );
+    if ( !aConnMethod.iCmConnectionMethodWrapper )
+        {
+        if ( !iCmConnectionMethodWrapper )
+            {
+            result = ETrue; // Both empty.
+            }
+        else
+            {
+            result = EFalse;
+            }
+        }
+    else if ( !iCmConnectionMethodWrapper )
+        {
+        result = EFalse;
+        }
+    else
+        {
+        // Both connection method objects have wrappers.
+
+        if ( !iCmConnectionMethodWrapper->SessionConnected() ||
+                !aConnMethod.iCmConnectionMethodWrapper->SessionConnected() )
+            {
+            result = EFalse;
+            }
+        else
+            {
+            // Both connection method objects are connected to server.
+
+            TInt handle = aConnMethod.iCmConnectionMethodWrapper->GetHandle();
+            TInt err = iCmConnectionMethodWrapper->IsEqual( handle, result );
+
+            if ( err )
+                {
+                result = EFalse;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMCONNECTIONMETHOD_OPERATOR_EXIT );
+    return result;
+    }
+
+//--------------------------------------------------------------------------
+//
+//--------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethod::operator!=( RCmConnectionMethod& aConnMethod ) const
+    {
+    OstTraceFunctionEntry0( DUP2_RCMCONNECTIONMETHOD_OPERATOR_ENTRY );
+
+    TBool result = !( operator==( aConnMethod ) );
+
+    OstTraceFunctionExit0( DUP2_RCMCONNECTIONMETHOD_OPERATOR_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::GetIconL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmConnectionMethod::GetIconL() const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_GETICONL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmConnectionMethodWrapper->GetStringAttribute( CMManager::ECmBearerIcon, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_GETICONL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::SetIconL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::SetIconL( const TDesC& aIcon )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_SETICONL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetStringAttribute( CMManager::ECmBearerIcon, aIcon );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_SETICONL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethod::RefreshL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethod::RefreshL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHOD_REFRESHL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->Refresh();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHOD_REFRESHL_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmconnectionmethodapi.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,405 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#include "cmmserverdefs.h"
+#include "cmconnectionmethodapi.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmconnectionmethodapiTraces.h"
+#endif
+
+
+RCmConnectionMethodApi::RCmConnectionMethodApi()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_RCMCONNECTIONMETHODAPI_ENTRY );
+    iSessionConnected = EFalse;
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_RCMCONNECTIONMETHODAPI_EXIT );
+    }
+
+TBool RCmConnectionMethodApi::SessionConnected() const
+    {
+    return iSessionConnected;
+    }
+
+void RCmConnectionMethodApi::ConnectAndGetConnMethodWithIdL(
+        const RSessionBase& aSession,
+        const TUint32 aIapId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODWITHIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    aExistingHandle = 0;
+    TPckg<TInt> pckg( aExistingHandle );
+    TIpcArgs args( aIapId, &pckg );
+    TInt result = CreateSubSession( aSession, ECMGetConnMethodWithId, args );
+    if ( !aExistingHandle )
+        {
+        User::LeaveIfError( result );
+        iSessionConnected = ETrue;
+        }
+    else
+        {
+        if ( result != KErrAlreadyExists )
+            {
+            User::Leave( result );
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODWITHIDL_EXIT );
+    }
+
+void RCmConnectionMethodApi::ConnectAndGetConnMethodFromDestWithIndexL(
+        const RSessionBase& aSession,
+        const TInt aDestHandle,
+        const TInt aIndex,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHINDEXL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    aExistingHandle = 0;
+    TPckg<TInt> pckg( aExistingHandle );
+    TIpcArgs args( aDestHandle, aIndex, &pckg );
+    TInt result = CreateSubSession( aSession, ECMGetConnMethodFromDestWithIndex, args );
+    if ( !aExistingHandle )
+        {
+        User::LeaveIfError( result );
+        iSessionConnected = ETrue;
+        }
+    else
+        {
+        if ( result != KErrAlreadyExists )
+            {
+            User::Leave( result );
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHINDEXL_EXIT );
+    }
+
+void RCmConnectionMethodApi::ConnectAndGetConnMethodFromDestWithIdL(
+        const RSessionBase& aSession,
+        const TInt aDestHandle,
+        const TInt aIapId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    aExistingHandle = 0;
+    TPckg<TInt> pckg( aExistingHandle );
+    TIpcArgs args( aDestHandle, aIapId, &pckg );
+    TInt result = CreateSubSession( aSession, ECMGetConnMethodFromDestWithId, args );
+    if ( !aExistingHandle )
+        {
+        User::LeaveIfError( result );
+        iSessionConnected = ETrue;
+        }
+    else
+        {
+        if ( result != KErrAlreadyExists )
+            {
+            User::Leave( result );
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHIDL_EXIT );
+    }
+
+void RCmConnectionMethodApi::ConnectAndCreateConnMethodL(
+        const RSessionBase& aSession,
+        const TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    TIpcArgs args( aBearerType );
+    User::LeaveIfError( CreateSubSession( aSession, ECMCreateConnMethod, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODL_EXIT );
+    }
+
+void RCmConnectionMethodApi::ConnectAndCreateConnMethodWithIdL(
+        const RSessionBase& aSession,
+        const TUint32 aBearerType,
+        const TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODWITHIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    TIpcArgs args( aBearerType, aIapId );
+    User::LeaveIfError( CreateSubSession( aSession, ECMCreateConnMethodWithId, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODWITHIDL_EXIT );
+    }
+
+TInt RCmConnectionMethodApi::ConnectAndCreateConnMethodCopy(
+        const RSessionBase& aSession,
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODCOPY_ENTRY );
+
+    TInt err( KErrNone );
+    if ( iSessionConnected )
+        {
+        err = KErrAlreadyExists;
+        }
+    else
+        {
+        TIpcArgs args( aConnMethodHandle );
+        err = CreateSubSession( aSession, ECMCreateCopyOfExisting, args );
+        if ( !err )
+            {
+            iSessionConnected = ETrue;
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODCOPY_EXIT );
+    return err;
+    }
+
+void RCmConnectionMethodApi::ConnectAndCreateConnMethodToDestL(
+        const RSessionBase& aSession,
+        const TInt aDestHandle,
+        const TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    TIpcArgs args( aDestHandle, aBearerType );
+    User::LeaveIfError( CreateSubSession( aSession, ECMCreateConnMethodToDest, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTL_EXIT );
+    }
+
+void RCmConnectionMethodApi::ConnectAndCreateConnMethodToDestWithIdL(
+        const RSessionBase& aSession,
+        const TInt aDestHandle,
+        const TUint32 aBearerType,
+        const TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTWITHIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    TIpcArgs args( aDestHandle, aBearerType, aIapId );
+    User::LeaveIfError( CreateSubSession( aSession, ECMCreateConnMethodToDestWithId, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTWITHIDL_EXIT );
+    }
+
+void RCmConnectionMethodApi::Close()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_CLOSE_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        CloseSubSession( ECMCloseConnMethod );
+        iSessionConnected = EFalse;
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_CLOSE_EXIT );
+    }
+
+TInt RCmConnectionMethodApi::GetIntAttribute(
+        const TUint32 aAttribute,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_GETINTATTRIBUTE_ENTRY );
+
+    TPckg<TUint32> pckg( aValue );
+    TIpcArgs args( aAttribute, &pckg );
+    TInt err = SendReceive( ECMGetIntAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_GETINTATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::GetBoolAttribute(
+        const TUint32 aAttribute,
+        TBool& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_GETBOOLATTRIBUTE_ENTRY );
+
+    TPckg<TBool> pckg( aValue );
+    TIpcArgs args( aAttribute, &pckg );
+    TInt err = SendReceive( ECMGetBoolAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_GETBOOLATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::GetStringAttribute(
+        const TUint32 aAttribute,
+        HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_GETSTRINGATTRIBUTE_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( aAttribute, &descriptor );
+    TInt err = SendReceive( ECMGetStringAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_GETSTRINGATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::GetString8Attribute(
+        const TUint32 aAttribute,
+        HBufC8* aBuffer8 )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_GETSTRING8ATTRIBUTE_ENTRY );
+
+    TPtr8 descriptor( aBuffer8->Des() );
+    TIpcArgs args( aAttribute, &descriptor );
+    TInt err = SendReceive( ECMGetString8Attribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_GETSTRING8ATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::SetIntAttribute(
+        const TUint32 aAttribute,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_SETINTATTRIBUTE_ENTRY );
+
+    TIpcArgs args( aAttribute, aValue );
+    TInt err = SendReceive( ECMSetIntAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_SETINTATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::SetBoolAttribute(
+        const TUint32 aAttribute,
+        const TBool aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_SETBOOLATTRIBUTE_ENTRY );
+
+    TIpcArgs args( aAttribute, aValue );
+    TInt err = SendReceive( ECMSetBoolAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_SETBOOLATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::SetStringAttribute(
+        const TUint32 aAttribute,
+        const TDesC16& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_SETSTRINGATTRIBUTE_ENTRY );
+
+    TIpcArgs args( aAttribute, &aValue );
+    TInt err = SendReceive( ECMSetStringAttribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_SETSTRINGATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::SetString8Attribute(
+        const TUint32 aAttribute,
+        const TDesC8& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_SETSTRING8ATTRIBUTE_ENTRY );
+
+    TIpcArgs args( aAttribute, &aValue );
+    TInt err = SendReceive( ECMSetString8Attribute, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_SETSTRING8ATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::Update()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_UPDATE_ENTRY );
+
+    TInt err = SendReceive( ECMUpdate );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_UPDATE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::Refresh()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_REFRESH_ENTRY );
+
+    TInt err = SendReceive( ECMRefresh );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_REFRESH_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::Delete( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_DELETE_ENTRY );
+
+    TPckg<TBool> pckg( aResult );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( ECMDelete, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_DELETE_EXIT );
+    return err;
+    }
+
+TInt RCmConnectionMethodApi::IsEqual( const TInt aHandle, TBool& aResult )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODAPI_ISEQUAL_ENTRY );
+
+    TPckg<TBool> pckg( aResult );
+    TIpcArgs args( aHandle, &pckg );
+    TInt err = SendReceive( ECMIsEqual, args );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODAPI_ISEQUAL_EXIT );
+    return err;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmconnectionmethodext.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,488 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmConnectionMethodExt.
+*
+*/
+
+
+#include <cmconnectionmethodext.h>
+#include <cmdestinationext.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmdestinationwrapper.h"
+#include "cmconnectionmethodwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmconnectionmethodextTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::RCmConnectionMethodExt()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt::RCmConnectionMethodExt(
+        const RCmConnectionMethodExt& aConnMethod )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY );
+
+    this->iCmConnectionMethodWrapper = aConnMethod.iCmConnectionMethodWrapper;
+    if ( iCmConnectionMethodWrapper )
+        {
+        iCmConnectionMethodWrapper->IncreaseReferenceCounter();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::Close()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_CLOSE_ENTRY );
+
+    if ( iCmConnectionMethodWrapper )
+        {
+        if ( iCmConnectionMethodWrapper->DecreaseReferenceCounter() <= 0 )
+            {
+            delete iCmConnectionMethodWrapper;
+            }
+        iCmConnectionMethodWrapper = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::~RCmConnectionMethodExt()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt::~RCmConnectionMethodExt()
+    {
+    OstTraceFunctionEntry0( DUP2_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY );
+    Close();
+    OstTraceFunctionExit0( DUP2_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::CreateCopyL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmConnectionMethodExt::CreateCopyL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_CREATECOPYL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt connMethodHandle = iCmConnectionMethodWrapper->GetHandle();
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+
+    TInt err = cmWrapper->CreateConnMethodCopy(
+            iCmConnectionMethodWrapper->GetMainSession(),
+            connMethodHandle );
+    User::LeaveIfError( err );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_CREATECOPYL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::GetIntAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmConnectionMethodExt::GetIntAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_GETINTATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmConnectionMethodWrapper->GetIntAttribute( aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_GETINTATTRIBUTEL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::GetBoolAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethodExt::GetBoolAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_GETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmConnectionMethodWrapper->GetBoolAttribute( aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_GETBOOLATTRIBUTEL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::GetStringAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmConnectionMethodExt::GetStringAttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_GETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmConnectionMethodWrapper->GetStringAttribute( aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = NULL;
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_GETSTRINGATTRIBUTEL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::GetString8AttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmConnectionMethodExt::GetString8AttributeL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_GETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmConnectionMethodWrapper->GetString8Attribute( aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = NULL;
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_GETSTRING8ATTRIBUTEL_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::SetIntAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::SetIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_SETINTATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetIntAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_SETINTATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::SetBoolAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::SetBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_SETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetBoolAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_SETBOOLATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::SetStringAttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::SetStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_SETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetStringAttribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_SETSTRINGATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::SetString8AttributeL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::SetString8AttributeL(
+        TUint32 aAttribute,
+        const TDesC8& aValue )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_SETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->SetString8Attribute( aAttribute, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_SETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::UpdateL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmConnectionMethodExt::UpdateL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_UPDATEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmConnectionMethodWrapper->Update();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_UPDATEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::DeleteL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethodExt::DeleteL()
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_DELETEL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool result( ETrue );
+    TInt err = iCmConnectionMethodWrapper->Delete( result );
+    User::LeaveIfError( err );
+
+    delete iCmConnectionMethodWrapper;
+    iCmConnectionMethodWrapper = NULL;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_DELETEL_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::DestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt RCmConnectionMethodExt::DestinationL() const
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_DESTINATIONL_ENTRY );
+
+    if ( !iCmConnectionMethodWrapper || !iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // If client already has a handle open to this destination, give a
+    // reference to it.
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    TInt connMethodHandle = iCmConnectionMethodWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    destWrap->GetConnMethodAsEmbeddedDestL(
+            iCmConnectionMethodWrapper->GetMainSession(),
+            connMethodHandle,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( destWrap );
+        destWrap = iCmConnectionMethodWrapper->GetMainSession()->GetDestinationWrapperL(
+                existingHandle );
+        destWrap->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( destWrap );
+        }
+
+    RCmDestinationExt dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_DESTINATIONL_EXIT );
+    return dest;
+    }
+
+//--------------------------------------------------------------------------
+//  RCmConnectionMethodExt::RCmConnectionMethodExt()
+//--------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt::RCmConnectionMethodExt() : iCmConnectionMethodWrapper( NULL )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY );
+    OstTraceFunctionExit0( DUP1_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmConnectionMethodExt::operator=()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt& RCmConnectionMethodExt::operator=(
+        const RCmConnectionMethodExt& aConnMethod )
+    {
+    OstTraceFunctionEntry0( RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY );
+
+    if ( this != &aConnMethod )
+        {
+        Close();
+        this->iCmConnectionMethodWrapper = aConnMethod.iCmConnectionMethodWrapper;
+        if ( iCmConnectionMethodWrapper )
+            {
+            iCmConnectionMethodWrapper->IncreaseReferenceCounter();
+            }
+        }
+
+    OstTraceFunctionExit0( RCMCONNECTIONMETHODEXT_OPERATOR_EXIT );
+    return *this;
+    }
+
+//--------------------------------------------------------------------------
+//  RCmConnectionMethodExt::operator==()
+//--------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethodExt::operator==( RCmConnectionMethodExt& aConnMethod ) const
+    {
+    OstTraceFunctionEntry0( DUP1_RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY );
+
+    TBool result( EFalse );
+    if ( !aConnMethod.iCmConnectionMethodWrapper )
+        {
+        if ( !iCmConnectionMethodWrapper )
+            {
+            result = ETrue; // Both empty
+            }
+        else
+            {
+            result = EFalse;
+            }
+        }
+    else if ( !iCmConnectionMethodWrapper )
+        {
+        result = EFalse;
+        }
+    else
+        {
+        // Both connection method objects have wrappers.
+
+        if ( !iCmConnectionMethodWrapper->SessionConnected() ||
+                !aConnMethod.iCmConnectionMethodWrapper->SessionConnected() )
+            {
+            result = EFalse;
+            }
+        else
+            {
+            // Both connection method objects are connected to server.
+
+            TInt handle = aConnMethod.iCmConnectionMethodWrapper->GetHandle();
+            TInt err = iCmConnectionMethodWrapper->IsEqual( handle, result );
+
+            if ( err )
+                {
+                result = EFalse;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMCONNECTIONMETHODEXT_OPERATOR_EXIT );
+    return result;
+    }
+
+//--------------------------------------------------------------------------
+//
+//--------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmConnectionMethodExt::operator!=( RCmConnectionMethodExt& aConnMethod ) const
+    {
+    OstTraceFunctionEntry0( DUP2_RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY );
+
+    TBool result = !( operator==( aConnMethod ) );
+
+    OstTraceFunctionExit0( DUP2_RCMCONNECTIONMETHODEXT_OPERATOR_EXIT );
+    return result;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmconnectionmethodwrapper.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,451 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Collects API calls from RCmConnectionMethod- and
+* RCmConnectionMethodExt-classes.
+*
+*/
+
+
+#include "cmconnectionmethodwrapper.h"
+#include "cmmanagerapi.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmconnectionmethodwrapperTraces.h"
+#endif
+
+
+CCmConnectionMethodWrapper* CCmConnectionMethodWrapper::NewL()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_NEWL_ENTRY );
+
+    CCmConnectionMethodWrapper* self = CCmConnectionMethodWrapper::NewLC();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_NEWL_EXIT );
+    return self;
+    }
+
+CCmConnectionMethodWrapper* CCmConnectionMethodWrapper::NewLC()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_NEWLC_ENTRY );
+
+    CCmConnectionMethodWrapper* self = new (ELeave) CCmConnectionMethodWrapper;
+    CleanupStack::PushL( self );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_NEWLC_EXIT );
+    return self;
+    }
+
+CCmConnectionMethodWrapper::~CCmConnectionMethodWrapper()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_ENTRY );
+
+    iCmConnectionMethodApi.Close();
+
+    if ( iCmManagerApi )
+        {
+        iCmManagerApi->RemoveConnMethodWrapper( this );
+        iCmManagerApi = NULL;
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_EXIT );
+    }
+
+CCmConnectionMethodWrapper::CCmConnectionMethodWrapper()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_ENTRY );
+
+    iCmManagerApi = NULL;
+    iReferenceCounter = 1;
+
+    OstTraceFunctionExit0( DUP1_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::GetConnMethodWithIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TUint32 aIapId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODWITHIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndGetConnMethodWithIdL(
+            *aCmManagerApi,
+            aIapId,
+            aExistingHandle );
+    if ( !aExistingHandle )
+        {
+        iCmManagerApi->StoreConnMethodWrapper( this );
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODWITHIDL_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::GetConnMethodFromDestWithIndexL(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aDestHandle,
+        const TInt aIndex,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHINDEXL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndGetConnMethodFromDestWithIndexL(
+            *aCmManagerApi,
+            aDestHandle,
+            aIndex,
+            aExistingHandle );
+    if ( !aExistingHandle )
+        {
+        iCmManagerApi->StoreConnMethodWrapper( this );
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHINDEXL_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::GetConnMethodFromDestWithIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aDestHandle,
+        const TInt aIapId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndGetConnMethodFromDestWithIdL(
+            *aCmManagerApi,
+            aDestHandle,
+            aIapId,
+            aExistingHandle );
+    if ( !aExistingHandle )
+        {
+        iCmManagerApi->StoreConnMethodWrapper( this );
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHIDL_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::CreateConnMethodL(
+        RCmManagerApi* aCmManagerApi,
+        const TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndCreateConnMethodL(
+            *aCmManagerApi,
+            aBearerType );
+    iCmManagerApi->StoreConnMethodWrapper( this );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODL_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::CreateConnMethodWithIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TUint32 aBearerType,
+        const TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODWITHIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndCreateConnMethodWithIdL(
+            *aCmManagerApi,
+            aBearerType,
+            aIapId );
+    iCmManagerApi->StoreConnMethodWrapper( this );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODWITHIDL_EXIT );
+    }
+
+TInt CCmConnectionMethodWrapper::CreateConnMethodCopy(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODCOPY_ENTRY );
+
+    TInt err( KErrNone );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        err = KErrAlreadyExists;
+        }
+    else
+        {
+        err = iCmConnectionMethodApi.ConnectAndCreateConnMethodCopy(
+                *aCmManagerApi,
+                aConnMethodHandle );
+        if ( !err )
+            {
+            iCmManagerApi = aCmManagerApi;
+            iCmManagerApi->StoreConnMethodWrapper( this );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODCOPY_EXIT );
+    return err;
+    }
+
+void CCmConnectionMethodWrapper::CreateConnMethodToDestL(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aDestHandle,
+        const TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndCreateConnMethodToDestL(
+            *aCmManagerApi,
+            aDestHandle,
+            aBearerType );
+    iCmManagerApi->StoreConnMethodWrapper( this );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTL_EXIT );
+    }
+
+void CCmConnectionMethodWrapper::CreateConnMethodToDestWithIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aDestHandle,
+        const TUint32 aBearerType,
+        const TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTWITHIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmConnectionMethodApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmConnectionMethodApi.ConnectAndCreateConnMethodToDestWithIdL(
+            *aCmManagerApi,
+            aDestHandle,
+            aBearerType,
+            aIapId );
+    iCmManagerApi->StoreConnMethodWrapper( this );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTWITHIDL_EXIT );
+    }
+
+TInt CCmConnectionMethodWrapper::GetIntAttribute(
+        const TUint32 aAttribute,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETINTATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.GetIntAttribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETINTATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::GetBoolAttribute(
+        const TUint32 aAttribute,
+        TBool& aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETBOOLATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.GetBoolAttribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETBOOLATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::GetStringAttribute(
+        const TUint32 aAttribute,
+        HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETSTRINGATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.GetStringAttribute( aAttribute, aBuffer );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETSTRINGATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::GetString8Attribute(
+        const TUint32 aAttribute,
+        HBufC8* aBuffer8 )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_GETSTRING8ATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.GetString8Attribute( aAttribute, aBuffer8 );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_GETSTRING8ATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::SetIntAttribute(
+        const TUint32 aAttribute,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_SETINTATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.SetIntAttribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_SETINTATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::SetBoolAttribute(
+        const TUint32 aAttribute,
+        const TBool aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_SETBOOLATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.SetBoolAttribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_SETBOOLATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::SetStringAttribute(
+        const TUint32 aAttribute,
+        const TDesC16& aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_SETSTRINGATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.SetStringAttribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_SETSTRINGATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::SetString8Attribute(
+        const TUint32 aAttribute,
+        const TDesC8& aValue )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_SETSTRING8ATTRIBUTE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.SetString8Attribute( aAttribute, aValue );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_SETSTRING8ATTRIBUTE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::Update()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_UPDATE_ENTRY );
+
+    TInt result = iCmConnectionMethodApi.Update();
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_UPDATE_EXIT );
+    return result;
+    }
+
+TInt CCmConnectionMethodWrapper::Refresh()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_REFRESH_ENTRY );
+
+    TInt result = iCmConnectionMethodApi.Refresh();
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_REFRESH_EXIT );
+    return result;
+    }
+
+TInt CCmConnectionMethodWrapper::Delete( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_DELETE_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.Delete( aResult );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_DELETE_EXIT );
+    return err;
+    }
+
+TInt CCmConnectionMethodWrapper::IsEqual( const TInt aHandle, TBool& aResult )
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_ISEQUAL_ENTRY );
+
+    TInt err = iCmConnectionMethodApi.IsEqual( aHandle, aResult );
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_ISEQUAL_EXIT );
+    return err;
+    }
+
+TBool CCmConnectionMethodWrapper::SessionConnected() const
+    {
+    return iCmConnectionMethodApi.SessionConnected();
+    }
+
+void CCmConnectionMethodWrapper::CloseSession()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_CLOSESESSION_ENTRY );
+    iCmConnectionMethodApi.Close();
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_CLOSESESSION_EXIT );
+    }
+
+TInt CCmConnectionMethodWrapper::GetHandle() const
+    {
+    return iCmConnectionMethodApi.SubSessionHandle();
+    }
+
+RCmManagerApi* CCmConnectionMethodWrapper::GetMainSession() const
+    {
+    return iCmManagerApi;
+    }
+
+void CCmConnectionMethodWrapper::IncreaseReferenceCounter()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_INCREASEREFERENCECOUNTER_ENTRY );
+    iReferenceCounter++;
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_INCREASEREFERENCECOUNTER_EXIT );
+    }
+
+TInt CCmConnectionMethodWrapper::DecreaseReferenceCounter()
+    {
+    OstTraceFunctionEntry0( CCMCONNECTIONMETHODWRAPPER_DECREASEREFERENCECOUNTER_ENTRY );
+
+    iReferenceCounter--;
+    if ( iReferenceCounter < 0 )
+        {
+        iReferenceCounter = 0;
+        }
+
+    OstTraceFunctionExit0( CCMCONNECTIONMETHODWRAPPER_DECREASEREFERENCECOUNTER_EXIT );
+    return iReferenceCounter;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestination.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,861 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmDestination.
+*
+*/
+
+
+#include <cmdestination.h>
+#include <cmconnectionmethod.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmdestinationwrapper.h"
+#include "cmconnectionmethodwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmdestinationTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::Close()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_CLOSE_ENTRY );
+
+    if ( iCmDestinationWrapper )
+        {
+        if ( iCmDestinationWrapper->DecreaseReferenceCounter() <= 0 )
+            {
+            delete iCmDestinationWrapper;
+            }
+        iCmDestinationWrapper = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::~RCmDestination()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination::~RCmDestination()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_RCMDESTINATION_ENTRY );
+    Close();
+    OstTraceFunctionExit0( RCMDESTINATION_RCMDESTINATION_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::RCmDestination()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination::RCmDestination(
+        const RCmDestination& aDestination )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATION_RCMDESTINATION_ENTRY );
+
+    this->iCmDestinationWrapper = aDestination.iCmDestinationWrapper;
+    if ( iCmDestinationWrapper )
+        {
+        iCmDestinationWrapper->IncreaseReferenceCounter();
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATION_RCMDESTINATION_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::operator=()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination& RCmDestination::operator=(
+        const RCmDestination& aDestination )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_OPERATOR_ENTRY );
+
+    if ( this != &aDestination )
+        {
+        Close();
+        this->iCmDestinationWrapper = aDestination.iCmDestinationWrapper;
+        if ( iCmDestinationWrapper )
+            {
+            iCmDestinationWrapper->IncreaseReferenceCounter();
+            }
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_OPERATOR_EXIT );
+    return *this;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ConnectionMethodCount()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestination::ConnectionMethodCount() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_CONNECTIONMETHODCOUNT_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TInt value( 0 );
+    TInt err = iCmDestinationWrapper->ConnectionMethodCount( value );
+
+    if ( err )
+        {
+        value = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_CONNECTIONMETHODCOUNT_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmDestination::ConnectionMethodL(
+        TInt aIndex ) const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodFromDestWithIndexL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aIndex,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATION_CONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ConnectionMethodByIDL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmDestination::ConnectionMethodByIDL(
+        TInt aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_CONNECTIONMETHODBYIDL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodFromDestWithIdL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aConnMethodId,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATION_CONNECTIONMETHODBYIDL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::PriorityL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint RCmDestination::PriorityL(
+        const RCmConnectionMethod& aConnectionMethod ) const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_PRIORITYL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint priority( 0 );
+    TInt handle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->Priority( handle, priority );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_PRIORITYL_EXIT );
+    return priority;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::NameLC()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmDestination::NameLC() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_NAMELC_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmDestinationWrapper->GetName( buffer );
+    User::LeaveIfError( err );
+    // Leave buffer in cleanup stack.
+
+    OstTraceFunctionExit0( RCMDESTINATION_NAMELC_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::Id()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestination::Id() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ID_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TUint32 id( 0 );
+    TInt err = iCmDestinationWrapper->GetId( id );
+
+    if ( err )
+        {
+        id = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_ID_EXIT );
+    return id;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ElementId()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestination::ElementId() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ELEMENTID_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TUint32 elementId( 0 );
+    TInt err = iCmDestinationWrapper->GetElementId( elementId );
+
+    if ( err )
+        {
+        elementId = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_ELEMENTID_EXIT );
+    return elementId;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::MetadataL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestination::MetadataL(
+        CMManager::TSnapMetadataField aMetadataField ) const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_METADATAL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmDestinationWrapper->GetMetadata( aMetadataField, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_METADATAL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ProtectionLevel()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C CMManager::TProtectionLevel RCmDestination::ProtectionLevel() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_PROTECTIONLEVEL_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TInt protectionLevel( CMManager::EProtLevel0 );
+    TInt err = iCmDestinationWrapper->GetProtectionLevel( protectionLevel );
+
+    if ( err )
+        {
+        protectionLevel = CMManager::EProtLevel0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_PROTECTIONLEVEL_EXIT );
+    return ( CMManager::TProtectionLevel )protectionLevel;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::IsHidden()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestination::IsHidden() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ISHIDDEN_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TBool value( EFalse );
+    TInt err = iCmDestinationWrapper->IsHidden( value );
+
+    if ( err )
+        {
+        value = EFalse;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_ISHIDDEN_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmDestination::CreateConnectionMethodL(
+        TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    cmWrapper->CreateConnMethodToDestL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aBearerType );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATION_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmDestination::CreateConnectionMethodL(
+        TUint32 aBearerType,
+        TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATION_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    cmWrapper->CreateConnMethodToDestWithIdL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aBearerType,
+            aConnMethodId );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATION_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::AddConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestination::AddConnectionMethodL(
+        RCmConnectionMethod aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ADDCONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->AddConnectionMethod( connMethodHandle, index );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_ADDCONNECTIONMETHODL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::AddEmbeddedDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestination::AddEmbeddedDestinationL(
+        const RCmDestination& aDestination )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ADDEMBEDDEDDESTINATIONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( iCmDestinationWrapper == aDestination.iCmDestinationWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aDestination.iCmDestinationWrapper ||
+            !aDestination.iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt destinationHandle = aDestination.iCmDestinationWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->AddEmbeddedDestination( destinationHandle, index );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_ADDEMBEDDEDDESTINATIONL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::DeleteConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::DeleteConnectionMethodL(
+        RCmConnectionMethod& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_DELETECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->DeleteConnectionMethod( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_DELETECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::RemoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::RemoveConnectionMethodL(
+        RCmConnectionMethod aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_REMOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->RemoveConnectionMethod( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_REMOVECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::ModifyPriorityL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::ModifyPriorityL(
+        RCmConnectionMethod& aConnectionMethod,
+        TUint aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_MODIFYPRIORITYL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->ModifyPriority( connMethodHandle, aIndex );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_MODIFYPRIORITYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::SetNameL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::SetNameL( const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_SETNAMEL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetName( aName );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_SETNAMEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::SetMetadataL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::SetMetadataL(
+        CMManager::TSnapMetadataField aMetadataField,
+        TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_SETMETADATAL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetMetadata( aMetadataField, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_SETMETADATAL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::SetProtectionL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::SetProtectionL( CMManager::TProtectionLevel aProtLevel )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_SETPROTECTIONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetProtection( aProtLevel );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_SETPROTECTIONL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::SetHiddenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::SetHiddenL( TBool aHidden )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_SETHIDDENL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetHidden( aHidden );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_SETHIDDENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::UpdateL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::UpdateL()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_UPDATEL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->Update();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_UPDATEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::DeleteLD()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::DeleteLD()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_DELETELD_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->Delete();
+    User::LeaveIfError( err );
+
+    // Instead of calling Close(), we need to force this handle closed even if
+    // copies have been made. So we delete the destination wrapper directly.
+    delete iCmDestinationWrapper;
+    iCmDestinationWrapper = NULL;
+
+    OstTraceFunctionExit0( RCMDESTINATION_DELETELD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::IsConnectedL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestination::IsConnectedL() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_ISCONNECTEDL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmDestinationWrapper->IsConnected( value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_ISCONNECTEDL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::RCmDestination()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination::RCmDestination() : iCmDestinationWrapper( NULL )
+    {
+    OstTraceFunctionEntry0( DUP2_RCMDESTINATION_RCMDESTINATION_ENTRY );
+    OstTraceFunctionExit0( DUP2_RCMDESTINATION_RCMDESTINATION_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::operator==()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestination::operator==(
+        const RCmDestination& aDestination ) const
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATION_OPERATOR_ENTRY );
+
+    TBool result( EFalse );
+    if ( !aDestination.iCmDestinationWrapper )
+        {
+        if ( !iCmDestinationWrapper )
+            {
+            result = ETrue; // Both empty.
+            }
+        else
+            {
+            result = EFalse;
+            }
+        }
+    else if ( !iCmDestinationWrapper )
+        {
+        result = EFalse;
+        }
+    else
+        {
+        // Both destination objects have wrappers.
+
+        if ( !iCmDestinationWrapper->SessionConnected() ||
+                !aDestination.iCmDestinationWrapper->SessionConnected() )
+            {
+            result = EFalse;
+            }
+        else
+            {
+            // Both destination objects are connected to server.
+
+            TInt handle = aDestination.iCmDestinationWrapper->GetHandle();
+            TInt err = iCmDestinationWrapper->IsEqual( handle, result );
+            if ( err )
+                {
+                result = EFalse;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATION_OPERATOR_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestination::operator!=(
+        const RCmDestination& aDestination ) const
+    {
+    OstTraceFunctionEntry0( DUP2_RCMDESTINATION_OPERATOR_ENTRY );
+
+    TBool result = !( operator==( aDestination ) );
+
+    OstTraceFunctionExit0( DUP2_RCMDESTINATION_OPERATOR_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::GetIconL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmDestination::GetIconL() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_GETICONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmDestinationWrapper->GetIcon( buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATION_GETICONL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::SetIconL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::SetIconL( const TDesC& aIcon )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_SETICONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetIcon( aIcon );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_SETICONL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestination::RefreshL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestination::RefreshL()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATION_REFRESHL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->Refresh();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATION_REFRESHL_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestinationapi.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,439 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#include "cmmserverdefs.h"
+#include "cmdestinationapi.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmdestinationapiTraces.h"
+#endif
+
+
+RCmDestinationApi::RCmDestinationApi()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_RCMDESTINATIONAPI_ENTRY );
+    iSessionConnected = EFalse;
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_RCMDESTINATIONAPI_EXIT );
+    }
+
+TBool RCmDestinationApi::SessionConnected()
+    {
+    return iSessionConnected;
+    }
+
+void RCmDestinationApi::ConnectAndGetDestWithIdL(
+        const RSessionBase& aSession,
+        const TUint32 aId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CONNECTANDGETDESTWITHIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    aExistingHandle = 0;
+    TPckg<TInt> pckg( aExistingHandle );
+    TIpcArgs args( aId, &pckg );
+    TInt result = CreateSubSession( aSession, EDestGetDestination, args );
+    if ( !aExistingHandle )
+        {
+        User::LeaveIfError( result );
+        iSessionConnected = ETrue;
+        }
+    else
+        {
+        if ( result != KErrAlreadyExists )
+            {
+            User::Leave( result );
+            }
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CONNECTANDGETDESTWITHIDL_EXIT );
+    }
+
+void RCmDestinationApi::ConnectAndCreateDestWithNameL(
+        const RSessionBase& aSession,
+        const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+    TIpcArgs args( &aName );
+    User::LeaveIfError( CreateSubSession( aSession, EDestCreateDestinationWithName, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEL_EXIT );
+    }
+
+void RCmDestinationApi::ConnectAndCreateDestWithNameAndIdL(
+        const RSessionBase& aSession,
+        const TDesC& aName,
+        const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEANDIDL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+    TIpcArgs args( &aName, aId );
+    User::LeaveIfError( CreateSubSession( aSession, EDestCreateDestinationWithNameAndId, args ) );
+    iSessionConnected = ETrue;
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEANDIDL_EXIT );
+    }
+
+void RCmDestinationApi::ConnectAndGetConnMethodAsEmbeddedDestL(
+        const RSessionBase& aSession,
+        const TInt aConnMethodHandle,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CONNECTANDGETCONNMETHODASEMBEDDEDDESTL_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    aExistingHandle = 0;
+    TPckg<TInt> pckg( aExistingHandle );
+    TIpcArgs args( aConnMethodHandle, &pckg );
+    TInt result = CreateSubSession( aSession, EDestGetEmbeddedDestination, args );
+    if ( !aExistingHandle )
+        {
+        User::LeaveIfError( result );
+        iSessionConnected = ETrue;
+        }
+    else
+        {
+        if ( result != KErrAlreadyExists )
+            {
+            User::Leave( result );
+            }
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CONNECTANDGETCONNMETHODASEMBEDDEDDESTL_EXIT );
+    }
+
+void RCmDestinationApi::Close()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CLOSE_ENTRY );
+
+    if ( iSessionConnected )
+        {
+        CloseSubSession( EDestCloseDestination );
+        iSessionConnected = EFalse;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CLOSE_EXIT );
+    }
+
+TInt RCmDestinationApi::ConnectionMethodCount( TInt& aCount )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_CONNECTIONMETHODCOUNT_ENTRY );
+
+    TPckg<TInt> pckg( aCount );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestGetConnMethodCount, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_CONNECTIONMETHODCOUNT_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::Priority( const TInt aHandle, TUint& aPriority )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_PRIORITY_ENTRY );
+
+    TPckg<TUint> pckg( aPriority );
+    TIpcArgs args( aHandle, &pckg );
+    TInt err = SendReceive( EDestGetConnMethodPriority, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_PRIORITY_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetName( HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETNAME_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( &descriptor );
+    TInt err = SendReceive( EDestGetName, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETNAME_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetId( TUint32& aId )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETID_ENTRY );
+
+    TPckg<TUint32> pckg( aId );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestGetId, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETID_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetElementId( TUint32& aElementId )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETELEMENTID_ENTRY );
+
+    TPckg<TUint32> pckg( aElementId );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestGetElementId, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETELEMENTID_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetMetadata(
+        const TUint32 aMetadataField,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETMETADATA_ENTRY );
+
+    TPckg<TUint32> pckg( aValue );
+    TIpcArgs args( aMetadataField, &pckg );
+    TInt err = SendReceive( EDestMetadata, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETMETADATA_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetProtectionLevel( TInt& aProtectionLevel )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETPROTECTIONLEVEL_ENTRY );
+
+    TPckg<TInt> pckg( aProtectionLevel );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestGetProtectionLevel, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETPROTECTIONLEVEL_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::AddConnectionMethod(
+        const TInt aConnMethodHandle,
+        TInt& aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_ADDCONNECTIONMETHOD_ENTRY );
+
+    TPckg<TInt> pckg( aIndex );
+    TIpcArgs args( aConnMethodHandle, &pckg );
+    TInt err = SendReceive( EDestAddConnMethod, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_ADDCONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::AddEmbeddedDestination(
+        const TInt aDestHandle,
+        TInt& aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_ADDEMBEDDEDDESTINATION_ENTRY );
+
+    TPckg<TInt> pckg( aIndex );
+    TIpcArgs args( aDestHandle, &pckg );
+    TInt err = SendReceive( EDestAddEmbeddedDestination, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_ADDEMBEDDEDDESTINATION_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::DeleteConnectionMethod(
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_DELETECONNECTIONMETHOD_ENTRY );
+
+    TIpcArgs args( aConnMethodHandle );
+    TInt err = SendReceive( EDestDeleteConnMethod, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_DELETECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::RemoveConnectionMethod(
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_REMOVECONNECTIONMETHOD_ENTRY );
+
+    TIpcArgs args( aConnMethodHandle );
+    TInt err = SendReceive( EDestRemoveConnMethod, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_REMOVECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::ModifyPriority(
+        const TInt aConnMethodHandle,
+        const TUint aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_MODIFYPRIORITY_ENTRY );
+
+    TIpcArgs args( aConnMethodHandle, aIndex );
+    TInt err = SendReceive( EDestModifyPriority, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_MODIFYPRIORITY_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::SetName( const TDesC& aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_SETNAME_ENTRY );
+
+    TIpcArgs args( &aValue );
+    TInt err = SendReceive( EDestSetName, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_SETNAME_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::SetMetadata(
+        const TUint32 aMetaField,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_SETMETADATA_ENTRY );
+
+    TIpcArgs args( aMetaField, aValue );
+    TInt err = SendReceive( EDestSetMetadata, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_SETMETADATA_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::SetProtection( const TInt aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_SETPROTECTION_ENTRY );
+
+    TIpcArgs args( aValue );
+    TInt err = SendReceive( EDestSetProtection, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_SETPROTECTION_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::SetHidden( const TBool aHidden )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_SETHIDDEN_ENTRY );
+
+    TIpcArgs args( aHidden );
+    TInt err = SendReceive( EDestSetHidden, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_SETHIDDEN_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::Update()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_UPDATE_ENTRY );
+
+    TInt err = SendReceive( EDestUpdate );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_UPDATE_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::Refresh()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_REFRESH_ENTRY );
+
+    TInt err = SendReceive( EDestRefresh );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_REFRESH_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::Delete()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_DELETE_ENTRY );
+
+    TInt err = SendReceive( EDestDelete );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_DELETE_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::IsConnected( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_ISCONNECTED_ENTRY );
+
+    TPckg<TBool> pckg( aResult );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestIsConnected, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_ISCONNECTED_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::IsHidden( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_ISHIDDEN_ENTRY );
+
+    TPckg<TBool> pckg( aResult );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( EDestIsHidden, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_ISHIDDEN_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::IsEqual( const TInt aHandle, TBool& aResult )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_ISEQUAL_ENTRY );
+
+    TPckg<TBool> pckg( aResult );
+    TIpcArgs args( aHandle, &pckg );
+    TInt err = SendReceive( EDestIsEqual, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_ISEQUAL_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::GetIcon( HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_GETICON_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( &descriptor );
+    TInt err = SendReceive( EDestGetIcon, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_GETICON_EXIT );
+    return err;
+    }
+
+TInt RCmDestinationApi::SetIcon( const TDesC& aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONAPI_SETICON_ENTRY );
+
+    TIpcArgs args( &aValue );
+    TInt err = SendReceive( EDestSetIcon, args );
+
+    OstTraceFunctionExit0( RCMDESTINATIONAPI_SETICON_EXIT );
+    return err;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestinationext.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,794 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmDestinationExt.
+*
+*/
+
+
+#include <cmdestinationext.h>
+#include <cmconnectionmethodext.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmdestinationwrapper.h"
+#include "cmconnectionmethodwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmdestinationextTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::Close()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_CLOSE_ENTRY );
+
+    if ( iCmDestinationWrapper )
+        {
+        if ( iCmDestinationWrapper->DecreaseReferenceCounter() <= 0 )
+            {
+            delete iCmDestinationWrapper;
+            }
+        iCmDestinationWrapper = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::~RCmDestinationExt()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt::~RCmDestinationExt()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY );
+    Close();
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::RCmDestinationExt()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt::RCmDestinationExt(
+        const RCmDestinationExt& aDestination )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY );
+
+    this->iCmDestinationWrapper = aDestination.iCmDestinationWrapper;
+    if ( iCmDestinationWrapper )
+        {
+        iCmDestinationWrapper->IncreaseReferenceCounter();
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::operator=()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt& RCmDestinationExt::operator=(
+        const RCmDestinationExt& aDestination )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_OPERATOR_ENTRY );
+
+    if ( this != &aDestination )
+        {
+        Close();
+        this->iCmDestinationWrapper = aDestination.iCmDestinationWrapper;
+        if ( iCmDestinationWrapper )
+            {
+            iCmDestinationWrapper->IncreaseReferenceCounter();
+            }
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_OPERATOR_EXIT );
+    return *this;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ConnectionMethodCount()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestinationExt::ConnectionMethodCount()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_CONNECTIONMETHODCOUNT_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TInt value( 0 );
+    TInt err = iCmDestinationWrapper->ConnectionMethodCount( value );
+
+    if ( err )
+        {
+        value = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_CONNECTIONMETHODCOUNT_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodL(
+        TInt aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodFromDestWithIndexL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aIndex,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_CONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ConnectionMethodByIDL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmDestinationExt::ConnectionMethodByIDL(
+        TInt aConnMethodId )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_CONNECTIONMETHODBYIDL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodFromDestWithIdL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aConnMethodId,
+            existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_CONNECTIONMETHODBYIDL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::PriorityL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint RCmDestinationExt::PriorityL(
+        const RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_PRIORITYL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint priority( 0 );
+    TInt handle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->Priority( handle, priority );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_PRIORITYL_EXIT );
+    return priority;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::NameLC()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmDestinationExt::NameLC()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_NAMELC_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmDestinationWrapper->GetName( buffer );
+    User::LeaveIfError( err );
+    // Leave buffer in cleanup stack.
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_NAMELC_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::Id()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestinationExt::Id()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ID_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TUint32 id( 0 );
+    TInt err = iCmDestinationWrapper->GetId( id );
+
+    if ( err )
+        {
+        id = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ID_EXIT );
+    return id;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ElementId()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestinationExt::ElementId()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ELEMENTID_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TUint32 elementId( 0 );
+    TInt err = iCmDestinationWrapper->GetElementId( elementId );
+
+    if ( err )
+        {
+        elementId = 0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ELEMENTID_EXIT );
+    return elementId;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::MetadataL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmDestinationExt::MetadataL(
+        CMManager::TSnapMetadataField aMetadataField ) const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_METADATAL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmDestinationWrapper->GetMetadata( aMetadataField, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_METADATAL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ProtectionLevel()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C CMManager::TProtectionLevel RCmDestinationExt::ProtectionLevel()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_PROTECTIONLEVEL_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TInt protectionLevel( CMManager::EProtLevel0 );
+    TInt err = iCmDestinationWrapper->GetProtectionLevel( protectionLevel );
+
+    if ( err )
+        {
+        protectionLevel = CMManager::EProtLevel0;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_PROTECTIONLEVEL_EXIT );
+    return ( CMManager::TProtectionLevel )protectionLevel;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::IsHidden()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestinationExt::IsHidden()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ISHIDDEN_ENTRY );
+
+    __ASSERT_ALWAYS( iCmDestinationWrapper && iCmDestinationWrapper->SessionConnected(),
+            User::Panic( KCmmPanicCategoryApi, EDestNotConnectedToServer ) );
+
+    TBool value( EFalse );
+    TInt err = iCmDestinationWrapper->IsHidden( value );
+
+    if ( err )
+        {
+        value = EFalse;
+        }
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ISHIDDEN_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(
+        TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    cmWrapper->CreateConnMethodToDestL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aBearerType );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmDestinationExt::CreateConnectionMethodL(
+        TUint32 aBearerType,
+        TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt destHandle = iCmDestinationWrapper->GetHandle();
+    cmWrapper->CreateConnMethodToDestWithIdL(
+            iCmDestinationWrapper->GetMainSession(),
+            destHandle,
+            aBearerType,
+            aConnMethodId );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::AddConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestinationExt::AddConnectionMethodL(
+        RCmConnectionMethodExt aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ADDCONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->AddConnectionMethod( connMethodHandle, index );
+
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ADDCONNECTIONMETHODL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::AddEmbeddedDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmDestinationExt::AddEmbeddedDestinationL(
+        const RCmDestinationExt& aDestination )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ADDEMBEDDEDDESTINATIONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( iCmDestinationWrapper == aDestination.iCmDestinationWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aDestination.iCmDestinationWrapper ||
+            !aDestination.iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt destinationHandle = aDestination.iCmDestinationWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->AddEmbeddedDestination( destinationHandle, index );
+
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ADDEMBEDDEDDESTINATIONL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::DeleteConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::DeleteConnectionMethodL(
+        RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_DELETECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->DeleteConnectionMethod( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_DELETECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::RemoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::RemoveConnectionMethodL(
+        RCmConnectionMethodExt aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_REMOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->RemoveConnectionMethod( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_REMOVECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::ModifyPriorityL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::ModifyPriorityL(
+        RCmConnectionMethodExt& aConnectionMethod,
+        TUint aIndex )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_MODIFYPRIORITYL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmDestinationWrapper->ModifyPriority( connMethodHandle, aIndex );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_MODIFYPRIORITYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::SetNameL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::SetNameL( const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_SETNAMEL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetName( aName );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_SETNAMEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::SetMetadataL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::SetMetadataL(
+        CMManager::TSnapMetadataField aMetadataField,
+        TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_SETMETADATAL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetMetadata( aMetadataField, aValue );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_SETMETADATAL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::SetProtectionL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::SetProtectionL( CMManager::TProtectionLevel aProtLevel )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_SETPROTECTIONL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetProtection( aProtLevel );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_SETPROTECTIONL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::SetHiddenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::SetHiddenL( TBool aHidden )
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_SETHIDDENL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->SetHidden( aHidden );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_SETHIDDENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::UpdateL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::UpdateL()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_UPDATEL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->Update();
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_UPDATEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::DeleteLD()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmDestinationExt::DeleteLD()
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_DELETELD_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmDestinationWrapper->Delete();
+    User::LeaveIfError( err );
+
+    // Instead of calling Close(), we need to force this handle closed even if
+    // copies have been made. So we delete the destination wrapper directly.
+    delete iCmDestinationWrapper;
+    iCmDestinationWrapper = NULL;
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_DELETELD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::IsConnectedL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestinationExt::IsConnectedL() const
+    {
+    OstTraceFunctionEntry0( RCMDESTINATIONEXT_ISCONNECTEDL_ENTRY );
+
+    if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmDestinationWrapper->IsConnected( value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMDESTINATIONEXT_ISCONNECTEDL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::RCmDestinationExt()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt::RCmDestinationExt() : iCmDestinationWrapper( NULL )
+    {
+    OstTraceFunctionEntry0( DUP2_RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY );
+    OstTraceFunctionExit0( DUP2_RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmDestinationExt::operator==()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestinationExt::operator==(
+        const RCmDestinationExt& aDestination ) const
+    {
+    OstTraceFunctionEntry0( DUP1_RCMDESTINATIONEXT_OPERATOR_ENTRY );
+
+    TBool result( EFalse );
+    if ( !aDestination.iCmDestinationWrapper )
+        {
+        if ( !iCmDestinationWrapper )
+            {
+            result = ETrue; // Both empty.
+            }
+        else
+            {
+            result = EFalse;
+            }
+        }
+    else if ( !iCmDestinationWrapper )
+        {
+        result = EFalse;
+        }
+    else
+        {
+        // Both destination objects have wrappers.
+
+        if ( !iCmDestinationWrapper->SessionConnected() ||
+                !aDestination.iCmDestinationWrapper->SessionConnected() )
+            {
+            result = EFalse;
+            }
+        else
+            {
+            // Both destination objects are connected to server.
+
+            TInt handle = aDestination.iCmDestinationWrapper->GetHandle();
+            TInt err = iCmDestinationWrapper->IsEqual( handle, result );
+            if ( err )
+                {
+                result = EFalse;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_RCMDESTINATIONEXT_OPERATOR_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+//RCmDestinationExt::operator!=()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmDestinationExt::operator!=(
+        const RCmDestinationExt& aDestination ) const
+    {
+    OstTraceFunctionEntry0( DUP2_RCMDESTINATIONEXT_OPERATOR_ENTRY );
+
+    TBool result = !( operator==( aDestination ) );
+
+    OstTraceFunctionExit0( DUP2_RCMDESTINATIONEXT_OPERATOR_EXIT );
+    return result;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestinationwrapper.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,455 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Collects API calls from RCmDestination- and RCmDestinationExt-classes.
+*
+*/
+
+
+#include "cmdestinationwrapper.h"
+#include "cmmanagerapi.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmdestinationwrapperTraces.h"
+#endif
+
+
+CCmDestinationWrapper* CCmDestinationWrapper::NewL()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_NEWL_ENTRY );
+
+    CCmDestinationWrapper* self = CCmDestinationWrapper::NewLC();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_NEWL_EXIT );
+    return self;
+    }
+
+CCmDestinationWrapper* CCmDestinationWrapper::NewLC()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_NEWLC_ENTRY );
+
+    CCmDestinationWrapper* self = new (ELeave) CCmDestinationWrapper;
+    CleanupStack::PushL( self );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_NEWLC_EXIT );
+    return self;
+    }
+
+CCmDestinationWrapper::~CCmDestinationWrapper()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_ENTRY );
+
+    iCmDestinationApi.Close();
+
+    if ( iCmManagerApi )
+        {
+        iCmManagerApi->RemoveDestinationWrapper( this );
+        iCmManagerApi = NULL;
+        }
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_EXIT );
+    }
+
+CCmDestinationWrapper::CCmDestinationWrapper()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_ENTRY );
+
+    iCmManagerApi = NULL;
+    iReferenceCounter = 1;
+
+    OstTraceFunctionExit0( DUP1_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_EXIT );
+    }
+
+void CCmDestinationWrapper::GetDestWithIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TUint32 aId,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETDESTWITHIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmDestinationApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmDestinationApi.ConnectAndGetDestWithIdL( *aCmManagerApi, aId, aExistingHandle );
+    if ( !aExistingHandle )
+        {
+        iCmManagerApi->StoreDestinationWrapper( this );
+        }
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETDESTWITHIDL_EXIT );
+    }
+
+void CCmDestinationWrapper::CreateDestByNameL(
+        RCmManagerApi* aCmManagerApi,
+        const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEL_ENTRY );
+
+    if ( iCmManagerApi || iCmDestinationApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmDestinationApi.ConnectAndCreateDestWithNameL( *aCmManagerApi, aName );
+    iCmManagerApi->StoreDestinationWrapper( this );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEL_EXIT );
+    }
+
+void CCmDestinationWrapper::CreateDestByNameAndIdL(
+        RCmManagerApi* aCmManagerApi,
+        const TDesC& aName,
+        const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEANDIDL_ENTRY );
+
+    if ( iCmManagerApi || iCmDestinationApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmDestinationApi.ConnectAndCreateDestWithNameAndIdL( *aCmManagerApi, aName, aId );
+    iCmManagerApi->StoreDestinationWrapper( this );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEANDIDL_EXIT );
+    }
+
+void CCmDestinationWrapper::GetConnMethodAsEmbeddedDestL(
+        RCmManagerApi* aCmManagerApi,
+        const TInt aConnMethodHandle,
+        TInt& aExistingHandle )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETCONNMETHODASEMBEDDEDDESTL_ENTRY );
+
+    if ( iCmManagerApi || iCmDestinationApi.SessionConnected() )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    iCmManagerApi = aCmManagerApi;
+    iCmDestinationApi.ConnectAndGetConnMethodAsEmbeddedDestL(
+            *aCmManagerApi,
+            aConnMethodHandle,
+            aExistingHandle );
+    if ( !aExistingHandle )
+        {
+        iCmManagerApi->StoreDestinationWrapper( this );
+        }
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETCONNMETHODASEMBEDDEDDESTL_EXIT );
+    }
+
+TInt CCmDestinationWrapper::ConnectionMethodCount( TInt& aCount )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_CONNECTIONMETHODCOUNT_ENTRY );
+
+    TInt err = iCmDestinationApi.ConnectionMethodCount( aCount );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_CONNECTIONMETHODCOUNT_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::Priority( const TInt aHandle, TUint& aPriority )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_PRIORITY_ENTRY );
+
+    TInt err = iCmDestinationApi.Priority( aHandle, aPriority );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_PRIORITY_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetName( HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETNAME_ENTRY );
+
+    TInt err = iCmDestinationApi.GetName( aBuffer );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETNAME_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetId( TUint32& aId )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETID_ENTRY );
+
+    TInt err = iCmDestinationApi.GetId( aId );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETID_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetElementId( TUint32& aElementId )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETELEMENTID_ENTRY );
+
+    TInt err = iCmDestinationApi.GetElementId( aElementId );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETELEMENTID_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetMetadata(
+        const TUint32 aMetadataField,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETMETADATA_ENTRY );
+
+    TInt err = iCmDestinationApi.GetMetadata( aMetadataField, aValue );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETMETADATA_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetProtectionLevel( TInt& aProtectionLevel )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETPROTECTIONLEVEL_ENTRY );
+
+    TInt err = iCmDestinationApi.GetProtectionLevel( aProtectionLevel );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETPROTECTIONLEVEL_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::AddConnectionMethod(
+        const TInt aConnMethodHandle,
+        TInt& aIndex )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_ADDCONNECTIONMETHOD_ENTRY );
+
+    TInt err = iCmDestinationApi.AddConnectionMethod( aConnMethodHandle, aIndex );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_ADDCONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::AddEmbeddedDestination(
+        const TInt aDestHandle,
+        TInt& aIndex )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_ADDEMBEDDEDDESTINATION_ENTRY );
+
+    TInt err = iCmDestinationApi.AddEmbeddedDestination( aDestHandle, aIndex );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_ADDEMBEDDEDDESTINATION_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::DeleteConnectionMethod(
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_DELETECONNECTIONMETHOD_ENTRY );
+
+    TInt err = iCmDestinationApi.DeleteConnectionMethod( aConnMethodHandle );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_DELETECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::RemoveConnectionMethod(
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_REMOVECONNECTIONMETHOD_ENTRY );
+
+    TInt err = iCmDestinationApi.RemoveConnectionMethod( aConnMethodHandle );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_REMOVECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::ModifyPriority(
+        const TInt aConnMethodHandle,
+        const TUint aIndex )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_MODIFYPRIORITY_ENTRY );
+
+    TInt err = iCmDestinationApi.ModifyPriority( aConnMethodHandle, aIndex );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_MODIFYPRIORITY_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::SetName( const TDesC& aValue )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_SETNAME_ENTRY );
+
+    TInt err = iCmDestinationApi.SetName( aValue );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_SETNAME_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::SetMetadata(
+        const TUint32 aMetaField,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_SETMETADATA_ENTRY );
+
+    TInt err = iCmDestinationApi.SetMetadata( aMetaField, aValue );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_SETMETADATA_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::SetProtection( const TInt aValue )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_SETPROTECTION_ENTRY );
+
+    TInt err = iCmDestinationApi.SetProtection( aValue );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_SETPROTECTION_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::SetHidden( const TBool aHidden )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_SETHIDDEN_ENTRY );
+
+    TInt err = iCmDestinationApi.SetHidden( aHidden );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_SETHIDDEN_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::Update()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_UPDATE_ENTRY );
+
+    TInt err = iCmDestinationApi.Update();
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_UPDATE_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::Refresh()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_REFRESH_ENTRY );
+
+    TInt err = iCmDestinationApi.Refresh();
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_REFRESH_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::Delete()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_DELETE_ENTRY );
+
+    TInt err = iCmDestinationApi.Delete();
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_DELETE_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::IsConnected( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_ISCONNECTED_ENTRY );
+
+    TInt err = iCmDestinationApi.IsConnected( aResult );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_ISCONNECTED_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::IsHidden( TBool& aResult )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_ISHIDDEN_ENTRY );
+
+    TInt err = iCmDestinationApi.IsHidden( aResult );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_ISHIDDEN_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::IsEqual( const TInt aHandle, TBool& aResult )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_ISEQUAL_ENTRY );
+
+    TInt err = iCmDestinationApi.IsEqual( aHandle, aResult );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_ISEQUAL_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::GetIcon( HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_GETICON_ENTRY );
+
+    TInt err = iCmDestinationApi.GetIcon( aBuffer );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_GETICON_EXIT );
+    return err;
+    }
+
+TInt CCmDestinationWrapper::SetIcon( const TDesC& aValue)
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_SETICON_ENTRY );
+
+    TInt err = iCmDestinationApi.SetIcon( aValue );
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_SETICON_EXIT );
+    return err;
+    }
+
+TBool CCmDestinationWrapper::SessionConnected()
+    {
+    return iCmDestinationApi.SessionConnected();
+    }
+
+void CCmDestinationWrapper::CloseSession()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_CLOSESESSION_ENTRY );
+    iCmDestinationApi.Close();
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_CLOSESESSION_EXIT );
+    }
+
+TInt CCmDestinationWrapper::GetHandle() const
+    {
+    return iCmDestinationApi.SubSessionHandle();
+    }
+
+RCmManagerApi* CCmDestinationWrapper::GetMainSession() const
+    {
+    return iCmManagerApi;
+    }
+
+void CCmDestinationWrapper::IncreaseReferenceCounter()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_INCREASEREFERENCECOUNTER_ENTRY );
+    iReferenceCounter++;
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_INCREASEREFERENCECOUNTER_EXIT );
+    }
+
+TInt CCmDestinationWrapper::DecreaseReferenceCounter()
+    {
+    OstTraceFunctionEntry0( CCMDESTINATIONWRAPPER_DECREASEREFERENCECOUNTER_ENTRY );
+
+    iReferenceCounter--;
+    if ( iReferenceCounter < 0 )
+        {
+        iReferenceCounter = 0;
+        }
+
+    OstTraceFunctionExit0( CCMDESTINATIONWRAPPER_DECREASEREFERENCECOUNTER_EXIT );
+    return iReferenceCounter;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmmanager.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,931 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmManager.
+*
+*/
+
+
+#include <cmmanager.h>
+#include <cmconnectionmethod.h>
+#include <cmdestination.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmconnectionmethodwrapper.h"
+#include "cmdestinationwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanagerTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmManager::OpenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::OpenL()
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_OPENL_ENTRY );
+
+    OpenLC();
+    CleanupStack::Pop( this );
+
+    OstTraceFunctionExit0( RCMMANAGER_OPENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::OpenLC()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::OpenLC()
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_OPENLC_ENTRY );
+
+    if ( iCmManagerApi )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    CleanupClosePushL( *this );
+    iCmManagerApi = new (ELeave) RCmManagerApi();
+    User::LeaveIfError( iCmManagerApi->Connect() );
+
+    OstTraceFunctionExit0( RCMMANAGER_OPENLC_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::Close()
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CLOSE_ENTRY );
+
+    if ( iCmManagerApi )
+        {
+        iCmManagerApi->Close();
+        delete iCmManagerApi;
+        iCmManagerApi = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CreateTablesAndOpenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::CreateTablesAndOpenL()
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CREATETABLESANDOPENL_ENTRY );
+    OpenL();
+    OstTraceFunctionExit0( RCMMANAGER_CREATETABLESANDOPENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmManager::ConnectionMethodL(
+        TUint32 aConnectionMethodId ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !( ( aConnectionMethodId > KCmmConnMethodIdIntervalMin ) &&
+            ( aConnectionMethodId < KCmmConnMethodIdIntervalMax ) ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // If client already has a handle open to this connection method, give a
+    // reference to it.
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodWithIdL( iCmManagerApi, aConnectionMethodId, existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmManagerApi->GetConnMethodWrapperL( existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGER_CONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetBearerInfoIntL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManager::GetBearerInfoIntL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETBEARERINFOINTL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetBearerInfoInt( aBearerType, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_GETBEARERINFOINTL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetBearerInfoBoolL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmManager::GetBearerInfoBoolL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETBEARERINFOBOOLL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmManagerApi->GetBearerInfoBool( aBearerType, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_GETBEARERINFOBOOLL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetBearerInfoStringL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmManager::GetBearerInfoStringL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETBEARERINFOSTRINGL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetBearerInfoString( aBearerType, aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_GETBEARERINFOSTRINGL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetBearerInfoString8L()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmManager::GetBearerInfoString8L(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETBEARERINFOSTRING8L_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetBearerInfoString8( aBearerType, aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_GETBEARERINFOSTRING8L_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetConnectionMethodInfoIntL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManager::GetConnectionMethodInfoIntL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETCONNECTIONMETHODINFOINTL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoInt( aIapId, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_GETCONNECTIONMETHODINFOINTL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetConnectionMethodInfoBoolL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmManager::GetConnectionMethodInfoBoolL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETCONNECTIONMETHODINFOBOOLL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoBool( aIapId, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_GETCONNECTIONMETHODINFOBOOLL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetConnectionMethodInfoStringL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmManager::GetConnectionMethodInfoStringL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETCONNECTIONMETHODINFOSTRINGL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoString( aIapId, aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_GETCONNECTIONMETHODINFOSTRINGL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetConnectionMethodInfoString8L()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmManager::GetConnectionMethodInfoString8L(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETCONNECTIONMETHODINFOSTRING8L_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoString8( aIapId, aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_GETCONNECTIONMETHODINFOSTRING8L_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CreateDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination RCmManager::CreateDestinationL(
+        const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CREATEDESTINATIONL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( aName.Length() == 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    destWrap->CreateDestByNameL( iCmManagerApi, aName );
+    CleanupStack::Pop( destWrap );
+
+    RCmDestination dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( RCMMANAGER_CREATEDESTINATIONL_EXIT );
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
+        TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    cmWrapper->CreateConnMethodL( iCmManagerApi, aBearerType );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMMANAGER_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CopyConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmManager::CopyConnectionMethodL(
+        RCmDestination& aTargetDestination,
+        RCmConnectionMethod& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_COPYCONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aTargetDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aTargetDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt targetDestHandle = aTargetDestination.iCmDestinationWrapper->GetHandle();
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->CopyConnectionMethod( targetDestHandle, connMethodHandle, index );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_COPYCONNECTIONMETHODL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::MoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmManager::MoveConnectionMethodL(
+        RCmDestination& aSourceDestination,
+        RCmDestination& aTargetDestination,
+        RCmConnectionMethod& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_MOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aSourceDestination.iCmDestinationWrapper ||
+            !aTargetDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aSourceDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aTargetDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TCmmIpcStructMoveConnMethod pkgData;
+    pkgData.iSourceDestHandle = aSourceDestination.iCmDestinationWrapper->GetHandle();
+    pkgData.iTargetDestHandle = aTargetDestination.iCmDestinationWrapper->GetHandle();
+    pkgData.iConnMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    pkgData.iIndex = 0;
+
+    TInt err = iCmManagerApi->MoveConnectionMethod( pkgData );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_MOVECONNECTIONMETHODL_EXIT );
+    return pkgData.iIndex;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::RemoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::RemoveConnectionMethodL(
+        RCmDestination& aDestination,
+        RCmConnectionMethod& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_REMOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt targetDestHandle = aDestination.iCmDestinationWrapper->GetHandle();
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->RemoveConnectionMethod( targetDestHandle, connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_REMOVECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::RemoveAllReferencesL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::RemoveAllReferencesL(
+        RCmConnectionMethod& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_REMOVEALLREFERENCESL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->RemoveAllReferences( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_REMOVEALLREFERENCESL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::ConnectionMethodL(
+        RArray<TUint32>& aCmArray,
+        TBool aCheckBearerType,
+        TBool aLegacyOnly,
+        TBool aEasyWlan ) const
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGER_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TCmmIpcStructGetConnMethods parameters;
+    parameters.iCheckBearerType = aCheckBearerType;
+    parameters.iLegacyOnly = aLegacyOnly;
+    parameters.iEasyWlan = aEasyWlan;
+
+    iCmManagerApi->GetConnMethodsL( parameters, aCmArray );
+
+    OstTraceFunctionExit0( RCMMANAGER_CONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::AllDestinationsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::AllDestinationsL( RArray<TUint32>& aDestArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_ALLDESTINATIONSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->GetAllDestinationsL( aDestArray );
+
+    OstTraceFunctionExit0( RCMMANAGER_ALLDESTINATIONSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::DestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination RCmManager::DestinationL( TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_DESTINATIONL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // If client already has a handle open to this destination, give a
+    // reference to it.
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    TInt existingHandle( 0 );
+    destWrap->GetDestWithIdL( iCmManagerApi, aDestinationId, existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( destWrap );
+        destWrap = iCmManagerApi->GetDestinationWrapperL( existingHandle );
+        destWrap->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( destWrap );
+        }
+
+    RCmDestination dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::BearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::BearerPriorityArrayL(
+        RArray<TBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_BEARERPRIORITYARRAYL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->GetBearerPriorityArrayL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGER_BEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::UpdateBearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::UpdateBearerPriorityArrayL(
+        const RArray<TBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_UPDATEBEARERPRIORITYARRAYL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->SetBearerPriorityArrayL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGER_UPDATEBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CleanupGlobalPriorityArray()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::CleanupGlobalPriorityArray(
+        RArray<TBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_CLEANUPGLOBALPRIORITYARRAY_ENTRY );
+
+    for ( TInt i = 0; i < aArray.Count(); i++ )
+        {
+        delete aArray[i].iServiceType;
+        }
+    aArray.Reset();
+    aArray.Close();
+
+    OstTraceFunctionExit0( RCMMANAGER_CLEANUPGLOBALPRIORITYARRAY_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::SupportedBearersL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::SupportedBearersL( RArray<TUint32>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_SUPPORTEDBEARERSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    iCmManagerApi->GetSupportedBearersL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGER_SUPPORTEDBEARERSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::EasyWlanIdL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManager::EasyWlanIdL() const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_EASYWLANIDL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetEasyWlanId( value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_EASYWLANIDL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::ReadDefConnL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::ReadDefConnL(
+        TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_READDEFCONNL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->ReadDefaultConnection( aDefConnSetting );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_READDEFCONNL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::WriteDefConnL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::WriteDefConnL(
+        const TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_WRITEDEFCONNL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->WriteDefaultConnection( aDefConnSetting );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_WRITEDEFCONNL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::ReadGenConnSettingsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::ReadGenConnSettingsL(
+        TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_READGENCONNSETTINGSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->ReadGeneralConnectionSettings( aGenConnSettings );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_READGENCONNSETTINGSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::WriteGenConnSettingsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManager::WriteGenConnSettingsL(
+        const TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_WRITEGENCONNSETTINGSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->WriteGeneralConnectionSettings( aGenConnSettings );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGER_WRITEGENCONNSETTINGSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CreateDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestination RCmManager::CreateDestinationL(
+        const TDesC& aName,
+        TUint32 aDestId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGER_CREATEDESTINATIONL_ENTRY );
+
+    if ( aDestId == 0 )
+        {
+        return CreateDestinationL( aName );
+        }
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( aName.Length() == 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint32 adjustedDestId( 0 );
+    if ( aDestId > KCmmDestIdIntervalLegacyMin && aDestId < KCmmDestIdIntervalLegacyMax )
+        {
+        adjustedDestId = aDestId + KCmDefaultDestinationAPTagId;
+        }
+    else if ( aDestId > KCmmDestIdIntervalMin && aDestId < KCmmDestIdIntervalMax )
+        {
+        adjustedDestId = aDestId;
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    destWrap->CreateDestByNameAndIdL( iCmManagerApi, aName, adjustedDestId );
+    CleanupStack::Pop( destWrap );
+
+    RCmDestination dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGER_CREATEDESTINATIONL_EXIT );
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethod RCmManager::CreateConnectionMethodL(
+        TUint32 aBearerType,
+        TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGER_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( aConnMethodId == 0 )
+        {
+        return CreateConnectionMethodL( aBearerType );
+        }
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !( aConnMethodId > KCmmConnMethodIdIntervalMin &&
+            aConnMethodId < KCmmConnMethodIdIntervalMax ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    cmWrapper->CreateConnMethodWithIdL( iCmManagerApi, aBearerType, aConnMethodId );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethod cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGER_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManager::GetUncategorizedIconL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmManager::GetUncategorizedIconL() const
+    {
+    OstTraceFunctionEntry0( RCMMANAGER_GETUNCATEGORIZEDICONL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetUncategorizedIcon( buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGER_GETUNCATEGORIZEDICONL_EXIT );
+    return buffer;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmmanagerapi.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,969 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Client side IPC handling for Connection Method Manager server.
+*
+*/
+
+
+#include <cmmanagerdef.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmdestinationwrapper.h"
+#include "cmconnectionmethodwrapper.h"
+#include "cmmclistatic.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanagerapiTraces.h"
+#endif
+
+
+RCmManagerApi::RCmManagerApi() : RSessionBase()
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_RCMMANAGERAPI_ENTRY );
+
+    iConnected = EFalse;
+    iSmallBufsForDestinations = ETrue;
+    iSmallBufsForConnMethods = ETrue;
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_RCMMANAGERAPI_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::Connect()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::Connect()
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_CONNECT_ENTRY );
+
+    if ( !iConnected )
+        {
+        TInt retry = 2;
+        for (;;)
+            {
+            TInt err = CreateSession( KCmmServer, TVersion( 0, 0, 0 ), KCmmDefaultMessageSlots );
+
+            if ( err != KErrNotFound && err != KErrServerTerminated )
+                {
+                if ( !err )
+                    {
+                    iConnected = ETrue;
+                    }
+                OstTraceFunctionExit0( RCMMANAGERAPI_CONNECT_EXIT );
+                return err;
+                }
+            // KErrNotFound and KErrServerTerminated will go through.
+            if ( --retry <= 0 )
+                {
+                OstTraceFunctionExit0( DUP1_RCMMANAGERAPI_CONNECT_EXIT );
+                return err;
+                }
+            err = TCmManagerLauncher::LaunchServer(
+                    KCmmServerFile,
+                    KCmmUid3 );
+
+            if ( err != KErrNone && err != KErrAlreadyExists )
+                {
+                // Failed to launch server, and it wasn't already running.
+                OstTraceFunctionExit0( DUP2_RCMMANAGERAPI_CONNECT_EXIT );
+                return err;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP3_RCMMANAGERAPI_CONNECT_EXIT );
+    return KErrNone;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::Close()
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::Close()
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_CLOSE_ENTRY );
+
+    if ( iConnected )
+        {
+        // Close all subsessions first.
+        //
+        // Don't call subsession destructors (wrappers), since they will try to
+        // remove themselves from these pointer arrays. Here we can just close
+        // the arrays at the end.
+        for ( TInt i = 0; i < iConnMethods.Count(); i++ )
+            {
+            iConnMethods[i]->CloseSession();
+            }
+        iConnMethods.Close();
+        for ( TInt i = 0; i < iDestinations.Count(); i++ )
+            {
+            iDestinations[i]->CloseSession();
+            }
+        iDestinations.Close();
+
+        RSessionBase::Close();
+        iConnected = EFalse;
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::StoreDestinationWrapper()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::StoreDestinationWrapper(
+        CCmDestinationWrapper* aDestinationWrapper )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_STOREDESTINATIONWRAPPER_ENTRY );
+
+    TInt err = iDestinations.InsertInAddressOrder( aDestinationWrapper );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_STOREDESTINATIONWRAPPER_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::RemoveDestinationWrapper()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::RemoveDestinationWrapper(
+        CCmDestinationWrapper* aDestinationWrapper )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_REMOVEDESTINATIONPOINTER_ENTRY );
+
+    TInt index = iDestinations.FindInAddressOrder( aDestinationWrapper );
+    if ( index >= 0 )
+        {
+        iDestinations.Remove( index );
+        index = KErrNone;
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_REMOVEDESTINATIONPOINTER_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetDestinationWrapperL()
+//-----------------------------------------------------------------------------
+//
+CCmDestinationWrapper* RCmManagerApi::GetDestinationWrapperL( const TInt aHandle )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETDESTINATIONWRAPPER_ENTRY );
+
+    CCmDestinationWrapper* result( NULL );
+    if ( aHandle )
+        {
+        for ( TInt i = 0; i < iDestinations.Count(); i++ )
+            {
+            if ( iDestinations[i]->GetHandle() == aHandle )
+                {
+                result = iDestinations[i];
+                break;
+                }
+            }
+        }
+    if ( !result )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETDESTINATIONWRAPPER_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::StoreConnMethodWrapper()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::StoreConnMethodWrapper(
+        CCmConnectionMethodWrapper* aConnMethodWrapper )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_STORECONNMETHODWRAPPER_ENTRY );
+
+    TInt err = iConnMethods.InsertInAddressOrder( aConnMethodWrapper );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_STORECONNMETHODWRAPPER_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::RemoveConnMethodWrapper()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::RemoveConnMethodWrapper(
+        CCmConnectionMethodWrapper* aConnMethodWrapper )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_REMOVECONNMETHODPOINTER_ENTRY );
+
+    TInt index = iConnMethods.FindInAddressOrder( aConnMethodWrapper );
+    if ( index >= 0 )
+        {
+        iConnMethods.Remove( index );
+        index = KErrNone;
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_REMOVECONNMETHODPOINTER_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnMethodWrapperL()
+//-----------------------------------------------------------------------------
+//
+CCmConnectionMethodWrapper* RCmManagerApi::GetConnMethodWrapperL( const TInt aHandle )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNMETHODWRAPPER_ENTRY );
+
+    CCmConnectionMethodWrapper* result( NULL );
+    if ( aHandle )
+        {
+        for ( TInt i = 0; i < iConnMethods.Count(); i++ )
+            {
+            if ( iConnMethods[i]->GetHandle() == aHandle )
+                {
+                result = iConnMethods[i];
+                break;
+                }
+            }
+        }
+    if ( !result )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNMETHODWRAPPER_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetBearerInfoInt()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetBearerInfoInt(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETBEARERINFOINT_ENTRY );
+
+    TPckg<TUint32> pckg( aValue );
+    TIpcArgs args( aBearerType, aAttribute, &pckg );
+    TInt err = SendReceive( ECmmGetBearerInfoInt, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETBEARERINFOINT_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetBearerInfoBool()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetBearerInfoBool(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute,
+        TBool& aValue )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETBEARERINFOBOOL_ENTRY );
+
+    TPckg<TBool> pckg( aValue );
+    TIpcArgs args( aBearerType, aAttribute, &pckg );
+    TInt err = SendReceive( ECmmGetBearerInfoBool, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETBEARERINFOBOOL_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetBearerInfoString()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetBearerInfoString(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute,
+        HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETBEARERINFOSTRING_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( aBearerType, aAttribute, &descriptor );
+    TInt err = SendReceive( ECmmGetBearerInfoString, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETBEARERINFOSTRING_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetBearerInfoString8()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetBearerInfoString8(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute,
+        HBufC8* aBuffer8 )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETBEARERINFOSTRING8_ENTRY );
+
+    TPtr8 descriptor( aBuffer8->Des() );
+    TIpcArgs args( aBearerType, aAttribute, &descriptor );
+    TInt err = SendReceive( ECmmGetBearerInfoString8, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETBEARERINFOSTRING8_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnectionMethodInfoInt()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetConnectionMethodInfoInt(
+        const TUint32 aIapId,
+        const TUint32 aAttribute,
+        TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOINT_ENTRY );
+
+    TPckg<TUint32> pckg( aValue );
+    TIpcArgs args( aIapId, aAttribute, &pckg );
+    TInt err = SendReceive( ECmmGetConnMethodInfoInt, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOINT_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnectionMethodInfoBool()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetConnectionMethodInfoBool(
+        const TUint32 aIapId,
+        const TUint32 aAttribute,
+        TBool& aValue )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOBOOL_ENTRY );
+
+    TPckg<TBool> pckg( aValue );
+    TIpcArgs args( aIapId, aAttribute, &pckg );
+    TInt err = SendReceive( ECmmGetConnMethodInfoBool, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOBOOL_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnectionMethodInfoString()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetConnectionMethodInfoString(
+        const TUint32 aIapId,
+        const TUint32 aAttribute,
+        HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( aIapId, aAttribute, &descriptor );
+    TInt err = SendReceive( ECmmGetConnMethodInfoString, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnectionMethodInfoString8()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetConnectionMethodInfoString8(
+        const TUint32 aIapId,
+        const TUint32 aAttribute,
+        HBufC8* aBuffer8 )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING8_ENTRY );
+
+    TPtr8 descriptor( aBuffer8->Des() );
+    TIpcArgs args( aIapId, aAttribute, &descriptor );
+    TInt err = SendReceive( ECmmGetConnMethodInfoString8, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING8_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetConnMethodsL(
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::GetConnMethodsL(
+        const TCmmIpcStructGetConnMethods& aParameters,
+        RArray<TUint32>& aCmArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNMETHODSL_ENTRY );
+
+    TInt err( KErrNone );
+    TInt count( KMaxTInt );
+    TPckg<TInt> countPckg( count );
+    TPckgBuf<TCmmIpcStructGetConnMethods> parametersPckg( aParameters );
+
+    HBufC8* smallBuf( NULL );
+    HBufC8* bigBuf( NULL );
+
+    if ( iSmallBufsForConnMethods )
+        {
+        smallBuf = HBufC8::NewLC( KCmmConnMethodAmountNormal );
+        TPtr8 smallBufPtr( smallBuf->Des() );
+
+        TIpcArgs args( &parametersPckg, &countPckg, &smallBufPtr );
+        err = SendReceive( ECmmGetConnMethodArray, args );
+        User::LeaveIfError( err );
+        }
+
+    if ( countPckg() <= KCmmConnMethodAmountNormal )
+        {
+        aCmArray.Reset();
+        aCmArray.ReserveL( countPckg() );
+        for ( TInt i = 0; i < countPckg(); i++ )
+            {
+            aCmArray.AppendL( (TUint32)(*smallBuf)[i] );
+            }
+        }
+    else if ( countPckg() == KMaxTInt )
+        {
+        // All connection methods didn't fit into small array, ask again with big array.
+        iSmallBufsForConnMethods = EFalse; // Switch small buffer mode off.
+        if ( smallBuf )
+            {
+            CleanupStack::PopAndDestroy( smallBuf );
+            smallBuf = NULL;
+            }
+
+        bigBuf = HBufC8::NewLC( KCmmConnMethodAmountMax );
+        TPtr8 bigBufPtr( bigBuf->Des() );
+
+        TIpcArgs args( &parametersPckg, &countPckg, &bigBufPtr );
+        err = SendReceive( ECmmGetConnMethodArray, args );
+        User::LeaveIfError( err );
+
+        if ( countPckg() <= KCmmConnMethodAmountMax )
+            {
+            // Don't switch back to small buffer mode if client was only asking
+            // for legacy connection methods (likely a small list).
+            if ( countPckg() < KCmmConnMethodAmountNormal && aParameters.iLegacyOnly == EFalse )
+                {
+                iSmallBufsForConnMethods = ETrue; // Switch small buffer mode back on.
+                }
+
+            aCmArray.Reset();
+            aCmArray.ReserveL( countPckg() );
+            for ( TInt i = 0; i < countPckg(); i++ )
+                {
+                aCmArray.AppendL( (TUint32)(*smallBuf)[i] );
+                }
+            }
+        else
+            {
+            User::Leave( KErrUnknown );
+            }
+        CleanupStack::PopAndDestroy( bigBuf );
+        }
+    else
+        {
+        User::Leave( KErrUnknown );
+        }
+
+    if ( smallBuf )
+        {
+        CleanupStack::PopAndDestroy( smallBuf );
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETCONNMETHODSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetAllDestinationsL()
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::GetAllDestinationsL( RArray<TUint32>& aDestArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETALLDESTINATIONSL_ENTRY );
+
+    TInt err( KErrNone );
+    TInt count( KMaxTInt );
+    TPckg<TInt> countPckg( count );
+
+    HBufC16* smallBuf( NULL );
+    HBufC16* bigBuf( NULL );
+
+    if ( iSmallBufsForDestinations )
+        {
+        smallBuf = HBufC16::NewLC( KCmmDestAmountNormal );
+        TPtr16 smallBufPtr( smallBuf->Des() );
+
+        TIpcArgs args( &countPckg, &smallBufPtr );
+        err = SendReceive( ECmmGetAllDestinations, args );
+        User::LeaveIfError( err );
+        }
+
+    if ( countPckg() <= KCmmDestAmountNormal )
+        {
+        aDestArray.Reset();
+        aDestArray.ReserveL( countPckg() );
+        for ( TInt i = 0; i < countPckg(); i++ )
+            {
+            aDestArray.AppendL( (TUint32)(*smallBuf)[i] );
+            }
+        }
+    else if ( countPckg() == KMaxTInt )
+        {
+        // All destinations didn't fit into small array, ask again with big array.
+        iSmallBufsForDestinations = EFalse; // Switch small buffer mode off.
+        if ( smallBuf )
+            {
+            CleanupStack::PopAndDestroy( smallBuf );
+            smallBuf = NULL;
+            }
+
+        bigBuf = HBufC16::NewLC( KCmmDestAmountMax );
+        TPtr16 bigBufPtr( bigBuf->Des() );
+
+        TIpcArgs args( &countPckg, &bigBufPtr );
+        err = SendReceive( ECmmGetAllDestinations, args );
+        User::LeaveIfError( err );
+
+        if ( countPckg() <= KCmmDestAmountMax )
+            {
+            if ( countPckg() < KCmmDestAmountNormal )
+                {
+                iSmallBufsForDestinations = ETrue; // Switch small buffer mode back on.
+                }
+
+            aDestArray.Reset();
+            aDestArray.ReserveL( countPckg() );
+            for ( TInt i = 0; i < countPckg(); i++ )
+                {
+                aDestArray.AppendL( (TUint32)(*smallBuf)[i] );
+                }
+            }
+        else
+            {
+            User::Leave( KErrUnknown );
+            }
+        CleanupStack::PopAndDestroy( bigBuf );
+        }
+    else
+        {
+        User::Leave( KErrUnknown );
+        }
+
+    if ( smallBuf )
+        {
+        CleanupStack::PopAndDestroy( smallBuf );
+        }
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETALLDESTINATIONSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetBearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::GetBearerPriorityArrayL( RArray<TBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETBEARERPRIORITYARRAYL_ENTRY );
+
+    HBufC* buffer = HBufC::NewLC( KCmmDefaultBearerPriorityArraySize );
+    TPtr bufferPtr( buffer->Des() );
+
+    TIpcArgs args( &bufferPtr );
+    TInt err = SendReceive( ECmmGetBearerPriorityArray, args );
+    User::LeaveIfError( err );
+
+    // bufferPtr[1] should now contain the needed buffer length.
+    if ( bufferPtr[1] > bufferPtr.Length() )
+        {
+        // First buffer wasn't big enough. Try again with correct size buffer.
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = HBufC::NewLC( bufferPtr[1] );
+        bufferPtr.Set( buffer->Des() );
+
+        TIpcArgs args2( &bufferPtr );
+        err = SendReceive( ECmmGetBearerPriorityArray, args2 );
+        User::LeaveIfError( err );
+
+        if ( bufferPtr[1] > bufferPtr.Length() )
+            {
+            User::Leave( KErrAbort );
+            }
+        }
+
+    const TInt bearerCount = bufferPtr[0];
+
+    // Cleanup old array. There's a pointer in that T-class...
+    for ( TInt i = 0; i < aArray.Count(); i++ )
+        {
+        if ( aArray[i].iServiceType )
+            {
+            delete aArray[i].iServiceType;
+            aArray[i].iServiceType = NULL;
+            }
+        }
+    aArray.Reset();
+    aArray.ReserveL( bearerCount );
+
+    TInt position( 2 ); // Start of first priority item
+    for ( TInt i = 0; i < bearerCount; i++ )
+        {
+        TBearerPriority bearerPriority;
+        bearerPriority.iPriority = bufferPtr[position++] << KBitsInTwoBytes;
+        bearerPriority.iPriority += bufferPtr[position++];
+        bearerPriority.iUIPriority = bufferPtr[position++] << KBitsInTwoBytes;
+        bearerPriority.iUIPriority += bufferPtr[position++];
+        bearerPriority.iServiceType = NULL;
+
+        const TInt stringLength = bufferPtr[position++];
+        if ( stringLength )
+            {
+            HBufC* serviceName = HBufC::NewL( stringLength );
+            serviceName->Des().Append( &(bufferPtr[position]), stringLength );
+            position += stringLength;
+            bearerPriority.iServiceType = serviceName;
+            // Ownership moved into array.
+            }
+        aArray.AppendL( bearerPriority );
+        }
+
+    CleanupStack::PopAndDestroy( buffer );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::SetBearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::SetBearerPriorityArrayL( const RArray<TBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_SETBEARERPRIORITYARRAYL_ENTRY );
+
+    // iPriority:           2 16-bit values,
+    // iUIPriority:         2 16-bit values,
+    // iServiceType length: 1 16-bit value.
+    const TInt KCmmBearerPriorityHeaderLength = 5;
+
+    // Buffer starts with legth of 2, to contain both the total amount of
+    // TBearerPriority objects, and the size of the buffer (number of 16-bit
+    // values) needed to contain the whole structure including all headers.
+    TInt bufferLength( 2 );
+
+    const TInt bearerCount = aArray.Count();
+    for ( TInt i = 0; i < bearerCount; i++ )
+        {
+        bufferLength += KCmmBearerPriorityHeaderLength;
+        const TBearerPriority& bearerPriority = aArray[i];
+        if ( !bearerPriority.iServiceType )
+            {
+            User::Leave( KErrArgument );
+            }
+        // Get length of service type name and add it to needed buffer length.
+        bufferLength += bearerPriority.iServiceType->Length();
+        }
+
+    HBufC* buffer = HBufC::NewLC( bufferLength );
+    TPtr bufferPtr( buffer->Des() );
+
+    bufferPtr.Append( bearerCount );
+    bufferPtr.Append( bufferLength );
+
+    TInt position = bufferPtr.Length();
+    for ( TInt i = 0; i < bearerCount; i++ )
+        {
+        const TBearerPriority& bearerPriority = aArray[i];
+
+        bufferPtr.Append( ( bearerPriority.iPriority & 0xFFFF0000 ) >> KBitsInTwoBytes );
+        bufferPtr.Append( ( bearerPriority.iPriority & 0x0000FFFF ) );
+        bufferPtr.Append( ( bearerPriority.iUIPriority & 0xFFFF0000 ) >> KBitsInTwoBytes );
+        bufferPtr.Append( ( bearerPriority.iUIPriority & 0x0000FFFF ) );
+
+        position += KCmmBearerPriorityHeaderLength;
+        if ( !bearerPriority.iServiceType )
+            {
+            User::Leave( KErrArgument );
+            }
+        const TInt stringLength = bearerPriority.iServiceType->Length();
+        bufferPtr.Append( stringLength );
+        bufferPtr.Insert( position, *(bearerPriority.iServiceType) );
+        position += stringLength;
+        }
+
+    TIpcArgs args( &bufferPtr );
+    TInt err = SendReceive( ECmmUpdateBearerPriorityArray, args );
+    User::LeaveIfError( err );
+    CleanupStack::PopAndDestroy( buffer );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_SETBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetSupportedBearersL()
+//-----------------------------------------------------------------------------
+//
+void RCmManagerApi::GetSupportedBearersL( RArray<TUint32>& aArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETSUPPORTEDBEARERSL_ENTRY );
+
+    TInt err( KErrNone );
+    TInt count( KMaxTInt );
+    TPckg<TInt> countPckg( count );
+
+    HBufC8* smallBuf( NULL );
+    HBufC8* bigBuf( NULL );
+
+    smallBuf = HBufC8::NewLC( KCmmBearerAmountNormal * sizeof( TUint32 ) );
+    TPtr8 smallBufPtr( smallBuf->Des() );
+
+    TIpcArgs args( &countPckg, &smallBufPtr );
+    err = SendReceive( ECmmGetSupportedBearers, args );
+    User::LeaveIfError( err );
+
+    if ( countPckg() <= KCmmBearerAmountNormal )
+        {
+        aArray.Reset();
+        aArray.ReserveL( countPckg() );
+
+        TUint32 a( 0 );
+        TPtr8 ptr = smallBuf->Des();
+        for ( TInt i = 0; i < countPckg(); i++ )
+            {
+            a = 0;
+            a += (TUint32)ptr[0 + ( i * sizeof( TUint32 ) )];
+            a += (TUint32)ptr[1 + ( i * sizeof( TUint32 ) )] << KBitsInOneByte;
+            a += (TUint32)ptr[2 + ( i * sizeof( TUint32 ) )] << KBitsInTwoBytes;
+            a += (TUint32)ptr[3 + ( i * sizeof( TUint32 ) )] << KBitsInThreeBytes;
+            aArray.AppendL( a );
+            }
+        }
+    else
+        {
+        TInt storedCount = countPckg();
+
+        bigBuf = HBufC8::NewLC( countPckg() * sizeof( TUint32 ) );
+        TPtr8 bigBufPtr( bigBuf->Des() );
+
+        TIpcArgs args( &countPckg, &bigBufPtr );
+        err = SendReceive( ECmmGetSupportedBearers, args );
+        User::LeaveIfError( err );
+
+        if ( countPckg() <= storedCount )
+            {
+            aArray.Reset();
+            aArray.ReserveL( countPckg() );
+
+            TUint32 a( 0 );
+            TPtr8 ptr = bigBuf->Des();
+            for ( TInt i = 0; i < countPckg(); i++ )
+                {
+                a = 0;
+                a += (TUint32)ptr[0 + ( i * sizeof( TUint32 ) )];
+                a += (TUint32)ptr[1 + ( i * sizeof( TUint32 ) )] << KBitsInOneByte;
+                a += (TUint32)ptr[2 + ( i * sizeof( TUint32 ) )] << KBitsInTwoBytes;
+                a += (TUint32)ptr[3 + ( i * sizeof( TUint32 ) )] << KBitsInThreeBytes;
+                aArray.AppendL( a );
+                }
+            }
+        else
+            {
+            User::Leave( KErrUnknown );
+            }
+
+        CleanupStack::PopAndDestroy( bigBuf );
+        }
+    CleanupStack::PopAndDestroy( smallBuf );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETSUPPORTEDBEARERSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetEasyWlanId()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetEasyWlanId( TUint32& aValue )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETEASYWLANID_ENTRY );
+
+    TPckg<TUint32> pckg( aValue );
+    TIpcArgs args( &pckg );
+    TInt err = SendReceive( ECmmGetEasyWlanId, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETEASYWLANID_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::ReadDefaultConnection()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::ReadDefaultConnection(
+        TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_READDEFAULTCONNECTION_ENTRY );
+
+    TPckgBuf<TCmDefConnValue> pkg( aDefConnSetting );
+    TIpcArgs args( &pkg );
+    TInt err = SendReceive( ECmmReadDefaultConnection, args );
+    aDefConnSetting = pkg();
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_READDEFAULTCONNECTION_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::WriteDefaultConnection()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::WriteDefaultConnection(
+        const TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_WRITEDEFAULTCONNECTION_ENTRY );
+
+    TPckgBuf<TCmDefConnValue> pkg( aDefConnSetting );
+    TIpcArgs args( &pkg );
+    TInt err = SendReceive( ECmmWriteDefaultConnection, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_WRITEDEFAULTCONNECTION_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::ReadGeneralConnectionSettings()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::ReadGeneralConnectionSettings(
+        TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_READGENERALCONNECTIONSETTINGS_ENTRY );
+
+    TPckgBuf<TCmGenConnSettings> pkg( aGenConnSettings );
+    TIpcArgs args( &pkg );
+    TInt err = SendReceive( ECmmReadGeneralConnectionSettings, args );
+    aGenConnSettings = pkg();
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_READGENERALCONNECTIONSETTINGS_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::WriteGeneralConnectionSettings()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::WriteGeneralConnectionSettings(
+        const TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_WRITEGENERALCONNECTIONSETTINGS_ENTRY );
+
+    TPckgBuf<TCmGenConnSettings> pkg( aGenConnSettings );
+    TIpcArgs args( &pkg );
+    TInt err = SendReceive( ECmmWriteGeneralConnectionSettings, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_WRITEGENERALCONNECTIONSETTINGS_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::CopyConnectionMethod()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::CopyConnectionMethod(
+        const TInt aTargetDestHandle,
+        const TInt aConnMethodHandle,
+        TInt& aIndex )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_COPYCONNECTIONMETHOD_ENTRY );
+
+    TPckg<TInt> pkg( aIndex );
+    TIpcArgs args( aTargetDestHandle, aConnMethodHandle, &pkg );
+    TInt err = SendReceive( ECmmCopyConnMethod, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_COPYCONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::MoveConnectionMethod()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::MoveConnectionMethod(
+        TCmmIpcStructMoveConnMethod& aPkgData )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_MOVECONNECTIONMETHOD_ENTRY );
+
+    TPckgBuf<TCmmIpcStructMoveConnMethod> pkg( aPkgData );
+    TIpcArgs args( &pkg );
+    TInt err = SendReceive( ECmmMoveConnMethod, args );
+    aPkgData = pkg();
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_MOVECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::RemoveConnectionMethod()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::RemoveConnectionMethod(
+        const TInt aTargetDestHandle,
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_REMOVECONNECTIONMETHOD_ENTRY );
+
+    TIpcArgs args( aTargetDestHandle, aConnMethodHandle );
+    TInt err = SendReceive( ECmmRemoveConnMethod, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_REMOVECONNECTIONMETHOD_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::RemoveAllReferences()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::RemoveAllReferences(
+        const TInt aConnMethodHandle )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_REMOVEALLREFERENCES_ENTRY );
+
+    TIpcArgs args( aConnMethodHandle );
+    TInt err = SendReceive( ECmmRemoveAllReferences, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_REMOVEALLREFERENCES_EXIT );
+    return err;
+    }
+
+//-----------------------------------------------------------------------------
+// RCmManagerApi::GetUncategorizedIcon()
+//-----------------------------------------------------------------------------
+//
+TInt RCmManagerApi::GetUncategorizedIcon( HBufC* aBuffer )
+    {
+    OstTraceFunctionEntry0( RCMMANAGERAPI_GETUNCATEGORIZEDICON_ENTRY );
+
+    TPtr descriptor( aBuffer->Des() );
+    TIpcArgs args( &descriptor );
+    TInt err = SendReceive( ECmmGetUncategorizedIcon, args );
+
+    OstTraceFunctionExit0( RCMMANAGERAPI_GETUNCATEGORIZEDICON_EXIT );
+    return err;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/src/cmmanagerext.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,862 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of RCmManagerExt.
+*
+*/
+
+
+#include <cmmanagerext.h>
+#include <cmconnectionmethodext.h>
+#include <cmdestinationext.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerapi.h"
+#include "cmconnectionmethodwrapper.h"
+#include "cmdestinationwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanagerextTraces.h"
+#endif
+
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::OpenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::OpenL()
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_OPENL_ENTRY );
+
+    OpenLC();
+    CleanupStack::Pop( this );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_OPENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::OpenLC()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::OpenLC()
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_OPENLC_ENTRY );
+
+    if ( iCmManagerApi )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    CleanupClosePushL( *this );
+    iCmManagerApi = new (ELeave) RCmManagerApi();
+    User::LeaveIfError( iCmManagerApi->Connect() );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_OPENLC_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::Close()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::Close()
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CLOSE_ENTRY );
+
+    if ( iCmManagerApi )
+        {
+        iCmManagerApi->Close();
+        delete iCmManagerApi;
+        iCmManagerApi = NULL;
+        }
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_CLOSE_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CreateTablesAndOpenL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::CreateTablesAndOpenL()
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CREATETABLESANDOPENL_ENTRY );
+    OpenL();
+    OstTraceFunctionExit0( RCMMANAGEREXT_CREATETABLESANDOPENL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmManagerExt::ConnectionMethodL(
+        TUint32 aConnectionMethodId )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !( ( aConnectionMethodId > KCmmConnMethodIdIntervalMin ) &&
+            ( aConnectionMethodId < KCmmConnMethodIdIntervalMax ) ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // If client already has a handle open to this connection method, give a
+    // reference to it.
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    TInt existingHandle( 0 );
+    cmWrapper->GetConnMethodWithIdL( iCmManagerApi, aConnectionMethodId, existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( cmWrapper );
+        cmWrapper = iCmManagerApi->GetConnMethodWrapperL( existingHandle );
+        cmWrapper->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( cmWrapper );
+        }
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_CONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetBearerInfoIntL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManagerExt::GetBearerInfoIntL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETBEARERINFOINTL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetBearerInfoInt( aBearerType, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETBEARERINFOINTL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetBearerInfoBoolL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmManagerExt::GetBearerInfoBoolL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETBEARERINFOBOOLL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmManagerApi->GetBearerInfoBool( aBearerType, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETBEARERINFOBOOLL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetBearerInfoStringL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmManagerExt::GetBearerInfoStringL(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETBEARERINFOSTRINGL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetBearerInfoString( aBearerType, aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = NULL;
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETBEARERINFOSTRINGL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetBearerInfoString8L()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmManagerExt::GetBearerInfoString8L(
+        TUint32 aBearerType,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETBEARERINFOSTRING8L_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetBearerInfoString8( aBearerType, aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = NULL;
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETBEARERINFOSTRING8L_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetConnectionMethodInfoIntL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManagerExt::GetConnectionMethodInfoIntL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOINTL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoInt( aIapId, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOINTL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetConnectionMethodInfoBoolL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TBool RCmManagerExt::GetConnectionMethodInfoBoolL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOBOOLL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TBool value( 0 );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoBool( aIapId, aAttribute, value );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOBOOLL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetConnectionMethodInfoStringL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* RCmManagerExt::GetConnectionMethodInfoStringL(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRINGL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoString( aIapId, aAttribute, buffer );
+    User::LeaveIfError( err );
+
+    if ( buffer->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer );
+        buffer = NULL;
+        buffer = KNullDesC().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRINGL_EXIT );
+    return buffer;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::GetConnectionMethodInfoString8L()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RCmManagerExt::GetConnectionMethodInfoString8L(
+        TUint32 aIapId,
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRING8L_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    HBufC8* buffer8 = HBufC8::NewLC( KCmmStringLengthMax );
+    TInt err = iCmManagerApi->GetConnectionMethodInfoString8( aIapId, aAttribute, buffer8 );
+    User::LeaveIfError( err );
+
+    if ( buffer8->Length() > 0 )
+        {
+        CleanupStack::Pop( buffer8 );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( buffer8 );
+        buffer8 = NULL;
+        buffer8 = KNullDesC8().AllocL();
+        }
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRING8L_EXIT );
+    return buffer8;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CreateDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt RCmManagerExt::CreateDestinationL(
+        const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CREATEDESTINATIONL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( aName.Length() == 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    destWrap->CreateDestByNameL( iCmManagerApi, aName );
+    CleanupStack::Pop( destWrap );
+
+    RCmDestinationExt dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_CREATEDESTINATIONL_EXIT );
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(
+        TUint32 aBearerType )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    cmWrapper->CreateConnMethodL( iCmManagerApi, aBearerType );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CopyConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmManagerExt::CopyConnectionMethodL(
+        RCmDestinationExt& aTargetDestination,
+        RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_COPYCONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aTargetDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aTargetDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index( 0 );
+    TInt targetDestHandle = aTargetDestination.iCmDestinationWrapper->GetHandle();
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->CopyConnectionMethod( targetDestHandle, connMethodHandle, index );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_COPYCONNECTIONMETHODL_EXIT );
+    return index;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::MoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TInt RCmManagerExt::MoveConnectionMethodL(
+        RCmDestinationExt& aSourceDestination,
+        RCmDestinationExt& aTargetDestination,
+        RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_MOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aSourceDestination.iCmDestinationWrapper ||
+            !aTargetDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aSourceDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aTargetDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TCmmIpcStructMoveConnMethod pkgData;
+    pkgData.iSourceDestHandle = aSourceDestination.iCmDestinationWrapper->GetHandle();
+    pkgData.iTargetDestHandle = aTargetDestination.iCmDestinationWrapper->GetHandle();
+    pkgData.iConnMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    pkgData.iIndex = 0;
+
+    TInt err = iCmManagerApi->MoveConnectionMethod( pkgData );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_MOVECONNECTIONMETHODL_EXIT );
+    return pkgData.iIndex;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::RemoveConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::RemoveConnectionMethodL(
+        RCmDestinationExt& aDestination,
+        RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_REMOVECONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aDestination.iCmDestinationWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper )
+        {
+        User::Leave( KErrArgument );
+        }
+    if ( !aDestination.iCmDestinationWrapper->SessionConnected() ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt targetDestHandle = aDestination.iCmDestinationWrapper->GetHandle();
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->RemoveConnectionMethod( targetDestHandle, connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_REMOVECONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::RemoveAllReferencesL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::RemoveAllReferencesL(
+        RCmConnectionMethodExt& aConnectionMethod )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_REMOVEALLREFERENCESL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( !aConnectionMethod.iCmConnectionMethodWrapper ||
+            !aConnectionMethod.iCmConnectionMethodWrapper->SessionConnected() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt connMethodHandle = aConnectionMethod.iCmConnectionMethodWrapper->GetHandle();
+    TInt err = iCmManagerApi->RemoveAllReferences( connMethodHandle );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_REMOVEALLREFERENCESL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::ConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::ConnectionMethodL(
+        RArray<TUint32>& aCmArray,
+        TBool aCheckBearerType,
+        TBool aLegacyOnly,
+        TBool aEasyWlan )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGEREXT_CONNECTIONMETHODL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TCmmIpcStructGetConnMethods parameters;
+    parameters.iCheckBearerType = aCheckBearerType;
+    parameters.iLegacyOnly = aLegacyOnly;
+    parameters.iEasyWlan = aEasyWlan;
+
+    iCmManagerApi->GetConnMethodsL( parameters, aCmArray );
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGEREXT_CONNECTIONMETHODL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::AllDestinationsL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::AllDestinationsL( RArray<TUint32>& aDestArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_ALLDESTINATIONSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->GetAllDestinationsL( aDestArray );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_ALLDESTINATIONSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::DestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt RCmManagerExt::DestinationL( TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_DESTINATIONL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // If client already has a handle open to this destination, give a
+    // reference to it.
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    TInt existingHandle( 0 );
+    destWrap->GetDestWithIdL( iCmManagerApi, aDestinationId, existingHandle );
+    if ( existingHandle )
+        {
+        CleanupStack::PopAndDestroy( destWrap );
+        destWrap = iCmManagerApi->GetDestinationWrapperL( existingHandle );
+        destWrap->IncreaseReferenceCounter();
+        }
+    else
+        {
+        CleanupStack::Pop( destWrap );
+        }
+
+    RCmDestinationExt dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_DESTINATIONL_EXIT );
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::BearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::BearerPriorityArrayL(
+        RArray<TBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_BEARERPRIORITYARRAYL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->GetBearerPriorityArrayL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_BEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::UpdateBearerPriorityArrayL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::UpdateBearerPriorityArrayL(
+        const RArray<TBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_UPDATEBEARERPRIORITYARRAYL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    iCmManagerApi->SetBearerPriorityArrayL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_UPDATEBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CleanupGlobalPriorityArray()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::CleanupGlobalPriorityArray(
+        RArray<TBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_CLEANUPGLOBALPRIORITYARRAY_ENTRY );
+
+    for ( TInt i = 0; i < aArray.Count(); i++ )
+        {
+        delete aArray[i].iServiceType;
+        }
+    aArray.Reset();
+    aArray.Close();
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_CLEANUPGLOBALPRIORITYARRAY_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::SupportedBearersL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::SupportedBearersL( RArray<TUint32>& aArray ) const
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_SUPPORTEDBEARERSL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    iCmManagerApi->GetSupportedBearersL( aArray );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_SUPPORTEDBEARERSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::EasyWlanIdL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C TUint32 RCmManagerExt::EasyWlanIdL()
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_EASYWLANIDL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TUint32 value( 0 );
+    TInt err = iCmManagerApi->GetEasyWlanId( value );
+    User::LeaveIfError( err );
+    OstTraceFunctionExit0( RCMMANAGEREXT_EASYWLANIDL_EXIT );
+    return value;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::ReadDefConnL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::ReadDefConnL( TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_READDEFCONNL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->ReadDefaultConnection( aDefConnSetting );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_READDEFCONNL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::WriteDefConnL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C void RCmManagerExt::WriteDefConnL( const TCmDefConnValue& aDefConnSetting )
+    {
+    OstTraceFunctionEntry0( RCMMANAGEREXT_WRITEDEFCONNL_ENTRY );
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    TInt err = iCmManagerApi->WriteDefaultConnection( aDefConnSetting );
+    User::LeaveIfError( err );
+
+    OstTraceFunctionExit0( RCMMANAGEREXT_WRITEDEFCONNL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CreateDestinationL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmDestinationExt RCmManagerExt::CreateDestinationL(
+        const TDesC& aName,
+        TUint32 aDestId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGEREXT_CREATEDESTINATIONL_ENTRY );
+
+    if ( aDestId == 0 )
+        {
+        return CreateDestinationL( aName );
+        }
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    if ( aName.Length() == 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint32 adjustedDestId( 0 );
+    if ( aDestId > KCmmDestIdIntervalLegacyMin && aDestId < KCmmDestIdIntervalLegacyMax )
+        {
+        adjustedDestId = aDestId + KCmDefaultDestinationAPTagId;
+        }
+    else if ( aDestId > KCmmDestIdIntervalMin && aDestId < KCmmDestIdIntervalMax )
+        {
+        adjustedDestId = aDestId;
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmDestinationWrapper* destWrap = CCmDestinationWrapper::NewLC();
+    destWrap->CreateDestByNameAndIdL( iCmManagerApi, aName, adjustedDestId );
+    CleanupStack::Pop( destWrap );
+
+    RCmDestinationExt dest;
+    dest.iCmDestinationWrapper = destWrap;
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGEREXT_CREATEDESTINATIONL_EXIT );
+    return dest;
+    }
+
+//-----------------------------------------------------------------------------
+//  RCmManagerExt::CreateConnectionMethodL()
+//-----------------------------------------------------------------------------
+//
+EXPORT_C RCmConnectionMethodExt RCmManagerExt::CreateConnectionMethodL(
+        TUint32 aBearerType,
+        TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( DUP1_RCMMANAGEREXT_CREATECONNECTIONMETHODL_ENTRY );
+
+    if ( aConnMethodId == 0 )
+        {
+        return CreateConnectionMethodL( aBearerType );
+        }
+
+    if ( !iCmManagerApi )
+        {
+        User::Leave( KErrBadHandle );
+        }
+    if ( !( aConnMethodId > KCmmConnMethodIdIntervalMin &&
+            aConnMethodId < KCmmConnMethodIdIntervalMax ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CCmConnectionMethodWrapper* cmWrapper = CCmConnectionMethodWrapper::NewLC();
+    cmWrapper->CreateConnMethodWithIdL( iCmManagerApi, aBearerType, aConnMethodId );
+    CleanupStack::Pop( cmWrapper );
+
+    RCmConnectionMethodExt cm;
+    cm.iCmConnectionMethodWrapper = cmWrapper;
+
+    OstTraceFunctionExit0( DUP1_RCMMANAGEREXT_CREATECONNECTIONMETHODL_EXIT );
+    return cm;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmapi/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,480 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_ENTRY=0xf9
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_EXIT=0xfa
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CLOSESESSION_ENTRY=0x116
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CLOSESESSION_EXIT=0x117
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTL_ENTRY=0x102
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTL_EXIT=0x103
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTWITHIDL_ENTRY=0x104
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODFROMDESTWITHIDL_EXIT=0x105
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODL_ENTRY=0x106
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODL_EXIT=0x107
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODWITHIDL_ENTRY=0x108
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODWITHIDL_EXIT=0x109
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_DELETE_ENTRY=0x113
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETBOOLATTRIBUTE_ENTRY=0x10b
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHIDL_ENTRY=0x100
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHIDL_EXIT=0x101
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHINDEXL_ENTRY=0xfe
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODFROMDESTWITHINDEXL_EXIT=0xff
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODWITHIDL_ENTRY=0xfc
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETCONNMETHODWITHIDL_EXIT=0xfd
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETHANDLE_ENTRY=0x118
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETINTATTRIBUTE_ENTRY=0x10a
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETMAINSESSION_ENTRY=0x119
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETMAINSESSION_EXIT=0x11a
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETSTRING8ATTRIBUTE_ENTRY=0x10d
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_GETSTRINGATTRIBUTE_ENTRY=0x10c
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_ISEQUAL_ENTRY=0x114
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_NEWLC_ENTRY=0xf8
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_NEWL_ENTRY=0xf7
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_SESSIONCONNECTED_ENTRY=0x115
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_SETBOOLATTRIBUTE_ENTRY=0x10f
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_SETINTATTRIBUTE_ENTRY=0x10e
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_SETSTRING8ATTRIBUTE_ENTRY=0x111
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_SETSTRINGATTRIBUTE_ENTRY=0x110
+[TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_UPDATE_ENTRY=0x112
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_ADDCONNECTIONMETHOD_ENTRY=0x9e
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_ENTRY=0x8c
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_EXIT=0x8d
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CLOSESESSION_ENTRY=0xad
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CLOSESESSION_EXIT=0xae
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CONNECTIONMETHODCOUNT_ENTRY=0x97
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEANDIDL_ENTRY=0x93
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEANDIDL_EXIT=0x94
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEL_ENTRY=0x91
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CREATEDESTBYNAMEL_EXIT=0x92
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_DELETECONNECTIONMETHOD_ENTRY=0xa0
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_DELETE_ENTRY=0xa8
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETCONNMETHODASEMBEDDEDDESTL_ENTRY=0x95
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETCONNMETHODASEMBEDDEDDESTL_EXIT=0x96
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETDESTWITHIDL_ENTRY=0x8f
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETDESTWITHIDL_EXIT=0x90
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETELEMENTID_ENTRY=0x9b
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETHANDLE_ENTRY=0xaf
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETID_ENTRY=0x9a
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETMAINSESSION_ENTRY=0xb0
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETMAINSESSION_EXIT=0xb1
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETMETADATA_ENTRY=0x9c
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETNAME_ENTRY=0x99
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_GETPROTECTIONLEVEL_ENTRY=0x9d
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_ISCONNECTED_ENTRY=0xa9
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_ISEQUAL_ENTRY=0xab
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_ISHIDDEN_ENTRY=0xaa
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_MODIFYPRIORITY_ENTRY=0xa2
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_NEWLC_ENTRY=0x8b
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_NEWL_ENTRY=0x8a
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_PRIORITY_ENTRY=0x98
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_REMOVECONNECTIONMETHOD_ENTRY=0xa1
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_SESSIONCONNECTED_ENTRY=0xac
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_SETHIDDEN_ENTRY=0xa6
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_SETMETADATA_ENTRY=0xa4
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_SETNAME=0xa3
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_SETPROTECTION_ENTRY=0xa5
+[TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_UPDATE_ENTRY=0xa7
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_ENTRY=0x11b
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODWRAPPER_CCMCONNECTIONMETHODWRAPPER_EXIT=0x11c
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_ENTRY=0xb2
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONWRAPPER_CCMDESTINATIONWRAPPER_EXIT=0xb3
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY=0x1db
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHODEXT_OPERATOR_EXIT=0x1dc
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY=0x1d5
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT=0x1d6
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHOD_OPERATOR_ENTRY=0xf3
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY=0xdd
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT=0xde
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_ENTRY=0x199
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_EXIT=0x19a
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_OPERATOR_ENTRY=0x1b5
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_OPERATOR_EXIT=0x1b6
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY=0x180
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT=0x181
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATION_CREATECONNECTIONMETHODL_ENTRY=0x6f
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATION_CREATECONNECTIONMETHODL_EXIT=0x70
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATION_OPERATOR_ENTRY=0x88
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATION_RCMDESTINATION_ENTRY=0x5b
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMDESTINATION_RCMDESTINATION_EXIT=0x5c
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGERAPI_CONNECT_EXIT=0x32
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CONNECTIONMETHODL_ENTRY=0x164
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CONNECTIONMETHODL_EXIT=0x165
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CREATECONNECTIONMETHODL_ENTRY=0x17a
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CREATECONNECTIONMETHODL_EXIT=0x17b
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CREATEDESTINATIONL_ENTRY=0x178
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGEREXT_CREATEDESTINATIONL_EXIT=0x179
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGER_CONNECTIONMETHODL_ENTRY=0x1a
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGER_CREATECONNECTIONMETHODL_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x7]_DUP1_RCMMANAGER_CREATEDESTINATIONL_ENTRY=0x2c
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY=0x1dd
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHODEXT_OPERATOR_EXIT=0x1de
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY=0x1d7
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT=0x1d8
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHOD_OPERATOR_ENTRY=0xf4
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY=0xef
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT=0xf0
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATIONEXT_OPERATOR_ENTRY=0x1b7
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATIONEXT_OPERATOR_EXIT=0x1b8
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY=0x1b3
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT=0x1b4
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATION_OPERATOR_ENTRY=0x89
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATION_RCMDESTINATION_ENTRY=0x86
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMDESTINATION_RCMDESTINATION_EXIT=0x87
+[TRACE]TRACE_FLOW[0x7]_DUP2_RCMMANAGERAPI_CONNECT_EXIT=0x33
+[TRACE]TRACE_FLOW[0x7]_DUP3_RCMMANAGERAPI_CONNECT_EXIT=0x34
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CLOSE_ENTRY=0x131
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CLOSE_EXIT=0x132
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTL_ENTRY=0x129
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTL_EXIT=0x12a
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTWITHIDL_ENTRY=0x12b
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODFROMDESTWITHIDL_EXIT=0x12c
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODL_ENTRY=0x12d
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODL_EXIT=0x12e
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODWITHIDL_ENTRY=0x12f
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODWITHIDL_EXIT=0x130
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHIDL_ENTRY=0x127
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHIDL_EXIT=0x128
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHINDEXL_ENTRY=0x125
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODFROMDESTWITHINDEXL_EXIT=0x126
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODWITHIDL_ENTRY=0x123
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDGETCONNMETHODWITHIDL_EXIT=0x124
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_DELETE_ENTRY=0x13c
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_GETBOOLATTRIBUTE_ENTRY=0x134
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_GETHANDLE_ENTRY=0x121
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_GETINTATTRIBUTE_ENTRY=0x133
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_GETSTRING8ATTRIBUTE_ENTRY=0x136
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_GETSTRINGATTRIBUTE_ENTRY=0x135
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_ISEQUAL_ENTRY=0x13d
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_RCMCONNECTIONMETHODAPI_ENTRY=0x11d
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_RCMCONNECTIONMETHODAPI_EXIT=0x11e
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SESSIONCONNECTED_ENTRY=0x11f
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SESSIONCONNECTED_EXIT=0x120
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SETBOOLATTRIBUTE_ENTRY=0x138
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SETINTATTRIBUTE_ENTRY=0x137
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SETSTRING8ATTRIBUTE_ENTRY=0x13a
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_SETSTRINGATTRIBUTE_ENTRY=0x139
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_UPDATE_ENTRY=0x13b
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_CLOSE_ENTRY=0x1bb
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_CLOSE_EXIT=0x1bc
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_CREATECOPYL_ENTRY=0x1bd
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_CREATECOPYL_EXIT=0x1be
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_DELETEL_ENTRY=0x1d1
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_DELETEL_EXIT=0x1d2
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_DESTINATIONL_ENTRY=0x1d3
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_DESTINATIONL_EXIT=0x1d4
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETBOOLATTRIBUTEL_ENTRY=0x1c1
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETBOOLATTRIBUTEL_EXIT=0x1c2
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETINTATTRIBUTEL_ENTRY=0x1bf
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETINTATTRIBUTEL_EXIT=0x1c0
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETSTRING8ATTRIBUTEL_ENTRY=0x1c5
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETSTRING8ATTRIBUTEL_EXIT=0x1c6
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETSTRINGATTRIBUTEL_ENTRY=0x1c3
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_GETSTRINGATTRIBUTEL_EXIT=0x1c4
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_OPERATOR_ENTRY=0x1d9
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_OPERATOR_EXIT=0x1da
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_ENTRY=0x1b9
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_RCMCONNECTIONMETHODEXT_EXIT=0x1ba
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETBOOLATTRIBUTEL_ENTRY=0x1c9
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETBOOLATTRIBUTEL_EXIT=0x1ca
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETINTATTRIBUTEL_ENTRY=0x1c7
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETINTATTRIBUTEL_EXIT=0x1c8
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETSTRING8ATTRIBUTEL_ENTRY=0x1cd
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETSTRING8ATTRIBUTEL_EXIT=0x1ce
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETSTRINGATTRIBUTEL_ENTRY=0x1cb
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_SETSTRINGATTRIBUTEL_EXIT=0x1cc
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_UPDATEL_ENTRY=0x1cf
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODEXT_UPDATEL_EXIT=0x1d0
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_CLOSE_ENTRY=0xdb
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_CLOSE_EXIT=0xdc
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_CREATECOPYL_ENTRY=0xf5
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_CREATECOPYL_EXIT=0xf6
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_DELETEL_ENTRY=0xed
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_DESTINATIONL_ENTRY=0xee
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_GETBOOLATTRIBUTEL_ENTRY=0xe0
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_GETINTATTRIBUTEL_ENTRY=0xdf
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_GETSTRING8ATTRIBUTEL_ENTRY=0xe2
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_GETSTRINGATTRIBUTEL_ENTRY=0xe1
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_OPERATOR_ENTRY=0xf1
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_OPERATOR_EXIT=0xf2
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_ENTRY=0xd9
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_RCMCONNECTIONMETHOD_EXIT=0xda
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETBOOLATTRIBUTEL_ENTRY=0xe5
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETBOOLATTRIBUTEL_EXIT=0xe6
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETINTATTRIBUTEL_ENTRY=0xe3
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETINTATTRIBUTEL_EXIT=0xe4
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETSTRING8ATTRIBUTEL_ENTRY=0xe9
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETSTRING8ATTRIBUTEL_EXIT=0xea
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETSTRINGATTRIBUTEL_ENTRY=0xe7
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_SETSTRINGATTRIBUTEL_EXIT=0xe8
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_UPDATEL_ENTRY=0xeb
+[TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHOD_UPDATEL_EXIT=0xec
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_ADDCONNECTIONMETHOD_ENTRY=0xcb
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_ADDEMBEDDEDDESTINATION_ENTRY=0xcc
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CLOSE_ENTRY=0xc2
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CLOSE_EXIT=0xc3
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEANDIDL_ENTRY=0xbe
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEANDIDL_EXIT=0xbf
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEL_ENTRY=0xbc
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDCREATEDESTWITHNAMEL_EXIT=0xbd
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDGETCONNMETHODASEMBEDDEDDESTL_ENTRY=0xc0
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDGETCONNMETHODASEMBEDDEDDESTL_EXIT=0xc1
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDGETDESTWITHIDL_ENTRY=0xba
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDGETDESTWITHIDL_EXIT=0xbb
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTIONMETHODCOUNT_ENTRY=0xc4
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_DELETECONNECTIONMETHOD_ENTRY=0xcd
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_DELETE_ENTRY=0xd5
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETELEMENTID_ENTRY=0xc8
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETHANDLE_ENTRY=0xb8
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETID_ENTRY=0xc7
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETMETADATA_ENTRY=0xc9
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETNAME_ENTRY=0xc6
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_GETPROTECTIONLEVEL_ENTRY=0xca
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_ISCONNECTED_ENTRY=0xd6
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_ISEQUAL_ENTRY=0xd8
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_ISHIDDEN_ENTRY=0xd7
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_MODIFYPRIORITY_ENTRY=0xcf
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_PRIORITY_ENTRY=0xc5
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_RCMDESTINATIONAPI_ENTRY=0xb4
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_RCMDESTINATIONAPI_EXIT=0xb5
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_REMOVECONNECTIONMETHOD_ENTRY=0xce
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SESSIONCONNECTED_ENTRY=0xb6
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SESSIONCONNECTED_EXIT=0xb7
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SETHIDDEN_ENTRY=0xd3
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SETMETADATA_ENTRY=0xd1
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SETNAME_ENTRY=0xd0
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_SETPROTECTION_ENTRY=0xd2
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_UPDATE_ENTRY=0xd4
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ADDCONNECTIONMETHODL_ENTRY=0x19b
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ADDCONNECTIONMETHODL_EXIT=0x19c
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ADDEMBEDDEDDESTINATIONL_ENTRY=0x19d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ADDEMBEDDEDDESTINATIONL_EXIT=0x19e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CLOSE_ENTRY=0x17c
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CLOSE_EXIT=0x17d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODBYIDL_ENTRY=0x188
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODBYIDL_EXIT=0x189
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODCOUNT_ENTRY=0x184
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODCOUNT_EXIT=0x185
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODL_ENTRY=0x186
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CONNECTIONMETHODL_EXIT=0x187
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_ENTRY=0x197
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_CREATECONNECTIONMETHODL_EXIT=0x198
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_DELETECONNECTIONMETHODL_ENTRY=0x19f
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_DELETECONNECTIONMETHODL_EXIT=0x1a0
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_DELETELD_ENTRY=0x1af
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_DELETELD_EXIT=0x1b0
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ELEMENTID_ENTRY=0x190
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ELEMENTID_EXIT=0x191
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ID_ENTRY=0x18e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ID_EXIT=0x18f
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ISCONNECTEDL_ENTRY=0x1b1
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ISCONNECTEDL_EXIT=0x1b2
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ISHIDDEN_ENTRY=0x195
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_ISHIDDEN_EXIT=0x196
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_METADATAL_ENTRY=0x192
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_METADATAL_EXIT=0x193
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_MODIFYPRIORITYL_ENTRY=0x1a3
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_MODIFYPRIORITYL_EXIT=0x1a4
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_NAMELC_ENTRY=0x18c
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_NAMELC_EXIT=0x18d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_OPERATOR_ENTRY=0x182
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_OPERATOR_EXIT=0x183
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_PRIORITYL_ENTRY=0x18a
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_PRIORITYL_EXIT=0x18b
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_PROTECTIONLEVEL_ENTRY=0x194
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_RCMDESTINATIONEXT_ENTRY=0x17e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_RCMDESTINATIONEXT_EXIT=0x17f
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_REMOVECONNECTIONMETHODL_ENTRY=0x1a1
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_REMOVECONNECTIONMETHODL_EXIT=0x1a2
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETHIDDENL_ENTRY=0x1ab
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETHIDDENL_EXIT=0x1ac
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETMETADATAL_ENTRY=0x1a7
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETMETADATAL_EXIT=0x1a8
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETNAMEL_ENTRY=0x1a5
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETNAMEL_EXIT=0x1a6
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETPROTECTIONL_ENTRY=0x1a9
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_SETPROTECTIONL_EXIT=0x1aa
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_UPDATEL_ENTRY=0x1ad
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONEXT_UPDATEL_EXIT=0x1ae
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ADDCONNECTIONMETHODL_ENTRY=0x71
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ADDEMBEDDEDDESTINATIONL_ENTRY=0x72
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CLOSE_ENTRY=0x57
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CLOSE_EXIT=0x58
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CONNECTIONMETHODBYIDL_ENTRY=0x62
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CONNECTIONMETHODBYIDL_EXIT=0x63
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CONNECTIONMETHODCOUNT_ENTRY=0x5f
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CONNECTIONMETHODL_ENTRY=0x60
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CONNECTIONMETHODL_EXIT=0x61
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CREATECONNECTIONMETHODL_ENTRY=0x6d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_CREATECONNECTIONMETHODL_EXIT=0x6e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_DELETECONNECTIONMETHODL_ENTRY=0x73
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_DELETECONNECTIONMETHODL_EXIT=0x74
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_DELETELD_ENTRY=0x83
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_DELETELD_EXIT=0x84
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ELEMENTID_ENTRY=0x68
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ID_ENTRY=0x67
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ISCONNECTEDL_ENTRY=0x85
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_ISHIDDEN_ENTRY=0x6c
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_METADATAL_ENTRY=0x69
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_METADATAL_EXIT=0x6a
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_MODIFYPRIORITYL_ENTRY=0x77
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_MODIFYPRIORITYL_EXIT=0x78
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_NAMELC_ENTRY=0x66
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_OPERATOR_ENTRY=0x5d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_OPERATOR_EXIT=0x5e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_PRIORITYL_ENTRY=0x64
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_PRIORITYL_EXIT=0x65
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_PROTECTIONLEVEL_ENTRY=0x6b
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_RCMDESTINATION_ENTRY=0x59
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_RCMDESTINATION_EXIT=0x5a
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_REMOVECONNECTIONMETHODL_ENTRY=0x75
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_REMOVECONNECTIONMETHODL_EXIT=0x76
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETHIDDENL_ENTRY=0x7f
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETHIDDENL_EXIT=0x80
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETMETADATAL_ENTRY=0x7b
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETMETADATAL_EXIT=0x7c
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETNAMEL_ENTRY=0x79
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETNAMEL_EXIT=0x7a
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETPROTECTIONL_ENTRY=0x7d
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_SETPROTECTIONL_EXIT=0x7e
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_UPDATEL_ENTRY=0x81
+[TRACE]TRACE_FLOW[0x7]_RCMDESTINATION_UPDATEL_EXIT=0x82
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_CLOSE_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_CLOSE_EXIT=0x36
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_CONNECT_ENTRY=0x30
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_CONNECT_EXIT=0x31
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_COPYCONNECTIONMETHOD_ENTRY=0x53
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_CREATETABLES_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETALLDESTINATIONSL_ENTRY=0x48
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETALLDESTINATIONSL_EXIT=0x49
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERINFOBOOL_ENTRY=0x3f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERINFOINT_ENTRY=0x3e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERINFOSTRING8_ENTRY=0x41
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERINFOSTRING_ENTRY=0x40
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERPRIORITYARRAYL_ENTRY=0x4a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETBEARERPRIORITYARRAYL_EXIT=0x4b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNECTIONMETHODINFOBOOL_ENTRY=0x43
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNECTIONMETHODINFOINT_ENTRY=0x42
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING8_ENTRY=0x45
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNECTIONMETHODINFOSTRING_ENTRY=0x44
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNMETHODSL_ENTRY=0x46
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETCONNMETHODSL_EXIT=0x47
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETEASYWLANID_ENTRY=0x50
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETSUPPORTEDBEARERSL_ENTRY=0x4e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_GETSUPPORTEDBEARERSL_EXIT=0x4f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_MOVECONNECTIONMETHOD_ENTRY=0x54
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_RCMMANAGERAPI_ENTRY=0x2e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_RCMMANAGERAPI_EXIT=0x2f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_READDEFAULTCONNECTION_ENTRY=0x51
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVEALLREFERENCES_ENTRY=0x56
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVECONNECTIONMETHOD_ENTRY=0x55
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVECONNMETHODPOINTER_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVECONNMETHODPOINTER_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVEDESTINATIONPOINTER_ENTRY=0x38
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_REMOVEDESTINATIONPOINTER_EXIT=0x39
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_SETBEARERPRIORITYARRAYL_ENTRY=0x4c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_SETBEARERPRIORITYARRAYL_EXIT=0x4d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_STORECONNMETHODPOINTER_ENTRY=0x3a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_STOREDESTINATIONPOINTER_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGERAPI_WRITEDEFAULTCONNECTION_ENTRY=0x52
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_ALLDESTINATIONSL_ENTRY=0x168
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_ALLDESTINATIONSL_EXIT=0x169
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_BEARERPRIORITYARRAYL_ENTRY=0x16a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_BEARERPRIORITYARRAYL_EXIT=0x16b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CLEANUPGLOBALPRIORITYARRAY_ENTRY=0x16e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CLEANUPGLOBALPRIORITYARRAY_EXIT=0x16f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CLOSE_ENTRY=0x13e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CLOSE_EXIT=0x13f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CONNECTIONMETHODL_ENTRY=0x162
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CONNECTIONMETHODL_EXIT=0x163
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_COPYCONNECTIONMETHODL_ENTRY=0x15a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_COPYCONNECTIONMETHODL_EXIT=0x15b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATECONNECTIONMETHODL_ENTRY=0x158
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATECONNECTIONMETHODL_EXIT=0x159
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATEDESTINATIONL_ENTRY=0x156
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATEDESTINATIONL_EXIT=0x157
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATETABLESANDOPENL_ENTRY=0x142
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_CREATETABLESANDOPENL_EXIT=0x143
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_DESTINATIONL_ENTRY=0x166
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_DESTINATIONL_EXIT=0x167
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_EASYWLANIDL_ENTRY=0x172
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_EASYWLANIDL_EXIT=0x173
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOBOOLL_ENTRY=0x148
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOBOOLL_EXIT=0x149
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOINTL_ENTRY=0x146
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOINTL_EXIT=0x147
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOSTRING8L_ENTRY=0x14c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOSTRING8L_EXIT=0x14d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOSTRINGL_ENTRY=0x14a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETBEARERINFOSTRINGL_EXIT=0x14b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOBOOLL_ENTRY=0x150
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOBOOLL_EXIT=0x151
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOINTL_ENTRY=0x14e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOINTL_EXIT=0x14f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRING8L_ENTRY=0x154
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRING8L_EXIT=0x155
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRINGL_ENTRY=0x152
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_GETCONNECTIONMETHODINFOSTRINGL_EXIT=0x153
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_MOVECONNECTIONMETHODL_ENTRY=0x15c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_MOVECONNECTIONMETHODL_EXIT=0x15d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_OPENLC_ENTRY=0x144
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_OPENLC_EXIT=0x145
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_OPENL_ENTRY=0x140
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_OPENL_EXIT=0x141
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_READDEFCONNL_ENTRY=0x174
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_READDEFCONNL_EXIT=0x175
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_REMOVEALLREFERENCESL_ENTRY=0x160
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_REMOVEALLREFERENCESL_EXIT=0x161
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_REMOVECONNECTIONMETHODL_ENTRY=0x15e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_REMOVECONNECTIONMETHODL_EXIT=0x15f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_SUPPORTEDBEARERSL_ENTRY=0x170
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_SUPPORTEDBEARERSL_EXIT=0x171
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_UPDATEBEARERPRIORITYARRAYL_ENTRY=0x16c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_UPDATEBEARERPRIORITYARRAYL_EXIT=0x16d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_WRITEDEFCONNL_ENTRY=0x176
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGEREXT_WRITEDEFCONNL_EXIT=0x177
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_ALLDESTINATIONSL_ENTRY=0x1c
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_ALLDESTINATIONSL_EXIT=0x1d
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_BEARERPRIORITYARRAYL_ENTRY=0x1f
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_BEARERPRIORITYARRAYL_EXIT=0x20
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CLEANUPGLOBALPRIORITYARRAY_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CLEANUPGLOBALPRIORITYARRAY_EXIT=0x24
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CLOSE_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CLOSE_EXIT=0x6
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CONNECTIONMETHODL_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CONNECTIONMETHODL_EXIT=0x1b
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_COPYCONNECTIONMETHODL_ENTRY=0x14
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CREATECONNECTIONMETHODL_ENTRY=0x13
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CREATEDESTINATIONL_ENTRY=0x12
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CREATETABLESANDOPENL_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_CREATETABLESANDOPENL_EXIT=0x8
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_DESTINATIONL_ENTRY=0x1e
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_EASYWLANIDL_ENTRY=0x27
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETBEARERINFOBOOLL_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETBEARERINFOINTL_ENTRY=0xa
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETBEARERINFOSTRING8L_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETBEARERINFOSTRINGL_ENTRY=0xc
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETCONNECTIONMETHODINFOBOOLL_ENTRY=0xf
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETCONNECTIONMETHODINFOINTL_ENTRY=0xe
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETCONNECTIONMETHODINFOSTRING8L_ENTRY=0x11
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_GETCONNECTIONMETHODINFOSTRINGL_ENTRY=0x10
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_MOVECONNECTIONMETHODL_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_OPENLC_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_OPENLC_EXIT=0x4
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_OPENL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_OPENL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_READDEFCONNL_ENTRY=0x28
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_READDEFCONNL_EXIT=0x29
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_REMOVEALLREFERENCESL_ENTRY=0x18
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_REMOVEALLREFERENCESL_EXIT=0x19
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_REMOVECONNECTIONMETHODL_ENTRY=0x16
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_REMOVECONNECTIONMETHODL_EXIT=0x17
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_SUPPORTEDBEARERSL_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_SUPPORTEDBEARERSL_EXIT=0x26
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_UPDATEBEARERPRIORITYARRAYL_ENTRY=0x21
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_UPDATEBEARERPRIORITYARRAYL_EXIT=0x22
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_WRITEDEFCONNL_ENTRY=0x2a
+[TRACE]TRACE_FLOW[0x7]_RCMMANAGER_WRITEDEFCONNL_EXIT=0x2b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODWRAPPER_CREATECONNMETHODCOPY_ENTRY=0xfb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_ADDEMBEDDEDDESTINATION_ENTRY=0x9f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONWRAPPER_CREATEDESTCOPY_ENTRY=0x8e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_RCMCONNECTIONMETHODAPI_CONNECTANDCREATECONNMETHODCOPY_ENTRY=0x122
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_RCMDESTINATIONAPI_CONNECTANDCREATEDESTCOPY_ENTRY=0xb9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmcommon/inc/cmmclistatic.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Launches the Connection Method Manager Server.
+*
+*/
+
+
+#ifndef CMMCLISTATIC_H
+#define CMMCLISTATIC_H
+
+#include <e32std.h>
+
+const TInt KCmmDefaultMessageSlots = 2;
+
+_LIT( KCmManagerStartupMutex, "CmManagerStartupMutex" );
+
+
+/**
+ * Class to handle CmManager server startup.
+ */
+class TCmManagerLauncher
+    {
+public:
+    static TInt LaunchServer(
+            const TDesC& aServerFileName,
+            const TUid& aServerUid3 );
+
+private:
+    static TBool ServerStartupLock( RMutex& mutex, TInt& err );
+    static void ServerStartupUnlock( RMutex& mutex );
+    };
+
+#endif // CMMCLISTATIC_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,293 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Common definitions and enumerations for connection method manager server
+* (internal use).
+*
+*/
+
+
+#ifndef CMMSERVERDEFS_H
+#define CMMSERVERDEFS_H
+
+#include <e32base.h>
+
+static const TUid KCmmUid3 = { 0x20016A7A };
+
+/**
+ * CmManager server name.
+ */
+_LIT( KCmmServer, "!CmmServer" );
+
+/**
+ * CmManager server filename.
+ */
+_LIT( KCmmServerFile, "cmmserver" );
+
+const TInt KBitsInOneByte = 8;
+const TInt KBitsInTwoBytes = 16;
+const TInt KBitsInThreeBytes = 24;
+
+/**
+ * Amount of time in microseconds that the server will wait before shutting
+ * down, after last client has gone.
+ */
+#if defined(__WINSCW__)
+const TUint KCmmShutdownDelay = 5000000; // 5 seconds, for testing purposes.
+#else
+const TUint KCmmShutdownDelay = 70000000; // 70 seconds.
+#endif
+
+const TUint32 KCmDefaultDestinationAPTagId = 0x1000;
+const TUint32 KCmMaxDestinationAPTagId = 0x1100;
+
+const TUint32 KCmmConnMethodIdIntervalMin = 0;
+const TUint32 KCmmConnMethodIdIntervalMax = 0x0100;
+
+const TUint32 KCmmDestIdIntervalLegacyMin = 0;
+const TUint32 KCmmDestIdIntervalLegacyMax = 0x0100;
+
+const TUint32 KCmmDestIdIntervalMin = 0x1000;
+const TUint32 KCmmDestIdIntervalMax = 0x1100;
+
+const TInt KCmmStringLengthMax = 1024; //TODO, need to find out correct value here. 1024 is correct, but can that be received from commsdat?
+
+const TUint32 KTemporaryIdCounterStart = 32768;
+
+const TUint32 KDestProtectionLevelMask = 0xF0000000;
+const TInt KBitsToShiftDestProtectionLevel = 28;
+
+
+// Buffer size for initial connection method query.
+const TInt KCmmConnMethodAmountNormal = 64; //TODO, Check value
+// Maximum theoretical amount of connection methods.
+const TInt KCmmConnMethodAmountMax = 256;
+
+// Buffer size for initial destination query.
+const TInt KCmmDestAmountNormal = 32;
+// Maximum theoretical amount of connection methods.
+const TInt KCmmDestAmountMax = 256;
+
+// Buffer size for supported bearers query.
+const TInt KCmmBearerAmountNormal = 10;
+
+// Buffer size for bearer priority array query, first attempt.
+const TInt KCmmDefaultBearerPriorityArraySize = 256;
+
+// iPriority:           2 16-bit values,
+// iUIPriority:         2 16-bit values,
+// iServiceType length: 1 16-bit value.
+const TInt KCmmBearerPriorityHeaderLength = 5;
+
+// Name of the icon for the 'uncategorized' group. This group is a UI-construct
+// that is used to group all uncategorized IAPs together.
+_LIT( KCmmUncategorizedIconName, "qtg_small_favorite" );
+
+// Minimum disk space required for writing operations.
+const TInt KMinimumDiskSpace = 8192;
+
+// Opcodes used in message passing between client and server.
+enum TCmmRequests
+    {
+    ECmmGetBearerInfoInt                     = 0,
+    ECmmGetBearerInfoBool                    = 1,
+    ECmmGetBearerInfoString                  = 2,
+    ECmmGetBearerInfoString8                 = 3,
+    ECmmGetConnMethodArray                   = 4,
+    ECmmGetAllDestinations                   = 5,
+    ECmmGetBearerPriorityArray               = 6,
+    ECmmGetEasyWlanId                        = 7,
+    ECmmReadDefaultConnection                = 8,
+    ECmmReadGeneralConnectionSettings        = 9,
+    ECmmGetSupportedBearers                  = 10,
+    ECmmGetUncategorizedIcon                 = 11,
+
+    ECmmGetConnMethodInfoInt                 = 12,
+    ECmmGetConnMethodInfoBool                = 13,
+    ECmmGetConnMethodInfoString              = 14,
+    ECmmGetConnMethodInfoString8             = 15,
+
+    ECmmUpdateBearerPriorityArray            = 16,
+    ECmmWriteDefaultConnection               = 17,
+    ECmmWriteGeneralConnectionSettings       = 18,
+    ECmmCopyConnMethod                       = 19,
+    ECmmMoveConnMethod                       = 20,
+    ECmmRemoveConnMethod                     = 21,
+    ECmmRemoveAllReferences                  = 22, // Connection method becomes uncategorized.
+
+    // RCmDestination starts from 100
+    EDestGetDestination                      = 100,
+    EDestRefresh                             = 101,
+    EDestCloseDestination                    = 102,
+    EDestGetConnMethodCount                  = 103,
+    EDestGetConnMethodPriority               = 104,
+    EDestGetName                             = 105,
+    EDestGetId                               = 106,
+    EDestGetElementId                        = 107,
+    EDestMetadata                            = 108,
+    EDestGetProtectionLevel                  = 109,
+    EDestIsHidden                            = 110,
+    EDestIsEqual                             = 111,
+    EDestGetEmbeddedDestination              = 112,
+    EDestGetIcon                             = 113,
+
+    EDestCreateDestinationWithName           = 114,
+    EDestCreateDestinationWithNameAndId      = 115,
+    EDestIsConnected                         = 116,
+    EDestAddConnMethod                       = 117,
+    EDestAddEmbeddedDestination              = 118,
+    EDestDeleteConnMethod                    = 119,
+    EDestRemoveConnMethod                    = 120,
+    EDestModifyPriority                      = 121,
+    EDestSetName                             = 122,
+    EDestSetMetadata                         = 123,
+    EDestSetProtection                       = 124,
+    EDestSetHidden                           = 125,
+    EDestUpdate                              = 126,
+    EDestDelete                              = 127,
+    EDestSetIcon                             = 128,
+
+    //RCmConnectionMethod starts from 200
+    ECMGetConnMethodWithId                   = 200,
+    ECMRefresh                               = 201,
+    ECMGetConnMethodFromDestWithIndex        = 202,
+    ECMGetConnMethodFromDestWithId           = 203,
+    ECMCloseConnMethod                       = 204,
+    ECMIsEqual                               = 205,
+
+    ECMCreateConnMethod                      = 206,
+    ECMCreateConnMethodWithId                = 207,
+    ECMCreateConnMethodToDest                = 208,
+    ECMCreateConnMethodToDestWithId          = 209,
+    ECMCreateCopyOfExisting                  = 210,
+
+    ECMGetIntAttribute                       = 211,
+    ECMGetBoolAttribute                      = 212,
+    ECMGetStringAttribute                    = 213,
+    ECMGetString8Attribute                   = 214,
+
+    ECMSetIntAttribute                       = 215,
+    ECMSetBoolAttribute                      = 216,
+    ECMSetStringAttribute                    = 217,
+    ECMSetString8Attribute                   = 218,
+    ECMDelete                                = 219,
+    ECMUpdate                                = 220
+    };
+
+// Panic categories
+_LIT( KCmmPanicCategoryApi, "CmManager API" );
+
+// Panic codes
+enum TCmmServerPanic
+    {
+    ECreateTrapCleanup = 1,
+    ECreateServer,
+    EBadDescriptor,
+    EBadRequest,
+    EInvalidImportState,
+    EDestNotConnectedToServer = 201
+    };
+
+// Status flag values for database records.
+enum TCmmRecordStatus
+    {
+    ECmmRecordStatusBlank = 0x0001,
+    ECmmRecordStatusLoaded = 0x0002, // Loaded and up-to-date.
+    ECmmRecordStatusExpired = 0x0004, // Loaded but out-of-date (Cache side only).
+    ECmmRecordStatusModified = 0x0008, // Loaded and modified (Session side only).
+    ECmmRecordStatusUnsaved = 0x0010 // Doesn't yet exist in database (Cache side only).
+    };
+
+// Status flag values for connection method instances.
+enum TCmmConnMethodStatus
+    {
+    ECmmConnMethodStatusNotSaved = 1, // Connection method doesn't yet exist in database (cache side only).
+    ECmmConnMethodStatusValid = 2, // Connection method exists in database and sessions can open handles to it.
+    ECmmConnMethodStatusChanged = 3, // Contents modified, but not saved (session side only).
+    ECmmConnMethodStatusToBeDeleted = 4 // Connection method will be deleted when reference count goes to 0 (cache side only).
+    };
+
+// Status flag values for destination instances.
+enum TCmmDestinationStatus
+    {
+    ECmmDestinationStatusNotSaved = 1, // Destination doesn't yet exist in database (Cache side only).
+    ECmmDestinationStatusValid = 2, // Destination exists in database and sessions can open handles to it.
+    ECmmDestinationStatusChanged = 3, // Contents modified, but not saved (Session side only).
+    ECmmDestinationStatusToBeDeleted = 4 // Destination will be deleted when reference count goes to 0 (cache side only).
+    };
+
+// Identifiers for different destination related database records for internal use.
+enum TCmmDbRecords
+    {
+    ECmmDestNetworkRecord = 1,  //
+    ECmmDestApRecord,           //
+    ECmmDestMetadataRecord,     // CCDSNAPMetadataRecord
+    ECmmDbSnapRecord,           // CCDDataMobilitySelectionPolicyRecord
+    ECmmDbBearerPriorityRecord, //
+    ECmmDbDefConnRecord         //
+    };
+
+NONSHARABLE_CLASS( TCmmIpcStructGetConnMethods )
+    {
+public:
+    TBool iCheckBearerType;
+    TBool iLegacyOnly;
+    TBool iEasyWlan;
+    };
+
+NONSHARABLE_CLASS( TCmmIpcStructMoveConnMethod )
+    {
+public:
+    TInt iSourceDestHandle;
+    TInt iTargetDestHandle;
+    TInt iConnMethodHandle;
+    TInt iIndex;
+    };
+
+// Prefix 'Cmm' used to avoid any future problems or name overlapping with
+// other similar implementations.
+template <class T>
+class CmmCleanupResetAndDestroy
+    {
+public:
+    inline static void PushL( T& aRef );
+
+private:
+    static void ResetAndDestroy( TAny *aPtr );
+    };
+
+template <class T>
+inline void CmmCleanupResetAndDestroyPushL( T& aRef );
+
+template <class T>
+inline void CmmCleanupResetAndDestroy<T>::PushL( T& aRef )
+    {
+    CleanupStack::PushL( TCleanupItem( &ResetAndDestroy, &aRef ) );
+    }
+
+template <class T>
+void CmmCleanupResetAndDestroy<T>::ResetAndDestroy( TAny *aPtr )
+    {
+    (STATIC_CAST(T*,aPtr))->ResetAndDestroy();
+    }
+
+template <class T>
+inline void CmmCleanupResetAndDestroyPushL( T& aRef )
+    {
+    CmmCleanupResetAndDestroy<T>::PushL( aRef );
+    }
+
+#endif // CMMSERVERDEFS_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmcommon/src/cmmclistatic.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Launches the Connection Method Manager Server.
+*
+*/
+
+
+#include "cmmclistatic.h"
+
+/**
+ * LaunchServer
+ *
+ * Launches the CmManager server.
+ *
+ * Return KErrNone if CmManager server is launched successfully,
+ * otherwise one of the system wide error codes.
+ */
+TInt TCmManagerLauncher::LaunchServer(
+        const TDesC& aServerFileName,
+        const TUid& aServerUid3 )
+    {
+    RMutex mutex;
+    TInt err( KErrNone );
+    const TUidType serverUid( KNullUid, KNullUid, aServerUid3 );
+
+    //
+    // EPOC and EKA2 is easy, we just create a new server process. Simultaneous
+    // launching of two such processes should be detected when the second one
+    // attempts to create the server object, failing with KErrAlreadyExists.
+    //
+
+    // Try obtaining a lock. If that fails, server has already been started.
+    // If something fails with obtaining the lock, propagate the error to user.
+    if ( !ServerStartupLock( mutex, err ) )
+        {
+        ServerStartupUnlock( mutex );
+        return err;
+        }
+
+    RProcess server;
+    err = server.Create( aServerFileName, KNullDesC, serverUid );
+
+    if ( err != KErrNone )
+        {
+        ServerStartupUnlock( mutex );
+        return err;
+        }
+
+    TRequestStatus stat;
+    server.Rendezvous( stat );
+    if ( stat != KRequestPending )
+        {
+        server.Kill( 0 ); // Abort startup.
+        }
+    else
+        {
+        server.Resume(); // Logon OK - start the server.
+        }
+    User::WaitForRequest( stat ); // Wait for start or death.
+    // We can't use the 'exit reason' if the server panicked as this
+    // is the panic 'reason' and may be '0' which cannot be distinguished
+    // from KErrNone.
+    err = ( server.ExitType() == EExitPanic ) ? KErrGeneral : stat.Int();
+    server.Close();
+
+    ServerStartupUnlock( mutex );
+    return err;
+    }
+
+/**
+ * ServerStartupLock
+ *
+ * Returns true if obtains the lock without waiting. That is, the
+ * mutex is not created before this call.
+ *
+ * Return false if mutex is created.
+ */
+TBool TCmManagerLauncher::ServerStartupLock( RMutex& mutex, TInt& err )
+    {
+    TInt retval( ETrue );
+
+    // Create handle to mutex.
+    err = mutex.CreateGlobal( KCmManagerStartupMutex );
+    if ( err != KErrNone )
+        {
+        // Mutex already created, wait until done.
+        retval = EFalse;
+        err = mutex.OpenGlobal( KCmManagerStartupMutex );
+        if ( err == KErrNone )
+            {
+            // Wait for completion
+            mutex.Wait();
+            // Server already running, return.
+            return EFalse;
+            }
+        // Else opening failed, err will be propagated to user.
+        }
+    // Else Obtained lock without waiting (retval is ETrue).
+    // The next call completes instantly.
+    mutex.Wait();
+    return retval;
+    }
+
+/**
+ * ServerStartupUnlock
+ *
+ * Frees and closes the mutex.
+ */
+void TCmManagerLauncher::ServerStartupUnlock( RMutex& mutex )
+    {
+    // Let others run
+    mutex.Signal();
+    // Destroy handle
+    mutex.Close();
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/BWinsCw/cmmpluginbaseu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+EXPORTS
+	?GetBoolAttributeL@CCmPluginBaseEng@@QAEHKPAVCCmClientPluginInstance@@@Z @ 1 NONAME ; int CCmPluginBaseEng::GetBoolAttributeL(unsigned long, class CCmClientPluginInstance *)
+	?CreateNewL@CCmPluginBaseEng@@QAEXK@Z @ 2 NONAME ; void CCmPluginBaseEng::CreateNewL(unsigned long)
+	?SetStringAttributeL@CCmPluginBaseEng@@QAEXKABVTDesC16@@PAVCCmClientPluginInstance@@@Z @ 3 NONAME ; void CCmPluginBaseEng::SetStringAttributeL(unsigned long, class TDesC16 const &, class CCmClientPluginInstance *)
+	?GetPluginDataL@CCmPluginBaseEng@@QAEXPAVCCmClientPluginInstance@@@Z @ 4 NONAME ; void CCmPluginBaseEng::GetPluginDataL(class CCmClientPluginInstance *)
+	?SetString8AttributeL@CCmPluginBaseEng@@QAEXKABVTDesC8@@PAVCCmClientPluginInstance@@@Z @ 5 NONAME ; void CCmPluginBaseEng::SetString8AttributeL(unsigned long, class TDesC8 const &, class CCmClientPluginInstance *)
+	?GetIntAttributeL@CCmPluginBaseEng@@QAEKKPAVCCmClientPluginInstance@@@Z @ 6 NONAME ; unsigned long CCmPluginBaseEng::GetIntAttributeL(unsigned long, class CCmClientPluginInstance *)
+	?CheckIfNameModifiedL@CCmPluginBaseEng@@IBEXPAVCCDRecordBase@CommsDat@@0@Z @ 7 NONAME ; void CCmPluginBaseEng::CheckIfNameModifiedL(class CommsDat::CCDRecordBase *, class CommsDat::CCDRecordBase *) const
+	?CreateCopyL@CCmPluginBaseEng@@QAEPAV1@PAVCCmClientPluginInstance@@@Z @ 8 NONAME ; class CCmPluginBaseEng * CCmPluginBaseEng::CreateCopyL(class CCmClientPluginInstance *)
+	??1CCmPluginBaseEng@@UAE@XZ @ 9 NONAME ; CCmPluginBaseEng::~CCmPluginBaseEng(void)
+	?SetIntAttributeL@CCmPluginBaseEng@@QAEXKKPAVCCmClientPluginInstance@@@Z @ 10 NONAME ; void CCmPluginBaseEng::SetIntAttributeL(unsigned long, unsigned long, class CCmClientPluginInstance *)
+	?CopyRecordFieldsL@CCmPluginBaseEng@@IAEXAAVCMDBRecordBase@CommsDat@@0@Z @ 11 NONAME ; void CCmPluginBaseEng::CopyRecordFieldsL(class CommsDat::CMDBRecordBase &, class CommsDat::CMDBRecordBase &)
+	?ReLoadL@CCmPluginBaseEng@@QAEXXZ @ 12 NONAME ; void CCmPluginBaseEng::ReLoadL(void)
+	?NewL@CCmClientPluginInstance@@SAPAV1@XZ @ 13 NONAME ; class CCmClientPluginInstance * CCmClientPluginInstance::NewL(void)
+	?ConstructL@CCmPluginBaseEng@@MAEXXZ @ 14 NONAME ; void CCmPluginBaseEng::ConstructL(void)
+	??0CCmPluginBaseEng@@IAE@PAVTCmPluginInitParam@@@Z @ 15 NONAME ; CCmPluginBaseEng::CCmPluginBaseEng(class TCmPluginInitParam *)
+	?NewLC@CCmClientPluginInstance@@SAPAV1@XZ @ 16 NONAME ; class CCmClientPluginInstance * CCmClientPluginInstance::NewLC(void)
+	?SetBoolAttributeL@CCmPluginBaseEng@@QAEXKHPAVCCmClientPluginInstance@@@Z @ 17 NONAME ; void CCmPluginBaseEng::SetBoolAttributeL(unsigned long, int, class CCmClientPluginInstance *)
+	?LoadL@CCmPluginBaseEng@@QAEXK@Z @ 18 NONAME ; void CCmPluginBaseEng::LoadL(unsigned long)
+	?CheckDNSServerAddressL@CCmPluginBaseEng@@IAEXHAAV?$CMDBField@VTDesC16@@@CommsDat@@0AAV?$CMDBField@H@3@@Z @ 19 NONAME ; void CCmPluginBaseEng::CheckDNSServerAddressL(int, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<class TDesC16> &, class CommsDat::CMDBField<int> &)
+	??0TCmPluginInitParam@@QAE@AAVCMDBSession@CommsDat@@@Z @ 20 NONAME ; TCmPluginInitParam::TCmPluginInitParam(class CommsDat::CMDBSession &)
+	?DeleteL@CCmPluginBaseEng@@UAEXXZ @ 21 NONAME ; void CCmPluginBaseEng::DeleteL(void)
+	?GetString8AttributeL@CCmPluginBaseEng@@QAEPAVHBufC8@@KPAVCCmClientPluginInstance@@@Z @ 22 NONAME ; class HBufC8 * CCmPluginBaseEng::GetString8AttributeL(unsigned long, class CCmClientPluginInstance *)
+	?UpdateL@CCmPluginBaseEng@@UAEXPAVCCmClientPluginInstance@@@Z @ 23 NONAME ; void CCmPluginBaseEng::UpdateL(class CCmClientPluginInstance *)
+	?GetGenericTableIdsToBeObservedL@CCmPluginBaseEng@@QBEXAAV?$RArray@K@@@Z @ 24 NONAME ; void CCmPluginBaseEng::GetGenericTableIdsToBeObservedL(class RArray<unsigned long> &) const
+	?GetStringAttributeL@CCmPluginBaseEng@@QAEPAVHBufC16@@KPAVCCmClientPluginInstance@@@Z @ 25 NONAME ; class HBufC16 * CCmPluginBaseEng::GetStringAttributeL(unsigned long, class CCmClientPluginInstance *)
+	??1CCmClientPluginInstance@@UAE@XZ @ 26 NONAME ; CCmClientPluginInstance::~CCmClientPluginInstance(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/EABI/cmmpluginbaseu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+EXPORTS
+	_ZN16CCmPluginBaseEng10ConstructLEv @ 1 NONAME
+	_ZN16CCmPluginBaseEng10CreateNewLEm @ 2 NONAME
+	_ZN16CCmPluginBaseEng11CreateCopyLEP23CCmClientPluginInstance @ 3 NONAME
+	_ZN16CCmPluginBaseEng14GetPluginDataLEP23CCmClientPluginInstance @ 4 NONAME
+	_ZN16CCmPluginBaseEng16GetIntAttributeLEmP23CCmClientPluginInstance @ 5 NONAME
+	_ZN16CCmPluginBaseEng16SetIntAttributeLEmmP23CCmClientPluginInstance @ 6 NONAME
+	_ZN16CCmPluginBaseEng17CopyRecordFieldsLERN8CommsDat14CMDBRecordBaseES2_ @ 7 NONAME
+	_ZN16CCmPluginBaseEng17GetBoolAttributeLEmP23CCmClientPluginInstance @ 8 NONAME
+	_ZN16CCmPluginBaseEng17SetBoolAttributeLEmiP23CCmClientPluginInstance @ 9 NONAME
+	_ZN16CCmPluginBaseEng19GetStringAttributeLEmP23CCmClientPluginInstance @ 10 NONAME
+	_ZN16CCmPluginBaseEng19SetStringAttributeLEmRK7TDesC16P23CCmClientPluginInstance @ 11 NONAME
+	_ZN16CCmPluginBaseEng20GetString8AttributeLEmP23CCmClientPluginInstance @ 12 NONAME
+	_ZN16CCmPluginBaseEng20SetString8AttributeLEmRK6TDesC8P23CCmClientPluginInstance @ 13 NONAME
+	_ZN16CCmPluginBaseEng22CheckDNSServerAddressLEiRN8CommsDat9CMDBFieldI7TDesC16EES4_RNS1_IiEE @ 14 NONAME
+	_ZN16CCmPluginBaseEng5LoadLEm @ 15 NONAME
+	_ZN16CCmPluginBaseEng7DeleteLEv @ 16 NONAME
+	_ZN16CCmPluginBaseEng7ReLoadLEv @ 17 NONAME
+	_ZN16CCmPluginBaseEng7UpdateLEP23CCmClientPluginInstance @ 18 NONAME
+	_ZN16CCmPluginBaseEngC2EP18TCmPluginInitParam @ 19 NONAME
+	_ZN16CCmPluginBaseEngD0Ev @ 20 NONAME
+	_ZN16CCmPluginBaseEngD1Ev @ 21 NONAME
+	_ZN16CCmPluginBaseEngD2Ev @ 22 NONAME
+	_ZN18TCmPluginInitParamC1ERN8CommsDat11CMDBSessionE @ 23 NONAME
+	_ZN18TCmPluginInitParamC2ERN8CommsDat11CMDBSessionE @ 24 NONAME
+	_ZN23CCmClientPluginInstance4NewLEv @ 25 NONAME
+	_ZN23CCmClientPluginInstance5NewLCEv @ 26 NONAME
+	_ZN23CCmClientPluginInstanceD0Ev @ 27 NONAME
+	_ZN23CCmClientPluginInstanceD1Ev @ 28 NONAME
+	_ZN23CCmClientPluginInstanceD2Ev @ 29 NONAME
+	_ZNK16CCmPluginBaseEng20CheckIfNameModifiedLEPN8CommsDat13CCDRecordBaseES2_ @ 30 NONAME
+	_ZNK16CCmPluginBaseEng31GetGenericTableIdsToBeObservedLER6RArrayImE @ 31 NONAME
+	_ZTI16CCmPluginBaseEng @ 32 NONAME
+	_ZTV16CCmPluginBaseEng @ 33 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*         Build file for cmpluginbase.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmpluginbase.iby  CORE_MW_LAYER_IBY_EXPORT_PATH(cmmpluginbase.iby)
+
+PRJ_MMPFILES
+cmmpluginbase.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/group/cmmpluginbase.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Project definition file for project cmpluginbase
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          cmmpluginbase.dll
+TARGETTYPE      dll
+UID             0x1000008d 0x20016A84
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+SOURCEPATH      ../src
+
+SOURCE          ccmpluginbaseeng.cpp
+SOURCE          ccmpluginbaseengtextresolver.cpp
+
+// Component specific internal headers
+USERINCLUDE     ../inc
+USERINCLUDE     ../../cmmserver/inc
+USERINCLUDE     ../../cmmcommon/inc
+USERINCLUDE     ../traces
+
+// ADO specific internal headers
+SYSTEMINCLUDE   ../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY     euser.lib
+LIBRARY     commsdat.lib
+LIBRARY     featmgr.lib
+LIBRARY     esock.lib
+LIBRARY     ws32.lib
+LIBRARY     cmmanagerdatabase.lib
+LIBRARY     insock.lib
+LIBRARY     sysutil.lib
+LIBRARY     ecom.lib
+LIBRARY     efsrv.lib
+LIBRARY     hbcore.lib
+
+#if defined(ARMCC)
+    DEFFILE ../EABI/cmmpluginbase.def
+#else
+    DEFFILE ../BWinsCw/cmmpluginbase.def
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/inc/ccmpluginbaseengtextresolver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Provides functionality for text resolving
+*
+*/
+
+#ifndef CMPLUGINBASEENGTEXTRESOLVER_H
+#define CMPLUGINBASEENGTEXTRESOLVER_H
+
+/**
+ *  Utility class for resolving localised text.
+ */
+NONSHARABLE_CLASS( CCmPluginBaseEngTextResolver ) : public CBase
+    {
+public:    
+    /**
+     * Resolves localised text from cmmanager translation file.
+     * @param aTextId Text Id from TS file
+     * @return Resolved text
+     */
+    static HBufC* ResolveTextL( const TDesC& aTextId );        
+    };
+
+#endif // CMPLUGINBASEENGTEXTRESOLVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/rom/cmmpluginbase.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmmpluginbase.dll to ROM.
+*
+*/
+
+#ifndef CMMPLUGINBASE_IBY__
+#define CMMPLUGINBASE_IBY__
+
+file=ABI_DIR\BUILD_DIR\cmmpluginbase.dll     SHARED_LIB_DIR\cmmpluginbase.dll
+
+
+#endif // CMMAPI_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,3121 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Implementation of plugin base class
+*
+*/
+
+
+#include <datamobilitycommsdattypes.h>
+#include <cmpluginbaseeng.h>
+#include <cmpsettingsconsts.h>
+#include <featmgr.h>
+#include <cmpluginembdestinationdef.h>
+
+#include "cmmserverdefs.h"
+#include "ccmpluginbaseengtextresolver.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ccmpluginbaseengTraces.h"
+#endif
+
+
+using namespace CMManager;
+using namespace CommsDat;
+
+const TInt KApMaxConnNameLength = 50;
+_LIT( KFormatPostfix, "%02d" );
+_LIT( KFormatLargePostfix, "%d" );
+_LIT( KFormatNameWithPostfix, "%S(%S)" );
+_LIT( KFormatNoPostfix, "%S" );
+const TInt KMaxPostfixLength = 5;
+
+_LIT( KDefWapGatewayIpAddress, "0.0.0.0" );
+
+_LIT( KLocationName, "Mobile" );
+
+_LIT( KDefaultIapName, "Connection Method" );
+
+
+EXPORT_C CCmClientPluginInstance* CCmClientPluginInstance::NewLC()
+    {
+    OstTraceFunctionEntry0( CCMCLIENTPLUGININSTANCE_NEWLC_ENTRY );
+
+    CCmClientPluginInstance* self = new( ELeave ) CCmClientPluginInstance();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMCLIENTPLUGININSTANCE_NEWLC_EXIT );
+    return self;
+    }
+
+EXPORT_C CCmClientPluginInstance* CCmClientPluginInstance::NewL()
+    {
+    OstTraceFunctionEntry0( CCMCLIENTPLUGININSTANCE_NEWL_ENTRY );
+
+    CCmClientPluginInstance* self = CCmClientPluginInstance::NewLC();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMCLIENTPLUGININSTANCE_NEWL_EXIT );
+    return self;
+    }
+
+CCmClientPluginInstance::CCmClientPluginInstance()
+        :
+        iNamingMethod( ENamingUnique ),
+        iLocationEnabled( EFalse ),
+        iIapId( 0 )
+    {
+    }
+
+EXPORT_C CCmClientPluginInstance::~CCmClientPluginInstance()
+    {
+    OstTraceFunctionEntry0( CCMCLIENTPLUGININSTANCE_CCMCLIENTPLUGININSTANCE_ENTRY );
+
+    iGenRecordArray.ResetAndDestroy();
+    iBearerSpecRecordArray.ResetAndDestroy();
+
+    OstTraceFunctionExit0( CCMCLIENTPLUGININSTANCE_CCMCLIENTPLUGININSTANCE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmClientPluginInstance::ConstructL()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// TCmPluginInitParam::TCmPluginInitParam
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TCmPluginInitParam::TCmPluginInitParam( CommsDat::CMDBSession& aSession )
+        :
+        iSessionRef( aSession )
+    {
+    OstTraceFunctionEntry0( TCMPLUGININITPARAM_TCMPLUGININITPARAM_ENTRY );
+
+    iNotused1 = NULL;
+    iNotused2 = NULL;
+
+    OstTraceFunctionExit0( TCMPLUGININITPARAM_TCMPLUGININITPARAM_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CCmPluginBaseEng
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CCmPluginBaseEng::CCmPluginBaseEng( TCmPluginInitParam *aInitParam )
+        :
+        iSession( aInitParam->iSessionRef ),
+        iNamingMethod( ENamingUnique )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CCMPLUGINBASEENG_ENTRY );
+
+    iDtor_ID_Key.iUid = 0;
+    iBearerType = 0;
+
+    iIapRecord = NULL;
+    iProxyRecord = NULL;
+    iServiceRecord = NULL;
+    iNetworkRecord = NULL;
+    iLocationRecord = NULL;
+    iWapAPRecord = NULL;
+    iWapIPBearerRecord = NULL;
+    iMetaDataRecord = NULL;
+
+    iCmId = 0;
+    iMetadataTableId = 0;
+    iLocationEnabled = EFalse;
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_CCMPLUGINBASEENG_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::~CCmPluginBaseEng
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CCmPluginBaseEng::~CCmPluginBaseEng()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINBASEENG_CCMPLUGINBASEENG_ENTRY );
+
+    iCmId = 0;
+    delete iIapRecord; iIapRecord = NULL;
+    delete iProxyRecord; iProxyRecord = NULL;
+    delete iServiceRecord; iServiceRecord = NULL;
+    delete iNetworkRecord; iNetworkRecord = NULL;
+    delete iLocationRecord; iLocationRecord = NULL;
+    delete iWapAPRecord; iWapAPRecord = NULL;
+    delete iWapIPBearerRecord; iWapIPBearerRecord = NULL;
+    delete iMetaDataRecord; iMetaDataRecord = NULL;
+
+    iLocationEnabled = EFalse;
+
+    REComSession::DestroyedImplementation( iDtor_ID_Key );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINBASEENG_CCMPLUGINBASEENG_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CONSTRUCTL_ENTRY );
+
+    TRAPD( err, iMetadataTableId = CCDIAPMetadataRecord::TableIdL( iSession ) );
+    if ( err )
+        {
+        if ( err == KErrNotFound )
+            {
+            iMetadataTableId = CCDIAPMetadataRecord::CreateTableL( iSession );
+            }
+        else
+            {
+            User::LeaveIfError( err );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::UpdateL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATEL_ENTRY );
+
+    PrepareToUpdateRecordsL( aClientPluginInstance );
+
+    UpdateServiceRecordL( aClientPluginInstance );
+    UpdateLocationRecordL( aClientPluginInstance );
+    UpdateNetworkRecordL( aClientPluginInstance );
+    UpdateIAPRecordL( aClientPluginInstance );
+    UpdateWapRecordL( aClientPluginInstance );
+    UpdateProxyRecordL( aClientPluginInstance );
+    UpdateMetadataRecordL( aClientPluginInstance );
+    UpdateConnPrefSettingL();
+
+    UpdateBearerRecordsL(
+            aClientPluginInstance->iGenRecordArray,
+            aClientPluginInstance->iBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Delete this connection methond.
+// Record ids are checked to be sure that we delete only records
+// that were loaded before.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::DeleteL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_DELETEL_ENTRY );
+
+    PrepareToDeleteRecordsL();
+
+    if ( iIapRecord && iIapRecord->RecordId() )
+        {
+        iIapRecord->DeleteL( iSession );
+        }
+
+    if ( iProxyRecord && iProxyRecord->RecordId() )
+        {
+        iProxyRecord->DeleteL( iSession );
+        }
+
+    if ( iServiceRecord && iServiceRecord->RecordId() )
+        {
+        iServiceRecord->DeleteL( iSession );
+        }
+
+    if ( iNetworkRecord && iNetworkRecord->RecordId() )
+        {
+        iNetworkRecord->DeleteL( iSession );
+        }
+
+    if ( iLocationRecord && iLocationRecord->RecordId() )
+        {
+        iLocationRecord->DeleteL( iSession );
+        }
+
+    if ( iWapAPRecord && iWapAPRecord->RecordId() )
+        {
+        iWapAPRecord->DeleteL( iSession );
+        }
+
+    if ( iWapIPBearerRecord && iWapIPBearerRecord->RecordId() )
+        {
+        iWapIPBearerRecord->DeleteL( iSession );
+        }
+
+    if ( iMetaDataRecord && iMetaDataRecord->RecordId() )
+        {
+        iMetaDataRecord->DeleteL( iSession );
+        }
+
+    DeleteBearerRecordsL();
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_DELETEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::ReLoad
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::ReLoadL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_RELOAD_ENTRY );
+
+    delete iIapRecord; iIapRecord = NULL;
+    delete iProxyRecord; iProxyRecord = NULL;
+    delete iServiceRecord; iServiceRecord = NULL;
+    delete iNetworkRecord; iNetworkRecord = NULL;
+    delete iLocationRecord; iLocationRecord = NULL;
+    delete iWapAPRecord; iWapAPRecord = NULL;
+    delete iWapIPBearerRecord; iWapIPBearerRecord = NULL;
+    delete iMetaDataRecord; iMetaDataRecord = NULL;
+
+    iLocationEnabled = EFalse;
+
+    ResetBearerRecords();
+
+    LoadL( iCmId );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_RELOAD_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::LoadL( TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADL_ENTRY );
+
+    // Embedded destination must be handled separately first.
+    if ( aIapId > KCmDefaultDestinationAPTagId )
+        {
+        iCmId = aIapId;
+        return;
+        }
+
+    DoLoadL( aIapId );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CreateNewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::CreateNewL( TUint32 aCmId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CREATENEWL_ENTRY );
+
+    if ( iCmId )
+        // we already have IAP id ->
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    // Optional record, disabled by default.
+    iLocationEnabled = EFalse;
+
+    // Create mandatory records.
+    iIapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+    iNetworkRecord = static_cast<CCDNetworkRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+    iProxyRecord = static_cast<CCDProxiesRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+    NewWapRecordL();
+    iWapIPBearerRecord->iWAPGatewayAddress.SetL( KDefWapGatewayIpAddress );
+
+    iMetaDataRecord = NewMetadataRecordL( ETrue );
+
+    // Call plugin to create its own records.
+    CreateServiceRecordL();
+
+    // Update iaprecord servicetype name.
+    HBufC* servicetypeName( NULL );
+    ServiceRecordNameLC( servicetypeName );
+    iIapRecord->iServiceType.SetL( *servicetypeName );
+    CleanupStack::PopAndDestroy( servicetypeName );
+
+    // Update iaprecord bearertype name.
+    HBufC* bearerTypeName( NULL );
+    BearerRecordNameLC( bearerTypeName );
+    iIapRecord->iBearerType.SetL( *bearerTypeName );
+    CleanupStack::PopAndDestroy( bearerTypeName );
+
+    CreateBearerRecordsL();
+
+    EnableProxyL( EFalse );
+
+    _LIT( KDefaultConnNameTextId, "txt_occ_setlabel_connection_name_val_connection" );
+    HBufC* resolvedText( NULL );
+    resolvedText = CCmPluginBaseEngTextResolver::ResolveTextL( KDefaultConnNameTextId );
+    if ( resolvedText )
+        {
+        SetDefaultNameL( *resolvedText );
+        }
+    else
+        {
+        SetDefaultNameL( KDefaultIapName );
+        }
+
+    delete resolvedText;
+    resolvedText = NULL;
+
+    iIapRecord->iNetworkWeighting = 0; // it's always 0.
+
+    if ( aCmId != 0 )
+        {
+        iIapRecord->SetRecordId( aCmId );
+        iCmId = 0;
+        }
+    else
+        {
+        iIapRecord->SetRecordId( KCDNewRecordRequest );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_CREATENEWL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CreateCopyL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CCmPluginBaseEng* CCmPluginBaseEng::CreateCopyL(
+        CCmClientPluginInstance* /*aClientPluginInstance*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CREATECOPYL_ENTRY );
+
+    TCmPluginInitParam params( iSession );
+    CCmPluginBaseEng* copyInst = CreateInstanceL( params );
+    CleanupStack::PushL( copyInst );
+
+    PrepareToCopyDataL( copyInst );
+    CopyDataL( copyInst );
+    CleanupStack::Pop( copyInst );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_CREATECOPYL_EXIT );
+    return copyInst;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::GetGenericTableIdsToBeObserved
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::GetGenericTableIdsToBeObservedL(
+        RArray<TUint32>& aTableIdArray ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETGENERICTABLEIDSTOBEOBSERVED_ENTRY );
+
+    // Service and bearer records should be added by plugins.
+    aTableIdArray.AppendL( KCDTIdIAPRecord );
+    aTableIdArray.AppendL( KCDTIdWAPAccessPointRecord );
+    aTableIdArray.AppendL( KCDTIdWAPIPBearerRecord );
+    aTableIdArray.AppendL( KCDTIdProxiesRecord );
+    aTableIdArray.AppendL( iMetadataTableId );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETGENERICTABLEIDSTOBEOBSERVED_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::CopyDataL( CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYDATAL_ENTRY );
+
+    aCopyInstance->iLocationEnabled = iLocationEnabled;
+    aCopyInstance->iNamingMethod = iNamingMethod;
+    CopyRecordsL( aCopyInstance );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CopyRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::CopyRecordsL( CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYRECORDSL_ENTRY );
+
+    CopyRecordDataL( KIapRecordIndex, aCopyInstance );
+
+    // Ensure that IAP's name is set by the rules (Naming Method).
+    SetNameL(
+            iIapRecord->iRecordName.GetL(),
+            aCopyInstance->iIapRecord,
+            aCopyInstance->iNamingMethod );
+
+    CopyRecordDataL( KServiceRecordIndex, aCopyInstance );
+    CopyRecordDataL( KNetworkRecordIndex, aCopyInstance );
+    CopyRecordDataL( KWAPAPRecordIndex, aCopyInstance );
+    CopyRecordDataL( KWAPBearerRecordIndex, aCopyInstance );
+    CopyRecordDataL( KMetaDataRecordIndex, aCopyInstance );
+    CopyRecordDataL( KProxyRecordIndex, aCopyInstance );
+
+    CopyBearerRecordsL( aCopyInstance );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CopyRecordDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::CopyRecordDataL(
+        TUint32 aRecordIdentifier,
+        CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYRECORDDATAL_ENTRY );
+
+    switch ( aRecordIdentifier )
+        {
+        case KIapRecordIndex:
+            {
+            aCopyInstance->iIapRecord = static_cast<CCDIAPRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+            CopyRecordFieldsL( *iIapRecord, *aCopyInstance->iIapRecord );
+            }
+            break;
+        case KServiceRecordIndex:
+            {
+            aCopyInstance->iServiceRecord = CopyServiceRecordL();
+            // The name of the service record copy is changed during update
+            // process, in PrepareToUpdateRecordsL()-method.
+            }
+            break;
+        case KNetworkRecordIndex:
+            {
+            aCopyInstance->iNetworkRecord = static_cast<CCDNetworkRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+            CopyRecordFieldsL( *iNetworkRecord, *aCopyInstance->iNetworkRecord );
+            }
+            break;
+        case KWAPAPRecordIndex:
+            {
+            aCopyInstance->iWapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+            CopyRecordFieldsL( *iWapAPRecord, *aCopyInstance->iWapAPRecord );
+            }
+            break;
+        case KWAPBearerRecordIndex:
+            {
+            aCopyInstance->iWapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdWAPIPBearerRecord ) );
+            CopyRecordFieldsL( *iWapIPBearerRecord, *aCopyInstance->iWapIPBearerRecord );
+            }
+            break;
+        case KMetaDataRecordIndex:
+            {
+            aCopyInstance->iMetaDataRecord = new( ELeave ) CCDIAPMetadataRecord( 
+                    iMetadataTableId );
+            CopyRecordFieldsL( *iMetaDataRecord, *aCopyInstance->iMetaDataRecord );
+            }
+            break;
+        case KProxyRecordIndex:
+            {
+            if ( iProxyRecord )
+                {
+                aCopyInstance->iProxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+                CopyRecordFieldsL( *iProxyRecord, *aCopyInstance->iProxyRecord );
+                }
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrArgument );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYRECORDDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Copies the values and attributes of all fields from aSource-record into
+// aDestination record. Does not copy the record element ID. Also, does not
+// touch any field in aDestination-record that is NULL in aSource-record.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::CopyRecordFieldsL(
+        CommsDat::CMDBRecordBase& aSource,
+        CommsDat::CMDBRecordBase& aDestination )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYRECORDFIELDSL_ENTRY );
+
+    const SRecordTypeInfo* recordInfo = aSource.GetRecordInfo();
+    if ( !recordInfo )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    CMDBElement* ptrSource( NULL );
+    CMDBElement* ptrDest( NULL );
+
+    while ( recordInfo && recordInfo->iTypeId != 0 )
+        {
+        ptrSource = aSource.GetFieldByIdL( recordInfo->iTypeId );
+        ptrDest = aDestination.GetFieldByIdL( recordInfo->iTypeId );
+
+        if ( !( ptrSource->IsNull() ) )
+            {
+            // Make sure we see only basic type info. Masks out any additional info
+            // on links (CommsDat internal stuff).
+            switch ( recordInfo->iValType & 0x000000ff )
+                {
+                case CommsDat::EInt:
+                case CommsDat::EBool:
+                    {
+                    static_cast<CMDBField<TInt>&>( *ptrDest ).SetL(
+                            static_cast<CMDBField<TInt>&>( *ptrSource ) );
+                    }
+                    break;
+                case CommsDat::EUint32:
+                case CommsDat::ELink:
+                    {
+                    static_cast<CMDBField<TUint32>&>( *ptrDest ).SetL(
+                            static_cast<CMDBField<TUint32>&>( *ptrSource ) );
+                    }
+                    break;
+                case CommsDat::EDesC8:
+                    {
+                    static_cast<CMDBField<TDesC8>&>( *ptrDest ).SetL(
+                            static_cast<CMDBField<TDesC8>&>( *ptrSource ) );
+                    }
+                    break;
+                case CommsDat::EText:
+                case CommsDat::EMedText:
+                case CommsDat::ELongText:
+                    {
+                    static_cast<CMDBField<TDesC>&>( *ptrDest ).SetL(
+                            static_cast<CMDBField<TDesC>&>( *ptrSource ) );
+                    }
+                    break;
+                default:
+                    {
+                    User::Leave( KErrCorrupt );
+                    }
+                    break;
+                }
+            ptrDest->ClearAttributes( ptrDest->Attributes() );
+            ptrDest->SetAttributes( ptrSource->Attributes() );
+            }
+        recordInfo++;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYRECORDFIELDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::DoLoadL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::DoLoadL( TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_DOLOADL_ENTRY );
+
+    PrepareToLoadRecordsL();
+
+    LoadIAPRecordL( aIapId );
+    LoadWapRecordL();
+    LoadMetadataRecordL();
+    LoadNetworkRecordL();
+
+    LoadServiceRecordL();
+    LoadProxyRecordL();
+
+    LoadBearerRecordsL();
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_DOLOADL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::PrepareToLoadRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::PrepareToLoadRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_PREPARETOLOADRECORDSL_ENTRY );
+
+    iLocationEnabled = EFalse;
+    PreparePluginToLoadRecordsL();
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_PREPARETOLOADRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadIAPRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadIAPRecordL( TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADIAPRECORDL_ENTRY );
+
+    iCmId = aIapId;
+
+    // Load IAP record.
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+
+    CleanupStack::PushL( iapRecord );
+
+    iapRecord->SetRecordId( iCmId );
+    iapRecord->LoadL( iSession );
+
+    CleanupStack::Pop( iapRecord );
+    iIapRecord = iapRecord;
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADIAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadProxySettingL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadProxyRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADPROXYSETTINGL_ENTRY );
+
+    // Load Proxy record.
+    CMDBRecordSet<CCDProxiesRecord>* proxieRS =
+            new( ELeave ) CMDBRecordSet<CCDProxiesRecord>( KCDTIdProxiesRecord );
+    CleanupStack::PushL(proxieRS);
+
+    // Now try to find the linked proxy record.
+    // Create new record.
+    CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+    CleanupStack::PushL( proxyRecord );
+
+    // Prime record.
+    TPtrC serviceType( iIapRecord->iServiceType );
+    proxyRecord->iServiceType.SetL( serviceType );
+    proxieRS->iRecords.AppendL( proxyRecord ); // Ownership transfered.
+
+    CleanupStack::Pop( proxyRecord );
+    proxyRecord = NULL;
+
+    if ( proxieRS->FindL(iSession) )
+        {
+        TInt i( 0 );
+        while ( i < proxieRS->iRecords.Count() )
+            // Now that we have a list of services with the proper service type
+            // search for our proxy record and remove it from the array,
+            // then destroy the array.
+            {
+            CCDProxiesRecord* proxyRecord = (*proxieRS)[i];
+
+            // Compare the record id of these 2 services.
+            if ( TUint32( proxyRecord->iService ) == TUint32( iIapRecord->iService ) )
+                {
+                iProxyRecord = proxyRecord;
+                // Take ownership of this record.
+                proxieRS->iRecords.Remove( i );
+                break;
+                }
+            ++i;
+            }
+        }
+
+    proxieRS->iRecords.ResetAndDestroy();
+
+    if ( !iProxyRecord )
+        {
+        // This creates a proxy record, where usage is disabled.
+        EnableProxyL( EFalse );
+        }
+
+    CleanupStack::PopAndDestroy( proxieRS );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADPROXYSETTINGL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadNetworkSettingL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadNetworkRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADNETWORKSETTINGL_ENTRY );
+
+    CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+    CleanupStack::PushL( networkRecord );
+
+    networkRecord->SetRecordId( iIapRecord->iNetwork );
+    TRAPD( err, networkRecord->LoadL( iSession ) );
+    if ( err == KErrNotFound )
+        {
+        CleanupStack::PopAndDestroy( networkRecord );
+
+        networkRecord = static_cast<CCDNetworkRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+        }
+    else
+        // KErrNotFound -> doesn't matter. We will do it UpdateL()
+        {
+        User::LeaveIfError( err );
+
+        CleanupStack::Pop( networkRecord );
+        }
+
+    iNetworkRecord = networkRecord;
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADNETWORKSETTINGL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadLocationSettingL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadLocationRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADLOCATIONSETTINGL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADLOCATIONSETTINGL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::PrepareToUpdateRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::PrepareToUpdateRecordsL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_PREPARETOUPDATERECORDSL_ENTRY );
+
+    //TODO, Add null checks for mandatory generic record pointers.
+    //
+
+    // Set the record attributes to bearer specific records.
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    for ( TInt i = 0; i < aClientPluginInstance->iBearerSpecRecordArray.Count(); i++ )
+        {
+        CCDRecordBase* record = static_cast<CCDRecordBase*>(
+                aClientPluginInstance->iBearerSpecRecordArray[i] );
+
+        CopyAttributes( iapRecord, record );
+        }
+
+    PreparePluginToUpdateRecordsL(
+            aClientPluginInstance->iGenRecordArray,
+            aClientPluginInstance->iBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_PREPARETOUPDATERECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateIAPRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateIAPRecordL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATEIAPRECORDL_ENTRY );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    if ( iCmId == 0 )
+        {
+        // Otherwise predefined iapid.
+        if ( !iIapRecord->RecordId() )
+            {
+            iIapRecord->SetRecordId( KCDNewRecordRequest );
+            }
+
+        TUint32 id( 0 );
+        id = ServiceRecordId();
+        iIapRecord->iService = id;
+
+        HBufC* name( NULL );
+        ServiceRecordNameLC( name );
+        iIapRecord->iServiceType.SetL( *name );
+        CleanupStack::PopAndDestroy( name );
+
+        BearerRecordIdL( id );
+        iIapRecord->iBearer = id;
+        BearerRecordNameLC( name );
+        iIapRecord->iBearerType.SetL( *name );
+        CleanupStack::PopAndDestroy( name );
+
+        iIapRecord->iNetwork = iNetworkRecord->RecordId();
+
+        iIapRecord->iLocation = GetLocationIdL();
+
+        CopyAttributes( iapRecord, iIapRecord );
+        CheckIfNameModifiedL( iapRecord, iIapRecord );
+
+        iIapRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values 
+        // from template records.
+        iIapRecord->LoadL( iSession );
+
+        iCmId = iIapRecord->RecordId();
+        aClientPluginInstance->iIapId = iCmId;
+
+        CCDIAPRecord* tempIapRecord = static_cast<CCDIAPRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        CleanupStack::PushL( tempIapRecord );
+        CopyRecordFieldsL( *iIapRecord, *tempIapRecord );
+        tempIapRecord->SetElementId( iIapRecord->ElementId() );
+
+        aClientPluginInstance->iGenRecordArray.Remove( KIapRecordIndex );
+        delete iapRecord;
+        iapRecord = NULL;
+
+        aClientPluginInstance->iGenRecordArray.InsertL(
+                static_cast<CommsDat::CCDRecordBase*>( tempIapRecord ),
+                KIapRecordIndex );
+
+        CleanupStack::Pop( tempIapRecord );
+        }
+    else
+        {
+        delete iIapRecord;
+        iIapRecord = NULL;
+        iIapRecord = static_cast<CCDIAPRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        CopyRecordFieldsL( *iapRecord, *iIapRecord );
+
+        iIapRecord->SetElementId( iapRecord->ElementId() );
+        iIapRecord->ModifyL( iSession );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATEIAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateProxyRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateProxyRecordL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATEPROXYRECORDL_ENTRY );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+            aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+
+    if ( !iapRecord || !proxyRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    CopyAttributes( iapRecord, proxyRecord );
+    CheckIfNameModifiedL( iapRecord, proxyRecord );
+
+    delete iProxyRecord;
+    iProxyRecord = NULL;
+    iProxyRecord = static_cast<CCDProxiesRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+    CopyRecordFieldsL( *proxyRecord, *iProxyRecord );
+    iProxyRecord->SetElementId( proxyRecord->ElementId() );
+
+    if ( !iProxyRecord->RecordId() )
+        {
+        // New proxy setting -> create new record.
+        iProxyRecord->iService = iServiceRecord->RecordId();
+        iProxyRecord->iServiceType.SetL( iIapRecord->iServiceType );
+
+        // By default protocol is set to "http".
+        if ( TPtrC( proxyRecord->iProtocolName ).Length() == 0 )
+            {
+            iProxyRecord->iProtocolName.SetL( KDefProxyProtocolName );
+            }
+
+        iProxyRecord->SetRecordId( KCDNewRecordRequest );
+        iProxyRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iProxyRecord->LoadL( iSession );
+
+        proxyRecord->SetElementId( iProxyRecord->ElementId() );
+        }
+    else
+        // Already existing record -> update only.
+        {
+        iProxyRecord->ModifyL( iSession );
+        }
+    CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATEPROXYRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateMetadataRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateMetadataRecordL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATEMETADATARECORDL_ENTRY );
+
+    CCDIAPRecord* clientIapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    CCDIAPMetadataRecord* clientMetadataRecord = static_cast<CCDIAPMetadataRecord*>(
+            aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+
+    // Adjust client side metadata record attributes and name if needed.
+    CopyAttributes( clientIapRecord, clientMetadataRecord );
+    CheckIfNameModifiedL( clientIapRecord, clientMetadataRecord );
+
+    // Make a copy of client's metadata record and save to database.
+    delete iMetaDataRecord;
+    iMetaDataRecord = NULL;
+    iMetaDataRecord = new( ELeave ) CCDIAPMetadataRecord( iMetadataTableId );
+
+    CopyRecordFieldsL( *clientMetadataRecord, *iMetaDataRecord );
+
+    iMetaDataRecord->SetElementId( clientMetadataRecord->ElementId() );
+
+    if ( !iMetaDataRecord->RecordId() )
+        {
+        iMetaDataRecord->iIAP = IAPRecordElementId();
+        iMetaDataRecord->SetRecordId( KCDNewRecordRequest );
+        iMetaDataRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iMetaDataRecord->LoadL( iSession );
+
+        clientMetadataRecord->SetElementId( iMetaDataRecord->ElementId() );
+        }
+    else
+        {
+        iMetaDataRecord->ModifyL( iSession );
+        }
+    CopyRecordFieldsL( *iMetaDataRecord, *clientMetadataRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATEMETADATARECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateServiceRecordL(
+    CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATESERVICERECORDL_ENTRY );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    CCDRecordBase* serviceRecord = static_cast<CCDRecordBase*>(
+            aClientPluginInstance->iGenRecordArray[KServiceRecordIndex] );
+
+    CopyAttributes( iapRecord, serviceRecord );
+
+    UpdateServiceRecordL(
+            aClientPluginInstance->iGenRecordArray,
+            aClientPluginInstance->iBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATESERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateNetworkRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateNetworkRecordL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATENETWORKRECORDL_ENTRY );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>(
+            aClientPluginInstance->iGenRecordArray[KNetworkRecordIndex] );
+
+    CopyAttributes( iapRecord, networkRecord );
+
+    delete iNetworkRecord;
+    iNetworkRecord = NULL;
+
+    CheckIfNameModifiedL( iapRecord, networkRecord );
+
+    iNetworkRecord = static_cast<CCDNetworkRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+    CopyRecordFieldsL( *networkRecord, *iNetworkRecord );
+
+    iNetworkRecord->SetElementId( networkRecord->ElementId() );
+
+    if ( !iNetworkRecord->RecordId() )
+        {
+        iNetworkRecord->SetRecordId( KCDNewRecordRequest );
+        iNetworkRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iNetworkRecord->LoadL( iSession );
+
+        networkRecord->SetElementId( iNetworkRecord->ElementId() );
+        }
+    else
+        {
+        iNetworkRecord->ModifyL( iSession );
+        }
+    CopyRecordFieldsL( *iNetworkRecord, *networkRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATENETWORKRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateLocationRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateLocationRecordL(
+        CCmClientPluginInstance* /*aClientPluginInstance*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATELOCATIONRECORDL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATELOCATIONRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateConnPrefSettingL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateConnPrefSettingL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATECONNPREFSETTINGL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_UPDATECONNPREFSETTINGL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::EnableProxyL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::EnableProxyL( TBool aEnable )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ENABLEPROXYL_ENTRY );
+
+    if ( !iServiceRecord )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    if ( !iProxyRecord )
+        {
+        iProxyRecord = static_cast<CCDProxiesRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+        }
+
+    iProxyRecord->iUseProxyServer = aEnable;
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_ENABLEPROXYL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::EnableLocationL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::EnableLocationL( TBool aEnable )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ENABLELOCATIONL_ENTRY );
+
+    // Not supported anymore
+    iLocationEnabled = aEnable;
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_ENABLELOCATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadWapRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadWapRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADWAPRECORDL_ENTRY );
+
+    iWapIPBearerRecord = FindWAPRecordL();
+    if ( iWapIPBearerRecord )
+        {
+        CCDWAPAccessPointRecord *wapApRecord = static_cast<CCDWAPAccessPointRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+
+        CleanupStack::PushL( wapApRecord );
+
+        wapApRecord->SetRecordId( iWapIPBearerRecord->iWAPAccessPointId );
+        TRAPD( err, wapApRecord->LoadL( iSession ) );
+        if ( err == KErrNotFound )
+            {
+            CleanupStack::PopAndDestroy( wapApRecord );
+
+            wapApRecord = static_cast<CCDWAPAccessPointRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+            }
+        else
+            {
+            User::LeaveIfError( err );
+
+            CleanupStack::Pop( wapApRecord );
+            }
+
+        iWapAPRecord = wapApRecord;
+        }
+    else
+        // No WAP record found -> create a new one
+        {
+        NewWapRecordL();
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADWAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::LoadMetadataRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::LoadMetadataRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADSEAMLESSNESSRECORDL_ENTRY );
+
+    iMetaDataRecord = FindMetadataRecordL();
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADSEAMLESSNESSRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::UpdateWapRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::UpdateWapRecordL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_UPDATEWAPRECORDL_ENTRY );
+
+    delete iWapAPRecord;
+    iWapAPRecord = NULL;
+
+    delete iWapIPBearerRecord;
+    iWapIPBearerRecord = NULL;
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    CCDWAPAccessPointRecord* wapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+            aClientPluginInstance->iGenRecordArray[KWAPAPRecordIndex] );
+
+    CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+            aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+    CopyAttributes( iapRecord, wapAPRecord );
+    CopyAttributes( iapRecord, wapIPBearerRecord );
+
+    CheckIfNameModifiedL( iapRecord, wapAPRecord );
+    CheckIfNameModifiedL( iapRecord, wapIPBearerRecord );
+
+    // WAP AP record
+    iWapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+    CopyRecordFieldsL( *wapAPRecord, *iWapAPRecord );
+    iWapAPRecord->SetElementId( wapAPRecord->ElementId() );
+
+    // WAP IP Bearer record
+    iWapIPBearerRecord =static_cast<CCDWAPIPBearerRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdWAPIPBearerRecord ) );
+    CopyRecordFieldsL( *wapIPBearerRecord, *iWapIPBearerRecord );
+    iWapIPBearerRecord->SetElementId( wapIPBearerRecord->ElementId() );
+
+    if ( !iWapAPRecord->RecordId() )
+        {
+        iWapAPRecord->SetRecordId( KCDNewRecordRequest );
+        iWapAPRecord->StoreL(iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iWapAPRecord->LoadL(iSession );
+
+        wapAPRecord->SetElementId( iWapAPRecord->ElementId() );
+        }
+    else
+        {
+        iWapAPRecord->ModifyL( iSession );
+        }
+    CopyRecordFieldsL( *iWapAPRecord, *wapAPRecord );
+
+    if ( !iWapIPBearerRecord->RecordId() )
+        {
+        iWapIPBearerRecord->iWAPAccessPointId = iWapAPRecord->RecordId();
+        iWapIPBearerRecord->iWAPIAP = iapRecord->RecordId();
+
+        iWapIPBearerRecord->SetRecordId( KCDNewRecordRequest );
+        iWapIPBearerRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iWapIPBearerRecord->LoadL( iSession );
+
+        wapIPBearerRecord->SetElementId( iWapIPBearerRecord->ElementId() );
+        }
+    else
+        {
+        iWapIPBearerRecord->ModifyL( iSession );
+        }
+    CopyRecordFieldsL( *iWapIPBearerRecord, *wapIPBearerRecord );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINBASEENG_UPDATEWAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::NewWapRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::NewWapRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_NEWWAPRECORDL_ENTRY );
+
+    if ( !iWapIPBearerRecord )
+        {
+        iWapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdWAPIPBearerRecord ) );
+        iWapIPBearerRecord->iWAPProxyPort = 0;
+        iWapIPBearerRecord->iWAPWSPOption = ECmWapWspOptionConnectionOriented;
+        iWapIPBearerRecord->iWAPSecurity = EFalse;
+        }
+
+    if ( !iWapAPRecord )
+        {
+        iWapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+        // SMS bearer is not supported by this version.
+        iWapAPRecord->iWAPCurrentBearer.SetL( TPtrC( KCDTypeNameWAPIPBearer ) );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_NEWWAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::NewMetadataRecordL
+// ---------------------------------------------------------------------------
+//
+CCDIAPMetadataRecord* CCmPluginBaseEng::NewMetadataRecordL( TBool aSetDef )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_NEWSEAMLESSNESSRECORDL_ENTRY );
+
+    CCDIAPMetadataRecord* record = new( ELeave ) CCDIAPMetadataRecord( iMetadataTableId );
+
+    if ( aSetDef )
+        {
+        TRAPD( err, record->iSeamlessness = GetBearerInfoIntL( ECmSeamlessnessLevel ) );
+        if ( err )
+            {
+            record->iSeamlessness = ESeamlessnessConfirmFirst;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_NEWSEAMLESSNESSRECORDL_EXIT );
+    return record;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::SetAttribute
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::SetAttribute(
+        CCDRecordBase* aRecord,
+        TUint32 aAttribute,
+        TBool aSet )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETATTRIBUTE_ENTRY );
+
+    if ( aSet )
+        {
+        aRecord->SetAttributes( aAttribute );
+        }
+    else
+        {
+        aRecord->ClearAttributes( aAttribute );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETATTRIBUTE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CopyAttributes
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::CopyAttributes(
+        CCDRecordBase* aSrcRecord,
+        CCDRecordBase* aDstRecord )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYATTRIBUTES_ENTRY );
+
+    if ( !aSrcRecord || !aDstRecord )
+        {
+        OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYATTRIBUTES_EXIT );
+        return;
+        }
+
+    // Clear the target record attributes first.
+    aDstRecord->ClearAttributes( aDstRecord->Attributes() );
+    aDstRecord->SetAttributes( aSrcRecord->Attributes() );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINBASEENG_COPYATTRIBUTES_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::FindWAPRecordL
+// ---------------------------------------------------------------------------
+//
+CCDWAPIPBearerRecord* CCmPluginBaseEng::FindWAPRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_FINDWAPRECORDL_ENTRY );
+
+    CMDBRecordSet<CCDWAPIPBearerRecord>* wapRS =
+            new( ELeave ) CMDBRecordSet<CCDWAPIPBearerRecord>( KCDTIdWAPIPBearerRecord );
+    CleanupStack::PushL( wapRS );
+
+    CCDWAPIPBearerRecord* wapBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdWAPIPBearerRecord ) );
+
+    CleanupStack::PushL( wapBearerRecord );
+
+    wapBearerRecord->iWAPIAP = iCmId;
+    wapRS->iRecords.AppendL( wapBearerRecord );
+
+    CleanupStack::Pop( wapBearerRecord );
+    wapBearerRecord = NULL;
+
+    if ( wapRS->FindL( iSession ) )
+        {
+        wapBearerRecord = static_cast<CCDWAPIPBearerRecord*>( wapRS->iRecords[0] );
+
+        // Take over the ownership of this record.
+        wapRS->iRecords.Remove( 0 );
+        }
+
+    CleanupStack::PopAndDestroy( wapRS );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_FINDWAPRECORDL_EXIT );
+    return wapBearerRecord;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::FindSeamlessnessRecordL
+// ---------------------------------------------------------------------------
+//
+CCDIAPMetadataRecord* CCmPluginBaseEng::FindMetadataRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_FINDSEAMLESSNESSRECORDL_ENTRY );
+
+    CMDBRecordSet<CCDIAPMetadataRecord>* metadataRecordSet =
+            new( ELeave ) CMDBRecordSet<CCDIAPMetadataRecord>( iMetadataTableId );
+    CleanupStack::PushL( metadataRecordSet );
+
+    CCDIAPMetadataRecord* metadataRecord =
+            new( ELeave ) CCDIAPMetadataRecord( iMetadataTableId );
+    CleanupStack::PushL( metadataRecord );
+
+    metadataRecord->iIAP = IAPRecordElementId();
+    metadataRecordSet->iRecords.AppendL( metadataRecord );
+
+    CleanupStack::Pop( metadataRecord );
+    metadataRecord = NULL;
+
+    if ( metadataRecordSet->FindL( iSession ) )
+        {
+        CMDBRecordBase* record = metadataRecordSet->iRecords[0];
+
+        metadataRecord = NewMetadataRecordL( EFalse );
+        metadataRecord->SetRecordId( record->RecordId() );
+
+        // This can leave only in case of OOM.
+        metadataRecord->LoadL( iSession );
+        }
+    else
+        {
+        metadataRecord = NewMetadataRecordL( ETrue );
+        }
+
+    CleanupStack::PopAndDestroy( metadataRecordSet );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_FINDSEAMLESSNESSRECORDL_EXIT );
+    return metadataRecord;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::DoMakeValidNameL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginBaseEng::DoMakeValidNameL(
+        const TDesC& aName,
+        const TUint32& aIapId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_DOMAKEVALIDNAMEL_ENTRY );
+
+    const TInt decimalBase = 10;
+    TBool changed( EFalse );
+    HBufC* temp = HBufC::NewLC( KApMaxConnNameLength );
+    HBufC* temp2 = HBufC::NewLC( KApMaxConnNameLength );
+
+    HBufC* corrname = EnsureMaxLengthLC( aName, changed );
+    *temp = *corrname;
+    TInt postfix( 0 );
+    TInt pf( 0 );
+    TInt i( 0 );
+    TBool valid ( EFalse );
+
+    TPtrC prefix = GetPrefix( *corrname );
+
+    postfix = GetPostfix( *temp, prefix );
+    postfix = -1;
+    do
+        {
+        valid = IsValidNameL( *temp, aIapId );
+        if ( !valid )
+            {
+            changed = ETrue;
+            postfix++;
+            // Check the length of postfix, check text length accordingly.
+            pf = postfix;
+            for ( i = 1; i < decimalBase; i++ )
+                {
+                pf /= decimalBase;
+                if ( !pf )
+                    break;
+                }
+            TPtr sgdptr( temp->Des() );
+            TPtr sgdptr2( temp2->Des() );
+            if ( postfix )
+                {
+                if ( postfix < decimalBase )
+                    {
+                    sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 3 );
+                    }
+                else
+                    {
+                    sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 2 );
+                    }
+                }
+            else
+                {
+                sgdptr2 = prefix.Left( KApMaxConnNameLength );
+                }
+            if ( postfix )
+                {
+                TBuf<KMaxPostfixLength> postfixString;
+                if ( postfix >= decimalBase )
+                    {
+                    postfixString.Format( KFormatLargePostfix, postfix );
+//     TODO:               AknTextUtils::LanguageSpecificNumberConversion( postfixString );
+                    }
+                else
+                    {
+                    postfixString.Format( KFormatPostfix, postfix );
+//     TODO:               AknTextUtils::LanguageSpecificNumberConversion( postfixString );
+                    }
+                sgdptr.Format( KFormatNameWithPostfix, &sgdptr2, &postfixString );
+                }
+            else
+                {
+                sgdptr.Format( KFormatNoPostfix, &sgdptr2 );
+                }
+            }
+        } while ( !valid );
+
+    CleanupStack::PopAndDestroy( corrname );
+    CleanupStack::PopAndDestroy( temp2 );
+
+    if ( changed )
+        {
+        CleanupStack::Pop( temp );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( temp );
+        temp = NULL;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_DOMAKEVALIDNAMEL_EXIT );
+    return temp;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::EnsureMaxLengthLC
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginBaseEng::EnsureMaxLengthLC(
+        const TDesC& aName,
+        TBool& aChanged )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ENSUREMAXLENGTHLC_ENTRY );
+
+    TInt length = aName.Length();
+
+    aChanged = EFalse;
+
+    if ( !length )
+        {
+        // Name is required.
+        User::Leave( KErrArgument );
+        }
+
+    HBufC* corrname;
+    if ( KApMaxConnNameLength < length )
+        {
+        // Name too long, truncate.
+        corrname = aName.Left( KApMaxConnNameLength ).AllocLC();
+        aChanged = ETrue;
+        }
+    else
+        {
+        corrname = aName.AllocLC();
+        corrname->Des().Trim();
+        if ( corrname->Length() == 0 )
+            {
+            User::Leave( KErrArgument );
+            }
+        // Comes here only if name is valid.
+        if ( corrname->Length() != aName.Length() )
+            {
+            aChanged = ETrue;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_ENSUREMAXLENGTHLC_EXIT );
+    return corrname;
+    }
+
+// ---------------------------------------------------------------------------
+// Given aName in the format <prefix> or <prefix><brace><integer><brace>,
+// return a pointer to the leading part.
+// That is, if there is trailing <space><integer>,
+// then that is excluded; if there is no trailing part, then the original
+// decriptor is returned.
+// Examples:
+//   - "Foo" returns "Foo";
+//   - "Foo 12" returns "Foo 12";
+//   - "Foo(12)" returns "Foo";
+//   - "Foo 12 (34)" returns "Foo 12 ";
+//   - "Foo bar" returns "Foo bar";
+//   - "Foo " returns "Foo ".
+// ---------------------------------------------------------------------------
+TPtrC CCmPluginBaseEng::GetPrefix( const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETPREFIX_ENTRY );
+
+    TPtrC prefix = aName;
+    TInt lastBrace = aName.LocateReverse('(');
+    if ( lastBrace != KErrNotFound )
+        {
+        // aName looks like "<prefix><brace><something>".
+        // See if <something> is an integer number.
+        TPtrC num = aName.Right( aName.Length() - lastBrace - 1 );
+        TInt val;
+        TLex lex( num );
+        if ( lex.Val( val ) == KErrNone )
+            {
+            // Yes, the trailer is an integer.
+            prefix.Set( aName.Left( lastBrace ) );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETPREFIX_EXIT );
+    return prefix;
+    }
+
+
+// ---------------------------------------------------------------------------
+// If aName is constructed from aPrefix with a postfix, get the numeric
+// value of the postfix, e.g:
+//   - GetPostfix( "Foo (3)", "Foo" ) == 3
+//   - GetPostfix( "Foo 23 (45)", "Foo 23" ) == 45
+// If aName is the same as aPrefix, return 0, e.g.:
+//   - GetPostfix( "Foo", "Foo" ) == 0
+// If aName is not constructed from aPrefix, return -1, e.g.:
+//   - GetPostfix( "Foobar", "Foo" ) == -1
+//   - GetPostfix( "Fo 23 45", "Foo" ) == -1
+// ---------------------------------------------------------------------------
+TInt CCmPluginBaseEng::GetPostfix( const TDesC& aName, const TDesC& aPrefix )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETPOSTFIX_ENTRY );
+
+    TInt postfix( KErrNotFound );
+    TInt nameLength = aName.Length();
+    TInt prefixLength = aPrefix.Length();
+    if ( nameLength >= prefixLength && aName.FindF( aPrefix ) == 0 )
+        {
+        // aName is longer or equal length, and
+        // aPrefix can be found in the beginning of aName.
+        if ( nameLength == prefixLength )
+            {
+            // They have the same length; they equal.
+            postfix = 0;
+            }
+        else
+            {
+            if ( prefixLength > 0 )
+                {
+                if ( aName[ prefixLength ] == '(' )
+                    {
+                    // (Now we know that aName is longer than aPrefix.)
+                    // aName looks like "aPrefix<brace><something>".
+                    // See if <something> is an integer number.
+                    TPtrC num = aName.Right( nameLength - prefixLength - 1 );
+                        TBuf< KApMaxConnNameLength > pf;
+                    pf = num;
+// TODO                    AknTextUtils::ConvertDigitsTo( pf, EDigitTypeWestern );
+                    TInt val;
+                    TLex lex( pf );
+                    if ( lex.Val( val ) == KErrNone )
+                        {
+                        // Yes, the trailer is an integer.
+                        if ( val > 0 )
+                            {
+                            postfix = val;
+                            }
+                        else
+                            {
+                            // signal that it is invalid...
+                            postfix = -1;
+                            }
+                        }
+                    }
+                }
+            else
+                {
+                postfix = -1;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETPOSTFIX_EXIT );
+    return postfix;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::IsValidNameL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginBaseEng::IsValidNameL(
+        const TDesC& aNameText,
+        const TUint32& aIapId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ISVALIDNAMEL_ENTRY );
+
+    TBool retVal( ETrue );
+
+    CMDBRecordSet<CCDIAPRecord>* iapRS =
+            new( ELeave ) CMDBRecordSet<CCDIAPRecord>(KCDTIdIAPRecord);
+    CleanupStack::PushL(iapRS);
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+    CleanupStack::PushL( iapRecord );
+
+    // Prime record.
+    iapRecord->iRecordName.SetL( aNameText );
+    iapRS->iRecords.AppendL( iapRecord );
+    CleanupStack::Pop( iapRecord );
+    iapRecord = NULL;
+
+    if ( iapRS->FindL( iSession ) )
+        {
+        if ( iCmId )
+            {
+            // This is not a new CM.
+            for ( TInt i = 0; i < iapRS->iRecords.Count(); ++i )
+                {
+                if ( iapRS->iRecords[i]->RecordId() != aIapId )
+                    {
+                    // Duplication because it's not our name.
+                    retVal = EFalse;
+                    break;
+                    }
+                }
+            }
+        else
+            {
+            // New CM -> any occurence is a duplication.
+            retVal = EFalse;
+            }
+        }
+
+    CleanupStack::PopAndDestroy( iapRS );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_ISVALIDNAMEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::EscapeTextLC
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginBaseEng::EscapeTextLC( const TDesC& aLiteral )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ESCAPETEXTLC_ENTRY );
+
+    TInt l( aLiteral.Length() );
+    //> 2*, to ensure correct esc. even if ALL chars are quotes...
+    HBufC* retbuf = HBufC::NewLC( 2*l );
+    TPtr ret = retbuf->Des();
+    TUint quote( '\'' );  // TChar gives warnings in THUMB & ARMI
+    TInt i( 0 );
+
+    for ( i = 0; i < l; i++ )
+        {
+        ret.Append( aLiteral[i] );
+        if ( aLiteral[i] == quote )
+            {
+            // Duplicate quote.
+            ret.Append( quote );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_ESCAPETEXTLC_EXIT );
+    return retbuf;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::SetDefaultNameL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::SetDefaultNameL( const TDesC& aName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETDEFAULTNAMEL_ENTRY );
+
+    if ( iNamingMethod == ENamingNothing )
+        {
+        iIapRecord->iRecordName.SetL( aName );
+        }
+    else if ( iNamingMethod == ENamingUnique )
+        {
+        HBufC* newName = DoMakeValidNameL( aName, iCmId );
+
+        if ( newName )
+            // Name converted to unique.
+            {
+            CleanupStack::PushL( newName );
+            iIapRecord->iRecordName.SetL( *newName );
+            CleanupStack::PopAndDestroy( newName );
+            }
+        else
+            {
+            iIapRecord->iRecordName.SetL( aName );
+            }
+        }
+    else if ( iNamingMethod == ENamingNotAccept )
+        {
+        if ( IsValidNameL( aName, iCmId ) )
+            {
+            iIapRecord->iRecordName.SetL( aName );
+            }
+        else
+            {
+            User::Leave( KErrArgument );
+            }
+        }
+    else
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETDEFAULTNAMEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::SetNameL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginBaseEng::SetNameL(
+        const TDesC& aName,
+        CommsDat::CCDRecordBase* aIapRecord,
+        const CMManager::TNamingMethod aNamingMethod )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETNAMEL_ENTRY );
+
+    if ( aNamingMethod == ENamingNothing )
+        {
+        aIapRecord->iRecordName.SetL( aName );
+        }
+    else if ( aNamingMethod == ENamingUnique )
+        {
+        TUint32 iapid = aIapRecord->RecordId();
+        HBufC* newName = DoMakeValidNameL( aName, iapid );
+
+        if ( newName )
+            // Name converted to unique.
+            {
+            CleanupStack::PushL( newName );
+            aIapRecord->iRecordName.SetL( *newName );
+            CleanupStack::PopAndDestroy( newName );
+            }
+        else
+            {
+            aIapRecord->iRecordName.SetL( aName );
+            }
+        }
+    else if ( aNamingMethod == ENamingNotAccept )
+        {
+        if ( IsValidNameL( aName, aIapRecord->RecordId() ) )
+            {
+            aIapRecord->iRecordName.SetL( aName );
+            }
+        else
+            {
+            User::Leave( KErrArgument );
+            }
+        }
+    else
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETNAMEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CheckIfNameModifiedL
+// ---------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::CheckIfNameModifiedL(
+        CCDRecordBase* aSrcRecord,
+        CCDRecordBase* aDestRecord ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_ENTRY );
+
+    if ( !aSrcRecord || !aDestRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    if ( !TPtrC( aSrcRecord->iRecordName ).CompareF( TPtrC( aDestRecord->iRecordName ) ) )
+        {
+        // Names match.
+        OstTraceFunctionExit0( CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_EXIT );
+        return;
+        }
+
+    aDestRecord->iRecordName.SetL( TPtrC( aSrcRecord->iRecordName ) );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::IAPRecordElementId
+// ---------------------------------------------------------------------------
+TMDBElementId CCmPluginBaseEng::IAPRecordElementId() const
+    {
+    return ( KCDMaskShowField & iIapRecord->ElementId() );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::IsProtected
+// ---------------------------------------------------------------------------
+TBool CCmPluginBaseEng::IsProtected() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_ISPROTECTED_ENTRY );
+
+    return ( iIapRecord->Attributes() & ECDProtectedWrite );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::GetLocationIdL
+// ---------------------------------------------------------------------------
+TUint32 CCmPluginBaseEng::GetLocationIdL() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETLOCATIONIDL_ENTRY );
+
+    TUint32 locId( 0 );
+    CMDBRecordSet<CCDLocationRecord>* locRS =
+            new( ELeave ) CMDBRecordSet<CCDLocationRecord>( KCDTIdLocationRecord );
+    CleanupStack::PushL( locRS );
+
+    CCDLocationRecord* locRecord = static_cast<CCDLocationRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLocationRecord ) );
+    CleanupStack::PushL( locRecord );
+
+    locRecord->iRecordName.SetL( KLocationName );
+    locRS->iRecords.AppendL( locRecord );
+    CleanupStack::Pop( locRecord );
+
+    if ( locRS->FindL(iSession) )
+        {
+        locRecord = static_cast<CCDLocationRecord*>( locRS->iRecords[0] );
+        locId = locRecord->RecordId();
+        }
+    else
+        {
+        User::Leave( KErrNotFound ); //TODO, what to do if not found. Can we create it? need study.
+        }
+
+    CleanupStack::PopAndDestroy( locRS );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETLOCATIONIDL_EXIT );
+    return locId;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::SetProxyServerNameL
+// ---------------------------------------------------------------------------
+ void CCmPluginBaseEng::SetProxyServerNameL(
+         const TDesC& aProxyServer,
+         CCDRecordBase* aProxyRecord )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETPROXYSERVERNAMEL_ENTRY );
+
+    CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>( aProxyRecord );
+
+    proxyRecord->iServerName.SetL( aProxyServer );
+    if ( !aProxyServer.Length() )
+        {
+        proxyRecord->iUseProxyServer = EFalse;
+        }
+    else
+        {
+        proxyRecord->iUseProxyServer = ETrue;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETPROXYSERVERNAMEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::CheckDNSServerAddressL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CCmPluginBaseEng::CheckDNSServerAddressL(
+        TBool aIPv6,
+        CMDBField<TDesC>& aDNS1,
+        CMDBField<TDesC>& aDNS2,
+        CMDBField<TBool>& aDNSFromServer )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_CHECKDNSSERVERADDRESSL_ENTRY );
+
+    if ( !aDNSFromServer )
+        {
+        if ( aIPv6 )
+            {
+            if ( ClassifyIPv6Address( aDNS1 ) == EIPv6Unspecified )
+                {
+                if ( ClassifyIPv6Address( aDNS2 ) != EIPv6Unspecified )
+                    {
+                    aDNS1.SetL( aDNS2 );
+                    aDNS2.SetL( KDynamicIpv6Address );
+                    }
+                else
+                    {
+                    // Both are unspecified.
+                    aDNSFromServer = ETrue;
+                    }
+                }
+            }
+        else // IPv4
+            {
+            if ( IsUnspecifiedIPv4Address( aDNS1 ) )
+                {
+                if ( !IsUnspecifiedIPv4Address( aDNS2 ) )
+                    {
+                    aDNS1.SetL( aDNS2 );
+                    aDNS2.SetL( KUnspecifiedIPv4 );
+                    }
+                else
+                    {
+                    // Both are unspecified.
+                    aDNSFromServer = ETrue;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINBASEENG_CHECKDNSSERVERADDRESSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetGenericCmRecordsL
+// -----------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::GetPluginDataL(
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETPLUGINDATAL_ENTRY );
+
+    if ( !aClientPluginInstance )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    aClientPluginInstance->iGenRecordArray.ResetAndDestroy();
+    aClientPluginInstance->iBearerSpecRecordArray.ResetAndDestroy();
+
+    aClientPluginInstance->iNamingMethod = iNamingMethod;
+    aClientPluginInstance->iLocationEnabled = iLocationEnabled;
+
+    if ( iIapRecord )
+        {
+        CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        CleanupStack::PushL( iapRecord );
+        CopyRecordFieldsL( *iIapRecord, *iapRecord );
+        iapRecord->SetElementId( iIapRecord->ElementId() );
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( iapRecord ) );
+        CleanupStack::Pop( iapRecord );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    if ( iServiceRecord )
+        {
+        CCDRecordBase* serviceRecord = CopyServiceRecordL();
+        serviceRecord->SetElementId( iServiceRecord->ElementId() );
+        CleanupStack::PushL( serviceRecord );
+        aClientPluginInstance->iGenRecordArray.AppendL( serviceRecord );
+        CleanupStack::Pop( serviceRecord );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    if ( iNetworkRecord )
+        {
+        CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+        CleanupStack::PushL( networkRecord );
+        CopyRecordFieldsL( *iNetworkRecord, *networkRecord );
+        networkRecord->SetElementId( iNetworkRecord->ElementId() );
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( networkRecord ) );
+        CleanupStack::Pop( networkRecord );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    if ( iWapAPRecord )
+        {
+        CCDWAPAccessPointRecord* wapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdWAPAccessPointRecord ) );
+        CleanupStack::PushL( wapAPRecord );
+        CopyRecordFieldsL( *iWapAPRecord, *wapAPRecord );
+        wapAPRecord->SetElementId( iWapAPRecord->ElementId() );
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( wapAPRecord ) );
+        CleanupStack::Pop( wapAPRecord );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    if ( iWapIPBearerRecord )
+        {
+        CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdWAPIPBearerRecord ) );
+        CleanupStack::PushL( wapIPBearerRecord );
+        CopyRecordFieldsL( *iWapIPBearerRecord, *wapIPBearerRecord );
+        wapIPBearerRecord->SetElementId( iWapIPBearerRecord->ElementId() );
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( wapIPBearerRecord ) );
+        CleanupStack::Pop( wapIPBearerRecord );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    if ( iMetaDataRecord )
+        {
+        CCDIAPMetadataRecord* metadataRecord =
+                new( ELeave ) CCDIAPMetadataRecord( iMetadataTableId );
+        CleanupStack::PushL( metadataRecord );
+        CopyRecordFieldsL( *iMetaDataRecord, *metadataRecord );
+        metadataRecord->SetElementId( iMetaDataRecord->ElementId() );
+        // Record name is set/changed during update.
+
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( metadataRecord ) );
+        CleanupStack::Pop( metadataRecord );
+        }
+    else
+        {
+        aClientPluginInstance->iGenRecordArray.AppendL( NULL );
+        }
+
+    // Location record does not need to be loaded
+    aClientPluginInstance->iGenRecordArray.AppendL( NULL );
+
+    if ( iProxyRecord )
+        {
+        CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+        CleanupStack::PushL( proxyRecord );
+        CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
+        proxyRecord->SetElementId( iProxyRecord->ElementId() );
+        aClientPluginInstance->iGenRecordArray.AppendL(
+                static_cast<CommsDat::CCDRecordBase*>( proxyRecord ) );
+        CleanupStack::Pop( proxyRecord );
+        }
+    else
+        {
+        aClientPluginInstance->iGenRecordArray.AppendL( NULL );
+        }
+
+    GetBearerSpecificRecordsL( aClientPluginInstance->iBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETPLUGINDATAL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetIntAttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C TUint32 CCmPluginBaseEng::GetIntAttributeL(
+        TUint32 aAttribute,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    switch ( aAttribute )
+        {
+        case ECmIapId: // If the CM has an ECmIapId then the ECmIapId is the ECmId.
+        case ECmId:
+            {
+            if ( iBearerType == KUidEmbeddedDestination )
+                {
+                retVal = GetBearerIntAttributeL(
+                        aAttribute,
+                        aClientPluginInstance->iGenRecordArray,
+                        aClientPluginInstance->iBearerSpecRecordArray );
+                }
+            else
+                {
+                retVal = static_cast<CCDIAPRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KIapRecordIndex] )->RecordId();
+                }
+            }
+            break;
+        case ECmWapId:
+            {
+            retVal = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )
+                    ->iWAPAccessPointId;
+            }
+            break;
+        case ECmIapServiceId:
+            {
+            retVal = static_cast<CCDIAPRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] )->iService;
+            }
+            break;
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
+            }
+            break;
+        case ECmNamingMethod:
+            {
+            retVal = iNamingMethod;
+            }
+            break;
+        case ECmSeamlessnessLevel:
+            {
+            if ( iMetaDataRecord )
+                {
+                retVal = static_cast<CCDIAPMetadataRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] )
+                        ->iSeamlessness;
+                }
+            else
+                {
+                User::Leave( KErrNotFound );
+                }
+            }
+            break;
+        case ECmElementID:
+            {
+            if ( !iIapRecord )
+                {
+                User::Leave( KErrNotReady );
+                }
+
+            retVal = ( KCDMaskShowField & ( static_cast<CCDIAPRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] )->ElementId() ) );
+            }
+            break;
+
+        case ECmLoadResult:
+            {
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported ); //TODO, update attribute definition comments.
+            }
+            break;
+
+        case ECmNetworkId:
+            {
+            retVal = static_cast<CCDIAPRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] )->iNetwork;
+            }
+            break;
+        case ECmProxyPortNumber:
+            {
+            if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                {
+                User::Leave( KErrNotFound );
+                }
+
+            retVal = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->iPortNumber;
+            }
+            break;
+        case ECmWapIPWSPOption:
+            {
+            retVal = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )->iWAPWSPOption;
+            }
+            break;
+        case ECmWapIPProxyPort:
+            {
+            retVal = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )->iWAPProxyPort;
+            }
+            break;
+        default:
+            {
+            retVal = GetBearerIntAttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetBoolAttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C TBool CCmPluginBaseEng::GetBoolAttributeL(
+        TUint32 aAttribute,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    switch ( aAttribute )
+        {
+        case ECmProtected:
+            {
+            if ( iBearerType == KUidEmbeddedDestination )
+                {
+                retVal = GetBearerBoolAttributeL(
+                        aAttribute,
+                        aClientPluginInstance->iGenRecordArray,
+                        aClientPluginInstance->iBearerSpecRecordArray );
+                }
+            else
+                {
+                CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+                retVal = iapRecord->Attributes() & ECDProtectedWrite;
+                }
+            }
+            break;
+        case ECmHidden:
+            {
+            if ( iBearerType == KUidEmbeddedDestination )
+                {
+                retVal = GetBearerBoolAttributeL(
+                        aAttribute,
+                        aClientPluginInstance->iGenRecordArray,
+                        aClientPluginInstance->iBearerSpecRecordArray );
+                }
+            else
+                {
+                CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+                retVal = iapRecord->Attributes() & ECDHidden;
+                }
+            }
+            break;
+        case ECmProxyUsageEnabled:
+            {
+            if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                {
+                retVal = EFalse;
+                }
+            else
+                {
+                retVal = static_cast<CCDProxiesRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                        ->iUseProxyServer;
+                }
+            }
+            break;
+        case ECmDestination:
+            {
+            TRAPD( err, retVal = GetBearerBoolAttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray ) );
+            if ( err )
+                {
+                retVal = EFalse;
+                }
+            }
+            break;
+        case ECmChargeCardUsageEnabled:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmLocationUsageEnabled:
+            {
+            retVal = iLocationEnabled;
+            }
+            break;
+        case ECmCoverage:
+            // By default the plugin has no network coverage.
+            {
+            TRAPD( err, retVal = GetBearerBoolAttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray ) );
+            if ( err )
+                {
+                if ( err == KErrNotFound )
+                    {
+                    retVal = EFalse;
+                    }
+                else
+                    {
+                    User::Leave( err );
+                    }
+                }
+            }
+            break;
+        case ECmMetaHighlight:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            retVal = metadataRecord->iMetadata & EMetaHighlight;
+            }
+            break;
+        case ECmMetaHiddenAgent:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            retVal = metadataRecord->iMetadata & EMetaHiddenAgent;
+            }
+            break;
+        case ECmMetaHotSpot:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            retVal = metadataRecord->iMetadata & EMetaHotSpot;
+            }
+            break;
+        case ECmVirtual:
+            {
+            // This is bearer specific attribute.
+            TRAPD( err, retVal = GetBearerInfoBoolL( aAttribute ) );
+            if ( err )
+                {
+                retVal = EFalse;
+                }
+            }
+            break;
+        case ECmWapIPSecurity:
+            {
+            retVal = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )->iWAPSecurity;
+            }
+            break;
+        default:
+            {
+            retVal = GetBearerBoolAttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetStringAttributeL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* CCmPluginBaseEng::GetStringAttributeL(
+        TUint32 aAttribute,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !aClientPluginInstance )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    HBufC* retVal = NULL;
+
+    switch ( aAttribute )
+        {
+        case ECmBearerIcon:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+
+            if ( !metadataRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( metadataRecord->iIconFileName ).AllocL();
+            }
+            break;
+        case ECmStartPage:
+            {
+            CCDWAPAccessPointRecord* wapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPAPRecordIndex] );
+
+            if ( !wapAPRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( wapAPRecord->iWAPStartPage ).AllocL();
+            }
+            break;
+        case ECmName:
+            {
+            CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+            if ( !iapRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( iapRecord->iRecordName ).AllocL();
+            }
+            break;
+        case ECmProxyServerName:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+
+            if ( !proxyRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( proxyRecord->iServerName ).AllocL();
+            }
+            break;
+        case ECmProxyProtocolName:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+
+            if ( !proxyRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( proxyRecord->iExceptions ).AllocL();
+            }
+            break;
+        case ECmProxyExceptions:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+
+            if ( !proxyRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( proxyRecord->iProtocolName ).AllocL();
+            }
+            break;
+        case ECmWapIPGatewayAddress:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( wapIPBearerRecord->iWAPGatewayAddress ).AllocL();
+            }
+            break;
+        case ECmWapIPProxyLoginName:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( wapIPBearerRecord->iWAPProxyLoginName ).AllocL();
+            }
+            break;
+        case ECmWapIPProxyLoginPass:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( wapIPBearerRecord->iWAPProxyLoginPass ).AllocL();
+            }
+            break;
+        default:
+            {
+            retVal = GetBearerStringAttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetString8AttributeL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CCmPluginBaseEng::GetString8AttributeL(
+        TUint32 aAttribute,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_ENTRY );
+
+    HBufC8* retVal = NULL;
+
+    switch ( aAttribute )
+        {
+        default:
+            {
+            retVal = GetBearerString8AttributeL(
+                    aAttribute,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::GetIntAttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::SetIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETINTATTRIBUTEL_ENTRY );
+
+    switch ( aAttribute )
+        {
+        case ECmNamingMethod:
+            {
+            aClientPluginInstance->iNamingMethod = ( TNamingMethod )aValue;
+            }
+            break;
+
+        case ECmCommsDBBearerType:
+        case ECmElementID:
+        case ECmIapId:
+        case ECmId:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+
+        case ECmSeamlessnessLevel:
+            {
+            if ( aValue == ESeamlessnessConfirmFirst || aValue == ESeamlessnessShowprogress )
+                {
+                static_cast<CCDIAPMetadataRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] )->
+                        iSeamlessness.SetL( aValue );
+                }
+            else
+                {
+                User::Leave( KErrNotSupported );
+                }
+            }
+            break;
+
+        case ECmNetworkId:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        case ECmProxyPortNumber:
+            {
+            if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                {
+                CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+                CleanupStack::PushL( proxyRecord );
+                CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
+                proxyRecord->SetElementId( iProxyRecord->ElementId() );
+                aClientPluginInstance->iGenRecordArray.InsertL(
+                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ),
+                        KProxyRecordIndex );
+                CleanupStack::Pop( proxyRecord );
+                }
+
+            static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->
+                    iPortNumber = aValue;
+            }
+            break;
+        case ECmWapIPWSPOption:
+            {
+            if ( aValue > KMaxTUint8 )
+                {
+                User::Leave( KErrArgument );
+                }
+            else
+                {
+                static_cast<CCDWAPIPBearerRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )->
+                        iWAPWSPOption.SetL( aValue );
+                }
+            }
+            break;
+        case ECmWapIPProxyPort:
+            {
+            static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )->
+                    iWAPProxyPort.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            SetBearerIntAttributeL(
+                    aAttribute,
+                    aValue,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETINTATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::SetBoolAttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::SetBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETBOOLATTRIBUTEL_ENTRY );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmProtected:
+            {
+            /**
+             * ECDProtectedWrite attribute is set in
+             * - iap record
+             * - network record
+             * - iapmetadata record
+             * - wap records
+             * - proxy record
+             * And depending the bearer
+             * - service record
+             * - bearer record
+             * - other bearer specific records
+             */
+            SetAttribute( iapRecord, ECDProtectedWrite, aValue );
+            }
+            break;
+        case ECmHidden:
+            {
+            /**
+             * ECDHidden attribute is set in
+             * - iap record
+             * - network record
+             * - iapmetadata record
+             * - wap records
+             * - proxy record
+             * And depending the bearer
+             * - service record
+             * - bearer record
+             * - other bearer specific records
+             */
+            SetAttribute( iapRecord, ECDHidden, aValue );
+            }
+            break;
+        case ECmProxyUsageEnabled:
+            {
+            if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                {
+                CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+                CleanupStack::PushL( proxyRecord );
+                CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
+                proxyRecord->SetElementId( iProxyRecord->ElementId() );
+                aClientPluginInstance->iGenRecordArray.InsertL(
+                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ),
+                        KProxyRecordIndex );
+                CleanupStack::Pop( proxyRecord );
+                }
+
+            static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->iUseProxyServer =
+                            aValue;
+            }
+            break;
+        case ECmChargeCardUsageEnabled:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        case ECmLocationUsageEnabled:
+            {
+            EnableLocationL( aValue );
+            }
+            break;
+        case ECmMetaHighlight:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            if ( aValue )
+                {
+                metadataRecord->iMetadata = EMetaHighlight | metadataRecord->iMetadata;
+                }
+            else
+                {
+                metadataRecord->iMetadata = ~EMetaHighlight & metadataRecord->iMetadata;
+                }
+            }
+            break;
+        case ECmMetaHiddenAgent:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            if ( aValue )
+                {
+                metadataRecord->iMetadata = EMetaHiddenAgent | metadataRecord->iMetadata;
+                }
+            else
+                {
+                metadataRecord->iMetadata = ~EMetaHiddenAgent & metadataRecord->iMetadata;
+                }
+            }
+            break;
+        case ECmMetaHotSpot:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+            if ( aValue )
+                {
+                metadataRecord->iMetadata = EMetaHotSpot | metadataRecord->iMetadata;
+                }
+            else
+                {
+                metadataRecord->iMetadata = ~EMetaHotSpot & metadataRecord->iMetadata;
+                }
+            }
+            break;
+        case ECmWapIPSecurity:
+            {
+            static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )
+                    ->iWAPSecurity.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            SetBearerBoolAttributeL(
+                    aAttribute,
+                    aValue,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETBOOLATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::SetStringAttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::SetStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETSTRINGATTRIBUTEL_ENTRY );
+
+    switch ( aAttribute )
+        {
+        case ECmBearerIcon:
+            {
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+
+            if ( !metadataRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            metadataRecord->iIconFileName.SetL( aValue );
+            }
+            break;
+        case ECmStartPage:
+            {
+            CCDWAPAccessPointRecord* wapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPAPRecordIndex] );
+
+            if ( !wapAPRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            wapAPRecord->iWAPStartPage.SetL( aValue );
+            }
+            break;
+        case ECmName:
+            {
+            CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
+
+            if ( !iapRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            SetNameL( aValue, iapRecord, aClientPluginInstance->iNamingMethod );
+            }
+            break;
+        case ECmProxyServerName:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+            if ( !proxyRecord )
+                {
+                proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+
+                // Map proxy record to this iap.
+                proxyRecord->iService = static_cast<CCDProxiesRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->RecordId();
+
+                aClientPluginInstance->iGenRecordArray.Insert( proxyRecord, KProxyRecordIndex );
+                }
+
+            SetProxyServerNameL( aValue, proxyRecord );
+            }
+            break;
+        case ECmProxyProtocolName:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+            if ( !proxyRecord )
+                {
+                proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+
+                // Map proxy record to this iap.
+                proxyRecord->iService = static_cast<CCDProxiesRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->RecordId();
+
+                aClientPluginInstance->iGenRecordArray.Insert( proxyRecord, KProxyRecordIndex );
+                }
+
+            proxyRecord->iProtocolName.SetL( aValue );
+            }
+            break;
+        case ECmProxyExceptions:
+            {
+            CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] );
+            if ( !proxyRecord )
+                {
+                proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+
+                // Map proxy record to this iap.
+                proxyRecord->iService = static_cast<CCDProxiesRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->RecordId();
+
+                aClientPluginInstance->iGenRecordArray.Insert( proxyRecord, KProxyRecordIndex );
+                }
+
+            proxyRecord->iExceptions.SetL( aValue );
+            }
+            break;
+        case ECmWapIPGatewayAddress:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            wapIPBearerRecord->iWAPGatewayAddress.SetL( aValue );
+            }
+            break;
+        case ECmWapIPProxyLoginName:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            wapIPBearerRecord->iWAPProxyLoginName.SetL( aValue );
+            }
+            break;
+        case ECmWapIPProxyLoginPass:
+            {
+            CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] );
+
+            if ( !wapIPBearerRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            wapIPBearerRecord->iWAPProxyLoginPass.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            SetBearerStringAttributeL(
+                    aAttribute,
+                    aValue,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETSTRINGATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmPluginBaseEng::SetString8AttributeL
+// -----------------------------------------------------------------------------
+EXPORT_C void CCmPluginBaseEng::SetString8AttributeL(
+        TUint32 aAttribute,
+        const TDesC8& aValue,
+        CCmClientPluginInstance* aClientPluginInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINBASEENG_SETSTRING8ATTRIBUTEL_ENTRY );
+
+    switch ( aAttribute )
+        {
+        default:
+            {
+            SetBearerString8AttributeL(
+                    aAttribute,
+                    aValue,
+                    aClientPluginInstance->iGenRecordArray,
+                    aClientPluginInstance->iBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINBASEENG_SETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::IsUnspecifiedIPv4Address
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginBaseEng::IsUnspecifiedIPv4Address( const TDesC& aIpv4Address )
+    {
+    OstTraceFunctionEntry0( _ISUNSPECIFIEDIPV4ADDRESS_ENTRY );
+
+    if ( aIpv4Address.Length() == 0 || !aIpv4Address.CompareF( KUnspecifiedIPv4 ) )
+        {
+        OstTraceFunctionExit0( _ISUNSPECIFIEDIPV4ADDRESS_EXIT );
+        return ETrue;
+        }
+
+    OstTraceFunctionExit0( DUP1__ISUNSPECIFIEDIPV4ADDRESS_EXIT );
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginBaseEng::ClassifyIPv6Address
+// ---------------------------------------------------------------------------
+//
+TIPv6Types CCmPluginBaseEng::ClassifyIPv6Address( const TDesC& aIpv6Address )
+    {
+    OstTraceFunctionEntry0( _CLASSIFYIPV6ADDRESS_ENTRY );
+
+    if ( aIpv6Address.Length() == 0 || !aIpv6Address.CompareF( KDynamicIpv6Address ) )
+        {
+        OstTraceFunctionExit0( _CLASSIFYIPV6ADDRESS_EXIT );
+
+        return EIPv6Unspecified;
+        }
+    else if ( !aIpv6Address.CompareF( KKnownIp6NameServer1 ) ||
+            !aIpv6Address.CompareF( KKnownIp6NameServer2 ) )
+        {
+        OstTraceFunctionExit0( DUP1__CLASSIFYIPV6ADDRESS_EXIT );
+
+        return EIPv6WellKnown;
+        }
+
+    OstTraceFunctionExit0( DUP2__CLASSIFYIPV6ADDRESS_EXIT );
+    return EIPv6UserDefined;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseengtextresolver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Provides functionality for text resolving
+*
+*/
+
+#include <hb/hbcore/hbtextresolversymbian.h>
+#include "ccmpluginbaseengtextresolver.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ccmpluginbaseengtextresolverTraces.h"
+#endif
+
+
+HBufC* CCmPluginBaseEngTextResolver::ResolveTextL( const TDesC& aTextId )
+    {
+    _LIT(KCMManagerTranslationFile, "cmmanager_");
+    _LIT(KTranslationPath, "\\resource\\qt\\translations");
+
+    TBool result = HbTextResolverSymbian::Init(
+            KCMManagerTranslationFile,
+            KTranslationPath );
+    if ( result )
+        {
+        OstTrace0( TRACE_ERROR, CCMPLUGINBASEENGTEXTRESOLVER_RESOLVETEXTL, "CCmPluginBaseEngTextResolver::ResolveTextL" );
+        }
+
+    return HbTextResolverSymbian::LoadL( aTextId );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmpluginbase/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,397 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDCOMMONCONVERSIONTABLEL_ENTRY=0x99
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDCOMMONCONVERSIONTABLEL_EXIT=0x9a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDCONVERSTIONTABLEL_ENTRY=0x97
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDCONVERSTIONTABLEL_EXIT=0x98
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDRESOURCEFILEL_ENTRY=0x41
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ADDRESOURCEFILEL_EXIT=0x42
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ALLDESTINATIONSL=0x184
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ALLOCREADL_ENTRY=0x45
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ALLOCREADL_EXIT=0x46
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CCMPLUGINBASEENG_ENTRY=0x1b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CCMPLUGINBASEENG_EXIT=0x1c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKDNSSERVERADDRESSL_ENTRY=0xc0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKDNSSERVERADDRESSL_EXIT=0xc1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKFORCOMMONATTRIBUTE_ENTRY=0xac
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKFORCOMMONATTRIBUTE_EXIT=0xad
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKIFALREADYCONNECTED_ENTRY=0xa3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKIFALREADYCONNECTED_EXIT=0xa4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_ENTRY=0xa5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_EXIT=0xa6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKSPACEBELOWCRITICALLEVELL_ENTRY=0xc3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CHECKSPACEBELOWCRITICALLEVELL_EXIT=0xc4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COMMITTRANSACTIONL_ENTRY=0x49
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COMMITTRANSACTIONL_EXIT=0x4a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COMMONATTRIBUTE_ENTRY=0xaf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COMMONATTRIBUTE_EXIT=0xb0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONSTRUCTL_ENTRY=0x1f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONSTRUCTL_EXIT=0x20
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONVERSIONTABLE_ENTRY=0xbb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONVERSIONTABLE_EXIT=0xbc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONVTABLEITEM_ENTRY=0xb8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CONVTABLEITEM_EXIT=0xb9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COPYATTRIBUTES_ENTRY=0x83
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_COPYATTRIBUTES_EXIT=0x84
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CREATECOPYL_ENTRY=0x3f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CREATECOPYL_EXIT=0x40
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CREATENEWL_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_CREATENEWL_EXIT=0x3e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DELETEL_ENTRY=0x39
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DELETEL_EXIT=0x3a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DESTINATIONPROTECTIONLEVELL_ENTRY=0xdf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DESTINATION_ENTRY=0x33
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DESTINATION_EXIT=0x34
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DOLOADL_ENTRY=0x4d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DOLOADL_EXIT=0x4e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DOMAKEVALIDNAMEL_ENTRY=0x89
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_DOMAKEVALIDNAMEL_EXIT=0x8a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_EASYWLANIDL=0x18b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLECHARGECARDL_ENTRY=0x72
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLECHARGECARDL_EXIT=0x73
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLELOCATIONL_ENTRY=0x74
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLELOCATIONL_EXIT=0x75
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLEPROXYL_ENTRY=0x70
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENABLEPROXYL_EXIT=0x71
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENSUREMAXLENGTHLC_ENTRY=0x8b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ENSUREMAXLENGTHLC_EXIT=0x8c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ESCAPETEXTLC_ENTRY=0x93
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ESCAPETEXTLC_EXIT=0x94
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FEATURESUPPORTED_ENTRY=0xb2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FEATURESUPPORTED_EXIT=0xb3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FIELDBYATTRIBUTEL_ENTRY=0xbd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDFIELDL_ENTRY=0x9f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDFIELDL_EXIT=0xa0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDSEAMLESSNESSRECORDL_ENTRY=0x87
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDSEAMLESSNESSRECORDL_EXIT=0x88
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDWAPRECORDL_ENTRY=0x85
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_FINDWAPRECORDL_EXIT=0x86
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GENERICSTRINGWRITERL_ENTRY=0xc9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GENERICSTRINGWRITERL_EXIT=0xca
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETADDITIONALUIDS_ENTRY=0xd0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETADDITIONALUIDS_EXIT=0xd1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETBOOLATTRIBUTEL_EXIT=0x24
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCOMMONBOOLATTRIBUTEL_ENTRY=0xd5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCOMMONINTATTRIBUTEL_ENTRY=0xd4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCOMMONSTRINGATTRIBUTEL_ENTRY=0xd6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCONNECTIONMETHODINFOBOOLL=0x186
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCONNECTIONMETHODINFOINTL=0x185
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCONNECTIONMETHODINFOSTRING8L=0x188
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETCONNECTIONMETHODINFOSTRINGL=0x187
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETDESTINATIONID=0x18a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETDESTINATIONNAMELC=0x189
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETINTATTRIBUTEL_ENTRY=0x21
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETINTATTRIBUTEL_EXIT=0x22
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETLOCATIONIDL_ENTRY=0xaa
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETLOCATIONIDL_EXIT=0xab
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETPOSTFIX_ENTRY=0x8f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETPOSTFIX_EXIT=0x90
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETPREFIX_ENTRY=0x8d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETPREFIX_EXIT=0x8e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_ENTRY=0x27
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETSTRING8ATTRIBUTEL_EXIT=0x28
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETSTRINGATTRIBUTEL_EXIT=0x26
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GLOBALBEARERPRIORITY_ENTRY=0xb4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GLOBALUIBEARERPRIORITY_ENTRY=0xb5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_IAPRECORDELEMENTID_ENTRY=0xa8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_IDISVALID_ENTRY=0xc5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_IDISVALID_EXIT=0xc6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ISDESTINATIONCONNECTEDL_ENTRY=0xe1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ISDESTINATIONHIDDENL_ENTRY=0xe0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ISPROTECTED_ENTRY=0xa9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ISVALIDNAMEL_ENTRY=0x91
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ISVALIDNAMEL_EXIT=0x92
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADCHARGECARDSETTINGL_ENTRY=0x57
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADCHARGECARDSETTINGL_EXIT=0x58
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADCOMMONSERVICESETTINGL_ENTRY=0xdd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADCOMMONSERVICESETTINGL_EXIT=0xde
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADIAPRECORDL_ENTRY=0x51
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADIAPRECORDL_EXIT=0x52
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADLOCATIONSETTINGL_ENTRY=0x5c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADLOCATIONSETTINGL_EXIT=0x5d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADL_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADL_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADNETWORKSETTINGL_ENTRY=0x5a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADNETWORKSETTINGL_EXIT=0x5b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADPROXYSETTINGL_ENTRY=0x53
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADPROXYSETTINGL_EXIT=0x54
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADSEAMLESSNESSRECORDL_ENTRY=0x78
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADSEAMLESSNESSRECORDL_EXIT=0x79
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADSERVICESETTINGL_ENTRY=0x55
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADSERVICESETTINGL_EXIT=0x56
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADWAPRECORDL_ENTRY=0x76
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_LOADWAPRECORDL_EXIT=0x77
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_MAPPEDCOMMONATTRIBUTE_ENTRY=0xcb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_MAPPEDCOMMONATTRIBUTE_EXIT=0xcc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_NEWSEAMLESSNESSRECORDL_ENTRY=0x7f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_NEWSEAMLESSNESSRECORDL_EXIT=0x80
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_NEWWAPRECORDL_ENTRY=0x7d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_NEWWAPRECORDL_EXIT=0x7e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_NUMOFCONNMETHODREFERENCESL_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_OPENTRANSACTIONLC_ENTRY=0x47
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_OPENTRANSACTIONLC_EXIT=0x48
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PARENTDESTINATION_ENTRY=0xce
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PARENTDESTINATION_EXIT=0xcf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PREPARETOLOADRECORDSL_ENTRY=0x4f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PREPARETOLOADRECORDSL_EXIT=0x50
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PREPARETOUPDATERECORDSL_ENTRY=0x5e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_PREPARETOUPDATERECORDSL_EXIT=0x5f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVECOMMONCONVERSIONTABLE_ENTRY=0x9d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVECOMMONCONVERSIONTABLE_EXIT=0x9e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVECONVERSIONTABLE_ENTRY=0x9b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVECONVERSIONTABLE_EXIT=0x9c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVERESOURCEFILE_ENTRY=0x43
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_REMOVERESOURCEFILE_EXIT=0x44
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_RESET_ENTRY=0xa1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_RESET_EXIT=0xa2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_RESTOREATTRIBUTEL_ENTRY=0x31
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_RESTOREATTRIBUTEL_EXIT=0x32
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ROLLBACKTRANSACTION_ENTRY=0x4b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_ROLLBACKTRANSACTION_EXIT=0x4c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SESSION_ENTRY=0x38
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETATTRIBUTE_ENTRY=0x81
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETATTRIBUTE_EXIT=0x82
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETBOOLATTRIBUTEL_ENTRY=0x2b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETBOOLATTRIBUTEL_EXIT=0x2c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONBOOLATTRIBUTEL_ENTRY=0xd9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONBOOLATTRIBUTEL_EXIT=0xda
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONINTATTRIBUTEL_ENTRY=0xd7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONINTATTRIBUTEL_EXIT=0xd8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONSTRINGATTRIBUTEL_ENTRY=0xdb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETCOMMONSTRINGATTRIBUTEL_EXIT=0xdc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETDNSSERVERADDRESSL_ENTRY=0xbe
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETDNSSERVERADDRESSL_EXIT=0xbf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETIDVALIDITY_ENTRY=0xc7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETIDVALIDITY_EXIT=0xc8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETINTATTRIBUTEL_ENTRY=0x29
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETINTATTRIBUTEL_EXIT=0x2a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETNAMEL_ENTRY=0x95
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETNAMEL_EXIT=0x96
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETPREDEFINEDID_ENTRY=0xd2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETPREDEFINEDID_EXIT=0xd3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETPROXYSERVERNAMEL_ENTRY=0xb6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETPROXYSERVERNAMEL_EXIT=0xb7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETSTRING8ATTRIBUTEL_ENTRY=0x2f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETSTRING8ATTRIBUTEL_EXIT=0x30
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETSTRINGATTRIBUTEL_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_SETSTRINGATTRIBUTEL_EXIT=0x2e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATECHARGECARDRECORDL_ENTRY=0x66
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATECHARGECARDRECORDL_EXIT=0x67
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATECONNPREFSETTINGL_ENTRY=0x6e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATECONNPREFSETTINGL_EXIT=0x6f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEIAPRECORDL_ENTRY=0x60
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEIAPRECORDL_EXIT=0x61
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATELOCATIONRECORDL_ENTRY=0x6c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATELOCATIONRECORDL_EXIT=0x6d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEL_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEL_EXIT=0x36
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATENETWORKRECORDL_ENTRY=0x6a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATENETWORKRECORDL_EXIT=0x6b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEPROXYRECORDL_ENTRY=0x62
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEPROXYRECORDL_EXIT=0x63
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATESEAMLESSNESSRECORDL_ENTRY=0x64
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATESEAMLESSNESSRECORDL_EXIT=0x65
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATESERVICERECORDL_ENTRY=0x68
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATESERVICERECORDL_EXIT=0x69
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEWAPRECORDL_ENTRY=0x7a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_UPDATEWAPRECORDL_EXIT=0x7b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEPRIVATE_CCMPLUGINBASEPRIVATE_ENTRY=0x17
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEPRIVATE_CCMPLUGINBASEPRIVATE_EXIT=0x18
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ADDITIONALRESET_ENTRY=0xee
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ADDITIONALRESET_EXIT=0xef
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ADDRESOURCEFILEL_ENTRY=0x122
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ADDRESOURCEFILEL_EXIT=0x123
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ALLOCREADL_ENTRY=0x126
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_BEARERRECORDIDLC_ENTRY=0xf2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_BEARERRECORDIDLC_EXIT=0xf3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CANHANDLEIAPIDL_ENTRY=0xec
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CCMPLUGINBASE_ENTRY=0xe4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CCMPLUGINBASE_EXIT=0xe5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CMMGR_ENTRY=0x164
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COMMITTRANSACTIONL_ENTRY=0x129
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COMMITTRANSACTIONL_EXIT=0x12a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CONSTRUCTL_ENTRY=0xe8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CONSTRUCTL_EXIT=0xe9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COPYADDITIONALDATAL_ENTRY=0xfe
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COPYADDITIONALDATAL_EXIT=0xff
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COPYATTRIBUTES_ENTRY=0x15e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_COPYATTRIBUTES_EXIT=0x15f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATEADDITIONALRECORDSL_ENTRY=0xfa
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATEADDITIONALRECORDSL_EXIT=0xfb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATECOPYL_ENTRY=0x120
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATECOPYL_EXIT=0x121
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATEINSTANCEL_ENTRY=0xea
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATEINSTANCEL_EXIT=0xeb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATENEWL_ENTRY=0x11e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATENEWL_EXIT=0x11f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATENEWSERVICERECORDL_ENTRY=0xf8
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_CREATENEWSERVICERECORDL_EXIT=0xf9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DECREMENTREFCOUNTER_ENTRY=0x16b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DECREMENTREFCOUNTER_EXIT=0x16c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DELETEADDITIONALRECORDSL_ENTRY=0xf6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DELETEADDITIONALRECORDSL_EXIT=0xf7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DELETEL_ENTRY=0x119
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DESTINATION_ENTRY=0x114
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DOLOADL_ENTRY=0x12b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_DOLOADL_EXIT=0x12c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLECHARGECARDL_ENTRY=0x14f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLECHARGECARDL_EXIT=0x150
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLELOCATIONL_ENTRY=0x151
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLELOCATIONL_EXIT=0x152
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLEPROXYL_ENTRY=0x14d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ENABLEPROXYL_EXIT=0x14e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_FILTERPOSSIBLEPARENTSL_ENTRY=0x171
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_FILTERPOSSIBLEPARENTSL_EXIT=0x172
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_FINDSEAMLESSNESSRECORDL_ENTRY=0x161
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_FINDWAPRECORDL_ENTRY=0x160
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETADDITIONALUIDS_ENTRY=0x16f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETADDITIONALUIDS_EXIT=0x170
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETBOOLATTRIBUTEL_ENTRY=0x107
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETINTATTRIBUTEL_ENTRY=0x106
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETREFCOUNTER_ENTRY=0x16d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETREFCOUNTER_EXIT=0x16e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETSTRING8ATTRIBUTEL_ENTRY=0x109
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_GETSTRINGATTRIBUTEL_ENTRY=0x108
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_IAPRECORDELEMENTID_ENTRY=0x162
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_INCREMENTREFCOUNTER_ENTRY=0x169
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_INCREMENTREFCOUNTER_EXIT=0x16a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ISLINKEDTOIAP_ENTRY=0x104
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_ISLINKEDTOSNAP_ENTRY=0x105
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADADDITIONALRECORDSL_ENTRY=0x100
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADADDITIONALRECORDSL_EXIT=0x101
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADCHARGECARDSETTINGL_ENTRY=0x135
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADCHARGECARDSETTINGL_EXIT=0x136
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADIAPRECORDL_ENTRY=0x12f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADIAPRECORDL_EXIT=0x130
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADLOCATIONSETTINGL_ENTRY=0x139
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADLOCATIONSETTINGL_EXIT=0x13a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADL_ENTRY=0x11a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADL_EXIT=0x11b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADNETWORKSETTINGL_ENTRY=0x137
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADNETWORKSETTINGL_EXIT=0x138
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADPROXYSETTINGL_ENTRY=0x131
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADPROXYSETTINGL_EXIT=0x132
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADSEAMLESSNESSRECORDL_ENTRY=0x155
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADSEAMLESSNESSRECORDL_EXIT=0x156
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADSERVICESETTINGL_ENTRY=0x133
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADSERVICESETTINGL_EXIT=0x134
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADWAPRECORDL_ENTRY=0x153
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_LOADWAPRECORDL_EXIT=0x154
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_NEWSEAMLESSNESSRECORDL_ENTRY=0x15b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_NEWWAPRECORDL_ENTRY=0x159
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_NEWWAPRECORDL_EXIT=0x15a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_NUMOFCONNMETHODREFERENCESL_ENTRY=0x117
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_OPENTRANSACTIONLC_ENTRY=0x127
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_OPENTRANSACTIONLC_EXIT=0x128
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PARENTDESTINATION_ENTRY=0x163
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PLUGIN_ENTRY=0x167
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PLUGIN_EXIT=0x168
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOCOPYDATAL_ENTRY=0xfc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOCOPYDATAL_EXIT=0xfd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETODELETERECORDSL_ENTRY=0xf4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETODELETERECORDSL_EXIT=0xf5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOLOADRECORDSL_ENTRY=0x12d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOLOADRECORDSL_EXIT=0x12e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOUPDATERECORDSL_ENTRY=0x13b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_PREPARETOUPDATERECORDSL_EXIT=0x13c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_RELOADL_ENTRY=0x11c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_RELOADL_EXIT=0x11d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_REMOVERESOURCEFILE_ENTRY=0x124
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_REMOVERESOURCEFILE_EXIT=0x125
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_RESTOREATTRIBUTEL_ENTRY=0x112
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_RESTOREATTRIBUTEL_EXIT=0x113
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SERVICERECORDIDLC_ENTRY=0xf0
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SERVICERECORDIDLC_EXIT=0xf1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SESSION_ENTRY=0x118
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETATTRIBUTE_ENTRY=0x15c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETATTRIBUTE_EXIT=0x15d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETBOOLATTRIBUTEL_ENTRY=0x10c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETBOOLATTRIBUTEL_EXIT=0x10d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETINTATTRIBUTEL_ENTRY=0x10a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETINTATTRIBUTEL_EXIT=0x10b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETPLUGIN_ENTRY=0x165
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETPLUGIN_EXIT=0x166
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETSTRING8ATTRIBUTEL_ENTRY=0x110
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETSTRING8ATTRIBUTEL_EXIT=0x111
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETSTRINGATTRIBUTEL_ENTRY=0x10e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_SETSTRINGATTRIBUTEL_EXIT=0x10f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEADDITIONALRECORDSL_ENTRY=0x102
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEADDITIONALRECORDSL_EXIT=0x103
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATECHARGECARDRECORDL_ENTRY=0x143
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATECHARGECARDRECORDL_EXIT=0x144
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATECONNPREFSETTINGL_ENTRY=0x14b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATECONNPREFSETTINGL_EXIT=0x14c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEIAPRECORDL_ENTRY=0x13d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEIAPRECORDL_EXIT=0x13e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATELOCATIONRECORDL_ENTRY=0x149
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATELOCATIONRECORDL_EXIT=0x14a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEL_ENTRY=0x115
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEL_EXIT=0x116
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATENETWORKRECORDL_ENTRY=0x147
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATENETWORKRECORDL_EXIT=0x148
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEPROXYRECORDL_ENTRY=0x13f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEPROXYRECORDL_EXIT=0x140
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATESEAMLESSNESSRECORDL_ENTRY=0x141
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATESEAMLESSNESSRECORDL_EXIT=0x142
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATESERVICERECORDL_ENTRY=0x145
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATESERVICERECORDL_EXIT=0x146
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEWAPRECORDL_ENTRY=0x157
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASE_UPDATEWAPRECORDL_EXIT=0x158
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_BEARERRECORDIDLC_ENTRY=0x17e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_BEARERRECORDIDLC_EXIT=0x17f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CCMPLUGINLANBASE_ENTRY=0x173
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CCMPLUGINLANBASE_EXIT=0x174
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CONSTRUCTL_ENTRY=0x177
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CONSTRUCTL_EXIT=0x178
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CREATENEWSERVICERECORDL_ENTRY=0x180
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_CREATENEWSERVICERECORDL_EXIT=0x181
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_LOADSERVICESETTINGL_ENTRY=0x179
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_LOADSERVICESETTINGL_EXIT=0x17a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_PREPARETOUPDATERECORDSL_ENTRY=0x182
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_PREPARETOUPDATERECORDSL_EXIT=0x183
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_SERVICERECORDIDLC_ENTRY=0x17c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_SERVICERECORDIDLC_EXIT=0x17d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLANBASE_SERVICERECORD_ENTRY=0x17b
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CCMPLUGINBASEENG_ENTRY=0x1d
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CCMPLUGINBASEENG_EXIT=0x1e
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CHECKDNSSERVERADDRESSL_EXIT=0xc2
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CHECKFORCOMMONATTRIBUTE_EXIT=0xae
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CHECKIFNAMEMODIFIEDL_EXIT=0xa7
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_COMMONATTRIBUTE_EXIT=0xb1
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_CONVTABLEITEM_EXIT=0xba
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_LOADCHARGECARDSETTINGL_EXIT=0x59
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_MAPPEDCOMMONATTRIBUTE_EXIT=0xcd
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEENG_UPDATEWAPRECORDL_EXIT=0x7c
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEPRIVATE_CCMPLUGINBASEPRIVATE_ENTRY=0x19
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASEPRIVATE_CCMPLUGINBASEPRIVATE_EXIT=0x1a
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASE_CANHANDLEIAPIDL_ENTRY=0xed
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASE_CCMPLUGINBASE_ENTRY=0xe6
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINBASE_CCMPLUGINBASE_EXIT=0xe7
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLANBASE_CCMPLUGINLANBASE_ENTRY=0x175
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLANBASE_CCMPLUGINLANBASE_EXIT=0x176
+[TRACE]TRACE_FLOW[0x7]_DUP1__CLASSIFYIPV6ADDRESS_EXIT=0x12
+[TRACE]TRACE_FLOW[0x7]_DUP1__ISUNSPECIFIEDIPV4ADDRESS_EXIT=0xf
+[TRACE]TRACE_FLOW[0x7]_DUP2__CLASSIFYIPV6ADDRESS_EXIT=0x13
+[TRACE]TRACE_FLOW[0x7]_TCMPLUGININITPARAM_TCMPLUGININITPARAM_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x7]_TCMPLUGININITPARAM_TCMPLUGININITPARAM_EXIT=0x16
+[TRACE]TRACE_FLOW[0x7]__CHECKIPV4VALIDITYL_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x7]__CHECKIPV4VALIDITYL_EXIT=0x4
+[TRACE]TRACE_FLOW[0x7]__CHECKIPV6VALIDITYL_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x7]__CHECKIPV6VALIDITYL_EXIT=0x6
+[TRACE]TRACE_FLOW[0x7]__CHECKPORTNUMBERVALIDITYL_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x7]__CHECKPORTNUMBERVALIDITYL_EXIT=0x8
+[TRACE]TRACE_FLOW[0x7]__CHECKRECORDIDVALIDITYL_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x7]__CHECKRECORDIDVALIDITYL_EXIT=0xa
+[TRACE]TRACE_FLOW[0x7]__CHECKWAPWSPOPTIONVALIDITYL_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x7]__CHECKWAPWSPOPTIONVALIDITYL_EXIT=0xc
+[TRACE]TRACE_FLOW[0x7]__CLASSIFYIPV6ADDRESS_ENTRY=0x10
+[TRACE]TRACE_FLOW[0x7]__CLASSIFYIPV6ADDRESS_EXIT=0x11
+[TRACE]TRACE_FLOW[0x7]__ISUNSPECIFIEDIPV4ADDRESS_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x7]__ISUNSPECIFIEDIPV4ADDRESS_EXIT=0xe
+[TRACE]TRACE_FLOW[0x7]__READONLYATTRIBUTEL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x7]__READONLYATTRIBUTEL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x7]__SETPROXYSERVERNAMEL_ENTRY=0x14
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETALLDESTINATIONSL_ENTRY=0xe2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMPLUGINBASEENG_GETALLDESTINATIONSL_EXIT=0xe3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/data/1020737D.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Resource definitions for project cmpluginembdestination.
+*
+*/
+
+#include "ecom/registryinfo.rh"
+
+// Because attribute enums had to be added to namespace CMManager
+// it's not possible to included cmpluginembdestination.hrh.
+// Thus bearer type id had to be redefine here.
+#define KEmbeddedDestination  0x10207379
+
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid = 0x1020737D;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KEmbeddedDestination;
+					version_no = 1;
+					display_name = "Embedded Destination";
+					default_data = "EmbeddedDestination";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Build information file for project cmpluginembdestination
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+
+PRJ_MMPFILES
+cmpluginembdestination.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/group/cmpluginembdestination.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Project definition file for project cmpluginebmdestination
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET      cmpluginembdestination.dll
+UID         0x10009D8D 0x1020737D
+
+TARGETTYPE		PLUGIN
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+SOURCEPATH  ../src
+
+SOURCE      cmpluginembdestinationproxy.cpp
+SOURCE      cmpluginembdestination.cpp
+
+SOURCEPATH  ../data
+
+START RESOURCE 1020737D.rss
+TARGET cmpluginembdestination.rsc
+END
+
+USERINCLUDE     ../data
+
+// Component specific internal headers
+USERINCLUDE			../inc
+USERINCLUDE     ../../../cmmcommon/inc ../traces
+
+// ADO specific internal headers
+SYSTEMINCLUDE		../../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY	ecom.lib
+LIBRARY commsdat.lib
+LIBRARY cmmpluginbase.lib
+LIBRARY cmmanagerdatabase.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/inc/cmpluginembdestination.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,250 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*       Declaration of embedded destination interface implementation
+*       for "Embedded Destination" plugin
+*
+*/
+
+#ifndef EMBEDDEDDESTINATION_PLUGIN_H
+#define EMBEDDEDDESTINATION_PLUGIN_H
+
+#include <cmpluginbaseeng.h>
+#include <cmpluginembdestinationdef.h>
+
+/**
+*  CCmPluginEmbDestination defines the functionality of Embedded Destination(ED)
+*  bearer support.
+*  Most of the API is inherited from CCmPluginBaseEng class.
+*/
+NONSHARABLE_CLASS( CCmPluginEmbDestination ) : public CCmPluginBaseEng
+    {
+    public: // Constructors and destructor
+        /**
+         * Two phased constructor.
+         * @return Returns the ED plugin object.
+         */
+        static CCmPluginEmbDestination* NewL( TCmPluginInitParam* aInitParam );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CCmPluginEmbDestination();
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Creates a new instance of ED bearer plugin. The instance
+         * created represents a bearer, not a particular ED.
+         * @param aInitParam Initialization data.
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the cmm server.
+         */
+        virtual CCmPluginBaseEng* CreateInstanceL(
+                TCmPluginInitParam& aInitParam ) const;
+
+        /**
+         * Following GetBearerInfoXXXL methods return the values of the
+         * requested attributes. These values are ED specific
+         * so they don't vary between EDs.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+
+        virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const;
+
+        virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const;
+
+        virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const;
+
+        virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const;
+
+        /**
+         * Does not do anything. Embedded destination does not support this
+         * functionality.
+         * @return Returns always EFalse.
+         */
+        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
+
+        /**
+         * Does not do anything. Embedded destination does not support this
+         * functionality.
+         * @return Returns always EFalse.
+         */
+        virtual TBool CanHandleIapIdL(
+                CommsDat::CCDIAPRecord* aIapRecord ) const;
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Following methods do not do anything. Embedded destination does not
+         * support these functionalities.
+         */
+        virtual void PreparePluginToLoadRecordsL();
+
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void CreateServiceRecordL();
+
+        void LoadServiceRecordL();
+
+        virtual TUint32 ServiceRecordId() const;
+
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName );
+
+        virtual void UpdateServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void CreateBearerRecordsL();
+
+        virtual void LoadBearerRecordsL();
+
+        virtual void BearerRecordIdL( TUint32& aRecordId );
+
+        virtual void BearerRecordNameLC( HBufC*& aBearerName );
+
+        virtual void UpdateBearerRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        void DeleteBearerRecordsL();
+
+        virtual void ResetBearerRecords();
+
+        virtual void GetBearerSpecificRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return Returns the requested value. In error case leaves with
+         * system-wide error code.
+         */
+
+        virtual TUint32 GetBearerIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual TBool GetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC* GetBearerStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC8* GetBearerString8AttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL(
+                TUint32 aAttribute, TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerBoolAttributeL(
+                TUint32 aAttribute, TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerStringAttributeL(
+                TUint32 aAttribute, const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerString8AttributeL(
+                TUint32 aAttribute, const TDesC8& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Bearer is requested by the server if it uses CommsDat tables which
+         * should be observed for possible changes to be able to keep the
+         * data in memory in up to date.
+         * @param aTableIdArray A reference to an array where to add those
+         * table ids.
+         */
+        virtual void GetBearerTableIdsToBeObservedL(
+                RArray<TUint32>& aTableIdArray ) const;
+
+    private: // From CCmPluginBaseEng
+
+        /**
+         * Following methods do not do anything. Embedded destination does not
+         * support these functionalities.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance );
+
+        CommsDat::CCDRecordBase* CopyServiceRecordL();
+
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance );
+
+    private: // Constructors
+        /**
+        * Constructor.
+        */
+        CCmPluginEmbDestination( TCmPluginInitParam* aInitParam );
+
+        /**
+        * Second phase constructor. Leaves on failure.
+        */
+        void ConstructL();
+
+        /**
+         * Gets the protection level of this destination.
+         * @param aProtLevel Parameter to return the protection level.
+         */
+        void ProtectionLevelL( TUint32& aProtLevel );
+
+        /**
+         * Gets the information if this destination is hidden or not.
+         */
+        void IsHiddenL( TBool& aHidden );
+
+    private:
+        /**
+         * Element id of SNAP metadata record
+         */
+        CommsDat::TMDBElementId iDestMetadataTableId;
+	};
+
+#endif // EMBEDDEDDESTINATION_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/rom/cmmpluginembdestination.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* cmpluginembdestination.dll to ROM.
+*
+*/
+#ifndef CMMPLUGINEMBDESTINATION_IBY__
+#define CMMPLUGINEMBDESTINATION_IBY__
+
+ECOM_PLUGIN(cmpluginembdestination.dll,1020737D.rsc)
+
+#endif CMMPLUGINEMBDESTINATION_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/src/cmpluginembdestination.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,643 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CCmPluginEmbDestination
+*
+*/
+
+#include <ecom/ecom.h>      // For REComSession
+#include <datamobilitycommsdattypes.h>
+
+#include "cmpluginembdestination.h"
+#include "cmmserverdefs.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmpluginembdestinationTraces.h"
+#endif
+
+using namespace CMManager;
+using namespace CommsDat;
+
+// ---------------------------------------------------------
+// CCmPluginEmbDestination::NewL()
+// ---------------------------------------------------------
+//
+CCmPluginEmbDestination* CCmPluginEmbDestination::NewL(
+        TCmPluginInitParam* aInitParam )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_NEWL_ENTRY );
+
+    CCmPluginEmbDestination* self = new( ELeave ) CCmPluginEmbDestination( aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_NEWL_EXIT );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginEmbDestination::CreateInstanceL
+// ----------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmPluginEmbDestination::CreateInstanceL(
+        TCmPluginInitParam& aInitParam ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_CREATEINSTANCEL_ENTRY );
+
+    CCmPluginEmbDestination* self = new( ELeave ) CCmPluginEmbDestination( &aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_CREATEINSTANCEL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CCmPluginEmbDestination::~CCmPluginEmbDestination()
+// ---------------------------------------------------------
+//
+CCmPluginEmbDestination::~CCmPluginEmbDestination()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::CCmPluginEmbDestination()
+// ---------------------------------------------------------------------------
+//
+CCmPluginEmbDestination::CCmPluginEmbDestination(
+        TCmPluginInitParam* aInitParam )
+        :
+        CCmPluginBaseEng( aInitParam )
+	{
+	iBearerType = KUidEmbeddedDestination;
+	iDestMetadataTableId = 0;
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::ConstructL()
+	{
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_CONSTRUCTL_ENTRY );
+
+    CCmPluginBaseEng::ConstructL();
+
+    TRAPD( err, iDestMetadataTableId = CCDSNAPMetadataRecord::TableIdL( iSession ) );
+    if ( err == KErrNotFound )
+        {
+        iDestMetadataTableId = CCDSNAPMetadataRecord::CreateTableL( iSession );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_CONSTRUCTL_EXIT );
+	}
+
+
+// ---------------------------------------------------------
+// CCmPluginEmbDestination::CanHandleIapIdL()
+// ---------------------------------------------------------
+//
+TBool CCmPluginEmbDestination::CanHandleIapIdL(
+        TUint32 /*aIapId*/ ) const
+    {
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// CCmPluginEmbDestination::CanHandleIapIdL()
+// ---------------------------------------------------------
+//
+TBool CCmPluginEmbDestination::CanHandleIapIdL(
+        CCDIAPRecord* /*aIapRecord*/ ) const
+    {
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginEmbDestination::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::PreparePluginToLoadRecordsL()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginEmbDestination::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::PreparePluginToUpdateRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::CreateServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::CreateServiceRecordL()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::LoadServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::LoadServiceRecordL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::PrepareToCopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::PrepareToCopyDataL(
+        CCmPluginBaseEng* /*aCopyInstance*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::CopyServiceRecordL
+// ---------------------------------------------------------------------------
+//
+CommsDat::CCDRecordBase* CCmPluginEmbDestination::CopyServiceRecordL()
+    {
+    return NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginEmbDestination::UpdateServiceRecordL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::UpdateServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::CreateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::CreateBearerRecordsL()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::LoadBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::LoadBearerRecordsL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::ServiceRecordIdLC
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginEmbDestination::ServiceRecordId() const
+    {
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::ServiceRecordNameLC
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::ServiceRecordNameLC( HBufC*& /*aName*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::BearerRecordIdL()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::BearerRecordIdL( TUint32& /*aRecordId*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::BearerRecordNameLC()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::BearerRecordNameLC( HBufC*& /*aBearerName*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerSpecificRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::GetBearerSpecificRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aRecordArray*/ )
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::DeleteBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::DeleteBearerRecordsL()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginEmbDestination::UpdateBearerRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::UpdateBearerRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// ---------------------------------------------------------
+// CCmPluginEmbDestination::ResetBearerRecords()
+// ---------------------------------------------------------
+//
+void CCmPluginEmbDestination::ResetBearerRecords()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+TUint32 CCmPluginEmbDestination::GetBearerIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_GETBEARERINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmId:
+            {
+            retVal = iCmId;
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        case ECmDefaultPriority:
+        case ECmDefaultUiPriority:
+            {
+            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_GETBEARERINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+TBool CCmPluginEmbDestination::GetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_GETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    TBool retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = ETrue;
+            }
+            break;
+        case ECmProtected:
+            {
+            TUint32 protlevel( CMManager::EProtLevel0 );
+            ProtectionLevelL( protlevel );
+            if ( protlevel == CMManager::EProtLevel1 || protlevel == CMManager::EProtLevel2 )
+                {
+                retVal = ETrue;
+                }
+            else
+                {
+                retVal = EFalse;
+                }
+            }
+            break;
+        case ECmHidden:
+            {
+            IsHiddenL( retVal );
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_GETBEARERBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::ProtectionLevelL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::ProtectionLevelL( TUint32& aProtLevel )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_PROTECTIONLEVELL_ENTRY );
+
+    CCDSNAPMetadataRecord* metadataRecord; // Owned.
+    metadataRecord = new( ELeave ) CCDSNAPMetadataRecord( iDestMetadataTableId );
+    CleanupStack::PushL( metadataRecord );
+
+    metadataRecord->iSNAP = iCmId;
+    metadataRecord->LoadL( iSession );
+
+    aProtLevel = ( metadataRecord->iMetadata & KDestProtectionLevelMask )
+            >> KBitsToShiftDestProtectionLevel;
+
+    CleanupStack::PopAndDestroy( metadataRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_PROTECTIONLEVELL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::IsHiddenL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::IsHiddenL( TBool& aHidden )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_ISHIDDENL_ENTRY );
+
+    aHidden = EFalse;
+
+    CCDSNAPMetadataRecord* metadataRecord; // Owned.
+    metadataRecord = new( ELeave ) CCDSNAPMetadataRecord( iDestMetadataTableId );
+    CleanupStack::PushL( metadataRecord );
+
+    metadataRecord->iSNAP = iCmId;
+    metadataRecord->LoadL( iSession );
+
+    if( ( TUint32 )( metadataRecord->iMetadata ) & CMManager::ESnapMetadataHiddenAgent )
+        {
+        aHidden = ETrue;
+        }
+
+    CleanupStack::PopAndDestroy( metadataRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_ISHIDDENL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+HBufC* CCmPluginEmbDestination::GetBearerStringAttributeL(
+        TUint32 /*aAttribute*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    HBufC* retVal = NULL;
+
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+HBufC8* CCmPluginEmbDestination::GetBearerString8AttributeL(
+        TUint32 /*aAttribute*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    HBufC8* retVal( NULL );
+
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::SetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::SetBearerIntAttributeL(
+        TUint32 /*aAttribute*/,
+        TUint32 /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::SetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::SetBearerBoolAttributeL(
+        TUint32 /*aAttribute*/,
+        TBool /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::SetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::SetBearerStringAttributeL(
+        TUint32 /*aAttribute*/,
+        const TDesC16& /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginEmbDestination::SetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::SetBearerString8AttributeL(
+        TUint32 /*aAttribute*/,
+        const TDesC8& /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerInfoIntL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginEmbDestination::GetBearerInfoIntL(
+        TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmDefaultUiPriority:
+        case ECmDefaultPriority:
+            {
+            retVal = KDataMobilitySelectionPolicyPriorityWildCard;
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerInfoBoolL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginEmbDestination::GetBearerInfoBoolL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINEMBDESTINATION_GETBEARERINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = ETrue;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmVirtual:
+            {
+            retVal = EFalse;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINEMBDESTINATION_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerInfoStringL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginEmbDestination::GetBearerInfoStringL(
+        TUint32 /*aAttribute*/ ) const
+    {
+    HBufC* retVal( NULL );
+
+    User::Leave( KErrNotSupported );
+
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerInfoString8L
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginEmbDestination::GetBearerInfoString8L(
+        TUint32 /*aAttribute*/ ) const
+    {
+    HBufC8* retVal( NULL );
+
+    User::Leave( KErrNotSupported );
+
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::CopyBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::CopyBearerRecordsL(
+        CCmPluginBaseEng* /*aCopyInstance*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginEmbDestination::GetBearerTableIdsToBeObserved
+// ---------------------------------------------------------------------------
+//
+void CCmPluginEmbDestination::GetBearerTableIdsToBeObservedL(
+        RArray<TUint32>& /*aTableIdArray*/ ) const
+    {
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/src/cmpluginembdestinationproxy.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Implementation of Embedded Destination Plugin proxy table
+*
+*
+*/
+
+#include "cmpluginembdestination.h"
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] =
+	{
+	IMPLEMENTATION_PROXY_ENTRY( KUidEmbeddedDestination,
+	                            CCmPluginEmbDestination::NewL)
+	};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+	return ImplementationTable;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/data/1020737B.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     PacketData PlugIn's resource file
+*     
+*
+*/
+
+#include "ecom/registryinfo.rh"
+
+// Because attribute enums had to be added to namespace CMManager
+// it's not possible to included cmpluginlanbasedef.h
+// Thus bearer type id had to be redefine here.
+#define KUidLanBearerType  0x1020737A
+
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid = 0x1020737B;
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
+			implementations = 
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KUidLanBearerType;
+					version_no = 1;
+					display_name = "Lan";
+					default_data = "Lan";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Build information for the LAN plugin.   
+*      
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+//../Rom/cmmpluginlan.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(cmmpluginlan.iby)
+
+PRJ_MMPFILES
+cmpluginlan.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/group/cmpluginlan.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Project specification for LAN Plugin.   
+*      
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET      cmpluginlan.dll
+UID         0x10009D8D 0x1020737B
+
+TARGETTYPE		PLUGIN
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+SOURCEPATH  ../src
+
+SOURCE      cmpluginlanproxy.cpp
+SOURCE      cmpluginlan.cpp
+
+SOURCEPATH  ../data
+
+START RESOURCE 1020737B.rss
+TARGET cmpluginlan.rsc
+END
+
+// Component specific internal headers 
+USERINCLUDE			../inc
+USERINCLUDE         ../traces
+
+// ADO specific internal headers 
+SYSTEMINCLUDE		../../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY	ecom.lib
+LIBRARY commsdat.lib
+LIBRARY featmgr.lib
+LIBRARY cmmanagerdatabase.lib
+LIBRARY	cmmpluginbase.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/inc/cmpluginlan.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,346 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Declaration of Lan interface implementation
+*      for "LAN" plugin
+*
+*
+*/
+
+
+#ifndef LAN_PLUGIN_H
+#define LAN_PLUGIN_H
+
+#include <cmpluginbaseeng.h>
+#include <cmpluginlandef.h>
+
+
+/**
+*  CCmPluginLan defines the functionality of lan bearer support.
+*  Most of the API is inherited from CCmPluginBaseEng class.
+*/
+NONSHARABLE_CLASS( CCmPluginLan ) : public CCmPluginBaseEng
+    {
+    public: // Constructors and destructor
+        /**
+         * Two phased constructor.
+         * @return Returns the LAN plugin object.
+         */
+        static CCmPluginLan* NewL( TCmPluginInitParam* aInitParam );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CCmPluginLan();
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Creates a new instance of LAN bearer plugin. The instance
+         * created represents a bearer, not a connection method.
+         * @param aInitParam Initialization data.
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the cmm server.
+         */
+        virtual CCmPluginBaseEng* CreateInstanceL(
+                TCmPluginInitParam& aInitParam ) const;
+
+        /**
+         * Following GetBearerInfoXXXL methods return the values of the
+         * requested attributes. These values are LAN specific
+         * so they don't vary between LAN Conneciton Methods.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+
+        virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const;
+
+        virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const;
+
+        virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const;
+
+        virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const;
+
+        /**
+         * Checks if the plug-in can handle the Connection Method identified
+         * with parameter aIapId.
+         * @param aIapId IAPId of the Connection Method to be checked.
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
+
+        /**
+        * Checks if the plug-in can handle the given IAP record.
+        * @param aIapRecord IAP record to be checked
+        * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+        */
+        virtual TBool CanHandleIapIdL(
+                CommsDat::CCDIAPRecord* aIapRecord ) const;
+
+    public: // From CCmPluginBaseEng concerning a Connection Method
+        /**
+         * Before generic side starts to request plugins to load records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         */
+        virtual void PreparePluginToLoadRecordsL();
+
+        /**
+         * Before generic side starts to request plugins to update records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         * @param aGenRecordArray An array of generic records to be updated.
+         * @param aBearerSpecRecordArray An array of bearer specific records
+         * to be updated.
+         */
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Creates the CCDLANServiceRecord type service record.
+         */
+        virtual void CreateServiceRecordL();
+
+        /**
+         * Loads the service record. Service record pointer is stored to
+         * plugins generic side implementation(CCmPluginBaseEng).
+         */
+        void LoadServiceRecordL();
+
+        /**
+         * Returns the service record id of this Connection Method.
+         * @return Returns the id of the service record id of this Connection Method.
+         */
+        virtual TUint32 ServiceRecordId() const;
+
+        /**
+        * Returns the service record name of the Connection Method.
+        * @param aServiceName Name of the service record which CM's iap record
+        * points to.
+        */
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName );
+
+        /**
+         * Writes the service record data to CommsDat.
+         * @param aGenRecordArray An array containing pointers to service
+         * record of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method.
+         */
+        virtual void UpdateServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Creates LAN specific default records.
+         */
+        virtual void CreateBearerRecordsL();
+
+        /**
+         * Loads LAN specific records of the Connection Method.
+         */
+        virtual void LoadBearerRecordsL();
+
+        /**
+         * Returns the bearer record id of the Connection Method.
+         * @param aRecordId Id of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordIdL( TUint32& aRecordId );
+
+        /**
+         * Returns the bearer record name of the Connection Method.
+         * @param aBearerName Name of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordNameLC( HBufC*& aBearerName );
+
+        /**
+         * Writes LAN specific record data to CommsDat.
+         * @param aGenRecordArray An array containing pointers to service
+         * record of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records to be written.
+         */
+        virtual void UpdateBearerRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+        * Deletes LAN specific records of the Connection Method.
+        */
+        void DeleteBearerRecordsL();
+
+        /**
+         * Releases the memory reserved by the LAN specific records
+         * of the Connection Method.
+         */
+        virtual void ResetBearerRecords();
+
+        /**
+         * Creates a copy of LAN specific records and adds them to
+         * aRecordArray.
+         */
+        virtual void GetBearerSpecificRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return Returns the requested value. In error case leaves with
+         * system-wide error code.
+         */
+
+        virtual TUint32 GetBearerIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual TBool GetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC* GetBearerStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC8* GetBearerString8AttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL(
+                TUint32 aAttribute, TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerBoolAttributeL(
+                TUint32 aAttribute, TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerStringAttributeL(
+                TUint32 aAttribute, const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerString8AttributeL(
+                TUint32 aAttribute, const TDesC8& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Bearer is requested by the server if it uses CommsDat tables which
+         * should be observed for possible changes to be able to keep the
+         * data in memory in up to date.
+         * @param aTableIdArray A reference to an array where to add those
+         * table ids.
+         */
+        virtual void GetBearerTableIdsToBeObservedL(
+                RArray<TUint32>& aTableIdArray ) const;
+
+    private: // Constructors
+        /**
+        * Constructor.
+        */
+        CCmPluginLan( TCmPluginInitParam* aInitParam );
+
+        /**
+        * Second phase constructor. Leaves on failure.
+        */
+        void ConstructL();
+
+    private:
+        /**
+         * Sets the daemon name for the Connection Method.
+         */
+        void SetDaemonNameL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Returns a reference to service record of the Connection Method.
+         */
+        CommsDat::CCDLANServiceRecord& ServiceRecord() const;
+
+        /**
+         * Makes needed preparations before copying records.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Copies the service record.
+         * @return Returns a pointer to service record created.
+         */
+        CommsDat::CCDRecordBase* CopyServiceRecordL();
+
+        /**
+         * Copies the bearer specific records to copy instance.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Adds LAN bearer record with default values to record array.
+         * @param aRecordArray The array where to add the bearer record.
+         */
+        void GetDefaultLanBearerRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Returns the default priority value identified with the parameter.
+         * @param aAttribute Indentifies the default priority value requested.
+         */
+        TUint32 GetDefPriorityL( const TUint32 aAttribute ) const;
+
+    private: // Data
+
+        /**
+         * Pointer to LAN bearer record.
+         */
+        CommsDat::CCDLANBearerRecord* iBearerRecord;
+
+        /**
+         * Bearer priority table ID.
+         */
+        CommsDat::TMDBElementId iBearerPriorityTableId;
+    };
+
+#endif // LAN_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/rom/cmmpluginlan.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmpluginlan.dll to ROM.
+*
+*/
+#ifndef CMMPLUGINLAN_IBY__
+#define CMMPLUGINLAN_IBY__
+
+ECOM_PLUGIN(cmpluginlan.dll,1020737B.rsc)
+
+
+#endif // CMMPLUGINLAN_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1443 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Implementation of Lan Plugin interface implementation
+*      for Lan Bearer
+*
+*
+*/
+
+
+#include "cmpluginlan.h"
+
+#include "datamobilitycommsdattypes.h"
+#include <cmmanagerdef.h>
+#include <ecom/ecom.h>  // For REComSession
+#include <featmgr.h>
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmpluginlanTraces.h"
+#endif
+
+
+using namespace CMManager;
+using namespace CommsDat;
+
+_LIT( KEmpty, "" );
+
+_LIT( KLanBearerName, "LANBearer" );
+_LIT( KLanBearerAgent, "nullagt.agt" );
+_LIT( KLanBearerNif, "ethint" );
+
+_LIT( KLanLDDFileName, "enet" );
+_LIT( KLanPDDFileName, "ethernet" );
+
+_LIT( KLanLDDName, "Ethernet" );
+_LIT( KLanPDDName, "Ethernet.Wins" );
+_LIT( KLanPacketDriverName, "EtherPkt.drv" );
+
+
+const TBool KDefIpAddrFromServer = ETrue;
+const TBool KDefIpDnsAddrFromServer = ETrue;
+const TBool KDefIp6DnsAddrFromServer = ETrue;
+
+const TInt KLanLastSocketActivityTimeout = -1;
+const TInt KLanLastSocketClosedTimeout = -1;
+const TInt KLanLastSessionClosedTimeout = -1;
+
+
+// ---------------------------------------------------------
+// CCmPluginLan::NewOutgoingL()
+// ---------------------------------------------------------
+//
+CCmPluginLan* CCmPluginLan::NewL( TCmPluginInitParam* aInitParam )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_NEWL_ENTRY );
+
+    CCmPluginLan* self = new( ELeave ) CCmPluginLan( aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_NEWL_EXIT );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginLan::CreateInstanceL
+// ----------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmPluginLan::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_CREATEINSTANCEL_ENTRY );
+
+    CCmPluginLan* self = new( ELeave ) CCmPluginLan( &aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_CREATEINSTANCEL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::~CCmPluginLan()
+// ---------------------------------------------------------
+//
+CCmPluginLan::~CCmPluginLan()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_CCMPLUGINLAN_ENTRY );
+
+    ResetBearerRecords();
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_CCMPLUGINLAN_EXIT );
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::CCmPluginLan()
+// ---------------------------------------------------------
+//
+CCmPluginLan::CCmPluginLan( TCmPluginInitParam* aInitParam )
+        :
+        CCmPluginBaseEng( aInitParam )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINLAN_CCMPLUGINLAN_ENTRY );
+
+    iBearerType = KUidLanBearerType;
+    iBearerRecord = NULL;
+    iBearerPriorityTableId = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINLAN_CCMPLUGINLAN_EXIT );
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::ConstructL()
+// ---------------------------------------------------------
+//
+void CCmPluginLan::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_CONSTRUCTL_ENTRY );
+
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
+
+    CCmPluginBaseEng::ConstructL();
+    
+    // Get bearer priority table ID.
+    TRAP_IGNORE( iBearerPriorityTableId = 
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iSession ) );
+
+    if ( !iBearerPriorityTableId )
+        {
+        iBearerPriorityTableId = 
+                CCDGlobalBearerTypePriorizationRecord::CreateTableL( iSession );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::CanHandleIapIdL()
+// ---------------------------------------------------------
+//
+TBool CCmPluginLan::CanHandleIapIdL( TUint32 aIapId ) const
+    {
+    OstTraceFunctionEntryExt( CCMPLUGINLAN_CANHANDLEIAPIDL_ENTRY, this );
+
+    TBool retVal( EFalse );
+
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
+                            ( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+
+    CleanupStack::PushL( iapRecord );
+    iapRecord->SetRecordId( aIapId );
+
+    TRAPD( err, iapRecord->LoadL( iSession ) );
+
+    if ( !err )
+        {
+        retVal = CanHandleIapIdL( iapRecord );
+        }
+
+    CleanupStack::PopAndDestroy( iapRecord );
+
+    OstTraceFunctionExitExt( CCMPLUGINLAN_CANHANDLEIAPIDL_EXIT, this, retVal );
+
+    return retVal;
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::CanHandleIapIdL()
+// ---------------------------------------------------------
+//
+TBool CCmPluginLan::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
+    {
+    OstTraceFunctionEntryExt( DUP1_CCMPLUGINLAN_CANHANDLEIAPIDL_ENTRY, this );
+
+    TBool retVal( EFalse );
+
+    if ( (TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) ) &&
+        TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameLANBearer ) )
+        {
+        retVal = ETrue;
+        }
+
+    OstTraceFunctionExitExt( DUP1_CCMPLUGINLAN_CANHANDLEIAPIDL_EXIT, this, retVal );
+
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginLan::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginLan::PreparePluginToLoadRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_PREPAREPLUGINTOLOADRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_PREPAREPLUGINTOLOADRECORDSL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginLan::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginLan::PreparePluginToUpdateRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_PREPAREPLUGINTOUPDATERECORDSL_ENTRY );
+
+    CCDIAPRecord* iapRecord =
+                static_cast<CCDIAPRecord*>( aGenRecordArray[KIapRecordIndex] );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    CheckIfNameModifiedL( iapRecord, serviceRecord );
+
+    CheckDNSServerAddressL( ETrue,
+                            serviceRecord->iIp6NameServer1,
+                            serviceRecord->iIp6NameServer2,
+                            serviceRecord->iIp6DnsAddrFromServer );
+
+    CheckDNSServerAddressL( EFalse,
+                            serviceRecord->iIpNameServer1,
+                            serviceRecord->iIpNameServer2,
+                            serviceRecord->iIpDnsAddrFromServer );
+
+    SetDaemonNameL( aGenRecordArray, aBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_PREPAREPLUGINTOUPDATERECORDSL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::CreateServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::CreateServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_CREATESERVICERECORDL_ENTRY );
+
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    iServiceRecord = static_cast<CCDLANServiceRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+    CCDLANServiceRecord* lanServiceRecord = static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) )
+        {
+        lanServiceRecord->iIfNetworks.SetL( KDefIspIfNetworksIPv4IPv6LAN );
+        }
+    else
+        {
+        lanServiceRecord->iIfNetworks.SetL( KDefIspIfNetworksIPv4 );
+        }
+
+    lanServiceRecord->iIpGateway.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIpAddrFromServer.SetL( KDefIpAddrFromServer );
+
+    lanServiceRecord->iIpAddr.SetL( KUnspecifiedIPv4 );
+
+    lanServiceRecord->iIpDnsAddrFromServer.SetL( KDefIpDnsAddrFromServer );
+
+    lanServiceRecord->iIpNameServer1.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIpNameServer2.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIp6DnsAddrFromServer.SetL( KDefIp6DnsAddrFromServer );
+    lanServiceRecord->iIp6NameServer1.SetL( KDynamicIpv6Address );
+    lanServiceRecord->iIp6NameServer2.SetL( KDynamicIpv6Address );
+
+    if ( KDefIpAddrFromServer )
+        {
+        lanServiceRecord->iConfigDaemonManagerName.SetL( KDaemonManagerName );
+        lanServiceRecord->iConfigDaemonName.SetL( KConfigDaemonName );
+        }
+    else
+        {
+        lanServiceRecord->iConfigDaemonManagerName.SetL( KEmpty );
+        lanServiceRecord->iConfigDaemonName.SetL( KEmpty );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_CREATESERVICERECORDL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::LoadServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::LoadServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_LOADSERVICERECORDL_ENTRY );
+
+    if ( TPtrC( KCDTypeNameLANService ) == iIapRecord->iServiceType )
+        {
+        iServiceRecord = static_cast<CCDLANServiceRecord *>(
+                CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+        ServiceRecord().SetRecordId( iIapRecord->iService );
+        ServiceRecord().LoadL( iSession );
+        }
+    else
+        {
+        // This IAP service is not supported by this plugin.
+        User::Leave( KErrNotSupported );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_LOADSERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::PrepareToCopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::PrepareToCopyDataL( CCmPluginBaseEng* /*aCopyInstance*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_PREPARETOCOPYDATAL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_PREPARETOCOPYDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::CopyServiceRecordL
+// ---------------------------------------------------------------------------
+//
+CommsDat::CCDRecordBase* CCmPluginLan::CopyServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_COPYSERVICERECORDL_ENTRY );
+
+    // New service record to be returned.
+    CCDRecordBase* serviceRecord = static_cast<CCDLANServiceRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+    CleanupStack::PushL( serviceRecord );
+
+    CCDLANServiceRecord* tempServiceRecordPtrToNew =
+            static_cast<CCDLANServiceRecord*>( serviceRecord );
+
+    // CommsDat version of service record.
+    CCDLANServiceRecord* origServiceRecord =
+            static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    if ( !origServiceRecord->iRecordTag.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordTag.SetL(
+                origServiceRecord->iRecordTag );
+        }
+    if ( !origServiceRecord->iRecordName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordName.SetL(
+                origServiceRecord->iRecordName );
+        }
+    if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL(
+                origServiceRecord->iServiceEnableLlmnr );
+        }
+    if ( !origServiceRecord->iIfNetworks.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIfNetworks.SetL(
+                origServiceRecord->iIfNetworks );
+        }
+    if ( !origServiceRecord->iIpNetmask.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNetmask.SetL(
+                origServiceRecord->iIpNetmask );
+        }
+    if ( !origServiceRecord->iIpGateway.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpGateway.SetL(
+                origServiceRecord->iIpGateway );
+        }
+    if ( !origServiceRecord->iIpAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrFromServer.SetL(
+                origServiceRecord->iIpAddrFromServer );
+        }
+    if ( !origServiceRecord->iIpAddr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddr.SetL(
+                origServiceRecord->iIpAddr );
+        }
+    if ( !origServiceRecord->iIpDnsAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpDnsAddrFromServer.SetL(
+                origServiceRecord->iIpDnsAddrFromServer );
+        }
+    if ( !origServiceRecord->iIpNameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNameServer1.SetL(
+                origServiceRecord->iIpNameServer1 );
+        }
+    if ( !origServiceRecord->iIpNameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNameServer2.SetL(
+                origServiceRecord->iIpNameServer2 );
+        }
+    if ( !origServiceRecord->iIp6DnsAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6DnsAddrFromServer.SetL(
+                origServiceRecord->iIp6DnsAddrFromServer );
+        }
+    if ( !origServiceRecord->iIp6NameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6NameServer1.SetL(
+                origServiceRecord->iIp6NameServer1 );
+        }
+    if ( !origServiceRecord->iIp6NameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6NameServer2.SetL(
+                origServiceRecord->iIp6NameServer2 );
+        }
+    if ( !origServiceRecord->iIpAddrLeaseValidFrom.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrLeaseValidFrom.SetL(
+                origServiceRecord->iIpAddrLeaseValidFrom );
+        }
+    if ( !origServiceRecord->iIpAddrLeaseValidTo.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrLeaseValidTo.SetL(
+                origServiceRecord->iIpAddrLeaseValidTo );
+        }
+    if ( !origServiceRecord->iConfigDaemonManagerName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iConfigDaemonManagerName.SetL(
+                origServiceRecord->iConfigDaemonManagerName );
+        }
+    if ( !origServiceRecord->iConfigDaemonName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iConfigDaemonName.SetL(
+                origServiceRecord->iConfigDaemonName );
+        }
+    if ( !origServiceRecord->iServiceExtensionTableName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceExtensionTableName.SetL(
+                origServiceRecord->iServiceExtensionTableName );
+        }
+    if ( !origServiceRecord->iServiceExtensionTableRecordId.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceExtensionTableRecordId.SetL(
+                origServiceRecord->iServiceExtensionTableRecordId );
+        }
+
+    CleanupStack::Pop( serviceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_COPYSERVICERECORDL_EXIT );
+    return serviceRecord;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginLan::UpdateServiceRecordL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginLan::UpdateServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_UPDATESERVICERECORDL_ENTRY );
+
+    // Delete the original record and create a copy from the client's copy.
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    iServiceRecord = static_cast<CCDLANServiceRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+    CCDLANServiceRecord* origServiceRecord = static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    // Client's copy of lan service record.
+    CCDLANServiceRecord* clientServiceRecordCopy =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    CopyRecordFieldsL( *clientServiceRecordCopy, *origServiceRecord );
+
+    origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() );
+
+    if ( !origServiceRecord->RecordId() )
+        {
+        origServiceRecord->SetRecordId( KCDNewRecordRequest );
+        origServiceRecord->StoreL( iSession );
+
+        // Have to be "reloaded" to get possible default values from template records.
+        origServiceRecord->LoadL( iSession );
+
+        // Update received element ID to client's copy too.
+        clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() );
+        }
+    else
+        {
+        origServiceRecord->ModifyL( iSession );
+        }
+
+    CCmPluginBaseEng::CopyRecordFieldsL( *origServiceRecord,
+            *clientServiceRecordCopy );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_UPDATESERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::CreateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::CreateBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_CREATEBEARERRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_CREATEBEARERRECORDSL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::LoadBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::LoadBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_LOADBEARERRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_LOADBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::ServiceRecord()
+// ---------------------------------------------------------------------------
+//
+CCDLANServiceRecord& CCmPluginLan::ServiceRecord() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SERVICERECORD_ENTRY );
+
+    return *static_cast<CCDLANServiceRecord*>( iServiceRecord );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::ServiceRecordIdLC
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginLan::ServiceRecordId() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SERVICERECORDID_ENTRY );
+
+    return ServiceRecord().RecordId();
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::ServiceRecordNameLC
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::ServiceRecordNameLC( HBufC* &aName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SERVICERECORDNAMELC_ENTRY );
+
+    aName = TPtrC( KCDTypeNameLANService ).AllocLC();
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_SERVICERECORDNAMELC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::BearerRecordIdL()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::BearerRecordIdL( TUint32& aRecordId )
+    {
+    CCDLANBearerRecord* lanBearerRecord = static_cast<CCDLANBearerRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANBearerRecord ) );
+    CleanupStack::PushL( lanBearerRecord );
+
+    lanBearerRecord->iRecordName.SetL( TPtrC( KLanBearerName ) );
+    if ( !lanBearerRecord->FindL( iSession ) )
+        { // Bearer not found -> create dummy values.
+        lanBearerRecord->SetRecordId( KCDNewRecordRequest );
+        lanBearerRecord->iBearerAgent = KLanBearerAgent;
+        lanBearerRecord->iRecordName = KLanBearerName;
+        lanBearerRecord->iLanBearerNifName = KLanBearerNif;
+
+        lanBearerRecord->iLanBearerLddFilename = KLanLDDFileName;
+        lanBearerRecord->iLanBearerLddName = KLanLDDName;
+        lanBearerRecord->iLanBearerPddFilename = KLanPDDFileName;
+        lanBearerRecord->iLanBearerPddName = KLanPDDName;
+        lanBearerRecord->iLanBearerPacketDriverName = KLanPacketDriverName;
+        lanBearerRecord->iLastSocketActivityTimeout = (TUint32)KLanLastSocketActivityTimeout;
+        lanBearerRecord->iLastSessionClosedTimeout = (TUint32)KLanLastSessionClosedTimeout;
+        lanBearerRecord->iLastSocketClosedTimeout = (TUint32)KLanLastSocketClosedTimeout;
+
+        lanBearerRecord->StoreL( iSession );
+        }
+
+    aRecordId = lanBearerRecord->RecordId();
+
+    CleanupStack::PopAndDestroy( lanBearerRecord );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::BearerRecordNameLC()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::BearerRecordNameLC( HBufC*& aBearerName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_BEARERRECORDNAMELC_ENTRY );
+
+    aBearerName = TPtrC( KCDTypeNameLANBearer ).AllocLC();
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_BEARERRECORDNAMELC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerSpecificRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::GetBearerSpecificRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERSPECIFICRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERSPECIFICRECORDSL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::DeleteBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::DeleteBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_DELETEBEARERRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_DELETEBEARERRECORDSL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginLan::UpdateBearerRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginLan::UpdateBearerRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_UPDATEBEARERRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_UPDATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------
+// CCmPluginLan::ResetBearerRecords()
+// ---------------------------------------------------------
+//
+void CCmPluginLan::ResetBearerRecords()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_RESETBEARERRECORDS_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_RESETBEARERRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::SetDaemonNameL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::SetDaemonNameL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SETDAEMONNAMEL_ENTRY );
+
+    // We have to check first that these values have not been set (or changed)
+    // by any 3rd party SW to ensure that we don't break their settings.
+    HBufC* daemonName = GetBearerStringAttributeL(
+            ECmConfigDaemonManagerName,
+            aGenRecordArray,
+            aBearerSpecRecordArray );
+    if ( daemonName )
+        {
+        if ( daemonName->Compare( KDaemonManagerName ) != 0 )
+            {
+            delete daemonName;
+            OstTraceFunctionExit1( CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT, this );
+            OstTraceFunctionExit0( CCMPLUGINLAN_SETDAEMONNAMEL_EXIT );
+            return;
+            }
+        delete daemonName;
+        }
+
+    // Use DHCP if we can.
+    TBool ipfromSrv = GetBearerBoolAttributeL(
+            ECmIPAddFromServer,
+            aGenRecordArray,
+            aBearerSpecRecordArray );
+    if ( ipfromSrv )
+        {
+        SetBearerStringAttributeL(
+                ECmConfigDaemonManagerName,
+                KDaemonManagerName,
+                aGenRecordArray,
+                aBearerSpecRecordArray );
+        SetBearerStringAttributeL(ECmConfigDaemonName,
+                KConfigDaemonName,
+                aGenRecordArray,
+                aBearerSpecRecordArray );
+        }
+    else
+        {
+        if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) )
+            {
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonManagerName,
+                    KDaemonManagerName,
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonName,
+                    KConfigDaemonName,
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            }
+        else
+            {
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonManagerName,
+                    KNullDesC(),
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonName,
+                    KNullDesC(),
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINLAN_SETDAEMONNAMEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::GetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+TUint32 CCmPluginLan::GetBearerIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmInvalidAttribute:
+            {
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported ); //TODO, update attribute definition comments.
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            retVal = KCommDbBearerLAN;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ELanServiceExtensionTableRecordId:
+            {
+            if ( !serviceRecord->iServiceExtensionTableRecordId.IsNull() )
+                {
+                retVal = serviceRecord->iServiceExtensionTableRecordId.RecordId();
+                }
+            else
+                {
+                retVal = 0;
+                }
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::GetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+TBool CCmPluginLan::GetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    TBool retVal( 0 );
+
+    CCDLANServiceRecord* serviceRecord =
+                static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+            retVal = ETrue;
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case ECmIPAddFromServer:
+        case ELanIpAddrFromServer:
+            {
+            retVal = serviceRecord->iIpAddrFromServer;
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case ELanIpDNSAddrFromServer:
+            {
+            retVal = serviceRecord->iIpDnsAddrFromServer;
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case ELanIp6DNSAddrFromServer:
+            {
+            retVal = serviceRecord->iIp6DnsAddrFromServer;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::GetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+HBufC* CCmPluginLan::GetBearerStringAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    HBufC* retVal = NULL;
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmIFNetworks:
+        case ELanIfNetworks:
+            {
+            retVal = TPtrC( serviceRecord->iIfNetworks ).AllocL();
+            }
+            break;
+        case ECmIPNetmask:
+        case ELanIpNetMask:
+            {
+            retVal = TPtrC( serviceRecord->iIpNetmask ).AllocL();
+            }
+            break;
+        case ECmIPGateway:
+        case ELanIpGateway:
+            {
+            retVal = TPtrC( serviceRecord->iIpGateway ).AllocL();
+            }
+            break;
+        case ECmIPAddress:
+        case ELanIpAddr:
+            {
+            retVal = TPtrC( serviceRecord->iIpAddr ).AllocL();
+            }
+            break;
+        case ECmIPNameServer1:
+        case ELanIpNameServer1:
+            {
+            retVal = TPtrC( serviceRecord->iIpNameServer1 ).AllocL();
+            }
+            break;
+        case ECmIPNameServer2:
+        case ELanIpNameServer2:
+            {
+            retVal = TPtrC( serviceRecord->iIpNameServer2 ).AllocL();
+            }
+            break;
+        case ECmIP6NameServer1:
+        case ELanIp6NameServer1:
+            {
+            retVal = TPtrC( serviceRecord->iIp6NameServer1 ).AllocL();
+            }
+            break;
+        case ECmIP6NameServer2:
+        case ELanIp6NameServer2:
+            {
+            retVal = TPtrC( serviceRecord->iIp6NameServer2 ).AllocL();
+            }
+            break;
+        case ECmIPAddrLeaseValidFrom:
+        case ELanIpAddrLeaseValidFrom:
+            {
+            retVal = TPtrC( serviceRecord->iIpAddrLeaseValidFrom ).AllocL();
+            }
+            break;
+        case ECmIPAddrLeaseValidTo:
+        case ELanIpAddrLeaseValidTo:
+            {
+            retVal = TPtrC( serviceRecord->iIpAddrLeaseValidTo ).AllocL();
+            }
+            break;
+        case ECmConfigDaemonManagerName:
+        case ELanConfigDaemonManagerName:
+            {
+            retVal = TPtrC( serviceRecord->iConfigDaemonManagerName ).AllocL();
+            }
+            break;
+        case ECmConfigDaemonName:
+        case ELanConfigDaemonName:
+            {
+            retVal = TPtrC( serviceRecord->iConfigDaemonName ).AllocL();
+            }
+            break;
+        case ELanServiceExtensionTableName:
+            {
+            retVal = TPtrC( serviceRecord->iServiceExtensionTableName ).AllocL();
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERSTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::GetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+HBufC8* CCmPluginLan::GetBearerString8AttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    HBufC8* retVal( NULL );
+
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERSTRING8ATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::SetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::SetBearerIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SETBEARERINTATTRIBUTEL_ENTRY );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmExtensionLevel:
+        case ECmCommsDBBearerType:
+        case ECmDefaultUiPriority:
+        case ECmDefaultPriority:
+            {
+            User::Leave( KErrArgument );
+            }
+            break;
+        case ELanServiceExtensionTableRecordId:
+            {
+            serviceRecord->iServiceExtensionTableRecordId = aValue;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_SETBEARERINTATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::SetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::SetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    CCDLANServiceRecord* serviceRecord =
+                static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmIPAddFromServer:
+        case ELanIpAddrFromServer:
+            {
+            serviceRecord->iIpAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case ELanIpDNSAddrFromServer:
+            {
+            serviceRecord->iIpDnsAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case ELanIp6DNSAddrFromServer:
+            {
+            serviceRecord->iIp6DnsAddrFromServer.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_SETBEARERBOOLATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::SetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::SetBearerStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmIFNetworks:
+        case ELanIfNetworks:
+            {
+            serviceRecord->iIfNetworks.SetL( aValue );
+            }
+            break;
+        case ECmIPNetmask:
+        case ELanIpNetMask:
+            {
+            serviceRecord->iIpNetmask.SetL( aValue );
+            }
+            break;
+        case ECmIPGateway:
+        case ELanIpGateway:
+            {
+            serviceRecord->iIpGateway.SetL( aValue );
+            }
+            break;
+        case ECmIPAddress:
+        case ELanIpAddr:
+            {
+            if ( ( aValue.Compare( KUnspecifiedIPv4 ) == 0 ) ||
+                    ( aValue.Compare( KNullDesC ) == 0 ) )
+                {
+                // If unspecified or NULL address is set dynamic
+                // IP must be enabled.
+                SetBearerBoolAttributeL( ECmIPAddFromServer,
+                                         ETrue,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            else
+                {
+                // If valid address is set dynamic IP is disabled.
+                SetBearerBoolAttributeL( ECmIPAddFromServer,
+                                         EFalse,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            serviceRecord->iIpAddr.SetL( aValue );
+            }
+            break;
+        case ECmIPNameServer1:
+        case ELanIpNameServer1:
+            {
+            serviceRecord->iIpNameServer1.SetL( aValue );
+            }
+            break;
+        case ECmIPNameServer2:
+        case ELanIpNameServer2:
+            {
+            serviceRecord->iIpNameServer2.SetL( aValue );
+            }
+            break;
+        case ECmIP6NameServer1:
+        case ELanIp6NameServer1:
+            {
+            serviceRecord->iIp6NameServer1.SetL( aValue );
+            }
+            break;
+        case ECmIP6NameServer2:
+        case ELanIp6NameServer2:
+            {
+            serviceRecord->iIp6NameServer2.SetL( aValue );
+            }
+            break;
+        case ECmIPAddrLeaseValidFrom:
+        case ELanIpAddrLeaseValidFrom:
+            {
+            serviceRecord->iIpAddrLeaseValidFrom.SetL( aValue );
+            }
+            break;
+        case ECmIPAddrLeaseValidTo:
+        case ELanIpAddrLeaseValidTo:
+            {
+            serviceRecord->iIpAddrLeaseValidTo.SetL( aValue );
+            }
+            break;
+        case ECmConfigDaemonManagerName:
+        case ELanConfigDaemonManagerName:
+            {
+            serviceRecord->iConfigDaemonManagerName.SetL( aValue );
+            }
+            break;
+        case ECmConfigDaemonName:
+        case ELanConfigDaemonName:
+            {
+            serviceRecord->iConfigDaemonName.SetL( aValue );
+            }
+            break;
+        case ELanServiceExtensionTableName:
+            {
+            serviceRecord->iServiceExtensionTableName.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_SETBEARERSTRINGATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginLan::SetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginLan::SetBearerString8AttributeL(
+        TUint32 aAttribute,
+        const TDesC8& /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_SETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_SETBEARERSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerInfoIntL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginLan::GetBearerInfoIntL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            retVal = KCommDbBearerLAN;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        case ECmSeamlessnessLevel:
+            {
+            retVal = ESeamlessnessShowprogress;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerInfoBoolL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginLan::GetBearerInfoBoolL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+#ifndef __WINS__
+            retVal = EFalse;
+#else
+            retVal = ETrue;
+#endif
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case ECmVirtual:
+            {
+            retVal = EFalse;
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerInfoStringL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginLan::GetBearerInfoStringL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERINFOSTRINGL_ENTRY );
+
+    HBufC* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERINFOSTRINGL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerInfoString8L
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginLan::GetBearerInfoString8L( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERINFOSTRING8L_ENTRY );
+
+    HBufC8* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERINFOSTRING8L_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::CopyBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::CopyBearerRecordsL( CCmPluginBaseEng* /*aCopyInstance*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_COPYBEARERRECORDSL_ENTRY );
+    OstTraceFunctionExit0( CCMPLUGINLAN_COPYBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetBearerTableIdsToBeObserved
+// ---------------------------------------------------------------------------
+//
+void CCmPluginLan::GetBearerTableIdsToBeObservedL(
+        RArray<TUint32>& aTableIdArray ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETBEARERTABLEIDSTOBEOBSERVED_ENTRY );
+
+    aTableIdArray.AppendL( KCDTIdLANServiceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETBEARERTABLEIDSTOBEOBSERVED_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginLan::GetDefPriorityL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginLan::GetDefPriorityL( const TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETDEFPRIORITYL_ENTRY );
+
+    TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
+
+    CCDGlobalBearerTypePriorizationRecord* priorityRecord =
+            new( ELeave ) CCDGlobalBearerTypePriorizationRecord( iBearerPriorityTableId );
+    CleanupStack::PushL( priorityRecord );
+
+    priorityRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
+
+    if ( priorityRecord->FindL( iSession ) )
+        {
+        priorityRecord->LoadL( iSession );
+        switch ( aAttribute )
+            {
+            case ECmDefaultPriority:
+                {
+                retVal = priorityRecord->iPriority;
+                }
+                break;
+            case ECmDefaultUiPriority:
+                {
+                retVal = priorityRecord->iUIPriority;
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    CleanupStack::PopAndDestroy( priorityRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETDEFPRIORITYL_EXIT );
+    return retVal;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlanproxy.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Implementation of Lan Plugin proxy table
+*
+*
+*/
+
+
+#include "cmpluginlan.h"
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KUidLanBearerType, CCmPluginLan::NewL)
+    };
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_ADDITIONALRESET_ENTRY=0x11
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_ADDITIONALRESET_EXIT=0x12
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CANHANDLEIAPIDL_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CANHANDLEIAPIDL_EXIT=0xe
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CCMPLUGINLAN_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CCMPLUGINLAN_EXIT=0x6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CONSTRUCTL_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CONSTRUCTL_EXIT=0xa
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CREATEINSTANCEL_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_CREATEINSTANCEL_EXIT=0x4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_NEWL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_NEWL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT=0x13
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLAN_CANHANDLEIAPIDL_ENTRY=0xf
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLAN_CANHANDLEIAPIDL_EXIT=0x10
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLAN_CCMPLUGINLAN_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINLAN_CCMPLUGINLAN_EXIT=0x8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_GETINTATTRIBUTEL_ENTRY=0xb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMPLUGINLAN_GETINTATTRIBUTEL_EXIT=0xc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/data/1020737C.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*        Resource definitions for project cmpluginpacketdata
+*
+*/
+
+#include "ecom/registryinfo.rh"
+
+// Because attribute enums had to be added to namespace CMManager
+// it's not possible to included cmpluginpacketdatadef.h.
+// Thus bearer type id had to be redefine here.
+#define KPacketDataBearerType   0x10207378
+
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid = 0x1020737C;
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10207377; // = KCMPluginInterfaceUid
+			implementations = 
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KPacketDataBearerType;
+					version_no = 1;
+					display_name = "Packet Data";
+					default_data = "PacketData";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*        Build information file for project cmpluginpacketdata
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmpluginpacketdata.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(cmmpluginpacketdata.iby)
+
+PRJ_MMPFILES
+cmpluginpacketdata.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*        Project definition file for project cmpluginpacketdata
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET      cmpluginpacketdata.dll
+UID         0x10009D8D 0x1020737C
+
+TARGETTYPE		PLUGIN
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+SOURCEPATH  ../src
+
+SOURCE      cmpluginpacketdataproxy.cpp
+SOURCE      cmpluginpacketdata.cpp
+
+SOURCEPATH  ../data
+
+START RESOURCE 1020737C.rss
+TARGET cmpluginpacketdata.rsc
+END
+
+USERINCLUDE     ../data
+
+// Component specific internal headers 
+USERINCLUDE			../inc
+USERINCLUDE         ../traces
+
+// ADO specific internal headers 
+SYSTEMINCLUDE		../../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY	ecom.lib
+LIBRARY cmmpluginbase.lib
+LIBRARY etel.lib
+LIBRARY etelpckt.lib
+LIBRARY featmgr.lib
+LIBRARY centralrepository.lib 
+LIBRARY cmmanagerdatabase.lib
+LIBRARY commsdat.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/inc/cmpluginpacketdata.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,455 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*       Declaration of packetdata interface implementation
+*       for "Packetdata" plugin
+*
+*/
+
+#ifndef PACKETDATA_PLUGIN_H
+#define PACKETDATA_PLUGIN_H
+
+#include <cmpluginbaseeng.h>
+#include <cmpluginpacketdatadef.h>
+
+/**
+*  CCmPluginPacketData defines the functionality of packetdata bearer support.
+*  Most of the API is inherited from CCmPluginBaseEng class.
+*/
+NONSHARABLE_CLASS( CCmPluginPacketData ) : public CCmPluginBaseEng
+    {
+
+    public:
+        /**
+         * Two phased constructor.
+         * @return Returns the packetdata plugin object.
+         */
+        static CCmPluginPacketData* NewL( TCmPluginInitParam* aInitParam );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CCmPluginPacketData();
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Creates a new instance of packetdata bearer plugin. The instance
+         * created represents a bearer, not a connection method.
+         * @param aInitParam Initialization data.
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the cmm server.
+         */
+        virtual CCmPluginBaseEng* CreateInstanceL(
+                TCmPluginInitParam& aInitParam ) const;
+
+        /**
+         * Following GetBearerInfoXXXL methods return the values of the
+         * requested attributes. These values are packetdata specific
+         * so they don't vary between packetdata Connection Methods.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+
+        virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const;
+
+        virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const;
+
+        virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const;
+
+        virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const;
+
+        /**
+         * Checks if the plug-in can handle the Connection Method identified
+         * with parameter aIapId.
+         * @param aIapId IAPId of the Connection Method to be checked.
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const;
+
+        /**
+        * Checks if the plug-in can handle the given IAP record.
+        * @param aIapRecord IAP record to be checked
+        * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+        */
+        virtual TBool CanHandleIapIdL(
+                CommsDat::CCDIAPRecord *aIapRecord ) const;
+
+    public: // From CCmPluginBaseEng concerning a Connection Method
+        /**
+         * Before generic side starts to request plugins to load records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         */
+        virtual void PreparePluginToLoadRecordsL();
+
+        /**
+         * Before generic side starts to request plugins to update records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         * @param aGenRecordArray An array of generic records to be updated.
+         * @param aBearerSpecRecordArray An array of bearer specific records
+         * to be updated.
+         */
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Creates the CCDWCDMAPacketServiceRecord type service record.
+         */
+        virtual void CreateServiceRecordL();
+
+        /**
+         * Loads the service record. Service record pointer is stored to
+         * plugins generic side implementation(CCmPluginBaseEng).
+         */
+        virtual void LoadServiceRecordL();
+
+        /**
+         * Returns the service record id of this Connection Method.
+         * @return Returns the id of the service record id of this Connection Method.
+         */
+        virtual TUint32 ServiceRecordId() const;
+
+        /**
+        * Returns the service record name of the Connection Method.
+        * @param aServiceName Name of the service record which CM's iap record
+        * points to.
+        */
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName );
+
+        /**
+         * Writes the service record data to CommsDat.
+         * @param aGenRecordArray An array containing pointers to service
+         * record of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method.
+         */
+        virtual void UpdateServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Creates packetdata specific default records.
+         */
+        virtual void CreateBearerRecordsL();
+
+        /**
+         * Loads packetdata specific records of the Connection Method.
+         */
+        virtual void LoadBearerRecordsL();
+
+        /**
+         * Returns the bearer record id of the Connection Method.
+         * @param aRecordId Id of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordIdL( TUint32& aRecordId );
+
+        /**
+         * Returns the bearer record name of the Connection Method.
+         * @param aBearerName Name of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordNameLC( HBufC* &aBearerName );
+
+        /**
+         * Writes packetdata specific record data to CommsDat.
+         * @param aGenRecordArray An array containing pointers to generic records
+         * of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records to be written.
+         */
+        virtual void UpdateBearerRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+        * Deletes packetdata specific records of the Connection Method.
+        */
+        void DeleteBearerRecordsL();
+
+        /**
+         * Releases the memory reserved by the packetdata specific records
+         * of the Connection Method.
+         */
+        virtual void ResetBearerRecords();
+
+        /**
+         * Creates a copy of packetdata specific records and adds them to
+         * aRecordArray.
+         */
+        virtual void GetBearerSpecificRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic
+         *      records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         *      specific records of the Connection Method. aAttribute
+         *      parameter should identify one field(integer, boolean string)
+         *      in one of these records.
+         * @return Returns the requested value. In error case leaves with
+         *      system-wide error code.
+         */
+
+        virtual TUint32 GetBearerIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual TBool GetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+
+        virtual HBufC* GetBearerStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC8* GetBearerString8AttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic
+         *      records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         *      specific records of the Connection Method. aAttribute
+         *      parameter should identify one field(integer, boolean string)
+         *      in one of these records.
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL(
+                TUint32 aAttribute, TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerBoolAttributeL(
+                TUint32 aAttribute, TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerStringAttributeL(
+                TUint32 aAttribute, const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerString8AttributeL(
+                TUint32 aAttribute, const TDesC8& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Bearer is requested by the server if it uses CommsDat tables which
+         * should be observed for possible changes to be able to keep the
+         * data in memory in up to date.
+         * @param aTableIdArray A reference to an array where to add those
+         * table ids.
+         */
+        virtual void GetBearerTableIdsToBeObservedL(
+                RArray<TUint32>& aTableIdArray ) const;
+
+    private: // Constructors
+
+        /**
+        * Constructor
+        */
+        CCmPluginPacketData(
+                TCmPluginInitParam* aInitParam,
+                TBool aOutgoing );
+
+        /**
+        * Second phase constructor
+        */
+        void ConstructL();
+
+    private:
+        /**
+         * Adds Service record with default values to record array.
+         * @param aRecordArray The array where to add the service record.
+         */
+        void GetDefaultServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Adds QoS record with default values to record array.
+         * @param aRecordArray The array where to add the QoS record.
+         */
+        void GetDefaultQosRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Returns a reference to service record of the Connection Method.
+         */
+        CommsDat::CCDWCDMAPacketServiceRecord& ServiceRecord() const;
+
+        /**
+         * Makes needed preparations before copying records.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Copies the service record.
+         * @return Returns a pointer to service record created.
+         */
+        CommsDat::CCDRecordBase* CopyServiceRecordL();
+
+        /**
+         * Copies the bearer specific records to copy instance.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance );
+
+
+        /**
+         * Gets an integer value from service record.
+         * @param aAttribute An indentifier to know the field in the record.
+         * @param aGenRecordArray Array of records where the service record
+         * can be found.
+         * @return Returns an integer if the requested attribute
+         * is found. Otherwise leaves with error code KErrNotFound.
+         */
+        TUint32 GetServiceIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray );
+
+        /**
+         * Gets a string value from service record. Ownership of the return
+         * value is passed to the caller.
+         * @param aAttribute An indentifier to know the field in the record.
+         * @param aGenRecordArray Array of records where the service record
+         * can be found.
+         * @return Returns a pointer to an buffer if the requested attribute
+         * is found. Otherwise leaves with error code KErrNotFound.
+         */
+        HBufC* GetServiceStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray );
+
+        /**
+         * Sets integer value to service record.
+         * @param aAttribute An indentifier to know the field in the record.
+         * @param aValue A value to set.
+         * @param aGenRecordArray Array of records where the service record
+         * can be found.
+         */
+        void SetServiceIntAttributeL(
+                TUint32 aAttribute,
+                TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray );
+
+        /**
+         * Gets an integer value from packetdata specific record.
+         * @param aAttribute An indentifier to know the field in the record.
+         * @param aBearerSpecRecordArray Array of records where the service
+         * record can be found.
+         * @return Returns an integer if the requested attribute
+         * is found. Otherwise leaves with error code KErrNotFound.
+         */
+        TUint32 GetQosIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Sets an integer value to packetdata specific record.
+         * @param aAttribute An indentifier to know the field in the record.
+         * @param aValue The value to be set.
+         * @param aBearerSpecRecordArray Array of records where the service
+         * record can be found.
+         * @return Returns an integer if the requested attribute
+         * is found. Otherwise leaves with error code KErrNotFound.
+         */
+        void SetQosIntAttributeL(
+                TUint32 aAttribute,
+                TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+       /**
+        * Sets the PDP-type.
+        * @param aPdpType Pdp type to set.
+        * @param aServiceRecord Pointer to the service record where to save the
+        * pdp type.
+        */
+        void SetPDPTypeL(
+                RPacketContext::TProtocolType aPdpType,
+                CommsDat::CCDWCDMAPacketServiceRecord* aServiceRecord );
+
+        /**
+         * Sets the daemon name for the Connection Method.
+         * @param aGenRecordArray An array containing pointers to generic records
+         * of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method.
+         */
+        void SetDaemonNameL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Returns the default priority value identified with the parameter.
+         * @param aAttribute Indentifies the default priority value requested.
+         */
+        TUint32 GetDefPriorityL( const TUint32 aAttribute ) const;
+
+    private:
+        /**
+         * Checks if the packetdata network is available.
+         * @return Returns ETrue if the network is available. Otherwise returns
+         * EFalse.
+         */
+        TBool CheckNetworkCoverageL() const;
+
+    private: // Data
+        /**
+         * Boolean to define if this is outgoing or incoming packetdata cm.
+         */
+        TBool iOutgoing;
+
+        /**
+         * ID of the bearer record of the IAP.
+         */
+        TUint32 iBearerRecordId;
+
+        /**
+         * Name of the bearer record of the IAP.
+         */
+        HBufC* iBearerRecordName;
+
+        /**
+         * Pointer to the QoS record of the IAP.
+         */
+        CommsDat::CCDUmtsR99QoSAndOnTableRecord* iPacketDataQoSRecord;
+
+        /**
+         * Bearer priority table ID.
+         */
+        CommsDat::TMDBElementId iBearerPriorityTableId;
+    };
+
+#endif // PACKETDATA_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/rom/cmmpluginpacketdata.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmpluginpacketdata.dll to ROM.
+*
+*/
+#ifndef CMMPLUGINPACKETDATA_IBY__
+#define CMMPLUGINPACKETDATA_IBY__
+
+ECOM_PLUGIN(cmpluginpacketdata.dll,1020737C.rsc)
+
+
+#endif // CMMPLUGINPACKETDATA_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,2894 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Implementation of packetdata Plugin interface.
+*
+*/
+
+
+#include <StringLoader.h>
+#include <featmgr.h>
+#include <centralrepository.h>
+#include <CoreApplicationUIsSDKCRKeys.h>
+
+#include "datamobilitycommsdattypes.h"
+#include "cmpluginpacketdata.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmpluginpacketdataTraces.h"
+#endif
+
+using namespace CMManager;
+using namespace CommsDat;
+
+// ================= CONSTANTS =======================
+
+/// Modem bearer names for GPRS/WCDMA access points.
+_LIT( KModemBearerPacketData, "GPRS Modem" );
+_LIT( KDefaultQosDataRecordName, "PRIMARY1" );
+_LIT( KDefaultQosDataRecordNamewithSpace, "PRIMARY1 " );
+
+const TInt KQosRecordIndex = 0;
+
+// ======== MEMBER FUNCTIONS ========
+/**
+*  CCmPDCoverageCheck defines the functionality for packetdata service
+*  coverage checking.
+*/
+class CCmPDCoverageCheck : public CActive
+    {
+    public:
+        /**
+         * Constructor.
+         */
+        CCmPDCoverageCheck();
+
+        /**
+         * Destructor.
+         */
+        ~CCmPDCoverageCheck();
+
+        /**
+         * Checks if the packet service is available(status is
+         * ERegisteredOnHomeNetwork or ERegisteredRoaming or
+         * ENotRegisteredButAvailable)
+         * @return Return ETrue if the status is one mentioned above.
+         * Otherwise returns EFalse.
+         */
+        TBool IsThereCoverageL();
+
+    protected:  // from CActive
+        virtual void DoCancel();
+        virtual void RunL();
+
+    private:
+        /**
+         * Ckecks if the phode mode is offline.
+         * @return Returns ETrue if the phone is in offline mode.
+         * Otherwise returns EFalse.
+         */
+        TBool IsPhoneOfflineL() const;
+
+    private:
+        /** Boolean which has the latest coverage information  */
+        TBool                   iCoverage;
+
+        /** Controller for single scheduling loop */
+        CActiveSchedulerWait    iWait;
+
+        /** Handle to telephony server */
+        RTelServer              iServer;
+
+        /** Handle to phone(needed for packet service) */
+        RPhone                  iPhone;
+
+        /** Handle to packet service */
+        RPacketService          iService;
+
+        /** Network registration status information */
+        RPacketService::TRegistrationStatus iNwRegStatus;
+    };
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::CCmPDCoverageCheck()
+// ----------------------------------------------------------------------------
+//
+CCmPDCoverageCheck::CCmPDCoverageCheck() : CActive( EPriorityStandard )
+    {
+    OstTraceFunctionEntry0( CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_ENTRY );
+
+    CActiveScheduler::Add( this );
+
+    OstTraceFunctionExit0( CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::~CCmPDCoverageCheck()
+// ----------------------------------------------------------------------------
+//
+CCmPDCoverageCheck::~CCmPDCoverageCheck()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_ENTRY );
+
+    Cancel();
+
+    iService.Close();
+    iPhone.Close();
+    iServer.Close();
+
+    OstTraceFunctionExit0( DUP1_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CCmPDCoverageCheck::DoCancel()
+    {
+    OstTraceFunctionEntry0( CCMPDCOVERAGECHECK_DOCANCEL_ENTRY );
+
+    iWait.AsyncStop();
+
+    OstTraceFunctionExit0( CCMPDCOVERAGECHECK_DOCANCEL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::RunL
+// ----------------------------------------------------------------------------
+//
+void CCmPDCoverageCheck::RunL()
+    {
+    OstTraceFunctionEntry0( CCMPDCOVERAGECHECK_RUNL_ENTRY );
+
+    if ( iStatus.Int() == KErrNone )
+        {
+        if ( iNwRegStatus == RPacketService::ERegisteredOnHomeNetwork ||
+             iNwRegStatus == RPacketService::ERegisteredRoaming ||
+             iNwRegStatus == RPacketService::ENotRegisteredButAvailable )
+            {
+            iCoverage = ETrue;
+            }
+        iWait.AsyncStop();
+        }
+    else
+        // something went wrong -> no coverage.
+        {
+        iWait.AsyncStop();
+        }
+
+    OstTraceFunctionExit0( CCMPDCOVERAGECHECK_RUNL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::IsThereCoverageL
+// ----------------------------------------------------------------------------
+//
+TBool CCmPDCoverageCheck::IsThereCoverageL()
+    {
+    OstTraceFunctionEntry0( CCMPDCOVERAGECHECK_ISTHERECOVERAGEL_ENTRY );
+
+    iCoverage = EFalse;
+
+    if ( !IsPhoneOfflineL() )
+        {
+        User::LeaveIfError( iServer.Connect() );
+
+        RTelServer::TPhoneInfo info;
+        User::LeaveIfError( iServer.GetPhoneInfo( 0, info ) );
+
+        User::LeaveIfError( iPhone.Open(iServer, info.iName ) );
+
+        User::LeaveIfError( iService.Open( iPhone ) );
+
+        iService.GetNtwkRegStatus( iStatus, iNwRegStatus );
+        SetActive();
+        iWait.Start();
+
+        User::LeaveIfError( iStatus.Int() );
+        }
+
+    OstTraceFunctionExit0( CCMPDCOVERAGECHECK_ISTHERECOVERAGEL_EXIT );
+    return iCoverage;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::IsPhoneOfflineL
+// ----------------------------------------------------------------------------
+//
+TBool CCmPDCoverageCheck::IsPhoneOfflineL() const
+    {
+    OstTraceFunctionEntry0( CCMPDCOVERAGECHECK_ISPHONEOFFLINEL_ENTRY );
+
+    if ( FeatureManager::FeatureSupported( KFeatureIdOfflineMode ) )
+        {
+        CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs );
+        TInt connAllowed( ECoreAppUIsNetworkConnectionAllowed );
+
+        repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed );
+        CleanupStack::PopAndDestroy( repository );
+
+        if ( !connAllowed )
+            {
+            OstTraceFunctionExit0( CCMPDCOVERAGECHECK_ISPHONEOFFLINEL_EXIT );
+            return ETrue;
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPDCOVERAGECHECK_ISPHONEOFFLINEL_EXIT );
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::NewL
+// ----------------------------------------------------------------------------
+//
+CCmPluginPacketData* CCmPluginPacketData::NewL(
+        TCmPluginInitParam* aInitParam )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_NEWL_ENTRY );
+
+    CCmPluginPacketData* self = new( ELeave ) CCmPluginPacketData( aInitParam, ETrue );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_NEWL_EXIT );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::~CCmPluginPacketData
+// ----------------------------------------------------------------------------
+//
+CCmPluginPacketData::~CCmPluginPacketData()
+    {
+    OstTraceFunctionEntry1( CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_ENTRY, this );
+
+    ResetBearerRecords();
+
+    OstTraceFunctionExit1( CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT, this );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CreateInstanceL
+// ----------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmPluginPacketData::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CREATEINSTANCEL_ENTRY );
+
+    CCmPluginPacketData* self = new( ELeave ) CCmPluginPacketData( &aInitParam, ETrue );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CREATEINSTANCEL_EXIT );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CCmPluginPacketData
+// ----------------------------------------------------------------------------
+//
+CCmPluginPacketData::CCmPluginPacketData(
+        TCmPluginInitParam* aInitParam,
+        TBool aOutgoing )
+        :
+        CCmPluginBaseEng( aInitParam ),
+        iOutgoing( aOutgoing )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_ENTRY );
+
+    iBearerType = KUidPacketDataBearerType;
+    iBearerRecordId = 0;
+    iBearerRecordName = NULL;
+    iPacketDataQoSRecord = NULL;
+    iBearerPriorityTableId = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CONSTRUCTL_ENTRY );
+
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
+
+    CCmPluginBaseEng::ConstructL();
+
+    // Get bearer priority table ID.
+    TRAP_IGNORE( iBearerPriorityTableId =
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iSession ) );
+
+    if ( !iBearerPriorityTableId )
+        {
+        iBearerPriorityTableId =
+                CCDGlobalBearerTypePriorizationRecord::CreateTableL( iSession );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CONSTRUCTL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CanHandleIapIdL()
+// ----------------------------------------------------------------------------
+//
+TBool CCmPluginPacketData::CanHandleIapIdL( TUint32 aIapId ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+
+    CleanupStack::PushL( iapRecord );
+    iapRecord->SetRecordId( aIapId );
+
+    TRAPD( err, iapRecord->LoadL( iSession ));
+
+    if ( !err )
+        {
+        retVal = CanHandleIapIdL( iapRecord );
+        }
+
+    CleanupStack::PopAndDestroy( iapRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CanHandleIapIdL()
+// ----------------------------------------------------------------------------
+//
+TBool CCmPluginPacketData::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    if ( ( TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameOutgoingWCDMA ) ||
+            TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameIncomingWCDMA )) &&
+            TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameModemBearer ) )
+        {
+        retVal = ETrue;
+        }
+
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::PreparePluginToLoadRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::PreparePluginToLoadRecordsL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::PreparePluginToUpdateRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::PreparePluginToUpdateRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_PREPAREPLUGINTOUPDATERECORDSL_ENTRY );
+
+    //TODO, Add null checks for mandatory specific record pointers.
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            aGenRecordArray[KIapRecordIndex] );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+            aGenRecordArray[KServiceRecordIndex] );
+
+    CheckIfNameModifiedL( iapRecord, serviceRecord );
+
+    CheckDNSServerAddressL( ETrue,
+            serviceRecord->iGPRSIP6NameServer1,
+            serviceRecord->iGPRSIP6NameServer2,
+            serviceRecord->iGPRSIP6DNSAddrFromServer );
+
+    CheckDNSServerAddressL( EFalse,
+            serviceRecord->iGPRSIPNameServer1,
+            serviceRecord->iGPRSIPNameServer2,
+            serviceRecord->iGPRSIPDNSAddrFromServer );
+
+    SetDaemonNameL( aGenRecordArray, aBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_PREPAREPLUGINTOUPDATERECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetDaemonNameL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetDaemonNameL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETDAEMONNAMEL_ENTRY );
+
+    // Use DHCP if we can.
+    TBool ipfromSrv = GetBearerBoolAttributeL( EPacketDataIPAddrFromServer,
+                                               aGenRecordArray,
+                                               aBearerSpecRecordArray );
+    if ( ipfromSrv )
+        {
+        SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                   KDaemonManagerName,
+                                   aGenRecordArray,
+                                   aBearerSpecRecordArray );
+        SetBearerStringAttributeL( ECmConfigDaemonName,
+                                   KConfigDaemonName,
+                                   aGenRecordArray,
+                                   aBearerSpecRecordArray );
+        }
+    else
+        {
+        if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) )
+            {
+            SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                       KDaemonManagerName,
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            SetBearerStringAttributeL( ECmConfigDaemonName,
+                                       KConfigDaemonName,
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            }
+        else
+            {
+            SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                       KNullDesC(),
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            SetBearerStringAttributeL( ECmConfigDaemonName,
+                                       KNullDesC(),
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETDAEMONNAMEL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::LoadBearerRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::LoadBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_LOADBEARERRECORDSL_ENTRY );
+
+    if ( ServiceRecord().iUmtsR99QoSAndOnTable )
+        {
+        iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+
+        iPacketDataQoSRecord->SetRecordId( ServiceRecord().iUmtsR99QoSAndOnTable );
+        iPacketDataQoSRecord->LoadL( iSession );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_LOADBEARERRECORDSL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::LoadServiceRecordL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::LoadServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_LOADSERVICERECORDL_ENTRY );
+
+    if ( TPtrC( KCDTypeNameOutgoingWCDMA ) == iIapRecord->iServiceType )
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        iOutgoing = ETrue;
+        }
+    else if ( TPtrC( KCDTypeNameIncomingWCDMA ) == iIapRecord->iServiceType )
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
+        iOutgoing = EFalse;
+        }
+    else
+        // this IAP service is not supported by this plugin.
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    iServiceRecord->SetRecordId( iIapRecord->iService );
+    TRAPD( err, iServiceRecord->LoadL( iSession ) );
+    if ( err == KErrNotFound )
+        // record not found -> create a default one
+        {
+        CreateServiceRecordL();
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_LOADSERVICERECORDL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::ServiceRecord()
+// ----------------------------------------------------------------------------
+//
+CCDWCDMAPacketServiceRecord& CCmPluginPacketData::ServiceRecord() const
+    {
+    return *static_cast<CCDWCDMAPacketServiceRecord*>( iServiceRecord );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CreateServiceRecordL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::CreateServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CREATESERVICERECORDL_ENTRY );
+
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    if ( iOutgoing )
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        }
+    else
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
+        }
+
+    ServiceRecord().iGPRSAPN.SetL( KNullDesC );
+    ServiceRecord().iGPRSPDPType.SetL( RPacketContext::EPdpTypeIPv4 );
+    ServiceRecord().iGPRSReqPrecedence = 0;
+    ServiceRecord().iGPRSReqDelay = 0;
+    ServiceRecord().iGPRSReqReliability = 0;
+    ServiceRecord().iGPRSReqPeakThroughput = 0;
+    ServiceRecord().iGPRSReqMeanThroughput = 0;
+    ServiceRecord().iGPRSMinPrecedence = 0;
+    ServiceRecord().iGPRSMinDelay = 0;
+    ServiceRecord().iGPRSMinReliability = 0;
+    ServiceRecord().iGPRSMinPeakThroughput = 0;
+    ServiceRecord().iGPRSMinMeanThroughput = 0;
+    ServiceRecord().iGPRSDataCompression = 0;
+    ServiceRecord().iGPRSHeaderCompression = 0;
+    ServiceRecord().iGPRSAnonymousAccess = 0;
+    ServiceRecord().iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv4 );
+    ServiceRecord().iGPRSIfPromptForAuth = EFalse;
+    ServiceRecord().iGPRSIfAuthRetries = 0;
+    ServiceRecord().iGPRSIPGateway.SetL( KUnspecifiedIPv4 );
+    ServiceRecord().iGPRSIPAddrFromServer = ETrue;
+    ServiceRecord().iGPRSIPAddr.SetL( KUnspecifiedIPv4 );
+    ServiceRecord().iGPRSIPDNSAddrFromServer = ETrue;
+    ServiceRecord().iGPRSIPNameServer1.SetL( KUnspecifiedIPv4 );
+    ServiceRecord().iGPRSIPNameServer2.SetL( KUnspecifiedIPv4 );
+    ServiceRecord().iGPRSIP6DNSAddrFromServer = ETrue;
+    ServiceRecord().iGPRSIP6NameServer1.SetL( KDynamicIpv6Address );
+    ServiceRecord().iGPRSIP6NameServer2.SetL( KDynamicIpv6Address );
+    ServiceRecord().iGPRSEnableLCPExtension = EFalse;
+    ServiceRecord().iGPRSDisablePlainTextAuth = ETrue;
+    ServiceRecord().iGPRSAPType = EPacketDataBoth;
+    ServiceRecord().iGPRSQOSWarningTimeOut = TUint32(-1);
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CREATESERVICERECORDL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::ServiceRecordId
+// ----------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::ServiceRecordId() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SERVICERECORDID_ENTRY );
+
+    return ServiceRecord().RecordId();
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::ServiceRecordIdLC
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::ServiceRecordNameLC( HBufC* &aName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SERVICERECORDNAMELC_ENTRY );
+
+    if ( iOutgoing )
+        {
+        aName = TPtrC( KCDTypeNameOutgoingWCDMA ).AllocLC();
+        }
+    else
+        {
+        aName = TPtrC( KCDTypeNameIncomingWCDMA ).AllocLC();
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SERVICERECORDNAMELC_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::BearerRecordIdL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::BearerRecordIdL( TUint32& aRecordId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_BEARERRECORDIDL_ENTRY );
+
+    CMDBRecordSet<CCDModemBearerRecord>* bearerRS =
+            new( ELeave ) CMDBRecordSet<CCDModemBearerRecord>( KCDTIdModemBearerRecord );
+    CleanupStack::PushL( bearerRS );
+
+    CCDModemBearerRecord* bearerRecord = static_cast<CCDModemBearerRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdModemBearerRecord ) );
+
+    CleanupStack::PushL( bearerRecord );
+
+    bearerRecord->iRecordName.SetL( KModemBearerPacketData );
+    bearerRS->iRecords.AppendL( bearerRecord );
+    CleanupStack::Pop( bearerRecord );
+
+    if ( bearerRS->FindL( iSession ) )
+        {
+        bearerRecord = static_cast<CCDModemBearerRecord*>( bearerRS->iRecords[0] );
+        aRecordId = bearerRecord->RecordId();
+        }
+    else
+        // bearer not found -> create dummy values
+        {
+        bearerRecord->SetRecordId( KCDNewRecordRequest );
+        bearerRecord->StoreL( iSession );
+
+        aRecordId = bearerRecord->RecordId();
+        }
+
+    CleanupStack::PopAndDestroy( bearerRS );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_BEARERRECORDIDL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::BearerRecordNameLC()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::BearerRecordNameLC( HBufC*& aBearerName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_BEARERRECORDNAMELC_ENTRY );
+
+    aBearerName = TPtrC( KCDTypeNameModemBearer ).AllocLC();
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_BEARERRECORDNAMELC_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::CheckNetworkCoverageL()
+// ----------------------------------------------------------------------------
+//
+TBool CCmPluginPacketData::CheckNetworkCoverageL() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CHECKNETWORKCOVERAGEL_ENTRY );
+
+    TBool retVal( EFalse );
+
+#ifdef __WINS__
+    retVal = ETrue;
+#else
+    CCmPDCoverageCheck* coverage = new( ELeave ) CCmPDCoverageCheck;
+    CleanupStack::PushL( coverage );
+
+    retVal = coverage->IsThereCoverageL();
+
+    CleanupStack::PopAndDestroy( coverage );
+
+#endif  // __WINS
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CHECKNETWORKCOVERAGEL_EXIT );
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginPacketData::SetPDPTypeL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetPDPTypeL(
+        RPacketContext::TProtocolType aPdpType,
+        CCDWCDMAPacketServiceRecord* aServiceRecord )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETPDPTYPEL_ENTRY );
+
+    if ( aPdpType == RPacketContext::EPdpTypeIPv6 )
+        {
+        aServiceRecord->iGPRSPDPType = RPacketContext::EPdpTypeIPv6;
+        aServiceRecord->iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv6 );
+        }
+    else if ( aPdpType == RPacketContext::EPdpTypeIPv4 )
+        {
+        aServiceRecord->iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv4 );
+        aServiceRecord->iGPRSPDPType = RPacketContext::EPdpTypeIPv4;
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETPDPTYPEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::CreateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::CreateBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CREATEBEARERRECORDSL_ENTRY );
+
+    delete iPacketDataQoSRecord;
+    iPacketDataQoSRecord = NULL;
+
+    iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+
+    iPacketDataQoSRecord->iGPRSReqTrafficClass = RPacketQoS::ETrafficClassUnspecified;
+    iPacketDataQoSRecord->iGPRSMinTrafficClass = RPacketQoS::ETrafficClassUnspecified;
+    iPacketDataQoSRecord->iGPRSReqDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
+    iPacketDataQoSRecord->iGPRSMinDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
+    iPacketDataQoSRecord->iGPRSReqDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    iPacketDataQoSRecord->iGPRSMinDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    iPacketDataQoSRecord->iGPRSReqMaxSDUSize = 0;
+    iPacketDataQoSRecord->iGPRSMinAcceptableMaxSDUSize = 0;
+    iPacketDataQoSRecord->iGPRSReqMaxUplinkRate = 0;
+    iPacketDataQoSRecord->iGPRSReqMinUplinkRate = 0;
+    iPacketDataQoSRecord->iGPRSReqMaxDownlinkRate = 0;
+    iPacketDataQoSRecord->iGPRSReqMinDownlinkRate = 0;
+    iPacketDataQoSRecord->iGPRSReqBER = RPacketQoS::EBERUnspecified;
+    iPacketDataQoSRecord->iGPRSMaxBER = RPacketQoS::EBERUnspecified;
+    iPacketDataQoSRecord->iGPRSReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
+    iPacketDataQoSRecord->iGPRSMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
+    iPacketDataQoSRecord->iGPRSReqTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    iPacketDataQoSRecord->iGPRSMinTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    iPacketDataQoSRecord->iGPRSReqTransferDelay = 0;
+    iPacketDataQoSRecord->iGPRSMaxTransferDelay = 0;
+    iPacketDataQoSRecord->iGPRSReqGuaranteedUplinkRate = 0;
+    iPacketDataQoSRecord->iGPRSMinGuaranteedUplinkRate = 0;
+    iPacketDataQoSRecord->iGPRSReqGuaranteedDownlinkRate = 0;
+    iPacketDataQoSRecord->iGPRSMinGuaranteedDownlinkRate = 0;
+    iPacketDataQoSRecord->iGPRSSignallingIndication = EFalse;
+    iPacketDataQoSRecord->iGPRS_ImCnSignallingIndication = EFalse;
+    iPacketDataQoSRecord->iGPRSSourceStatisticsDescriptor =
+            RPacketQoS::ESourceStatisticsDescriptorUnknown;
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CREATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::UpdateServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::UpdateServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_ENTRY );
+
+    // Delete the original record and create a copy from the parameter.
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    if ( iOutgoing )
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        }
+    else
+        {
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
+        }
+
+    CCDWCDMAPacketServiceRecord* origServiceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>( iServiceRecord );
+
+    // Client's copy of packet service record.
+    CCDWCDMAPacketServiceRecord* clientServiceRecordCopy =
+            static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    CopyRecordFieldsL( *clientServiceRecordCopy, *origServiceRecord );
+
+    if ( iPacketDataQoSRecord )
+        {
+        origServiceRecord->iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
+        }
+
+    origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() );
+
+    if ( !origServiceRecord->RecordId() )
+        {
+        origServiceRecord->SetRecordId( KCDNewRecordRequest );
+        origServiceRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        origServiceRecord->LoadL( iSession );
+
+        // Update received element ID to client's copy too.
+        clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() );
+        }
+    else
+        {
+        origServiceRecord->ModifyL( iSession );
+        }
+
+    CopyRecordFieldsL( *origServiceRecord, *clientServiceRecordCopy );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::UpdateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::UpdateBearerRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_UPDATEBEARERRECORDSL_ENTRY );
+
+    CCDUmtsR99QoSAndOnTableRecord* packetDataQoSRecord =
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>( aBearerSpecRecordArray[KQosRecordIndex] );
+
+    delete iPacketDataQoSRecord;
+    iPacketDataQoSRecord = NULL;
+    iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+    CopyRecordFieldsL( *packetDataQoSRecord, *iPacketDataQoSRecord );
+    iPacketDataQoSRecord->SetElementId( aBearerSpecRecordArray[KQosRecordIndex]->ElementId() );
+
+    if ( !iPacketDataQoSRecord->RecordId() )
+        {
+        iPacketDataQoSRecord->SetRecordId( KCDNewRecordRequest );
+        iPacketDataQoSRecord->StoreL( iSession );
+        iPacketDataQoSRecord->LoadL( iSession );
+        packetDataQoSRecord->SetElementId( iPacketDataQoSRecord->ElementId() );
+
+        // Set service record to point to QoS record.
+        ServiceRecord().iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
+        ServiceRecord().ModifyL( iSession );
+
+        CCDWCDMAPacketServiceRecord* serviceRecord =
+                static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+        serviceRecord->iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
+        }
+    else
+        {
+        iPacketDataQoSRecord->ModifyL( iSession );
+        }
+
+    CopyRecordFieldsL( *iPacketDataQoSRecord, *packetDataQoSRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerSpecificRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::GetBearerSpecificRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERSPECIFICRECORDSL_ENTRY );
+
+    if ( !iPacketDataQoSRecord )
+        {
+        // IAP not yet in CommDat.
+        GetDefaultQosRecordL( aRecordArray );
+        }
+    else
+        {
+        CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+        CleanupStack::PushL( qosRecord );
+        CopyRecordFieldsL( *iPacketDataQoSRecord, *qosRecord );
+        qosRecord->SetElementId( iPacketDataQoSRecord->ElementId() );
+        aRecordArray.AppendL( static_cast<CommsDat::CCDRecordBase*>( qosRecord ) );
+        CleanupStack::Pop( qosRecord );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERSPECIFICRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetDefaultServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::GetDefaultServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETDEFAULTSERVICERECORDL_ENTRY );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord( NULL );
+    if ( iOutgoing )
+        {
+        serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        }
+    else
+        {
+        serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        }
+
+    CleanupStack::PushL( serviceRecord );
+    serviceRecord->iGPRSAPN.SetL( KNullDesC );
+    serviceRecord->iGPRSPDPType.SetL( RPacketContext::EPdpTypeIPv4 );
+    serviceRecord->iGPRSReqPrecedence = 0;
+    serviceRecord->iGPRSReqDelay = 0;
+    serviceRecord->iGPRSReqReliability = 0;
+    serviceRecord->iGPRSReqPeakThroughput = 0;
+    serviceRecord->iGPRSReqMeanThroughput = 0;
+    serviceRecord->iGPRSMinPrecedence = 0;
+    serviceRecord->iGPRSMinDelay = 0;
+    serviceRecord->iGPRSMinReliability = 0;
+    serviceRecord->iGPRSMinPeakThroughput = 0;
+    serviceRecord->iGPRSMinMeanThroughput = 0;
+    serviceRecord->iGPRSDataCompression = EFalse;
+    serviceRecord->iGPRSHeaderCompression = EFalse;
+    serviceRecord->iGPRSAnonymousAccess = EFalse;
+    serviceRecord->iGPRSIfNetworks.SetL( KDefIspIfNetworksIPv4 );
+    serviceRecord->iGPRSIfPromptForAuth = EFalse;
+    serviceRecord->iGPRSIfAuthRetries = 0;
+    serviceRecord->iGPRSIPGateway.SetL( KUnspecifiedIPv4 );
+    serviceRecord->iGPRSIPAddrFromServer = ETrue;
+    serviceRecord->iGPRSIPAddr.SetL( KUnspecifiedIPv4 );
+    serviceRecord->iGPRSIPDNSAddrFromServer = ETrue;
+    serviceRecord->iGPRSIPNameServer1.SetL( KUnspecifiedIPv4 );
+    serviceRecord->iGPRSIPNameServer2.SetL( KUnspecifiedIPv4 );
+    serviceRecord->iGPRSIP6DNSAddrFromServer = ETrue;
+    serviceRecord->iGPRSIP6NameServer1.SetL( KDynamicIpv6Address );
+    serviceRecord->iGPRSIP6NameServer2.SetL( KDynamicIpv6Address );
+    serviceRecord->iGPRSEnableLCPExtension = EFalse;
+    serviceRecord->iGPRSDisablePlainTextAuth = ETrue;
+    serviceRecord->iGPRSAPType = EPacketDataBoth;
+    serviceRecord->iGPRSQOSWarningTimeOut = TUint32(-1);
+
+    aRecordArray.AppendL( static_cast<CommsDat::CCDRecordBase*>( serviceRecord ) );
+    CleanupStack::Pop( serviceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETDEFAULTSERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetDefaultQosRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::GetDefaultQosRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETDEFAULTQOSRECORDL_ENTRY );
+
+    CCDUmtsR99QoSAndOnTableRecord* packetDataQoSRecord =
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+    CleanupStack::PushL( packetDataQoSRecord );
+
+    packetDataQoSRecord->iGPRSReqTrafficClass = RPacketQoS::ETrafficClassUnspecified;
+    packetDataQoSRecord->iGPRSMinTrafficClass = RPacketQoS::ETrafficClassUnspecified;
+    packetDataQoSRecord->iGPRSReqDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
+    packetDataQoSRecord->iGPRSMinDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
+    packetDataQoSRecord->iGPRSReqDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    packetDataQoSRecord->iGPRSMinDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    packetDataQoSRecord->iGPRSReqMaxSDUSize = 0;
+    packetDataQoSRecord->iGPRSMinAcceptableMaxSDUSize = 0;
+    packetDataQoSRecord->iGPRSReqMaxUplinkRate = 0;
+    packetDataQoSRecord->iGPRSReqMinUplinkRate = 0;
+    packetDataQoSRecord->iGPRSReqMaxDownlinkRate = 0;
+    packetDataQoSRecord->iGPRSReqMinDownlinkRate = 0;
+    packetDataQoSRecord->iGPRSReqBER = RPacketQoS::EBERUnspecified;
+    packetDataQoSRecord->iGPRSMaxBER = RPacketQoS::EBERUnspecified;
+    packetDataQoSRecord->iGPRSReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
+    packetDataQoSRecord->iGPRSMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
+    packetDataQoSRecord->iGPRSReqTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    packetDataQoSRecord->iGPRSMinTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    packetDataQoSRecord->iGPRSReqTransferDelay = 0;
+    packetDataQoSRecord->iGPRSMaxTransferDelay = 0;
+    packetDataQoSRecord->iGPRSReqGuaranteedUplinkRate = 0;
+    packetDataQoSRecord->iGPRSMinGuaranteedUplinkRate = 0;
+    packetDataQoSRecord->iGPRSReqGuaranteedDownlinkRate = 0;
+    packetDataQoSRecord->iGPRSMinGuaranteedDownlinkRate = 0;
+    packetDataQoSRecord->iGPRSSignallingIndication = EFalse;
+    packetDataQoSRecord->iGPRS_ImCnSignallingIndication = EFalse;
+    packetDataQoSRecord->iGPRSSourceStatisticsDescriptor =
+            RPacketQoS::ESourceStatisticsDescriptorUnknown;
+
+    aRecordArray.AppendL( static_cast<CommsDat::CCDRecordBase*>( packetDataQoSRecord ) );
+    CleanupStack::Pop( packetDataQoSRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETDEFAULTQOSRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerIntAttributeL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::GetBearerIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    if ( aAttribute < ECmCommonAttributesEnd ||
+            ( aAttribute > ECmBearerCreationCommonAttributes &&
+              aAttribute < ECmBearerCreationCommonAttributesEnd ) )
+        {
+        switch ( aAttribute )
+            {
+            case ECmBearerType:
+                {
+                retVal = iBearerType;
+                }
+                break;
+            case ECmCommsDBBearerType:
+                {
+                retVal = KCommDbBearerWcdma;
+                }
+                break;
+            case ECmDefaultUiPriority:
+                {
+                retVal = GetDefPriorityL( aAttribute );
+                }
+                break;
+            case ECmDefaultPriority:
+                {
+                retVal = GetDefPriorityL( aAttribute );
+                }
+                break;
+            case ECmExtensionLevel:
+                {
+                retVal = KExtensionBaseLevel;
+                }
+                break;
+            case ECmInvalidAttribute:
+                {
+                // This attribute has been deprecated since Symbian^4.
+                User::Leave( KErrNotSupported );
+                }
+                break;
+            case ECmIFAuthRetries:
+                {
+                retVal = serviceRecord->iGPRSIfAuthRetries;
+                }
+                break;
+            default:
+                {
+                User::Leave( KErrNotFound ); //TODO, check leave code, should it be KErrNotSupported ?
+                }
+                break;
+            }
+
+        OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINTATTRIBUTEL_EXIT );
+        return retVal;
+        }
+
+    if ( aAttribute >= EPacketDataSpecificAttributes &&
+            aAttribute < EPacketDataServiceEnableLLMNR )
+        {
+        retVal = GetServiceIntAttributeL( aAttribute, aGenRecordArray );
+        }
+    else if ( aAttribute >= EGPRSReqTrafficClass &&
+            aAttribute <= EGPRSSourceStatisticsDescriptor )
+        {
+        retVal = GetQosIntAttributeL( aAttribute, aBearerSpecRecordArray );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_GETBEARERINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetServiceIntAttributeL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::GetServiceIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETSERVICEINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EPacketDataPDPType:
+            {
+            retVal = serviceRecord->iGPRSPDPType;
+            }
+            break;
+
+        case EPacketDataReqPrecedence:
+            {
+            retVal = serviceRecord->iGPRSReqPrecedence;
+            }
+            break;
+
+        case EPacketDataReqDelay:
+            {
+            retVal = serviceRecord->iGPRSReqDelay;
+            }
+            break;
+
+        case EPacketDataReliability:
+            {
+            retVal = serviceRecord->iGPRSReqReliability;
+            }
+            break;
+
+        case EPacketDataPeakThroughput:
+            {
+            retVal = serviceRecord->iGPRSReqPeakThroughput;
+            }
+            break;
+
+        case EPacketDataMeanThroughput:
+            {
+            retVal = serviceRecord->iGPRSMinMeanThroughput;
+            }
+            break;
+
+        case EPacketDataMinPrecedence:
+            {
+            retVal = serviceRecord->iGPRSMinPrecedence;
+            }
+            break;
+
+        case EPacketDataMinDelay:
+            {
+            retVal = serviceRecord->iGPRSMinDelay;
+            }
+            break;
+
+        case EPacketDataMinReliability:
+            {
+            retVal = serviceRecord->iGPRSMinReliability;
+            }
+            break;
+
+        case EPacketDataMinPeakThroughput:
+            {
+            retVal = serviceRecord->iGPRSMinPeakThroughput;
+            }
+            break;
+
+        case EPacketDataMinMeanThroughput:
+            {
+            retVal = serviceRecord->iGPRSMinMeanThroughput;
+            }
+            break;
+
+        case EPacketDataIFAuthRetries:
+            {
+            retVal = serviceRecord->iGPRSIfAuthRetries;
+            }
+            break;
+
+        case EPacketDataApType:
+            {
+            retVal = serviceRecord->iGPRSAPType;
+            }
+            break;
+
+        case EPacketDataQoSWarningTimeOut:
+            {
+            retVal = serviceRecord->iGPRSQOSWarningTimeOut;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETSERVICEINTATTRIBUTEL_EXIT );
+
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetQosIntAttributeL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::GetQosIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETQOSINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            aBearerSpecRecordArray[KQosRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EGPRSReqTrafficClass:
+            {
+            retVal = qosRecord->iGPRSReqTrafficClass;
+            }
+            break;
+
+        case EGPRSMinTrafficClass:
+            {
+            retVal = qosRecord->iGPRSMinTrafficClass;
+            }
+            break;
+
+        case EGPRSReqDeliveryOrder:
+            {
+            retVal = qosRecord->iGPRSReqDeliveryOrder;
+            }
+            break;
+
+        case GPRSMinDeliveryOrder:
+            {
+            retVal = qosRecord->iGPRSMinDeliveryOrder;
+            }
+            break;
+        case EGPRSReqDeliverErroneousSDU:
+            {
+            retVal = qosRecord->iGPRSReqDeliverErroneousSDU;
+            }
+            break;
+        case EGPRSMinDeliverErroneousSDU:
+            {
+            retVal = qosRecord->iGPRSMinDeliverErroneousSDU;
+            }
+            break;
+        case EGPRSReqMaxSDUSize:
+            {
+            retVal = qosRecord->iGPRSReqMaxSDUSize;
+            }
+            break;
+
+        case EGPRSMinAcceptableMaxSDUSize:
+            {
+            retVal = qosRecord->iGPRSMinAcceptableMaxSDUSize;
+            }
+            break;
+
+        case EGPRSReqMaxUplinkRate:
+            {
+            retVal = qosRecord->iGPRSReqMaxUplinkRate;
+            }
+            break;
+
+        case EGPRSReqMinUplinkRate:
+            {
+            retVal = qosRecord->iGPRSReqMinUplinkRate;
+            }
+            break;
+
+        case EGPRSReqMaxDownlinkRate:
+            {
+            retVal = qosRecord->iGPRSReqMaxDownlinkRate;
+            }
+            break;
+
+        case EGPRSReqMinDownlinkRate:
+            {
+            retVal = qosRecord->iGPRSReqMinDownlinkRate;
+            }
+            break;
+
+        case EGPRSReqBER:
+            {
+            retVal = qosRecord->iGPRSReqBER;
+            }
+            break;
+
+        case EGPRSMaxBER:
+            {
+            retVal = qosRecord->iGPRSMaxBER;
+            }
+            break;
+
+        case EGPRSReqSDUErrorRatio:
+            {
+            retVal = qosRecord->iGPRSReqSDUErrorRatio;
+            }
+            break;
+
+        case EGPRSMaxSDUErrorRatio:
+            {
+            retVal = qosRecord->iGPRSMaxSDUErrorRatio;
+            }
+            break;
+
+        case EGPRSReqTrafficHandlingPriority:
+            {
+            retVal = qosRecord->iGPRSReqTrafficHandlingPriority;
+            }
+            break;
+
+        case EGPRSMinTrafficHandlingPriority:
+            {
+            retVal = qosRecord->iGPRSMinTrafficHandlingPriority;
+            }
+            break;
+
+        case EGPRSReqTransferDelay:
+            {
+            retVal = qosRecord->iGPRSReqTransferDelay;
+            }
+            break;
+
+        case EGPRSMaxTransferDelay:
+            {
+            retVal = qosRecord->iGPRSMaxTransferDelay;
+            }
+            break;
+
+        case EGPRSReqGuaranteedUplinkRate:
+            {
+            retVal = qosRecord->iGPRSReqGuaranteedUplinkRate;
+            }
+            break;
+
+        case EGPRSMinGuaranteedUplinkRate:
+            {
+            retVal = qosRecord->iGPRSMinGuaranteedUplinkRate;
+            }
+            break;
+
+        case EGPRSReqGuaranteedDownlinkRate:
+            {
+            retVal = qosRecord->iGPRSReqGuaranteedDownlinkRate;
+            }
+            break;
+
+        case EGPRSMinGuaranteedDownlinkRate:
+            {
+            retVal = qosRecord->iGPRSMinGuaranteedDownlinkRate;
+            }
+            break;
+
+        case EGPRSSourceStatisticsDescriptor:
+            {
+            retVal = qosRecord->iGPRSSourceStatisticsDescriptor;
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETQOSINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginPacketData::GetBearerBoolAttributeL( TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    switch ( aAttribute )
+        {
+        case EPacketDataOutGoing:
+            {
+            retVal = iOutgoing;
+            }
+            break;
+        case ECmCoverage:
+            {
+#ifndef __WINS__
+            CCmPDCoverageCheck* coverage = new( ELeave ) CCmPDCoverageCheck;
+            CleanupStack::PushL( coverage );
+
+            retVal = coverage->IsThereCoverageL();
+
+            CleanupStack::PopAndDestroy( coverage );
+#else
+            retVal = ETrue;
+#endif
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = ETrue;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case EPacketDataDataCompression:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSDataCompression;
+            }
+            break;
+        case EPacketDataHeaderCompression:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSHeaderCompression;
+            }
+            break;
+        case EPacketDataUseEdge:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSUseEdge;
+            }
+            break;
+        case EPacketDataAnonymousAccess:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSAnonymousAccess;
+            }
+            break;
+        case ECmIFPromptForAuth:
+        case EPacketDataIFPromptForAuth:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSIfPromptForAuth;
+            }
+            break;
+        case ECmIPAddFromServer:
+        case EPacketDataIPAddrFromServer:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSIPAddrFromServer;
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case EPacketDataIPDNSAddrFromServer:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSIPDNSAddrFromServer;
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case EPacketDataIPIP6DNSAddrFromServer:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSIP6DNSAddrFromServer;
+            }
+            break;
+        case ECmEnableLPCExtension:
+        case EPacketDataEnableLcpExtension:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSEnableLCPExtension;
+            }
+            break;
+        case EPacketDataServiceEnableLLMNR:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iServiceEnableLlmnr;
+            }
+            break;
+        case ECmDisablePlainTextAuth:
+        case EPacketDataDisablePlainTextAuth:
+            {
+            retVal = static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] )->iGPRSDisablePlainTextAuth;
+            }
+            break;
+        case EGPRSSignallingIndication:
+            {
+            retVal = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                    aBearerSpecRecordArray[KQosRecordIndex] )->iGPRSSignallingIndication;
+            }
+            break;
+        case EGPRS_ImCnSignallingIndication:
+            {
+            retVal = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                    aBearerSpecRecordArray[KQosRecordIndex] )->iGPRS_ImCnSignallingIndication;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerStringAttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginPacketData::GetBearerStringAttributeL( TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    HBufC* retVal( NULL );
+    if ( ( aAttribute > EPacketDataSpecificAttributes && aAttribute < EGPRSReqTrafficClass ) ||
+            ( aAttribute > ECmCommonAttributesStart && aAttribute < ECmCommonAttributesEnd ) )
+        {
+        retVal = GetServiceStringAttributeL( aAttribute, aGenRecordArray );
+        }
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERSTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetServiceStringAttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginPacketData::GetServiceStringAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETSERVICESTRINGATTRIBUTEL_ENTRY );
+
+    HBufC* retVal = NULL;
+
+    CCDWCDMAPacketServiceRecord* serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+    switch ( aAttribute )
+        {
+        case ECmIFName:
+        case EPacketDataAPName:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSAPN ).AllocL();
+            }
+            break;
+        case EPacketDataPDPAddress:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSPDPAddress ).AllocL();
+            }
+            break;
+        case ECmIFParams:
+        case EPacketDataIFParams:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIfParams ).AllocL();
+            }
+            break;
+        case ECmIFNetworks:
+        case EPacketDataIFNetworks:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIfNetworks ).AllocL();
+            }
+            break;
+        case ECmIFAuthName:
+        case EPacketDataIFAuthName:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIfAuthName ).AllocL();
+            }
+            break;
+        case ECmIFAuthPass:
+        case EPacketDataIFAuthPass:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIfAuthPass ).AllocL();
+            }
+            break;
+        case ECmIPNetmask:
+        case EPacketDataIPNetmask:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPNetMask ).AllocL();
+            }
+            break;
+        case ECmIPGateway:
+        case EPacketDataIPGateway:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPGateway ).AllocL();
+            }
+            break;
+        case ECmIPAddress:
+        case EPacketDataIPAddr:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPAddr ).AllocL();
+            }
+            break;
+        case ECmIPNameServer1:
+        case EPacketDataIPNameServer1:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPNameServer1 ).AllocL();
+            }
+            break;
+        case ECmIPNameServer2:
+        case EPacketDataIPNameServer2:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPNameServer2 ).AllocL();
+            }
+            break;
+        case ECmIP6NameServer1:
+        case EPacketDataIPIP6NameServer1:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIP6NameServer1 ).AllocL();
+            }
+            break;
+        case ECmIP6NameServer2:
+        case EPacketDataIPIP6NameServer2:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIP6NameServer2 ).AllocL();
+            }
+            break;
+        case ECmIPAddrLeaseValidFrom:
+        case EPacketDataIPAddrLeaseValidFrom:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidFrom ).AllocL();
+            }
+            break;
+        case ECmIPAddrLeaseValidTo:
+        case EPacketDataIPAddrLeaseValidTo:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSIPAddrLeaseValidTo ).AllocL();
+            }
+            break;
+        case ECmConfigDaemonManagerName:
+        case EPacketDataConfigDaemonManagerName:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSConfigDaemonManagerName ).AllocL();
+            }
+            break;
+        case ECmConfigDaemonName:
+        case EPacketDataConfigDaemonName:
+            {
+            retVal = TPtrC( serviceRecord->iGPRSConfigDaemonName ).AllocL();
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETSERVICESTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerString8AttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginPacketData::GetBearerString8AttributeL( TUint32 /*aAttribute*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    User::Leave( KErrNotSupported );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERSTRING8ATTRIBUTEL_EXIT );
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetBearerIntAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetBearerIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETBEARERINTATTRIBUTEL_ENTRY );
+
+    if ( aAttribute >= EPacketDataSpecificAttributes && aAttribute < EPacketDataServiceEnableLLMNR )
+        {
+        SetServiceIntAttributeL( aAttribute, aValue, aGenRecordArray );
+        }
+    else if ( aAttribute >= EGPRSReqTrafficClass && aAttribute <= EGPRSSourceStatisticsDescriptor )
+        {
+        SetQosIntAttributeL( aAttribute, aValue, aBearerSpecRecordArray );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERINTATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetServiceIntAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetServiceIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETSERVICEINTATTRIBUTEL_ENTRY );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+            aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EPacketDataPDPType:
+            {
+            SetPDPTypeL( static_cast<RPacketContext::TProtocolType>( aValue ),
+                         serviceRecord );
+            }
+            break;
+
+        case EPacketDataReqPrecedence:
+            {
+            serviceRecord->iGPRSReqPrecedence.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataReqDelay:
+            {
+            serviceRecord->iGPRSReqDelay.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataReliability:
+            {
+            serviceRecord->iGPRSReqReliability.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataPeakThroughput:
+            {
+            serviceRecord->iGPRSReqPeakThroughput.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMeanThroughput:
+            {
+            serviceRecord->iGPRSMinMeanThroughput.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMinPrecedence:
+            {
+            serviceRecord->iGPRSMinPrecedence.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMinDelay:
+            {
+            serviceRecord->iGPRSMinDelay.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMinReliability:
+            {
+            serviceRecord->iGPRSMinReliability.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMinPeakThroughput:
+            {
+            serviceRecord->iGPRSMinPeakThroughput.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataMinMeanThroughput:
+            {
+            serviceRecord->iGPRSMinMeanThroughput.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataIFAuthRetries:
+            {
+            serviceRecord->iGPRSIfAuthRetries.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataApType:
+            {
+            serviceRecord->iGPRSAPType.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataQoSWarningTimeOut:
+            {
+            serviceRecord->iGPRSQOSWarningTimeOut.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+        }
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETSERVICEINTATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetQosIntAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetQosIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETQOSINTATTRIBUTEL_ENTRY );
+
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            aBearerSpecRecordArray[KQosRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EGPRSReqTrafficClass:
+            {
+            qosRecord->iGPRSReqTrafficClass.SetL(
+                    static_cast<RPacketQoS::TTrafficClass>( aValue ) );
+            }
+            break;
+
+        case EGPRSMinTrafficClass:
+            {
+            qosRecord->iGPRSMinTrafficClass.SetL(
+                    static_cast<RPacketQoS::TTrafficClass>( aValue ) );
+            }
+            break;
+
+        case EGPRSReqDeliveryOrder:
+            {
+            qosRecord->iGPRSReqDeliveryOrder.SetL(
+                    static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
+            }
+            break;
+
+        case GPRSMinDeliveryOrder:
+            {
+            qosRecord->iGPRSMinDeliveryOrder.SetL(
+                    static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
+            }
+            break;
+        case EGPRSReqDeliverErroneousSDU:
+            {
+            qosRecord->iGPRSReqDeliverErroneousSDU.SetL(
+                    static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
+            }
+            break;
+        case EGPRSMinDeliverErroneousSDU:
+            {
+            qosRecord->iGPRSMinDeliverErroneousSDU.SetL(
+                    static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
+            }
+            break;
+        case EGPRSReqMaxSDUSize:
+            {
+            qosRecord->iGPRSReqMaxSDUSize.SetL( aValue );
+            }
+            break;
+
+        case EGPRSMinAcceptableMaxSDUSize:
+            {
+            qosRecord->iGPRSMinAcceptableMaxSDUSize.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqMaxUplinkRate:
+            {
+            qosRecord->iGPRSReqMaxUplinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqMinUplinkRate:
+            {
+            qosRecord->iGPRSReqMinUplinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqMaxDownlinkRate:
+            {
+            qosRecord->iGPRSReqMaxDownlinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqMinDownlinkRate:
+            {
+            qosRecord->iGPRSReqMinDownlinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqBER:
+            {
+            qosRecord->iGPRSReqBER.SetL(
+                    static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
+            }
+            break;
+
+        case EGPRSMaxBER:
+            {
+            qosRecord->iGPRSMaxBER.SetL(
+                    static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
+            }
+            break;
+
+        case EGPRSReqSDUErrorRatio:
+            {
+            qosRecord->iGPRSReqSDUErrorRatio.SetL(
+                    static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
+            }
+            break;
+
+        case EGPRSMaxSDUErrorRatio:
+            {
+            qosRecord->iGPRSMaxSDUErrorRatio.SetL(
+                    static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
+            }
+            break;
+
+        case EGPRSReqTrafficHandlingPriority:
+            {
+            qosRecord->iGPRSReqTrafficHandlingPriority.SetL(
+                    static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
+            }
+            break;
+
+        case EGPRSMinTrafficHandlingPriority:
+            {
+            qosRecord->iGPRSMinTrafficHandlingPriority.SetL(
+                    static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
+            }
+            break;
+
+        case EGPRSReqTransferDelay:
+            {
+            qosRecord->iGPRSReqTransferDelay.SetL( aValue );
+            }
+            break;
+
+        case EGPRSMaxTransferDelay:
+            {
+            qosRecord->iGPRSMaxTransferDelay.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqGuaranteedUplinkRate:
+            {
+            qosRecord->iGPRSReqGuaranteedUplinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSMinGuaranteedUplinkRate:
+            {
+            qosRecord->iGPRSMinGuaranteedUplinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSReqGuaranteedDownlinkRate:
+            {
+            qosRecord->iGPRSReqGuaranteedDownlinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSMinGuaranteedDownlinkRate:
+            {
+            qosRecord->iGPRSMinGuaranteedDownlinkRate.SetL( aValue );
+            }
+            break;
+
+        case EGPRSSourceStatisticsDescriptor:
+            {
+            qosRecord->iGPRSSourceStatisticsDescriptor.SetL(
+                    static_cast<RPacketQoS::TSourceStatisticsDescriptor>( aValue ) );
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETQOSINTATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetBearerBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+            aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EPacketDataOutGoing:
+            {
+            iOutgoing = aValue;
+            }
+            break;
+        case EPacketDataDataCompression:
+            {
+            serviceRecord->iGPRSDataCompression.SetL( aValue );
+            }
+            break;
+        case EPacketDataHeaderCompression:
+            {
+            serviceRecord->iGPRSHeaderCompression.SetL( aValue );
+            }
+            break;
+        case EPacketDataUseEdge:
+            {
+            serviceRecord->iGPRSUseEdge.SetL( aValue );
+            }
+            break;
+        case EPacketDataAnonymousAccess:
+            {
+            serviceRecord->iGPRSAnonymousAccess.SetL( aValue );
+            }
+            break;
+        case ECmIFPromptForAuth:
+        case EPacketDataIFPromptForAuth:
+            {
+            serviceRecord->iGPRSIfPromptForAuth.SetL( aValue );
+            }
+            break;
+        case ECmIPAddFromServer:
+        case EPacketDataIPAddrFromServer:
+            {
+            serviceRecord->iGPRSIPAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case EPacketDataIPDNSAddrFromServer:
+            {
+            serviceRecord->iGPRSIPDNSAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case EPacketDataIPIP6DNSAddrFromServer:
+            {
+            serviceRecord->iGPRSIP6DNSAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmEnableLPCExtension:
+        case EPacketDataEnableLcpExtension:
+            {
+            serviceRecord->iGPRSEnableLCPExtension.SetL( aValue );
+            }
+            break;
+        case ECmDisablePlainTextAuth:
+        case EPacketDataDisablePlainTextAuth:
+            {
+            serviceRecord->iGPRSDisablePlainTextAuth.SetL( aValue );
+            }
+            break;
+        case EGPRSSignallingIndication:
+            {
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                    aBearerSpecRecordArray[KQosRecordIndex] )
+                    ->iGPRSSignallingIndication.SetL( aValue );
+            }
+            break;
+        case EGPRS_ImCnSignallingIndication:
+            {
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>
+                 ( aBearerSpecRecordArray[KQosRecordIndex] )
+                 ->iGPRS_ImCnSignallingIndication.SetL( aValue );
+            }
+            break;
+        case EPacketDataServiceEnableLLMNR:
+            {
+            serviceRecord->iServiceEnableLlmnr.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERBOOLATTRIBUTEL_EXIT );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetBearerStringAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetBearerStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    CCDWCDMAPacketServiceRecord* serviceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EPacketDataAPName:
+            {
+            serviceRecord->iGPRSAPN.SetL( aValue );
+            }
+            break;
+
+        case EPacketDataPDPAddress:
+            {
+            serviceRecord->iGPRSPDPAddress.SetL( aValue );
+            }
+            break;
+
+        case ECmIFParams:
+        case EPacketDataIFParams:
+            {
+            serviceRecord->iGPRSIfParams.SetL( aValue );
+            }
+            break;
+
+        case ECmIFNetworks:
+        case EPacketDataIFNetworks:
+            {
+            serviceRecord->iGPRSIfNetworks.SetL( aValue );
+            }
+            break;
+
+        case ECmIFAuthName:
+        case EPacketDataIFAuthName:
+            {
+            serviceRecord->iGPRSIfAuthName.SetL( aValue );
+            }
+            break;
+
+        case ECmIFAuthPass:
+        case EPacketDataIFAuthPass:
+            {
+            serviceRecord->iGPRSIfAuthPass.SetL( aValue );
+            }
+            break;
+
+        case ECmIPNetmask:
+        case EPacketDataIPNetmask:
+            {
+            serviceRecord->iGPRSIPNetMask.SetL( aValue );
+            }
+            break;
+
+        case ECmIPGateway:
+        case EPacketDataIPGateway:
+            {
+            serviceRecord->iGPRSIPGateway.SetL( aValue );
+            }
+            break;
+
+        case ECmIPAddress:
+        case EPacketDataIPAddr:
+            {
+            if ( ( aValue.Compare( KUnspecifiedIPv4 ) == 0 ) ||
+                    ( aValue.Compare( KNullDesC ) == 0 ) )
+                {
+                // If unspecified or NULL address is set dynamic
+                // IP must be enabled.
+                SetBearerBoolAttributeL( ECmIPAddFromServer,
+                                         ETrue,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            else
+                {
+                // If valid address is set dynamic IP is disabled.
+                SetBearerBoolAttributeL( ECmIPAddFromServer,
+                                         EFalse,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            serviceRecord->iGPRSIPAddr.SetL( aValue );
+            }
+            break;
+
+        case ECmIPNameServer1:
+        case EPacketDataIPNameServer1:
+            {
+            serviceRecord->iGPRSIPNameServer1.SetL( aValue );
+            }
+            break;
+
+        case ECmIPNameServer2:
+        case EPacketDataIPNameServer2:
+            {
+            serviceRecord->iGPRSIPNameServer2.SetL( aValue );
+            }
+            break;
+
+        case ECmIP6NameServer1:
+        case EPacketDataIPIP6NameServer1:
+            {
+            serviceRecord->iGPRSIP6NameServer1.SetL( aValue );
+            }
+            break;
+
+        case ECmIP6NameServer2:
+        case EPacketDataIPIP6NameServer2:
+            {
+            serviceRecord->iGPRSIP6NameServer2.SetL( aValue );
+            }
+            break;
+
+        case ECmIPAddrLeaseValidFrom:
+        case EPacketDataIPAddrLeaseValidFrom:
+            {
+            serviceRecord->iGPRSIPAddrLeaseValidFrom.SetL( aValue );
+            }
+            break;
+
+        case ECmIPAddrLeaseValidTo:
+        case EPacketDataIPAddrLeaseValidTo:
+            {
+            serviceRecord->iGPRSIPAddrLeaseValidTo.SetL( aValue );
+            }
+            break;
+
+        case ECmConfigDaemonManagerName:
+        case EPacketDataConfigDaemonManagerName:
+            {
+            serviceRecord->iGPRSConfigDaemonManagerName.SetL( aValue );
+            }
+            break;
+
+        case ECmConfigDaemonName:
+        case EPacketDataConfigDaemonName:
+            {
+            serviceRecord->iGPRSConfigDaemonName.SetL( aValue );
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERSTRINGATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::SetBearerString8AttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::SetBearerString8AttributeL(
+        TUint32 /*aAttribute*/,
+        const TDesC8& /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    User::Leave( KErrNotSupported );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERSTRING8ATTRIBUTEL_EXIT );
+    return;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerInfoIntL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::GetBearerInfoIntL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            retVal = KCommDbBearerWcdma;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerInfoBoolL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginPacketData::GetBearerInfoBoolL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+#ifndef __WINS__
+            CCmPDCoverageCheck* coverage = new (ELeave) CCmPDCoverageCheck;
+            CleanupStack::PushL( coverage );
+
+            retVal = coverage->IsThereCoverageL();
+
+            CleanupStack::PopAndDestroy( coverage );
+#else
+            retVal = ETrue;
+#endif
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case ECmVirtual:
+            {
+            retVal = EFalse;
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerInfoStringL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginPacketData::GetBearerInfoStringL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRINGL_ENTRY );
+
+    HBufC* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRINGL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerInfoString8L
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginPacketData::GetBearerInfoString8L( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRING8L_ENTRY );
+
+    HBufC8* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRING8L_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::PrepareToCopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_ENTRY );
+
+    CCmPluginPacketData* plugin = static_cast<CCmPluginPacketData*>( aCopyInstance );
+    plugin->iOutgoing = iOutgoing;
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::CopyServiceRecordL
+// ---------------------------------------------------------------------------
+//
+CommsDat::CCDRecordBase* CCmPluginPacketData::CopyServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_COPYSERVICERECORDL_ENTRY );
+
+    // New service record to be returned.
+    CCDRecordBase* serviceRecord = NULL;
+    if ( iOutgoing )
+        {
+        serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
+        }
+    else
+        {
+        serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
+        }
+    CleanupStack::PushL( serviceRecord );
+
+    CCDWCDMAPacketServiceRecord* tempServiceRecordPtrToNew =
+            static_cast<CCDWCDMAPacketServiceRecord*>( serviceRecord );
+
+    // CommsDat version of service record.
+    CCDWCDMAPacketServiceRecord* origServiceRecord =
+            static_cast<CCDWCDMAPacketServiceRecord*>( iServiceRecord );
+
+    if ( !origServiceRecord->iRecordTag.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordTag.SetL(
+                origServiceRecord->iRecordTag );
+        }
+    if ( !origServiceRecord->iRecordName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordName.SetL(
+                origServiceRecord->iRecordName );
+        }
+
+    if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL(
+                origServiceRecord->iServiceEnableLlmnr );
+        }
+
+    if ( !origServiceRecord->iGPRSAPN.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSAPN.SetL(
+                origServiceRecord->iGPRSAPN );
+        }
+    if ( !origServiceRecord->iGPRSPDPType.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSPDPType.SetL(
+                origServiceRecord->iGPRSPDPType );
+        }
+    if ( !origServiceRecord->iGPRSPDPAddress.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSPDPAddress.SetL(
+                origServiceRecord->iGPRSPDPAddress );
+        }
+    if ( !origServiceRecord->iGPRSReqPrecedence.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSReqPrecedence.SetL(
+                origServiceRecord->iGPRSReqPrecedence );
+        }
+    if ( !origServiceRecord->iGPRSReqDelay.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSReqDelay.SetL(
+                origServiceRecord->iGPRSReqDelay );
+        }
+    if ( !origServiceRecord->iGPRSReqReliability.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSReqReliability.SetL(
+                origServiceRecord->iGPRSReqReliability );
+        }
+    if ( !origServiceRecord->iGPRSReqPeakThroughput.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSReqPeakThroughput.SetL(
+                origServiceRecord->iGPRSReqPeakThroughput );
+        }
+    if ( !origServiceRecord->iGPRSReqMeanThroughput.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSReqMeanThroughput.SetL(
+                origServiceRecord->iGPRSReqMeanThroughput );
+        }
+    if ( !origServiceRecord->iGPRSMinPrecedence.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSMinPrecedence.SetL(
+                origServiceRecord->iGPRSMinPrecedence );
+        }
+    if ( !origServiceRecord->iGPRSMinDelay.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSMinDelay.SetL(
+                origServiceRecord->iGPRSMinDelay );
+        }
+    if ( !origServiceRecord->iGPRSMinReliability.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSMinReliability.SetL(
+                origServiceRecord->iGPRSMinReliability );
+        }
+    if ( !origServiceRecord->iGPRSMinPeakThroughput.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSMinPeakThroughput.SetL(
+                origServiceRecord->iGPRSMinPeakThroughput );
+        }
+    if ( !origServiceRecord->iGPRSMinMeanThroughput.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSMinMeanThroughput.SetL(
+                origServiceRecord->iGPRSMinMeanThroughput );
+        }
+    if ( !origServiceRecord->iGPRSDataCompression.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSDataCompression.SetL(
+                origServiceRecord->iGPRSDataCompression );
+        }
+    if ( !origServiceRecord->iGPRSHeaderCompression.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSHeaderCompression.SetL(
+                origServiceRecord->iGPRSHeaderCompression );
+        }
+    if ( !origServiceRecord->iGPRSUseEdge.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSUseEdge.SetL(
+                origServiceRecord->iGPRSUseEdge );
+        }
+    if ( !origServiceRecord->iGPRSAnonymousAccess.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSAnonymousAccess.SetL(
+                origServiceRecord->iGPRSAnonymousAccess );
+        }
+    if ( !origServiceRecord->iGPRSIfParams.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfParams.SetL(
+                origServiceRecord->iGPRSIfParams );
+        }
+    if ( !origServiceRecord->iGPRSIfNetworks.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfNetworks.SetL(
+                origServiceRecord->iGPRSIfNetworks );
+        }
+    if ( !origServiceRecord->iGPRSIfPromptForAuth.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfPromptForAuth.SetL(
+                origServiceRecord->iGPRSIfPromptForAuth );
+        }
+    if ( !origServiceRecord->iGPRSIfAuthName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfAuthName.SetL(
+                origServiceRecord->iGPRSIfAuthName );
+        }
+    if ( !origServiceRecord->iGPRSIfAuthPass.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfAuthPass.SetL(
+                origServiceRecord->iGPRSIfAuthPass );
+        }
+    if ( !origServiceRecord->iGPRSIfAuthRetries.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIfAuthRetries.SetL(
+                origServiceRecord->iGPRSIfAuthRetries );
+        }
+    if ( !origServiceRecord->iGPRSIPNetMask.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPNetMask.SetL(
+                origServiceRecord->iGPRSIPNetMask );
+        }
+    if ( !origServiceRecord->iGPRSIPGateway.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPGateway.SetL(
+                origServiceRecord->iGPRSIPGateway );
+        }
+    if ( !origServiceRecord->iGPRSIPAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPAddrFromServer.SetL(
+                origServiceRecord->iGPRSIPAddrFromServer );
+        }
+    if ( !origServiceRecord->iGPRSIPAddr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPAddr.SetL(
+                origServiceRecord->iGPRSIPAddr );
+        }
+    if ( !origServiceRecord->iGPRSIPDNSAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPDNSAddrFromServer.SetL(
+                origServiceRecord->iGPRSIPDNSAddrFromServer );
+        }
+    if ( !origServiceRecord->iGPRSIPNameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPNameServer1.SetL(
+                origServiceRecord->iGPRSIPNameServer1 );
+        }
+    if ( !origServiceRecord->iGPRSIPNameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPNameServer2.SetL(
+                origServiceRecord->iGPRSIPNameServer2 );
+        }
+    if ( !origServiceRecord->iGPRSIP6DNSAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIP6DNSAddrFromServer.SetL(
+                origServiceRecord->iGPRSIP6DNSAddrFromServer );
+        }
+    if ( !origServiceRecord->iGPRSIP6NameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIP6NameServer1.SetL(
+                origServiceRecord->iGPRSIP6NameServer1 );
+        }
+    if ( !origServiceRecord->iGPRSIP6NameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIP6NameServer2.SetL(
+                origServiceRecord->iGPRSIP6NameServer2 );
+        }
+    if ( !origServiceRecord->iGPRSIPAddrLeaseValidFrom.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPAddrLeaseValidFrom.SetL(
+                origServiceRecord->iGPRSIPAddrLeaseValidFrom );
+        }
+    if ( !origServiceRecord->iGPRSIPAddrLeaseValidTo.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSIPAddrLeaseValidTo.SetL(
+                origServiceRecord->iGPRSIPAddrLeaseValidTo );
+        }
+    if ( !origServiceRecord->iGPRSConfigDaemonManagerName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSConfigDaemonManagerName.SetL(
+                origServiceRecord->iGPRSConfigDaemonManagerName );
+        }
+    if ( !origServiceRecord->iGPRSConfigDaemonName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSConfigDaemonName.SetL(
+                origServiceRecord->iGPRSConfigDaemonName );
+        }
+    if ( !origServiceRecord->iGPRSEnableLCPExtension.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSEnableLCPExtension.SetL(
+                origServiceRecord->iGPRSEnableLCPExtension );
+        }
+    if ( !origServiceRecord->iGPRSDisablePlainTextAuth.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSDisablePlainTextAuth.SetL(
+                origServiceRecord->iGPRSDisablePlainTextAuth );
+        }
+    if ( !origServiceRecord->iGPRSAPType.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSAPType.SetL(
+                origServiceRecord->iGPRSAPType );
+        }
+    if ( !origServiceRecord->iGPRSQOSWarningTimeOut.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSQOSWarningTimeOut.SetL(
+                origServiceRecord->iGPRSQOSWarningTimeOut );
+        }
+    if ( !origServiceRecord->iUmtsR99QoSAndOnTable.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iUmtsR99QoSAndOnTable.SetL(
+                origServiceRecord->iUmtsR99QoSAndOnTable );
+        }
+    if ( !origServiceRecord->iGPRSR5DataCompression.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSR5DataCompression.SetL(
+                origServiceRecord->iGPRSR5DataCompression );
+        }
+    if ( !origServiceRecord->iGPRSR5HeaderCompression.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSR5HeaderCompression.SetL(
+                origServiceRecord->iGPRSR5HeaderCompression );
+        }
+    if ( !origServiceRecord->iGPRSPacketFlowIdentifier.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSPacketFlowIdentifier.SetL(
+                origServiceRecord->iGPRSPacketFlowIdentifier );
+        }
+    if ( !origServiceRecord->iGPRSUmtsGprsRelease.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iGPRSUmtsGprsRelease.SetL(
+                origServiceRecord->iGPRSUmtsGprsRelease );
+        }
+
+    CleanupStack::Pop( serviceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_COPYSERVICERECORDL_EXIT );
+    return serviceRecord;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::ResetBearerRecords
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::ResetBearerRecords()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_RESETBEARERRECORDS_ENTRY );
+
+    delete iPacketDataQoSRecord;
+    iPacketDataQoSRecord = NULL;
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_RESETBEARERRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::DeleteBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::DeleteBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_DELETEBEARERRECORDSL_ENTRY );
+
+    if ( !TPtrC(iPacketDataQoSRecord->iRecordName).CompareF( KDefaultQosDataRecordName ) ||
+            !TPtrC(iPacketDataQoSRecord->iRecordName).CompareF( KDefaultQosDataRecordNamewithSpace ) )
+        {
+        OstTraceFunctionExit0( CCMPLUGINPACKETDATA_DELETEBEARERRECORDSL_EXIT );
+        return;
+        }
+
+    iPacketDataQoSRecord->DeleteL( iSession );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_DELETEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::CopyBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_COPYBEARERRECORDSL_ENTRY );
+
+    CCmPluginPacketData* plugin = static_cast<CCmPluginPacketData*>( aCopyInstance );
+
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+    CleanupStack::PushL( qosRecord );
+    CopyRecordFieldsL( *iPacketDataQoSRecord, *qosRecord );
+    CleanupStack::Pop( qosRecord );
+    plugin->iPacketDataQoSRecord = qosRecord;
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_COPYBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetBearerTableIdsToBeObserved
+// ---------------------------------------------------------------------------
+//
+void CCmPluginPacketData::GetBearerTableIdsToBeObservedL(
+        RArray<TUint32>& aTableIdArray ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETBEARERTABLEIDSTOBEOBSERVEDL_ENTRY );
+
+    aTableIdArray.AppendL( KCDTIdOutgoingGprsRecord );
+    aTableIdArray.AppendL( KCDTIdUmtsR99QoSAndOnTableRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERTABLEIDSTOBEOBSERVEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginPacketData::GetDefPriorityL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginPacketData::GetDefPriorityL( const TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETDEFPRIORITYL_ENTRY );
+
+    TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
+
+    CCDGlobalBearerTypePriorizationRecord* priorityRecord =
+            new( ELeave ) CCDGlobalBearerTypePriorizationRecord( iBearerPriorityTableId );
+    CleanupStack::PushL( priorityRecord );
+
+    priorityRecord->iServiceType.SetL( TPtrC( KCDTypeNameOutgoingWCDMA ) );
+
+    if ( priorityRecord->FindL( iSession ) )
+        {
+        priorityRecord->LoadL( iSession );
+
+        switch ( aAttribute )
+            {
+            case ECmDefaultPriority:
+                {
+                retVal = priorityRecord->iPriority;
+                }
+                break;
+            case ECmDefaultUiPriority:
+                {
+                retVal = priorityRecord->iUIPriority;
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    CleanupStack::PopAndDestroy( priorityRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETDEFPRIORITYL_EXIT );
+    return retVal;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdataproxy.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Implementation of packet data Plugin proxy table
+*
+*/
+
+
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+#include "cmpluginpacketdata.h"
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KUidPacketDataBearerType, CCmPluginPacketData::NewL)
+    };
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
+
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,69 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_ENTRY=0x2
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_EXIT=0x3
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_DOCANCEL_ENTRY=0x6
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_DOCANCEL_EXIT=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_ISTHERECOVERAGEL_ENTRY=0xa
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_ISTHERECOVERAGEL_EXIT=0xb
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_RUNL_ENTRY=0x8
+[TRACE]TRACE_FLOW[0x7]_CCMPDCOVERAGECHECK_RUNL_EXIT=0x9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_ADDITIONALRESET_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_ADDITIONALRESET_EXIT=0x36
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_BEARERRECORDIDLC_ENTRY=0x2f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_BEARERRECORDIDLC_EXIT=0x30
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_ENTRY=0x24
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_EXIT=0x25
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_ENTRY=0xe
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT=0xf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CHECKNETWORKCOVERAGEL_ENTRY=0x31
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CHECKNETWORKCOVERAGEL_EXIT=0x32
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CONSTRUCTL_ENTRY=0x14
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CONSTRUCTL_EXIT=0x15
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATEADDITIONALRECORDSL_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATEADDITIONALRECORDSL_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATEINSTANCEL_ENTRY=0x10
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATEINSTANCEL_EXIT=0x11
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATENEWSERVICERECORDL_ENTRY=0x2b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_CREATENEWSERVICERECORDL_EXIT=0x2c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_DELETEADDITIONALRECORDSL_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_DELETEADDITIONALRECORDSL_EXIT=0x3e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETBOOLATTRIBUTEL_ENTRY=0x18
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETBOOLATTRIBUTEL_EXIT=0x19
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETINTATTRIBUTEL_ENTRY=0x16
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETINTATTRIBUTEL_EXIT=0x17
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETSTRINGATTRIBUTEL_ENTRY=0x1a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_GETSTRINGATTRIBUTEL_EXIT=0x1b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_LOADADDITIONALRECORDSL_ENTRY=0x40
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_LOADADDITIONALRECORDSL_EXIT=0x41
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_LOADSERVICESETTINGL_ENTRY=0x28
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_LOADSERVICESETTINGL_EXIT=0x29
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_NEWL_ENTRY=0xc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_NEWL_EXIT=0xd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_PREPARETOCOPYDATAL_EXIT=0x38
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_PREPARETOUPDATERECORDSL_ENTRY=0x22
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_PREPARETOUPDATERECORDSL_EXIT=0x23
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SERVICERECORDIDLC_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SERVICERECORDIDLC_EXIT=0x2e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SERVICERECORD_ENTRY=0x2a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETBOOLATTRIBUTEL_ENTRY=0x1e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETBOOLATTRIBUTEL_EXIT=0x1f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETDAEMONNAMEL_ENTRY=0x39
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETDAEMONNAMEL_EXIT=0x3a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETINTATTRIBUTEL_ENTRY=0x1c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETINTATTRIBUTEL_EXIT=0x1d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETPDPTYPEL_ENTRY=0x33
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETPDPTYPEL_EXIT=0x34
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETSTRINGATTRIBUTEL_ENTRY=0x20
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_SETSTRINGATTRIBUTEL_EXIT=0x21
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_UPDATEADDITIONALRECORDSL_ENTRY=0x42
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINPACKETDATA_UPDATEADDITIONALRECORDSL_EXIT=0x43
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_ENTRY=0x4
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPDCOVERAGECHECK_CCMPDCOVERAGECHECK_EXIT=0x5
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_ENTRY=0x26
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINPACKETDATA_CANHANDLEIAPIDL_EXIT=0x27
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_ENTRY=0x12
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT=0x13
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINPACKETDATA_DELETEADDITIONALRECORDSL_EXIT=0x3f
+[TRACE]TRACE_FLOW[0x7]__SETPDPTYPEL_EXIT=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/data/10281BBE.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* ECom resource descriptor for VPN plug-in 
+*/
+
+#include "ecom/registryinfo.rh"
+
+// Because attribute enums had to be added to namespace CMManager
+// it's not possible to included cmpluginvpndef.h.
+// Thus bearer type id had to be redefined here.
+#define KPluginVPNBearerTypeUid   0x10281BBD
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    dll_uid = 0x10281BBE;
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            interface_uid = 0x10207377; // = KCMPluginInterfaceUid. Do NOT modify it!!!
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = KPluginVPNBearerTypeUid;
+                    version_no = 1;
+                    display_name = "VPN";
+                    default_data = "VPN";
+                    opaque_data = "";
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Build information for the VPN plugin.   
+*      
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmpluginvpn.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(cmmpluginvpn.iby)
+
+PRJ_MMPFILES
+cmpluginvpn.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/group/cmpluginvpn.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Project specification for LAN Plugin.   
+*      
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET      cmpluginvpn.dll
+UID         0x10009D8D 0x10281BBE
+
+TARGETTYPE		PLUGIN
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+SOURCEPATH  ../src
+
+SOURCE      cmpluginvpnproxy.cpp
+SOURCE      cmpluginvpn.cpp
+
+SOURCEPATH  ../data
+
+START RESOURCE 10281BBE.rss
+TARGET cmpluginvpn.rsc
+END
+
+// Component specific internal headers 
+USERINCLUDE         ../inc 
+USERINCLUDE         ../../../cmmcommon/inc
+USERINCLUDE         ../traces
+
+
+// ADO specific internal headers 
+SYSTEMINCLUDE		../../../database/inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY	ecom.lib
+LIBRARY featmgr.lib
+LIBRARY commsdat.lib
+LIBRARY	cmmpluginbase.lib
+LIBRARY cmmanagerdatabase.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/inc/cmpluginvpn.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,354 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Declaration of VPN CmManager plugin interface implementation 
+*      
+*
+*/
+
+#ifndef CMPLUGINVPN_H
+#define CMPLUGINVPN_H
+
+// INCLUDES
+#include <cmpluginbaseeng.h>
+#include <cmpluginvpndef.h>
+
+// FORWARD DECLARATION
+class CCDVirtualIAPNextLayerRecord;
+
+/**
+*  CCmPluginVpn defines the functionality of vpn bearer support.
+*  Most of the API is inherited from CCmPluginBaseEng class.
+*/
+NONSHARABLE_CLASS( CCmPluginVpn ) : public CCmPluginBaseEng
+    {
+    public: // Constructors and destructor
+        /**
+         * Two phased constructor.
+         * @return Returns the VPN plugin object.
+         */      
+		static CCmPluginVpn* NewL( TCmPluginInitParam* aInitParam );
+
+        /**
+         * Destructor.
+         */      
+        virtual ~CCmPluginVpn();
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Creates a new instance of VPN bearer plugin. The instance
+         * created represents a bearer, not a connection method.
+         * @param aInitParam Initialization data.
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the cmm server.
+         */
+        virtual CCmPluginBaseEng* CreateInstanceL( 
+                TCmPluginInitParam& aInitParam ) const;
+                
+        /**
+         * Following GetBearerInfoXXXL methods return the values of the 
+         * requested attributes. These values are bearerspecific so they
+         * don't vary between CMs with same bearer type.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code. 
+         */
+        virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const;
+        
+        virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const;
+
+        virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const;
+        
+        virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const;
+
+        /**
+         * Checks if the plug-in can handle the Connection Method identified
+         * with parameter aIapId.
+         * @param aIapId IAPId of the AP to be checked
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        TBool CanHandleIapIdL( TUint32 aIapId ) const;
+         
+        /**
+         * Checks if the plug-in can handle the given IAP record.
+         * @param aIapRecord IAP record to be checked
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        TBool CanHandleIapIdL( CommsDat::CCDIAPRecord* aIapRecord ) const;
+
+        /**
+         * Requests CommsDat table ids to be observed for changes by the cmm
+         * server. If a table used is not mentioned to be modified a bearer
+         * shouldn't return this. Bearers do not reset the array before adding
+         * ids.
+         * @param aTableIdArray A reference to an array where plugin must add
+         * the ids of the tables it want's to be observed.
+         */
+        void GetBearerTableIdsToBeObservedL( RArray<TUint32>& aTableIdArray ) const;
+
+        
+        /**
+         * Creates a copy of all bearer specific CommsDat data for the client.
+         * Called as result of GetPluginDataL().
+         * @param aRecordArray An array where the copy the records. Only 
+         * the bearer specific implementation knows the amount and order
+         * of these records in the array.
+         */
+        virtual void GetBearerSpecificRecordsL( 
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic 
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records. 
+         * @return Returns the requested value. In error case leaves with 
+         * system-wide error code.
+         */
+
+        virtual TUint32 GetBearerIntAttributeL( 
+                TUint32 aAttribute, 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+        
+        virtual TBool GetBearerBoolAttributeL( 
+                TUint32 aAttribute, 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+                                         
+        virtual HBufC* GetBearerStringAttributeL( 
+                TUint32 aAttribute, 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+        
+        virtual HBufC8* GetBearerString8AttributeL( 
+                TUint32 aAttribute, 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not 
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic 
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records. 
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL( 
+                TUint32 aAttribute, 
+                TUint32 aValue, 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+        
+        virtual void SetBearerBoolAttributeL( 
+                TUint32 aAttribute, 
+                TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+                                         
+        virtual void SetBearerStringAttributeL( 
+                TUint32 aAttribute, 
+                const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerString8AttributeL( 
+                TUint32 aAttribute, 
+                const TDesC8& aValue,                                                    
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Inherited from CCmPluginBaseEng. 
+         * Implementation is empty.
+         */
+        virtual void PreparePluginToLoadRecordsL();
+        
+        /**
+         * Inherited from CCmPluginBaseEng. 
+         * Implementation is empty.
+         * @param aCopyInstance Client side data instance.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Inherited from CCmPluginBaseEng. 
+         * Implementation is empty.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records 
+         * pointer array.
+         */
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Plugin can prepare to delete the Connection Method with this 
+         * function. Called from DeleteL() before any record would be 
+         * deleted. No records are deleted here.
+         */
+        virtual void PrepareToDeleteRecordsL();
+
+        /**
+         * Loads the service record. Service record type is known and loaded by 
+         * plugin(bearer specific) part of the implementation even if the record
+         * is saved to the generic side. Service record is linked to IAP record.
+         */
+        virtual void LoadServiceRecordL();
+
+        /**
+         * Creates the service records.
+         */
+        virtual void CreateServiceRecordL();
+
+        /**
+         * Update service record.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records 
+         * pointer array.
+         */
+        virtual void UpdateServiceRecordL( 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Copies the service record. Bearer specific part knows the type of it's
+         * service record.
+         * @return Returns the service record pointer. 
+         */
+        virtual CommsDat::CCDRecordBase* CopyServiceRecordL();
+
+        /**
+         * Returns the service record id of the Connection Method.
+         * @return Returns the id of the service record id of the Connection Method.
+         */
+        virtual TUint32 ServiceRecordId() const;
+
+        /**
+         * Returns the service record name of the Connection Method.
+         * @param aServiceName Name of the service record the CM's iap record 
+         * points to.
+         */
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName );
+
+        /**
+         * Inherited class loads all the bearer specific records after 
+         * loading generic records. Called from LoadL(). 
+         */
+        virtual void LoadBearerRecordsL();
+
+        /**
+         * Creates bearer specific records.
+         */
+        virtual void CreateBearerRecordsL();
+
+        /**
+         * Update bearer specific records.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records 
+         */
+        virtual void UpdateBearerRecordsL( 
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Plugin(generic part) can delete bearer specific records
+         * with this function. Called from DeleteL().
+         */
+        virtual void DeleteBearerRecordsL();
+
+         /** 
+          * Resets the bearer specific records. 
+          */
+         virtual void ResetBearerRecords();
+
+        /**
+         * Copies the bearer specific records to copy instance given as 
+         * parameter. 
+         * @param aCopyInstance Pointer to instance where to copy.
+         */
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Returns the bearer record id of the Connection Method.
+         * @param aRecordId Id of the bearer record this CM's iap record 
+         * points to.
+         */
+        virtual void BearerRecordIdL( TUint32& aRecordId );
+
+        /**
+         * Returns the bearer record name of the Connection Method.
+         * @param aBearerName Name of the bearer record this CM's iap record 
+         * points to.
+         */
+        virtual void BearerRecordNameLC( HBufC* &aBearerName );
+
+        
+    private: // Constructors
+        /**
+        * Constructor.
+        */      
+		CCmPluginVpn( TCmPluginInitParam* aInitParam );
+
+        /**
+        * Second phase constructor. Leaves on failure.
+        */      
+		void ConstructL();   
+		
+		/**
+		 * Gets the default priority and default UI priority 
+		 * from the CommsDat.
+		 */
+		TUint32 GetDefPriorityL( const TUint32 aAttribute ) const;
+		
+		/**
+		 * Gets the virtual bearer record from the CommsDat.
+		 */
+		CommsDat::CCDVirtualBearerRecord* GetVirtualBearerRecordLC() const;
+		
+		/**
+		 * Type casts the service record in the base class to 
+		 * CommsDat::CCDVPNServiceRecord type. 
+		 */
+		CommsDat::CCDVPNServiceRecord& ServiceRecord() const;
+		
+		/**
+		 * Virtual table Id
+		 */
+		CommsDat::TMDBElementId                 iVirtualTableId;
+		
+		/**
+		 * Bearer priority table id
+		 */
+		CommsDat::TMDBElementId                 iBearerPriorityTableId;
+		
+		/**
+		 * Virtual IAP next layer record
+		 */
+		CCDVirtualIAPNextLayerRecord*           iVirtualIapNextLayerRecord;
+    };
+    
+#endif //CMPLUGINVPN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/rom/cmmpluginvpn.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmpluginvpn.dll to ROM.
+*
+*/
+#ifndef CMMPLUGINVPN_IBY__
+#define CMMPLUGINVPN_IBY__
+
+ECOM_PLUGIN(cmpluginvpn.dll,10281BBE.rsc)
+
+
+#endif // CMMPLUGINVPN_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpn.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1182 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Implementation of VPN CmManager Plugin interface implementation 
+*      
+*
+*/
+
+ 
+// INCLUDE FILES
+#include <commsdattypesv1_1.h>
+#include <datamobilitycommsdattypes.h>
+#include <cmconnectionmethoddef.h>
+#include <cmpluginvpndef.h>
+#include <featmgr.h>
+#include <publicruntimeids.hrh>
+
+#include "cmpluginvpn.h"
+#include "cmmserverdefs.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmpluginvpnTraces.h"
+#endif
+
+using namespace CommsDat;
+using namespace CMManager;
+
+
+
+_LIT( KVpnVirtualBearerName, "vpnbearer" );
+_LIT( KVpnVirtualBearerAgent, "vpnconnagt.agt" );
+_LIT( KVpnVirtualBearerNif, "tunnelnif" );
+
+static const TInt KVirtualIAPNextLayerRecordIndex = 0;
+
+// constants needed for the virtualbearer table
+static const TInt KNoTimeout = -1;
+static const TUint32 KLastSessionTimeout = 3;
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::NewL
+// ---------------------------------------------------------------------------
+//
+CCmPluginVpn* CCmPluginVpn::NewL( TCmPluginInitParam* aInitParam )
+	{	
+    OstTraceFunctionEntry0( CCMPLUGINVPN_NEWL_ENTRY );
+    
+	CCmPluginVpn* self = new( ELeave ) CCmPluginVpn( aInitParam );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop( self );
+	
+	OstTraceFunctionExit0( CCMPLUGINVPN_NEWL_EXIT );
+	return self;		
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CreateInstanceL
+// ---------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmPluginVpn::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
+	{
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CREATEINSTANCEL_ENTRY );
+
+    CCmPluginVpn* self = new( ELeave ) CCmPluginVpn( &aInitParam );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop( self );
+
+	OstTraceFunctionExit0( CCMPLUGINVPN_CREATEINSTANCEL_EXIT );
+	return self;				
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::~CCmPluginVpn
+// ---------------------------------------------------------------------------
+//
+CCmPluginVpn::~CCmPluginVpn()
+	{
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CCMPLUGINVPN_ENTRY );
+    
+    ResetBearerRecords();
+    
+	OstTraceFunctionExit0( CCMPLUGINVPN_CCMPLUGINVPN_EXIT );
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CCmPluginVpn
+// ---------------------------------------------------------------------------
+//
+CCmPluginVpn::CCmPluginVpn( TCmPluginInitParam* aInitParam )
+	: CCmPluginBaseEng( aInitParam ), iVirtualTableId(0), 
+	  iBearerPriorityTableId(0), iVirtualIapNextLayerRecord(NULL)
+	{
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINVPN_CCMPLUGINVPN_ENTRY );
+    
+    iBearerType = KPluginVPNBearerTypeUid;
+	
+    OstTraceFunctionExit0( DUP1_CCMPLUGINVPN_CCMPLUGINVPN_EXIT );
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::ConstructL()
+	{    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CONSTRUCTL_ENTRY );
+    
+    if (!FeatureManager::FeatureSupported( KFeatureIdFfVpnClient ) )
+        {   
+        User::Leave( KErrNotSupported );
+        }
+    
+    TRAP_IGNORE( iVirtualTableId = 
+                        CCDVirtualIAPNextLayerRecord::TableIdL( iSession ) );       
+    
+    if( !iVirtualTableId )
+        {
+        iVirtualTableId = CCDVirtualIAPNextLayerRecord::CreateTableL( iSession );
+        }
+            
+    TRAP_IGNORE( iBearerPriorityTableId =
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iSession ) );
+
+    if ( !iBearerPriorityTableId )
+        {
+        iBearerPriorityTableId =
+                CCDGlobalBearerTypePriorizationRecord::CreateTableL( iSession );
+        }
+    
+	CCmPluginBaseEng::ConstructL();
+	    
+	OstTraceFunctionExit0( CCMPLUGINVPN_CONSTRUCTL_EXIT );
+	}
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerInfoIntL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginVpn::GetBearerInfoIntL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmSeamlessnessLevel:
+            {
+            retVal = ESeamlessnessShowprogress;
+            }
+            break;
+        case ECmBearerType:
+            {             
+            retVal = iBearerType;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {                         
+            retVal = KCommDbBearerVirtual;
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        case ECmDefaultUiPriority: //falls through
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+            
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerInfoBoolL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginVpn::GetBearerInfoBoolL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERINFOBOOLL_ENTRY );
+    
+    TBool retVal( EFalse );
+
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+            //This parameter is not actually in use for the VPN.
+            //ConnMon component can make a proper coverage discovery for the VPN,
+            //but CmManager just returns the default value.
+            retVal = EFalse;
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {                
+            retVal = EFalse;
+            }
+            break;
+        case ECmIPv6Supported:
+            {            
+            retVal = EFalse;
+            }
+            break;
+        case ECmVirtual:
+            {
+            retVal = ETrue;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }    
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerInfoStringL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginVpn::GetBearerInfoStringL( TUint32 /*aAttribute*/ ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERINFOSTRINGL_ENTRY );
+    
+    User::Leave( KErrNotSupported );
+     
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERINFOSTRINGL_EXIT );
+    
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerInfoString8L
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginVpn::GetBearerInfoString8L( TUint32 /*aAttribute*/ ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERINFOSTRING8L_ENTRY );
+
+    User::Leave( KErrNotSupported );
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERINFOSTRING8L_EXIT );
+ 
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CanHandleIapIdL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginVpn::CanHandleIapIdL( TUint32 aIapId ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY );
+
+    TBool retVal( EFalse );
+    
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
+                            ( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        
+    CleanupStack::PushL( iapRecord );
+    iapRecord->SetRecordId( aIapId );
+    
+    iapRecord->LoadL( iSession );
+    retVal = CanHandleIapIdL( iapRecord );
+    
+    CleanupStack::PopAndDestroy( iapRecord );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+ 
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CanHandleIapIdL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginVpn::CanHandleIapIdL( CommsDat::CCDIAPRecord* aIapRecord ) const
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY );
+    TBool retVal( EFalse );
+        
+    if( TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameVPNService) ||
+        TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameVirtualBearer) )
+        {
+        // Further comparision is to find exact info that the IAP can handle by this plugin
+        CMDBRecordSet<CCDVirtualBearerRecord>* bearersRS = 
+                new(ELeave) CMDBRecordSet<CCDVirtualBearerRecord>
+                                                   (KCDTIdVirtualBearerRecord);
+        CleanupStack::PushL( bearersRS );
+
+        CCDVirtualBearerRecord* bearerRecord = 
+                static_cast<CCDVirtualBearerRecord *>
+                    (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
+
+        CleanupStack::PushL( bearerRecord );
+    
+        // Find entries used "vpnconnagt.agt" as agent from Table VirtualBearer
+        bearerRecord->iBearerAgent.SetL( KVpnVirtualBearerAgent );
+    
+        bearersRS->iRecords.AppendL( bearerRecord );
+
+        CleanupStack::Pop( bearerRecord );
+        bearerRecord = NULL;
+        
+        if ( bearersRS->FindL( iSession ) )
+            {
+            TUint32 recordId = (*bearersRS)[0]->RecordId();
+            TPtrC bearerName( (*bearersRS)[0]->iRecordName.GetL() );
+        
+            // Further comparing record ID referred to by this VPN IAP with entry ID in table VirtualBearer
+            // And also comparing bear name with our expected one "vpnbearer"
+            if( recordId == aIapRecord->iBearer && 
+                bearerName == TPtrC( KVpnVirtualBearerName ) )
+                {
+                retVal = ETrue;
+                }
+            }        
+        CleanupStack::PopAndDestroy( bearersRS );
+        }
+    
+    OstTraceFunctionExit0( DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerTableIdsToBeObservedL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::GetBearerTableIdsToBeObservedL( RArray<TUint32>& aTableIdArray ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_ENTRY );
+    
+    aTableIdArray.AppendL( KCDTIdVirtualBearerRecord );
+    aTableIdArray.AppendL( iVirtualTableId );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerSpecificRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::GetBearerSpecificRecordsL(RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_ENTRY );
+       
+    __ASSERT_DEBUG( iVirtualIapNextLayerRecord != NULL, User::Invariant() );  
+            
+    CCDVirtualIAPNextLayerRecord* virtualIapNextLayerRecordCopy = 
+                new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+    CleanupStack::PushL( virtualIapNextLayerRecordCopy );
+    
+    TUint value = iVirtualIapNextLayerRecord->iIAP;
+    virtualIapNextLayerRecordCopy->iIAP = value;
+    
+    value = iVirtualIapNextLayerRecord->iNextLayerSNAP;
+    virtualIapNextLayerRecordCopy->iNextLayerSNAP = value;
+    
+    value = iVirtualIapNextLayerRecord->iNextLayerIAP;
+    virtualIapNextLayerRecordCopy->iNextLayerIAP = value;
+    
+    virtualIapNextLayerRecordCopy->SetElementId( iVirtualIapNextLayerRecord->ElementId() );
+    User::LeaveIfError( aRecordArray.Append( virtualIapNextLayerRecordCopy ) );
+    CleanupStack::Pop( virtualIapNextLayerRecordCopy );    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerIntAttributeL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginVpn::GetBearerIntAttributeL( 
+        TUint32 aAttribute, 
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_ENTRY );
+    
+    CCDVPNServiceRecord* serviceRecord = static_cast<CCDVPNServiceRecord *>                
+                                                        ( aGenRecordArray[KServiceRecordIndex] );
+        
+    TUint32 retVal( 0 );
+    switch( aAttribute )
+        {
+        case ECmExtensionLevel:   
+            {
+            retVal = KExtensionBaseLevel;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            TCommsDBBearerTechnology bearer = KCommDbBearerVirtual; 
+            retVal = bearer;
+            }
+            break;
+        case ECmNextLayerIapId:
+        case EVpnIapId:
+            {            
+            TUint recordId = serviceRecord->iServiceIAP;//TODO, can't use this straight? link containd the ID.
+            if (recordId != 0)
+                {
+                CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
+                                        ( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+                
+                CleanupStack::PushL( iapRecord );
+                iapRecord->SetRecordId( recordId );
+                iapRecord->LoadL( iSession );
+                retVal = iapRecord->RecordId();
+                CleanupStack::PopAndDestroy( iapRecord );                             
+                }
+            }
+            break;
+        case EVpnNetworkId:
+        case ECmNextLayerSNAPId:
+            {
+            TUint recordId = serviceRecord->iServiceSNAP;
+            if ( recordId != 0 )
+                {
+                CCDAccessPointRecord* accessPointRecord = static_cast<CCDAccessPointRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
+                CleanupStack::PushL( accessPointRecord );
+                accessPointRecord->SetRecordId( recordId );
+                accessPointRecord->LoadL( iSession );
+                retVal = accessPointRecord->iRecordTag;
+                CleanupStack::PopAndDestroy( accessPointRecord );
+
+                if ( aAttribute == EVpnNetworkId )
+                    {
+                    __ASSERT_DEBUG( retVal >= KCmmDestIdIntervalMin, User::Invariant() );//TODO, replace with iCustomSelectionPolicy
+                    retVal -= KCmmDestIdIntervalMin;
+                    }
+                }
+            }
+            break;
+        default:
+            {
+            retVal = GetBearerInfoIntL( aAttribute );
+            }
+            break;
+        }
+    
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginVpn::GetBearerBoolAttributeL( 
+        TUint32 aAttribute, 
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_ENTRY );
+    //We don't have IAP specific bool attributes, but the bearer specific
+    //attributes may also be asked this way...
+    TBool retVal = GetBearerInfoBoolL( aAttribute );              
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+  
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerStringAttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginVpn::GetBearerStringAttributeL( 
+        TUint32 aAttribute, 
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_ENTRY );
+    
+    CCDVPNServiceRecord* serviceRecord = static_cast<CCDVPNServiceRecord *>                
+                                                        ( aGenRecordArray[KServiceRecordIndex] );
+
+    HBufC* retVal =  NULL;
+    switch( aAttribute )
+        {
+        case EVpnServicePolicy:
+            {
+            retVal = TPtrC( serviceRecord->iServicePolicy ).AllocL();
+            }
+            break;
+        default:
+            {
+            retVal = GetBearerInfoStringL( aAttribute );
+            }
+            break;
+        }
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetBearerString8AttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginVpn::GetBearerString8AttributeL( 
+        TUint32 aAttribute, 
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_ENTRY );
+    
+    HBufC8* retVal = GetBearerInfoString8L( aAttribute );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::SetBearerIntAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::SetBearerIntAttributeL( 
+        TUint32 aAttribute, 
+        TUint32 aValue, 
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_ENTRY );
+
+    CCDVPNServiceRecord* serviceRecord = static_cast<CCDVPNServiceRecord *>                
+                                                    (aGenRecordArray[KServiceRecordIndex]);
+
+    CCDVirtualIAPNextLayerRecord* virtualIapNextLayerRecord = static_cast<CCDVirtualIAPNextLayerRecord*>
+                                                        (aBearerSpecRecordArray[KVirtualIAPNextLayerRecordIndex]);
+
+    
+    switch(aAttribute)
+        {
+        case ECmNextLayerIapId: //falls through
+        case EVpnIapId:
+            {
+            if( aValue == 0 || aValue >= (KCmmConnMethodIdIntervalMax - 2) )
+                {
+                User::Leave( KErrArgument );
+                }            
+            
+            //Tries to find corresponding IAP record.
+            CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
+                                    ( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+                
+            CleanupStack::PushL( iapRecord );
+            iapRecord->SetRecordId( aValue );            
+            TRAPD(err, iapRecord->LoadL( iSession ));
+            if ( err == KErrNotFound )
+                {
+                User::Leave( KErrArgument );
+                }
+            User::LeaveIfError( err );
+            
+            serviceRecord->iServiceIAP = iapRecord->RecordId();
+            serviceRecord->iServiceNetwork = 0;
+            serviceRecord->iServiceSNAP = 0;
+            virtualIapNextLayerRecord->iNextLayerIAP.SetL( aValue );
+            virtualIapNextLayerRecord->iNextLayerSNAP = 0;
+            CleanupStack::PopAndDestroy( iapRecord );
+            }
+            break;
+        case EVpnNetworkId: //falls through
+            {
+            if ( aValue == 0 || aValue > (KCmmDestIdIntervalLegacyMax - 2) )
+                {
+                User::Leave( KErrArgument );
+                }
+            }
+            // Fallthrough intended.
+        case ECmNextLayerSNAPId:
+            {
+            if ( aValue <= ( KCmmDestIdIntervalLegacyMax - 2 ) )
+                {
+                aValue += KCmmDestIdIntervalMin;
+                }
+
+            if ( aValue <= KCmmDestIdIntervalMin ||
+                    aValue > KCmmDestIdIntervalMax - 2 )
+                {
+                User::Leave( KErrArgument );
+                }
+
+            CCDAccessPointRecord* accessPointRecord = static_cast<CCDAccessPointRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
+            CleanupStack::PushL( accessPointRecord );
+            accessPointRecord->iRecordTag = aValue;
+            if ( accessPointRecord->FindL( iSession ) )
+                {
+                serviceRecord->iServiceIAP = 0;
+                serviceRecord->iServiceNetwork = 0;
+                serviceRecord->iServiceSNAP = accessPointRecord->RecordId();
+                virtualIapNextLayerRecord->iNextLayerIAP = 0;
+                virtualIapNextLayerRecord->iNextLayerSNAP.SetL( aValue );
+                }
+            else
+                {
+                User::Leave( KErrArgument );
+                }
+            CleanupStack::PopAndDestroy( accessPointRecord );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::SetBearerBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::SetBearerBoolAttributeL( 
+        TUint32 /*aAttribute*/, 
+        TBool /*aValue*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_ENTRY );
+    
+    User::Leave( KErrNotSupported );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_EXIT );
+    }
+  
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::SetBearerStringAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::SetBearerStringAttributeL( 
+        TUint32 aAttribute, 
+        const TDesC16& aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    CCDVPNServiceRecord* serviceRecord = static_cast<CCDVPNServiceRecord *>                
+                                                    ( aGenRecordArray[KServiceRecordIndex] );
+
+    switch(aAttribute)
+        {
+        case EVpnServicePolicyName:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        case EVpnServicePolicy:
+            {
+            serviceRecord->iServicePolicy.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }    
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::SetBearerString8AttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::SetBearerString8AttributeL( 
+        TUint32 /*aAttribute*/, 
+        const TDesC8& /*aValue*/,                                                    
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    User::Leave( KErrNotSupported );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::PreparePluginToLoadRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::PreparePluginToLoadRecordsL()
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::PrepareToCopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::PrepareToCopyDataL( CCmPluginBaseEng* /*aCopyInstance*/ )
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::PreparePluginToUpdateRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::PreparePluginToUpdateRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::PrepareToDeleteRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::PrepareToDeleteRecordsL()
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::LoadServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::LoadServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_LOADSERVICERECORDL_ENTRY );
+    
+    __ASSERT_DEBUG( iServiceRecord == NULL, User::Invariant() );
+    
+    if( TPtrC( KCDTypeNameVPNService ) == iIapRecord->iServiceType )
+        {
+        iServiceRecord = static_cast<CCDVPNServiceRecord *>
+                    ( CCDRecordBase::RecordFactoryL(KCDTIdVPNServiceRecord) );
+        iServiceRecord->SetRecordId( iIapRecord->iService );
+        iServiceRecord->LoadL( iSession );        
+        }
+    else
+        // this IAP service is not supported by this plugin.
+        {
+        User::Leave( KErrNotSupported );
+        }    
+    OstTraceFunctionExit0( CCMPLUGINVPN_LOADSERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CreateServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::CreateServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CREATESERVICERECORDL_ENTRY );
+    
+    delete iServiceRecord; 
+    iServiceRecord = NULL;
+    
+    iServiceRecord = static_cast<CCDVPNServiceRecord *>
+                    ( CCDRecordBase::RecordFactoryL( KCDTIdVPNServiceRecord ) );
+    
+    ServiceRecord().iServicePolicy.SetL( KNullDesC );
+    ServiceRecord().iServiceIAP = 0;
+    ServiceRecord().iServiceNetwork = 0;
+    ServiceRecord().iServiceSNAP = 0;
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_CREATESERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::UpdateServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::UpdateServiceRecordL( 
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_UPDATESERVICERECORDL_ENTRY );
+        
+    // Delete the original record and create a copy from the parameter
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    CCDVPNServiceRecord* vpnServiceRecordFrom =
+            static_cast<CCDVPNServiceRecord *>( aGenRecordArray[KServiceRecordIndex] );
+
+    
+    iServiceRecord = static_cast<CCDVPNServiceRecord*>
+                                  ( CCDRecordBase::CreateCopyRecordL( *vpnServiceRecordFrom ) );
+    iServiceRecord->SetElementId( vpnServiceRecordFrom->ElementId() );
+    
+    if ( !iServiceRecord->RecordId() )
+        {
+        iServiceRecord->SetRecordId( KCDNewRecordRequest );
+        iServiceRecord->StoreL( iSession );
+        
+        vpnServiceRecordFrom->SetElementId( ServiceRecord().ElementId() );
+        }
+    else
+        {
+        iServiceRecord->ModifyL( iSession );
+        }    
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_UPDATESERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CopyServiceRecordL
+// ---------------------------------------------------------------------------
+//
+CommsDat::CCDRecordBase* CCmPluginVpn::CopyServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_COPYSERVICERECORDL_ENTRY );
+    
+    __ASSERT_DEBUG( iServiceRecord != NULL, User::Invariant());    
+    CCDRecordBase* serviceRecord = static_cast<CCDVPNServiceRecord*>
+                                  ( CCDRecordBase::CreateCopyRecordL( *iServiceRecord ) );     
+    OstTraceFunctionExit0( CCMPLUGINVPN_COPYSERVICERECORDL_EXIT );
+    return serviceRecord;    
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::ServiceRecordId
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginVpn::ServiceRecordId() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SERVICERECORDID_ENTRY );
+    
+    TUint32 retVal = ServiceRecord().RecordId();
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SERVICERECORDID_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::ServiceRecordNameLC
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::ServiceRecordNameLC( HBufC* &aServiceName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SERVICERECORDNAMELC_ENTRY );    
+    aServiceName = TPtrC( KCDTypeNameVPNService ).AllocLC();      
+    OstTraceFunctionExit0( CCMPLUGINVPN_SERVICERECORDNAMELC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::LoadBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::LoadBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_LOADBEARERRECORDSL_ENTRY );
+    
+    delete iVirtualIapNextLayerRecord;
+    iVirtualIapNextLayerRecord = NULL;
+            
+    CMDBRecordSet<CCDVirtualIAPNextLayerRecord>* virtualRS = 
+              new(ELeave) CMDBRecordSet<CCDVirtualIAPNextLayerRecord>( iVirtualTableId );
+    CleanupStack::PushL( virtualRS );
+    
+    CCDVirtualIAPNextLayerRecord* record = 
+                            new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+    
+    record->iIAP = iIapRecord->RecordId();
+    CleanupStack::PushL( record );
+    virtualRS->iRecords.AppendL( record );
+    CleanupStack::Pop( record );
+    record = NULL;
+    
+    if( virtualRS->FindL( iSession ) )
+        {
+        iVirtualIapNextLayerRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+        iVirtualIapNextLayerRecord->SetRecordId( (*virtualRS)[0]->RecordId() );        
+        iVirtualIapNextLayerRecord->LoadL( iSession );        
+        }
+    else
+        {        
+        User::Leave( KErrNotFound );
+        }
+    
+    CleanupStack::PopAndDestroy( virtualRS );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_LOADBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CreateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::CreateBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_CREATEBEARERRECORDSL_ENTRY );
+
+    delete iVirtualIapNextLayerRecord;
+    iVirtualIapNextLayerRecord = NULL;
+    
+    iVirtualIapNextLayerRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_CREATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::UpdateBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::UpdateBearerRecordsL( 
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_UPDATEBEARERRECORDSL_ENTRY );
+        
+    delete iVirtualIapNextLayerRecord;
+    iVirtualIapNextLayerRecord = NULL;
+    
+    iVirtualIapNextLayerRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+    
+    CCDVirtualIAPNextLayerRecord* virtualIAPNextLayerRecordFrom = 
+            static_cast<CCDVirtualIAPNextLayerRecord*>(aBearerSpecRecordArray[KVirtualIAPNextLayerRecordIndex]);
+    
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
+                            ( aGenRecordArray[KIapRecordIndex] );
+
+    
+    TUint value = iapRecord->RecordId();
+    iVirtualIapNextLayerRecord->iIAP = value;
+    value = virtualIAPNextLayerRecordFrom->iNextLayerSNAP;
+    iVirtualIapNextLayerRecord->iNextLayerSNAP = value;
+    value = virtualIAPNextLayerRecordFrom->iNextLayerIAP;
+    iVirtualIapNextLayerRecord->iNextLayerIAP = value;    
+    iVirtualIapNextLayerRecord->SetElementId(virtualIAPNextLayerRecordFrom->ElementId());
+    
+    if ( !iVirtualIapNextLayerRecord->RecordId() )
+        {
+        iVirtualIapNextLayerRecord->SetRecordId( KCDNewRecordRequest );
+        iVirtualIapNextLayerRecord->StoreL( iSession );
+        virtualIAPNextLayerRecordFrom->SetElementId( iVirtualIapNextLayerRecord->ElementId() );
+        }
+    else
+        {
+        iVirtualIapNextLayerRecord->ModifyL( iSession );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_UPDATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::DeleteBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::DeleteBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_DELETEBEARERRECORDSL_ENTRY );    
+    iVirtualIapNextLayerRecord->DeleteL( iSession );
+    OstTraceFunctionExit0( CCMPLUGINVPN_DELETEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::ResetBearerRecords
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::ResetBearerRecords()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_RESETBEARERRECORDS_ENTRY );
+    
+    delete iVirtualIapNextLayerRecord;
+    iVirtualIapNextLayerRecord = NULL;    
+    OstTraceFunctionExit0( CCMPLUGINVPN_RESETBEARERRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::CopyBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance ) 
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_COPYBEARERRECORDSL_ENTRY );
+    
+    __ASSERT_DEBUG(iVirtualIapNextLayerRecord != NULL, User::Invariant());
+           
+    CCmPluginVpn* plugin = static_cast<CCmPluginVpn*>( aCopyInstance );
+
+    __ASSERT_DEBUG(plugin->iVirtualIapNextLayerRecord == NULL, User::Invariant());
+        
+    plugin->iVirtualIapNextLayerRecord = new (ELeave) CCDVirtualIAPNextLayerRecord( iVirtualTableId );
+    TUint value = iVirtualIapNextLayerRecord->iIAP;
+    plugin->iVirtualIapNextLayerRecord->iIAP = value;
+    value = iVirtualIapNextLayerRecord->iNextLayerSNAP;
+    plugin->iVirtualIapNextLayerRecord->iNextLayerSNAP = value;
+    value = iVirtualIapNextLayerRecord->iNextLayerIAP;
+    plugin->iVirtualIapNextLayerRecord->iNextLayerIAP = value;    
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_COPYBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::BearerRecordIdL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::BearerRecordIdL( TUint32& aRecordId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_BEARERRECORDIDL_ENTRY );
+    
+    CCDVirtualBearerRecord* bearerRecord = GetVirtualBearerRecordLC();
+    aRecordId = bearerRecord->RecordId();
+    CleanupStack::PopAndDestroy(bearerRecord);
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_BEARERRECORDIDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::BearerRecordNameLC
+// ---------------------------------------------------------------------------
+//
+void CCmPluginVpn::BearerRecordNameLC( HBufC* &aBearerName )
+    {   
+    OstTraceFunctionEntry0( CCMPLUGINVPN_BEARERRECORDNAMELC_ENTRY );
+    
+    aBearerName = TPtrC( KCDTypeNameVirtualBearer ).AllocLC();
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_BEARERRECORDNAMELC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::ServiceRecord
+// ---------------------------------------------------------------------------
+//
+CCDVPNServiceRecord& CCmPluginVpn::ServiceRecord() const
+    {    
+    OstTraceFunctionEntry0( CCMPLUGINVPN_SERVICERECORD_ENTRY );
+    
+    CCDVPNServiceRecord& serviceRecord = *static_cast<CCDVPNServiceRecord*>( iServiceRecord );
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_SERVICERECORD_EXIT );
+    return serviceRecord;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetVirtualBearerRecordLC
+// ---------------------------------------------------------------------------
+//
+CCDVirtualBearerRecord* CCmPluginVpn::GetVirtualBearerRecordLC() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_ENTRY );
+        
+    //First tries to load the virtual bearer record.
+    //If the loading fails creates a new one.
+    CMDBRecordSet<CCDVirtualBearerRecord>* bearersRS = 
+            new(ELeave) CMDBRecordSet<CCDVirtualBearerRecord>
+                                               (KCDTIdVirtualBearerRecord);
+    CleanupStack::PushL( bearersRS );
+
+    CCDVirtualBearerRecord* bearerRecord = 
+            static_cast<CCDVirtualBearerRecord *>
+                (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
+
+    CleanupStack::PushL( bearerRecord );
+
+    // Find entries used "vpnconnagt.agt" as agent from Table VirtualBearer
+    bearerRecord->iBearerAgent.SetL( KVpnVirtualBearerAgent );
+    bearersRS->iRecords.AppendL( bearerRecord );
+
+    CleanupStack::Pop( bearerRecord );
+    bearerRecord = NULL;
+    
+    CCDVirtualBearerRecord* retVal = NULL;
+    if ( bearersRS->FindL( iSession ) )
+        {
+        for (TInt i = 0; i < bearersRS->iRecords.Count(); ++i)
+            {            
+            TPtrC bearerName( (*bearersRS)[i]->iRecordName.GetL() );
+    
+            // Further comparing record ID referred to by this VPN IAP with entry ID in table VirtualBearer
+            // And also comparing bear name with our expected one "vpnbearer"
+            if( bearerName == TPtrC( KVpnVirtualBearerName ) )
+                {
+                TUint32 recordId = (*bearersRS)[i]->RecordId();
+                retVal = static_cast<CCDVirtualBearerRecord *>
+                                            (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
+                CleanupStack::PushL(retVal);
+                retVal->SetRecordId( recordId );
+                retVal->LoadL( iSession );
+                CleanupStack::Pop(retVal);
+                break;
+                }
+            }
+        }         
+    CleanupStack::PopAndDestroy( bearersRS );
+
+    //If iVirtualBearerRecord is still NULL the loading has failed we try to create a new 
+    //entry to the table.
+    if (retVal == NULL)
+        {
+        retVal = static_cast<CCDVirtualBearerRecord *>
+                                    (CCDRecordBase::RecordFactoryL(KCDTIdVirtualBearerRecord));
+        CleanupStack::PushL(retVal);
+        retVal->iRecordName.SetL( KVpnVirtualBearerName );
+        retVal->iBearerAgent.SetL( KVpnVirtualBearerAgent );
+        retVal->iVirtualBearerNifName.SetL(KVpnVirtualBearerNif);
+        retVal->iLastSocketActivityTimeout = (TUint32)KNoTimeout;
+        retVal->iLastSessionClosedTimeout = KLastSessionTimeout;
+        retVal->iLastSocketClosedTimeout = (TUint32)KNoTimeout;
+        retVal->iBearerTechnology = KCommDbBearerVirtual;
+        retVal->SetRecordId( KCDNewRecordRequest );
+        
+        retVal->StoreL( iSession );
+        }
+    else
+        {
+        CleanupStack::PushL(retVal);
+        }
+    
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginVpn::GetDefPriorityL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginVpn::GetDefPriorityL( const TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINVPN_GETDEFPRIORITYL_ENTRY );
+    
+    TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
+
+    CCDGlobalBearerTypePriorizationRecord* priorityRecord =
+            new( ELeave ) CCDGlobalBearerTypePriorizationRecord( iBearerPriorityTableId );
+    CleanupStack::PushL( priorityRecord );
+
+    priorityRecord->iServiceType.SetL( TPtrC( KCDTypeNameVPNService ) );
+
+    if ( priorityRecord->FindL( iSession ) )
+        {
+        priorityRecord->LoadL( iSession );
+
+        switch ( aAttribute )
+            {
+            case ECmDefaultPriority:
+                {
+                retVal = priorityRecord->iPriority;
+                }
+                break;
+            case ECmDefaultUiPriority:
+                {
+                retVal = priorityRecord->iUIPriority;
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    CleanupStack::PopAndDestroy( priorityRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINVPN_GETDEFPRIORITYL_EXIT );
+    return retVal;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpnproxy.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* VPN plug-in's ECom proxy descriptor. 
+*/
+
+#include "cmpluginvpn.h"
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] = 
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KPluginVPNBearerTypeUid, CCmPluginVpn::NewL)
+    };
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+#define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/cmpluginvpnTraces.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,90 @@
+// Created by TraceCompiler 2.2.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __CMPLUGINVPNTRACES_H__
+#define __CMPLUGINVPNTRACES_H__
+
+#define KOstTraceComponentID 0x10281bbe
+
+#define CCMPLUGINVPN_NEWL_ENTRY 0x8a0001
+#define CCMPLUGINVPN_NEWL_EXIT 0x8a0002
+#define CCMPLUGINVPN_CREATEINSTANCEL_ENTRY 0x8a0003
+#define CCMPLUGINVPN_CREATEINSTANCEL_EXIT 0x8a0004
+#define CCMPLUGINVPN_CCMPLUGINVPN_ENTRY 0x8a0005
+#define CCMPLUGINVPN_CCMPLUGINVPN_EXIT 0x8a0006
+#define DUP1_CCMPLUGINVPN_CCMPLUGINVPN_ENTRY 0x8a0007
+#define DUP1_CCMPLUGINVPN_CCMPLUGINVPN_EXIT 0x8a0008
+#define CCMPLUGINVPN_CONSTRUCTL_ENTRY 0x8a0009
+#define CCMPLUGINVPN_CONSTRUCTL_EXIT 0x8a000a
+#define CCMPLUGINVPN_GETBEARERINFOINTL_ENTRY 0x8a000b
+#define CCMPLUGINVPN_GETBEARERINFOINTL_EXIT 0x8a000c
+#define CCMPLUGINVPN_GETBEARERINFOBOOLL_ENTRY 0x8a000d
+#define CCMPLUGINVPN_GETBEARERINFOBOOLL_EXIT 0x8a000e
+#define CCMPLUGINVPN_GETBEARERINFOSTRINGL_ENTRY 0x8a000f
+#define CCMPLUGINVPN_GETBEARERINFOSTRINGL_EXIT 0x8a0010
+#define CCMPLUGINVPN_GETBEARERINFOSTRING8L_ENTRY 0x8a0011
+#define CCMPLUGINVPN_GETBEARERINFOSTRING8L_EXIT 0x8a0012
+#define CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY 0x8a0013
+#define CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT 0x8a0014
+#define DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY 0x8a0015
+#define DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT 0x8a0016
+#define CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_ENTRY 0x8a0017
+#define CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_EXIT 0x8a0018
+#define CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_ENTRY 0x8a0019
+#define CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_EXIT 0x8a001a
+#define CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_ENTRY 0x8a001b
+#define CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_EXIT 0x8a001c
+#define CCMPLUGINVPN_LOADSERVICERECORDL_ENTRY 0x8a001d
+#define CCMPLUGINVPN_LOADSERVICERECORDL_EXIT 0x8a001e
+#define CCMPLUGINVPN_CREATESERVICERECORDL_ENTRY 0x8a001f
+#define CCMPLUGINVPN_CREATESERVICERECORDL_EXIT 0x8a0020
+#define CCMPLUGINVPN_COPYSERVICERECORDL_ENTRY 0x8a0021
+#define CCMPLUGINVPN_COPYSERVICERECORDL_EXIT 0x8a0022
+#define CCMPLUGINVPN_SERVICERECORDNAMELC_ENTRY 0x8a0023
+#define CCMPLUGINVPN_SERVICERECORDNAMELC_EXIT 0x8a0024
+#define CCMPLUGINVPN_LOADBEARERRECORDSL_ENTRY 0x8a0025
+#define CCMPLUGINVPN_LOADBEARERRECORDSL_EXIT 0x8a0026
+#define CCMPLUGINVPN_CREATEBEARERRECORDSL_ENTRY 0x8a0027
+#define CCMPLUGINVPN_CREATEBEARERRECORDSL_EXIT 0x8a0028
+#define CCMPLUGINVPN_DELETEBEARERRECORDSL_ENTRY 0x8a0029
+#define CCMPLUGINVPN_DELETEBEARERRECORDSL_EXIT 0x8a002a
+#define CCMPLUGINVPN_RESETBEARERRECORDS_ENTRY 0x8a002b
+#define CCMPLUGINVPN_RESETBEARERRECORDS_EXIT 0x8a002c
+#define CCMPLUGINVPN_COPYBEARERRECORDSL_ENTRY 0x8a002d
+#define CCMPLUGINVPN_COPYBEARERRECORDSL_EXIT 0x8a002e
+#define CCMPLUGINVPN_BEARERRECORDIDL_ENTRY 0x8a002f
+#define CCMPLUGINVPN_BEARERRECORDIDL_EXIT 0x8a0030
+#define CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_ENTRY 0x8a0031
+#define CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_EXIT 0x8a0032
+#define CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_ENTRY 0x8a0033
+#define CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_EXIT 0x8a0034
+#define CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_ENTRY 0x8a0035
+#define CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_EXIT 0x8a0036
+#define CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_ENTRY 0x8a0037
+#define CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_EXIT 0x8a0038
+#define CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_ENTRY 0x8a0039
+#define CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_EXIT 0x8a003a
+#define CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_ENTRY 0x8a003b
+#define CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_EXIT 0x8a003c
+#define CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_ENTRY 0x8a003d
+#define CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_EXIT 0x8a003e
+#define CCMPLUGINVPN_UPDATESERVICERECORDL_ENTRY 0x8a003f
+#define CCMPLUGINVPN_UPDATESERVICERECORDL_EXIT 0x8a0040
+#define CCMPLUGINVPN_SERVICERECORDID_ENTRY 0x8a0041
+#define CCMPLUGINVPN_SERVICERECORDID_EXIT 0x8a0042
+#define CCMPLUGINVPN_UPDATEBEARERRECORDSL_ENTRY 0x8a0043
+#define CCMPLUGINVPN_UPDATEBEARERRECORDSL_EXIT 0x8a0044
+#define CCMPLUGINVPN_BEARERRECORDNAMELC_ENTRY 0x8a0045
+#define CCMPLUGINVPN_BEARERRECORDNAMELC_EXIT 0x8a0046
+#define CCMPLUGINVPN_SERVICERECORD_ENTRY 0x8a0047
+#define CCMPLUGINVPN_SERVICERECORD_EXIT 0x8a0048
+#define CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_ENTRY 0x8a0049
+#define CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_EXIT 0x8a004a
+#define CCMPLUGINVPN_GETDEFPRIORITYL_ENTRY 0x8a004b
+#define CCMPLUGINVPN_GETDEFPRIORITYL_EXIT 0x8a004c
+
+
+#endif
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,79 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x8a
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_BEARERRECORDIDL_ENTRY=0x2f
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_BEARERRECORDIDL_EXIT=0x30
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_BEARERRECORDNAMELC_ENTRY=0x45
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_BEARERRECORDNAMELC_EXIT=0x46
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY=0x13
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT=0x14
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CCMPLUGINVPN_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CCMPLUGINVPN_EXIT=0x6
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CONSTRUCTL_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CONSTRUCTL_EXIT=0xa
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_COPYBEARERRECORDSL_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_COPYBEARERRECORDSL_EXIT=0x2e
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_COPYSERVICERECORDL_ENTRY=0x21
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_COPYSERVICERECORDL_EXIT=0x22
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATEBEARERRECORDSL_ENTRY=0x27
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATEBEARERRECORDSL_EXIT=0x28
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATEINSTANCEL_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATEINSTANCEL_EXIT=0x4
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATESERVICERECORDL_ENTRY=0x1f
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_CREATESERVICERECORDL_EXIT=0x20
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_DELETEBEARERRECORDSL_ENTRY=0x29
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_DELETEBEARERRECORDSL_EXIT=0x2a
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_ENTRY=0x31
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERBOOLATTRIBUTEL_EXIT=0x32
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOBOOLL_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOBOOLL_EXIT=0xe
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOINTL_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOINTL_EXIT=0xc
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOSTRING8L_ENTRY=0x11
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOSTRING8L_EXIT=0x12
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOSTRINGL_ENTRY=0xf
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINFOSTRINGL_EXIT=0x10
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_ENTRY=0x1b
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERINTATTRIBUTEL_EXIT=0x1c
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_ENTRY=0x19
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSPECIFICRECORDSL_EXIT=0x1a
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSTRING8ATTRIBUTEL_EXIT=0x36
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_ENTRY=0x33
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERSTRINGATTRIBUTEL_EXIT=0x34
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_ENTRY=0x17
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETBEARERTABLEIDSTOBEOBSERVEDL_EXIT=0x18
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETDEFPRIORITYL_ENTRY=0x4b
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETDEFPRIORITYL_EXIT=0x4c
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_ENTRY=0x49
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_GETVIRTUALBEARERRECORDLC_EXIT=0x4a
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_LOADBEARERRECORDSL_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_LOADBEARERRECORDSL_EXIT=0x26
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_LOADSERVICERECORDL_ENTRY=0x1d
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_LOADSERVICERECORDL_EXIT=0x1e
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_NEWL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_NEWL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_RESETBEARERRECORDS_ENTRY=0x2b
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_RESETBEARERRECORDS_EXIT=0x2c
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORDID_ENTRY=0x41
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORDID_EXIT=0x42
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORDNAMELC_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORDNAMELC_EXIT=0x24
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORD_ENTRY=0x47
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SERVICERECORD_EXIT=0x48
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERBOOLATTRIBUTEL_EXIT=0x38
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERINTATTRIBUTEL_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_ENTRY=0x39
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERSTRING8ATTRIBUTEL_EXIT=0x3a
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_SETBEARERSTRINGATTRIBUTEL_EXIT=0x3e
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_UPDATEBEARERRECORDSL_ENTRY=0x43
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_UPDATEBEARERRECORDSL_EXIT=0x44
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_UPDATESERVICERECORDL_ENTRY=0x3f
+[TRACE]TRACE_FLOW[0x8A]_CCMPLUGINVPN_UPDATESERVICERECORDL_EXIT=0x40
+[TRACE]TRACE_FLOW[0x8A]_DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x8A]_DUP1_CCMPLUGINVPN_CANHANDLEIAPIDL_EXIT=0x16
+[TRACE]TRACE_FLOW[0x8A]_DUP1_CCMPLUGINVPN_CCMPLUGINVPN_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x8A]_DUP1_CCMPLUGINVPN_CCMPLUGINVPN_EXIT=0x8
+[[OBSOLETE]][TRACE]TRACE_FATAL[0x81]_CCMPLUGINVPN_LOADBEARERRECORDSL=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/data/10281BB2.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     WLAN PlugIn's resource file
+*     
+*
+*/
+
+#include "ecom/registryinfo.rh"
+
+// Because attribute enums had to be added to namespace CMManager
+// it's not possible to included cmpluginwlandef.h
+// Thus bearer type id had to be redefine here.
+#define KUidWlanBearerType  0x10281BB1
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    dll_uid = 0x10281BB2;
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            interface_uid = 0x10207377; // = KCMPluginInterfaceUid
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = KUidWlanBearerType;
+                    version_no = 1;
+                    display_name = "Wlan";
+                    default_data = "Wlan";
+                    opaque_data = "";
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Build information for the WLAN plugin.
+*
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmpluginwlan.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(cmmpluginwlan.iby)
+
+
+PRJ_MMPFILES
+cmpluginwlan.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/cmpluginwlan.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Project specification for LAN Plugin.
+*
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET      cmpluginwlan.dll
+UID         0x10009D8D 0x10281BB2
+
+TARGETTYPE      PLUGIN
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+SOURCEPATH  ../src
+
+SOURCE      cmpluginwlanproxy.cpp
+SOURCE      cmpluginwlan.cpp
+SOURCE      cmwlancoveragecheck.cpp
+
+SOURCEPATH  ../data
+
+START RESOURCE 10281BB2.rss
+TARGET cmpluginwlan.rsc
+END
+
+// Component specific internal headers
+USERINCLUDE     ../inc
+USERINCLUDE     ../traces
+
+// ADO specific internal headers
+SYSTEMINCLUDE   ../../../../../inc
+
+//Macro to /epoc32 headers
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY     euser.lib
+LIBRARY     ecom.lib
+LIBRARY     commsdat.lib
+LIBRARY     featmgr.lib
+LIBRARY     eapsymbiantools.lib
+LIBRARY     eaptools.lib
+LIBRARY     eaptrace.lib
+LIBRARY     cmmanagerdatabase.lib
+LIBRARY     cmmpluginbase.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/inc/cmpluginwlan.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,416 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*       Declaration of WLAN interface implementation
+*       for WLAN plugin
+*
+*/
+
+
+#ifndef WLAN_PLUGIN_H
+#define WLAN_PLUGIN_H
+
+#include <commsdat_partner.h>
+#include <cmpluginbaseeng.h>
+#include <cmpluginwlandef.h>
+
+class CCDWlanServiceRecord;
+
+
+/**
+*  CCmPluginWlan defines the functionality of wlan bearer support.
+*  Most of the API is inherited from CCmPluginBaseEng class.
+*/
+NONSHARABLE_CLASS( CCmPluginWlan ) : public CCmPluginBaseEng
+    {
+
+    public: // Constructors and destructor
+        /**
+         * Two phased constructor.
+         * @return Returns the Wlan plugin object.
+         */
+        static CCmPluginWlan* NewL( TCmPluginInitParam* aInitParam );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CCmPluginWlan();
+
+    public: // From CCmPluginBaseEng
+        /**
+         * Creates a new instance of Wlan bearer plugin. The instance
+         * created represents a bearer, not a connection method.
+         * @param aInitParam Initialization data.
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the cmm server.
+         */
+
+        virtual CCmPluginBaseEng* CreateInstanceL(
+                TCmPluginInitParam& aInitParam ) const;
+
+        /**
+         * Following GetBearerInfoXXXL methods return the values of the
+         * requested attributes. These values are Wlan specific
+         * so they don't vary between Wlan Connection Methods.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+
+        virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const;
+
+        virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const;
+
+        virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const;
+
+        virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const;
+
+        /**
+         * Checks if the plug-in can handle the Connection Method identified
+         * with parameter aIapId.
+         * @param aIapId IAPId of the Connection Method to be checked.
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        TBool CanHandleIapIdL( TUint32 aIapId ) const;
+
+        /**
+        * Checks if the plug-in can handle the given IAP record.
+        * @param aIapRecord IAP record to be checked
+        * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+        */
+        TBool CanHandleIapIdL( CommsDat::CCDIAPRecord *aIapRecord ) const;
+
+    public: // From CCmPluginBaseEng concerning a Connection Method
+        /**
+         * Before generic side starts to request plugins to load records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         */
+        virtual void PreparePluginToLoadRecordsL();
+
+        /**
+         * Before generic side starts to request plugins to update records
+         * it calls this to give a possibility make some preparations
+         * if needed.
+         * @param aGenRecordArray An array of generic records to be updated.
+         * @param aBearerSpecRecordArray An array of bearer specific records
+         * to be updated.
+         */
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Creates the CCDLANServiceRecord and CCDWlanServiceRecord type service
+         * records.
+         */
+        virtual void CreateServiceRecordL();
+
+        /**
+         * Loads the service record(which is in wlan case LAN service type).
+         * Service record pointer is stored to plugins generic side
+         * implementation(CCmPluginBaseEng).
+         */
+        void LoadServiceRecordL();
+
+        /**
+         * Returns the service record id of this Connection Method.
+         * @return Returns the id of the service record id of this Connection Method.
+         */
+        virtual TUint32 ServiceRecordId() const;
+
+        /**
+        * Returns the service record name of the Connection Method.
+        * @param aServiceName Name of the service record which CM's iap record
+        * points to.
+        */
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName );
+
+        /**
+         * Writes the service record data to CommsDat.
+         * @param aGenRecordArray An array containing pointers to service
+         * record of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method.
+         */
+        virtual void UpdateServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Loads Wlan specific records of the Connection Method.
+         */
+        virtual void LoadBearerRecordsL();
+
+        /**
+         * Returns the bearer record id of the Connection Method.
+         * @param aRecordId Id of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordIdL( TUint32& aRecordId );
+
+        /**
+         * Returns the bearer record name of the Connection Method.
+         * @param aBearerName Name of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordNameLC( HBufC*& aBearerName );
+
+        /**
+         * Writes Wlan specific record data to CommsDat.
+         * @param aGenRecordArray An array containing pointer to service
+         * record of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records to be written.
+         */
+        virtual void UpdateBearerRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+        * Deletes Wlan specific records of the Connection Method.
+        */
+        void DeleteBearerRecordsL();
+
+        /**
+         * Releases the memory reserved by the Wlan specific records
+         * of the Connection Method.
+         */
+        virtual void ResetBearerRecords();
+
+        /**
+         * Creates a copy of Wlan specific records and adds them to
+         * aRecordArray.
+         * @param aRecordArray Pointer array where to add bearer specific
+         * records.
+         */
+        virtual void GetBearerSpecificRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic
+         *      records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         *      specific records of the Connection Method. aAttribute
+         *      parameter should identify one field(integer, boolean string)
+         *      in one of these records.
+         * @return Returns the requested value. In error case leaves with
+         *      system-wide error code.
+         */
+
+        virtual TUint32 GetBearerIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual TBool GetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC* GetBearerStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual HBufC8* GetBearerString8AttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL(
+                TUint32 aAttribute, TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerBoolAttributeL(
+                TUint32 aAttribute, TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerStringAttributeL(
+                TUint32 aAttribute, const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        virtual void SetBearerString8AttributeL(
+                TUint32 aAttribute, const TDesC8& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Bearer is requested by the server if it uses CommsDat tables which
+         * should be observed for possible changes to be able to keep the
+         * data in memory in up to date.
+         * @param aTableIdArray A reference to an array where to add those
+         * table ids.
+         */
+        virtual void GetBearerTableIdsToBeObservedL(
+                RArray<TUint32>& aTableIdArray ) const;
+
+    private: // construction
+        /**
+        * Constructor.
+        */
+        CCmPluginWlan( TCmPluginInitParam* aInitParam );
+
+        /**
+        * Second phase constructor. Leaves on failure.
+        */
+        void ConstructL();
+
+    private: // from base class
+
+        /**
+        * From CCmPluginBaseEng
+        * Creates the WLAN service record used by this WLAN
+        */
+        void CreateWlanServiceRecordL();
+
+    private: // new functions
+
+        /**
+        * Checks if there are any wlan networks awailable.
+        * @return Returns ETrue if any wlan networks found. Otherwise
+        * returns EFalse.
+        */
+        TBool CheckNetworkCoverageL() const;
+
+        /**
+         * Sets the daemon name for the Connection Method.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method.
+         */
+        void SetDaemonNameL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray );
+
+        /**
+         * Returns a reference to service record of the Connection Method.
+         * @return Returns a reference to service record of the Connection
+         * Method.
+         */
+        CommsDat::CCDLANServiceRecord& ServiceRecord() const;
+
+        /**
+         * Makes needed preparations before copying records.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Copies the LAN service record.
+         * @return Returns a pointer to service record created.
+         */
+        CommsDat::CCDRecordBase* CopyServiceRecordL();
+
+        /**
+         * Copies the Wlan service record.
+         * @param aSourceRecord A record where to copy from.
+         * @param aDestRecord A record where to copy to.
+         */
+        void CopyWlanServiceRecordL(
+                CCDWlanServiceRecord* aSourceRecord,
+                CCDWlanServiceRecord* aDestRecord);
+
+        /**
+         * Copies the bearer specific records to copy instance.
+         * @param aCopyInstance Instance of the plugin where to copy.
+         */
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Adds Wlan service record with default values to record array.
+         * @param aRecordArray The array where to add the record.
+         */
+        void GetDefaultWlanServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray );
+
+        /**
+         * Checks if the given attributes are in the correct range.
+         * @param aAttribute Identifies the attribute to be checked.
+         * @param aValue A value to be checked.
+         */
+        void CheckSecurityAttributeValidityL(
+                const TUint32 aAttribute,
+                const TUint32 aValue );
+
+        /**
+         * Convert a 8-bit string in ascii format to hex format. Ownership of
+         * new string is transfered.
+         */
+        HBufC8* ConvertAsciiToHexL( const TDesC8& aSource );
+
+        /**
+         * Convert a 8-bit string in hex format to ascii format. Ownership of
+         * new string is transfered.
+         */
+        HBufC8* ConvertHexToAsciiL( const TDesC8& aSource );
+
+        /**
+         * Translates a hex char (0-1, a-f, A-F) to its 10-base numerical
+         * value (0-15).
+         */
+        TUint8 ConvertHexCharToNumberL( const TUint8 aHexChar );
+
+        /**
+         * Returns the default priority value identified with the parameter.
+         * @param aAttribute Indentifies the default priority value requested.
+         */
+        TUint32 GetDefPriorityL( const TUint32 aAttribute ) const;
+
+    private: // Data
+
+        /**
+         * WLAN service record.
+         */
+        CCDWlanServiceRecord* iWlanServiceRecord;
+
+        /**
+         * WLAN table ID.
+         */
+        CommsDat::TMDBElementId iWlanTableId;
+
+        /**
+         * Bearer priority table ID.
+         */
+        CommsDat::TMDBElementId iBearerPriorityTableId;
+
+        /**
+         * Boolean to save the WAPI support info.
+         */
+        TBool iWAPISupported;
+    };
+
+#endif // WLAN_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/inc/cmwlancoveragecheck.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Declaration of WLAN Coverage Check class
+*
+*/
+
+#ifndef CMWLANCOVERAGECHECK_H
+#define CMWLANCOVERAGECHECK_H
+
+// INCLUDES
+#include <e32base.h>
+#include <cmpluginwlandef.h>
+
+using namespace CMManager;
+
+/**
+ *  WLAN Coverage Check
+ *
+ *  ?more_complete_description
+ *
+ *  @since S60 3.2
+ */
+class CCmWlanCoverageCheck : public CActive
+    {
+    enum EWlanCoverageState
+        {
+        EServiceStatus,
+        EScanning,
+        EDone,
+        };
+
+    public:
+
+        CCmWlanCoverageCheck();
+        ~CCmWlanCoverageCheck();
+
+        TBool GetCoverageL();
+
+        /**
+        * Returns whether the passed ssid and length results in a hidden or
+        * a non-hidden ssid.
+        *
+        * @since S60 3.2
+        * @param aSsidLength The length of the ssid
+        * @param aSsid The ssid
+        * @return ETrue if the ssid is hidden.
+        */
+        TBool IsHiddenSsid( TUint aSsidLength, const TUint8* aSsid ) const;
+
+    protected:  // from CActive
+
+        virtual void DoCancel();
+        virtual void RunL();
+
+    private:
+
+        TUint32                 iProgState;
+        TBool                   iCoverage;
+        CActiveSchedulerWait    iWait;
+    };
+
+
+#endif // CMWLANCOVERAGECHECK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/rom/cmmpluginwlan.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* cmpluginwlan.dll to ROM.
+*
+*/
+#ifndef CMMPLUGINWLAN_IBY__
+#define CMMPLUGINWLAN_IBY__
+
+ECOM_PLUGIN(cmpluginwlan.dll,10281BB2.rsc)
+
+
+#endif // CMMPLUGINWLAN_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,2491 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Implementation of WLAN Plugin interface implementation
+*        for WLAN Bearer
+*
+*/
+
+
+#include <ecom/ecom.h>      // For REComSession
+#include <wlancontainer.h>
+#include <wlanmgmtcommon.h>
+#include <cmpluginwlandef.h>
+#include <cmcommonconstants.h>
+#include <featmgr.h>
+#include <EapGeneralSettings.h>
+
+#include "datamobilitycommsdattypes.h"
+#include "cmpluginwlan.h"
+#include "cmwlancoveragecheck.h"
+#include "cmmanagerdef.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmpluginwlanTraces.h"
+#endif
+
+using namespace CMManager;
+
+enum TWlanWepKeyFormat
+    {
+    EWlanWepKeyFormatAscii = 0,
+    EWlanWepKeyFormatHex
+    };
+
+// default values for fields...
+// CONSTANTS
+_LIT( KEmpty, "");
+
+const TBool KDefIpAddrFromServer = ETrue;
+const TBool KDefIpDnsAddrFromServer = ETrue;
+const TBool KDefIp6DnsAddrFromServer = ETrue;
+
+const TInt KWlanServiceRecordIndex = 0;
+
+const TInt KWlanLastSocketActivityTimeout = -1;
+const TInt KWlanLastSessionClosedTimeout = 1;
+const TInt KWlanLastSocketClosedTimeout = -1;
+
+/// Modem bearer names for WLAN connection methods.
+_LIT( KModemBearerWLAN, "WLANBearer" );
+
+_LIT( KWlanBearerName, "WLANBearer" );
+_LIT( KWlanBearerAgent, "wlanagt.agt" );
+_LIT( KWlanBearerNif, "wlannif" );
+
+_LIT( KWlanLDDName, "not used" );
+_LIT( KWlanPDDName, "not used" );
+
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::NewL
+// --------------------------------------------------------------------------
+//
+CCmPluginWlan* CCmPluginWlan::NewL( TCmPluginInitParam* aInitParam )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_NEWL_ENTRY );
+
+    CCmPluginWlan* self = new( ELeave ) CCmPluginWlan( aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_NEWL_EXIT );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::~CCmPluginWlan
+// --------------------------------------------------------------------------
+//
+CCmPluginWlan::~CCmPluginWlan()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CCMPLUGINWLAN_ENTRY );
+
+    ResetBearerRecords();
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CCMPLUGINWLAN_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CreateInstanceL
+// --------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmPluginWlan::CreateInstanceL( TCmPluginInitParam& aInitParam ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CREATEINSTANCEL_ENTRY );
+
+    CCmPluginWlan* self = new( ELeave ) CCmPluginWlan( &aInitParam );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CREATEINSTANCEL_EXIT );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CCmPluginWlan
+// --------------------------------------------------------------------------
+//
+CCmPluginWlan::CCmPluginWlan( TCmPluginInitParam* aInitParam )
+        :
+        CCmPluginBaseEng( aInitParam )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINWLAN_CCMPLUGINWLAN_ENTRY );
+
+    iBearerType = KUidWlanBearerType;
+    iWlanServiceRecord = NULL;
+    iWlanTableId = 0;
+    iWAPISupported = EFalse;
+    iBearerPriorityTableId = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINWLAN_CCMPLUGINWLAN_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::ConstructL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CONSTRUCTL_ENTRY );
+
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
+
+    if ( ! FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    CCmPluginBaseEng::ConstructL();
+
+    // Get bearer priority table ID.
+    TRAP_IGNORE( iBearerPriorityTableId =
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iSession ) );
+
+    if ( !iBearerPriorityTableId )
+        {
+        iBearerPriorityTableId =
+                CCDGlobalBearerTypePriorizationRecord::CreateTableL( iSession );
+        }
+
+    TMDBElementId tableId( 0 );
+
+    TRAP_IGNORE( tableId = CCDWlanDeviceSettingsRecord::TableIdL( iSession ) );
+    if ( !tableId )
+        {
+        CCDWlanDeviceSettingsRecord::CreateTableL( iSession );
+        }
+
+    // Get WLAN table ID.
+    TRAP_IGNORE( iWlanTableId = CCDWlanServiceRecord::TableIdL( iSession ) );
+    if ( !iWlanTableId )
+        {
+        iWlanTableId = CCDWlanServiceRecord::CreateTableL( iSession );
+        }
+
+    TRAP_IGNORE( tableId = CCDWLANSecSSIDTable::TableIdL( iSession ) );
+    if ( !tableId )
+        {
+        CCDWLANSecSSIDTable::CreateTableL( iSession );
+        }
+
+    TRAP_IGNORE( tableId = CCDDestNWTable::TableIdL( iSession ) );
+    if ( !tableId )
+        {
+        CCDDestNWTable::CreateTableL( iSession );
+        }
+
+    iWAPISupported = FeatureManager::FeatureSupported( KFeatureIdFfWlanWapi );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ServiceRecord()
+// ---------------------------------------------------------------------------
+//
+CCDLANServiceRecord& CCmPluginWlan::ServiceRecord() const
+    {
+    return *static_cast<CCDLANServiceRecord*>( iServiceRecord );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ServiceRecordId
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginWlan::ServiceRecordId() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SERVICERECORDID_ENTRY );
+
+    return ServiceRecord().RecordId();
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ServiceRecordIdLC
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::ServiceRecordNameLC( HBufC* &aName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SERVICERECORDNAMELC_ENTRY );
+
+    aName = TPtrC( KCDTypeNameLANService ).AllocLC();
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_SERVICERECORDNAMELC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::BearerRecordIdL()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::BearerRecordIdL( TUint32& aRecordId )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_BEARERRECORDIDL_ENTRY );
+
+    CCDLANBearerRecord* lanBearerRecord = static_cast<CCDLANBearerRecord*>
+                        (CCDRecordBase::RecordFactoryL( KCDTIdLANBearerRecord ));
+    CleanupStack::PushL( lanBearerRecord );
+
+    lanBearerRecord->iRecordName.SetL( TPtrC( KModemBearerWLAN ) );
+    if ( !lanBearerRecord->FindL( iSession ) )
+        { // bearer not found -> create dummy values
+        lanBearerRecord->SetRecordId( KCDNewRecordRequest );
+        lanBearerRecord->iBearerAgent = KWlanBearerAgent;
+        lanBearerRecord->iRecordName = KWlanBearerName;
+        lanBearerRecord->iLanBearerNifName = KWlanBearerNif;
+        lanBearerRecord->iLanBearerLddName = KWlanLDDName;
+        lanBearerRecord->iLanBearerPddName = KWlanPDDName;
+        lanBearerRecord->iLastSocketActivityTimeout =
+                                        (TUint32)KWlanLastSocketActivityTimeout;
+        lanBearerRecord->iLastSessionClosedTimeout =
+                                        (TUint32)KWlanLastSessionClosedTimeout;
+        lanBearerRecord->iLastSocketClosedTimeout =
+                                        (TUint32)KWlanLastSocketClosedTimeout;
+
+        lanBearerRecord->StoreL( iSession );
+        }
+
+    aRecordId = lanBearerRecord->RecordId();
+
+    CleanupStack::PopAndDestroy( lanBearerRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_BEARERRECORDIDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::BearerRecordNameLC()
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::BearerRecordNameLC( HBufC* &aBearerName )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_BEARERRECORDNAMELC_ENTRY );
+
+    aBearerName = TPtrC( KCDTypeNameLANBearer ).AllocLC();
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_BEARERRECORDNAMELC_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+TUint32 CCmPluginWlan::GetBearerIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERINTATTRIBUTEL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmInvalidAttribute:
+            {
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            // This is extension from LAN plugin
+            retVal = KExtensionBaseLevel + 1;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            retVal = KCommDbBearerWLAN;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case EWlanServiceId:
+            {
+            retVal = wlanServiceRecord->iWlanServiceId;
+            }
+            break;
+        case EWlanConnectionMode:
+            {
+            retVal = wlanServiceRecord->iWlanConnMode;
+            }
+            break;
+        case EWlanSecurityMode:
+            {
+            retVal = wlanServiceRecord->iWlanSecMode;
+            }
+            break;
+        case EWlanAuthenticationMode:
+            {
+            retVal = wlanServiceRecord->iWlanAuthMode;
+            }
+            break;
+        case EWlanChannelID:
+            {
+            retVal = wlanServiceRecord->iWlanChannelID;
+            }
+            break;
+        case EWlanServiceExtensionTableRecordId:
+            {
+            retVal = serviceRecord->iServiceExtensionTableRecordId;
+            }
+            break;
+        case EWlanWepKeyIndex:
+            {
+            retVal = wlanServiceRecord->iWlanWepIndex;
+            }
+            break;
+        case EWlanWapiPskFormat:
+            {
+            retVal = wlanServiceRecord->iWlanFormatKey1;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERINTATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+TBool CCmPluginWlan::GetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+#ifndef __WINS__
+            retVal = CheckNetworkCoverageL();
+#else
+            retVal = ETrue;
+#endif
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = ETrue;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case EWlanScanSSID:
+            {
+            retVal = wlanServiceRecord->iWlanScanSSID;
+            }
+            break;
+        case EWlanAllowSSIDRoaming:
+            {
+            retVal = wlanServiceRecord->iWlanAllowSSIDRoaming;
+            }
+            break;
+        case ECmIPAddFromServer:
+        case EWlanIpAddrFromServer:
+            {
+            retVal = serviceRecord->iIpAddrFromServer;
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case EWlanIpDNSAddrFromServer:
+            {
+            retVal = serviceRecord->iIpDnsAddrFromServer;
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case EWlanIp6DNSAddrFromServer:
+            {
+            retVal = serviceRecord->iIp6DnsAddrFromServer;
+            }
+            break;
+        case EWlanEnableWpaPsk:
+            {
+            retVal = static_cast<TBool>( wlanServiceRecord->iWlanEnableWpaPsk );
+            }
+            break;
+        case EWlan802_1xAllowUnencrypted:
+            {
+            retVal = static_cast<TBool>( wlanServiceRecord->iWlanWpaKeyLength );//TODO, change typecast to if-else structure?
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+HBufC* CCmPluginWlan::GetBearerStringAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    HBufC* retVal = NULL;
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmIFNetworks:
+        case EWlanIfNetworks:
+            {
+            if ( !serviceRecord->iIfNetworks.IsNull() )
+                {
+                retVal = ( serviceRecord->iIfNetworks.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPNetmask:
+        case EWlanIpNetMask:
+            {
+            if ( !serviceRecord->iIpNetmask.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpNetmask.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPGateway:
+        case EWlanIpGateway:
+            {
+            if ( !serviceRecord->iIpGateway.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpGateway.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPAddress:
+        case EWlanIpAddr:
+            {
+            if ( !serviceRecord->iIpAddr.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpAddr.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPNameServer1:
+        case EWlanIpNameServer1:
+            {
+            if ( !serviceRecord->iIpNameServer1.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpNameServer1.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPNameServer2:
+        case EWlanIpNameServer2:
+            {
+            if ( !serviceRecord->iIpNameServer2.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpNameServer2.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIP6NameServer1:
+        case EWlanIp6NameServer1:
+            {
+            if ( !serviceRecord->iIp6NameServer1.IsNull() )
+                {
+                retVal = ( serviceRecord->iIp6NameServer1.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIP6NameServer2:
+        case EWlanIp6NameServer2:
+            {
+            if ( !serviceRecord->iIp6NameServer2.IsNull() )
+                {
+                retVal = ( serviceRecord->iIp6NameServer2.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPAddrLeaseValidFrom:
+        case EWlanIpAddrLeaseValidFrom:
+            {
+            if ( !serviceRecord->iIpAddrLeaseValidFrom.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpAddrLeaseValidFrom.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmIPAddrLeaseValidTo:
+        case EWlanIpAddrLeaseValidTo:
+            {
+            if ( !serviceRecord->iIpAddrLeaseValidTo.IsNull() )
+                {
+                retVal = ( serviceRecord->iIpAddrLeaseValidTo.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmConfigDaemonManagerName:
+        case EWlanConfigDaemonManagerName:
+            {
+            if ( !serviceRecord->iConfigDaemonManagerName.IsNull() )
+                {
+                retVal = ( serviceRecord->iConfigDaemonManagerName.GetL() ).AllocL();
+                }
+            }
+            break;
+        case ECmConfigDaemonName:
+        case EWlanConfigDaemonName:
+            {
+            if ( !serviceRecord->iConfigDaemonName.IsNull() )
+                {
+                retVal = ( serviceRecord->iConfigDaemonName.GetL() ).AllocL();
+                }
+            }
+            break;
+        case EWlanServiceExtensionTableName:
+            {
+            if ( !serviceRecord->iServiceExtensionTableName.IsNull() )
+                {
+                retVal = ( serviceRecord->iServiceExtensionTableName.GetL() ).AllocL();
+                }
+            }
+            break;
+        case EWlanSSID:
+            {
+            if ( !wlanServiceRecord->iWLanSSID.IsNull() )
+                {
+                retVal = ( wlanServiceRecord->iWLanSSID.GetL() ).AllocL();
+                }
+            }
+            break;
+        case EWlanUsedSSID:
+            {
+            if ( !wlanServiceRecord->iWLanUsedSSID.IsNull() )
+                {
+                retVal = ( wlanServiceRecord->iWLanUsedSSID.GetL() ).AllocL();
+                }
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERSTRINGATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+HBufC8* CCmPluginWlan::GetBearerString8AttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    HBufC8* retVal( NULL );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EWlanWpaPreSharedKey:
+            {
+            if ( !wlanServiceRecord->iWLanWpaPreSharedKey.IsNull() )
+                {
+                retVal = ( wlanServiceRecord->iWLanWpaPreSharedKey.GetL() ).AllocL();
+                }
+            }
+            break;
+        case EWlanWepKey1InHex:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey1.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey1.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey1 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ConvertAsciiToHexL( wlanServiceRecord->iWLanWepKey1.GetL() );
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ( wlanServiceRecord->iWLanWepKey1.GetL() ).AllocL();
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey2InHex:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey2.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey2.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey2 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ConvertAsciiToHexL( wlanServiceRecord->iWLanWepKey2.GetL() );
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ( wlanServiceRecord->iWLanWepKey2.GetL() ).AllocL();
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey3InHex:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey3.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey3.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey3 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ConvertAsciiToHexL( wlanServiceRecord->iWLanWepKey3.GetL() );
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ( wlanServiceRecord->iWLanWepKey3.GetL() ).AllocL();
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey4InHex:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey4.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey4.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey4 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ConvertAsciiToHexL( wlanServiceRecord->iWLanWepKey4.GetL() );
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ( wlanServiceRecord->iWLanWepKey4.GetL() ).AllocL();
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey1InAscii:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey1.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey1.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey1 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ( wlanServiceRecord->iWLanWepKey1.GetL() ).AllocL();
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ConvertHexToAsciiL( wlanServiceRecord->iWLanWepKey1.GetL() );
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey2InAscii:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey2.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey2.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey2 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ( wlanServiceRecord->iWLanWepKey2.GetL() ).AllocL();
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ConvertHexToAsciiL( wlanServiceRecord->iWLanWepKey2.GetL() );
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey3InAscii:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey3.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey3.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey3 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ( wlanServiceRecord->iWLanWepKey3.GetL() ).AllocL();
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ConvertHexToAsciiL( wlanServiceRecord->iWLanWepKey3.GetL() );
+                    }
+                }
+            }
+            break;
+        case EWlanWepKey4InAscii:
+            {
+            if ( !wlanServiceRecord->iWlanFormatKey4.IsNull() &&
+                    !wlanServiceRecord->iWLanWepKey4.IsNull() )
+                {
+                if ( wlanServiceRecord->iWlanFormatKey4 == EWlanWepKeyFormatAscii )
+                    {
+                    // Format is ascii.
+                    retVal = ( wlanServiceRecord->iWLanWepKey4.GetL() ).AllocL();
+                    }
+                else
+                    {
+                    // Format is hex.
+                    retVal = ConvertHexToAsciiL( wlanServiceRecord->iWLanWepKey4.GetL() );
+                    }
+                }
+            }
+            break;
+        case EWlanWapiPsk:
+            {
+            if ( !wlanServiceRecord->iWLanWpaPreSharedKey.IsNull() )
+                {
+                retVal = ( wlanServiceRecord->iWLanWpaPreSharedKey.GetL() ).AllocL();
+                }
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERSTRING8ATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::SetBearerIntAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::SetBearerIntAttributeL(
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SETBEARERINTATTRIBUTEL_ENTRY );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmExtensionLevel:
+        case ECmCommsDBBearerType:
+        case ECmDefaultUiPriority:
+        case ECmDefaultPriority:
+            {
+            User::Leave( KErrArgument );
+            }
+            break;
+        case EWlanServiceId:
+            {
+            wlanServiceRecord->iWlanServiceId.SetL( aValue );
+            }
+            break;
+        case EWlanConnectionMode:
+            {
+            wlanServiceRecord->iWlanConnMode.SetL( aValue );
+            }
+            break;
+        case EWlanSecurityMode:
+            {
+            CheckSecurityAttributeValidityL( aAttribute, aValue );
+            wlanServiceRecord->iWlanSecMode.SetL( aValue );
+            // When setting security mode, also reset authentication mode to open.
+            wlanServiceRecord->iWlanAuthMode.SetL( CMManager::EWlanAuthModeOpen );
+            if ( aValue == EWlanSecMode802_1x )
+                {
+                // By default, do not allow unencrypted mode for 802.1x (Korea).
+                wlanServiceRecord->iWlanWpaKeyLength.SetL( 0 );
+                }
+            }
+            break;
+        case EWlanAuthenticationMode:
+            {
+            CheckSecurityAttributeValidityL( aAttribute, aValue );
+            wlanServiceRecord->iWlanAuthMode.SetL( aValue );
+            }
+            break;
+        case EWlanChannelID:
+            {
+            wlanServiceRecord->iWlanChannelID.SetL( aValue );
+            }
+            break;
+        case EWlanServiceExtensionTableRecordId:
+            {
+            serviceRecord->iServiceExtensionTableRecordId.SetL( aValue );
+            }
+            break;
+        case EWlanWepKeyIndex:
+            {
+            CheckSecurityAttributeValidityL( aAttribute, aValue );
+            wlanServiceRecord->iWlanWepIndex.SetL( aValue );
+            }
+            break;
+        case EWlanWapiPskFormat:
+            {
+            CheckSecurityAttributeValidityL( aAttribute, aValue );
+            wlanServiceRecord->iWlanFormatKey1.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_SETBEARERINTATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::SetBearerBoolAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::SetBearerBoolAttributeL(
+        TUint32 aAttribute,
+        TBool aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SETBEARERBOOLATTRIBUTEL_ENTRY );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EWlanScanSSID:
+            {
+            wlanServiceRecord->iWlanScanSSID.SetL( aValue );
+            }
+            break;
+        case EWlanAllowSSIDRoaming:
+            {
+            wlanServiceRecord->iWlanAllowSSIDRoaming.SetL( aValue );
+            }
+            break;
+        case ECmIPAddFromServer:
+        case EWlanIpAddrFromServer:
+            {
+            serviceRecord->iIpAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIPDNSAddrFromServer:
+        case EWlanIpDNSAddrFromServer:
+            {
+            serviceRecord->iIpDnsAddrFromServer.SetL( aValue );
+            }
+            break;
+        case ECmIP6DNSAddrFromServer:
+        case EWlanIp6DNSAddrFromServer:
+            {
+            serviceRecord->iIp6DnsAddrFromServer.SetL( aValue );
+            }
+            break;
+        case EWlanEnableWpaPsk:
+            {
+            wlanServiceRecord->iWlanEnableWpaPsk.SetL( static_cast<TUint>( aValue ) );
+            }
+            break;
+        case EWlan802_1xAllowUnencrypted:
+            {
+            wlanServiceRecord->iWlanWpaKeyLength.SetL( static_cast<TUint>( aValue ) );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_SETBEARERBOOLATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::SetBearerStringAttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::SetBearerStringAttributeL(
+        TUint32 aAttribute,
+        const TDesC16& aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SETBEARERSTRINGATTRIBUTEL_ENTRY );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case ECmIFNetworks:
+        case EWlanIfNetworks:
+            {
+            serviceRecord->iIfNetworks.SetL( aValue );
+            }
+            break;
+        case ECmIPNetmask:
+        case EWlanIpNetMask:
+            {
+            serviceRecord->iIpNetmask.SetL( aValue );
+            }
+            break;
+        case ECmIPGateway:
+        case EWlanIpGateway:
+            {
+            serviceRecord->iIpGateway.SetL( aValue );
+            }
+            break;
+        case ECmIPAddress:
+        case EWlanIpAddr:
+            {
+            if ( ( aValue.Compare( KUnspecifiedIPv4 ) == 0 ) ||
+                    ( aValue.Compare( KNullDesC ) == 0 ) )
+                {
+                // If unspecified or NULL address is set dynamic
+                // IP must be enabled.
+                SetBearerBoolAttributeL( EWlanIpAddrFromServer,
+                                         ETrue,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            else
+                {
+                // If valid address is set dynamic IP is disabled.
+                SetBearerBoolAttributeL( EWlanIpAddrFromServer,
+                                         EFalse,
+                                         aGenRecordArray,
+                                         aBearerSpecRecordArray );
+                }
+            serviceRecord->iIpAddr.SetL( aValue );
+            }
+            break;
+        case ECmIPNameServer1:
+        case EWlanIpNameServer1:
+            {
+            serviceRecord->iIpNameServer1.SetL( aValue );
+            }
+            break;
+        case ECmIPNameServer2:
+        case EWlanIpNameServer2:
+            {
+            serviceRecord->iIpNameServer2.SetL( aValue );
+            }
+            break;
+        case ECmIP6NameServer1:
+        case EWlanIp6NameServer1:
+            {
+            serviceRecord->iIp6NameServer1.SetL( aValue );
+            }
+            break;
+        case ECmIP6NameServer2:
+        case EWlanIp6NameServer2:
+            {
+            serviceRecord->iIp6NameServer2.SetL( aValue );
+            }
+            break;
+        case ECmIPAddrLeaseValidFrom:
+        case EWlanIpAddrLeaseValidFrom:
+            {
+            serviceRecord->iIpAddrLeaseValidFrom.SetL( aValue );
+            }
+            break;
+        case ECmIPAddrLeaseValidTo:
+        case EWlanIpAddrLeaseValidTo:
+            {
+            serviceRecord->iIpAddrLeaseValidTo.SetL( aValue );
+            }
+            break;
+        case ECmConfigDaemonManagerName:
+        case EWlanConfigDaemonManagerName:
+            {
+            serviceRecord->iConfigDaemonManagerName.SetL( aValue );
+            }
+            break;
+        case ECmConfigDaemonName:
+        case EWlanConfigDaemonName:
+            {
+            serviceRecord->iConfigDaemonName.SetL( aValue );
+            }
+            break;
+        case EWlanServiceExtensionTableName:
+            {
+            serviceRecord->iServiceExtensionTableName.SetL( aValue );
+            }
+            break;
+        case EWlanSSID:
+            {
+            wlanServiceRecord->iWLanSSID.SetL( aValue );
+            }
+            break;
+        case EWlanUsedSSID:
+            {
+            wlanServiceRecord->iWLanUsedSSID.SetL( aValue );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_SETBEARERSTRINGATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::SetBearerString8AttributeL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::SetBearerString8AttributeL(
+        TUint32 aAttribute,
+        const TDesC8& aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SETBEARERSTRING8ATTRIBUTEL_ENTRY );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    switch ( aAttribute )
+        {
+        case EWlanWpaPreSharedKey:
+            {
+            wlanServiceRecord->iWLanWpaPreSharedKey.SetL( aValue );
+            wlanServiceRecord->iWlanWpaKeyLength.SetL( static_cast<TUint>( aValue.Length() ) );
+            }
+            break;
+        case EWlanWepKey1InHex:
+            {
+            wlanServiceRecord->iWLanWepKey1.SetL( aValue );
+            wlanServiceRecord->iWlanFormatKey1.SetL( EWlanWepKeyFormatHex );
+            }
+            break;
+        case EWlanWepKey2InHex:
+            {
+            wlanServiceRecord->iWLanWepKey2.SetL( aValue );
+            wlanServiceRecord->iWlanFormatKey2.SetL( EWlanWepKeyFormatHex );
+            }
+            break;
+        case EWlanWepKey3InHex:
+            {
+            wlanServiceRecord->iWLanWepKey3.SetL( aValue );
+            wlanServiceRecord->iWlanFormatKey3.SetL( EWlanWepKeyFormatHex );
+            }
+            break;
+        case EWlanWepKey4InHex:
+            {
+            wlanServiceRecord->iWLanWepKey4.SetL( aValue );
+            wlanServiceRecord->iWlanFormatKey4.SetL( EWlanWepKeyFormatHex );
+            }
+            break;
+        case EWlanWepKey1InAscii:
+            {
+            HBufC8* valueInHex = ConvertAsciiToHexL( aValue );
+            CleanupStack::PushL( valueInHex );
+            wlanServiceRecord->iWLanWepKey1.SetL( *valueInHex );
+            wlanServiceRecord->iWlanFormatKey1.SetL( EWlanWepKeyFormatHex );
+            CleanupStack::PopAndDestroy( valueInHex );
+            }
+            break;
+        case EWlanWepKey2InAscii:
+            {
+            HBufC8* valueInHex = ConvertAsciiToHexL( aValue );
+            CleanupStack::PushL( valueInHex );
+            wlanServiceRecord->iWLanWepKey2.SetL( *valueInHex );
+            wlanServiceRecord->iWlanFormatKey2.SetL( EWlanWepKeyFormatHex );
+            CleanupStack::PopAndDestroy( valueInHex );
+            }
+            break;
+        case EWlanWepKey3InAscii:
+            {
+            HBufC8* valueInHex = ConvertAsciiToHexL( aValue );
+            CleanupStack::PushL( valueInHex );
+            wlanServiceRecord->iWLanWepKey3.SetL( *valueInHex );
+            wlanServiceRecord->iWlanFormatKey3.SetL( EWlanWepKeyFormatHex );
+            CleanupStack::PopAndDestroy( valueInHex );
+            }
+            break;
+        case EWlanWepKey4InAscii:
+            {
+            HBufC8* valueInHex = ConvertAsciiToHexL( aValue );
+            CleanupStack::PushL( valueInHex );
+            wlanServiceRecord->iWLanWepKey4.SetL( *valueInHex );
+            wlanServiceRecord->iWlanFormatKey4.SetL( EWlanWepKeyFormatHex );
+            CleanupStack::PopAndDestroy( valueInHex );
+            }
+            break;
+        case EWlanWapiPsk:
+            {
+            wlanServiceRecord->iWLanWpaPreSharedKey.SetL( aValue );
+            }
+            break;
+
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_SETBEARERSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CanHandleIapIdL
+// --------------------------------------------------------------------------
+//
+TBool CCmPluginWlan::CanHandleIapIdL( TUint32 aIapId ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CANHANDLEIAPIDL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>(
+            CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord) );
+
+    CleanupStack::PushL( iapRecord );
+    iapRecord->SetRecordId( aIapId );
+
+    TRAPD( err, iapRecord->LoadL( iSession ) );
+
+    if ( !err )
+        {
+        retVal = CanHandleIapIdL( iapRecord );
+        }
+
+    CleanupStack::PopAndDestroy( iapRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CanHandleIapIdL
+// --------------------------------------------------------------------------
+//
+TBool CCmPluginWlan::CanHandleIapIdL( CCDIAPRecord *aIapRecord ) const
+    {
+    OstTraceFunctionEntry0( DUP1_CCMPLUGINWLAN_CANHANDLEIAPIDL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    if ( ( TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) ) &&
+            TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameLANBearer ) )
+        {
+        // Check if there is a WLAN record with an iServiceId == iIapRecord->iService.
+        CCDWlanServiceRecord* tmprec = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
+        CleanupStack::PushL( tmprec );
+
+        tmprec->iWlanServiceId.SetL( ( TUint32 )( aIapRecord->iService ) );
+        if ( tmprec->FindL( iSession ) )
+            {
+            // Found at least one WLAN using this IAP.
+            retVal = ETrue;
+            }
+
+        CleanupStack::PopAndDestroy( tmprec );
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINWLAN_CANHANDLEIAPIDL_EXIT );
+    return retVal;
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::DeleteBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::DeleteBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_DELETEBEARERRECORDSL_ENTRY );
+
+    // Save the wlan service record id for the EAP settings deletion.
+    TUint wlanServiceRecordId = iWlanServiceRecord->RecordId();
+
+    // As base class deletes service record, in this case LAN, only WLAN
+    // related stuff needs to be deleted.
+    iWlanServiceRecord->DeleteL( iSession );
+
+    // Delete EAP specific.
+    CEapGeneralSettings* eapSettings( NULL );
+    TRAPD( err, eapSettings = CEapGeneralSettings::NewL( ELan, wlanServiceRecordId ) );
+    if ( err == KErrNone )
+        {
+        eapSettings->DeleteAllEapSettings();
+        delete eapSettings;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_DELETEBEARERRECORDSL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::LoadServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::LoadServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_LOADSERVICERECORDL_ENTRY );
+
+    if ( TPtrC( KCDTypeNameLANService ) == iIapRecord->iServiceType )
+        {
+        iServiceRecord = static_cast<CCDLANServiceRecord*>(
+                CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+        ServiceRecord().SetRecordId( iIapRecord->iService );
+        ServiceRecord().LoadL( iSession );
+        }
+    else
+        // this IAP service is not supported by this plugin.
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_LOADSERVICERECORDL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::LoadBearerRecordsL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::LoadBearerRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_LOADBEARERRECORDSL_ENTRY );
+
+    if ( !iWlanServiceRecord )
+        {
+        iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
+        }
+    iWlanServiceRecord->SetRecordId( 0 );
+
+    iWlanServiceRecord->iWlanServiceId.SetL( ( TUint32 )( iIapRecord->iService ) );
+
+    if ( iWlanServiceRecord->FindL( iSession ) )
+        {
+        iWlanServiceRecord->LoadL( iSession );
+        }
+    else
+        {
+        // not found -> error
+        User::Leave( KErrNotFound );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_LOADBEARERRECORDSL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CreateServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::CreateServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CREATESERVICERECORDL_ENTRY );
+
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    iServiceRecord = static_cast<CCDLANServiceRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+    CCDLANServiceRecord* lanServiceRecord = static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) )
+        {
+        lanServiceRecord->iIfNetworks.SetL( KDefIspIfNetworksIPv4IPv6 );
+        }
+    else
+        {
+        lanServiceRecord->iIfNetworks.SetL( KDefIspIfNetworksIPv4 );
+        }
+
+    lanServiceRecord->iIpGateway.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIpAddrFromServer.SetL( KDefIpAddrFromServer );
+
+    lanServiceRecord->iIpAddr.SetL( KUnspecifiedIPv4 );
+
+    lanServiceRecord->iIpDnsAddrFromServer.SetL( KDefIpDnsAddrFromServer );
+
+    lanServiceRecord->iIpNameServer1.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIpNameServer2.SetL( KUnspecifiedIPv4 );
+    lanServiceRecord->iIp6DnsAddrFromServer.SetL( KDefIp6DnsAddrFromServer );
+    lanServiceRecord->iIp6NameServer1.SetL( KDynamicIpv6Address );
+    lanServiceRecord->iIp6NameServer2.SetL( KDynamicIpv6Address );
+
+    if ( KDefIpAddrFromServer )
+        {
+        lanServiceRecord->iConfigDaemonManagerName.SetL( KDaemonManagerName );
+        lanServiceRecord->iConfigDaemonName.SetL( KConfigDaemonName );
+        }
+    else
+        {
+        lanServiceRecord->iConfigDaemonManagerName.SetL( KEmpty );
+        lanServiceRecord->iConfigDaemonName.SetL( KEmpty );
+        }
+
+    // Create WLAN service record.
+    CreateWlanServiceRecordL();
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CREATESERVICERECORDL_EXIT );
+    }
+
+// --------------------------------------------------------------------------
+// CCmPluginWlan::CreateWlanServiceRecordL
+// --------------------------------------------------------------------------
+//
+void CCmPluginWlan::CreateWlanServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CREATEWLANSERVICERECORDL_ENTRY );
+
+    delete iWlanServiceRecord;
+
+    iWlanServiceRecord = NULL;
+
+    iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
+    iWlanServiceRecord->SetRecordId( KCDNewRecordRequest );
+
+    // Some attributes need to have default values set.
+    iWlanServiceRecord->iRecordName.SetL( iIapRecord->iRecordName );
+    iWlanServiceRecord->iWlanConnMode.SetL( CMManager::EInfra );
+    iWlanServiceRecord->iWlanSecMode.SetL( CMManager::EWlanSecModeOpen );
+    iWlanServiceRecord->iWlanAuthMode.SetL( CMManager::EWlanAuthModeOpen );
+    iWlanServiceRecord->iWlanScanSSID.SetL( EFalse );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CREATEWLANSERVICERECORDL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginWlan::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginWlan::PreparePluginToLoadRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_PREPAREPLUGINTOLOADRECORDSL_ENTRY );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_PREPAREPLUGINTOLOADRECORDSL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginWlan::PreparePluginToUpdateRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginWlan::PreparePluginToUpdateRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_PREPAREPLUGINTOUPDATERECORDSL_ENTRY );
+
+    CCDWlanServiceRecord* wlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CCDIAPRecord* iapRecord =
+            static_cast<CCDIAPRecord*>(
+                    aGenRecordArray[KIapRecordIndex] );
+
+    CheckIfNameModifiedL( iapRecord, wlanServiceRecord );
+    wlanServiceRecord->iWlanServiceId.SetL( ( TUint32 )( iapRecord->iService ) );
+
+    CCDLANServiceRecord* serviceRecord =
+            static_cast<CCDLANServiceRecord*>(
+                    aGenRecordArray[KServiceRecordIndex] );
+
+    CheckIfNameModifiedL( iapRecord, serviceRecord );
+
+    CheckDNSServerAddressL( ETrue,
+                            serviceRecord->iIp6NameServer1,
+                            serviceRecord->iIp6NameServer2,
+                            serviceRecord->iIp6DnsAddrFromServer );
+
+    CheckDNSServerAddressL( EFalse,
+                            serviceRecord->iIpNameServer1,
+                            serviceRecord->iIpNameServer2,
+                            serviceRecord->iIpDnsAddrFromServer );
+
+    SetDaemonNameL( aGenRecordArray, aBearerSpecRecordArray );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_PREPAREPLUGINTOUPDATERECORDSL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginWlan::UpdateServiceRecordL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginWlan::UpdateServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_UPDATESERVICERECORDL_ENTRY );
+
+    // Delete the original record and create a copy from the client's copy.
+    delete iServiceRecord;
+    iServiceRecord = NULL;
+
+    iServiceRecord = static_cast<CCDLANServiceRecord *>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+
+    // Plugin's commsdat copy.
+    CCDLANServiceRecord* origServiceRecord =
+            static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    // Client's copy of lan service record.
+    CCDLANServiceRecord* clientServiceRecordCopy =
+            static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+
+    CopyRecordFieldsL( *clientServiceRecordCopy, *origServiceRecord );
+
+    origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() );
+
+    if ( !origServiceRecord->RecordId() )
+        {
+        origServiceRecord->SetRecordId( KCDNewRecordRequest );
+        origServiceRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        origServiceRecord->LoadL( iSession );
+
+        // Update received element ID to client's copy too.
+        clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() );
+
+        // Copy record back to client's copy to be exactly same as in database.
+        CCmPluginBaseEng::CopyRecordFieldsL( *origServiceRecord,
+                *clientServiceRecordCopy );
+
+        // Update needed values to other table records too (wlanservice).
+        CCDWlanServiceRecord* wlanServiceRecord =
+                static_cast<CCDWlanServiceRecord *>(
+                        aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+        wlanServiceRecord->iWlanServiceId.SetL( origServiceRecord->RecordId() );
+        }
+    else
+        {
+        origServiceRecord->ModifyL( iSession );
+
+        CCmPluginBaseEng::CopyRecordFieldsL( *origServiceRecord,
+                *clientServiceRecordCopy );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_UPDATESERVICERECORDL_EXIT );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginWlan::UpdateBearerRecordsL()
+// ----------------------------------------------------------------------------
+//
+void CCmPluginWlan::UpdateBearerRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_UPDATEBEARERRECORDSL_ENTRY );
+
+    // Delete the original record and create a copy from the client's copy.
+    delete iWlanServiceRecord;
+    iWlanServiceRecord = NULL;
+
+    iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord( iWlanTableId );
+
+    // Client's copy of wlan service record.
+    CCDWlanServiceRecord* clientWlanServiceRecord =
+            static_cast<CCDWlanServiceRecord*>(
+                    aBearerSpecRecordArray[KWlanServiceRecordIndex] );
+
+    CopyRecordFieldsL( *clientWlanServiceRecord, *iWlanServiceRecord );
+
+    iWlanServiceRecord->SetElementId( clientWlanServiceRecord->ElementId() );
+
+    if ( !iWlanServiceRecord->RecordId() )
+        {
+        iWlanServiceRecord->SetRecordId( KCDNewRecordRequest );
+        iWlanServiceRecord->StoreL( iSession );
+        // Have to be "reloaded" to get possible default values from template records.
+        iWlanServiceRecord->LoadL( iSession );
+
+        // Update received element ID to client's copy too.
+        clientWlanServiceRecord->SetElementId( iWlanServiceRecord->ElementId() );
+        }
+    else
+        {
+        iWlanServiceRecord->ModifyL( iSession );
+        }
+
+    // Copy record back to client's copy to be exactly same as in database.
+    CCmPluginBaseEng::CopyRecordFieldsL( *iWlanServiceRecord,
+            *clientWlanServiceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_UPDATEBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerSpecificRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::GetBearerSpecificRecordsL(
+        RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERSPECIFICRECORDSL_ENTRY );
+
+    if ( !iWlanServiceRecord )
+        {
+        // IAP not yet in CommsDat.
+        GetDefaultWlanServiceRecordL( aRecordArray );
+        }
+    else
+        {
+        CCDWlanServiceRecord* wlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
+        CleanupStack::PushL( wlanServiceRecord );
+        CopyWlanServiceRecordL( iWlanServiceRecord, wlanServiceRecord );
+        wlanServiceRecord->SetElementId( iWlanServiceRecord->ElementId() );
+        aRecordArray.AppendL( wlanServiceRecord );
+        CleanupStack::Pop( wlanServiceRecord );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERSPECIFICRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::CopyServiceRecordL
+// ---------------------------------------------------------------------------
+//
+CommsDat::CCDRecordBase* CCmPluginWlan::CopyServiceRecordL()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_COPYSERVICERECORDL_ENTRY );
+
+    // New service record to be returned.
+    CCDRecordBase* serviceRecord = static_cast<CCDLANServiceRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) );
+    CleanupStack::PushL( serviceRecord );
+
+    CCDLANServiceRecord* tempServiceRecordPtrToNew =
+            static_cast<CCDLANServiceRecord*>( serviceRecord );
+
+    // CommsDat version of service record.
+    CCDLANServiceRecord* origServiceRecord =
+            static_cast<CCDLANServiceRecord*>( iServiceRecord );
+
+    if ( !origServiceRecord->iRecordTag.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordTag.SetL(
+                origServiceRecord->iRecordTag );
+        }
+    if ( !origServiceRecord->iRecordName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iRecordName.SetL(
+                origServiceRecord->iRecordName );
+        }
+    if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL(
+                origServiceRecord->iServiceEnableLlmnr );
+        }
+    if ( !origServiceRecord->iIfNetworks.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIfNetworks.SetL(
+                origServiceRecord->iIfNetworks );
+        }
+    if ( !origServiceRecord->iIpNetmask.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNetmask.SetL(
+                origServiceRecord->iIpNetmask );
+        }
+    if ( !origServiceRecord->iIpGateway.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpGateway.SetL(
+                origServiceRecord->iIpGateway );
+        }
+    if ( !origServiceRecord->iIpAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrFromServer.SetL(
+                origServiceRecord->iIpAddrFromServer );
+        }
+    if ( !origServiceRecord->iIpAddr.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddr.SetL(
+                origServiceRecord->iIpAddr );
+        }
+    if ( !origServiceRecord->iIpDnsAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpDnsAddrFromServer.SetL(
+                origServiceRecord->iIpDnsAddrFromServer );
+        }
+    if ( !origServiceRecord->iIpNameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNameServer1.SetL(
+                origServiceRecord->iIpNameServer1 );
+        }
+    if ( !origServiceRecord->iIpNameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpNameServer2.SetL(
+                origServiceRecord->iIpNameServer2 );
+        }
+    if ( !origServiceRecord->iIp6DnsAddrFromServer.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6DnsAddrFromServer.SetL(
+                origServiceRecord->iIp6DnsAddrFromServer );
+        }
+    if ( !origServiceRecord->iIp6NameServer1.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6NameServer1.SetL(
+                origServiceRecord->iIp6NameServer1 );
+        }
+    if ( !origServiceRecord->iIp6NameServer2.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIp6NameServer2.SetL(
+                origServiceRecord->iIp6NameServer2 );
+        }
+    if ( !origServiceRecord->iIpAddrLeaseValidFrom.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrLeaseValidFrom.SetL(
+                origServiceRecord->iIpAddrLeaseValidFrom );
+        }
+    if ( !origServiceRecord->iIpAddrLeaseValidTo.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iIpAddrLeaseValidTo.SetL(
+                origServiceRecord->iIpAddrLeaseValidTo );
+        }
+    if ( !origServiceRecord->iConfigDaemonManagerName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iConfigDaemonManagerName.SetL(
+                origServiceRecord->iConfigDaemonManagerName );
+        }
+    if ( !origServiceRecord->iConfigDaemonName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iConfigDaemonName.SetL(
+                origServiceRecord->iConfigDaemonName );
+        }
+    if ( !origServiceRecord->iServiceExtensionTableName.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceExtensionTableName.SetL(
+                origServiceRecord->iServiceExtensionTableName );
+        }
+    if ( !origServiceRecord->iServiceExtensionTableRecordId.IsNull() )
+        {
+        tempServiceRecordPtrToNew->iServiceExtensionTableRecordId.SetL(
+                origServiceRecord->iServiceExtensionTableRecordId );
+        }
+
+    CleanupStack::Pop( serviceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_COPYSERVICERECORDL_EXIT );
+    return serviceRecord;
+    }
+
+// ----------------------------------------------------------------------------
+// CCmPluginWlan::CheckNetworkCoverageL()
+// ----------------------------------------------------------------------------
+//
+TBool CCmPluginWlan::CheckNetworkCoverageL() const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CHECKNETWORKCOVERAGEL_ENTRY );
+
+#ifdef __WINS__
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CHECKNETWORKCOVERAGEL_EXIT );
+
+    return ETrue;
+#else
+    CCmWlanCoverageCheck* coverage = new (ELeave) CCmWlanCoverageCheck;
+    CleanupStack::PushL( coverage );
+
+    TBool retVal( EFalse );
+    retVal = coverage->GetCoverageL();
+
+    CleanupStack::PopAndDestroy( coverage );
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINWLAN_CHECKNETWORKCOVERAGEL_EXIT );
+
+    return retVal;
+#endif  // __WINS
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::SetDaemonNameL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::SetDaemonNameL(
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_SETDAEMONNAMEL_ENTRY );
+
+    // we have to check first that these values has not been
+    // set(or changed) by any 3rd party sw to ensure that
+    // we don't break their settings
+    HBufC* daemonName = GetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                                   aGenRecordArray,
+                                                   aBearerSpecRecordArray );
+    if ( daemonName )
+        {
+        if ( daemonName->Compare( KDaemonManagerName ) != 0 )
+            {
+            delete daemonName;
+
+            OstTraceFunctionExit0( CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT );
+
+            return;
+            }
+        delete daemonName;
+        }
+
+    // use DHCP if we can
+    TBool ipfromSrv = GetBearerBoolAttributeL( ECmIPAddFromServer,
+                                               aGenRecordArray,
+                                               aBearerSpecRecordArray );
+    if ( ipfromSrv )
+        {
+        SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                   KDaemonManagerName,
+                                   aGenRecordArray,
+                                   aBearerSpecRecordArray );
+
+        SetBearerStringAttributeL( ECmConfigDaemonName,
+                                   KConfigDaemonName,
+                                   aGenRecordArray,
+                                   aBearerSpecRecordArray );
+
+        }
+    else
+        {
+        if ( FeatureManager::FeatureSupported( KFeatureIdIPv6 ) )
+            {
+            SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                       KDaemonManagerName,
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+
+            SetBearerStringAttributeL( ECmConfigDaemonName,
+                                       KConfigDaemonName,
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            }
+        else
+            {
+            SetBearerStringAttributeL( ECmConfigDaemonManagerName,
+                                       KNullDesC(),
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+
+            SetBearerStringAttributeL( ECmConfigDaemonName,
+                                       KNullDesC(),
+                                       aGenRecordArray,
+                                       aBearerSpecRecordArray );
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ResetBearerRecords
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::ResetBearerRecords()
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_RESETBEARERRECORDS_ENTRY );
+
+    delete iWlanServiceRecord;
+    iWlanServiceRecord = NULL;
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_RESETBEARERRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::CopyWlanServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::CopyWlanServiceRecordL(
+        CCDWlanServiceRecord* aSourceRecord,
+        CCDWlanServiceRecord* aDestRecord )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_COPYWLANSERVICERECORDL_ENTRY );
+
+    if ( !( aSourceRecord && aDestRecord ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    if ( !aSourceRecord->iRecordTag.IsNull() )
+        {
+        aDestRecord->iRecordTag.SetL( aSourceRecord->iRecordTag );
+        }
+    if ( !aSourceRecord->iRecordName.IsNull() )
+        {
+        aDestRecord->iRecordName.SetL( aSourceRecord->iRecordName );
+        }
+
+    if ( !aSourceRecord->iWlanServiceId.IsNull() )
+        {
+        aDestRecord->iWlanServiceId.SetL( aSourceRecord->iWlanServiceId );
+        }
+    if ( !aSourceRecord->iWlanConnMode.IsNull() )
+        {
+        aDestRecord->iWlanConnMode.SetL( aSourceRecord->iWlanConnMode );
+        }
+    if ( !aSourceRecord->iWLanSSID.IsNull() )
+        {
+        aDestRecord->iWLanSSID.SetL( aSourceRecord->iWLanSSID );
+        }
+    if ( !aSourceRecord->iWLanUsedSSID.IsNull() )
+        {
+        aDestRecord->iWLanUsedSSID.SetL( aSourceRecord->iWLanUsedSSID );
+        }
+    if ( !aSourceRecord->iWLanWepKey1.IsNull() )
+        {
+        aDestRecord->iWLanWepKey1.SetL( aSourceRecord->iWLanWepKey1 );
+        }
+    if ( !aSourceRecord->iWLanWepKey2.IsNull() )
+        {
+        aDestRecord->iWLanWepKey2.SetL( aSourceRecord->iWLanWepKey2 );
+        }
+    if ( !aSourceRecord->iWLanWepKey3.IsNull() )
+        {
+        aDestRecord->iWLanWepKey3.SetL( aSourceRecord->iWLanWepKey3 );
+        }
+    if ( !aSourceRecord->iWLanWepKey4.IsNull() )
+        {
+        aDestRecord->iWLanWepKey4.SetL( aSourceRecord->iWLanWepKey4 );
+        }
+    if ( !aSourceRecord->iWlanWepIndex.IsNull() )
+        {
+        aDestRecord->iWlanWepIndex.SetL( aSourceRecord->iWlanWepIndex );
+        }
+    if ( !aSourceRecord->iWlanSecMode.IsNull() )
+        {
+        aDestRecord->iWlanSecMode.SetL( aSourceRecord->iWlanSecMode );
+        }
+    if ( !aSourceRecord->iWlanAuthMode.IsNull() )
+        {
+        aDestRecord->iWlanAuthMode.SetL( aSourceRecord->iWlanAuthMode );
+        }
+    if ( !aSourceRecord->iWlanEnableWpaPsk.IsNull() )
+        {
+        aDestRecord->iWlanEnableWpaPsk.SetL( aSourceRecord->iWlanEnableWpaPsk );
+        }
+    if ( !aSourceRecord->iWLanWpaPreSharedKey.IsNull() )
+        {
+        aDestRecord->iWLanWpaPreSharedKey.SetL( aSourceRecord->iWLanWpaPreSharedKey );
+        }
+    if ( !aSourceRecord->iWlanWpaKeyLength.IsNull() )
+        {
+        aDestRecord->iWlanWpaKeyLength.SetL( aSourceRecord->iWlanWpaKeyLength );
+        }
+    if ( !aSourceRecord->iWLanEaps.IsNull() )
+        {
+        aDestRecord->iWLanEaps.SetL( aSourceRecord->iWLanEaps );
+        }
+    if ( !aSourceRecord->iWlanScanSSID.IsNull() )
+        {
+        aDestRecord->iWlanScanSSID.SetL( aSourceRecord->iWlanScanSSID );
+        }
+    if ( !aSourceRecord->iWlanChannelID.IsNull() )
+        {
+        aDestRecord->iWlanChannelID.SetL( aSourceRecord->iWlanChannelID );
+        }
+    if ( !aSourceRecord->iWlanFormatKey1.IsNull() )
+        {
+        aDestRecord->iWlanFormatKey1.SetL( aSourceRecord->iWlanFormatKey1 );
+        }
+    if ( !aSourceRecord->iWlanFormatKey2.IsNull() )
+        {
+        aDestRecord->iWlanFormatKey2.SetL( aSourceRecord->iWlanFormatKey2 );
+        }
+    if ( !aSourceRecord->iWlanFormatKey3.IsNull() )
+        {
+        aDestRecord->iWlanFormatKey3.SetL( aSourceRecord->iWlanFormatKey3 );
+        }
+    if ( !aSourceRecord->iWlanFormatKey4.IsNull() )
+        {
+        aDestRecord->iWlanFormatKey4.SetL( aSourceRecord->iWlanFormatKey4 );
+        }
+    if ( !aSourceRecord->iWlanAllowSSIDRoaming.IsNull() )
+        {
+        aDestRecord->iWlanAllowSSIDRoaming.SetL( aSourceRecord->iWlanAllowSSIDRoaming );
+        }
+    if ( !aSourceRecord->iWLanEnabledEaps.IsNull() )
+        {
+        aDestRecord->iWLanEnabledEaps.SetL( aSourceRecord->iWLanEnabledEaps );
+        }
+    if ( !aSourceRecord->iWLanDisabledEaps.IsNull() )
+        {
+        aDestRecord->iWLanDisabledEaps.SetL( aSourceRecord->iWLanDisabledEaps );
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_COPYWLANSERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetDefaultWlanServiceRecordL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::GetDefaultWlanServiceRecordL(
+        RPointerArray<CommsDat::CCDRecordBase>& aRecordArray )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETDEFAULTWLANSERVICERECORDL_ENTRY );
+
+    CCDWlanServiceRecord* wlanServiceRecord = new( ELeave ) CCDWlanServiceRecord ( iWlanTableId );
+    CleanupStack::PushL( wlanServiceRecord );
+
+    wlanServiceRecord->SetRecordId( KCDNewRecordRequest );
+
+    wlanServiceRecord->iRecordTag.SetL( 1 );
+    wlanServiceRecord->iRecordName.SetL( iIapRecord->iRecordName );
+    wlanServiceRecord->iWlanConnMode.SetL( CMManager::EInfra );
+    wlanServiceRecord->iWlanSecMode.SetL( CMManager::EWlanSecModeOpen );
+    wlanServiceRecord->iWlanScanSSID.SetL( EFalse );
+
+    aRecordArray.AppendL( wlanServiceRecord );
+
+    CleanupStack::Pop( wlanServiceRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETDEFAULTWLANSERVICERECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerInfoIntL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginWlan::GetBearerInfoIntL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    switch ( aAttribute )
+        {
+        case ECmBearerType:
+            {
+            retVal = iBearerType;
+            }
+            break;
+        case ECmCommsDBBearerType:
+            {
+            retVal = KCommDbBearerWLAN;
+            }
+            break;
+        case ECmDefaultUiPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmDefaultPriority:
+            {
+            retVal = GetDefPriorityL( aAttribute );
+            }
+            break;
+        case ECmExtensionLevel:
+            {
+            // This is extension from LAN plugin.
+            retVal = KExtensionBaseLevel + 1;
+            }
+            break;
+        case ECmSeamlessnessLevel:
+            {
+            retVal = ESeamlessnessShowprogress;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerInfoBoolL
+// ---------------------------------------------------------------------------
+//
+TBool CCmPluginWlan::GetBearerInfoBoolL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    switch ( aAttribute )
+        {
+        case ECmCoverage:
+            {
+#ifndef __WINS__
+            retVal = CheckNetworkCoverageL();
+#else
+            retVal = ETrue;
+#endif
+            }
+            break;
+        case ECmDestination:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmBearerHasUi:
+            {
+            retVal = EFalse;
+            }
+            break;
+        case ECmIPv6Supported:
+            {
+            retVal = FeatureManager::FeatureSupported( KFeatureIdIPv6 );
+            }
+            break;
+        case ECmVirtual:
+            {
+            retVal = EFalse;
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerInfoStringL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmPluginWlan::GetBearerInfoStringL( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERINFOSTRINGL_ENTRY );
+
+    HBufC* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERINFOSTRINGL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerInfoString8L
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginWlan::GetBearerInfoString8L( TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERINFOSTRING8L_ENTRY );
+
+    HBufC8* retVal( NULL );
+    switch ( aAttribute )
+        {
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERINFOSTRING8L_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::CheckSecurityAttributeValidityL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::CheckSecurityAttributeValidityL(
+        const TUint32 aAttribute,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_CHECKSECURITYATTRIBUTEVALIDITYL_ENTRY );
+
+    switch ( aAttribute )
+        {
+        case CMManager::EWlanConnectionMode:
+            {
+            switch ( aValue )
+                {
+                case CMManager::EAdhoc:
+                case CMManager::EInfra:
+                    break;
+                default:
+                    User::Leave( KErrArgument );
+                    break;
+                }
+            }
+            break;
+
+        case CMManager::EWlanSecurityMode:
+            {
+            switch ( aValue )
+                {
+                case CMManager::EWlanSecModeOpen:
+                case CMManager::EWlanSecModeWep:
+                case CMManager::EWlanSecMode802_1x:
+                case CMManager::EWlanSecModeWpa:
+                case CMManager::EWlanSecModeWpa2:
+                case CMManager::EWlanSecModeWAPI:
+                    break;
+                default:
+                    User::Leave( KErrArgument );
+                    break;
+                }
+            }
+            break;
+
+        case CMManager::EWlanAuthenticationMode:
+            {
+            switch ( aValue )
+                {
+                case CMManager::EWlanAuthModeOpen:
+                case CMManager::EWlanAuthModeShared:
+                    break;
+                default:
+                    User::Leave( KErrArgument );
+                    break;
+                }
+            }
+            break;
+
+        case CMManager::EWlanEnableWpaPsk:     // Boolean
+        case CMManager::EWlanWpaPreSharedKey:  // Valid values: 0, 1, 8-64
+            break;
+
+        case CMManager::EWlanWepKey1InHex:     // Length should be 10 or 26.
+        case CMManager::EWlanWepKey2InHex:
+        case CMManager::EWlanWepKey3InHex:
+        case CMManager::EWlanWepKey4InHex:
+        case CMManager::EWlanWepKey1InAscii:   // Length should be 5 or 13.
+        case CMManager::EWlanWepKey2InAscii:
+        case CMManager::EWlanWepKey3InAscii:
+        case CMManager::EWlanWepKey4InAscii:
+            break;
+
+        case CMManager::EWlanWepKeyIndex:
+            {
+            switch ( aValue )
+                {
+                case CMManager::EWepKeyIndex1:
+                case CMManager::EWepKeyIndex2:
+                case CMManager::EWepKeyIndex3:
+                case CMManager::EWepKeyIndex4:
+                    break;
+                default:
+                    User::Leave( KErrArgument );
+                    break;
+                }
+            }
+            break;
+
+        case CMManager::EWlanWapiPsk:
+            break;
+
+        case CMManager::EWlanWapiPskFormat:
+            {
+            switch ( aValue )
+                {
+                case CMManager::EWlanWapiPskFormatAscii:
+                case CMManager::EWlanWapiPskFormatHex:
+                    break;
+                default:
+                    User::Leave( KErrArgument );
+                    break;
+                }
+            }
+            break;
+
+        case CMManager::EWlan802_1xAllowUnencrypted:   // Boolean
+            break;
+
+        default:
+            User::Leave( KErrArgument );
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_CHECKSECURITYATTRIBUTEVALIDITYL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::CopyBearerRecordsL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_COPYBEARERRECORDSL_ENTRY );
+
+    CCmPluginWlan* plugin = static_cast<CCmPluginWlan*>( aCopyInstance );
+    plugin->iWlanServiceRecord = new( ELeave ) CCDWlanServiceRecord( iWlanTableId );
+
+    CopyWlanServiceRecordL( iWlanServiceRecord, plugin->iWlanServiceRecord );
+    plugin->iWlanServiceRecord->iWlanServiceId.SetL( 0 );
+    plugin->iWAPISupported = iWAPISupported;
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_COPYBEARERRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::PrepareToCopyDataL
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::PrepareToCopyDataL( CCmPluginBaseEng* /*aCopyInstance*/ )
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_PREPARETOCOPYDATAL_ENTRY );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_PREPARETOCOPYDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetBearerTableIdsToBeObserved
+// ---------------------------------------------------------------------------
+//
+void CCmPluginWlan::GetBearerTableIdsToBeObservedL(
+        RArray<TUint32>& aTableIdArray ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETBEARERTABLEIDSTOBEOBSERVEDL_ENTRY );
+
+    aTableIdArray.AppendL( KCDTIdLANServiceRecord );
+    aTableIdArray.AppendL( iWlanTableId );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETBEARERTABLEIDSTOBEOBSERVEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ConvertAsciiToHexL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginWlan::ConvertAsciiToHexL( const TDesC8& aSource )
+    {
+    // Characters used in hex-format.
+    _LIT( hex, "0123456789ABCDEF" );
+
+    // Length of ascii-format source string.
+    TInt length = aSource.Length();
+    //TInt length = aSource.Size();
+
+    if ( length <= 0 )
+        {
+        HBufC8* result = KNullDesC8().AllocL();
+        return result;
+        }
+
+    HBufC8* result = HBufC8::NewLC( length * 2 );
+    TPtr8 ptr = result->Des();
+
+    // Iterate for each character in ascii-format source string.
+    for ( TInt i = 0; i < length; i++ )
+        {
+        // Next character in ascii-format source string to be converted.
+        TText8 ch = aSource[i];
+
+        // Convert and append the higher 4 bits of the character.
+        ptr.Append( hex()[ ( ch / 16 ) & 0x0f ] );
+
+        // Convert and append the lower 4 bits of the character.
+        ptr.Append( hex()[ ch & 0x0f ] );
+        }
+
+    CleanupStack::Pop( result );
+    return result; // Ownership is transfered.
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ConvertHexToAsciiL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmPluginWlan::ConvertHexToAsciiL( const TDesC8& aSource )
+    {
+    // Length of hex-format source string.
+    TInt length = aSource.Length();
+
+    if ( length <= 0 )
+        {
+        HBufC8* result = KNullDesC8().AllocL();
+        return result;
+        }
+
+    HBufC8* result = HBufC8::NewLC( ( length + 1 ) / 2 );
+    TPtr8 ptr = result->Des();
+
+    TInt i( 0 );
+    TUint8 ch( 0 );
+    if ( length % 2 )
+        {
+        ch = ConvertHexCharToNumberL( aSource[i] );
+        ptr.Append( ch );
+        i++;
+        }
+    for ( ; i < length; )
+        {
+        ch = ConvertHexCharToNumberL( aSource[i] ) << 4;
+        i++;
+        ch += ConvertHexCharToNumberL( aSource[i] );
+        i++;
+        ptr.Append( ch );
+        }
+
+    CleanupStack::Pop( result );
+    return result; // Ownership is transfered.
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::ConvertHexCharToNumberL
+// ---------------------------------------------------------------------------
+//
+TUint8 CCmPluginWlan::ConvertHexCharToNumberL( const TUint8 aHexChar )
+    {
+    TUint8 result( 0 );
+    if ( '0' <= aHexChar && aHexChar <= '9' )
+        {
+        result = aHexChar - '0';
+        }
+    else if ( 'a' <= aHexChar && aHexChar <= 'f' )
+        {
+        result = aHexChar - 'a' + 10u;
+        }
+    else if ( 'A' <= aHexChar && aHexChar <= 'F' )
+        {
+        result = aHexChar - 'A' + 10u;
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmPluginWlan::GetDefPriorityL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmPluginWlan::GetDefPriorityL( const TUint32 aAttribute ) const
+    {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETDEFPRIORITYL_ENTRY );
+
+    TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
+
+    CCDGlobalBearerTypePriorizationRecord* priorityRecord =
+            new( ELeave ) CCDGlobalBearerTypePriorizationRecord( iBearerPriorityTableId );
+    CleanupStack::PushL( priorityRecord );
+
+    priorityRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
+
+    if ( priorityRecord->FindL( iSession ) )
+        {
+        priorityRecord->LoadL( iSession );
+        switch ( aAttribute )
+            {
+            case ECmDefaultPriority:
+                {
+                retVal = priorityRecord->iPriority;
+                }
+                break;
+            case ECmDefaultUiPriority:
+                {
+                retVal = priorityRecord->iUIPriority;
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    CleanupStack::PopAndDestroy( priorityRecord );
+
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETDEFPRIORITYL_EXIT );
+    return retVal;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlanproxy.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Implementation of WLan Plugin proxy table
+*
+*/
+
+#include "cmpluginwlan.h"
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KUidWlanBearerType, CCmPluginWlan::NewL )
+    };
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmwlancoveragecheck.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,239 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*        Implementation of WLAN Coverage Check class
+*
+*/
+
+
+#include <wlanmgmtclient.h>
+
+#include "cmwlancoveragecheck.h"
+#include "cmpluginwlan.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmwlancoveragecheckTraces.h"
+#endif
+
+
+/**
+* Management frame information element IDs.
+* needed to determine coverage
+*/
+enum T802Dot11InformationElementID
+    {
+    E802Dot11SsidIE                 = 0,
+    E802Dot11SupportedRatesIE       = 1,
+    E802Dot11FhParameterSetIE       = 2,
+    E802Dot11DsParameterSetIE       = 3,
+    E802Dot11CfParameterSetIE       = 4,
+    E802Dot11TimIE                  = 5,
+    E802Dot11IbssParameterSetIE     = 6,
+    E802Dot11CountryIE              = 7,
+    E802Dot11HoppingPatternParamIE  = 8,
+    E802Dot11HoppingPatternTableIE  = 9,
+    E802Dot11RequestIE              = 10,
+
+    E802Dot11ChallengeTextIE        = 16,
+    // Reserved for challenge text extension 17 - 31
+    E802Dot11ErpInformationIE       = 42,
+    E802Dot11ExtendedRatesIE        = 50,
+    E802Dot11AironetIE              = 133,
+    E802Dot11ApIpAddressIE          = 149,
+    E802Dot11RsnIE                  = 221
+    };
+
+
+// ======================= MEMBER FUNCTIONS =================================
+
+// ----------------------------------------------------------------------------
+// CCmWlanCoverageCheck::CCmWlanCoverageCheck()
+// ----------------------------------------------------------------------------
+//
+CCmWlanCoverageCheck::CCmWlanCoverageCheck() : CActive( EPriorityStandard )
+    {
+    OstTraceFunctionEntry1( CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_ENTRY, this );
+    CActiveScheduler::Add( this );
+    OstTraceFunctionExit1( CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_EXIT, this );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmWlanCoverageCheck::~CCmWlanCoverageCheck()
+// ----------------------------------------------------------------------------
+//
+CCmWlanCoverageCheck::~CCmWlanCoverageCheck()
+    {
+    OstTraceFunctionEntry1( DUP1_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_ENTRY, this );
+    Cancel();
+    OstTraceFunctionExit1( DUP1_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_EXIT, this );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmWlanCoverageCheck::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CCmWlanCoverageCheck::DoCancel()
+    {
+    OstTraceFunctionEntry1( CCMWLANCOVERAGECHECK_DOCANCEL_ENTRY, this );
+    iWait.AsyncStop();
+    OstTraceFunctionExit1( CCMWLANCOVERAGECHECK_DOCANCEL_EXIT, this );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmWlanCoverageCheck::RunL
+// ----------------------------------------------------------------------------
+//
+void CCmWlanCoverageCheck::RunL()
+    {
+    OstTraceFunctionEntry1( CCMWLANCOVERAGECHECK_RUNL_ENTRY, this );
+
+    switch ( iProgState )
+        {
+        case EScanning:
+            {
+            if ( iStatus.Int() == KErrNone )
+                {
+                // The list is ready.
+                iProgState = EDone;
+                iWait.AsyncStop();
+                }
+            else
+                {
+                // Something went wrong -> no coverage.
+                iWait.AsyncStop();
+                }
+            }
+            break;
+        case EDone:
+            {
+            iWait.AsyncStop();
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrCorrupt );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit1( CCMWLANCOVERAGECHECK_RUNL_EXIT, this );
+    }
+
+// ----------------------------------------------------------------------------
+// CCmWlanCoverageCheck::GetCoverageL
+// ----------------------------------------------------------------------------
+//
+TBool CCmWlanCoverageCheck::GetCoverageL()
+    {
+    OstTraceFunctionEntry0( CCMWLANCOVERAGECHECK_GETCOVERAGEL_ENTRY );
+
+    iProgState = EServiceStatus;
+    iCoverage = EFalse;
+
+    CWlanMgmtClient* wlanMgmt = CWlanMgmtClient::NewL();
+    CleanupStack::PushL( wlanMgmt );
+
+    CWlanScanInfo* scanInfo = CWlanScanInfo::NewL();
+    CleanupStack::PushL( scanInfo );
+
+    iProgState = EScanning;
+
+    wlanMgmt->GetScanResults( iStatus, *scanInfo );
+
+    SetActive();
+    iWait.Start();
+
+    // now we have the results and might start to work on them...
+    if ( iProgState == EDone )
+        { //finished without error, work on the result...
+
+        for ( scanInfo->First(); !scanInfo->IsDone(); scanInfo->Next() )
+            {
+            TBool isHidden( EFalse );
+
+            TUint8 ieLen( 0 );
+            const TUint8* ieData;
+
+            TInt ret = scanInfo->InformationElement( E802Dot11SsidIE, ieLen,
+                                                      &ieData );
+            if ( ret == KErrNone )
+                {
+                isHidden = IsHiddenSsid( ieLen, ieData );
+                if ( !isHidden )
+                    {
+                    // WLAN awailable...stop searching.
+                    iCoverage = ETrue;
+                    break;
+                    }
+                }
+            else
+                {
+                User::Leave( ret );
+                }
+            }
+
+        CleanupStack::PopAndDestroy( 2, wlanMgmt );
+        }
+    else
+        {
+        // Clean the cleanupstack in case status is KErrNone
+        CleanupStack::PopAndDestroy( scanInfo );
+        CleanupStack::PopAndDestroy( wlanMgmt );
+
+        User::LeaveIfError( iStatus.Int() );
+        }
+
+    OstTraceFunctionExit0( CCMWLANCOVERAGECHECK_GETCOVERAGEL_EXIT );
+    return iCoverage;
+    }
+
+// ---------------------------------------------------------
+// CCmWlanCoverageCheck::IsHiddenSsid
+// ---------------------------------------------------------
+//
+TBool CCmWlanCoverageCheck::IsHiddenSsid(
+        TUint aSsidLength,
+        const TUint8* aSsid ) const
+    {
+    OstTraceFunctionEntryExt( CCMWLANCOVERAGECHECK_ISHIDDENSSID_ENTRY, this );
+
+    const TUint8 CSPACE = 0x20;
+    TBool result( EFalse );
+    TBool result2( ETrue );
+
+    if ( !aSsidLength )
+        {
+        result = ETrue;
+        }
+
+    TInt count( 0 );
+    TUint8 temp( 0x00 );
+
+    for ( TUint i( 0 ); i < aSsidLength; ++i )
+        {
+        temp = aSsid[i];
+        count += temp; // in hidden networks characters are: 0x00
+        result2 &= temp == CSPACE ;
+        }
+
+    if ( !count || result2 )
+        {
+        result = ETrue;
+        }
+
+    OstTraceFunctionExitExt( CCMWLANCOVERAGECHECK_ISHIDDENSSID_EXIT, this, result );
+    return result;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,81 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_CCMPLUGINWLANDATA_ENTRY=0x3a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_CCMPLUGINWLANDATA_EXIT=0x3b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_CONSTRUCTL_ENTRY=0x3e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_CONSTRUCTL_EXIT=0x3f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_NEWLC_ENTRY=0x38
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLANDATA_NEWLC_EXIT=0x39
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_ADDITIONALRESET_ENTRY=0x29
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_ADDITIONALRESET_EXIT=0x2a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_BEARERRECORDIDLC_ENTRY=0x2b
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_BEARERRECORDIDLC_EXIT=0x2c
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CANHANDLEIAPIDL_ENTRY=0x19
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CANHANDLEIAPIDL_EXIT=0x1a
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CCMPLUGINWLAN_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CCMPLUGINWLAN_EXIT=0x4
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CHECKNETWORKCOVERAGEL_ENTRY=0x31
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CHECKNETWORKCOVERAGEL_EXIT=0x32
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CONSTRUCTL_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CONSTRUCTL_EXIT=0xa
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_COPYADDITIONALDATAL_ENTRY=0x2d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_COPYADDITIONALDATAL_EXIT=0x2e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATEINSTANCEL_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATEINSTANCEL_EXIT=0x6
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATENEWSERVICERECORDL_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATENEWSERVICERECORDL_EXIT=0x24
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATEWLANSERVICERECORDL_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_CREATEWLANSERVICERECORDL_EXIT=0x26
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_DELETEADDITIONALRECORDSL_ENTRY=0x1d
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_DELETEADDITIONALRECORDSL_EXIT=0x1e
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETADDITIONALUIDS_ENTRY=0x36
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETADDITIONALUIDS_EXIT=0x37
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETBOOLATTRIBUTEL_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETBOOLATTRIBUTEL_EXIT=0xe
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETINTATTRIBUTEL_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETINTATTRIBUTEL_EXIT=0xc
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETSTRINGATTRIBUTEL_ENTRY=0xf
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_GETSTRINGATTRIBUTEL_EXIT=0x10
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_LOADADDITIONALRECORDSL_ENTRY=0x21
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_LOADADDITIONALRECORDSL_EXIT=0x22
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_LOADSERVICESETTINGL_ENTRY=0x1f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_LOADSERVICESETTINGL_EXIT=0x20
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_NEWL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_NEWL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_PREPARETOUPDATERECORDSL_ENTRY=0x27
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_PREPARETOUPDATERECORDSL_EXIT=0x28
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETASCOPYOF_ENTRY=0x2f
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETASCOPYOF_EXIT=0x30
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETBOOLATTRIBUTEL_ENTRY=0x13
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETBOOLATTRIBUTEL_EXIT=0x14
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETDAEMONNAMEL_ENTRY=0x33
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT=0x34
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETINTATTRIBUTEL_ENTRY=0x11
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETINTATTRIBUTEL_EXIT=0x12
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETSTRINGATTRIBUTEL_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_SETSTRINGATTRIBUTEL_EXIT=0x16
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_UPDATEADDITIONALRECORDSL_ENTRY=0x17
+[TRACE]TRACE_FLOW[0x7]_CCMPLUGINWLAN_UPDATEADDITIONALRECORDSL_EXIT=0x18
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_ADDTOARRAYIFNEEDEDL=0x4c
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_ADDTOARRAYIFNEEDEDL_EXIT=0x4d
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_ENTRY=0x40
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_EXIT=0x41
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_DOCANCEL_ENTRY=0x44
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_DOCANCEL_EXIT=0x45
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_GETCOVERAGEL_ENTRY=0x48
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_GETCOVERAGEL_EXIT=0x49
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_ISHIDDENSSID_ENTRY=0x4a
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_ISHIDDENSSID_EXIT=0x4b
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_RUNL_ENTRY=0x46
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_RUNL_EXIT=0x47
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_SCANFORPROMPTEDSSIDL_ENTRY=0x4e
+[TRACE]TRACE_FLOW[0x7]_CCMWLANCOVERAGECHECK_SCANFORPROMPTEDSSIDL_EXIT=0x4f
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLANDATA_CCMPLUGINWLANDATA_ENTRY=0x3c
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLANDATA_CCMPLUGINWLANDATA_EXIT=0x3d
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLAN_CANHANDLEIAPIDL_ENTRY=0x1b
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLAN_CANHANDLEIAPIDL_EXIT=0x1c
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLAN_CCMPLUGINWLAN_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLAN_CCMPLUGINWLAN_EXIT=0x8
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMPLUGINWLAN_SETDAEMONNAMEL_EXIT=0x35
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_ENTRY=0x42
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMWLANCOVERAGECHECK_CCMWLANCOVERAGECHECK_EXIT=0x43
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*        Build information for the Plugins
+*
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+#include "../cmpluginpacketdata/group/bld.inf"
+#include "../cmpluginlan/group/bld.inf"
+#include "../cmpluginwlan/group/bld.inf"
+#include "../cmpluginvpn/group/bld.inf"
+#include "../cmpluginembdestination/group/bld.inf"
+
+// End of File
Binary file cmmanager/cmmgr/cmmserver/conf/cmmanager.confml has changed
Binary file cmmanager/cmmgr/cmmserver/conf/cmmanager_10207376.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This file provides the information required for building the module.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+// export iby files
+../rom/cmmserver.iby      CORE_MW_LAYER_IBY_EXPORT_PATH(cmmserver.iby)
+
+../conf/cmmanager.confml            MW_LAYER_CONFML(cmmanager.confml)
+../conf/cmmanager_10207376.crml     MW_LAYER_CRML(cmmanager_10207376.crml)
+
+
+PRJ_MMPFILES
+cmmserver.mmp
+
+PRJ_TESTMMPFILES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/group/cmmserver.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Project definition file for Connection Method Manager server.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET          cmmserver.exe
+TARGETTYPE      exe
+UID             0x1000008d 0x20016A7A
+
+CAPABILITY      NetworkControl NetworkServices ProtServ ReadDeviceData WriteDeviceData
+VENDORID        VID_DEFAULT
+
+SOURCEPATH      ../src
+SOURCE          cmmsrvstatic.cpp
+SOURCE          cmmstarter.cpp
+SOURCE          cmmsession.cpp
+SOURCE          cmmserver.cpp
+SOURCE          cmmanagerimpl.cpp
+SOURCE          cmmtransactionhandler.cpp
+SOURCE          cmmdbchangelistener.cpp
+SOURCE          cmmlistenermanager.cpp
+SOURCE          cmmdestinationinstance.cpp
+SOURCE          cmmconnmethodinstance.cpp
+SOURCE          cmmcache.cpp
+SOURCE          cmmconnmethodstruct.cpp
+SOURCE          cmmdestinationstruct.cpp
+SOURCE          cmminstancemapping.cpp
+SOURCE          cmmbearerpriority.cpp
+SOURCE          cmmbearerprioritycache.cpp
+SOURCE          cmmconnmethoditem.cpp
+SOURCE          cmmanagertextresolver.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../cmmcommon/inc
+USERINCLUDE     ../traces
+
+// ADO specific internal headers
+SYSTEMINCLUDE   ../../../../inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY         euser.lib
+LIBRARY         efsrv.lib
+LIBRARY         cmmanagerdatabase.lib
+LIBRARY         cmmpluginbase.lib
+LIBRARY         commsdat.lib
+LIBRARY         bafl.lib
+LIBRARY         ecom.lib
+LIBRARY         featmgr.lib
+LIBRARY         centralrepository.lib
+LIBRARY         esock.lib
+LIBRARY	        hbcore.lib
+LIBRARY         sysutil.lib
+
+EPOCSTACKSIZE   0x4000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmanagerimpl.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of connection method manager.
+*
+*/
+
+
+#ifndef CMMANAGERIMPL_H
+#define CMMANAGERIMPL_H
+
+#include <metadatabase.h>
+#include <datamobilitycommsdattypes.h>
+#include <cmmanagerdef.h>
+
+#include "cmmserverdefs.h"
+
+class CCmmTransactionHandler;
+class CCmPluginBaseEng;
+class CCmmCache;
+
+
+NONSHARABLE_CLASS( CCmManagerImpl ) : public CBase
+    {
+public:
+    /**
+     * Two phased construction.
+     */
+    static CCmManagerImpl* NewL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CCmManagerImpl();
+
+private:
+    /**
+     * Constructor.
+     */
+    CCmManagerImpl();
+
+    /**
+     * 2nd phase constructor.
+     */
+    void ConstructL();
+
+public:
+    /**
+     * Check the existence of tables we need. Creates if it is not exist, get
+     * the table id otherwise.
+     */
+    void CheckTablesL();
+
+    /**
+     * Query all of the supported bearer types.
+     *
+     * @param aArray List of all supported bearer types.
+     */
+    void SupportedBearersL( RArray<TUint32>& aArray ) const;
+
+    /**
+     * Return the requested table ID.
+     */
+    CommsDat::TMDBElementId TableId( TCmmDbRecords aRecord );
+
+    /**
+     * Get a handle to the database cache manager.
+     */
+    CCmmCache& Cache();
+
+    /**
+     * Get a handle to the database transaction handler.
+     */
+    CCmmTransactionHandler* GetTransactionHandler();
+
+    /**
+     * Get a handle to database session.
+     */
+    CommsDat::CMDBSession& Session() const;
+
+    /**
+     * Return true is WLAN is supported on phone.
+     */
+    TBool WlanSupported() const;
+
+private:
+    /**
+     * Build an array of all bearer specific plugins.
+     */
+    void BuildPluginArrayL();
+
+private:
+    // Database cache manager.
+    CCmmCache* iCache; //Owned.
+
+    // Array for bearer plugins.
+    CArrayPtrFlat<const CCmPluginBaseEng>* iPlugins; // Owned.
+
+    // Database transaction handler.
+    CCmmTransactionHandler* iTrans; //Owned.
+
+    // Destination network table ID.
+    CommsDat::TMDBElementId iSnapTableId;
+    // Global bearer type priorization table ID.
+    CommsDat::TMDBElementId iBearerPriorityTableId;
+    // Destination metadata table ID.
+    CommsDat::TMDBElementId iDestMetadataTableId;
+    // Default connection table ID.
+    CommsDat::TMDBElementId iDefConnTableId;
+
+    // Flag for feature manager initialization status.
+    TBool iIsFeatureManagerInitialised;
+
+    // True if phone supports WLAN.
+    TBool iWLanSupport;
+    };
+
+#endif // CMMANAGERIMPL_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmanagertextresolver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Provides functionality for text resolving
+*
+*/
+
+#ifndef CMMANAGERTEXTRESOLVER_H
+#define CMMANAGERTEXTRESOLVER_H
+
+/**
+ *  Utility class for resolving localised text.
+ */
+NONSHARABLE_CLASS( CCmManagerTextResolver ) : public CBase
+    {
+public:    
+    /**
+     * Resolves localised text from cmmanager translation file.
+     * @param aTextId Text Id from TS file
+     * @return Resolved text
+     */
+    static HBufC* ResolveTextL( const TDesC& aTextId );        
+    };
+
+#endif // CMMANAGERTEXTRESOLVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmbearerpriority.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of bearer priority structure.
+*
+*/
+
+
+#ifndef CMMBEARERPRIORITY_H_
+#define CMMBEARERPRIORITY_H_
+
+#include <e32base.h>
+
+
+NONSHARABLE_CLASS( CCmmBearerPriority ) : public CBase
+    {
+public:
+    /**
+     * Two phased constuction.
+     */
+    static CCmmBearerPriority* NewL(
+            const TDesC& aServiceType,
+            const TUint aPriority,
+            const TUint aUiPriority );
+
+    /**
+     * Two phased constuction.
+     */
+    static CCmmBearerPriority* NewLC(
+            const TDesC& aServiceType,
+            const TUint aPriority,
+            const TUint aUiPriority );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmBearerPriority();
+
+private:
+    /**
+     * Constructor.
+     */
+    CCmmBearerPriority( const TUint aPriority, const TUint aUiPriority );
+
+    /**
+     * 2nd phase constructor.
+     */
+    void ConstructL( const TDesC& aServiceType );
+
+public:
+    /**
+     * Get the service type.
+     */
+    HBufC* ServiceType() const;
+
+    /**
+     * Get the priority.
+     */
+    TUint Priority() const;
+
+    /**
+     * Get the UI priority.
+     */
+    TUint UiPriority() const;
+
+private:
+    HBufC* iServiceType; // Owned.
+    TUint iPriority;
+    TUint iUiPriority;
+    };
+
+#endif // CMMBEARERPRIORITY_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmbearerprioritycache.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of bearer priority array cache.
+*
+*/
+
+
+#ifndef CMMBEARERPRIORITYCACHE_H_
+#define CMMBEARERPRIORITYCACHE_H_
+
+#include <e32base.h>
+#include <metadatabase.h>
+
+class CCmmBearerPriority;
+class CCmmTransactionHandler;
+
+
+NONSHARABLE_CLASS( CCmmBearerPriorityCache ) : public CBase
+    {
+public:
+    /**
+     * Two phased constuction.
+     */
+    static CCmmBearerPriorityCache* NewL(
+            CCmmTransactionHandler* aTrans,
+            CommsDat::TMDBElementId aBearerPriorityTableId );
+
+    /**
+     * Two phased constuction.
+     */
+    static CCmmBearerPriorityCache* NewLC(
+            CCmmTransactionHandler* aTrans,
+            CommsDat::TMDBElementId aBearerPriorityTableId );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmBearerPriorityCache();
+
+private:
+    /**
+     * Constructor.
+     */
+    CCmmBearerPriorityCache(
+            CCmmTransactionHandler* aTrans,
+            CommsDat::TMDBElementId aBearerPriorityTableId );
+
+    /**
+     * 2nd phase constructor.
+     * Reads the bearer priorities from CommsDat and stores them to own array.
+     */
+    void ConstructL();
+
+public:
+    /**
+     * Updates the bearer priority array with the contents of aArray.
+     */
+    void UpdateL( const RPointerArray<CCmmBearerPriority>& aArray );
+
+    /**
+     * Copies the cache's contents to aArray.
+     */
+    void CopyL( RPointerArray<CCmmBearerPriority>& aArray ) const;
+
+    /**
+     * Get the priority value for a service type name from the bearer priority
+     * cache.
+     */
+    TUint GetPriority( const TDesC& aServiceType ) const;
+
+private:
+    void ReadL();
+
+private:
+    // Database transaction handler.
+    CCmmTransactionHandler* iTrans; // Not owned.
+
+    // Cached contents of the bearer priority array.
+    RPointerArray<CCmmBearerPriority> iArray; // Owns contents.
+
+    // Global bearer type priorization table ID.
+    CommsDat::TMDBElementId iBearerPriorityTableId;
+    };
+
+#endif // CMMBEARERPRIORITYCACHE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmcache.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,645 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Database cache manager.
+*
+*/
+
+
+#ifndef CMMCACHE_H_
+#define CMMCACHE_H_
+
+#include <e32base.h>
+#include <metadatabase.h>
+#include <commsdattypesv1_1.h>
+#include <cmgenconnsettings.h>
+
+#include "cmmserverdefs.h"
+#include "cmmbearerpriority.h"
+#include "cmmconnmethodstruct.h"
+#include "cmmconnmethoditem.h"
+
+// Forward declarations.
+class CCmmDestinationStruct;
+class CCmPluginBaseEng;
+class CCmmListenerManager;
+class CCmmInstanceMapping;
+
+class CCmmDestinationInstance;
+class CCmmConnMethodInstance;
+
+class CCmmTransactionHandler;
+class CCmManagerImpl;
+class CCmmBearerPriorityCache;
+
+
+/**
+ * A simple class to group a temporary ID and a database assigned valid ID
+ * together as a single structure.
+ * 
+ * Used e.g. when updating a newly received real ID to datastructures
+ * containing a certain temporary ID.
+ */
+NONSHARABLE_CLASS( TCmmIdStruct )
+    {
+public:
+    inline TCmmIdStruct() : iRealId( 0 ), iTemporaryId( 0 )
+        {
+        }
+    inline TCmmIdStruct( TUint32 aRealId, TUint32 aTemporaryId )
+            :
+            iRealId( aRealId ),
+            iTemporaryId( aTemporaryId )
+        {
+        }
+public:
+    TUint32 iRealId;
+    TUint32 iTemporaryId;
+    };
+
+
+/**
+ * The CmmCache-class oversees all database operations.
+ * 
+ * It manages the cached database data and handles all interactions between
+ * that data and the client sessions.
+ * 
+ * It provides access to the CCmmInstanceMapping-class, that keeps track of the
+ * overall structure of destinations and connection methods in the database.
+ * 
+ * It also manages the database listeners that keep track of database changes
+ * caused by outside sources.
+ */
+NONSHARABLE_CLASS( CCmmCache ) : public CBase
+    {
+public:
+    /**
+     * NewL.
+     */
+    static CCmmCache* NewL(
+            CCmManagerImpl* aCmManagerImpl,
+            CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
+
+    /**
+     * NewLC.
+     */
+    static CCmmCache* NewLC(
+            CCmManagerImpl* aCmManagerImpl,
+            CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmCache();
+
+private:
+    /**
+     * Constructor.
+     *
+     * @param aPlugins Reference to supported plugin array.
+     */
+    CCmmCache(
+            CCmManagerImpl* aCmManagerImpl,
+            CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
+
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+
+public:
+    void OpenDestinationL(
+            CCmmDestinationInstance& aDestinationInstance,
+            const TUint32 aId );
+
+    /**
+     * Refresh the data contained in aDestinationInstance. This means reloading
+     * the data from database if necessary. After this call the contents of
+     * aDestinationInstance will reflect the current state in the database. 
+     */
+    void RefreshDestinationL(
+            CCmmDestinationInstance& aDestinationInstance );
+
+    void CreateDestinationL(
+            CCmmDestinationInstance& aDestinationInstance,
+            const TDesC& aName,
+            const TUint32 aId );
+
+    void OpenConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance,
+            CCmmDestinationInstance* aDestinationInstance,
+            const TUint32 aId );
+
+    /**
+     * Refresh the data contained in aConnMethodInstance. This means reloading
+     * the data from database if necessary. After this call the contents of
+     * aConnMethodInstance will reflect the current state in the database. 
+     */
+    void RefreshConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance );
+
+    void CreateConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance,
+            CCmmDestinationInstance* aDestinationInstance,
+            const TUint32 aBearerType,
+            const TUint32 aConnMethodId );
+
+    /**
+     * Creates a copy of the given client instance (copy of the connection
+     * method to the cache). The copy is created from the commsdat data
+     * (changes not updated will not be shown in the copy).
+     * @param aNewConnMethodInstance The copy instance to be created.
+     * @param aConnMethodInstance The source instance to be copied.
+     */
+    void CreateCopyOfConnMethodL(
+            CCmmConnMethodInstance& aNewConnMethodInstance,
+            CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Reloads a destination record if needed and copies the latest version to
+     * the session instance given as parameter.
+     */
+    void LoadDestinationRecordL(
+            CCmmDestinationInstance& aDestinationInstance,
+            TCmmDbRecords aDestRecordType );
+
+    /**
+     * Saves the modifications in aDestinationInstance into the database. Also
+     * all connection methods inside this destination are updated (including
+     * any embedded destination).
+     */
+    void UpdateDestinationL( CCmmDestinationInstance& aDestinationInstance );
+
+    /**
+     * Saves the modifications in aConnMethodInstance into database. The second
+     * attribute aTemporaryHandle must be true if the connection method
+     * instance is only a temporary one created for the duration of this update
+     * process only.
+     */
+    void UpdateConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance,
+            TBool aTemporaryHandle );
+
+    /**
+     * Deletes the destination refered by aDestinationInstance from the
+     * database. In case other sessions have open handles to the same
+     * destination, the status is updated to deleted state, but it is not yet
+     * removed from database. (ID must be kept reserved in commsdat until all
+     * handles are closed).
+     */
+    void DeleteDestinationL(
+            CCmmDestinationInstance& aDestinationInstance,
+            TBool aForced = EFalse );
+
+    /**
+     * Deletes a connection method as part of destination update operation. It
+     * is already checked that the connection method given as parameter can be
+     * deleted and a transaction is already open.
+     */
+    void DeleteConnMethodAsPartOfDestinationUpdateL( const TUint32 aConnMethodId );
+
+    /**
+     * Deletes a connection method as part of destination delete operation. It
+     * is already checked that the connection method given as parameter can be
+     * deleted and a transaction is already open.
+     */
+    void DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32 aConnMethodId );
+
+    /**
+     * Basic connection method delete. Removes a connection method from any
+     * destination it might belong to, and then deletes it.
+     */
+    void DeleteConnMethodL( CCmmConnMethodInstance& aConnMethodInstance );
+
+    TBool DestinationExistsWithId( const TUint32 aId );
+    TBool DestinationExistsWithNameL( const TDesC& aName, const TUint32 aDestinationId );
+    TBool DestinationOpenWithId( const TUint32 aId );
+    TBool NotSavedDestinationOpenWithNameL( const TDesC& aName, const TUint32 aDestinationId );
+
+    TBool ConnMethodExistsWithId( const TUint32 aConnMethodId );
+    TBool ConnMethodOpenWithId( const TUint32 aConnMethodId );
+
+    TBool DestinationExistsWithMetadataLocalizedL(
+            CCmmDestinationInstance& aDestinationInstance,
+            const TUint32 aValue );
+    TBool DestinationExistsWithMetadataPurposeL(
+            CCmmDestinationInstance& aDestinationInstance,
+            const TUint32 aValue );
+
+    void DbChangeDetectedL( const TUint32 aTableId );
+    void DbChangeError( const TUint32 aTableId );
+
+    void CloseDestination( CCmmDestinationInstance& aDestinationInstance );
+    void CloseConnMethod( CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Returns a reference to the CommsDat session.
+     */
+    CommsDat::CMDBSession& Session() const;
+
+    /**
+     * Finds out the bearer type and priority of the service type from given
+     * IAP record.
+     */
+    void BearerInfoFromIapRecordL(
+            CommsDat::CCDIAPRecord* aIapRecord,
+            TUint32& aBearerType,
+            TUint& aBearerPriority ) const;
+
+    /**
+     * Finds out the priority of the service type in given IAP record.
+     */
+    void BearerPriorityFromIapRecordL(
+            CommsDat::CCDIAPRecord* aIapRecord,
+            TUint& aBearerPriority ) const;
+
+    /**
+     * Finds out the bearer type of a connection method from given IAP record.
+     */
+    void BearerTypeFromIapRecordL(
+            CommsDat::CCDIAPRecord* aIapRecord,
+            TUint32& aBearerType ) const;
+
+    /**
+     * Loads and initializes a connection method instance.
+     * @param aConnMethodInstance Reference to connection method instance
+     * beeing initialized.
+     * @param aConnMethodId ID of the connection method beeing opened.
+     */
+    void OpenConnectionMethodInstanceL(
+            CCmmConnMethodInstance& aConnMethodInstance,
+            const TUint32 aConnMethodId );
+
+    /**
+     * Returns Connection Method specific integer value. CM is loaded(if not loaded already)
+     * to get the value.
+     * @param aCmId Identifier of the Connection Method.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested integer value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    TUint32 GetConnectionMethodInfoIntL(
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns Connection Method specific boolean value. CM is loaded(if not loaded already)
+     * to get the value.
+     * @param aCmId Identifier of the Connection Method.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested boolean value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    TBool GetConnectionMethodInfoBoolL(
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns Connection Method specific 16 bit string value.
+     * CM is loaded(if not loaded already) to get the value.
+     * @param aCmId Identifier of the Connection Method.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested string value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    HBufC* GetConnectionMethodInfoStringL(
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns Connection Method specific 8 bit string value.
+     * CM is loaded(if not loaded already) to get the value.
+     * @param aCmId Identifier of the Connection Method.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested string value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    HBufC8* GetConnectionMethodInfoString8L(
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns bearer specific integer value. IAP does not need to be loaded for this.
+     * @param aBearerType The type of the plugin to be asked.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested integer value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    TUint32 GetBearerInfoIntL(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns bearer specific boolean value. IAP does not need to be loaded for this.
+     * @param aBearerType The type of the plugin to be asked.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested boolean value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    TBool GetBearerInfoBoolL(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns bearer specific 16 bit string value. IAP does not need to be loaded for this.
+     * @param aBearerType The type of the plugin to be asked.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested string value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    HBufC* GetBearerInfoStringL(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
+
+    /**
+     * Returns bearer specific 8 bit string value. IAP does not need to be loaded for this.
+     * @param aBearerType The type of the plugin to be asked.
+     * @param aAttribute The identifier of the requested value.
+     * @return Returns the requested string value if found. Otherwise leaves with error code
+     * KErrNotFound.
+     */
+    HBufC8* GetBearerInfoString8L(
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
+
+    /**
+     * Find and return a copy of a connection method item matching the given ID.
+     * Returns KErrNotFound, if the connection method is not found.
+     */
+    TInt GetConnMethodItem(
+            const TUint32 aConnMethodId,
+            TCmmConnMethodItem& aConnMethodItem ) const;
+
+    /**
+     * Returns all conenction method IDs. Unsupported connection methods are
+     * included if aCheckBearerType is set to EFalse.
+     */
+    void GetAllConnMethodsL(
+            RArray<TUint32>& aConnMethodArray,
+            TBool aCheckBearerType ) const;
+
+    /**
+     * Returns the number of destinations the provided connection method
+     * belongs to.
+     */
+    TInt DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const;
+
+    /**
+     * Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
+     */
+    TUint32 EasyWlanIdL() const;
+
+    /**
+     * Check if WLAN is supported on phone.
+     */
+    TBool WlanSupported() const;
+
+    /**
+     * Find out the internet destination ID. Set to 0 if not found.
+     */
+    void InternetDestinationIdL( TUint& aInternetDestinationId ) const;
+
+    /**
+     * Return the number of destinations in database.
+     */
+    TInt GetDestinationCount() const;
+
+    /**
+     * Returns all the valid Destinations
+     */
+    void GetDestinationsL( RArray<TUint32>& aDestinationArray ) const;
+
+    /**
+     * Returns all the valid connection methods under given destination.
+     */
+    void GetConnMethodsFromDestinationL(
+            const TUint32 aDestinationId,
+            RArray<TCmmConnMethodItem>& aConnMethodArray ) const;
+
+    /**
+     * Copies the bearer priority array's contents to aArray.
+     */
+    void CopyBearerPriorityArrayL( RPointerArray<CCmmBearerPriority>& aArray ) const;
+
+    /**
+     * Updates the bearer priority array with the contents of aArray.
+     */
+    void UpdateBearerPriorityArrayL( const RPointerArray<CCmmBearerPriority>& aArray );
+
+    TBool ConnMethodInOtherDestination(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
+    TUint32 NextFreeTemporaryId();
+
+    /**
+     * Read general connection settings from database.
+     */
+    void ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings ) const;
+
+    /**
+     * Write general connection settings to database.
+     */
+    void WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
+
+    /**
+     * Enumerates connections and checks if the given connection method is
+     * connected.
+     * @param aCmId Id of the connection method to be checked.
+     * @return Returns ETrue if the CM is connected and EFalse if it's not
+     * connected.
+     */
+    TBool CheckIfCmConnected( const TUint32 aCmId ) const;
+
+    /**
+     * Enumerates connections and checks if any of the connection methods in
+     * the given destination is connected.
+     * If pointer to destination instance is given, then information about
+     * relevant connection methods is retrieved from that. Otherwise the
+     * information is retrieved from instance mapping using the given ID.
+     */
+    TBool DestinationConnectedL(
+            const TUint32 aDestinationId,
+            CCmmDestinationInstance* aDestinationInstance = NULL ) const;
+
+    /**
+     * Check from database if the given destination is an embedded destination
+     * in any other destination.
+     */
+    TBool DestinationIsEmbedded( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given destination has an embedded destination.
+     */
+    TBool DestinationHasEmbedded( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given destination is pointed to by any
+     * virtual IAP.
+     */
+    TBool DestinationPointedToByVirtualIap( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given connection method is pointed to by any
+     * virtual IAP.
+     */
+    TBool ConnMethodPointedToByVirtualIap( const TUint32 aConnMethodId ) const;
+
+    /**
+     * Check if the given connection method is the only connection method in
+     * the given destination and if a virtual IAP points to that destination.
+     */
+    TBool ConnMethodInDestinationButLocked(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId ) const;
+
+    /**
+     * Remove all references to the given connection method from the
+     * datamobility selection policy records. Then update instance mapping to
+     * reflect the current database state, and notify any possible client
+     * handles for the changed destinations.
+     */
+    void RemoveAllReferencesToConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Update the ID of a new destination from temporary ID to real ID after a
+     * successful update to database.
+     */
+    void RefreshDestinationId( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * Update the ID of a new connection method from temporary ID to real ID
+     * after a successful update to database.
+     */
+    void RefreshConnMethodId( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * During destination update, after updating connection methods inside the
+     * destination, the database records containing the information of what
+     * connection methods are inside the destination need to be updated with
+     * real IDs for any newly created connection methods. These real IDs are
+     * held in the temporary array iUpdatedConnMethods until successful commit
+     * to database. This method is used to find out those real IDs before that.
+     */
+    void TranslateTemporaryId( const TUint32 aTemporaryId, TUint32& aRealId ) const;
+
+    /**
+     * Check if the given connection method can have all references removed and
+     * made into an uncategorized connection method.
+     */
+    void CheckIfConnMethodReferencesCanBeRemovedL(
+            const CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Check if given connection method is referenced from any protected destination.
+     */
+    void CheckIfConnMethodBelongsToProtectedDestinationL(
+            const CCmmConnMethodInstance& aConnMethodInstance,
+            TBool& aBelongsToProtectedDestination );
+
+    /**
+     * Check if the given connection method can be deleted.
+     */
+    void CheckIfConnMethodCanBeDeletedL( const CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Check if the given destination can be deleted.
+     */
+    void CheckIfDestinationCanBeDeletedL( const CCmmDestinationInstance& aDestinationInstance );
+
+    /**
+     * Return the requested table ID.
+     */
+    CommsDat::TMDBElementId TableId( TCmmDbRecords aRecord );
+
+private:
+    TInt FindDestinationFromCache( const TUint32 aId );
+    TInt FindNotSavedDestinationFromCacheL( const TDesC& aName, const TUint32 aDestinationId );
+
+    TInt FindConnMethodFromCache( const TUint32 aConnMethodId );
+
+    void ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
+
+    /**
+     * Opens a transaction and deletes the given connection method.
+     */
+    void DeletePluginL( CCmmConnMethodStruct& aConnMethodStruct );
+
+    /**
+     * Initiate the deletion of given destination if none of the connection
+     * methods inside it are connected.
+     */
+    void DeleteDestinationForcedL( CCmmDestinationInstance& aDestinationInstance );
+
+    /**
+     * Informs all the loaded iaps if something related to their tables
+     * changed in commsdat.
+     */
+    void NotifyPluginsForTableChangesL( const TUint32 aTableId );
+
+private:
+    // Monitors changes in the database.
+    CCmmListenerManager* iListenerManager; // Owned.
+
+    // Contains the current destination/connection method structure.
+    CCmmInstanceMapping* iInstanceMapping; // Owned.
+
+    // Array of currently opened destinations.
+    RPointerArray<CCmmDestinationStruct> iDestinationArray; // Owned.
+
+    // Array of currently opened connection methods.
+    RPointerArray<CCmmConnMethodStruct> iConnMethodArray; // Owned.
+
+    // Temporary array to hold information about connection methods that are
+    // deleted during a database transaction. This information is needed
+    // immediately when the database transaction is successfully commited.
+    RArray<TCmmIdStruct> iDeletedConnMethods; // Owned.
+
+    // Temporary arrays to hold information about connection methods that are
+    // updated during a database transaction. This information is needed
+    // immediately when the database transaction is successfully commited.
+    RArray<TCmmIdStruct> iUpdatedConnMethods; // Owned.
+    RPointerArray<CCmmConnMethodInstance> iUpdatedConnMethods2; // Does not own contents.
+
+    // Temporary arrays to hold information about destinations that are updated
+    // during a database transaction. This information is needed immediately
+    // when the database transaction is successfully commited.
+    RArray<TCmmIdStruct> iUpdatedDestinations; // Owned.
+    RPointerArray<CCmmDestinationInstance> iUpdatedDestinations2; // Does not own contents.
+
+    // Transaction handler for CommsDat operations. Created and owned by
+    // CCmManagerImpl.
+    CCmmTransactionHandler* iTrans; // Not owned.
+
+    // Pointer to bearer priority array.
+    CCmmBearerPriorityCache* iBearerPriorityCache; // Owned.
+
+    CArrayPtrFlat<const CCmPluginBaseEng>* iPlugins; // Not owned.
+
+    // Connection method manager.
+    CCmManagerImpl* iCmManagerImpl; // Not owned.
+
+    // Counter to generate new unique IDs. These are used to link new objects
+    // without valid IDs between session side and cache.
+    TUint32 iCurrentTemporaryId;
+
+    // Destination network table ID.
+    CommsDat::TMDBElementId iSnapTableId;
+    // Destination metadata table ID.
+    CommsDat::TMDBElementId iSnapMetadataTableId;
+    };
+
+#endif // CMMCACHE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,260 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Session side object representing a connection method.
+*
+*/
+
+
+#ifndef CMMCONNMETHODINSTANCE_H_
+#define CMMCONNMETHODINSTANCE_H_
+
+#include <e32base.h>
+
+#include "cmmserverdefs.h"
+
+class CCmmSession;
+class CCmmCache;
+class CCmPluginBaseEng;
+class CCmClientPluginInstance;
+class CCmmConnMethodStruct;
+class TCmmIdStruct;
+
+
+/**
+ * Session side object representing a connection method. Keeps track of any
+ * changes the client makes before they are updated to database.
+ */
+NONSHARABLE_CLASS( CCmmConnMethodInstance ) : public CObject
+    {
+public:
+    /**
+     * NewL.
+     */
+    static CCmmConnMethodInstance* NewL( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * NewLC.
+     */
+    static CCmmConnMethodInstance* NewLC( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmConnMethodInstance();
+
+private:
+    /**
+     * Constructor.
+     *
+     * @param aCache database cache.
+     */
+    CCmmConnMethodInstance( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+
+public:
+    /**
+     * Get connection method ID.
+     */
+    TUint32 GetId() const;
+
+    /**
+     * Set connection method ID.
+     */
+    void SetId( const TUint32 aConnMethodId );
+
+    /**
+     * Return bearer type.
+     */
+    TUint32 GetBearerType() const;
+
+    /**
+     * Get handle ID.
+     */
+    TInt GetHandle() const;
+
+    /**
+     * Set handle ID.
+     */
+    void SetHandle( const TInt aHandle );
+
+    /**
+     * Get pointer to the plugin data container.
+     */
+    CCmClientPluginInstance* GetPluginDataInstance() const;
+
+    /**
+     * Return ETrue, if this connection method represents an embedded destination.
+     */
+    TBool IsEmbeddedDestination() const;
+
+    /**
+     * Save the contents of this connection method into database. The attribute
+     * aTemporaryHandle must be true if this connection instance was
+     * temporarily created for the duration of this update operation only. 
+     */
+    void UpdateL( TBool aTemporaryHandle = EFalse );
+
+    /**
+     * Copy the relevant connection method information from cache side object.
+     */
+    void CopyDataL( CCmmConnMethodStruct* aConnMethodStruct );
+
+    /**
+     * Returns integer value identified by aAttribute. Some special cases
+     * are handled in this module and the rest in plugin.
+     * @param aAttribute Parameter which specifies the requested attribute.
+     * @return Returns the value of the requested attribute if succees. Otherwise
+     * leaves with KErrArgument
+     */
+    TUint32 GetIntAttributeL( const TUint32 aAttribute );
+
+    /**
+     * Returns integer value identified by aAttribute. Some special cases
+     * are handled in this module and the rest in plugin.
+     * @param aAttribute Parameter which specifies the requested attribute.
+     * @return Returns the value of the requested attribute if succees. Otherwise
+     * leaves with KErrArgument
+     */
+    TBool GetBoolAttributeL( const TUint32 aAttribute );
+
+    /**
+     * Returns 16 bit string value identified by aAttribute.
+     * @param aAttribute Parameter which specifies the requested attribute.
+     * @return Returns the value of the requested attribute if succees. Otherwise
+     * leaves with KErrArgument
+     */
+    HBufC* GetStringAttributeL( const TUint32 aAttribute );
+
+    /**
+     * Returns 8 bit string value identified by aAttribute.
+     * @param aAttribute Parameter which specifies the requested attribute.
+     * @return Returns the value of the requested attribute if succees. Otherwise
+     * leaves with KErrArgument
+     */
+    HBufC8* GetString8AttributeL( const TUint32 aAttribute );
+
+    /**
+     * Sets the integer value identified by aAttribute.
+     * @param aAttribute Identifies the attribute to be set.
+     * @param aValue The value to be set.
+     * @return None
+     */
+    void SetIntAttributeL(
+            const TUint32 aAttribute,
+            const TUint32 aValue );
+
+    /**
+     * Sets the integer value identified by aAttribute.
+     * @param aAttribute Identifies the attribute to be set.
+     * @param aValue The value to be set.
+     * @return None
+     */
+    void SetBoolAttributeL(
+            const TUint32 aAttribute,
+            const TBool aValue );
+
+    /**
+     * Sets the 16 bit string value identified by aAttribute.
+     * @param aAttribute Identifies the attribute to be set.
+     * @param aValue The value to be set.
+     * @return None
+     */
+    void SetStringAttributeL(
+            const TUint32 aAttribute,
+            const TDesC16& aValue );
+
+    /**
+     * Sets the 8 bit string value identified by aAttribute.
+     * @param aAttribute Identifies the attribute to be set.
+     * @param aValue The value to be set.
+     * @return None
+     */
+    void SetString8AttributeL(
+            const TUint32 aAttribute,
+            const TDesC8& aValue );
+
+    /**
+     * Gets the current status value.
+     */
+    TCmmConnMethodStatus GetStatus() const;
+
+    /**
+     * Sets a new status value.
+     */
+    void SetStatus( const TCmmConnMethodStatus aStatus );
+
+    /*
+     * Called after this connection method has been updated and database
+     * transaction has completed successfully. Sets the internal state of this
+     * connection method instance to reflect the new valid state.
+     */
+    void UpdateSuccessful();
+
+    /**
+     * Called after this connection method has been deleted and database
+     * transaction has completed successfully. Sets the internal state of this
+     * connection method structure to reflect the new deleted state.
+     */
+    void DeleteSuccessful( const TUint32 aNewSecondaryId );
+
+    /**
+     * After update/delete to database, refresh temporary ID to real ID if
+     * necessary and refresh status information for any related handles for
+     * all client sessions.
+     */
+    void RefreshHandlesForAllSessions( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * Removes a connection method from any open destination handle in the same
+     * session.
+     */
+    void RemoveConnMethodFromSessionDestinationHandles( const TUint32 aConnMethodId );
+
+private:
+    // Session that owns this instance.
+    CCmmSession* iCmmSession; // Not owned.
+
+    // Database cache.
+    CCmmCache* iCache; // Not owned.
+
+    // Pointer to original bearer plugin owned by cache.
+    CCmPluginBaseEng* iPlugin; // Not owned.
+
+    // Object to contain the data of this connection method instance.
+    CCmClientPluginInstance* iPluginDataInstance; // Owned.
+
+    // Connection method ID.
+    TUint32 iConnMethodId;
+
+    // Connection method bearer type.
+    TUint32 iBearerType;
+
+    // Connection method handle status.
+    TCmmConnMethodStatus iStatus;
+
+    // Current status of the loaded commsdat records of this connection method.
+    TCmmRecordStatus iRecordStatus;
+
+    // Subsession handle ID.
+    TInt iHandle;
+    };
+
+#endif // CMMCONNMETHODINSTANCE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethoditem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Class representing any kind on connection method, including embedded
+* destination. Used for priority based ordering of connection methods inside
+* destinations.
+*
+*/
+
+
+#ifndef CMMCONNMETHODITEM_H_
+#define CMMCONNMETHODITEM_H_
+
+#include <e32base.h>
+
+
+NONSHARABLE_CLASS( TCmmConnMethodItem )
+    {
+public:
+    TCmmConnMethodItem();
+
+    TCmmConnMethodItem(
+            TUint32 aId,
+            TUint32 aBearerType,
+            TUint aBearerPriority,
+            TUint aPriority,
+            TBool aIsVirtual = 0,
+            TUint32 aLinkedIapId = 0,
+            TUint32 aLinkedSnapId = 0 );
+
+    /**
+     * A comparison function. Uses priority since items are in priority order.
+     */
+    static TInt Compare(
+            const TCmmConnMethodItem& aFirst,
+            const TCmmConnMethodItem& aSecond );
+
+    /**
+     * A comparison function to find a specific item by ID. (Items are not
+     * sorted by ID in the array.)
+     */
+    static TBool FindCompare(
+            const TUint32* aKey,
+            const TCmmConnMethodItem& aEntry );
+
+    /**
+     * Return ETrue if this connection method item represents a virtual
+     * destination.
+     */
+    TBool IsVirtual() const; 
+
+    /**
+     * Return ETrue if this connection method item represents an embedded
+     * destination.
+     */
+    TBool IsEmbedded() const;
+
+    /**
+     * If this is a virtual IAP that points to an IAP, returns the ID of that
+     * IAP, 0 otherwise.
+     */
+    TUint32 LinkedIapId() const;
+
+    /**
+     * If this is a virtual IAP that points to a SNAP, returns the ID of that
+     * SNAP, 0 otherwise.
+     */
+    TUint32 LinkedSnapId() const;
+
+public:
+    // Connection method ID.
+    TUint32 iId;
+
+    // Connection method bearer type.
+    TUint32 iBearerType;
+
+    // Priority value of the bearer type.
+    TUint iBearerPriority;
+
+    // Priority value in the CCDDataMobilitySelectionPolicy-record. Only used
+    // for sorting purposes when building an array of TCmmConnMethodItem-objects.
+    TUint iPriority;
+
+private:
+    // ETrue if this connection method is virtual.
+    TBool iIsVirtual;
+
+    // If not 0, this is a virtual IAP that points to IAP with ID iLinkedIapId.
+    TUint32 iLinkedIapId;
+
+    // If not 0, this is a virtual IAP that points to SNAP with ID iLinkedSnapId.
+    TUint32 iLinkedSnapId;
+    };
+
+#endif // CMMCONNMETHODITEM_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,162 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Cache side object representing a connection method.
+*
+*/
+
+
+#ifndef CMMCONNMETHODSTRUCT_H_
+#define CMMCONNMETHODSTRUCT_H_
+
+#include <e32base.h>
+
+#include "cmmserverdefs.h"
+
+class CCmmConnMethodInstance;
+class CCmPluginBaseEng;
+
+
+/**
+ * Cache side object representing a connection method. Reflects the current
+ * state in database.
+ */
+NONSHARABLE_CLASS( CCmmConnMethodStruct ) : public CBase
+    {
+public:
+    static CCmmConnMethodStruct* NewL( const TUint32 aConnMethodId );
+    static CCmmConnMethodStruct* NewLC( const TUint32 aConnMethodId );
+    ~CCmmConnMethodStruct();
+
+private:
+    CCmmConnMethodStruct( TUint32 aConnMethodId );
+    void ConstructL();
+
+public:
+    /**
+     * Return the reference count.
+     */
+    TInt GetReferenceCounter();
+
+    /**
+     * Increase the reference counter by one.
+     */
+    void IncrementReferenceCounter();
+
+    /**
+     * Return the connection method ID.
+     */
+    TUint32 GetId() const;
+
+    /**
+     * Set the connection method ID.
+     */
+    void SetId( const TUint32 aConnMethodId );
+
+    /**
+     * Return bearer type.
+     */
+    TUint32 GetBearerType() const;
+
+    /**
+     * Gets the current status of this connection method struct.
+     */
+    TCmmConnMethodStatus GetStatus() const;
+
+    /**
+     * Gets the current record status of this connection method struct.
+     */
+    TCmmRecordStatus GetRecordStatus() const;
+
+    /**
+     * Sets a new status value.
+     */
+    void SetStatus( const TCmmConnMethodStatus& aStatus );
+
+    /**
+     * Reload the connection method data in this cache side object to be in
+     * synch with the database(only if needed).
+     */
+    void ReloadPluginDataIfNeededL();
+
+    /**
+     * Decrease the reference counter by one. Return the remaining number of
+     * references.
+     */
+    TInt ConnMethodInstanceClosed();
+
+    /**
+     * Set the connection method plugin pointer, bearer type and status.
+     */
+    void SetPlugin(
+            CCmPluginBaseEng* aPlugin,
+            TUint32 aBearerType,
+            TCmmConnMethodStatus aStatus );
+
+    /**
+     * Returns the connection method plugin.
+     */
+    CCmPluginBaseEng* GetPlugin();
+
+    /**
+     * Called after this connection method has been updated and database
+     * transaction has completed successfully. Sets the internal state of this
+     * connection method structure to reflect the new valid state.
+     */
+    void UpdateSuccessful();
+
+    /**
+     * Called after this connection method has been deleted and database
+     * transaction has completed successfully. Sets the internal state of this
+     * connection method structure to reflect the new deleted state.
+     */
+    void DeleteSuccessful( const TUint32 aNewSecondaryId );
+
+    /**
+     * Notify about a possible change in database on specified record table.
+     */
+    void NotifyRecordChange( const TUint32 aRecordType );
+
+private:
+    /**
+     * Set the record status.
+     */
+    void SetRecordStatus( const TCmmRecordStatus aStatus );
+
+private:
+    // The connection method plugin.
+    CCmPluginBaseEng* iConnMethodPlugin; // Owned.
+
+    // Total number of handles that the clients have to this connection method.
+    TInt iReferenceCounter;
+
+    // Connection method ID.
+    // For new connection methods, while no valid database ID is available,
+    // will be assigned a temporary ID that will have a value above
+    // above KTemporaryIdCounterStart.
+    TUint32 iConnMethodId;
+
+    // Connection method bearer type.
+    TUint32 iBearerType;
+
+    // Current status of this connection method.
+    TCmmConnMethodStatus iStatus;
+
+    // Current status of the loaded commsdat records of this connection method.
+    TCmmRecordStatus iRecordStatus;
+    };
+
+#endif // CMMCONNMETHODSTRUCT_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmdbchangelistener.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Listens for changes in one CommsDat table through CenRep.
+*
+*/
+
+
+#ifndef CMMDBCHANGELISTENER_H_
+#define CMMDBCHANGELISTENER_H_
+
+#include <e32base.h>
+
+class CCmmListenerManager;
+class CRepository;
+
+// Stop requesting new notifications after this many consecutive errors
+const TInt KCmmCenRepErrorThreshold = 50;
+
+
+NONSHARABLE_CLASS( CCmmDbChangeListener ) : public CActive
+    {
+public:
+    static CCmmDbChangeListener* NewL(
+            CCmmListenerManager* aListenerManager,
+            TUint32 aTableId );
+
+    static CCmmDbChangeListener* NewLC(
+            CCmmListenerManager* aListenerManager,
+            TUint32 aTableId );
+
+    virtual ~CCmmDbChangeListener();
+
+private:
+    CCmmDbChangeListener(
+            CCmmListenerManager* aListenerManager,
+            TUint32 aTableId );
+
+    void ConstructL();
+
+public:
+    TUint32 GetTableId();
+    TInt Start();
+
+private: // Methods from base class
+    void DoCancel();
+    void RunL();
+
+    /**
+     * From CActive, handles leaves from RunL.
+     * @param aLeaveCode The leave code.
+     */
+    TInt RunError( TInt aLeaveCode );
+
+private:
+    TInt RequestNotification();
+
+private:
+    // Manager object that handles all similar listeners.
+    CCmmListenerManager* iListenerManager; // Not owned
+
+    // Central Repository handle.
+    CRepository* iRepository; // Owned
+
+    // Table ID of the commsdat table to be listened.
+    TUint32 iTableId;
+
+    // Safeguard in case of CenRep errors.
+    TInt iErrorCounter;
+    };
+
+#endif // CMMDBCHANGELISTENER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,349 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Session side object representing a destination.
+*
+*/
+
+
+#ifndef CMMDESTINATIONINSTANCE_H_
+#define CMMDESTINATIONINSTANCE_H_
+
+#include <e32base.h>
+#include <metadatabase.h>
+#include <cmmanagerdef.h>
+
+#include "cmmserverdefs.h"
+
+class CCmmSession;
+class CCmmCache;
+class CCmmConnMethodInstance;
+class TCmmIdStruct;
+class TCmmConnMethodItem;
+class CCDSNAPMetadataRecord;
+
+
+/**
+ * Session side object representing a destination. Keeps track of any changes
+ * the client makes before they are updated to database.
+ */
+NONSHARABLE_CLASS( CCmmDestinationInstance ) : public CObject
+    {
+public:
+    /**
+     * NewL.
+     */
+    static CCmmDestinationInstance* NewL( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * NewLC.
+     */
+    static CCmmDestinationInstance* NewLC( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmDestinationInstance();
+
+private:
+    /**
+     * Constructor.
+     *
+     * @param aCache CmmCache.
+     */
+    CCmmDestinationInstance( CCmmSession* aCmmSession, CCmmCache* aCache );
+
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+
+public:
+    void SetId( const TUint32 aId );
+    TUint32 GetId() const;
+
+    /**
+     * Sets a new status value.
+     */
+    void SetStatus( const TCmmDestinationStatus& aStatus );
+
+    /**
+     * Gets the current status of this destination instance.
+     */
+    TCmmDestinationStatus GetStatus() const;
+
+    /**
+     * Get handle ID.
+     */
+    TInt GetHandle() const;
+
+    /**
+     * Set handle ID.
+     */
+    void SetHandle( const TInt aHandle );
+
+    /**
+     * Set the record status for all records.
+     */
+    void SetStatusForAllRecords( const TCmmRecordStatus& aStatus );
+
+    TUint32 GetElementIdL();
+    TUint32 GetRecordTagFromApRecordL();
+
+    TInt SetRecordPointer(
+            const TCmmDbRecords& aDestRecord,
+            CommsDat::CCDRecordBase* aRecordPointer );
+    TInt GetRecordPointer(
+            const TCmmDbRecords& aDestRecord,
+            CommsDat::CCDRecordBase*& aRecordPointer );
+
+    /**
+     * Save the contents of this destination into database. All connection
+     * methods including embedded destination, that the client has open handles
+     * to, are also updated.
+     */
+    void UpdateL();
+
+    TDesC& GetDestinationNameL();
+    HBufC* GetLocalisedDestinationNameL();
+    void SetDestinationNameL( const TDesC& aDestinationName );
+
+    /**
+     * Get the destination icon.
+     */
+    HBufC* GetDestinationIconL();
+    void SetDestinationIconL( const TDesC& aDestinationIcon );
+
+    void GetMetadataL(
+            const CMManager::TSnapMetadataField& aMetadataField,
+            TUint32& aMetadata );
+    void SetMetadataL(
+            const CMManager::TSnapMetadataField& aMetadataField,
+            const TUint32 aMetadata );
+
+    void GetProtectionL( CMManager::TProtectionLevel& aProtectionLevel );
+    void SetProtectionL( CMManager::TProtectionLevel aProtectionLevel );
+
+    /**
+     * Return true if protection level has been changed. 
+     */
+    TBool ProtectionChanged();
+
+    /**
+     * Return the previous valid protection level of this connection method
+     * instance.
+     */
+    CMManager::TProtectionLevel LastProtectionLevel();
+
+    /**
+     * Return the protection level currently set into this destination instance.
+     */
+    CMManager::TProtectionLevel CurrentProtectionLevelL();
+
+    /**
+     * Adds a connection method into this destination. Returns the index in
+     * the connection method array where the connection method was added.
+     */
+    TInt AddConnMethodL(
+            CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Adds an embedded destination into this destination. Returns the index in
+     * the connection method array where the connection method was added.
+     */
+    TInt AddEmbeddedDestinationL(
+            const CCmmDestinationInstance& aEmbeddedDestinationInstance );
+
+    /**
+     * Delete a connection method that belongs to this destination. If the
+     * connection method belongs to any other destination, it is only removed
+     * from this destination and not deleted. Does not call update.
+     */
+    void DeleteConnMethodFromDestinationL(
+            const CCmmConnMethodInstance& aConnMethodInstance );
+
+    /**
+     * Remove a connection method from this destination. If the second
+     * attribute aTestIfConnected is false, the test to check if connection
+     * method is in use is skipped. This is to avoid a duplicate check, so it
+     * should have been already tested by the caller.
+     */
+    void RemoveConnMethodFromDestinationL(
+            const CCmmConnMethodInstance& aConnMethodInstance,
+            const TBool aTestIfConnected = ETrue );
+
+    /**
+     * Modifies the priority of a connection method inside this destination.
+     */
+    void ModifyConnMethodPriorityL(
+            CCmmConnMethodInstance& aConnMethodInstance,
+            TUint aIndex );
+
+    /**
+     * Finds a connection method instance that belongs to the same session and
+     * matches the provided ID. Return NULL if no match is found.
+     */
+    CCmmConnMethodInstance* FindConnMethodInstanceFromSessionById(
+            const TUint32 aConnMethodId ) const;
+
+    /**
+     * Finds a destination instance that belongs to the same session and matches
+     * the provided ID. Return NULL if no match is found.
+     */
+    CCmmDestinationInstance* FindDestinationInstanceFromSessionById(
+            const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from all open destination handles in the same session if the given
+     * connection method is inside any of them. The given destination is
+     * skipped.
+     */
+    TBool ConnMethodInOtherDestinationInSession(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId ) const;
+
+    /**
+     * Check if the given connection method is in this destination. Include
+     * embedded destinations.
+     */
+    TBool ValidConnMethodIdInDestinationIncludeEmbedded(
+            const TUint32 aConnMethodId ) const;
+
+    /**
+     * Check if the given connection method is inside this destination and if
+     * it is in a 'locked' status. A locked connection method can't be deleted
+     * nor removed from the destination. A connection method becomes locked
+     * if it is the only remaining connection method in a destination and a
+     * virtual IAP points into that destination.
+     */
+    TBool ConnMethodInDestinationButLocked( const TUint32 aConnMethodId ) const;
+
+    /**
+     * Counts how many connection methods that require priority information are
+     * currently in this destination. This excludes any virtual IAPs that point
+     * to a destination or any embedded destinations from the count. Assumes
+     * the connection method array is in order so all wildcard priority IAPs
+     * are at the end of the list.
+     */
+    TUint NumberOfConnMethodsWithPriority() const;
+
+    /**
+     * Check if this destination has an embedded destination. Checks the
+     * current (possibly unsaved) status of this destination handle, not the
+     * current status in database.
+     */
+    TBool HasEmbedded() const;
+
+    /**
+     * Check if this destination has an embedded destination with the specified
+     * ID. Checks the current (possibly unsaved) status of this destination
+     * handle, not the current status in database.
+     */
+    TBool HasEmbeddedWithId( const TUint32 aDestinationId ) const;
+
+    /**
+     * After update/delete to database, refresh temporary ID to real ID if
+     * necessary and refresh status information for any related handles for
+     * all client sessions.
+     */
+    void RefreshHandlesForAllSessions( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * If the destination contains a connection method with matching temporary
+     * ID, updates the ID to real ID. This is done after the connection method
+     * has been successfully saved into the database.
+     */
+    void RefreshConnMethodId( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * Called after this destination has been updated and database transaction
+     * has completed successfully. Sets the internal state of this destination
+     * instance to reflect the new valid state.
+     */
+    void UpdateSuccessful();
+
+private:
+    TBool AllMandatoryRecordsContainData() const;
+
+    /**
+     * Loads a requested type of record from database if it is not yet loaded.
+     */
+    void LoadRecordIfMissingL( TCmmDbRecords aRecordType );
+
+    void LoadAllRecordsL();
+    void SetMetadataInternetL( const TUint32 aMetadata );
+    void SetMetadataHighlight( const TUint32 aMetadata );
+    void SetMetadataHiddenAgentL( const TUint32 aMetadata );
+    void SetMetadataLocalizationL( const TUint32 aMetadata );
+    void SetMetadataPurposeL( const TUint32 aMetadata );
+
+    /**
+     * Checks the current metadata for this destination, and verifies there is
+     * no other conflicting destinations in the database.
+     */
+    TBool ConflictingMetadataFoundL();
+
+public:
+    // Array of connection method items that belong to this destination. Loaded
+    // and maintained in priority order.
+    RArray<TCmmConnMethodItem> iConnMethodItemArray; // Owned.
+
+    // Array of connection method IDs that should be deleted if UpdateL() is
+    // called for this destination instance.
+    RArray<TUint32> iConnMethodsToBeDeleted; // Owned.
+
+private:
+    // Session that owns this instance.
+    CCmmSession* iCmmSession; // Not owned.
+
+    // Database cache.
+    CCmmCache* iCache; // Not owned.
+
+    // The network record.
+    CommsDat::CCDNetworkRecord* iNetworkRecord; // Owned.
+
+    // The access point record.
+    CommsDat::CCDAccessPointRecord* iDestApRecord; // Owned.
+
+    // The metadata record.
+    CCDSNAPMetadataRecord* iMetadataRecord; // Owned.
+
+    // Status flags for each record.
+    TCmmRecordStatus iNetworkRecordStatus;
+    TCmmRecordStatus iDestApRecordStatus;
+    TCmmRecordStatus iMetadataRecordStatus;
+
+    // Destination handle status.
+    TCmmDestinationStatus iStatus;
+
+    // Destination ID. If real ID is not available, contains a temporary ID.
+    TUint32 iId;
+
+    // Subsession handle ID.
+    TInt iHandle;
+
+    // True if protection value has been changed. Reset to false on update.
+    TBool iProtectionChanged;
+
+    // The previous valid protection level of this connection method instance.
+    // Set correctly only if iProtectionChanged is true.
+    CMManager::TProtectionLevel iLastProtectionLevel;
+
+    // The protection level currently set into this destination instance.
+    CMManager::TProtectionLevel iCurrentProtectionLevel;
+    };
+
+#endif // CMMDESTINATIONINSTANCE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,216 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Cache side object representing a destination.
+*
+*/
+
+
+#ifndef CMMDESTINATIONSTRUCT_H_
+#define CMMDESTINATIONSTRUCT_H_
+
+#include <e32base.h>
+#include <commsdattypesv1_1.h>
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include <commsdattypesv1_1_partner.h>
+#include <commsdattypesv1_1_internal.h>
+#include <commsdattypeinfov1_1_internal.h>
+#endif
+
+#include "cmmserverdefs.h"
+
+class CCmmTransactionHandler;
+class CCmmDestinationInstance;
+class CCmmCache;
+class CCDSNAPMetadataRecord;
+
+
+/**
+ * Cache side object representing a destination. Reflects the current state in
+ * database.
+ */
+NONSHARABLE_CLASS( CCmmDestinationStruct ) : public CBase
+    {
+public:
+    static CCmmDestinationStruct* NewL(
+            CCmmCache* aCache,
+            CCmmTransactionHandler* aTransactionHandler,
+            const TUint32 aId );
+    static CCmmDestinationStruct* NewL(
+            CCmmCache* aCache,
+            CCmmTransactionHandler* aTransactionHandler,
+            const TDesC& aName,
+            const TUint32 aId );
+
+    static CCmmDestinationStruct* NewLC(
+            CCmmCache* aCache,
+            CCmmTransactionHandler* aTransactionHandler,
+            const TUint32 aId );
+    static CCmmDestinationStruct* NewLC(
+            CCmmCache* aCache,
+            CCmmTransactionHandler* aTransactionHandler,
+            const TDesC& aName,
+            const TUint32 aId );
+
+    virtual ~CCmmDestinationStruct();
+
+private:
+    CCmmDestinationStruct( CCmmCache* aCache, CCmmTransactionHandler* aTransactionHandler );
+
+    // Opens an existing destination, based on ID.
+    void ConstructL( const TUint32 aDestinationId );
+
+    // Creates a new destination. With name and optionally also with ID.
+    void ConstructL( const TDesC& aName, const TUint32 aId );
+
+public:
+    void SetId( const TUint32 aId );
+    TUint32 GetId() const;
+
+    /**
+     * Get the destination ID from network record. To get a valid ID, this must
+     * be called only during or after a call to UpdateL().
+     */
+    TUint32 GetRealId() const;
+    TDesC& GetDestinationNameL();
+
+    /**
+     * Gets the current status of this destination struct.
+     */
+    TCmmDestinationStatus GetStatus() const;
+    TInt GetReferenceCount() const;
+
+    /**
+     * Sets a new status value.
+     */
+    void SetStatus( const TCmmDestinationStatus& aStatus );
+
+    /**
+     * Notify about a possible change in database on specified record table.
+     */
+    void NotifyRecordChange( const TCmmDbRecords aRecordType );
+
+    /**
+     * Set the record status for all records.
+     */
+    void SetStatusForAllRecords( const TCmmRecordStatus aStatus );
+
+    /**
+     * Copies the data for this destination to a session instance and
+     * increments the reference counter by one.
+     */
+    void CreateDestinationInstanceL(
+            CCmmDestinationInstance& aDestinationInstance );
+
+    /**
+     * Refresh the data contained in aDestinationInstance. This means reloading
+     * the data from database if necessary. After this call the contents of
+     * aDestinationInstance will reflect the current state in the database. 
+     */
+    void RefreshDestinationInstanceL(
+            CCmmDestinationInstance& aDestinationInstance );
+
+    /**
+     * Reloads a destination record if needed and copies the latest version to
+     * the session instance given as parameter.
+     */
+    void LoadRecordL(
+            CCmmDestinationInstance& aDestinationInstance,
+            TCmmDbRecords aRecordType );
+
+    /**
+     * Save the contents of a session side destination handle into database.
+     */
+    void UpdateL(
+            CCmmDestinationInstance& aDestinationInstance,
+            CCmmCache* aCache );
+
+    /**
+     * Delete all database records of this destination. Also removes any
+     * records making this destination an embedded destination in another
+     * destination.
+     */
+    void DeleteL();
+
+    /**
+     * 
+     * This should be called when a client session closes a destination handle.
+     * Reference counter is decremented by one and the remaining number of
+     * references is returned.
+     */
+    TInt DestinationInstanceClosed();
+
+    /**
+     * Called after this destination has been updated and database transaction
+     * has completed successfully. Sets the internal state of this destination
+     * structure to reflect the new valid state.
+     */
+    void UpdateSuccessful();
+
+private:
+    void InitializeDestApRecordL();
+    void SetDefaultTierManagerL();
+    void SetDefaultMCprL();
+    void SetDefaultCprL();
+    void SetDefaultSCprL();
+    void SetDefaultProtocolL();
+
+    /**
+     * Set attribute flag on the given record.
+     * @param aRecord Record to be set.
+     * @param aAttribute Attribute to be set.
+     * @param aSet ETrue to set, EFalse to clear.
+     */
+    void SetAttribute( CommsDat::CCDRecordBase* aRecord, TUint32 aAttribute, TBool aSet );
+
+    CommsDat::CCDRecordBase* CopyRecordL(
+            TCmmDbRecords aRecordType,
+            CommsDat::CCDRecordBase* aSource );
+
+private:
+    // Database cache.
+    CCmmCache* iCache; // Not owned.
+
+    // The transaction handler.
+    CCmmTransactionHandler* iTransactionHandler; // Not owned.
+
+    // The access point record.
+    CommsDat::CCDAccessPointRecord* iDestApRecord; // Owned.
+    // The network record.
+    CommsDat::CCDNetworkRecord* iNetworkRecord; // Owned.
+    // The metadata record.
+    CCDSNAPMetadataRecord* iMetadataRecord; // Owned.
+
+    // Record status variables.
+    TCmmRecordStatus iDestApRecordStatus;
+    TCmmRecordStatus iNetworkRecordStatus;
+    TCmmRecordStatus iMetadataRecordStatus;
+
+    // Counts number of session side objects referring to this destination.
+    TInt iReferenceCounter;
+
+    // Destination status.
+    TCmmDestinationStatus iStatus;
+
+    // Destination ID. If real ID is not available, contains a temporary ID.
+    TUint32 iId;
+
+    // Destination name for newly created destination.
+    // Only valid until destination is saved to database (status is ECmmDestinationStatusNotSaved).
+    HBufC* iName; // Owned.
+    };
+
+#endif // CMMDESTINATIONSTRUCT_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmminstancemapping.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,339 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Keeps track of the general destination/connection method structure in
+* database.
+*
+*/
+
+
+#ifndef CMMINSTANCEMAPPING_H_
+#define CMMINSTANCEMAPPING_H_
+
+#include <e32base.h>
+
+#include "cmmcache.h"
+#include "cmmconnmethoditem.h"
+
+
+NONSHARABLE_CLASS( CDestination ) : public CBase
+    {
+public:
+    static CDestination* NewL();
+    static CDestination* NewLC();
+    ~CDestination();
+
+private:
+    CDestination();
+    void ConstructL();
+
+public:
+    // The destination ID.
+    TUint32 iId;
+
+    // Array of connection methods inside this destination. Includes also
+    // embedded destinations.
+    RArray<TCmmConnMethodItem> iConnMethodItemArray;
+
+    // IDs for unsupported connection methods inside this destination.
+    RArray<TUint> iUnsupportedConnMethods;
+    
+    // The destination metadata.
+    TUint32 iMetadata;
+    };
+
+
+NONSHARABLE_CLASS( CCmmInstanceMapping ) : public CBase
+    {
+public:
+    /**
+     * NewL.
+     */
+    static CCmmInstanceMapping* NewL( CCmmCache& aCache );
+
+    /**
+     * NewLC.
+     */
+    static CCmmInstanceMapping* NewLC( CCmmCache& aCache );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmInstanceMapping();
+
+private:
+    /**
+     * Constructor.
+     *
+     * @param aCache database cache object.
+     */
+    CCmmInstanceMapping( CCmmCache& aCache );
+
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+
+public: //TODO, sort methods, they are currently in mixed order in .cpp file.
+    /**
+     * Update the connection method and destination structures to current state.
+     */
+    void RefreshL();
+
+    /**
+     * Check if the given ID is a valid existing destination ID.
+     */
+    TBool ValidDestinationId( const TUint32 aId ) const;
+
+    /**
+     * Check if the given ID is a valid existing connection method ID.
+     */
+    TBool ValidConnMethodId( const TUint32 aId ) const;
+
+    /**
+     * Check if the given ID is a valid existing unsupported connection method
+     * ID.
+     */
+    TBool UnsupportedConnMethodId( const TUint32 aId ) const;
+
+    /**
+     * Check from database if the given destination is an embedded destination
+     * in any other destination.
+     */
+    TBool DestinationIsEmbedded( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given destination has an embedded destination.
+     */
+    TBool DestinationHasEmbedded( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given destination is pointed to by any
+     * virtual IAP.
+     */
+    TBool DestinationPointedToByVirtualIap( const TUint32 aDestinationId ) const;
+
+    /**
+     * Check from database if the given connection method is pointed to by any
+     * virtual IAP.
+     */
+    TBool ConnMethodPointedToByVirtualIap( const TUint32 aConnMethodId ) const;
+
+    /**
+     * Check if the given connection method is the only connection method in
+     * the given destination and if a virtual IAP points to that destination.
+     */
+    TBool ConnMethodInDestinationButLocked(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId ) const;
+
+    /**
+     * Get bearer type of connection method matching given ID.
+     * Return KErrNone if ID is found, KErrNotFound if not.
+     */
+    TInt GetConnMethodBearerType( const TUint32 aConnMethodId, TUint32& bearerType ) const;
+
+    /**
+     * Returns the number of destinations the provided connection method
+     * belongs to.
+     */
+    TInt DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const;
+
+    /**
+     * Returns the destination ids containing the connection method given as
+     * parameter.
+     */
+    void DestinationsContainingConnMethodL(
+            const TUint32 aConnMethodId,
+            RArray<TUint32>& aDestinationIds ) const;
+
+    /**
+     * Find and return a copy of a connection method item matching the given ID.
+     * Returns KErrNotFound, if the connection method is not found.
+     */
+    TInt GetConnMethodItem(
+            const TUint32 aConnMethodId,
+            TCmmConnMethodItem& aConnMethodItem ) const;
+
+    /**
+     * Returns all conenction method IDs. Unsupported connection methods are
+     * included if aCheckBearerType is set to EFalse.
+     */
+    void GetAllConnMethodsL(
+            RArray<TUint32>& aConnMethodArray,
+            TBool aCheckBearerType = ETrue ) const;
+
+    /**
+     * Returns the number of destinations.
+     */
+    TInt GetDestinationCount() const;
+
+    /**
+     * Returns all the valid destinations.
+     */
+    void GetDestinationsL( RArray<TUint32>& aDestinationArray ) const;
+
+    /**
+     * Inserts all the valid connection methods inside the given destination
+     * into the provided connection method item array. The array is reset first.
+     */
+    void GetConnMethodsFromDestinationL(
+            const TUint32 aDestinationId,
+            RArray<TCmmConnMethodItem>& aConnMethodArray ) const;
+
+    /**
+     * Returns ETrue if the provided connection method belongs to any other
+     * destination than the one given.
+     */
+    TBool ConnMethodInOtherDestination(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
+
+    /**
+     * Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
+     */
+    TUint32 EasyWlanIdL();
+
+    /**
+     * Find out the internet destination ID. ID is set to 0 if not found.
+     */
+    void InternetDestinationIdL( TUint& aInternetDestinationId );
+
+    /**
+     * Add a connection method ID to deleted list. Ignores any duplicates. Also
+     * removes the connection method from destination/connection method
+     * structures so Refresh()-call is not needed.
+     */
+    void AddConnMethodToDeletedListL( const TUint aConnMethodId );
+
+    /**
+     * Remove a connection method ID from deleted list. Nothing happens if ID
+     * is not found from the list.
+     */
+    void RemoveConnMethodFromDeletedList( const TUint aConnMethodId );
+
+    /**
+     * Add a destination ID to deleted list. Ignores any duplicates. Also
+     * removes the destination from destination/connection method structures
+     * so Refresh()-call is not needed.
+     */
+    void AddDestinationToDeletedListL( const TUint aDestinationId );
+
+    /**
+     * Remove a destination ID from deleted list. Nothing happens if ID is not
+     * found from the list.
+     */
+    void RemoveDestinationFromDeletedList( const TUint aDestinationId );
+
+    /**
+     * Remove the connection method from current destination/connection method
+     * structures. This is a lot faster than calling Refresh().
+     */
+    void RemoveConnMethod( const TUint32 aConnMethodId );
+
+    /**
+     * Remove the connection method from current destination/connection method
+     * structures. This is a lot faster than calling Refresh(). The ID of any
+     * changed destination is added to the aChangedDestinations-array.
+     * Also adds the ID of any changed destinations to the provided array.
+     */
+    void RemoveConnMethod(
+            const TUint32 aConnMethodId,
+            RArray<TUint32>& aChangedDestinations );
+
+    /**
+     * Remove the destination from current destination/connection method
+     * structures. This is a lot faster than calling Refresh().
+     */
+    void RemoveDestination( const TUint32 aDestinationId );
+
+    /**
+     * Remove the connection method from all destinations in the current
+     * destination/connection method structures. This is a lot faster than
+     * calling Refresh(). The ID of any changed destination is added to the
+     * aChangedDestinations-array.
+     */
+    void RemoveConnMethodFromDestinations(
+            const TUint32 aConnMethodId,
+            RArray<TUint32>& aChangedDestinations );
+    
+    /**
+     * Get the metadata of the destination identified with given id.
+     */
+    TUint32 DestinationMetadata( const TUint32 aDestinationId ) const;
+
+private:
+    /**
+     * Reads all connection methods from database.
+     */
+    void ReadAndValidateConnMethodsL();
+
+    /**
+     * Reads all destinations and the connection methods inside them.
+     */
+    void ReadAndValidateDestinationsL();
+
+    /**
+     * Goes through the internal IAP table, checking all virtual IAPs that link
+     * to an IAP. If the linked IAP is not found, the virtual IAP is removed.
+     */
+    void ValidateVirtualIapsLinkingToIaps();
+
+    /**
+     * Goes through the internal IAP table, checking all virtual IAPs that link
+     * to a SNAP. If the linked SNAP is not found, the virtual IAP is removed.
+     */
+    void ValidateVirtualIapsLinkingToSnaps();
+
+    /**
+     * Find the destination item matching the provided destination ID.
+     * Returns a pointer to the internal destination item, NULL if not found.
+     */
+    CDestination* GetDestination( const TUint32 aDestinationId ) const;
+
+    /**
+     * Returns the reference to shared CommsDat session handle.
+     */
+    CommsDat::CMDBSession& Session() const;
+
+private:
+    // The database cache object.
+    CCmmCache& iCache;
+
+    // All supported connection methods. Does not include any embedded destinations.
+    RArray<TCmmConnMethodItem> iConnMethodItemArray;
+
+    // IDs for all unsupported connection methods.
+    RArray<TUint> iUnsupportedConnMethods;
+
+    // All destinations.
+    RPointerArray<CDestination> iDestinations;
+
+    // Connection methods that are deleted, but not removed from database yet
+    // because some handles are still open to them and ID needs to be kept
+    // reserved. Kept in unsigned integer order.
+    RArray<TUint> iDeletedConnMethods;
+
+    // Destinations that are deleted, but not removed from database yet because
+    // some handles are still open to them and ID needs to be kept reserved.
+    // Kept in unsigned integer order.
+    RArray<TUint> iDeletedDestinations;
+
+    // EasyWLAN IAP ID, KMaxTUint32 if not known.
+    TUint32 iEasyWlanId;
+    };
+
+#endif // CMMINSTANCEMAPPING_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmlistenermanager.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Manages all CommsDat table specific CenRep listeners.
+*
+*/
+
+
+#ifndef CMMLISTENERMANAGER_H_
+#define CMMLISTENERMANAGER_H_
+
+#include <e32base.h>
+
+#include "cmmdbchangelistener.h"
+
+class CCmmCache;
+
+// Repository for CommsDat
+const TUid KCDCommsRepositoryId = { 0xCCCCCC00 };
+
+
+NONSHARABLE_CLASS( CCmmListenerManager ) : public CBase
+    {
+public:
+    /**
+     * NewL.
+     */
+    static CCmmListenerManager* NewL( CCmmCache* aCache );
+
+    /**
+     * NewLC.
+     */
+    static CCmmListenerManager* NewLC( CCmmCache* aCache );
+
+    /**
+     * Destructor.
+     */
+    ~CCmmListenerManager();
+
+private:
+    /**
+     * Constructor.
+     */
+    CCmmListenerManager( CCmmCache* aCache );
+
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+
+public:
+    void AddListenerL( TUint32 aIdentifier );
+    TInt RemoveListener( TUint32 aIdentifier );
+    void DbChangeDetectedL( TUint32 aIdentifier );
+    void DbChangeError( TUint32 aIdentifier );
+
+private:
+    // The database cache.
+    CCmmCache* iCache; // Not owned
+
+    // Array for listener active objects.
+    RPointerArray<CCmmDbChangeListener> iListeners;
+    };
+
+#endif // CMMLISTENERMANAGER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,208 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Connection method manager server.
+*
+*/
+
+
+#ifndef CMMSERVER_H_
+#define CMMSERVER_H_
+
+#include <e32base.h>
+
+#include "cmmserverdefs.h"
+#include "cmmanagerimpl.h"
+
+class CCmmDelayedShutdown;
+
+
+/**
+ * The main server class
+ */
+NONSHARABLE_CLASS( CCmmServer ) : public CPolicyServer
+    {
+public:
+
+    /**
+     * Two phased construction.
+     */
+    static CCmmServer* NewL();
+
+    /**
+     * Two phased construction.
+     */
+    static CCmmServer* NewLC();
+
+    /**
+     * Destroy the object and release all memory objects
+     */
+    ~CCmmServer();
+
+    /**
+     * Increments the count of active sessions for this server.
+     */
+    void IncrementSessions();
+
+    /**
+     * Decrements the count of the active sessions for this server.
+     * If no more sessions are in use the server terminates.
+     */
+    void DecrementSessions();
+
+     /**
+     * Produces object containers (needed by subsessions) with unique ids within the server.
+     * @return A object container.
+     */
+    CObjectCon* NewContainerL();
+
+    /**
+     * Removes from index and deletes the object container.
+     * @param aContainer The container to be deleted.
+     * @return A object container.
+     */
+    void RemoveContainer( CObjectCon* aContainer );
+
+    CCmManagerImpl* CmManager();
+
+    /**
+     * Check for restrictions for adding an embedded destination from destination
+     * instances of all clients.
+     * @param aDestinationId The ID of the destination where a destination is
+     * beeing embedded.
+     * @param aEmbeddedDestinationId The ID of the destination that is beeing
+     * embedded.
+     */
+    TBool EmbeddedDestinationConflictsFromAllSessions(
+            const TUint32 aDestinationId,
+            const TUint32 aEmbeddedDestinationId );
+
+    /**
+     * Notify each session about a destination/connection method that has been
+     * updated to, or deleted from, database.
+     */
+    void RefreshHandlesForAllSessions( const TUint32 aId );
+    
+    /**
+     * Custom security checking for IPCs marked with TSpecialCase::ECustomCheck.
+     * @param aMsg The IPC message from the client.
+     * @return The result of the security check (TCustomResult::EPass/TCustomResult::EFail).
+     */
+    TCustomResult CustomSecurityCheckL(
+            const RMessage2& aMsg,
+            TInt& aAction,
+            TSecurityInfo& aMissing );
+
+    /**
+     * Checks the client's capabilities in the middle of request handling. Some
+     * checks cannot be done with CustomSecurityCheckL() at the start phase of
+     * the operation.
+     * @param aMsg The IPC message from the client.
+     * @return Returns ETrue if client has the needed capabilities. Otherwise
+     * returns EFalse.
+     */
+    CPolicyServer::TCustomResult CapabilityCheckWithProtection( const RMessage2& aMessage );
+
+protected: // From CActive
+    /**
+     * Process any errors
+     *
+     * @param aError the leave code reported
+     */
+    TInt RunError( TInt aError );
+
+private:
+
+    /**
+     * Perform the first phase of two phase construction
+     *
+     * @param Priority for this thread
+     */
+    CCmmServer( TInt aPriority );
+
+    /**
+     * Perform the second phase construction
+     */
+    void ConstructL() ;
+
+private: // From CServer
+
+    /**
+     * Create a time server session, and return a pointer to the
+     * created object
+     *
+     * @param Version
+     *
+     * @result Pointer to the new session
+     */
+    CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const;
+
+private:
+    /** The number of client-server sessions */
+    TInt iSessionCount;
+
+    static const TUint iCmmRangeCount;
+    static const TInt iCmmRanges[];
+    static const TUint8 iCmmElementIndex[];
+
+    static const CPolicyServer::TPolicyElement iCmmElements[];
+    static const CPolicyServer::TPolicy iCmmPolicy;
+
+    CCmManagerImpl* iCmManager;
+
+    // Object container index
+    CObjectConIx* iContainerIndex;
+
+    // Pointer to the shutdown timer object
+    CCmmDelayedShutdown* iShutdown;
+    };
+
+/**
+* CCmmDelayedShutdown
+* Shutdown timer that closes Connection Method Manager server after a period.
+*/
+NONSHARABLE_CLASS( CCmmDelayedShutdown ) : public CActive
+    {
+public:
+    CCmmDelayedShutdown( CCmmServer* aServer );
+    void ConstructL();
+    ~CCmmDelayedShutdown();
+
+public:
+    /**
+     * Starts shutdown timer.
+     * @return KErrNone if OK, otherwise a system wide error code.
+     */
+    void Start();
+
+private:
+    /**
+     * From CActive Cancels the shutdown timer.
+     */
+    void DoCancel();
+
+    /**
+     * From CActive Shuts the server down.
+     */
+    void RunL();
+
+private: // Data
+    RTimer iTimer;
+    CCmmServer* iServer;
+    };
+
+
+#endif // CMMSERVER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmsession.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,293 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Handles client requests.
+*
+*/
+
+
+#ifndef CMMSESSION_H_
+#define CMMSESSION_H_
+
+#include <e32base.h>
+#include <f32file.h>
+
+#include "cmmcache.h"
+
+class CCmmServer;
+class CCmmConnMethodInstance;
+class CCmmDestinationInstance;
+
+
+/**
+ * A handler for the service requests received from clients.
+ */
+class CCmmSession : public CSession2
+    {
+public:
+    /**
+     * Creates a CVpnManagerSession object using two phase construction,
+     * and returns a pointer to the created object
+     *
+     * @param Client's thread
+     * @param The server
+     *
+     * @result Pointer to the new session
+     */
+    static CCmmSession* NewL( CCmmServer& aServer, CCmmCache& aCache );
+
+    /**
+     * Creates a CVpnManagerSession object using two phase construction,
+     * and returns a pointer to the created object
+     * (leaving a pointer to the object on the cleanup stack)
+     *
+     * @param Client's thread
+     * @param The server
+     *
+     * @result Pointer to the new session
+     */
+    static CCmmSession* NewLC( CCmmServer& aServer, CCmmCache& aCache );
+
+    /**
+     * Destroy the object and release all memory objects.
+     */
+    ~CCmmSession();
+
+public:
+    /**
+     * Service request from client.
+     *
+     * @param aMessage Message from client (containing requested operation and
+     * any relevant data).
+     */
+    void ServiceL( const RMessage2& aMessage );
+
+    /**
+     * Finds a connection method instance that belongs to this session and
+     * matches the provided ID. Return NULL if no match is found.
+     */
+    CCmmConnMethodInstance* FindConnMethodInstanceById(
+            const TUint32 aConnMethodId );
+
+    /**
+     * Finds a destination instance that belongs to this session and matches
+     * the provided handle.
+     */
+    CCmmDestinationInstance* FindDestinationInstanceByHandleL(
+            const TInt aDestinationHandle );
+
+    /**
+     * Finds a destination instance that belongs to this session and matches
+     * the provided ID. Return NULL if no match is found.
+     */
+    CCmmDestinationInstance* FindDestinationInstanceById(
+            const TUint32 aDestinationId );
+
+    /**
+     * Check from all open destination handles in this session if the given
+     * connection method is inside any of them. The given destination is
+     * skipped.
+     */
+    TBool ConnMethodInOtherDestination(
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
+
+    /**
+     * Check for restrictions for adding an embedded destination from destination
+     * instances of all clients.
+     * @param aDestinationId The ID of the destination where a destination is
+     * beeing embedded.
+     * @param aEmbeddedDestinationId The ID of the destination that is beeing
+     * embedded.
+     */
+    TBool EmbeddedDestinationConflictsFromAllSessions(
+            const TUint32 aDestinationId,
+            const TUint32 aEmbeddedDestinationId );
+
+    /**
+     * Check for restrictions for adding an embedded destination from destination
+     * instances of this session.
+     * @param aDestinationId The ID of the destination where a destination is
+     * beeing embedded.
+     * @param aEmbeddedDestinationId The ID of the destination that is beeing
+     * embedded.
+     */
+    TBool EmbeddedDestinationConflicts(
+            const TUint32 aDestinationId,
+            const TUint32 aEmbeddedDestinationId );
+
+    /**
+     * After update to database, refresh temporary ID to real ID if necessary
+     * and refresh status information for any related handles for all client
+     * sessions.
+     */
+    void RefreshHandlesForAllSessions( const TCmmIdStruct& aIdStruct );
+
+    /**
+     * Removes a connection method from any open destination handle in this
+     * session.
+     */
+    void RemoveConnMethodFromDestinationHandles(
+            const TUint32 aConnMethodId );
+
+    /**
+     * Notify this sessions destination/connection method handles about an
+     * updated/deleted destination/connection method.
+     */
+    void RefreshHandles( const TUint32 aId ) const;
+
+private:
+    /**
+     * The first phase of two phase construction.
+     *
+     * @param Client's thread
+     * @param The server
+     */
+    CCmmSession( CCmmServer& aServer, CCmmCache& aCache );
+
+    /**
+     * Destination specific service dispatcher.
+     * @param aMessage Message sent by the plugin
+     */
+    void ServiceDestinationL( const RMessage2& aMessage );
+
+    /**
+     * Connection Method specific service dispatcher.
+     * @param aMessage Message sent by the plugin
+     */
+    void ServiceConnMethodL( const RMessage2& aMessage );
+
+    /**
+     * The second phase of two phase construction.
+     */
+    void ConstructL() ;
+
+    void GetBearerInfoIntL( const RMessage2& aMessage );
+    void GetBearerInfoBoolL( const RMessage2& aMessage );
+    void GetBearerInfoStringL( const RMessage2& aMessage );
+    void GetBearerInfoString8L( const RMessage2& aMessage );
+    void GetConnMethodInfoIntL( const RMessage2& aMessage );
+    void GetConnMethodInfoBoolL( const RMessage2& aMessage );
+    void GetConnMethodInfoStringL( const RMessage2& aMessage );
+    void GetConnMethodInfoString8L( const RMessage2& aMessage );
+    void GetConnMethodArrayL( const RMessage2& aMessage );
+    void GetAllDestinationsL( const RMessage2& aMessage );
+    void GetEasyWLANIdL( const RMessage2& aMessage );
+    void GetSupportedBearersL( const RMessage2& aMessage );
+    void GetUncategorizedIconL( const RMessage2& aMessage );
+    void ReadDefaultConnectionL( const RMessage2& aMessage );
+    void ReadGenConnSettingsL( const RMessage2& aMessage );
+    void WriteGenConnSettingsL( const RMessage2& aMessage );
+    void GetBearerPriorityArrayL( const RMessage2& aMessage );
+    void UpdateBearerPriorityArrayL( const RMessage2& aMessage );
+    void CopyConnMethodL( const RMessage2& aMessage );
+    void MoveConnMethodL( const RMessage2& aMessage );
+    void RemoveConnMethodL( const RMessage2& aMessage );
+    void RemoveAllReferencesL( const RMessage2& aMessage );
+
+    void GetDestinationL( const RMessage2& aMessage );
+    void RefreshDestinationL( const RMessage2& aMessage );
+    void CreateDestinationWithNameL( const RMessage2& aMessage );
+    void CreateDestinationWithNameAndIdL( const RMessage2& aMessage );
+    void CloseDestination( const RMessage2& aMessage );
+    void GetConnectionMehodCountL( const RMessage2& aMessage );
+    void GetConnMethodPriorityL( const RMessage2& aMessage );
+    void GetDestinationNameL( const RMessage2& aMessage );
+    void GetDestinationIdL( const RMessage2& aMessage );
+    void GetDestinationElementIdL( const RMessage2& aMessage );
+    void GetDestinationMetadataL( const RMessage2& aMessage );
+    void GetDestinationProtectionLevelL( const RMessage2& aMessage );
+    void IsDestinationConnectedL( const RMessage2& aMessage );
+    void IsDestinationHiddenL( const RMessage2& aMessage );
+    void DestinationIsEqualL( const RMessage2& aMessage );
+    void GetDestinationIconL( const RMessage2& aMessage );
+
+    void DestAddConnMethodL( const RMessage2& aMessage );
+    void DestAddEmbeddedDestinationL( const RMessage2& aMessage );
+    void DestDeleteConnMethodL( const RMessage2& aMessage );
+    void DestRemoveConnMethodL( const RMessage2& aMessage );
+
+    void ModifyConnMethodPriorityL( const RMessage2& aMessage );
+    void SetDestinationNameL( const RMessage2& aMessage );
+    void SetDestinationMetadataL( const RMessage2& aMessage );
+    void SetDestinationProtectionL( const RMessage2& aMessage );
+    void SetDestinationHiddenL( const RMessage2& aMessage );
+    void UpdateDestinationL( const RMessage2& aMessage );
+    void DeleteDestinationL( const RMessage2& aMessage );
+    void SetDestinationIconL( const RMessage2& aMessage );
+
+    void CreateConnMethodL( const RMessage2& aMessage );
+    void UpdateConnMethodL( const RMessage2& aMessage );
+    void CloseConnMethod( const RMessage2& aMessage );
+    void DeleteConnMethodL( const RMessage2& aMessage );
+    void GetConnMethodWithIdL( const RMessage2& aMessage );
+    void RefreshConnMethodL( const RMessage2& aMessage );
+    void GetIntAttributeL( const RMessage2& aMessage );
+    void GetBoolAttributeL( const RMessage2& aMessage );
+    void GetStringAttributeL( const RMessage2& aMessage );
+    void GetString8AttributeL( const RMessage2& aMessage );
+    void SetIntAttributeL( const RMessage2& aMessage );
+    void SetBoolAttributeL( const RMessage2& aMessage );
+    void SetStringAttributeL( const RMessage2& aMessage );
+    void SetString8AttributeL( const RMessage2& aMessage );
+    void CreateConnMethodWithIdL( const RMessage2& aMessage );
+    void GetConnMethodFromDestWithIndexL( const RMessage2& aMessage );
+    void GetConnMethodFromDestWithIdL( const RMessage2& aMessage );
+    void CreateConnMethodToDestL( const RMessage2& aMessage );
+    void CreateConnMethodToDestWithIdL( const RMessage2& aMessage );
+    void CmIsEqualL( const RMessage2& aMessage );
+    void CreateCopyOfExistingL( const RMessage2& aMessage );
+    void GetEmbeddedDestinationL( const RMessage2& aMessage );
+
+    /**
+     * Check if CM is protected and if so then check the needed capabilities.
+     */
+    void CheckCapabilitiesForProtectedCML( 
+            const RMessage2& aMessage,
+            CCmmConnMethodInstance* aConnectionMethod );
+
+    /**
+     * Checks the disk space.
+     */
+    TBool CheckSpaceBelowCriticalLevelL();
+
+private:
+    RMessage2 iMessage;
+
+    CCmmServer& iServer;
+
+    // Object container for this session (our handles)
+    CObjectCon* iDestinationContainer;
+
+    // Object index which stores objects for this session
+    CObjectIx* iDestinationObjects;
+
+    // Object container for this session (our handles)
+    CObjectCon* iConnMethodContainer;
+
+    // Object index which stores objects for this session
+    CObjectIx* iConnMethodObjects;
+
+    CCmmCache& iCache; // Not owned
+
+    // Tells if Fileserver handle is valid.
+    TBool iFsConnected;
+
+    // File server handle.
+    RFs iFs;
+    };
+
+#endif // CMMSESSION_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmstarter.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Creates and starts the connection method manager (CMM) server.
+*
+*/
+
+
+#ifndef CMMSTARTER_H_
+#define CMMSTARTER_H_
+
+#include <e32base.h>
+
+
+NONSHARABLE_CLASS( CCmmStarter ) : public CBase
+    {
+public:
+    static CServer2* CreateAndStartServerL();
+    static TPtrC ServerName();
+    };
+
+#endif // CMMSTARTER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmtransactionhandler.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of transaction handler.
+*
+*/
+
+
+#ifndef CMMTRANSACTIONHANDLER_H_
+#define CMMTRANSACTIONHANDLER_H_
+
+#include <e32base.h>
+#include <metadatabase.h>
+
+
+/**
+ * Transaction handler.
+ */
+NONSHARABLE_CLASS( CCmmTransactionHandler ) : public CBase
+    {
+public:
+    /**
+     * NewL.
+     * Takes ownership of aDb.
+     */
+    static CCmmTransactionHandler* NewL( CommsDat::CMDBSession& aDb );
+
+    /**
+     * Destructor.
+     * Intentionally not virtual.
+     */
+    ~CCmmTransactionHandler();
+
+private:
+    /**
+     * Constructor.
+     */
+    CCmmTransactionHandler( CommsDat::CMDBSession& aDb );
+
+    /**
+     * Second phase constructor. Leaves on failure.
+     */
+    void ConstructL();
+
+public:
+    /**
+     * Return the CommsDat session.
+     */
+    CommsDat::CMDBSession& Session() const;
+
+    /**
+     * Opens a CommsDat transaction if it is not already open. Reference
+     * counter is inreased by one.
+     */
+    void OpenTransactionLC();
+
+    /**
+     * Decreases the reference counter by one. If it reaches zero, commits the
+     * open CommsDat transaction. If an error code is given as argument, the
+     * CommsDat transaction is rolled back instead.
+     */
+    void CommitTransactionL( TInt aError = KErrNone );
+
+    /**
+     * Performs RollbackTransactionL().
+     */
+    void Close();
+
+    /**
+     * Return the current reference count. Transaction is currently open if the
+     * count above 0.
+     */
+    TUint32 GetReferenceCount();
+
+private:
+    // CommsDat session pointer.
+    CommsDat::CMDBSession& iDb; // Owned.
+
+    // Reference counter.
+    TUint32 iRefCount;
+    };
+
+#endif // CMMTRANSACTIONHANDLER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/rom/cmmserver.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* cmmserver.exe to ROM.
+*
+*/
+
+#ifndef CMMSERVER_IBY__
+#define CMMSERVER_IBY__
+
+file=ABI_DIR\BUILD_DIR\cmmserver.exe   PROGRAMS_DIR\cmmserver.exe
+
+
+#endif // CMMSERVER_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,357 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of CCmManagerImpl.
+*
+*/
+
+
+#include <cmpluginbaseeng.h>
+#include <featmgr.h>
+#include <cmpluginembdestinationdef.h> // KUidEmbeddedDestination
+
+#include "cmmanagerimpl.h"
+#include "cmmtransactionhandler.h"
+#include "cmmcache.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanagerimplTraces.h"
+#endif
+
+const TInt KPluginGranularity = 3;
+
+
+//-----------------------------------------------------------------------------
+//  CCmManagerImpl::NewL()
+//-----------------------------------------------------------------------------
+//
+CCmManagerImpl* CCmManagerImpl::NewL()
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_NEWL_ENTRY );
+
+    CCmManagerImpl* self = new( ELeave ) CCmManagerImpl();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMANAGERIMPL_NEWL_EXIT );
+    return self;
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmManagerImpl::CCmManagerImpl()
+//-----------------------------------------------------------------------------
+//
+CCmManagerImpl::~CCmManagerImpl()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMANAGERIMPL_CCMMANAGERIMPL_ENTRY );
+
+    delete iCache;
+
+    if ( iPlugins )
+        {
+        iPlugins->ResetAndDestroy();
+        delete iPlugins;
+        }
+
+    delete iTrans;
+
+    if ( iIsFeatureManagerInitialised )
+        {
+        // Feature manager must not be uninitialized earlier. Plugins must be
+        // able to use it.
+        FeatureManager::UnInitializeLib();
+        }
+
+    REComSession::FinalClose();
+
+    OstTraceFunctionExit0( DUP1_CCMMANAGERIMPL_CCMMANAGERIMPL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmManagerImpl::CCmManagerImpl()
+//-----------------------------------------------------------------------------
+//
+CCmManagerImpl::CCmManagerImpl()
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_CCMMANAGERIMPL_ENTRY );
+
+    iCache = NULL;
+    iPlugins = NULL;
+    iTrans = NULL;
+    iSnapTableId = 0;
+    iBearerPriorityTableId = 0;
+    iDestMetadataTableId = 0;
+    iDefConnTableId = 0;
+    iIsFeatureManagerInitialised = EFalse;
+    iWLanSupport = ETrue;
+
+    OstTraceFunctionExit0( CCMMANAGERIMPL_CCMMANAGERIMPL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmManagerImpl::ConstructL()
+//-----------------------------------------------------------------------------
+//
+void CCmManagerImpl::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_CONSTRUCTL_ENTRY );
+
+    // Feature Manager is initialized here, and it can be used by plugins also.
+    // It is uninitialized in destructor.
+    FeatureManager::InitializeLibL();
+    iIsFeatureManagerInitialised = ETrue;
+    iWLanSupport = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
+
+    CommsDat::CMDBSession* db = CommsDat::CMDBSession::NewLC( KCDVersion1_2 );
+    iTrans = CCmmTransactionHandler::NewL( *db ); // Ownership of db transferred.
+    CleanupStack::Pop( db );
+
+    CheckTablesL();
+    BuildPluginArrayL();
+
+    iCache = CCmmCache::NewL( this, iPlugins );
+
+    OstTraceFunctionExit0( CCMMANAGERIMPL_CONSTRUCTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmManagerImpl::CheckTablesL()
+// -----------------------------------------------------------------------------
+//
+void CCmManagerImpl::CheckTablesL()
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_CHECKTABLESL_ENTRY );
+
+    TInt err( 0 );
+
+    TRAP( err, iBearerPriorityTableId =
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iTrans->Session() ) );
+    if ( err == KErrNotFound )
+        {
+        iBearerPriorityTableId =
+               CCDGlobalBearerTypePriorizationRecord::CreateTableL( iTrans->Session() );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+
+    TRAP( err, iSnapTableId = CCDDataMobilitySelectionPolicyRecord::TableIdL( iTrans->Session() ));
+    if ( err == KErrNotFound )
+        {
+        iSnapTableId = CCDDataMobilitySelectionPolicyRecord::CreateTableL( iTrans->Session() );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+
+    TRAP( err, iDestMetadataTableId = CCDSNAPMetadataRecord::TableIdL( iTrans->Session() ) );
+    if ( err == KErrNotFound )
+        {
+        iDestMetadataTableId = CCDSNAPMetadataRecord::CreateTableL( iTrans->Session() );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+
+    TRAP( err, iDefConnTableId = CCDDefConnRecord::TableIdL( iTrans->Session() ) );
+    if ( err == KErrNotFound )
+        {
+        iDefConnTableId = CCDDefConnRecord::CreateTableL( iTrans->Session() );
+        }
+    else
+        {
+        User::LeaveIfError( err );
+        }
+
+    OstTraceFunctionExit0( CCMMANAGERIMPL_CHECKTABLESL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Return an array containing the supported bearer types (embedded destination
+// excluded).
+//-----------------------------------------------------------------------------
+//
+void CCmManagerImpl::SupportedBearersL( RArray<TUint32>& aArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_SUPPORTEDBEARERSL_ENTRY );
+
+    aArray.Reset();
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        TUint32 bearerType( (*iPlugins)[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) );
+        if ( KUidEmbeddedDestination != bearerType )
+            {
+            aArray.AppendL( bearerType );
+            }
+        }
+    OstTraceFunctionExit0( CCMMANAGERIMPL_SUPPORTEDBEARERSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Return the requested table ID.
+//-----------------------------------------------------------------------------
+//
+CommsDat::TMDBElementId CCmManagerImpl::TableId( TCmmDbRecords aRecord )
+    {
+    // No traces.
+    CommsDat::TMDBElementId tableId( 0 );
+    switch ( aRecord )
+        {
+        case ECmmDestNetworkRecord:
+            tableId = CommsDat::KCDTIdNetworkRecord;
+            break;
+        case ECmmDestApRecord:
+            tableId = CommsDat::KCDTIdAccessPointRecord;
+            break;
+        case ECmmDestMetadataRecord:
+            tableId = iDestMetadataTableId;
+            break;
+        case ECmmDbSnapRecord:
+            tableId = iSnapTableId;
+            break;
+        case ECmmDbBearerPriorityRecord:
+            tableId = iBearerPriorityTableId;
+            break;
+        case ECmmDbDefConnRecord:
+            tableId = iDefConnTableId;
+            break;
+        default:
+            break;
+        }
+    return tableId;
+    }
+
+// -----------------------------------------------------------------------------
+// Get a handle to the database cache manager.
+// -----------------------------------------------------------------------------
+//
+CCmmCache& CCmManagerImpl::Cache()
+    {
+    return *iCache;
+    }
+
+//-----------------------------------------------------------------------------
+// Get a handle to the database transaction handler.
+//-----------------------------------------------------------------------------
+//
+CCmmTransactionHandler* CCmManagerImpl::GetTransactionHandler()
+    {
+    return iTrans;
+    }
+
+//-----------------------------------------------------------------------------
+// Get a handle to database session.
+//-----------------------------------------------------------------------------
+//
+CommsDat::CMDBSession& CCmManagerImpl::Session() const
+    {
+    return iTrans->Session();
+    }
+
+// ---------------------------------------------------------------------------
+// Return true is WLAN is supported on phone.
+// ---------------------------------------------------------------------------
+//
+TBool CCmManagerImpl::WlanSupported() const
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_WLANSUPPORTED_ENTRY );
+    OstTraceFunctionExit0( CCMMANAGERIMPL_WLANSUPPORTED_EXIT );
+    return iWLanSupport;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmManagerImpl::BuildPluginArrayL()
+// -----------------------------------------------------------------------------
+//
+void CCmManagerImpl::BuildPluginArrayL()
+    {
+    OstTraceFunctionEntry0( CCMMANAGERIMPL_BUILDPLUGINARRAYL_ENTRY );
+
+    iPlugins = new( ELeave ) CArrayPtrFlat<const CCmPluginBaseEng>( KPluginGranularity );
+
+    // Get a list of all the bearer types.
+    RPointerArray<CImplementationInformation> implArray;
+    CmmCleanupResetAndDestroyPushL( implArray );
+    REComSession::ListImplementationsL( TUid::Uid( KCMPluginInterfaceUid ), implArray );
+
+    CCmPluginBaseEng* plugin = NULL;
+    for ( TInt i = 0; i < implArray.Count(); i++ )
+        {
+        TCmPluginInitParam params( iTrans->Session() );
+
+        // This is the Util implementation.
+        // Trap it to be able to work even if there's a faulty plugin installed
+        // in the phone.
+        TRAPD( err, plugin = STATIC_CAST( CCmPluginBaseEng*, REComSession::CreateImplementationL(
+                ( implArray )[i]->ImplementationUid(),
+                _FOFF( CCmPluginBaseEng, iDtor_ID_Key ),
+                ( TAny* )&params ) ) );
+
+        if ( !err )
+            {
+            CleanupStack::PushL( plugin );
+
+            TBool inserted( EFalse );
+
+            TInt defaultPriority( CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
+
+            // No priority -> wildcard
+            TRAP_IGNORE( defaultPriority = plugin->GetBearerInfoIntL(
+                    CMManager::ECmDefaultPriority ) );
+
+            for ( TInt j = 0; j < iPlugins->Count(); j++ )
+                {
+                TUint32 bearerToCompare = (*iPlugins)[j]->GetBearerInfoIntL(
+                        CMManager::ECmDefaultPriority );
+                if ( defaultPriority > bearerToCompare )
+                    {
+                    continue;
+                    }
+                else if ( defaultPriority == bearerToCompare )
+                    {
+                    if ( plugin->GetBearerInfoIntL( ECmExtensionLevel ) >
+                            (*iPlugins)[j]->GetBearerInfoIntL( ECmExtensionLevel ) )
+                        {
+                        iPlugins->InsertL( j, plugin );
+                        inserted = ETrue;
+                        break;
+                        }
+                    }
+                else
+                    {
+                    iPlugins->InsertL( j, plugin );
+                    inserted = ETrue;
+                    break;
+                    }
+                }
+
+            if ( !inserted )
+                {
+                iPlugins->AppendL( plugin );
+                }
+            CleanupStack::Pop( plugin );
+            }
+        }
+
+    CleanupStack::PopAndDestroy( &implArray );
+
+    OstTraceFunctionExit0( CCMMANAGERIMPL_BUILDPLUGINARRAYL_EXIT );
+    }
+
+// Enf of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmanagertextresolver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Provides functionality for text resolving
+*
+*/
+
+#include <hb/hbcore/hbtextresolversymbian.h>
+#include "cmmanagertextresolver.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanagertextresolverTraces.h"
+#endif
+
+
+HBufC* CCmManagerTextResolver::ResolveTextL( const TDesC& aTextId )
+    {
+    _LIT(KCMManagerTranslationFile, "cmmanager_");
+    _LIT(KTranslationPath, "\\resource\\qt\\translations");
+    
+    TBool result = HbTextResolverSymbian::Init( KCMManagerTranslationFile,
+                                                KTranslationPath );
+    if ( result )
+        {
+        OstTrace0( TRACE_ERROR, CCMMANAGERTEXTRESOLVER_RESOLVETEXTL, "CCmManagerTextResolver::ResolveTextL" );
+        }
+    
+    return HbTextResolverSymbian::LoadL( aTextId );        
+    }
+
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmbearerpriority.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of the bearer priority array cache.
+*
+*/
+
+
+#include "cmmbearerpriority.h"
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriority* CCmmBearerPriority::NewL(
+        const TDesC& aServiceType,
+        const TUint aPriority,
+        const TUint aUiPriority )
+    {
+    CCmmBearerPriority* self = CCmmBearerPriority::NewLC( aServiceType, aPriority, aUiPriority );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriority* CCmmBearerPriority::NewLC(
+        const TDesC& aServiceType,
+        const TUint aPriority,
+        const TUint aUiPriority )
+    {
+    CCmmBearerPriority* self = new( ELeave ) CCmmBearerPriority( aPriority, aUiPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL( aServiceType );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor. Note: aServiceType is not copied here because constructor
+// cannot leave.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriority::CCmmBearerPriority(
+        const TUint aPriority,
+        const TUint aUiPriority )
+        :
+        iPriority( aPriority ),
+        iUiPriority( aUiPriority )
+    {
+    iServiceType = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// 2nd phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmBearerPriority::ConstructL( const TDesC& aServiceType )
+    {
+    iServiceType = aServiceType.AllocL();
+    }
+
+// ---------------------------------------------------------------------------
+// Get the service type.
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmmBearerPriority::ServiceType() const
+    {
+    return iServiceType;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the priority.
+// ---------------------------------------------------------------------------
+//
+TUint CCmmBearerPriority::Priority() const
+    {
+    return iPriority;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the UI priority.
+// ---------------------------------------------------------------------------
+//
+TUint CCmmBearerPriority::UiPriority() const
+    {
+    return iUiPriority;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriority::~CCmmBearerPriority()
+    {
+    delete iServiceType;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmbearerprioritycache.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,280 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of the bearer priority array cache.
+*
+*/
+
+
+#include <datamobilitycommsdattypes.h>
+#include <cmmanagerdef.h>
+
+#include "cmmbearerprioritycache.h"
+#include "cmmbearerpriority.h"
+#include "cmmtransactionhandler.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmbearerprioritycacheTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriorityCache* CCmmBearerPriorityCache::NewL(
+        CCmmTransactionHandler* aTrans,
+        CommsDat::TMDBElementId aBearerPriorityTableId )
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_NEWL_ENTRY );
+
+    CCmmBearerPriorityCache* self =
+            CCmmBearerPriorityCache::NewLC( aTrans, aBearerPriorityTableId );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriorityCache* CCmmBearerPriorityCache::NewLC(
+        CCmmTransactionHandler* aTrans,
+        CommsDat::TMDBElementId aBearerPriorityTableId )
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_NEWLC_ENTRY );
+
+    CCmmBearerPriorityCache* self =
+            new( ELeave ) CCmmBearerPriorityCache( aTrans, aBearerPriorityTableId );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriorityCache::~CCmmBearerPriorityCache()
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_CCMMBEARERPRIORITYCACHE_ENTRY );
+    iArray.ResetAndDestroy();
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_CCMMBEARERPRIORITYCACHE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmBearerPriorityCache::CCmmBearerPriorityCache(
+        CCmmTransactionHandler* aTrans,
+        CommsDat::TMDBElementId aBearerPriorityTableId )
+        :
+        iTrans( aTrans ),
+        iArray(),
+        iBearerPriorityTableId( aBearerPriorityTableId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMBEARERPRIORITYCACHE_CCMMBEARERPRIORITYCACHE_ENTRY );
+    OstTraceFunctionExit0( DUP1_CCMMBEARERPRIORITYCACHE_CCMMBEARERPRIORITYCACHE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmBearerPriorityCache::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_CONSTRUCTL_ENTRY );
+
+    // Read initial bearer priority array from commsdat.
+    ReadL();
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Updates the bearer priority array with the contents of aArray.
+// ---------------------------------------------------------------------------
+//
+void CCmmBearerPriorityCache::UpdateL( const RPointerArray<CCmmBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_UPDATEL_ENTRY );
+
+    iTrans->OpenTransactionLC();
+
+    CommsDat::CMDBRecordSet<CCDGlobalBearerTypePriorizationRecord>* bpRS =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDGlobalBearerTypePriorizationRecord>(
+                    iBearerPriorityTableId );
+    CleanupStack::PushL( bpRS );
+
+    // Delete the old records.
+    TRAP_IGNORE( bpRS->LoadL( iTrans->Session() ) );
+    for ( TInt i = 0; i < bpRS->iRecords.Count(); i++ )
+        {
+        bpRS->iRecords[i]->DeleteL( iTrans->Session() );
+        }
+    CleanupStack::PopAndDestroy( bpRS );
+    bpRS = NULL;
+
+    iArray.ResetAndDestroy();
+
+    // Add new content.
+    const TInt count( aArray.Count() );
+    for ( TInt i = 0; i < count; i++ )
+        {
+        if ( aArray[i]->ServiceType() && aArray[i]->ServiceType()->Length() > 0 )
+            {
+            CCDGlobalBearerTypePriorizationRecord* bpRcd =
+                    new( ELeave ) CCDGlobalBearerTypePriorizationRecord(
+                            iBearerPriorityTableId );
+            CleanupStack::PushL( bpRcd );
+
+            HBufC* serviceType = aArray[i]->ServiceType()->AllocLC();
+            TUint priority = aArray[i]->Priority();
+            TUint uiPriority = aArray[i]->UiPriority();
+
+            bpRcd->SetRecordId( KCDNewRecordRequest );
+            bpRcd->iServiceType.SetL( *serviceType );
+            bpRcd->iPriority.SetL( priority );
+            bpRcd->iUIPriority.SetL( uiPriority );
+            bpRcd->StoreL( iTrans->Session() );
+
+            TPtrC tempServiceType( serviceType->Des() );
+            CCmmBearerPriority* item = CCmmBearerPriority::NewLC(
+                    tempServiceType,
+                    priority,
+                    uiPriority );
+            iArray.AppendL( item ); // Ownership transferred.
+            CleanupStack::Pop( item );
+            CleanupStack::PopAndDestroy( serviceType );
+            CleanupStack::PopAndDestroy( bpRcd );
+            }
+        }
+    iTrans->CommitTransactionL();
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_UPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CopyL()
+// ---------------------------------------------------------------------------
+//
+void CCmmBearerPriorityCache::CopyL( RPointerArray<CCmmBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_COPYL_ENTRY );
+
+    const TInt count( iArray.Count() );
+    for ( TInt i = 0; i < count; i++ )
+        {
+        if ( iArray[i]->ServiceType() )
+            {
+            TPtrC tempServiceType( iArray[i]->ServiceType()->Des() );
+            if ( tempServiceType.Length() > 0 )
+                {
+                CCmmBearerPriority* item = CCmmBearerPriority::NewLC(
+                        tempServiceType,
+                        iArray[i]->Priority(),
+                        iArray[i]->UiPriority() );
+                aArray.AppendL( item );
+                CleanupStack::Pop( item );
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_COPYL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the priority value for a service type name from the bearer priority
+// cache.
+// ---------------------------------------------------------------------------
+//
+TUint CCmmBearerPriorityCache::GetPriority( const TDesC& aServiceType ) const
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_GETPRIORITY_ENTRY );
+
+    TUint priority = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+
+    if ( aServiceType.Length() > 0 )
+        {
+        for ( TInt i = 0; i < iArray.Count(); i++ )
+            {
+            if ( iArray[i]->ServiceType()->Compare( aServiceType ) == 0 )
+                {
+                priority = iArray[i]->Priority();
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_GETPRIORITY_EXIT );
+    return priority;
+    }
+
+// ---------------------------------------------------------------------------
+// Reads the bearer priority array from CommsDat.
+// ---------------------------------------------------------------------------
+//
+void CCmmBearerPriorityCache::ReadL()
+    {
+    OstTraceFunctionEntry0( CCMMBEARERPRIORITYCACHE_READL_ENTRY );
+
+    CommsDat::CMDBRecordSet<CCDGlobalBearerTypePriorizationRecord>* bpRS =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDGlobalBearerTypePriorizationRecord>(
+                    iBearerPriorityTableId );
+    CleanupStack::PushL( bpRS );
+
+    CCDGlobalBearerTypePriorizationRecord* bpRcd =
+            new( ELeave ) CCDGlobalBearerTypePriorizationRecord(
+                    iBearerPriorityTableId );
+    CleanupStack::PushL( bpRcd );
+
+    TRAP_IGNORE( bpRS->LoadL( iTrans->Session() ) );
+
+    // Read every record and store to cache.
+    const TInt bpCount = bpRS->iRecords.Count();
+    for ( TInt i = 0; i < bpCount; i++ )
+        {
+        bpRcd->SetElementId( bpRS->iRecords[i]->ElementId() );
+        bpRcd->LoadL( iTrans->Session() );
+
+        if ( !bpRcd->iServiceType.IsNull() )
+            {
+            TPtrC serviceType( bpRcd->iServiceType );
+            TUint priority = bpRcd->iPriority;
+            TUint uiPriority = bpRcd->iUIPriority;
+
+            if ( serviceType.Length() > 0 )
+                {
+                CCmmBearerPriority* item = CCmmBearerPriority::NewLC(
+                        serviceType,
+                        priority,
+                        uiPriority );
+                iArray.AppendL( item );
+                CleanupStack::Pop( item );
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy( bpRcd );
+    CleanupStack::PopAndDestroy( bpRS );
+
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_READL_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,3322 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Database cache manager.
+*
+*/
+
+
+#include <e32base.h>
+#include <cmpluginbaseeng.h>
+#include <cmdefconnvalues.h>
+#include <cmpluginembdestinationdef.h>
+
+#include <es_sock.h>    // RSocketServ, RConnection
+#include <in_sock.h>    // KAfInet
+#include <es_enum.h>    // TConnectionInfo
+
+#include "cmmdestinationstruct.h"
+#include "cmmlistenermanager.h"
+#include "cmminstancemapping.h"
+
+#include "cmmcache.h"
+
+#include "cmmdestinationinstance.h"
+#include "cmmconnmethodinstance.h"
+
+#include "cmmtransactionhandler.h"
+#include "cmmanagerimpl.h"
+#include "cmmbearerprioritycache.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmcacheTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmCache* CCmmCache::NewL(
+        CCmManagerImpl* aCmManagerImpl,
+        CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_NEWL_ENTRY );
+
+    CCmmCache* self = CCmmCache::NewLC( aCmManagerImpl, aPlugins );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMCACHE_NEWL_EXIT );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmCache* CCmmCache::NewLC(
+        CCmManagerImpl* aCmManagerImpl,
+        CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_NEWLC_ENTRY );
+
+    CCmmCache* self = new( ELeave ) CCmmCache( aCmManagerImpl, aPlugins );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMCACHE_NEWLC_EXIT );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmCache::~CCmmCache()
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CCMMCACHE_ENTRY );
+
+    delete iBearerPriorityCache;
+    delete iListenerManager;
+    delete iInstanceMapping;
+
+    iConnMethodArray.ResetAndDestroy();
+    iDestinationArray.ResetAndDestroy();
+
+    iDeletedConnMethods.Close();
+    iUpdatedConnMethods.Close();
+    iUpdatedConnMethods2.Close(); // Does not own contents.
+    iUpdatedDestinations.Close();
+    iUpdatedDestinations2.Close(); // Does not own contents.
+
+    OstTraceFunctionExit0( CCMMCACHE_CCMMCACHE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmCache::CCmmCache(
+        CCmManagerImpl* aCmManagerImpl,
+        CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins )
+        :
+        iPlugins( aPlugins ),
+        iCmManagerImpl( aCmManagerImpl )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMCACHE_CCMMCACHE_ENTRY );
+
+    iListenerManager = NULL;
+    iInstanceMapping = NULL;
+    iTrans = NULL;
+    iBearerPriorityCache = NULL;
+    iCurrentTemporaryId = KTemporaryIdCounterStart;
+
+    iSnapTableId = 0;
+    iSnapMetadataTableId = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMMCACHE_CCMMCACHE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONSTRUCTL_ENTRY );
+
+    iTrans = iCmManagerImpl->GetTransactionHandler();
+
+    iBearerPriorityCache = CCmmBearerPriorityCache::NewL(
+            iTrans,
+            iCmManagerImpl->TableId( ECmmDbBearerPriorityRecord ) );
+    iListenerManager = CCmmListenerManager::NewL( this );
+    iInstanceMapping = CCmmInstanceMapping::NewL( *this );
+
+    // Create CommsDat listeners to detect changes to the database from external sources.
+    RArray<TUint32> tableIdArray;
+    CleanupClosePushL( tableIdArray );
+
+    iSnapTableId = iCmManagerImpl->TableId( ECmmDbSnapRecord );
+    iSnapMetadataTableId = iCmManagerImpl->TableId( ECmmDestMetadataRecord );
+
+    // Instancemapping needs notifications on following tables.
+    tableIdArray.Append( CommsDat::KCDTIdIAPRecord );
+    tableIdArray.Append( CommsDat::KCDTIdVPNServiceRecord );
+    tableIdArray.Append( iSnapTableId );
+    tableIdArray.Append( iSnapMetadataTableId );
+
+    // Destinations need notifications on following tables.
+    tableIdArray.Append( CommsDat::KCDTIdNetworkRecord );
+    tableIdArray.Append( CommsDat::KCDTIdAccessPointRecord );
+    // Destination metadata table was already added.
+
+    // Connection methods need notifications on following tables.
+    TInt pluginCount( iPlugins->Count() );
+    if ( pluginCount )
+        {
+        ( *iPlugins )[0]->GetGenericTableIdsToBeObservedL( tableIdArray );
+        for( TInt i = 0; i < pluginCount; i++ )
+            {
+            ( *iPlugins )[i]->GetBearerTableIdsToBeObservedL( tableIdArray );
+            }
+        }
+
+    for ( TInt i = 0; i < tableIdArray.Count(); i++ )
+        {
+        iListenerManager->AddListenerL( tableIdArray[i] );
+        }
+    CleanupStack::PopAndDestroy( &tableIdArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Opens a destination with given ID (if not already opened), then copies the
+// relevant data to the session instance. Checks that destination ID is valid.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::OpenDestinationL(
+        CCmmDestinationInstance& aDestinationInstance,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_OPENDESTINATIONL_ENTRY );
+
+    if ( !iInstanceMapping->ValidDestinationId( aDestinationId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    TInt index = FindDestinationFromCache( aDestinationId );
+    if ( index == KErrNotFound )
+        {
+        // Cache does not have a handle open to this destination. A new handle
+        // needs to be created first.
+        CCmmDestinationStruct* destination = CCmmDestinationStruct::NewLC(
+                this,
+                iTrans,
+                aDestinationId );
+
+        // Now that cache has a handle on this destination, copy the relevant
+        // data to the session instance.
+        destination->CreateDestinationInstanceL( aDestinationInstance );
+
+        iDestinationArray.AppendL( destination );
+        CleanupStack::Pop( destination );
+        }
+    else
+        {
+        // Cache already has a handle on this destination. Copy the relevant
+        // data to the session instance.
+        iDestinationArray[index]->CreateDestinationInstanceL( aDestinationInstance );
+        }
+
+    // Add list of currently contained connection methods.
+    iInstanceMapping->GetConnMethodsFromDestinationL(
+            aDestinationId,
+            aDestinationInstance.iConnMethodItemArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_OPENDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Refresh the data contained in aDestinationInstance. This means reloading
+// the data from database if necessary. After this call the contents of
+// aDestinationInstance will reflect the current state in the database. 
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::RefreshDestinationL( CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REFRESHDESTINATIONL_ENTRY );
+
+    TInt index = FindDestinationFromCache( aDestinationInstance.GetId() );
+    if ( index == KErrNotFound )
+        {
+        index = FindNotSavedDestinationFromCacheL( aDestinationInstance.GetDestinationNameL(), 0 );
+        if ( index == KErrNotFound )
+            {
+            User::Leave( KErrNotFound );
+            }
+        }
+
+    // If this destination is a newly created one that doesn't yet exist in
+    // database, just return silently.
+    if ( iDestinationArray[index]->GetStatus() == ECmmDestinationStatusNotSaved )
+        {
+        OstTraceFunctionExit0( CCMMCACHE_REFRESHDESTINATIONL_EXIT );
+        return;
+        }
+
+    iDestinationArray[index]->RefreshDestinationInstanceL( aDestinationInstance );
+
+    OstTraceFunctionExit0( DUP1_CCMMCACHE_REFRESHDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Create a new destination into cache (with name and ID) and copy the data
+// into session side handle.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CreateDestinationL(
+        CCmmDestinationInstance& aDestinationInstance,
+        const TDesC& aName,
+        const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CREATEDESTINATIONL_ENTRY );
+
+    // Create a new destination with given name.
+    CCmmDestinationStruct* destination = CCmmDestinationStruct::NewLC( this, iTrans, aName, aId );
+
+    destination->CreateDestinationInstanceL( aDestinationInstance );
+
+    iDestinationArray.AppendL( destination );
+    CleanupStack::Pop( destination );
+
+    OstTraceFunctionExit0( CCMMCACHE_CREATEDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Opens a connection method with given ID (if not already opened), then
+// creates and passes an instance of it to the caller.
+// If aDestinationInstance is not NULL, connection method is opened from
+// destination.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::OpenConnMethodL(
+        CCmmConnMethodInstance& aConnMethodInstance,
+        CCmmDestinationInstance* aDestinationInstance,
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_OPENCONNMETHODL_ENTRY );
+
+    // Check connection method ID.
+    TBool validAttributes( EFalse );
+    if ( !aDestinationInstance )
+        {
+        // Check connection method exists in database.
+        // Embedded destinations not included.
+        validAttributes = iInstanceMapping->ValidConnMethodId( aConnMethodId );
+        }
+    else
+        {
+        // Check connection method is inside the destination.
+        if ( aDestinationInstance->
+                ValidConnMethodIdInDestinationIncludeEmbedded( aConnMethodId ) )
+            {
+            // Check connection method (can be embedded destination too)
+            // exists in database.
+            if ( iInstanceMapping->ValidConnMethodId( aConnMethodId ) ||
+                    iInstanceMapping->ValidDestinationId( aConnMethodId ) )
+                {
+                validAttributes = ETrue;
+                }
+            }
+       }
+    if ( !validAttributes )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // Create the connection method instance.
+
+    // Check if connection method is already opened in cache.
+    TInt index = FindConnMethodFromCache( aConnMethodId );
+    if ( index != KErrNotFound )
+        {
+        // Update data from commsdat if necessary.
+        if ( iConnMethodArray[index]->GetRecordStatus() == ECmmRecordStatusExpired )
+            {
+            iConnMethodArray[index]->ReloadPluginDataIfNeededL();
+            // CopyDataL() will set the internal state of aConnMethodInstance.
+            }
+
+        // Already open in cache. Copy the connection method data to session
+        // instance.
+        // Will increase reference counter.
+        aConnMethodInstance.CopyDataL( iConnMethodArray[index] );
+        }
+    else
+        {
+        // Not yet open in cache, open now.
+        OpenConnectionMethodInstanceL( aConnMethodInstance, aConnMethodId );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_OPENCONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Refresh the data contained in aConnMethodInstance. This means reloading the
+// data from database if necessary. After this call the contents of
+// aConnMethodInstance will reflect the current state in the database. 
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::RefreshConnMethodL( CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REFRESHCONNMETHODL_ENTRY );
+
+    // If embedded destination --> refresh through destination API.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        return;
+        }
+
+    TInt index = FindConnMethodFromCache( aConnMethodInstance.GetId() );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // If this connection method is a newly created one that doesn't yet exist
+    // in database, just return silently.
+    if ( iConnMethodArray[index]->GetStatus() == ECmmConnMethodStatusNotSaved )
+        {
+        OstTraceFunctionExit0( CCMMCACHE_REFRESHCONNMETHODL_EXIT );
+        return;
+        }
+
+    iConnMethodArray[index]->ReloadPluginDataIfNeededL();
+    if ( iConnMethodArray[index]->GetStatus() == ECmmConnMethodStatusValid
+            || iConnMethodArray[index]->GetStatus() == ECmmConnMethodStatusToBeDeleted )
+        {
+        iConnMethodArray[index]->GetPlugin()->GetPluginDataL( 
+                aConnMethodInstance.GetPluginDataInstance() );
+        }
+    // Internal state need to be set to the same state as after a successfull update.
+    aConnMethodInstance.UpdateSuccessful();
+
+    OstTraceFunctionExit0( DUP1_CCMMCACHE_REFRESHCONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Creates a new connection method (not embedded destinations) into database
+// with the given bearer type and optionally ID, then creates and passes an
+// instance of it to the caller.
+// If destination instance is provided (not NULL), connection method is
+// created in that destination.
+// If connection method ID is provided, it's availability is verified.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CreateConnMethodL(
+        CCmmConnMethodInstance& aConnMethodInstance,
+        CCmmDestinationInstance* aDestinationInstance,
+        const TUint32 aBearerType,
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CREATECONNMETHODL_ENTRY );
+
+    // Check that the bearer type is not embedded destination.
+    if ( aBearerType == KUidEmbeddedDestination )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint32 connMethodId( aConnMethodId );
+    if ( aConnMethodId )
+        {
+        // Check if a connection method with given ID exists (or is already
+        // created but not saved).
+        if ( iInstanceMapping->ValidConnMethodId( aConnMethodId ) ||
+                ConnMethodOpenWithId( aConnMethodId ) )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+    else
+        {
+        // Use a temporary ID until a real one is received from database.
+        connMethodId = NextFreeTemporaryId();
+        }
+
+
+    // Check bearer type support and create plugin instance.
+    CCmPluginBaseEng* plugin = NULL;
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == aBearerType )
+            {
+            TCmPluginInitParam pluginParams( Session() );
+            plugin = ( *iPlugins )[i]->CreateInstanceL( pluginParams );
+            CleanupStack::PushL( plugin );
+            plugin->CreateNewL( aConnMethodId ); // Use aConnMethodId here, so ID is either a real ID or 0.
+            break;
+            }
+        }
+    if ( !plugin )
+        {
+        User::Leave( KErrArgument );
+        }
+
+
+    // Store the connection method into cache.
+    // Use connMethodId here, so ID is either a real ID or a temporary ID.
+    CCmmConnMethodStruct* connMethodStruct = CCmmConnMethodStruct::NewL( connMethodId );
+    connMethodStruct->SetPlugin( plugin, aBearerType, ECmmConnMethodStatusNotSaved );
+    CleanupStack::Pop( plugin );
+    CleanupStack::PushL( connMethodStruct );
+    iConnMethodArray.AppendL( connMethodStruct );
+    CleanupStack::Pop( connMethodStruct );
+
+    // Copy the connection method data to session instance.
+    aConnMethodInstance.CopyDataL( connMethodStruct ); // Will increase reference counter.
+
+
+    if ( aDestinationInstance )
+        {
+        // Add connection method to destination.
+        aDestinationInstance->AddConnMethodL( aConnMethodInstance );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CREATECONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Creates a new connection method into cache as a copy of an existing
+// connection method (exists in cache, not necessarily in database), and opens
+// a client side handle to it. The new connection method will get a new ID when
+// updated to database.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CreateCopyOfConnMethodL(
+        CCmmConnMethodInstance& aNewConnMethodInstance,
+        CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CREATECOPYOFCONNMETHODL_ENTRY );
+
+    // Check bearer type support and create plugin instance.
+    TInt index = FindConnMethodFromCache( aConnMethodInstance.GetId() );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( index );
+        }
+
+    CCmPluginBaseEng* plugin = iConnMethodArray[index]->GetPlugin();
+    if ( !plugin )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    CCmPluginBaseEng* pluginCopy =
+            plugin->CreateCopyL( aConnMethodInstance.GetPluginDataInstance() );
+    CleanupStack::PushL( pluginCopy );
+
+    // Store the connection method into cache.
+    CCmmConnMethodStruct* connMethodStruct =
+            CCmmConnMethodStruct::NewL( NextFreeTemporaryId() );
+    connMethodStruct->SetPlugin(
+            pluginCopy,
+            aConnMethodInstance.GetBearerType(),
+            ECmmConnMethodStatusNotSaved );
+    CleanupStack::Pop( pluginCopy );
+    CleanupStack::PushL( connMethodStruct );
+    iConnMethodArray.AppendL( connMethodStruct );
+    CleanupStack::Pop( connMethodStruct );
+
+    // Copy the connection method data to session instance.
+    aNewConnMethodInstance.CopyDataL( connMethodStruct ); // Will increase reference counter.
+
+    OstTraceFunctionExit0( CCMMCACHE_CREATECOPYOFCONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Reloads a destination record if needed and copies the latest version to
+// the session instance given as parameter.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::LoadDestinationRecordL(
+        CCmmDestinationInstance& aDestinationInstance,
+        TCmmDbRecords aDestRecordType )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_LOADDESTINATIONRECORDL_ENTRY );
+
+    TUint32 id = aDestinationInstance.GetId();
+    // If ID is not in the valid range, it means the destination is a newly
+    // created one, and doesn't yet exist in database. Thus, record data exists
+    // only in session side and can't be loaded from cache. So this is an error.
+    if ( id >= KTemporaryIdCounterStart )
+        {
+        User::Leave( KErrCorrupt );
+        }
+    TInt index = FindDestinationFromCache( id );
+    if ( index < 0 )
+        {
+        User::Leave( index );
+        }
+
+    iDestinationArray[index]->LoadRecordL( aDestinationInstance, aDestRecordType );
+
+    OstTraceFunctionExit0( CCMMCACHE_LOADDESTINATIONRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Saves the modifications in aDestinationInstance into the database. Also all
+// connection methods inside this destination are updated (including any
+// embedded destination).
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::UpdateDestinationL( CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_UPDATEDESTINATIONL_ENTRY );
+
+    // Arrays to temporarily store information of updated destinations and
+    // connection methods. Used to update status and ID information after
+    // successful commit to database.
+    if ( iTrans->GetReferenceCount() == 0 )
+        {
+        iDeletedConnMethods.Reset();
+        iUpdatedConnMethods.Reset();
+        iUpdatedConnMethods2.Reset();
+        iUpdatedDestinations.Reset();
+        iUpdatedDestinations2.Reset();
+        }
+
+    TInt index = FindDestinationFromCache( aDestinationInstance.GetId() );
+    if ( index < 0 )
+        {
+        User::Leave( index );
+        }
+
+    iTrans->OpenTransactionLC();
+
+    // Check that the connection methods marked for deletion can be deleted.
+    for ( TInt i = 0; i < aDestinationInstance.iConnMethodsToBeDeleted.Count(); i++ )
+        {
+        TUint32 id = aDestinationInstance.iConnMethodsToBeDeleted[i];
+
+        // Remove connection method from delete list if ID is not valid or if
+        // referenced from any other destination (in database or in any other
+        // client-side destination handles).
+        if ( !iInstanceMapping->ValidConnMethodId( id ) ||
+                iInstanceMapping->ConnMethodInOtherDestination(
+                        id,
+                        aDestinationInstance.GetId() ) ||
+                aDestinationInstance.ConnMethodInOtherDestinationInSession( id, 0 ) )
+            {
+            aDestinationInstance.iConnMethodsToBeDeleted.Remove( i );
+            i--; // Adjust array index counter.
+            }
+        else if ( iInstanceMapping->ConnMethodPointedToByVirtualIap( id ) )
+            {
+            aDestinationInstance.iConnMethodsToBeDeleted.Remove( i );
+            User::Leave( KErrLocked );
+            }
+        else if ( CheckIfCmConnected( id ) )
+            {
+            User::Leave( KErrInUse );
+            }
+        }
+    // Delete connection methods marked for deletion.
+    for ( TInt i = 0; i < aDestinationInstance.iConnMethodsToBeDeleted.Count(); i++ )
+        {
+        DeleteConnMethodAsPartOfDestinationUpdateL(
+                aDestinationInstance.iConnMethodsToBeDeleted[i] );
+        }
+
+    // Update the connection methods inside this destination.
+    for ( TInt i = 0; i < aDestinationInstance.iConnMethodItemArray.Count(); i++ )
+        {
+        if ( aDestinationInstance.iConnMethodItemArray[i].IsEmbedded() )
+            {
+            // Embedded destination.
+
+            //TODO, Maybe check other restrictions on embedded destination.
+            // - Only one embedded destination per destination. Check.
+            // - No embedded destinations in embedded destination. Check.
+
+            TUint32 id( aDestinationInstance.iConnMethodItemArray[i].iId );
+            CCmmDestinationInstance* destinationInstance =
+                    aDestinationInstance.FindDestinationInstanceFromSessionById( id );
+
+            if ( destinationInstance )
+                {
+                // Client has a handle open to this destination, update it.
+                destinationInstance->UpdateL();
+                }
+            else
+                {
+                // TODO: Or, should we update the embedded destination if the
+                // client has an open handle to any of the embedded
+                // destinations connection methods.
+                //
+                // Skip update since client doesn't have an open handle to this
+                // destination.
+                if ( id >= KTemporaryIdCounterStart ||
+                        !iInstanceMapping->ValidDestinationId( id ) )
+                    {
+                    // Remove destination item from array if:
+                    // - New destination, but client has already closed the handle for it.
+                    // - Destination ID was valid before, but it does not exist anymore.
+                    aDestinationInstance.iConnMethodItemArray.Remove( i );
+                    i--; // Adjust array index counter.
+                    }
+                }
+            }
+        else
+            {
+            TBool temporaryConnMethodInstance( EFalse );
+            TBool connMethodProtectionMustBeSet( EFalse );
+            TBool cmProtected( EFalse );
+
+            TUint32 id( aDestinationInstance.iConnMethodItemArray[i].iId );
+            CCmmConnMethodInstance* connMethodInstance =
+                    aDestinationInstance.FindConnMethodInstanceFromSessionById( id );
+
+            if ( !connMethodInstance )
+                {
+                // Remove connection method item from the array if it is a new
+                // connection method but client has already closed the handle
+                // for it, or the connection method ID was valid before but
+                // does not exist anymore.
+                if ( id >= KTemporaryIdCounterStart || !iInstanceMapping->ValidConnMethodId( id ) )
+                    {
+                    aDestinationInstance.iConnMethodItemArray.Remove( i );
+                    i--; // Adjust array index counter.
+                    continue; // Jump to next connection method.
+                    }
+                }
+
+            if ( aDestinationInstance.ProtectionChanged() )
+                {
+                // Check if the connection method protection level needs to be set.
+                switch ( aDestinationInstance.CurrentProtectionLevelL() )
+                    {
+                    case CMManager::EProtLevel0:
+                    case CMManager::EProtLevel2:
+                        {
+                        if ( aDestinationInstance.LastProtectionLevel() ==
+                                CMManager::EProtLevel1 ||
+                                aDestinationInstance.LastProtectionLevel() ==
+                                CMManager::EProtLevel3 )
+                            {
+                            connMethodProtectionMustBeSet = ETrue;
+                            cmProtected = EFalse;
+                            }
+                        }
+                        break;
+                    case CMManager::EProtLevel1:
+                    case CMManager::EProtLevel3:
+                        {
+                        connMethodProtectionMustBeSet = ETrue;
+                        cmProtected = ETrue;
+                        }
+                        break;
+                    default:
+                        break;
+                    }
+                }
+
+            if ( connMethodProtectionMustBeSet && !connMethodInstance )
+                {
+                // Client doesn't have an open handle to this connection method,
+                // but it still needs to be updated because the destination's
+                // protection level has been changed in such a way that
+                // requires a change in all contained connection methods also.
+                temporaryConnMethodInstance = ETrue;
+                connMethodInstance = CCmmConnMethodInstance::NewLC( NULL, this );
+                OpenConnMethodL( *connMethodInstance, NULL, id );
+
+                // Read current protection level.
+                TBool current = connMethodInstance->GetBoolAttributeL( CMManager::ECmProtected );
+                if ( cmProtected == current )
+                    {
+                    // If the connection method already has the correct
+                    // protection setting, skip the unnecessary update.
+                    connMethodProtectionMustBeSet = EFalse;
+                    temporaryConnMethodInstance = EFalse;
+                    CleanupStack::PopAndDestroy( connMethodInstance );
+                    connMethodInstance = NULL;
+                    }
+                }
+
+            // Update the connection method.
+            if ( connMethodInstance )
+                {
+                if ( connMethodProtectionMustBeSet )
+                    {
+                    connMethodInstance->SetBoolAttributeL( CMManager::ECmProtected, cmProtected );
+                    }
+                connMethodInstance->UpdateL( temporaryConnMethodInstance );
+                }
+
+            // Cleanup connection method handle, if it was temporary.
+            if ( temporaryConnMethodInstance )
+                {
+                CleanupStack::PopAndDestroy( connMethodInstance );
+                }
+            connMethodInstance = NULL;
+            }
+        }
+    // All connection methods requiring update in the destination should have
+    // been updated to database now.
+
+    iDestinationArray[index]->UpdateL( aDestinationInstance, this );
+    iTrans->CommitTransactionL();
+
+    TCmmIdStruct idStruct( iDestinationArray[index]->GetRealId(), 0 );
+    if ( aDestinationInstance.GetId() >= KTemporaryIdCounterStart )
+        {
+        idStruct.iTemporaryId = aDestinationInstance.GetId();
+        }
+    iUpdatedDestinations.AppendL( idStruct );
+    iUpdatedDestinations2.AppendL( &aDestinationInstance );
+
+    // Check transaction handler reference count.
+    if ( iTrans->GetReferenceCount() == 0 )
+        {
+        // Successful commit to database. Refresh instance mapping and all
+        // necessary status information.
+        for ( TInt i = 0; i < iUpdatedConnMethods.Count(); i++ )
+            {
+            aDestinationInstance.RefreshHandlesForAllSessions( iUpdatedConnMethods[i] );
+            }
+        for ( TInt i = 0; i < iUpdatedConnMethods2.Count(); i++ )
+            {
+            iUpdatedConnMethods2[i]->UpdateSuccessful();
+
+            TInt cacheIndex = FindConnMethodFromCache( iUpdatedConnMethods2[i]->GetId() );
+            if ( cacheIndex >= 0 )
+                {
+                iConnMethodArray[cacheIndex]->UpdateSuccessful();
+                }
+            }
+        for ( TInt i = 0; i < iDeletedConnMethods.Count(); i++ )
+            {
+            TInt cacheIndex = FindConnMethodFromCache( iDeletedConnMethods[i].iRealId );
+            if ( cacheIndex >= 0 )
+                {
+                aDestinationInstance.RefreshHandlesForAllSessions( iDeletedConnMethods[i] );
+                iConnMethodArray[cacheIndex]->SetStatus( ECmmConnMethodStatusToBeDeleted );
+                iInstanceMapping->AddConnMethodToDeletedListL( iDeletedConnMethods[i].iRealId );
+                }
+            }
+        for ( TInt i = 0; i < iUpdatedDestinations.Count(); i++ )
+            {
+            aDestinationInstance.RefreshHandlesForAllSessions( iUpdatedDestinations[i] );
+            }
+        for ( TInt i = 0; i < iUpdatedDestinations2.Count(); i++ )
+            {
+            iUpdatedDestinations2[i]->UpdateSuccessful();
+
+            TInt cacheIndex = FindDestinationFromCache( iUpdatedDestinations2[i]->GetId() );
+            if ( cacheIndex >= 0 )
+                {
+                iDestinationArray[cacheIndex]->UpdateSuccessful();
+                }
+            }
+        iDeletedConnMethods.Reset();
+        iUpdatedConnMethods.Reset();
+        iUpdatedConnMethods2.Reset();
+        iUpdatedDestinations.Reset();
+        iUpdatedDestinations2.Reset();
+
+        iInstanceMapping->RefreshL();
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_UPDATEDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Saves the modifications in aConnMethodInstance into database.
+// The second attribute aTemporaryHandle must be true if the connection method
+// instance is only a temporary one created for the duration of this update
+// process only.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::UpdateConnMethodL(
+        CCmmConnMethodInstance& aConnMethodInstance,
+        TBool aTemporaryHandle )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_UPDATECONNMETHODL_ENTRY );
+
+    // Embedded destinatios cannot be updated as connection methods.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // Find connection method from cache.
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+    TInt index = FindConnMethodFromCache( connMethodId );
+    if ( index < 0 )
+        {
+        // Should never end up here.
+        User::Leave( index );
+        }
+
+    iTrans->OpenTransactionLC();
+    iConnMethodArray[index]->GetPlugin()->UpdateL( aConnMethodInstance.GetPluginDataInstance() );
+    iTrans->CommitTransactionL();
+
+    TCmmIdStruct idStruct( aConnMethodInstance.GetPluginDataInstance()->iIapId, 0 );
+    if ( connMethodId >= KTemporaryIdCounterStart )
+        {
+        idStruct.iTemporaryId = connMethodId;
+        }
+
+    if ( iTrans->GetReferenceCount() == 0 )
+        {
+        // Writing to database is completed, refresh instance mapping and all
+        // necessary status information.
+        iInstanceMapping->RefreshL();
+        aConnMethodInstance.RefreshHandlesForAllSessions( idStruct );
+        aConnMethodInstance.UpdateSuccessful();
+        iConnMethodArray[index]->UpdateSuccessful();
+        }
+    else
+        {
+        // Update request came from destination update. Add connection method
+        // information to temporary arrays so it's status information can be
+        // updated after successful commit to database.
+        iUpdatedConnMethods.AppendL( idStruct );
+        if ( !aTemporaryHandle )
+            {
+            // A temporary handle will be destroyed after update, and so won't
+            // need any status updates after commit.
+            iUpdatedConnMethods2.AppendL( &aConnMethodInstance );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_UPDATECONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Deletes the destination refered by aDestinationInstance from the database.
+// In case other sessions have open handles to the same destination, the status
+// is updated to deleted state, but it is not yet removed from database.
+// (ID must be kept reserved in commsdat until all handles are closed). The
+// same is done for the connection methods inside this destination.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeleteDestinationL(
+        CCmmDestinationInstance& aDestinationInstance,
+        TBool aForced ) //TODO, comment on aForced param?
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DELETEDESTINATIONL_ENTRY );
+
+    TUint32 destinationId( aDestinationInstance.GetId() );
+
+    // Array to temporarily store deleted connection method IDs. Status
+    // information for these connection methods is updated after successful
+    // commit to database.
+    iDeletedConnMethods.Reset();
+
+    // Find destination from cache.
+    TInt index = FindDestinationFromCache( destinationId );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // If not forced, check if the destination is already marked to be deleted.
+    if ( !aForced && iDestinationArray[index]->GetStatus() == ECmmDestinationStatusToBeDeleted )
+        {
+        OstTraceFunctionExit0( CCMMCACHE_DELETEDESTINATIONL_EXIT );
+        return;
+        }
+
+    // Check if there are any additional handles open. If yes, can't delete
+    // detination from database just yet.
+    if ( iDestinationArray[index]->GetReferenceCount() <= 1 )
+        {
+        // No other client handles open to this destination.
+
+        // Get the connection methods in this destination, and then go through
+        // them removing those that can't be deleted.
+        RArray<TCmmConnMethodItem> connMethodArray;
+        CleanupClosePushL( connMethodArray );
+        if ( !aForced )
+            {
+            iInstanceMapping->GetConnMethodsFromDestinationL( destinationId, connMethodArray );
+            }
+        else
+            {
+            for ( TInt i = 0; i < aDestinationInstance.iConnMethodItemArray.Count() ; i++ )
+                {
+                connMethodArray.AppendL( aDestinationInstance.iConnMethodItemArray[i] );
+                }
+            }
+
+        // Remove embedded destination from list if found.
+        TInt count( connMethodArray.Count() );
+        if ( count )
+            {
+            if ( connMethodArray[count - 1].IsEmbedded() )
+                {
+                connMethodArray.Remove( count - 1 );
+                }
+            }
+        // Remove any connection method that belongs to any other destination.
+        for ( TInt i = 0; i < connMethodArray.Count(); i++ )
+            {
+            if ( iInstanceMapping->ConnMethodInOtherDestination(
+                    connMethodArray[i].iId,
+                    destinationId ) )
+                {
+                connMethodArray.Remove( i );
+                i--;
+                }
+            }
+        // Remove any connection method that has a virtual IAP pointing to it.
+        for ( TInt i = 0; i < connMethodArray.Count(); i++ )
+            {
+            if ( iInstanceMapping->ConnMethodPointedToByVirtualIap( connMethodArray[i].iId ) )
+                {
+                connMethodArray.Remove( i );
+                i--;
+                }
+            }
+
+        iTrans->OpenTransactionLC();
+
+        // Delete each connection method inside this destination.
+        for ( TInt i = 0; i < connMethodArray.Count(); i++ )
+            {
+            DeleteConnMethodAsPartOfDestinationDeleteL( connMethodArray[i].iId );
+            }
+
+        // Delete the destination.
+        iDestinationArray[index]->DeleteL();
+
+        iTrans->CommitTransactionL();
+        CleanupStack::PopAndDestroy( &connMethodArray );
+
+        for ( TInt i = 0; i < iDeletedConnMethods.Count(); i++ )
+            {
+            TInt index = FindConnMethodFromCache( iDeletedConnMethods[i].iRealId );
+            if ( index == KErrNotFound )
+                {
+                // No handles open to this deleted connection method, so it was
+                // removed from database. Remove it from instance mapping
+                // structures. Refreshing instance mapping would do the same,
+                // but more slowly.
+                iInstanceMapping->RemoveConnMethod( iDeletedConnMethods[i].iRealId );
+                }
+            else
+                {
+                // There is at least one handle open to this deleted connection
+                // method, so it still exists in database for now. Remove it
+                // from instance mapping structures and add it to the instance
+                // mapping's deleted list, so the connection method is ignored
+                // if refreshing structures from database. Also mark the
+                // connection method handle on cache side as 'to be deleted'.
+                //
+                // If the connection method is updated from another existing
+                // handle after this, the connection method is restored as
+                // uncategorized.
+                iInstanceMapping->AddConnMethodToDeletedListL( iDeletedConnMethods[i].iRealId );
+                aDestinationInstance.RefreshHandlesForAllSessions( iDeletedConnMethods[i] );
+                iConnMethodArray[index]->SetStatus( ECmmConnMethodStatusToBeDeleted );
+                }
+            }
+        iInstanceMapping->RemoveDestination( destinationId );
+        }
+    else
+        {
+        // There are additional client handles open to this destination. Mark
+        // the destination as 'to be deleted'. When the other handles are
+        // closed and reference count goes to 0, the destination will be
+        // removed from database.
+        // If the destination is updated from another existing handle after
+        // this, the destination is restored to normal.
+        iDestinationArray[index]->SetStatus( ECmmDestinationStatusToBeDeleted );
+        iInstanceMapping->AddDestinationToDeletedListL( destinationId );
+        }
+
+    // Update status for ALL related destination handles on client side to
+    // ECmmDestinationStatusChanged.
+    TCmmIdStruct idStruct( destinationId, 0 );
+    aDestinationInstance.RefreshHandlesForAllSessions( idStruct );
+
+    iDeletedConnMethods.Reset();
+    OstTraceFunctionExit0( DUP1_CCMMCACHE_DELETEDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Deletes a connection method as part of destination delete operation. It is
+// already checked that the connection method given as parameter can be deleted
+// and a transaction is already open.
+// If there are client side handles open to the connection method, the
+// connection method is marked as deleted, but the actual database removal will
+// be done after the last handle is closed. Updating a connection method marked
+// as deleted (through an already open handle) will restore it.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_ENTRY );
+
+    // Find connection method from cache side.
+    TInt index = FindConnMethodFromCache( aConnMethodId );
+    if ( index == KErrNotFound )
+        {
+        // There is no open handles to this connection method. Open a temporary
+        // handle and delete it.
+
+        // Find out the connection method bearer type.
+        TUint32 bearerType( 0 );
+        TInt err = iInstanceMapping->GetConnMethodBearerType( aConnMethodId, bearerType );
+        if ( err || bearerType == KUidEmbeddedDestination )
+            {
+            // If this is an embedded destination, or the bearer is not
+            // supported, skip. The connection method is simply removed from
+            // destination.
+            OstTraceFunctionExit0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
+            return;
+            }
+
+        // Check bearer type support, create plugin instance and delete the
+        // connection method.
+        CCmPluginBaseEng* plugin = NULL;
+        for ( TInt i = 0; i < iPlugins->Count(); i++ )
+            {
+            if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == bearerType )
+                {
+                TCmPluginInitParam pluginParams( Session() );
+                plugin = ( *iPlugins )[i]->CreateInstanceL( pluginParams );
+                CleanupStack::PushL( plugin );
+
+                // Transaction is already open.
+                plugin->LoadL( aConnMethodId );
+                plugin->DeleteL();
+
+                CleanupStack::Pop( plugin );
+                break;
+                }
+            }
+        if ( !plugin )
+            {
+            // Skip, if bearer is unsupported. Connection method is simply
+            // removed from destination.
+            OstTraceFunctionExit0( DUP1_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
+            return;
+            }
+        delete plugin;
+        plugin = NULL;
+        }
+    else
+        {
+        // If the connection method is already open in cache side, we can't
+        // delete it from database just yet. It will only be marked as 'to be
+        // deleted' after a successful commit. When the other handles are
+        // closed and reference count goes to 0, the connection method will be
+        // removed from database.
+
+        // Check destination status in cache.
+        switch ( iConnMethodArray[index]->GetStatus() )
+            {
+            case ECmmConnMethodStatusNotSaved:
+                {
+                // The connection methods that are deleted with the destination
+                // are retrieved through instance mapping, so there can't be
+                // any newly created unsaved connection methods among them.
+                User::Leave( KErrCorrupt );
+                }
+                break;
+            case ECmmConnMethodStatusValid:
+                // Proceed.
+                break;
+            case ECmmConnMethodStatusToBeDeleted:
+                // Connection method has already been deleted.
+                OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
+                return;
+            case ECmmConnMethodStatusChanged:
+            default:
+                {
+                ASSERT( 0 ); // Error, illegal status.
+                User::Leave( KErrCorrupt );
+                }
+                break;
+            }
+        }
+
+    // Add connection method ID to temporary array so it's status information
+    // can be updated after successful commit to database.
+    TCmmIdStruct idStruct( aConnMethodId, 0 );
+    iDeletedConnMethods.AppendL( idStruct );
+
+    OstTraceFunctionExit0( DUP3_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Deletes a connection method as part of destination update operation. It is
+// already checked that the connection method given as parameter can be deleted
+// and a transaction is already open.
+// If there are client side handles open to the connection method, the
+// connection method is marked as deleted, but the actual database removal will
+// be done after the last handle is closed. Updating a connection method marked
+// as deleted (through an already open handle) will restore it.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeleteConnMethodAsPartOfDestinationUpdateL(
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_ENTRY );
+
+    // Find connection method from cache side. If not found, open a temporary handle.
+    TInt index = FindConnMethodFromCache( aConnMethodId );
+    if ( index == KErrNotFound )
+        {
+        // There are no open handles to this connection method. Open a
+        // temporary handle and delete it.
+
+        // Find out the connection method bearer type.
+        TUint32 bearerType( 0 );
+        TInt err = iInstanceMapping->GetConnMethodBearerType( aConnMethodId, bearerType );
+        if ( err || bearerType == KUidEmbeddedDestination )
+            {
+            // If this is an embedded destination, or the bearer is not
+            // supported, skip. The connection method is simply removed from
+            // destination.
+            OstTraceFunctionExit0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
+            return;
+            }
+
+        // Check bearer type support, create plugin instance and delete the connection method.
+        CCmPluginBaseEng* plugin = NULL;
+        for ( TInt i = 0; i < iPlugins->Count(); i++ )
+            {
+            if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == bearerType )
+                {
+                TCmPluginInitParam pluginParams( Session() );
+                plugin = ( *iPlugins )[i]->CreateInstanceL( pluginParams );
+                CleanupStack::PushL( plugin );
+                iTrans->OpenTransactionLC();
+
+                plugin->LoadL( aConnMethodId );
+                plugin->DeleteL();
+
+                iTrans->CommitTransactionL();
+                CleanupStack::Pop( plugin );
+                break;
+                }
+            }
+        if ( !plugin )
+            {
+            // Skip, if bearer is unsupported. Connection method is simply
+            // removed from destination.
+            OstTraceFunctionExit0( DUP1_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
+            return;
+            }
+        delete plugin;
+        plugin = NULL;
+
+        // Destination update will refresh instance mapping anyway at the end,
+        // so no need to add this connection method to the temporary
+        // iDeletedConnMethods-array here.
+        }
+    else
+        {
+        // There is one or more open handles to this connection method. We
+        // can't delete it from database just yet. It will only be marked as
+        // 'to be deleted' after a successful commit. When the other handles
+        // are closed and reference count goes to 0, the connection method will
+        // be removed from database.
+
+        // Check connection method status.
+        switch ( iConnMethodArray[index]->GetStatus() )
+            {
+            case ECmmConnMethodStatusNotSaved:
+                {
+                // Destination update will not attempt to delete any non-valid
+                // connection methods.
+                User::Leave( KErrCorrupt );
+                }
+                break;
+            case ECmmConnMethodStatusValid:
+                // Proceed.
+                break;
+            case ECmmConnMethodStatusToBeDeleted:
+                // Connection method has already been deleted.
+                OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
+                return;
+            case ECmmConnMethodStatusChanged:
+            default:
+                {
+                ASSERT( 0 ); // Error, illegal status.
+                User::Leave( KErrCorrupt );
+                }
+                break;
+            }
+        // Add connection method ID to temporary array so it's status
+        // information can be updated after successful commit to database.
+        TCmmIdStruct idStruct( aConnMethodId, 0 );
+        iDeletedConnMethods.AppendL( idStruct );
+        }
+
+    OstTraceFunctionExit0( DUP3_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Basic connection method delete. Removes a connection method from any
+// destination it might belong to, and then deletes it.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeleteConnMethodL( CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMCACHE_DELETECONNMETHODL_ENTRY );
+
+    TUint32 cmId = aConnMethodInstance.GetId();
+
+    // Find connection method from cache.
+    TInt index = FindConnMethodFromCache( cmId );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // Check if the connection method is already deleted.
+    if ( iConnMethodArray[index]->GetStatus() == ECmmConnMethodStatusToBeDeleted )
+        {
+        OstTraceFunctionExit0( DUP1_CCMMCACHE_DELETECONNMETHODL_EXIT );
+        return;
+        }
+
+    // Check if there are any additional handles open. If yes, can't delete
+    // connection method from database just yet.
+    if ( iConnMethodArray[index]->GetReferenceCounter() <= 1 )
+        {
+        // No other client handles open to this connection method.
+
+        // Remove connection method from any destination in database and then delete it.
+        iTrans->OpenTransactionLC();
+        RemoveAllReferencesToConnMethodL( aConnMethodInstance );
+        iConnMethodArray[index]->GetPlugin()->DeleteL();
+        iTrans->CommitTransactionL();
+
+        // Update instance mapping to reflect the current database state, and
+        // notify any possible client handles for the changed destinations.
+        RArray<TUint32> changedDestinations;
+        iInstanceMapping->RemoveConnMethod( cmId, changedDestinations );
+        for ( TInt i = 0; i < changedDestinations.Count(); i++ )
+            {
+            TCmmIdStruct idStruct( changedDestinations[i], 0 );
+            aConnMethodInstance.RefreshHandlesForAllSessions( idStruct );
+            }
+        changedDestinations.Close();
+
+        // Set status for cache and client handles.
+        TUint32 newSecondaryId( NextFreeTemporaryId() );
+        aConnMethodInstance.DeleteSuccessful( newSecondaryId );
+        iConnMethodArray[index]->DeleteSuccessful( newSecondaryId );
+        }
+    else
+        {
+        // There are additional client handles open to this connection method.
+        // Mark the connection method as 'to be deleted' and remove it from any
+        // destinations in database. When the other handles are closed and
+        // reference count goes to 0, the connection method will be removed
+        // from database.
+        RemoveAllReferencesToConnMethodL( aConnMethodInstance );
+        iInstanceMapping->AddConnMethodToDeletedListL( cmId );
+        TCmmIdStruct idStruct( cmId, 0 );
+        aConnMethodInstance.RefreshHandlesForAllSessions( idStruct );
+        iConnMethodArray[index]->SetStatus( ECmmConnMethodStatusToBeDeleted );
+        }
+
+    OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID belongs to a valid existing destination. Attribute
+// aId needs to be in the current valid range (0x1001 - 0x10FF atm).
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationExistsWithId( const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHID_ENTRY );
+
+    TBool exists = iInstanceMapping->ValidDestinationId( aId );
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHID_EXIT );
+    return exists;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given name belongs to an existing destination.
+// If a destination ID is given, that destination is skipped.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationExistsWithNameL( const TDesC& aName, const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHNAMEL_ENTRY );
+
+    TBool found( EFalse );
+
+    // Check AccessPoint-table.
+    CommsDat::CCDAccessPointRecord* destApRecord = static_cast<CommsDat::CCDAccessPointRecord*>(
+            CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdAccessPointRecord ) );
+    CleanupStack::PushL( destApRecord );
+    destApRecord->iRecordName.SetL( aName );
+    if ( destApRecord->FindL( iTrans->Session() ) ) // Names should be unique.
+        {
+        if ( aDestinationId )
+            {
+            // Check the ID is different.
+            destApRecord->LoadL( iTrans->Session() );
+            if ( aDestinationId != destApRecord->iRecordTag )
+                {
+                found = ETrue;
+                }
+            }
+        else
+            {
+            found = ETrue;
+            }
+        }
+    CleanupStack::PopAndDestroy( destApRecord );
+
+    // Check also DataMobilitySelectionPolicy-table.
+    if ( !found )
+        {
+        CCDDataMobilitySelectionPolicyRecord* snapRecord =
+                new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                        iCmManagerImpl->TableId( ECmmDbSnapRecord ) );
+        CleanupStack::PushL( snapRecord );
+        snapRecord->iRecordName.SetL( aName );
+        if ( snapRecord->FindL( iTrans->Session() ) ) // Names should be unique.
+            {
+            if ( aDestinationId )
+                {
+                // Check the ID is different.
+                snapRecord->LoadL( iTrans->Session() );
+                if ( aDestinationId != snapRecord->iSNAP )
+                    {
+                    found = ETrue;
+                    }
+                }
+            else
+                {
+                found = ETrue;
+                }
+            }
+        CleanupStack::PopAndDestroy( snapRecord );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHNAMEL_EXIT );
+    return found;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID belongs to a destination that the cache has an open
+// handle on. This will include any destinations created by any client, that
+// are not yet saved to database.
+// With this check, we can prevent two clients from creating a new destination
+// with the same ID (The UpdateL() operation would fail for one of them anyway).
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationOpenWithId( const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONOPENWITHID_ENTRY );
+
+    TBool result( EFalse );
+    TInt index = FindDestinationFromCache( aId );
+    if ( index != KErrNotFound )
+        {
+        result = ETrue;
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONOPENWITHID_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given name belongs to any new unsaved destinations in the
+// cache. This includes any destinations created byany client, that are not
+// yet saved to database.
+// If a destination ID is provided, the search will exclude the relevant
+// destination.
+// With this check, we can prevent two clients from creating a new destination
+// with the same name (The UpdateL() operation would fail for one of them
+// anyway).
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::NotSavedDestinationOpenWithNameL(
+        const TDesC& aName,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_NOTSAVEDDESTINATIONOPENWITHNAMEL_ENTRY );
+
+    TBool res( EFalse );
+    TInt index = FindNotSavedDestinationFromCacheL( aName, aDestinationId );
+    if ( index != KErrNotFound )
+        {
+        res = ETrue;
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_NOTSAVEDDESTINATIONOPENWITHNAMEL_EXIT );
+    return res;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID belongs to a valid existing connection method.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::ConnMethodExistsWithId( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODEXISTSWITHID_ENTRY );
+
+    TBool exists = iInstanceMapping->ValidConnMethodId( aConnMethodId );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODEXISTSWITHID_EXIT );
+    return exists;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID belongs to a connection method that the cache has an
+// open handle on. This will include any connection methods created by any
+// client, that are not yet saved to database.
+// With this check, we can prevent two clients from creating a new connection
+// method with the same ID (The UpdateL() operation would fail for one of them
+// anyway).
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::ConnMethodOpenWithId( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODOPENWITHID_ENTRY );
+
+    TBool result( EFalse );
+    TInt index = FindConnMethodFromCache( aConnMethodId );
+    if ( index != KErrNotFound )
+        {
+        result = ETrue;
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODOPENWITHID_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Checks if there are any destinations with metadata localization
+// (ESnapMetadataDestinationIsLocalised) set to aValue. Also checks the
+// relevant metadata purpose (ESnapMetadataPurpose) values.
+// The destination connected to parameter aDestinationInstance is skipped.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationExistsWithMetadataLocalizedL(
+        CCmmDestinationInstance& aDestinationInstance,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATALOCALIZEDL_ENTRY );
+
+    TBool result( EFalse );
+
+    if ( aValue != CMManager::ENotLocalisedDest )
+        {
+        // Check there is no destination in database that already has the same
+        // localization metadata value. Also checks metadata purpose.
+        CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet =
+                new( ELeave )CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>(
+                        iCmManagerImpl->TableId( ECmmDestMetadataRecord ) );
+        CleanupStack::PushL( metaSet );
+        TRAP_IGNORE( metaSet->LoadL( iTrans->Session() ) );
+        for ( TInt i = 0; i < metaSet->iRecords.Count(); i++ )
+            {
+            TInt id = ( ( CCDSNAPMetadataRecord* )metaSet->iRecords[i] )->iSNAP;
+            TUint32 metadata = ( ( CCDSNAPMetadataRecord* )metaSet->iRecords[i] )->iMetadata;
+            TUint32 localizationValue =
+                    ( metadata & CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
+            TUint32 purposeValue = ( metadata & CMManager::ESnapMetadataPurpose ) >> 8;
+
+            if ( aDestinationInstance.GetId() != id )
+                {
+                if ( aValue == localizationValue )
+                    {
+                    result = ETrue;
+                    }
+                switch ( aValue )
+                    {
+                    case CMManager::ELocalisedDestInternet:
+                        {
+                        if ( purposeValue == CMManager::ESnapPurposeInternet ||
+                                ( metadata & CMManager::ESnapMetadataInternet ) )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ELocalisedDestWap:
+                        {
+                        if ( purposeValue == CMManager::ESnapPurposeOperator )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ELocalisedDestMMS:
+                        {
+                        if ( purposeValue == CMManager::ESnapPurposeMMS )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ELocalisedDestIntranet:
+                        {
+                        if ( purposeValue == CMManager::ESnapPurposeIntranet )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    default:
+                        break;
+                    }
+                }
+            }
+        CleanupStack::PopAndDestroy( metaSet );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATALOCALIZEDL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Checks if there are any destinations with metadata purpose
+// (ESnapMetadataPurpose) set to aValue. Also checks the relevant metadata
+// localization (ESnapMetadataDestinationIsLocalised) values.
+// The destination connected to parameter aDestinationInstance is skipped.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationExistsWithMetadataPurposeL(
+        CCmmDestinationInstance& aDestinationInstance,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATAPURPOSEL_ENTRY );
+
+    TBool result( EFalse );
+
+    if ( aValue != CMManager::ESnapPurposeUnknown )
+        {
+        // Check there is no destination in database that already has the same
+        // metadata purpose value. Also checks localization metadata.
+        CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet =
+                new( ELeave )CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>(
+                        iCmManagerImpl->TableId( ECmmDestMetadataRecord ) );
+        CleanupStack::PushL( metaSet );
+        TRAP_IGNORE( metaSet->LoadL( iTrans->Session() ) );
+        for ( TInt i = 0; i < metaSet->iRecords.Count(); i++ )
+            {
+            TInt id = ( ( CCDSNAPMetadataRecord* )metaSet->iRecords[i] )->iSNAP;
+            TUint32 metadata = ( ( CCDSNAPMetadataRecord* )metaSet->iRecords[i] )->iMetadata;
+            TUint32 localizationValue =
+                    ( metadata & CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
+            TUint32 purposeValue = ( metadata & CMManager::ESnapMetadataPurpose ) >> 8;
+
+            if ( aDestinationInstance.GetId() != id )
+                {
+                if ( aValue == purposeValue )
+                    {
+                    result = ETrue;
+                    }
+                switch ( aValue )
+                    {
+                    case CMManager::ESnapPurposeInternet:
+                        {
+                        if ( localizationValue == CMManager::ELocalisedDestInternet ||
+                                ( metadata & CMManager::ESnapMetadataInternet ) )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ESnapPurposeOperator:
+                        {
+                        if ( localizationValue == CMManager::ELocalisedDestWap )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ESnapPurposeMMS:
+                        {
+                        if ( localizationValue == CMManager::ELocalisedDestMMS )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    case CMManager::ESnapPurposeIntranet:
+                        {
+                        if ( localizationValue == CMManager::ELocalisedDestIntranet )
+                            {
+                            result = ETrue;
+                            }
+                        }
+                        break;
+                    default:
+                        break;
+                    }
+                }
+            }
+        CleanupStack::PopAndDestroy( metaSet );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATAPURPOSEL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the cache that a database table has changed. If the SNAP/IAP structure
+// has possibly changed, the cache will refresh that information immediately.
+// For other database tables, the tables are flagged and will be refreshed when
+// needed.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DbChangeDetectedL( const TUint32 aTableId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DBCHANGEDETECTED_ENTRY );
+
+    if ( aTableId == iSnapMetadataTableId )
+        {
+        for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+            {
+            iDestinationArray[i]->NotifyRecordChange( ECmmDestMetadataRecord );
+            }
+        }
+    else if ( aTableId == CommsDat::KCDTIdNetworkRecord )
+        {
+        // Affects destinations.
+        for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+            {
+            iDestinationArray[i]->NotifyRecordChange( ECmmDestNetworkRecord );
+            }
+        }
+    else if ( aTableId == CommsDat::KCDTIdAccessPointRecord )
+        {
+        // Affects destinations.
+        for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+            {
+            iDestinationArray[i]->NotifyRecordChange( ECmmDestApRecord );
+            }
+        }
+
+    // Notify Connection Methods about the table changes in CommsDat.
+    NotifyPluginsForTableChangesL( aTableId );
+
+    // Update instancemapping.
+    iInstanceMapping->RefreshL();
+
+    OstTraceFunctionExit0( CCMMCACHE_DBCHANGEDETECTED_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Informs all the loaded iaps if something related to their tables
+// changed in commsdat.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::NotifyPluginsForTableChangesL( const TUint32 aTableId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_NOTIFYPLUGINSFORTABLECHANGESL_ENTRY );
+
+    if ( iConnMethodArray.Count() )
+        {
+        RArray<TUint32> tableIdArray;
+        CleanupClosePushL( tableIdArray );
+
+        // Check if change concerns some table generic for all iaps
+        ( *iPlugins )[0]->GetGenericTableIdsToBeObservedL( tableIdArray );
+        TBool generic( EFalse );
+        for( TInt i = 0; i < tableIdArray.Count(); i++ )
+            {
+            if ( aTableId == tableIdArray[i] )
+                {
+                generic = ETrue;
+                break;
+                }
+            }
+
+        if ( generic )
+            {
+            // generic-->Notify all iaps
+            for( TInt i = 0; i < iConnMethodArray.Count(); i++ )
+                {
+                iConnMethodArray[i]->NotifyRecordChange( aTableId );
+                }
+            }
+        else
+            {
+            // Not generic: Check bearer specific tables
+            RArray<TUint32> affectedBearersArray;
+            CleanupClosePushL( affectedBearersArray );
+            for( TInt i = 0; i < iPlugins->Count(); i++ )
+                {
+                tableIdArray.Reset();
+                ( *iPlugins )[i]->GetBearerTableIdsToBeObservedL( tableIdArray );
+                TInt idCount = tableIdArray.Count();
+                for( TInt j = 0; j < idCount; j++ )
+                    {
+                    if ( aTableId == tableIdArray[j] )
+                        {
+                        // Save the bearer type id which is affected
+                        affectedBearersArray.AppendL(
+                                ( *iPlugins )[i]->GetBearerInfoIntL(
+                                        CMManager::ECmBearerType ) );
+                        }
+                    }
+                }
+
+            // Go through all the loaded iaps and notify all the iaps
+            // which have the same bearer type saved above
+            for( TInt i = 0; i < iConnMethodArray.Count(); i++ )
+                {
+                for( TInt j = 0; j < affectedBearersArray.Count(); j++ )
+                    {
+                    if ( iConnMethodArray[i]->GetBearerType() == affectedBearersArray[j] )
+                        {
+                        iConnMethodArray[i]->NotifyRecordChange( aTableId );
+                        break;
+                        }
+                    }
+                }
+            CleanupStack::PopAndDestroy( &affectedBearersArray );
+            }
+        CleanupStack::PopAndDestroy( &tableIdArray );
+        }
+    OstTraceFunctionExit0( CCMMCACHE_NOTIFYPLUGINSFORTABLECHANGESL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the cache that an error has occured with a database listener. Any
+// reads to this table need go through the database, since cache can't know if
+// it has up-to-date information.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DbChangeError( const TUint32 aTableId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DBCHANGEERROR_ENTRY );
+
+    (void)aTableId; //TODO
+    // Flag the table as: permanently not up-to-date
+
+    //TODO, How to do this?
+    // Implement some 'status locked' flags that are always checked before changing status back to 'loaded' after reading database?
+    // Or move record status info to CCmmCache-class?
+    // What about plugins?
+	// Or just ignore errors with notifiers?
+
+    // For now, just ignore errors.
+
+    OstTraceFunctionExit0( CCMMCACHE_DBCHANGEERROR_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the cache that a hadle to a destination was closed. The cache will
+// decrement the related reference counter and perform any cleanup if necessary.
+// This should be called automatically from the destructor of
+// CCmmDestinationInstance-class.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CloseDestination( CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CLOSEDESTINATION_ENTRY );
+
+    TInt index = FindDestinationFromCache( aDestinationInstance.GetId() );
+
+    if ( index >= 0 )
+        {
+        TInt remainingSessionInstances = iDestinationArray[index]->DestinationInstanceClosed();
+        if ( remainingSessionInstances <= 0)
+            {
+            // If status is 'to be deleted', then the last handle keeping this
+            // destination 'alive' was closed and it can now be deleted from
+            // database.
+            if ( iDestinationArray[index]->GetStatus() == ECmmDestinationStatusToBeDeleted )
+                {
+                // Delete the destination unless an active connection is using
+                // one of it's connection methods.
+                TRAP_IGNORE( DeleteDestinationForcedL( aDestinationInstance ) );
+                // Destination is now removed from database. Tell instance
+                // mapping to stop ignoring the related ID.
+                iInstanceMapping->RemoveDestinationFromDeletedList( aDestinationInstance.GetId() );
+                }
+
+            // No more references, no client has an open handle to this, delete it.
+            delete iDestinationArray[index];
+            iDestinationArray.Remove( index );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CLOSEDESTINATION_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the cache that a hadle to a connection method was closed. The cache
+// will decrement the related reference counter and perform any cleanup if
+// necessary.
+// This should be called automatically from the destructor of
+// CCmmConnMethodInstance-class.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CloseConnMethod( CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CLOSECONNMETHOD_ENTRY );
+
+    TInt index = FindConnMethodFromCache( aConnMethodInstance.GetId() );
+
+    if ( index >= 0 )
+        {
+        TInt remainingSessionInstances = iConnMethodArray[index]->ConnMethodInstanceClosed();
+        if ( remainingSessionInstances <= 0 )
+            {
+            // If status is 'to be deleted', then the last handle keeping this
+            // connection method 'alive' was closed and it can now be deleted
+            // from database.
+            if ( iConnMethodArray[index]->GetStatus() == ECmmConnMethodStatusToBeDeleted )
+                {
+                // Can't remove a connection method that is in use.
+                if ( !CheckIfCmConnected( aConnMethodInstance.GetId() ) )
+                    {
+                    // Can't leave here.
+                    TRAP_IGNORE( DeletePluginL( *( iConnMethodArray[index] ) ) );
+                    }
+
+                // Connection method is now removed from database. Tell
+                // instance mapping to stop ignoring the related ID.
+                iInstanceMapping->RemoveConnMethodFromDeletedList( aConnMethodInstance.GetId() );
+                }
+
+            // No more references, no client has an open handle to this, delete it.
+            delete iConnMethodArray[index];
+            iConnMethodArray.Remove( index );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CLOSECONNMETHOD_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Returns a reference to the CommsDat session.
+//-----------------------------------------------------------------------------
+//
+CommsDat::CMDBSession& CCmmCache::Session() const
+    {
+    // No traces.
+    return iTrans->Session();
+    }
+
+//-----------------------------------------------------------------------------
+// Finds out the bearer type and priority of the service type from given IAP
+// record. performs LoadL()-call on the provided IAP record.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::BearerInfoFromIapRecordL(
+        CommsDat::CCDIAPRecord* aIapRecord,
+        TUint32& aBearerType,
+        TUint& aBearerPriority ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_BEARERINFOFROMIAPRECORDL_ENTRY );
+
+    // Load the IAP record from IAP table. This is an optimization so that
+    // plugins don't have to do it every time the CanHandleIapIdL() is called.
+    aIapRecord->LoadL( Session() );
+    BearerPriorityFromIapRecordL( aIapRecord, aBearerPriority );
+    BearerTypeFromIapRecordL( aIapRecord, aBearerType );
+
+    OstTraceFunctionExit0( CCMMCACHE_BEARERINFOFROMIAPRECORDL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Finds out the priority of the service type in given IAP record.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::BearerPriorityFromIapRecordL(
+        CommsDat::CCDIAPRecord* aIapRecord,
+        TUint& aBearerPriority ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_BEARERPRIORITYFROMIAPRECORDL_ENTRY );
+
+    aBearerPriority = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+    if ( !aIapRecord->iServiceType.IsNull() )
+        {
+        aBearerPriority = iBearerPriorityCache->GetPriority( aIapRecord->iServiceType.GetL() );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_BEARERPRIORITYFROMIAPRECORDL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Finds out the bearer type of a connection method from given IAP record.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::BearerTypeFromIapRecordL(
+        CommsDat::CCDIAPRecord* aIapRecord,
+        TUint32& aBearerType ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_BEARERTYPEFROMIAPRECORDL_ENTRY );
+
+    TInt err( KErrNone );
+    TUint32 extLevel( 0 );
+    TBool canHandle( EFalse );
+
+    TInt foundIndex( KErrNotFound );
+
+    // Check which bearer handles the given IAP ID.
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        TRAP( err, canHandle = (*iPlugins)[i]->CanHandleIapIdL( aIapRecord ) );
+        if ( !err && canHandle )
+            {
+            TUint32 thisExtLevel = (*iPlugins)[i]->GetBearerInfoIntL( ECmExtensionLevel );
+            if ( extLevel < thisExtLevel )
+                {
+                extLevel = thisExtLevel;
+                foundIndex = i;
+                }
+            }
+        }
+    if ( foundIndex == KErrNotFound )
+        {
+        // No supporting plugin found.
+        User::Leave( KErrNotSupported );
+        }
+    aBearerType = (*iPlugins)[foundIndex]->GetBearerInfoIntL( CMManager::ECmBearerType );
+
+    OstTraceFunctionExit0( CCMMCACHE_BEARERTYPEFROMIAPRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Find and return a copy of a connection method item matching the given ID.
+// Returns KErrNotFound, if the connection method is not found.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmCache::GetConnMethodItem(
+        const TUint32 aConnMethodId,
+        TCmmConnMethodItem& aConnMethodItem ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNMETHODITEM_ENTRY );
+
+    TInt result = iInstanceMapping->GetConnMethodItem( aConnMethodId, aConnMethodItem );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNMETHODITEM_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// Returns all conenction method IDs. Unsupported connection methods are
+// included if aCheckBearerType is set to EFalse.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::GetAllConnMethodsL(
+        RArray<TUint32>& aConnMethodArray,
+        TBool aCheckBearerType ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETALLCONNMETHODSL_ENTRY );
+
+    iInstanceMapping->GetAllConnMethodsL( aConnMethodArray, aCheckBearerType );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETALLCONNMETHODSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Returns the number of destinations the provided connection method belongs to.
+//-----------------------------------------------------------------------------
+//
+TInt CCmmCache::DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODREFERENCECOUNT_ENTRY );
+
+    TInt count = iInstanceMapping->DestinationsContainingConnMethod( aConnMethodId );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODREFERENCECOUNT_EXIT );
+    return count;
+    }
+
+//-----------------------------------------------------------------------------
+// Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
+//-----------------------------------------------------------------------------
+//
+TUint32 CCmmCache::EasyWlanIdL() const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_EASYWLANIDL_ENTRY );
+
+    TUint32 easyWlanId = iInstanceMapping->EasyWlanIdL();
+
+    OstTraceFunctionExit0( CCMMCACHE_EASYWLANIDL_EXIT );
+    return easyWlanId;
+    }
+
+//-----------------------------------------------------------------------------
+// Check if WLAN is supported on phone.
+//-----------------------------------------------------------------------------
+//
+TBool CCmmCache::WlanSupported() const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_WLANSUPPORTED_ENTRY );
+
+    TBool supported = iCmManagerImpl->WlanSupported();
+
+    OstTraceFunctionExit0( CCMMCACHE_WLANSUPPORTED_EXIT );
+    return supported;
+    }
+
+//-----------------------------------------------------------------------------
+// Find out the internet destination ID. Set to 0 if not found.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::InternetDestinationIdL( TUint& aInternetDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_INTERNETDESTINATIONIDL_ENTRY );
+
+    iInstanceMapping->InternetDestinationIdL( aInternetDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_INTERNETDESTINATIONIDL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Return the number of destinations in database.
+//-----------------------------------------------------------------------------
+//
+TInt CCmmCache::GetDestinationCount() const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETDESTINATIONCOUNT_ENTRY );
+
+    TInt count = iInstanceMapping->GetDestinationCount();
+
+    OstTraceFunctionExit0( CCMMCACHE_GETDESTINATIONCOUNT_EXIT );
+    return count;
+    }
+
+//-----------------------------------------------------------------------------
+// Return an array containing all destination IDs.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::GetDestinationsL( RArray<TUint32>& aDestinationArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETDESTINATIONSL_ENTRY );
+
+    iInstanceMapping->GetDestinationsL( aDestinationArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETDESTINATIONSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Returns all the valid connection methods under given destination.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::GetConnMethodsFromDestinationL(
+        const TUint32 aDestinationId,
+        RArray<TCmmConnMethodItem>& aConnMethodArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNMETHODSFROMDESTINATIONL_ENTRY );
+
+    iInstanceMapping->GetConnMethodsFromDestinationL(
+            aDestinationId, aConnMethodArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNMETHODSFROMDESTINATIONL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Copies the bearer priority array's contents to aArray.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::CopyBearerPriorityArrayL( RPointerArray<CCmmBearerPriority>& aArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_COPYBEARERPRIORITYARRAYL_ENTRY );
+
+    iBearerPriorityCache->CopyL( aArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_COPYBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Updates the bearer priority array with the contents of aArray.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::UpdateBearerPriorityArrayL( const RPointerArray<CCmmBearerPriority>& aArray )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_UPDATEBEARERPRIORITYARRAYL_ENTRY );
+
+    iBearerPriorityCache->UpdateL( aArray );
+
+    OstTraceFunctionExit0( CCMMCACHE_UPDATEBEARERPRIORITYARRAYL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Check from database if the given connection method belongs to any other
+// destination than the one provided.
+//-----------------------------------------------------------------------------
+//
+TBool CCmmCache::ConnMethodInOtherDestination(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODINOTHERDESTINATION_ENTRY );
+
+    TBool cmInOtherDestination = iInstanceMapping->
+            ConnMethodInOtherDestination( aConnMethodId, aDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODINOTHERDESTINATION_EXIT );
+    return cmInOtherDestination;
+    }
+
+//-----------------------------------------------------------------------------
+// Get the next free temporary ID.
+//-----------------------------------------------------------------------------
+//
+TUint32 CCmmCache::NextFreeTemporaryId()
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_NEXTFREETEMPORARYID_ENTRY );
+
+    // Zero is not a valid ID.
+    if ( iCurrentTemporaryId == KMaxTUint32 )
+        {
+        //TODO, add flag to indicate a rollover has occured. after that need to check if temp ID is free before giving it out.
+
+        iCurrentTemporaryId = KTemporaryIdCounterStart;
+        }
+
+    iCurrentTemporaryId++;
+
+    OstTraceFunctionExit0( CCMMCACHE_NEXTFREETEMPORARYID_EXIT );
+    return iCurrentTemporaryId;
+    }
+
+//-----------------------------------------------------------------------------
+// Find an open destination matching the give ID from cache.
+// Returns either a valid array index or KErrNotFound.
+//-----------------------------------------------------------------------------
+//
+TInt CCmmCache::FindDestinationFromCache( const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_FINDDESTINATIONFROMCACHE_ENTRY );
+
+    TInt result( KErrNotFound );
+
+    // Skip if ID is 0.
+    if ( aId )
+        {
+        for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+            {
+            if ( aId == iDestinationArray[i]->GetId() )
+                {
+                result = i;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_FINDDESTINATIONFROMCACHE_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// Find an open destination matching the given name from cache. If a destination
+// ID is provided, the search will exclude the relevant destination.
+// Returns either a valid array index or KErrNotFound.
+//-----------------------------------------------------------------------------
+//
+TInt CCmmCache::FindNotSavedDestinationFromCacheL(
+        const TDesC& aName,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_FINDNOTSAVEDDESTINATIONFROMCACHEL_ENTRY );
+
+    TInt result( KErrNotFound );
+
+    // Go through destination array.
+    for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+        {
+        // Only check new destinations that are not yet in database.
+        if ( iDestinationArray[i]->GetStatus() == ECmmDestinationStatusNotSaved )
+            {
+            if ( aDestinationId )
+                {
+                if ( aDestinationId != iDestinationArray[i]->GetId() )
+                    {
+                    if ( !aName.Compare( iDestinationArray[i]->GetDestinationNameL() ) )
+                        {
+                        result = i;
+                        break;
+                        }
+                    }
+                }
+            else
+                {
+                if ( !aName.Compare( iDestinationArray[i]->GetDestinationNameL() ) )
+                    {
+                    result = i;
+                    break;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_FINDNOTSAVEDDESTINATIONFROMCACHEL_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// Find an open connection method matching the given ID from cache.
+// Returns either a valid array index or KErrNotFound.
+//-----------------------------------------------------------------------------
+//
+TInt CCmmCache::FindConnMethodFromCache( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_FINDCONNMETHODFROMCACHE_ENTRY );
+
+    TInt result( KErrNotFound );
+
+    // Skip if ID is 0.
+    if ( aConnMethodId )
+        {
+        for ( TInt i = 0; i < iConnMethodArray.Count(); i++ )
+            {
+            if ( aConnMethodId == iConnMethodArray[i]->GetId() )
+                {
+                result = i;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_FINDCONNMETHODFROMCACHE_EXIT );
+    return result;
+    }
+
+//-----------------------------------------------------------------------------
+// Loads and initializes a connection method instance.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::OpenConnectionMethodInstanceL(
+        CCmmConnMethodInstance& aConnMethodInstance,
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_OPENCONNECTIONMETHODINSTANCEL_ENTRY );
+
+    // Find out the connection method bearer type.
+    TUint32 bearerType( 0 );
+    User::LeaveIfError( iInstanceMapping->
+            GetConnMethodBearerType( aConnMethodId, bearerType ) );
+
+    // Check bearer type support and create plugin instance.
+    CCmPluginBaseEng* plugin = NULL;
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL(
+                CMManager::ECmBearerType ) == bearerType )
+            {
+            TCmPluginInitParam pluginParams( Session() );
+            plugin = ( *iPlugins )[i]->CreateInstanceL( pluginParams );
+            CleanupStack::PushL( plugin );
+            plugin->LoadL( aConnMethodId );
+            break;
+            }
+        }
+    if ( !plugin )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // Store the connection method into cache.
+    CCmmConnMethodStruct* connMethodStruct = CCmmConnMethodStruct::NewL( aConnMethodId );
+    connMethodStruct->SetPlugin( plugin, bearerType, ECmmConnMethodStatusValid );
+    CleanupStack::Pop( plugin );
+    CleanupStack::PushL( connMethodStruct );
+    iConnMethodArray.AppendL( connMethodStruct );
+    CleanupStack::Pop( connMethodStruct );
+
+    // Copy the connection method data to session instance.
+    aConnMethodInstance.CopyDataL( connMethodStruct ); // Will increase reference counter.
+
+    OstTraceFunctionExit0( CCMMCACHE_OPENCONNECTIONMETHODINSTANCEL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetConnectionMethodInfoIntL
+//-----------------------------------------------------------------------------
+//
+TUint32 CCmmCache::GetConnectionMethodInfoIntL(
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+
+    CCmmConnMethodInstance* cmInstance = CCmmConnMethodInstance::NewLC( NULL, this );
+
+    // Check if connection method is already opened in cache.
+    TInt index = FindConnMethodFromCache( aCmId );
+    if ( index != KErrNotFound )
+        {
+        // Already open in cache. Copy the connection method to session instance.
+        // Will increase reference counter.
+        cmInstance->CopyDataL( iConnMethodArray[index] );
+        }
+    else
+        {
+        OpenConnectionMethodInstanceL( *cmInstance, aCmId );
+        }
+
+    retVal = cmInstance->GetIntAttributeL( aAttribute );
+
+    CleanupStack::PopAndDestroy( cmInstance );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOINTL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetConnectionMethodInfoBoolL
+//-----------------------------------------------------------------------------
+//
+TBool CCmmCache::GetConnectionMethodInfoBoolL(
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+
+    CCmmConnMethodInstance* cmInstance = CCmmConnMethodInstance::NewLC( NULL, this );
+
+    // Check if connection method is already opened in cache.
+    TInt index = FindConnMethodFromCache( aCmId );
+    if ( index != KErrNotFound )
+        {
+        // Already open in cache. Copy the connection method to session instance.
+        // Will increase reference counter.
+        cmInstance->CopyDataL( iConnMethodArray[index] );
+        }
+    else
+        {
+        OpenConnectionMethodInstanceL( *cmInstance, aCmId );
+        }
+
+    retVal = cmInstance->GetBoolAttributeL( aAttribute );
+
+    CleanupStack::PopAndDestroy( cmInstance );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetConnectionMethodInfoStringL
+//-----------------------------------------------------------------------------
+//
+HBufC* CCmmCache::GetConnectionMethodInfoStringL(
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRINGL_ENTRY );
+
+    HBufC* retVal( NULL );
+
+    CCmmConnMethodInstance* cmInstance = CCmmConnMethodInstance::NewLC( NULL, this );
+
+    // Check if connection method is already opened in cache.
+    TInt index = FindConnMethodFromCache( aCmId );
+    if ( index != KErrNotFound )
+        {
+        // Already open in cache. Copy the connection method to session instance.
+        // Will increase reference counter.
+        cmInstance->CopyDataL( iConnMethodArray[index] );
+        }
+    else
+        {
+        OpenConnectionMethodInstanceL( *cmInstance, aCmId );
+        }
+
+    retVal = cmInstance->GetStringAttributeL( aAttribute );
+
+    CleanupStack::PopAndDestroy( cmInstance );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRINGL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetConnectionMethodInfoString8L
+//-----------------------------------------------------------------------------
+//
+HBufC8* CCmmCache::GetConnectionMethodInfoString8L(
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRING8L_ENTRY );
+
+    HBufC8* retVal( NULL );
+
+    CCmmConnMethodInstance* cmInstance = CCmmConnMethodInstance::NewLC( NULL, this );
+
+    // Check if connection method is already opened in cache.
+    TInt index = FindConnMethodFromCache( aCmId );
+    if ( index != KErrNotFound )
+        {
+        // Already open in cache. Copy the connection method to session instance.
+        cmInstance->CopyDataL( iConnMethodArray[index] ); // Will increase reference counter.
+        }
+    else
+        {
+        OpenConnectionMethodInstanceL( *cmInstance, aCmId );
+        }
+
+    retVal = cmInstance->GetString8AttributeL( aAttribute );
+
+    CleanupStack::PopAndDestroy( cmInstance );
+
+    OstTraceFunctionExit0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRING8L_EXIT );
+    return retVal;
+    }
+
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetBearerInfoIntL
+//-----------------------------------------------------------------------------
+//
+TUint32 CCmmCache::GetBearerInfoIntL(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 retVal( 0 );
+    TBool found( EFalse );
+
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == aBearerType )
+            {
+            found = ETrue;
+            retVal = ( *iPlugins )[i]->GetBearerInfoIntL( aAttribute );
+            break;
+            }
+        }
+    if ( !found )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_GETBEARERINFOINTL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetBearerInfoBoolL
+//-----------------------------------------------------------------------------
+//
+TBool CCmmCache::GetBearerInfoBoolL(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOBOOLL_ENTRY );
+
+    TBool retVal( EFalse );
+    TBool found( EFalse );
+
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == aBearerType )
+            {
+            found = ETrue;
+            retVal = ( *iPlugins )[i]->GetBearerInfoBoolL( aAttribute );
+            break;
+            }
+        }
+    if ( !found )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_GETBEARERINFOBOOLL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetBearerInfoStringL
+//-----------------------------------------------------------------------------
+//
+HBufC* CCmmCache::GetBearerInfoStringL(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOSTRINGL_ENTRY );
+
+    HBufC* retVal( NULL );
+    TBool found( EFalse );
+
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == aBearerType )
+            {
+            found = ETrue;
+            retVal = ( *iPlugins )[i]->GetBearerInfoStringL( aAttribute );
+            break;
+            }
+        }
+    if ( !found )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_GETBEARERINFOSTRINGL_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// CCmmCache::GetBearerInfoString8L
+//-----------------------------------------------------------------------------
+//
+HBufC8* CCmmCache::GetBearerInfoString8L(
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOSTRING8L_ENTRY );
+
+    HBufC8* retVal( NULL );
+    TBool found( EFalse );
+
+    for ( TInt i = 0; i < iPlugins->Count(); i++ )
+        {
+        if ( ( *iPlugins )[i]->GetBearerInfoIntL( CMManager::ECmBearerType ) == aBearerType )
+            {
+            found = ETrue;
+            retVal = ( *iPlugins )[i]->GetBearerInfoString8L( aAttribute );
+            break;
+            }
+        }
+    if ( !found )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_GETBEARERINFOSTRING8L_EXIT );
+    return retVal;
+    }
+
+//-----------------------------------------------------------------------------
+// Read general connection settings from database.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_READGENCONNSETTINGSL_ENTRY );
+
+    CommsDat::CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDDefConnRecord>(
+                    iCmManagerImpl->TableId( ECmmDbDefConnRecord ) );
+    CleanupStack::PushL( defConnRecordSet );
+
+    CCDDefConnRecord* defConnRecord =
+            new( ELeave ) CCDDefConnRecord(
+                    iCmManagerImpl->TableId( ECmmDbDefConnRecord ) );
+    CleanupStack::PushL( defConnRecord );
+
+    TRAP_IGNORE( defConnRecordSet->LoadL( Session() ) );
+    if ( defConnRecordSet->iRecords.Count() > 0 )
+        {
+        defConnRecord->SetElementId( defConnRecordSet->iRecords[0]->ElementId() );
+        defConnRecord->LoadL( Session() );
+
+        aGenConnSettings.iUsageOfWlan =
+                TCmUsageOfWlan( ( TInt )defConnRecord->iUsageOfWlan );
+        aGenConnSettings.iCellularDataUsageHome =
+                TCmCellularDataUsage( ( TInt )defConnRecord->iCellularDataUsageHome );
+        aGenConnSettings.iCellularDataUsageVisitor =
+                TCmCellularDataUsage( ( TInt )defConnRecord->iCellularDataUsageVisitor );
+        }
+    else
+        {
+        iTrans->OpenTransactionLC();
+
+        aGenConnSettings.iUsageOfWlan = ECmUsageOfWlanKnown;
+        aGenConnSettings.iCellularDataUsageHome = ECmCellularDataUsageAutomatic;
+        aGenConnSettings.iCellularDataUsageVisitor = ECmCellularDataUsageConfirm;
+
+        defConnRecord->SetRecordId( KCDNewRecordRequest );
+        defConnRecord->iUsageOfWlan = ( TUint )aGenConnSettings.iUsageOfWlan;
+        defConnRecord->iCellularDataUsageHome =
+                ( TUint )aGenConnSettings.iCellularDataUsageHome;
+        defConnRecord->iCellularDataUsageVisitor =
+                ( TUint )aGenConnSettings.iCellularDataUsageVisitor;
+        defConnRecord->StoreL( Session() );
+
+        iTrans->CommitTransactionL();
+        }
+
+    CleanupStack::PopAndDestroy( defConnRecord );
+    CleanupStack::PopAndDestroy( defConnRecordSet );
+
+    OstTraceFunctionExit0( CCMMCACHE_READGENCONNSETTINGSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+// Write general connection settings to database.
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_WRITEGENCONNSETTINGSL_ENTRY );
+
+    iTrans->OpenTransactionLC();
+
+    ReplaceGenConnSettingsL( aGenConnSettings );
+
+    iTrans->CommitTransactionL();
+
+    OstTraceFunctionExit0( CCMMCACHE_WRITEGENCONNSETTINGSL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CCmmCache::ReplaceGenConnSettingsL()
+//-----------------------------------------------------------------------------
+//
+void CCmmCache::ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REPLACEGENCONNSETTINGSL_ENTRY );
+    TBool oldRecordExists( EFalse );
+
+    CommsDat::CMDBRecordSet<CCDDefConnRecord>* defConnRecordSet =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDDefConnRecord>(
+                    iCmManagerImpl->TableId( ECmmDbDefConnRecord ) );
+    CleanupStack::PushL( defConnRecordSet );
+
+    CCDDefConnRecord* defConnRecord =
+            new( ELeave ) CCDDefConnRecord(
+                    iCmManagerImpl->TableId( ECmmDbDefConnRecord ) );
+    CleanupStack::PushL( defConnRecord );
+
+    TRAPD( err, defConnRecordSet->LoadL( Session() ) );
+    if ( err == KErrNone )
+        {
+        defConnRecord->SetElementId( defConnRecordSet->iRecords[0]->ElementId() );
+        defConnRecord->LoadL( Session() );
+        oldRecordExists = ETrue;
+        }
+    else if ( err == KErrNotFound )
+        {
+        defConnRecord->SetRecordId( KCDNewRecordRequest );
+        }
+    else
+        {
+        User::Leave( err );
+        }
+
+    defConnRecord->iUsageOfWlan = ( TUint )aGenConnSettings.iUsageOfWlan;
+    defConnRecord->iCellularDataUsageHome = ( TUint )aGenConnSettings.iCellularDataUsageHome;
+    defConnRecord->iCellularDataUsageVisitor = ( TUint )aGenConnSettings.iCellularDataUsageVisitor;
+
+    if ( oldRecordExists )
+        {
+        defConnRecord->ModifyL( Session() );
+        }
+    else
+        {
+        defConnRecord->StoreL( Session() );
+        }
+
+    CleanupStack::PopAndDestroy( defConnRecord );
+    CleanupStack::PopAndDestroy( defConnRecordSet );
+
+    OstTraceFunctionExit0( CCMMCACHE_REPLACEGENCONNSETTINGSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Opens a transaction and deletes the given connection method.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeletePluginL( CCmmConnMethodStruct& aConnMethodStruct )
+    {
+    iTrans->OpenTransactionLC();
+    aConnMethodStruct.GetPlugin()->DeleteL();
+    iTrans->CommitTransactionL();
+    }
+
+// ---------------------------------------------------------------------------
+// Enumerates connections and checks if the given connection method is
+// connected.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::CheckIfCmConnected( const TUint32 aCmId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CHECKIFCMCONNECTED_ENTRY );
+
+    TBool result( EFalse );
+    RSocketServ ss;
+    RConnection connection;
+    TUint connectionCount( 0 );
+
+    if ( ss.Connect() == KErrNone )
+        {
+        if ( connection.Open( ss, KAfInet ) == KErrNone )
+            {
+            if ( connection.EnumerateConnections( connectionCount ) == KErrNone )
+                {
+                TPckgBuf<TConnectionInfo> connInfo;
+
+                for ( TInt i = 1; i <= connectionCount; i++ )
+                    {
+                    connection.GetConnectionInfo( i, connInfo );
+
+                    if ( connInfo().iIapId == aCmId )
+                        {
+                        result = ETrue;
+                        break;
+                        }
+                    }
+
+                }
+            connection.Close();
+            }
+        ss.Close();
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CHECKIFCMCONNECTED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Enumerates connections and checks if any of the connection methods in the
+// given destination is connected.
+// If pointer to destination instance is given, then information about
+// relevant connection methods is retrieved from that. Otherwise the
+// information is retrieved from instance mapping using the given ID.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationConnectedL(
+        const TUint32 aDestinationId,
+        CCmmDestinationInstance* aDestinationInstance ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONCONNECTEDL_ENTRY );
+
+    TBool result( EFalse );
+    RSocketServ ss;
+    RConnection connection;
+    TUint connectionCount( 0 );
+
+    if ( ss.Connect() == KErrNone )
+        {
+        if ( connection.Open( ss, KAfInet ) == KErrNone )
+            {
+            if ( connection.EnumerateConnections( connectionCount ) == KErrNone )
+                {
+                RArray<TCmmConnMethodItem> connMethodArray;
+                CleanupClosePushL( connMethodArray );
+
+                // If destination instance provided, take the destination's
+                // connection methods from there. Otherwise get the connection
+                // methods from instance mapping. (If the destination is marked
+                // to be deleted, instance mapping won't have information about
+                // it.)
+                if ( aDestinationInstance )
+                    {
+                    for ( TInt i = 0; i < aDestinationInstance->iConnMethodItemArray.Count(); i++ )
+                        {
+                        connMethodArray.AppendL( aDestinationInstance->iConnMethodItemArray[i] );
+                        }
+                    }
+                else
+                    {
+                    iInstanceMapping->GetConnMethodsFromDestinationL(
+                            aDestinationId,
+                            connMethodArray );
+                    }
+
+                // Iterate through all connections.
+                TPckgBuf<TConnectionInfo> connInfo;
+                for ( TUint i = 1; i <= connectionCount; i++ )
+                    {
+                    connection.GetConnectionInfo( i, connInfo );
+
+                    // Iterate through all connection methods in destinations.
+                    for ( TInt j = 0; j < connMethodArray.Count(); j++ )
+                        {
+                        if ( connInfo().iIapId == connMethodArray[j].iId )
+                            {
+                            result = ETrue;
+                            break;
+                            }
+                        }
+                    if ( result )
+                        {
+                        break;
+                        }
+                    }
+
+                CleanupStack::PopAndDestroy( &connMethodArray );
+                }
+            connection.Close();
+            }
+        ss.Close();
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONCONNECTEDL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination is an embedded destination in
+// any other destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationIsEmbedded( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONISEMBEDDED_ENTRY );
+
+    TBool isEmbedded = iInstanceMapping->DestinationIsEmbedded( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONISEMBEDDED_EXIT );
+    return isEmbedded;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination has an embedded destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationHasEmbedded( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONHASEMBEDDED_ENTRY );
+
+    TBool hasEmbedded = iInstanceMapping->DestinationHasEmbedded( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONHASEMBEDDED_EXIT );
+    return hasEmbedded;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination is pointed to by any virtual
+// IAP.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::DestinationPointedToByVirtualIap( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONPOINTEDTOBYVIRTUALIAP_ENTRY );
+
+    TBool pointedByVirtual =
+            iInstanceMapping->DestinationPointedToByVirtualIap( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_DESTINATIONPOINTEDTOBYVIRTUALIAP_EXIT );
+    return pointedByVirtual;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given connection method is pointed to by any
+// virtual IAP.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::ConnMethodPointedToByVirtualIap( const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODPOINTEDTOBYVIRTUALIAP_ENTRY );
+
+    TBool pointedToByVirtual =
+            iInstanceMapping->ConnMethodPointedToByVirtualIap( aConnMethodId );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODPOINTEDTOBYVIRTUALIAP_EXIT );
+    return pointedToByVirtual;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method is the only connection method in the
+// given destination and if a virtual IAP points to that destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmCache::ConnMethodInDestinationButLocked(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
+
+    TBool inAndlocked = iInstanceMapping->
+            ConnMethodInDestinationButLocked( aConnMethodId, aDestinationId );
+
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODINDESTINATIONBUTLOCKED_EXIT );
+    return inAndlocked;
+    }
+
+// ---------------------------------------------------------------------------
+// Remove all references to the given connection method from the datamobility
+// selection policy records. Then update instance mapping to reflect the
+// current database state, and notify any possible client handles for the
+// changed destinations. Also removes the connection method from any
+// destination handles the client has open.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::RemoveAllReferencesToConnMethodL(
+        CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REMOVEALLREFERENCESTOCONNMETHODL_ENTRY );
+
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+
+    iTrans->OpenTransactionLC();
+
+    // Create DataMobilitySelectionPolicy-record set.
+    CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* snapRecordSet =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>(
+                    iCmManagerImpl->TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecordSet );
+
+    // Create a DataMobilitySelectionPolicy-record.
+    CCDDataMobilitySelectionPolicyRecord* snapRecord =
+            new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                    iCmManagerImpl->TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecord );
+
+    TRAP_IGNORE( snapRecordSet->LoadL( iTrans->Session() ) );
+
+    // Read IAP ID from each record and delete any that match the connection
+    // method we are removing all references for.
+    TUint32 connMethodIdInRecord( 0 );
+    TInt snapRecordCount( snapRecordSet->iRecords.Count() );
+    for ( TInt i = 0; i < snapRecordCount; i++ )
+        {
+        snapRecord->SetElementId( snapRecordSet->iRecords[i]->ElementId() );
+        snapRecord->LoadL( iTrans->Session() );
+
+        connMethodIdInRecord = ( snapRecord->iIAP & KCDMaskShowRecordId ) >> 8;
+        if ( connMethodIdInRecord == connMethodId )
+            {
+            snapRecord->DeleteL( iTrans->Session() );
+            }
+        }
+    CleanupStack::PopAndDestroy( snapRecord );
+    CleanupStack::PopAndDestroy( snapRecordSet );
+
+    iTrans->CommitTransactionL();
+
+    // Reference count will be zero if this method call is not part of some
+    // bigger operation (e.g. connection method delete).
+    if ( iTrans->GetReferenceCount() == 0 )
+        {
+        // Update instance mapping to reflect the current database state, and
+        // notify any possible client handles for the changed destinations.
+        RArray<TUint32> changedDestinations;
+        iInstanceMapping->RemoveConnMethodFromDestinations( connMethodId, changedDestinations );
+        for ( TInt i = 0; i < changedDestinations.Count(); i++ )
+            {
+            TCmmIdStruct idStruct( changedDestinations[i], 0 );
+            aConnMethodInstance.RefreshHandlesForAllSessions( idStruct );
+            }
+        changedDestinations.Close();
+
+        // Remove the connection method from any destination handles the client
+        // has open.
+        aConnMethodInstance.RemoveConnMethodFromSessionDestinationHandles( connMethodId );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_REMOVEALLREFERENCESTOCONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Update the ID of a new destination from temporary ID to real ID after a
+// successful update to database.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::RefreshDestinationId( const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REFRESHDESTINATIONID_ENTRY );
+
+    // Iterate destinations in cache and update the ID if match found.
+    for ( TInt i = 0; i < iDestinationArray.Count(); i++ )
+        {
+        if ( iDestinationArray[i]->GetId() == aIdStruct.iTemporaryId )
+            {
+            iDestinationArray[i]->SetId( aIdStruct.iRealId );
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_REFRESHDESTINATIONID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Update the ID of a new connection method from temporary ID to real ID after
+// a successful update to database.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::RefreshConnMethodId( const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_REFRESHCONNMETHODID_ENTRY );
+
+    // Iterate connection methods in cache and update the ID if match found.
+    for ( TInt i = 0; i < iConnMethodArray.Count(); i++ )
+        {
+        if ( iConnMethodArray[i]->GetId() == aIdStruct.iTemporaryId )
+            {
+            iConnMethodArray[i]->SetId( aIdStruct.iRealId );
+            break; // Can only be 1 match.
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_REFRESHCONNMETHODID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// During destination update, after updating connection methods inside the
+// destination, the database records containing the information of what
+// connection methods are inside the destination need to be updated with real
+// IDs for any newly created connection methods. These real IDs are held in the
+// temporary array iUpdatedConnMethods until successful commit to database.
+// This method is used to find out those real IDs before that.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::TranslateTemporaryId( const TUint32 aTemporaryId, TUint32& aRealId ) const
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_TRANSLATETEMPORARYID_ENTRY );
+
+    aRealId = 0;
+
+    for ( TInt i = 0; i < iUpdatedConnMethods.Count(); i++ )
+        {
+        if ( iUpdatedConnMethods[i].iTemporaryId == aTemporaryId )
+            {
+            aRealId = iUpdatedConnMethods[i].iRealId;
+            break;
+            }
+        }
+    if ( !aRealId )
+        {
+        ASSERT( 0 );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_TRANSLATETEMPORARYID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method can have all references removed and
+// made into an uncategorized connection method.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CheckIfConnMethodReferencesCanBeRemovedL(
+        const CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CHECKIFCONNMETHODREFERENCESCANBEREMOVEDL_ENTRY );
+
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+
+    // Check that connection method exists in database.
+    if ( !iInstanceMapping->ValidConnMethodId( connMethodId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // Can't remove an embedded destination this way.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Iterate all destinations in database and check if possible reference can
+    // be removed.
+    RArray<TUint32> dbDestinations;
+    CleanupClosePushL( dbDestinations );
+    iInstanceMapping->GetDestinationsL( dbDestinations );
+    for ( TInt i = 0; i < dbDestinations.Count(); i++ )
+        {
+        if ( iInstanceMapping->ConnMethodInDestinationButLocked(
+                connMethodId,
+                dbDestinations[i] ) )
+            {
+            User::Leave( KErrLocked );
+            }
+        }
+    CleanupStack::PopAndDestroy( &dbDestinations );
+
+    // Can't remove a connection method that is in use.
+    if ( CheckIfCmConnected( connMethodId ) )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CHECKIFCONNMETHODREFERENCESCANBEREMOVEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if given connection method is referenced from any protected destination.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CheckIfConnMethodBelongsToProtectedDestinationL(
+        const CCmmConnMethodInstance& aConnMethodInstance,
+        TBool& aBelongsToProtectedDestination )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CHECKIFCONNMETHODBELONGSTOPROTECTEDDESTINATIONL_ENTRY );
+
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+
+    // Check that connection method exists in database.
+    if ( !iInstanceMapping->ValidConnMethodId( connMethodId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    aBelongsToProtectedDestination = EFalse;
+    // Get destinations which have references to connection method passed as parameter.
+    RArray<TUint32> dbDestinations;
+    CleanupClosePushL( dbDestinations );
+    iInstanceMapping->DestinationsContainingConnMethodL( connMethodId, dbDestinations );
+    TUint32 metadata( 0 );
+    for ( TInt i = 0; i < dbDestinations.Count(); i++ )
+        {
+        // Check if any of destinations is protected.
+        metadata = iInstanceMapping->DestinationMetadata( dbDestinations[i] );
+        TUint32 protlevel =
+                ( metadata & KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
+        if ( protlevel == CMManager::EProtLevel1 || protlevel == CMManager::EProtLevel3 )
+            {
+            aBelongsToProtectedDestination = ETrue;
+            break;
+            }
+        }
+    CleanupStack::PopAndDestroy( &dbDestinations );
+
+    OstTraceFunctionExit0( CCMMCACHE_CHECKIFCONNMETHODBELONGSTOPROTECTEDDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method can be deleted.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CheckIfConnMethodCanBeDeletedL(
+        const CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CHECKIFCONNMETHODCANBEDELETEDL_ENTRY );
+
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+
+    // Find connection method from cache.
+    TInt index = FindConnMethodFromCache( connMethodId );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // Check connection method status at cache side.
+    switch ( iConnMethodArray[index]->GetStatus() )
+        {
+        case ECmmConnMethodStatusNotSaved:
+            {
+            // Connection method is not in database, nothing to delete.
+            User::Leave( KErrNotFound );
+            }
+            break;
+        case ECmmConnMethodStatusValid:
+            // Proceed.
+            break;
+        case ECmmConnMethodStatusToBeDeleted:
+            // Connection method has already been deleted.
+            return;
+        case ECmmConnMethodStatusChanged:
+        default:
+            {
+            ASSERT( 0 ); // Error, illegal status.
+            User::Leave( KErrCorrupt );
+            }
+            break;
+        }
+
+    // Removing all references is part of deleting a connection method. Check
+    // if can do that.
+    CheckIfConnMethodReferencesCanBeRemovedL( aConnMethodInstance );
+
+    // Check that no virtual IAP points to this connection method.
+    if ( iInstanceMapping->ConnMethodPointedToByVirtualIap( connMethodId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CHECKIFCONNMETHODCANBEDELETEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given destination can be deleted.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::CheckIfDestinationCanBeDeletedL(
+        const CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_CHECKIFDESTINATIONCANBEDELETEDL_ENTRY );
+
+    TUint32 destinationId( aDestinationInstance.GetId() );
+
+    // Find destination from cache.
+    TInt index = FindDestinationFromCache( destinationId );
+    if ( index == KErrNotFound )
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    // Check destination status in cache.
+    switch ( iDestinationArray[index]->GetStatus() )
+        {
+        case ECmmDestinationStatusNotSaved:
+            {
+            User::Leave( KErrNotFound );
+            }
+            break;
+        case ECmmDestinationStatusValid:
+            // Proceed.
+            break;
+        case ECmmDestinationStatusToBeDeleted:
+            // Destination has already been deleted.
+            return;
+        case ECmmDestinationStatusChanged:
+        default:
+            {
+            ASSERT( 0 ); // Error, illegal status.
+            User::Leave( KErrCorrupt );
+            }
+            break;
+        }
+
+    // Check destination exists in database.
+    if ( !iInstanceMapping->ValidDestinationId( destinationId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // Check if any virtual IAP points to this destination. Don't check session side.
+    if ( iInstanceMapping->DestinationPointedToByVirtualIap( destinationId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+
+    // Check if any of the connection methods in this destination are currently in use.
+    if ( DestinationConnectedL( destinationId ) )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_CHECKIFDESTINATIONCANBEDELETEDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return the requested table ID.
+// ---------------------------------------------------------------------------
+//
+CommsDat::TMDBElementId CCmmCache::TableId( TCmmDbRecords aRecord )
+    {
+    return iCmManagerImpl->TableId( aRecord );
+    }
+
+// ---------------------------------------------------------------------------
+// Initiate the deletion of given destination if none of the connection
+// methods inside it are connected.
+// ---------------------------------------------------------------------------
+//
+void CCmmCache::DeleteDestinationForcedL( CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMCACHE_DELETEDESTINATIONFORCEDL_ENTRY );
+
+    if ( !DestinationConnectedL( 0, &aDestinationInstance ) )
+        {
+        DeleteDestinationL( aDestinationInstance, ETrue );
+        }
+
+    OstTraceFunctionExit0( CCMMCACHE_DELETEDESTINATIONFORCEDL_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,631 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Session side object representing a connection method.
+*
+*/
+
+
+#include <cmpluginbaseeng.h>
+#include <cmconnectionmethoddef.h>
+#include <cmpluginembdestinationdef.h>
+
+#include "cmmconnmethodinstance.h"
+#include "cmmsession.h"
+#include "cmmcache.h"
+#include "cmmconnmethodstruct.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmconnmethodinstanceTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodInstance* CCmmConnMethodInstance::NewL(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_NEWL_ENTRY );
+
+    CCmmConnMethodInstance* self = CCmmConnMethodInstance::NewLC( aCmmSession, aCache );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodInstance* CCmmConnMethodInstance::NewLC(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_NEWLC_ENTRY );
+
+    CCmmConnMethodInstance* self = new( ELeave ) CCmmConnMethodInstance( aCmmSession, aCache );
+    CleanupClosePushL( *self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodInstance::~CCmmConnMethodInstance()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_CCMMCONNMETHODINSTANCE_ENTRY );
+
+    // Tell cache this handle is beeing closed. Cache will update own bookkeeping.
+    if ( iCache )
+        {
+        iCache->CloseConnMethod( *this );
+        }
+
+    delete iPluginDataInstance;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_CCMMCONNMETHODINSTANCE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodInstance::CCmmConnMethodInstance(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+        :
+        iCmmSession( aCmmSession ),
+        iCache( aCache )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMCONNMETHODINSTANCE_CCMMCONNMETHODINSTANCE_ENTRY );
+
+    iPlugin = NULL;
+    iPluginDataInstance = NULL;
+    iConnMethodId = 0;
+    iBearerType = 0;
+    iStatus = ECmmConnMethodStatusChanged;
+    iRecordStatus = ECmmRecordStatusBlank;
+    iHandle = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMMCONNMETHODINSTANCE_CCMMCONNMETHODINSTANCE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_CONSTRUCTL_ENTRY );
+
+    iPluginDataInstance = CCmClientPluginInstance::NewL();
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get pointer to the plugin data container.
+// ---------------------------------------------------------------------------
+//
+CCmClientPluginInstance* CCmmConnMethodInstance::GetPluginDataInstance() const
+    {
+    return iPluginDataInstance;
+    }
+
+// ---------------------------------------------------------------------------
+// Get connection method ID.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmConnMethodInstance::GetId() const
+    {
+    return iConnMethodId;
+    }
+
+// ---------------------------------------------------------------------------
+// Set connection method ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetId( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETID_ENTRY );
+
+    iConnMethodId = aConnMethodId;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return bearer type.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmConnMethodInstance::GetBearerType() const
+    {
+    return iBearerType;
+    }
+
+// ---------------------------------------------------------------------------
+// Get handle ID.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmConnMethodInstance::GetHandle() const
+    {
+    return iHandle;
+    }
+
+// ---------------------------------------------------------------------------
+// Set handle ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetHandle( const TInt aHandle )
+    {
+    iHandle = aHandle;
+    }
+
+// ---------------------------------------------------------------------------
+// Return ETrue, if this connection method represents an embedded destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmConnMethodInstance::IsEmbeddedDestination() const
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_ISEMBEDDEDDESTINATION_ENTRY );
+
+    TBool result( EFalse );
+    if ( iBearerType == KUidEmbeddedDestination )
+        {
+        result = ETrue;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_ISEMBEDDEDDESTINATION_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Save the contents of this connection method into database. The attribute
+// aTemporaryHandle must be true if this connection instance was temporarily
+// created for the duration of this update operation only. 
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::UpdateL( TBool aTemporaryHandle )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_UPDATEL_ENTRY );
+
+    if ( iCache )
+        {
+        iCache->UpdateConnMethodL( *this, aTemporaryHandle );
+        }
+    else
+        {
+        User::Leave( KErrBadHandle );
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_UPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Copy the relevant connection method information from cache side object.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::CopyDataL( CCmmConnMethodStruct* aConnMethodStruct )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_COPYDATAL_ENTRY );
+
+    if ( !aConnMethodStruct )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    iConnMethodId = aConnMethodStruct->GetId();
+    iBearerType = aConnMethodStruct->GetBearerType();
+
+    iPlugin = aConnMethodStruct->GetPlugin();
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // Embedded destination does not have any data.
+    if ( !IsEmbeddedDestination() )
+        {
+        iPlugin->GetPluginDataL( iPluginDataInstance );
+        }
+
+    aConnMethodStruct->IncrementReferenceCounter();
+
+    switch ( aConnMethodStruct->GetStatus() )
+        {
+        case ECmmConnMethodStatusNotSaved:
+        case ECmmConnMethodStatusToBeDeleted:
+            {
+            iStatus = ECmmConnMethodStatusChanged;
+            iRecordStatus = ECmmRecordStatusUnsaved;
+            }
+            break;
+        case ECmmConnMethodStatusValid:
+            {
+            iStatus = ECmmConnMethodStatusValid;
+            iRecordStatus = ECmmRecordStatusLoaded;
+            }
+            break;
+        case ECmmConnMethodStatusChanged:
+        default:
+            User::Leave( KErrCorrupt );  // Error, invalid status.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_COPYDATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::GetIntAttributeL
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmConnMethodInstance::GetIntAttributeL( const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETINTATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // Embedded destination has only limited set of attributes.
+    if ( IsEmbeddedDestination() )
+        {
+        switch ( aAttribute )
+            {
+            case CMManager::ECmId:
+            case CMManager::ECmBearerType:
+            case CMManager::ECmDefaultPriority:
+            case CMManager::ECmDefaultUiPriority:
+            case ECmExtensionLevel:
+                {
+                break;
+                }
+            default:
+                {
+                User::Leave( KErrNotSupported );
+                }
+            }
+        }
+
+    TUint32 result = iPlugin->GetIntAttributeL( aAttribute, iPluginDataInstance );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_GETINTATTRIBUTEL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::GetBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+TBool CCmmConnMethodInstance::GetBoolAttributeL( const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // Embedded destination has only limited set of attributes.
+    if ( IsEmbeddedDestination() )
+        {
+        switch ( aAttribute )
+            {
+            case CMManager::ECmCoverage:
+            case CMManager::ECmDestination:
+            case CMManager::ECmProtected:
+            case CMManager::ECmHidden:
+            case CMManager::ECmBearerHasUi:
+            case CMManager::ECmVirtual:
+                {
+                break;
+                }
+            default:
+                {
+                User::Leave( KErrNotSupported );
+                }
+            }
+        }
+
+    TBool retVal( EFalse );
+    switch ( aAttribute )
+        {
+        case CMManager::ECmConnected:
+            {
+            if ( GetId() > 0 )
+                {
+                // Check first if this is embedded destination.
+                retVal = iPlugin->GetBoolAttributeL( CMManager::ECmDestination,
+                        iPluginDataInstance );
+                if ( retVal )
+                    {
+                    retVal = iCache->DestinationConnectedL( GetId() );
+                    }
+                else
+                    {
+                    if ( iCache )
+                        {
+                        retVal = iCache->CheckIfCmConnected( GetId() );
+                        }
+                    }
+                }
+            }
+            break;
+        case CMManager::ECmIsLinked:
+            {
+            // Does any virtual iap point to this connection method.
+            // Check first if this connection method is an embedded destination.
+            if ( GetId() > 0 )
+                {
+                retVal = iPlugin->GetBoolAttributeL( CMManager::ECmDestination,
+                        iPluginDataInstance );
+                if ( retVal )
+                    {
+                    retVal = iCache->DestinationPointedToByVirtualIap( GetId() );
+                    }
+                else
+                    {
+                    retVal = iCache->ConnMethodPointedToByVirtualIap( GetId() );
+                    }
+                }
+            }
+            break;
+        default:
+            {
+            retVal = iPlugin->GetBoolAttributeL( aAttribute, iPluginDataInstance );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_GETBOOLATTRIBUTEL_EXIT );
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::GetStringAttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmmConnMethodInstance::GetStringAttributeL( const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // Embedded destination has only limited set of attributes.
+    if ( IsEmbeddedDestination() )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    HBufC* result = iPlugin->GetStringAttributeL( aAttribute, iPluginDataInstance );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_GETSTRINGATTRIBUTEL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::GetString8AttributeL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CCmmConnMethodInstance::GetString8AttributeL( const TUint32 aAttribute )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // Embedded destination has only limited set of attributes.
+    if ( IsEmbeddedDestination() )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    HBufC8* result = iPlugin->GetString8AttributeL( aAttribute, iPluginDataInstance );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_GETSTRING8ATTRIBUTEL_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::SetIntAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetIntAttributeL(
+        const TUint32 aAttribute,
+        const TUint32 aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETINTATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    iPlugin->SetIntAttributeL( aAttribute, aValue, iPluginDataInstance );
+
+    iRecordStatus = ECmmRecordStatusModified;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETINTATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::SetBoolAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetBoolAttributeL(
+        const TUint32 aAttribute,
+        const TBool aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETBOOLATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    iPlugin->SetBoolAttributeL( aAttribute, aValue, iPluginDataInstance );
+
+    iRecordStatus = ECmmRecordStatusModified;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETBOOLATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::SetStringAttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetStringAttributeL(
+        const TUint32 aAttribute,
+        const TDesC16& aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETSTRINGATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    iPlugin->SetStringAttributeL( aAttribute, aValue, iPluginDataInstance );
+
+    iRecordStatus = ECmmRecordStatusModified;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETSTRINGATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// CCmmConnMethodInstance::SetString8AttributeL
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetString8AttributeL(
+        const TUint32 aAttribute,
+        const TDesC8& aValue )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETSTRING8ATTRIBUTEL_ENTRY );
+
+    if ( !iPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    iPlugin->SetString8AttributeL( aAttribute, aValue, iPluginDataInstance );
+
+    iRecordStatus = ECmmRecordStatusModified;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets a new status value.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::SetStatus( const TCmmConnMethodStatus aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETSTATUS_ENTRY );
+
+    iStatus = aStatus;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_SETSTATUS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Called after this connection method has been updated and database
+// transaction has completed successfully. Sets the internal state of this
+// connection method instance to reflect the new valid state.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::UpdateSuccessful()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_UPDATESUCCESSFUL_ENTRY );
+
+    SetStatus( ECmmConnMethodStatusValid );
+    iRecordStatus = ECmmRecordStatusLoaded;
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_UPDATESUCCESSFUL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Called after this connection method has been deleted and database
+// transaction has completed successfully. Sets the internal state of this
+// connection method structure to reflect the new deleted state.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::DeleteSuccessful( const TUint32 aNewSecondaryId )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_DELETESUCCESSFUL_ENTRY );
+
+    SetStatus( ECmmConnMethodStatusChanged );
+    iRecordStatus = ECmmRecordStatusModified;
+    SetId( aNewSecondaryId );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_DELETESUCCESSFUL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// After update/delete to database, refresh temporary ID to real ID if
+// necessary and refresh status information for any related handles for
+// all client sessions.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::RefreshHandlesForAllSessions(
+        const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_REFRESHHANDLESFORALLSESSIONS_ENTRY );
+
+    if ( iCmmSession )
+        {
+        iCmmSession->RefreshHandlesForAllSessions( aIdStruct );
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODINSTANCE_REFRESHHANDLESFORALLSESSIONS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Removes a connection method from any open destination handle in the same
+// session.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodInstance::RemoveConnMethodFromSessionDestinationHandles(
+        const TUint32 aConnMethodId )
+    {
+    if ( iCmmSession )
+        {
+        iCmmSession->RemoveConnMethodFromDestinationHandles( aConnMethodId );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the current status value.
+// ---------------------------------------------------------------------------
+//
+TCmmConnMethodStatus CCmmConnMethodInstance::GetStatus() const
+    {
+    return iStatus;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethoditem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Class representing any kind on connection method, including embedded
+* destination. Used for priority based ordering of connection methods inside
+* destinations.
+*
+*/
+
+
+#include <cmmanagerdef.h>
+#include <cmpluginembdestinationdef.h>
+
+#include "cmmconnmethoditem.h"
+
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+TCmmConnMethodItem::TCmmConnMethodItem()
+        :
+        iId( 0 ),
+        iBearerType( 0 ),
+        iBearerPriority( 0 ),
+        iPriority( 0 ),
+        iIsVirtual( 0 ),
+        iLinkedIapId( 0 ),
+        iLinkedSnapId( 0 )           
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+TCmmConnMethodItem::TCmmConnMethodItem(
+        TUint32 aId,
+        TUint32 aBearerType,
+        TUint aBearerPriority,
+        TUint aPriority,
+        TBool aIsVirtual,
+        TUint32 aLinkedIapId,
+        TUint32 aLinkedSnapId )
+        :
+        iId( aId ),
+        iBearerType( aBearerType ),
+        iBearerPriority( aBearerPriority ),
+        iPriority( aPriority ),
+        iIsVirtual( aIsVirtual ),
+        iLinkedIapId( aLinkedIapId ),
+        iLinkedSnapId( aLinkedSnapId )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// A comparison function. Uses priority since items are in priority order.
+// ---------------------------------------------------------------------------
+//
+TInt TCmmConnMethodItem::Compare(
+        const TCmmConnMethodItem& aFirst,
+        const TCmmConnMethodItem& aSecond )
+    {
+    // Zero if match, negative if first is smaller, positive otherwise.
+    TInt result = ( TInt )aFirst.iPriority - ( TInt )aSecond.iPriority;
+
+    if ( result == 0 &&
+            aFirst.iPriority == CMManager::KDataMobilitySelectionPolicyPriorityWildCard )
+        {
+        // Embedded destination and virtual IAPs linking to SNAP have wildcard
+        // priority.
+        // If both connection methods have wildcard priority, only need to
+        // ensure that an embedded destination looses in priority to everything
+        // else.
+        if ( aFirst.iBearerType == KUidEmbeddedDestination )
+            {
+            result = 1; // Positive.
+            }
+        else if ( aSecond.iBearerType == KUidEmbeddedDestination )
+            {
+            result = -1; // Negative.
+            }
+        }
+    
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// A comparison function to find a specific item by ID.
+// (Items are not sorted by ID in the array.)
+// ---------------------------------------------------------------------------
+//
+TBool TCmmConnMethodItem::FindCompare(
+        const TUint32* aKey,
+        const TCmmConnMethodItem& aEntry )
+    {
+    // True if match, false otherwise.
+    TBool result( EFalse );
+    if ( *aKey == aEntry.iId )
+        {
+        result = ETrue;
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Return ETrue if this connection method item represents a virtual
+// destination.
+// ---------------------------------------------------------------------------
+//
+TBool TCmmConnMethodItem::IsVirtual() const
+    {
+    return iIsVirtual;
+    }
+
+// ---------------------------------------------------------------------------
+// Return ETrue if this connection method item represents an embedded
+// destination.
+// ---------------------------------------------------------------------------
+//
+TBool TCmmConnMethodItem::IsEmbedded() const
+    {
+    // No traces.
+    TBool result( EFalse );
+    if ( iBearerType == KUidEmbeddedDestination )
+        {
+        result = ETrue;
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// If this is a virtual IAP that points to an IAP, returns the ID of that IAP,
+// 0 otherwise.
+// ---------------------------------------------------------------------------
+//
+TUint32 TCmmConnMethodItem::LinkedIapId() const
+    {
+    return iLinkedIapId;
+    }
+
+// ---------------------------------------------------------------------------
+// If this is a virtual IAP that points to a SNAP, returns the ID of that SNAP,
+// 0 otherwise.
+// ---------------------------------------------------------------------------
+//
+TUint32 TCmmConnMethodItem::LinkedSnapId() const
+    {
+    return iLinkedSnapId;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,351 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Cache side object representing a connection method.
+*
+*/
+
+
+#include <e32base.h>
+#include <cmpluginbaseeng.h>
+
+#include "cmmconnmethodstruct.h"
+#include "cmmconnmethodinstance.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmconnmethodstructTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodStruct* CCmmConnMethodStruct::NewL(
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWL_ENTRY );
+
+    CCmmConnMethodStruct* self = CCmmConnMethodStruct::NewLC( aConnMethodId );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodStruct* CCmmConnMethodStruct::NewLC(
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWLC_ENTRY );
+
+    CCmmConnMethodStruct* self = new( ELeave ) CCmmConnMethodStruct( aConnMethodId );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodStruct::~CCmmConnMethodStruct()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_CCMMCONNMETHODSTRUCT_ENTRY );
+
+    if ( iConnMethodPlugin )
+        {
+        delete iConnMethodPlugin;
+        iConnMethodPlugin = NULL;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_CCMMCONNMETHODSTRUCT_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodStruct::CCmmConnMethodStruct( TUint32 aConnMethodId )
+        :
+        iConnMethodId( aConnMethodId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMCONNMETHODSTRUCT_CCMMCONNMETHODSTRUCT_ENTRY );
+
+    iConnMethodPlugin = NULL;
+    iReferenceCounter = 0;
+    iBearerType = 0;
+    iStatus = ECmmConnMethodStatusNotSaved;
+    iRecordStatus = ECmmRecordStatusBlank;
+
+    OstTraceFunctionExit0( DUP1_CCMMCONNMETHODSTRUCT_CCMMCONNMETHODSTRUCT_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::ConstructL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Return the reference count.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmConnMethodStruct::GetReferenceCounter()
+    {
+    return iReferenceCounter;
+    }
+
+// ---------------------------------------------------------------------------
+// Increase the reference counter by one.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::IncrementReferenceCounter()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_INCREMENTREFERENCECOUNTER_ENTRY );
+    iReferenceCounter++;
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_INCREMENTREFERENCECOUNTER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return the connection method ID.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmConnMethodStruct::GetId() const
+    {
+    return iConnMethodId;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the connection method ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::SetId( const TUint32 aConnMethodId )
+    {
+    iConnMethodId = aConnMethodId;
+    }
+
+// ---------------------------------------------------------------------------
+// Return bearer type.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmConnMethodStruct::GetBearerType() const
+    {
+    return iBearerType;
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the current status of this connection method struct.
+// ---------------------------------------------------------------------------
+//
+TCmmConnMethodStatus CCmmConnMethodStruct::GetStatus() const
+    {
+    return iStatus;
+    }
+
+
+// ---------------------------------------------------------------------------
+// Sets a new status value.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::SetStatus( const TCmmConnMethodStatus& aStatus )
+    {
+    iStatus = aStatus;
+    }
+
+// ---------------------------------------------------------------------------
+// Reload the connection method data in this cache side object to be in synch
+// with the database(only if needed).
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::ReloadPluginDataIfNeededL()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_REFRESHCONNMETHODINSTANCEL_ENTRY );
+
+    if ( !iConnMethodPlugin )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    switch ( iStatus )
+        {
+        case ECmmConnMethodStatusValid:
+        case ECmmConnMethodStatusToBeDeleted:
+            {
+            if ( iRecordStatus == ECmmRecordStatusExpired )
+                {
+                iConnMethodPlugin->ReLoadL();
+                SetRecordStatus( ECmmRecordStatusLoaded );
+                }
+            }
+            break;
+        case ECmmConnMethodStatusNotSaved: // This is checked before.
+        case ECmmConnMethodStatusChanged:
+        default:
+            User::Leave( KErrCorrupt );  // Error, invalid status.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_REFRESHCONNMETHODINSTANCEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Decrease the reference counter by one. Return the remaining number of
+// references.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmConnMethodStruct::ConnMethodInstanceClosed()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
+
+    iReferenceCounter--;
+    if ( iReferenceCounter < 0 )
+        {
+        ASSERT( 0 );
+        iReferenceCounter = 0;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_EXIT );
+    return iReferenceCounter;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the connection method plugin pointer, bearer type and status.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::SetPlugin(
+        CCmPluginBaseEng* aPlugin,
+        TUint32 aBearerType,
+        TCmmConnMethodStatus aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_SETPLUGIN_ENTRY );
+
+    // Only check reference counter, it is incremented by session side instance
+    // when data is copied into it.
+    if ( iReferenceCounter != 0 )
+        {
+        ASSERT( 0 ); // Error, wrong internal status.
+        }
+
+    iConnMethodPlugin = aPlugin;
+    iBearerType = aBearerType;
+
+    switch ( aStatus )
+        {
+        case ECmmConnMethodStatusNotSaved:
+            {
+            iStatus = aStatus;
+            iRecordStatus = ECmmRecordStatusUnsaved;
+            }
+            break;
+        case ECmmConnMethodStatusValid:
+            {
+            iStatus = aStatus;
+            iRecordStatus = ECmmRecordStatusLoaded;
+            }
+            break;
+        case ECmmConnMethodStatusChanged:
+        case ECmmConnMethodStatusToBeDeleted:
+        // Fallthrough intended.
+        default:
+            {
+            iStatus = ECmmConnMethodStatusChanged;
+            ASSERT( 0 ); // Error, invalid status as argument.
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SETPLUGIN_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the connection method plugin.
+// ---------------------------------------------------------------------------
+//
+CCmPluginBaseEng* CCmmConnMethodStruct::GetPlugin()
+    {
+    return iConnMethodPlugin;
+    }
+
+// ---------------------------------------------------------------------------
+// Called after this connection method has been deleted and database
+// transaction has completed successfully. Sets the internal state of this
+// connection method structure to reflect the new deleted state.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::DeleteSuccessful( const TUint32 aNewSecondaryId )
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_DELETESUCCESSFUL_ENTRY );
+
+    iConnMethodId = aNewSecondaryId;
+    iStatus = ( ECmmConnMethodStatusNotSaved );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_DELETESUCCESSFUL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Called after this connection method has been updated and database
+// transaction has completed successfully. Sets the internal state of this
+// connection method structure to reflect the new valid state.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::UpdateSuccessful()
+    {
+    OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_UPDATESUCCESSFUL_ENTRY );
+    iStatus = ECmmConnMethodStatusValid;
+    SetRecordStatus( ECmmRecordStatusLoaded );
+
+    OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_UPDATESUCCESSFUL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set the record status.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::SetRecordStatus( const TCmmRecordStatus aStatus )
+    {
+    iRecordStatus = aStatus;
+    }
+
+// ---------------------------------------------------------------------------
+// Notify about a possible change in database on specified record table.
+// ---------------------------------------------------------------------------
+//
+void CCmmConnMethodStruct::NotifyRecordChange( const TUint32 /*aRecordType*/ )
+    {
+    // Only change status if it is currently ECmmRecordStatusLoaded.
+    if ( iRecordStatus == ECmmRecordStatusLoaded )
+        {
+        iRecordStatus = ECmmRecordStatusExpired;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Return the status of the records.
+// ---------------------------------------------------------------------------
+//
+TCmmRecordStatus CCmmConnMethodStruct::GetRecordStatus() const
+    {
+    return iRecordStatus;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdbchangelistener.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,229 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Listens for changes in one CommsDat table through CenRep.
+*
+*/
+
+
+#include <commsdat.h>
+#include <centralrepository.h>
+
+#include "cmmdbchangelistener.h"
+#include "cmmlistenermanager.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmdbchangelistenerTraces.h"
+#endif
+
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmDbChangeListener* CCmmDbChangeListener::NewL(
+        CCmmListenerManager* aListenerManager,
+        TUint32 aTableId )
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_NEWL_ENTRY );
+
+    CCmmDbChangeListener* self = CCmmDbChangeListener::NewLC( aListenerManager, aTableId );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_NEWL_EXIT );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmDbChangeListener* CCmmDbChangeListener::NewLC(
+        CCmmListenerManager* aListenerManager,
+        TUint32 aTableId )
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_NEWLC_ENTRY );
+
+    CCmmDbChangeListener* self = new( ELeave ) CCmmDbChangeListener( aListenerManager, aTableId );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_NEWLC_EXIT );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// Cancels any active requests.
+// ---------------------------------------------------------------------------
+//
+CCmmDbChangeListener::~CCmmDbChangeListener()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_CCMMDBCHANGELISTENER_ENTRY );
+
+    // Cancel outstanding request, if exists
+    Cancel();
+    delete iRepository;
+
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_CCMMDBCHANGELISTENER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmDbChangeListener::CCmmDbChangeListener(
+        CCmmListenerManager* aListenerManager,
+        TUint32 aTableId )
+        :
+        CActive( 0 ),
+        iListenerManager( aListenerManager ),
+        iTableId( aTableId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDBCHANGELISTENER_CCMMDBCHANGELISTENER_ENTRY );
+
+    iRepository = NULL;
+    iErrorCounter = 0;
+
+    OstTraceFunctionExit0( DUP1_CCMMDBCHANGELISTENER_CCMMDBCHANGELISTENER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmDbChangeListener::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_CONSTRUCTL_ENTRY );
+
+    iRepository = CRepository::NewL( KCDCommsRepositoryId );
+    CActiveScheduler::Add( this );
+    // Not started yet.
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the database table ID that this listener is monitoring.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDbChangeListener::GetTableId()
+    {
+    // No traces.
+    return iTableId;
+    }
+
+// ---------------------------------------------------------------------------
+// Start the listener if not yet started.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDbChangeListener::Start()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_START_ENTRY );
+
+    TInt err( KErrNone );
+    if ( !IsActive() )
+        {
+        err = RequestNotification();
+        }
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_START_EXIT );
+
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Cancels an outstanding request.
+// ---------------------------------------------------------------------------
+//
+void CCmmDbChangeListener::DoCancel()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_DOCANCEL_ENTRY );
+
+    iRepository->NotifyCancel( iTableId, KCDMaskShowRecordType );
+
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_DOCANCEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Handles the asynchronous request completion event.
+// ---------------------------------------------------------------------------
+//
+void CCmmDbChangeListener::RunL()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_RUNL_ENTRY );
+
+    // Don't leave, or implement RunError()
+    if ( iStatus.Int() < KErrNone )
+        {
+        // Error: iStatus.Int()
+        iErrorCounter++;
+        if ( iErrorCounter > KCmmCenRepErrorThreshold )
+            {
+            // Too many errors
+            iListenerManager->DbChangeError( iTableId );
+            OstTraceFunctionExit0( CCMMDBCHANGELISTENER_RUNL_EXIT );
+            return;
+            }
+        }
+    else
+        {
+        iErrorCounter = 0;
+        }
+
+    TInt err = RequestNotification(); // Start to listen for next change.
+
+    // React to current change notification
+    iListenerManager->DbChangeDetectedL( iTableId );
+
+    if ( err )
+        {
+        iListenerManager->DbChangeError( iTableId );
+        }
+    OstTraceFunctionExit0( DUP1_CCMMDBCHANGELISTENER_RUNL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Initiates an asynchronous request to be notified of any change in the
+// monitored database table.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDbChangeListener::RequestNotification()
+    {
+    OstTraceFunctionEntry0( CCMMDBCHANGELISTENER_REQUESTNOTIFICATION_ENTRY );
+
+    TInt err( KErrNone );
+    err = iRepository->NotifyRequest( iTableId, KCDMaskShowRecordType, iStatus );
+    if ( !err )
+        {
+        SetActive();
+        }
+    OstTraceFunctionExit0( CCMMDBCHANGELISTENER_REQUESTNOTIFICATION_EXIT );
+
+    return err;
+    }
+
+// -----------------------------------------------------------------------------
+// Handles the leave from the RunL()
+// -----------------------------------------------------------------------------
+//
+TInt CCmmDbChangeListener::RunError( TInt /*aLeaveCode*/ )
+    {
+    OstTrace0( TRACE_ERROR, CCMMDBCHANGELISTENER_RUNERROR, "CCmmDbChangeListener::RunError" );
+
+    return KErrNone;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1842 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Session side object representing a destination.
+*
+*/
+
+
+#include <cmpluginbaseeng.h>
+#include <datamobilitycommsdattypes.h>
+#include <cmpluginembdestinationdef.h>
+
+#include "cmmdestinationinstance.h"
+#include "cmmsession.h"
+#include "cmmcache.h"
+#include "cmmconnmethodinstance.h"
+#include "cmmconnmethoditem.h"
+#include "cmmanagertextresolver.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmdestinationinstanceTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationInstance* CCmmDestinationInstance::NewL(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_NEWL_ENTRY );
+
+    CCmmDestinationInstance* self = CCmmDestinationInstance::NewLC( aCmmSession, aCache );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationInstance* CCmmDestinationInstance::NewLC(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_NEWLC_ENTRY );
+
+    CCmmDestinationInstance* self = new( ELeave ) CCmmDestinationInstance( aCmmSession, aCache );
+    CleanupClosePushL( *self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationInstance::~CCmmDestinationInstance()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CCMMDESTINATIONINSTANCE_ENTRY );
+
+    // Tell cache this handle is beeing closed. Cache will update it's own
+    // bookkeeping accordingly.
+    if ( iCache )
+        {
+        iCache->CloseDestination( *this );
+        }
+    delete iNetworkRecord;
+    delete iDestApRecord;
+    delete iMetadataRecord;
+
+    iConnMethodItemArray.Close();
+    iConnMethodsToBeDeleted.Close();
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CCMMDESTINATIONINSTANCE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationInstance::CCmmDestinationInstance(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
+        :
+        iCmmSession( aCmmSession ),
+        iCache( aCache )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONINSTANCE_CCMMDESTINATIONINSTANCE_ENTRY );
+
+    iNetworkRecord = NULL;
+    iDestApRecord = NULL;
+    iMetadataRecord = NULL;
+
+    iNetworkRecordStatus = ECmmRecordStatusBlank;
+    iDestApRecordStatus = ECmmRecordStatusBlank;
+    iMetadataRecordStatus = ECmmRecordStatusBlank;
+
+    iStatus = ECmmDestinationStatusChanged;
+    iId = 0;
+    iHandle = 0;
+
+    iProtectionChanged = EFalse;
+    iLastProtectionLevel = CMManager::EProtLevel0;
+    iCurrentProtectionLevel = CMManager::EProtLevel0;
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_CCMMDESTINATIONINSTANCE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONSTRUCTL_ENTRY );
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set the destination ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetId( const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETID_ENTRY );
+
+    iId = aId;
+
+    // If this is the real ID (not the temporary ID of a new unsaved destination),
+    // write it also into network record.
+    if ( aId > KCmmDestIdIntervalMin && aId < KCmmDestIdIntervalMax )
+        {
+        iNetworkRecord->SetRecordId( aId - KCmDefaultDestinationAPTagId );
+        iDestApRecord->iRecordTag = aId;
+        iDestApRecord->iCustomSelectionPolicy = ( aId - KCmDefaultDestinationAPTagId );
+        iMetadataRecord->iSNAP = aId;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination ID.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDestinationInstance::GetId() const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETID_ENTRY );
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETID_EXIT );
+    return iId;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the current status of this destination.
+// ECmmDestinationStatusValid: Contents in sync with database.
+// ECmmDestinationStatusChanged: Contents differ from database contents.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetStatus( const TCmmDestinationStatus& aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETSTATUS_ENTRY );
+
+    switch ( aStatus )
+        {
+        // Fallthrough intended
+        case ECmmDestinationStatusValid:
+        case ECmmDestinationStatusChanged:
+            iStatus = aStatus;
+            break;
+        default:
+            ASSERT(0); // Error, invalid status.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETSTATUS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the current status of this destination instance.
+// ---------------------------------------------------------------------------
+//
+TCmmDestinationStatus CCmmDestinationInstance::GetStatus() const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETSTATUS_ENTRY );
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETSTATUS_EXIT );
+    return iStatus;
+    }
+
+// ---------------------------------------------------------------------------
+// Get handle ID.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationInstance::GetHandle() const
+    {
+    return iHandle;
+    }
+
+// ---------------------------------------------------------------------------
+// Set handle ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetHandle( const TInt aHandle )
+    {
+    iHandle = aHandle;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the record status for all records.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetStatusForAllRecords( const TCmmRecordStatus& aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETSTATUSFORALLRECORDS_ENTRY );
+
+    iDestApRecordStatus = aStatus;
+    iNetworkRecordStatus = aStatus;
+    iMetadataRecordStatus = aStatus;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETSTATUSFORALLRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination element ID.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDestinationInstance::GetElementIdL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETELEMENTIDL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
+
+    if ( !iNetworkRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETELEMENTIDL_EXIT );
+    return iNetworkRecord->ElementId() & KCDMaskShowField;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination access point record's record tag (destination ID).
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDestinationInstance::GetRecordTagFromApRecordL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETRECORDTAGFROMAPRECORDL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestApRecord );
+
+    if ( !iDestApRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETRECORDTAGFROMAPRECORDL_EXIT );
+    return iDestApRecord->iRecordTag;
+    }
+
+// ---------------------------------------------------------------------------
+// Sets a record pointer to the one given as parameter, Ownership is
+// transfered. Also deletes the previous pointer and sets the record status
+// to 'ECmmRecordStatusLoaded'.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationInstance::SetRecordPointer(
+        const TCmmDbRecords& aDestRecord,
+        CommsDat::CCDRecordBase* aRecordPointer )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETRECORDPOINTER_ENTRY );
+
+    TInt ret( KErrNone );
+    switch ( aDestRecord )
+        {
+        case ECmmDestNetworkRecord:
+            {
+            delete iNetworkRecord;
+            iNetworkRecord = static_cast<CommsDat::CCDNetworkRecord*>( aRecordPointer );
+            iNetworkRecordStatus = ECmmRecordStatusLoaded;
+            }
+            break;
+        case ECmmDestApRecord:
+            {
+            delete iDestApRecord;
+            iDestApRecord = static_cast<CommsDat::CCDAccessPointRecord*>( aRecordPointer );
+            iDestApRecordStatus = ECmmRecordStatusLoaded;
+            }
+            break;
+        case ECmmDestMetadataRecord:
+            {
+            delete iMetadataRecord;
+            iMetadataRecord = static_cast<CCDSNAPMetadataRecord*>( aRecordPointer );
+            iMetadataRecordStatus = ECmmRecordStatusLoaded;
+            }
+            break;
+        default:
+            {
+            ret = KErrNotFound;
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETRECORDPOINTER_EXIT );
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Gets a reference to the requested record pointer.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationInstance::GetRecordPointer(
+        const TCmmDbRecords& aDestRecord,
+        CommsDat::CCDRecordBase*& aRecordPointer )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETRECORDPOINTER_ENTRY );
+
+    TInt ret( KErrNone );
+    aRecordPointer = NULL;
+    switch ( aDestRecord )
+        {
+        case ECmmDestNetworkRecord:
+            {
+            aRecordPointer = static_cast<CommsDat::CCDRecordBase*>( iNetworkRecord );
+            }
+            break;
+        case ECmmDestApRecord:
+            {
+            aRecordPointer = static_cast<CommsDat::CCDRecordBase*>( iDestApRecord );
+            }
+            break;
+        case ECmmDestMetadataRecord:
+            {
+            aRecordPointer = static_cast<CommsDat::CCDRecordBase*>( iMetadataRecord );
+            }
+            break;
+        default:
+            {
+            ASSERT( 0 );
+            ret = KErrNotFound;
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETRECORDPOINTER_EXIT );
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Save the contents of this destination into database. All connection methods
+// including embedded destination, that the client has open handles to, are
+// also updated.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::UpdateL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_UPDATEL_ENTRY );
+
+    if ( AllMandatoryRecordsContainData() )
+        {
+        // Check for metadata conflicts.
+        if ( ConflictingMetadataFoundL() )
+            {
+            OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_UPDATEL_EXIT );
+
+            User::Leave( KErrAlreadyExists );
+            }
+
+        // Check that the destination name is still valid and not in use already.
+        if ( iCache->DestinationExistsWithNameL( iNetworkRecord->iRecordName.GetL(), iId ) )
+            {
+            OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_UPDATEL_EXIT );
+
+            User::Leave( KErrAlreadyExists );
+            }
+
+        iCache->UpdateDestinationL( *this );
+        }
+    else
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( DUP2_CCMMDESTINATIONINSTANCE_UPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination name.
+// ---------------------------------------------------------------------------
+//
+TDesC& CCmmDestinationInstance::GetDestinationNameL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETDESTINATIONNAMEL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
+
+    if ( !iNetworkRecord )
+        {
+        OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETDESTINATIONNAMEL_EXIT );
+
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_GETDESTINATIONNAMEL_EXIT );
+    return iNetworkRecord->iRecordName.GetL();
+    }
+
+// ---------------------------------------------------------------------------
+// Get the localised destination name.
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmmDestinationInstance::GetLocalisedDestinationNameL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETLOCALISEDDESTINATIONNAMEL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
+
+    if ( !iNetworkRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    TUint32 purpose( 0 );
+    GetMetadataL( CMManager::ESnapMetadataPurpose, purpose );
+    HBufC* resolvedText( NULL );
+    TBool isLocalised( EFalse );
+    switch ( purpose )
+        {
+        case CMManager::ESnapPurposeInternet:
+            {
+            _LIT( KDestinationTextId, "txt_occ_dblist_internet");
+            resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
+            isLocalised = ETrue;
+            }
+            break;
+        case CMManager::ESnapPurposeOperator:
+            {
+            _LIT( KDestinationTextId, "txt_occ_dblist_operator_services");
+            resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
+            isLocalised = ETrue;
+            }
+            break;
+        case CMManager::ESnapPurposeIntranet:
+            {
+            _LIT( KDestinationTextId, "txt_occ_dblist_intranet");
+            resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
+            isLocalised = ETrue;
+            }
+            break;
+        default:
+            break;
+        }
+
+    // Not Internet, operator or intranet, or something went wrong.
+    if ( !isLocalised || ( isLocalised && !resolvedText ) )
+        {
+        resolvedText = TPtrC( iNetworkRecord->iRecordName ).AllocL();
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETLOCALISEDDESTINATIONNAMEL_EXIT );
+    return resolvedText;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the destination name.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetDestinationNameL( const TDesC& aDestinationName )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETDESTINATIONNAMEL_ENTRY );
+
+    // Write action, load all records.
+    LoadAllRecordsL();
+
+    iNetworkRecord->iRecordName.SetL( aDestinationName );
+    iDestApRecord->iRecordName.SetL( aDestinationName );
+
+    iNetworkRecordStatus = ECmmRecordStatusModified;
+    iDestApRecordStatus = ECmmRecordStatusModified;
+    iStatus = ECmmDestinationStatusChanged;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETDESTINATIONNAMEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination icon.
+// ---------------------------------------------------------------------------
+//
+HBufC* CCmmDestinationInstance::GetDestinationIconL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETDESTINATIONICONL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
+
+    if ( !iMetadataRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    HBufC* icon( NULL );
+    icon = TPtrC( iMetadataRecord->iIconFileName ).AllocL();
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETDESTINATIONICONL_EXIT );
+    return icon;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the destination icon.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetDestinationIconL( const TDesC& aDestinationIcon )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETDESTINATIONICONL_ENTRY );
+
+    // Write action, load all records.
+    LoadAllRecordsL();
+
+    iMetadataRecord->iIconFileName.SetL( aDestinationIcon );
+
+    iMetadataRecordStatus = ECmmRecordStatusModified;
+    iStatus = ECmmDestinationStatusChanged;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETDESTINATIONICONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get metadata of specified type.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::GetMetadataL(
+        const CMManager::TSnapMetadataField& aMetadataField,
+        TUint32& aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETMETADATAL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
+
+    if ( !iMetadataRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    switch ( aMetadataField )
+        {
+        case CMManager::ESnapMetadataInternet:
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataInternet;
+            break;
+        case CMManager::ESnapMetadataHighlight:
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataHighlight;
+            break;
+        case CMManager::ESnapMetadataHiddenAgent:
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataHiddenAgent;
+            break;
+        case CMManager::ESnapMetadataDestinationIsLocalised:
+            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
+            break;
+        case CMManager::ESnapMetadataPurpose:
+            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataPurpose ) >> 8;
+            break;
+        default:
+            User::Leave( KErrArgument );
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETMETADATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of specified type.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataL(
+        const CMManager::TSnapMetadataField& aMetadataField,
+        const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAL_ENTRY );
+
+    // Write action, load all records.
+    LoadAllRecordsL();
+
+    switch ( aMetadataField )
+        {
+        case CMManager::ESnapMetadataInternet:
+            SetMetadataInternetL( aMetadata );
+            break;
+        case CMManager::ESnapMetadataHighlight:
+            SetMetadataHighlight( aMetadata );
+            break;
+        case CMManager::ESnapMetadataHiddenAgent:
+            SetMetadataHiddenAgentL( aMetadata );
+            break;
+        case CMManager::ESnapMetadataDestinationIsLocalised:
+            SetMetadataLocalizationL( aMetadata );
+            break;
+        case CMManager::ESnapMetadataPurpose:
+            SetMetadataPurposeL( aMetadata );
+            break;
+        default:
+            User::Leave( KErrArgument );
+            break;
+        }
+
+    iMetadataRecordStatus = ECmmRecordStatusModified;
+    iStatus = ECmmDestinationStatusChanged;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get destination protection level.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::GetProtectionL( CMManager::TProtectionLevel& aProtectionLevel )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETPROTECTIONL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
+
+    if ( !iMetadataRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    TUint32 value = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+            KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
+    switch ( value )
+        {
+        case CMManager::EProtLevel0:
+            aProtectionLevel = CMManager::EProtLevel0;
+            break;
+        case CMManager::EProtLevel1:
+            aProtectionLevel = CMManager::EProtLevel1;
+            break;
+        case CMManager::EProtLevel2:
+            aProtectionLevel = CMManager::EProtLevel2;
+            break;
+        case CMManager::EProtLevel3:
+            aProtectionLevel = CMManager::EProtLevel3;
+            break;
+        default:
+            User::Leave( KErrCorrupt );
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETPROTECTIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set destination protection level.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetProtectionL(
+        CMManager::TProtectionLevel aProtectionLevel )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETPROTECTIONL_ENTRY );
+
+    // Write action, load all records.
+    LoadAllRecordsL();
+
+    // Protection level is saved to CommsDat during update-call, so we need to
+    // keep track of both the original value and the currently set new value.
+    iCurrentProtectionLevel = aProtectionLevel;
+    if ( !iProtectionChanged )
+        {
+        GetProtectionL( iLastProtectionLevel );
+        }
+    if ( aProtectionLevel == iLastProtectionLevel )
+        {
+        iProtectionChanged = EFalse;
+        }
+    else
+        {
+        iProtectionChanged = ETrue;
+        }
+
+    // Read current metadata without protection bits.
+    TUint32 currentMetadata =
+            ( ( TUint32 )( iMetadataRecord->iMetadata ) & ( ~KDestProtectionLevelMask ) );
+    // Add new protection bits.
+    iMetadataRecord->iMetadata =
+            currentMetadata | ( aProtectionLevel << KBitsToShiftDestProtectionLevel );
+
+    iMetadataRecordStatus = ECmmRecordStatusModified;
+    iStatus = ECmmDestinationStatusChanged;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETPROTECTIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return true if protection level has been changed.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::ProtectionChanged()
+    {
+    return iProtectionChanged;
+    }
+
+// ---------------------------------------------------------------------------
+// Return the previous valid protection level of this connection method
+// instance.
+// ---------------------------------------------------------------------------
+//
+CMManager::TProtectionLevel CCmmDestinationInstance::LastProtectionLevel()
+    {
+    return iLastProtectionLevel;
+    }
+
+// ---------------------------------------------------------------------------
+// Return the protection level currently set into this destination instance.
+// ---------------------------------------------------------------------------
+//
+CMManager::TProtectionLevel CCmmDestinationInstance::CurrentProtectionLevelL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CURRENTPROTECTIONLEVELL_ENTRY );
+
+    CMManager::TProtectionLevel protLevel( iCurrentProtectionLevel );
+    if ( !iProtectionChanged )
+        {
+        GetProtectionL( protLevel );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CURRENTPROTECTIONLEVELL_EXIT );
+    return protLevel;
+    }
+
+// ---------------------------------------------------------------------------
+// Adds a connection method into this destination. Returns the index (priority)
+// in the connection method array where the connection method was added.
+// Embedded destinations can not be added with this method, use
+// AddEmbeddedDestinationL() instead.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationInstance::AddConnMethodL(
+        CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_ADDCONNMETHODL_ENTRY );
+
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+
+    // Check that the connection method is not an embedded destination.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check that the connection method is not already inside this destination.
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( connMethodId == iConnMethodItemArray[i].iId )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // Remove the connection method from delete list, if found there.
+    for ( TInt i = 0; i < iConnMethodsToBeDeleted.Count(); i++ )
+        {
+        if ( connMethodId == iConnMethodsToBeDeleted[i] )
+            {
+            iConnMethodsToBeDeleted.Remove( i );
+            break;
+            }
+        }
+
+    // Get the priority value of this connection method according to bearer.
+    TUint32 bearerType( aConnMethodInstance.GetBearerType() );
+    TUint bearerPriority( 0 );
+    iCache->BearerPriorityFromIapRecordL(
+            ( CommsDat::CCDIAPRecord* )aConnMethodInstance.GetPluginDataInstance()
+                    ->iGenRecordArray[KIapRecordIndex],
+            bearerPriority );
+    TCmmConnMethodItem item( connMethodId, bearerType, bearerPriority, 0 );
+
+    // Find out the correct position for the connection method inside this
+    // destination.
+
+    // If the destination contains 1 or more connection methods of the same
+    // bearer type, position the new connection method after the last of these
+    // connection methods.
+    // If not, position the connection method before the first connection
+    // method found that has an equal or greater bearer based priority.
+
+    // The relevant connection method item count is the number of connection
+    // methods excluding a possible embedded destination.
+    TInt relevantCount = iConnMethodItemArray.Count();
+    if ( relevantCount > 0 && iConnMethodItemArray[ relevantCount - 1 ].IsEmbedded() )
+        {
+        relevantCount--;
+        }
+    // The final position will be between 0 and relevantCount.
+    TInt index( relevantCount );
+
+    TBool positionFound( EFalse );
+    TBool connMethodIsVirtual = aConnMethodInstance.GetBoolAttributeL( CMManager::ECmVirtual );
+    if ( connMethodIsVirtual )
+        {
+        // Ask link information only if this is a virtual IAP.
+        TUint32 linkedIapId = aConnMethodInstance.GetIntAttributeL( CMManager::ECmNextLayerIapId );
+        if ( linkedIapId == 0 )
+            {
+            // If this is a virtual IAP that doesn't point to an IAP, position it at
+            // the end of the list.
+            item.iPriority = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+            index = relevantCount;
+            positionFound = ETrue;
+            }
+        else
+            {
+            // If this is a virtual IAP that links to another IAP, position it
+            // as if it was that IAP.
+            TCmmConnMethodItem linkedItem;
+            TInt err = iCache->GetConnMethodItem( linkedIapId, linkedItem );
+            if ( err )
+                {
+                User::Leave( KErrArgument );
+                }
+            if ( linkedItem.IsVirtual() )
+                {
+                // This is a virtual IAP linking to another virtual IAP.
+                index = relevantCount;
+                positionFound = ETrue;
+                }
+            bearerType = linkedItem.iBearerType;
+            bearerPriority = linkedItem.iBearerPriority;
+            }
+        }
+
+    if ( !positionFound )
+        {
+        // Search for any connection methods with the same bearer type.
+        for ( TInt i = 0; i < relevantCount; i++ )
+            {
+            if ( iConnMethodItemArray[i].iBearerType == bearerType )
+                {
+                index = i + 1;
+                positionFound = ETrue;
+                // Don't break, need find last item.
+                }
+            }
+        }
+    if ( !positionFound )
+        {
+        // No connection method found with the same bearer type. Position
+        // the connection method according to bearer priority.
+        for ( TInt i = 0; i < relevantCount; i++ )
+            {
+            if ( iConnMethodItemArray[i].iBearerPriority >= bearerPriority )
+                {
+                index = i;
+                break;
+                }
+            }
+        }
+
+    // Add the connection method item into this destination at the correct
+    // position (priority).
+    iConnMethodItemArray.InsertL( item, index );
+
+    SetStatus( ECmmDestinationStatusChanged );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_ADDCONNMETHODL_EXIT );
+    return index;
+    }
+
+// ---------------------------------------------------------------------------
+// Adds an embedded destination into this destination. Returns the index in
+// the connection method array where the connection method was added.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationInstance::AddEmbeddedDestinationL(
+        const CCmmDestinationInstance& aEmbeddedDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_ADDEMBEDDEDDESTINATIONL_ENTRY );
+
+    TUint32 embeddedDestinationId( aEmbeddedDestinationInstance.GetId() );
+
+    // Check that not adding itself.
+    if ( embeddedDestinationId == iId )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check that the embedded destination is not already an embedded
+    // destination in this destination.
+    if ( HasEmbeddedWithId( embeddedDestinationId ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    // A destination can not be added into a destination that is itself an
+    // embedded destination.
+    if ( iCache->DestinationIsEmbedded( iId ) )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // A destination can not be added into a destination that already has an
+    // embedded destination.
+    if ( HasEmbedded() || iCache->DestinationHasEmbedded( iId ) )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // A destination that already has an embedded destination can not be added
+    // into a destination.
+    if ( aEmbeddedDestinationInstance.HasEmbedded() ||
+            iCache->DestinationHasEmbedded( embeddedDestinationId ) )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // Check session side destination instances for all clients.
+    // - Check that any destination instance does not contain aDestinationId as
+    //   embedded destination.
+    // - Check that any destination instance for aEmbeddedDestinationId does
+    //   not contain an embedded destination.
+    if ( iCmmSession->EmbeddedDestinationConflictsFromAllSessions( iId, embeddedDestinationId ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    // Add the embedded destination at the end of the connection method item array.
+    TInt index = iConnMethodItemArray.Count();
+    TCmmConnMethodItem item(
+            embeddedDestinationId,
+            KUidEmbeddedDestination,
+            CMManager::KDataMobilitySelectionPolicyPriorityWildCard,
+            CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
+    iConnMethodItemArray.AppendL( item );
+
+    SetStatus( ECmmDestinationStatusChanged );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_ADDEMBEDDEDDESTINATIONL_EXIT );
+    return index;
+    }
+
+// ---------------------------------------------------------------------------
+// Delete a connection method that belongs to this destination. If the
+// connection method belongs to any other destination, it is only removed from
+// this destination and not deleted. Does not call update.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::DeleteConnMethodFromDestinationL(
+        const CCmmConnMethodInstance& aConnMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_DELETECONNMETHODFROMDESTINATIONL_ENTRY );
+
+    // Check that the connection method is inside this destination.
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+    TInt index( KErrNotFound );
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( connMethodId == iConnMethodItemArray[i].iId )
+            {
+            index = i;
+            break;
+            }
+        }
+    if ( index < 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check if the connection method removal is blocked by any virtual IAPs.
+    if ( ConnMethodInDestinationButLocked( connMethodId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+
+    // Check if any virtual IAP points to this connection method, thus blocking
+    // the delete.
+    if ( iCache->ConnMethodPointedToByVirtualIap( connMethodId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+
+    // Check that the connection method is not in use by an active connection.
+    if ( iCache->CheckIfCmConnected( connMethodId ) )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    // This will also remove an embedded destination.
+    iConnMethodItemArray.Remove( index );
+    SetStatus( ECmmDestinationStatusChanged );
+
+    // If this connection method is an embedded destination, then removing it
+    // from this destination is enough. The destination is not deleted.
+    if ( !aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        // Add connection method to delete list only if not referenced from any
+        // other destination (in database or in any destination handles for the
+        // client currently beeing served).
+        if ( !iCache->ConnMethodInOtherDestination( connMethodId, iId ) &&
+                !iCmmSession->ConnMethodInOtherDestination( connMethodId, iId ) )
+            {
+            if ( iConnMethodsToBeDeleted.Find( connMethodId ) == KErrNotFound )
+                {
+                iConnMethodsToBeDeleted.AppendL( connMethodId );
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_DELETECONNMETHODFROMDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove a connection method from this destination. If the second attribute
+// aTestIfConnected is false, the test to check if connection method is in use
+// is skipped. In this case this should have been already tested by the caller.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::RemoveConnMethodFromDestinationL(
+        const CCmmConnMethodInstance& aConnMethodInstance,
+        const TBool aTestIfConnected )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REMOVECONNMETHODFROMDESTINATIONL_ENTRY );
+
+    // Check that the connection method is inside this destination.
+    TUint32 connMethodId( aConnMethodInstance.GetId() );
+    TInt index( KErrNotFound );
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( connMethodId == iConnMethodItemArray[i].iId )
+            {
+            index = i;
+            break;
+            }
+        }
+    if ( index < 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check if the connection method removal is blocked by any virtual IAPs.
+    if ( ConnMethodInDestinationButLocked( connMethodId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+
+    if ( aTestIfConnected )
+        {
+        // Check that the connection method is not in use by an active connection.
+        if ( iCache->CheckIfCmConnected( connMethodId ) )
+            {
+            User::Leave( KErrInUse );
+            }
+        }
+
+    // This will also remove an embedded destination.
+    iConnMethodItemArray.Remove( index );
+    SetStatus( ECmmDestinationStatusChanged );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_REMOVECONNMETHODFROMDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Modifies the priority of a connection method inside this destination.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::ModifyConnMethodPriorityL(
+        CCmmConnMethodInstance& aConnMethodInstance,
+        TUint aIndex )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_ENTRY );
+
+    // Check index range.
+    if ( aIndex >= iConnMethodItemArray.Count() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check if the connection method is in this destination. Also store the
+    // current index of the connection method.
+    TInt oldIndex( KErrNotFound );
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aConnMethodInstance.GetId() )
+            {
+            oldIndex = i;
+            break;
+            }
+        }
+    if ( oldIndex == KErrNotFound )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // If connection method is an embedded destination, just return silently.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+        return;
+        }
+
+    // If connection method is a virtual IAP linking to a destination, just return silently.
+    if ( aConnMethodInstance.GetBoolAttributeL( CMManager::ECmVirtual ) &&
+            aConnMethodInstance.GetIntAttributeL( CMManager::ECmNextLayerIapId ) == 0 )
+        {
+        OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+        return;
+        }
+
+    // If the given index points to any wildcard priority connection method,
+    // adjust it so it points to the last priority position.
+    TUint numberOfConnMethodsWithPriority( NumberOfConnMethodsWithPriority() );
+    if ( aIndex >= numberOfConnMethodsWithPriority )
+        {
+        if ( numberOfConnMethodsWithPriority == 0 )
+            {
+            // Can't be 0, since aConnMethodInstance is not a wildcard IAP and
+            // is in the array.
+            ASSERT( 0 );
+            User::Leave( KErrCorrupt );
+            }
+        aIndex = numberOfConnMethodsWithPriority - 1;
+        }
+
+    // Check if the priority is changing from current.
+    if ( oldIndex == aIndex )
+        {
+        OstTraceFunctionExit0( DUP2_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+        return;
+        }
+
+    // Change the location of the connection method to reflect the new priority.
+    TCmmConnMethodItem item = iConnMethodItemArray[oldIndex];
+    iConnMethodItemArray.Remove( oldIndex );
+    iConnMethodItemArray.InsertL( item, ( TInt )aIndex );
+
+    SetStatus( ECmmDestinationStatusChanged );
+
+    OstTraceFunctionExit0( DUP3_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Finds a connection method instance that belongs to the same session and
+// matches the provided ID. Return NULL if no match is found.
+// ---------------------------------------------------------------------------
+//
+CCmmConnMethodInstance* CCmmDestinationInstance::FindConnMethodInstanceFromSessionById(
+        const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_FINDCONNMETHODINSTANCEFROMSESSIONBYID_ENTRY );
+
+    CCmmConnMethodInstance* connMethodInstance = iCmmSession->
+            FindConnMethodInstanceById( aConnMethodId );
+
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_FINDCONNMETHODINSTANCEFROMSESSIONBYID_EXIT );
+    return connMethodInstance;
+    }
+
+// ---------------------------------------------------------------------------
+// Finds a destination instance that belongs to the same session and matches
+// the provided ID. Return NULL if no match is found.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationInstance* CCmmDestinationInstance::FindDestinationInstanceFromSessionById(
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_FINDDESTINATIONINSTANCEFROMSESSIONBYID_ENTRY );
+
+    CCmmDestinationInstance* destInstance =
+            iCmmSession->FindDestinationInstanceById( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_FINDDESTINATIONINSTANCEFROMSESSIONBYID_EXIT );
+    return destInstance;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from all open destination handles in the same session if the given
+// connection method is inside any of them. The given destination is skipped.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::ConnMethodInOtherDestinationInSession(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONNMETHODINOTHERDESTINATIONINSESSION_ENTRY );
+
+    TBool inOtherSession = iCmmSession->
+            ConnMethodInOtherDestination( aConnMethodId, aDestinationId );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CONNMETHODINOTHERDESTINATIONINSESSION_EXIT );
+    return inOtherSession;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method is in this destination. Include
+// embedded destinations.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::ValidConnMethodIdInDestinationIncludeEmbedded(
+        const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_VALIDCONNMETHODIDINDESTINATIONINCLUDEEMBEDDED_ENTRY );
+
+    TBool validity( EFalse );
+    if ( aConnMethodId > 0 )
+        {
+        for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+            {
+            if ( iConnMethodItemArray[i].iId == aConnMethodId )
+                {
+                validity = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_VALIDCONNMETHODIDINDESTINATIONINCLUDEEMBEDDED_EXIT );
+    return validity;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method is inside this destination and if it
+// is in a 'locked' status. A locked connection method can't be deleted nor
+// removed from the destination. A connection method becomes locked if it is
+// the only remaining connection method in a destination and a virtual IAP
+// points into that destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::ConnMethodInDestinationButLocked(
+        const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
+
+    TBool result( EFalse );
+    if ( iConnMethodItemArray.Count() == 1 )
+        {
+        if ( iConnMethodItemArray[0].iId == aConnMethodId )
+            {
+            if ( iCache->DestinationPointedToByVirtualIap( iId ) )
+                {
+                result = ETrue;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CONNMETHODINDESTINATIONBUTLOCKED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Counts how many connection methods that require priority information are
+// currently in this destination. This excludes any virtual IAPs that point to
+// a destination or any embedded destinations from the count. Assumes the
+// connection method array is in order so all wildcard priority IAPs are at the
+// end of the list.
+// ---------------------------------------------------------------------------
+//
+TUint CCmmDestinationInstance::NumberOfConnMethodsWithPriority() const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_NUMBEROFCONNMETHODSWITHPRIORITY_ENTRY );
+
+    TUint count( iConnMethodItemArray.Count() );
+
+    for ( TUint i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].IsEmbedded() || iConnMethodItemArray[i].iPriority ==
+                CMManager::KDataMobilitySelectionPolicyPriorityWildCard )
+            {
+            count--;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_NUMBEROFCONNMETHODSWITHPRIORITY_EXIT );
+    return count;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if this destination has an embedded destination. Checks the current
+// (possibly unsaved) status of this destination handle, not the current status
+// in database.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::HasEmbedded() const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_HASEMBEDDED_ENTRY );
+
+    TBool result( EFalse );
+
+    // If there is an embedded destination, it will be at the very last
+    // position in the connection method item array.
+    TInt index = iConnMethodItemArray.Count() - 1;
+    if ( index >= 0 )
+        {
+        if ( iConnMethodItemArray[index].IsEmbedded() )
+            {
+            result = ETrue;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_HASEMBEDDED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if this destination has an embedded destination with the specified ID.
+// Checks the current (possibly unsaved) status of this destination handle, not
+// the current status in database.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::HasEmbeddedWithId( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_HASEMBEDDEDWITHID_ENTRY );
+
+    TBool result( EFalse );
+
+    // If there is an embedded destination, it will be at the very last
+    // position in the connection method item array.
+    TInt index = iConnMethodItemArray.Count() - 1;
+    if ( index >= 0 )
+        {
+        // No need to check bearer, since ID will not match anyway if the last
+        // item is not an embedded destination.
+        if ( iConnMethodItemArray[index].iId == aDestinationId )
+            {
+            result = ETrue;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_HASEMBEDDEDWITHID_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// After update/delete to database, refresh temporary ID to real ID if
+// necessary and refresh status information for any related handles for
+// all client sessions.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::RefreshHandlesForAllSessions( const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REFRESHHANDLESFORALLSESSIONS_ENTRY );
+
+    iCmmSession->RefreshHandlesForAllSessions( aIdStruct );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_REFRESHHANDLESFORALLSESSIONS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// If the destination contains a connection method with matching temporary ID,
+// updates the ID to real ID. This is done after the connection method has been
+// successfully saved into the database.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::RefreshConnMethodId( const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REFRESHCONNMETHODID_ENTRY );
+
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aIdStruct.iTemporaryId )
+            {
+            iConnMethodItemArray[i].iId = aIdStruct.iRealId;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_REFRESHCONNMETHODID_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Called after this destination has been updated and database transaction has
+// completed successfully. Sets the internal state of this destination instance
+// to reflect the new valid state.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::UpdateSuccessful()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_UPDATESUCCESSFUL_ENTRY );
+
+    SetStatus( ECmmDestinationStatusValid );
+    SetStatusForAllRecords( ECmmRecordStatusLoaded );
+    iConnMethodsToBeDeleted.Reset();
+    iProtectionChanged = EFalse;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_UPDATESUCCESSFUL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Checks if all mandatory records contain data and are ready to be saved into
+// database.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::AllMandatoryRecordsContainData() const
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_ALLMANDATORYRECORDSCONTAINDATA_ENTRY );
+
+    TBool result( ETrue );
+
+    if ( iNetworkRecordStatus != ECmmRecordStatusLoaded &&
+            iNetworkRecordStatus != ECmmRecordStatusModified )
+        {
+        result = EFalse;
+        }
+    if ( iDestApRecordStatus != ECmmRecordStatusLoaded &&
+            iDestApRecordStatus != ECmmRecordStatusModified )
+        {
+        result = EFalse;
+        }
+    if ( iMetadataRecordStatus != ECmmRecordStatusLoaded &&
+            iMetadataRecordStatus != ECmmRecordStatusModified )
+        {
+        result = EFalse;
+        }
+    if ( !iNetworkRecord || !iDestApRecord || !iMetadataRecord )
+        {
+        result = EFalse;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_ALLMANDATORYRECORDSCONTAINDATA_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Loads a requested type of record from database if it is not yet loaded.
+//
+// Currently all records are loaded when client opens a handle to a
+// destination, but if future optimizations are added and records are only
+// loaded when needed, the functionality of this method becomes essential.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::LoadRecordIfMissingL( TCmmDbRecords aRecordType )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REFRESHRECORDL_ENTRY );
+
+    TCmmRecordStatus status( ECmmRecordStatusBlank );
+    switch ( aRecordType )
+        {
+        case ECmmDestNetworkRecord:
+            status = iNetworkRecordStatus;
+            break;
+        case ECmmDestApRecord:
+            status = iDestApRecordStatus;
+            break;
+        case ECmmDestMetadataRecord:
+            status = iMetadataRecordStatus;
+            break;
+        default:
+            User::Leave( KErrCorrupt ); // Error, unknown type.
+            break;
+        }
+
+    switch ( status )
+        {
+        // Fallthrough intended
+        case ECmmRecordStatusBlank:
+            iCache->LoadDestinationRecordL( *this, aRecordType );
+            break;
+        case ECmmRecordStatusLoaded:
+        case ECmmRecordStatusModified:
+            // Record is up-to-date.
+            break;
+        case ECmmRecordStatusExpired:
+        case ECmmRecordStatusUnsaved:
+        default:
+            User::Leave( KErrCorrupt ); // Error, invalid or unknown status.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_REFRESHRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Loads all records from database that are not up-to-date.
+// Guarantees the record pointers are valid or leaves.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::LoadAllRecordsL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_LOADALLRECORDSL_ENTRY );
+
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
+    LoadRecordIfMissingL( ECmmDestApRecord );
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
+
+    if ( !iNetworkRecord || !iDestApRecord || !iMetadataRecord )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_LOADALLRECORDSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of type ESnapMetadataInternet.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataInternetL( const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAINTERNETL_ENTRY );
+
+    if ( aMetadata )
+        {
+        if ( iCache->DestinationExistsWithMetadataLocalizedL(
+                *this,
+                CMManager::ELocalisedDestInternet ) )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        // Clear ESnapMetadataHiddenAgent-bit.
+        TUint32 value = iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHiddenAgent );
+
+        // Set old ESnapMetadataInternet-bit.
+        value = value | CMManager::ESnapMetadataInternet;
+
+        // Clear ESnapMetadataDestinationIsLocalised-bits.
+        value = value & ( ~CMManager::ESnapMetadataDestinationIsLocalised );
+        // Set ELocalisedDestInternet-value.
+        iMetadataRecord->iMetadata = value | ( CMManager::ELocalisedDestInternet << 4 );
+        value = value | ( CMManager::ELocalisedDestInternet << 4 );
+
+        // Clear ESnapMetadataPurpose-bits.
+        value = value & ( ~CMManager::ESnapMetadataPurpose );
+        // Set ESnapPurposeInternet-value.
+        iMetadataRecord->iMetadata = value | ( CMManager::ESnapPurposeInternet << 8 );
+        }
+    else
+        {
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and CMManager::ESnapMetadataPurpose-bits.
+        TUint32 temp = ~( CMManager::ESnapMetadataInternet |
+                CMManager::ESnapMetadataDestinationIsLocalised |
+                CMManager::ESnapMetadataPurpose );
+        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAINTERNETL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of type ESnapMetadataHighlight.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataHighlight( const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAHIGHLIGHTL_ENTRY );
+
+    // TODO: Old CmManager does not perform any duplicate checks when setting highlight.
+    // Now with single click this is not used anymore anyway. So I suggest we don't add any checks here.
+    if ( aMetadata )
+        {
+        // Set ESnapMetadataHighlight-bit.
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata | CMManager::ESnapMetadataHighlight;
+        }
+    else
+        {
+        // Clear ESnapMetadataHighlight-bit.
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHighlight );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAHIGHLIGHTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of type ESnapMetadataHiddenAgent.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataHiddenAgentL( const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAHIDDENAGENTL_ENTRY );
+
+    if ( aMetadata )
+        {
+        TUint32 metadataInternet( iMetadataRecord->iMetadata &
+                CMManager::ESnapMetadataInternet );
+        TUint32 metadataLocalized( ( iMetadataRecord->iMetadata &
+                CMManager::ESnapMetadataDestinationIsLocalised ) >> 4 );
+        TUint32 metadataPurpose( ( iMetadataRecord->iMetadata &
+                CMManager::ESnapMetadataPurpose ) >> 8 );
+        if ( metadataInternet ||
+                ( metadataLocalized == CMManager::ELocalisedDestInternet ) ||
+                ( metadataPurpose == CMManager::ESnapPurposeInternet ) )
+            {
+            // Not allowed to set ESnapMetadataHiddenAgent if destination is
+            // localized or has purpose set.
+            User::Leave( KErrArgument );
+            }
+        // Set ESnapMetadataHiddenAgent-bit.
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata | CMManager::ESnapMetadataHiddenAgent;
+        }
+    else
+        {
+        // Clear ESnapMetadataHiddenAgent-bit.
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHiddenAgent );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAHIDDENAGENTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of type ESnapMetadataDestinationIsLocalised.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataLocalizationL( const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATALOCALIZATIONL_ENTRY );
+
+    // Check that aMetadata is within valid range.
+    if ( aMetadata > CMManager::ELocalisedDestIntranet )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint32 temp = ~(
+            CMManager::ESnapMetadataInternet |
+            CMManager::ESnapMetadataDestinationIsLocalised |
+            CMManager::ESnapMetadataPurpose );
+    if ( aMetadata == CMManager::ENotLocalisedDest )
+        {
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
+        }
+    else
+        {
+        if ( iCache->DestinationExistsWithMetadataLocalizedL( *this, aMetadata ) )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        TUint32 value = iMetadataRecord->iMetadata & temp;
+        switch ( aMetadata )
+            {
+            case CMManager::ELocalisedDestInternet:
+                {
+                // Clear ESnapMetadataHiddenAgent-bit.
+                value = value & ( ~CMManager::ESnapMetadataHiddenAgent );
+                // Set old ESnapMetadataInternet-bit.
+                value = value | CMManager::ESnapMetadataInternet;
+                // Set ESnapPurposeInternet-value.
+                value = value | ( CMManager::ESnapPurposeInternet << 8 );
+                }
+                break;
+            case CMManager::ELocalisedDestWap:
+                {
+                // Set ESnapPurposeOperator-value.
+                value = value | ( CMManager::ESnapPurposeOperator << 8 );
+                }
+                break;
+            case CMManager::ELocalisedDestMMS:
+                {
+                // Set ESnapMetadataHiddenAgent-bit.
+                value = value | CMManager::ESnapMetadataHiddenAgent;
+                // Set ESnapPurposeMMS-value.
+                value = value | ( CMManager::ESnapPurposeMMS << 8 );
+                }
+                break;
+            case CMManager::ELocalisedDestIntranet:
+                {
+                // Set ESnapPurposeIntranet-value.
+                value = value | ( CMManager::ESnapPurposeIntranet << 8 );
+                }
+                break;
+            default:
+                User::Leave( KErrArgument );
+                break;
+            }
+        // Set ESnapMetadataDestinationIsLocalised-value.
+        iMetadataRecord->iMetadata = value | ( aMetadata << 4 );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATALOCALIZATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set metadata of type ESnapMetadataPurpose.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationInstance::SetMetadataPurposeL( const TUint32 aMetadata )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAPURPOSEL_ENTRY );
+
+    // Check that aMetadata is within valid range.
+    if ( aMetadata > CMManager::ESnapPurposeIntranet )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUint32 temp = ~(
+            CMManager::ESnapMetadataInternet |
+            CMManager::ESnapMetadataDestinationIsLocalised |
+            CMManager::ESnapMetadataPurpose );
+    if ( aMetadata == CMManager::ESnapPurposeUnknown )
+        {
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
+        }
+    else
+        {
+        if ( iCache->DestinationExistsWithMetadataPurposeL( *this, aMetadata ) )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        TUint32 value = iMetadataRecord->iMetadata & temp;
+
+        switch ( aMetadata )
+            {
+            case CMManager::ESnapPurposeInternet:
+                {
+                // Clear ESnapMetadataHiddenAgent-bit.
+                value = value & ( ~CMManager::ESnapMetadataHiddenAgent );
+                // Set old ESnapMetadataInternet-bit.
+                value = value | CMManager::ESnapMetadataInternet;
+                // Set ELocalisedDestInternet-value.
+                value = value | ( CMManager::ELocalisedDestInternet << 4 );
+                }
+                break;
+            case CMManager::ESnapPurposeOperator:
+                {
+                // Set ELocalisedDestWap-value.
+                value = value | ( CMManager::ELocalisedDestWap << 4 );
+                }
+                break;
+            case CMManager::ESnapPurposeMMS:
+                {
+                // Set ESnapMetadataHiddenAgent-bit.
+                value = value | CMManager::ESnapMetadataHiddenAgent;
+                // Set ELocalisedDestMMS-value.
+                value = value | ( CMManager::ELocalisedDestMMS << 4 );
+                }
+                break;
+            case CMManager::ESnapPurposeIntranet:
+                {
+                // Set ELocalisedDestIntranet-value.
+                value = value | ( CMManager::ELocalisedDestIntranet << 4 );
+                }
+                break;
+            default:
+                User::Leave( KErrArgument );
+                break;
+            }
+        // Set ESnapMetadataPurpose-value.
+        iMetadataRecord->iMetadata = value | ( aMetadata << 8 );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAPURPOSEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Checks the current metadata for this destination, and verifies there is no
+// other conflicting destinations in the database.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmDestinationInstance::ConflictingMetadataFoundL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONFLICTINGMETADATAFOUNDL_ENTRY );
+
+    TBool result( EFalse );
+    TUint32 metadataInternet( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataInternet );
+    TUint32 metadataLocalized( ( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataDestinationIsLocalised ) >> 4 );
+    TUint32 metadataPurpose( ( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataPurpose ) >> 8 );
+
+    if ( metadataPurpose )
+        {
+        // Some metadata is set, need to check conflicts in database.
+        switch ( metadataPurpose )
+            {
+            // Fallthrough intended.
+            case CMManager::ESnapPurposeInternet:
+            case CMManager::ESnapPurposeOperator:
+            case CMManager::ESnapPurposeMMS:
+            case CMManager::ESnapPurposeIntranet:
+                result = iCache->DestinationExistsWithMetadataPurposeL(
+                        *this,
+                        metadataPurpose );
+                break;
+            default:
+                User::Leave( KErrCorrupt ); // Invalid metadata.
+                break;
+            }
+        }
+    else if ( metadataLocalized )
+        {
+        // Error, metadataPurpose was not set. Continue anyway.
+        switch ( metadataLocalized )
+            {
+            // Fallthrough intended.
+            case CMManager::ELocalisedDestInternet:
+            case CMManager::ELocalisedDestWap:
+            case CMManager::ELocalisedDestMMS:
+            case CMManager::ELocalisedDestIntranet:
+                result = iCache->DestinationExistsWithMetadataLocalizedL(
+                        *this,
+                        metadataLocalized );
+                break;
+            default:
+                User::Leave( KErrCorrupt ); // Invalid metadata.
+                break;
+            }
+        }
+    else if ( metadataInternet )
+        {
+        // Error, metadataPurpose and metadataLocalized was not set. Continue anyway.
+        result = iCache->DestinationExistsWithMetadataLocalizedL(
+                *this,
+                CMManager::ELocalisedDestInternet );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CONFLICTINGMETADATAFOUNDL_EXIT );
+    return result;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1434 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Cache side object representing a destination.
+*
+*/
+
+
+#include <datamobilitycommsdattypes.h>
+#include <in_sock.h> // KAfInet
+
+#include "cmmdestinationstruct.h"
+#include "cmmtransactionhandler.h"
+#include "cmmdestinationinstance.h"
+#include "cmmcache.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmdestinationstructTraces.h"
+#endif
+
+const TUint KDefaultTierManagerTagId = KAfInet;
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// Opens a destination from database based on ID.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct* CCmmDestinationStruct::NewL(
+        CCmmCache* aCache,
+        CCmmTransactionHandler* aTransactionHandler,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_NEWL_ENTRY );
+
+    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC(
+            aCache,
+            aTransactionHandler,
+            aDestinationId );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// Creates a new destination with name and ID (optional).
+// If ID is 0, a free ID will be used when destination is saved to database.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct* CCmmDestinationStruct::NewL(
+        CCmmCache* aCache,
+        CCmmTransactionHandler* aTransactionHandler,
+        const TDesC& aName,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_NEWL_ENTRY );
+
+    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC(
+            aCache,
+            aTransactionHandler,
+            aName,
+            aDestinationId );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// Opens a destination from database based on ID.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct* CCmmDestinationStruct::NewLC(
+        CCmmCache* aCache,
+        CCmmTransactionHandler* aTransactionHandler,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_NEWLC_ENTRY );
+
+    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct(
+            aCache,
+            aTransactionHandler );
+    CleanupStack::PushL( self );
+    self->ConstructL( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// Creates a new destination with name and ID (optional).
+// If ID is 0, a free ID will be used when destination is saved to database.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct* CCmmDestinationStruct::NewLC(
+        CCmmCache* aCache,
+        CCmmTransactionHandler* aTransactionHandler,
+        const TDesC& aName,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_NEWLC_ENTRY );
+
+    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct(
+            aCache,
+            aTransactionHandler );
+    CleanupStack::PushL( self );
+    self->ConstructL( aName, aDestinationId );
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// Cancels any active requests.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct::~CCmmDestinationStruct()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_CCMMDESTINATIONSTRUCT_ENTRY );
+
+    if ( iReferenceCounter != 0 )
+        {
+        ASSERT(0); // Error.
+        }
+    delete iNetworkRecord;
+    delete iDestApRecord;
+    delete iMetadataRecord;
+    delete iName;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_CCMMDESTINATIONSTRUCT_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmDestinationStruct::CCmmDestinationStruct(
+        CCmmCache* aCache,
+        CCmmTransactionHandler* aTransactionHandler )
+        :
+        iCache( aCache ),
+        iTransactionHandler( aTransactionHandler )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_CCMMDESTINATIONSTRUCT_ENTRY );
+
+    iDestApRecord = NULL;
+    iNetworkRecord = NULL;
+    iMetadataRecord = NULL;
+    iDestApRecordStatus = ECmmRecordStatusBlank;
+    iNetworkRecordStatus = ECmmRecordStatusBlank;
+    iMetadataRecordStatus = ECmmRecordStatusBlank;
+    iReferenceCounter = 0;
+    iStatus = ECmmDestinationStatusNotSaved;
+    iId = 0;
+    iName = NULL;
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_CCMMDESTINATIONSTRUCT_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// Opens an existing destination based on ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::ConstructL( const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_CONSTRUCTL_ENTRY );
+
+    // Check ID is in valid range.
+    if ( aDestinationId <= KCmDefaultDestinationAPTagId ||
+            aDestinationId >= KCmMaxDestinationAPTagId )
+        {
+        User::Leave( KErrArgument );
+        }
+    iId = aDestinationId;
+
+    iDestApRecord = static_cast<CommsDat::CCDAccessPointRecord*>(
+            CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdAccessPointRecord ) );
+    iNetworkRecord = static_cast<CommsDat::CCDNetworkRecord*>(
+            CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdNetworkRecord ) );
+    iMetadataRecord = new( ELeave ) CCDSNAPMetadataRecord(
+            iCache->TableId( ECmmDestMetadataRecord ) );
+
+    // Load access point record.
+    iDestApRecord->iRecordTag = iId;
+    if ( iDestApRecord->FindL( iTransactionHandler->Session() ) )
+        {
+        iDestApRecord->LoadL( iTransactionHandler->Session() );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+    iDestApRecordStatus = ECmmRecordStatusLoaded;
+
+    // Load network record.
+    iNetworkRecord->SetRecordId( iDestApRecord->iCustomSelectionPolicy );
+    iNetworkRecord->LoadL( iTransactionHandler->Session() );
+    iNetworkRecordStatus = ECmmRecordStatusLoaded;
+
+    // Load metadata record.
+    iMetadataRecord->iSNAP = iId;
+    if ( !iMetadataRecord->FindL( iTransactionHandler->Session() ) )
+        {
+        // Not found -> fill in with default values.
+        iMetadataRecord->iSNAP = iId;
+        iMetadataRecord->iMetadata = 0;
+        iMetadataRecord->SetRecordId( KCDNewRecordRequest );
+        iMetadataRecordStatus = ECmmRecordStatusUnsaved;
+        }
+    else
+        {
+        iMetadataRecord->LoadL( iTransactionHandler->Session() );
+        iMetadataRecordStatus = ECmmRecordStatusLoaded;
+        }
+
+    SetStatus( ECmmDestinationStatusValid );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// Creates a new destination. With name and optionally also with ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::ConstructL( const TDesC& aName, const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_CONSTRUCTL_ENTRY );
+
+    SetStatus( ECmmDestinationStatusNotSaved );
+    iId = aDestinationId;
+    iName = aName.AllocL();
+
+    iDestApRecord = static_cast<CommsDat::CCDAccessPointRecord*>(
+            CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdAccessPointRecord ) );
+    iNetworkRecord = static_cast<CommsDat::CCDNetworkRecord*>(
+            CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdNetworkRecord ) );
+    iMetadataRecord = new( ELeave ) CCDSNAPMetadataRecord(
+            iCache->TableId( ECmmDestMetadataRecord ) );
+
+    if ( aDestinationId >= KTemporaryIdCounterStart )
+        {
+        // Get a real ID from database during UpdateL().
+        iNetworkRecord->SetRecordId( KCDNewRecordRequest );
+        iDestApRecord->iRecordTag = 0;
+        iDestApRecord->iCustomSelectionPolicy = 0;
+        // Access Point record tag ID and custom selection policy value need to
+        // be set during UpdateL(), when network record's record ID is known.
+        // Also metadata record SNAP ID needs to be set.
+        iMetadataRecord->iSNAP = 0;
+        }
+    else
+        {
+        // Client provided an actual ID.
+        iNetworkRecord->SetRecordId( aDestinationId - KCmDefaultDestinationAPTagId );
+        iDestApRecord->iRecordTag = aDestinationId;
+        iDestApRecord->iCustomSelectionPolicy = ( aDestinationId - KCmDefaultDestinationAPTagId );
+        iMetadataRecord->iSNAP = aDestinationId;
+        }
+    iDestApRecord->SetRecordId( KCDNewRecordRequest );
+
+    iMetadataRecord->iMetadata = 0;
+    iMetadataRecord->SetRecordId( KCDNewRecordRequest );
+
+    iNetworkRecord->iRecordName.SetL( aName );
+    iDestApRecord->iRecordName.SetL( aName );
+
+    InitializeDestApRecordL();
+
+    iDestApRecordStatus = ECmmRecordStatusUnsaved;
+    iNetworkRecordStatus = ECmmRecordStatusUnsaved;
+    iMetadataRecordStatus = ECmmRecordStatusUnsaved;
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set the destination ID.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::SetId( const TUint32 aId )
+    {
+    iId = aId;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination ID.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDestinationStruct::GetId() const
+    {
+    return iId;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination ID from network record. To get a valid ID, this must be
+// called only during or after a call to UpdateL().
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmDestinationStruct::GetRealId() const
+    {
+    TUint32 id( iId );
+    if ( iNetworkRecord )
+        {
+        id = ( TUint32 )iNetworkRecord->RecordId() + KCmDefaultDestinationAPTagId;
+        }
+    return id;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the destination name.
+// ---------------------------------------------------------------------------
+//
+TDesC& CCmmDestinationStruct::GetDestinationNameL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_GETDESTINATIONNAMEL_ENTRY );
+
+    // No network record exists if destination has not been saved yet.
+    if ( iStatus == ECmmDestinationStatusNotSaved && iName )
+        {
+        OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_GETDESTINATIONNAMEL_EXIT );
+        return *iName;
+        }
+
+    if ( iNetworkRecord )
+        {
+        return iNetworkRecord->iRecordName.GetL();
+        }
+
+    User::Leave( KErrCorrupt );
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_GETDESTINATIONNAMEL_EXIT );
+    return *iName;
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the current status of this destination struct.
+// ---------------------------------------------------------------------------
+//
+TCmmDestinationStatus CCmmDestinationStruct::GetStatus() const
+    {
+    return iStatus;
+    }
+
+// ---------------------------------------------------------------------------
+// Get the current reference count.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationStruct::GetReferenceCount() const
+    {
+    return iReferenceCounter;
+    }
+
+// ---------------------------------------------------------------------------
+// Set the current status of this destination.
+// ECmmDestinationStatusValid: Destination exists in database.
+// ECmmDestinationStatusNotSaved: Destination does NOT exist in database yet.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::SetStatus( const TCmmDestinationStatus& aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETSTATUS_ENTRY );
+
+    switch ( aStatus )
+        {
+        case ECmmDestinationStatusValid:
+            {
+            if ( iStatus == ECmmDestinationStatusNotSaved )
+                {
+                delete iName;
+                iName = NULL;
+                }
+            }
+            // Fallthrough intended.
+        case ECmmDestinationStatusNotSaved:
+        case ECmmDestinationStatusToBeDeleted:
+            {
+            // Set the status.
+            iStatus = aStatus;
+            }
+            break;
+        default:
+            ASSERT( 0 ); // Error, invalid status.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETSTATUS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Notify about a possible change in database on specified record table.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::NotifyRecordChange( const TCmmDbRecords aRecordType )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_NOTIFYRECORDCHANGE_ENTRY );
+
+    // Only change status if it is currently ECmmRecordStatusLoaded.
+    switch ( aRecordType )
+        {
+        case ECmmDestNetworkRecord:
+            {
+            if ( iNetworkRecordStatus == ECmmRecordStatusLoaded )
+                {
+                iNetworkRecordStatus = ECmmRecordStatusExpired;
+                }
+            }
+            break;
+        case ECmmDestApRecord:
+            {
+            if ( iDestApRecordStatus == ECmmRecordStatusLoaded )
+                {
+                iDestApRecordStatus = ECmmRecordStatusExpired;
+                }
+            }
+            break;
+        case ECmmDestMetadataRecord:
+            {
+            if ( iMetadataRecordStatus == ECmmRecordStatusLoaded )
+                {
+                iMetadataRecordStatus = ECmmRecordStatusExpired;
+                }
+            }
+            break;
+        case ECmmDbSnapRecord:
+        case ECmmDbBearerPriorityRecord:
+        case ECmmDbDefConnRecord:
+        // Fallthrough intended.
+        default:
+            // The record table doesn't affect destinations, just ignore it.
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_NOTIFYRECORDCHANGE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Set the record status for all records.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::SetStatusForAllRecords( const TCmmRecordStatus aStatus )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETSTATUSFORALLRECORDS_ENTRY );
+
+    iDestApRecordStatus = aStatus;
+    iNetworkRecordStatus = aStatus;
+    iMetadataRecordStatus = aStatus;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETSTATUSFORALLRECORDS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Copies the data for this destination to a session instance and increments
+// the reference counter by one.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::CreateDestinationInstanceL(
+        CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_CREATESESSIONINSTANCEL_ENTRY );
+
+    // This should work according to status. If status is valid, this
+    // destination exists in commsdat, and other sessions can also open a handle
+    // to it. Make copies of the records to give to session instance.
+    //
+    // If the status is unsaved, then this is a new destination that hasn't
+    // been saved to commsdat yet. Thus no other session can open a handle to it
+    // until it is saved with a call to UpdateL().
+    // For a non-valid destination, to save memory, transfer the ownership of
+    // record pointers straight to the session and mark the cache pointers as
+    // NULL. When update is called, copy the records into the cache also.
+    //
+
+    switch ( iStatus )
+        {
+        case ECmmDestinationStatusNotSaved:
+            {
+            // Transfer ownership of table records to session. Mark local pointers to NULL.
+
+            aDestinationInstance.SetRecordPointer( ECmmDestApRecord, iDestApRecord ); // iDestApRecord ownership is transfered.
+            aDestinationInstance.SetRecordPointer( ECmmDestNetworkRecord, iNetworkRecord ); // iNetworkRecord ownership is transfered.
+            aDestinationInstance.SetRecordPointer( ECmmDestMetadataRecord, iMetadataRecord ); // iMetadataRecord ownership is transfered.
+            iDestApRecord = NULL;
+            iNetworkRecord = NULL;
+            iMetadataRecord = NULL;
+            iDestApRecordStatus = ECmmRecordStatusBlank;
+            iNetworkRecordStatus = ECmmRecordStatusBlank;
+            iMetadataRecordStatus = ECmmRecordStatusBlank;
+
+            aDestinationInstance.SetId( iId );
+            aDestinationInstance.SetStatus( ECmmDestinationStatusChanged );
+            }
+            break;
+        case ECmmDestinationStatusValid:
+            {
+            // Reload table records if needed, make copies and transfer those to session.
+            LoadRecordL( aDestinationInstance, ECmmDestApRecord );
+            LoadRecordL( aDestinationInstance, ECmmDestNetworkRecord );
+            LoadRecordL( aDestinationInstance, ECmmDestMetadataRecord );
+
+            aDestinationInstance.SetId( iId );
+            aDestinationInstance.SetStatus( ECmmDestinationStatusValid );
+            }
+            break;
+        case ECmmDestinationStatusChanged:
+        case ECmmDestinationStatusToBeDeleted:
+        default:
+            User::Leave( KErrCorrupt ); // Invalid status.
+            break;
+        }
+
+    // A session handle has been made, increment reference counter.
+    iReferenceCounter++;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_CREATESESSIONINSTANCEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Refresh the data contained in aDestinationInstance. This means reloading
+// the data from database if necessary. After this call the contents of
+// aDestinationInstance will reflect the current state in the database. 
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::RefreshDestinationInstanceL(
+        CCmmDestinationInstance& aDestinationInstance )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_REFRESHSESSIONINSTANCEL_ENTRY );
+
+    switch ( iStatus )
+        {
+        case ECmmDestinationStatusValid:
+        case ECmmDestinationStatusToBeDeleted:
+            {
+            // Reload table records if needed, make copies and transfer those to session.
+            LoadRecordL( aDestinationInstance, ECmmDestApRecord );
+            LoadRecordL( aDestinationInstance, ECmmDestNetworkRecord );
+            LoadRecordL( aDestinationInstance, ECmmDestMetadataRecord );
+            }
+            break;
+        case ECmmDestinationStatusNotSaved: // This was checked before.
+        case ECmmDestinationStatusChanged:
+        default:
+            User::Leave( KErrCorrupt ); // Invalid status.
+            break;
+        }
+
+    // Add list of currently contained connection methods.
+    iCache->GetConnMethodsFromDestinationL(
+            aDestinationInstance.GetId(),
+            aDestinationInstance.iConnMethodItemArray );
+
+    // Internal state need to be set to the same state as after a successfull update.
+    aDestinationInstance.UpdateSuccessful();
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_REFRESHSESSIONINSTANCEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Reloads a destination record if needed and copies the latest version to
+// the session instance given as parameter.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::LoadRecordL(
+        CCmmDestinationInstance& aDestinationInstance,
+        TCmmDbRecords aRecordType )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_LOADRECORDL_ENTRY );
+
+    if ( iStatus != ECmmDestinationStatusValid && iStatus != ECmmDestinationStatusToBeDeleted )
+        {
+        // Destination must exist in database to be able to load any records.
+        User::Leave( KErrCorrupt );
+        }
+
+    // Record status:            Action:
+    //
+    // ECmmRecordStatusBlank     Error
+    // ECmmRecordStatusLoaded    Skip load, already loaded
+    // ECmmRecordStatusExpired   Load record from database
+    // ECmmRecordStatusModified  Error, session side only status
+    // ECmmRecordStatusUnsaved   Skip load, not in database
+
+    CommsDat::CCDRecordBase* aRecordPointer;
+
+    switch ( aRecordType )
+        {
+        case ECmmDestNetworkRecord:
+            {
+            if ( iNetworkRecordStatus == ECmmRecordStatusExpired )
+                {
+                iNetworkRecord->LoadL( iTransactionHandler->Session() );
+                iNetworkRecordStatus = ECmmRecordStatusLoaded;
+                }
+            else if ( iNetworkRecordStatus == ECmmRecordStatusBlank ||
+                    iNetworkRecordStatus == ECmmRecordStatusModified )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            aRecordPointer = CopyRecordL(
+                    ECmmDestNetworkRecord,
+                    static_cast<CommsDat::CCDRecordBase*>( iNetworkRecord ) );
+            aDestinationInstance.SetRecordPointer(
+                    ECmmDestNetworkRecord,
+                    aRecordPointer ); // Ownership is transfered.
+            }
+            break;
+        case ECmmDestApRecord:
+            {
+            if ( iDestApRecordStatus == ECmmRecordStatusExpired )
+                {
+                iDestApRecord->LoadL( iTransactionHandler->Session() );
+                iDestApRecordStatus = ECmmRecordStatusLoaded;
+                }
+            aRecordPointer = CopyRecordL(
+                    ECmmDestApRecord,
+                    static_cast<CommsDat::CCDRecordBase*>( iDestApRecord ) );
+            aDestinationInstance.SetRecordPointer(
+                    ECmmDestApRecord,
+                    aRecordPointer ); // Ownership is transfered.
+            }
+            break;
+        case ECmmDestMetadataRecord:
+            {
+            if ( iMetadataRecordStatus == ECmmRecordStatusExpired )
+                {
+                iMetadataRecord->LoadL( iTransactionHandler->Session() );
+                iMetadataRecordStatus = ECmmRecordStatusLoaded;
+                }
+            aRecordPointer = CopyRecordL(
+                    ECmmDestMetadataRecord,
+                    static_cast<CommsDat::CCDRecordBase*>( iMetadataRecord ) );
+            aDestinationInstance.SetRecordPointer(
+                    ECmmDestMetadataRecord,
+                    aRecordPointer ); // Ownership is transfered.
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrArgument );
+            }
+            break;
+        }
+    aRecordPointer = NULL;
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_LOADRECORDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Save the contents of a session side destination handle into database.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::UpdateL(
+        CCmmDestinationInstance& aDestinationInstance,
+        CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_UPDATEL_ENTRY );
+
+    TBool setProtection( EFalse );
+    CMManager::TProtectionLevel protLevel( CMManager::EProtLevel0 );
+
+    // Structure:
+    // - Use ModifyL() or StoreL() according to own status (new destination or
+    //   changes to existing one).
+    //
+    // - Update (store/modify) records to database using client copies.
+    // - Free local record tables.
+    // - Copy record tables from client instance into cache.
+    // - Update DataMobilitySelectionPolicy-records.
+    //
+
+    TInt id( iId );
+    switch ( aDestinationInstance.GetStatus() )
+        {
+        case ECmmDestinationStatusValid:
+            {
+            if ( iStatus != ECmmDestinationStatusValid )
+                {
+                // Error, a 'valid'-status on session side implies a 'valid'-status on cache side.
+                User::Leave( KErrCorrupt );
+                }
+            }
+            // Fallthrough intended.
+        case ECmmDestinationStatusChanged:
+            {
+            CommsDat::CCDRecordBase* recordPointer;
+
+            // Get pointers to destination records in client instance.
+            aDestinationInstance.GetRecordPointer( ECmmDestApRecord, recordPointer );
+            CommsDat::CCDAccessPointRecord* instanceDestApRecord =
+                    static_cast<CommsDat::CCDAccessPointRecord*>( recordPointer );
+            aDestinationInstance.GetRecordPointer( ECmmDestNetworkRecord, recordPointer );
+            CommsDat::CCDNetworkRecord* instanceNetworkRecord =
+                    static_cast<CommsDat::CCDNetworkRecord*>( recordPointer );
+            aDestinationInstance.GetRecordPointer( ECmmDestMetadataRecord, recordPointer );
+            CCDSNAPMetadataRecord* instanceMetadataRecord =
+                    static_cast<CCDSNAPMetadataRecord*>( recordPointer );
+
+            recordPointer = NULL;
+
+            // Set protections on network record as needed.
+            protLevel = aDestinationInstance.CurrentProtectionLevelL();
+            if ( protLevel == CMManager::EProtLevel1 ||
+                    protLevel == CMManager::EProtLevel2 )
+                {
+                setProtection = ETrue;
+                }
+            SetAttribute( instanceNetworkRecord, CommsDat::ECDProtectedWrite, setProtection );
+
+            switch ( iStatus )
+                {
+                case ECmmDestinationStatusNotSaved:
+                    {
+                    // This is a new destination that doesn't exist in database yet.
+
+                    // Store network record first, the record ID is needed for
+                    // destination access point record.
+                    // Record ID for network record is set during construction.
+                    instanceNetworkRecord->StoreL( iTransactionHandler->Session() );
+
+                    // If ID is out of valid range, it means this destination was created
+                    // without a specific ID. It is a temporary ID and can now be replaced
+                    // with the real database ID. This also enables this destination to be
+                    // opened by other clients.
+                    // Record ID from network record must be used as real ID.
+                    if ( iId >= KTemporaryIdCounterStart )
+                        {
+                        id = instanceNetworkRecord->RecordId() + KCmDefaultDestinationAPTagId;
+                        instanceDestApRecord->iRecordTag = id;
+                        instanceDestApRecord->iCustomSelectionPolicy =
+                                ( id - KCmDefaultDestinationAPTagId );
+                        instanceMetadataRecord->iSNAP = id;
+                        }
+                    instanceDestApRecord->StoreL( iTransactionHandler->Session() );
+                    instanceMetadataRecord->StoreL( iTransactionHandler->Session() );
+                    }
+                    break;
+
+                case ECmmDestinationStatusValid:
+                case ECmmDestinationStatusToBeDeleted:
+                    {
+                    // This destination already exists in database and is beeing modified.
+
+                    instanceNetworkRecord->ModifyL( iTransactionHandler->Session() );
+                    instanceDestApRecord->ModifyL( iTransactionHandler->Session() );
+                    if ( iMetadataRecordStatus == ECmmRecordStatusUnsaved )
+                        {
+                        instanceMetadataRecord->StoreL( iTransactionHandler->Session() );
+                        }
+                    else
+                        {
+                        instanceMetadataRecord->ModifyL( iTransactionHandler->Session() );
+                        }
+                    }
+                    break;
+                case ECmmDestinationStatusChanged:
+                default:
+                    User::Leave( KErrCorrupt ); // Error, invalid status.
+                    break;
+                }
+
+            // Copy destination records from client instance into cache.
+            delete iDestApRecord;
+            delete iNetworkRecord;
+            delete iMetadataRecord;
+            iDestApRecord = NULL;
+            iNetworkRecord = NULL;
+            iMetadataRecord = NULL;
+            iDestApRecordStatus = ECmmRecordStatusBlank;
+            iNetworkRecordStatus = ECmmRecordStatusBlank;
+            iMetadataRecordStatus = ECmmRecordStatusBlank;
+            iDestApRecord = static_cast<CommsDat::CCDAccessPointRecord*>(
+                    CopyRecordL( ECmmDestApRecord, instanceDestApRecord ) );
+            iNetworkRecord = static_cast<CommsDat::CCDNetworkRecord*>(
+                    CopyRecordL( ECmmDestNetworkRecord, instanceNetworkRecord ) );
+            iMetadataRecord = static_cast<CCDSNAPMetadataRecord*>(
+                    CopyRecordL( ECmmDestMetadataRecord, instanceMetadataRecord ) );
+
+            instanceDestApRecord = NULL;
+            instanceNetworkRecord = NULL;
+            instanceMetadataRecord = NULL;
+
+
+
+            // Write DataMobilitySelectionPolicy-records into database.
+            TInt neededRecordCount( aDestinationInstance.iConnMethodItemArray.Count() ); // +1 for destination itself.
+            TInt existingRecordCount( 0 );
+
+            // Create DataMobilitySelectionPolicy-record set.
+            CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* snapRecordSet =
+                    new( ELeave ) CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>(
+                            iCache->TableId( ECmmDbSnapRecord ) );
+            CleanupStack::PushL( snapRecordSet );
+
+            // Create a DataMobilitySelectionPolicy-record to prime the set.
+            CCDDataMobilitySelectionPolicyRecord* snapRecordPrime =
+                    new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                            iCache->TableId( ECmmDbSnapRecord ) );
+            CleanupStack::PushL( snapRecordPrime );
+
+            snapRecordPrime->iSNAP = id;
+            snapRecordSet->iRecords.AppendL( snapRecordPrime );
+            CleanupStack::Pop( snapRecordPrime ); // Ownership moved.
+
+            // Find matching DataMobilitySelectionPolicy-records.
+            if ( snapRecordSet->FindL( iTransactionHandler->Session() ) )
+                {
+                existingRecordCount = snapRecordSet->iRecords.Count();
+                }
+
+            CCDDataMobilitySelectionPolicyRecord* snapRecord1 =
+                    new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                            iCache->TableId( ECmmDbSnapRecord ) );
+            CleanupStack::PushL( snapRecord1 );
+
+            // Current index in snapRecordSet.
+            TInt index( 0 );
+
+            // Initial record for destination itself.
+            snapRecord1->iSNAP = id;
+            snapRecord1->iRecordName.SetL( iNetworkRecord->iRecordName.GetL() );
+
+            // Set protections on snap record.
+            SetAttribute( snapRecord1, CommsDat::ECDProtectedWrite, setProtection );
+
+            if ( existingRecordCount > index )
+                {
+                snapRecord1->SetElementId( snapRecordSet->iRecords[index]->ElementId() );
+                snapRecord1->iEmbeddedSNAP = 0;
+                snapRecord1->iIAP = 0;
+                snapRecord1->iPriority = 0;
+                snapRecord1->ModifyL( iTransactionHandler->Session() );
+                index++;
+                }
+            else
+                {
+                snapRecord1->SetRecordId( KCDNewRecordRequest );
+                snapRecord1->StoreL( iTransactionHandler->Session() );
+                }
+            CleanupStack::PopAndDestroy( snapRecord1 );
+
+            // Records for destination contents.
+            for ( TInt i = 0; i < neededRecordCount; i++ )
+                {
+                // Weird stuff starts to happen in commsdat side if we try to
+                // reuse a snap-record, so create new record for each entry.
+                CCDDataMobilitySelectionPolicyRecord* snapRecord2 =
+                        new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                                iCache->TableId( ECmmDbSnapRecord ) );
+                CleanupStack::PushL( snapRecord2 );
+
+                snapRecord2->iSNAP = id;
+                snapRecord2->iRecordName.SetL( iNetworkRecord->iRecordName.GetL() );
+
+                // If the connection method was added to destination while
+                // still having a temporary ID, update the ID to real ID.
+                TUint32 connMethodRealId( aDestinationInstance.iConnMethodItemArray[i].iId );
+                if ( connMethodRealId >= KTemporaryIdCounterStart )
+                    {
+                    aCache->TranslateTemporaryId(
+                            aDestinationInstance.iConnMethodItemArray[i].iId,
+                            connMethodRealId );
+                    }
+
+                // Set protections on destination contents as needed.
+                setProtection = EFalse;
+                protLevel = aDestinationInstance.CurrentProtectionLevelL();
+                if ( protLevel == CMManager::EProtLevel1 )
+                    {
+                    setProtection = ETrue;
+                    }
+                SetAttribute( snapRecord2, CommsDat::ECDProtectedWrite, setProtection );
+
+                if ( aDestinationInstance.iConnMethodItemArray[i].IsEmbedded() )
+                    {
+                    // Embedded destination.
+                    snapRecord2->iEmbeddedSNAP = ( TInt )connMethodRealId;
+                    snapRecord2->iIAP = 0;
+                    snapRecord2->iPriority =
+                            CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+                    aDestinationInstance.iConnMethodItemArray[i].iPriority =
+                            CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+                    }
+                else
+                    {
+                    // Normal connection method.
+                    snapRecord2->iEmbeddedSNAP = 0;
+                    snapRecord2->iIAP = CommsDat::KCDTIdIAPRecord | ( connMethodRealId << 8 );
+                    // If the connection method is a virtual IAP that doesn't
+                    // link to an IAP, set priority to wildcard.
+                    if ( aDestinationInstance.iConnMethodItemArray[i].IsVirtual() &&
+                            aDestinationInstance.iConnMethodItemArray[i].LinkedIapId() == 0 )
+                        {
+                        snapRecord2->iPriority =
+                                CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+                        aDestinationInstance.iConnMethodItemArray[i].iPriority =
+                                CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+                        }
+                    else
+                        {
+                        snapRecord2->iPriority = i + 1; // Priority values start from 1.
+                        aDestinationInstance.iConnMethodItemArray[i].iPriority = i + 1;
+                        }
+                    }
+
+                if ( existingRecordCount > index )
+                    {
+                    // An old record can be reused.
+                    snapRecord2->SetElementId( snapRecordSet->iRecords[index]->ElementId() );
+                    snapRecord2->ModifyL( iTransactionHandler->Session() );
+                    index++;
+                    }
+                else
+                    {
+                    // A new record must be created.
+                    snapRecord2->SetRecordId( KCDNewRecordRequest );
+                    snapRecord2->StoreL( iTransactionHandler->Session() );
+                    }
+                CleanupStack::PopAndDestroy( snapRecord2 );
+                }
+
+            // Delete any extra records.
+            while ( existingRecordCount > index )
+                {
+                CCDDataMobilitySelectionPolicyRecord* snapRecord3 =
+                        new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                                iCache->TableId( ECmmDbSnapRecord ) );
+                CleanupStack::PushL( snapRecord3 );
+                snapRecord3->SetElementId( snapRecordSet->iRecords[index]->ElementId() );
+                snapRecord3->DeleteL( iTransactionHandler->Session() );
+                CleanupStack::PopAndDestroy( snapRecord3 );
+                index++;
+                }
+
+
+            CleanupStack::PopAndDestroy( snapRecordSet );
+            }
+            break;
+        case ECmmDestinationStatusNotSaved:
+        case ECmmDestinationStatusToBeDeleted:
+        default:
+            User::Leave( KErrCorrupt ); // Error, invalid status.
+            break;
+        }
+
+    // Do not update destination status or record status values yet. Cache
+    // will set them after successfully commiting transaction to database.
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_UPDATEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Delete all database records of this destination. Also removes any records
+// making this destination an embedded destination in another destination.
+// ---------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::DeleteL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_DELETEL_ENTRY );
+
+    // Check status for records.
+    switch ( iNetworkRecordStatus )
+        {
+        case ECmmRecordStatusLoaded:
+        case ECmmRecordStatusExpired:
+            {
+            iNetworkRecord->DeleteL( iTransactionHandler->Session() );
+            }
+            break;
+        case ECmmRecordStatusUnsaved:
+            // Skip.
+            break;
+        case ECmmRecordStatusBlank:
+        case ECmmRecordStatusModified:
+        default:
+            ASSERT( 0 ); // Error, invalid status.
+            User::Leave( KErrCorrupt );
+            break;
+        }
+    switch ( iDestApRecordStatus )
+        {
+        case ECmmRecordStatusLoaded:
+        case ECmmRecordStatusExpired:
+            {
+            iDestApRecord->DeleteL( iTransactionHandler->Session() );
+            }
+            break;
+        case ECmmRecordStatusUnsaved:
+            // Skip.
+            break;
+        case ECmmRecordStatusBlank:
+        case ECmmRecordStatusModified:
+        default:
+            ASSERT( 0 ); // Error, invalid status.
+            User::Leave( KErrCorrupt );
+            break;
+        }
+    switch ( iMetadataRecordStatus )
+        {
+        case ECmmRecordStatusLoaded:
+        case ECmmRecordStatusExpired:
+            {
+            iMetadataRecord->DeleteL( iTransactionHandler->Session() );
+            }
+            break;
+        case ECmmRecordStatusUnsaved:
+            // Skip.
+            break;
+        case ECmmRecordStatusBlank:
+        case ECmmRecordStatusModified:
+        default:
+            ASSERT( 0 ); // Error, invalid status.
+            User::Leave( KErrCorrupt );
+            break;
+        }
+
+    // Delete all datamobility selection policy records related to this destination.
+
+    // Create DataMobilitySelectionPolicy-record set.
+    CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* snapRecordSet =
+            new( ELeave ) CommsDat::CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>(
+                    iCache->TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecordSet );
+
+    // Create a DataMobilitySelectionPolicy-record.
+    CCDDataMobilitySelectionPolicyRecord* snapRecord =
+            new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                    iCache->TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecord );
+
+    TRAP_IGNORE( snapRecordSet->LoadL( iTransactionHandler->Session() ) );
+
+    // Loop through all datamobility selection policy records.
+    TInt snapRecordCount( snapRecordSet->iRecords.Count() );
+    for ( TInt i = 0; i < snapRecordCount; i++ )
+        {
+        snapRecord->SetElementId( snapRecordSet->iRecords[i]->ElementId() );
+        snapRecord->LoadL( iTransactionHandler->Session() );
+
+        TInt snap = snapRecord->iSNAP;
+        TInt embeddedSnap = snapRecord->iEmbeddedSNAP;
+        if ( snap == iId || embeddedSnap == iId )
+            {
+            snapRecord->DeleteL( iTransactionHandler->Session() );
+            }
+        }
+    CleanupStack::PopAndDestroy( snapRecord );
+    CleanupStack::PopAndDestroy( snapRecordSet );
+
+    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_DELETEL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// This should be called when a client session closes a destination handle.
+// Reference counter is decremented by one and the remaining number of
+// references is returned.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmDestinationStruct::DestinationInstanceClosed()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
+
+    iReferenceCounter--;
+    if ( iReferenceCounter < 0 )
+        {
+        // Error, reference counter shouldn't be able to go negative.
+        ASSERT( 0 );
+        iReferenceCounter = 0;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SESSIONINSTANCECLOSED_EXIT );
+    return iReferenceCounter;
+    }
+
+// -----------------------------------------------------------------------------
+// Called after this destination has been updated and database transaction has
+// completed successfully. Sets the internal state of this destination
+// structure to reflect the new valid state.
+// -----------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::UpdateSuccessful()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_UPDATESUCCESSFUL_ENTRY );
+
+    SetStatus( ECmmDestinationStatusValid );
+    SetStatusForAllRecords( ECmmRecordStatusLoaded );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_UPDATESUCCESSFUL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::InitializeDestApRecordL
+// Set default values to a new destination access point record.
+// -----------------------------------------------------------------------------
+//
+void CCmmDestinationStruct::InitializeDestApRecordL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_INITIALIZEDESTAPRECORDL_ENTRY );
+
+    SetDefaultTierManagerL();
+    SetDefaultMCprL();
+    SetDefaultCprL();
+    SetDefaultSCprL();
+    SetDefaultProtocolL();
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_INITIALIZEDESTAPRECORDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::SetDefaultTierManagerL
+// Sets the default tier manager to destination access point record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetDefaultTierManagerL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETDEFAULTTIERMANAGERL_ENTRY );
+
+    CommsDat::CCDTierRecord* tierRecord =
+            static_cast<CommsDat::CCDTierRecord*>(
+                    CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdTierRecord ) );
+    CleanupStack::PushL( tierRecord );
+
+    tierRecord->iRecordTag = KDefaultTierManagerTagId;
+
+    if ( tierRecord->FindL( iTransactionHandler->Session() ) )
+        {
+        iDestApRecord->iTier = tierRecord->ElementId();
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+    CleanupStack::PopAndDestroy( tierRecord );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETDEFAULTTIERMANAGERL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::SetDefaultMCprL
+// Sets the default MCpr to destination access point record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetDefaultMCprL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETDEFAULTMCPRL_ENTRY );
+
+    CommsDat::CCDMCprRecord* mcprRecord =
+            static_cast<CommsDat::CCDMCprRecord*>(
+                    CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdMCprRecord ) );
+    CleanupStack::PushL( mcprRecord );
+
+    mcprRecord->SetRecordId( 1 );
+
+    mcprRecord->LoadL( iTransactionHandler->Session() );
+    iDestApRecord->iMCpr = mcprRecord->ElementId();
+    CleanupStack::PopAndDestroy( mcprRecord );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETDEFAULTMCPRL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::SetDefaultCprL
+// Sets the default Cpr to destination access point record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetDefaultCprL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETDEFAULTCPRL_ENTRY );
+
+    CommsDat::CCDCprRecord* cprRecord =
+            static_cast<CommsDat::CCDCprRecord*>(
+                    CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdCprRecord ) );
+    CleanupStack::PushL( cprRecord );
+
+    cprRecord->SetRecordId( 1 );
+
+    cprRecord->LoadL( iTransactionHandler->Session() );
+    iDestApRecord->iCpr = cprRecord->ElementId();
+    CleanupStack::PopAndDestroy( cprRecord );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETDEFAULTCPRL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::SetDefaultSCprL
+// Sets the default SCpr to destination access point record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetDefaultSCprL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETDEFAULTSCPRL_ENTRY );
+
+    CommsDat::CCDSCprRecord* scprRecord =
+            static_cast<CommsDat::CCDSCprRecord*>(
+                    CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdSCprRecord ) );
+    CleanupStack::PushL( scprRecord );
+
+    scprRecord->SetRecordId( 1 );
+
+    scprRecord->LoadL( iTransactionHandler->Session() );
+    iDestApRecord->iSCpr = scprRecord->ElementId();
+    CleanupStack::PopAndDestroy( scprRecord );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETDEFAULTSCPRL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDestinationStruct::SetDefaultProtocolL
+// Sets the default protocol to destination access point record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetDefaultProtocolL()
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETDEFAULTPROTOCOLL_ENTRY );
+
+    CommsDat::CCDProtocolRecord* protocolRecord =
+            static_cast<CommsDat::CCDProtocolRecord*>(
+                    CommsDat::CCDRecordBase::RecordFactoryL( CommsDat::KCDTIdProtocolRecord ) );
+    CleanupStack::PushL( protocolRecord );
+
+    protocolRecord->SetRecordId( 1 );
+
+    protocolRecord->LoadL( iTransactionHandler->Session() );
+    iDestApRecord->iProtocol = protocolRecord->ElementId();
+    CleanupStack::PopAndDestroy( protocolRecord );
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETDEFAULTPROTOCOLL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Set attribute flag on the given record.
+// -----------------------------------------------------------------------------
+void CCmmDestinationStruct::SetAttribute(
+        CommsDat::CCDRecordBase* aRecord,
+        TUint32 aAttribute,
+        TBool aSet )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SETATTRIBUTE_ENTRY );
+
+    if ( aSet )
+        {
+        aRecord->SetAttributes( aAttribute );
+        }
+    else
+        {
+        aRecord->ClearAttributes( aAttribute );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_SETATTRIBUTE_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Creates a copy of a record of the given type.
+// -----------------------------------------------------------------------------
+CommsDat::CCDRecordBase* CCmmDestinationStruct::CopyRecordL(
+        TCmmDbRecords aRecordType,
+        CommsDat::CCDRecordBase* aSource )
+    {
+    OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_COPYRECORDL_ENTRY );
+
+    CommsDat::CCDRecordBase* target = NULL;
+
+    switch ( aRecordType )
+        {
+        case ECmmDestNetworkRecord:
+            {
+            // Network record.
+
+            CommsDat::CCDNetworkRecord* source =
+                    static_cast<CommsDat::CCDNetworkRecord*>( aSource );
+            CommsDat::CCDNetworkRecord* networkRecord =
+                    static_cast<CommsDat::CCDNetworkRecord*>(
+                            CommsDat::CCDRecordBase::RecordFactoryL(
+                                    CommsDat::KCDTIdNetworkRecord ) );
+            CleanupStack::PushL( networkRecord );
+
+            if ( !source->iRecordTag.IsNull() )
+                {
+                networkRecord->iRecordTag.SetL( source->iRecordTag );
+                }
+            if ( !source->iRecordName.IsNull() )
+                {
+                networkRecord->iRecordName.SetL( source->iRecordName );
+                }
+            if ( !source->iHostName.IsNull() )
+                {
+                networkRecord->iHostName.SetL( source->iHostName );
+                }
+            networkRecord->SetElementId( source->ElementId() );
+
+            CleanupStack::Pop( networkRecord );
+            target = static_cast<CommsDat::CCDRecordBase*>( networkRecord );
+            }
+            break;
+        case ECmmDestApRecord:
+            {
+            // Access point record.
+
+            CommsDat::CCDAccessPointRecord* source =
+                    static_cast<CommsDat::CCDAccessPointRecord*>( aSource );
+            CommsDat::CCDAccessPointRecord* destApRecord =
+                    static_cast<CommsDat::CCDAccessPointRecord*>(
+                            CommsDat::CCDRecordBase::RecordFactoryL(
+                                    CommsDat::KCDTIdAccessPointRecord ) );
+            CleanupStack::PushL( destApRecord );
+
+            if ( !source->iRecordTag.IsNull() )
+                {
+                destApRecord->iRecordTag.SetL( source->iRecordTag );
+                }
+            if ( !source->iRecordName.IsNull() )
+                {
+                destApRecord->iRecordName.SetL( source->iRecordName );
+                }
+            if ( !source->iAccessPointGID.IsNull() )
+                {
+                destApRecord->iAccessPointGID.SetL( source->iAccessPointGID );
+                }
+            if ( !source->iSelectionPolicy.IsNull() )
+                {
+                destApRecord->iSelectionPolicy.SetL( source->iSelectionPolicy );
+                }
+
+            if ( !source->iTier.IsNull() )
+                {
+                destApRecord->iTier.SetL( source->iTier );
+                }
+            if ( !source->iMCpr.IsNull() )
+                {
+                destApRecord->iMCpr.SetL( source->iMCpr );
+                }
+            if ( !source->iCpr.IsNull() )
+                {
+                destApRecord->iCpr.SetL( source->iCpr );
+                }
+            if ( !source->iSCpr.IsNull() )
+                {
+                destApRecord->iSCpr.SetL( source->iSCpr );
+                }
+            if ( !source->iProtocol.IsNull() )
+                {
+                destApRecord->iProtocol.SetL( source->iProtocol );
+                }
+            if ( !source->iCprConfig.IsNull() )
+                {
+                destApRecord->iCprConfig.SetL( source->iCprConfig );
+                }
+            if ( !source->iAppSID.IsNull() )
+                {
+                destApRecord->iAppSID.SetL( source->iAppSID );
+                }
+            if ( !source->iConfigAPIdList.IsNull() )
+                {
+                destApRecord->iConfigAPIdList.SetL( source->iConfigAPIdList );
+                }
+            if ( !source->iCustomSelectionPolicy.IsNull() )
+                {
+                destApRecord->iCustomSelectionPolicy.SetL( source->iCustomSelectionPolicy );
+                }
+            if ( !source->iPriority.IsNull() )
+                {
+                destApRecord->iPriority.SetL( source->iPriority );
+                }
+
+            destApRecord->SetElementId( aSource->ElementId() );
+
+            CleanupStack::Pop( destApRecord );
+            target = static_cast<CommsDat::CCDRecordBase*>( destApRecord );
+            }
+            break;
+        case ECmmDestMetadataRecord:
+            {
+            // Metadata record.
+            CCDSNAPMetadataRecord* source =
+                    static_cast<CCDSNAPMetadataRecord*>( aSource );
+            CCDSNAPMetadataRecord* metadataRecord =
+                    new( ELeave ) CCDSNAPMetadataRecord(
+                            iCache->TableId( ECmmDestMetadataRecord ) );
+            CleanupStack::PushL( metadataRecord );
+
+            if ( !source->iRecordTag.IsNull() )
+                {
+                metadataRecord->iRecordTag.SetL( source->iRecordTag );
+                }
+            if ( !source->iRecordName.IsNull() )
+                {
+                metadataRecord->iRecordName.SetL( source->iRecordName );
+                }
+            if ( !source->iSNAP.IsNull() )
+                {
+                metadataRecord->iSNAP.SetL( source->iSNAP );
+                }
+            if ( !source->iMetadata.IsNull() )
+                {
+                metadataRecord->iMetadata.SetL( source->iMetadata );
+                }
+            if ( !source->iIcon.IsNull() )
+                {
+                metadataRecord->iIcon.SetL( source->iIcon );
+                }
+            if ( !source->iIconFileName.IsNull() )
+                {
+                metadataRecord->iIconFileName.SetL( source->iIconFileName );
+                }
+            metadataRecord->SetElementId( source->ElementId() );
+
+            CleanupStack::Pop( metadataRecord );
+            target = static_cast<CommsDat::CCDRecordBase*>( metadataRecord );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrArgument );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_COPYRECORDL_EXIT );
+    return target;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmminstancemapping.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1453 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Keeps track of the general destination/connection method structure in
+* database.
+*
+*/
+
+
+#include <metadatabase.h>
+#include <commsdattypesv1_1.h>
+#include <datamobilitycommsdattypes.h>
+#include <cmpluginembdestinationdef.h>
+#include <wlancontainer.h>
+
+#include "cmminstancemapping.h"
+#include "cmpluginbaseeng.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmminstancemappingTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CDestination* CDestination::NewL()
+    {
+    OstTraceFunctionEntry0( CDESTINATION_NEWL_ENTRY );
+
+    CDestination* self = CDestination::NewLC();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CDESTINATION_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CDestination* CDestination::NewLC()
+    {
+    OstTraceFunctionEntry0( CDESTINATION_NEWLC_ENTRY );
+
+    CDestination* self = new( ELeave ) CDestination();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CDESTINATION_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CDestination::~CDestination()
+    {
+    OstTraceFunctionEntry0( CDESTINATION_CDESTINATION_ENTRY );
+
+    iConnMethodItemArray.Close();
+    iUnsupportedConnMethods.Close();
+
+    OstTraceFunctionExit0( CDESTINATION_CDESTINATION_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CDestination::CDestination()
+    {
+    OstTraceFunctionEntry0( DUP1_CDESTINATION_CDESTINATION_ENTRY );
+
+    iId = 0;
+    iMetadata = 0;
+
+    OstTraceFunctionExit0( DUP1_CDESTINATION_CDESTINATION_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CDestination::ConstructL()
+    {
+    OstTraceFunctionEntry0( CDESTINATION_CONSTRUCTL_ENTRY );
+    OstTraceFunctionExit0( CDESTINATION_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmInstanceMapping* CCmmInstanceMapping::NewL( CCmmCache& aCache )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_NEWL_ENTRY );
+
+    CCmmInstanceMapping* self = CCmmInstanceMapping::NewLC( aCache );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmInstanceMapping* CCmmInstanceMapping::NewLC( CCmmCache& aCache )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_NEWLC_ENTRY );
+
+    CCmmInstanceMapping* self = new( ELeave ) CCmmInstanceMapping( aCache );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmInstanceMapping::~CCmmInstanceMapping()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_ENTRY );
+
+    iConnMethodItemArray.Close();
+    iUnsupportedConnMethods.Close();
+    iDestinations.ResetAndDestroy();
+    iDeletedConnMethods.Close();
+    iDeletedDestinations.Close();
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmInstanceMapping::CCmmInstanceMapping( CCmmCache& aCache ) : iCache( aCache )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_ENTRY );
+    iEasyWlanId = 0;
+    OstTraceFunctionExit0( DUP1_CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONSTRUCTL_ENTRY );
+
+    // Read connection methods from database and find the supported ones.
+    ReadAndValidateConnMethodsL();
+    // Read destinations from database.
+    ReadAndValidateDestinationsL();
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Resets arrays and reads CMs and Connection Methods
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RefreshL()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REFRESHL_ENTRY );
+
+    ReadAndValidateConnMethodsL();
+    ReadAndValidateDestinationsL();
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REFRESHL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID is a valid existing destination ID.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::ValidDestinationId( const TUint32 aId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDDESTINATIONID_ENTRY );
+
+    TBool validity( EFalse );
+
+    if ( aId > 0 )
+        {
+        for ( TInt i = 0; i < iDestinations.Count(); i++ )
+            {
+            if ( iDestinations[i]->iId == aId )
+                {
+                validity = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_VALIDDESTINATIONID_EXIT );
+    return validity;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID is a valid existing connection method ID.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::ValidConnMethodId( const TUint32 aId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDCONNMETHODID_ENTRY );
+
+    TBool validity( EFalse );
+
+    if ( aId > 0 )
+        {
+        for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+            {
+            if ( iConnMethodItemArray[i].iId == aId )
+                {
+                validity = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_VALIDCONNMETHODID_EXIT );
+    return validity;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given ID is a valid existing unsupported connection method ID.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::UnsupportedConnMethodId( const TUint32 aId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_UNSUPPORTEDCONNMETHODID_ENTRY );
+
+    TBool validity( EFalse );
+
+    if ( aId > 0 )
+        {
+        for ( TInt i = 0; i < iUnsupportedConnMethods.Count(); i++ )
+            {
+            if ( iUnsupportedConnMethods[i] == aId )
+                {
+                validity = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_UNSUPPORTEDCONNMETHODID_EXIT );
+    return validity;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination is an embedded destination in
+// any other destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::DestinationIsEmbedded( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONISEMBEDDED_ENTRY );
+
+    TBool result( EFalse );
+    TInt index( 0 );
+
+    // Iterate through all destinations.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        // An embedded destination is always at the very last position in
+        // the connection method item array.
+        index = iDestinations[i]->iConnMethodItemArray.Count() - 1;
+        if ( index >= 0 )
+            {
+            // We can skip bearer type check. If the last item isn't an
+            // embedded destination, the ID will not match anyway.
+            if ( iDestinations[i]->iConnMethodItemArray[index].iId == aDestinationId )
+                {
+                result = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONISEMBEDDED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination has an embedded destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::DestinationHasEmbedded( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONHASEMBEDDED_ENTRY );
+
+    TBool result( EFalse );
+
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        // Find the correct destination.
+        if ( iDestinations[i]->iId == aDestinationId )
+            {
+            // An embedded destination is always at the very last position in
+            // the connection method item array.
+            TInt index = iDestinations[i]->iConnMethodItemArray.Count() - 1;
+            if ( index >= 0 )
+                {
+                if ( iDestinations[i]->iConnMethodItemArray[index].IsEmbedded() )
+                    {
+                    result = ETrue;
+                    }
+                }
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONHASEMBEDDED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given destination is pointed to by any virtual
+// IAP.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::DestinationPointedToByVirtualIap(
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONPOINTEDTOBYVIRTUALIAP_ENTRY );
+
+    TBool result( EFalse );
+    if ( aDestinationId > 0 )
+        {
+        for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+            {
+            if ( iConnMethodItemArray[i].LinkedSnapId() == aDestinationId )
+                {
+                result = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONPOINTEDTOBYVIRTUALIAP_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check from database if the given connection method is pointed to by any
+// virtual IAP.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::ConnMethodPointedToByVirtualIap(
+        const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODPOINTEDTOBYVIRTUALIAP_ENTRY );
+
+    TBool result( EFalse );
+    if ( aConnMethodId > 0 )
+        {
+        for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+            {
+            if ( iConnMethodItemArray[i].LinkedIapId() == aConnMethodId )
+                {
+                result = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONNMETHODPOINTEDTOBYVIRTUALIAP_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method is the only connection method in the
+// given destination and if a virtual IAP points to that destination.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::ConnMethodInDestinationButLocked(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
+
+    TBool result( EFalse );
+
+    // Find destination.
+    CDestination* destination( NULL );
+    destination = GetDestination( aDestinationId );
+
+    if ( destination )
+        {
+        // Check if the destination has only 1 IAP.
+        if ( destination->iConnMethodItemArray.Count() == 1 )
+            {
+            // Check if the IAP has given ID.
+            if ( destination->iConnMethodItemArray[0].iId == aConnMethodId )
+                {
+                // Check if this destination is linked from a virtual IAP.
+                result = DestinationPointedToByVirtualIap( aDestinationId );
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONNMETHODINDESTINATIONBUTLOCKED_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Get bearer type of connection method matching given ID.
+// Return KErrNone if ID is found, KErrNotFound if not.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmInstanceMapping::GetConnMethodBearerType(
+        const TUint32 aConnMethodId,
+        TUint32& bearerType ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODBEARERTYPE_ENTRY );
+
+    TInt result( KErrNotFound );
+
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aConnMethodId )
+            {
+            bearerType = iConnMethodItemArray[i].iBearerType;
+            result = KErrNone;
+            break;
+            }
+        }
+    if ( result == KErrNotFound )
+        {
+        // Embedded destinations are not in connection method array.
+        if ( aConnMethodId > KCmmDestIdIntervalMin && aConnMethodId < KCmmDestIdIntervalMax )
+            {
+            if ( ValidDestinationId( aConnMethodId ) )
+                {
+                bearerType = KUidEmbeddedDestination;
+                result = KErrNone;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETCONNMETHODBEARERTYPE_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the number of destinations the provided connection method belongs
+// to. Zero is returned if the connection method belongs to no destination
+// (legacy IAP) or does not exist.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmInstanceMapping::DestinationsContainingConnMethod(
+        const TUint32 aConnMethodId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODREFERENCECOUNT_ENTRY );
+
+    TInt referenceCount( 0 );
+    TInt count( 0 );
+
+    // Go through each destination.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        TBool foundInThisDestination( EFalse );
+
+        // Loop through all connection methods in this destination.
+        count = iDestinations[i]->iConnMethodItemArray.Count();
+        for ( TInt j = 0; j < count; j++ )
+            {
+            if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                {
+                foundInThisDestination = ETrue;
+                referenceCount++;
+                break;
+                }
+            }
+
+        // Check unsupported connection methods also.
+        if ( !foundInThisDestination )
+            {
+            count = iDestinations[i]->iUnsupportedConnMethods.Count();
+            for ( TInt j = 0; j < count; j++ )
+                {
+                if ( iDestinations[i]->iUnsupportedConnMethods[j] == aConnMethodId )
+                    {
+                    referenceCount++;
+                    break;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONNMETHODREFERENCECOUNT_EXIT );
+    return referenceCount;
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the destination IDs containing the connection method given as
+// parameter.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::DestinationsContainingConnMethodL(
+        const TUint32 aConnMethodId,
+        RArray<TUint32>& aDestinationIds ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONSCONTAININGCONNMETHODL_ENTRY );
+
+    aDestinationIds.Reset();
+    TInt count( 0 );
+
+    // Go through each destination.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        TBool foundInThisDestination( EFalse );
+
+        // Loop through all connection methods in this destination.
+        count = iDestinations[i]->iConnMethodItemArray.Count();
+        for ( TInt j = 0; j < count; j++ )
+            {
+            if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                {
+                foundInThisDestination = ETrue;
+                aDestinationIds.AppendL( iDestinations[i]->iId );
+                break;
+                }
+            }
+
+        // Check unsupported connection methods also.
+        if ( !foundInThisDestination )
+            {
+            count = iDestinations[i]->iUnsupportedConnMethods.Count();
+            for ( TInt j = 0; j < count; j++ )
+                {
+                if ( iDestinations[i]->iUnsupportedConnMethods[j] == aConnMethodId )
+                    {
+                    aDestinationIds.AppendL( iDestinations[i]->iId );
+                    break;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONSCONTAININGCONNMETHODL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Get database session.
+// ---------------------------------------------------------------------------
+//
+CommsDat::CMDBSession& CCmmInstanceMapping::Session() const
+    {
+    // No traces.
+    return iCache.Session();
+    }
+
+// ---------------------------------------------------------------------------
+// Discovers all connection methods from database. Unsupported connection
+// methods are kept separately.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::ReadAndValidateConnMethodsL()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_READANDVALIDATECONNMETHODSL_ENTRY );
+
+    CMDBRecordSet<CCDIAPRecord>* iapRecordSet =
+            new( ELeave ) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
+    CleanupStack::PushL( iapRecordSet );
+
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+    CleanupStack::PushL( iapRecord );
+
+    TRAP_IGNORE( iapRecordSet->LoadL( Session() ) );
+
+    // Clear the old info about IAPs.
+    iConnMethodItemArray.Reset();
+    iUnsupportedConnMethods.Reset();
+
+    TInt iapRecordCount( iapRecordSet->iRecords.Count() );
+    TInt err( KErrNone );
+    TUint32 bearerType( 0 );
+    TUint bearerPriority( CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
+
+    for ( TInt i = 0; i < iapRecordCount; i++ )
+        {
+        TUint32 connMethodId( iapRecordSet->iRecords[i]->RecordId() );
+
+        // Check the connection method is not on the deleted list waiting to be
+        // deleted from database.
+        TInt indexInDeletedList = iDeletedConnMethods.FindInOrder( ( TUint )connMethodId );
+        if ( indexInDeletedList == KErrNotFound )
+            {
+            // Check the bearer type of the iap. Leaves if iap is unsupported.
+            iapRecord->SetRecordId( connMethodId );
+            TRAP( err, iCache.BearerInfoFromIapRecordL( iapRecord, bearerType, bearerPriority ) );
+            if ( !err )
+                {
+                TBool isVirtual( EFalse );
+                TUint32 linkedIap( 0 );
+                TUint32 linkedSnap( 0 );
+
+                // BearerInfoFromIapRecordL() has called LoadL() for iapRecord.
+                if( TPtrC( KCDTypeNameVPNService ) == iapRecord->iServiceType )
+                    {
+                    isVirtual = ETrue;
+                    CCDVPNServiceRecord* serviceRecord = static_cast<CCDVPNServiceRecord*>(
+                            CCDRecordBase::RecordFactoryL( KCDTIdVPNServiceRecord ) );
+                    CleanupStack::PushL( serviceRecord );
+                    serviceRecord->SetRecordId( iapRecord->iService );
+                    serviceRecord->LoadL( Session() );
+
+                    // If neither link is set, or both are set, it is an error
+                    // but we ignore it. If both links are set, we use only the
+                    // SNAP link.
+                    if ( !serviceRecord->iServiceSNAP.IsNull() )
+                        {
+                        TUint32 apRecordId = serviceRecord->iServiceSNAP;
+                        if ( apRecordId != 0 )
+                            {
+                            CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(
+                                    CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
+                            apRecord->SetRecordId( apRecordId );
+                            TRAP( err, apRecord->LoadL( Session() ) );
+                            if ( !err )
+                                {
+                                linkedSnap = apRecord->iRecordTag;
+                                }
+                            }
+                        }
+                    if ( !linkedSnap && !serviceRecord->iServiceIAP.IsNull() )
+                        {
+                        linkedIap = serviceRecord->iServiceIAP;
+                        if ( linkedIap >= KCmmConnMethodIdIntervalMax )
+                            {
+                            linkedIap = ( linkedIap & KCDMaskShowRecordId ) >> KBitsInOneByte;
+                            }
+                        }
+
+                    CleanupStack::PopAndDestroy( serviceRecord );
+                    }
+                    TCmmConnMethodItem item(
+                            connMethodId,
+                            bearerType,
+                            bearerPriority,
+                            0,
+                            isVirtual,
+                            linkedIap,
+                            linkedSnap );
+                    iConnMethodItemArray.Append( item ); // Ignore errors.
+                }
+            else if ( err == KErrNotSupported )
+                {
+                iUnsupportedConnMethods.InsertInOrder( ( TUint )connMethodId ); // Ignore errors.
+                }
+            else if ( err == KErrNoMemory )
+                {
+                User::Leave( err );
+                }
+            }
+        }
+
+    CleanupStack::PopAndDestroy( iapRecord );
+    CleanupStack::PopAndDestroy( iapRecordSet );
+
+    // Check all virtual IAPs that link to an IAP. If the link is invalid
+    // (linked IAP not found), the IAP is removed.
+    ValidateVirtualIapsLinkingToIaps();
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_READANDVALIDATECONNMETHODSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Discovers all destinations and the connection methods inside them.
+// Unsupported connection methods are kept separately.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::ReadAndValidateDestinationsL()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_READANDVALIDATEDESTINATIONSL_ENTRY );
+
+    // Make 2 loops, first add destinations and then connection methods / embedded destinations.
+    iDestinations.ResetAndDestroy();
+
+    // Explicitly build a TLinearOrder<class>. Used as parameter to RArray::InsertInOrder().
+    TLinearOrder<TCmmConnMethodItem> connMethodItemOrderingLogic( TCmmConnMethodItem::Compare );
+
+    CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>* snapRecordSet =
+            new( ELeave ) CMDBRecordSet<CCDDataMobilitySelectionPolicyRecord>(
+                    iCache.TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecordSet );
+
+    CCDDataMobilitySelectionPolicyRecord* snapRecord =
+            new( ELeave ) CCDDataMobilitySelectionPolicyRecord(
+                    iCache.TableId( ECmmDbSnapRecord ) );
+    CleanupStack::PushL( snapRecord );
+
+    TRAP_IGNORE( snapRecordSet->LoadL( Session() ) );
+
+    // Read snap ID, connection method ID and embedded destination ID.
+    const TInt snapRecordCount( snapRecordSet->iRecords.Count() );
+    for ( TInt i = 0; i < snapRecordCount; i++ )
+        {
+        snapRecord->SetElementId( snapRecordSet->iRecords[i]->ElementId() );
+        snapRecord->LoadL( Session() );
+
+        TUint32 destinationId = (TUint32)( snapRecord->iSNAP );
+        TInt indexInDeletedList = iDeletedDestinations.FindInOrder( ( TUint )destinationId );
+        if ( indexInDeletedList == KErrNotFound )
+            {
+            TUint32 connMethodId = ( snapRecord->iIAP & KCDMaskShowRecordId ) >> 8;
+            TUint32 embeddedDestinationId = (TUint32)( snapRecord->iEmbeddedSNAP );
+
+            // If connMethodId and embeddedDestinationId are 0 this is a destination.
+            if ( connMethodId == 0 && embeddedDestinationId == 0 )
+                {
+                TBool destAlreadyExists = ValidDestinationId( destinationId );
+                if ( !destAlreadyExists )
+                    {
+                    CCDSNAPMetadataRecord* metadataRecord = new( ELeave ) CCDSNAPMetadataRecord(
+                            iCache.TableId( ECmmDestMetadataRecord ) );
+                    CleanupStack::PushL( metadataRecord );
+
+                    // Add destination metadata.
+                    metadataRecord->iSNAP.SetL( destinationId );
+                    if ( metadataRecord->FindL( Session() ) )
+                        {
+                        metadataRecord->LoadL( Session() );
+
+                        CDestination* dest = CDestination::NewLC();
+                        dest->iId = destinationId;
+                        dest->iMetadata = metadataRecord->iMetadata;
+                        iDestinations.AppendL( dest );
+                        CleanupStack::Pop( dest );
+                        }
+                    CleanupStack::PopAndDestroy( metadataRecord );
+                    metadataRecord = NULL;
+                    }
+                }
+            }
+        }
+
+    // Check all virtual IAPs that link to a SNAP. If the link is invalid
+    // (linked SNAP not found), the IAP is removed.
+    ValidateVirtualIapsLinkingToSnaps();
+
+    // Read snap ID, connection method ID and embedded destination ID.
+    for ( TInt i = 0; i < snapRecordCount; i++ )
+        {
+        snapRecord->SetElementId( snapRecordSet->iRecords[i]->ElementId() );
+        snapRecord->LoadL( Session() );
+
+        TUint32 destinationId = (TUint32)( snapRecord->iSNAP );
+        TUint32 connMethodId = ( snapRecord->iIAP & KCDMaskShowRecordId ) >> 8;
+        TUint32 embeddedDestinationId = (TUint32)( snapRecord->iEmbeddedSNAP );
+
+        // If connMethodId or embeddedDestinationId differs from 0 this is a connection method object.
+        if ( connMethodId > 0 || embeddedDestinationId > 0 )
+            {
+            // Find destination.
+            CDestination* destination( NULL );
+            destination = GetDestination( destinationId );
+
+            if ( destination )
+                {
+                if ( connMethodId )
+                    {
+                    // Connection method, not embedded destination.
+                    TBool found( EFalse );
+                    TCmmConnMethodItem item;
+
+                    // Find connection method.
+                    for ( TInt j = 0; j < iConnMethodItemArray.Count(); j++ )
+                        {
+                        if ( iConnMethodItemArray[j].iId == connMethodId )
+                            {
+                            item = iConnMethodItemArray[j];
+                            found = ETrue;
+                            break;
+                            }
+                        }
+                    if ( found )
+                        {
+                        // Make sure no duplicate entries are allowed. Any
+                        // duplicate would imply a corrupted CommsDat.
+                        TInt index = destination->iConnMethodItemArray.Find<TUint32>(
+                                connMethodId,
+                                TCmmConnMethodItem::FindCompare );
+                        if ( index == KErrNotFound )
+                            {
+                            item.iPriority = snapRecord->iPriority;
+                            destination->iConnMethodItemArray.InsertInOrderAllowRepeats(
+                                    item,
+                                    connMethodItemOrderingLogic ); // Ignore errors.
+                            }
+                        }
+                    else
+                        {
+                        // Check if the connection method is unsupported instead.
+                        TBool isUnsupported = UnsupportedConnMethodId( connMethodId );
+                        if ( isUnsupported )
+                            {
+                            destination->iUnsupportedConnMethods.InsertInOrder(
+                                    ( TUint )connMethodId ); // Ignore errors.
+                            }
+                        }
+                    }
+
+                else
+                    {
+                    // Embedded destination, not IAP.
+                    // Prevent destinations from embedding themselves.
+                    if ( embeddedDestinationId != destinationId )
+                        {
+                        // Check embedded destination ID is valid.
+                        TBool valid = ValidDestinationId( embeddedDestinationId );
+                        if ( valid )
+                            {
+                            TCmmConnMethodItem item(
+                                    embeddedDestinationId,
+                                    KUidEmbeddedDestination,
+                                    CMManager::KDataMobilitySelectionPolicyPriorityWildCard,
+                                    CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
+                            destination->iConnMethodItemArray.InsertInOrderAllowRepeats(
+                                    item,
+                                    connMethodItemOrderingLogic );
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy( snapRecord );
+    CleanupStack::PopAndDestroy( snapRecordSet );
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_READANDVALIDATEDESTINATIONSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Goes through the internal IAP table, checking all virtual IAPs that link to
+// an IAP. If the linked IAP is not found, the virtual IAP is removed.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::ValidateVirtualIapsLinkingToIaps()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDATEVIRTUALIAPSLINKINGTOIAPS_ENTRY );
+
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].LinkedIapId() != 0 )
+            {
+            if ( !ValidConnMethodId( iConnMethodItemArray[i].LinkedIapId() ) )
+                {
+                iConnMethodItemArray.Remove( i );
+                i--; // Adjust counter.
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_VALIDATEVIRTUALIAPSLINKINGTOIAPS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Goes through the internal IAP table, checking all virtual IAPs that link to
+// a SNAP. If the linked SNAP is not found, the virtual IAP is removed.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::ValidateVirtualIapsLinkingToSnaps()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDATEVIRTUALIAPSLINKINGTOSNAPS_ENTRY );
+
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].LinkedSnapId() != 0 )
+            {
+            if ( !ValidDestinationId( iConnMethodItemArray[i].LinkedSnapId() ) )
+                {
+                iConnMethodItemArray.Remove( i );
+                i--; // Adjust counter.
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_VALIDATEVIRTUALIAPSLINKINGTOSNAPS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Find the destination item matching the provided destination ID.
+// Returns a pointer to the internal destination item, NULL if not found.
+// ---------------------------------------------------------------------------
+//
+CDestination* CCmmInstanceMapping::GetDestination( const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETDESTINATION_ENTRY );
+
+    CDestination* destination( NULL );
+    if ( aDestinationId > 0 )
+        {
+        for ( TInt i = 0; i < iDestinations.Count(); i++ )
+            {
+            if ( iDestinations[i]->iId == aDestinationId )
+                {
+                destination = iDestinations[i];
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETDESTINATION_EXIT );
+    return destination;
+    }
+
+// ---------------------------------------------------------------------------
+// Find and return a copy of a connection method item matching the given ID.
+// Returns KErrNotFound, if the connection method is not found.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmInstanceMapping::GetConnMethodItem(
+        const TUint32 aConnMethodId,
+        TCmmConnMethodItem& aConnMethodItem ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODITEM_ENTRY );
+
+    TInt result( KErrNotFound );
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aConnMethodId )
+            {
+            aConnMethodItem = iConnMethodItemArray[i];
+            result = KErrNone;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETCONNMETHODITEM_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Returns all conenction method IDs. Unsupported connection methods are
+// included if aCheckBearerType is set to EFalse.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::GetAllConnMethodsL(
+        RArray<TUint32>& aConnMethodArray,
+        TBool aCheckBearerType ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODSL_ENTRY );
+
+    TInt connMethodCount = iConnMethodItemArray.Count();
+    aConnMethodArray.Reset();
+
+    if ( aCheckBearerType )
+        {
+        aConnMethodArray.ReserveL( connMethodCount );
+        }
+    else
+        {
+        aConnMethodArray.ReserveL( connMethodCount + iUnsupportedConnMethods.Count() );
+        }
+
+    for ( TInt i = 0; i < connMethodCount; i++ )
+        {
+        aConnMethodArray.AppendL( iConnMethodItemArray[i].iId );
+        }
+    if ( !aCheckBearerType )
+        {
+        // Include unsupported connection methods also.
+        for ( TInt i = 0; i < iUnsupportedConnMethods.Count(); i++ )
+            {
+            aConnMethodArray.AppendL( ( TUint32 )iUnsupportedConnMethods[i] );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETCONNMETHODSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return the number of destinations in database.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmInstanceMapping::GetDestinationCount() const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETDESTINATIONCOUNT_ENTRY );
+
+    return iDestinations.Count();
+    }
+
+// ---------------------------------------------------------------------------
+// Return an array containing all destination IDs.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::GetDestinationsL( RArray<TUint32>& aDestinationArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETDESTINATIONSL_ENTRY );
+
+    aDestinationArray.Reset();
+    aDestinationArray.ReserveL( iDestinations.Count() ); // Re-allocates only if more is needed.
+
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        aDestinationArray.AppendL( iDestinations[i]->iId );
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETDESTINATIONSL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Inserts all the valid connection methods inside the given destination into
+// the provided connection method item array. The array is reset first.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::GetConnMethodsFromDestinationL(
+        const TUint32 aDestinationId,
+        RArray<TCmmConnMethodItem>& aConnMethodArray ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODSFROMDESTINATIONL_ENTRY );
+
+    TBool destinationFound( EFalse );
+
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        if ( iDestinations[i]->iId == aDestinationId )
+            {
+            destinationFound = ETrue;
+            aConnMethodArray.Reset();
+            aConnMethodArray.ReserveL( iDestinations[i]->iConnMethodItemArray.Count() );
+
+            for ( TInt j = 0; j < iDestinations[i]->iConnMethodItemArray.Count(); j++ )
+                {
+                aConnMethodArray.AppendL( iDestinations[i]->iConnMethodItemArray[j] );
+                }
+            break;
+            }
+        }
+    if ( !destinationFound )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_GETCONNMETHODSFROMDESTINATIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if the given connection method belongs to any other destination than
+// the one provided.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmInstanceMapping::ConnMethodInOtherDestination(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODINOTHERDESTINATION_ENTRY );
+
+    // Loop through all destinations.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        // Skip the specified destination.
+        if ( iDestinations[i]->iId != aDestinationId )
+            {
+            // Loop through all connection methods in the current destination.
+            for ( TInt j = 0; j < iDestinations[i]->iConnMethodItemArray.Count(); j++ )
+                {
+                if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                    {
+                    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONNMETHODINOTHERDESTINATION_EXIT );
+                    return ETrue;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMMINSTANCEMAPPING_CONNMETHODINOTHERDESTINATION_EXIT );
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmInstanceMapping::EasyWlanIdL()
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_EASYWLANIDL_ENTRY );
+
+    iEasyWlanId = 0;
+
+    // Check WLAN support.
+    if ( iCache.WlanSupported() )
+        {
+        CMDBRecordSet<CCDIAPRecord>* iapRecordSet =
+                new( ELeave ) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
+        CleanupStack::PushL( iapRecordSet );
+        TRAP_IGNORE( iapRecordSet->LoadL( Session() ) );
+
+        TInt iapRecordCount( iapRecordSet->iRecords.Count() );
+        for ( TInt i = 0; i < iapRecordCount; i++ )
+            {
+            CCDIAPRecord* iapRecord = ( CCDIAPRecord* )iapRecordSet->iRecords[i];
+
+            if ( TPtrC( iapRecord->iServiceType ) == TPtrC( KCDTypeNameLANService ) &&
+                    TPtrC( iapRecord->iBearerType ) == TPtrC( KCDTypeNameLANBearer ) )
+                {
+                TUint32 serviceId = iapRecord->iService;
+
+                CCDWlanServiceRecord* wlanServ =
+                        new( ELeave ) CCDWlanServiceRecord(
+                                CCDWlanServiceRecord::TableIdL( Session() ) );
+                CleanupStack::PushL( wlanServ );
+
+                wlanServ->iWlanServiceId.SetL( serviceId );
+                if ( wlanServ->FindL( Session() ) )
+                    {
+                    wlanServ->LoadL( Session() );
+                    // Only EasyWLAN IAP has NULL in SSID field.
+                    if ( wlanServ->iWLanSSID.IsNull() ||
+                            !( TPtrC( wlanServ->iWLanSSID ).Compare( KNullDesC ) ) )
+                        {
+                        iEasyWlanId = iapRecord->RecordId();
+                        }
+                    }
+                CleanupStack::PopAndDestroy( wlanServ );
+                }
+            if ( iEasyWlanId != 0 )
+                {
+                break;
+                }
+            }
+        CleanupStack::PopAndDestroy( iapRecordSet );
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_EASYWLANIDL_EXIT );
+    return iEasyWlanId;
+    }
+
+// ---------------------------------------------------------------------------
+// Find out the internet destination ID. ID is set to 0 if not found.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::InternetDestinationIdL( TUint& aInternetDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_INTERNETDESTINATIONIDL_ENTRY );
+
+    // Set to zero in case the destination is not found.
+    aInternetDestinationId = 0;
+
+    CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>* metaSet =
+            new( ELeave )CommsDat::CMDBRecordSet<CCDSNAPMetadataRecord>(
+                    iCache.TableId( ECmmDestMetadataRecord ) );
+    CleanupStack::PushL( metaSet );
+
+    TRAP_IGNORE( metaSet->LoadL( Session() ) );
+
+    CCDSNAPMetadataRecord* metadataRecord =
+            new( ELeave ) CCDSNAPMetadataRecord(
+                    iCache.TableId( ECmmDestMetadataRecord ) );
+    CleanupStack::PushL( metadataRecord );
+
+    for ( TInt i = 0; i < metaSet->iRecords.Count(); i++ )
+        {
+        metadataRecord->SetRecordId( metaSet->iRecords[i]->RecordId() );
+        metadataRecord->LoadL( Session() );
+
+        TUint32 metadata = metadataRecord->iMetadata;
+
+        TUint32 internet = metadata &
+                CMManager::ESnapMetadataInternet;
+        TUint32 localizationValue = ( metadata &
+                CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
+        TUint32 purposeValue = ( metadata &
+                CMManager::ESnapMetadataPurpose ) >> 8;
+
+        // The first record that has a matching value in any of the 3 metadata
+        // fields will be taken as the internet snap.
+        if ( internet ||
+                ( localizationValue == CMManager::ELocalisedDestInternet ) ||
+                ( purposeValue == CMManager::ESnapPurposeInternet ) )
+            {
+            TInt id = metadataRecord->iSNAP;
+            if ( ValidDestinationId( ( TUint32 )id ) )
+                {
+                aInternetDestinationId = ( TUint )id;
+                break;
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy( metadataRecord );
+    CleanupStack::PopAndDestroy( metaSet );
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_INTERNETDESTINATIONIDL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Add a connection method ID to deleted list. Ignores any duplicates. Also
+// removes the connection method from destination/connection method structures
+// so Refresh()-call is not needed. Use this method if the connection method
+// has not been removed from database yet.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::AddConnMethodToDeletedListL( const TUint aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_ADDCONNMETHODTODELETEDLISTL_ENTRY );
+
+    iDeletedConnMethods.InsertInOrderL( aConnMethodId );
+
+    // Remove the connection method from current destination/connection method structures.
+    RemoveConnMethod( aConnMethodId );
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_ADDCONNMETHODTODELETEDLISTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove a connection method ID from deleted list. Nothing happens if ID is
+// not found from the list.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveConnMethodFromDeletedList( const TUint aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDELETEDLIST_ENTRY );
+
+    TInt index = iDeletedConnMethods.FindInOrder( aConnMethodId );
+    if ( index != KErrNotFound )
+        {
+        iDeletedConnMethods.Remove( index );
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDELETEDLIST_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Add a destination ID to deleted list. Ignores any duplicates. Also removes
+// the destination from destination/connection method structures so
+// Refresh()-call is not needed. Use this method if the connection method has
+// not been removed from database yet.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::AddDestinationToDeletedListL( const TUint aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_ADDDESTINATIONTODELETEDLISTL_ENTRY );
+
+    iDeletedDestinations.InsertInOrderL( aDestinationId );
+
+    // Remove the destination from current destination/connection method structures.
+    RemoveDestination( aDestinationId );
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_ADDDESTINATIONTODELETEDLISTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove a destination ID from deleted list. Nothing happens if ID is not
+// found from the list.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveDestinationFromDeletedList( const TUint aDestinationId ) //TODO, check removal is called in all necessary places.
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVEDESTINATIONFROMDELETEDLIST_ENTRY );
+
+    TInt index = iDeletedDestinations.FindInOrder( aDestinationId );
+    if ( index != KErrNotFound )
+        {
+        iDeletedDestinations.Remove( index );
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REMOVEDESTINATIONFROMDELETEDLIST_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove the connection method from current destination/connection method
+// structures. This is a lot faster than calling Refresh(). Use this method if
+// the connection method has been removed from database.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveConnMethod( const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHOD_ENTRY );
+
+    // Remove from list of connection methods.
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aConnMethodId )
+            {
+            iConnMethodItemArray.Remove( i );
+            break;
+            }
+        }
+
+    // Remove connection method from all destinations.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        for ( TInt j = 0; j < iDestinations[i]->iConnMethodItemArray.Count(); j++ )
+            {
+            if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                {
+                iDestinations[i]->iConnMethodItemArray.Remove( j );
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REMOVECONNMETHOD_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove the connection method from current destination/connection method
+// structures. This is a lot faster than calling Refresh(). Use this method if
+// the connection method has been removed from database.
+// Also adds the ID of any changed destinations to the provided array.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveConnMethod(
+        const TUint32 aConnMethodId,
+        RArray<TUint32>& aChangedDestinations )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMINSTANCEMAPPING_REMOVECONNMETHOD_ENTRY );
+
+    // Remove from list of connection methods.
+    for ( TInt i = 0; i < iConnMethodItemArray.Count(); i++ )
+        {
+        if ( iConnMethodItemArray[i].iId == aConnMethodId )
+            {
+            iConnMethodItemArray.Remove( i );
+            break;
+            }
+        }
+
+    // Remove connection method from all destinations.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        for ( TInt j = 0; j < iDestinations[i]->iConnMethodItemArray.Count(); j++ )
+            {
+            if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                {
+                iDestinations[i]->iConnMethodItemArray.Remove( j );
+                // Add ID of changed destination into array. Ignore any error.
+                aChangedDestinations.Append( iDestinations[i]->iId );
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMMINSTANCEMAPPING_REMOVECONNMETHOD_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove the destination from current destination/connection method
+// structures. This is a lot faster than calling Refresh(). Use this method if
+// the connection method has been removed from database.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveDestination( const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVEDESTINATION_ENTRY );
+
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        if ( iDestinations[i]->iId == aDestinationId )
+            {
+            delete iDestinations[i];
+            iDestinations.Remove( i );
+            i--;
+            }
+        else
+            {
+            // Check also if the destination is an embedded destination
+            // anywhere, and remove that reference too.
+            TInt cmCount( iDestinations[i]->iConnMethodItemArray.Count() );
+            if ( cmCount )
+                {
+                if ( iDestinations[i]->iConnMethodItemArray[cmCount - 1].iId == aDestinationId )
+                    {
+                    iDestinations[i]->iConnMethodItemArray.Remove( cmCount - 1 );
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REMOVEDESTINATION_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Remove the connection method from all destinations in the current
+// destination/connection method structures. This is a lot faster than calling
+// Refresh(). The ID of any changed destination is added to the
+// aChangedDestinations-array.
+// ---------------------------------------------------------------------------
+//
+void CCmmInstanceMapping::RemoveConnMethodFromDestinations(
+        const TUint32 aConnMethodId,
+        RArray<TUint32>& aChangedDestinations )
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDESTINATIONS_ENTRY );
+
+    // Remove given connection method from all destinations.
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        for ( TInt j = 0; j < iDestinations[i]->iConnMethodItemArray.Count(); j++ )
+            {
+            if ( iDestinations[i]->iConnMethodItemArray[j].iId == aConnMethodId )
+                {
+                iDestinations[i]->iConnMethodItemArray.Remove( j );
+                // Add ID of changed destination into array. Ignore any error.
+                aChangedDestinations.Append( iDestinations[i]->iId );
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDESTINATIONS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Iterate through destinations to find the one identified with provided ID
+// and return its metadata.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmInstanceMapping::DestinationMetadata(
+        const TUint32 aDestinationId ) const
+    {
+    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONMETADATA_ENTRY );
+
+    TUint32 metadata( 0 );
+    for ( TInt i = 0; i < iDestinations.Count(); i++ )
+        {
+        if ( iDestinations[i]->iId == aDestinationId )
+            {
+            metadata = iDestinations[i]->iMetadata;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONMETADATA_EXIT );
+    return metadata;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmlistenermanager.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,180 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Manages all CommsDat table specific CenRep listeners.
+*
+*/
+
+
+#include "cmmcache.h"
+#include "cmmlistenermanager.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmlistenermanagerTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmListenerManager* CCmmListenerManager::NewL( CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_NEWL_ENTRY );
+
+    CCmmListenerManager* self = CCmmListenerManager::NewLC( aCache );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Two phased construction.
+// ---------------------------------------------------------------------------
+//
+CCmmListenerManager* CCmmListenerManager::NewLC( CCmmCache* aCache )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_NEWLC_ENTRY );
+
+    CCmmListenerManager* self = new( ELeave ) CCmmListenerManager( aCache );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_NEWLC_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmListenerManager::~CCmmListenerManager()
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_CCMMLISTENERMANAGER_ENTRY );
+
+    // The destructor of each listener will cancel their own active request.
+    iListeners.ResetAndDestroy();
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_CCMMLISTENERMANAGER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmListenerManager::CCmmListenerManager( CCmmCache* aCache ) : iCache( aCache )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMLISTENERMANAGER_CCMMLISTENERMANAGER_ENTRY );
+    OstTraceFunctionExit0( DUP1_CCMMLISTENERMANAGER_CCMMLISTENERMANAGER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmListenerManager::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_CONSTRUCTL_ENTRY );
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Adds a new listener to monitor for changes in the given database table.
+// ---------------------------------------------------------------------------
+//
+void CCmmListenerManager::AddListenerL( TUint32 aIdentifier )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_ADDLISTENERL_ENTRY );
+
+    TBool duplicateFound( EFalse );
+    for ( TInt i = 0; i < iListeners.Count(); i++ )
+        {
+        if ( iListeners[i]->GetTableId() == aIdentifier )
+            {
+            duplicateFound = ETrue;
+            break;
+            }
+        }
+
+    if ( !duplicateFound )
+        {
+        CCmmDbChangeListener* dbChangeListener = CCmmDbChangeListener::NewLC( this, aIdentifier );
+        iListeners.AppendL( dbChangeListener );
+        CleanupStack::Pop( dbChangeListener );
+        TInt err = dbChangeListener->Start();
+        if ( err )
+            {
+            iCache->DbChangeError( aIdentifier );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_ADDLISTENERL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Stops and deletes the listener monitoring the given database table.
+// ---------------------------------------------------------------------------
+//
+TInt CCmmListenerManager::RemoveListener( TUint32 aIdentifier )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_REMOVELISTENER_ENTRY );
+
+    TInt res( KErrNotFound );
+    for ( TInt i = 0; i < iListeners.Count(); i++ )
+        {
+        if ( iListeners[i]->GetTableId() == aIdentifier )
+            {
+            delete iListeners[i];
+            iListeners.Remove( i );
+            res = KErrNone;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_REMOVELISTENER_EXIT );
+    return res;
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the listener manager that a change has been detected in the given
+// database table.
+// ---------------------------------------------------------------------------
+//
+void CCmmListenerManager::DbChangeDetectedL( TUint32 aIdentifier )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_DBCHANGEDETECTED_ENTRY );
+
+    iCache->DbChangeDetectedL( aIdentifier );
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_DBCHANGEDETECTED_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Tells the listener manager that an error has been encountered while
+// listening the given database table. Change notifications will not be working
+// for this database table.
+// ---------------------------------------------------------------------------
+//
+void CCmmListenerManager::DbChangeError( TUint32 aIdentifier )
+    {
+    OstTraceFunctionEntry0( CCMMLISTENERMANAGER_DBCHANGEERROR_ENTRY );
+
+    iCache->DbChangeError( aIdentifier );
+
+    OstTraceFunctionExit0( CCMMLISTENERMANAGER_DBCHANGEERROR_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,624 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Connection method manager server.
+*
+*/
+
+
+#include <cmconnectionmethoddef.h>
+#include <cmpluginpacketdatadef.h>
+#include <cmpluginwlandef.h>
+
+#include "cmmserver.h"
+#include "cmmsession.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmserverTraces.h"
+#endif
+
+
+const TUint CCmmServer::iCmmRangeCount = 12;
+
+const TInt CCmmServer::iCmmRanges[iCmmRangeCount] =
+    {
+    0,      //  1.   0-11
+    12,     //  2.  12-15
+    16,     //  3.  16-22
+    23,     //  4.  23-99
+    100,    //  5. 100-113
+    114,    //  6. 114-128
+    129,    //  7. 129-199
+    200,    //  8. 200-205
+    206,    //  9. 206-210
+    211,    // 10. 211-214
+    215,    // 11. 215-220
+    221     // 12. 221-KMaxInt
+    };
+
+const TUint8 CCmmServer::iCmmElementIndex[iCmmRangeCount] =
+    {
+    CPolicyServer::EAlwaysPass,     // 0-11
+    CPolicyServer::ECustomCheck,    // 12-15
+    CPolicyServer::ECustomCheck,    // 16-22
+    CPolicyServer::ENotSupported,   // 23-99
+    CPolicyServer::EAlwaysPass,     // 100-113
+    CPolicyServer::ECustomCheck,    // 114-128
+    CPolicyServer::ENotSupported,   // 129-199
+    CPolicyServer::EAlwaysPass,     // 200-205
+    CPolicyServer::ECustomCheck,    // 206-210
+    CPolicyServer::ECustomCheck,    // 211-214
+    CPolicyServer::ECustomCheck,    // 215-220
+    CPolicyServer::ENotSupported    // 221->
+    };
+
+const CPolicyServer::TPolicyElement CCmmServer::iCmmElements[] =
+    {
+    {_INIT_SECURITY_POLICY_C1(ECapabilityReadDeviceData), CPolicyServer::EFailClient},
+    {_INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData), CPolicyServer::EFailClient},
+    {_INIT_SECURITY_POLICY_C2(ECapabilityReadDeviceData, ECapabilityWriteDeviceData), 
+            CPolicyServer::EFailClient},
+    {_INIT_SECURITY_POLICY_C1(ECapabilityNetworkControl), CPolicyServer::EFailClient},
+    };
+
+const CPolicyServer::TPolicy CCmmServer::iCmmPolicy =
+    {
+    CPolicyServer::EAlwaysPass, // Specifies all connect attempts should pass
+    iCmmRangeCount,     // Count of ranges
+    iCmmRanges,         // 0-11, 12-15, 16...
+    iCmmElementIndex,   // What to do for each range
+    iCmmElements        // The list of policy elements
+    };
+
+
+// -----------------------------------------------------------------------------
+// CCmmServer::CustomSecurityCheckL
+// Implements custom security checking for IPCs marked with
+// TSpecialCase::ECustomCheck.
+// -----------------------------------------------------------------------------
+//
+CPolicyServer::TCustomResult CCmmServer::CustomSecurityCheckL(
+        const RMessage2& aMessage,
+        TInt& /*aAction*/,
+        TSecurityInfo& /*aMissing*/ )
+    {
+    switch ( aMessage.Function() )
+        {
+        // ***********  2nd range: 12-15 *************
+        case ECmmGetConnMethodInfoInt:
+        case ECmmGetConnMethodInfoBool:
+        case ECmmGetConnMethodInfoString:
+        case ECmmGetConnMethodInfoString8:
+        // ***********  10th range: 211-214 *************
+        case ECMGetIntAttribute:
+        case ECMGetBoolAttribute:
+        case ECMGetStringAttribute:
+        case ECMGetString8Attribute:
+            {
+            switch ( aMessage.Int0() )
+                {
+                // Private userdata has to be checked.
+                // WPA:
+                case CMManager::EWlanEnableWpaPsk:
+                case CMManager::EWlanWpaPreSharedKey:
+                // WEP:
+                case CMManager::EWlanWepKey1InHex:
+                case CMManager::EWlanWepKey2InHex:
+                case CMManager::EWlanWepKey3InHex:
+                case CMManager::EWlanWepKey4InHex:
+                case CMManager::EWlanWepKey1InAscii:
+                case CMManager::EWlanWepKey2InAscii:
+                case CMManager::EWlanWepKey3InAscii:
+                case CMManager::EWlanWepKey4InAscii:
+                case CMManager::EWlanWepKeyIndex:
+                // WAPI:
+                case CMManager::EWlanWapiPsk:
+                case CMManager::EWlanWapiPskFormat:
+                // 802.1x:
+                case CMManager::EWlan802_1xAllowUnencrypted:
+                // Authentication:
+                case CMManager::ECmIFAuthName:
+                case CMManager::EPacketDataIFAuthName:
+                case CMManager::ECmIFAuthPass:
+                case CMManager::EPacketDataIFAuthPass:
+                    {
+                    // ECapabilityReadDeviceData
+                    return ( iCmmElements[0].iPolicy.CheckPolicy( aMessage ) ) ?
+                        EPass : EFail;
+                    }
+                default:
+                    // By default reading does not need any capabilities.
+                    return EPass;
+                }
+            }
+        // ***********  3rd range: 16-22 *************
+        case ECmmUpdateBearerPriorityArray:
+        case ECmmWriteDefaultConnection:
+        case ECmmWriteGeneralConnectionSettings:
+        // At this phase all capabilities are not checked because of
+        // it's too heavy operation...
+        // At Session phase the protection of the destination and/or
+        // connection method is checked. If protected, 
+        // ECapabilityNetworkControl is checked.
+        case ECmmCopyConnMethod:
+        case ECmmMoveConnMethod:
+        case ECmmRemoveConnMethod:
+        case ECmmRemoveAllReferences:
+            {
+            // ECapabilityWriteDeviceData is needed for writing
+            return ( iCmmElements[1].iPolicy.CheckPolicy( aMessage ) ) ?
+                EPass : EFail;
+            }
+        // ***********  6th range: 114-128 *************
+        case EDestCreateDestinationWithName:
+        case EDestCreateDestinationWithNameAndId:
+        case EDestIsConnected:
+        case EDestAddConnMethod:
+        case EDestAddEmbeddedDestination:
+        case EDestDeleteConnMethod:
+        case EDestRemoveConnMethod:
+        case EDestModifyPriority:
+        case EDestSetName:
+        case EDestSetMetadata:
+        case EDestSetProtection:
+        case EDestSetHidden:
+        case EDestUpdate:
+        case EDestDelete:
+        case EDestSetIcon:
+            {
+            // ECapabilityWriteDeviceData is needed for writing
+            return ( iCmmElements[1].iPolicy.CheckPolicy( aMessage ) ) ?
+                EPass : EFail;
+            }
+        // ***********  9th range: 206-210 *************
+
+        // ECapabilityWriteDeviceData is needed for writing
+        case ECMCreateConnMethod:
+        case ECMCreateConnMethodWithId:
+        
+        // At this phase all capabilities are not checked because of
+        // it's too heavy operation...
+        // At Session phase the protection of the destination and/or
+        // connection method is checked. If protected, 
+        // ECapabilityNetworkControl is checked.
+        case ECMCreateConnMethodToDest:
+        case ECMCreateConnMethodToDestWithId:
+        case ECMCreateCopyOfExisting:
+            {
+            return ( iCmmElements[1].iPolicy.CheckPolicy( aMessage ) ) ?
+                EPass : EFail;
+            }
+        // ***********  11th range: 215-220 *************
+        // Protection of the CM is checked later(protected needs ECapabilityNetworkControl)
+        case ECMSetIntAttribute:
+        case ECMSetBoolAttribute:
+        case ECMSetStringAttribute:
+        case ECMSetString8Attribute:
+            {
+            switch ( aMessage.Int0() )
+                {
+                // WPA:
+                case CMManager::EWlanEnableWpaPsk:
+                case CMManager::EWlanWpaPreSharedKey:
+                // WEP:
+                case CMManager::EWlanWepKey1InHex:
+                case CMManager::EWlanWepKey2InHex:
+                case CMManager::EWlanWepKey3InHex:
+                case CMManager::EWlanWepKey4InHex:
+                case CMManager::EWlanWepKey1InAscii:
+                case CMManager::EWlanWepKey2InAscii:
+                case CMManager::EWlanWepKey3InAscii:
+                case CMManager::EWlanWepKey4InAscii:
+                case CMManager::EWlanWepKeyIndex:
+                // WAPI:
+                case CMManager::EWlanWapiPsk:
+                case CMManager::EWlanWapiPskFormat:
+                // 802.1x:
+                case CMManager::EWlan802_1xAllowUnencrypted:
+                // Authentication:
+                case CMManager::ECmIFAuthName:
+                case CMManager::EPacketDataIFAuthName:
+                case CMManager::ECmIFAuthPass:
+                case CMManager::EPacketDataIFAuthPass:
+                    {
+                    // ECapabilityReadDeviceData
+                    return ( iCmmElements[2].iPolicy.CheckPolicy( aMessage ) ) ?
+                        EPass : EFail;
+                    }
+                default:
+                    {
+                    // ECapabilityWriteDeviceData
+                    return ( iCmmElements[1].iPolicy.CheckPolicy( aMessage ) ) ?
+                        EPass : EFail;
+                    }
+                }
+            }
+        case ECMDelete:
+        case ECMUpdate:
+            {
+            // ECapabilityWriteDeviceData (if protected, ECapabilityNetworkControl
+            // is checked later).
+            return ( iCmmElements[1].iPolicy.CheckPolicy( aMessage ) ) ?
+                EPass : EFail;
+            }
+        default:
+            return EPass;
+        }
+    }
+
+/**
+ * This is for checking client's capabilities at later phase after
+ * protections of destination/connection method have been checked
+ * first.
+ */
+CPolicyServer::TCustomResult CCmmServer::CapabilityCheckWithProtection( 
+        const RMessage2& aMessage )
+    {
+    switch ( aMessage.Function() )
+        {
+        case ECmmCopyConnMethod:
+        case ECmmMoveConnMethod:
+        case ECmmRemoveConnMethod:
+        case ECmmRemoveAllReferences:
+        case EDestAddConnMethod:
+        case EDestDeleteConnMethod:
+        case EDestAddEmbeddedDestination:
+        case EDestRemoveConnMethod:
+        case EDestModifyPriority:
+        case EDestSetName:
+        case EDestSetMetadata:
+        case EDestSetProtection:
+        case EDestSetHidden:
+        case EDestUpdate:
+        case EDestDelete:
+        case EDestSetIcon:
+        case ECMCreateConnMethodToDest:
+        case ECMCreateConnMethodToDestWithId:
+        case ECMUpdate:
+        case ECMDelete:
+        case ECMSetIntAttribute:
+        case ECMSetBoolAttribute:
+        case ECMSetStringAttribute:
+        case ECMSetString8Attribute:
+            {
+            // ECapabilityNetworkControl
+            return ( iCmmElements[3].iPolicy.CheckPolicy( aMessage ) ) ? EPass : EFail;
+            }
+        default:
+            // Execution should never come here.
+            return EFail;
+        }
+    }
+
+CCmmServer::CCmmServer( TInt aPriority ) : CPolicyServer( aPriority, iCmmPolicy )
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_CCMMSERVER_ENTRY );
+
+    iSessionCount = 0;
+    iCmManager = NULL;
+    iContainerIndex = NULL;
+    iShutdown = NULL;
+
+    OstTraceFunctionExit0( CCMMSERVER_CCMMSERVER_EXIT );
+    }
+
+CCmmServer::~CCmmServer()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMSERVER_CCMMSERVER_ENTRY );
+
+    delete iCmManager;
+    delete iContainerIndex;
+    delete iShutdown;
+
+    OstTraceFunctionExit0( DUP1_CCMMSERVER_CCMMSERVER_EXIT );
+    }
+
+CCmmServer* CCmmServer::NewL()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_NEWL_ENTRY );
+
+    CCmmServer* server = CCmmServer::NewLC();
+    CleanupStack::Pop( server );
+
+    OstTraceFunctionExit0( CCMMSERVER_NEWL_EXIT );
+    return server;
+    }
+
+CCmmServer* CCmmServer::NewLC()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_NEWLC_ENTRY );
+
+    CCmmServer* server = new( ELeave ) CCmmServer( EPriorityNormal );
+    CleanupStack::PushL( server );
+    server->ConstructL();
+
+    OstTraceFunctionExit0( CCMMSERVER_NEWLC_EXIT );
+    return server;
+    }
+
+void CCmmServer::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_CONSTRUCTL_ENTRY );
+
+    StartL( KCmmServer );
+
+    iCmManager = CCmManagerImpl::NewL();
+
+    // Create the object container index.
+    iContainerIndex = CObjectConIx::NewL();
+
+    // Construct shutdown timer.
+    iShutdown = new( ELeave ) CCmmDelayedShutdown( this );
+    iShutdown->ConstructL();
+
+    OstTraceFunctionExit0( CCMMSERVER_CONSTRUCTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Create a new session.
+// -----------------------------------------------------------------------------
+//
+CSession2* CCmmServer::NewSessionL(
+        const TVersion& /*aVersion*/,
+        const RMessage2& /*aMessage*/ ) const
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_NEWSESSIONL_ENTRY );
+
+    CSession2* session = CCmmSession::NewL(
+            *const_cast<CCmmServer*>( this ),
+            iCmManager->Cache() );
+
+    OstTraceFunctionExit0( CCMMSERVER_NEWSESSIONL_EXIT );
+    return session;
+    }
+
+// -----------------------------------------------------------------------------
+// Increments the session counter. Cancels the shutdown timer if active.
+// -----------------------------------------------------------------------------
+//
+void CCmmServer::IncrementSessions()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_INCREMENTSESSIONS_ENTRY );
+
+    iSessionCount++;
+    iShutdown->Cancel();
+
+    OstTraceFunctionExit0( CCMMSERVER_INCREMENTSESSIONS_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Decrements the session counter. Starts the shutdown counter when last
+// session closes.
+// -----------------------------------------------------------------------------
+//
+void CCmmServer::DecrementSessions()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_DECREMENTSESSIONS_ENTRY );
+
+    iSessionCount--;
+
+    // Terminate the server when there are no clients left.
+    if ( iSessionCount <= 0 )
+        {
+        if ( !iShutdown->IsActive() )
+            {
+            iShutdown->Start();
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSERVER_DECREMENTSESSIONS_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmServer::NewContainerL
+// -----------------------------------------------------------------------------
+//
+CObjectCon* CCmmServer::NewContainerL()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_NEWCONTAINERL_ENTRY );
+
+    CObjectCon* container = iContainerIndex->CreateL();
+
+    OstTraceFunctionExit0( CCMMSERVER_NEWCONTAINERL_EXIT );
+    return container;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmServer::RemoveContainer
+// -----------------------------------------------------------------------------
+//
+void CCmmServer::RemoveContainer( CObjectCon* aContainer )
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_REMOVECONTAINER_ENTRY );
+
+    iContainerIndex->Remove( aContainer );
+
+    OstTraceFunctionExit0( CCMMSERVER_REMOVECONTAINER_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmServer::RunError
+// -----------------------------------------------------------------------------
+//
+TInt CCmmServer::RunError( TInt aError )
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_RUNERROR_ENTRY );
+
+    Message().Complete( aError );
+
+    // The leave will result in an early return from CServer::RunL(),
+    // skipping the call to request another message. So we issue the
+    // request here in order to keep the server running.
+    ReStart();
+
+    OstTraceFunctionExit0( CCMMSERVER_RUNERROR_EXIT );
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmServer::CmManager
+// -----------------------------------------------------------------------------
+//
+CCmManagerImpl* CCmmServer::CmManager()
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_CMMANAGER_ENTRY );
+
+    OstTraceFunctionExit0( CCMMSERVER_CMMANAGER_EXIT );
+
+    return iCmManager;
+    }
+
+// -----------------------------------------------------------------------------
+// Check for restrictions for adding an embedded destination from destination
+// instances of all clients.
+// - aDestinationId is the ID of the destination where a destination is beeing
+//   embedded.
+// - aEmbeddedDestinationId is the ID of the destination that is beeing
+//   embedded.
+// -----------------------------------------------------------------------------
+//
+TBool CCmmServer::EmbeddedDestinationConflictsFromAllSessions(
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_EMBEDDEDDESTINATIONCONFLICTSFROMALLSESSIONS_ENTRY );
+
+    TBool result( EFalse );
+    CSession2* session( NULL );
+
+    // Iterate through all sessions.
+    iSessionIter.SetToFirst();
+    for ( session = iSessionIter++; session; session = iSessionIter++ )
+        {
+        CCmmSession* cmmSession = static_cast<CCmmSession*>( session );
+        if ( cmmSession->EmbeddedDestinationConflicts( aDestinationId, aEmbeddedDestinationId ) )
+            {
+            result = ETrue;
+            break;
+            }
+        }
+    OstTraceFunctionExit0( CCMMSERVER_EMBEDDEDDESTINATIONCONFLICTSFROMALLSESSIONS_EXIT );
+
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// Notify each session about a destination/connection method that has been
+// updated to, or deleted from, database.
+// ---------------------------------------------------------------------------
+//
+void CCmmServer::RefreshHandlesForAllSessions( const TUint32 aId )
+    {
+    OstTraceFunctionEntry0( CCMMSERVER_REFRESHHANDLESFORALLSESSIONS_ENTRY );
+
+    CSession2* session( NULL );
+
+    // Iterate through all sessions.
+    iSessionIter.SetToFirst();
+    for ( session = iSessionIter++; session; session = iSessionIter++ )
+        {
+        CCmmSession* cmmSession = static_cast<CCmmSession*>( session );
+        cmmSession->RefreshHandles( aId );
+        }
+    OstTraceFunctionExit0( CCMMSERVER_REFRESHHANDLESFORALLSESSIONS_EXIT );
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCmmDelayedShutdown::CCmmDelayedShutdown
+// -----------------------------------------------------------------------------
+//
+CCmmDelayedShutdown::CCmmDelayedShutdown( CCmmServer* aServer )
+        :
+        CActive( 0 ),
+        iServer( aServer )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmDelayedShutdown::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CCmmDelayedShutdown::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMDELAYEDSHUTDOWN_CONSTRUCTL_ENTRY );
+
+    CActiveScheduler::Add( this );
+    User::LeaveIfError( iTimer.CreateLocal() );
+
+    OstTraceFunctionExit0( CCMMDELAYEDSHUTDOWN_CONSTRUCTL_EXIT );
+    }
+
+// Destructor
+CCmmDelayedShutdown::~CCmmDelayedShutdown()
+    {
+    OstTraceFunctionEntry0( CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_ENTRY );
+
+    Cancel();
+    iTimer.Close();
+    iServer = NULL;
+
+    OstTraceFunctionExit0( CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmMonDelayedShutdown::Start
+// -----------------------------------------------------------------------------
+//
+void CCmmDelayedShutdown::Start()
+    {
+    OstTraceFunctionEntry0( CCMMDELAYEDSHUTDOWN_START_ENTRY );
+
+    if ( IsActive() )
+        {
+        OstTraceFunctionExit0( CCMMDELAYEDSHUTDOWN_START_EXIT );
+
+        return;
+        }
+
+    iTimer.After( iStatus, KCmmShutdownDelay );
+    SetActive();
+
+    OstTraceFunctionExit0( DUP1_CCMMDELAYEDSHUTDOWN_START_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmMonDelayedShutdown::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CCmmDelayedShutdown::DoCancel()
+    {
+    OstTraceFunctionEntry0( CCMMDELAYEDSHUTDOWN_DOCANCEL_ENTRY );
+
+    iTimer.Cancel();
+
+    OstTraceFunctionExit0( CCMMDELAYEDSHUTDOWN_DOCANCEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmMonDelayedShutdown::RunL
+// -----------------------------------------------------------------------------
+//
+void CCmmDelayedShutdown::RunL()
+    {
+    OstTraceFunctionEntry0( CCMMDELAYEDSHUTDOWN_RUNL_ENTRY );
+
+    CActiveScheduler::Stop();
+
+    OstTraceFunctionExit0( CCMMDELAYEDSHUTDOWN_RUNL_EXIT );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmsession.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,3564 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Handles client requests.
+*
+*/
+
+#include <sysutil.h>
+#include <cmconnectionmethoddef.h>
+#include <cmpluginembdestinationdef.h>
+#include <cmdefconnvalues.h>
+
+#include "cmmserver.h"
+#include "cmmserverdefs.h"
+#include "cmmsession.h"
+#include "cmmdestinationinstance.h"
+#include "cmmconnmethodinstance.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmsessionTraces.h"
+#endif
+
+
+CCmmSession* CCmmSession::NewL( CCmmServer& aServer, CCmmCache& aCache )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_NEWL_ENTRY );
+
+    CCmmSession* self = CCmmSession::NewLC( aServer, aCache );
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMMSESSION_NEWL_EXIT );
+    return self;
+    }
+
+CCmmSession* CCmmSession::NewLC( CCmmServer& aServer, CCmmCache& aCache )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_NEWLC_ENTRY );
+
+    CCmmSession* self = new( ELeave ) CCmmSession( aServer, aCache );
+    CleanupStack::PushL( self ) ;
+    self->ConstructL() ;
+
+    OstTraceFunctionExit0( CCMMSESSION_NEWLC_EXIT );
+    return self ;
+    }
+
+// -----------------------------------------------------------------------------
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CCmmSession::CCmmSession( CCmmServer& aServer, CCmmCache& aCache )
+        :
+        iServer( aServer ),
+        iCache( aCache ),
+        iFsConnected( EFalse )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CCMMSESSION_ENTRY );
+
+    iDestinationContainer = NULL;
+    iDestinationObjects = NULL;
+    iConnMethodContainer = NULL;
+    iConnMethodObjects = NULL;
+
+    OstTraceFunctionExit0( CCMMSESSION_CCMMSESSION_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// The second phase of two phase construction.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CONSTRUCTL_ENTRY );
+
+    iServer.IncrementSessions();
+
+    // Create a new object index (it stores the destination objects owned by
+    // this session).
+    iDestinationObjects = CObjectIx::NewL();
+
+    // Initialize the object container using the object container index in the
+    // server (Object container provides unique ids for the objects owned by
+    // this session).
+    iDestinationContainer = iServer.NewContainerL();
+
+    // The same for connection method subsessions.
+    iConnMethodObjects = CObjectIx::NewL();
+    iConnMethodContainer = iServer.NewContainerL();
+
+    OstTraceFunctionExit0( CCMMSESSION_CONSTRUCTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCmmSession::~CCmmSession()
+    {
+    OstTraceFunctionEntry0( DUP1_CCMMSESSION_CCMMSESSION_ENTRY );
+
+    iServer.DecrementSessions();
+
+    delete iDestinationObjects;
+    iDestinationObjects = NULL;
+
+    if ( iDestinationContainer != 0 )
+        {
+        iServer.RemoveContainer( iDestinationContainer );
+        iDestinationContainer = NULL;
+        }
+
+    delete iConnMethodObjects;
+    iConnMethodObjects = NULL;
+
+    if ( iConnMethodContainer != 0 )
+        {
+        iServer.RemoveContainer( iConnMethodContainer );
+        iConnMethodContainer = NULL;
+        }
+
+    if ( iFsConnected )
+        {
+        iFs.Close();
+        iFsConnected = EFalse;
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_CCMMSESSION_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ServiceL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ServiceL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SERVICEL_ENTRY );
+
+    TInt result( KErrNone );
+    switch ( aMessage.Function() )
+        {
+        case ECmmGetBearerInfoInt:
+            {
+            GetBearerInfoIntL( aMessage );
+            }
+            break;
+        case ECmmGetBearerInfoBool:
+            {
+            GetBearerInfoBoolL( aMessage );
+            }
+            break;
+        case ECmmGetBearerInfoString:
+            {
+            GetBearerInfoStringL( aMessage );
+            }
+            break;
+        case ECmmGetBearerInfoString8:
+            {
+            GetBearerInfoString8L( aMessage );
+            }
+            break;
+        case ECmmGetConnMethodInfoInt:
+            {
+            GetConnMethodInfoIntL( aMessage );
+            }
+            break;
+        case ECmmGetConnMethodInfoBool:
+            {
+            GetConnMethodInfoBoolL( aMessage );
+            }
+            break;
+        case ECmmGetConnMethodInfoString:
+            {
+            GetConnMethodInfoStringL( aMessage );
+            }
+            break;
+        case ECmmGetConnMethodInfoString8:
+            {
+            GetConnMethodInfoString8L( aMessage );
+            }
+            break;
+        case ECmmGetConnMethodArray:
+            {
+            GetConnMethodArrayL( aMessage );
+            }
+            break;
+        case ECmmGetAllDestinations:
+            {
+            GetAllDestinationsL( aMessage );
+            }
+            break;
+        case ECmmGetEasyWlanId:
+            {
+            GetEasyWLANIdL( aMessage );
+            }
+            break;
+        case ECmmRemoveAllReferences: // CM becomes uncategorized.
+            {
+            RemoveAllReferencesL( aMessage );
+            }
+            break;
+        case ECmmGetSupportedBearers:
+            {
+            GetSupportedBearersL( aMessage );
+            }
+            break;
+        case ECmmGetUncategorizedIcon:
+            {
+            GetUncategorizedIconL( aMessage );
+            }
+            break;
+        case ECmmReadDefaultConnection:
+            {
+            ReadDefaultConnectionL( aMessage );
+            }
+            break;
+        case ECmmWriteDefaultConnection:
+            {
+            // Default connection is now just internet snap.
+            result = KErrNotSupported;
+            }
+            break;
+        case ECmmReadGeneralConnectionSettings:
+            {
+            ReadGenConnSettingsL( aMessage );
+            }
+            break;
+        case ECmmWriteGeneralConnectionSettings:
+            {
+            WriteGenConnSettingsL( aMessage );
+            }
+            break;
+        case ECmmGetBearerPriorityArray:
+            {
+            GetBearerPriorityArrayL( aMessage );
+            }
+            break;
+        case ECmmUpdateBearerPriorityArray:
+            {
+            UpdateBearerPriorityArrayL( aMessage );
+            }
+            break;
+        case ECmmCopyConnMethod:
+            {
+            CopyConnMethodL( aMessage );
+            }
+            break;
+        case ECmmMoveConnMethod:
+            {
+            MoveConnMethodL( aMessage );
+            }
+            break;
+        case ECmmRemoveConnMethod:
+            {
+            RemoveConnMethodL( aMessage );
+            }
+            break;
+
+        case EDestGetDestination:
+        case EDestRefresh:
+        case EDestCreateDestinationWithName:
+        case EDestCreateDestinationWithNameAndId:
+        case EDestCloseDestination:
+        case EDestGetConnMethodCount:
+        case EDestGetConnMethodPriority:
+        case EDestGetName:
+        case EDestGetId:
+        case EDestGetElementId:
+        case EDestMetadata:
+        case EDestGetProtectionLevel:
+        case EDestIsConnected:
+        case EDestIsHidden:
+        case EDestIsEqual:
+        case EDestGetIcon:
+        case EDestAddConnMethod:
+        case EDestAddEmbeddedDestination:
+        case EDestDeleteConnMethod:
+        case EDestRemoveConnMethod:
+        case EDestModifyPriority:
+        case EDestSetName:
+        case EDestSetMetadata:
+        case EDestSetProtection:
+        case EDestSetHidden:
+        case EDestUpdate:
+        case EDestDelete:
+        case EDestSetIcon:
+            {
+            ServiceDestinationL( aMessage );
+            }
+            break;
+
+        case ECMGetConnMethodWithId:
+        case ECMRefresh:
+        case ECMCreateConnMethod:
+        case ECMCreateConnMethodWithId:
+        case ECMGetConnMethodFromDestWithIndex:
+        case ECMGetConnMethodFromDestWithId:
+        case ECMCreateConnMethodToDest:
+        case ECMCreateConnMethodToDestWithId:
+        case ECMCreateCopyOfExisting:
+        case ECMCloseConnMethod:
+        case ECMGetIntAttribute:
+        case ECMGetBoolAttribute:
+        case ECMGetStringAttribute:
+        case ECMGetString8Attribute:
+        case ECMIsEqual:
+        case ECMSetIntAttribute:
+        case ECMSetBoolAttribute:
+        case ECMSetStringAttribute:
+        case ECMSetString8Attribute:
+        case ECMDelete:
+        case ECMUpdate:
+        case EDestGetEmbeddedDestination:
+            {
+            ServiceConnMethodL( aMessage );
+            }
+            break;
+        default:
+            {
+            result = KErrNotSupported;
+            }
+            break;
+        }
+
+    aMessage.Complete( result );
+
+    OstTraceFunctionExit0( CCMMSESSION_SERVICEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Finds a connection method instance that belongs to this session and matches
+// the provided ID. Return NULL if no match is found.
+// -----------------------------------------------------------------------------
+//
+CCmmConnMethodInstance* CCmmSession::FindConnMethodInstanceById(
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_FINDCONNMETHODINSTANCEBYID_ENTRY );
+
+    CCmmConnMethodInstance* wantedConnMethodInstance( NULL );
+
+    for ( TInt i = 0; i < iConnMethodObjects->Count(); i++ )
+        {
+        CCmmConnMethodInstance* connMethodInstance =
+                ( CCmmConnMethodInstance* )( ( *iConnMethodObjects )[i] );
+        if ( connMethodInstance && connMethodInstance->GetId() == aConnMethodId )
+            {
+            wantedConnMethodInstance = connMethodInstance;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_FINDCONNMETHODINSTANCEBYID_EXIT );
+    return wantedConnMethodInstance;
+    }
+
+// -----------------------------------------------------------------------------
+// Finds a destination instance that belongs to this session and matches
+// the provided handle.
+// -----------------------------------------------------------------------------
+//
+CCmmDestinationInstance* CCmmSession::FindDestinationInstanceByHandleL(
+        const TInt aDestinationHandle )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_FINDDESTINATIONINSTANCEBYHANDLEL_ENTRY );
+
+    return (CCmmDestinationInstance*)iDestinationObjects->AtL( aDestinationHandle );
+    }
+
+// -----------------------------------------------------------------------------
+// Finds a destination instance that belongs to this session and matches
+// the provided ID. Return NULL if no match is found.
+// -----------------------------------------------------------------------------
+//
+CCmmDestinationInstance* CCmmSession::FindDestinationInstanceById(
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_FINDDESTINATIONINSTANCEBYID_ENTRY );
+
+    CCmmDestinationInstance* wantedDestinationInstance( NULL );
+
+    for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+        {
+        CCmmDestinationInstance* destinationInstance =
+                ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+        if ( destinationInstance && destinationInstance->GetId() == aDestinationId )
+            {
+            wantedDestinationInstance = destinationInstance;
+            break;
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_FINDDESTINATIONINSTANCEBYID_EXIT );
+    return wantedDestinationInstance;
+    }
+
+// -----------------------------------------------------------------------------
+// Check from all open destination handles in this session if the given
+// connection method is inside any of them. The given destination is skipped.
+// -----------------------------------------------------------------------------
+//
+TBool CCmmSession::ConnMethodInOtherDestination(
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CONNMETHODINOTHERDESTINATION_ENTRY );
+
+    for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+        {
+        CCmmDestinationInstance* destinationInstance =
+                ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+        if ( destinationInstance && destinationInstance->GetId() != aDestinationId )
+            {
+            for ( TInt j = 0; j < destinationInstance->iConnMethodItemArray.Count(); j++ )
+                {
+                if ( destinationInstance->iConnMethodItemArray[i].iId == aConnMethodId )
+                    {
+                    OstTraceFunctionExit0( CCMMSESSION_CONNMETHODINOTHERDESTINATION_EXIT );
+                    return ETrue;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_CONNMETHODINOTHERDESTINATION_EXIT );
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// Check for restrictions for adding an embedded destination from destination
+// instances of all clients.
+// - aDestinationId is the ID of the destination where a destination is beeing
+//   embedded.
+// - aEmbeddedDestinationId is the ID of the destination that is beeing
+//   embedded.
+// -----------------------------------------------------------------------------
+//
+TBool CCmmSession::EmbeddedDestinationConflictsFromAllSessions(
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_EMBEDDEDDESTINATIONCONFLICTSFROMALLSESSIONS_ENTRY );
+
+    return iServer.EmbeddedDestinationConflictsFromAllSessions(
+            aDestinationId,
+            aEmbeddedDestinationId );
+    }
+
+// -----------------------------------------------------------------------------
+// Check for restrictions for adding an embedded destination from destination
+// instances of this session.
+// - aDestinationId is the ID of the destination where a destination is beeing
+//   embedded.
+// - aEmbeddedDestinationId is the ID of the destination that is beeing
+//   embedded.
+//
+// - Check that any destination instance does not contain aDestinationId as
+//   embedded destination.
+// - Check that any destination instance for aEmbeddedDestinationId does not
+//   contain an embedded destination.
+// -----------------------------------------------------------------------------
+//
+TBool CCmmSession::EmbeddedDestinationConflicts(
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_EMBEDDEDDESTINATIONCONFLICTS_ENTRY );
+
+    TBool result( EFalse );
+
+    for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+        {
+        CCmmDestinationInstance* destinationInstance =
+                ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+        if ( destinationInstance )
+            {
+            if ( destinationInstance->HasEmbeddedWithId( aDestinationId ) ||
+                    ( destinationInstance->GetId() == aEmbeddedDestinationId &&
+                            destinationInstance->HasEmbedded() ) )
+                {
+                result = ETrue;
+                break;
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_EMBEDDEDDESTINATIONCONFLICTS_EXIT );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// After update to database, refresh temporary ID to real ID if necessary and
+// refresh status information for any related handles for all client sessions.
+// ---------------------------------------------------------------------------
+//
+void CCmmSession::RefreshHandlesForAllSessions( const TCmmIdStruct& aIdStruct )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REFRESHHANDLESFORALLSESSIONS_ENTRY );
+
+    // If the ID structure contains a temporary ID, we need to update the
+    // temporary ID to the real ID for all relevant handles in this session and
+    // cache.
+    if ( aIdStruct.iTemporaryId )
+        {
+        // Real ID tells if this is a destination or connection method.
+
+        if ( aIdStruct.iRealId < KCmmConnMethodIdIntervalMax )
+            {
+            // Connection method. Need to iterate through all destination and
+            // connection method handles.
+
+            // Update the ID of the connection method on session side.
+            for ( TInt i = 0; i < iConnMethodObjects->Count(); i++ )
+                {
+                CCmmConnMethodInstance* connMethodInstance =
+                        ( CCmmConnMethodInstance* )( ( *iConnMethodObjects )[i] );
+                if ( connMethodInstance &&
+                        connMethodInstance->GetId() == aIdStruct.iTemporaryId )
+                    {
+                    connMethodInstance->SetId( aIdStruct.iRealId ); //TODO, need to set ID inside records?
+                    break; // Can only be 1 match.
+                    }
+                }
+            // Update the ID of the connection method in cache side also.
+            iCache.RefreshConnMethodId( aIdStruct );
+
+            // Iterate all destinations. If the connection method is in them,
+            // update the ID to real ID.
+            for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+                {
+                CCmmDestinationInstance* destinationInstance =
+                        ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+                if ( destinationInstance )
+                    {
+                    destinationInstance->RefreshConnMethodId( aIdStruct );
+                    }
+                }
+            }
+        else
+            {
+            // Destination. Need to iterate through all destination handles.
+            for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+                {
+                CCmmDestinationInstance* destinationInstance =
+                        ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+                if ( destinationInstance &&
+                        destinationInstance->GetId() == aIdStruct.iTemporaryId )
+                    {
+                    destinationInstance->SetId( aIdStruct.iRealId );
+                    break; // Can only be 1 match.
+                    }
+                }
+            // Update the ID of the destination in cache side also.
+            iCache.RefreshDestinationId( aIdStruct );
+            }
+        }
+
+    // Update status information for all related destination/connection method
+    // handles in all client sessions.
+    iServer.RefreshHandlesForAllSessions( aIdStruct.iRealId );
+
+    OstTraceFunctionExit0( CCMMSESSION_REFRESHHANDLESFORALLSESSIONS_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Removes a connection method from any open destination handle in this
+// session.
+// ---------------------------------------------------------------------------
+//
+void CCmmSession::RemoveConnMethodFromDestinationHandles(
+        const TUint32 aConnMethodId )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REMOVECONNMETHODFROMDESTINATIONHANDLES_ENTRY );
+
+    for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+        {
+        CCmmDestinationInstance* destinationInstance =
+                ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+        if ( destinationInstance )
+            {
+            for ( TInt j = 0; j < destinationInstance->iConnMethodItemArray.Count(); j++ )
+                {
+                if ( destinationInstance->iConnMethodItemArray[j].iId == aConnMethodId )
+                    {
+                    destinationInstance->iConnMethodItemArray.Remove( j );
+                    break;
+                    }
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_REMOVECONNMETHODFROMDESTINATIONHANDLES_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Notify this session destination/connection method handles about an
+// updated/deleted destination/connection method.
+// ---------------------------------------------------------------------------
+//
+void CCmmSession::RefreshHandles( const TUint32 aId ) const
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REFRESHHANDLES_ENTRY );
+
+    // Destination or connection method.
+    if ( aId < KCmmConnMethodIdIntervalMax )
+        {
+        // Connection method.
+        for ( TInt i = 0; i < iConnMethodObjects->Count(); i++ )
+            {
+            CCmmConnMethodInstance* connMethodInstance =
+                    ( CCmmConnMethodInstance* )( ( *iConnMethodObjects )[i] );
+            if ( connMethodInstance && connMethodInstance->GetId() == aId )
+                {
+                connMethodInstance->SetStatus( ECmmConnMethodStatusChanged );
+                }
+            }
+        }
+    else
+        {
+        // Destination.
+        for ( TInt i = 0; i < iDestinationObjects->Count(); i++ )
+            {
+            CCmmDestinationInstance* destinationInstance =
+                    ( CCmmDestinationInstance* )( ( *iDestinationObjects )[i] );
+            if ( destinationInstance && destinationInstance->GetId() == aId )
+                {
+                destinationInstance->SetStatus( ECmmDestinationStatusChanged ); //TODO, any record status need be set?
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_REFRESHHANDLES_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBearerInfoIntL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBearerInfoIntL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBEARERINFOINTL_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    TUint32 result = iCache.GetBearerInfoIntL( bearerType, attribute );
+    TPckg<TUint32> resultPckg( result );
+    aMessage.WriteL( 2, resultPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETBEARERINFOINTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBearerInfoBoolL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBearerInfoBoolL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBEARERINFOBOOLL_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    TBool result = iCache.GetBearerInfoBoolL( bearerType, attribute );
+    TPckg<TBool> resultPckg( result );
+    aMessage.WriteL( 2, resultPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETBEARERINFOBOOLL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBearerInfoStringL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBearerInfoStringL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBEARERINFOSTRINGL_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    HBufC* result = iCache.GetBearerInfoStringL( bearerType, attribute );
+    if ( !result )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETBEARERINFOSTRINGL_EXIT );
+        return;
+        }
+    CleanupStack::PushL( result );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 2 );
+    if ( result->Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TPtrC resultPtr = result->Des();
+    aMessage.WriteL( 2, resultPtr );
+    CleanupStack::PopAndDestroy( result );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETBEARERINFOSTRINGL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBearerInfoString8L
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBearerInfoString8L( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBEARERINFOSTRING8L_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    HBufC8* result = iCache.GetBearerInfoString8L( bearerType, attribute );
+    if ( !result )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETBEARERINFOSTRING8L_EXIT );
+        return;
+        }
+    CleanupStack::PushL( result );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 2 );
+    if ( result->Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TPtrC8 resultPtr = result->Des();
+    aMessage.WriteL( 2, resultPtr );
+    CleanupStack::PopAndDestroy( result );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETBEARERINFOSTRING8L_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodInfoIntL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodInfoIntL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODINFOINTL_ENTRY );
+
+    TUint32 cmId( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    TUint32 result = iCache.GetConnectionMethodInfoIntL( cmId, attribute );
+    TPckg<TUint32> resultPckg( result );
+    aMessage.WriteL( 2, resultPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODINFOINTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodInfoBoolL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodInfoBoolL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODINFOBOOLL_ENTRY );
+
+    TUint32 cmId( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    TBool result = iCache.GetConnectionMethodInfoBoolL( cmId, attribute );
+    TPckg<TBool> resultPckg( result );
+    aMessage.WriteL( 2, resultPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODINFOBOOLL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodInfoStringL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodInfoStringL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODINFOSTRINGL_ENTRY );
+
+    TUint32 cmId( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    HBufC* result = iCache.GetConnectionMethodInfoStringL( cmId, attribute );
+    if ( !result )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODINFOSTRINGL_EXIT );
+        return;
+        }
+    CleanupStack::PushL( result );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 2 );
+    if ( result->Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TPtrC resultPtr = result->Des();
+    aMessage.WriteL( 2, resultPtr );
+    CleanupStack::PopAndDestroy( result );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETCONNMETHODINFOSTRINGL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodInfoString8L
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodInfoString8L( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODINFOSTRING8L_ENTRY );
+
+    TUint32 cmId( aMessage.Int0() );
+    TUint32 attribute( aMessage.Int1() );
+
+    HBufC8* result = iCache.GetConnectionMethodInfoString8L( cmId, attribute );
+    if ( !result )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODINFOSTRING8L_EXIT );
+        return;
+        }
+    CleanupStack::PushL( result );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 2 );
+    if ( result->Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TPtrC8 resultPtr = result->Des();
+    aMessage.WriteL( 2, resultPtr );
+    CleanupStack::PopAndDestroy( result );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETCONNMETHODINFOSTRING8L_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodArrayL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodArrayL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODARRAYL_ENTRY );
+
+    // Read attribute flags from client request.
+    TPckgBuf<TCmmIpcStructGetConnMethods> parametersPckg;
+    aMessage.ReadL( 0, parametersPckg );
+    TCmmIpcStructGetConnMethods attributes = parametersPckg();
+
+    // Create connection method ID array.
+    RArray<TUint32> cmArray;
+    CleanupClosePushL( cmArray );
+    iCache.GetAllConnMethodsL( cmArray, attributes.iCheckBearerType );
+
+    // Check if only legacy connection methods are needed.
+    if ( attributes.iLegacyOnly )
+        {
+        // Remove all referenced connection methods.
+        for ( TInt i = cmArray.Count() - 1; i >= 0; i-- )
+            {
+            if ( iCache.DestinationsContainingConnMethod( cmArray[i] ) )
+                {
+                cmArray.Remove( i );
+                }
+            }
+        }
+
+    // EasyWLAN handling.
+    if ( !attributes.iEasyWlan )
+        {
+        // If there is an EasyWLAN IAP, the ID needs to be removed from the array.
+        TUint32 easyWlanId = iCache.EasyWlanIdL();
+        if ( easyWlanId != 0 )
+            {
+            TInt index = cmArray.Find( easyWlanId );
+            if ( index != KErrNotFound )
+                {
+                cmArray.Remove( index );
+                }
+            }
+        }
+
+    // Check connection method ID count.
+    TInt connMethodCount = cmArray.Count();
+    if ( connMethodCount > aMessage.GetDesMaxLengthL( 2 ) )
+        {
+        // Client buffer is too small to contain all the informarmation. Return
+        // without any answer and the client side will ask again using a bigger
+        // buffer.
+        CleanupStack::PopAndDestroy( &cmArray );
+        return;
+        }
+
+    TPckg<TInt> countPckg( connMethodCount );
+    aMessage.WriteL( 1, countPckg );
+
+    if ( connMethodCount == 0 )
+        {
+        CleanupStack::PopAndDestroy( &cmArray );
+        return;
+        }
+
+    // Write connection method IDs to client.
+    HBufC8* idBuf = HBufC8::NewLC( connMethodCount );
+    TPtr8 bufPtr( idBuf->Des() );
+    for ( TInt i = 0; i < connMethodCount; i++ )
+        {
+        bufPtr.Append( (TUint8)( cmArray[i] & 0x000000FF ) );
+        }
+    aMessage.WriteL( 2, bufPtr );
+
+    CleanupStack::PopAndDestroy( idBuf );
+    CleanupStack::PopAndDestroy( &cmArray );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETCONNMETHODARRAYL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetAllDestinationsL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetAllDestinationsL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETALLDESTINATIONSL_ENTRY );
+
+    TInt destCount = iCache.GetDestinationCount();
+    if ( destCount > aMessage.GetDesMaxLengthL( 1 ) )
+        {
+        // Client buffer is too small to contain all the informarmation. Return
+        // without any answer and the client side will ask again using a bigger
+        // buffer.
+        return;
+        }
+
+    // Write the destination count to client.
+    TPckg<TInt> countPckg( destCount );
+    aMessage.WriteL( 0, countPckg );
+
+    if ( destCount == 0 )
+        {
+        return;
+        }
+
+    // Get the destination IDs from database cache.
+    RArray<TUint32> destArray;
+    CleanupClosePushL( destArray );
+    iCache.GetDestinationsL( destArray );
+
+    HBufC16* idBuf = HBufC16::NewLC( destCount );
+    TPtr16 bufPtr( idBuf->Des() );
+    for ( TInt i = 0; i < destCount; i++ )
+        {
+        bufPtr.Append( destArray[i] );
+        }
+
+    // Write the destination IDs to client.
+    aMessage.WriteL( 1, bufPtr );
+
+    CleanupStack::PopAndDestroy( idBuf );
+    CleanupStack::PopAndDestroy( &destArray );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETALLDESTINATIONSL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetEasyWLANIdL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetEasyWLANIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETEASYWLANIDL_ENTRY );
+
+    TUint32 id = iCache.EasyWlanIdL();
+    TPckg<TUint32> idPckg( id );
+    aMessage.WriteL( 0, idPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETEASYWLANIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetSupportedBearersL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetSupportedBearersL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETSUPPORTEDBEARERSL_ENTRY );
+
+    // Get the supported bearer types.
+    RArray<TUint32> bearerArray;
+    CleanupClosePushL( bearerArray );
+    iServer.CmManager()->SupportedBearersL( bearerArray );
+
+    // Write bearer count to client.
+    TInt bearerCount( bearerArray.Count() );
+    TInt neededBufferSize( bearerCount * sizeof( TUint32 ) );
+    TPckg<TInt> countPckg( bearerCount );
+    aMessage.WriteL( 0, countPckg );
+
+    // Check the client buffer size.
+    if ( neededBufferSize > aMessage.GetDesMaxLengthL( 1 ) || bearerCount == 0 )
+        {
+        // Client buffer is too small to contain all the information. Return
+        // with only the bearer count information and the client side will ask
+        // again using a big enough buffer.
+        CleanupStack::PopAndDestroy( &bearerArray );
+        return;
+        }
+
+    // Add the bearer types into a buffer.
+    HBufC8* bearerBuf = HBufC8::NewLC( neededBufferSize );
+    TPtr8 ptr( bearerBuf->Des() );
+    for ( TInt i = 0; i < bearerCount; i++ )
+        {
+        TUint32 a( bearerArray[i] );
+        ptr.Append( (TUint8*)&a, 4 );
+        }
+
+    // Write the bearer types to client.
+    aMessage.WriteL( 1, ptr );
+
+    CleanupStack::PopAndDestroy( bearerBuf );
+    CleanupStack::PopAndDestroy( &bearerArray );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETSUPPORTEDBEARERSL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetUncategorizedIconL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetUncategorizedIconL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETUNCATEGORIZEDICONL_ENTRY );
+
+    HBufC* result = KCmmUncategorizedIconName().AllocLC();
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 0 );
+    if ( result->Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TPtrC resultPtr = result->Des();
+    aMessage.WriteL( 0, resultPtr );
+    CleanupStack::PopAndDestroy( result );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETUNCATEGORIZEDICONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ReadDefaultConnectionL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ReadDefaultConnectionL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_READDEFAULTCONNECTIONL_ENTRY );
+
+    // Default connection is now simply the internet destination.
+    TCmDefConnValue defaultConnection;
+    defaultConnection.iType = ECmDefConnDestination;
+    defaultConnection.iId = 0;
+
+    iCache.InternetDestinationIdL( defaultConnection.iId );
+    if ( defaultConnection.iId == 0 )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    TPckgBuf<TCmDefConnValue> dcPckgBuf( defaultConnection );
+    aMessage.WriteL( 0, dcPckgBuf );
+
+    OstTraceFunctionExit0( CCMMSESSION_READDEFAULTCONNECTIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ReadGenConnSettingsL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ReadGenConnSettingsL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_READGENCONNSETTINGSL_ENTRY );
+
+    TCmGenConnSettings genConnSettings;
+    iCache.ReadGenConnSettingsL( genConnSettings );
+
+    TPckgBuf<TCmGenConnSettings> genConnSettingsPckgBuf( genConnSettings );
+    aMessage.WriteL( 0, genConnSettingsPckgBuf );
+
+    OstTraceFunctionExit0( CCMMSESSION_READGENCONNSETTINGSL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::WriteGenConnSettingsL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::WriteGenConnSettingsL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_WRITEGENCONNSETTINGSL_ENTRY );
+
+    // Read data from client request.
+    TPckgBuf<TCmGenConnSettings> genConnSettingsPckgBuf;
+    aMessage.ReadL( 0, genConnSettingsPckgBuf );
+    TCmGenConnSettings genConnSettings = genConnSettingsPckgBuf();
+
+    iCache.WriteGenConnSettingsL( genConnSettings );
+
+    OstTraceFunctionExit0( CCMMSESSION_WRITEGENCONNSETTINGSL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBearerPriorityArrayL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBearerPriorityArrayL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBEARERPRIORITYARRAYL_ENTRY );
+
+    const TInt maxLength( aMessage.GetDesMaxLengthL( 0 ) );
+    if ( maxLength < 2 )
+        {
+        // Minimum length of 2 is needed to store count and needed length.
+        User::Leave( KErrArgument );
+        }
+
+    RPointerArray<CCmmBearerPriority> bearerPriorityArray;
+    CmmCleanupResetAndDestroyPushL( bearerPriorityArray );
+
+    iCache.CopyBearerPriorityArrayL( bearerPriorityArray );
+    const TInt bearerCountInArray( bearerPriorityArray.Count() );
+    TInt bearerCount( bearerCountInArray );
+
+    TInt maxBufLen( 2 );
+    // Check the length needed for serializing.
+    for ( TInt i = 0; i < bearerCountInArray; i++ )
+        {
+        // Skip if service type is not valid.
+        if ( bearerPriorityArray[i]->ServiceType() &&
+                bearerPriorityArray[i]->ServiceType()->Length() > 0 )
+            {
+            maxBufLen += KCmmBearerPriorityHeaderLength; // Priorities and servicetype length.
+            maxBufLen += bearerPriorityArray[i]->ServiceType()->Length();
+            }
+        else
+            {
+            bearerCount--;
+            }
+        }
+
+    // If given buffer is shorter than needed, just write count and needed length.
+    if ( maxBufLen > maxLength )
+        {
+        HBufC* buffer = HBufC::NewLC( KCmmDefaultBearerPriorityArraySize );
+        TPtr bufferPtr( buffer->Des() );
+
+        bufferPtr.Append( bearerCount );
+        bufferPtr.Append( maxBufLen );
+        aMessage.WriteL( 0, bufferPtr );
+
+        CleanupStack::PopAndDestroy( buffer );
+        CleanupStack::PopAndDestroy( &bearerPriorityArray );
+        OstTraceFunctionExit0( CCMMSESSION_GETBEARERPRIORITYARRAYL_EXIT );
+        return;
+        }
+
+    // Add needed buffer + space for bearerCount and maxlength.
+    HBufC* buffer = HBufC::NewLC( maxBufLen );
+    TPtr bufferPtr( buffer->Des() );
+
+    // Write count and bufmaxLen.
+    bufferPtr.Append( bearerCount );
+    bufferPtr.Append( maxBufLen );
+
+    for ( TInt i = 0; i < bearerCountInArray; i++ )
+        {
+        // Skip if service type is not valid.
+        if ( bearerPriorityArray[i]->ServiceType() &&
+                bearerPriorityArray[i]->ServiceType()->Length() > 0 )
+            {
+            TUint32 priority = bearerPriorityArray[i]->Priority();
+            TUint32 uiPriority = bearerPriorityArray[i]->UiPriority();
+            const HBufC* serviceType = bearerPriorityArray[i]->ServiceType();
+
+            bufferPtr.Append( priority >> KBitsInTwoBytes );
+            bufferPtr.Append( priority & 0x0000FFFF );
+            bufferPtr.Append( uiPriority >> KBitsInTwoBytes );
+            bufferPtr.Append( uiPriority & 0x0000FFFF );
+
+            const TInt stringLength = serviceType->Length();
+            bufferPtr.Append( stringLength );
+            bufferPtr.Append( *serviceType );
+            }
+        }
+    aMessage.WriteL( 0, bufferPtr );
+
+    CleanupStack::PopAndDestroy( buffer );
+    CleanupStack::PopAndDestroy( &bearerPriorityArray );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETBEARERPRIORITYARRAYL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::UpdateBearerPriorityArrayL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::UpdateBearerPriorityArrayL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_UPDATEBEARERPRIORITYARRAYL_ENTRY );
+
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
+    HBufC* bearerPriorityBuf = HBufC::NewLC( aMessage.GetDesMaxLengthL( 0 ) );
+    TPtr bearerPriorityBufPtr( bearerPriorityBuf->Des() );
+
+    aMessage.ReadL( 0, bearerPriorityBufPtr );
+
+    const TInt bearerCount = bearerPriorityBufPtr[0];
+    if ( ( bearerCount < 1 ) || ( aMessage.GetDesMaxLengthL( 0 ) < 2 ) )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    RPointerArray<CCmmBearerPriority> bearerPriorityArray;
+    CmmCleanupResetAndDestroyPushL( bearerPriorityArray );
+
+    TInt position( 2 ); // Start of first priority item.
+    for ( TInt i = 0; i < bearerCount; i++ )
+        {
+        TUint32 priority;
+        TUint32 uiPriority;
+        priority = bearerPriorityBufPtr[position] << KBitsInTwoBytes;
+        position++;
+        priority += bearerPriorityBufPtr[position];
+        position++;
+        uiPriority = bearerPriorityBufPtr[position] << KBitsInTwoBytes;
+        position++;
+        uiPriority += bearerPriorityBufPtr[position];
+        position++;
+        const TInt stringLength = bearerPriorityBufPtr[position];
+        position++;
+        if ( stringLength <= 0 )
+            {
+            User::Leave( KErrArgument );
+            }
+        else
+            {
+            HBufC* serviceName = HBufC::NewLC( stringLength );
+            serviceName->Des().Append( &( bearerPriorityBufPtr[position] ), stringLength );
+            position += stringLength;
+
+            TPtrC tempServiceType( serviceName->Des() );
+            CCmmBearerPriority* item = CCmmBearerPriority::NewLC(
+                    tempServiceType,
+                    priority,
+                    uiPriority );
+            bearerPriorityArray.AppendL( item );
+            CleanupStack::Pop( item );
+
+            CleanupStack::PopAndDestroy( serviceName );
+            }
+        }
+
+    // Update bearer priority array
+    iCache.UpdateBearerPriorityArrayL( bearerPriorityArray );
+
+    CleanupStack::PopAndDestroy( &bearerPriorityArray );
+    CleanupStack::PopAndDestroy( bearerPriorityBuf );
+
+    OstTraceFunctionExit0( CCMMSESSION_UPDATEBEARERPRIORITYARRAYL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Copies a connection method into a destination. If the connection method is
+// in any other destination, it becomes shared. Calls update on the target
+// destination.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CopyConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_COPYCONNMETHODL_ENTRY );
+
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
+    CCmmDestinationInstance* destination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int0() );
+    CCmmConnMethodInstance* connMethod =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int1() );
+
+    // Can't add an embedded destination this way.
+    if ( connMethod->IsEmbeddedDestination() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check the protection level of the destination.
+    // And based on that check the needed capabilities from the client.
+    CMManager::TProtectionLevel protLevel( CMManager::EProtLevel0 );
+    destination->GetProtectionL( protLevel );
+    CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+    if ( protLevel == CMManager::EProtLevel1 )
+        {
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        }
+
+    if ( capabilities == CPolicyServer::EFail )
+        {
+        User::Leave( KErrPermissionDenied );
+        }
+
+    // Add connection method into destination.
+    TInt index = destination->AddConnMethodL( *connMethod );
+
+    // Update destination into database.
+    destination->UpdateL();
+
+    // Write the connection method index (priority) inside the destination to client.
+    TPckg<TInt> indexPckg( index );
+    aMessage.WriteL( 2, indexPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_COPYCONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Moves a connection method from one destination to another. Calls update on
+// both the source and target destinations (which also updates the connection
+// method).
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::MoveConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_MOVECONNMETHODL_ENTRY );
+
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
+    // Read data from client request.
+    TPckgBuf<TCmmIpcStructMoveConnMethod> attributesPckg;
+    aMessage.ReadL( 0, attributesPckg );
+    TCmmIpcStructMoveConnMethod attributes = attributesPckg();
+
+    CCmmDestinationInstance* sourceDestination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( attributes.iSourceDestHandle );
+    CCmmDestinationInstance* targetDestination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( attributes.iTargetDestHandle );
+    CCmmConnMethodInstance* connMethod =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( attributes.iConnMethodHandle );
+    TUint32 connMethodId( connMethod->GetId() );
+
+    // Can't add an embedded destination this way.
+    if ( connMethod->IsEmbeddedDestination() )
+        {
+        User::Leave( KErrArgument );
+        }
+    // Check if the connection method is in the source destination.
+    if ( !sourceDestination->ValidConnMethodIdInDestinationIncludeEmbedded( connMethodId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+    // Check if the connection method is already in the target destination.
+    if ( targetDestination->ValidConnMethodIdInDestinationIncludeEmbedded( connMethodId ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+    // Check if the connection method can be removed from the source destination.
+    if ( sourceDestination->ConnMethodInDestinationButLocked( connMethodId ) )
+        {
+        User::Leave( KErrLocked );
+        }
+    // Check that the connection method is not in use by an active connection.
+    if ( iCache.CheckIfCmConnected( connMethodId ) )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    // Check the protection level of the source and target destination.
+    // And based on those check the needed capabilities from the client.
+    TBool protectionExists( EFalse );
+    CMManager::TProtectionLevel protLevelSource( CMManager::EProtLevel0 );
+    sourceDestination->GetProtectionL( protLevelSource );
+    if ( protLevelSource == CMManager::EProtLevel1 
+            || protLevelSource == CMManager::EProtLevel3 )
+        {
+        protectionExists = ETrue;
+        }
+
+    // If source destination is not protected check the target destination.
+    if ( !protectionExists )
+        {
+        CMManager::TProtectionLevel protLevelTarget( CMManager::EProtLevel0 );
+        targetDestination->GetProtectionL( protLevelTarget );
+        if ( protLevelTarget == CMManager::EProtLevel1 )
+            {
+            protectionExists = ETrue;
+            }
+        }
+
+    CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+    if ( protectionExists )
+        {
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        }
+
+    if ( capabilities == CPolicyServer::EFail )
+        {
+        User::Leave( KErrPermissionDenied );
+        }
+
+    // Add connection method into target destination and update it.
+    attributesPckg().iIndex = targetDestination->AddConnMethodL( *connMethod );
+    targetDestination->UpdateL();
+
+    // Remove connection method from source destination and update it.
+    sourceDestination->RemoveConnMethodFromDestinationL( *connMethod, EFalse ); // EFalse to not check connected state again.
+    sourceDestination->UpdateL();
+
+    // Write the index (priority) back to client.
+    aMessage.WriteL( 0, attributesPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_MOVECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Remove a connection method froma destination. Does not call update on the
+// affected destination.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::RemoveConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REMOVECONNMETHODL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int0() );
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int1() );
+
+    // Check the protection level of the destination.
+    // And based on that check the needed capabilities from the client.
+    CMManager::TProtectionLevel protLevel( CMManager::EProtLevel0 );
+    destinationInstance->GetProtectionL( protLevel );
+    CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+    if ( protLevel == CMManager::EProtLevel1 || protLevel == CMManager::EProtLevel3 )
+        {
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        }
+
+    if ( capabilities == CPolicyServer::EFail )
+        {
+        User::Leave( KErrPermissionDenied );
+        }
+
+    destinationInstance->RemoveConnMethodFromDestinationL( *connMethodInstance );
+    destinationInstance->UpdateL();
+
+    OstTraceFunctionExit0( CCMMSESSION_REMOVECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Removes a connection method from every destination and make it uncategorized.
+// Updates any destination that contains the connection method.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::RemoveAllReferencesL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REMOVEALLREFERENCESL_ENTRY );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+
+    TBool capabilityCheckNeeded( EFalse );
+    iCache.CheckIfConnMethodBelongsToProtectedDestinationL(
+            *connMethodInstance,
+            capabilityCheckNeeded );
+    if ( capabilityCheckNeeded )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    iCache.CheckIfConnMethodReferencesCanBeRemovedL( *connMethodInstance );
+    iCache.RemoveAllReferencesToConnMethodL( *connMethodInstance );
+
+    OstTraceFunctionExit0( CCMMSESSION_REMOVEALLREFERENCESL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ServiceDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ServiceDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SERVICEDESTINATIONL_ENTRY );
+
+    switch ( aMessage.Function() )
+        {
+        case EDestGetDestination:
+            {
+            GetDestinationL( aMessage );
+            }
+            break;
+        case EDestRefresh:
+            {
+            RefreshDestinationL( aMessage );
+            }
+            break;
+        case EDestCreateDestinationWithName:
+            {
+            CreateDestinationWithNameL( aMessage );
+            }
+            break;
+        case EDestCreateDestinationWithNameAndId:
+            {
+            CreateDestinationWithNameAndIdL( aMessage );
+            }
+            break;
+        case EDestCloseDestination:
+            {
+            CloseDestination( aMessage );
+            }
+            break;
+        case EDestGetConnMethodCount:
+            {
+            GetConnectionMehodCountL( aMessage );
+            }
+            break;
+        case EDestGetConnMethodPriority:
+            {
+            GetConnMethodPriorityL( aMessage );
+            }
+            break;
+        case EDestGetName:
+            {
+            GetDestinationNameL( aMessage );
+            }
+            break;
+        case EDestGetId:
+            {
+            GetDestinationIdL( aMessage );
+            }
+            break;
+        case EDestGetElementId:
+            {
+            GetDestinationElementIdL( aMessage );
+            }
+            break;
+        case EDestMetadata:
+            {
+            GetDestinationMetadataL( aMessage );
+            }
+            break;
+        case EDestGetProtectionLevel:
+            {
+            GetDestinationProtectionLevelL( aMessage );
+            }
+            break;
+        case EDestIsConnected:
+            {
+            IsDestinationConnectedL( aMessage );
+            }
+            break;
+        case EDestIsHidden:
+            {
+            IsDestinationHiddenL( aMessage );
+            }
+            break;
+        case EDestIsEqual:
+            {
+            DestinationIsEqualL( aMessage );
+            }
+            break;
+        case EDestGetIcon:
+            {
+            GetDestinationIconL( aMessage );
+            }
+            break;
+        case EDestAddConnMethod:
+            {
+            DestAddConnMethodL( aMessage );
+            }
+            break;
+        case EDestAddEmbeddedDestination:
+            {
+            DestAddEmbeddedDestinationL( aMessage );
+            }
+            break;
+        case EDestDeleteConnMethod:
+            {
+            DestDeleteConnMethodL( aMessage );
+            }
+            break;
+        case EDestRemoveConnMethod:
+            {
+            DestRemoveConnMethodL( aMessage );
+            }
+            break;
+        case EDestModifyPriority:
+            {
+            ModifyConnMethodPriorityL( aMessage );
+            }
+            break;
+        case EDestSetName:
+            {
+            SetDestinationNameL( aMessage );
+            }
+            break;
+        case EDestSetMetadata:
+            {
+            SetDestinationMetadataL( aMessage );
+            }
+            break;
+        case EDestSetProtection:
+            {
+            SetDestinationProtectionL( aMessage );
+            }
+            break;
+        case EDestSetHidden:
+            {
+            SetDestinationHiddenL( aMessage );
+            }
+            break;
+        case EDestUpdate:
+            {
+            UpdateDestinationL( aMessage );
+            }
+            break;
+        case EDestDelete:
+            {
+            DeleteDestinationL( aMessage );
+            }
+            break;
+        case EDestSetIcon:
+            {
+            SetDestinationIconL( aMessage );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+            break;
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_SERVICEDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONL_ENTRY );
+
+    // Structure:
+    // - Check arguments.
+    // - Create session instance.
+    // - Ask cache to open/create target and put data to session instance.
+    // - Create subsession and complete message.
+
+    // API side checks that ID is between 0x1000 - 0x1100, and converts if necessary.
+    TUint32 destinationId( aMessage.Int0() );
+
+    // Check that the ID is in valid range.
+    if ( destinationId <= KCmDefaultDestinationAPTagId ||
+            destinationId >= KCmMaxDestinationAPTagId )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check if a destination with given ID exists.
+    if ( !iCache.DestinationExistsWithId( destinationId ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // If this session already has a destination with matching ID open, provide
+    // the client with a reference to the already opened handle.
+    CCmmDestinationInstance* destinationInstance = FindDestinationInstanceById( destinationId );
+    if ( destinationInstance )
+        {
+        TPckg<TInt> existingHandlePckg( destinationInstance->GetHandle() );
+        aMessage.WriteL( 1, existingHandlePckg );
+        User::Leave( KErrAlreadyExists );
+        }
+    destinationInstance = NULL;
+    TPckg<TInt> existingHandlePckg( 0 );
+    aMessage.WriteL( 1, existingHandlePckg );
+
+    destinationInstance = CCmmDestinationInstance::NewLC( this, &iCache );
+
+    // Cache will open a handle to the destination if not already open, and
+    // copy relevant data into this destination instance.
+    iCache.OpenDestinationL( *destinationInstance, destinationId );
+
+    iDestinationContainer->AddL( ( CObject* ) destinationInstance );
+    TInt handle = iDestinationObjects->AddL( ( CObject* ) destinationInstance );
+    destinationInstance->SetHandle( handle );
+    CleanupStack::Pop( destinationInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt err = aMessage.Write( 3, handlePckg );
+    if ( err )
+        {
+        // Removes from object index and destroys the object.
+        iDestinationObjects->Remove( handle );
+        User::Leave( err );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::RefreshDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::RefreshDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REFRESHDESTINATIONL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    iCache.RefreshDestinationL( *destinationInstance );
+
+    OstTraceFunctionExit0( CCMMSESSION_REFRESHDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::CreateDestinationWithNameL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateDestinationWithNameL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATEDESTINATIONWITHNAMEL_ENTRY );
+
+    // Structure:
+    // - Check arguments.
+    // - Create session instance.
+    // - Ask cache to open/create target and put data to session instance.
+    // - Create subsession and complete message.
+
+    // Load and check name.
+    TInt destNameLength = aMessage.GetDesLength( 0 );
+    if ( destNameLength <= 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    HBufC* destinationName = HBufC::NewLC( destNameLength );
+    TPtr ptrDestinationName = destinationName->Des();
+    aMessage.ReadL( 0, ptrDestinationName );
+
+    // Check if a destination with given name exists (or is already created but not yet saved).
+    if ( iCache.DestinationExistsWithNameL( *destinationName, 0 ) ||
+            iCache.NotSavedDestinationOpenWithNameL( *destinationName, 0 ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    CCmmDestinationInstance* destinationInstance = CCmmDestinationInstance::NewLC( this, &iCache );
+
+    // Create a temporary ID to be used until a real one is obtained from the database.
+    TUint32 temporaryId = iCache.NextFreeTemporaryId();
+
+    // Cache will create the destination data structure and copy the relevant
+    // data to the session instance.
+    iCache.CreateDestinationL( *destinationInstance, *destinationName, temporaryId );
+
+    iDestinationContainer->AddL( ( CObject* ) destinationInstance );
+    TInt handle = iDestinationObjects->AddL( ( CObject* ) destinationInstance );
+    destinationInstance->SetHandle( handle );
+    CleanupStack::Pop( destinationInstance );
+    CleanupStack::PopAndDestroy( destinationName );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt err = aMessage.Write( 3, handlePckg );
+    if ( err )
+        {
+        // Removes from object index and destroys the object.
+        iDestinationObjects->Remove( handle );
+        User::Leave( err );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATEDESTINATIONWITHNAMEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::CreateDestinationWithNameAndIdL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateDestinationWithNameAndIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATEDESTINATIONWITHNAMEANDIDL_ENTRY );
+
+    // Structure:
+    // - Check arguments.
+    // - Create session instance.
+    // - Ask cache to open/create target and put data to session instance.
+    // - Create subsession and complete message.
+
+    // API side checks that ID is between 0x1000 - 0x1100, and converts if necessary.
+    TUint32 destinationId( (TUint32)aMessage.Int1() );
+
+    // Check that the ID is in valid range.
+    if ( destinationId <= KCmDefaultDestinationAPTagId ||
+            destinationId >= KCmMaxDestinationAPTagId )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    // Check if a destination with given ID exists (or is already created but not saved).
+    //TODO, Implement one single method for this check in CCmmCache-class, and call that. CCmmCache::DestinationOpenWithId() can be removed after that.
+    if ( iCache.DestinationExistsWithId( destinationId ) || iCache.DestinationOpenWithId( destinationId ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        //TODO: Destination ID is decided based on network record ID. Connection methods also use network records.
+        //TODO: Add a check here too see that the necessary network record ID is also available.
+        }
+
+    // Load and check name.
+    TInt destNameLength = aMessage.GetDesLength( 0 );
+    if ( destNameLength <= 0 )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    HBufC* destinationName = HBufC::NewLC( destNameLength );
+
+    TPtr ptrDestinationName = destinationName->Des();
+    aMessage.ReadL( 0, ptrDestinationName );
+
+    // Check if a destination with given name exists (or is already created but not yet saved).
+    if ( iCache.DestinationExistsWithNameL( *destinationName, 0 ) ||
+            iCache.NotSavedDestinationOpenWithNameL( *destinationName, 0 ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    CCmmDestinationInstance* destinationInstance = CCmmDestinationInstance::NewLC( this, &iCache );
+
+    // Cache will create the destination data structure and copy the relevant
+    // data to the session instance.
+    iCache.CreateDestinationL( *destinationInstance, *destinationName, destinationId );
+
+    iDestinationContainer->AddL( ( CObject* ) destinationInstance );
+    TInt handle = iDestinationObjects->AddL( ( CObject* ) destinationInstance );
+    destinationInstance->SetHandle( handle );
+    CleanupStack::Pop( destinationInstance );
+    CleanupStack::PopAndDestroy( destinationName );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt err = aMessage.Write( 3, handlePckg );
+    if ( err )
+        {
+        // Removes from object index and destroys the object.
+        iDestinationObjects->Remove( handle );
+        User::Leave( err );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATEDESTINATIONWITHNAMEANDIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::CloseDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CloseDestination( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CLOSEDESTINATION_ENTRY );
+
+    // Check first that the destination instance exists.
+    CObject* destinationObject = iDestinationObjects->At( aMessage.Int3() );
+    if ( destinationObject )
+        {
+        // Destination instance destructor will notify cache.
+        iDestinationObjects->Remove( aMessage.Int3() );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CLOSEDESTINATION_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Return the connection method count from the provided destination.
+// Embedded destinations are included.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnectionMehodCountL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNECTIONMEHODCOUNTL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    TInt connMethodCount( destinationInstance->iConnMethodItemArray.Count() ); // Includes embedded destinations.
+
+    TPckg<TInt> countPckg( connMethodCount );
+    aMessage.WriteL( 0, countPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNECTIONMEHODCOUNTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodPriorityL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodPriorityL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODPRIORITYL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+    TUint32 connMethodId = connMethodInstance->GetId();
+
+    TInt index( KErrNotFound );
+    for ( TInt i = 0; i < destinationInstance->iConnMethodItemArray.Count(); i++ )
+        {
+        if ( destinationInstance->iConnMethodItemArray[i].iId == connMethodId )
+            {
+            // Index in the connection method array is the connection method
+            // priority. But priority starts from 1, so adjust by +1.
+            index = i + 1;
+            break;
+            }
+        }
+
+    // Leave if given connection method is not inside this destination.
+    User::LeaveIfError( index );
+
+    // Check if the connection method is an embedded destination.
+    if ( connMethodInstance->IsEmbeddedDestination() )
+        {
+        index = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+        }
+
+    // If this is a virtual IAP that doesn't link to an IAP, the priority is wildcard.
+    else if ( connMethodInstance->GetBoolAttributeL( CMManager::ECmVirtual ) )
+        {
+        if ( connMethodInstance->GetIntAttributeL( CMManager::ECmNextLayerIapId ) == 0 )
+            {
+            index = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+            }
+        }
+
+    TUint priority = ( TUint )index;
+    TPckg<TUint> priorityPckg( priority );
+    aMessage.WriteL( 1, priorityPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODPRIORITYL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationNameL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationNameL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONNAMEL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    HBufC* name = destinationInstance->GetLocalisedDestinationNameL();
+    CleanupStack::PushL( name );
+    TPtrC namePtr( name->Des() );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 0 );
+    if ( namePtr.Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    aMessage.WriteL( 0, namePtr );
+
+    CleanupStack::PopAndDestroy( name );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONNAMEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationIconL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationIconL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONICONL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    HBufC* icon = destinationInstance->GetDestinationIconL();
+    CleanupStack::PushL( icon );
+    TPtrC iconPtr( icon->Des() );
+
+    TInt bufferLen = aMessage.GetDesMaxLength( 0 );
+    if ( iconPtr.Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    aMessage.WriteL( 0, iconPtr );
+    CleanupStack::PopAndDestroy( icon );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONICONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationIdL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONIDL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    TUint32 id = destinationInstance->GetRecordTagFromApRecordL();
+    TPckg<TUint32> idPckg( id );
+    aMessage.WriteL( 0, idPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationElementIdL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationElementIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONELEMENTIDL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    TUint32 elementId = destinationInstance->GetElementIdL();
+    TPckg<TUint32> elementIdPckg( elementId );
+    aMessage.WriteL( 0, elementIdPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONELEMENTIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationMetadataL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationMetadataL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONMETADATAL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+    CMManager::TSnapMetadataField metadataField =
+            ( CMManager::TSnapMetadataField )aMessage.Int0();
+
+    TUint32 metadata( 0 );
+    destinationInstance->GetMetadataL( metadataField, metadata );
+
+    TPckg<TUint32> metadataPckg( metadata );
+    aMessage.WriteL( 1, metadataPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONMETADATAL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetDestinationProtectionLevelL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetDestinationProtectionLevelL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETDESTINATIONPROTECTIONLEVELL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    CMManager::TProtectionLevel protLevel( CMManager::EProtLevel0 );
+    destinationInstance->GetProtectionL( protLevel );
+
+    TPckg<TInt> protLevelPckg( protLevel );
+    aMessage.WriteL( 0, protLevelPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETDESTINATIONPROTECTIONLEVELL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::IsDestinationConnectedL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::IsDestinationConnectedL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_ISDESTINATIONCONNECTEDL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    if ( !iCache.DestinationExistsWithId( destinationInstance->GetId() ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    TBool isConnected = iCache.DestinationConnectedL( destinationInstance->GetId() );
+    TPckg<TBool> isConnectedPckg( isConnected );
+    aMessage.WriteL( 0, isConnectedPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_ISDESTINATIONCONNECTEDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::IsDestinationHiddenL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::IsDestinationHiddenL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_ISDESTINATIONHIDDENL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    TUint32 isHiddenMetadata( 0 );
+    destinationInstance->GetMetadataL( CMManager::ESnapMetadataHiddenAgent, isHiddenMetadata );
+
+    TBool isHidden( EFalse );
+    if ( isHiddenMetadata )
+        {
+        isHidden = ETrue;
+        }
+
+    TPckg<TBool> isHiddenPckg( isHidden );
+    aMessage.WriteL( 0, isHiddenPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_ISDESTINATIONHIDDENL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Checks if the destination given as parameter is equal to this destination
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DestinationIsEqualL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DESTINATIONISEQUALL_ENTRY );
+
+    CCmmDestinationInstance* dest =
+        ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    CCmmDestinationInstance* destToBeCompared =
+        ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int0() );
+
+    TBool equal( EFalse );
+    if ( dest->GetId() == destToBeCompared->GetId() )
+        {
+        equal = ETrue;
+        }
+
+    TPckg<TBool> equalPckg( equal );
+
+    aMessage.WriteL( 1, equalPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_DESTINATIONISEQUALL_EXIT );
+    }
+
+
+// -----------------------------------------------------------------------------
+// Adds a connection method into a destination. Does not add embedded
+// destinations.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DestAddConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DESTADDCONNMETHODL_ENTRY );
+
+    CCmmDestinationInstance* destination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destination->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CCmmConnMethodInstance* connMethod =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+
+    if ( connMethod->IsEmbeddedDestination() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TInt index = destination->AddConnMethodL( *connMethod );
+    TPckg<TInt> indexPckg( index );
+    aMessage.WriteL( 1, indexPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_DESTADDCONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Adds a destination into a destination as an embedded destination.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DestAddEmbeddedDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DESTADDEMBEDDEDDESTINATIONL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel = 
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CCmmDestinationInstance* embeddedDestination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int0() );
+
+    TInt index = destinationInstance->AddEmbeddedDestinationL( *embeddedDestination );
+    TPckg<TInt> indexPckg( index );
+    aMessage.WriteL( 1, indexPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_DESTADDEMBEDDEDDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::DestDeleteConnMethodL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DestDeleteConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DESTDELETECONNMETHODL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+    
+    // Check the protection of destination and if protected check the needed
+    // capabilities.
+    CMManager::TProtectionLevel protLevel = 
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel3 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    // Check the protection of CM and if protected check the needed
+    // capabilities.
+    CheckCapabilitiesForProtectedCML( aMessage, connMethodInstance );
+
+    destinationInstance->DeleteConnMethodFromDestinationL( *connMethodInstance );
+
+    OstTraceFunctionExit0( CCMMSESSION_DESTDELETECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::DestRemoveConnMethodL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DestRemoveConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DESTREMOVECONNMETHODL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+
+    // Check the protection of destination and if protected check the needed
+    // capabilities.
+    CMManager::TProtectionLevel protLevel = 
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel3 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    destinationInstance->RemoveConnMethodFromDestinationL( *connMethodInstance );
+
+    OstTraceFunctionExit0( CCMMSESSION_DESTREMOVECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ModifyConnMethodPriorityL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ModifyConnMethodPriorityL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_MODIFYCONNMETHODPRIORITYL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection of destination and if protected check the needed
+    // capabilities.
+    CMManager::TProtectionLevel protLevel = 
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel3 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+
+    // Index values start from 0 (0 meaning highest priority).
+    TUint index( ( TUint )aMessage.Int1() );
+
+    destinationInstance->ModifyConnMethodPriorityL( *connMethodInstance, index );
+
+    OstTraceFunctionExit0( CCMMSESSION_MODIFYCONNMETHODPRIORITYL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetDestinationNameL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetDestinationNameL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETDESTINATIONNAMEL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check that client does not try to change the name of the Internet Destination.
+    TUint32 metadata( 0 );
+    destinationInstance->GetMetadataL( CMManager::ESnapMetadataPurpose, metadata );
+    if ( metadata == CMManager::ESnapPurposeInternet )
+        {
+        User::Leave( KErrPermissionDenied );
+        }
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel2 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    // Load and check name.
+    TInt destNameLength = aMessage.GetDesLength( 0 );
+    if ( destNameLength <= 0 )
+        {
+        User::Leave( KErrArgument ); //TODO, check also max length?
+        }
+
+    HBufC* newName = HBufC::NewLC( destNameLength );
+    TPtr ptrNewName = newName->Des();
+    aMessage.ReadL( 0, ptrNewName );
+
+    // Check if a destination with given name exists (or is already created but not yet saved).
+    if ( iCache.DestinationExistsWithNameL( *newName, destinationInstance->GetId() ) ||
+            iCache.NotSavedDestinationOpenWithNameL( *newName, destinationInstance->GetId() ) )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    destinationInstance->SetDestinationNameL( *newName );
+
+    CleanupStack::PopAndDestroy( newName );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETDESTINATIONNAMEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetDestinationIconL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetDestinationIconL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETDESTINATIONICONL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel2 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    // Load and check name.
+    TInt destIconNameLength = aMessage.GetDesLength( 0 );
+    if ( destIconNameLength < 0 || destIconNameLength > KCmmStringLengthMax )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    HBufC* newIconName = HBufC::NewLC( destIconNameLength );
+    TPtr ptrNewIconName = newIconName->Des();
+    aMessage.ReadL( 0, ptrNewIconName );
+
+    destinationInstance->SetDestinationIconL( *newIconName );
+    CleanupStack::PopAndDestroy( newIconName );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETDESTINATIONICONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetDestinationMetadataL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetDestinationMetadataL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETDESTINATIONMETADATAL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel2 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CMManager::TSnapMetadataField metadataField =
+            ( CMManager::TSnapMetadataField )aMessage.Int0();
+    TUint32 metadata = aMessage.Int1();
+
+    destinationInstance->SetMetadataL( metadataField, metadata );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETDESTINATIONMETADATAL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetDestinationProtectionL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetDestinationProtectionL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETDESTINATIONPROTECTIONL_ENTRY );
+
+    // Check the needed capabilities.
+    CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+    capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+    if ( capabilities == CPolicyServer::EFail )
+        {
+        User::Leave( KErrPermissionDenied );
+        }
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+    CMManager::TProtectionLevel protLevel =
+            ( CMManager::TProtectionLevel )aMessage.Int0();
+    destinationInstance->SetProtectionL( protLevel );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETDESTINATIONPROTECTIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetDestinationHiddenL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetDestinationHiddenL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETDESTINATIONHIDDENL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+            protLevel == CMManager::EProtLevel2 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    TBool hidden = aMessage.Int0();
+    destinationInstance->SetMetadataL( CMManager::ESnapMetadataHiddenAgent, hidden );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETDESTINATIONHIDDENL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::UpdateDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::UpdateDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_UPDATEDESTINATIONL_ENTRY );
+
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection and if protected check the needed capabilities
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+         protLevel == CMManager::EProtLevel2 ||
+         protLevel == CMManager::EProtLevel3 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    destinationInstance->UpdateL();
+
+    OstTraceFunctionExit0( CCMMSESSION_UPDATEDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::DeleteDestinationL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DeleteDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DELETEDESTINATIONL_ENTRY );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int3() );
+
+    // Check the protection of destination and if protected check the needed
+    // capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destinationInstance->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 ||
+         protLevel == CMManager::EProtLevel2 ||
+         protLevel == CMManager::EProtLevel3 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    iCache.CheckIfDestinationCanBeDeletedL( *destinationInstance );
+    iCache.DeleteDestinationL( *destinationInstance );
+
+    // Close the destination handle. Destination instance destructor will
+    // notify cache. If the reference count for the cache side handle goes to
+    // zero, it will be deleted.
+    iDestinationObjects->Remove( aMessage.Int3() );
+
+    OstTraceFunctionExit0( CCMMSESSION_DELETEDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ServiceConnMethodL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::ServiceConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SERVICECONNMETHODL_ENTRY );
+
+    switch ( aMessage.Function() )
+        {
+        case ECMCreateConnMethod:
+            {
+            CreateConnMethodL( aMessage );
+            }
+            break;
+        case ECMUpdate:
+            {
+            UpdateConnMethodL( aMessage );
+            }
+            break;
+        case ECMCloseConnMethod:
+            {
+            CloseConnMethod( aMessage ); // Can't leave.
+            }
+            break;
+        case ECMDelete:
+            {
+            DeleteConnMethodL( aMessage );
+            }
+            break;
+        case ECMGetConnMethodWithId:
+            {
+            GetConnMethodWithIdL( aMessage );
+            }
+            break;
+        case ECMRefresh:
+            {
+            RefreshConnMethodL( aMessage );
+            }
+            break;
+        case ECMGetIntAttribute:
+            {
+            GetIntAttributeL( aMessage );
+            }
+            break;
+        case ECMGetBoolAttribute:
+            {
+            GetBoolAttributeL( aMessage );
+            }
+            break;
+        case ECMGetStringAttribute:
+            {
+            GetStringAttributeL( aMessage );
+            }
+            break;
+        case ECMGetString8Attribute:
+            {
+            GetString8AttributeL( aMessage );
+            }
+            break;
+        case ECMSetIntAttribute:
+            {
+            SetIntAttributeL( aMessage );
+            }
+            break;
+        case ECMSetBoolAttribute:
+            {
+            SetBoolAttributeL( aMessage );
+            }
+            break;
+        case ECMSetStringAttribute:
+            {
+            SetStringAttributeL( aMessage );
+            }
+            break;
+        case ECMSetString8Attribute:
+            {
+            SetString8AttributeL( aMessage );
+            }
+            break;
+        case ECMCreateConnMethodWithId:
+            {
+            CreateConnMethodWithIdL( aMessage );
+            }
+            break;
+        case ECMGetConnMethodFromDestWithIndex:
+            {
+            GetConnMethodFromDestWithIndexL( aMessage );
+            }
+            break;
+        case ECMGetConnMethodFromDestWithId:
+            {
+            GetConnMethodFromDestWithIdL( aMessage );
+            }
+            break;
+        case ECMCreateConnMethodToDest:
+            {
+            CreateConnMethodToDestL( aMessage );
+            }
+            break;
+        case ECMCreateConnMethodToDestWithId:
+            {
+            CreateConnMethodToDestWithIdL( aMessage );
+            }
+            break;
+        case ECMIsEqual:
+            {
+            CmIsEqualL( aMessage );
+            }
+            break;
+        case ECMCreateCopyOfExisting:
+            {
+            CreateCopyOfExistingL( aMessage );
+            }
+            break;
+        case EDestGetEmbeddedDestination:
+            {
+            GetEmbeddedDestinationL( aMessage );
+            }
+            break;
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_SERVICECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Create a new connection method (not embedded destination).
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATECONNMETHODL_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            CCmmConnMethodInstance::NewLC( this, &iCache );
+    iCache.CreateConnMethodL( *connMethodInstance, NULL, bearerType, 0 );
+
+    iConnMethodContainer->AddL( ( CObject* ) connMethodInstance );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) connMethodInstance );
+    connMethodInstance->SetHandle( handle );
+    CleanupStack::Pop( connMethodInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::ConnMethodUpdateL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::UpdateConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_UPDATECONNMETHODL_ENTRY );
+
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check if the Client has capabilities to modify this CM.
+    CheckCapabilitiesForProtectedCML( aMessage, connMethodInstance );
+
+    connMethodInstance->UpdateL();
+
+    OstTraceFunctionExit0( CCMMSESSION_UPDATECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::CloseConnMethod
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CloseConnMethod( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CLOSECONNMETHOD_ENTRY );
+
+    // Check first that the connection method instance exists.
+    CObject* connMethodObject = iConnMethodObjects->At( aMessage.Int3() );
+    if ( connMethodObject )
+        {
+        // Connection method instance destructor will notify cache.
+        iConnMethodObjects->Remove( aMessage.Int3() );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CLOSECONNMETHOD_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::DeleteConnMethodL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::DeleteConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_DELETECONNMETHODL_ENTRY );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Embedded destinations cannot be deleted through connection method handle.
+    if ( connMethodInstance->IsEmbeddedDestination() )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // Check if the Client has capabilities to delete this CM.
+    CheckCapabilitiesForProtectedCML( aMessage, connMethodInstance );
+
+    iCache.CheckIfConnMethodCanBeDeletedL( *connMethodInstance );
+    iCache.DeleteConnMethodL( *connMethodInstance );
+    // Ignore the boolean return value. It is always true, or the
+    // DeleteL()-call leaves.
+
+    // Close the connection method handle. Connection method instance
+    // destructor will notify cache. If the reference count for the cache side
+    // handle goes to zero, it will be deleted.
+    iConnMethodObjects->Remove( aMessage.Int3() );
+
+    OstTraceFunctionExit0( CCMMSESSION_DELETECONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetConnMethodWithIdL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodWithIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODWITHIDL_ENTRY );
+
+    TUint32 connMethodId = aMessage.Int0();
+
+    // If this session already has a connection method with matching id open,
+    // provide the client with a reference to the already opened handle.
+    CCmmConnMethodInstance* cmInstance = FindConnMethodInstanceById( connMethodId );
+    if ( cmInstance )
+        {
+        // Also check that the connection method exists in database.
+        if ( iCache.ConnMethodExistsWithId( connMethodId ) )
+            {
+            TPckg<TInt> existingHandlePckg( cmInstance->GetHandle() );
+            aMessage.WriteL( 1, existingHandlePckg );
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+    cmInstance = NULL;
+    TPckg<TInt> existingHandlePckg( 0 );
+    aMessage.WriteL( 1, existingHandlePckg );
+
+    cmInstance = CCmmConnMethodInstance::NewLC( this, &iCache );
+    // Will check if connection method ID is valid.
+    iCache.OpenConnMethodL( *cmInstance, NULL, connMethodId );
+
+    iConnMethodContainer->AddL( ( CObject* ) cmInstance );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) cmInstance );
+    cmInstance->SetHandle( handle );
+    CleanupStack::Pop( cmInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODWITHIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::RefreshConnMethodL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::RefreshConnMethodL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_REFRESHCONNMETHODL_ENTRY );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    iCache.RefreshConnMethodL( *connMethodInstance );
+
+    OstTraceFunctionExit0( CCMMSESSION_REFRESHCONNMETHODL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetIntAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetIntAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETINTATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    TUint32 attribute( aMessage.Int0() );
+    TUint32 value = cm->GetIntAttributeL( attribute );
+
+    TPckg<TUint32> valuePckg( value );
+    aMessage.WriteL( 1, valuePckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETINTATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetBoolAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetBoolAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETBOOLATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    TUint32 attribute( aMessage.Int0() );
+    TBool value = cm->GetBoolAttributeL( attribute );
+
+    TPckg<TBool> valuePckg( value );
+    aMessage.WriteL( 1, valuePckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_GETBOOLATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetStringAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetStringAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETSTRINGATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    TUint32 attribute( aMessage.Int0() );
+    HBufC* value = cm->GetStringAttributeL( attribute );
+    if ( !value )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETSTRINGATTRIBUTEL_EXIT );
+        return;
+        }
+    CleanupStack::PushL( value );
+    TPtrC valuePtr = value->Des();
+
+    // Check the buffer length of the given buffer.
+    TInt bufferLen = aMessage.GetDesMaxLength( 1 );
+    if ( valuePtr.Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    aMessage.WriteL( 1, valuePtr );
+    CleanupStack::PopAndDestroy( value );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETSTRINGATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::GetString8AttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetString8AttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETSTRING8ATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    TUint32 attribute( aMessage.Int0() );
+    HBufC8* value = cm->GetString8AttributeL( attribute );
+    if ( !value )
+        {
+        OstTraceFunctionExit0( CCMMSESSION_GETSTRING8ATTRIBUTEL_EXIT );
+        return;
+        }
+    CleanupStack::PushL( value );
+    TPtrC8 valuePtr = value->Des();
+
+    // Check the buffer length of the given buffer.
+    TInt bufferLen = aMessage.GetDesMaxLength( 1 );
+    if ( valuePtr.Length() > bufferLen )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    aMessage.WriteL( 1, valuePtr );
+    CleanupStack::PopAndDestroy( value );
+
+    OstTraceFunctionExit0( DUP1_CCMMSESSION_GETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetIntAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetIntAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETINTATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check the capability needed if protected CM
+    // ECapabilityWriteDeviceData is checked earlier already.
+    CheckCapabilitiesForProtectedCML( aMessage, cm );
+
+    TUint32 attribute( aMessage.Int0() );
+    TUint32 value( aMessage.Int1() );
+
+    cm->SetIntAttributeL( attribute, value );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETINTATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetBoolAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetBoolAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETBOOLATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check the capability needed if protected CM
+    // ECapabilityWriteDeviceData is checked earlier already.
+    CheckCapabilitiesForProtectedCML( aMessage, cm );
+
+    TUint32 attribute( aMessage.Int0() );
+    TBool value( aMessage.Int1() );
+
+    cm->SetBoolAttributeL( attribute, value );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETBOOLATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetStringAttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetStringAttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETSTRINGATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check the capability needed if protected CM
+    // ECapabilityWriteDeviceData is checked earlier already.
+    CheckCapabilitiesForProtectedCML( aMessage, cm );
+
+    TUint32 attribute( aMessage.Int0() );
+
+    HBufC* value = HBufC::NewLC( aMessage.GetDesLengthL( 1 ) );
+    TPtr valuePtr( value->Des() );
+    aMessage.ReadL( 1, valuePtr );
+
+    cm->SetStringAttributeL( attribute, valuePtr );
+
+    CleanupStack::PopAndDestroy( value );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETSTRINGATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// CCmmSession::SetString8AttributeL
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::SetString8AttributeL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_SETSTRING8ATTRIBUTEL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check the capability needed if protected CM
+    // ECapabilityWriteDeviceData is checked earlier already.
+    CheckCapabilitiesForProtectedCML( aMessage, cm );
+
+    TUint32 attribute( aMessage.Int0() );
+
+    HBufC8* value = HBufC8::NewLC( aMessage.GetDesLengthL( 1 ) );
+    TPtr8 valuePtr( value->Des() );
+    aMessage.ReadL( 1, valuePtr );
+
+    cm->SetString8AttributeL( attribute, valuePtr );
+
+    CleanupStack::PopAndDestroy( value );
+
+    OstTraceFunctionExit0( CCMMSESSION_SETSTRING8ATTRIBUTEL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Create a new connection method (not embedded destination) with specific ID.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateConnMethodWithIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATECONNMETHODWITHIDL_ENTRY );
+
+    TUint32 bearerType( aMessage.Int0() );
+    TUint32 connMethodId = ( aMessage.Int1() );
+
+    CCmmConnMethodInstance* connMethod =
+            CCmmConnMethodInstance::NewLC( this, &iCache );
+    // Will check if ID is available.
+    iCache.CreateConnMethodL( *connMethod, NULL, bearerType, connMethodId );
+
+    iConnMethodContainer->AddL( ( CObject* ) connMethod );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) connMethod );
+    connMethod->SetHandle( handle );
+    CleanupStack::Pop( connMethod );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATECONNMETHODWITHIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Gets a Connection Method from a Destination with index number.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodFromDestWithIndexL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODFROMDESTWITHINDEXL_ENTRY );
+
+    TInt destinationHandle( aMessage.Int0() );
+    TInt connMethodIndex( aMessage.Int1() );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( destinationHandle );
+
+    // Check index is in range.
+    if ( connMethodIndex < 0 ||
+         connMethodIndex >= destinationInstance->iConnMethodItemArray.Count() )
+        {
+        User::Leave( KErrArgument );
+        }
+    TInt connMethodId( destinationInstance->iConnMethodItemArray[connMethodIndex].iId );
+
+    // If this session already has a connection method with matching id open
+    // and that connection method correctly belongs to the provided destination,
+    // provide the client with a reference to the already opened handle.
+    CCmmConnMethodInstance* cmInstance = FindConnMethodInstanceById( connMethodId );
+    if ( cmInstance &&
+            destinationInstance->ValidConnMethodIdInDestinationIncludeEmbedded( connMethodId ) )
+        {
+        // Also check that the connection method exists in database.
+        if ( iCache.ConnMethodExistsWithId( connMethodId ) ||
+                iCache.DestinationExistsWithId( connMethodId ) )
+            {
+            TPckg<TInt> existingHandlePckg( cmInstance->GetHandle() );
+            aMessage.WriteL( 2, existingHandlePckg );
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+    cmInstance = NULL;
+    TPckg<TInt> existingHandlePckg( 0 );
+    aMessage.WriteL( 2, existingHandlePckg );
+
+    cmInstance = CCmmConnMethodInstance::NewLC( this, &iCache );
+    // Will check if connection method ID is valid.
+    iCache.OpenConnMethodL( *cmInstance, destinationInstance, connMethodId );
+
+    iConnMethodContainer->AddL( ( CObject* ) cmInstance );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) cmInstance );
+    cmInstance->SetHandle( handle );
+    CleanupStack::Pop( cmInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODFROMDESTWITHINDEXL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Gets a Connection Method from a Destination with Id.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetConnMethodFromDestWithIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETCONNMETHODFROMDESTWITHIDL_ENTRY );
+
+    TInt destinationHandle( aMessage.Int0() );
+    TUint32 connMethodId( aMessage.Int1() );
+
+    CCmmDestinationInstance* destinationInstance =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( destinationHandle );
+
+    // If this session already has a connection method with matching id open
+    // and that connection method correctly belongs to the provided destination,
+    // provide the client with a reference to the already opened handle.
+    CCmmConnMethodInstance* cmInstance = FindConnMethodInstanceById( connMethodId );
+    if ( cmInstance &&
+            destinationInstance->ValidConnMethodIdInDestinationIncludeEmbedded( connMethodId ) )
+        {
+        // Also check that the connection method exists in database.
+        if ( iCache.ConnMethodExistsWithId( connMethodId ) ||
+                iCache.DestinationExistsWithId( connMethodId ) )
+            {
+            TPckg<TInt> existingHandlePckg( cmInstance->GetHandle() );
+            aMessage.WriteL( 2, existingHandlePckg );
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+    cmInstance = NULL;
+    TPckg<TInt> existingHandlePckg( 0 );
+    aMessage.WriteL( 2, existingHandlePckg );
+
+    cmInstance = CCmmConnMethodInstance::NewLC( this, &iCache );
+    // Will check if connection method ID is valid.
+    iCache.OpenConnMethodL( *cmInstance, destinationInstance, connMethodId );
+
+    iConnMethodContainer->AddL( ( CObject* ) cmInstance );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) cmInstance );
+    cmInstance->SetHandle( handle );
+    CleanupStack::Pop( cmInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_GETCONNMETHODFROMDESTWITHIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Create a new connection method (not embedded destination) into a destination.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateConnMethodToDestL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATECONNMETHODTODESTL_ENTRY );
+
+    TInt destinationHandle( aMessage.Int0() );
+    TUint32 bearerType( aMessage.Int1() );
+
+    CCmmDestinationInstance* destination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( destinationHandle );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destination->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CCmmConnMethodInstance* connMethod = CCmmConnMethodInstance::NewLC( this, &iCache );
+    iCache.CreateConnMethodL( *connMethod, destination, bearerType, 0 );
+
+    iConnMethodContainer->AddL( ( CObject* ) connMethod );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) connMethod );
+    connMethod->SetHandle( handle );
+    CleanupStack::Pop( connMethod );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATECONNMETHODTODESTL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Create a new connection method (not embedded destination) with specific ID
+// into a destination.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateConnMethodToDestWithIdL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATECONNMETHODTODESTWITHIDL_ENTRY );
+
+    TInt destinationHandle( aMessage.Int0() );
+    TUint32 bearerType( aMessage.Int1() );
+    TUint32 connMethodId( aMessage.Int2() );
+
+    CCmmDestinationInstance* destination =
+            ( CCmmDestinationInstance* )iDestinationObjects->AtL( destinationHandle );
+
+    // Check the protection and if protected check the needed capabilities.
+    CMManager::TProtectionLevel protLevel =
+            destination->CurrentProtectionLevelL();
+    if ( protLevel == CMManager::EProtLevel1 )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    CCmmConnMethodInstance* connMethod =
+            CCmmConnMethodInstance::NewLC( this, &iCache );
+    // Will check if ID is available.
+    iCache.CreateConnMethodL( *connMethod, destination, bearerType, connMethodId );
+
+    iConnMethodContainer->AddL( ( CObject* ) connMethod );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) connMethod );
+    connMethod->SetHandle( handle );
+    CleanupStack::Pop( connMethod );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATECONNMETHODTODESTWITHIDL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Checks if the CM given as parameter is equal to this CM
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CmIsEqualL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CMISEQUALL_ENTRY );
+
+    CCmmConnMethodInstance* cm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    CCmmConnMethodInstance* cmToBeCompared =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+
+    TBool equal( EFalse );
+    if ( cm->GetId() == cmToBeCompared->GetId() )
+        {
+        equal = ETrue;
+        }
+
+    TPckg<TBool> equalPckg( equal );
+    aMessage.WriteL( 1, equalPckg );
+
+    OstTraceFunctionExit0( CCMMSESSION_CMISEQUALL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Creates a copy of an existing connection method and opens a handle to it.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CreateCopyOfExistingL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CREATECOPYOFEXISTINGL_ENTRY );
+
+    CCmmConnMethodInstance* sourceCm =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int0() );
+    TUint32 cmId = sourceCm->GetId();
+
+    CCmmConnMethodInstance* targetCm =
+            CCmmConnMethodInstance::NewLC( this, &iCache );
+    iCache.CreateCopyOfConnMethodL( *targetCm, *sourceCm );
+
+    iConnMethodContainer->AddL( ( CObject* ) targetCm );
+    TInt handle = iConnMethodObjects->AddL( ( CObject* ) targetCm );
+    targetCm->SetHandle( handle );
+    CleanupStack::Pop( targetCm );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Remove from object index and destroy the object.
+        iConnMethodObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CREATECOPYOFEXISTINGL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Opens a destination handle to the embedded destination that the provided
+// connection method handle represents.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::GetEmbeddedDestinationL( const RMessage2& aMessage )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_GETEMBEDDEDDESTINATIONL_ENTRY );
+
+    CCmmConnMethodInstance* connMethodInstance =
+            ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
+
+    // Check this connection method realy represents an embedded destination.
+    if ( !connMethodInstance->IsEmbeddedDestination() )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    TUint32 destinationId = connMethodInstance->GetId();
+
+    // Check that the ID is in valid range.
+    if ( destinationId <= KCmDefaultDestinationAPTagId ||
+            destinationId >= KCmMaxDestinationAPTagId )
+        {
+        User::Leave( KErrCorrupt );
+        }
+
+    // If this session already has a destination with matching ID open, provide
+    // the client with a reference to the already opened handle.
+    CCmmDestinationInstance* destinationInstance = FindDestinationInstanceById( destinationId );
+    if ( destinationInstance )
+        {
+        if ( iCache.DestinationExistsWithId( destinationId ) )
+            {
+            TPckg<TInt> existingHandlePckg( destinationInstance->GetHandle() );
+            aMessage.WriteL( 1, existingHandlePckg );
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+    destinationInstance = NULL;
+    TPckg<TInt> existingHandlePckg( 0 );
+    aMessage.WriteL( 1, existingHandlePckg );
+
+    destinationInstance = CCmmDestinationInstance::NewLC( this, &iCache );
+
+    // Cache will open a handle to the destination if not already open, and
+    // copy relevant data into this destination instance.
+    iCache.OpenDestinationL( *destinationInstance, destinationId ); // Checks ID is valid.
+
+    iDestinationContainer->AddL( ( CObject* ) destinationInstance );
+    TInt handle = iDestinationObjects->AddL( ( CObject* ) destinationInstance );
+    destinationInstance->SetHandle( handle );
+    CleanupStack::Pop( destinationInstance );
+
+    TPckg<TInt> handlePckg( handle );
+    TInt error = aMessage.Write( 3, handlePckg );
+    if ( error )
+        {
+        // Removes from object index and destroys the object.
+        iDestinationObjects->Remove( handle );
+        User::Leave( error );
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_GETEMBEDDEDDESTINATIONL_EXIT );
+    }
+
+// -----------------------------------------------------------------------------
+// Check if CM is protected and if so then check the needed capabilities.
+// -----------------------------------------------------------------------------
+//
+void CCmmSession::CheckCapabilitiesForProtectedCML(
+        const RMessage2& aMessage,
+        CCmmConnMethodInstance* aConnectionMethodInstance )
+    {
+    OstTraceFunctionEntry0( CCMMSESSION_CHECKCAPABILITIESFORPROTECTEDCML_ENTRY );
+
+    TBool prot = aConnectionMethodInstance->GetBoolAttributeL( CMManager::ECmProtected );
+    if ( prot )
+        {
+        CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
+        capabilities = iServer.CapabilityCheckWithProtection( aMessage );
+        if ( capabilities == CPolicyServer::EFail )
+            {
+            User::Leave( KErrPermissionDenied );
+            }
+        }
+
+    OstTraceFunctionExit0( CCMMSESSION_CHECKCAPABILITIESFORPROTECTEDCML_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Check if there is space enough in the disk.
+// ---------------------------------------------------------------------------
+//
+TBool CCmmSession::CheckSpaceBelowCriticalLevelL()
+    {
+    if ( !iFsConnected )
+        {
+        TInt err = iFs.Connect();
+        if ( err )
+            {
+            // Error happened in connect --> disk space cannot be checked,
+            // --> return information that everything is ok.
+            return EFalse;
+            }
+        iFsConnected = ETrue;
+        }
+
+    TBool belowCL = SysUtil::FFSSpaceBelowCriticalLevelL( &iFs, KMinimumDiskSpace );
+
+    return belowCL;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmsrvstatic.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Creates and starts the server.
+*
+*/
+
+
+#include "cmmstarter.h"
+
+
+//
+// Perform all server initialisation, in particular creation of the scheduler
+// and server and then run the scheduler.
+//
+static void RunServerL()
+    {
+    // Create and install the active scheduler we need.
+    CActiveScheduler* s = new( ELeave ) CActiveScheduler;
+    CleanupStack::PushL( s );
+    CActiveScheduler::Install( s );
+
+    // Create the server.
+    CServer2* server = CCmmStarter::CreateAndStartServerL();
+    CleanupStack::PushL( server );
+
+    // Naming the server thread after server startup helps to debug panics.
+    User::LeaveIfError( RThread::RenameMe( CCmmStarter::ServerName() ) );
+
+    // Initialisation complete, now signal the client.
+    RProcess::Rendezvous( KErrNone );
+
+    // Ready to run. This will return only when CCmmDelayedShutdown calls
+    // CActiveScheduler::Stop().
+    CActiveScheduler::Start();
+
+    // Cleanup the server and scheduler.
+    CleanupStack::PopAndDestroy( server );
+    CleanupStack::PopAndDestroy( s );
+    }
+
+//
+// Server process entry-point.
+//
+TInt E32Main()
+    {
+//    __UHEAP_MARK;
+
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    TInt r = KErrNoMemory;
+    if ( cleanup )
+        {
+        TRAP( r, RunServerL() );
+        delete cleanup;
+        }
+
+//    __UHEAP_MARKEND;
+    return r;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmstarter.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Creates and starts Connection Method Manager server.
+*
+*/
+
+
+#include "cmmstarter.h"
+#include "cmmserverdefs.h"
+#include "cmmserver.h"
+
+
+CServer2* CCmmStarter::CreateAndStartServerL()
+    {
+    return CCmmServer::NewL();
+    }
+
+TPtrC CCmmStarter::ServerName()
+    {
+    return KCmmServer().Mid( 0 );
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/src/cmmtransactionhandler.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,202 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Common transaction handler of framework and plugins.
+*
+*/
+
+
+#include "cmmtransactionhandler.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmtransactionhandlerTraces.h"
+#endif
+
+const TUint32 KMaxOpenTransAttempts = 10;
+const TUint32 KRetryAfter = 100000;
+
+
+// ---------------------------------------------------------------------------
+// NewL.
+// ---------------------------------------------------------------------------
+//
+CCmmTransactionHandler* CCmmTransactionHandler::NewL( CommsDat::CMDBSession& aDb )
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_NEWL_ENTRY );
+
+    CCmmTransactionHandler* self = new( ELeave ) CCmmTransactionHandler( aDb );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_NEWL_EXIT );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CCmmTransactionHandler::~CCmmTransactionHandler()
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_ENTRY );
+    delete &iDb;
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CCmmTransactionHandler::CCmmTransactionHandler( CommsDat::CMDBSession& aDb ) : iDb( aDb )
+    {
+    OstTraceFunctionEntry0( DUP1_CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_ENTRY );
+    iRefCount = 0;
+    OstTraceFunctionExit0( DUP1_CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Second phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCmmTransactionHandler::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_CONSTRUCTL_ENTRY );
+    iDb.SetAttributeMask( CommsDat::ECDHidden | CommsDat::ECDProtectedWrite );
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_CONSTRUCTL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return the CommsDat session.
+// ---------------------------------------------------------------------------
+//
+CommsDat::CMDBSession& CCmmTransactionHandler::Session() const
+    {
+    // No traces.
+    return iDb;
+    }
+
+// ---------------------------------------------------------------------------
+// Opens a CommsDat transaction if it is not already open. Reference counter
+// is inreased by one.
+// ---------------------------------------------------------------------------
+//
+void CCmmTransactionHandler::OpenTransactionLC()
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_OPENTRANSACTIONLC_ENTRY );
+
+    iRefCount++;
+    CleanupClosePushL( *this );
+
+    if ( !iDb.IsInTransaction() )
+        {
+        TInt err( KErrNone );
+        TUint32 attempts( KMaxOpenTransAttempts );
+
+        do
+            {
+            TRAP( err, iDb.OpenTransactionL() );
+            if ( err )
+                {
+                User::After( KRetryAfter );
+                }
+            } while ( err && attempts-- );
+        User::LeaveIfError( err );
+        }
+
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_OPENTRANSACTIONLC_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Decreases the reference counter by one. If it reaches zero, commits the open
+// CommsDat transaction. If an error code is given as argument, the CommsDat
+// transaction is rolled back instead.
+// ---------------------------------------------------------------------------
+//
+void CCmmTransactionHandler::CommitTransactionL( TInt aError )
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_COMMITTRANSACTIONL_ENTRY );
+
+    iRefCount--;
+    CleanupStack::Pop( this );
+
+    if ( !iRefCount )
+        {
+        if ( aError )
+            {
+            iDb.RollbackTransactionL();
+            }
+        else
+            {
+            iDb.CommitTransactionL();
+            }
+        }
+
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_COMMITTRANSACTIONL_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Performs RollbackTransactionL().
+// Pay attention to CleanupStack if calling this. The transaction handler
+// needs to be popped from CleanupStack manually.
+// ---------------------------------------------------------------------------
+//
+void CCmmTransactionHandler::Close()
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_CLOSE_ENTRY );
+
+    if ( iRefCount == 0 )
+        {
+        // No active transaction, do nothing.
+        OstTraceFunctionExit0( DUP1_CCMTRANSACTIONHANDLER_CLOSE_EXIT );
+        return;
+        }
+
+    if ( !iDb.IsInTransaction() )
+        {
+        // Sometimes CommsDat closes the transaction on its own decision w/o any
+        // notification or reason. E.g. when you try to delete a non-existing
+        // record, it leaves with KErrNotFound, but rolls back the transaction.
+        iRefCount = 0;
+        }
+    else
+        {
+        iRefCount--;
+
+        if ( !iRefCount )
+            {
+            if ( iDb.IsInTransaction() )
+                {
+                TRAP_IGNORE( iDb.RollbackTransactionL() );
+                }
+            }
+        }
+
+    OstTraceFunctionExit0( DUP2_CCMTRANSACTIONHANDLER_CLOSE_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Return the current reference count. Transaction is currently open if the
+// count above 0.
+// ---------------------------------------------------------------------------
+//
+TUint32 CCmmTransactionHandler::GetReferenceCount()
+    {
+    OstTraceFunctionEntry0( CCMTRANSACTIONHANDLER_GETREFERENCECOUNT_ENTRY );
+    OstTraceFunctionExit0( CCMTRANSACTIONHANDLER_GETREFERENCECOUNT_EXIT );
+    return iRefCount;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,7 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,501 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_FLOW=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ADDRESOURCEFILEL_ENTRY=0x99
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ADDRESOURCEFILEL_EXIT=0x9a
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLIAPSL_ENTRY=0xe2
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLIAPSL_EXIT=0xe3
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLOCREADL_ENTRY=0xa2
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLOCREADL_EXIT=0xa3
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERPRIORITYARRAYL_ENTRY=0x8f
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERPRIORITYARRAYL_EXIT=0x90
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BUILDPLUGINARRAYL_ENTRY=0xcb
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BUILDPLUGINARRAYL_EXIT=0xcc
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CCMMANAGERIMPL_ENTRY=0x87
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CCMMANAGERIMPL_EXIT=0x88
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CHECKTABLESL_ENTRY=0x8b
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CHECKTABLESL_EXIT=0x8c
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CLEANUPGLOBALPRIORITYARRAY_ENTRY=0x97
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CLEANUPGLOBALPRIORITYARRAY_EXIT=0x98
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_COMMITTRANSACTIONL_ENTRY=0xa8
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_COMMITTRANSACTIONL_EXIT=0xa9
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONSTRUCTL_ENTRY=0xa4
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONSTRUCTL_EXIT=0xa5
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_COPYBEARERPRIORITYARRAYL_ENTRY=0x91
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_COPYBEARERPRIORITYARRAYL_EXIT=0x92
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATEBEARERPRIORITYARRAYL_ENTRY=0x8d
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATEBEARERPRIORITYARRAYL_EXIT=0x8e
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_EASYWLANIDL_ENTRY=0xe0
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_EASYWLANIDL_EXIT=0xe1
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_FEATURESUPPORTED_ENTRY=0xdb
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_FINDRESOURCEFILE_ENTRY=0x9f
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_FINDRESOURCEFILE_EXIT=0xa0
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOBOOLL_ENTRY=0xcf
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOBOOLL_EXIT=0xd0
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOINTL_ENTRY=0xcd
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOINTL_EXIT=0xce
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOSTRING8L_ENTRY=0xd3
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOSTRING8L_EXIT=0xd4
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOSTRINGL_ENTRY=0xd1
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETBEARERINFOSTRINGL_EXIT=0xd2
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODINFOBOOLL_ENTRY=0xd6
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODINFOBOOLL_EXIT=0xd7
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODINFOINTL_ENTRY=0xd5
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODINFOSTRING8L_ENTRY=0xd9
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODINFOSTRINGL_ENTRY=0xd8
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETINTERNETDESTINATIONIDL_EXIT=0xfd
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GLOBALBEARERPRIORITY_ENTRY=0x95
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GLOBALBEARERPRIORITY_EXIT=0x96
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_HANDLEDEFCONNDELETEDL_ENTRY=0xe8
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_HANDLEDEFCONNDELETEDL_EXIT=0xe9
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISEASYWLANL_ENTRY=0xdc
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISEASYWLANL_EXIT=0xdd
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISMEMORYLOW_ENTRY=0xf4
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISMEMORYLOW_EXIT=0xf5
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NEWL_ENTRY=0x85
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NEWL_EXIT=0x86
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_OPENTRANSACTIONLC_ENTRY=0xa6
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_OPENTRANSACTIONLC_EXIT=0xa7
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_READDEFCONNL_ENTRY=0xee
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_READDEFCONNL_EXIT=0xef
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_READDEFCONNWOTRANSL_ENTRY=0xea
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_READDEFCONNWOTRANSL_EXIT=0xeb
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_REMOVERESOURCEFILE_ENTRY=0x9c
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_REMOVERESOURCEFILE_EXIT=0x9d
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_REPLACEDEFCONNRECORDL_ENTRY=0xf0
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_REPLACEDEFCONNRECORDL_EXIT=0xf1
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ROLLBACKTRANSACTION_ENTRY=0xaa
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ROLLBACKTRANSACTION_EXIT=0xab
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_SESSION_ENTRY=0xda
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_UPDATEBEARERPRIORITYARRAYL_ENTRY=0x93
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_UPDATEBEARERPRIORITYARRAYL_EXIT=0x94
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_WRITEDEFCONNL_ENTRY=0xf2
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_WRITEDEFCONNL_EXIT=0xf3
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_WRITEDEFCONNWOTRANSL_ENTRY=0xec
+[TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_WRITEDEFCONNWOTRANSL_EXIT=0xed
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_ENTRY=0x78
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_EXIT=0x79
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_CONSTRUCTL_ENTRY=0x7a
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_CONSTRUCTL_EXIT=0x7b
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_DOCANCEL_ENTRY=0x81
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_DOCANCEL_EXIT=0x82
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_RUNL_ENTRY=0x83
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_RUNL_EXIT=0x84
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_START_ENTRY=0x7e
+[TRACE]TRACE_FLOW[0x7]_CCMMDELAYEDSHUTDOWN_START_EXIT=0x7f
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_ENTRY=0x1da
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_CCMMINSTANCEMAPPING_EXIT=0x1db
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_CONSTRUCTL_ENTRY=0x1dc
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_CONSTRUCTL_EXIT=0x1dd
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_GETCONNMETHODSL_ENTRY=0x1ed
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_GETCONNMETHODSL_EXIT=0x1ee
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_GETDESTINATIONSL_ENTRY=0x1ef
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_GETDESTINATIONSL_EXIT=0x1f0
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_NEWLC_ENTRY=0x1d8
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_NEWLC_EXIT=0x1d9
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_NEWL_ENTRY=0x1d6
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_NEWL_EXIT=0x1d7
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_READANDVALIDATECONNMETHODSL_ENTRY=0x1e5
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_READANDVALIDATECONNMETHODSL_EXIT=0x1e6
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_READANDVALIDATEDESTINATIONSL_ENTRY=0x1e7
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_READANDVALIDATEDESTINATIONSL_EXIT=0x1e8
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_REFRESHL_ENTRY=0x1de
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_REFRESHL_EXIT=0x1df
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_SESSION_ENTRY=0x1e4
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_VALIDCONNMETHODID_ENTRY=0x1e2
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_VALIDCONNMETHODID_EXIT=0x1e3
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_VALIDDESTINATIONID_ENTRY=0x1e0
+[TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_VALIDDESTINATIONID_EXIT=0x1e1
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CCMMSERVER_ENTRY=0x61
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CCMMSERVER_EXIT=0x62
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CMMANAGER_ENTRY=0x76
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CMMANAGER_EXIT=0x77
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CONSTRUCTL_ENTRY=0x69
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_CONSTRUCTL_EXIT=0x6a
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_INCREMENTSESSIONS_ENTRY=0x6c
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_INCREMENTSESSIONS_EXIT=0x6d
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWCONTAINERL_ENTRY=0x71
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWLC_ENTRY=0x67
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWLC_EXIT=0x68
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWL_ENTRY=0x65
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWL_EXIT=0x66
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_NEWSESSIONL_ENTRY=0x6b
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_REMOVECONTAINER_ENTRY=0x72
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_REMOVECONTAINER_EXIT=0x73
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_RUNERROR_ENTRY=0x74
+[TRACE]TRACE_FLOW[0x7]_CCMMSERVER_RUNERROR_EXIT=0x75
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CCMMSESSION_ENTRY=0x5
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CCMMSESSION_EXIT=0x6
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CLOSECONNMETHOD_ENTRY=0x5d
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CLOSECONNMETHOD_EXIT=0x5e
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CLOSEDESTINATION_ENTRY=0x35
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CLOSEDESTINATION_EXIT=0x36
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CONSTRUCTL_ENTRY=0x7
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CONSTRUCTL_EXIT=0x8
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATECONNMETHODL_ENTRY=0x59
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATECONNMETHODL_EXIT=0x5a
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATEDESTINATIONWITHNAMEANDIDL_ENTRY=0x2e
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATEDESTINATIONWITHNAMEANDIDL_EXIT=0x2f
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATEDESTINATIONWITHNAMEL_ENTRY=0x2c
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CREATEDESTINATIONWITHNAMEL_EXIT=0x2d
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DELETECONNMETHODL_ENTRY=0x5f
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DELETECONNMETHODL_EXIT=0x60
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DESTINATIONDELETEL_ENTRY=0x55
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DESTINATIONDELETEL_EXIT=0x56
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DESTINATIONUPDATEL_ENTRY=0x53
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_DESTINATIONUPDATEL_EXIT=0x54
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETALLDESTINATIONSL_ENTRY=0x20
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOBOOLL_ENTRY=0xf
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOBOOLL_EXIT=0x10
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOINTL_ENTRY=0xd
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOINTL_EXIT=0xe
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOSTRING8L_ENTRY=0x13
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOSTRING8L_EXIT=0x14
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOSTRINGL_ENTRY=0x11
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETBEARERINFOSTRINGL_EXIT=0x12
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNECTIONMEHODCOUNTL_ENTRY=0x37
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNECTIONMEHODCOUNTL_EXIT=0x38
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODARRAYL_ENTRY=0x1d
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOBOOLL_ENTRY=0x17
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOBOOLL_EXIT=0x18
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOINTL_ENTRY=0x15
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOINTL_EXIT=0x16
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOSTRING8L_ENTRY=0x1b
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOSTRING8L_EXIT=0x1c
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOSTRINGL_ENTRY=0x19
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODINFOSTRINGL_EXIT=0x1a
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODPRIORITYL_ENTRY=0x39
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODPRIORITYL_EXIT=0x3a
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONELEMENTIDL_ENTRY=0x3f
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONELEMENTIDL_EXIT=0x40
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONIDL_ENTRY=0x3d
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONIDL_EXIT=0x3e
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONL_ENTRY=0x2a
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONL_EXIT=0x2b
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONMETADATAL_ENTRY=0x41
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONMETADATAL_EXIT=0x42
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONNAMEL_ENTRY=0x3b
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONNAMEL_EXIT=0x3c
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONPROTECTIONLEVELL_ENTRY=0x43
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETDESTINATIONPROTECTIONLEVELL_EXIT=0x44
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETEASYWLANIDL_ENTRY=0x23
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETEASYWLANIDL_EXIT=0x24
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETSUPPORTEDBEARERSL_ENTRY=0x25
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_ISDESTINATIONCONNECTEDL_ENTRY=0x45
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_ISDESTINATIONCONNECTEDL_EXIT=0x46
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_ISDESTINATIONHIDDENL_ENTRY=0x47
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_ISDESTINATIONHIDDENL_EXIT=0x48
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_MODIFYCMPRIORITYL_ENTRY=0x49
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_MODIFYCMPRIORITYL_EXIT=0x4a
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_NEWLC_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_NEWLC_EXIT=0x4
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_NEWL_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_NEWL_EXIT=0x2
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICECONNMETHODL_ENTRY=0x57
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICECONNMETHODL_EXIT=0x58
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICEDESTINATIONL_ENTRY=0x28
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICEDESTINATIONL_EXIT=0x29
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICEL_ENTRY=0xb
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SERVICEL_EXIT=0xc
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONHIDDENL_ENTRY=0x51
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONHIDDENL_EXIT=0x52
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONMETADATAL_ENTRY=0x4d
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONMETADATAL_EXIT=0x4e
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONNAMEL_ENTRY=0x4b
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONNAMEL_EXIT=0x4c
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONPROTECTIONL_ENTRY=0x4f
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_SETDESTINATIONPROTECTIONL_EXIT=0x50
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_UPDATECONNMETHODL_ENTRY=0x5b
+[TRACE]TRACE_FLOW[0x7]_CCMMSESSION_UPDATECONNMETHODL_EXIT=0x5c
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_CLOSE_ENTRY=0x117
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_CLOSE_EXIT=0x118
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_COMMITTRANSACTIONL_ENTRY=0x115
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_COMMITTRANSACTIONL_EXIT=0x116
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_CONSTRUCTL_ENTRY=0x10f
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_CONSTRUCTL_EXIT=0x110
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_NEWL_ENTRY=0x10c
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_NEWL_EXIT=0x10d
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_OPENTRANSACTIONLC_ENTRY=0x113
+[TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_OPENTRANSACTIONLC_EXIT=0x114
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_CDESTINATION_ENTRY=0x1d2
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_CDESTINATION_EXIT=0x1d3
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_CONSTRUCTL_ENTRY=0x1d4
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_CONSTRUCTL_EXIT=0x1d5
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_NEWLC_ENTRY=0x1d0
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_NEWLC_EXIT=0x1d1
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_NEWL_ENTRY=0x1ce
+[TRACE]TRACE_FLOW[0x7]_CDESTINATION_NEWL_EXIT=0x1cf
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_ADDRESOURCEFILEL_EXIT=0x9b
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_CCMMANAGERIMPL_ENTRY=0x89
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_CCMMANAGERIMPL_EXIT=0x8a
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_FINDRESOURCEFILE_EXIT=0xa1
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_ISEASYWLANL_EXIT=0xde
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_REMOVERESOURCEFILE_EXIT=0x9e
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_ENTRY=0x7c
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMDELAYEDSHUTDOWN_CCMMDELAYEDSHUTDOWN_EXIT=0x7d
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMDELAYEDSHUTDOWN_START_EXIT=0x80
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSERVER_CCMMSERVER_ENTRY=0x63
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSERVER_CCMMSERVER_EXIT=0x64
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_CCMMSESSION_ENTRY=0x9
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_CCMMSESSION_EXIT=0xa
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_GETALLDESTINATIONSL_EXIT=0x22
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_GETCONNMETHODARRAYL_EXIT=0x1f
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_GETSUPPORTEDBEARERSL_EXIT=0x27
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_ENTRY=0x111
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER_EXIT=0x112
+[TRACE]TRACE_FLOW[0x7]_DUP1_CCMTRANSACTIONHANDLER_CLOSE_EXIT=0x119
+[TRACE]TRACE_FLOW[0x7]_DUP2_CCMMANAGERIMPL_ISEASYWLANL_EXIT=0xdf
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_BEARERRECORDIDLC_ENTRY=0x1bc
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_BEARERRECORDIDLC_EXIT=0x1bd
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CANHANDLEIAPIDL_ENTRY=0x1b6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CANHANDLEIAPIDL_EXIT=0x1b7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CCMCONNECTIONMETHODINFO_ENTRY=0x1a0
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CCMCONNECTIONMETHODINFO_EXIT=0x1a1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CONSTRUCTL_ENTRY=0x1a2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CONSTRUCTL_EXIT=0x1a3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_COPYADDITIONALDATAL_ENTRY=0x1c2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_COPYADDITIONALDATAL_EXIT=0x1c3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATECOPYL_ENTRY=0x1c6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATECOPYL_EXIT=0x1c7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATEINSTANCEL_ENTRY=0x1c4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATEINSTANCEL_EXIT=0x1c5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATENEWSERVICERECORDL_ENTRY=0x1be
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_CREATENEWSERVICERECORDL_EXIT=0x1bf
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOBOOLL_ENTRY=0x1ac
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOBOOLL_EXIT=0x1ad
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOINTL_ENTRY=0x1aa
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOINTL_EXIT=0x1ab
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOSTRING8L_ENTRY=0x1b0
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOSTRING8L_EXIT=0x1b1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOSTRINGL_ENTRY=0x1ae
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_GETCONNECTIONINFOSTRINGL_EXIT=0x1af
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_INITIALIZEWITHUIL_ENTRY=0x1b4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_INITIALIZEWITHUIL_EXIT=0x1b5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_NEWLC_ENTRY=0x1a6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_NEWLC_EXIT=0x1a7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_NEWL_ENTRY=0x1a4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_NEWL_EXIT=0x1a5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RESETANDLOADL_ENTRY=0x1c0
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RESETANDLOADL_EXIT=0x1c1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RESETIFINMEMORY_ENTRY=0x1c8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RESETIFINMEMORY_EXIT=0x1c9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RUNSETTINGSL_ENTRY=0x1b2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_RUNSETTINGSL_EXIT=0x1b3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_SERVICERECORDIDLC_ENTRY=0x1ba
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMCONNECTIONMETHODINFO_SERVICERECORDIDLC_EXIT=0x1bb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_CCMDESTINATIONDATA=0x125
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_CMMGR_ENTRY=0x18c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_CMMGR_EXIT=0x18d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_CONNECTIONMETHODCOUNT_ENTRY=0x141
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_CONNECTIONMETHODCOUNT_EXIT=0x142
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_IDISVALID_ENTRY=0x188
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_IDISVALID_EXIT=0x189
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_ISHIDDEN_ENTRY=0x170
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_ISHIDDEN_EXIT=0x171
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_METADATAL_ENTRY=0x16b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_METADATAL_EXIT=0x16c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_PROTECTIONLEVEL_ENTRY=0x147
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_RESETANDDESTROYARRAY_ENTRY=0x176
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONDATA_RESETANDDESTROYARRAY_EXIT=0x177
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ADDTOARRAYL_ENTRY=0x144
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ADDTOARRAYL_EXIT=0x145
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CCMDESTINATIONIMPL=0x124
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFDESTINATIONIDEXISTSL_ENTRY=0x130
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFDESTINATIONIDEXISTSL_EXIT=0x131
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFDESTINATIONNAMEEXISTL_ENTRY=0x132
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFDESTINATIONNAMEEXISTL_EXIT=0x133
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFEMBEDDEDL_ENTRY=0x151
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFEMBEDDEDL_EXIT=0x152
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFINTERNETEXISTSL_ENTRY=0x17f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFINTERNETEXISTSL_EXIT=0x180
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFLOCALISEDDESTEXISTL_ENTRY=0x190
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFLOCALISEDDESTEXISTL_EXIT=0x191
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFNAMEMODIFIEDL_ENTRY=0x17a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFNAMEMODIFIEDL_EXIT=0x17b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFPURPOSEEXISTL_ENTRY=0x192
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CHECKIFPURPOSEEXISTL_EXIT=0x193
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CLEANUPEMBEDDEDL_ENTRY=0x165
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CLEANUPEMBEDDEDL_EXIT=0x166
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CLEANUPSNAPMETADATATABLEL_ENTRY=0x167
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CLEANUPSNAPMETADATATABLEL_EXIT=0x168
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CMMGR_ENTRY=0x18e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CMMGR_EXIT=0x18f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_COMMITTRANSACTIONL_ENTRY=0x139
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_COMMITTRANSACTIONL_EXIT=0x13a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CONNECTIONMETHODCOUNT_ENTRY=0x143
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CONSTRUCTL_ENTRY=0x12a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CONSTRUCTL_EXIT=0x12b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_CREATEDESTINATIONAPTAGIDL_ENTRY=0x157
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETEIAPRECORDSL_ENTRY=0x178
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETEIAPRECORDSL_EXIT=0x179
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETELD_ENTRY=0x14d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETELD_EXIT=0x14e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETERELATEDRECORDSL_ENTRY=0x14f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_DELETERELATEDRECORDSL_EXIT=0x150
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_GETDATA_ENTRY=0x184
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_GETDATA_EXIT=0x185
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_GETDESTINATIONAPTAGID_ENTRY=0x158
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_IDISVALID_ENTRY=0x18a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_IDISVALID_EXIT=0x18b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_INITIALIZEDESTAPRECORDL_ENTRY=0x194
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_INITIALIZEDESTAPRECORDL_EXIT=0x195
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ISCONNECTEDL_ENTRY=0x17d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ISCONNECTEDL_EXIT=0x17e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ISHIDDEN_ENTRY=0x173
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADDESTAPRECORDL_ENTRY=0x163
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADDESTAPRECORDL_EXIT=0x164
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADNETWORKRECORDL_ENTRY=0x161
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADNETWORKRECORDL_EXIT=0x162
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADSNAPMETADATATABLEL_ENTRY=0x15f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_LOADSNAPMETADATATABLEL_EXIT=0x160
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_METADATAL=0x16d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NAMELC_ENTRY=0x13d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NAMELC_EXIT=0x13e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NEWLC_ENTRY=0x122
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NEWLC_EXIT=0x123
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NEWL_ENTRY=0x11a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_NEWL_EXIT=0x11b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_OPENTRANSACTIONLC_ENTRY=0x137
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_OPENTRANSACTIONLC_EXIT=0x138
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_PROTECTIONLEVELL_ENTRY=0x181
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_PROTECTIONLEVELL_EXIT=0x182
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_PROTECTIONLEVEL_ENTRY=0x148
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ROLLBACKTRANSACTION_ENTRY=0x13b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_ROLLBACKTRANSACTION_EXIT=0x13c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SESSION_ENTRY=0x136
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETATTRIBUTE_ENTRY=0x159
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETATTRIBUTE_EXIT=0x15a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDATA_ENTRY=0x186
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDATA_EXIT=0x187
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTCPRL_ENTRY=0x19a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTCPRL_EXIT=0x19b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTMCPRL_ENTRY=0x198
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTMCPRL_EXIT=0x199
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTPROTOCOLL_ENTRY=0x19e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTPROTOCOLL_EXIT=0x19f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTSCPRL_ENTRY=0x19c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTSCPRL_EXIT=0x19d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTTIERMANAGERL_ENTRY=0x196
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETDEFAULTTIERMANAGERL_EXIT=0x197
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETHIDDENL_ENTRY=0x174
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETHIDDENL_EXIT=0x175
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETIDL_ENTRY=0x12e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETIDL_EXIT=0x12f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETMETADATAL=0x16e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETMETADATAL_EXIT=0x16f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETNAMEL_ENTRY=0x13f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETNAMEL_EXIT=0x140
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETPROTECTIONL_ENTRY=0x149
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SETPROTECTIONL_EXIT=0x14a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SORTRECORDSBYPRIORITY_ENTRY=0x169
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_SORTRECORDSBYPRIORITY_EXIT=0x16a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATEDESTAPRECORDL_ENTRY=0x155
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATEDESTAPRECORDL_EXIT=0x156
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATEL_ENTRY=0x14b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATEL_EXIT=0x14c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATENETWORKRECORDL_ENTRY=0x153
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATENETWORKRECORDL_EXIT=0x154
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATESNAPMETADATATABLEL_ENTRY=0x15d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATESNAPMETADATATABLEL_EXIT=0x15e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATESNAPTABLEL_ENTRY=0x15b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMDESTINATIONIMPL_UPDATESNAPTABLEL_EXIT=0x15c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLDESTINATIONSL_ENTRY=0xc2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLDESTINATIONSL_EXIT=0xc3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLSNAPRECORDSL_ENTRY=0xe4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ALLSNAPRECORDSL_EXIT=0xe5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERTYPEFROMCMIDL_ENTRY=0xbe
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERTYPEFROMCMIDL_EXIT=0xbf
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERTYPEFROMIAPRECORDL_ENTRY=0xc0
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_BEARERTYPEFROMIAPRECORDL_EXIT=0xc1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONNECTIONMETHODL_ENTRY=0xb7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONNECTIONMETHODL_EXIT=0xb8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONNMETHODUPDATED_ENTRY=0x105
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CONNMETHODUPDATED_EXIT=0x106
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATECONNECTIONMETHODL_ENTRY=0xae
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATECONNECTIONMETHODL_EXIT=0xb0
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATECONNMETHODL_ENTRY=0xff
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATEDESTINATIONL_ENTRY=0xac
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATESNAPRECORDL_ENTRY=0xf8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_CREATESNAPRECORDL_EXIT=0xf9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DESTINATIONL_ENTRY=0xc4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DESTINATIONPROTECTIONLEVELL_ENTRY=0x107
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOCREATECONNECTIONMETHODL_ENTRY=0xb1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOCREATECONNECTIONMETHODL_EXIT=0xb2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOFINDCONNMETHL_ENTRY=0xbb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOFINDCONNMETHL_EXIT=0xbc
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOFINDCONNMETHODL_ENTRY=0xb9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_DOFINDCONNMETHODL_EXIT=0xba
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETALLDESTINATIONSL_ENTRY=0x10a
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETALLDESTINATIONSL_EXIT=0x10b
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODL_ENTRY=0xb5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODL_EXIT=0xb6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODOBJECTL_ENTRY=0xb3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNECTIONMETHODOBJECTL_EXIT=0xb4
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETCONNMETHODL_ENTRY=0xfe
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETDEFCONNL_ENTRY=0x101
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETDEFCONNL_EXIT=0x102
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_GETINTERNETDESTINATIONIDL_ENTRY=0xfc
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_HASUNPROTECTEDDESTINATIONSL_ENTRY=0xc9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_HASUNPROTECTEDDESTINATIONSL_EXIT=0xca
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_IAPLINKEDL_ENTRY=0x100
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISDESTINATIONCONNECTEDL_ENTRY=0x109
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISDESTINATIONHIDDENL_ENTRY=0x108
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISIAPLINKEDL_ENTRY=0xe6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_ISIAPLINKEDL_EXIT=0xe7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NUMOFCONNMETHODREFERENCESL_ENTRY=0xc7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NUMOFCONNMETHODREFERENCESL_EXIT=0xc8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NUMOFCONNMETHODREFSL_ENTRY=0x103
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_NUMOFCONNMETHODREFSL_EXIT=0x104
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_PARENTDESTINATIONL_ENTRY=0xfa
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_PARENTDESTINATIONL_EXIT=0xfb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_SNAPRECORDL_ENTRY=0xf6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_SNAPRECORDL_EXIT=0xf7
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_SUPPORTEDBEARERSL_ENTRY=0xc5
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMANAGERIMPL_SUPPORTEDBEARERSL_EXIT=0xc6
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_ADDTODESTINATIONSCONNMETHODARRAYL_ENTRY=0x1e9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMINSTANCEMAPPING_ADDTODESTINATIONSCONNMETHODARRAYL_EXIT=0x1ea
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSERVER_DECREMENTSESSIONS_ENTRY=0x6e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSERVER_DECREMENTSESSIONS_EXIT=0x6f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CHECKIFDESTINATIONEXISTSL_ENTRY=0x32
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CHECKIFDESTINATIONEXISTSL_EXIT=0x33
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CONVERTDESTIDIFNEEDED_ENTRY=0x30
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_CONVERTDESTIDIFNEEDED_EXIT=0x31
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETALLDESTINATIONSL_EXIT=0x21
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETCONNMETHODARRAYL_EXIT=0x1e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMMSESSION_GETSUPPORTEDBEARERSL_EXIT=0x26
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCMTRANSACTIONHANDLER_CCMTRANSACTIONHANDLER=0x10e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCONNMETHOD_CCONNMETHOD_ENTRY=0x1ca
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_CCONNMETHOD_CCONNMETHOD_EXIT=0x1cb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCCMDESTINATIONIMPL_NEWL_ENTRY=0x11c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODINFO_CANHANDLEIAPIDL_ENTRY=0x1b8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODINFO_CANHANDLEIAPIDL_EXIT=0x1b9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODINFO_CCMCONNECTIONMETHODINFO_ENTRY=0x1a8
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMCONNECTIONMETHODINFO_CCMCONNECTIONMETHODINFO_EXIT=0x1a9
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONDATA_CCMDESTINATIONDATA_ENTRY=0x126
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONDATA_CCMDESTINATIONDATA_EXIT=0x127
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONDATA_ISHIDDEN_EXIT=0x172
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_ADDTOARRAYL_EXIT=0x146
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_CCMDESTINATIONIMPL_ENTRY=0x128
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_CCMDESTINATIONIMPL_EXIT=0x129
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_CHECKIFNAMEMODIFIEDL_EXIT=0x17c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_CONSTRUCTL_ENTRY=0x12c
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_CONSTRUCTL_EXIT=0x12d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMDESTINATIONIMPL_NEWL_EXIT=0x11d
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_CREATECONNECTIONMETHODL_ENTRY=0xaf
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_CREATEDESTINATIONL_ENTRY=0xad
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMANAGERIMPL_DOFINDCONNMETHL_EXIT=0xbd
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMINSTANCEMAPPING_ADDTODESTINATIONSCONNMETHODARRAYL_EXIT=0x1eb
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMINSTANCEMAPPING_GETCONNMETHODSL_ENTRY=0x1f1
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMINSTANCEMAPPING_GETCONNMETHODSL_EXIT=0x1f2
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSERVER_DECREMENTSESSIONS_EXIT=0x70
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCMMSESSION_CHECKIFDESTINATIONEXISTSL_EXIT=0x34
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCONNMETHOD_CCONNMETHOD_ENTRY=0x1cc
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP1_CCONNMETHOD_CCONNMETHOD_EXIT=0x1cd
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMDESTINATIONIMPL_CONSTRUCTL_ENTRY=0x134
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMDESTINATIONIMPL_CONSTRUCTL_EXIT=0x135
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMDESTINATIONIMPL_NEWL_ENTRY=0x11e
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMDESTINATIONIMPL_NEWL_EXIT=0x11f
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMDESTINATIONIMPL_PROTECTIONLEVEL_ENTRY=0x183
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP2_CCMMINSTANCEMAPPING_ADDTODESTINATIONSCONNMETHODARRAYL_EXIT=0x1ec
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP3_CCMDESTINATIONIMPL_NEWL_ENTRY=0x120
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x7]_DUP3_CCMDESTINATIONIMPL_NEWL_EXIT=0x121
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x3]_CCMMINSTANCEMAPPING_READANDVALIDATEDESTINATIONSL=0x1
--- a/cmmanager/cmmgr/database/group/cmmanagerdatabase.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/database/group/cmmanagerdatabase.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -17,7 +17,6 @@
 *
 */
 
-#include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
 
 TARGET        	cmmanagerdatabase.dll
@@ -42,9 +41,7 @@
 MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY       	euser.lib
-//LIBRARY         ECom.lib
 LIBRARY         COMMSDAT.lib
-//LIBRARY         flogger.lib
 
 
 #if defined(ARMCC)
--- a/cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h	Tue Aug 31 15:35:44 2010 +0300
@@ -43,6 +43,7 @@
 #define KCDTypeNameSNAPMetadataSNAP _S( "SNAP" )
 #define KCDTypeNameSNAPMetadataMetadata _S( "Metadata" )
 #define KCDTypeNameSNAPMetadataIcon _S( "Icon" )
+#define KCDTypeNameSNAPMetadataIconFileName _S( "IconFileName" )
 
 //Global bearer priorization table and fields
 #define KCDTypeNameGlobalService _S( "GlobalBearerTypePriorization" )
@@ -60,6 +61,7 @@
 #define KCDTypeNameIAPMetadataIAP _S( "IAP" )
 #define KCDTypeNameIAPMetadataMetadata _S( "Metadata" )
 #define KCDTypeNameIAPMetadataSeamlessness _S( "Seamlessness" )
+#define KCDTypeNameIAPMetadataIconFileName _S( "IconFileName" )
 
 //MIP4 table and fields
 #define KCDTypeNameMIP4 _S( "MIP4" )
@@ -124,6 +126,7 @@
 const CommsDat::TMDBElementId KCDTIdSNAPMetadataSNAP  = 0x00120000;
 const CommsDat::TMDBElementId KCDTIdSNAPMetadataMetadata  = 0x00130000;
 const CommsDat::TMDBElementId KCDTIdSNAPMetadataIcon  = 0x00140000;
+const CommsDat::TMDBElementId KCDTIdSNAPMetadataIconFileName  = 0x00150000;
 
     //mip service extension table
 const CommsDat::TMDBElementId KCDTIdMIPMIP4  = 0x00120000;
@@ -138,6 +141,7 @@
 const CommsDat::TMDBElementId KCDTIdIAPMetadataIAP  = 0x00120000;
 const CommsDat::TMDBElementId KCDTIdIAPMetadataMetadata  = 0x00130000;
 const CommsDat::TMDBElementId KCDTIdIAPMetadataSeamlessness  = 0x00140000;
+const CommsDat::TMDBElementId KCDTIdIAPMetadataIconFileName  = 0x00150000;
 
 //MIP4 Metadata
 const CommsDat::TMDBElementId KCDTIdMIP4HomeAddress = 0x00120000;
@@ -259,7 +263,8 @@
     public:
     CommsDat::CMDBField<TInt> iSNAP;
     CommsDat::CMDBField<TUint32> iMetadata;
-    CommsDat::CMDBField<TUint32> iIcon;       
+    CommsDat::CMDBField<TUint32> iIcon;         //< Not used.
+    CommsDat::CMDBField<TDesC> iIconFileName;   //< May contain path information also.
     
      private:
     
@@ -355,6 +360,7 @@
     CommsDat::CMDBRecordLink<CommsDat::CCDIAPRecord> iIAP;
     CommsDat::CMDBField<TUint32> iMetadata;
     CommsDat::CMDBField<TInt> iSeamlessness;
+    CommsDat::CMDBField<TDesC> iIconFileName;   //< May contain path information also.
 
      private:
     
@@ -473,8 +479,8 @@
     DATA_VTABLE
         
     public:
-    CommsDat::CMDBField<TUint> iDefConnType;
-    CommsDat::CMDBField<TUint> iDefConnUid;    
+    CommsDat::CMDBField<TUint> iDefConnType;    //< Not used.
+    CommsDat::CMDBField<TUint> iDefConnUid;     //< Not used.
     CommsDat::CMDBField<TUint> iUsageOfWlan;
     CommsDat::CMDBField<TUint> iCellularDataUsageHome;
     CommsDat::CMDBField<TUint> iCellularDataUsageVisitor;
--- a/cmmanager/cmmgr/database/rom/cmmanagerdatabase.iby	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/database/rom/cmmanagerdatabase.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -14,13 +14,12 @@
 * Description:
 *
 */
-#ifndef __CMMANAGERDATABASE_IBY__
-#define __CMMANAGERDATABASE_IBY__
 
+#ifndef CMMANAGERDATABASE_IBY__
+#define CMMANAGERDATABASE_IBY__
 
 file=ABI_DIR\BUILD_DIR\cmmanagerdatabase.dll     SHARED_LIB_DIR\cmmanagerdatabase.dll
 
 
+#endif // CMMANAGERDATABASE_IBY__
 
-#endif // __CMMANAGERDATABASE_IBY__
-
--- a/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -36,15 +36,15 @@
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanConnMode,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanSSID,  TMDBText )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanUsedSSID,  TMDBText )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey1,  TMDBText )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey2,  TMDBText )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey3,  TMDBText )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey4,  TMDBText )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey1,  TMDBBin )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey2,  TMDBBin )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey3,  TMDBBin )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWepKey4,  TMDBBin )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanWepIndex,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanSecMode,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanAuthMode,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanEnableWpaPsk,  TMDBNum )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWpaPreSharedKey,  TMDBText )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanWpaPreSharedKey,  TMDBBin )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanWpaKeyLength,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanEaps,  TMDBText )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanScanSSID,  TMDBNum )
@@ -53,9 +53,9 @@
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanFormatKey2,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanFormatKey3,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanFormatKey4,  TMDBNum )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanAllowSSIDRoaming,  TMDBNum )	
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanEnabledEaps,  TMDBText )
-	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanDisabledEaps,  TMDBText )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWlanAllowSSIDRoaming,  TMDBNum )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanEnabledEaps,  TMDBBin )
+	X_REGISTER_ATTRIBUTE( CCDWlanServiceRecord,   iWLanDisabledEaps,  TMDBBin )
     X_REGISTER_ATTRIBUTE( CCDRecordBase,          iRecordTag,  TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDRecordBase,          iRecordName, TMDBText )
 END_ATTRIBUTE_TABLE()
@@ -97,25 +97,25 @@
 	X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iDefConnType,         TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iDefConnUid,          TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iUsageOfWlan,      TMDBNum )
-        X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iCellularDataUsageHome,  TMDBNum )
-        X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iCellularDataUsageVisitor,  TMDBNum )
+    X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iCellularDataUsageHome,  TMDBNum )
+    X_REGISTER_ATTRIBUTE( CCDDefConnRecord,   iCellularDataUsageVisitor,  TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDRecordBase,      iRecordTag,           TMDBNum )
 	X_REGISTER_ATTRIBUTE( CCDRecordBase,      iRecordName,          TMDBText )
 END_ATTRIBUTE_TABLE()
 
 const SRecordTypeInfo CCDDefConnRecord::iRecordInfo[]=
   	{
-	    { KCDTIdRecordTag,	         EUint32,    ENoAttrs, KCDTypeNameRecordTag }, 
+	    { KCDTIdRecordTag,	         EUint32,    ENoAttrs, KCDTypeNameRecordTag },
     	{ KCDTIdRecordName,	         EText,      ENotNull, KCDTypeNameRecordName},
     	{ KCDTIdDefConnType,         EUint32,    ENoAttrs, DEFCONN_TYPE },
     	{ KCDTIdDefConnUid,          EUint32,    ENoAttrs, DEFCONN_UID },
     	{ KCDTIdUsageOfWlan,         EUint32,    ENoAttrs, USAGEOFWLAN },
     	{ KCDTIdCellularDataUsageHome,     EUint32,    ENoAttrs,   CELLULAR_DATA_USAGE_HOME },
-        { KCDTIdCellularDataUsageVisitor,  EUint32,    ENoAttrs,   CELLULAR_DATA_USAGE_VISITOR },    	
+        { KCDTIdCellularDataUsageVisitor,  EUint32,    ENoAttrs,   CELLULAR_DATA_USAGE_VISITOR },
 	    { 0, 0, ENoAttrs, KCDNull }
   	};
-  	
-    
+
+
 EXPORT_C const SRecordTypeInfo* CCDDefConnRecord::GetRecordInfo()
     { 
     return iRecordInfo; 
--- a/cmmanager/cmmgr/database/src/datamobilitycommsdattypes.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/database/src/datamobilitycommsdattypes.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -66,6 +66,7 @@
     X_REGISTER_ATTRIBUTE( CCDSNAPMetadataRecord, iSNAP, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDSNAPMetadataRecord, iMetadata, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDSNAPMetadataRecord, iIcon, TMDBNum )
+    X_REGISTER_ATTRIBUTE( CCDSNAPMetadataRecord, iIconFileName, TMDBLongText )
     X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordTag, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordName,TMDBText )
 END_ATTRIBUTE_TABLE()
@@ -74,6 +75,7 @@
     X_REGISTER_ATTRIBUTE( CCDIAPMetadataRecord, iIAP, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDIAPMetadataRecord, iMetadata, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDIAPMetadataRecord, iSeamlessness, TMDBNum )
+    X_REGISTER_ATTRIBUTE( CCDIAPMetadataRecord, iIconFileName, TMDBLongText )
     X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordTag, TMDBNum )
     X_REGISTER_ATTRIBUTE( CCDRecordBase, iRecordName, TMDBText )
 END_ATTRIBUTE_TABLE()
@@ -201,6 +203,8 @@
 		  ENoAttrs,                         KCDTypeNameSNAPMetadataMetadata },
 		{ KCDTIdSNAPMetadataIcon,           EInt,  	
 		  ENoAttrs,                         KCDTypeNameSNAPMetadataIcon },
+        { KCDTIdSNAPMetadataIconFileName,   ELongText,
+          ENoAttrs,                         KCDTypeNameSNAPMetadataIconFileName },
   		{ 0,                                0,          
   		  ENoAttrs,                         KCDNull }
   	};
@@ -217,6 +221,8 @@
 		  ENoAttrs,                         KCDTypeNameIAPMetadataMetadata },
 		{ KCDTIdIAPMetadataSeamlessness,    EInt,  	    
 		  ENoAttrs,                         KCDTypeNameIAPMetadataSeamlessness },
+        { KCDTIdIAPMetadataIconFileName,    ELongText,
+          ENoAttrs,                         KCDTypeNameIAPMetadataIconFileName },
   		{ 0,                                0,          
   		  ENoAttrs,                         KCDNull }
   	};
@@ -361,26 +367,26 @@
       iNextLayerSNAP( ( aElementId & KCDMaskShowRecordType ) | KCDTIdVirtualNextLayerSNAP),
       iNextLayerIAP( (aElementId & KCDMaskShowRecordType ) | KCDTIdVirtualNextLayerIAP)
       {}
-  
-EXPORT_C TMDBElementId 
+
+EXPORT_C TMDBElementId
     CCDVirtualIAPNextLayerRecord::CreateTableL( CMDBSession& aSession )
     {
     const SGenericRecordTypeInfo KVirtualIAPNextLayerTableFormat[] = {
-        SGenericRecordTypeInfo( KCDTIdRecordTag,                EUint32,    
-                                ENoAttrs,                       KCDTypeNameRecordTag ),
-        SGenericRecordTypeInfo( KCDTIdRecordName,               EText,      
-                                ENotNull,                       KCDTypeNameRecordName ),    
-        SGenericRecordTypeInfo( KCDTIdVirtualIAP,               EInt,    
-                                ENotNull,                       KCDTypeNameVirtualIAP ),
-        SGenericRecordTypeInfo( KCDTIdVirtualNextLayerSNAP,     EInt,    
-                                ENoAttrs,                       KCDTypeNameVirtualIAPNextLayerSNAP ),   
-        SGenericRecordTypeInfo( KCDTIdVirtualNextLayerIAP,      EInt,    
-                                ENoAttrs,                       KCDTypeNameVirtualIAPNextLayerIAP ),       
+        SGenericRecordTypeInfo( KCDTIdRecordTag,            EUint32,
+                                ENoAttrs,                   KCDTypeNameRecordTag ),
+        SGenericRecordTypeInfo( KCDTIdRecordName,           EText,
+                                ENotNull,                   KCDTypeNameRecordName ),    
+        SGenericRecordTypeInfo( KCDTIdVirtualIAP,           EInt,
+                                ENotNull,                   KCDTypeNameVirtualIAP ),
+        SGenericRecordTypeInfo( KCDTIdVirtualNextLayerSNAP, EInt,
+                                ENoAttrs,                   KCDTypeNameVirtualIAPNextLayerSNAP ),
+        SGenericRecordTypeInfo( KCDTIdVirtualNextLayerIAP,  EInt,
+                                ENoAttrs,                   KCDTypeNameVirtualIAPNextLayerIAP ),
         SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )
         };
 
-    return ::CreateTableL( aSession, 
-                           TPtrC( KCDTypeNameVirtualIAPNextLayer ), 
+    return ::CreateTableL( aSession,
+                           TPtrC( KCDTypeNameVirtualIAPNextLayer ),
                            KVirtualIAPNextLayerTableFormat );
     }
 
@@ -401,27 +407,27 @@
           KCDTIdGlobalServiceUIPriority )
         {}
 
-EXPORT_C TMDBElementId 
+EXPORT_C TMDBElementId
     CCDGlobalBearerTypePriorizationRecord::CreateTableL( CMDBSession& aSession )
     {
-   const SGenericRecordTypeInfo KGlobalBearerTypeTableFormat[] = {
-        SGenericRecordTypeInfo( KCDTIdRecordTag,                EUint32,    
-                                ENoAttrs,                       KCDTypeNameRecordTag ),
-        SGenericRecordTypeInfo( KCDTIdRecordName,                EText,      
-                                ENotNull,                       KCDTypeNameRecordName ),    
-        SGenericRecordTypeInfo( KCDTIdGlobalServiceType,        EText,    
-                                ENotNull,                       KCDTypeNameGlobalServiceType ),
-        SGenericRecordTypeInfo( KCDTIdGlobalServicePriority,    EInt,    
-                                ENoAttrs,                       KCDTypeNameGlobalServicePriority ),   
-        SGenericRecordTypeInfo( KCDTIdGlobalServiceUIPriority,    EInt,    
-                                ENoAttrs,                       KCDTypeNameGlobalServiceUIPriority ),       
-        SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )       
+    const SGenericRecordTypeInfo KGlobalBearerTypeTableFormat[] = {
+        SGenericRecordTypeInfo( KCDTIdRecordTag,             EUint32,
+                                ENoAttrs,                    KCDTypeNameRecordTag ),
+        SGenericRecordTypeInfo( KCDTIdRecordName,            EText,
+                                ENotNull,                    KCDTypeNameRecordName ),
+        SGenericRecordTypeInfo( KCDTIdGlobalServiceType,     EText,
+                                ENotNull,                    KCDTypeNameGlobalServiceType ),
+        SGenericRecordTypeInfo( KCDTIdGlobalServicePriority, EInt,
+                                ENoAttrs,                    KCDTypeNameGlobalServicePriority ),
+        SGenericRecordTypeInfo( KCDTIdGlobalServiceUIPriority, EInt,
+                                ENoAttrs,                    KCDTypeNameGlobalServiceUIPriority ),
+        SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )
     };
-    return ::CreateTableL( aSession, 
-                           TPtrC( KCDTypeNameGlobalService ), 
+    return ::CreateTableL( aSession,
+                           TPtrC( KCDTypeNameGlobalService ),
                            KGlobalBearerTypeTableFormat );
     }
-    
+
 EXPORT_C TMDBElementId 
     CCDGlobalBearerTypePriorizationRecord::TableIdL( CMDBSession& aSession )
     {
@@ -440,44 +446,44 @@
           iPriority( ( aElementId & KCDMaskShowRecordType ) | 
           KCDTIdDataMobilitySelectionPolicyPriority )
         {}
- 
-EXPORT_C TMDBElementId 
+
+EXPORT_C TMDBElementId
     CCDDataMobilitySelectionPolicyRecord::CreateTableL( CMDBSession& aSession )
     {
     const SGenericRecordTypeInfo KDataMobilitySelectionPolicyTableFormat[] = {
-        SGenericRecordTypeInfo( KCDTIdRecordTag,        EUint32,    
-                                ENoAttrs,               KCDTypeNameRecordTag ),
-        SGenericRecordTypeInfo( KCDTIdRecordName,        EText,      
-                                ENotNull,               KCDTypeNameRecordName ),    
-        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyNetwork,        EInt,    
-                                ENotNull,               KCDTypeNameDataMobilitySelectionPolicySNAP ),       
-        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyIAP,            ELink,    
-                                ENoAttrs,               KCDTypeNameDataMobilitySelectionPolicyIAP ),       
-        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyEmbeddedSNAP,    EInt,    
-                                ENoAttrs,               KCDTypeNameDataMobilitySelectionPolicyEmbeddedSNAP ),       
-        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyPriority,    EInt,    
-                                ENotNull,               KCDTypeNameDataMobilitySelectionPolicyPriority ),
-        SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )       
+        SGenericRecordTypeInfo( KCDTIdRecordTag, EUint32,
+                                ENoAttrs, KCDTypeNameRecordTag ),
+        SGenericRecordTypeInfo( KCDTIdRecordName, EText,
+                                ENotNull, KCDTypeNameRecordName ),
+        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyNetwork, EInt,
+                                ENotNull, KCDTypeNameDataMobilitySelectionPolicySNAP ),
+        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyIAP, ELink,
+                                ENoAttrs, KCDTypeNameDataMobilitySelectionPolicyIAP ),
+        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyEmbeddedSNAP, EInt,
+                                ENoAttrs, KCDTypeNameDataMobilitySelectionPolicyEmbeddedSNAP ),
+        SGenericRecordTypeInfo( KCDTIdDataMobilitySelectionPolicyPriority, EInt,
+                                ENotNull, KCDTypeNameDataMobilitySelectionPolicyPriority ),
+        SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )
     };
 
-    return ::CreateTableL( aSession, 
-                           TPtrC( KCDTypeNameDataMobilitySelectionPolicy ), 
+    return ::CreateTableL( aSession,
+                           TPtrC( KCDTypeNameDataMobilitySelectionPolicy ),
                            KDataMobilitySelectionPolicyTableFormat );
     }
-    
-EXPORT_C TMDBElementId 
+
+EXPORT_C TMDBElementId
     CCDDataMobilitySelectionPolicyRecord::TableIdL( CMDBSession& aSession )
     {
     return ::TableIdL( aSession, TPtrC( KCDTypeNameDataMobilitySelectionPolicy ) );
     }
 
 EXPORT_C CCDMIPServiceExtRecord::CCDMIPServiceExtRecord( TMDBElementId aElementId )
-        : CCDRecordBase( aElementId ), 
+        : CCDRecordBase( aElementId ),
           iMIP4( ( aElementId & KCDMaskShowRecordType ) | KCDTIdMIPMIP4 ),
           iMIP6( ( aElementId & KCDMaskShowRecordType ) | KCDTIdMIPMIP6 )
         {}
-        
-EXPORT_C TMDBElementId 
+
+EXPORT_C TMDBElementId
     CCDMIPServiceExtRecord::CreateTableL( CMDBSession& aSession )
     {
     const SGenericRecordTypeInfo KMIPServiceExtTableFormat[] = {
@@ -510,7 +516,9 @@
           iMetadata( ( aElementId & KCDMaskShowRecordType ) | 
           KCDTIdSNAPMetadataMetadata ),
           iIcon( ( aElementId & KCDMaskShowRecordType ) | 
-          KCDTIdSNAPMetadataIcon )
+          KCDTIdSNAPMetadataIcon ),
+          iIconFileName( ( aElementId & KCDMaskShowRecordType ) |
+          KCDTIdSNAPMetadataIconFileName )
         {}
 
 EXPORT_C TMDBElementId 
@@ -527,6 +535,8 @@
                                 ENoAttrs,               KCDTypeNameSNAPMetadataMetadata ),
         SGenericRecordTypeInfo( KCDTIdSNAPMetadataIcon,        EUint32,    
                                 ENoAttrs,               KCDTypeNameSNAPMetadataIcon ),
+        SGenericRecordTypeInfo( KCDTIdSNAPMetadataIconFileName,    ELongText,
+                                ENoAttrs, KCDTypeNameSNAPMetadataIconFileName ),
         SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )       
     };
 
@@ -548,31 +558,35 @@
           iMetadata( ( aElementId & KCDMaskShowRecordType ) | 
           KCDTIdIAPMetadataMetadata ),
           iSeamlessness( ( aElementId & KCDMaskShowRecordType ) | 
-          KCDTIdIAPMetadataSeamlessness )
+          KCDTIdIAPMetadataSeamlessness ),
+          iIconFileName( ( aElementId & KCDMaskShowRecordType ) |
+          KCDTIdIAPMetadataIconFileName )
         {}
 
-EXPORT_C TMDBElementId 
+EXPORT_C TMDBElementId
     CCDIAPMetadataRecord::CreateTableL( CMDBSession& aSession )
     {
     const SGenericRecordTypeInfo KIAPMetadataTableFormat[] = {
-        SGenericRecordTypeInfo( KCDTIdRecordTag,                EUint32,    
-                                ENoAttrs,                       KCDTypeNameRecordTag ),
-        SGenericRecordTypeInfo( KCDTIdRecordName,                EText,      
-                                ENotNull,                       KCDTypeNameRecordName ),    
-        SGenericRecordTypeInfo( KCDTIdIAPMetadataIAP,            ELink,    
-                                ENotNull,                       KCDTypeNameIAPMetadataIAP ),       
-        SGenericRecordTypeInfo( KCDTIdIAPMetadataMetadata,        EUint32,    
-                                ENoAttrs,               KCDTypeNameIAPMetadataMetadata ),
-        SGenericRecordTypeInfo( KCDTIdIAPMetadataSeamlessness, EInt,    
-                                ENoAttrs,                       KCDTypeNameIAPMetadataSeamlessness ),
+        SGenericRecordTypeInfo( KCDTIdRecordTag, EUint32,
+                                ENoAttrs, KCDTypeNameRecordTag ),
+        SGenericRecordTypeInfo( KCDTIdRecordName, EText,
+                                ENotNull, KCDTypeNameRecordName ),
+        SGenericRecordTypeInfo( KCDTIdIAPMetadataIAP, ELink,
+                                ENotNull, KCDTypeNameIAPMetadataIAP ),
+        SGenericRecordTypeInfo( KCDTIdIAPMetadataMetadata, EUint32,
+                                ENoAttrs, KCDTypeNameIAPMetadataMetadata ),
+        SGenericRecordTypeInfo( KCDTIdIAPMetadataSeamlessness, EInt,
+                                ENoAttrs, KCDTypeNameIAPMetadataSeamlessness ),
+        SGenericRecordTypeInfo( KCDTIdIAPMetadataIconFileName, ELongText,
+                                ENoAttrs, KCDTypeNameIAPMetadataIconFileName ),
         SGenericRecordTypeInfo( 0, 0, ENoAttrs, KCDNull )
     };
 
-    return ::CreateTableL( aSession, 
-                           TPtrC( KCDTypeNameIAPMetadata ), 
+    return ::CreateTableL( aSession,
+                           TPtrC( KCDTypeNameIAPMetadata ),
                            KIAPMetadataTableFormat );
     }
-    
+
 EXPORT_C TMDBElementId 
     CCDIAPMetadataRecord::TableIdL( CMDBSession& aSession )
     {
--- a/cmmanager/cmmgr/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/cmmgr/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,8 @@
 *
 * Contributors:
 *
-* Description:  Build information for the Connection Method Manager
+* Description:
+* Build information for the Connection Method Manager.
 *
 */
 
@@ -22,26 +23,13 @@
 DEFAULT
 
 PRJ_EXPORTS
-// export iby files
-../Rom/CmManager.iby				CORE_MW_LAYER_IBY_EXPORT_PATH(CmManager.iby)
-../Rom/CmManagerResources.iby			LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CmManagerResources.iby)
-
-../Rom/cmpluginembdestination.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(cmpluginembdestination.iby)
-../Rom/cmpluginembdestinationresources.iby	LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(cmpluginembdestinationresources.iby)
-
-../Rom/cmpluginpacketdata.iby			CORE_MW_LAYER_IBY_EXPORT_PATH(cmpluginpacketdata.iby)
-../Rom/cmpluginpacketdataresources.iby		LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(cmpluginpacketdataresources.iby)
-
-../Rom/cmpluginvpn.iby				CORE_MW_LAYER_IBY_EXPORT_PATH(cmpluginvpn.iby)
-../Rom/cmpluginvpnresources.iby			LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(cmpluginvpnresources.iby)
-
-../Rom/cmpluginwlan.iby				CORE_MW_LAYER_IBY_EXPORT_PATH(cmpluginwlan.iby)
-../Rom/cmpluginwlanresources.iby		LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(cmpluginwlanresources.iby)
-
 
 PRJ_MMPFILES
-// None
+#include "../database/group/bld.inf"
+#include "../cmmapi/group/bld.inf"
+#include "../cmmpluginbase/group/bld.inf"
+#include "../cmmserver/group/bld.inf"
+#include "../cmmplugins/group/bld.inf"
 
-#include "../database/group/bld.inf"
-#include "../Framework/Group/bld.inf"
-#include "../Plugins/Group/bld.inf"
+PRJ_TESTMMPFILES
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/bwins/connection_settings_shimu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,47 @@
+EXPORTS
+	?setString8Attribute@CmConnectionMethodShim@@QAEXW4ConnectionMethodAttribute@CMManagerShim@@VQString@@@Z @ 1 NONAME ; void CmConnectionMethodShim::setString8Attribute(enum CMManagerShim::ConnectionMethodAttribute, class QString)
+	?getString8Attribute@CmConnectionMethodShim@@QBE?AVQString@@W4ConnectionMethodAttribute@CMManagerShim@@@Z @ 2 NONAME ; class QString CmConnectionMethodShim::getString8Attribute(enum CMManagerShim::ConnectionMethodAttribute) const
+	?connectionMethodCount@CmDestinationShim@@QBEHXZ @ 3 NONAME ; int CmDestinationShim::connectionMethodCount(void) const
+	?modifyPriority@CmDestinationShim@@QAEXPAVCmConnectionMethodShim@@H@Z @ 4 NONAME ; void CmDestinationShim::modifyPriority(class CmConnectionMethodShim *, int)
+	?setBoolAttribute@CmConnectionMethodShim@@QAEXW4ConnectionMethodAttribute@CMManagerShim@@_N@Z @ 5 NONAME ; void CmConnectionMethodShim::setBoolAttribute(enum CMManagerShim::ConnectionMethodAttribute, bool)
+	?createConnectionMethod@CmManagerShim@@QAEPAVCmConnectionMethodShim@@I@Z @ 6 NONAME ; class CmConnectionMethodShim * CmManagerShim::createConnectionMethod(unsigned int)
+	?getIntAttribute@CmConnectionMethodShim@@QBEIW4ConnectionMethodAttribute@CMManagerShim@@@Z @ 7 NONAME ; unsigned int CmConnectionMethodShim::getIntAttribute(enum CMManagerShim::ConnectionMethodAttribute) const
+	?isHidden@CmDestinationShim@@QBE_NXZ @ 8 NONAME ; bool CmDestinationShim::isHidden(void) const
+	?setIntAttribute@CmConnectionMethodShim@@QAEXW4ConnectionMethodAttribute@CMManagerShim@@I@Z @ 9 NONAME ; void CmConnectionMethodShim::setIntAttribute(enum CMManagerShim::ConnectionMethodAttribute, unsigned int)
+	?update@CmDestinationShim@@QAEXXZ @ 10 NONAME ; void CmDestinationShim::update(void)
+	?setStringAttribute@CmConnectionMethodShim@@QAEXW4ConnectionMethodAttribute@CMManagerShim@@VQString@@@Z @ 11 NONAME ; void CmConnectionMethodShim::setStringAttribute(enum CMManagerShim::ConnectionMethodAttribute, class QString)
+	??0CmConnectionMethodShim@@QAE@AAVRCmConnectionMethod@@@Z @ 12 NONAME ; CmConnectionMethodShim::CmConnectionMethodShim(class RCmConnectionMethod &)
+	?deleteDestination@CmDestinationShim@@QAEXXZ @ 13 NONAME ; void CmDestinationShim::deleteDestination(void)
+	?metadata@CmDestinationShim@@QBEIW4SnapMetadataField@CMManagerShim@@@Z @ 14 NONAME ; unsigned int CmDestinationShim::metadata(enum CMManagerShim::SnapMetadataField) const
+	?destination@CmManagerShim@@QBEPAVCmDestinationShim@@I@Z @ 15 NONAME ; class CmDestinationShim * CmManagerShim::destination(unsigned int) const
+	?getBoolAttribute@CmConnectionMethodShim@@QBE_NW4ConnectionMethodAttribute@CMManagerShim@@@Z @ 16 NONAME ; bool CmConnectionMethodShim::getBoolAttribute(enum CMManagerShim::ConnectionMethodAttribute) const
+	?connectionMethod@CmManagerShim@@QBEPAVCmConnectionMethodShim@@I@Z @ 17 NONAME ; class CmConnectionMethodShim * CmManagerShim::connectionMethod(unsigned int) const
+	?connectionMethod@CmManagerShim@@QBEXAAV?$QList@I@@_N@Z @ 18 NONAME ; void CmManagerShim::connectionMethod(class QList<unsigned int> &, bool) const
+	?update@CmConnectionMethodShim@@QAEXXZ @ 19 NONAME ; void CmConnectionMethodShim::update(void)
+	?name@CmDestinationShim@@QBE?AVQString@@XZ @ 20 NONAME ; class QString CmDestinationShim::name(void) const
+	?allDestinations@CmManagerShim@@QBEXAAV?$QList@I@@@Z @ 21 NONAME ; void CmManagerShim::allDestinations(class QList<unsigned int> &) const
+	??1CmManagerShim@@QAE@XZ @ 22 NONAME ; CmManagerShim::~CmManagerShim(void)
+	?protectionLevel@CmDestinationShim@@QBE?AW4CmmProtectionLevel@CMManagerShim@@XZ @ 23 NONAME ; enum CMManagerShim::CmmProtectionLevel CmDestinationShim::protectionLevel(void) const
+	?getStringAttribute@CmConnectionMethodShim@@QBE?AVQString@@W4ConnectionMethodAttribute@CMManagerShim@@@Z @ 24 NONAME ; class QString CmConnectionMethodShim::getStringAttribute(enum CMManagerShim::ConnectionMethodAttribute) const
+	?id@CmDestinationShim@@QBEIXZ @ 25 NONAME ; unsigned int CmDestinationShim::id(void) const
+	??0CmManagerShim@@QAE@XZ @ 26 NONAME ; CmManagerShim::CmManagerShim(void)
+	??1CmConnectionMethodShim@@QAE@XZ @ 27 NONAME ; CmConnectionMethodShim::~CmConnectionMethodShim(void)
+	?connectionMethodByID@CmDestinationShim@@QBEPAVCmConnectionMethodShim@@I@Z @ 28 NONAME ; class CmConnectionMethodShim * CmDestinationShim::connectionMethodByID(unsigned int) const
+	??0CmDestinationShim@@QAE@AAVRCmDestination@@@Z @ 29 NONAME ; CmDestinationShim::CmDestinationShim(class RCmDestination &)
+	?connectionMethod@CmDestinationShim@@QBEPAVCmConnectionMethodShim@@H@Z @ 30 NONAME ; class CmConnectionMethodShim * CmDestinationShim::connectionMethod(int) const
+	?addConnectionMethod@CmDestinationShim@@QAEHPAVCmConnectionMethodShim@@@Z @ 31 NONAME ; int CmDestinationShim::addConnectionMethod(class CmConnectionMethodShim *)
+	?deleteConnectionMethod@CmDestinationShim@@QAEXPAVCmConnectionMethodShim@@@Z @ 32 NONAME ; void CmDestinationShim::deleteConnectionMethod(class CmConnectionMethodShim *)
+	?deleteConnectionMethod@CmConnectionMethodShim@@QAE_NXZ @ 33 NONAME ; bool CmConnectionMethodShim::deleteConnectionMethod(void)
+	?priority@CmDestinationShim@@QBEIPAVCmConnectionMethodShim@@@Z @ 34 NONAME ; unsigned int CmDestinationShim::priority(class CmConnectionMethodShim *) const
+	?setName@CmDestinationShim@@QAEXVQString@@@Z @ 35 NONAME ; void CmDestinationShim::setName(class QString)
+	??1CmDestinationShim@@QAE@XZ @ 36 NONAME ; CmDestinationShim::~CmDestinationShim(void)
+	?removeConnectionMethod@CmDestinationShim@@QAEXPAVCmConnectionMethodShim@@@Z @ 37 NONAME ; void CmDestinationShim::removeConnectionMethod(class CmConnectionMethodShim *)
+	?createDestination@CmManagerShim@@QAEPAVCmDestinationShim@@VQString@@@Z @ 38 NONAME ; class CmDestinationShim * CmManagerShim::createDestination(class QString)
+	?refresh@CmConnectionMethodShim@@QAEXXZ @ 39 NONAME ; void CmConnectionMethodShim::refresh(void)
+	?refresh@CmDestinationShim@@QAEXXZ @ 40 NONAME ; void CmDestinationShim::refresh(void)
+	?getIcon@CmConnectionMethodShim@@QBE?AVQString@@XZ @ 41 NONAME ; class QString CmConnectionMethodShim::getIcon(void) const
+	?getIcon@CmDestinationShim@@QBE?AVQString@@XZ @ 42 NONAME ; class QString CmDestinationShim::getIcon(void) const
+	?setIcon@CmDestinationShim@@QAEXVQString@@@Z @ 43 NONAME ; void CmDestinationShim::setIcon(class QString)
+	?setIcon@CmConnectionMethodShim@@QAEXVQString@@@Z @ 44 NONAME ; void CmConnectionMethodShim::setIcon(class QString)
+	?getUncategorizedIcon@CmManagerShim@@QBE?AVQString@@XZ @ 45 NONAME ; class QString CmManagerShim::getUncategorizedIcon(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/connection_settings_shim.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Connection Settings Shim project file.
+#
+
+TEMPLATE = lib
+TARGET = connection_settings_shim
+TARGET.CAPABILITY = ALL -TCB
+
+#BUILD_DLL macro is used to define export macro
+DEFINES += BUILD_CONNECTIONSETTINGSSHIMDLL_DLL
+DEPENDPATH += .
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+    MMP_RULES += "USERINCLUDE traces"
+}
+
+#Store generated files to their own directory
+MOC_DIR = build
+RCC_DIR = build
+
+symbian*::LIBS += -lcmmanager
+
+# Sources
+HEADERS += \
+    ../../ipcm_plat/connection_settings_shim_api/inc/cmconnectionmethod_shim.h \
+    inc/cmconnectionmethod_shim_s60_p.h \
+    ../../ipcm_plat/connection_settings_shim_api/inc/cmdestination_shim.h \
+    inc/cmdestination_shim_s60_p.h \
+    ../../ipcm_plat/connection_settings_shim_api/inc/cmmanager_shim.h \
+    inc/cmmanager_shim_s60_p.h \
+    ../../ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h \
+    traces/OstTraceDefinitions.h
+    
+SOURCES += \
+    src/cmconnectionmethod_shim.cpp \
+    src/cmconnectionmethod_shim_s60.cpp \
+    src/cmdestination_shim.cpp \
+    src/cmdestination_shim_s60.cpp \
+    src/cmmanager_shim.cpp \
+    src/cmmanager_shim_s60.cpp
+
+# Temporary export directory definition
+# This can be removed when the default has changed to "." from ".."
+mmpRuleDeffile = \
+    "$${LITERAL_HASH}ifdef WINSCW" \
+    "DEFFILE ./bwins/connection_settings_shim.def" \
+    "$${LITERAL_HASH}else" \
+    "DEFFILE ./eabi/connection_settings_shim.def" \
+    "$${LITERAL_HASH}endif"
+ 
+symbian:
+{ 
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002E6D1
+    MMP_RULES += mmpRuleDeffile
+    BLD_INF_RULES.prj_exports += "rom/connection_settings_shim.iby CORE_MW_LAYER_IBY_EXPORT_PATH(connection_settings_shim.iby)"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/eabi/connection_settings_shimu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,53 @@
+EXPORTS
+	_ZN13CmManagerShim17createDestinationE7QString @ 1 NONAME
+	_ZN13CmManagerShim22createConnectionMethodEj @ 2 NONAME
+	_ZN13CmManagerShimC1Ev @ 3 NONAME
+	_ZN13CmManagerShimC2Ev @ 4 NONAME
+	_ZN13CmManagerShimD1Ev @ 5 NONAME
+	_ZN13CmManagerShimD2Ev @ 6 NONAME
+	_ZN17CmDestinationShim14modifyPriorityEP22CmConnectionMethodShimi @ 7 NONAME
+	_ZN17CmDestinationShim17deleteDestinationEv @ 8 NONAME
+	_ZN17CmDestinationShim19addConnectionMethodEP22CmConnectionMethodShim @ 9 NONAME
+	_ZN17CmDestinationShim22deleteConnectionMethodEP22CmConnectionMethodShim @ 10 NONAME
+	_ZN17CmDestinationShim22removeConnectionMethodEP22CmConnectionMethodShim @ 11 NONAME
+	_ZN17CmDestinationShim6updateEv @ 12 NONAME
+	_ZN17CmDestinationShim7setNameE7QString @ 13 NONAME
+	_ZN17CmDestinationShimC1ER14RCmDestination @ 14 NONAME
+	_ZN17CmDestinationShimC2ER14RCmDestination @ 15 NONAME
+	_ZN17CmDestinationShimD1Ev @ 16 NONAME
+	_ZN17CmDestinationShimD2Ev @ 17 NONAME
+	_ZN22CmConnectionMethodShim15setIntAttributeEN13CMManagerShim25ConnectionMethodAttributeEj @ 18 NONAME
+	_ZN22CmConnectionMethodShim16setBoolAttributeEN13CMManagerShim25ConnectionMethodAttributeEb @ 19 NONAME
+	_ZN22CmConnectionMethodShim18setStringAttributeEN13CMManagerShim25ConnectionMethodAttributeE7QString @ 20 NONAME
+	_ZN22CmConnectionMethodShim19setString8AttributeEN13CMManagerShim25ConnectionMethodAttributeE7QString @ 21 NONAME
+	_ZN22CmConnectionMethodShim22deleteConnectionMethodEv @ 22 NONAME
+	_ZN22CmConnectionMethodShim6updateEv @ 23 NONAME
+	_ZN22CmConnectionMethodShimC1ER19RCmConnectionMethod @ 24 NONAME
+	_ZN22CmConnectionMethodShimC2ER19RCmConnectionMethod @ 25 NONAME
+	_ZN22CmConnectionMethodShimD1Ev @ 26 NONAME
+	_ZN22CmConnectionMethodShimD2Ev @ 27 NONAME
+	_ZNK13CmManagerShim11destinationEj @ 28 NONAME
+	_ZNK13CmManagerShim15allDestinationsER5QListIjE @ 29 NONAME
+	_ZNK13CmManagerShim16connectionMethodER5QListIjEb @ 30 NONAME
+	_ZNK13CmManagerShim16connectionMethodEj @ 31 NONAME
+	_ZNK17CmDestinationShim15protectionLevelEv @ 32 NONAME
+	_ZNK17CmDestinationShim16connectionMethodEi @ 33 NONAME
+	_ZNK17CmDestinationShim20connectionMethodByIDEj @ 34 NONAME
+	_ZNK17CmDestinationShim21connectionMethodCountEv @ 35 NONAME
+	_ZNK17CmDestinationShim2idEv @ 36 NONAME
+	_ZNK17CmDestinationShim4nameEv @ 37 NONAME
+	_ZNK17CmDestinationShim8isHiddenEv @ 38 NONAME
+	_ZNK17CmDestinationShim8metadataEN13CMManagerShim17SnapMetadataFieldE @ 39 NONAME
+	_ZNK17CmDestinationShim8priorityEP22CmConnectionMethodShim @ 40 NONAME
+	_ZNK22CmConnectionMethodShim15getIntAttributeEN13CMManagerShim25ConnectionMethodAttributeE @ 41 NONAME
+	_ZNK22CmConnectionMethodShim16getBoolAttributeEN13CMManagerShim25ConnectionMethodAttributeE @ 42 NONAME
+	_ZNK22CmConnectionMethodShim18getStringAttributeEN13CMManagerShim25ConnectionMethodAttributeE @ 43 NONAME
+	_ZNK22CmConnectionMethodShim19getString8AttributeEN13CMManagerShim25ConnectionMethodAttributeE @ 44 NONAME
+	_ZN17CmDestinationShim7refreshEv @ 45 NONAME
+	_ZN22CmConnectionMethodShim7refreshEv @ 46 NONAME
+	_ZNK22CmConnectionMethodShim7getIconEv @ 47 NONAME
+	_ZNK17CmDestinationShim7getIconEv @ 48 NONAME
+	_ZN17CmDestinationShim7setIconE7QString @ 49 NONAME
+	_ZN22CmConnectionMethodShim7setIconE7QString @ 50 NONAME
+	_ZNK13CmManagerShim20getUncategorizedIconEv @ 51 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/inc/cmconnectionmethod_shim_s60_p.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Private implementation of Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMCONNECTIONMETHOD_SHIM_S60_P_H
+#define CMCONNECTIONMETHOD_SHIM_S60_P_H
+
+// System includes
+
+#include <QString>
+#include <cmconnectionmethod.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CmConnectionMethodShimPrivate
+{
+
+public:
+    
+    // Data types
+
+    CmConnectionMethodShimPrivate(RCmConnectionMethod &cm);
+
+    ~CmConnectionMethodShimPrivate();
+    
+    uint GetIntAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+
+    bool GetBoolAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+
+    QString GetStringAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+    
+    QString GetString8Attribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+    
+    void SetIntAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        uint value);
+
+    void SetBoolAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        bool value);
+
+    void SetStringAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+
+    void SetString8Attribute(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+    
+    bool DeleteConnectionMethod();
+
+    void Update();
+    
+    QString GetIcon() const;
+    
+    void SetIcon(QString icon);
+    
+    void Refresh();
+    
+protected:
+
+private:
+
+    Q_DISABLE_COPY(CmConnectionMethodShimPrivate)
+
+    void GetStringAttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        QString &value) const;
+   
+    void GetString8AttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        QString &value) const;
+   
+    void SetIntAttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        uint value);
+
+    void SetBoolAttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        bool value);
+
+    void SetStringAttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+   
+    void SetString8AttributeL(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+    
+    void GetIconL(QString &value) const;
+    
+    void SetIconL(QString icon);
+    
+    void TraceIfError(TInt error) const;
+    
+private: // data    
+    
+    RCmConnectionMethod iCm;  //!< CmManager Connection Method instance
+    
+    // Friend classes
+
+    /*
+     * CmDestinationShimPrivate::AddConnectionMethodL needs direct access
+     * to Connection Methods it is adding to the Destination.
+     */
+    friend class CmDestinationShimPrivate;
+};
+
+#endif // CMCONNECTIONMETHOD_SHIM_S60_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/inc/cmdestination_shim_s60_p.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Private implementation of Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMDESTINATION_SHIM_P_H
+#define CMDESTINATION_SHIM_P_H
+
+// System includes
+
+#include <QString>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+
+class RCmDestination;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class CmDestinationShimPrivate
+{
+
+public:
+
+    // Data types
+
+    CmDestinationShimPrivate(RCmDestination &destination);
+
+    ~CmDestinationShimPrivate();
+    
+    int ConnectionMethodCount() const;
+           
+    CmConnectionMethodShim *ConnectionMethod(int index) const;
+           
+    CmConnectionMethodShim *ConnectionMethodByID(uint cmId) const;
+
+    uint Priority(CmConnectionMethodShim *cmItem) const;
+           
+    QString Name() const;
+           
+    uint Id() const;
+
+    uint Metadata(CMManagerShim::SnapMetadataField metadataField) const;
+
+    CMManagerShim::CmmProtectionLevel ProtectionLevel() const;
+           
+    bool IsHidden() const;
+           
+    int AddConnectionMethod(CmConnectionMethodShim *cm);            
+       
+    void DeleteConnectionMethod(CmConnectionMethodShim *cm);
+       
+    void RemoveConnectionMethod(CmConnectionMethodShim *cm);
+    
+    void ModifyPriority(CmConnectionMethodShim *cm, int index);
+    
+    void SetName(QString name);
+    
+    void Update();               
+    
+    void Refresh();
+    
+    void DeleteDestination();
+    
+    QString GetIcon() const;
+    
+    void SetIcon(QString icon);
+    
+protected:
+
+private:
+                 
+    Q_DISABLE_COPY(CmDestinationShimPrivate)
+
+    void PriorityL(CmConnectionMethodShim *cmShim, uint &priority) const;
+    
+    void NameL(QString &name) const;
+           
+    void AddConnectionMethodL(CmConnectionMethodShim *cm, int &index);            
+       
+    void DeleteConnectionMethodL(CmConnectionMethodShim *cm);
+       
+    void RemoveConnectionMethodL(CmConnectionMethodShim *cm);
+             
+    void ModifyPriorityL(CmConnectionMethodShim *cm, int index);
+           
+    void SetNameL(QString name);
+    
+    void GetIconL(QString &icon) const;
+    
+    void SetIconL(QString icon);
+              
+    CMManagerShim::CmmProtectionLevel mapCmmProtectionLevel( 
+        CMManager::TProtectionLevel protectionlvl) const;
+    
+    void TraceIfError(TInt error) const;
+    
+private: // data
+        
+    RCmDestination iDestination;  //!< CmManager Destination instance
+    
+    // Friend classes
+    
+};
+
+#endif // CMDESTINATION_SHIM_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/inc/cmmanager_shim_s60_p.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Private implementation of Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMMANAGER_SHIM_S60_P_H
+#define CMMANAGER_SHIM_S60_P_H
+
+// System includes
+
+#include <QString>
+#include <cmmanager.h>
+
+// User includes
+
+// Forward declarations
+
+class CmConnectionMethodShim;
+class CmDestinationShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class CmManagerShimPrivate
+{
+
+public: 
+
+    // Data types
+
+    CmManagerShimPrivate();
+
+    ~CmManagerShimPrivate();
+    
+    CmDestinationShim *CreateDestination(QString name);
+    
+    CmConnectionMethodShim *CreateConnectionMethod(uint bearerType);
+
+    CmConnectionMethodShim* ConnectionMethod(uint connectionMethodId) const;
+    
+    void ConnectionMethod(
+        QList<uint> &cmArray,
+        bool legacyOnly) const;
+    
+    CmDestinationShim *Destination(uint destinationId) const;
+            
+    void AllDestinations(QList<uint> &destArray) const;
+    
+    QString GetUncategorizedIcon() const;
+    
+protected:
+
+private:
+
+    Q_DISABLE_COPY(CmManagerShimPrivate)
+
+    void ConnectionMethodL(
+        QList<uint> &cmArray,
+        bool legacyOnly) const;
+    
+    void AllDestinationsL(QList<uint> &destArray) const;
+    
+    void GetUncategorizedIconL(QString &icon) const;
+
+    void TraceIfError(TInt error) const;
+
+private: // data
+    
+    RCmManager iCmManager;  //!< Cm Manager instance
+
+    // Friend classes
+};
+
+#endif // CMMANAGER_SHIM_S60_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/rom/connection_settings_shim.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CONNECTION_SETTINGS_SHIM_IBY
+#define CONNECTION_SETTINGS_SHIM_IBY
+
+file=ABI_DIR\BUILD_DIR\connection_settings_shim.dll SHARED_LIB_DIR\connection_settings_shim.dll
+
+#endif // CONNECTION_SETTINGS_SHIM_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+// System includes
+
+#include <cmconnectionmethod.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+
+#include "cmconnectionmethod_shim_s60_p.h"
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+CmConnectionMethodShim::CmConnectionMethodShim(
+    RCmConnectionMethod &cm)
+{
+    d_ptr = new CmConnectionMethodShimPrivate(cm);
+}
+
+CmConnectionMethodShim::~CmConnectionMethodShim()
+{
+    delete d_ptr;
+}
+   
+uint CmConnectionMethodShim::getIntAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    return d_ptr->GetIntAttribute(attribute);
+}
+
+bool CmConnectionMethodShim::getBoolAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    return d_ptr->GetBoolAttribute(attribute);
+}
+
+QString CmConnectionMethodShim::getStringAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    return d_ptr->GetStringAttribute(attribute);
+}
+
+QString CmConnectionMethodShim::getString8Attribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    return d_ptr->GetString8Attribute(attribute);
+}
+
+void CmConnectionMethodShim::setIntAttribute(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    uint value)    
+{
+    d_ptr->SetIntAttribute(attribute, value); 
+}
+
+void CmConnectionMethodShim::setBoolAttribute(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    bool value)    
+{
+    d_ptr->SetBoolAttribute(attribute, value);
+}
+
+void CmConnectionMethodShim::setStringAttribute(
+    CMManagerShim::ConnectionMethodAttribute attribute, 
+    QString value)    
+{
+    d_ptr->SetStringAttribute(attribute, value);
+}
+
+void CmConnectionMethodShim::setString8Attribute(
+    CMManagerShim::ConnectionMethodAttribute attribute, 
+    QString value)    
+{
+    d_ptr->SetString8Attribute(attribute, value);
+}
+
+bool CmConnectionMethodShim::deleteConnectionMethod()
+{
+    return d_ptr->DeleteConnectionMethod();
+}
+    
+void CmConnectionMethodShim::update()
+{
+    d_ptr->Update();
+}
+
+QString CmConnectionMethodShim::getIcon() const
+{
+    return d_ptr->GetIcon();
+}
+
+void CmConnectionMethodShim::setIcon(
+    QString icon)    
+{
+    d_ptr->SetIcon(icon);
+}
+
+void CmConnectionMethodShim::refresh()
+{
+    d_ptr->Refresh();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim_s60.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Private implementation of Wrapper for CM Manager Symbian interface.
+ */
+
+// System includes
+
+#include <utf.h>
+
+// User includes
+
+#include "cmconnectionmethod_shim_s60_p.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmconnectionmethod_shim_s60Traces.h"
+#endif
+
+
+/*!
+    \class CmConnectionMethodShimPrivate
+    \brief Private implementation class for CM Manager Connection Method Shim.
+
+    Wrapper for CM Manager Symbian interface. Symbian leaves are converted to
+    standard C++ exceptions.
+    
+    Wrapper functions are identical to those in CmConnectionMethodShim class,
+    so refer to cmconnectionmethod_shim.h for descriptions. Private functions
+    in this class are just leaving versions of the same wrapper functions.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ *  Constructor.
+ *  
+ *  @param[in] cm CM Manager connection method object.
+ */
+
+CmConnectionMethodShimPrivate::CmConnectionMethodShimPrivate(
+    RCmConnectionMethod &cm) :
+    iCm(cm)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_CMCONNECTIONMETHODSHIMPRIVATE_ENTRY);
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_CMCONNECTIONMETHODSHIMPRIVATE_EXIT);
+}
+
+/*!
+ *  Destructor.
+ */
+
+CmConnectionMethodShimPrivate::~CmConnectionMethodShimPrivate()
+{
+    OstTraceFunctionEntry0(DUP1_CMCONNECTIONMETHODSHIMPRIVATE_CMCONNECTIONMETHODSHIMPRIVATE_ENTRY);
+    
+    iCm.Close();
+
+    OstTraceFunctionExit0(DUP1_CMCONNECTIONMETHODSHIMPRIVATE_CMCONNECTIONMETHODSHIMPRIVATE_EXIT);
+}
+   
+uint CmConnectionMethodShimPrivate::GetIntAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_GETINTATTRIBUTE_ENTRY);
+    
+    uint value = 0;
+    TRAPD(error, value = iCm.GetIntAttributeL(attribute));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_GETINTATTRIBUTE_EXIT);
+    return value;
+}
+
+bool CmConnectionMethodShimPrivate::GetBoolAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_GETBOOLATTRIBUTE_ENTRY);
+    
+    bool value = false;
+    TRAPD(error, value = iCm.GetBoolAttributeL(attribute));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_GETBOOLATTRIBUTE_EXIT);
+    return value;
+}
+
+QString CmConnectionMethodShimPrivate::GetStringAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_GETSTRINGATTRIBUTE_ENTRY);
+    
+    QString value;
+    TRAPD(error, GetStringAttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_GETSTRINGATTRIBUTE_EXIT);
+    return value;
+}
+
+QString CmConnectionMethodShimPrivate::GetString8Attribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute) const
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_GETSTRING8ATTRIBUTE_ENTRY);
+    
+    QString value;
+    TRAPD(error, GetString8AttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_GETSTRING8ATTRIBUTE_EXIT);
+    return value;
+}
+
+void CmConnectionMethodShimPrivate::SetIntAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    uint value)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_SETINTATTRIBUTE_ENTRY);
+    
+    TRAPD(error, SetIntAttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_SETINTATTRIBUTE_EXIT);
+}
+
+void CmConnectionMethodShimPrivate::SetBoolAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    bool value)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_SETBOOLATTRIBUTE_ENTRY);
+    
+    TRAPD(error, SetBoolAttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_SETBOOLATTRIBUTE_EXIT);
+}
+
+void CmConnectionMethodShimPrivate::SetStringAttribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString value)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_SETSTRINGATTRIBUTE_ENTRY);
+    
+    TRAPD(error, SetStringAttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_SETSTRINGATTRIBUTE_EXIT);
+}
+
+void CmConnectionMethodShimPrivate::SetString8Attribute( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString value)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_SETSTRING8ATTRIBUTE_ENTRY);
+    
+    TRAPD(error, SetString8AttributeL(attribute, value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_SETSTRING8ATTRIBUTE_EXIT);
+}
+
+bool CmConnectionMethodShimPrivate::DeleteConnectionMethod()
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_DELETECONNECTIONMETHOD_ENTRY);
+    
+    bool value = false;
+    TRAPD(error, value = iCm.DeleteL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_DELETECONNECTIONMETHOD_EXIT);
+    return value;
+}
+     
+void CmConnectionMethodShimPrivate::Update()
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_UPDATE_ENTRY);
+    
+    TRAPD(error, iCm.UpdateL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_UPDATE_EXIT);
+}
+
+QString CmConnectionMethodShimPrivate::GetIcon() const
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_GETICON_ENTRY);
+    
+    QString value;
+    TRAPD(error, GetIconL(value));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_GETICON_EXIT);
+    return value;
+}
+
+void CmConnectionMethodShimPrivate::SetIcon(
+    QString icon)
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_SETICON_ENTRY);
+    
+    TRAPD(error, SetIconL(icon));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_SETICON_EXIT);
+}
+
+void CmConnectionMethodShimPrivate::Refresh()
+{
+    OstTraceFunctionEntry0(CMCONNECTIONMETHODSHIMPRIVATE_REFRESH_ENTRY);
+    
+    TRAPD(error, iCm.RefreshL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMCONNECTIONMETHODSHIMPRIVATE_REFRESH_EXIT);
+}
+
+void CmConnectionMethodShimPrivate::GetStringAttributeL( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString &value) const
+{
+    HBufC* buf = iCm.GetStringAttributeL(attribute);
+    value = QString::fromUtf16(buf->Ptr(), buf->Length());
+    delete buf;
+}
+
+void CmConnectionMethodShimPrivate::GetString8AttributeL( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString &value) const
+{
+    HBufC8* buf = iCm.GetString8AttributeL(attribute);
+    value = QString::fromLatin1((const char*)buf->Ptr(), buf->Length());
+    delete buf;
+}
+
+void CmConnectionMethodShimPrivate::SetIntAttributeL( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    uint value)
+{
+    iCm.SetIntAttributeL(attribute, value);
+}
+
+void CmConnectionMethodShimPrivate::SetBoolAttributeL( 
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    bool value)
+{
+    iCm.SetBoolAttributeL(attribute, value);
+}
+
+void CmConnectionMethodShimPrivate::SetStringAttributeL(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString value)
+{
+    TPtrC16 valuePtr(reinterpret_cast<const TUint16*>(value.utf16()));
+    iCm.SetStringAttributeL(attribute, valuePtr);
+}
+
+void CmConnectionMethodShimPrivate::SetString8AttributeL(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QString value)
+{
+    QByteArray tempValue = value.toLatin1();
+    TPtrC8 valuePtr(reinterpret_cast<const unsigned char*>(tempValue.data()));
+    iCm.SetString8AttributeL(attribute, valuePtr);
+}
+
+void CmConnectionMethodShimPrivate::GetIconL( 
+    QString &value) const
+{
+    HBufC* buf = iCm.GetIconL();
+    value = QString::fromUtf16(buf->Ptr(), buf->Length());
+    delete buf;
+}
+
+void CmConnectionMethodShimPrivate::SetIconL(
+    QString icon)
+{
+    TPtrC16 valuePtr(reinterpret_cast<const TUint16*>(icon.utf16()));
+    iCm.SetIconL(valuePtr);
+}
+
+/*!
+ * Traces given error code if it is not KErrNone. 
+ * 
+ * @param[in] error Symbian error code.
+ */
+
+void CmConnectionMethodShimPrivate::TraceIfError(TInt error) const
+{
+    if (error != KErrNone) {
+        OstTrace1(
+            TRACE_WARNING,
+            CMCONNECTIONMETHODSHIMPRIVATE_TRACEIFERROR,
+            "CmConnectionMethodShimPrivate::TraceIfError;Error code=%d",
+            error);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmdestination_shim.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+// System includes
+
+#include <cmdestination.h>
+#include <cmconnectionmethod.h>
+#include <cmdestination_shim.h>
+
+// User includes
+
+#include "cmdestination_shim_s60_p.h"
+#include "cmconnectionmethod_shim_s60_p.h"
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+CmDestinationShim::CmDestinationShim(RCmDestination &destination)
+{
+    d_ptr = new CmDestinationShimPrivate(destination);
+}
+
+CmDestinationShim::~CmDestinationShim()
+{
+    delete d_ptr;
+}
+                 
+int CmDestinationShim::connectionMethodCount() const
+{
+    return d_ptr->ConnectionMethodCount();
+}
+                
+CmConnectionMethodShim *CmDestinationShim::connectionMethod(int index) const
+{
+    return d_ptr->ConnectionMethod(index);
+}
+           
+CmConnectionMethodShim *CmDestinationShim::connectionMethodByID(
+    uint cmId) const
+{    
+    return d_ptr->ConnectionMethodByID(cmId);
+}
+
+uint CmDestinationShim::priority(CmConnectionMethodShim *cmItem) const
+{
+    return d_ptr->Priority(cmItem);
+}
+               
+QString CmDestinationShim::name() const
+{    
+    return d_ptr->Name();
+}
+                             
+uint CmDestinationShim::id() const
+{
+    return d_ptr->Id();
+}
+
+uint CmDestinationShim::metadata(
+    CMManagerShim::SnapMetadataField metadataField) const
+{
+    return d_ptr->Metadata(metadataField);
+}
+
+CMManagerShim::CmmProtectionLevel CmDestinationShim::protectionLevel() const
+{
+    return d_ptr->ProtectionLevel();
+}
+           
+bool CmDestinationShim::isHidden() const
+{
+    return d_ptr->IsHidden();
+}
+           
+int CmDestinationShim::addConnectionMethod(CmConnectionMethodShim *cm)
+{
+    return d_ptr->AddConnectionMethod(cm);
+}
+
+void CmDestinationShim::deleteConnectionMethod(CmConnectionMethodShim *cm)
+{
+    d_ptr->DeleteConnectionMethod(cm);
+}
+       
+void CmDestinationShim::removeConnectionMethod(CmConnectionMethodShim *cm)
+{
+    d_ptr->RemoveConnectionMethod(cm);
+}
+             
+void CmDestinationShim::modifyPriority(CmConnectionMethodShim *cm, int index)
+{
+    d_ptr->ModifyPriority(cm, index);
+}
+           
+void CmDestinationShim::setName(QString name)
+{
+    d_ptr->SetName(name);
+}
+              
+void CmDestinationShim::update()
+{
+    d_ptr->Update();
+}
+
+void CmDestinationShim::refresh()
+{
+    d_ptr->Refresh();
+}
+
+void CmDestinationShim::deleteDestination()
+{
+    d_ptr->DeleteDestination();
+}
+
+QString CmDestinationShim::getIcon() const
+{    
+    return d_ptr->GetIcon();
+}
+
+void CmDestinationShim::setIcon(QString icon)
+{    
+    d_ptr->SetIcon(icon);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,441 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Private implementation of Wrapper for CM Manager Symbian interface.
+*/
+
+// System includes
+
+#include <cmdestination.h>
+#include <cmmanager.h>
+#include <cmconnectionmethod.h>
+#include <cmdestination_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+
+#include "cmdestination_shim_s60_p.h"
+#include "cmconnectionmethod_shim_s60_p.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmdestination_shim_s60Traces.h"
+#endif
+
+/*!
+    \class CmDestinationShimPrivate
+    \brief Private implementation class for CM Manager Destination Shim.
+
+    Wrapper for CM Manager Symbian interface. Symbian leaves are converted to
+    standard C++ exceptions.
+    
+    Wrapper functions are identical to those in CmDestinationShim class, so
+    refer to cmdestination_shim.h for descriptions. Private functions in this
+    class are just leaving versions of the same wrapper functions.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ *  Constructor.
+ *  
+ *  @param[in] destination CM Manager destination object.
+ */
+
+CmDestinationShimPrivate::CmDestinationShimPrivate(
+    RCmDestination &destination) :
+    iDestination(destination)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_CMDESTINATIONSHIMPRIVATE_ENTRY);
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_CMDESTINATIONSHIMPRIVATE_EXIT);
+}
+
+/*!
+ *  Destructor.
+ */
+
+CmDestinationShimPrivate::~CmDestinationShimPrivate()
+{
+    OstTraceFunctionEntry0(DUP1_CMDESTINATIONSHIMPRIVATE_CMDESTINATIONSHIMPRIVATE_ENTRY);
+    
+    iDestination.Close();
+
+    OstTraceFunctionExit0(DUP1_CMDESTINATIONSHIMPRIVATE_CMDESTINATIONSHIMPRIVATE_EXIT);
+}
+                 
+int CmDestinationShimPrivate::ConnectionMethodCount() const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHODCOUNT_ENTRY);
+    
+    int count = iDestination.ConnectionMethodCount();
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHODCOUNT_EXIT);
+    return count;
+}
+
+CmConnectionMethodShim *CmDestinationShimPrivate::ConnectionMethod(
+    int index) const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHOD_ENTRY);
+    
+    RCmConnectionMethod cm;
+    TRAPD(error, cm = iDestination.ConnectionMethodL(index));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHOD_EXIT);
+    return new CmConnectionMethodShim(cm);
+}
+
+CmConnectionMethodShim *CmDestinationShimPrivate::ConnectionMethodByID(
+    uint cmId) const
+{    
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHODBYID_ENTRY);
+    
+    RCmConnectionMethod cm;
+    TRAPD(error, cm = iDestination.ConnectionMethodByIDL(cmId));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_CONNECTIONMETHODBYID_EXIT);
+    return new CmConnectionMethodShim(cm);
+}
+
+uint CmDestinationShimPrivate::Priority(CmConnectionMethodShim *cmItem) const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_PRIORITY_ENTRY);
+    
+    uint priority;
+    TRAPD(error, PriorityL(cmItem, priority));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_PRIORITY_EXIT);
+    return priority;
+}
+
+QString CmDestinationShimPrivate::Name() const
+{    
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_NAME_ENTRY);
+    
+    QString name;
+    TRAPD(error, NameL(name));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_NAME_EXIT);
+    return name;
+}
+
+uint CmDestinationShimPrivate::Id() const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_ID_ENTRY);
+    
+    uint id = iDestination.Id();
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_ID_EXIT);
+    return id;
+}
+
+uint CmDestinationShimPrivate::Metadata(
+    CMManagerShim::SnapMetadataField metadataField) const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_METADATA_ENTRY);
+    
+    uint metadata = 0;
+    TRAPD(
+        error,
+        metadata = iDestination.MetadataL((CMManager::TSnapMetadataField)metadataField));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_METADATA_EXIT);
+    return metadata;
+}
+
+CMManagerShim::CmmProtectionLevel CmDestinationShimPrivate::ProtectionLevel() const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_PROTECTIONLEVEL_ENTRY);
+    
+    CMManager::TProtectionLevel protectionlvl = CMManager::EProtLevel3;
+    TRAPD(error, protectionlvl = iDestination.ProtectionLevel());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_PROTECTIONLEVEL_EXIT);
+    return mapCmmProtectionLevel(protectionlvl);
+}
+
+bool CmDestinationShimPrivate::IsHidden() const
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_ISHIDDEN_ENTRY);
+    
+    bool hidden = iDestination.IsHidden(); 
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_ISHIDDEN_EXIT);
+    return hidden;
+}
+
+int CmDestinationShimPrivate::AddConnectionMethod(
+    CmConnectionMethodShim *cm)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_ADDCONNECTIONMETHOD_ENTRY);
+    
+    int index;
+    TRAPD(error, AddConnectionMethodL(cm, index));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_ADDCONNECTIONMETHOD_EXIT);
+    return index;
+}
+
+void CmDestinationShimPrivate::DeleteConnectionMethod(
+    CmConnectionMethodShim *cm)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_DELETECONNECTIONMETHOD_ENTRY);
+    
+    TRAPD(error, DeleteConnectionMethodL(cm));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_DELETECONNECTIONMETHOD_EXIT);
+}
+
+void CmDestinationShimPrivate::RemoveConnectionMethod(
+    CmConnectionMethodShim *cm)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_REMOVECONNECTIONMETHOD_ENTRY);
+    
+    TRAPD(error, RemoveConnectionMethodL(cm));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_REMOVECONNECTIONMETHOD_EXIT);
+}
+
+void CmDestinationShimPrivate::ModifyPriority(
+    CmConnectionMethodShim *cm,
+    int index)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_MODIFYPRIORITY_ENTRY);
+    
+    TRAPD(error, ModifyPriorityL(cm, index));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_MODIFYPRIORITY_EXIT);
+}
+
+void CmDestinationShimPrivate::SetName(QString name)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_SETNAME_ENTRY);
+    
+    TRAPD(error, SetNameL(name));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_SETNAME_EXIT);
+}
+
+void CmDestinationShimPrivate::Update()
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_UPDATE_ENTRY);
+    
+    TRAPD(error, iDestination.UpdateL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_UPDATE_EXIT);
+}
+
+void CmDestinationShimPrivate::Refresh()
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_REFRESH_ENTRY);
+    
+    TRAPD(error, iDestination.RefreshL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_REFRESH_EXIT);
+}
+
+void CmDestinationShimPrivate::DeleteDestination()
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_DELETEDESTINATION_ENTRY);
+    
+    TRAPD(error, iDestination.DeleteLD());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_DELETEDESTINATION_EXIT);
+}
+
+QString CmDestinationShimPrivate::GetIcon() const
+{    
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_GETICON_ENTRY);
+    
+    QString icon;
+    TRAPD(error, GetIconL(icon));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_GETICON_EXIT);
+    return icon;
+}
+
+void CmDestinationShimPrivate::SetIcon(QString icon)
+{
+    OstTraceFunctionEntry0(CMDESTINATIONSHIMPRIVATE_SETICON_ENTRY);
+    
+    TRAPD(error, SetIconL(icon));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMDESTINATIONSHIMPRIVATE_SETICON_EXIT);
+}
+
+void CmDestinationShimPrivate::PriorityL(
+    CmConnectionMethodShim *cmShim,
+    uint &priority) const
+{
+    RCmConnectionMethod cm;
+    cm = iDestination.ConnectionMethodByIDL(
+        cmShim->getIntAttribute(CMManagerShim::CmId));
+    priority = iDestination.PriorityL(cm);
+}
+    
+void CmDestinationShimPrivate::NameL(QString &name) const
+{
+    HBufC* iapName;
+    iapName = iDestination.NameLC();
+    name = QString::fromUtf16(iapName->Ptr(), iapName->Length());
+    CleanupStack::PopAndDestroy(); // iapName
+}
+           
+void CmDestinationShimPrivate::AddConnectionMethodL(
+    CmConnectionMethodShim *cmShim,
+    int &index)
+{
+    index = iDestination.AddConnectionMethodL(cmShim->d_ptr->iCm);
+}
+       
+void CmDestinationShimPrivate::DeleteConnectionMethodL(
+    CmConnectionMethodShim *cmShim)
+{
+    RCmConnectionMethod cm;
+    cm = iDestination.ConnectionMethodByIDL(
+        cmShim->getIntAttribute(CMManagerShim::CmId));
+    iDestination.DeleteConnectionMethodL(cm);
+}
+       
+void CmDestinationShimPrivate::RemoveConnectionMethodL(
+    CmConnectionMethodShim *cmShim)
+{
+    RCmConnectionMethod cm;
+    cm = iDestination.ConnectionMethodByIDL(
+        cmShim->getIntAttribute(CMManagerShim::CmId));
+    iDestination.RemoveConnectionMethodL(cm);
+}
+             
+void CmDestinationShimPrivate::ModifyPriorityL(
+    CmConnectionMethodShim *cmShim,
+    int index)
+{
+    RCmConnectionMethod cm;
+    cm = iDestination.ConnectionMethodByIDL(
+        cmShim->getIntAttribute(CMManagerShim::CmId));
+    iDestination.ModifyPriorityL(cm, index);
+}
+           
+void CmDestinationShimPrivate::SetNameL(QString name)
+{
+    TPtrC16 namePtr(reinterpret_cast<const TUint16*>(name.utf16()));
+    iDestination.SetNameL(namePtr);
+}
+
+void CmDestinationShimPrivate::GetIconL(QString &icon) const
+{
+    HBufC* iapName = iDestination.GetIconL();
+    icon = QString::fromUtf16(iapName->Ptr(), iapName->Length());
+    delete iapName;
+}
+
+void CmDestinationShimPrivate::SetIconL(QString icon)
+{
+    TPtrC16 iconPtr(reinterpret_cast<const TUint16*>(icon.utf16()));
+    iDestination.SetIconL(iconPtr);
+}
+
+/*!
+ * Maps CM Manager protection levels to those defined by the shim.
+ * 
+ * @param[in] protectionlvl CM Manager protection level.
+ * @return CM Manager Shim protection level.
+ */
+
+CMManagerShim::CmmProtectionLevel CmDestinationShimPrivate::mapCmmProtectionLevel( 
+    CMManager::TProtectionLevel protectionlvl) const
+{
+    CMManagerShim::CmmProtectionLevel retval = CMManagerShim::ProtLevel3;
+    
+    switch (protectionlvl) {
+    case CMManager::EProtLevel0:
+        retval = CMManagerShim::ProtLevel0;
+        break;
+        
+    case CMManager::EProtLevel1:
+        retval = CMManagerShim::ProtLevel1;
+        break;
+        
+    case CMManager::EProtLevel2:
+        retval = CMManagerShim::ProtLevel2;
+        break;
+        
+    case CMManager::EProtLevel3:
+        retval = CMManagerShim::ProtLevel3;
+        break;
+
+#ifndef QT_NO_DEBUG
+    default:
+        Q_ASSERT( 0 );
+        break;
+#endif            
+    }
+    
+    return retval;
+}
+
+/*!
+ * Traces given error code if it is not KErrNone. 
+ * 
+ * @param[in] error Symbian error code.
+ */
+
+void CmDestinationShimPrivate::TraceIfError(TInt error) const
+{
+    if (error != KErrNone) {
+        OstTrace1(
+            TRACE_WARNING,
+            CMDESTINATIONSHIMPRIVATE_TRACEIFERROR,
+            "CmDestinationShimPrivate::TraceIfError;Error code=%d",
+            error);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmmanager_shim.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+// System includes
+
+#include <e32base.h>
+#include <cmdestination.h>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <cmdestination_shim.h>
+
+// User includes
+
+#include "cmmanager_shim_s60_p.h"
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+CmManagerShim::CmManagerShim()
+{
+    d_ptr = new CmManagerShimPrivate();
+}
+
+CmManagerShim::~CmManagerShim()
+{
+    delete d_ptr;
+}
+
+CmDestinationShim *CmManagerShim::createDestination(QString name)
+{
+    return d_ptr->CreateDestination(name);
+}
+    
+CmConnectionMethodShim *CmManagerShim::createConnectionMethod(uint bearerType)
+{
+    return d_ptr->CreateConnectionMethod(bearerType);
+}
+    
+CmConnectionMethodShim *CmManagerShim::connectionMethod(
+    uint connectionMethodId) const
+{
+    return d_ptr->ConnectionMethod(connectionMethodId);
+}
+    
+void CmManagerShim::connectionMethod(
+    QList<uint> &cmArray,
+    bool legacyOnly) const
+{
+    return d_ptr->ConnectionMethod(
+        cmArray,
+        legacyOnly);
+}
+
+CmDestinationShim *CmManagerShim::destination(uint destinationId) const
+{
+    return d_ptr->Destination(destinationId);
+}
+            
+void CmManagerShim::allDestinations(QList<uint> &destArray) const
+{
+    return d_ptr->AllDestinations(destArray);
+}
+
+QString CmManagerShim::getUncategorizedIcon() const
+{    
+    return d_ptr->GetUncategorizedIcon();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/src/cmmanager_shim_s60.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Private implementation of Wrapper for CM Manager Symbian interface.
+ */
+
+// System includes
+
+#include <QList>
+#include <e32base.h>
+#include <cmdestination.h>
+#include <cmdestination_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+
+#include "cmmanager_shim_s60_p.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmanager_shim_s60Traces.h"
+#endif
+
+
+/*!
+    \class CmManagerShimPrivate
+    \brief Private implementation class for CM Manager Shim.
+
+    Wrapper for CM Manager Symbian interface. Symbian leaves are converted to
+    standard C++ exceptions.
+    
+    Wrapper functions are identical to those in CmManagerShim class, so
+    refer to cmdestination_shim.h for descriptions. Private functions in this
+    class are just leaving versions of the same wrapper functions.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ *   Constructor.
+ */
+
+CmManagerShimPrivate::CmManagerShimPrivate()
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_CMMANAGERSHIMPRIVATE_ENTRY);
+    
+    TRAPD(error, iCmManager.OpenL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_CMMANAGERSHIMPRIVATE_EXIT);
+}
+
+/*!
+ *   Destructor.
+ */
+
+CmManagerShimPrivate::~CmManagerShimPrivate()
+{
+    OstTraceFunctionEntry0(DUP1_CMMANAGERSHIMPRIVATE_CMMANAGERSHIMPRIVATE_ENTRY);
+    
+    iCmManager.Close();
+    
+    OstTraceFunctionExit0(DUP1_CMMANAGERSHIMPRIVATE_CMMANAGERSHIMPRIVATE_EXIT);
+}
+
+CmDestinationShim *CmManagerShimPrivate::CreateDestination(QString name)
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_CREATEDESTINATION_ENTRY);
+    
+    RCmDestination dest;
+    TRAPD(
+        error,
+        TPtrC16 namePtr(reinterpret_cast<const TUint16*>(name.utf16()));
+        dest = iCmManager.CreateDestinationL(namePtr);
+        dest.UpdateL());
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_CREATEDESTINATION_EXIT);
+    return new CmDestinationShim(dest);
+}
+    
+CmConnectionMethodShim *CmManagerShimPrivate::CreateConnectionMethod(
+    uint bearerType)
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_CREATECONNECTIONMETHOD_ENTRY);
+    
+    RCmConnectionMethod connectionMethod;
+    TRAPD(error, connectionMethod = iCmManager.CreateConnectionMethodL(bearerType));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_CREATECONNECTIONMETHOD_EXIT);
+    return new CmConnectionMethodShim(connectionMethod);
+}
+
+CmConnectionMethodShim *CmManagerShimPrivate::ConnectionMethod(
+    uint connectionMethodId) const
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_CONNECTIONMETHOD_ENTRY);
+    
+    RCmConnectionMethod connectionMethod;
+    TRAPD(error, connectionMethod = iCmManager.ConnectionMethodL(connectionMethodId));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_CONNECTIONMETHOD_EXIT);
+    return new CmConnectionMethodShim(connectionMethod);
+}
+    
+void CmManagerShimPrivate::ConnectionMethod(
+    QList<uint> &cmArray,
+    bool legacyOnly) const
+{
+    OstTraceFunctionEntry0(DUP1_CMMANAGERSHIMPRIVATE_CONNECTIONMETHOD_ENTRY);
+    
+    TRAPD(error, ConnectionMethodL(cmArray, legacyOnly));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(DUP1_CMMANAGERSHIMPRIVATE_CONNECTIONMETHOD_EXIT);
+}
+    
+CmDestinationShim *CmManagerShimPrivate::Destination(
+    uint destinationId) const
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_DESTINATION_ENTRY);
+    
+    RCmDestination dest;
+    TRAPD(error, dest = iCmManager.DestinationL(destinationId));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_DESTINATION_EXIT);
+    return new CmDestinationShim(dest);
+}
+            
+void CmManagerShimPrivate::AllDestinations(QList<uint> &destArray) const
+{
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_ALLDESTINATIONS_ENTRY);
+    
+    TRAPD(error, AllDestinationsL(destArray));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_ALLDESTINATIONS_EXIT);
+}
+
+QString CmManagerShimPrivate::GetUncategorizedIcon() const
+{    
+    OstTraceFunctionEntry0(CMMANAGERSHIMPRIVATE_GETUNCATEGORIZEDICON_ENTRY);
+    
+    QString icon;
+    TRAPD(error, GetUncategorizedIconL(icon));
+    TraceIfError(error);
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(CMMANAGERSHIMPRIVATE_GETUNCATEGORIZEDICON_EXIT);
+    return icon;
+}
+
+void CmManagerShimPrivate::ConnectionMethodL(
+    QList<uint> &cmArray,
+    bool legacyOnly) const
+{
+    RArray<TUint32> array;
+    iCmManager.ConnectionMethodL(
+        array,
+        true, // Check bearer type
+        legacyOnly,
+        false); // No Easy WLAN
+    for (TInt i = 0; i < array.Count(); i++) {
+        cmArray.append(array[i]);
+    }
+    // Free memory
+    array.Reset();
+}
+    
+void CmManagerShimPrivate::AllDestinationsL(QList<uint> &destArray) const
+{
+    destArray.clear();
+    RArray<TUint32> destinationIdArray;
+
+    destinationIdArray.Reset();
+    iCmManager.AllDestinationsL(destinationIdArray);
+
+    for (TInt i = 0; i < destinationIdArray.Count(); i++) {
+        destArray.append(destinationIdArray[i]);
+    }
+    // Free memory
+    destinationIdArray.Reset();
+}
+
+void CmManagerShimPrivate::GetUncategorizedIconL(QString &icon) const
+{
+    HBufC* iconName = iCmManager.GetUncategorizedIconL();
+    icon = QString::fromUtf16(iconName->Ptr(), iconName->Length());
+    delete iconName;
+}
+
+/*!
+ * Traces given error code if it is not KErrNone. 
+ * 
+ * @param[in] error Symbian error code.
+ */
+
+void CmManagerShimPrivate::TraceIfError(TInt error) const
+{
+    if (error != KErrNone) {
+        OstTrace1(
+            TRACE_WARNING,
+            CMMANAGERSHIMPRIVATE_TRACEIFERROR,
+            "CmManagerShimPrivate::TraceIfError;Error code=%d",
+            error);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * OST trace definition header.
+ */
+
+#ifndef OSTTRACEDEFINITIONS_H
+#define OSTTRACEDEFINITIONS_H
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1163 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Application Settings UI unit testing.
+*/
+
+#include <QList>
+#include <QString>
+
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbLabel>
+
+#include <QtTest/QtTest>
+
+#include "cmdestination_shim.h"
+#include "cmconnectionmethod_shim.h"
+
+#include "testcmmgrshim.h"
+
+// -----------------------------------------------------------------------------
+// STATIC TEST DATA
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// TEST MACROES
+// -----------------------------------------------------------------------------
+
+// Test macro for verifying an exception throwing code block
+#define TEST_CATCH_AND_VERIFY(code, error) \
+    { \
+    int error_code; \
+    QT_TRYCATCH_ERROR(error_code, code); \
+    QCOMPARE(error_code, error); \
+    }
+
+// -----------------------------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// -----------------------------------------------------------------------------
+
+/**
+ * Test main function. Runs all test cases.
+ */
+int main(int argc, char *argv[])
+{
+    Q_UNUSED(argc);
+    
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\data\\TestCmMgrShim.txt";
+ 
+    TestCmMgrShim tc;
+    int res = QTest::qExec(&tc, 3, pass);
+ 
+    return res;
+}
+
+/**
+ * This function is be called before the first test case is executed.
+ */
+void TestCmMgrShim::initTestCase()
+{
+}
+
+/**
+ * This function is be called after the last test case was executed.
+ */
+void TestCmMgrShim::cleanupTestCase()
+{
+}
+
+/**
+ * This function is be called before each test case is executed.
+ */
+void TestCmMgrShim::init()
+{
+    // Initialize the CmManagerShim object
+    mCmManagerShim = new CmManagerShim;
+}
+
+/**
+ * This function is be called after each test case is executed.
+ */
+void TestCmMgrShim::cleanup()
+{
+    // There should be no destinations
+    QList<uint> destinations;
+    mCmManagerShim->allDestinations(destinations);
+    int destinationCount = destinations.count(); 
+    
+    // Delete the destinations if there were any
+    deleteDestinations();
+
+    // There should be no connection methods
+    QList<uint> connMethods;
+    mCmManagerShim->connectionMethod(connMethods, false);
+    int connMethodCount = connMethods.count(); 
+    
+    // Delete the connection methods if there were any
+    deleteConnectionMethods();
+
+    // Validate after the deletions are done
+    QCOMPARE(destinationCount, 0);
+    QCOMPARE(connMethodCount, 0);
+
+    delete mCmManagerShim;
+}
+
+// -----------------------------------------------------------------------------
+// TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Test case for testing initial state.
+ * -Reads AND DELETES all destinations and connection methods.
+ * -Verifies that there are no destinations and connection methods.
+ */
+void TestCmMgrShim::tcResetSettings()
+{
+    // Read all destinations
+    QList<uint> destinations;
+    mCmManagerShim->allDestinations(destinations);
+    
+    // Delete the destinations
+    for (int i=0; i < destinations.count(); i++) {
+        CmDestinationShim *dest = mCmManagerShim->destination(destinations[i]);
+        dest->deleteDestination();
+        
+        // Update should leave
+        TEST_CATCH_AND_VERIFY(
+            dest->update(),
+            KErrBadHandle);
+        
+        delete dest;
+    }
+    
+    // Check that there no longer are any destinations
+    mCmManagerShim->allDestinations(destinations);
+    QCOMPARE(destinations.count(), 0);
+    
+    // Read all connection methods
+    QList<uint> connMethods;
+    mCmManagerShim->connectionMethod(connMethods, false);
+    
+    // Remove possible uncategorized connection methods
+    for (int i=0; i < connMethods.count(); i++){
+        CmConnectionMethodShim *cm = 
+            mCmManagerShim->connectionMethod(connMethods[i]);
+        QVERIFY(cm != NULL);
+        bool ok = cm->deleteConnectionMethod();
+        QVERIFY(ok == true);
+        cm->update();
+        delete cm;
+    }
+    
+    // Check that tere is no longer any connection methods
+    mCmManagerShim->connectionMethod(connMethods, false);
+    QCOMPARE(connMethods.count(), 0);
+    
+    // Try reading a Connection Method with an erroneous ID
+    TEST_CATCH_AND_VERIFY(
+        mCmManagerShim->connectionMethod(0),
+        KErrArgument);
+    
+    // Try reading a non-existent Connection Method
+    TEST_CATCH_AND_VERIFY(
+        mCmManagerShim->connectionMethod(1),
+        KErrNotFound);
+}
+
+/**
+ * Test case for testing basic legacy WLAN connection method handling.
+ * -Creates a legacy WLAN connection method (i.e. does not belong to
+ *  any destination).
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcLegacyConnMethodWlan()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Check bearer type
+    int bearer = cm->getIntAttribute(CMManagerShim::CmBearerType);
+    QCOMPARE(bearer, (int)CMManagerShim::BearerTypeWlan);
+    
+    // Check ID
+    int id = cm->getIntAttribute(CMManagerShim::CmId);
+    QCOMPARE(id, 1);
+    
+    // Delete the connection method reference
+    delete cm;
+    
+    // Refetch the connection method
+    cm = mCmManagerShim->connectionMethod(id);
+    QVERIFY(cm != NULL);
+    
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    
+    // Check that double deletion throws an exception
+    TEST_CATCH_AND_VERIFY(
+        cm->deleteConnectionMethod(),
+        KErrBadHandle);
+    
+    delete cm;
+}
+
+/**
+ * Test case for testing basic legacy GPRS connection method handling.
+ * -Creates a legacy GPRS connection method (i.e. does not belong to
+ *  any destination).
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcLegacyConnMethodGprs()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypePacketData);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Check ID
+    int id = cm->getIntAttribute(CMManagerShim::CmId);
+    QCOMPARE(id, 1);
+    
+    // Check bearer type
+    int bearer = cm->getIntAttribute(CMManagerShim::CmBearerType);
+    QCOMPARE(bearer, (int)CMManagerShim::BearerTypePacketData);
+    
+    // Delete the connection method reference
+    delete cm;
+    
+    // Refetch the connection method
+    cm = mCmManagerShim->connectionMethod(id);
+    QVERIFY(cm != NULL);
+    
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Basic error case testing for CmManagerShim.
+ * All test call should throw an exception since they are invalid.
+ */
+void TestCmMgrShim::tcCmManagerBasicFails()
+{
+    // Try creating a destination with an invalid name
+    CmDestinationShim *dest = 0;
+    TEST_CATCH_AND_VERIFY(
+        dest = mCmManagerShim->createDestination(QString("")),
+        KErrArgument);
+    QVERIFY(dest == NULL);
+    
+    // Try creating a connection method with an invalid bearer type
+    CmConnectionMethodShim *cm = 0;
+    TEST_CATCH_AND_VERIFY(
+        cm = mCmManagerShim->createConnectionMethod(0),
+        KErrArgument);
+    QVERIFY(cm == NULL);
+    
+    // Try fetching a connection method with an invalid ID
+    cm = 0;
+    TEST_CATCH_AND_VERIFY(
+        cm = mCmManagerShim->connectionMethod(42),
+        KErrNotFound);
+    QVERIFY(cm == NULL);
+    
+    // Try fetching a destination with an invalid ID
+    dest = 0;
+    TEST_CATCH_AND_VERIFY(
+        dest = mCmManagerShim->destination(42),
+        KErrArgument);
+    QVERIFY(dest == NULL);
+}
+
+/**
+ * Test case for testing basic destination handling
+ * -Create a destination
+ * -Validate the default destination content
+ * -Delete the destination
+ */
+void TestCmMgrShim::tcBasicDestination()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    
+    // Update to CommsDat
+    dest->update();
+    
+    // Check the name
+    QString name(dest->name());
+    QCOMPARE(name, QString("TestDestination"));
+
+    // Check ID
+    uint destinationId = dest->id();
+    QVERIFY(destinationId >= 4000);
+    
+    // Check protection level default value
+    CMManagerShim::CmmProtectionLevel prot = dest->protectionLevel();
+    QCOMPARE(prot, CMManagerShim::ProtLevel0);
+    
+    // Check hidden flag default value
+    bool isHidden = dest->isHidden(); 
+    QCOMPARE(isHidden, false);
+    
+    // Check destination content
+    int connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Delete the destination
+    dest->deleteDestination();
+
+    // Check that double deletion throws an exception
+    TEST_CATCH_AND_VERIFY(
+        dest->deleteDestination(),
+        KErrBadHandle);
+
+    delete dest;
+}
+
+/**
+ * Test case for testing basic modifications for a destination.
+ * -Create a destination
+ * -Add a GPRS connection method to it.
+ * -Add a WLAN connection method to it.
+ * -Delete the GPRS connection method.
+ * -Delete the Destination (and thus also the WLAN connection method).
+ */
+void TestCmMgrShim::tcDestinationModify()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    uint destId = dest->id();
+    QVERIFY(destId >= 4000);
+    
+    // Check destination initial content
+    int connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Create a GPRS connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypePacketData);
+    QVERIFY(cm != NULL);
+
+    // Update to CommsDat
+    cm->update();
+    
+    // Add the connection method to the destination
+    int index = dest->addConnectionMethod(cm);
+    QCOMPARE(index, 0);
+
+    // Update to CommsDat
+    dest->update();
+    
+    // Create a WLAN connection method
+    CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cmWlan != NULL);
+
+    // Update to CommsDat
+    cmWlan->update();
+
+    // Add the connection method to the destination
+    index = dest->addConnectionMethod(cmWlan);
+    QCOMPARE(index, 0);
+
+    // Update to CommsDat
+    dest->update();
+    
+    // Delete the WLAN connection method reference
+    delete cmWlan;
+    cmWlan = 0;
+    
+    // Delete the GPRS connection method
+    dest->deleteConnectionMethod(cm);
+    delete cm;
+    cm = 0;
+    
+    // Update to CommsDat
+    dest->update();
+    
+    // Verify the delete
+    connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 1);
+    
+    // Delete the whole destination including the remaining WLAN conn method.
+    dest->deleteDestination();
+    delete dest;
+    
+    // Check that the destination is gone
+    dest = NULL;
+    TEST_CATCH_AND_VERIFY(
+        dest = mCmManagerShim->destination(destId),
+        KErrNotFound);
+    QCOMPARE(dest, (CmDestinationShim *)0);
+}
+
+/**
+ * Test case for adding and reading boolean attribute for a connection method.
+ * -Creates a legacy WLAN connection method (i.e. does not belong to
+ *  any destination).
+ * -Sets a boolean attribute.
+ * -Gets the boolean attribute.
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcConnMethodSetBoolAttribute()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Set bool attribute value
+    cm->setBoolAttribute(CMManagerShim::CmProxyUsageEnabled, true);
+        
+    // Update to CommsDat
+    cm->update();
+     
+    // Get bool attribute value
+    bool testBool = false;
+    testBool = cm->getBoolAttribute(CMManagerShim::CmProxyUsageEnabled);
+    QCOMPARE(testBool, true);
+        
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for adding and reading integer attribute for a connection method.
+ * -Creates a legacy WLAN connection method (i.e. does not belong to
+ *  any destination).
+ * -Sets an int attribute.
+ * -Gets the int attribute.
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcConnMethodSetIntAttribute()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Set int attribute value
+    uint testInt = 99;
+    cm->setIntAttribute(CMManagerShim::CmProxyPortNumber, testInt);
+    
+    // Update to CommsDat
+    cm->update();
+     
+    // Get int attribute value
+    uint resultInt = cm->getIntAttribute(CMManagerShim::CmProxyPortNumber);
+    QCOMPARE(resultInt, testInt);    
+    
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for adding and reading string attributes for a connection method.
+ * -Creates a legacy WLAN connection method (i.e. does not belong to
+ *  any destination).
+ * -Sets a string attribute.
+ * -Gets the string attribute.
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcConnMethodSetStringAttribute()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+
+    // Set string attribute value
+    QString testString("TestProxyServerName");
+    cm->setStringAttribute(CMManagerShim::CmProxyServerName, testString);
+
+    // Set string8 attribute value
+    QString testString2("key12");
+    cm->setString8Attribute(CMManagerShim::WlanWepKey1InAscii, testString2);
+    
+    // Update to CommsDat
+    cm->update();
+     
+    // Check string attribute value
+    QString resultString = cm->getStringAttribute(CMManagerShim::CmProxyServerName);
+    QCOMPARE(resultString, testString);
+
+    // Check string8 attribute value
+    resultString = cm->getString8Attribute(CMManagerShim::WlanWepKey1InAscii);
+    QCOMPARE(resultString, testString2);
+
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for testing attribute reads using a wrong attribute type.
+ * All test reads in this case should fail to an exception.
+ */
+void TestCmMgrShim::tcConnMethodWrongTypeAttributeRead()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+
+    // Try reading name erroneously as an int attribute
+    uint intResult = 0;
+    TEST_CATCH_AND_VERIFY(
+        intResult = cm->getIntAttribute(CMManagerShim::CmName),
+        KErrNotSupported);
+    QCOMPARE(intResult, (uint)0);
+    
+    // Try reading name erroneously as a bool attribute
+    bool boolResult = false;
+    TEST_CATCH_AND_VERIFY(
+        boolResult = cm->getBoolAttribute(CMManagerShim::CmName),
+        KErrNotSupported);
+    QCOMPARE(boolResult, false);
+    
+    // Try reading ID erroneously as a string attribute
+    QString stringResult;
+    TEST_CATCH_AND_VERIFY(
+        stringResult = cm->getStringAttribute(CMManagerShim::CmId),
+        KErrNotSupported);
+    QCOMPARE(stringResult, QString(""));
+    
+    // Try reading ID erroneously as a string 8 attribute
+    stringResult = "";
+    TEST_CATCH_AND_VERIFY(
+        stringResult = cm->getString8Attribute(CMManagerShim::CmId),
+        KErrNotSupported);
+    QCOMPARE(stringResult, QString(""));
+    
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for testing attribute reads using a wrong attribute type.
+ * All test reads in this case should fail to an exception.
+ */
+void TestCmMgrShim::tcConnMethodWrongTypeAttributeWrite()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+
+    // Try writing name erroneously as an int attribute
+    TEST_CATCH_AND_VERIFY(
+        cm->setIntAttribute(CMManagerShim::CmName, 0),
+        KErrNotSupported);
+    
+    // Try writing name erroneously as a bool attribute
+    TEST_CATCH_AND_VERIFY(
+        cm->setBoolAttribute(CMManagerShim::CmName, false),
+        KErrNotSupported);
+    
+    // Try writing ID erroneously as a string attribute
+    TEST_CATCH_AND_VERIFY(
+        cm->setStringAttribute(CMManagerShim::CmId, QString("dada")),
+        KErrNotSupported);
+    
+    // Try reading ID erroneously as a string 8 attribute
+    TEST_CATCH_AND_VERIFY(
+        cm->setString8Attribute(CMManagerShim::CmId, QString("dada")),
+        KErrNotSupported);
+    
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for testing connection method refreshing.  
+ * -Create a connection method
+ * -Read the name of the connection method
+ * -Change the name, but don't update CommsDat
+ * -Refsesh connection method
+ * -Check that the name is the original one
+ * -Delete the connection method
+ */
+void TestCmMgrShim::tcConnectionMethodRefresh()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+        
+    // Update to CommsDat
+    cm->update();
+
+    // Check ID
+    int id = cm->getIntAttribute(CMManagerShim::CmId);
+    QCOMPARE(id, 1);
+        
+    // Check the default name
+    QString name = cm->getStringAttribute(CMManagerShim::CmName);
+    QVERIFY(name != QString(""));
+        
+    // Change name
+    cm->setStringAttribute(CMManagerShim::CmName, "WlanBlaaBlaa");
+    // Do not update CommsDat
+
+    // Check the changed name
+    QString newName = cm->getStringAttribute(CMManagerShim::CmName);
+    QCOMPARE(newName, QString("WlanBlaaBlaa"));
+
+    // Refresh connection method
+    cm->refresh();
+
+    // Delete the connection method reference
+    delete cm;
+
+    // Refetch the connection method
+    cm = mCmManagerShim->connectionMethod(id);
+    QVERIFY(cm != NULL);        
+
+    // Check that the bearer name in database is the original one
+    newName = cm->getStringAttribute(CMManagerShim::CmName);
+    QCOMPARE(newName, name);
+        
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+}
+
+/**
+ * Test case for testing reading destination's connection methods.
+ * -Create a destination
+ * -Add a GPRS connection method to it.
+ * -Add a WLAN connection method to it.
+ * -Read number of connection methods.
+ * -Read connection method by index.
+ * -Read connection method by unknown index.
+ * -Read connection method by id.
+ * -Read connection method by unknown id.
+ * -Delete the Destination (and connection methods).
+ */
+void TestCmMgrShim::tcDestinationReadConnectionMethods()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    uint destId = dest->id();
+    QVERIFY(destId >= 4000);
+    
+    // Check destination initial content
+    int connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Create a GPRS connection method
+    CmConnectionMethodShim *cmGprs = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypePacketData);
+    QVERIFY(cmGprs != NULL);
+    // Update to CommsDat
+    cmGprs->update();
+    
+    // Add the connection method to the destination
+    int index = dest->addConnectionMethod(cmGprs);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest->update();
+    
+    delete cmGprs;
+    cmGprs = 0;
+    
+    // Create a WLAN connection method
+    CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cmWlan != NULL);
+    // Update to CommsDat
+    cmWlan->update();
+
+    // Add the connection method to the destination
+    index = dest->addConnectionMethod(cmWlan);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest->update();
+
+    
+    // Check number of destination's connection methods
+    connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 2);
+
+    // Read connection method by index.
+    CmConnectionMethodShim *cm = dest->connectionMethod(1);
+    QVERIFY(cm != NULL);
+    
+    // Try to read connection method by unknown index.
+    TEST_CATCH_AND_VERIFY(
+            dest->connectionMethod(2),
+            KErrArgument);
+    
+    // Read connection method by id.
+    uint id = cmWlan->getIntAttribute(CMManagerShim::CmId);
+    cm = dest->connectionMethodByID(id);
+    QVERIFY(cm != NULL);
+    
+    delete cmWlan;
+    cmWlan = 0;
+    
+    delete cm;
+    cm = 0;
+    
+    // Try to read connection method by unknown id.    
+    TEST_CATCH_AND_VERIFY(
+        dest->connectionMethodByID(100),
+        KErrNotFound);
+   
+    // Delete the destination (and connection methods).
+    dest->deleteDestination();
+    delete dest;
+}
+
+/**
+ * Test case for testing removing connection method from single destination.
+ * -Create 2 destinations
+ * -Add a WLAN connection method to both.
+ * -Remove the WLAN connection method from the first destination.
+ * -Remove the WLAN connection method from the other destination.
+ * -Delete the Destinations.
+ * -Delete connection method.
+ */
+void TestCmMgrShim::tcDestinationRemoveConnectionMethod()
+{
+    // Create a new destination
+    CmDestinationShim *dest1;
+    dest1 = mCmManagerShim->createDestination("TestDestination1");
+    QVERIFY(dest1 != NULL);
+    uint destId1 = dest1->id();
+    QVERIFY(destId1 >= 4000);
+
+    // Create another destination
+    CmDestinationShim *dest2;
+    dest2 = mCmManagerShim->createDestination("TestDestination2");
+    QVERIFY(dest2 != NULL);
+    uint destId2 = dest2->id();
+    QVERIFY(destId2 >= 4000);
+    
+    // Check destinations initial content
+    int connMethodCount = dest1->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    connMethodCount = dest2->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Create a WLAN connection method
+    CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cmWlan != NULL);
+    // Update to CommsDat
+    cmWlan->update();
+
+    uint cmWlanId = cmWlan->getIntAttribute(CMManagerShim::CmId);
+    QCOMPARE(cmWlanId, (uint)1);
+
+    // Add the connection method to the destination 1
+    int index = dest1->addConnectionMethod(cmWlan);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest1->update();
+
+    // Add the connection method to the destination 2
+    index = dest2->addConnectionMethod(cmWlan);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest2->update();
+        
+    // Remove the WLAN connection method from destination 1
+    dest1->removeConnectionMethod(cmWlan);
+    // Update to CommsDat
+    dest1->update();
+    
+    // Verify the delete
+    connMethodCount = dest1->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Check that WLAN connection method still exists for destination 2
+    connMethodCount = dest2->connectionMethodCount();
+    QCOMPARE(connMethodCount, 1);
+
+    // Remove the WLAN connection method from destination 2
+    dest2->removeConnectionMethod(cmWlan);
+    // Update to CommsDat
+    dest2->update();
+    
+    // Verify the delete
+    connMethodCount = dest2->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+
+    // Delete destinations
+    dest1->deleteDestination();
+    delete dest1;
+    dest2->deleteDestination();
+    delete dest2;
+    
+    // Check that WLAN connection method still exists
+    delete cmWlan;
+    cmWlan = mCmManagerShim->connectionMethod(cmWlanId);
+    QVERIFY(cmWlan != NULL);
+    
+    // Remove WLAN connection method.
+    cmWlan->deleteConnectionMethod();
+    delete cmWlan;
+}
+
+/**
+ * Test case for testing destination's cm priority reading and changing. 
+ * -Create a destination
+ * -Add a GPRS connection method to it.
+ * -Add a WLAN connection method to it.
+ * -Read priority values of the connection methods
+ * -Change the priority values
+ * -Read the changed priority values
+ * -Try to change the priority value to unsupported value
+ * -Delete the destination (and connection methods)
+ */
+void TestCmMgrShim::tcDestinationPriority()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    uint destId = dest->id();
+    QVERIFY(destId >= 4000);
+      
+    // Create a GPRS connection method
+    CmConnectionMethodShim *cmGprs = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypePacketData);
+    QVERIFY(cmGprs != NULL);
+    // Update to CommsDat
+    cmGprs->update();
+    
+    // Add the connection method to the destination
+    int index = dest->addConnectionMethod(cmGprs);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest->update();
+    
+    // Create a WLAN connection method
+    CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cmWlan != NULL);
+    // Update to CommsDat
+    cmWlan->update();
+
+    // Add the connection method to the destination
+    index = dest->addConnectionMethod(cmWlan);
+    QCOMPARE(index, 0);
+    // Update to CommsDat
+    dest->update();
+        
+    // Get the priority of connection methods
+    int priority = dest->priority(cmWlan);
+    QCOMPARE(priority, 1);
+    priority = dest->priority(cmGprs);
+    QCOMPARE(priority, 2);
+    
+    // Modify the priority of GPRS connection method
+    dest->modifyPriority(cmGprs, 0);
+    dest->modifyPriority(cmWlan, 1);
+    // Update to CommsDat
+    dest->update();
+    
+    // Check the priorities
+    priority = dest->priority(cmGprs);
+    QCOMPARE(priority, 1);
+    priority = dest->priority(cmWlan);
+    QCOMPARE(priority, 2);
+
+    // Try to modify the priority to forbidden value  
+    TEST_CATCH_AND_VERIFY(
+        dest->modifyPriority(cmGprs, 2),
+        KErrArgument);
+
+    // Delete the whole destination including the remaining WLAN conn method.
+    dest->deleteDestination();
+    
+    delete dest;
+    delete cmGprs;
+    delete cmWlan;
+}
+
+/**
+ * Test case for testing miscellaneous methods for destination. 
+ * -Create a destination
+ * -Change the name of the destination
+ * -Check if the destination is hidden
+ * -Check if destination is "internet" with metadata.
+ * -Delete the destination
+ */
+void TestCmMgrShim::tcDestinationMisc()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    uint destId = dest->id();
+    QVERIFY(destId >= 4000);
+          
+    // Change the name of the destination
+    dest->setName("NewName");
+    // Update to CommsDat
+    dest->update();
+    
+    // Check the name
+    QString name(dest->name());
+    QCOMPARE(name, QString("NewName"));
+
+    // Check if destination is hidden
+    bool hidden = dest->isHidden();
+    QCOMPARE(hidden, false);
+    
+    // Check "internet" metadata field
+    uint metadata = dest->metadata(CMManagerShim::SnapMetadataInternet);
+    QCOMPARE(metadata, (uint)false);
+    
+    // Delete the destination
+    dest->deleteDestination();
+    delete dest;
+}
+
+/**
+ * Test case for testing destination refreshing method.  
+ * -Create a destination
+ * -Add a GPRS connection method, but don't update CommsDat
+ * -Change the name of the destination, but don't update CommsDat
+ * -Refresh destination
+ * -Check that the changes are not valid anymore
+ * -Delete the destination
+ * -Delete the connection method
+ */
+void TestCmMgrShim::tcDestinationRefresh()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    uint destId = dest->id();
+    QVERIFY(destId >= 4000);
+    dest->update();
+
+    // Create a GPRS connection method
+    CmConnectionMethodShim *cmGprs = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypePacketData);
+    QVERIFY(cmGprs != NULL);
+    // Update to CommsDat
+    cmGprs->update();
+    
+    // Add the connection method to the destination
+    int index = dest->addConnectionMethod(cmGprs);
+    QCOMPARE(index, 0);
+    // Don't update CommsDat
+    
+    // Change the name of the destination
+    dest->setName("NewName");
+    // Don't update to CommsDat
+
+    // Refresh destination
+    dest->refresh();
+    
+    // Delete the destination reference
+    delete dest;
+    
+    // Refetch the destination
+    dest = mCmManagerShim->destination(destId);
+    QVERIFY(dest != NULL);
+    
+    // Check the name that it is the original one
+    QString name(dest->name());
+    QCOMPARE(name, QString("TestDestination"));
+
+    // Check destination content
+    int connMethodCount = dest->connectionMethodCount();
+    QCOMPARE(connMethodCount, 0);
+    
+    // Delete the destination
+    dest->deleteDestination();
+    delete dest;
+
+    // Delete connection method
+    bool ok = cmGprs->deleteConnectionMethod();
+    delete cmGprs;
+    QCOMPARE(ok, true);
+}
+
+/**
+ * Test case for testing data reads using a invalid input data.
+ * All test reads in this case should fail to an exception.
+ */
+void TestCmMgrShim::tcDestinationInvalidParams()
+{
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+    
+    // Update to CommsDat
+    dest->update();
+
+    // Try reading with an invalid connection method index
+    CmConnectionMethodShim *cm = 0;
+    TEST_CATCH_AND_VERIFY(
+        dest->connectionMethod(42),
+        KErrArgument);
+    QVERIFY(cm == 0);
+    
+    // Try reading with an invalid connection method ID
+    cm = 0;
+    TEST_CATCH_AND_VERIFY(
+        dest->connectionMethodByID(42),
+        KErrNotFound);
+    QVERIFY(cm == 0);
+    
+    // Delete the destination
+    dest->deleteDestination();
+    delete dest;
+}
+
+/**
+ * Test case for setting and getting icon from CM Manager
+ * -Creates a legacy WLAN connection method (i.e. does not belong to
+ *  any destination).
+ * -Sets & Gets Icon
+ * -Creates destination
+ * -Sets & Gets Icon
+ * -Deletes the connection method. 
+ */
+void TestCmMgrShim::tcIconOperations()
+{
+    // Create the connection method
+    CmConnectionMethodShim *cm = mCmManagerShim->createConnectionMethod(
+        CMManagerShim::BearerTypeWlan);
+    QVERIFY(cm != NULL);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Create a new destination
+    CmDestinationShim *dest;
+    dest = mCmManagerShim->createDestination("TestDestination");
+    QVERIFY(dest != NULL);
+       
+    // Update to CommsDat
+    dest->update();
+
+    // Set icon
+    QString testString("TestIconName");
+    cm->setIcon(testString);
+    
+    // Update to CommsDat
+    cm->update();
+    
+    // Set icon
+    dest->setIcon(testString);
+    
+    // Update to CommsDat
+    dest->update();
+     
+    // Check icon
+    QString resultString = cm->getIcon();
+    QCOMPARE(resultString, testString);
+
+    // Check destination icon
+    QString resultDestString = dest->getIcon();
+    QCOMPARE(resultDestString, testString);
+
+    // Delete the connection method
+    cm->deleteConnectionMethod();
+    delete cm;
+    
+    // Delete the destination
+    dest->deleteDestination();
+    delete dest;
+}
+
+// -----------------------------------------------------------------------------
+// SUB TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Case for deleting all destinations.
+ */
+void TestCmMgrShim::deleteDestinations()
+{
+    // Read all destinations
+    QList<uint> destinations;
+    mCmManagerShim->allDestinations(destinations);
+    
+    // Delete the destinations
+    for (int i=0; i < destinations.count(); i++) {
+        CmDestinationShim *dest = mCmManagerShim->destination(destinations[i]);
+        dest->deleteDestination();
+        delete dest;
+    }
+}
+
+/**
+ * Case for deleting all connection methods.
+ */
+void TestCmMgrShim::deleteConnectionMethods()
+{
+    // Read all connection methods
+    QList<uint> connMethods;
+    mCmManagerShim->connectionMethod(connMethods, false);
+    
+    // Remove all connection methods
+    for (int i=0; i < connMethods.count(); i++){
+        CmConnectionMethodShim *cm = 
+            mCmManagerShim->connectionMethod(connMethods[i]);
+        QVERIFY(cm != NULL);
+        bool ok = cm->deleteConnectionMethod();
+        QVERIFY(ok == true);
+        cm->update();
+        delete cm;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header for Connection Settings Shim Unit Test program.
+*/
+
+#include <QtTest/QtTest>
+
+#include <cmmanager_shim.h>
+
+class HbMainWindow;
+
+class TestCmMgrShim : public QObject
+{
+    Q_OBJECT
+
+    public slots:
+        // Test framework functions
+        void initTestCase();
+        void cleanupTestCase();
+        void init();
+        void cleanup();
+
+    private slots:
+        // Test cases
+        void tcResetSettings();
+        void tcLegacyConnMethodWlan();
+        void tcLegacyConnMethodGprs();
+        void tcCmManagerBasicFails();
+        void tcBasicDestination();
+        void tcDestinationModify();
+        void tcConnMethodSetBoolAttribute();
+        void tcConnMethodSetIntAttribute();
+        void tcConnMethodSetStringAttribute();
+        void tcConnMethodWrongTypeAttributeRead();
+        void tcConnMethodWrongTypeAttributeWrite();
+        void tcConnectionMethodRefresh();
+        void tcDestinationReadConnectionMethods();
+        void tcDestinationRemoveConnectionMethod();
+        void tcDestinationPriority();
+        void tcDestinationMisc();
+        void tcDestinationRefresh();
+        void tcDestinationInvalidParams();
+        void tcIconOperations();
+        
+    private:
+        // Sub test cases
+        void deleteDestinations();
+        void deleteConnectionMethods();
+
+    private:
+        // Test data
+        CmManagerShim *mCmManagerShim;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for Connection Settings Shim Unit Tests.
+
+TEMPLATE = app
+
+TARGET = testcmmgrshim
+
+CONFIG += hb qtestlib
+
+INCLUDEPATH += .
+DEPENDPATH += .
+
+HEADERS += \
+    testcmmgrshim.h
+SOURCES += \
+    testcmmgrshim.cpp
+
+LIBS += -lconnection_settings_shim
+
+symbian: {
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/connection_settings_shim/tsrc/ut/tools/cmmgrshim_ctc.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,79 @@
+::
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+:: Script for running Connection Settings Shim test cases with CTC analysis.
+
+@echo off
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+:: Connection Settings Shim base directory
+set cmmgrshim_dir=..\..\..
+pushd %cmmgrshim_dir%
+
+:: CTC instrumentation excludes
+set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp
+
+::-----------------------------------------------------------------------------
+:: Remove old coverage data
+::-----------------------------------------------------------------------------
+
+echo Cleaning up...
+del MON.* ctcerr.txt profile.txt
+rd /s /q CTCHTML
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build & instrument code
+::-----------------------------------------------------------------------------
+
+echo Building code and instrumenting..
+call del MON.* ctcerr.txt profile.txt
+call make distclean
+call qmake
+call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build test code
+::-----------------------------------------------------------------------------
+
+echo Building test code...
+call cd tsrc\ut
+call make distclean
+call qmake
+call sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Execute the tests
+::-----------------------------------------------------------------------------
+
+echo Running tests..
+cd ..\..
+call \epoc32\release\winscw\udeb\testcmmgrshim.exe
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Create coverage results
+::-----------------------------------------------------------------------------
+
+echo Creating results...
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
+echo ...done
+
+popd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/cpdestinationplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,70 @@
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Control Panel Destinations & Access points plugin project file
+
+TEMPLATE = lib
+TARGET = cpdestinationplugin
+DEPENDPATH += .
+INCLUDEPATH += . 
+CONFIG += hb plugin
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+LIBS += -lcpframework \
+        -lconnection_settings_shim
+symbian*::LIBS += -lcmmanager
+RESOURCES = res/cpdestinationplugin.qrc
+
+DOCML += res/cpdestinationplugindialogs.docml
+
+# Sources
+HEADERS += inc/cpiapitem.h \
+    inc/cpdestinationplugin.h \
+    inc/cpdestinationgroup.h \
+    inc/cpadddestinationentryitemdata.h \
+    inc/cpdestinationentryitem.h \
+    traces/OstTraceDefinitions.h
+SOURCES += src/cpiapitem.cpp \
+    src/cpadddestinationentryitemdata.cpp \
+    src/cpdestinationentryitem.cpp \
+    src/cpdestinationplugin.cpp \
+    src/cpdestinationgroup.cpp
+
+TRANSLATIONS = cpdestinationplugin.ts
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+
+    MMP_RULES += "USERINCLUDE traces"
+
+}
+
+symbian:
+{ 
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002BC90
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+     
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/controlpanel
+    qtplugins.sources += qmakepluginstubs/cpdestinationplugin.qtplugin
+    
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+    BLD_INF_RULES.prj_exports += "rom/cpdestinationplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpdestinationplugin.iby)"
+    BLD_INF_RULES.prj_exports += "rom/cpdestinationplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cpdestinationplugin_resources.iby)"
+}
+
+plugin.sources = cpdestinationplugin.dll
+plugin.path = /resource/qt/plugins/controlpanel
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/inc/cpadddestinationentryitemdata.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *  Data item for representing "Add Destination" button in UI.
+ */
+
+#ifndef CPADDDESTINATIONENTRYITEMDATA_H
+#define CPADDDESTINATIONENTRYITEMDATA_H
+
+// System includes
+#include <cpsettingformentryitemdata.h>
+
+// User includes
+
+// Forward declarations
+class CpDestinationGroup;
+class CmManagerShim;
+class HbInputDialog;
+class HbAction;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpAddDestinationEntryItemData : public CpSettingFormEntryItemData
+{
+	Q_OBJECT
+public:
+	explicit CpAddDestinationEntryItemData( 
+	    CpItemDataHelper &itemDataHelper, 
+	    CpDestinationGroup *parent = 0);
+	
+	virtual ~CpAddDestinationEntryItemData();
+	
+signals:
+
+public slots:
+    void setNewDestinationName();
+
+protected:
+
+protected slots:
+	
+private:
+	virtual CpBaseSettingView *createSettingView() const;
+	bool isDestinationNameValid(const QString dest, CmManagerShim *cmm) const;
+	void showErrorNote();
+    
+private slots:
+    void onLaunchView();
+	
+private: // data
+	
+    //! Parent object
+	CpDestinationGroup *mParent;
+	//! New Destination name query dialog
+	HbInputDialog      *mDialog;
+	//! New Destination name query's OK action
+	HbAction           *mOkAction;
+};
+
+#endif //CPADDDESTINATIONENTRYITEMDATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/inc/cpdestinationentryitem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* This items represents one Destination in UI.
+*
+*/
+
+#ifndef CPDESTINATIONENTRYITEM_H
+#define CPDESTINATIONENTRYITEM_H
+
+// System includes
+#include <QSharedPointer>
+#include <cpsettingformentryitemdata.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class QString;
+class HbMenu;
+class HbView;
+class HbListWidget;
+class HbListWidgetItem;
+class HbMainWindow;
+class HbAction;
+class HbInputDialog;
+class CpItemDataHelper;
+class CpIapItem;
+class CmConnectionMethodShim;
+class CmManagerShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpDestinationEntryItemData : public CpSettingFormEntryItemData
+{
+    Q_OBJECT
+public:
+    explicit CpDestinationEntryItemData(CpItemDataHelper &itemDataHelper);
+    virtual ~CpDestinationEntryItemData();
+    
+    int destinationId();
+    void setDestinationId( int destId );
+    QString destinationName();
+    void setDestinationName(const QString destinationName);
+    
+signals:
+    void destChanged();
+    
+public slots:
+    void updateDestinationView();
+    void showItemMenu(QPointF position);
+    void openDestination();
+    void renameDestination();
+    void confirmDestinationDelete();
+    void deleteDestination();
+    void activateArrangeMode();
+    void viewDone();
+    void viewCancel();
+    void updateIndex();
+    void saveNewDestinationName();
+    
+protected:
+    bool eventFilter(QObject *obj, QEvent *event);
+    
+protected slots:
+    
+private:
+    virtual CpBaseSettingView *createSettingView() const;
+    void fetchReferencedAps(
+        QList<QSharedPointer<CmConnectionMethodShim> > &apList, const CmManagerShim *cmm) const;
+    bool isDestinationNameValid(QString &destination, const CmManagerShim *cmm);
+    void createArrangeModeView(HbView *view);
+    void constructSettingView(CpBaseSettingView *view) const;
+    HbMenu *createItemMenu(
+        CMManagerShim::CmmProtectionLevel protLvl,
+        const QPointF position);
+    void lauchNewDestinationNameQuery();
+    void showRenameError(const QString &info);
+    void showErrorNote(const QString &info);
+    QString resolveApIcon(QSharedPointer<CmConnectionMethodShim> cm) const; 
+            
+private slots:
+    
+private: // data
+    
+    //! Helper for connecting signals to underlying widgets
+    CpItemDataHelper    *mItemDataHelper;
+    //! Unique Destination ID
+    int                 mDestinationId;
+    //! Destination Name
+    QString             mDestinationName;
+    //! List of access points contained by this object
+    QList<CpIapItem*>   *mAps;
+    //! Pointer to CmManager for commsdat operations
+    CmManagerShim       *mCmm;
+    //! Previous view when arrange mode view is shown
+    HbView              *mPreView;
+    //! List of access points for arrange mode
+    HbListWidget        *mList;
+    //! New Destination name query dialog
+    HbInputDialog      *mDialog;
+    //! New Destination name query's OK action
+    HbAction           *mOkAction;
+};
+
+#endif /* CPDESTINATIONENTRYITEM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* CpDestinationGroup contains all destination UI items as well as 
+* items for uncategorized access points and adding new destinations.
+*/
+ 
+#ifndef CPDESTINATIONGROUP_H
+#define CPDESTINATIONGROUP_H
+
+// System includes
+#include <QSharedPointer>
+#include <cpsettingformitemdata.h>
+
+// User includes
+#include "cpbearerapplugininterface.h"
+
+// Forward declarations
+class CpDestinationEntryItemData;
+class CmDestinationShim;
+class CmManagerShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpDestinationGroup : public CpSettingFormItemData
+{
+    Q_OBJECT
+    
+public:
+    CpDestinationGroup(CpItemDataHelper &itemDataHelper);
+    ~CpDestinationGroup();
+    
+    void addDestination(
+        const QString &name,
+        QSharedPointer<CmDestinationShim> dest);
+    void deleteDestination(int destId);
+    CpBearerApPluginInterface *findBearerPlugin(int apId);
+    
+signals:
+    
+public slots:
+    void updateDestinationInformation();
+    
+protected:
+    
+protected slots:
+        
+private: 
+    void createUncategorisedDestination();
+    void fetchDestinations(QList<QSharedPointer<CmDestinationShim> > &destinationList);
+    void loadBearerPlugins();
+	QString getDestinationAdditionalText(QSharedPointer<CmDestinationShim> destination);
+	QString getDestinationAdditionalText(int destinationId);
+	QString resolveDestinationIcon(QSharedPointer<CmDestinationShim> destination) const; 
+	
+private slots:
+
+private: // data
+
+    //! Helper for connecting signals to underlying widgets
+    CpItemDataHelper                    *mItemDataHelper;
+    //! True is uncategorised "destination" is currently shown
+    bool                                mUncategorisedShown;
+    //! Pointer to CmManager for commsdat operations
+    CmManagerShim                       *mCmManager;
+    /*! List of plugins that implement views for access points 
+     *  according to bearer type
+     */
+    QList<CpBearerApPluginInterface *>  *mBearerPlugins;
+};
+
+#endif // CPDESTINATIONGROUP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/inc/cpdestinationplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*   Control Panel plugin for showing destinations and access points
+*   settings.
+*
+*/
+
+#ifndef CPDESTINATIONPLUGIN_H
+#define CPDESTINATIONPLUGIN_H
+
+// System includes
+#include <QObject>
+#include <cpplugininterface.h>
+
+// User includes
+
+// Forward declarations
+class QTranslator;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpDestinationPlugin : public QObject, public CpPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpPluginInterface)
+    
+public:
+    CpDestinationPlugin();
+    ~CpDestinationPlugin();
+    QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+private slots:
+
+private: // data
+    //! Translator for localization
+    QTranslator *mTranslator;
+    
+};
+
+#endif // CPDESTINATIONPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/inc/cpiapitem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*   Data item for representing access points in UI.
+*
+*/
+
+#ifndef CPIAPITEM_H
+#define CPIAPITEM_H
+
+// System includes
+#include <QObject>
+#include <QPoint>
+#include <QModelIndex>
+#include <cpsettingformentryitemdata.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class HbDialog;
+class HbRadioButtonList;
+class HbAction;
+class HbMenu;
+class CmManagerShim;
+class CpBearerApPluginInterface;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpIapItem : public CpSettingFormEntryItemData
+    {
+    Q_OBJECT
+    
+public:
+    CpIapItem(
+        CpItemDataHelper &itemDataHelper, 
+        int iapId, 
+        const QString &iapName, 
+        int destId,
+        bool apProtected,
+        CpBearerApPluginInterface *bearerPlugin);
+    
+    ~CpIapItem();
+    
+signals:
+    void iapChanged();
+    
+public slots:
+    void showItemMenu(QPointF position);
+    void moveIap();
+    void showDeleteConfirmation();
+    void shareIap();
+    void queryDialogClosed();
+    void deleteConfirmed();
+    void updateIap();
+    void openIap();
+
+protected:
+    
+protected slots:
+
+private:
+    virtual CpBaseSettingView *createSettingView() const;
+    void queryDestination();
+    void saveMove(int id);
+    void saveShare(int id);
+    bool isCmManagerAvailable();
+    HbMenu *createItemMenu(
+        bool cmConnected,
+        const QPointF &position);
+    void showErrorNote(const QString &info);
+
+private slots:
+
+private: // data 
+    //! Unique ID for access point
+    int                         mIapId;
+    //! Access point name
+    QString                     mIapName;
+    //! ID of the destination referencing this access point
+    int                         mDestId;
+    //! Helper for connecting signals to underlying widgets
+    CpItemDataHelper            *mItemDataHelper;
+    //! Pointer to CmManager for commsdat operations
+    CmManagerShim               *mCmm;
+    //! Plugin that implements settings view for this access point
+    CpBearerApPluginInterface   *mBearerPlugin;
+    
+    //! Variable showing if access point move transaction is ongoing
+    bool                        mMoveOngoing;
+    //! Target destination query dialog. Used for move and share
+    HbDialog                    *mDialog;
+    //! Dialog's OK action
+    HbAction                    *mOk;
+    //! List of available destinations' IDs
+    QList<uint>                 mDestinationList;
+    //! List of available destinations
+    HbRadioButtonList           *mList;
+};
+
+#endif // CPIAPITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/res/cpdestinationplugin.qrc	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+    <qresource prefix="/docml" >
+        <file alias="cpdestinationplugindialogs.docml">cpdestinationplugindialogs.docml.bin</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/res/cpdestinationplugindialogs.docml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+    <object name="okAction" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_ok" name="text"/>
+    </object>
+    <object name="cancelAction" type="HbAction">
+        <string name="role" value="HbDialog:secondaryAction"/>
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="dialog" type="HbDialog">
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignLeft"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+            <string name="textColor" value="qtc_popup"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+        </widget>
+        <widget name="radioButtonList" role="HbDialog:contentWidget" type="HbRadioButtonList"/>
+        <bool name="backgroundFaded" value="TRUE"/>
+        <integer name="timeout" value="0"/>
+        <ref object="okAction" role="HbDialog:primaryAction"/>
+        <ref object="cancelAction" role="HbDialog:secondaryAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/rom/cpdestinationplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Destination Plugin IBY file for control panel
+*/
+
+#ifndef CPDESTINATIONPLUGIN_IBY
+#define CPDESTINATIONPLUGIN_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR/BUILD_DIR/cpdestinationplugin.dll SHARED_LIB_DIR/cpdestinationplugin.dll
+
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/cpdestinationplugin.qtplugin resource/qt/plugins/controlpanel/cpdestinationplugin.qtplugin
+
+#endif // CPDESTINATIONPLUGIN_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/rom/cpdestinationplugin_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Destination Plugin IBY file.
+*/
+
+#ifndef CPDESTINATIONPLUGIN_RESOURCES_IBY
+#define CPDESTINATIONPLUGIN_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cpdestinationplugin.qm QT_TRANSLATIONS_DIR/cpdestinationplugin.qm
+
+#endif // CPDESTINATIONPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,235 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Data item for representing "Add Destination" button in UI.
+*/
+
+// System includes
+
+#include <HbInputDialog>
+#include <HbAction>
+#include <HbMessageBox>
+#include <HbPopup>
+
+#include <cpitemdatahelper.h>
+#include <cmdestination_shim.h>
+#include <cmmanager_shim.h>
+
+// User includes
+
+#include "cpadddestinationentryitemdata.h"
+#include "cpdestinationgroup.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpadddestinationentryitemdataTraces.h"
+#endif
+
+/*!
+    \class  CpAddDestinationEntryItemData
+    \brief  This class is a dummy destination. It does not contain 
+            access points but clicking it starts new destination 
+            creation process.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+    Constructor.
+    
+    @param[in] itemDataHelper Helper from Control Panel for making connections.
+    @param[in] parent Parent object.
+ */
+CpAddDestinationEntryItemData::CpAddDestinationEntryItemData(
+    CpItemDataHelper &itemDataHelper,
+    CpDestinationGroup *parent) :
+    CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper),
+    mParent(parent),
+    mDialog(0),
+    mOkAction(NULL)
+{
+    OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_ENTRY);
+    OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_EXIT);
+}
+
+/*!
+    Destructor.
+ */
+CpAddDestinationEntryItemData::~CpAddDestinationEntryItemData()
+{
+    OstTraceFunctionEntry0(DUP1_CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_ENTRY);
+    OstTraceFunctionExit0(DUP1_CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_EXIT);
+}
+
+/*!
+    Inherited member from CpSettingFormEntryItemData. When this item is clicked
+    new dialog is started for creating new destination.
+ */
+void CpAddDestinationEntryItemData::onLaunchView()
+{
+    OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_ONLAUNCHVIEW_ENTRY);
+    
+    mDialog = new HbInputDialog();
+    mDialog->setAttribute(Qt::WA_DeleteOnClose);
+    mDialog->lineEdit()->setMaxLength(CMManagerShim::CmNameLength);
+    mDialog->clearActions();
+    mDialog->setPromptText(hbTrId("txt_occ_dialog_destination_name"));
+    mDialog->setInputMode(HbInputDialog::TextInput);
+    mOkAction = new HbAction(
+        hbTrId("txt_common_button_ok"),
+        mDialog);
+    bool connected = connect(
+        mOkAction, 
+        SIGNAL(triggered()), 
+        this, 
+        SLOT(setNewDestinationName()));
+    Q_ASSERT(connected);
+    HbAction *cancelAction = new HbAction(
+        hbTrId("txt_common_button_cancel"),
+        mDialog);
+    mDialog->addAction(mOkAction);
+    mDialog->addAction(cancelAction);
+    mDialog->show();
+    
+    OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_ONLAUNCHVIEW_EXIT);
+}
+
+/*!
+    This function is called when user selects OK from destination
+    name query popup. The given name is valited and if the name is
+    valid, new destination is created in commsdat with given name.
+    If validation fails user is promted again for destination name.
+ */
+void CpAddDestinationEntryItemData::setNewDestinationName()
+{
+    OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME_ENTRY);
+    
+    QString destinationName = mDialog->value().toString();
+    bool destinationNameValid = false;
+    QSharedPointer<CmManagerShim> cmm;
+    QSharedPointer<CmDestinationShim> destination;
+    
+    try {
+        cmm = QSharedPointer<CmManagerShim>(new CmManagerShim());
+        if (isDestinationNameValid(destinationName, cmm.data())) {
+            // Destination name OK. Create new destination.
+            destination = QSharedPointer<CmDestinationShim>(
+                cmm->createDestination(destinationName));
+            destinationNameValid = true;
+        }
+    } catch (const std::exception&) {
+        OstTrace0(
+            TRACE_NORMAL,
+            DUP2_CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME,
+            "CpAddDestinationEntryItemData::setNewDestinationName: exception caught");
+        return;
+    }
+
+    if (destinationNameValid) {
+        // Update view
+        if (mParent != 0) {
+            mParent->addDestination(destinationName, destination);
+        }                
+    } else {
+        showErrorNote();
+    }
+    
+    OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME_EXIT);
+}
+
+/*!
+    Inherited member from CpSettingFormEntryItemData. This item does not
+    create new view because it does not need one.
+    
+    \return NULL
+ */
+CpBaseSettingView *CpAddDestinationEntryItemData::createSettingView() const
+{
+	OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_ENTRY);
+	OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
+	return NULL;
+}
+
+/*!
+    Function for checking if the given destination name is valid. Duplicate and
+    and empty names are rejected.
+    
+    @param[in] dest Name which user has entered to be the name of the new destination.
+    @param[in] cmm Pointer to CmManagerShim for accessing data in commsdat.
+    \return true if name is valid.
+ */
+bool CpAddDestinationEntryItemData::isDestinationNameValid(
+    const QString dest,
+    CmManagerShim *cmm) const
+{
+    OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_ENTRY);
+    
+    bool retVal = true;
+    
+    if (dest.length() > 0) {
+        QList<uint> destinationList;
+        cmm->allDestinations(destinationList);
+    
+        for (int i = 0; i < destinationList.count(); i ++) {
+            QScopedPointer<CmDestinationShim> destination(
+                cmm->destination(destinationList[i]));
+            if (0 == dest.compare(destination->name())) {
+                retVal = false;
+                break;
+            }
+        }
+    } else {
+        retVal = false;
+    }
+    
+    OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_EXIT);
+    return retVal;
+}
+
+/*!
+ * Helper function for showing error note when user inputs
+ * invalid destination name.
+ */
+void CpAddDestinationEntryItemData::showErrorNote()
+{
+    OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_ENTRY);
+    
+    // Destination name NOK. Inform user and ask again.
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    note->clearActions();
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    QString info = hbTrId("txt_occ_info_invalid_name");
+    note->setText(info);
+    note->setTimeout(HbPopup::NoTimeout);
+    HbAction *errorOk = new HbAction(
+        hbTrId("txt_common_button_ok"),
+        note);
+    bool connected = connect(
+        errorOk,
+        SIGNAL(triggered()),
+        this,
+        SLOT(onLaunchView()));
+    Q_ASSERT(connected);                        
+    note->addAction(errorOk);
+    note->show();
+    
+    OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,835 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies 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 items represents one Destination in UI.
+*/
+
+// System includes
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbToolBar>
+#include <HbAction>
+#include <HbDataFormViewItem>
+#include <HbMenu>
+#include <HbInputDialog>
+#include <HbMessageBox>
+#include <HbPopup>
+#include <HbListWidget>
+#include <HbListWidgetItem>
+#include <HbMainWindow>
+#include <HbInstance>
+#include <HbParameterLengthLimiter>
+#include <cppluginutility.h>
+#include <cpitemdatahelper.h>
+#include <cpbasesettingview.h>
+#include <cmdestination_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <cmmanager_shim.h>
+
+// User includes
+#include "cpiapitem.h"
+#include "cpdestinationentryitem.h"
+#include "cpdestinationgroup.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpdestinationentryitemTraces.h"
+#endif
+/*!
+    \class  CpDestinationEntryItemData
+    \brief  This class represents destination in data model. 
+            It takes care of all destination related operations.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!         
+    Constructor.
+    
+    @param[in] itemDataHelper Helper for connecting signals and slots.
+ */
+CpDestinationEntryItemData::CpDestinationEntryItemData(CpItemDataHelper &itemDataHelper)
+    : CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper),
+    mList(0),
+    mDialog(0),
+    mOkAction(0)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA_ENTRY);
+    mAps = new QList<CpIapItem*>();
+    try {
+        mCmm = new CmManagerShim();
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA, "CpDestinationEntryItemData::CpDestinationEntryItemData: Exception caught");
+        mCmm = NULL;
+    }
+        
+    // Fix connections
+    itemDataHelper.removeConnection(this,SIGNAL(pressed()),this,SLOT(onLaunchView()));
+    itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(onLaunchView()));
+    itemDataHelper.addConnection(this,SIGNAL(longPress(QPointF)),this,SLOT(showItemMenu(QPointF)));
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA_EXIT);
+}
+
+/*!
+    Destructor
+ */
+CpDestinationEntryItemData::~CpDestinationEntryItemData()
+{
+    OstTraceFunctionEntry0(DUP1_CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA_ENTRY);
+    delete mCmm;
+    delete mAps;
+    OstTraceFunctionExit0(DUP1_CPDESTINATIONENTRYITEMDATA_CPDESTINATIONENTRYITEMDATA_EXIT);
+}
+
+/*!
+    \return unique destination ID of this item.
+ */
+int CpDestinationEntryItemData::destinationId()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_DESTINATIONID_ENTRY);
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_DESTINATIONID_EXIT);
+    return mDestinationId;
+}
+
+/*!
+    Sets destination ID to be given integer.
+ */
+void CpDestinationEntryItemData::setDestinationId(int destId)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SETDESTINATIONID_ENTRY);
+    mDestinationId = destId;
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SETDESTINATIONID_EXIT);
+}
+
+/*!
+    \return Returns destination name as QString
+ */
+QString CpDestinationEntryItemData::destinationName()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_DESTINATIONNAME_ENTRY);
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_DESTINATIONNAME_EXIT);
+    return mDestinationName;
+}
+
+/*!
+    Sets given QString to be destination name.
+ */
+void CpDestinationEntryItemData::setDestinationName(const QString destinationName)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SETDESTINATIONNAME_ENTRY);
+    mDestinationName = destinationName;
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SETDESTINATIONNAME_EXIT);
+}
+
+/*!
+    Inherited member from CpSettingFormEntryItemData. Returns view that contains
+    all access points included in this destination item.
+ */
+CpBaseSettingView *CpDestinationEntryItemData::createSettingView() const
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_ENTRY);
+    CpBaseSettingView* view = new CpBaseSettingView();
+    constructSettingView(view);
+    
+    // Toolbar. Allow arrange if more than one AP is shown
+    if (mDestinationId != 0 && mAps->count() > 1) {
+        HbToolBar *tb = view->toolBar();
+        HbIcon arrangeIcon("qtg_mono_sort");
+        HbAction *arrangeAction 
+            = tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode()));
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
+    return view;        
+}
+
+/*!
+    Worker function for createSettingView(). Adds Access points to given view.
+    
+     @param[out] view Target view where settings are constructed.
+ */
+void CpDestinationEntryItemData::constructSettingView(CpBaseSettingView *view) const
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CONSTRUCTSETTINGVIEW_ENTRY);
+    mAps->clear();
+    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
+    HbDataForm *form = new HbDataForm();
+    HbDataFormModel *model = new HbDataFormModel;
+    form->setModel(model);
+    model->setParent(form);
+    view->setWidget(form);
+    CpPluginUtility::addCpItemPrototype(form);
+    QList<QSharedPointer<CmConnectionMethodShim> > apList;
+    // Following won't throw exception
+    fetchReferencedAps(apList, mCmm);
+    form->setHeading(text());
+
+    for (int i = 0; i < apList.count(); i++) {
+        int apId = apList[i]->getIntAttribute(CMManagerShim::CmId);
+        CpBearerApPluginInterface *bearerPlugin = 
+                static_cast<CpDestinationGroup*>(HbDataFormModelItem::parent())->findBearerPlugin(apId);
+        bool apProtected = false;
+        if (mDestinationId != 0) {
+            CmDestinationShim *destination = mCmm->destination(mDestinationId);
+            CMManagerShim::CmmProtectionLevel level = destination->protectionLevel();
+            if (level == CMManagerShim::ProtLevel3) {
+                apProtected = apList[i]->getBoolAttribute(CMManagerShim::CmProtected);
+            } else if (level == CMManagerShim::ProtLevel1) {
+                apProtected = true;
+            }
+            delete destination;
+        }
+        
+        CpIapItem *iapDataItem;
+        iapDataItem = new CpIapItem(
+            *itemDataHelper, 
+            apId, 
+            apList[i]->getStringAttribute(CMManagerShim::CmName), 
+            mDestinationId,
+            apProtected,
+            bearerPlugin);
+       
+        // Add name to UI item
+        iapDataItem->setContentWidgetData(
+            QString("text"), 
+            apList[i]->getStringAttribute(CMManagerShim::CmName));
+        
+        // Add Icon if found
+        HbIcon iapIcon(resolveApIcon(apList[i]));
+        iapDataItem->setEntryItemIcon(iapIcon);
+       
+        // Add priority to item if not Uncategorised "Destination"
+        if (mDestinationId  != 0) {
+            // Access Points are listed in priority order.
+            QString priority = hbTrId("txt_occ_dblist_val_priority_l1").arg(i + 1);
+            iapDataItem->setContentWidgetData(QString("additionalText"), priority);
+        } else {
+            iapDataItem->setContentWidgetData(QString("stretched"), true);
+        }
+        
+        // Set item disabled if it is protected
+        if (apProtected) {
+            iapDataItem->setContentWidgetData(QString("enabled"), false);
+        }
+        
+        // Add to model
+        model->appendDataFormItem(iapDataItem);
+        
+        // Save and make connections
+        mAps->append(iapDataItem);
+        bool connected 
+            = connect(iapDataItem, SIGNAL(iapChanged()), this, SLOT(updateDestinationView()));
+        Q_ASSERT(connected);
+    }
+    
+    itemDataHelper->bindToForm(form);
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CONSTRUCTSETTINGVIEW_EXIT);
+}
+
+/*!
+    Rebuilds view with access points after access points have changed.
+ */
+void CpDestinationEntryItemData::updateDestinationView()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_ENTRY);
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
+       
+    if (mainWnd) {
+        HbView *view = mainWnd->currentView();
+        CpBaseSettingView  *cpView = static_cast<CpBaseSettingView  *>(view);
+        constructSettingView(cpView);
+        
+        // Remove Toolbar if necessary
+        if (mDestinationId != 0 && mAps->count() <= 1) {
+            HbToolBar *tb = view->toolBar();
+            tb->clearActions();
+        }
+    }
+    OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW, "CpDestinationEntryItemData::updateDestinationView: Emit destination changed");
+    emit destChanged();
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_EXIT);
+}
+
+/*!
+    Prompts user for action after long tap. Choices for actions are "Rename" and "Delete".
+    
+    @param[in] position The item specific menu is shown in given position.
+ */
+void CpDestinationEntryItemData::showItemMenu(QPointF position)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SHOWITEMMENU_ENTRY);
+    if (mDestinationId != 0) {
+        CmDestinationShim *destination = NULL;
+        CMManagerShim::CmmProtectionLevel protLvl = CMManagerShim::ProtLevel1;
+        
+        try {
+            destination = mCmm->destination(mDestinationId);
+            protLvl = destination->protectionLevel();
+            delete destination;
+        } catch (const std::exception&) {
+            OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_SHOWITEMMENU, "CpDestinationEntryItemData::showItemMenu: Exception caught");
+            if (destination != NULL) {
+                delete destination;
+            }
+        }
+        
+        HbMenu *menu = createItemMenu(protLvl, position);
+        menu->show();
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SHOWITEMMENU_EXIT);
+}
+
+/*!
+   Opens selected destination.
+ */
+void CpDestinationEntryItemData::openDestination()
+{    
+    onLaunchView();
+}
+
+/*!
+    Prompts user for new destination name and makes 
+    the change in commsdat if new name is valid.
+    
+    \sa isDestinationNameValid()
+ */
+void CpDestinationEntryItemData::renameDestination()
+{    
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_RENAMEDESTINATION_ENTRY);
+    mDialog = new HbInputDialog();
+    mDialog->setAttribute(Qt::WA_DeleteOnClose);
+    mDialog->lineEdit()->setMaxLength(CMManagerShim::CmNameLength);
+    mDialog->clearActions();
+    mDialog->setPromptText(hbTrId("txt_occ_dialog_destination_name"));
+    mDialog->setInputMode(HbInputDialog::TextInput);
+    mDialog->setValue(mDestinationName);
+    mOkAction = new HbAction(
+        hbTrId("txt_common_button_ok"),
+        mDialog);
+    bool connected = connect(mOkAction, 
+                             SIGNAL(triggered()), 
+                             this, 
+                             SLOT(saveNewDestinationName()));
+    Q_ASSERT(connected);
+    HbAction *cancelAction = new HbAction(
+        hbTrId("txt_common_button_cancel"),
+        mDialog);
+    mDialog->addAction(mOkAction);
+    mDialog->addAction(cancelAction);
+    mDialog->show();
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_RENAMEDESTINATION_EXIT);
+}
+
+/*!
+    Shows confirmation query for user before deleteting destination.
+    \sa deleteDestination()
+ */
+void CpDestinationEntryItemData::confirmDestinationDelete()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CONFIRMDESTINATIONDELETE_ENTRY);
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    note->setText(HbParameterLengthLimiter(
+        "txt_occ_info_delete_snap").arg(mDestinationName));
+    note->clearActions();
+    HbAction *okAction = new HbAction(
+        hbTrId("txt_common_button_yes"),
+        note);
+    note->addAction(okAction);
+    bool connected = connect(
+        okAction, 
+        SIGNAL(triggered()), 
+        this, 
+        SLOT(deleteDestination()));
+    Q_ASSERT(connected);
+    HbAction *cancelAction = new HbAction(
+        hbTrId("txt_common_button_no"),
+        note);
+    note->addAction(cancelAction);
+    note->setTimeout(HbPopup::NoTimeout);
+    note->show();
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CONFIRMDESTINATIONDELETE_EXIT);
+}
+
+/*!
+    Destination is deleted after user chooses "OK" from destination deletion
+    confirmation query.
+    \sa confirmDestinationDelete()
+ */
+void CpDestinationEntryItemData::deleteDestination()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_DELETEDESTINATION_ENTRY);
+    CmDestinationShim *destination = NULL;
+    CmConnectionMethodShim *cm = NULL;
+    try {
+        destination = mCmm->destination(mDestinationId);
+        int cmCount = destination->connectionMethodCount();
+        while (cmCount > 0) {
+            cm = destination->connectionMethod(0);
+            destination->removeConnectionMethod(cm);
+            cmCount--;
+            delete cm;
+            cm = NULL;
+        }
+        destination->update();
+        destination->deleteDestination();
+        CpDestinationGroup *parent 
+            = static_cast<CpDestinationGroup *>(HbDataFormModelItem::parent());
+        parent->deleteDestination(mDestinationId);
+        delete destination;
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_DELETEDESTINATION, "CpDestinationEntryItemData::deleteDestination: Exception caught");
+        if (destination != NULL) {
+            delete destination;
+        }
+        if (cm != NULL) {
+            delete cm;
+        }
+        showErrorNote(hbTrId("txt_occ_info_unable_to_save_setting"));
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_DELETEDESTINATION_EXIT);
+}
+
+/*!
+    Creates new view where access point priorities can 
+    be changed by dragging and dropping and shows it to user.
+ */
+void CpDestinationEntryItemData::activateArrangeMode()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_ACTIVATEARRANGEMODE_ENTRY);
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
+    HbView *view = new HbView();
+    createArrangeModeView(view);
+    mList->installEventFilter(this);
+    
+    if (mainWnd && view) {
+        mPreView = mainWnd->currentView();
+        mainWnd->addView(view);
+        mainWnd->setCurrentView(view, false);
+        HbAction *arrangeViewBackAction = new HbAction(Hb::BackNaviAction, view);
+        bool connected = connect(
+            arrangeViewBackAction, 
+            SIGNAL(triggered()), 
+            this, 
+            SLOT(viewCancel()));
+        Q_ASSERT(connected);
+        view->setNavigationAction(arrangeViewBackAction);
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_ACTIVATEARRANGEMODE_EXIT);
+}
+
+/*!
+    This function is called when user returns from arrange mode with
+    toolbar command "Done" thus accapting the changes. New priorities
+    are saved to commsdat according to order of the items in the previous view.
+ */
+void CpDestinationEntryItemData::viewDone()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_VIEWDONE_ENTRY);
+    try {
+        // Arrange items
+        CmDestinationShim *destination = mCmm->destination(mDestinationId);
+        for (int i = 0; i < mList->count(); i++) {
+            int apId = mList->item(i)->data(Hb::IndexFeedbackRole).toInt();
+            CmConnectionMethodShim *cm = mCmm->connectionMethod(apId);
+            destination->modifyPriority(cm,i);
+            delete cm;
+        }
+        destination->update();
+        delete destination;
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_VIEWDONE, "CpDestinationEntryItemData::viewDone: Exception caught");
+        viewCancel();
+        showErrorNote(QString("txt_occ_info_unable_to_save_setting"));
+        OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_VIEWDONE_EXIT);
+        return;
+    }
+    
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
+    HbView* view = mainWnd->currentView();
+    
+    if (mainWnd && view)  {
+        //restore previous status
+        mList->removeEventFilter(this);
+        mainWnd->removeView(view);
+        mainWnd->setCurrentView(mPreView);
+        mPreView = NULL;
+    }
+    updateDestinationView();
+    OstTraceFunctionExit0(DUP1_CPDESTINATIONENTRYITEMDATA_VIEWDONE_EXIT);
+}
+
+/*!
+    User returns from view without accepting the changes to priorities.
+ */
+void CpDestinationEntryItemData::viewCancel()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_VIEWCANCEL_ENTRY);
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
+    HbView* view = mainWnd->currentView();
+    
+    if (mainWnd && view) {
+        //restore previous status
+        mList->removeEventFilter(this);
+        mainWnd->removeView(view);
+        view->deleteLater();
+        mainWnd->setCurrentView(mPreView);
+        mPreView = NULL;
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_VIEWCANCEL_EXIT);
+}
+
+/*!
+    This function updates access points priorities shown in UI
+    when user is in arrange mode.
+    
+    \sa activateArrangeMode()
+ */
+void CpDestinationEntryItemData::updateIndex()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_UPDATEINDEX_ENTRY);
+    for (int i = 0; i < mList->count(); i++) {
+        HbListWidgetItem *item = mList->item(i);
+        QString priority = hbTrId("txt_occ_dblist_val_priority_l1").arg(i + 1);
+        item->setSecondaryText(priority);
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_UPDATEINDEX_EXIT);
+}
+
+/*!
+    This function searches all connection methods from commsdat that are
+    connected to this destination item. Connection methods are returned in
+    apList reference parameter.
+    
+    @param[out] apList Constains list of this destination's accesspoints.
+    @param[in] cmm Pointer to CmManagerShim instance to avoid multiple session openings.
+ */
+void CpDestinationEntryItemData::fetchReferencedAps(
+    QList<QSharedPointer<CmConnectionMethodShim> > &apList, 
+    const CmManagerShim *cmm) const
+{   
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_FETCHREFERENCEDAPS_ENTRY);
+    CmDestinationShim *destination = NULL;
+    try {
+        if (mDestinationId == 0) {
+            QList<uint> apIds;
+            cmm->connectionMethod(apIds);
+            for (int i = 0; i < apIds.count(); i++) {
+                CmConnectionMethodShim *cm;
+                cm = cmm->connectionMethod(apIds.at(i));
+                if (!cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                    apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                } else {
+                    delete cm;
+                }
+            }
+        } else {
+            destination = cmm->destination(mDestinationId);
+            int apCount = destination->connectionMethodCount();
+            for (int i = 0; i < apCount; i++) {
+                CmConnectionMethodShim *cm = NULL;
+                cm = destination->connectionMethod(i);
+                if (!cm->getBoolAttribute(CMManagerShim::CmDestination)
+                     && !cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                    apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                } else {
+                    delete cm;
+                }
+            }
+            delete destination;
+        }
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_FETCHREFERENCEDAPS, "CpDestinationEntryItemData::fetchReferencedAps: Exception caught");
+        if (destination != NULL) {
+            delete destination;
+        }
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_FETCHREFERENCEDAPS_EXIT);
+}
+
+/*!
+    Function for checking if the given destination name is valid. Duplicate and
+    and empty names are rejected.
+    
+    @param[out] destination Constains the destination name to be validated. If name 
+                is valid it remains unchanged. If the given name is invalid, appropriate
+                error text is set the variable.
+    @param[in] cmm Pointer to CmManagerShim instance to avoid multiple session openings.
+    
+    \return true if name is valid.
+ */
+bool CpDestinationEntryItemData::isDestinationNameValid(
+    QString &destination, 
+    const CmManagerShim *cmm)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_ENTRY);
+    bool retVal = true;
+    
+    if (destination.length() > 0) {
+        QList<uint> destinationList;
+        cmm->allDestinations(destinationList);
+    
+        for (int i = 0; i < destinationList.count(); i ++) {
+            CmDestinationShim *dest = cmm->destination(destinationList[i]);
+            if (0 == destination.compare(dest->name())) {
+                destination = hbTrId("txt_occ_info_name_already_in_use");
+                retVal = false;
+                delete dest;
+                break;
+            }
+            delete dest;
+        }
+    } else {
+        destination = hbTrId("txt_occ_info_invalid_name");
+        retVal = false;
+    }
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_EXIT);
+    return retVal;
+}
+
+/*!
+    Worker function for activateArrangeMode(). Adds list of access points
+    to given view.
+    
+    @param[out] view Target view where the arrange mode is constructed.
+
+    \sa activateArrangeMode()
+ */
+void CpDestinationEntryItemData::createArrangeModeView(HbView *view)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_ENTRY);
+    QList<QSharedPointer<CmConnectionMethodShim> >  apList;
+    fetchReferencedAps(apList, mCmm);   
+    CmDestinationShim *destination = NULL;
+    mList = new HbListWidget();
+    view->setWidget(mList);
+    
+    try {
+        destination = mCmm->destination(mDestinationId);
+        for (int i = 0; i < apList.count(); i++) {
+            HbListWidgetItem *item = new HbListWidgetItem();
+            item->setText(apList[i]->getStringAttribute(CMManagerShim::CmName));
+            item->setData(apList[i]->getIntAttribute(CMManagerShim::CmId), Hb::IndexFeedbackRole);
+
+            uint pri = destination->priority(apList[i].data());
+            QString priority = hbTrId("txt_occ_dblist_val_priority_l1").arg(pri);
+            item->setSecondaryText(priority);
+            
+            HbIcon iapIcon(resolveApIcon(apList[i]));
+            item->setIcon(iapIcon);
+        
+            mList->addItem(item);
+        }
+        mList->setArrangeMode(true);
+        delete destination;
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW, "CpDestinationEntryItemData::createArrangeModeView: Exception caught");
+        // return empty view
+        if (destination != NULL) {
+            delete destination;
+        }
+        while (mList->count() > 0) {
+            HbListWidgetItem *item = mList->item(0);
+            delete item;
+        }
+        mList->clear();
+    }
+    // Toolbar
+    HbToolBar *tb = view->toolBar();
+    HbIcon okIcon("qtg_mono_tick");
+    HbAction *doneAction 
+        = tb->addAction(okIcon, "", this, SLOT(viewDone()));
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_EXIT);
+}
+
+/*!
+    Helper function for creating item specific menu.
+    
+    @param[in] protLvl Effective protection level for this
+                       access point.
+ */
+HbMenu *CpDestinationEntryItemData::createItemMenu(
+    CMManagerShim::CmmProtectionLevel protLvl,
+    const QPointF position)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CREATEITEMMENU_ENTRY);
+    HbMenu *menu = new HbMenu();
+    menu->setAttribute(Qt::WA_DeleteOnClose);
+    HbAction *openDestAction = menu->addAction(hbTrId("txt_common_menu_open"));
+    bool connected = 
+        connect(openDestAction, SIGNAL(triggered()), this, SLOT(openDestination()));
+    Q_ASSERT(connected);
+    HbAction *renameDestAction = menu->addAction(hbTrId("txt_common_menu_rename_item"));
+    connected = 
+        connect(renameDestAction, SIGNAL(triggered()), this, SLOT(renameDestination()));
+    Q_ASSERT(connected);
+    HbAction *deleteDestAction = menu->addAction(hbTrId("txt_common_menu_delete"));
+    connected = 
+        connect(deleteDestAction, SIGNAL(triggered()), this, SLOT(confirmDestinationDelete()));
+    Q_ASSERT(connected);
+                     
+    if (protLvl == CMManagerShim::ProtLevel1
+         || protLvl == CMManagerShim::ProtLevel2 ) {
+    
+        // Disable operations for protected destinations
+        renameDestAction->setDisabled(true);
+        deleteDestAction->setDisabled(true);
+    }
+        
+    menu->setModal(true);
+    menu->setPreferredPos(position);
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEITEMMENU_EXIT);
+    return menu;
+}
+
+/*!
+    This function is called when user selects OK from destination
+    name query popup. The given name is validated and if the name is
+    valid, new destination name is saved to commsdat. If validation fails
+    user is prompted again for destination name.
+ */
+void CpDestinationEntryItemData::saveNewDestinationName()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SAVENEWDESTINATIONNAME_ENTRY);
+    QString destinationName = mDialog->value().toString();
+    if (destinationName != mDestinationName) {
+        // Destination name was changed
+        bool destinationNameInvalid = true;
+        CmManagerShim *cmm = NULL;
+        CmDestinationShim *destination = NULL;
+        
+        try {
+            cmm = new CmManagerShim();
+            if (isDestinationNameValid(destinationName, cmm)) {
+                destination = cmm->destination(mDestinationId);
+                destination->setName(destinationName);
+                destination->update();
+                mDestinationName = destinationName;
+                destinationNameInvalid = false;
+            }
+        } catch (const std::exception&) {
+            OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SAVENEWDESTINATIONNAME_EXIT);
+            return;
+        }
+        delete destination;
+        delete cmm;
+        
+        if (destinationNameInvalid) {   
+            // Validation function has modified destination name 
+            // to be error string
+            showRenameError(destinationName);
+        } else {
+            OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_SAVENEWDESTINATIONNAME, "CpDestinationEntryItemData::saveNewDestinationName: emit destination changed");
+            emit destChanged();
+        }
+    }
+    OstTraceFunctionExit0(DUP1_CPDESTINATIONENTRYITEMDATA_SAVENEWDESTINATIONNAME_EXIT);
+}
+
+/*!
+ * Helper function for showing error note when user inputs
+ * invalid destination name.
+ */
+void CpDestinationEntryItemData::showRenameError(const QString &info)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SHOWRENAMEERROR_ENTRY);
+    // Destination name NOK. Inform user and ask again.
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    note->clearActions();
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    note->setText(info);
+    note->setTimeout(HbPopup::NoTimeout);
+    HbAction *errorOk = new HbAction(
+        hbTrId("txt_common_button_ok"),
+        note);
+    bool connected = connect(
+        errorOk,
+        SIGNAL(triggered()),
+        this,
+        SLOT(renameDestination()));
+    Q_ASSERT(connected);                        
+    note->addAction(errorOk);
+    note->show();
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SHOWRENAMEERROR_EXIT);
+}
+
+/*!
+    Helper function for showing error notes.
+    
+    @param[in] info Info string to be shown in note.
+ */
+void CpDestinationEntryItemData::showErrorNote(const QString &info)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_ENTRY);
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeWarning);
+    note->clearActions();
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    note->setText(info);
+    note->setTimeout(HbPopup::NoTimeout);
+    HbAction *errorOk = new HbAction(
+        hbTrId("txt_common_button_ok"),
+        note);
+    note->addAction(errorOk);
+    note->show();    
+    OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_EXIT);
+}
+
+/*!
+    Helper function for showing icons.
+    
+    \return Returns string representing given destination's icon
+ */
+QString CpDestinationEntryItemData::resolveApIcon(QSharedPointer<CmConnectionMethodShim> cm) const
+{
+    QString result(cm->getIcon());
+    
+    if (result.isEmpty()) {
+        uint bearerType = cm->getIntAttribute(CMManagerShim::CmBearerType);
+        switch (bearerType) {
+            case CMManagerShim::BearerTypeWlan:
+                result = "qtg_small_wlan";
+                break;
+            case CMManagerShim::BearerTypePacketData:
+                result = "qtg_small_gprs";
+                break;
+            default:
+                // Unknown bearer type
+                break;
+        }
+    }
+    return result;
+}
+
+/*!
+    Event filter for updating priorities when arrange mode is active.
+    
+    \return Returns false so that event gets forwarded
+ */
+bool CpDestinationEntryItemData::eventFilter(QObject *object, QEvent *event)
+{
+    Q_UNUSED(object);
+    if (event->type() == QEvent::GraphicsSceneMouseRelease) {
+        updateIndex();
+    }
+    return false;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,476 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* CpDestinationGroup contains all destination UI items as well as 
+* items for uncategorized access points and adding new destinations.
+*/
+
+// System includes
+
+#include <QDir>
+#include <QPluginLoader>
+#include <QStringList>
+
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormViewItem>
+#include <HbParameterLengthLimiter>
+
+#include <cpbasesettingview.h>
+#include <cpitemdatahelper.h>
+#include <cpsettingformentryitemdataimpl.h>
+#include <cpsettingformitemdata.h>
+#include <cmmanager_shim.h>
+#include <cmdestination_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+#include "cpdestinationgroup.h"
+#include "cpdestinationentryitem.h"
+#include "cpadddestinationentryitemdata.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpdestinationgroupTraces.h"
+#endif
+
+/*!
+    \class  CpDestinationGroup
+    \brief  This class contains all data items representing destinations
+    in commsdat. 
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    
+    Constructor.
+    
+    @param[in] itemDataHelper Helper for connecting signals and slots.
+ */
+CpDestinationGroup::CpDestinationGroup(CpItemDataHelper &itemDataHelper) :
+    CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_destinations_access_points")),
+    mItemDataHelper(&itemDataHelper),
+    mUncategorisedShown(false),
+    mCmManager(new CmManagerShim()),
+    mBearerPlugins(new QList<CpBearerApPluginInterface *>())
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_CPDESTINATIONGROUP_ENTRY);
+    
+    this->loadBearerPlugins();
+    
+    QList<QSharedPointer<CmDestinationShim> > destinationList;
+    fetchDestinations(destinationList);
+
+    // Create Destination list
+    for (int i = 0; i < destinationList.count(); i++) {
+        QString iapCount = 
+			getDestinationAdditionalText(destinationList.at(i));
+        
+        // Create new destination entry
+        CpDestinationEntryItemData *destDataItem;
+        destDataItem = new CpDestinationEntryItemData(itemDataHelper);
+        destDataItem->setContentWidgetData(QString("text"), destinationList.at(i)->name());
+        destDataItem->setContentWidgetData(QString("additionalText"),iapCount);
+        destDataItem->setDestinationId(destinationList.at(i)->id());
+        destDataItem->setDestinationName(destinationList.at(i)->name());
+        HbIcon destIcon(resolveDestinationIcon(destinationList.at(i)));
+        destDataItem->setEntryItemIcon(destIcon);
+        bool connected = connect(
+            destDataItem, 
+            SIGNAL(destChanged()), 
+            this, 
+            SLOT(updateDestinationInformation()));
+        Q_ASSERT(connected);
+        this->appendChild(destDataItem);
+    }
+    
+    // Add "Uncategorised Iaps" button
+    createUncategorisedDestination();
+    
+    // "Add Destination" button
+    CpSettingFormEntryItemData *addDest = new CpAddDestinationEntryItemData(
+        itemDataHelper,
+        this);
+    addDest->setContentWidgetData(
+        QString("text"),
+        hbTrId("txt_occ_button_add_destination"));
+    this->appendChild(addDest);
+
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_CPDESTINATIONGROUP_EXIT);
+}
+
+/*!
+    Destructor
+ */
+CpDestinationGroup::~CpDestinationGroup()
+{
+    OstTraceFunctionEntry0(DUP1_CPDESTINATIONGROUP_CPDESTINATIONGROUP_ENTRY);
+    
+    delete mBearerPlugins;
+    delete mCmManager;
+    
+    OstTraceFunctionExit0(DUP1_CPDESTINATIONGROUP_CPDESTINATIONGROUP_EXIT);
+}
+
+/*!
+    addDestination() creates new destination item to Destinations group item.
+    The new destination is shown in the UI immediately.
+ */
+void CpDestinationGroup::addDestination(
+    const QString &name,
+    QSharedPointer<CmDestinationShim> dest)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_ADDDESTINATION_ENTRY);
+    
+    // Create UI item for new destination
+    CpDestinationEntryItemData *destDataItem;
+    destDataItem = new CpDestinationEntryItemData(*mItemDataHelper);
+    destDataItem->setContentWidgetData(QString("text"), name);
+    destDataItem->setContentWidgetData(
+        QString("additionalText"), 
+        hbTrId("txt_occ_dblist_internet_val_no_access_points"));
+    destDataItem->setDestinationId(dest->id());
+    destDataItem->setDestinationName(name);
+    HbIcon destIcon(resolveDestinationIcon(dest));
+    destDataItem->setEntryItemIcon(destIcon);
+    connect(
+        destDataItem,
+        SIGNAL(destChanged()),
+        this,
+        SLOT(updateDestinationInformation()));
+    
+    // Insert Child to correct position
+    QList<QSharedPointer<CmDestinationShim> > destinationList;
+    fetchDestinations(destinationList);
+    insertChild(destinationList.count() - 1, destDataItem);
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_ADDDESTINATION_EXIT);
+}
+
+/*!
+    Deletes destination from commsdat and removes it from UI.
+ */
+void CpDestinationGroup::deleteDestination(int destId)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_DELETEDESTINATION_ENTRY);
+    
+    // "Add Destination" child is removed from count (childCount() -1)
+    for (int i = 0; i < this->childCount() - 1; i++) { 
+        CpDestinationEntryItemData  *destDataItem = 
+            static_cast<CpDestinationEntryItemData*>(this->childAt(i));
+
+        if (destDataItem->destinationId() == destId) {
+            int index = this->indexOf(destDataItem);
+            this->removeChild(index);
+            
+            if (!mUncategorisedShown) {
+            // Return "Uncategorised" item to UI if necessary
+            createUncategorisedDestination();
+            }
+        }
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_DELETEDESTINATION_EXIT);
+}
+
+/*!
+    Finds correct access point settings implementation according to
+    access point bearer type.
+    
+    \return Returns pointer to CpBearerApPluginInterface which implements
+            access point settins.
+ */
+CpBearerApPluginInterface *CpDestinationGroup::findBearerPlugin(int apId)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_FINDBEARERPLUGIN_ENTRY);
+    
+    CpBearerApPluginInterface *retVal = NULL;
+    try {
+        CmConnectionMethodShim *cm = mCmManager->connectionMethod(apId);
+        int apBearerType = cm->getIntAttribute(CMManagerShim::CmBearerType);
+    
+        for (int i = 0; i < mBearerPlugins->count(); i++) {
+            if (mBearerPlugins->at(i)->bearerType() == apBearerType) {
+                retVal = mBearerPlugins->at(i);
+                break;
+            }
+        }
+        delete cm;
+    }
+    catch (const std::exception&) {
+        OstTrace0(
+            TRACE_NORMAL,
+            CPDESTINATIONGROUP_FINDBEARERPLUGIN,
+            "CpDestinationGroup::findBearerPlugin: Exception caught");
+        // Let return value be NULL.
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_FINDBEARERPLUGIN_EXIT);
+    return retVal;
+}
+
+/*!
+    Updates all destination group items' destinations' information. 
+    (Name and access point count)
+ */
+void CpDestinationGroup::updateDestinationInformation()
+{
+	OstTraceFunctionEntry0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_ENTRY);
+	
+	// "Add Destination" child is removed from count (childCount() -1)
+    for (int i = 0; i < childCount() - 1; i++) {
+        CpDestinationEntryItemData  *destDataItem = 
+            static_cast<CpDestinationEntryItemData*>(this->childAt(i));
+        
+        if (destDataItem->destinationId() == 0) {
+            // Uncategrised Iaps
+	        QList<uint> apList;
+            mCmManager->connectionMethod(apList);
+            if (apList.count() == 0) {
+                // delete empty uncategorised IAPs destination
+                int index = this->indexOf(destDataItem);
+                this->removeChild(index);
+                mUncategorisedShown = false;
+                continue;
+            } 
+        }
+        QString iapCount = getDestinationAdditionalText(destDataItem->destinationId());
+        destDataItem->setContentWidgetData(QString("additionalText"), iapCount);
+        destDataItem->setContentWidgetData(QString("text"), destDataItem->destinationName());
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_EXIT);
+}
+
+/*!
+    Creates item for uncategorized access points to destination group item
+    if there is any.
+ */
+void CpDestinationGroup::createUncategorisedDestination()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_CREATEUNCATEGORISEDDESTINATION_ENTRY);
+    
+    QList<uint> apList;
+    mCmManager->connectionMethod(apList);
+    if (apList.count() > 0) {
+        // Create new destination entry
+        CpDestinationEntryItemData *destDataItem;
+        destDataItem = new CpDestinationEntryItemData(*mItemDataHelper);
+        destDataItem->setContentWidgetData(QString("text"), hbTrId("txt_occ_dblist_uncategorized"));
+        QString iapCount = getDestinationAdditionalText(0);
+        destDataItem->setContentWidgetData(QString("additionalText"),iapCount);
+        destDataItem->setDestinationId(0);
+        destDataItem->setDestinationName(hbTrId("txt_occ_dblist_uncategorized"));
+        HbIcon destIcon(mCmManager->getUncategorizedIcon());
+        destDataItem->setEntryItemIcon(destIcon);
+        bool connected = connect(
+            destDataItem, 
+            SIGNAL(destChanged()), 
+            this, 
+            SLOT(updateDestinationInformation()));
+        Q_ASSERT(connected);
+        QList<QSharedPointer<CmDestinationShim> > destinationList;
+        fetchDestinations(destinationList);
+        
+        insertChild(destinationList.count(), destDataItem);
+        mUncategorisedShown = true;
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_CREATEUNCATEGORISEDDESTINATION_EXIT);
+}
+
+/*!
+    Searches all destinations from commsdat. List of representing 
+    CmDestinationShim * items returned on completion.
+ */
+void CpDestinationGroup::fetchDestinations(
+    QList<QSharedPointer<CmDestinationShim> > &destinationList)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_FETCHDESTINATIONS_ENTRY);
+    
+    try {
+        QList<uint> destArray;
+        mCmManager->allDestinations(destArray);
+    
+        for (int i = 0; i < destArray.count(); i++) {
+            CmDestinationShim *destination;
+            destination = mCmManager->destination(destArray[i]);
+            if (!destination->isHidden()) {
+                destinationList.append(QSharedPointer<CmDestinationShim>(destination));
+            } else {
+                delete destination;
+            }
+        }
+    } catch (const std::exception&) {
+        OstTrace0(
+            TRACE_NORMAL,
+            CPDESTINATIONGROUP_FETCHDESTINATIONS,
+            "CpDestinationGroup::fetchDestinations: exception caught, Reading destinations");
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_FETCHDESTINATIONS_EXIT);
+}
+
+/*!
+    Searches all bearer plugins from fixed location and loads them.
+    
+    \sa findBearerPlugin()
+ */
+void CpDestinationGroup::loadBearerPlugins()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_LOADBEARERPLUGINS_ENTRY);
+    
+    // Load bearer plugins
+    QDir pluginsDir("\\resource\\qt\\plugins\\controlpanel\\bearerap");
+    foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
+        
+        QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
+        CpBearerApPluginInterface *plugin = 
+            qobject_cast<CpBearerApPluginInterface *>(loader.instance());
+        if (plugin) {
+            mBearerPlugins->append(plugin);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPDESTINATIONGROUP_LOADBEARERPLUGINS_EXIT);
+}
+
+/*!
+    Helper function to be used in localisation. (Overloaded)
+    
+    \return Returns correct localized QString according to access point count.
+ */
+QString CpDestinationGroup::getDestinationAdditionalText(QSharedPointer<CmDestinationShim> destination)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_ENTRY);
+    
+    QString result = "";
+    int iapCount = destination->connectionMethodCount();
+    int counter = 0;
+    for (int i = 0; i < iapCount; i++) {
+        CmConnectionMethodShim *cm = destination->connectionMethod(i);
+        if (cm->getBoolAttribute(CMManagerShim::CmDestination)
+            || cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+            counter++;
+        }
+        delete cm; 
+    }
+    iapCount = iapCount - counter;
+    if (iapCount > 0) {
+        result = hbTrId("txt_occ_dblist_internet_val_ln_access_points", iapCount);
+    } else {
+        result = hbTrId("txt_occ_dblist_internet_val_no_access_points");
+    }
+    
+    OstTrace0(TRACE_FLOW, CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_EXIT, "Exit");
+    return result;
+}
+
+/*!
+    Helper function to be used in localisation. (Overloaded)
+    
+    \return Returns correct localized QString according to access point count.
+ */
+QString CpDestinationGroup::getDestinationAdditionalText(int destinationId)
+{
+    OstTraceFunctionEntry0(CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT2_ENTRY);
+    
+    QString result = "";
+    int iapCount = 0;
+    int counter = 0;
+    if (destinationId == 0) {
+        QList<uint> apList;
+        mCmManager->connectionMethod(apList);
+        iapCount = apList.count();
+        for (int i = 0; i < iapCount; i++) {
+            CmConnectionMethodShim *cm = mCmManager->connectionMethod(apList[i]);
+            if (cm->getBoolAttribute(CMManagerShim::CmDestination)
+                || cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                counter++;
+            }
+            delete cm; 
+        }
+    } else {
+        CmDestinationShim *destination = mCmManager->destination(destinationId);
+        iapCount = destination->connectionMethodCount();
+        for (int i = 0; i < iapCount; i++) {
+            CmConnectionMethodShim *cm = destination->connectionMethod(i);
+            if (cm->getBoolAttribute(CMManagerShim::CmDestination)
+                || cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                counter++;
+            }
+            delete cm; 
+        }
+        delete destination;
+    }
+    iapCount = iapCount - counter;
+    if (iapCount > 0) {
+        result = hbTrId("txt_occ_dblist_internet_val_ln_access_points", iapCount);
+    } else {
+        result = hbTrId("txt_occ_dblist_internet_val_no_access_points");
+    }
+    
+    OstTrace0(TRACE_FLOW, CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT2_EXIT, "Exit");
+    return result;
+}
+
+/*!
+    Helper function for showing icons.
+    
+    \return Returns string representing given destination's icon
+ */
+QString CpDestinationGroup::resolveDestinationIcon(
+    QSharedPointer<CmDestinationShim> destination) const
+{
+    QString result(destination->getIcon());
+    
+    if (result.isEmpty()) {
+        uint metaData = destination->metadata(CMManagerShim::SnapMetadataPurpose);
+        switch (metaData) {
+            case CMManagerShim::SnapPurposeInternet:
+                result = "qtg_small_internet";
+                break;
+                
+            case CMManagerShim::SnapPurposeIntranet:
+                result = "qtg_small_intranet";
+                break;
+                
+            case CMManagerShim::SnapPurposeMMS:
+                result = "qtg_small_mms";
+                break;
+                
+            case CMManagerShim::SnapPurposeOperator:
+                result = "qtg_small_operator";
+                break;
+                
+            default:
+                // CMManagerShim::SnapPurposeUnknown
+                result = "qtg_small_favorite";
+                break;
+        }
+    }
+    
+    return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*   Control Panel plugin for showing destinations and access points
+*   settings.
+*/
+
+// System includes
+#include <QApplication>
+#include <QLocale>
+#include <QTranslator>
+
+// User includes
+#include "cpdestinationplugin.h"
+#include "cpdestinationgroup.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpdestinationpluginTraces.h"
+#endif
+/*!
+    \class  CpDestinationPlugin
+    \brief  This class is a Control Panel plugin for accessing
+            destination and access point settings.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!         
+    Constructor.
+ */
+CpDestinationPlugin::CpDestinationPlugin()
+{
+    OstTraceFunctionEntry0(CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_ENTRY);
+    // Install localization
+    QString lang = QLocale::system().name();
+    QString path = "z:/resource/qt/translations/";
+    mTranslator = new QTranslator(this);
+    mTranslator->load(path + "cpdestinationplugin_" + lang);
+    qApp->installTranslator(mTranslator);
+    OstTraceFunctionExit0(CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_EXIT);
+}
+
+/*!
+    Destructor.
+ */
+CpDestinationPlugin::~CpDestinationPlugin()
+{
+    OstTraceFunctionEntry0(DUP1_CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_ENTRY);
+    OstTraceFunctionExit0(DUP1_CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_EXIT);
+}
+
+/*!
+    Inherited member from CpPluginInterface. 
+    
+    @param[in] itemDataHelper Helper for connecting signals and slots.
+    
+    \return Returns only one data item in QList. The item contains destination group item.
+ */
+QList<CpSettingFormItemData*> CpDestinationPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+    OstTraceFunctionEntry0(CPDESTINATIONPLUGIN_CREATESETTINGFORMITEMDATA_ENTRY);
+    QList<CpSettingFormItemData*> settingFormData;
+    settingFormData.append(new CpDestinationGroup(itemDataHelper));
+    
+    OstTraceFunctionExit0(CPDESTINATIONPLUGIN_CREATESETTINGFORMITEMDATA_EXIT);
+    return settingFormData;
+}
+
+Q_EXPORT_PLUGIN2(cpdestinationplugin, CpDestinationPlugin);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/src/cpiapitem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,513 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*   Data item for representing access points in UI.
+*/
+
+// System includes
+#include <QObject>
+#include <HbMenu>
+#include <HbAction>
+#include <HbDocumentLoader>
+#include <HbRadioButtonList>
+#include <HbDialog>
+#include <HbMessageBox>
+#include <HbPopup>
+#include <HbLabel>
+#include <HbDataFormViewItem>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbParameterLengthLimiter>
+#include <cpbasesettingview.h>
+#include <cpsettingformitemdata.h>
+#include <cpsettingformentryitemdata.h>
+#include <cpitemdatahelper.h>
+#include <cmdestination_shim.h>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+#include "cpiapitem.h"
+#include "cpdestinationentryitem.h"
+#include "cpbearerapplugininterface.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpiapitemTraces.h"
+#endif
+/*!
+    \class  CpIapItem
+    \brief  This class represents access point in data model. 
+            It takes care of all access point related operations.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!         
+   Constructor.
+   
+   @param[in] itemDataHelper Helper for connecting signals and slots.
+   @param[in] iapId Unique ID if the access point this object represents.
+   @param[in] iapName Name of the access point this object represents.
+   @param[in] destId Unique ID of the destination that contains reference to 
+              the access point this object represents.
+   @param[in] bearerPlugin Pointer to the object that implements settings view
+              for this access point.
+ */
+CpIapItem::CpIapItem(
+    CpItemDataHelper &itemDataHelper,  
+    int iapId, 
+    const QString &iapName, 
+    int destId,
+    bool apProtected,
+    CpBearerApPluginInterface *bearerPlugin) :
+    CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper), 
+    mIapId(iapId), 
+    mIapName(iapName),
+    mDestId(destId),
+    mItemDataHelper(&itemDataHelper),
+    mBearerPlugin(bearerPlugin),
+    mMoveOngoing(false),
+    mDialog(0),
+    mList(0)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_CPIAPITEM_ENTRY);
+    try {
+        mCmm = new CmManagerShim();
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPIAPITEM_CPIAPITEM, "CpIapItem::CpIapItem: Exception caught");
+        mCmm = NULL;
+    }
+    
+    // Fix connections
+    itemDataHelper.removeConnection(this,SIGNAL(pressed()),this,SLOT(onLaunchView()));
+    if (!apProtected) {
+        itemDataHelper.addConnection(
+            this,
+            SIGNAL(longPress(QPointF)),
+            this,
+            SLOT(showItemMenu(QPointF)));
+        itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(onLaunchView()));
+        itemDataHelper.addConnection(
+            this,
+            SIGNAL(visibleChanged()),
+            this, 
+            SLOT(updateIap()));
+    }
+    OstTraceFunctionExit0(CPIAPITEM_CPIAPITEM_EXIT);
+}
+
+/*!
+    Destructor
+ */
+CpIapItem::~CpIapItem()
+{
+    OstTraceFunctionEntry0(DUP1_CPIAPITEM_CPIAPITEM_ENTRY);
+    delete mCmm;
+    OstTraceFunctionExit0(DUP1_CPIAPITEM_CPIAPITEM_EXIT);
+}
+
+/*!
+    Shows user the item specific menu. The menu is triggered by long pressing
+    the access point item.
+    
+    @param[in] position Preferred position for the item specific menu.
+ */
+void CpIapItem::showItemMenu(QPointF position)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SHOWITEMMENU_ENTRY);
+    if (isCmManagerAvailable()) {
+        bool settingsReadSuccessful = true;
+        bool cmConnected = false;
+        try {
+            CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
+            cmConnected = cm->getBoolAttribute(CMManagerShim::CmConnected);
+            delete cm;
+        } 
+        catch (const std::exception&)  {
+            OstTrace0(TRACE_NORMAL, CPIAPITEM_SHOWITEMMENU, "CpIapItem::showItemMenu: Exception caught");
+            settingsReadSuccessful = false;
+        }
+        if (settingsReadSuccessful) {
+            // Settings could be read from commsdat: show menu.
+            createItemMenu(cmConnected, position)->show();
+        }    
+    }
+    OstTraceFunctionExit0(CPIAPITEM_SHOWITEMMENU_EXIT);
+}
+
+/*!
+    Prompts user for destination where access point is to be 
+    added and then makes the move in commsdat.
+ */
+void CpIapItem::moveIap()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_MOVEIAP_ENTRY);
+    mMoveOngoing = true;
+    queryDestination();
+    OstTraceFunctionExit0(CPIAPITEM_MOVEIAP_EXIT);
+}
+
+/*!
+    Shows confirmation query for access point deletion.
+ */
+void CpIapItem::showDeleteConfirmation()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SHOWDELETECONFIRMATION_ENTRY);
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+    note->clearActions();
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    note->setText(HbParameterLengthLimiter(
+        "txt_occ_info_delete_access_point_1").arg(mIapName));
+    HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_yes"));
+    bool connected = connect(
+        primaryAction, 
+        SIGNAL(triggered()), 
+        this, 
+        SLOT(deleteConfirmed()));
+    Q_ASSERT(connected);
+    note->addAction(primaryAction);
+    note->addAction(new HbAction(hbTrId("txt_common_button_no")));
+    note->setTimeout(HbPopup::NoTimeout);
+    note->show();
+    OstTraceFunctionExit0(CPIAPITEM_SHOWDELETECONFIRMATION_EXIT);
+}
+
+/*!
+    Prompts user for target destination and then adds access point 
+    that this object represents to the prompted destination.
+ */
+void CpIapItem::shareIap()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SHAREIAP_ENTRY);
+    mMoveOngoing = false;
+    queryDestination();
+    OstTraceFunctionExit0(CPIAPITEM_SHAREIAP_EXIT);
+}
+
+/*!
+    Completes either saving or sharing of access point by 
+    making the move in commsdat.
+ */
+void CpIapItem::queryDialogClosed()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_QUERYDIALOGCLOSED_ENTRY);
+    if (mMoveOngoing) {
+        saveMove(mDestinationList[mList->selected()]);
+    } else {
+        saveShare(mDestinationList[mList->selected()]);
+    }
+    OstTraceFunctionExit0(CPIAPITEM_QUERYDIALOGCLOSED_EXIT);
+}
+
+/*!
+    Completes the deletion process by deleting access point from
+    commsdat.
+ */
+void CpIapItem::deleteConfirmed()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_DELETECONFIRMED_ENTRY);
+    bool deleteSuccessful = true;
+    try  {
+        if (mDestId != 0) {
+            CmDestinationShim *destination = mCmm->destination(mDestId);
+            CmConnectionMethodShim *cm = destination->connectionMethodByID(mIapId);
+            destination->deleteConnectionMethod(cm);
+            destination->update();
+            delete cm;
+            delete destination;
+        } else {
+            CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
+            cm->deleteConnectionMethod();
+            delete cm;
+        }
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, DUP1_CPIAPITEM_DELETECONFIRMED, "CpIapItem::deleteConfirmed: Exception caught");
+        deleteSuccessful = false;
+    }
+    if (deleteSuccessful) {
+        this->deleteLater();
+        OstTrace0(TRACE_NORMAL, CPIAPITEM_DELETECONFIRMED, "CpIapItem::deleteConfirmed: Emit access point changed signal");
+        emit iapChanged();
+    } else {
+        showErrorNote(hbTrId("txt_occ_info_unable_to_save_setting"));
+    }
+    OstTraceFunctionExit0(CPIAPITEM_DELETECONFIRMED_EXIT);
+}
+
+/*!
+    Updates access point item name when the item becomes visible.
+ */
+void CpIapItem::updateIap()
+{
+    OstTrace0( TRACE_FLOW, CPIAPITEM_UPDATEIAP_ENTRY, "CpIapItem::updateIap entry" );
+    try {
+        CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
+        this->setContentWidgetData("text", cm->getStringAttribute(CMManagerShim::CmName));
+        delete cm;
+    } catch (const std::exception&) {
+        OstTrace0( TRACE_NORMAL, CPIAPITEM_UPDATEIAP, "CpIapItem::updateIap: exception caught, CM name reading failed" );
+    }
+    OstTrace0( TRACE_FLOW, DUP1_CPIAPITEM_UPDATEIAP_EXIT, "CpIapItem::updateIap exit" );
+}
+
+/*!
+    Opens Iap settings view.
+ */
+void CpIapItem::openIap()
+{
+    onLaunchView();
+}
+
+/*!
+    Gets access point specific view from bearer plugin.
+    
+    \return Returns settings view containing access point settings.
+ */
+CpBaseSettingView *CpIapItem::createSettingView() const
+{
+    OstTraceFunctionEntry0(CPIAPITEM_CREATESETTINGVIEW_ENTRY);
+    CpBaseSettingView *view = NULL;
+    if (mBearerPlugin != NULL) {
+        CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
+        bool cmConnected = cm->getBoolAttribute(CMManagerShim::CmConnected);
+        delete cm;
+        
+        // Do not open connected AP
+        if (!cmConnected) {
+            view = mBearerPlugin->createSettingView(mIapId);
+        }
+    }
+    OstTraceFunctionExit0(CPIAPITEM_CREATESETTINGVIEW_EXIT);
+    return view;
+}
+
+/*!
+    Prompts user for destination.
+ */
+void CpIapItem::queryDestination()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_QUERYDESTINATION_ENTRY);
+    bool readingSuccessful = true;
+    QStringList destinations;
+    try {
+        mCmm->allDestinations(mDestinationList);
+        
+        for (int i = 0; i < mDestinationList.count(); i++) {
+            CmDestinationShim *destination = mCmm->destination(mDestinationList[i]);
+            if ((destination->id() != mDestId)
+                && !destination->isHidden()) {
+
+                QString dest = destination->name();
+                destinations.append(dest);
+            } else {
+                // Remove this destination from list to sync both lists
+                mDestinationList.removeAt(i);
+                i--;
+            }
+            delete destination;
+        }
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, CPIAPITEM_QUERYDESTINATION, "CpIapItem::queryDestination: exception caught");
+        readingSuccessful = false;
+    }
+    
+    if (readingSuccessful) {
+        // Load DocML 
+        bool ok = false;
+        HbDocumentLoader *loader = new HbDocumentLoader();
+        loader->load(":/docml/cpdestinationplugindialogs.docml", &ok);
+        mDialog = qobject_cast<HbDialog *>(loader->findWidget("dialog"));
+        HbLabel *heading = qobject_cast<HbLabel *>(loader->findWidget("heading"));
+        heading->setPlainText(hbTrId("txt_occ_dialog_select_network_destination_to_be_ac"));
+        mList = qobject_cast<HbRadioButtonList *>(loader->findWidget("radioButtonList")); 
+        mList->setItems(destinations);
+        mList->setSelected(0);
+        mOk = qobject_cast<HbAction *>(loader->findObject("okAction"));
+        bool connected = connect(mOk, 
+                                 SIGNAL(triggered()), 
+                                 this, 
+                                 SLOT(queryDialogClosed()));
+        Q_ASSERT(connected);
+        mDialog->show();
+        delete loader;
+    } else {
+        OstTrace0(TRACE_NORMAL, DUP1_CPIAPITEM_QUERYDESTINATION, " CpIapItem::queryDestination: exception caught");
+        showErrorNote(hbTrId("txt_occ_info_unable_to_read_settings"));
+    }
+    OstTraceFunctionExit0(CPIAPITEM_QUERYDESTINATION_EXIT);
+}
+
+/*!
+    Shares access point to given destination.
+    
+    @param[in] id Target destination's ID
+ */
+void CpIapItem::saveShare(int id)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SAVESHARE_ENTRY);
+    try {
+        CmConnectionMethodShim *cm;
+        CmDestinationShim *source = mCmm->destination(mDestId);
+        cm = source->connectionMethodByID(mIapId);
+        delete source;
+        CmDestinationShim *target = mCmm->destination(id);
+        target->addConnectionMethod(cm);
+        target->update();
+        delete cm;
+        delete target;
+        OstTrace0(TRACE_NORMAL, CPIAPITEM_SAVESHARE, "CpIapItem::saveShare: Emit access point changed signal");
+        emit iapChanged();
+    } catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, DUP1_CPIAPITEM_SAVESHARE, "CpIapItem::saveShare: Exception caught");
+        showErrorNote(hbTrId("txt_occ_info_unable_to_read_settings"));
+    }
+    OstTraceFunctionExit0(CPIAPITEM_SAVESHARE_EXIT);
+}
+
+/*!
+    Moves access point from current destination to given destination.
+    
+    @param[in] id Target destination's ID
+ */
+void CpIapItem::saveMove(int id)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SAVEMOVE_ENTRY);
+    try {
+        // Make move in commsdat
+        CmConnectionMethodShim *cm = NULL;
+        if (mDestId != 0) {
+            CmDestinationShim *source = mCmm->destination(mDestId);
+            cm = source->connectionMethodByID(mIapId);
+            source->removeConnectionMethod(cm);
+            source->update();
+            delete source;
+        } else {
+            cm = mCmm->connectionMethod(mIapId);
+        }
+        CmDestinationShim *target = mCmm->destination(id);
+        target->addConnectionMethod(cm);
+        target->update();
+        delete target;
+        delete cm;
+    }
+    catch (const std::exception&) {
+        OstTrace0(TRACE_NORMAL, DUP1_CPIAPITEM_SAVEMOVE, "CpIapItem::saveMove: Exception caught");
+        showErrorNote(hbTrId("txt_occ_info_unable_to_save_setting"));
+    }
+    OstTrace0(TRACE_NORMAL, CPIAPITEM_SAVEMOVE, "CpIapItem::saveMove: Emit access point changed signal");
+    emit iapChanged(); 
+    OstTraceFunctionExit0(CPIAPITEM_SAVEMOVE_EXIT);
+}
+
+/*!
+    Tests if CmManagerShim has been created successfully
+    earlier. If not, it retries.
+ */
+bool CpIapItem::isCmManagerAvailable()
+{
+    OstTraceFunctionEntry0(CPIAPITEM_ISCMMANAGERAVAILABLE_ENTRY);
+    bool retval = false;
+    if (mCmm == NULL) {
+        try {
+            mCmm = new CmManagerShim();
+            retval = true;
+        }
+        catch (const std::exception&) {
+            OstTrace0(TRACE_NORMAL, CPIAPITEM_ISCMMANAGERAVAILABLE, "CpIapItem::isCmManagerAvailable: Exception caught");
+            mCmm = NULL;
+        }
+    } else {
+        retval = true;
+    }
+    OstTraceFunctionExit0(CPIAPITEM_ISCMMANAGERAVAILABLE_EXIT);
+    return retval;
+}
+
+/*!
+    Helper function for creating item specific menu.
+    
+    @param[in] protLvl Effective protection level for this
+                       access point.
+ */
+HbMenu *CpIapItem::createItemMenu(
+    bool cmConnected,
+    const QPointF &position)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_CREATEITEMMENU_ENTRY);
+    HbMenu* menu = new HbMenu();
+    menu->setAttribute(Qt::WA_DeleteOnClose);
+    HbAction* openIapAction 
+            = menu->addAction(hbTrId("txt_common_menu_open"));
+    bool connected = connect(openIapAction, SIGNAL(triggered()), this, SLOT(openIap()));
+    Q_ASSERT(connected);
+    HbAction* moveIapAction 
+        = menu->addAction(hbTrId("txt_occ_menu_move_to_other_destination"));
+    connected = connect(moveIapAction, SIGNAL(triggered()), this, SLOT(moveIap()));
+    Q_ASSERT(connected);
+    HbAction* deleteIapAction 
+        = menu->addAction(hbTrId("txt_common_menu_delete"));
+    connected = connect(
+        deleteIapAction, 
+        SIGNAL(triggered()), 
+        this, 
+        SLOT(showDeleteConfirmation()));
+    Q_ASSERT(connected);
+    HbAction* shareIapAction 
+        = menu->addAction(hbTrId("txt_occ_menu_share_to_other_destination"));
+    connected = connect(shareIapAction, SIGNAL(triggered()), this, SLOT(shareIap()));
+    Q_ASSERT(connected);
+       
+    if (cmConnected) {
+        // Disable operations for connected APs
+        openIapAction->setDisabled(true);
+        moveIapAction->setDisabled(true);
+        deleteIapAction->setDisabled(true);
+        shareIapAction->setDisabled(true);
+    }
+    
+    // Can't share uncategorised APs
+    if (mDestId == 0)
+    {
+        shareIapAction->setDisabled(true);
+    }
+       
+    menu->setPreferredPos(position);
+    OstTraceFunctionExit0(CPIAPITEM_CREATEITEMMENU_EXIT);
+    return menu;
+}
+
+/*!
+    Helper function for showing error notes.
+    
+    @param[in] info Info string to be shown in note.
+ */
+void CpIapItem::showErrorNote(const QString &info)
+{
+    OstTraceFunctionEntry0(CPIAPITEM_SHOWERRORNOTE_ENTRY);
+    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    note->clearActions();
+    note->setAttribute(Qt::WA_DeleteOnClose);
+    note->setText(info);
+    note->setTimeout(HbPopup::NoTimeout);
+    HbAction *errorOk = new HbAction(hbTrId("txt_common_button_ok"));                       
+    note->addAction(errorOk);
+    note->show();    
+    OstTraceFunctionExit0(CPIAPITEM_SHOWERRORNOTE_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * OST trace header file.
+ *
+ */
+
+#ifndef OSTTRACEDEFINITIONS_H
+#define OSTTRACEDEFINITIONS_H
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/hbautotest.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,831 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "hbautotest.h"
+#include <hbmainwindow.h>
+#include <hbwidget.h>
+
+
+const qreal STEP = 4; //How many pixels to drag before sending an event
+
+//Init static members
+bool HbAutoTest::pointerPressed = false;
+QPointF HbAutoTest::pressPoint = QPointF();
+
+void HbAutoTest::mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    if (pointerPressed) {
+        //Now we should drag an item
+        drag(window, targetPoint);
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            qApp->notify((window->viewport()), &me);
+            QCoreApplication::sendPostedEvents();
+            QTest::qWait(1);
+    } else {
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            qApp->notify((window->viewport()), &me);
+            QCoreApplication::sendPostedEvents();
+            QTest::qWait(1);
+
+    }
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+ 
+void HbAutoTest::mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=true;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    pressPoint=targetPoint;
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+    QCoreApplication::sendPostedEvents();
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=false;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    pressPoint=QPointF();
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+    QTest::qWait(1);
+
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    HbAutoTestMouseEvent me2 (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton,
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me2);
+    qApp->notify((window->viewport()), &me2);
+    QCoreApplication::sendPostedEvents();
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}   
+
+QPointF HbAutoTest::middlePointOfWidget( const HbWidget* widget)
+{
+    QRectF widgetRect = widget->rect();
+    QRectF widgetSceneRect = widget->mapRectToScene(widgetRect);
+    qreal middleX = ((widgetSceneRect.right() - widgetSceneRect.left())/2)+widgetSceneRect.left();
+    qreal middleY = ((widgetSceneRect.bottom() - widgetSceneRect.top())/2)+widgetSceneRect.top();  
+    return QPointF(middleX,middleY);
+}
+
+
+
+void HbAutoTest::drag(HbAutoTestMainWindow *window, QPointF targetPoint)
+{
+    qreal tempX = targetPoint.x() - pressPoint.x();
+    qreal tempY = targetPoint.y() - pressPoint.y();
+    qreal totalTrip = sqrt ((tempX * tempX) + (tempY * tempY));
+    
+    int numberOfSteps = qRound(totalTrip / STEP);
+    HbAutoTestMouseEvent me (
+        QEvent::MouseMove, 
+        targetPoint.toPoint(), 
+        window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+        Qt::NoButton , 
+        Qt::LeftButton, 
+        Qt::NoModifier);
+
+    QPointF nextPanPoint=pressPoint;
+    for (int i=1; i<numberOfSteps; i++) { //On purpose not =<
+        
+        nextPanPoint.setY (pressPoint.y()+((i / (qreal)numberOfSteps) * tempY));
+        nextPanPoint.setX (pressPoint.x()+((i / (qreal)numberOfSteps) * tempX));
+        
+        QCursor::setPos(window->mapToGlobal(nextPanPoint.toPoint()));
+
+        me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            nextPanPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(nextPanPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+
+        QSpontaneKeyEvent::setSpontaneous(&me);
+        qApp->notify((window->viewport()), &me);
+        QCoreApplication::sendPostedEvents();
+    }
+
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    //One more (or the only one) step to the target
+    me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            targetPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    qApp->notify((window->viewport()), &me);
+    QCoreApplication::sendPostedEvents();
+}
+
+
+void HbAutoTest::simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay)
+    {
+        //Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        /*extern int Q_TESTLIB_EXPORT defaultKeyDelay();
+
+        if (delay == -1 || delay < defaultKeyDelay())
+            delay = defaultKeyDelay();
+        if(delay > 0)
+            QTest::qWait(delay);*/
+        Q_UNUSED(delay);
+        QTest::qWait(10); //TODO: Remove this and reveal above out-commented code
+
+        HbAutoTestKeyEvent a(press ? QEvent::KeyPress : QEvent::KeyRelease, code, modifier, text, repeat);
+        QSpontaneKeyEvent::setSpontaneous(&a);
+        if (!qApp->notify(widget, &a))
+            QTest::qWarn("Keyboard event not accepted by receiving widget");
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay)
+    {
+        QTEST_ASSERT(qApp);
+
+        if (!widget)
+            widget = QWidget::keyboardGrabber();
+        if (!widget) {
+            if (QWidget *apw = QApplication::activePopupWidget())
+                widget = apw->focusWidget() ? apw->focusWidget() : apw;
+            else
+                widget = QApplication::focusWidget();
+        }
+        if (!widget)
+            widget = QApplication::activeWindow();
+
+        QTEST_ASSERT(widget);
+
+        if (action == QTest::Click) {
+            QPointer<QWidget> ptr(widget);
+            sendKeyEvent(QTest::Press, widget, code, text, modifier, delay);
+            if (!ptr) {
+                // if we send key-events to embedded widgets, they might be destroyed
+                // when the user presses Return
+                return;
+            }
+            sendKeyEvent(QTest::Release, widget, code, text, modifier, delay);
+            return;
+        }
+
+        bool repeat = false;
+
+        if (action == QTest::Press) {
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, true, Qt::Key_Shift, 0, QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, true, Qt::Key_Control, modifier & Qt::ShiftModifier, QString(), false, delay);
+
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, true, Qt::Key_Alt,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, true, Qt::Key_Meta, modifier & (Qt::ShiftModifier
+                                                                      | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+            simulateEvent(widget, true, code, modifier, text, repeat, delay);
+        } else if (action == QTest::Release) {
+            simulateEvent(widget, false, code, modifier, text, repeat, delay);
+
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, false, Qt::Key_Meta, modifier, QString(), false, delay);
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, false, Qt::Key_Alt, modifier &
+                              (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, false, Qt::Key_Control,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, false, Qt::Key_Shift, modifier & Qt::ShiftModifier, QString(), false, delay);
+        }
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        QString text;
+        if (ascii)
+            text = QString(QChar::fromLatin1(ascii));
+        sendKeyEvent(action, widget, code, text, modifier, delay);
+    }
+
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, asciiToKey(ascii), ascii, modifier, delay); 
+     }
+     
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, key, keyToAscii(key), modifier, delay); 
+     }
+
+void HbAutoTest::keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        for (int i=0; i < sequence.length(); i++)
+            keyEvent(QTest::Click, widget, sequence.at(i).toLatin1(), modifier, delay);
+    }
+
+void HbAutoTest::keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); }
+    
+void HbAutoTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+
+Qt::Key HbAutoTest::asciiToKey(char ascii)
+{
+    switch ((unsigned char)ascii) {
+    case 0x08: return Qt::Key_Backspace;
+    case 0x09: return Qt::Key_Tab;
+    case 0x0b: return Qt::Key_Backtab;
+    case 0x0d: return Qt::Key_Return;
+    case 0x1b: return Qt::Key_Escape;
+    case 0x20: return Qt::Key_Space;
+    case 0x21: return Qt::Key_Exclam;
+    case 0x22: return Qt::Key_QuoteDbl;
+    case 0x23: return Qt::Key_NumberSign;
+    case 0x24: return Qt::Key_Dollar;
+    case 0x25: return Qt::Key_Percent;
+    case 0x26: return Qt::Key_Ampersand;
+    case 0x27: return Qt::Key_Apostrophe;
+    case 0x28: return Qt::Key_ParenLeft;
+    case 0x29: return Qt::Key_ParenRight;
+    case 0x2a: return Qt::Key_Asterisk;
+    case 0x2b: return Qt::Key_Plus;
+    case 0x2c: return Qt::Key_Comma;
+    case 0x2d: return Qt::Key_Minus;
+    case 0x2e: return Qt::Key_Period;
+    case 0x2f: return Qt::Key_Slash;
+    case 0x30: return Qt::Key_0;
+    case 0x31: return Qt::Key_1;
+    case 0x32: return Qt::Key_2;
+    case 0x33: return Qt::Key_3;
+    case 0x34: return Qt::Key_4;
+    case 0x35: return Qt::Key_5;
+    case 0x36: return Qt::Key_6;
+    case 0x37: return Qt::Key_7;
+    case 0x38: return Qt::Key_8;
+    case 0x39: return Qt::Key_9;
+    case 0x3a: return Qt::Key_Colon;
+    case 0x3b: return Qt::Key_Semicolon;
+    case 0x3c: return Qt::Key_Less;
+    case 0x3d: return Qt::Key_Equal;
+    case 0x3e: return Qt::Key_Greater;
+    case 0x3f: return Qt::Key_Question;
+    case 0x40: return Qt::Key_At;
+    case 0x41: return Qt::Key_A;
+    case 0x42: return Qt::Key_B;
+    case 0x43: return Qt::Key_C;
+    case 0x44: return Qt::Key_D;
+    case 0x45: return Qt::Key_E;
+    case 0x46: return Qt::Key_F;
+    case 0x47: return Qt::Key_G;
+    case 0x48: return Qt::Key_H;
+    case 0x49: return Qt::Key_I;
+    case 0x4a: return Qt::Key_J;
+    case 0x4b: return Qt::Key_K;
+    case 0x4c: return Qt::Key_L;
+    case 0x4d: return Qt::Key_M;
+    case 0x4e: return Qt::Key_N;
+    case 0x4f: return Qt::Key_O;
+    case 0x50: return Qt::Key_P;
+    case 0x51: return Qt::Key_Q;
+    case 0x52: return Qt::Key_R;
+    case 0x53: return Qt::Key_S;
+    case 0x54: return Qt::Key_T;
+    case 0x55: return Qt::Key_U;
+    case 0x56: return Qt::Key_V;
+    case 0x57: return Qt::Key_W;
+    case 0x58: return Qt::Key_X;
+    case 0x59: return Qt::Key_Y;
+    case 0x5a: return Qt::Key_Z;
+    case 0x5b: return Qt::Key_BracketLeft;
+    case 0x5c: return Qt::Key_Backslash;
+    case 0x5d: return Qt::Key_BracketRight;
+    case 0x5e: return Qt::Key_AsciiCircum;
+    case 0x5f: return Qt::Key_Underscore;
+    case 0x60: return Qt::Key_QuoteLeft;
+    case 0x61: return Qt::Key_A;
+    case 0x62: return Qt::Key_B;
+    case 0x63: return Qt::Key_C;
+    case 0x64: return Qt::Key_D;
+    case 0x65: return Qt::Key_E;
+    case 0x66: return Qt::Key_F;
+    case 0x67: return Qt::Key_G;
+    case 0x68: return Qt::Key_H;
+    case 0x69: return Qt::Key_I;
+    case 0x6a: return Qt::Key_J;
+    case 0x6b: return Qt::Key_K;
+    case 0x6c: return Qt::Key_L;
+    case 0x6d: return Qt::Key_M;
+    case 0x6e: return Qt::Key_N;
+    case 0x6f: return Qt::Key_O;
+    case 0x70: return Qt::Key_P;
+    case 0x71: return Qt::Key_Q;
+    case 0x72: return Qt::Key_R;
+    case 0x73: return Qt::Key_S;
+    case 0x74: return Qt::Key_T;
+    case 0x75: return Qt::Key_U;
+    case 0x76: return Qt::Key_V;
+    case 0x77: return Qt::Key_W;
+    case 0x78: return Qt::Key_X;
+    case 0x79: return Qt::Key_Y;
+    case 0x7a: return Qt::Key_Z;
+    case 0x7b: return Qt::Key_BraceLeft;
+    case 0x7c: return Qt::Key_Bar;
+    case 0x7d: return Qt::Key_BraceRight;
+    case 0x7e: return Qt::Key_AsciiTilde;
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case 0xa0: return Qt::Key_nobreakspace;
+    case 0xa1: return Qt::Key_exclamdown;
+    case 0xa2: return Qt::Key_cent;
+    case 0xa3: return Qt::Key_sterling;
+    case 0xa4: return Qt::Key_currency;
+    case 0xa5: return Qt::Key_yen;
+    case 0xa6: return Qt::Key_brokenbar;
+    case 0xa7: return Qt::Key_section;
+    case 0xa8: return Qt::Key_diaeresis;
+    case 0xa9: return Qt::Key_copyright;
+    case 0xaa: return Qt::Key_ordfeminine;
+    case 0xab: return Qt::Key_guillemotleft;
+    case 0xac: return Qt::Key_notsign;
+    case 0xad: return Qt::Key_hyphen;
+    case 0xae: return Qt::Key_registered;
+    case 0xaf: return Qt::Key_macron;
+    case 0xb0: return Qt::Key_degree;
+    case 0xb1: return Qt::Key_plusminus;
+    case 0xb2: return Qt::Key_twosuperior;
+    case 0xb3: return Qt::Key_threesuperior;
+    case 0xb4: return Qt::Key_acute;
+    case 0xb5: return Qt::Key_mu;
+    case 0xb6: return Qt::Key_paragraph;
+    case 0xb7: return Qt::Key_periodcentered;
+    case 0xb8: return Qt::Key_cedilla;
+    case 0xb9: return Qt::Key_onesuperior;
+    case 0xba: return Qt::Key_masculine;
+    case 0xbb: return Qt::Key_guillemotright;
+    case 0xbc: return Qt::Key_onequarter;
+    case 0xbd: return Qt::Key_onehalf;
+    case 0xbe: return Qt::Key_threequarters;
+    case 0xbf: return Qt::Key_questiondown;
+    case 0xc0: return Qt::Key_Agrave;
+    case 0xc1: return Qt::Key_Aacute;
+    case 0xc2: return Qt::Key_Acircumflex;
+    case 0xc3: return Qt::Key_Atilde;
+    case 0xc4: return Qt::Key_Adiaeresis;
+    case 0xc5: return Qt::Key_Aring;
+    case 0xc6: return Qt::Key_AE;
+    case 0xc7: return Qt::Key_Ccedilla;
+    case 0xc8: return Qt::Key_Egrave;
+    case 0xc9: return Qt::Key_Eacute;
+    case 0xca: return Qt::Key_Ecircumflex;
+    case 0xcb: return Qt::Key_Ediaeresis;
+    case 0xcc: return Qt::Key_Igrave;
+    case 0xcd: return Qt::Key_Iacute;
+    case 0xce: return Qt::Key_Icircumflex;
+    case 0xcf: return Qt::Key_Idiaeresis;
+    case 0xd0: return Qt::Key_ETH;
+    case 0xd1: return Qt::Key_Ntilde;
+    case 0xd2: return Qt::Key_Ograve;
+    case 0xd3: return Qt::Key_Oacute;
+    case 0xd4: return Qt::Key_Ocircumflex;
+    case 0xd5: return Qt::Key_Otilde;
+    case 0xd6: return Qt::Key_Odiaeresis;
+    case 0xd7: return Qt::Key_multiply;
+    case 0xd8: return Qt::Key_Ooblique;
+    case 0xd9: return Qt::Key_Ugrave;
+    case 0xda: return Qt::Key_Uacute;
+    case 0xdb: return Qt::Key_Ucircumflex;
+    case 0xdc: return Qt::Key_Udiaeresis;
+    case 0xdd: return Qt::Key_Yacute;
+    case 0xde: return Qt::Key_THORN;
+    case 0xdf: return Qt::Key_ssharp;
+    case 0xe5: return Qt::Key_Aring;
+    case 0xe6: return Qt::Key_AE;
+    case 0xf7: return Qt::Key_division;
+    case 0xf8: return Qt::Key_Ooblique;
+    case 0xff: return Qt::Key_ydiaeresis;
+    default: QTEST_ASSERT(false); return Qt::Key(0);
+    }
+}
+
+char HbAutoTest::keyToAscii(Qt::Key key)
+{
+    switch (key) {
+    case Qt::Key_Backspace: return 0x8; //BS
+    case Qt::Key_Tab: return 0x09; // HT
+    case Qt::Key_Backtab: return 0x0b; // VT
+    case Qt::Key_Enter:
+    case Qt::Key_Return: return 0x0d; // CR
+    case Qt::Key_Escape: return 0x1b; // ESC
+    case Qt::Key_Space: return 0x20;        // 7 bit printable ASCII
+    case Qt::Key_Exclam: return 0x21;
+    case Qt::Key_QuoteDbl: return 0x22;
+    case Qt::Key_NumberSign: return 0x23;
+    case Qt::Key_Dollar: return 0x24;
+    case Qt::Key_Percent: return 0x25;
+    case Qt::Key_Ampersand: return 0x26;
+    case Qt::Key_Apostrophe: return 0x27;
+    case Qt::Key_ParenLeft: return 0x28;
+    case Qt::Key_ParenRight: return 0x29;
+    case Qt::Key_Asterisk: return 0x2a;
+    case Qt::Key_Plus: return 0x2b;
+    case Qt::Key_Comma: return 0x2c;
+    case Qt::Key_Minus: return 0x2d;
+    case Qt::Key_Period: return 0x2e;
+    case Qt::Key_Slash: return 0x2f;
+    case Qt::Key_0: return 0x30;
+    case Qt::Key_1: return 0x31;
+    case Qt::Key_2: return 0x32;
+    case Qt::Key_3: return 0x33;
+    case Qt::Key_4: return 0x34;
+    case Qt::Key_5: return 0x35;
+    case Qt::Key_6: return 0x36;
+    case Qt::Key_7: return 0x37;
+    case Qt::Key_8: return 0x38;
+    case Qt::Key_9: return 0x39;
+    case Qt::Key_Colon: return 0x3a;
+    case Qt::Key_Semicolon: return 0x3b;
+    case Qt::Key_Less: return 0x3c;
+    case Qt::Key_Equal: return 0x3d;
+    case Qt::Key_Greater: return 0x3e;
+    case Qt::Key_Question: return 0x3f;
+    case Qt::Key_At: return 0x40;
+    case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a'
+    case Qt::Key_B: return 0x62;
+    case Qt::Key_C: return 0x63;
+    case Qt::Key_D: return 0x64;
+    case Qt::Key_E: return 0x65;
+    case Qt::Key_F: return 0x66;
+    case Qt::Key_G: return 0x67;
+    case Qt::Key_H: return 0x68;
+    case Qt::Key_I: return 0x69;
+    case Qt::Key_J: return 0x6a;
+    case Qt::Key_K: return 0x6b;
+    case Qt::Key_L: return 0x6c;
+    case Qt::Key_M: return 0x6d;
+    case Qt::Key_N: return 0x6e;
+    case Qt::Key_O: return 0x6f;
+    case Qt::Key_P: return 0x70;
+    case Qt::Key_Q: return 0x71;
+    case Qt::Key_R: return 0x72;
+    case Qt::Key_S: return 0x73;
+    case Qt::Key_T: return 0x74;
+    case Qt::Key_U: return 0x75;
+    case Qt::Key_V: return 0x76;
+    case Qt::Key_W: return 0x77;
+    case Qt::Key_X: return 0x78;
+    case Qt::Key_Y: return 0x79;
+    case Qt::Key_Z: return 0x7a;
+    case Qt::Key_BracketLeft: return 0x5b;
+    case Qt::Key_Backslash: return 0x5c;
+    case Qt::Key_BracketRight: return 0x5d;
+    case Qt::Key_AsciiCircum: return 0x5e;
+    case Qt::Key_Underscore: return 0x5f;
+    case Qt::Key_QuoteLeft: return 0x60;
+
+    case Qt::Key_BraceLeft: return 0x7b;
+    case Qt::Key_Bar: return 0x7c;
+    case Qt::Key_BraceRight: return 0x7d;
+    case Qt::Key_AsciiTilde: return 0x7e;
+
+    case Qt::Key_Delete: return 0;
+    case Qt::Key_Insert: return 0; // = 0x1006,
+    case Qt::Key_Pause: return 0; // = 0x1008,
+    case Qt::Key_Print: return 0; // = 0x1009,
+    case Qt::Key_SysReq: return 0; // = 0x100a,
+
+    case Qt::Key_Clear: return 0; // = 0x100b,
+
+    case Qt::Key_Home: return 0; // = 0x1010,        // cursor movement
+    case Qt::Key_End: return 0; // = 0x1011,
+    case Qt::Key_Left: return 0; // = 0x1012,
+    case Qt::Key_Up: return 0; // = 0x1013,
+    case Qt::Key_Right: return 0; // = 0x1014,
+    case Qt::Key_Down: return 0; // = 0x1015,
+    case Qt::Key_PageUp: return 0; // = 0x1016,
+    case Qt::Key_PageDown: return 0; // = 0x1017,
+    case Qt::Key_Shift: return 0; // = 0x1020,        // modifiers
+    case Qt::Key_Control: return 0; // = 0x1021,
+    case Qt::Key_Meta: return 0; // = 0x1022,
+    case Qt::Key_Alt: return 0; // = 0x1023,
+    case Qt::Key_CapsLock: return 0; // = 0x1024,
+    case Qt::Key_NumLock: return 0; // = 0x1025,
+    case Qt::Key_ScrollLock: return 0; // = 0x1026,
+    case Qt::Key_F1: return 0; // = 0x1030,        // function keys
+    case Qt::Key_F2: return 0; // = 0x1031,
+    case Qt::Key_F3: return 0; // = 0x1032,
+    case Qt::Key_F4: return 0; // = 0x1033,
+    case Qt::Key_F5: return 0; // = 0x1034,
+    case Qt::Key_F6: return 0; // = 0x1035,
+    case Qt::Key_F7: return 0; // = 0x1036,
+    case Qt::Key_F8: return 0; // = 0x1037,
+    case Qt::Key_F9: return 0; // = 0x1038,
+    case Qt::Key_F10: return 0; // = 0x1039,
+    case Qt::Key_F11: return 0; // = 0x103a,
+    case Qt::Key_F12: return 0; // = 0x103b,
+    case Qt::Key_F13: return 0; // = 0x103c,
+    case Qt::Key_F14: return 0; // = 0x103d,
+    case Qt::Key_F15: return 0; // = 0x103e,
+    case Qt::Key_F16: return 0; // = 0x103f,
+    case Qt::Key_F17: return 0; // = 0x1040,
+    case Qt::Key_F18: return 0; // = 0x1041,
+    case Qt::Key_F19: return 0; // = 0x1042,
+    case Qt::Key_F20: return 0; // = 0x1043,
+    case Qt::Key_F21: return 0; // = 0x1044,
+    case Qt::Key_F22: return 0; // = 0x1045,
+    case Qt::Key_F23: return 0; // = 0x1046,
+    case Qt::Key_F24: return 0; // = 0x1047,
+    case Qt::Key_F25: return 0; // = 0x1048,        // F25 .. F35 only on X11
+    case Qt::Key_F26: return 0; // = 0x1049,
+    case Qt::Key_F27: return 0; // = 0x104a,
+    case Qt::Key_F28: return 0; // = 0x104b,
+    case Qt::Key_F29: return 0; // = 0x104c,
+    case Qt::Key_F30: return 0; // = 0x104d,
+    case Qt::Key_F31: return 0; // = 0x104e,
+    case Qt::Key_F32: return 0; // = 0x104f,
+    case Qt::Key_F33: return 0; // = 0x1050,
+    case Qt::Key_F34: return 0; // = 0x1051,
+    case Qt::Key_F35: return 0; // = 0x1052,
+    case Qt::Key_Super_L: return 0; // = 0x1053,        // extra keys
+    case Qt::Key_Super_R: return 0; // = 0x1054,
+    case Qt::Key_Menu: return 0; // = 0x1055,
+    case Qt::Key_Hyper_L: return 0; // = 0x1056,
+    case Qt::Key_Hyper_R: return 0; // = 0x1057,
+    case Qt::Key_Help: return 0; // = 0x1058,
+    case Qt::Key_Direction_L: return 0; // = 0x1059,
+    case Qt::Key_Direction_R: return 0; // = 0x1060,
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case Qt::Key_nobreakspace: return char(0xa0);
+    case Qt::Key_exclamdown: return char(0xa1);
+    case Qt::Key_cent: return char(0xa2);
+    case Qt::Key_sterling: return char(0xa3);
+    case Qt::Key_currency: return char(0xa4);
+    case Qt::Key_yen: return char(0xa5);
+    case Qt::Key_brokenbar: return char(0xa6);
+    case Qt::Key_section: return char(0xa7);
+    case Qt::Key_diaeresis: return char(0xa8);
+    case Qt::Key_copyright: return char(0xa9);
+    case Qt::Key_ordfeminine: return char(0xaa);
+    case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar
+    case Qt::Key_notsign: return char(0xac);
+    case Qt::Key_hyphen: return char(0xad);
+    case Qt::Key_registered: return char(0xae);
+    case Qt::Key_macron: return char(0xaf);
+    case Qt::Key_degree: return char(0xb0);
+    case Qt::Key_plusminus: return char(0xb1);
+    case Qt::Key_twosuperior: return char(0xb2);
+    case Qt::Key_threesuperior: return char(0xb3);
+    case Qt::Key_acute: return char(0xb4);
+    case Qt::Key_mu: return char(0xb5);
+    case Qt::Key_paragraph: return char(0xb6);
+    case Qt::Key_periodcentered: return char(0xb7);
+    case Qt::Key_cedilla: return char(0xb8);
+    case Qt::Key_onesuperior: return char(0xb9);
+    case Qt::Key_masculine: return char(0xba);
+    case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar
+    case Qt::Key_onequarter: return char(0xbc);
+    case Qt::Key_onehalf: return char(0xbd);
+    case Qt::Key_threequarters: return char(0xbe);
+    case Qt::Key_questiondown: return char(0xbf);
+    case Qt::Key_Agrave: return char(0xc0);
+    case Qt::Key_Aacute: return char(0xc1);
+    case Qt::Key_Acircumflex: return char(0xc2);
+    case Qt::Key_Atilde: return char(0xc3);
+    case Qt::Key_Adiaeresis: return char(0xc4);
+    case Qt::Key_Aring: return char(0xe5);
+    case Qt::Key_AE: return char(0xe6);
+    case Qt::Key_Ccedilla: return char(0xc7);
+    case Qt::Key_Egrave: return char(0xc8);
+    case Qt::Key_Eacute: return char(0xc9);
+    case Qt::Key_Ecircumflex: return char(0xca);
+    case Qt::Key_Ediaeresis: return char(0xcb);
+    case Qt::Key_Igrave: return char(0xcc);
+    case Qt::Key_Iacute: return char(0xcd);
+    case Qt::Key_Icircumflex: return char(0xce);
+    case Qt::Key_Idiaeresis: return char(0xcf);
+    case Qt::Key_ETH: return char(0xd0);
+    case Qt::Key_Ntilde: return char(0xd1);
+    case Qt::Key_Ograve: return char(0xd2);
+    case Qt::Key_Oacute: return char(0xd3);
+    case Qt::Key_Ocircumflex: return char(0xd4);
+    case Qt::Key_Otilde: return char(0xd5);
+    case Qt::Key_Odiaeresis: return char(0xd6);
+    case Qt::Key_multiply: return char(0xd7);
+    case Qt::Key_Ooblique: return char(0xf8);
+    case Qt::Key_Ugrave: return char(0xd9);
+    case Qt::Key_Uacute: return char(0xda);
+    case Qt::Key_Ucircumflex: return char(0xdb);
+    case Qt::Key_Udiaeresis: return char(0xdc);
+    case Qt::Key_Yacute: return char(0xdd);
+    case Qt::Key_THORN: return char(0xde);
+    case Qt::Key_ssharp: return char(0xdf);
+    case Qt::Key_division: return char(0xf7);
+    case Qt::Key_ydiaeresis: return char(0xff);
+
+    // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
+
+    case Qt::Key_Back : return 0; // = 0x1061,
+    case Qt::Key_Forward : return 0; // = 0x1062,
+    case Qt::Key_Stop : return 0; // = 0x1063,
+    case Qt::Key_Refresh : return 0; // = 0x1064,
+
+    case Qt::Key_VolumeDown: return 0; // = 0x1070,
+    case Qt::Key_VolumeMute : return 0; // = 0x1071,
+    case Qt::Key_VolumeUp: return 0; // = 0x1072,
+    case Qt::Key_BassBoost: return 0; // = 0x1073,
+    case Qt::Key_BassUp: return 0; // = 0x1074,
+    case Qt::Key_BassDown: return 0; // = 0x1075,
+    case Qt::Key_TrebleUp: return 0; // = 0x1076,
+    case Qt::Key_TrebleDown: return 0; // = 0x1077,
+
+    case Qt::Key_MediaPlay : return 0; // = 0x1080,
+    case Qt::Key_MediaStop : return 0; // = 0x1081,
+    case Qt::Key_MediaPrevious : return 0; // = 0x1082,
+    case Qt::Key_MediaNext : return 0; // = 0x1083,
+    case Qt::Key_MediaRecord: return 0; // = 0x1084,
+
+    case Qt::Key_HomePage : return 0; // = 0x1090,
+    case Qt::Key_Favorites : return 0; // = 0x1091,
+    case Qt::Key_Search : return 0; // = 0x1092,
+    case Qt::Key_Standby: return 0; // = 0x1093,
+    case Qt::Key_OpenUrl: return 0; // = 0x1094,
+
+    case Qt::Key_LaunchMail : return 0; // = 0x10a0,
+    case Qt::Key_LaunchMedia: return 0; // = 0x10a1,
+    case Qt::Key_Launch0 : return 0; // = 0x10a2,
+    case Qt::Key_Launch1 : return 0; // = 0x10a3,
+    case Qt::Key_Launch2 : return 0; // = 0x10a4,
+    case Qt::Key_Launch3 : return 0; // = 0x10a5,
+    case Qt::Key_Launch4 : return 0; // = 0x10a6,
+    case Qt::Key_Launch5 : return 0; // = 0x10a7,
+    case Qt::Key_Launch6 : return 0; // = 0x10a8,
+    case Qt::Key_Launch7 : return 0; // = 0x10a9,
+    case Qt::Key_Launch8 : return 0; // = 0x10aa,
+    case Qt::Key_Launch9 : return 0; // = 0x10ab,
+    case Qt::Key_LaunchA : return 0; // = 0x10ac,
+    case Qt::Key_LaunchB : return 0; // = 0x10ad,
+    case Qt::Key_LaunchC : return 0; // = 0x10ae,
+    case Qt::Key_LaunchD : return 0; // = 0x10af,
+    case Qt::Key_LaunchE : return 0; // = 0x10b0,
+    case Qt::Key_LaunchF : return 0; // = 0x10b1,
+
+    default: QTEST_ASSERT(false); return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/hbautotest.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef HBAUTOTEST_H
+#define HBAUTOTEST_H
+
+#include <hbnamespace.h>
+#include <hbmainwindow.h>
+#include <QtTest/QtTest>
+
+class HbMainWindow;
+class HbWidget;
+class HbAutoTestMainWindow;
+class HbAutoTest;
+class HbAutoTestMouseEvent; 
+/*
+INSTRUCTIONS:
+The class HbAutoTest is meant to be used with Orbit applications auto testing instead of GUI testing APIs of QTestLib.
+
+The functions of this class is to used similarily to the related QTestLib functions.
+
+Use HbAutoTestMainWindow (defined below) instead of HbMainWindow to enble filtering.
+Filterin filters out UI events that are not sent by function defined in HbAutoTest class.
+
+*/
+
+class HbAutoTestMouseEvent : public QMouseEvent
+{
+public:
+    HbAutoTestMouseEvent(Type type, const QPoint & pos, const QPoint & globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers ) 
+        : QMouseEvent(type,pos,globalPos,button,buttons,modifiers){}
+};
+
+class HbAutoTestKeyEvent : public QKeyEvent
+{
+public:
+        HbAutoTestKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
+              bool autorep = false, ushort count = 1 ) 
+        : QKeyEvent(type, key, modifiers, text, autorep, count){}
+};
+
+class HbAutoTest 
+{
+public:
+    
+    static void mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1 );
+    static void mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+   
+private:
+    static void drag(HbAutoTestMainWindow *window, QPointF targetPoint);
+    static QPointF middlePointOfWidget( const HbWidget* widget);
+
+    static bool pointerPressed;
+    static QPointF pressPoint;
+
+//Key event Part: copy-pasted from QTestLib and modified to support HbAutoTestKeyEvent to enable filtering.
+//see HbAutoTestMainWindow below.
+public:
+    
+    static Qt::Key asciiToKey(char ascii);
+    static char keyToAscii(Qt::Key key);
+
+    static void simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1);
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay=-1);    
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay=-1);
+
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+ 
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+   
+    static void keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+};
+
+class HbTestEvent
+{
+public:
+    virtual void simulate(QWidget *w) = 0;
+    virtual HbTestEvent *clone() const = 0;
+
+    virtual ~HbTestEvent() {}
+};
+
+class HbTestKeyEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyEvent(QTest::KeyAction action, Qt::Key key, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers), _ascii(0), _key(key) {}
+    inline HbTestKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers),
+          _ascii(ascii), _key(Qt::Key_unknown) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        if (_ascii == 0)
+            HbAutoTest::keyEvent(_action, w, _key, _modifiers, _delay);
+        else
+            HbAutoTest::keyEvent(_action, w, _ascii, _modifiers, _delay);
+    } 
+
+protected:
+    QTest::KeyAction _action;
+    int _delay;
+    Qt::KeyboardModifiers _modifiers;
+    char _ascii;
+    Qt::Key _key;
+};
+
+class HbTestKeyClicksEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyClicksEvent(const QString &keys, Qt::KeyboardModifiers modifiers, int delay)
+        : _keys(keys), _modifiers(modifiers), _delay(delay) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyClicksEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        HbAutoTest::keyClicks(w, _keys, _modifiers, _delay);
+    }
+
+private:
+    QString _keys;
+    Qt::KeyboardModifiers _modifiers;
+    int _delay;
+};
+
+class HbTestDelayEvent: public HbTestEvent
+{
+public:
+    inline HbTestDelayEvent(int msecs): _delay(msecs) {}
+    inline HbTestEvent *clone() const { return new HbTestDelayEvent(*this); }
+
+    inline void simulate(QWidget * /*w*/) { QTest::qWait(_delay); }
+
+private:
+    int _delay;
+};
+
+class HbTestEventList: public QList<HbTestEvent *>
+{
+public:
+    inline HbTestEventList() {}
+    inline HbTestEventList(const HbTestEventList &other): QList<HbTestEvent *>()
+    { for (int i = 0; i < other.count(); ++i) append(other.at(i)->clone()); }
+    inline ~HbTestEventList()
+    { clear(); }
+    inline void clear()
+    { qDeleteAll(*this); QList<HbTestEvent *>::clear(); }
+
+    inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
+    inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, qtKey, modifiers, msecs); }
+    inline void addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, qtKey, modifiers, msecs); }
+    inline void addKeyEvent(QTest::KeyAction action, Qt::Key qtKey,
+                            Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, qtKey, modifiers, msecs)); }
+
+    inline void addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, ascii, modifiers, msecs); }
+    inline void addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, ascii, modifiers, msecs); }
+    inline void addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, ascii, modifiers, msecs); }
+    inline void addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyClicksEvent(keys, modifiers, msecs)); }
+    inline void addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, ascii, modifiers, msecs)); }
+
+    inline void addDelay(int msecs)
+    { append(new HbTestDelayEvent(msecs)); }
+
+    inline void simulate(QWidget *w)
+    {
+        for (int i = 0; i < count(); ++i)
+            at(i)->simulate(w);
+    }
+};
+
+class HbAutoTestMainWindow : public HbMainWindow
+{
+public:
+    HbAutoTestMainWindow() : HbMainWindow() {}
+    
+    void mousePressEvent(QMouseEvent *event)
+    {
+        qDebug(
+            "HbAutoTestMainWindow::mousePressEvent: x(%d) y(%d)",
+            event->x(),
+            event->y());
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mousePressEvent(event);
+            } else {
+                ;//Do nothing 
+         }
+    }
+
+    void mouseMoveEvent(QMouseEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseMoveEvent(event);
+            } else {
+                ;//Do nothing
+         }
+    }
+
+    void mouseReleaseEvent(QMouseEvent *event)
+    {
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void keyPressEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyPressEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+    void keyReleaseEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void mouseDoubleClickEvent(QMouseEvent *event)
+    {
+        Q_UNUSED(event);
+        //Just ignore, not supported in Orbit
+    }
+};
+
+
+Q_DECLARE_METATYPE(HbTestEventList)
+#endif //HBAUTOTEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,663 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin unit testing.
+*/
+
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbDialog>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <QtTest/QtTest>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <cpplugininterface.h>
+#include <cppluginutility.h>
+#include <cpitemdatahelper.h>
+#include <cpsettingformitemdata.h>
+
+//#include "cmapplsettingsui_p.h"
+//#include "cmradiodialog.h"
+//#include "cpdestinationplugin.h"
+
+#include "hbautotest.h"
+#include "testcpdestinationplugin.h"
+
+// -----------------------------------------------------------------------------
+// STATIC TEST DATA
+// -----------------------------------------------------------------------------
+
+static const QString pluginDir =
+    "\\resource\\qt\\plugins\\controlpanel";
+
+static const QString pluginName = "cpdestinationplugin.dll";
+
+// Time to wait before continuing after an UI step
+static const int waitTime = 10;
+
+static const QString navigationButton = "HbNavigationButton";
+
+// UI coordinates
+static const QPoint destinationGroup(175,30);
+static const QPoint internetDestination(175,100);
+static const QPoint internetFirstAp(175,130);
+static const QPoint internetFirstApMove(175,160);
+static const QPoint internetFirstApDelete(175,210);
+static const QPoint internetFirstApShare(175,260);
+
+static const QPoint deleteDialogOk(100,300);
+
+static const QPoint tbButton(175,550);
+static const QPoint arrangeFirstAp(175,30);
+static const QPoint arrangeDragEnd(175,140);
+
+static const QPoint uncatDestination(175,455);
+static const QPoint uncatAp(175,120);
+static const QPoint uncatMenuMove(175,140);
+static const QPoint uncatMenuDelete(175,180);
+
+static const QPoint destDialogOk(100,370);
+static const QPoint destDialogSecond(100,255);
+static const QPoint destDialogThird(100,315);
+static const QPoint destDialogNewDest(100,345);
+
+static const QPoint addDestination(175,410);
+static const QPoint addDialog(175,235);
+static const QPoint addDialogOk(100,300);
+static const QPoint newDestinationRename(175,445);
+static const QPoint newDestinationDelete(175,490);
+
+static const QPoint addDialogKb(175,155);
+static const QPoint addDialogOkKb(100,225);
+
+static const QPoint secondDestination(175,195);
+static const QPoint thirdDestination(175,275);
+static const QPoint fourthDestination(175,355);
+
+
+
+#if 0
+// Destination list item for Connection Method selection
+static const QString dedicatedAccessPoint = "Dedicated access point";
+
+static const QStringList allDestinations = QStringList() <<
+    "Internet" <<
+    "My Snap" <<
+    dedicatedAccessPoint;
+
+static const QStringList allConnectionMethods = QStringList()
+    << "Home WLAN"
+    << "packet data 1"
+    << "packet data 2"
+    << "packet data 3"
+    << "Streaming"
+    << "WLAN IAP 1"
+    << "WLAN IAP 2"
+    << "WLAN IAP 3";
+
+static const QStringList gprsConnectionMethods = QStringList()
+    << "packet data 1"
+    << "packet data 2"
+    << "packet data 3"
+    << "Streaming";
+
+static const QStringList wlanConnectionMethods = QStringList()
+    << "Home WLAN"
+    << "WLAN IAP 1"
+    << "WLAN IAP 2"
+    << "WLAN IAP 3";
+#endif
+
+// -----------------------------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// -----------------------------------------------------------------------------
+
+/**
+ * Test main function. Runs all test cases.
+ */
+#ifndef TESTCMAPPLSETTINGSUI_NO_OUTPUT_REDIRECT
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    app.setApplicationName("TestCpDestinationPlugin");
+    
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\data\\TestCpDestinationPlugin.txt";
+ 
+    TestCpDestinationPlugin tc;
+    int res = QTest::qExec(&tc, 3, pass);
+ 
+    return res;
+}
+#else
+QTEST_MAIN(TestCpDestinationPlugin)
+#endif
+
+/**
+ * This function is be called before the first test case is executed.
+ */
+void TestCpDestinationPlugin::initTestCase()
+{
+    mMainWindow = new HbAutoTestMainWindow;
+    mMainWindow->show();
+    
+    // Load plugin
+    QDir dir(pluginDir);
+    QPluginLoader loader(dir.absoluteFilePath(pluginName));
+    mPlugin = QSharedPointer<CpPluginInterface>
+        (qobject_cast<CpPluginInterface *>(loader.instance()));
+    //QVERIFY(mPlugin != NULL);
+
+    
+    // Create destinations view
+    subCreateSettingsView();
+    
+    HbAutoTest::mouseClick(mMainWindow, mView, destinationGroup, waitTime);
+    QTest::qWait(200);
+}
+
+/**
+ * This function is be called after the last test case was executed.
+ */
+void TestCpDestinationPlugin::cleanupTestCase()
+{
+    delete mMainWindow;
+    mMainWindow = 0;
+}
+
+/**
+ * This function is be called before each test case is executed.
+ */
+void TestCpDestinationPlugin::init()
+{
+    // Expand settings group
+   // mTestView->mForm->setExpanded(
+   //     mTestView->mModel->indexFromItem(mTestView->mApSettingsGroupItem),
+    //    true);
+}
+
+/**
+ * This function is be called after each test case is executed.
+ */
+void TestCpDestinationPlugin::cleanup()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// TEST CASES
+// -----------------------------------------------------------------------------
+void TestCpDestinationPlugin::tcArrangeAps()
+{   
+    // Open Internet destination
+    HbAutoTest::mouseClick(mMainWindow, mView, internetDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Activate arrange mode
+    HbAutoTest::mouseClick(mMainWindow, mView, tbButton, waitTime);
+    QTest::qWait(500);
+    
+    // Drag
+    HbAutoTest::mousePress(mMainWindow, mView, arrangeFirstAp, waitTime);
+    QTest::qWait(300);
+    HbAutoTest::mouseMove(mMainWindow, mView, arrangeDragEnd, waitTime);
+    QTest::qWait(300);
+    HbAutoTest::mouseRelease(mMainWindow, mView, arrangeDragEnd, waitTime);
+    
+    HbAutoTest::mouseClick(mMainWindow, mView, arrangeDragEnd, waitTime);
+    QTest::qWait(500);
+    
+    // Cancel
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+    // Activate arrange mode again
+    HbAutoTest::mouseClick(mMainWindow, mView, tbButton, waitTime);
+    QTest::qWait(500);
+    
+    // Drag
+    HbAutoTest::mousePress(mMainWindow, mView, arrangeFirstAp, waitTime);
+    QTest::qWait(300);
+    HbAutoTest::mouseMove(mMainWindow, mView, arrangeDragEnd, waitTime);
+    QTest::qWait(300);
+    // HbAutoTest::mouseRelease(mMainWindow, mView, arrangeDragEnd, waitTime);
+    
+    HbAutoTest::mouseClick(mMainWindow, mView, arrangeDragEnd, waitTime);
+    QTest::qWait(500);
+    
+    // OK
+    HbAutoTest::mouseClick(mMainWindow, mView, tbButton, waitTime);
+    QTest::qWait(500);
+    
+    // Back to main view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+}
+
+void TestCpDestinationPlugin::tcMoveAp()
+{   
+    // Open uncategorised aps
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatAp, 700);
+    QTest::qWait(50);
+    
+    // Select move
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatMenuMove, waitTime);
+    QTest::qWait(300);
+    
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcShareDeleteAp()
+{
+    // Open Internet destination
+    HbAutoTest::mouseClick(mMainWindow, mView, internetDestination, waitTime);
+    QTest::qWait(500);
+      
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstAp, 700);
+    QTest::qWait(50);
+      
+    // Select share
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstApShare, waitTime);
+    QTest::qWait(300);
+      
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstAp, 700);
+    QTest::qWait(50);
+          
+    // Select share
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstApDelete, waitTime);
+    QTest::qWait(300);
+          
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, deleteDialogOk, waitTime);
+    QTest::qWait(2000);
+      
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcAddDestination()
+{
+    // Add Destination
+    HbAutoTest::mouseClick(mMainWindow, mView, addDestination, waitTime);
+    QTest::qWait(500);
+      
+    // Click OK -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Click OK -> errorNote disappears
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Activate keyboard
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialog, waitTime);
+    QTest::qWait(500);
+        
+    // Activate line-edit
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogKb, waitTime);
+    QTest::qWait(500);
+        
+    // Input text
+    HbAutoTest::keyClicks(mMainWindow, "Internet", 0, waitTime);
+    QTest::qWait(2000);
+          
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOkKb, waitTime);
+    QTest::qWait(500);
+        
+    // Select ok again -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+        
+    // Click OK -> errorNote disappears
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Activate keyboard
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialog, waitTime);
+    QTest::qWait(500);
+    
+    // Activate line-edit
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogKb, waitTime);
+    QTest::qWait(500);
+    
+    // Input text
+    HbAutoTest::keyClicks(mMainWindow, "foo", 0, waitTime);
+    QTest::qWait(2000);
+      
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOkKb, waitTime);
+    QTest::qWait(500);
+    
+    // Select ok again
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcDestinationRename()
+{
+    // Open context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, addDestination, 700);
+    QTest::qWait(50);
+      
+    // Click OK -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, newDestinationRename, waitTime);
+    QTest::qWait(300);
+    
+    // Click OK -> error note shown
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(300);
+    
+    // Click OK -> errorNote disappears
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Activate keyboard
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialog, waitTime);
+    QTest::qWait(500);
+    
+    // Activate line-edit
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogKb, waitTime);
+    QTest::qWait(500);
+    
+    // Input text
+    HbAutoTest::keyClicks(mMainWindow, "Internet", 0, waitTime);
+    QTest::qWait(2000);
+      
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOkKb, waitTime);
+    QTest::qWait(500);
+    
+    // Select ok again -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Click OK -> errorNote disappears
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+        
+    // Activate keyboard
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialog, waitTime);
+    QTest::qWait(500);
+        
+    // Activate line-edit
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogKb, waitTime);
+    QTest::qWait(500);
+        
+    // Input text
+    HbAutoTest::keyClicks(mMainWindow, "bar", 0, waitTime);
+    QTest::qWait(2000);
+          
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOkKb, waitTime);
+    QTest::qWait(500);
+        
+    // Select ok again
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // TODO: remove
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcDestinationDelete()
+{
+    // Open context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, addDestination, 700);
+    QTest::qWait(50);
+      
+    // Click OK -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, newDestinationDelete, waitTime);
+    QTest::qWait(300);
+    
+    // Click OK -> error note shown
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(1000);  
+  
+    // TODO: remove
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcCreateAndDeleteDestination()
+{
+    // Add Destination
+    HbAutoTest::mouseClick(mMainWindow, mView, addDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Activate keyboard
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialog, waitTime);
+    QTest::qWait(500);
+    
+    // Activate line-edit
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogKb, waitTime);
+    QTest::qWait(500);
+    
+    // Input text
+    HbAutoTest::keyClicks(mMainWindow, "foo", 0, waitTime);
+    QTest::qWait(2000);
+      
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOkKb, waitTime);
+    QTest::qWait(500);
+    
+    // Select ok again
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(500);
+    
+    // Open Internet destination
+    HbAutoTest::mouseClick(mMainWindow, mView, internetDestination, waitTime);
+    QTest::qWait(500);
+          
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstAp, 700);
+    QTest::qWait(50);
+          
+    // Select move
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstApMove, waitTime);
+    QTest::qWait(300);
+    
+    // Select destination
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogNewDest, waitTime);
+    QTest::qWait(300);
+    
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+    // Open context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, addDestination, 700);
+    QTest::qWait(50);
+      
+    // Click OK -> Error note
+    HbAutoTest::mouseClick(mMainWindow, mView, newDestinationDelete, waitTime);
+    QTest::qWait(300);
+    
+    // Click OK -> error note shown
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(1000);  
+  
+    // TODO: remove
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcOpenDestinations()
+{
+    // Open uncategorised aps
+    HbAutoTest::mouseClick(mMainWindow, mView, secondDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+    // Open uncategorised aps
+    HbAutoTest::mouseClick(mMainWindow, mView, thirdDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+    // Open uncategorised aps
+    HbAutoTest::mouseClick(mMainWindow, mView, fourthDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+    
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatAp, 700);
+    QTest::qWait(50);
+    
+    // TODO: remove
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcDeleteUncat()
+{   
+    // Open uncategorised aps
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatDestination, waitTime);
+    QTest::qWait(500);
+    
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatAp, 700);
+    QTest::qWait(50);
+    
+    // Select move
+    HbAutoTest::mouseClick(mMainWindow, mView, uncatMenuDelete, waitTime);
+    QTest::qWait(500);
+    
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+void TestCpDestinationPlugin::tcMoveProtected()
+{   
+    // Open Internet destination
+    HbAutoTest::mouseClick(mMainWindow, mView, internetDestination, waitTime);
+    QTest::qWait(500);
+          
+    // Activate context menu
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstAp, 700);
+    QTest::qWait(50);
+          
+    // Select move
+    HbAutoTest::mouseClick(mMainWindow, mView, internetFirstApMove, waitTime);
+    QTest::qWait(300);
+    
+    // Select destination
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogSecond, waitTime);
+    QTest::qWait(300);
+    
+    // Select ok
+    HbAutoTest::mouseClick(mMainWindow, mView, destDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    HbAutoTest::mouseClick(mMainWindow, mView, addDialogOk, waitTime);
+    QTest::qWait(2000);
+    
+    // Back to destination view
+    subClickWidget(navigationButton);
+    QTest::qWait(500);
+}
+
+// -----------------------------------------------------------------------------
+// SUB TEST CASES
+// -----------------------------------------------------------------------------
+
+void TestCpDestinationPlugin::subCreateSettingsView()
+{
+    // Create settings view
+    HbView *view = new HbView();
+    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
+    itemDataHelper->setParent(view);
+    HbDataForm *form = new HbDataForm();
+    HbDataFormModel *model = new HbDataFormModel;
+    CpPluginUtility::addCpItemPrototype(form);
+    QList<CpSettingFormItemData *> list = mPlugin->createSettingFormItemData(*itemDataHelper);
+    HbDataFormModelItem *modelItem = NULL;
+    modelItem = list[0];
+    model->appendDataFormItem(modelItem);
+    form->setModel(model);
+    model->setParent(form);
+    view->setWidget(form);
+    itemDataHelper->bindToForm(form);
+    
+    // Display the view
+    // TODO: connect aboutToClose() signal
+    mMainWindow->addView(view);
+    mMainWindow->setCurrentView(view); 
+    
+    mView = view;
+}
+
+void TestCpDestinationPlugin::subClickWidget(const QString &name)
+{
+    QList<QGraphicsItem *> itemList = mMainWindow->scene()->items();
+
+    QGraphicsItem *target = 0;
+    foreach (QGraphicsItem* item, itemList) {
+        if (item->isWidget()) {
+            QString widgetClassName(static_cast<QGraphicsWidget*>(item)->metaObject()->className());
+            qDebug() << widgetClassName;
+            
+            if (widgetClassName == name) {
+                target = item;
+                //break;
+            }
+        }
+    }
+
+    Q_ASSERT(target);
+    HbAutoTest::mouseClick(mMainWindow, static_cast<HbWidget *>(target));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin unit testing.
+*/
+
+#include <QStringList>
+#include <QtTest/QtTest>
+#include <cmmanagerdefines_shim.h>
+
+//#include "cmapplsettingsui.h"
+
+class HbDialog;
+class HbMainWindow;
+class HbAutoTestMainWindow;
+class HbDataFormModelItem;
+class CpBearerApPluginInterface;
+class CpPluginInterface;
+class HbView;
+
+class TestCpDestinationPlugin : public QObject
+{
+    Q_OBJECT
+
+    public slots:
+        // Test framework functions
+        void initTestCase();
+        void cleanupTestCase();
+        void init();
+        void cleanup();
+
+    private slots:
+        // Test cases
+        void tcArrangeAps();
+        void tcMoveAp();
+        void tcShareDeleteAp();
+        void tcAddDestination();
+        void tcDestinationRename();
+        void tcDestinationDelete();
+        void tcCreateAndDeleteDestination();
+        void tcDeleteUncat();
+        void tcOpenDestinations();
+
+    private:
+        // Sub test cases
+        void subCreateSettingsView();
+        void subClickWidget(const QString &name);
+        
+        // Not Run cases
+        void tcMoveProtected();
+        
+
+    private:
+        // Code references
+        
+        // Test data
+        HbAutoTestMainWindow              *mMainWindow;
+        QSharedPointer<CpPluginInterface> mPlugin;
+        HbView                            *mView;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/testcpdestinationplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for Control Panel Destination plugin unit tests.
+
+TEMPLATE = app
+
+TARGET = testcpdestinationplugin
+
+CONFIG += hb qtestlib
+
+INCLUDEPATH += . ../../inc
+DEPENDPATH += .
+
+HEADERS += \
+    hbautotest.h \
+    testcpdestinationplugin.h
+SOURCES += \
+    hbautotest.cpp \
+    testcpdestinationplugin.cpp
+
+LIBS += \
+    -lcpdestinationplugin \
+    -lconnection_settings_shim \
+    -lcpframework
+    
+#    -lconnection_settings_shim \
+#    -lcmmanager
+#    -lcommsdat \
+#    -lcommdb \
+#    -lecom
+
+symbian: {
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/tools/commsdat_restore.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for restoring backup of commsdat.
+
+copy backup\cccccc00.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/tools/commsdat_set.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for setting test commsdat.
+
+md backup
+copy \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre backup\
+copy default.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/tsrc/ut/tools/cpdestinationplugin_ctc.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,92 @@
+::
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+:: Script running Control Panel Destination plugin test cases with CTC analysis.
+
+@echo off
+
+:: -----------------------------------------------------------------------------
+:: Instructions
+:: -----------------------------------------------------------------------------
+:: 
+:: Remember to use the test CommsDat that can be set and restored with the
+:: helper scripts:
+:: - commsdat_set.bat
+:: - commsdat_restore.bat
+
+call .\commsdat_set.bat
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+:: Control Panel Destination plugin base directory
+set cpdestinationplugin_dir=..\..\..
+pushd %cpdestinationplugin_dir%
+
+:: CTC instrumentation excludes
+set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp -C SKIP_FUNCTION_NAME=CpAddDestinationEntryItemData::createSettingView,CpDestinationEntryItemData::showErrorNote,CpIapItem::showErrorNote
+
+::-----------------------------------------------------------------------------
+:: Remove old coverage data
+::-----------------------------------------------------------------------------
+
+echo Cleaning up...
+del MON.* ctcerr.txt profile.txt
+rd /s /q CTCHTML
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build & instrument code
+::-----------------------------------------------------------------------------
+
+echo Building code and instrumenting..
+call del MON.* ctcerr.txt profile.txt
+call make distclean
+call qmake
+call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build test code
+::-----------------------------------------------------------------------------
+
+echo Building test code...
+call cd tsrc\ut
+call make distclean
+call qmake
+call sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Execute the tests
+::-----------------------------------------------------------------------------
+
+echo Running tests..
+cd ..\..
+call \epoc32\release\winscw\udeb\testcpdestinationplugin.exe
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Create coverage results
+::-----------------------------------------------------------------------------
+
+echo Creating results...
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
+echo ...done
+
+call .\commsdat_restore.bat
+
+popd
Binary file cmmanager/cpdestinationplugin/tsrc/ut/tools/default.cre has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/cpipsettingsplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = lib
+TARGET = cpipsettingsplugin
+DEPENDPATH += .
+INCLUDEPATH += . ../inc ../../inc
+
+CONFIG += hb plugin
+
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+
+LIBS += -lcpframework
+
+# Sources
+HEADERS += inc/cpipsettingsplugin.h \
+           inc/cpipsettingsview.h
+SOURCES += src/cpipsettingsplugin.cpp \
+           src/cpipsettingsview.cpp
+
+TRANSLATIONS = cpipsettingsplugin.ts
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+
+    MMP_RULES += "USERINCLUDE traces"
+
+}
+
+symbian:
+{
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.UID3 = 0x2002BC8F
+TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+deploy.path = C:
+qtplugins.path = /resource/qt/plugins/controlpanel
+qtplugins.sources += qmakepluginstubs/cpipsettingsplugin.qtplugin
+
+for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+
+BLD_INF_RULES.prj_exports += "rom/cpipsettingsplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpipsettingsplugin.iby)"
+BLD_INF_RULES.prj_exports += "rom/cpipsettingsplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cpipsettingsplugin_resources.iby)"
+}
+
+plugin.sources = cpipsettingsplugin.dll
+plugin.path = \resource\qt\plugins\controlpanel
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/inc/cpipsettingsplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel "Network Settings" plugin header file.
+*   
+*/
+
+#ifndef	CPIPSETTINGSPLUGIN_H
+#define	CPIPSETTINGSPLUGIN_H
+
+// System includes
+#include <QObject>
+#include <QSharedPointer>
+#include <cpplugininterface.h>
+
+// User includes
+
+// Forward declarations
+class HbTranslator;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpIpSettingsPlugin : public QObject, public CpPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpPluginInterface)
+    
+public:
+    CpIpSettingsPlugin();
+    ~CpIpSettingsPlugin();
+    QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpIpSettingsPlugin)
+
+private slots:
+    
+private: // data
+    //! Translator instance
+    QSharedPointer<HbTranslator> mTranslator;
+};
+
+#endif // CPIPSETTINGSPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/inc/cpipsettingsview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#ifndef CPIPSETTINGSVIEW_H
+#define CPIPSETTINGSVIEW_H
+
+// System includes
+#include <cpbasesettingview.h>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpIpSettingsView : public CpBaseSettingView
+{
+    Q_OBJECT
+    
+public:
+    CpIpSettingsView(QGraphicsItem *parent = 0);
+    ~CpIpSettingsView();
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpIpSettingsView)
+
+private slots:
+    
+public: // data
+    CpItemDataHelper *mItemDataHelper;
+};
+
+#endif // CPIPSETTINGSVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/rom/cpipsettingsplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __CPIPSETTINGSPLUGIN_IBY__
+#define __CPIPSETTINGSPLUGIN_IBY__
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR/BUILD_DIR/cpipsettingsplugin.dll SHARED_LIB_DIR/cpipsettingsplugin.dll
+
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/cpipsettingsplugin.qtplugin resource/qt/plugins/controlpanel/cpipsettingsplugin.qtplugin
+
+#endif // __CPIPSETTINGSPLUGIN_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/rom/cpipsettingsplugin_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __CPIPSETTINGSPLUGIN_RESOURCES_IBY__
+#define __CPIPSETTINGSPLUGIN_RESOURCES_IBY__
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cpipsettingsplugin.qm QT_TRANSLATIONS_DIR/cpipsettingsplugin.qm
+
+#endif // __CPIPSETTINGSPLUGIN_RESOURCES_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/src/cpipsettingsplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel "Network Settings" plugin implementation.
+*
+*/
+
+// System includes
+#include <HbTranslator>
+#include <cpsettingformentryitemdataimpl.h>
+
+// User includes
+#include "cpipsettingsplugin.h"
+#include "cpipsettingsview.h"
+
+/*!
+    \class CpIpSettingsPlugin
+    \brief Class implements the "Network Settings" entry item for
+    Control Panel.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpIpSettingsPlugin::CpIpSettingsPlugin() :
+    mTranslator(new HbTranslator("cpipsettingsplugin"))
+{
+}
+
+/*!
+    Destructor.
+*/
+CpIpSettingsPlugin::~CpIpSettingsPlugin()
+{
+}
+
+/*!
+    Creates and returns the entry item.
+*/
+QList<CpSettingFormItemData*> CpIpSettingsPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const
+{
+    QList<CpSettingFormItemData*> settingFormData;
+    settingFormData.append(new CpSettingFormEntryItemDataImpl<CpIpSettingsView>(
+        itemDataHelper,
+        hbTrId("txt_occ_dblist_network_settings"),
+        "",
+        HbIcon("qtg_large_network_settings")));
+    return settingFormData;
+}
+
+Q_EXPORT_PLUGIN2(cpipsettingsplugin, CpIpSettingsPlugin);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpipsettingsplugin/src/cpipsettingsview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Control Panel "Network Settings" view implementation.
+*
+*/
+
+// System includes
+#include <QtCore>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <cpplugininterface.h>
+#include <cppluginutility.h>
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+
+// User includes
+#include "cpipsettingsview.h"
+
+/*!
+    \class CpIpSettingsView
+    \brief Class implements the "Network Settings" Control Panel view.
+*/
+
+// External function prototypes
+
+// Local constants
+static const QString ipSettingsPlugins[] = {
+    "cpwlansettingsplugin.qtplugin",
+    "cpdestinationplugin.qtplugin",
+    "videosettingsplugin.qtplugin",
+    "cpvpnmanagementplugin.qtplugin",
+    "" // empty item terminates the list
+};
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpIpSettingsView::CpIpSettingsView(QGraphicsItem *parent) :
+    CpBaseSettingView(0, parent)
+{
+    HbDataForm *form = new HbDataForm();
+    this->setWidget(form);
+    form->setHeading(hbTrId("txt_occ_subhead_network_settings"));
+    CpPluginUtility::addCpItemPrototype(form);
+    HbDataFormModel *model = new HbDataFormModel(form);
+
+    // The parameter given as 0 is a HbDataForm pointer, not parent
+    mItemDataHelper = new CpItemDataHelper(0);
+    mItemDataHelper->setParent(this);
+
+    HbDataFormModelItem *modelItem;
+    CpPluginInterface *plugin = NULL;
+    QDir pluginsDir("\\resource\\qt\\plugins\\controlpanel");
+    QPluginLoader pluginLoader;
+        
+    // Load listed child plugins
+    for (int i = 0; !ipSettingsPlugins[i].isEmpty(); i++) {
+        pluginLoader.setFileName(pluginsDir.absoluteFilePath(ipSettingsPlugins[i]));
+        plugin = qobject_cast<CpPluginInterface *>(pluginLoader.instance());
+        if (plugin) {
+            QList<CpSettingFormItemData*> formDataItemList =
+                plugin->createSettingFormItemData(*mItemDataHelper);
+            for (int j = 0; j < formDataItemList.count(); j++) {
+                modelItem = formDataItemList.at(j);
+                if (modelItem) {
+                    model->appendDataFormItem(modelItem);
+                }
+            }
+        }
+    }
+
+    mItemDataHelper->bindToForm(form);
+    form->setModel(model);
+}
+
+/*!
+    Destructor.
+*/
+CpIpSettingsView::~CpIpSettingsView()
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/cppacketdataapplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Project info file for Control Panel packet data AP plugin.
+#
+
+TEMPLATE = lib
+TARGET = cppacketdataapplugin
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+    MMP_RULES += "USERINCLUDE traces"
+}
+
+CONFIG += hb plugin
+
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+
+LIBS += -lcpframework -lconnection_settings_shim
+
+# Sources
+HEADERS += inc/cppacketdataapplugin.h \
+           inc/cppacketdataapview.h \
+           inc/cppacketdataapadvancedview.h \
+           traces/OstTraceDefinitions.h
+SOURCES += src/cppacketdataapplugin.cpp \
+           src/cppacketdataapview.cpp \
+           src/cppacketdataapadvancedview.cpp
+
+# Include plugin utilities
+include(../cppluginutils/cppluginutils.pri)
+
+TRANSLATIONS = cpapplugin.ts
+
+symbian:
+{
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.UID3 = 0x2002E694
+TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+deploy.path = C:
+qtplugins.path = /resource/qt/plugins/controlpanel/bearerap
+qtplugins.sources += qmakepluginstubs/cppacketdataapplugin.qtplugin
+
+for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+
+BLD_INF_RULES.prj_exports += "rom/cppacketdataapplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cppacketdataapplugin.iby)"
+BLD_INF_RULES.prj_exports += "rom/cppacketdataapplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cppacketdataapplugin_resources.iby)"
+}
+
+plugin.sources = cppacketdataapplugin.dll
+plugin.path = /resource/qt/plugins/controlpanel/bearerap
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/inc/cppacketdataapadvancedview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP advanced settings view header file.  
+*
+*/
+
+#ifndef CPPACKETDATAAPADVANCEDVIEW_H
+#define CPPACKETDATAAPADVANCEDVIEW_H
+
+// System includes
+#include <QAbstractSocket>
+#include <HbMessageBox>
+#include <cpbasesettingview.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpPacketDataApAdvancedView : public CpBaseSettingView
+{
+    Q_OBJECT
+    
+public:
+    CpPacketDataApAdvancedView(
+        CmConnectionMethodShim *cmConnectionMethod,
+        QGraphicsItem *parent = 0);
+    ~CpPacketDataApAdvancedView();
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+ 
+private:
+    Q_DISABLE_COPY(CpPacketDataApAdvancedView)
+
+    //! Network type
+    enum NetworkType {
+        NetworkTypeIpv4 = 0,
+        NetworkTypeIpv6
+    };
+
+    //! IPv6 DNS type
+    enum Ipv6DnsType {
+        Ipv6DnsTypeAutomatic = 0,
+        Ipv6DnsTypeWellKnown,
+        Ipv6DnsTypeUserDefined
+    };
+    
+    void createAdvancedSettings();
+    void createIpGroup();
+    void updateIpGroup();
+    void createIpv4SettingItems();
+    void deleteIpv4SettingItems();
+    void createIpv6SettingItems();
+    void deleteIpv6SettingItems();
+    void createProxyGroup();
+    void updateProxyGroup();
+    NetworkType getNetworkType();
+    QString getIpAddress(CMManagerShim::ConnectionMethodAttribute attribute);
+    Ipv6DnsType getIpv6DnsType();
+    void enableIpv4AddressFields(int state);
+    void enableIpv4DnsFields(int state);
+    void enableIpv6DnsFields(int selectionIndex);
+    bool validateAndSaveIpAddress(
+        HbDataFormModelItem *item,
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        QAbstractSocket::NetworkLayerProtocol protocol);
+    void showMessageBox(
+        HbMessageBox::MessageBoxType type,
+        const QString &text);
+    bool tryUpdate();
+    void handleUpdateError();
+    
+private slots:
+    void setEditorPreferences(const QModelIndex index);
+    void changeNetworkType(int type);
+    void changeIpv4AddressMode(int state);
+    void changeIpv4Address();
+    void changeIpv4DnsMode(int state);
+    void changeIpv4PrimaryDnsAddress();
+    void changeIpv4SecondaryDnsAddress();
+    void changeIpv6DnsMode(int selectionIndex);
+    void changeIpv6PrimaryDnsAddress();
+    void changeIpv6SecondaryDnsAddress();
+    void changeProxyServer();
+    void changeProxyPort();
+    
+private: // data
+    //! Dataform
+    HbDataForm *mForm;
+    //! Dataform model
+    HbDataFormModel *mModel;
+    //! Connection Settings Shim connection method pointer
+    CmConnectionMethodShim *mCmConnectionMethod;
+    //! "IP settings" group
+    HbDataFormModelItem *mIpGroup;
+    //! "Network type" (IPv4/IPv6) setting item
+    HbDataFormModelItem *mNetworkType;
+    //! "Automatic" setting item for phone IP address
+    HbDataFormModelItem *mIpv4Automatic;
+    //! "Phone IP address" setting item
+    HbDataFormModelItem *mIpv4Address;
+    //! "Automatic" setting item for IPv4 DNS addresses
+    HbDataFormModelItem *mIpv4DnsAutomatic;
+    //! "Primary name server" setting item
+    HbDataFormModelItem *mIpv4DnsAddress1;
+    //! "Secondary name server" setting item
+    HbDataFormModelItem *mIpv4DnsAddress2;
+    //! "Automatic" setting item for IPv6 DNS addresses
+    HbDataFormModelItem *mIpv6DnsAutomatic;
+    //! "Primary name server" setting item
+    HbDataFormModelItem *mIpv6DnsAddress1;
+    //! "Secondary name server" setting item
+    HbDataFormModelItem *mIpv6DnsAddress2;
+    //! "Proxy settings" group
+    HbDataFormModelItem *mProxyGroup;
+    //! "Proxy server address" setting item
+    HbDataFormModelItem *mProxyServer;
+    //! "Proxy port number" setting item
+    HbDataFormModelItem *mProxyPort;
+    //! Message box for info notes
+    QSharedPointer<HbMessageBox> mMessageBox;
+    //! Flag for IPv6 support
+    bool mIpv6Supported;
+    //! Current network type (IPv4/IPv6)
+    NetworkType mCurrentNetworkType;
+    
+    // Friend classes
+    friend class TestCpPacketDataApPlugin;
+};
+
+#endif // CPPACKETDATAAPADVANCEDVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/inc/cppacketdataapplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel packet data AP plugin header file.
+*   
+*/
+
+#ifndef	CPPACKETDATAAPPLUGIN_H
+#define	CPPACKETDATAAPPLUGIN_H
+
+// System includes
+#include <QObject>
+#include <QSharedPointer>
+#include <cpbearerapplugininterface.h>
+
+// User includes
+
+// Forward declarations
+class HbTranslator;
+class CmManagerShim;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpPacketDataApPlugin : public QObject, public CpBearerApPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpBearerApPluginInterface)
+    
+public:
+    CpPacketDataApPlugin();
+    ~CpPacketDataApPlugin();
+    
+    uint bearerType() const;
+    CpBaseSettingView *createSettingView(uint connectionMethod);
+    
+signals:
+    
+public slots:
+
+protected:
+    
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpPacketDataApPlugin)
+
+private slots:
+    
+private: // data
+    //! Translator instance
+    QSharedPointer<HbTranslator> mTranslator;
+    //! CM Manager Shim instance
+    CmManagerShim *mCmManager;
+    //! CM Connection Method Shim instance
+    CmConnectionMethodShim *mCmConnectionMethod;
+};
+
+#endif // CPPACKETDATAAPPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/inc/cppacketdataapview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP settings view header file.  
+*
+*/
+
+#ifndef CPPACKETDATAAPVIEW_H
+#define CPPACKETDATAAPVIEW_H
+
+// System includes
+#include <QSharedPointer>
+#include <QMap>
+#include <HbMessageBox>
+#include <cpbasesettingview.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class HbMessageBox;
+class CmConnectionMethodShim;
+class CpPacketDataApPlugin;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpPacketDataApView : public CpBaseSettingView
+{
+    Q_OBJECT
+    
+public:
+    CpPacketDataApView(
+        CmConnectionMethodShim *cmConnectionMethod,
+        QGraphicsItem *parent = 0);
+    ~CpPacketDataApView();
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+ 
+private:
+    Q_DISABLE_COPY(CpPacketDataApView)
+    
+    void createAccessPointSettingsGroup();
+    void updateAccessPointSettingsGroup();
+    void showMessageBox(
+        HbMessageBox::MessageBoxType type,
+        const QString &text);
+    bool tryUpdate();
+    void handleUpdateError();
+    
+private slots:
+    void connectionNameChanged();
+    void accessPointNameChanged();
+    void userNameChanged();
+    void passwordChanged();
+    void authenticationChanged(int index);
+    void homepageChanged();
+    void menuActionTriggered(HbAction *action);
+    void restoreCurrentView();
+    void setEditorPreferences(const QModelIndex modelIndex);
+    
+private: // data
+    //! Dataform
+    HbDataForm *mForm;
+    //! Dataform model
+    HbDataFormModel *mModel;
+    //! "Access point settings" group
+    HbDataFormModelItem *mApSettingsGroupItem;
+    //! "Connection name" setting item
+    HbDataFormModelItem *mConnectionNameItem;
+    //! "Access point name" setting item
+    HbDataFormModelItem *mAccessPointNameItem;
+    //! "User name" setting item
+    HbDataFormModelItem *mUserNameItem;
+    //! "Password" setting item
+    HbDataFormModelItem *mPasswordItem;
+    //! "Authentication" setting item
+    HbDataFormModelItem *mAuthenticationItem;
+    //! "Homepage" setting item
+    HbDataFormModelItem *mHomepageItem;
+    //! "Advanced settings" action for view menu
+    HbAction *mAdvancedSettingsAction;
+    //! Connection Settings Shim connection method pointer
+    CmConnectionMethodShim *mCmConnectionMethod;
+    //! Message box for info notes
+    QSharedPointer<HbMessageBox> mMessageBox;
+    //! Maps authentication combobox index to CMManagerShim::PacketDataDisablePlainTextAuth value
+    QMap<int, bool> mAuthenticationMap;
+    
+    // Friend classes
+    friend class TestCpPacketDataApPlugin;
+};
+
+#endif // CPPACKETDATAAPVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/rom/cppacketdataapplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP plugin iby file.
+*
+*/
+
+#ifndef CPPACKETDATAAPPLUGIN_IBY
+#define CPPACKETDATAAPPLUGIN_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR/BUILD_DIR/cppacketdataapplugin.dll SHARED_LIB_DIR/cppacketdataapplugin.dll
+
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/bearerap/cppacketdataapplugin.qtplugin resource/qt/plugins/controlpanel/bearerap/cppacketdataapplugin.qtplugin
+
+#endif // CPPACKETDATAAPPLUGIN_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/rom/cppacketdataapplugin_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP plugin resources iby file.
+*
+*/
+
+#ifndef CPPACKETDATAAPPLUGIN_RESOURCES_IBY
+#define CPPACKETDATAAPPLUGIN_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cpapplugin.qm QT_TRANSLATIONS_DIR/cpapplugin.qm
+
+#endif // CPPACKETDATAAPPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/src/cppacketdataapadvancedview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1219 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP advanced settings view implementation.  
+*
+*/
+
+// System includes
+#include <QHostAddress>
+#include <HbCheckBox>
+#include <HbLineEdit>
+#include <HbDataFormViewItem>
+#include <HbWidget>
+#include <HbEditorInterface>
+#include <HbUrlFilter>
+#include <HbInputDialog>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <cmconnectionmethod_shim.h>
+#include <cmmanagerdefines_shim.h>
+#include <cpsettingformitemdata.h>
+#include <etelpckt.h>
+
+// User includes
+#include "cpipv4filter.h"
+#include "cpipv6filter.h"
+#include "cppacketdataapadvancedview.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cppacketdataapadvancedviewTraces.h"
+#endif
+
+/*!
+    \class CpPacketDataApAdvancedView
+    \brief Implements the advanced settings view for packet data bearer
+           access points.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpPacketDataApAdvancedView::CpPacketDataApAdvancedView(
+    CmConnectionMethodShim *cmConnectionMethod,
+    QGraphicsItem *parent) :
+        CpBaseSettingView(0, parent),
+        mForm(0),
+        mModel(0),
+        mCmConnectionMethod(cmConnectionMethod),
+        mIpGroup(0),
+        mNetworkType(0),
+        mIpv4Automatic(0),
+        mIpv4Address(0),
+        mIpv4DnsAutomatic(0),
+        mIpv4DnsAddress1(0),
+        mIpv4DnsAddress2(0),
+        mIpv6DnsAutomatic(0),
+        mIpv6DnsAddress1(0),
+        mIpv6DnsAddress2(0),
+        mProxyGroup(0),
+        mProxyServer(0),
+        mProxyPort(0),
+        mMessageBox(0),
+        mIpv6Supported(false),
+        mCurrentNetworkType(NetworkTypeIpv4)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CPPACKETDATAAPADVANCEDVIEW_ENTRY);
+    
+    // Construct packet data AP advanced settings UI
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    mModel = new HbDataFormModel(mForm);
+    mForm->setModel(mModel);
+
+    mIpv6Supported = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIPv6Supported);
+        
+    // Add advanced settings groups
+    createAdvancedSettings();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CPPACKETDATAAPADVANCEDVIEW_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpPacketDataApAdvancedView::~CpPacketDataApAdvancedView()
+{
+    OstTraceFunctionEntry0(DUP1_CPPACKETDATAAPADVANCEDVIEW_CPPACKETDATAAPADVANCEDVIEW_ENTRY);
+    
+    OstTraceFunctionExit0(DUP1_CPPACKETDATAAPADVANCEDVIEW_CPPACKETDATAAPADVANCEDVIEW_EXIT);
+}
+
+/*!
+    Creates all advanced settings groups.
+*/
+void CpPacketDataApAdvancedView::createAdvancedSettings()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CREATEADVANCEDSETTINGS_ENTRY);
+    
+    // Create settings groups
+    createIpGroup();
+    createProxyGroup();
+    
+    // Read values and update UI
+    updateIpGroup();
+    updateProxyGroup();
+    
+    // Connect signal to initialize settings item widgets
+    bool status = connect(
+        mForm,
+        SIGNAL(itemShown(const QModelIndex)),
+        this,
+        SLOT(setEditorPreferences(const QModelIndex)));
+    Q_ASSERT(status);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CREATEADVANCEDSETTINGS_EXIT);
+}
+
+/*!
+    Creates the IP settings group.
+*/
+void CpPacketDataApAdvancedView::createIpGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPGROUP_ENTRY);
+    
+    // IP settings group
+    mIpGroup = new CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem,
+        hbTrId("txt_occ_subhead_ip_settings"));
+    mModel->appendDataFormItem(mIpGroup);
+    
+    if (mIpv6Supported) {
+        // IPv6 supported
+        // Network type
+        mNetworkType = new CpSettingFormItemData(
+            HbDataFormModelItem::ComboBoxItem,
+            hbTrId("txt_occ_setlabel_network_type"));
+        QStringList networkTypeList;
+        networkTypeList
+            << hbTrId("txt_occ_setlabel_network_type_val_ipv4")
+            << hbTrId("txt_occ_setlabel_network_type_val_ipv6");
+        mNetworkType->setContentWidgetData("items", networkTypeList);
+        mForm->addConnection(
+            mNetworkType,
+            SIGNAL(currentIndexChanged(int)),
+            this,
+            SLOT(changeNetworkType(int)));
+        mNetworkType->setContentWidgetData("objectName", "networkTypeCB");
+        mIpGroup->appendChild(mNetworkType);
+        
+        mCurrentNetworkType = getNetworkType();
+        if (mCurrentNetworkType == NetworkTypeIpv4) {
+            // IPv4
+            createIpv4SettingItems();
+        } else {
+            // IPv6
+            createIpv6SettingItems();
+        }
+    } else {
+        // IPv6 not supported, create IPv4 settings items
+        createIpv4SettingItems();
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPGROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates the IP settings group.
+*/
+void CpPacketDataApAdvancedView::updateIpGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_UPDATEIPGROUP_ENTRY);
+    
+    // Network type
+    if (mNetworkType) {
+        // Every time update is called we check if network type (IPv4/IPv6)
+        // has changed and update items on UI if necessary.
+    
+        // Get network type from CommsDat
+        NetworkType newNetworkType = getNetworkType();
+        if (newNetworkType != mCurrentNetworkType) {
+            // Network type has changed, update UI
+            if (newNetworkType == NetworkTypeIpv6) {
+                // IPv4 -> IPv6
+                deleteIpv4SettingItems();
+                createIpv6SettingItems();
+            } else {
+                // IPv6 -> IPv4
+                deleteIpv6SettingItems();
+                createIpv4SettingItems();
+            }
+            mCurrentNetworkType = newNetworkType;
+        }
+        mNetworkType->setContentWidgetData("currentIndex", newNetworkType);
+    }
+    
+    // Phone IP address (IPv4)
+    // "Automatic" checkbox
+    if (mIpv4Automatic) {
+        bool ipAddressFromServer = mCmConnectionMethod->getBoolAttribute(
+            CMManagerShim::PacketDataIPAddrFromServer);
+        Qt::CheckState state = Qt::Unchecked;
+        if (ipAddressFromServer) {
+            state = Qt::Checked;
+        }
+        mIpv4Automatic->setContentWidgetData("checkState", state);
+
+        // Enable/disable user defined IP address fields
+        enableIpv4AddressFields(state);
+    }
+
+    // Phone IP address (IPv4)
+    if (mIpv4Address) {
+        QString string = getIpAddress(CMManagerShim::CmIPAddress);
+        mIpv4Address->setContentWidgetData("text", string);
+    }
+    
+    // IPv4 DNS addresses
+    // "Automatic" checkbox
+    if (mIpv4DnsAutomatic) {
+        Qt::CheckState state = Qt::Unchecked;
+        if (mCmConnectionMethod->getBoolAttribute(
+            CMManagerShim::CmIPDNSAddrFromServer)) {
+            state = Qt::Checked;
+        }
+        mIpv4DnsAutomatic->setContentWidgetData("checkState", state);
+
+        // Enable/disable user defined DNS address fields
+        enableIpv4DnsFields(state);
+    }
+    
+    // IPv4 primary DNS address
+    if (mIpv4DnsAddress1) {
+        QString string = getIpAddress(CMManagerShim::CmIPNameServer1);
+        mIpv4DnsAddress1->setContentWidgetData("text", string);
+    }
+    
+    // IPv4 secondary DNS address
+    if (mIpv4DnsAddress2) {
+        QString string = getIpAddress(CMManagerShim::CmIPNameServer2);
+        mIpv4DnsAddress2->setContentWidgetData("text", string);
+    }
+    
+    // IPv6 DNS addresses
+    // Automatic/well-known/user defined combobox
+    if (mIpv6DnsAutomatic) {
+        uint type = getIpv6DnsType();
+        mIpv6DnsAutomatic->setContentWidgetData("currentIndex", type);
+
+        // Enable/disable user defined DNS address fields
+        enableIpv6DnsFields(type);
+    }
+    
+    // IPv6 primary DNS address
+    if (mIpv6DnsAddress1) {
+        QString string = getIpAddress(CMManagerShim::CmIP6NameServer1);
+        mIpv6DnsAddress1->setContentWidgetData("text", string);
+    }
+    
+    // IPv6 secondary DNS address
+    if (mIpv6DnsAddress2) {
+        QString string = getIpAddress(CMManagerShim::CmIP6NameServer2);
+        mIpv6DnsAddress2->setContentWidgetData("text", string);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_UPDATEIPGROUP_EXIT);
+}
+
+/*!
+    Creates the IPv4 setting items.
+*/
+void CpPacketDataApAdvancedView::createIpv4SettingItems()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPV4SETTINGITEMS_ENTRY);
+
+    // Phone IP address
+    // "Automatic" checkbox
+    mIpv4Automatic = new CpSettingFormItemData(
+        HbDataFormModelItem::CheckBoxItem,
+        hbTrId("txt_occ_setlabel_phone_ip_address"));
+    mIpv4Automatic->setContentWidgetData(
+        "text",
+        hbTrId("txt_occ_setlabel_val_automatic"));
+    mForm->addConnection(
+        mIpv4Automatic,
+        SIGNAL(stateChanged(int)),
+        this,
+        SLOT(changeIpv4AddressMode(int)));
+    mIpv4Automatic->setContentWidgetData("objectName", "ipv4AutomaticCB");
+    mIpGroup->appendChild(mIpv4Automatic);
+    
+    // Phone IP address
+    mIpv4Address = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_phone_ip_address"));
+    mForm->addConnection(
+        mIpv4Address,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv4Address()));
+    mIpv4Address->setContentWidgetData("objectName", "ipv4AddressEdit");
+    mIpGroup->appendChild(mIpv4Address);
+    
+    // DNS addresses
+    // "Automatic" checkbox
+    mIpv4DnsAutomatic = new CpSettingFormItemData(
+        HbDataFormModelItem::CheckBoxItem,
+        hbTrId("txt_occ_setlabel_dns_addresses"));
+    mIpv4DnsAutomatic->setContentWidgetData(
+        "text",
+        hbTrId("txt_occ_setlabel_val_automatic"));
+    mForm->addConnection(
+        mIpv4DnsAutomatic,
+        SIGNAL(stateChanged(int)), 
+        this,
+        SLOT(changeIpv4DnsMode(int)));
+    mIpv4DnsAutomatic->setContentWidgetData("objectName", "ipv4DnsAutomaticCB");
+    mIpGroup->appendChild(mIpv4DnsAutomatic);
+    
+    // Primary DNS address
+    mIpv4DnsAddress1 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_primary_name_server"));
+    mForm->addConnection(
+        mIpv4DnsAddress1,
+        SIGNAL(editingFinished()), 
+        this,
+        SLOT(changeIpv4PrimaryDnsAddress()));
+    mIpv4DnsAddress1->setContentWidgetData("objectName", "ipv4DnsAddress1Edit");
+    mIpGroup->appendChild(mIpv4DnsAddress1);
+    
+    // Secondary DNS address
+    mIpv4DnsAddress2 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_secondary_name_server"));
+    mForm->addConnection(
+        mIpv4DnsAddress2,
+        SIGNAL(editingFinished()), 
+        this,
+        SLOT(changeIpv4SecondaryDnsAddress()));
+    mIpv4DnsAddress2->setContentWidgetData("objectName", "ipv4DnsAddress2Edit");
+    mIpGroup->appendChild(mIpv4DnsAddress2);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPV4SETTINGITEMS_EXIT);
+}
+
+/*!
+    Deletes the IPv4 setting items.
+*/
+void CpPacketDataApAdvancedView::deleteIpv4SettingItems()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_DELETEIPV4SETTINGITEMS_ENTRY);
+
+    // Phone IP address
+    // "Automatic" checkbox
+    if (mIpv4Automatic) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv4Automatic));
+        mIpv4Automatic = NULL;
+    }
+    
+    // Phone IP address
+    if (mIpv4Address) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv4Address));
+        mIpv4Address = NULL;
+    }
+    
+    // DNS addresses
+    // "Automatic" checkbox
+    if (mIpv4DnsAutomatic) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv4DnsAutomatic));
+        mIpv4DnsAutomatic = NULL;
+    }
+    
+    // Primary DNS address
+    if (mIpv4DnsAddress1) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv4DnsAddress1));
+        mIpv4DnsAddress1 = NULL;
+    }
+    
+    // Secondary DNS address
+    if (mIpv4DnsAddress2) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv4DnsAddress2));
+        mIpv4DnsAddress2 = NULL;
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_DELETEIPV4SETTINGITEMS_EXIT);
+}
+
+/*!
+    Creates the IPv6 setting items.
+*/
+void CpPacketDataApAdvancedView::createIpv6SettingItems()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPV6SETTINGITEMS_ENTRY);
+    
+    // DNS addresses
+    // Automatic/well-known/user defined combobox
+    mIpv6DnsAutomatic = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_dns_addresses"));
+    QStringList dnsModeList;
+    // Order of the list must match the Ipv6DnsType enum
+    dnsModeList
+        << hbTrId("txt_occ_setlabel_val_automatic")
+        << hbTrId("txt_occ_setlabel_dns_addresses_val_wellknown")
+        << hbTrId("txt_occ_setlabel_dns_addresses_val_user_defined");
+    mIpv6DnsAutomatic->setContentWidgetData("items", dnsModeList);
+    mForm->addConnection(
+        mIpv6DnsAutomatic,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(changeIpv6DnsMode(int)));
+    mIpv6DnsAutomatic->setContentWidgetData("objectName", "ipv6DnsAutomaticCB");
+    mIpGroup->appendChild(mIpv6DnsAutomatic);
+    
+    // Primary DNS address
+    mIpv6DnsAddress1 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_primary_name_server"));
+    mForm->addConnection(
+        mIpv6DnsAddress1,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv6PrimaryDnsAddress()));
+    mIpv6DnsAddress1->setContentWidgetData("objectName", "ipv6DnsAddress1Edit");
+    mIpGroup->appendChild(mIpv6DnsAddress1);
+    
+    // Secondary DNS address
+    mIpv6DnsAddress2 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_secondary_name_server"));
+    mForm->addConnection(
+        mIpv6DnsAddress2,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv6SecondaryDnsAddress()));
+    mIpv6DnsAddress2->setContentWidgetData("objectName", "ipv6DnsAddress2Edit");
+    mIpGroup->appendChild(mIpv6DnsAddress2);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CREATEIPV6SETTINGITEMS_EXIT);
+}
+
+/*!
+    Deletes the IPv6 setting items.
+*/
+void CpPacketDataApAdvancedView::deleteIpv6SettingItems()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_DELETEIPV6SETTINGITEMS_ENTRY);
+    
+    // DNS addresses
+    // Automatic/well-known/user defined combobox
+    if (mIpv6DnsAutomatic) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv6DnsAutomatic));
+        mIpv6DnsAutomatic = NULL;
+    }
+    
+    // Primary DNS address
+    if (mIpv6DnsAddress1) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv6DnsAddress1));
+        mIpv6DnsAddress1 = NULL;
+    }
+    
+    // Secondary DNS address
+    if (mIpv6DnsAddress2) {
+        mIpGroup->removeChild(mIpGroup->indexOf(mIpv6DnsAddress2));
+        mIpv6DnsAddress2 = NULL;
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_DELETEIPV6SETTINGITEMS_EXIT);
+}
+
+/*!
+    Creates the proxy settings group.
+*/
+void CpPacketDataApAdvancedView::createProxyGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CREATEPROXYGROUP_ENTRY);
+    
+    // Proxy settings group
+    mProxyGroup = new CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_proxy_settings"));
+    mModel->appendDataFormItem(mProxyGroup);
+    
+    // Proxy server address
+    mProxyServer = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_proxy_server_address"));
+    mForm->addConnection(
+        mProxyServer,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeProxyServer()));
+    mProxyServer->setContentWidgetData("objectName", "proxyServerEdit");
+    mProxyGroup->appendChild(mProxyServer);
+    
+    // Proxy port number
+    mProxyPort = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_proxy_port_number"));
+    mForm->addConnection(
+        mProxyPort,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeProxyPort()));
+    mProxyPort->setContentWidgetData("objectName", "proxyPortEdit");
+    mProxyGroup->appendChild(mProxyPort);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CREATEPROXYGROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates the proxy settings group.
+*/
+void CpPacketDataApAdvancedView::updateProxyGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_UPDATEPROXYGROUP_ENTRY);
+    
+    // Proxy server address
+    QString serverAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmProxyServerName);
+    mProxyServer->setContentWidgetData("text", serverAddress);
+    
+    // Proxy port number
+    uint portNumber = mCmConnectionMethod->getIntAttribute(
+        CMManagerShim::CmProxyPortNumber);
+    if (portNumber > 0) {
+        mProxyPort->setContentWidgetData("text", QVariant(portNumber));
+    } else {
+        mProxyPort->setContentWidgetData("text", "");
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_UPDATEPROXYGROUP_EXIT);
+}
+
+/*!
+    Reads network type (IPv4/IPv6) from CommsDat.
+*/
+CpPacketDataApAdvancedView::NetworkType CpPacketDataApAdvancedView::getNetworkType()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_GETNETWORKTYPE_ENTRY);
+
+    uint networkType = mCmConnectionMethod->getIntAttribute(
+        CMManagerShim::PacketDataPDPType);
+    
+    if (networkType == RPacketContext::EPdpTypeIPv6) {
+        OstTraceFunctionExit0(DUP1_CPPACKETDATAAPADVANCEDVIEW_GETNETWORKTYPE_EXIT);
+        return NetworkTypeIpv6;
+    }
+
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_GETNETWORKTYPE_EXIT);
+    return NetworkTypeIpv4;
+}
+
+/*!
+    Reads an IP address from CommsDat with given attribute. If string is
+    empty, a zero address (0.0.0.0 or 0:0:0:0:0:0:0:0) is returned.
+*/
+QString CpPacketDataApAdvancedView::getIpAddress(
+    CMManagerShim::ConnectionMethodAttribute attribute)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_GETIPADDRESS_ENTRY);
+    
+    QString ipAddress = mCmConnectionMethod->getStringAttribute(attribute);
+    
+    if (ipAddress.isEmpty()) {
+        // String is empty, return a zero address instead
+        switch (attribute) {
+            case CMManagerShim::CmIPAddress:
+            case CMManagerShim::CmIPNameServer1:
+            case CMManagerShim::CmIPNameServer2:
+                // IPv4 address
+                ipAddress = CMManagerShim::UnspecifiedIpv4Address; 
+                break;
+            
+            case CMManagerShim::CmIP6NameServer1:
+            case CMManagerShim::CmIP6NameServer2:
+                // IPv6 address
+                ipAddress = CMManagerShim::DynamicIpv6Address;
+                break;
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_GETIPADDRESS_EXIT);
+    return ipAddress;
+}
+
+/*!
+    Resolves IPv6 DNS address type.
+*/
+CpPacketDataApAdvancedView::Ipv6DnsType CpPacketDataApAdvancedView::getIpv6DnsType()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_GETIPV6DNSTYPE_ENTRY);
+    
+    // Read "DNS address from server" flag
+    bool dnsAddressFromServer = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIP6DNSAddrFromServer);
+    
+    // Read IPv6 DNS addresses from CommsDat
+    QString primaryAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmIP6NameServer1);
+    QString secondaryAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmIP6NameServer2);
+
+    // Resolve IPv6 DNS address type
+    Ipv6DnsType type = Ipv6DnsTypeUserDefined;
+    if (dnsAddressFromServer) {
+        // Automatic
+        type = Ipv6DnsTypeAutomatic;
+    } else if (primaryAddress.toLower() == CMManagerShim::KnownIpv6NameServer1
+        && secondaryAddress.toLower() == CMManagerShim::KnownIpv6NameServer2) {
+        // Well-known IPv6 DNS addresses
+        type = Ipv6DnsTypeWellKnown;
+    }
+
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_GETIPV6DNSTYPE_EXIT);
+    return type;
+}
+
+/*!
+    Sets IPv4 address field enabled/disabled.
+*/
+void CpPacketDataApAdvancedView::enableIpv4AddressFields(int state)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV4ADDRESSFIELDS_ENTRY);
+    
+    if (state == Qt::Checked) {
+        // Automatic, disable text field
+        if (mIpv4Address) {
+            mIpv4Address->setEnabled(false);
+        }
+    } else {
+        // User defined, enable text field
+        if (mIpv4Address) {
+            mIpv4Address->setEnabled(true);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV4ADDRESSFIELDS_EXIT);
+}
+
+/*!
+    Sets IPv4 DNS address fields enabled/disabled.
+*/
+void CpPacketDataApAdvancedView::enableIpv4DnsFields(int state)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV4DNSFIELDS_ENTRY);
+    
+    if (state == Qt::Checked) {
+        // Automatic, disable text fields
+        if (mIpv4DnsAddress1) {
+            mIpv4DnsAddress1->setEnabled(false);
+        }
+        if (mIpv4DnsAddress2) {
+            mIpv4DnsAddress2->setEnabled(false);
+        }
+    } else {
+        // User defined, enable text fields
+        if (mIpv4DnsAddress1) {
+            mIpv4DnsAddress1->setEnabled(true);
+        }
+        if (mIpv4DnsAddress2) {
+            mIpv4DnsAddress2->setEnabled(true);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV4DNSFIELDS_EXIT);
+}
+
+/*!
+    Sets IPv6 DNS address fields enabled/disabled.
+*/
+void CpPacketDataApAdvancedView::enableIpv6DnsFields(int selectionIndex)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV6DNSFIELDS_ENTRY);
+    
+    // Check combobox value
+    if (selectionIndex == Ipv6DnsTypeUserDefined) {
+        // User-defined, enable text fields
+        if (mIpv6DnsAddress1) {
+            mIpv6DnsAddress1->setEnabled(true);
+        }
+        if (mIpv6DnsAddress2) {
+            mIpv6DnsAddress2->setEnabled(true);
+        }
+    } else {
+        // Automatic or well-known, disable text fields
+        if (mIpv6DnsAddress1) {
+            mIpv6DnsAddress1->setEnabled(false);
+        }
+        if (mIpv6DnsAddress2) {
+            mIpv6DnsAddress2->setEnabled(false);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_ENABLEIPV6DNSFIELDS_EXIT);
+}
+
+/*!
+    Validates an IP address and saves it to CommsDat in case it was a valid
+    address or an empty string. In case the address is not valid, an error
+    note is shown to the user and previous setting is restored to the UI.
+*/
+bool CpPacketDataApAdvancedView::validateAndSaveIpAddress(
+    HbDataFormModelItem *item,
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QAbstractSocket::NetworkLayerProtocol protocol)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_VALIDATEANDSAVEIPADDRESS_ENTRY);
+    
+    bool success = false;
+    
+    // Check address
+    QString address = item->contentWidgetData("text").toString();
+    QHostAddress hostAddress;
+    if (hostAddress.setAddress(address)
+        && hostAddress.protocol() == protocol) {
+        // Proper address, convert to lower case (IPv6)
+        address = hostAddress.toString().toLower();
+    } else if (address.isEmpty()) {
+        // Empty string, replace with 0.0.0.0 or 0:0:0:0:0:0:0:0
+        if (protocol == QAbstractSocket::IPv4Protocol) {
+            address = CMManagerShim::UnspecifiedIpv4Address;
+        } else {
+            address = CMManagerShim::DynamicIpv6Address;
+        }
+    } else {
+        // Invalid address
+        address.clear();
+    }
+
+    if (!address.isEmpty()) {
+        // Save to CommsDat
+        mCmConnectionMethod->setStringAttribute(attribute, address);
+        if (tryUpdate()) {
+            success = true;
+            item->setContentWidgetData("text", address);
+        }
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_input"));
+        // Restore previous setting
+        address = getIpAddress(attribute);
+        item->setContentWidgetData("text", address);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_VALIDATEANDSAVEIPADDRESS_EXIT);
+    return success;
+}
+
+/*!
+    Shows message box with "OK" button using given text.
+*/
+void CpPacketDataApAdvancedView::showMessageBox(
+    HbMessageBox::MessageBoxType type,
+    const QString &text)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_SHOWMESSAGEBOX_ENTRY);
+    
+    // Create a message box
+    mMessageBox = QSharedPointer<HbMessageBox>(new HbMessageBox(type));
+    mMessageBox->setText(text);
+    mMessageBox->setModal(true);
+    mMessageBox->setTimeout(HbPopup::NoTimeout);
+    mMessageBox->open();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_SHOWMESSAGEBOX_EXIT);
+}
+
+/*!
+    Tries to update connection method changes to CommsDat.
+    Returns "true" if success, "false" if some error happened. 
+*/
+bool CpPacketDataApAdvancedView::tryUpdate()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_TRYUPDATE_ENTRY);
+    
+    // Try update
+    try {
+        mCmConnectionMethod->update();
+    }
+    catch (const std::exception&) {
+        // Handle error
+        handleUpdateError();
+        
+        OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_TRYUPDATE_EXIT);
+        return false;
+    }
+
+    OstTraceFunctionExit0(DUP1_CPPACKETDATAAPADVANCEDVIEW_TRYUPDATE_EXIT);
+    return true;
+}
+
+/*!
+    Handles failed CommsDat update.
+ */
+void CpPacketDataApAdvancedView::handleUpdateError()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_HANDLEUPDATEERROR_ENTRY);
+    
+    // Show error note to user
+    showMessageBox(
+        HbMessageBox::MessageTypeWarning,
+        hbTrId("txt_occ_info_unable_to_save_setting"));
+    // Reload settings from CommsDat and update UI
+    try {
+        mCmConnectionMethod->refresh();
+    }
+    catch (const std::exception&) {
+        // Ignore error from refresh. Most likely this will not happen, but
+        // if it does, there isn't very much we can do.
+        OstTrace0(
+            TRACE_ERROR,
+            CPPACKETDATAAPPADVANCEDVIEW_HANDLEUPDATEERROR,
+            "Refresh failed");
+    };
+    updateIpGroup();
+    updateProxyGroup();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_HANDLEUPDATEERROR_EXIT);
+}
+
+/*!
+    Initializes all settings groups.
+*/
+void CpPacketDataApAdvancedView::setEditorPreferences(const QModelIndex index)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_SETEDITORPREFERENCES_ENTRY);
+    
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(index));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(index);
+
+    if (modelItem == mIpv4Address
+        || modelItem == mIpv4DnsAddress1
+        || modelItem == mIpv4DnsAddress2
+        || modelItem == mIpv6DnsAddress1
+        || modelItem == mIpv6DnsAddress2
+        || modelItem == mProxyServer
+        || modelItem == mProxyPort) {
+        // HbLineEdit items, get editor and editor interface
+        HbLineEdit *edit = qobject_cast<HbLineEdit *>
+            (viewItem->dataItemContentWidget());
+        HbEditorInterface editorInterface(edit);
+
+        if (modelItem == mIpv4Address
+            || modelItem == mIpv4DnsAddress1
+            || modelItem == mIpv4DnsAddress2) {
+                // IPv4 IP address
+                editorInterface.setMode(HbInputModeNumeric);
+                editorInterface.setFilter(CpIpv4Filter::instance());
+                edit->setMaxLength(CMManagerShim::CmIP4AddressLength);
+        } else if (modelItem == mIpv6DnsAddress1
+            || modelItem == mIpv6DnsAddress2) {
+                // IPv6 IP address
+                editorInterface.setInputConstraints(
+                    HbEditorConstraintLatinAlphabetOnly);
+                editorInterface.setFilter(CpIpv6Filter::instance());
+                edit->setInputMethodHints(
+                    Qt::ImhNoPredictiveText
+                    | Qt::ImhPreferLowercase);
+                edit->setMaxLength(CMManagerShim::CmIP6NameServerLength);
+        } else if (modelItem == mProxyServer) {                
+                // Proxy server address
+                editorInterface.setMode(HbInputModeNone);
+                editorInterface.setInputConstraints(
+                    HbEditorConstraintLatinAlphabetOnly);
+                editorInterface.setFilter(HbUrlFilter::instance());
+                editorInterface.setEditorClass(HbInputEditorClassUrl);
+                editorInterface.setDigitType(HbDigitTypeNone);
+                edit->setInputMethodHints(
+                    Qt::ImhNoPredictiveText
+                    | Qt::ImhPreferLowercase);
+                edit->setMaxLength(CMManagerShim::CmProxyServerNameLength);
+        } else { /* mProxyPort */                
+                // Proxy port number
+                editorInterface.setMode(HbInputModeNumeric);
+                edit->setInputMethodHints(Qt::ImhDigitsOnly);
+                edit->setMaxLength(CMManagerShim::CmProxyPortNumberLength);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_SETEDITORPREFERENCES_EXIT);
+}
+
+/*!
+    Handles change to network type (IPv4/IPv6).
+*/
+void CpPacketDataApAdvancedView::changeNetworkType(int type)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGENETWORKTYPE_ENTRY);
+
+    // Save network type to CommsDat
+    int pdpType;
+    if (type == NetworkTypeIpv6) {
+        pdpType = RPacketContext::EPdpTypeIPv6;
+    } else {
+        pdpType = RPacketContext::EPdpTypeIPv4;
+    }
+    mCmConnectionMethod->setIntAttribute(
+        CMManagerShim::PacketDataPDPType,
+        pdpType);
+    if (tryUpdate())
+        {
+        // This will handle updating the UI with correct setting items 
+        updateIpGroup();
+        }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGENETWORKTYPE_EXIT);
+}
+
+/*!
+    Handles change to IPv4 address mode (automatic/user defined).
+*/
+void CpPacketDataApAdvancedView::changeIpv4AddressMode(int state)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4ADDRESSMODE_ENTRY);
+    
+    bool ipv4AddressFromServer;
+    if (state == Qt::Checked) {
+        ipv4AddressFromServer = true;
+    } else {
+        ipv4AddressFromServer = false;
+    }
+    
+    if (!ipv4AddressFromServer
+        && getIpAddress(CMManagerShim::CmIPAddress) ==
+            CMManagerShim::UnspecifiedIpv4Address) {
+        // User defined IP address selected, but no valid address is stored.
+        // Just enable the UI IP editors, because CMManager will update the
+        // "IP address from server" flag by itself when a valid IP address
+        // is stored.
+        enableIpv4AddressFields(state);
+    } else {
+        // Save setting to CommsDat
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPAddrFromServer,
+            ipv4AddressFromServer);
+        if (tryUpdate()) {
+            enableIpv4AddressFields(state);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4ADDRESSMODE_EXIT);
+}
+
+/*!
+    Saves IPv4 address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeIpv4Address()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4ADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4Address,
+        CMManagerShim::CmIPAddress,
+        QAbstractSocket::IPv4Protocol)) {
+        // In case the IP address is empty or 0.0.0.0, CMManager changes the
+        // "IP address from server" flag to true. We need to refresh the UI to
+        // make sure we are in sync.
+        updateIpGroup();
+    }
+
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4ADDRESS_EXIT);
+}
+
+/*!
+    Handles change to IPv4 DNS mode (automatic/user defined).
+*/
+void CpPacketDataApAdvancedView::changeIpv4DnsMode(int state)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4DNSMODE_ENTRY);
+    
+    bool dnsAddressFromServer;
+    if (state == Qt::Checked) {
+        dnsAddressFromServer = true;
+    } else {
+        dnsAddressFromServer = false;
+    }
+    // Save setting to CommsDat
+    mCmConnectionMethod->setBoolAttribute(
+        CMManagerShim::CmIPDNSAddrFromServer,
+        dnsAddressFromServer);
+    if (tryUpdate()) {
+        enableIpv4DnsFields(state);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4DNSMODE_EXIT);
+}
+
+/*!
+    Saves IPv4 primary DNS address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeIpv4PrimaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4PRIMARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4DnsAddress1,
+        CMManagerShim::CmIPNameServer1,
+        QAbstractSocket::IPv4Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPDNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0.0.0.0, CMManager will
+            // check secondary DNS address and in case it is a valid address,
+            // move it to the primary DNS address. We need to refresh the
+            // UI to make sure we are in sync. If tryUpdate() fails it does
+            // the refresh automatically, so only success case is handled
+            // here.
+            updateIpGroup();            
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4PRIMARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves IPv4 secondary DNS address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeIpv4SecondaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4SECONDARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4DnsAddress2,
+        CMManagerShim::CmIPNameServer2,
+        QAbstractSocket::IPv4Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPDNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0.0.0.0, CMManager will
+            // write the address there instead of secondary DNS address, so we
+            // need to refresh the UI to make sure we are in sync. If
+            // tryUpdate() fails it does the refresh automatically, so only
+            // success case is handled here.
+            updateIpGroup();
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV4SECONDARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Handles change to IPv6 DNS mode (automatic/well-known/user defined).
+*/
+void CpPacketDataApAdvancedView::changeIpv6DnsMode(int state)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6DNSMODE_ENTRY);
+    
+    // Update "DNS address from server" flag
+    if (state == Ipv6DnsTypeAutomatic) {
+        // Automatic
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            true);
+    } else {
+        // User defined or well-known address
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        
+        if (state == Ipv6DnsTypeWellKnown) {
+            // Well-known address, set DNS addresses and update UI
+            mCmConnectionMethod->setStringAttribute(
+                CMManagerShim::CmIP6NameServer1,
+                CMManagerShim::KnownIpv6NameServer1);
+            mIpv6DnsAddress1->setContentWidgetData(
+                "text",
+                CMManagerShim::KnownIpv6NameServer1);
+            mCmConnectionMethod->setStringAttribute(
+                CMManagerShim::CmIP6NameServer2,
+                CMManagerShim::KnownIpv6NameServer2);
+            mIpv6DnsAddress2->setContentWidgetData(
+                "text",
+                CMManagerShim::KnownIpv6NameServer2);        
+        }
+    }
+
+    if (tryUpdate()) {
+        enableIpv6DnsFields(state);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6DNSMODE_EXIT);
+}
+
+/*!
+    Saves IPv6 primary DNS address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeIpv6PrimaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6PRIMARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv6DnsAddress1,
+        CMManagerShim::CmIP6NameServer1,
+        QAbstractSocket::IPv6Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0:0:0:0:0:0:0:0,
+            // CMManager will check secondary DNS address and in case it is a
+            // valid address, move it to the primary DNS address. We need to
+            // refresh the UI to make sure we are in sync. If tryUpdate()
+            // fails it does the refresh automatically, so only success case
+            // is handled here.
+            updateIpGroup();            
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6PRIMARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves IPv6 secondary DNS address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeIpv6SecondaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6SECONDARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv6DnsAddress2,
+        CMManagerShim::CmIP6NameServer2,
+        QAbstractSocket::IPv6Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0:0:0:0:0:0:0:0,
+            // CMManager will write the address there instead of secondary DNS
+            // address, so we need to refresh the UI to make sure we are in
+            // sync. If tryUpdate() fails it does the refresh automatically,
+            // so only success case is handled here.
+            updateIpGroup();
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEIPV6SECONDARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves proxy server address to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeProxyServer()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEPROXYSERVER_ENTRY);
+    
+    QString proxyServer = mProxyServer->contentWidgetData("text").toString();
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::CmProxyServerName,
+        proxyServer);
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEPROXYSERVER_EXIT);
+}
+
+/*!
+    Saves proxy port to CommsDat.
+*/
+void CpPacketDataApAdvancedView::changeProxyPort()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPADVANCEDVIEW_CHANGEPROXYPORT_ENTRY);
+    
+    uint proxyPort = mProxyPort->contentWidgetData("text").toInt();
+    if (proxyPort <= 65535) {
+        if (proxyPort == 0) {
+            // Don't show zero
+            mProxyPort->setContentWidgetData("text", "");
+        }
+        mCmConnectionMethod->setIntAttribute(
+            CMManagerShim::CmProxyPortNumber,
+            proxyPort);
+        (void)tryUpdate();
+    } else {
+        // Inform user of invalid value
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_input"));
+        // Restore previous setting
+        proxyPort = mCmConnectionMethod->getIntAttribute(
+            CMManagerShim::CmProxyPortNumber);
+        if (proxyPort > 0) {
+            mProxyPort->setContentWidgetData("text", QVariant(proxyPort));
+        } else {
+            mProxyPort->setContentWidgetData("text", "");
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPADVANCEDVIEW_CHANGEPROXYPORT_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/src/cppacketdataapplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP plugin implementation.  
+*
+*/
+
+// System includes
+#include <HbTranslator>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+#include "cppacketdataapplugin.h"
+#include "cppacketdataapview.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cppacketdataappluginTraces.h"
+#endif
+
+/*!
+    \class CpPacketDataApPlugin
+    \brief Implements the packet data bearer AP (access point) Control Panel
+           plugin.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpPacketDataApPlugin::CpPacketDataApPlugin() :
+    mTranslator(new HbTranslator("cpapplugin")),
+    mCmManager(0),
+    mCmConnectionMethod(0)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPPLUGIN_CPPACKETDATAAPPLUGIN_ENTRY);
+ 
+    OstTraceFunctionExit0(CPPACKETDATAAPPLUGIN_CPPACKETDATAAPPLUGIN_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpPacketDataApPlugin::~CpPacketDataApPlugin()
+{
+    OstTraceFunctionEntry0(DUP1_CPPACKETDATAAPPLUGIN_CPPACKETDATAAPPLUGIN_ENTRY);
+    
+    delete mCmConnectionMethod;
+    delete mCmManager;
+    
+    OstTraceFunctionExit0(DUP1_CPPACKETDATAAPPLUGIN_CPPACKETDATAAPPLUGIN_EXIT);
+}
+
+/*!
+    Returns the bearer type handled by the plugin.
+*/
+uint CpPacketDataApPlugin::bearerType() const
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPPLUGIN_BEARERTYPE_ENTRY);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPPLUGIN_BEARERTYPE_EXIT);
+    return CMManagerShim::BearerTypePacketData;
+}
+
+/*!
+    Creates the packet data AP settings view.
+*/
+CpBaseSettingView *CpPacketDataApPlugin::createSettingView(
+    uint connectionMethod)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPPLUGIN_CREATESETTINGVIEW_ENTRY);
+    
+    // Find the connection method
+    try {
+        mCmManager = new CmManagerShim();
+        mCmConnectionMethod = mCmManager->connectionMethod(connectionMethod);
+    }
+    catch (const std::exception&) {
+        // Error, don't create settings view, just return
+        OstTrace1(
+            TRACE_ERROR,
+            CPPACKETDATAAPPLUGIN_CREATESETTINGVIEW,
+            "Connection method loading failed;connectionMethod=%u",
+            connectionMethod);
+
+        OstTraceFunctionExit0(DUP1_CPPACKETDATAAPPLUGIN_CREATESETTINGVIEW_EXIT);
+        return NULL;
+    }
+
+    // Connection method found, create settings view
+    OstTraceFunctionExit0(CPPACKETDATAAPPLUGIN_CREATESETTINGVIEW_EXIT);
+    return new CpPacketDataApView(mCmConnectionMethod);
+}
+
+Q_EXPORT_PLUGIN2(cppacketdataapplugin, CpPacketDataApPlugin);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/src/cppacketdataapview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,596 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP settings view header file.  
+*
+*/
+
+// System includes
+#include <QString>
+#include <QStringList>
+#include <QVariant>
+#include <HbMainWindow>
+#include <HbMenu>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormViewItem>
+#include <HbLineEdit>
+#include <HbEditorInterface>
+#include <HbUrlFilter>
+#include <HbPopup>
+#include <HbMessageBox>
+#include <HbAction>
+#include <cpsettingformitemdata.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+#include "cppacketdataapplugin.h"
+#include "cppacketdataapview.h"
+#include "cppacketdataapadvancedview.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cppacketdataapviewTraces.h"
+#endif
+
+/*!
+    \class CpPacketDataApView
+    \brief Implements the settings view for packet data bearer access points.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpPacketDataApView::CpPacketDataApView(
+    CmConnectionMethodShim *cmConnectionMethod,
+    QGraphicsItem *parent) :
+        CpBaseSettingView(0, parent),
+        mForm(0),
+        mModel(0),
+        mApSettingsGroupItem(0),
+        mConnectionNameItem(0),
+        mAccessPointNameItem(0),
+        mUserNameItem(0),
+        mPasswordItem(0),
+        mAuthenticationItem(0),
+        mHomepageItem(0),
+        mAdvancedSettingsAction(0),
+        mCmConnectionMethod(cmConnectionMethod),
+        mMessageBox(0)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_CPPACKETDATAAPVIEW_ENTRY);
+    
+    HbMenu *menu = this->menu();
+    mAdvancedSettingsAction = menu->addAction(
+        hbTrId("txt_occ_opt_advanced_settings"));
+    bool status = connect(
+        menu,
+        SIGNAL(triggered(HbAction*)),
+        this,
+        SLOT(menuActionTriggered(HbAction*)));
+    Q_ASSERT(status);
+
+    // Construct packet data AP settings UI
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    mModel = new HbDataFormModel(mForm);
+    mForm->setModel(mModel);
+    
+    // Add access point settings group
+    createAccessPointSettingsGroup();
+        
+    status = connect(
+        mForm,
+        SIGNAL(itemShown(const QModelIndex)),
+        this,
+        SLOT(setEditorPreferences(const QModelIndex)));
+    Q_ASSERT(status);
+
+    // Expand Access point settings group
+    mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), true);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_CPPACKETDATAAPVIEW_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpPacketDataApView::~CpPacketDataApView()
+{
+    OstTraceFunctionEntry0(DUP1_CPPACKETDATAAPVIEW_CPPACKETDATAAPVIEW_ENTRY);
+    
+    OstTraceFunctionExit0(DUP1_CPPACKETDATAAPVIEW_CPPACKETDATAAPVIEW_EXIT);
+}
+
+/*!
+    Adds settings group with all settings items to the model.
+*/
+void CpPacketDataApView::createAccessPointSettingsGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_CREATEACCESSPOINTSETTINGSGROUP_ENTRY);
+    
+    // Access point settings group
+    mApSettingsGroupItem = new HbDataFormModelItem(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_access_point_settings"));
+    mModel->appendDataFormItem(mApSettingsGroupItem);
+    
+    // Connection name
+    mConnectionNameItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_connection_name"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mConnectionNameItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(connectionNameChanged()));
+    mConnectionNameItem->setContentWidgetData("objectName", "connectionNameEdit");
+    mApSettingsGroupItem->appendChild(mConnectionNameItem);
+    
+    // Access point name
+    mAccessPointNameItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_access_point_name"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mAccessPointNameItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(accessPointNameChanged()));
+    mAccessPointNameItem->setContentWidgetData("objectName", "accessPointNameEdit");
+    mApSettingsGroupItem->appendChild(mAccessPointNameItem);
+    
+    // User name
+    mUserNameItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_user_name"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mUserNameItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(userNameChanged()));
+    mUserNameItem->setContentWidgetData("objectName", "userNameEdit");
+    mApSettingsGroupItem->appendChild(mUserNameItem);
+    
+    // Password
+    mPasswordItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_password"));
+    mPasswordItem->setContentWidgetData("echoMode", "PasswordEchoOnEdit");
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mPasswordItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(passwordChanged()));
+    mPasswordItem->setContentWidgetData("objectName", "passwordEdit");
+    mApSettingsGroupItem->appendChild(mPasswordItem);
+    
+    // Authentication
+    mAuthenticationItem = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_authentication"));
+    // Add items to combobox
+    QStringList authenticationItems;
+    authenticationItems
+        << hbTrId("txt_occ_setlabel_authentication_val_normal")
+        << hbTrId("txt_occ_setlabel_authentication_val_secure");
+    mAuthenticationItem->setContentWidgetData("items", authenticationItems);
+    // Construct map to link item indexes to setting values
+    mAuthenticationMap.insert(0, false); // normal (plaintext allowed)
+    mAuthenticationMap.insert(1, true); // secure (plaintext disabled)
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mAuthenticationItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(authenticationChanged(int)));
+    mAuthenticationItem->setContentWidgetData("objectName", "authenticationCB");
+    mApSettingsGroupItem->appendChild(mAuthenticationItem);
+    
+    // Homepage
+    mHomepageItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_homepage"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mHomepageItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(homepageChanged()));
+    mHomepageItem->setContentWidgetData("objectName", "homePageEdit");
+    mApSettingsGroupItem->appendChild(mHomepageItem);
+    
+    // Read settings from CommsDat and update widgets
+    updateAccessPointSettingsGroup();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_CREATEACCESSPOINTSETTINGSGROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates "Access point settings" group settings.
+*/
+void CpPacketDataApView::updateAccessPointSettingsGroup()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_UPDATEACCESSPOINTSETTINGSGROUP_ENTRY);
+
+    // Get attributes from CommsDat and set values to UI widgets
+    
+    // Connection name
+    QString connectionName = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmName);
+    mConnectionNameItem->setContentWidgetData("text", connectionName);
+    
+    // Access point name
+    QString accessPointName = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::PacketDataAPName);
+    mAccessPointNameItem->setContentWidgetData("text", accessPointName);
+    
+    // User name
+    QString userName = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::PacketDataIFAuthName);
+    mUserNameItem->setContentWidgetData("text", userName);
+    
+    // Password
+    QString password = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::PacketDataIFAuthPass);
+    mPasswordItem->setContentWidgetData("text", password);
+
+    // Authentication
+    bool disablePlainText = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::PacketDataDisablePlainTextAuth);
+    mAuthenticationItem->setContentWidgetData("currentIndex",
+        mAuthenticationMap.key(disablePlainText));
+    
+    // Homepage
+    QString homepage = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmStartPage);
+    mHomepageItem->setContentWidgetData("text", homepage);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_UPDATEACCESSPOINTSETTINGSGROUP_EXIT);
+}
+
+/*!
+    Shows message box with "OK" button using given text.
+*/
+void CpPacketDataApView::showMessageBox(
+    HbMessageBox::MessageBoxType type,
+    const QString &text)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_SHOWMESSAGEBOX_ENTRY);
+    
+    // Create a message box
+    mMessageBox = QSharedPointer<HbMessageBox>(new HbMessageBox(type));
+    mMessageBox->setText(text);
+    mMessageBox->setModal(true);
+    mMessageBox->setTimeout(HbPopup::NoTimeout);
+    mMessageBox->open();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_SHOWMESSAGEBOX_EXIT);
+}
+
+/*!
+    Tries to update connection method changes to CommsDat.
+    Returns "true" if success, "false" if some error happened. 
+*/
+bool CpPacketDataApView::tryUpdate()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_TRYUPDATE_ENTRY);
+    
+    // Try update
+    try {
+        mCmConnectionMethod->update();
+    }
+    catch (const std::exception&) {
+        // Handle error
+        handleUpdateError();
+        
+        OstTraceFunctionExit0(CPPACKETDATAAPVIEW_TRYUPDATE_EXIT);
+        return false;
+    }
+
+    OstTraceFunctionExit0(DUP1_CPPACKETDATAAPVIEW_TRYUPDATE_EXIT);
+    return true;
+}
+
+/*!
+    Handles failed CommsDat update.
+ */
+void CpPacketDataApView::handleUpdateError()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_HANDLEUPDATEERROR_ENTRY);
+    
+    // Show error note to user
+    showMessageBox(
+        HbMessageBox::MessageTypeWarning,
+        hbTrId("txt_occ_info_unable_to_save_setting"));
+    // Reload settings from CommsDat and update UI
+    try {
+        mCmConnectionMethod->refresh();
+    }
+    catch (const std::exception&) {
+        // Ignore error from refresh. Most likely this will not happen, but
+        // if it does, there isn't very much we can do.
+        OstTrace0(
+            TRACE_ERROR,
+            CPPACKETDATAAPVIEW_HANDLEUPDATEERROR,
+            "Refresh failed");
+    };
+    updateAccessPointSettingsGroup();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_HANDLEUPDATEERROR_EXIT);
+}
+
+/*!
+    Updates connection name to CommsDat.
+*/
+void CpPacketDataApView::connectionNameChanged()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_CONNECTIONNAMECHANGED_ENTRY);
+    
+    QString connectionName =
+        mConnectionNameItem->contentWidgetData("text").toString();
+    if (!connectionName.isEmpty()) {
+        // Update to CommsDat
+        mCmConnectionMethod->setStringAttribute(
+            CMManagerShim::CmName,
+            connectionName);
+        if (tryUpdate()) {
+            // Update successful
+            // Read name because in case the name already exists it will
+            // be made unique by CMManager
+            connectionName = mCmConnectionMethod->getStringAttribute(
+                CMManagerShim::CmName);
+            mConnectionNameItem->setContentWidgetData("text", connectionName);
+        }
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_name"));
+
+        // Empty name not allowed, revert back to old value in CommsDat
+        connectionName = mCmConnectionMethod->getStringAttribute(
+            CMManagerShim::CmName);
+        mConnectionNameItem->setContentWidgetData("text", connectionName);
+     }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_CONNECTIONNAMECHANGED_EXIT);
+}
+
+/*!
+    Updates access point name to CommsDat.
+*/
+void CpPacketDataApView::accessPointNameChanged()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_ACCESSPOINTNAMECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QString accessPointName =
+        mAccessPointNameItem->contentWidgetData("text").toString();
+    if (!accessPointName.isEmpty()) {
+        mCmConnectionMethod->setStringAttribute(
+            CMManagerShim::PacketDataAPName,
+            accessPointName);
+        (void)tryUpdate();
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_name"));
+    
+        // Empty name not allowed, revert back to old value in CommsDat
+        accessPointName = mCmConnectionMethod->getStringAttribute(
+            CMManagerShim::PacketDataAPName);
+        mAccessPointNameItem->setContentWidgetData("text", accessPointName);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_ACCESSPOINTNAMECHANGED_EXIT);
+}
+
+/*!
+    Updates user name to CommsDat.
+*/
+void CpPacketDataApView::userNameChanged()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_USERNAMECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QVariant userName = mUserNameItem->contentWidgetData("text");
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::PacketDataIFAuthName,
+        userName.toString());
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_USERNAMECHANGED_EXIT);
+}
+
+/*!
+    Updates password to CommsDat.
+*/
+void CpPacketDataApView::passwordChanged()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_PASSWORDCHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QVariant password = mPasswordItem->contentWidgetData("text");
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::PacketDataIFAuthPass,
+        password.toString());
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_PASSWORDCHANGED_EXIT);
+}
+
+/*!
+    Updates authentication setting to CommsDat.
+*/
+void CpPacketDataApView::authenticationChanged(int index)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_AUTHENTICATIONCHANGED_ENTRY);
+    
+    // Update to CommsDat
+    mCmConnectionMethod->setBoolAttribute(
+        CMManagerShim::PacketDataDisablePlainTextAuth,
+        mAuthenticationMap.value(index));
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_AUTHENTICATIONCHANGED_EXIT);
+}
+
+/*!
+    Updates homepage to CommsDat.
+*/
+void CpPacketDataApView::homepageChanged()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_HOMEPAGECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QString homepage = mHomepageItem->contentWidgetData("text").toString();
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::CmStartPage, homepage);
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_HOMEPAGECHANGED_EXIT);
+}
+
+/*!
+    Handles menu actions.
+*/
+void CpPacketDataApView::menuActionTriggered(HbAction *action)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_MENUACTIONTRIGGERED_ENTRY);
+    
+    if (action == mAdvancedSettingsAction) {
+        // "Advanced settings" selected
+        HbMainWindow *mainWindow = this->mainWindow();
+
+        // Create the advanced settings view
+        HbView *newView = new CpPacketDataApAdvancedView(mCmConnectionMethod);
+        // Connect signal to return back to the previous view
+        bool status = QObject::connect(
+            newView,
+            SIGNAL(aboutToClose()),
+            this,
+            SLOT(restoreCurrentView()));
+        Q_ASSERT(status);
+
+        // Show the advanced settings view
+        mainWindow->addView(newView);
+        mainWindow->setCurrentView(newView);
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_MENUACTIONTRIGGERED_EXIT);
+}
+
+/*!
+    Deletes the current view and sets this view as the current one.
+*/
+void CpPacketDataApView::restoreCurrentView()
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_RESTORECURRENTVIEW_ENTRY);
+    
+    HbMainWindow *mainWindow = this->mainWindow();
+    
+    // Remove the previous view and delete it
+    HbView *prevView = mainWindow->currentView();
+    mainWindow->removeView(prevView);
+    prevView->deleteLater();
+    
+    // Set this view on top
+    mainWindow->setCurrentView(this);
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_RESTORECURRENTVIEW_EXIT);
+}
+
+/*!
+    Sets editor preferences for all HbLineEdit items.
+*/
+void CpPacketDataApView::setEditorPreferences(const QModelIndex modelIndex)
+{
+    OstTraceFunctionEntry0(CPPACKETDATAAPVIEW_SETEDITORPREFERENCES_ENTRY);
+    
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(modelIndex));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex);
+    
+    if (modelItem == mConnectionNameItem
+        || modelItem == mAccessPointNameItem
+        || modelItem == mUserNameItem
+        || modelItem == mPasswordItem
+        || modelItem == mHomepageItem ) {
+        // HbLineEdit items, get editor and editor interface
+        HbLineEdit *edit = qobject_cast<HbLineEdit *>
+            (viewItem->dataItemContentWidget());
+        HbEditorInterface editInterface(edit);
+        
+        if (modelItem == mConnectionNameItem) {
+            // Setup editor for connection name
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            edit->setInputMethodHints(Qt::ImhNoPredictiveText); 
+            edit->setMaxLength(CMManagerShim::CmNameLength);
+        } else if (modelItem == mAccessPointNameItem) {
+            // Setup editor for packet data AP name
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::PacketDataAPNameLength);
+        } else if (modelItem == mUserNameItem) {
+            // Setup editor for user name
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setEditorClass(HbInputEditorClassUsername);
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::PacketDataIFAuthNameLength);
+        } else if (modelItem == mPasswordItem) {
+            // Setup editor for password
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setEditorClass(HbInputEditorClassPassword);
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::PacketDataIFAuthPassLength);
+        } else { /* mHomepageItem */
+            // Setup editor for URL
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setFilter(HbUrlFilter::instance());
+            editInterface.setEditorClass(HbInputEditorClassUrl);
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::CmStartPageLength);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPPACKETDATAAPVIEW_SETEDITORPREFERENCES_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * OST trace header file.
+ *
+ */
+
+#ifndef OSTTRACEDEFINITIONS_H
+#define OSTTRACEDEFINITIONS_H
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/hbautotest.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,823 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "hbautotest.h"
+#include <hbmainwindow.h>
+#include <hbwidget.h>
+
+
+const qreal STEP = 4; //How many pixels to drag before sending an event
+
+//Init static members
+bool HbAutoTest::pointerPressed = false;
+QPointF HbAutoTest::pressPoint = QPointF();
+
+void HbAutoTest::mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    if (pointerPressed) {
+        //Now we should drag an item
+        drag(window, targetPoint);
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            QCoreApplication::sendEvent(window->viewport(), &me);
+            QTest::qWait(1);
+    } else {
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            QCoreApplication::sendEvent(window->viewport(), &me);
+            QTest::qWait(1);
+
+    }
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+ 
+void HbAutoTest::mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=true;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    pressPoint=targetPoint;
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=false;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    pressPoint=QPointF();
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+
+    HbAutoTestMouseEvent me2 (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton,
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me2);
+    QCoreApplication::sendEvent(window->viewport(), &me2);
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}   
+
+QPointF HbAutoTest::middlePointOfWidget( const HbWidget* widget)
+{
+    QRectF widgetRect = widget->rect();
+    QRectF widgetSceneRect = widget->mapRectToScene(widgetRect);
+    qreal middleX = ((widgetSceneRect.right() - widgetSceneRect.left())/2)+widgetSceneRect.left();
+    qreal middleY = ((widgetSceneRect.bottom() - widgetSceneRect.top())/2)+widgetSceneRect.top();  
+    return QPointF(middleX,middleY);
+}
+
+
+
+void HbAutoTest::drag(HbAutoTestMainWindow *window, QPointF targetPoint)
+{
+    qreal tempX = targetPoint.x() - pressPoint.x();
+    qreal tempY = targetPoint.y() - pressPoint.y();
+    qreal totalTrip = sqrt ((tempX * tempX) + (tempY * tempY));
+    
+    int numberOfSteps = qRound(totalTrip / STEP);
+    HbAutoTestMouseEvent me (
+        QEvent::MouseMove, 
+        targetPoint.toPoint(), 
+        window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+        Qt::NoButton , 
+        Qt::LeftButton, 
+        Qt::NoModifier);
+
+    QPointF nextPanPoint=pressPoint;
+    for (int i=1; i<numberOfSteps; i++) { //On purpose not =<
+        
+        nextPanPoint.setY (pressPoint.y()+((i / (qreal)numberOfSteps) * tempY));
+        nextPanPoint.setX (pressPoint.x()+((i / (qreal)numberOfSteps) * tempX));
+        
+        QCursor::setPos(window->mapToGlobal(nextPanPoint.toPoint()));
+
+        me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            nextPanPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(nextPanPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+
+        QSpontaneKeyEvent::setSpontaneous(&me);
+        QCoreApplication::sendEvent(window->viewport(), &me);
+        QTest::qWait(1);
+    }
+
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    //One more (or the only one) step to the target
+    me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            targetPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+}
+
+
+void HbAutoTest::simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        extern int Q_TESTLIB_EXPORT defaultKeyDelay();
+
+        if (delay == -1 || delay < 10) // defaultKeyDelay())
+            delay = 10; //defaultKeyDelay();
+        if(delay > 0)
+            QTest::qWait(delay);
+//        Q_UNUSED(delay);
+//        QTest::qWait(10); //TODO: Remove this and reveal above out-commented code
+
+        HbAutoTestKeyEvent a(press ? QEvent::KeyPress : QEvent::KeyRelease, code, modifier, text, repeat);
+        QSpontaneKeyEvent::setSpontaneous(&a);
+        if (!QCoreApplication::sendEvent(widget, &a))
+            QTest::qWarn("Keyboard event not accepted by receiving widget");
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay)
+    {
+        QTEST_ASSERT(qApp);
+
+        if (!widget)
+            widget = QWidget::keyboardGrabber();
+        if (!widget) {
+            if (QWidget *apw = QApplication::activePopupWidget())
+                widget = apw->focusWidget() ? apw->focusWidget() : apw;
+            else
+                widget = QApplication::focusWidget();
+        }
+        if (!widget)
+            widget = QApplication::activeWindow();
+
+        QTEST_ASSERT(widget);
+
+        if (action == QTest::Click) {
+            QPointer<QWidget> ptr(widget);
+            sendKeyEvent(QTest::Press, widget, code, text, modifier, delay);
+            if (!ptr) {
+                // if we send key-events to embedded widgets, they might be destroyed
+                // when the user presses Return
+                return;
+            }
+            sendKeyEvent(QTest::Release, widget, code, text, modifier, delay);
+            return;
+        }
+
+        bool repeat = false;
+
+        if (action == QTest::Press) {
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, true, Qt::Key_Shift, 0, QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, true, Qt::Key_Control, modifier & Qt::ShiftModifier, QString(), false, delay);
+
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, true, Qt::Key_Alt,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, true, Qt::Key_Meta, modifier & (Qt::ShiftModifier
+                                                                      | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+            simulateEvent(widget, true, code, modifier, text, repeat, delay);
+        } else if (action == QTest::Release) {
+            simulateEvent(widget, false, code, modifier, text, repeat, delay);
+
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, false, Qt::Key_Meta, modifier, QString(), false, delay);
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, false, Qt::Key_Alt, modifier &
+                              (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, false, Qt::Key_Control,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, false, Qt::Key_Shift, modifier & Qt::ShiftModifier, QString(), false, delay);
+        }
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        QString text;
+        if (ascii)
+            text = QString(QChar::fromLatin1(ascii));
+        sendKeyEvent(action, widget, code, text, modifier, delay);
+    }
+
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, asciiToKey(ascii), ascii, modifier, delay); 
+     }
+     
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, key, keyToAscii(key), modifier, delay); 
+     }
+
+void HbAutoTest::keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        for (int i=0; i < sequence.length(); i++)
+            keyEvent(QTest::Click, widget, sequence.at(i).toLatin1(), modifier, delay);
+    }
+
+void HbAutoTest::keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); }
+    
+void HbAutoTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+
+Qt::Key HbAutoTest::asciiToKey(char ascii)
+{
+    switch ((unsigned char)ascii) {
+    case 0x08: return Qt::Key_Backspace;
+    case 0x09: return Qt::Key_Tab;
+    case 0x0b: return Qt::Key_Backtab;
+    case 0x0d: return Qt::Key_Return;
+    case 0x1b: return Qt::Key_Escape;
+    case 0x20: return Qt::Key_Space;
+    case 0x21: return Qt::Key_Exclam;
+    case 0x22: return Qt::Key_QuoteDbl;
+    case 0x23: return Qt::Key_NumberSign;
+    case 0x24: return Qt::Key_Dollar;
+    case 0x25: return Qt::Key_Percent;
+    case 0x26: return Qt::Key_Ampersand;
+    case 0x27: return Qt::Key_Apostrophe;
+    case 0x28: return Qt::Key_ParenLeft;
+    case 0x29: return Qt::Key_ParenRight;
+    case 0x2a: return Qt::Key_Asterisk;
+    case 0x2b: return Qt::Key_Plus;
+    case 0x2c: return Qt::Key_Comma;
+    case 0x2d: return Qt::Key_Minus;
+    case 0x2e: return Qt::Key_Period;
+    case 0x2f: return Qt::Key_Slash;
+    case 0x30: return Qt::Key_0;
+    case 0x31: return Qt::Key_1;
+    case 0x32: return Qt::Key_2;
+    case 0x33: return Qt::Key_3;
+    case 0x34: return Qt::Key_4;
+    case 0x35: return Qt::Key_5;
+    case 0x36: return Qt::Key_6;
+    case 0x37: return Qt::Key_7;
+    case 0x38: return Qt::Key_8;
+    case 0x39: return Qt::Key_9;
+    case 0x3a: return Qt::Key_Colon;
+    case 0x3b: return Qt::Key_Semicolon;
+    case 0x3c: return Qt::Key_Less;
+    case 0x3d: return Qt::Key_Equal;
+    case 0x3e: return Qt::Key_Greater;
+    case 0x3f: return Qt::Key_Question;
+    case 0x40: return Qt::Key_At;
+    case 0x41: return Qt::Key_A;
+    case 0x42: return Qt::Key_B;
+    case 0x43: return Qt::Key_C;
+    case 0x44: return Qt::Key_D;
+    case 0x45: return Qt::Key_E;
+    case 0x46: return Qt::Key_F;
+    case 0x47: return Qt::Key_G;
+    case 0x48: return Qt::Key_H;
+    case 0x49: return Qt::Key_I;
+    case 0x4a: return Qt::Key_J;
+    case 0x4b: return Qt::Key_K;
+    case 0x4c: return Qt::Key_L;
+    case 0x4d: return Qt::Key_M;
+    case 0x4e: return Qt::Key_N;
+    case 0x4f: return Qt::Key_O;
+    case 0x50: return Qt::Key_P;
+    case 0x51: return Qt::Key_Q;
+    case 0x52: return Qt::Key_R;
+    case 0x53: return Qt::Key_S;
+    case 0x54: return Qt::Key_T;
+    case 0x55: return Qt::Key_U;
+    case 0x56: return Qt::Key_V;
+    case 0x57: return Qt::Key_W;
+    case 0x58: return Qt::Key_X;
+    case 0x59: return Qt::Key_Y;
+    case 0x5a: return Qt::Key_Z;
+    case 0x5b: return Qt::Key_BracketLeft;
+    case 0x5c: return Qt::Key_Backslash;
+    case 0x5d: return Qt::Key_BracketRight;
+    case 0x5e: return Qt::Key_AsciiCircum;
+    case 0x5f: return Qt::Key_Underscore;
+    case 0x60: return Qt::Key_QuoteLeft;
+    case 0x61: return Qt::Key_A;
+    case 0x62: return Qt::Key_B;
+    case 0x63: return Qt::Key_C;
+    case 0x64: return Qt::Key_D;
+    case 0x65: return Qt::Key_E;
+    case 0x66: return Qt::Key_F;
+    case 0x67: return Qt::Key_G;
+    case 0x68: return Qt::Key_H;
+    case 0x69: return Qt::Key_I;
+    case 0x6a: return Qt::Key_J;
+    case 0x6b: return Qt::Key_K;
+    case 0x6c: return Qt::Key_L;
+    case 0x6d: return Qt::Key_M;
+    case 0x6e: return Qt::Key_N;
+    case 0x6f: return Qt::Key_O;
+    case 0x70: return Qt::Key_P;
+    case 0x71: return Qt::Key_Q;
+    case 0x72: return Qt::Key_R;
+    case 0x73: return Qt::Key_S;
+    case 0x74: return Qt::Key_T;
+    case 0x75: return Qt::Key_U;
+    case 0x76: return Qt::Key_V;
+    case 0x77: return Qt::Key_W;
+    case 0x78: return Qt::Key_X;
+    case 0x79: return Qt::Key_Y;
+    case 0x7a: return Qt::Key_Z;
+    case 0x7b: return Qt::Key_BraceLeft;
+    case 0x7c: return Qt::Key_Bar;
+    case 0x7d: return Qt::Key_BraceRight;
+    case 0x7e: return Qt::Key_AsciiTilde;
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case 0xa0: return Qt::Key_nobreakspace;
+    case 0xa1: return Qt::Key_exclamdown;
+    case 0xa2: return Qt::Key_cent;
+    case 0xa3: return Qt::Key_sterling;
+    case 0xa4: return Qt::Key_currency;
+    case 0xa5: return Qt::Key_yen;
+    case 0xa6: return Qt::Key_brokenbar;
+    case 0xa7: return Qt::Key_section;
+    case 0xa8: return Qt::Key_diaeresis;
+    case 0xa9: return Qt::Key_copyright;
+    case 0xaa: return Qt::Key_ordfeminine;
+    case 0xab: return Qt::Key_guillemotleft;
+    case 0xac: return Qt::Key_notsign;
+    case 0xad: return Qt::Key_hyphen;
+    case 0xae: return Qt::Key_registered;
+    case 0xaf: return Qt::Key_macron;
+    case 0xb0: return Qt::Key_degree;
+    case 0xb1: return Qt::Key_plusminus;
+    case 0xb2: return Qt::Key_twosuperior;
+    case 0xb3: return Qt::Key_threesuperior;
+    case 0xb4: return Qt::Key_acute;
+    case 0xb5: return Qt::Key_mu;
+    case 0xb6: return Qt::Key_paragraph;
+    case 0xb7: return Qt::Key_periodcentered;
+    case 0xb8: return Qt::Key_cedilla;
+    case 0xb9: return Qt::Key_onesuperior;
+    case 0xba: return Qt::Key_masculine;
+    case 0xbb: return Qt::Key_guillemotright;
+    case 0xbc: return Qt::Key_onequarter;
+    case 0xbd: return Qt::Key_onehalf;
+    case 0xbe: return Qt::Key_threequarters;
+    case 0xbf: return Qt::Key_questiondown;
+    case 0xc0: return Qt::Key_Agrave;
+    case 0xc1: return Qt::Key_Aacute;
+    case 0xc2: return Qt::Key_Acircumflex;
+    case 0xc3: return Qt::Key_Atilde;
+    case 0xc4: return Qt::Key_Adiaeresis;
+    case 0xc5: return Qt::Key_Aring;
+    case 0xc6: return Qt::Key_AE;
+    case 0xc7: return Qt::Key_Ccedilla;
+    case 0xc8: return Qt::Key_Egrave;
+    case 0xc9: return Qt::Key_Eacute;
+    case 0xca: return Qt::Key_Ecircumflex;
+    case 0xcb: return Qt::Key_Ediaeresis;
+    case 0xcc: return Qt::Key_Igrave;
+    case 0xcd: return Qt::Key_Iacute;
+    case 0xce: return Qt::Key_Icircumflex;
+    case 0xcf: return Qt::Key_Idiaeresis;
+    case 0xd0: return Qt::Key_ETH;
+    case 0xd1: return Qt::Key_Ntilde;
+    case 0xd2: return Qt::Key_Ograve;
+    case 0xd3: return Qt::Key_Oacute;
+    case 0xd4: return Qt::Key_Ocircumflex;
+    case 0xd5: return Qt::Key_Otilde;
+    case 0xd6: return Qt::Key_Odiaeresis;
+    case 0xd7: return Qt::Key_multiply;
+    case 0xd8: return Qt::Key_Ooblique;
+    case 0xd9: return Qt::Key_Ugrave;
+    case 0xda: return Qt::Key_Uacute;
+    case 0xdb: return Qt::Key_Ucircumflex;
+    case 0xdc: return Qt::Key_Udiaeresis;
+    case 0xdd: return Qt::Key_Yacute;
+    case 0xde: return Qt::Key_THORN;
+    case 0xdf: return Qt::Key_ssharp;
+    case 0xe5: return Qt::Key_Aring;
+    case 0xe6: return Qt::Key_AE;
+    case 0xf7: return Qt::Key_division;
+    case 0xf8: return Qt::Key_Ooblique;
+    case 0xff: return Qt::Key_ydiaeresis;
+    default: QTEST_ASSERT(false); return Qt::Key(0);
+    }
+}
+
+char HbAutoTest::keyToAscii(Qt::Key key)
+{
+    switch (key) {
+    case Qt::Key_Backspace: return 0x8; //BS
+    case Qt::Key_Tab: return 0x09; // HT
+    case Qt::Key_Backtab: return 0x0b; // VT
+    case Qt::Key_Enter:
+    case Qt::Key_Return: return 0x0d; // CR
+    case Qt::Key_Escape: return 0x1b; // ESC
+    case Qt::Key_Space: return 0x20;        // 7 bit printable ASCII
+    case Qt::Key_Exclam: return 0x21;
+    case Qt::Key_QuoteDbl: return 0x22;
+    case Qt::Key_NumberSign: return 0x23;
+    case Qt::Key_Dollar: return 0x24;
+    case Qt::Key_Percent: return 0x25;
+    case Qt::Key_Ampersand: return 0x26;
+    case Qt::Key_Apostrophe: return 0x27;
+    case Qt::Key_ParenLeft: return 0x28;
+    case Qt::Key_ParenRight: return 0x29;
+    case Qt::Key_Asterisk: return 0x2a;
+    case Qt::Key_Plus: return 0x2b;
+    case Qt::Key_Comma: return 0x2c;
+    case Qt::Key_Minus: return 0x2d;
+    case Qt::Key_Period: return 0x2e;
+    case Qt::Key_Slash: return 0x2f;
+    case Qt::Key_0: return 0x30;
+    case Qt::Key_1: return 0x31;
+    case Qt::Key_2: return 0x32;
+    case Qt::Key_3: return 0x33;
+    case Qt::Key_4: return 0x34;
+    case Qt::Key_5: return 0x35;
+    case Qt::Key_6: return 0x36;
+    case Qt::Key_7: return 0x37;
+    case Qt::Key_8: return 0x38;
+    case Qt::Key_9: return 0x39;
+    case Qt::Key_Colon: return 0x3a;
+    case Qt::Key_Semicolon: return 0x3b;
+    case Qt::Key_Less: return 0x3c;
+    case Qt::Key_Equal: return 0x3d;
+    case Qt::Key_Greater: return 0x3e;
+    case Qt::Key_Question: return 0x3f;
+    case Qt::Key_At: return 0x40;
+    case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a'
+    case Qt::Key_B: return 0x62;
+    case Qt::Key_C: return 0x63;
+    case Qt::Key_D: return 0x64;
+    case Qt::Key_E: return 0x65;
+    case Qt::Key_F: return 0x66;
+    case Qt::Key_G: return 0x67;
+    case Qt::Key_H: return 0x68;
+    case Qt::Key_I: return 0x69;
+    case Qt::Key_J: return 0x6a;
+    case Qt::Key_K: return 0x6b;
+    case Qt::Key_L: return 0x6c;
+    case Qt::Key_M: return 0x6d;
+    case Qt::Key_N: return 0x6e;
+    case Qt::Key_O: return 0x6f;
+    case Qt::Key_P: return 0x70;
+    case Qt::Key_Q: return 0x71;
+    case Qt::Key_R: return 0x72;
+    case Qt::Key_S: return 0x73;
+    case Qt::Key_T: return 0x74;
+    case Qt::Key_U: return 0x75;
+    case Qt::Key_V: return 0x76;
+    case Qt::Key_W: return 0x77;
+    case Qt::Key_X: return 0x78;
+    case Qt::Key_Y: return 0x79;
+    case Qt::Key_Z: return 0x7a;
+    case Qt::Key_BracketLeft: return 0x5b;
+    case Qt::Key_Backslash: return 0x5c;
+    case Qt::Key_BracketRight: return 0x5d;
+    case Qt::Key_AsciiCircum: return 0x5e;
+    case Qt::Key_Underscore: return 0x5f;
+    case Qt::Key_QuoteLeft: return 0x60;
+
+    case Qt::Key_BraceLeft: return 0x7b;
+    case Qt::Key_Bar: return 0x7c;
+    case Qt::Key_BraceRight: return 0x7d;
+    case Qt::Key_AsciiTilde: return 0x7e;
+
+    case Qt::Key_Delete: return 0;
+    case Qt::Key_Insert: return 0; // = 0x1006,
+    case Qt::Key_Pause: return 0; // = 0x1008,
+    case Qt::Key_Print: return 0; // = 0x1009,
+    case Qt::Key_SysReq: return 0; // = 0x100a,
+
+    case Qt::Key_Clear: return 0; // = 0x100b,
+
+    case Qt::Key_Home: return 0; // = 0x1010,        // cursor movement
+    case Qt::Key_End: return 0; // = 0x1011,
+    case Qt::Key_Left: return 0; // = 0x1012,
+    case Qt::Key_Up: return 0; // = 0x1013,
+    case Qt::Key_Right: return 0; // = 0x1014,
+    case Qt::Key_Down: return 0; // = 0x1015,
+    case Qt::Key_PageUp: return 0; // = 0x1016,
+    case Qt::Key_PageDown: return 0; // = 0x1017,
+    case Qt::Key_Shift: return 0; // = 0x1020,        // modifiers
+    case Qt::Key_Control: return 0; // = 0x1021,
+    case Qt::Key_Meta: return 0; // = 0x1022,
+    case Qt::Key_Alt: return 0; // = 0x1023,
+    case Qt::Key_CapsLock: return 0; // = 0x1024,
+    case Qt::Key_NumLock: return 0; // = 0x1025,
+    case Qt::Key_ScrollLock: return 0; // = 0x1026,
+    case Qt::Key_F1: return 0; // = 0x1030,        // function keys
+    case Qt::Key_F2: return 0; // = 0x1031,
+    case Qt::Key_F3: return 0; // = 0x1032,
+    case Qt::Key_F4: return 0; // = 0x1033,
+    case Qt::Key_F5: return 0; // = 0x1034,
+    case Qt::Key_F6: return 0; // = 0x1035,
+    case Qt::Key_F7: return 0; // = 0x1036,
+    case Qt::Key_F8: return 0; // = 0x1037,
+    case Qt::Key_F9: return 0; // = 0x1038,
+    case Qt::Key_F10: return 0; // = 0x1039,
+    case Qt::Key_F11: return 0; // = 0x103a,
+    case Qt::Key_F12: return 0; // = 0x103b,
+    case Qt::Key_F13: return 0; // = 0x103c,
+    case Qt::Key_F14: return 0; // = 0x103d,
+    case Qt::Key_F15: return 0; // = 0x103e,
+    case Qt::Key_F16: return 0; // = 0x103f,
+    case Qt::Key_F17: return 0; // = 0x1040,
+    case Qt::Key_F18: return 0; // = 0x1041,
+    case Qt::Key_F19: return 0; // = 0x1042,
+    case Qt::Key_F20: return 0; // = 0x1043,
+    case Qt::Key_F21: return 0; // = 0x1044,
+    case Qt::Key_F22: return 0; // = 0x1045,
+    case Qt::Key_F23: return 0; // = 0x1046,
+    case Qt::Key_F24: return 0; // = 0x1047,
+    case Qt::Key_F25: return 0; // = 0x1048,        // F25 .. F35 only on X11
+    case Qt::Key_F26: return 0; // = 0x1049,
+    case Qt::Key_F27: return 0; // = 0x104a,
+    case Qt::Key_F28: return 0; // = 0x104b,
+    case Qt::Key_F29: return 0; // = 0x104c,
+    case Qt::Key_F30: return 0; // = 0x104d,
+    case Qt::Key_F31: return 0; // = 0x104e,
+    case Qt::Key_F32: return 0; // = 0x104f,
+    case Qt::Key_F33: return 0; // = 0x1050,
+    case Qt::Key_F34: return 0; // = 0x1051,
+    case Qt::Key_F35: return 0; // = 0x1052,
+    case Qt::Key_Super_L: return 0; // = 0x1053,        // extra keys
+    case Qt::Key_Super_R: return 0; // = 0x1054,
+    case Qt::Key_Menu: return 0; // = 0x1055,
+    case Qt::Key_Hyper_L: return 0; // = 0x1056,
+    case Qt::Key_Hyper_R: return 0; // = 0x1057,
+    case Qt::Key_Help: return 0; // = 0x1058,
+    case Qt::Key_Direction_L: return 0; // = 0x1059,
+    case Qt::Key_Direction_R: return 0; // = 0x1060,
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case Qt::Key_nobreakspace: return char(0xa0);
+    case Qt::Key_exclamdown: return char(0xa1);
+    case Qt::Key_cent: return char(0xa2);
+    case Qt::Key_sterling: return char(0xa3);
+    case Qt::Key_currency: return char(0xa4);
+    case Qt::Key_yen: return char(0xa5);
+    case Qt::Key_brokenbar: return char(0xa6);
+    case Qt::Key_section: return char(0xa7);
+    case Qt::Key_diaeresis: return char(0xa8);
+    case Qt::Key_copyright: return char(0xa9);
+    case Qt::Key_ordfeminine: return char(0xaa);
+    case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar
+    case Qt::Key_notsign: return char(0xac);
+    case Qt::Key_hyphen: return char(0xad);
+    case Qt::Key_registered: return char(0xae);
+    case Qt::Key_macron: return char(0xaf);
+    case Qt::Key_degree: return char(0xb0);
+    case Qt::Key_plusminus: return char(0xb1);
+    case Qt::Key_twosuperior: return char(0xb2);
+    case Qt::Key_threesuperior: return char(0xb3);
+    case Qt::Key_acute: return char(0xb4);
+    case Qt::Key_mu: return char(0xb5);
+    case Qt::Key_paragraph: return char(0xb6);
+    case Qt::Key_periodcentered: return char(0xb7);
+    case Qt::Key_cedilla: return char(0xb8);
+    case Qt::Key_onesuperior: return char(0xb9);
+    case Qt::Key_masculine: return char(0xba);
+    case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar
+    case Qt::Key_onequarter: return char(0xbc);
+    case Qt::Key_onehalf: return char(0xbd);
+    case Qt::Key_threequarters: return char(0xbe);
+    case Qt::Key_questiondown: return char(0xbf);
+    case Qt::Key_Agrave: return char(0xc0);
+    case Qt::Key_Aacute: return char(0xc1);
+    case Qt::Key_Acircumflex: return char(0xc2);
+    case Qt::Key_Atilde: return char(0xc3);
+    case Qt::Key_Adiaeresis: return char(0xc4);
+    case Qt::Key_Aring: return char(0xe5);
+    case Qt::Key_AE: return char(0xe6);
+    case Qt::Key_Ccedilla: return char(0xc7);
+    case Qt::Key_Egrave: return char(0xc8);
+    case Qt::Key_Eacute: return char(0xc9);
+    case Qt::Key_Ecircumflex: return char(0xca);
+    case Qt::Key_Ediaeresis: return char(0xcb);
+    case Qt::Key_Igrave: return char(0xcc);
+    case Qt::Key_Iacute: return char(0xcd);
+    case Qt::Key_Icircumflex: return char(0xce);
+    case Qt::Key_Idiaeresis: return char(0xcf);
+    case Qt::Key_ETH: return char(0xd0);
+    case Qt::Key_Ntilde: return char(0xd1);
+    case Qt::Key_Ograve: return char(0xd2);
+    case Qt::Key_Oacute: return char(0xd3);
+    case Qt::Key_Ocircumflex: return char(0xd4);
+    case Qt::Key_Otilde: return char(0xd5);
+    case Qt::Key_Odiaeresis: return char(0xd6);
+    case Qt::Key_multiply: return char(0xd7);
+    case Qt::Key_Ooblique: return char(0xf8);
+    case Qt::Key_Ugrave: return char(0xd9);
+    case Qt::Key_Uacute: return char(0xda);
+    case Qt::Key_Ucircumflex: return char(0xdb);
+    case Qt::Key_Udiaeresis: return char(0xdc);
+    case Qt::Key_Yacute: return char(0xdd);
+    case Qt::Key_THORN: return char(0xde);
+    case Qt::Key_ssharp: return char(0xdf);
+    case Qt::Key_division: return char(0xf7);
+    case Qt::Key_ydiaeresis: return char(0xff);
+
+    // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
+
+    case Qt::Key_Back : return 0; // = 0x1061,
+    case Qt::Key_Forward : return 0; // = 0x1062,
+    case Qt::Key_Stop : return 0; // = 0x1063,
+    case Qt::Key_Refresh : return 0; // = 0x1064,
+
+    case Qt::Key_VolumeDown: return 0; // = 0x1070,
+    case Qt::Key_VolumeMute : return 0; // = 0x1071,
+    case Qt::Key_VolumeUp: return 0; // = 0x1072,
+    case Qt::Key_BassBoost: return 0; // = 0x1073,
+    case Qt::Key_BassUp: return 0; // = 0x1074,
+    case Qt::Key_BassDown: return 0; // = 0x1075,
+    case Qt::Key_TrebleUp: return 0; // = 0x1076,
+    case Qt::Key_TrebleDown: return 0; // = 0x1077,
+
+    case Qt::Key_MediaPlay : return 0; // = 0x1080,
+    case Qt::Key_MediaStop : return 0; // = 0x1081,
+    case Qt::Key_MediaPrevious : return 0; // = 0x1082,
+    case Qt::Key_MediaNext : return 0; // = 0x1083,
+    case Qt::Key_MediaRecord: return 0; // = 0x1084,
+
+    case Qt::Key_HomePage : return 0; // = 0x1090,
+    case Qt::Key_Favorites : return 0; // = 0x1091,
+    case Qt::Key_Search : return 0; // = 0x1092,
+    case Qt::Key_Standby: return 0; // = 0x1093,
+    case Qt::Key_OpenUrl: return 0; // = 0x1094,
+
+    case Qt::Key_LaunchMail : return 0; // = 0x10a0,
+    case Qt::Key_LaunchMedia: return 0; // = 0x10a1,
+    case Qt::Key_Launch0 : return 0; // = 0x10a2,
+    case Qt::Key_Launch1 : return 0; // = 0x10a3,
+    case Qt::Key_Launch2 : return 0; // = 0x10a4,
+    case Qt::Key_Launch3 : return 0; // = 0x10a5,
+    case Qt::Key_Launch4 : return 0; // = 0x10a6,
+    case Qt::Key_Launch5 : return 0; // = 0x10a7,
+    case Qt::Key_Launch6 : return 0; // = 0x10a8,
+    case Qt::Key_Launch7 : return 0; // = 0x10a9,
+    case Qt::Key_Launch8 : return 0; // = 0x10aa,
+    case Qt::Key_Launch9 : return 0; // = 0x10ab,
+    case Qt::Key_LaunchA : return 0; // = 0x10ac,
+    case Qt::Key_LaunchB : return 0; // = 0x10ad,
+    case Qt::Key_LaunchC : return 0; // = 0x10ae,
+    case Qt::Key_LaunchD : return 0; // = 0x10af,
+    case Qt::Key_LaunchE : return 0; // = 0x10b0,
+    case Qt::Key_LaunchF : return 0; // = 0x10b1,
+
+    default: QTEST_ASSERT(false); return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/hbautotest.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef HBAUTOTEST_H
+#define HBAUTOTEST_H
+
+#include <hbnamespace.h>
+#include <hbmainwindow.h>
+#include <QtTest/QtTest>
+
+class HbMainWindow;
+class HbWidget;
+class HbAutoTestMainWindow;
+class HbAutoTest;
+class HbAutoTestMouseEvent; 
+/*
+INSTRUCTIONS:
+The class HbAutoTest is meant to be used with Orbit applications auto testing instead of GUI testing APIs of QTestLib.
+
+The functions of this class is to used similarily to the related QTestLib functions.
+
+Use HbAutoTestMainWindow (defined below) instead of HbMainWindow to enble filtering.
+Filterin filters out UI events that are not sent by function defined in HbAutoTest class.
+
+*/
+
+class HbAutoTestMouseEvent : public QMouseEvent
+{
+public:
+    HbAutoTestMouseEvent(Type type, const QPoint & pos, const QPoint & globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers ) 
+        : QMouseEvent(type,pos,globalPos,button,buttons,modifiers){}
+};
+
+class HbAutoTestKeyEvent : public QKeyEvent
+{
+public:
+        HbAutoTestKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
+              bool autorep = false, ushort count = 1 ) 
+        : QKeyEvent(type, key, modifiers, text, autorep, count){}
+};
+
+class HbAutoTest 
+{
+public:
+    
+    static void mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1 );
+    static void mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+   
+private:
+    static void drag(HbAutoTestMainWindow *window, QPointF targetPoint);
+    static QPointF middlePointOfWidget( const HbWidget* widget);
+
+    static bool pointerPressed;
+    static QPointF pressPoint;
+
+//Key event Part: copy-pasted from QTestLib and modified to support HbAutoTestKeyEvent to enable filtering.
+//see HbAutoTestMainWindow below.
+public:
+    
+    static Qt::Key asciiToKey(char ascii);
+    static char keyToAscii(Qt::Key key);
+
+    static void simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1);
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay=-1);    
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay=-1);
+
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+ 
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+   
+    static void keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+};
+
+class HbTestEvent
+{
+public:
+    virtual void simulate(QWidget *w) = 0;
+    virtual HbTestEvent *clone() const = 0;
+
+    virtual ~HbTestEvent() {}
+};
+
+class HbTestKeyEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyEvent(QTest::KeyAction action, Qt::Key key, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers), _ascii(0), _key(key) {}
+    inline HbTestKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers),
+          _ascii(ascii), _key(Qt::Key_unknown) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        if (_ascii == 0)
+            HbAutoTest::keyEvent(_action, w, _key, _modifiers, _delay);
+        else
+            HbAutoTest::keyEvent(_action, w, _ascii, _modifiers, _delay);
+    } 
+
+protected:
+    QTest::KeyAction _action;
+    int _delay;
+    Qt::KeyboardModifiers _modifiers;
+    char _ascii;
+    Qt::Key _key;
+};
+
+class HbTestKeyClicksEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyClicksEvent(const QString &keys, Qt::KeyboardModifiers modifiers, int delay)
+        : _keys(keys), _modifiers(modifiers), _delay(delay) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyClicksEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        HbAutoTest::keyClicks(w, _keys, _modifiers, _delay);
+    }
+
+private:
+    QString _keys;
+    Qt::KeyboardModifiers _modifiers;
+    int _delay;
+};
+
+class HbTestDelayEvent: public HbTestEvent
+{
+public:
+    inline HbTestDelayEvent(int msecs): _delay(msecs) {}
+    inline HbTestEvent *clone() const { return new HbTestDelayEvent(*this); }
+
+    inline void simulate(QWidget * /*w*/) { QTest::qWait(_delay); }
+
+private:
+    int _delay;
+};
+
+class HbTestEventList: public QList<HbTestEvent *>
+{
+public:
+    inline HbTestEventList() {}
+    inline HbTestEventList(const HbTestEventList &other): QList<HbTestEvent *>()
+    { for (int i = 0; i < other.count(); ++i) append(other.at(i)->clone()); }
+    inline ~HbTestEventList()
+    { clear(); }
+    inline void clear()
+    { qDeleteAll(*this); QList<HbTestEvent *>::clear(); }
+
+    inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
+    inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, qtKey, modifiers, msecs); }
+    inline void addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, qtKey, modifiers, msecs); }
+    inline void addKeyEvent(QTest::KeyAction action, Qt::Key qtKey,
+                            Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, qtKey, modifiers, msecs)); }
+
+    inline void addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, ascii, modifiers, msecs); }
+    inline void addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, ascii, modifiers, msecs); }
+    inline void addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, ascii, modifiers, msecs); }
+    inline void addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyClicksEvent(keys, modifiers, msecs)); }
+    inline void addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, ascii, modifiers, msecs)); }
+
+    inline void addDelay(int msecs)
+    { append(new HbTestDelayEvent(msecs)); }
+
+    inline void simulate(QWidget *w)
+    {
+        for (int i = 0; i < count(); ++i)
+            at(i)->simulate(w);
+    }
+};
+
+class HbAutoTestMainWindow : public HbMainWindow
+{
+public:
+    HbAutoTestMainWindow() : HbMainWindow() {}
+    
+    void mousePressEvent(QMouseEvent *event)
+    {
+        qDebug(
+            "HbAutoTestMainWindow::mousePressEvent: x(%d) y(%d)",
+            event->x(),
+            event->y());
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mousePressEvent(event);
+            } else {
+                ;//Do nothing 
+         }
+    }
+
+    void mouseMoveEvent(QMouseEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseMoveEvent(event);
+            } else {
+                ;//Do nothing
+         }
+    }
+
+    void mouseReleaseEvent(QMouseEvent *event)
+    {
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void keyPressEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyPressEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+    void keyReleaseEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void mouseDoubleClickEvent(QMouseEvent *event)
+    {
+        Q_UNUSED(event);
+        //Just ignore, not supported in Orbit
+    }
+};
+
+
+Q_DECLARE_METATYPE(HbTestEventList)
+#endif //HBAUTOTEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1434 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel packet data AP plugin unit testing.
+*/
+
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbDialog>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <HbDataFormViewItem>
+#include <HbModelIterator>
+#include <HbComboBox>
+#include <QtTest/QtTest>
+#include <etelpckt.h>
+#include <cpbearerapplugininterface.h>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+#include "cppacketdataapview.h"
+#include "cppacketdataapadvancedview.h"
+
+#include "hbautotest.h"
+#include "testcppacketdataapplugin.h"
+
+// -----------------------------------------------------------------------------
+// STATIC TEST DATA
+// -----------------------------------------------------------------------------
+
+// Connection method (AP) ID used for testing
+static const uint testApId = 1;
+
+static const QString pluginDir =
+    "\\resource\\qt\\plugins\\controlpanel\\bearerap";
+
+static const QString pluginName = "cppacketdataapplugin.dll";
+
+// Time to wait before continuing after an UI step
+static const int waitTime = 10;
+
+// UI coordinates
+static const QPoint scrollMiddle(350, 280);
+static const QPoint scrollTop(350, 30);
+static const QPoint scrollBottom(350, 540);
+
+// Use positive offset if dropdown opens under the combobox
+static const QPoint comboBoxFirstItemOffset(80, 75);
+static const QPoint comboBoxItemOffset(0, 51);
+// Use negative offset if dropdown opens above the combobox
+static const QPoint comboBoxFirstItemNegativeOffset(80, -29);
+static const QPoint comboBoxItemNegativeOffset(0, -51);
+
+static const QPoint exitEditorOffset(-10, -20);
+
+static const QPoint messageBoxOkButtonOffset(160, 140);
+
+// Advanced settings groups
+static const QPoint ipGroup(160, 10);
+static const QPoint proxyGroup(160, 60);
+
+// Test strings
+static const QString tooLongUserName =
+    "too long name 123456789012345678901234567890123456THISISEXTRA";
+static const QString truncatedUserName =
+    "too long name 123456789012345678901234567890123456";
+
+// -----------------------------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// -----------------------------------------------------------------------------
+
+/**
+ * Test main function. Runs all test cases.
+ */
+#ifndef TESTCMAPPLSETTINGSUI_NO_OUTPUT_REDIRECT
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    app.setApplicationName("TestCpPacketDataApPlugin");
+    
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\data\\TestCpPacketDataApPlugin.txt";
+ 
+    TestCpPacketDataApPlugin tc;
+    int res = QTest::qExec(&tc, 3, pass);
+ 
+    return res;
+}
+#else
+QTEST_MAIN(TestCpPacketDataApPlugin)
+#endif
+
+/**
+ * This function is be called before the first test case is executed.
+ */
+void TestCpPacketDataApPlugin::initTestCase()
+{
+    mMainWindow = new HbAutoTestMainWindow;
+    //mMainWindow = new HbMainWindow;
+    mMainWindow->show();
+    
+    // Load plugin
+    QDir dir(pluginDir);
+    mPluginLoader = new QPluginLoader(dir.absoluteFilePath(pluginName));
+    mPlugin = qobject_cast<CpBearerApPluginInterface *>(mPluginLoader->instance());
+    QVERIFY(mPlugin != NULL);
+    
+    // Verify plugin bearer type
+    QVERIFY(mPlugin->bearerType() == CMManagerShim::BearerTypePacketData);
+    
+    // Write initial settings to CommsDat
+    subInitializeCommsDat();
+    
+    // Create packet data settings view (connection method ID given)
+    subCreateSettingsView(testApId);
+    
+    subGetUiWidgets();
+}
+
+/**
+ * This function is be called after the last test case was executed.
+ */
+void TestCpPacketDataApPlugin::cleanupTestCase()
+{
+    delete mMainWindow;
+    mMainWindow = 0;
+    
+    // Force unloading of plugin
+    mPluginLoader->unload();
+    delete mPluginLoader;
+    mPluginLoader = 0;
+}
+
+/**
+ * This function is be called before each test case is executed.
+ */
+void TestCpPacketDataApPlugin::init()
+{
+    QTest::qWait(1000);
+}
+
+/**
+ * This function is be called after each test case is executed.
+ */
+void TestCpPacketDataApPlugin::cleanup()
+{
+}
+
+// -----------------------------------------------------------------------------
+// TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Tests changing of connection name.
+ */
+void TestCpPacketDataApPlugin::tcChangeConnectionName()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmName,
+        mTestView->mConnectionNameItem,
+        result);
+}
+
+/**
+ * Test data for connection name change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeConnectionName_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+    
+    QTest::newRow("maximum length")
+        << "really long name 123456789012345678901234567890123"
+        << "really long name 123456789012345678901234567890123";
+    QTest::newRow("too long")
+        << "too long name 12345678901234567890123456789012345678901234"
+        << "too long name 123456789012345678901234567890123456";
+    QTest::newRow("basic") // last one must always fit on one line in UI
+        << "test packet AP"
+        << "test packet AP";
+}
+
+/**
+ * Tests that empty connection name is not accepted.
+ */
+void TestCpPacketDataApPlugin::tcConnectionNameEmpty()
+{
+    QString previous = 
+        mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestView->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmName,
+        mTestView->mConnectionNameItem,
+        previous);
+}
+
+/**
+ * Tests changing of access point name.
+ */
+void TestCpPacketDataApPlugin::tcChangeAccessPointName()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mAccessPointNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mAccessPointNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mAccessPointNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataAPName,
+        mTestView->mAccessPointNameItem,
+        result);
+}
+
+/**
+ * Test data for access point name change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeAccessPointName_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+    
+    QTest::newRow("maximum length")
+        << "really long name 12345678901234567890123456789012345678901234567890123456789012345678901234567890123"
+        << "really long name 12345678901234567890123456789012345678901234567890123456789012345678901234567890123";
+    QTest::newRow("too long")
+        << "too long name 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
+        << "too long name 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
+    QTest::newRow("basic") // last one must always fit on one line in UI
+        << "test AP name"
+        << "test AP name";
+}
+
+/**
+ * Tests that empty access point name is not accepted.
+ */
+void TestCpPacketDataApPlugin::tcAccessPointNameEmpty()
+{
+    QString previous = 
+        mTestView->mAccessPointNameItem->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mAccessPointNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mAccessPointNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    HbAutoTest::mouseClick(mMainWindow, mAccessPointNameWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestView->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataAPName,
+        mTestView->mAccessPointNameItem,
+        previous);
+}
+
+
+/**
+ * Tests handling of too long string from CommsDat (longer than UI accepts).
+ */
+void TestCpPacketDataApPlugin::tcTooLongUserNameInCommsDat()
+{
+    // Verify UI text, the widget contains the too long string, even though
+    // it is not shown completely on UI
+    QString text = mTestView->mUserNameItem->contentWidgetData("text").toString();
+    QCOMPARE(tooLongUserName, text);
+
+    QTest::qWait(1000);
+    
+    // Visit editing state, truncated string should be saved to CommsDat
+    HbAutoTest::mouseClick(mMainWindow, mUserNameWidget);
+    
+    QTest::qWait(1000);
+    
+    HbAutoTest::mouseClick(mMainWindow, mUserNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIFAuthName,
+        mTestView->mUserNameItem,
+        truncatedUserName);
+}
+
+/**
+ * Tests changing of user name.
+ */
+void TestCpPacketDataApPlugin::tcChangeUserName()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mUserNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mUserNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mUserNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIFAuthName,
+        mTestView->mUserNameItem,
+        result);
+}
+
+/**
+ * Test data for user name change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeUserName_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+
+    QTest::newRow("maximum length")
+        << "really long name 123456789012345678901234567890123"
+        << "really long name 123456789012345678901234567890123";
+    QTest::newRow("too long")
+        << "too long name 1234567890123456789012345678901234567890123"
+        << "too long name 123456789012345678901234567890123456";
+    QTest::newRow("basic")
+        << "username"
+        << "username";
+    QTest::newRow("empty") // last one must always fit on one line in UI
+        << ""
+        << "";
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpPacketDataApPlugin::tcScrollToBottom()
+{
+    subScrollToBottom();
+}
+
+/**
+ * Tests changing of password.
+ */
+void TestCpPacketDataApPlugin::tcChangePassword()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mPasswordWidget);
+    
+    // Erase old string
+    QString text = mTestView->mPasswordItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mPasswordWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIFAuthPass,
+        mTestView->mPasswordItem,
+        result);
+}
+
+/**
+ * Test data for password change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangePassword_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+
+    QTest::newRow("maximum length")
+        << "really long name 123456789012345678901234567890123"
+        << "really long name 123456789012345678901234567890123";
+    QTest::newRow("too long")
+        << "too long name 1234567890123456789012345678901234567890123"
+        << "too long name 123456789012345678901234567890123456";
+    QTest::newRow("basic")
+        << "password"
+        << "password";
+    QTest::newRow("empty") // last one must always fit on one line in UI
+        << ""
+        << "";
+}
+
+/**
+ * Tests changing of authentication mode.
+ */
+void TestCpPacketDataApPlugin::tcChangeAuthenticationMode()
+{
+    QPointF normalPointOffset = comboBoxFirstItemOffset;
+    QPointF securePointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    
+    // Set authentication mode to secure
+    HbAutoTest::mouseClick(mMainWindow, mAuthenticationWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mAuthenticationWidget, securePointOffset);
+
+    subVerifyBool(
+        CMManagerShim::PacketDataDisablePlainTextAuth,
+        true);
+    
+    // Set authentication mode to normal
+    HbAutoTest::mouseClick(mMainWindow, mAuthenticationWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mAuthenticationWidget, normalPointOffset);
+
+    subVerifyBool(
+        CMManagerShim::PacketDataDisablePlainTextAuth,
+        false);
+}
+
+/**
+ * Tests changing of homepage.
+ */
+void TestCpPacketDataApPlugin::tcChangeHomepage()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mHomepageWidget);
+    
+    // Erase old string
+    QString text = mTestView->mHomepageItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mHomepageWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmStartPage,
+        mTestView->mHomepageItem,
+        result);
+}
+
+/**
+ * Test data for homepage change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeHomepage_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("long")
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html"
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html";
+    QTest::newRow("basic") // last one should always fit on one line in UI
+        << "http://www.symbian.org/"
+        << "http://www.symbian.org/";
+    QTest::newRow("empty")
+        << ""
+        << "";
+}
+
+/**
+ * Opens advanced settings view.
+ */
+void TestCpPacketDataApPlugin::tcOpenAdvancedSettingsView()
+{
+    // Launch advanced settings view
+    bool status = connect(
+        this,
+        SIGNAL(menuActionTriggered(HbAction *)),
+        mTestView,
+        SLOT(menuActionTriggered(HbAction *)));
+    Q_ASSERT(status);
+    emit menuActionTriggered(mTestView->mAdvancedSettingsAction);
+
+    QTest::qWait(1000);
+    
+    mTestViewAdvanced = static_cast<CpPacketDataApAdvancedView *>(mMainWindow->currentView());
+}
+
+/**
+ * Expands the IP settings group.
+ */
+void TestCpPacketDataApPlugin::tcExpandIpSettings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipGroup);
+    
+    subGetAdvancedUiWidgets(0);
+}
+
+/**
+ * Sets the network type to IPv4 and gets UI widget pointers.
+ */
+void TestCpPacketDataApPlugin::tcSetIpv4NetworkType()
+{
+    QPointF ipv4PointOffset = comboBoxFirstItemOffset;
+    
+    // Set network type to IPv4
+    HbAutoTest::mouseClick(mMainWindow, mNetworkTypeWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkTypeWidget, ipv4PointOffset, 100);
+    subVerifyUint(CMManagerShim::PacketDataPDPType, RPacketContext::EPdpTypeIPv4);
+    
+    subGetAdvancedUiWidgets(0);
+}
+
+/**
+ * Tests enabling of automatic phone IP address.
+ */
+void TestCpPacketDataApPlugin::tcEnableAutomaticIpv4Address()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4Automatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IP address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    }
+    // Enable automatic IP address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    subVerifyBool(
+        CMManagerShim::PacketDataIPAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget);
+}
+
+/**
+ * Tests disabling of automatic phone IP address.
+ */
+void TestCpPacketDataApPlugin::tcEnableUserDefinedIpv4Address()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4Automatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IP address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    }
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpAddress().
+}
+
+/**
+ * Tests changing of IP address.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4Address->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPAddr,
+        mTestViewAdvanced->mIpv4Address,
+        result);
+    subVerifyBool(
+        CMManagerShim::PacketDataIPAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IP address change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpPacketDataApPlugin::tcScrollToBottom2()
+{
+    subScrollToBottom();
+    
+    subGetAdvancedUiWidgets(0);
+}
+
+/**
+ * Tests enabling of automatic IPv4 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcEnableAutomaticIpv4DnsAddress()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4DnsAutomatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IPv4 DNS address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    }
+    // Enable automatic IPv4 DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    subVerifyBool(
+        CMManagerShim::PacketDataIPDNSAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests disabling of automatic IPv4 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcEnableUserDefinedIpv4DnsAddress()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4DnsAutomatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IPv4 DNS address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    }
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpv4DnsAddress().
+}
+
+/**
+ * Tests changing of IPv4 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpv4DnsAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    // Primary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPNameServer1,
+        mTestViewAdvanced->mIpv4DnsAddress1,
+        result);
+    
+    // Secondary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget);
+    
+    // Erase old string
+    text = mTestViewAdvanced->mIpv4DnsAddress2->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPNameServer2,
+        mTestViewAdvanced->mIpv4DnsAddress2,
+        result);
+    
+    // Verify user defined address is in use
+    subVerifyBool(
+        CMManagerShim::PacketDataIPDNSAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IPv4 DNS address change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpv4DnsAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Tests invalid IPv4 DNS address.
+ */
+void TestCpPacketDataApPlugin::tcInvalidIpv4DnsAddress()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "999.999.999.999", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPNameServer1,
+        mTestViewAdvanced->mIpv4DnsAddress1,
+        previous);
+}
+
+/**
+ * Scrolls the tested view to the top.
+ */
+void TestCpPacketDataApPlugin::tcScrollToTop()
+{
+    subScrollToTop();
+}
+
+/**
+ * Sets the network type to IPv6 and gets UI widget pointers.
+ */
+void TestCpPacketDataApPlugin::tcSetIpv6NetworkType()
+{
+    QPointF ipv6PointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    
+    // Set network type to IPv6
+    HbAutoTest::mouseClick(mMainWindow, mNetworkTypeWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkTypeWidget, ipv6PointOffset, 100);
+    subVerifyUint(CMManagerShim::PacketDataPDPType, RPacketContext::EPdpTypeIPv6);
+
+    subGetAdvancedUiWidgets(0);
+}
+
+/**
+ * Tests enabling of automatic IPv6 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcEnableAutomaticIpv6DnsAddress()
+{
+    // Enable automatic IPv6 DNS address
+    QPointF automaticPointOffset = comboBoxFirstItemOffset;
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, automaticPointOffset, 100);
+    QTest::qWait(100);
+    subVerifyBool(
+        CMManagerShim::PacketDataIPIP6DNSAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests enabling of well-known IPv6 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcEnableWellKnownIpv6DnsAddress()
+{
+    // Enable well-known IPv6 DNS address
+    QPointF wellKnownPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, wellKnownPointOffset, 100);
+    QTest::qWait(100);
+    subVerifyBool(
+        CMManagerShim::PacketDataIPIP6DNSAddrFromServer,
+        false);
+    subVerifyString(
+        CMManagerShim::PacketDataIPIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        "fec0:000:0000:ffff::1");
+    subVerifyString(
+        CMManagerShim::PacketDataIPIP6NameServer2,
+        mTestViewAdvanced->mIpv6DnsAddress2,
+        "fec0:000:0000:ffff::2");
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests enabling of user defined IPv6 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcEnableUserDefinedIpv6DnsAddress()
+{
+    // Select user defined IPv6 DNS address
+    QPointF userDefinedPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset * 2;
+    //QPointF userDefinedPointOffset(0, 160);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, userDefinedPointOffset, 100);
+    QTest::qWait(100);
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpv4DnsAddress().
+}
+
+/**
+ * Tests changing of IPv6 DNS addresses.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpv6DnsAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    // Primary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        result);
+    
+    // Secondary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+    
+    // Erase old string
+    text = mTestViewAdvanced->mIpv6DnsAddress2->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPIP6NameServer2,
+        mTestViewAdvanced->mIpv6DnsAddress2,
+        result);
+    
+    // Verify user defined address is in use
+    subVerifyBool(
+        CMManagerShim::PacketDataIPIP6DNSAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IPv6 DNS address change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeIpv6DnsAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("normal")
+        << "2001:db8:85a3::8a2e:370:7334"
+        << "2001:db8:85a3:0:0:8a2e:370:7334";
+}
+
+/**
+ * Tests invalid IPv6 DNS address.
+ */
+void TestCpPacketDataApPlugin::tcInvalidIpv6DnsAddress()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "abcdef:fedcba", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::PacketDataIPIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        previous);
+}
+
+/**
+ * Collapses the IP settings group.
+ */
+void TestCpPacketDataApPlugin::tcCollapseIpSettings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipGroup);
+}
+
+/**
+ * Expands the proxy settings group and gets UI widget pointers.
+ */
+void TestCpPacketDataApPlugin::tcExpandProxySettingsAndGetUiWidgets()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, proxyGroup);
+
+    QTest::qWait(500);
+    
+    subGetAdvancedUiWidgets(1);
+}
+
+/**
+ * Tests changing of proxy server address.
+ */
+void TestCpPacketDataApPlugin::tcChangeProxyServerAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyServerAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyServer->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyServerAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmProxyServerName,
+        mTestViewAdvanced->mProxyServer,
+        result);
+    // Verify user defined address flag is set correctly
+    if (result.isEmpty()) {
+        subVerifyBool(
+            CMManagerShim::CmProxyUsageEnabled,
+            false);
+    } else {
+        subVerifyBool(
+            CMManagerShim::CmProxyUsageEnabled,
+            true);
+    }
+}
+
+/**
+ * Test data for proxy server address change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeProxyServerAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("long")
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html"
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html";
+    QTest::newRow("empty")
+        << ""
+        << "";
+    QTest::newRow("basic") // last one should always fit on one line in UI
+        << "http://www.symbian.org/"
+        << "http://www.symbian.org/";
+}
+
+/**
+ * Tests changing of proxy port number.
+ */
+void TestCpPacketDataApPlugin::tcChangeProxyPortNumber()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyPort->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyUint(
+        CMManagerShim::CmProxyPortNumber,
+        result.toInt());
+    QCOMPARE(
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt(),
+        result.toInt());
+}
+
+/**
+ * Test data for proxy port number change test case.
+ */
+void TestCpPacketDataApPlugin::tcChangeProxyPortNumber_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("basic")
+        << "8080"
+        << "8080";
+    QTest::newRow("too long")
+        << "1234567890"
+        << "12345";
+    QTest::newRow("zero")
+        << "0"
+        << "";
+    QTest::newRow("empty")
+        << ""
+        << "";
+}
+
+/**
+ * Tests invalid proxy port number.
+ */
+void TestCpPacketDataApPlugin::tcInvalidProxyPortNumber()
+{
+    int previous = 
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt();
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyPort->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "65536", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyUint(
+        CMManagerShim::CmProxyPortNumber,
+        previous);
+    QCOMPARE(
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt(),
+        previous);
+}
+
+/**
+ * Collapses the proxy settings group.
+ */
+void TestCpPacketDataApPlugin::tcCollapseProxySettings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, proxyGroup);
+}
+
+/**
+ * Returns from advanced settings view.
+ */
+void TestCpPacketDataApPlugin::tcCloseAdvancedSettingsView()
+{
+    // Return from advanced settings view
+    subClickWidget("HbNavigationButton");
+}
+
+// -----------------------------------------------------------------------------
+// SUB TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Gets UI widget pointers.
+ */
+void TestCpPacketDataApPlugin::subGetUiWidgets()
+{
+    HbModelIterator iterator(mTestView->mModel);
+    
+    // Get "Access point settings" group item
+    QModelIndex apGroupIndex = iterator.index(0);
+    
+    // Get UI widgets
+    mConnectionNameWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(0, apGroupIndex));
+    mAccessPointNameWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(1, apGroupIndex));
+    mUserNameWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(2, apGroupIndex));
+    mPasswordWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(4, apGroupIndex));
+    mAuthenticationWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(5, apGroupIndex));
+    mHomepageWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(6, apGroupIndex));
+}
+
+/**
+ * Gets advanced settings view UI widget pointers by group index.
+ */
+void TestCpPacketDataApPlugin::subGetAdvancedUiWidgets(
+    uint index)
+{
+    // Get the group item
+    HbModelIterator iterator(mTestViewAdvanced->mModel);
+    QModelIndex groupIndex = iterator.index(index);
+    
+    // Get UI widgets
+    if (index == 0) {
+        // IP settings group
+        mNetworkTypeWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(0, groupIndex));
+        if (qobject_cast<HbComboBox *>(mNetworkTypeWidget)->currentIndex() == 0) {
+            // IPv4
+            mIpv4AddressAutomaticWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(1, groupIndex));
+            mIpv4AddressWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(2, groupIndex));
+            mIpv4DnsAddressAutomaticWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(3, groupIndex));
+            mIpv4PrimaryDnsAddressWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(4, groupIndex));
+            mIpv4SecondaryDnsAddressWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(5, groupIndex));
+        } else {
+            // IPv6
+            mIpv6DnsAddressAutomaticWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(1, groupIndex));
+            mIpv6PrimaryDnsAddressWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(2, groupIndex));
+            mIpv6SecondaryDnsAddressWidget = subGetWidgetByIndex(
+                mTestViewAdvanced->mForm,
+                iterator.index(3, groupIndex));
+        }
+    } else {
+        // Proxy settings group
+        mProxyServerAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(0, groupIndex));
+        mProxyPortNumberWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(1, groupIndex));
+    }
+}
+
+/**
+ * Gets an UI widget from HbDataForm by index. 
+ */
+HbWidget *TestCpPacketDataApPlugin::subGetWidgetByIndex(
+    HbDataForm *form,
+    const QModelIndex &index)
+{
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (form->itemByIndex(index));
+    HbWidget *widget = viewItem->dataItemContentWidget();
+    //QString widgetClassName(widget->metaObject()->className());
+    //qDebug() << widgetClassName;
+    return widget;
+}
+
+/**
+ * Writes initial settings to CommsDat needed by some test cases.
+ */
+void TestCpPacketDataApPlugin::subInitializeCommsDat()
+{
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    
+    // Initial settings
+    connectionMethod->setStringAttribute(
+        CMManagerShim::PacketDataIFAuthName,
+        tooLongUserName);
+    
+    connectionMethod->update();
+}
+
+/**
+ * Creates the settings view and shows it.
+ */
+void TestCpPacketDataApPlugin::subCreateSettingsView(uint connectionMethodId)
+{
+    // Create settings view
+    HbView *view = mPlugin->createSettingView(connectionMethodId);
+    QVERIFY(view != NULL);
+    
+    // Display the view
+    mMainWindow->addView(view);
+    mMainWindow->setCurrentView(view);
+    // Store pointer to settings view class
+    mTestView = static_cast<CpPacketDataApView *>(view);    
+}
+
+/**
+ * Verifies that given string is correctly stored in CommsDat and shown on UI. 
+ */
+void TestCpPacketDataApPlugin::subVerifyString(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    HbDataFormModelItem *item,
+    QString expected)
+{
+    QTest::qWait(waitTime);
+
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    QString commsdat = connectionMethod->getStringAttribute(attribute);
+
+    QCOMPARE(commsdat, expected);
+
+    // Get value from UI widget
+    QString widget = item->contentWidgetData("text").toString();
+
+    QCOMPARE(widget, expected);
+}
+
+/**
+ * Clears a HbLineEdit.
+ */
+void TestCpPacketDataApPlugin::subClearLineEdit(
+    uint length)
+{
+    // Move cursor to end of string
+    //HbAutoTest::keyClick(mMainWindow, Qt::Key_End, Qt::ControlModifier, waitTime); // doesn't seem to do anything? 
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    for (int i=0; i<25; i++) {
+        HbAutoTest::keyClick(mMainWindow, Qt::Key_Right, 0, waitTime);
+    }
+    // Erase string
+    for (int i=0; i<length; i++) {
+        HbAutoTest::keyClick(mMainWindow, Qt::Key_Backspace, 0, waitTime);
+    }
+}
+
+/**
+ * Gets value of a boolean attribute from CommsDat.
+ */
+bool TestCpPacketDataApPlugin::subGetBool(
+    CMManagerShim::ConnectionMethodAttribute attribute)
+{
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    return connectionMethod->getBoolAttribute(attribute);
+}
+
+/**
+ * Verifies that given attribute contains expected boolean value in CommsDat. 
+ */
+void TestCpPacketDataApPlugin::subVerifyBool(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    bool expected)
+{
+    QTest::qWait(waitTime);
+    
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    bool commsdat = connectionMethod->getBoolAttribute(attribute);
+    
+    QCOMPARE(commsdat, expected);
+}
+
+/**
+ * Verifies that given attribute contains expected integer value in CommsDat. 
+ */
+void TestCpPacketDataApPlugin::subVerifyUint(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    uint expected)
+{
+    QTest::qWait(waitTime);
+
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    uint commsdat = connectionMethod->getIntAttribute(attribute);
+    
+    QCOMPARE(commsdat, expected);
+}
+
+/**
+ * Clicks a widget currently on UI by class name.
+ */
+void TestCpPacketDataApPlugin::subClickWidget(const QString &name)
+{
+    QList<QGraphicsItem *> itemList = mMainWindow->scene()->items();
+
+    QGraphicsItem *target = 0;
+    foreach (QGraphicsItem* item, itemList) {
+        if (item->isWidget()) {
+            QString widgetClassName(static_cast<QGraphicsWidget*>(item)->metaObject()->className());
+            //qDebug() << widgetClassName;
+            
+            if (widgetClassName == name) {
+                target = item;
+                break;
+            }
+        }
+    }
+
+    Q_ASSERT(target);
+    HbAutoTest::mouseClick(mMainWindow, static_cast<HbWidget *>(target));
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpPacketDataApPlugin::subScrollToBottom()
+{
+    // Scroll to the bottom of the view
+    HbAutoTest::mousePress(mMainWindow, mTestView, scrollMiddle);
+    QTest::qWait(1000);
+    HbAutoTest::mouseMove(mMainWindow, mTestView, scrollTop);
+    HbAutoTest::mouseRelease(mMainWindow, mTestView, scrollTop);
+}
+
+/**
+ * Scrolls the tested view to the top.
+ */
+void TestCpPacketDataApPlugin::subScrollToTop()
+{
+    // Scroll to the top of the view
+    HbAutoTest::mousePress(mMainWindow, mTestView, scrollMiddle);
+    QTest::qWait(1000);
+    HbAutoTest::mouseMove(mMainWindow, mTestView, scrollBottom);
+    HbAutoTest::mouseRelease(mMainWindow, mTestView, scrollBottom);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin unit testing.
+*/
+
+#include <QStringList>
+#include <QtTest/QtTest>
+#include <cmmanagerdefines_shim.h>
+
+class HbWidget;
+class HbDialog;
+class HbMainWindow;
+class HbAutoTestMainWindow;
+class HbDataForm;
+class HbDataFormModelItem;
+class HbDataFormViewItem;
+class HbAction;
+class CpPacketDataApView;
+class CpPacketDataApAdvancedView;
+class CpBearerApPluginInterface;
+
+class TestCpPacketDataApPlugin : public QObject
+{
+    Q_OBJECT
+
+    signals:
+        // Test signals
+        void menuActionTriggered(HbAction *);
+    
+    public slots:
+        // Test framework functions
+        void initTestCase();
+        void cleanupTestCase();
+        void init();
+        void cleanup();
+
+    private slots:
+        // Test cases
+        void tcChangeConnectionName();
+        void tcChangeConnectionName_data();
+        void tcConnectionNameEmpty();
+        void tcChangeAccessPointName();
+        void tcChangeAccessPointName_data();
+        void tcAccessPointNameEmpty();
+        void tcTooLongUserNameInCommsDat();
+        void tcChangeUserName();
+        void tcChangeUserName_data();
+        void tcScrollToBottom();
+        void tcChangePassword();
+        void tcChangePassword_data();
+        void tcChangeAuthenticationMode();
+        void tcChangeHomepage();
+        void tcChangeHomepage_data();
+        void tcOpenAdvancedSettingsView();
+        void tcExpandIpSettings();
+        void tcSetIpv4NetworkType();
+        void tcEnableAutomaticIpv4Address();
+        void tcEnableUserDefinedIpv4Address();
+        void tcChangeIpAddress();
+        void tcChangeIpAddress_data();
+        void tcScrollToBottom2();
+        void tcEnableAutomaticIpv4DnsAddress();
+        void tcEnableUserDefinedIpv4DnsAddress();
+        void tcChangeIpv4DnsAddress();
+        void tcChangeIpv4DnsAddress_data();
+        void tcInvalidIpv4DnsAddress();
+        void tcScrollToTop();
+        void tcSetIpv6NetworkType();
+        void tcEnableAutomaticIpv6DnsAddress();
+        void tcEnableWellKnownIpv6DnsAddress();
+        void tcEnableUserDefinedIpv6DnsAddress();
+        void tcChangeIpv6DnsAddress();
+        void tcChangeIpv6DnsAddress_data();
+        void tcInvalidIpv6DnsAddress();
+        void tcCollapseIpSettings();
+        void tcExpandProxySettingsAndGetUiWidgets();
+        void tcChangeProxyServerAddress();
+        void tcChangeProxyServerAddress_data();
+        void tcChangeProxyPortNumber();
+        void tcChangeProxyPortNumber_data();
+        void tcInvalidProxyPortNumber();
+        void tcCollapseProxySettings();
+        void tcCloseAdvancedSettingsView();
+
+    private:
+        // Sub test cases
+        void subGetUiWidgets();
+        void subGetAdvancedUiWidgets(uint index);
+        HbWidget *subGetWidgetByIndex(
+            HbDataForm *form,
+            const QModelIndex &index);
+        void subInitializeCommsDat();
+        void subCreateSettingsView(uint connetionMethodId);
+        void subVerifyString(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            HbDataFormModelItem *item,
+            QString expected);
+        void subClearLineEdit(uint length);
+        bool subGetBool(CMManagerShim::ConnectionMethodAttribute attribute);
+        void subVerifyBool(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            bool expected);
+        void subVerifyUint(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            uint expected);
+        void subClickWidget(const QString &name);
+        void subScrollToBottom();
+        void subScrollToTop();
+
+    private:
+        // Code references
+        CpPacketDataApView *mTestView;
+        CpPacketDataApAdvancedView *mTestViewAdvanced;
+        // "Access point settings" UI widgets
+        HbWidget *mConnectionNameWidget;
+        HbWidget *mAccessPointNameWidget;
+        HbWidget *mUserNameWidget;
+        HbWidget *mPasswordWidget;
+        HbWidget *mAuthenticationWidget;
+        HbWidget *mHomepageWidget;
+        // "Advanced settings" UI widgets
+        HbDataFormViewItem *mIpGroupViewItem;
+        HbDataFormViewItem *mProxyGroupViewItem;
+        HbWidget *mNetworkTypeWidget;
+        HbWidget *mIpv4AddressAutomaticWidget;
+        HbWidget *mIpv4AddressWidget;
+        HbWidget *mIpv4DnsAddressAutomaticWidget;
+        HbWidget *mIpv4PrimaryDnsAddressWidget;
+        HbWidget *mIpv4SecondaryDnsAddressWidget;
+        HbWidget *mIpv6DnsAddressAutomaticWidget;
+        HbWidget *mIpv6PrimaryDnsAddressWidget;
+        HbWidget *mIpv6SecondaryDnsAddressWidget;
+        HbWidget *mProxyServerAddressWidget;
+        HbWidget *mProxyPortNumberWidget;
+        
+        // Test data
+        HbAutoTestMainWindow *mMainWindow;
+        QPluginLoader *mPluginLoader;
+        CpBearerApPluginInterface *mPlugin;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for Control Panel packet data AP plugin unit tests.
+
+TEMPLATE = app
+
+TARGET = testcppacketdataapplugin
+
+CONFIG += hb qtestlib
+
+INCLUDEPATH += . ../../inc
+DEPENDPATH += .
+
+HEADERS += \
+    hbautotest.h \
+    testcppacketdataapplugin.h
+SOURCES += \
+    hbautotest.cpp \
+    testcppacketdataapplugin.cpp
+
+LIBS += \
+    -lcppacketdataapplugin \
+    -lconnection_settings_shim
+
+symbian: {
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/tools/commsdat_restore.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for restoring backup of commsdat.
+
+copy backup\cccccc00.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/tools/commsdat_set.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for setting test commsdat.
+
+md backup
+copy \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre backup\
+copy default.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppacketdataapplugin/tsrc/ut/tools/cppacketdataapplugin_ctc.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,90 @@
+::
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+:: Script running Control Panel packet data AP plugin test cases with CTC
+:: analysis.
+
+@echo off
+
+:: -----------------------------------------------------------------------------
+:: Instructions
+:: -----------------------------------------------------------------------------
+:: 
+:: Remember to use the test CommsDat that can be set and restored with the
+:: helper scripts:
+:: - commsdat_set.bat
+:: - commsdat_restore.bat
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+:: Control Panel packet data AP plugin base directory
+set cppacketdataapplugin_dir=..\..\..
+pushd %cppacketdataapplugin_dir%
+
+:: CTC instrumentation excludes
+set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp
+
+
+::-----------------------------------------------------------------------------
+:: Remove old coverage data
+::-----------------------------------------------------------------------------
+
+echo Cleaning up...
+del MON.* ctcerr.txt profile.txt
+rd /s /q CTCHTML
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build & instrument code
+::-----------------------------------------------------------------------------
+
+echo Building code and instrumenting..
+call del MON.* ctcerr.txt profile.txt
+call make distclean
+call qmake
+call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build test code
+::-----------------------------------------------------------------------------
+
+echo Building test code...
+call cd tsrc\ut
+call make distclean
+call qmake
+call sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Execute the tests
+::-----------------------------------------------------------------------------
+
+echo Running tests..
+cd ..\..
+call \epoc32\release\winscw\udeb\testcppacketdataapplugin.exe
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Create coverage results
+::-----------------------------------------------------------------------------
+
+echo Creating results...
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
+echo ...done
+
+popd
Binary file cmmanager/cppacketdataapplugin/tsrc/ut/tools/default.cre has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppluginutils/cppluginutils.pri	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project info include file for Control Panel plugin utilities.
+#
+
+# Sources
+HEADERS += $$PWD/inc/cpipv4filter.h \
+           $$PWD/inc/cpipv6filter.h
+SOURCES += $$PWD/src/cpipv4filter.cpp \
+           $$PWD/src/cpipv6filter.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppluginutils/inc/cpipv4filter.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* IPv4 input filter header file.
+*
+*/
+
+#ifndef CPIPV4FILTER_H
+#define CPIPV4FILTER_H
+
+// System includes
+#include <HbInputFilter>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpIpv4Filter : public HbInputFilter
+{
+public:
+    static CpIpv4Filter* instance();
+    virtual ~CpIpv4Filter();
+    virtual bool filter(QChar aChar);
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpIpv4Filter)
+
+    CpIpv4Filter();
+
+private slots:
+    
+private: // data
+};
+
+#endif // CPIPV4FILTER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppluginutils/inc/cpipv6filter.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* IPv6 input filter header file.
+*
+*/
+
+#ifndef CPIPV6FILTER_H
+#define CPIPV6FILTER_H
+
+// System includes
+#include <HbInputFilter>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpIpv6Filter : public HbInputFilter
+{
+public:
+    static CpIpv6Filter* instance();
+    virtual ~CpIpv6Filter();
+    virtual bool filter(QChar aChar);
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpIpv6Filter)
+
+    CpIpv6Filter();
+
+private slots:
+    
+private: // data
+};
+
+#endif // CPIPV6FILTER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppluginutils/src/cpipv4filter.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* IPv4 input filter implementation.
+*
+*/
+
+// System includes
+#include <HbInputFilter>
+
+// User includes
+#include "cpipv4filter.h"
+
+/*!
+    \class CpIpv4Filter
+    \brief IPv4 input filter implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Returns static instance of the class.
+*/
+CpIpv4Filter* CpIpv4Filter::instance()
+{
+    static CpIpv4Filter myInstance;
+    return &myInstance;
+}
+
+/*!
+    Constructor.
+*/
+CpIpv4Filter::CpIpv4Filter()
+{
+}
+
+/*!
+    Destructor.
+*/
+CpIpv4Filter::~CpIpv4Filter()
+{
+}
+
+/*!
+    Returns true if given character is valid for an IPv4 address.
+*/
+bool CpIpv4Filter::filter(QChar aChar)
+{
+    if (aChar >= '0' && aChar <= '9') {
+        return true;
+    }
+    if (aChar == '.') {
+        return true;
+    }
+
+    return false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cppluginutils/src/cpipv6filter.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* IPv6 input filter implementation.
+*
+*/
+
+// System includes
+#include <HbInputFilter>
+
+// User includes
+#include "cpipv6filter.h"
+
+/*!
+    \class CpIpv6Filter
+    \brief IPv6 input filter implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Returns static instance of the class.
+*/
+CpIpv6Filter* CpIpv6Filter::instance()
+{
+    static CpIpv6Filter myInstance;
+    return &myInstance;
+}
+
+/*!
+    Constructor.
+*/
+CpIpv6Filter::CpIpv6Filter()
+{
+}
+
+/*!
+    Destructor.
+*/
+CpIpv6Filter::~CpIpv6Filter()
+{
+}
+
+/*!
+    Returns true if given character is valid for an IPv6 address.
+*/
+bool CpIpv6Filter::filter(QChar aChar)
+{
+    if ((aChar >= 'a' && aChar <= 'f')
+        || (aChar >= 'A' && aChar <= 'F')
+        || (aChar >= '0' && aChar <= '9')) {
+        return true;
+    }
+    if (aChar == ':' || aChar == '.') {
+        return true;
+    }
+
+    return false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/cpwlanapplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project info file for Control Panel WLAN AP plugin. 
+#
+
+TEMPLATE = lib
+TARGET = cpwlanapplugin
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+symbian: {
+    MMP_RULES += "USERINCLUDE traces"
+}
+
+CONFIG += hb plugin
+
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+
+LIBS += -lcpframework -lconnection_settings_shim
+
+# Sources
+HEADERS += inc/cpwlanapplugin.h \
+           inc/cpwlanapview.h \
+           inc/cpwlanapadvancedview.h \
+           traces/OstTraceDefinitions.h
+SOURCES += src/cpwlanapplugin.cpp \
+           src/cpwlanapview.cpp \
+           src/cpwlanapadvancedview.cpp
+
+# Include plugin utilities
+include(../cppluginutils/cppluginutils.pri)
+
+symbian:
+{
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.UID3 = 0x2002C369
+TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+deploy.path = C:
+qtplugins.path = /resource/qt/plugins/controlpanel/bearerap
+qtplugins.sources += qmakepluginstubs/cpwlanapplugin.qtplugin
+
+for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+
+BLD_INF_RULES.prj_exports += "rom/cpwlanapplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwlanapplugin.iby)"
+}
+
+plugin.sources = cpwlanapplugin.dll
+plugin.path = /resource/qt/plugins/controlpanel/bearerap
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/inc/cpwlanapadvancedview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP advanced settings view header file.
+*
+*/
+
+#ifndef CPWLANAPADVANCEDVIEW_H
+#define CPWLANAPADVANCEDVIEW_H
+
+// System includes
+#include <QAbstractSocket>
+#include <HbMessageBox>
+#include <cpbasesettingview.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class HbValidator;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpWlanApAdvancedView : public CpBaseSettingView
+{
+    Q_OBJECT
+    
+public:
+    CpWlanApAdvancedView(
+        CmConnectionMethodShim *cmConnectionMethod,
+        QGraphicsItem *parent = 0);
+    ~CpWlanApAdvancedView();
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+ 
+private:
+    Q_DISABLE_COPY(CpWlanApAdvancedView)
+   
+    //! IPv6 DNS type
+    enum Ipv6DnsType {
+        Ipv6DnsTypeAutomatic = 0,
+        Ipv6DnsTypeWellKnown,
+        Ipv6DnsTypeUserDefined
+    };
+
+    void createAdvancedSettings();
+    void createIpv4Group();
+    void updateIpv4Group();
+    void createIpv6Group();
+    void updateIpv6Group();
+    void createProxyGroup();
+    void updateProxyGroup();
+    QString getIpAddress(CMManagerShim::ConnectionMethodAttribute attribute);
+    Ipv6DnsType getIpv6DnsType();
+    void enableIpv4AddressFields(int state);
+    void enableIpv4DnsFields(int state);
+    void enableIpv6DnsFields(int selectionIndex);
+    bool validateAndSaveIpAddress(
+        HbDataFormModelItem *item,
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        QAbstractSocket::NetworkLayerProtocol protocol);
+    void showMessageBox(
+        HbMessageBox::MessageBoxType type,
+        const QString &text);
+    bool tryUpdate();
+    void handleUpdateError();
+    
+private slots:
+    void setEditorPreferences(const QModelIndex index);
+    void changeIpv4AddressMode(int state);
+    void changeIpv4Address();
+    void changeIpv4SubnetMask();
+    void changeIpv4Gateway();
+    void changeIpv4DnsMode(int state);
+    void changeIpv4PrimaryDnsAddress();
+    void changeIpv4SecondaryDnsAddress();
+    void changeIpv6DnsMode(int selectionIndex);
+    void changeIpv6PrimaryDnsAddress();
+    void changeIpv6SecondaryDnsAddress();
+    void changeProxyServer();
+    void changeProxyPort();
+
+private: // data
+    //! Dataform
+    HbDataForm *mForm;
+    //! Dataform model
+    HbDataFormModel *mModel;
+    //! Connection Settings Shim connection method pointer
+    CmConnectionMethodShim *mCmConnectionMethod;
+    //! "IPv4 settings" group
+    HbDataFormModelItem *mIpv4Group;
+    //! "Automatic" setting item for phone IP address
+    HbDataFormModelItem *mIpv4Automatic;
+    //! "Phone IP address" setting item
+    HbDataFormModelItem *mIpv4Address;
+    //! "Subnet mask" setting item
+    HbDataFormModelItem *mIpv4SubnetMask;
+    //! "Default gateway" setting item
+    HbDataFormModelItem *mIpv4Gateway;
+    //! "Automatic" setting item for IPv4 DNS addresses
+    HbDataFormModelItem *mIpv4DnsAutomatic;
+    //! "Primary name server" setting item
+    HbDataFormModelItem *mIpv4DnsAddress1;
+    //! "Secondary name server" setting item
+    HbDataFormModelItem *mIpv4DnsAddress2;
+    //! "IPv6 settings" group
+    HbDataFormModelItem *mIpv6Group;
+    //! "Automatic" setting item for IPv6 DNS addresses
+    HbDataFormModelItem *mIpv6DnsAutomatic;
+    //! "Primary name server" setting item
+    HbDataFormModelItem *mIpv6DnsAddress1;
+    //! "Secondary name server" setting item
+    HbDataFormModelItem *mIpv6DnsAddress2;
+    //! "Proxy settings" group
+    HbDataFormModelItem *mProxyGroup;
+    //! "Proxy server address" setting item
+    HbDataFormModelItem *mProxyServer;
+    //! "Proxy port number" setting item
+    HbDataFormModelItem *mProxyPort;
+    //! Message box for info notes
+    QSharedPointer<HbMessageBox> mMessageBox;
+    //! Flag for IPv6 support
+    bool mIpv6Supported;
+    
+    // Friend classes
+    friend class TestCpWlanApPlugin;
+};
+
+#endif // CPWLANAPADVANCEDVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/inc/cpwlanapplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin header file.
+*   
+*/
+
+#ifndef	CPWLANAPPLUGIN_H
+#define	CPWLANAPPLUGIN_H
+
+// System includes
+#include <QObject>
+#include <QSharedPointer>
+#include <cpbearerapplugininterface.h>
+
+// User includes
+
+// Forward declarations
+class HbTranslator;
+class CmManagerShim;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpWlanApPlugin : public QObject, public CpBearerApPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpBearerApPluginInterface)
+    
+public:
+    CpWlanApPlugin();
+    ~CpWlanApPlugin();
+    
+    uint bearerType() const;
+    CpBaseSettingView *createSettingView(uint connectionMethod);
+    
+signals:
+    
+public slots:
+
+protected:
+    
+protected slots:
+
+private:
+    Q_DISABLE_COPY(CpWlanApPlugin)
+
+private slots:
+    
+private: // data
+    //! Translator instance
+    QSharedPointer<HbTranslator> mTranslator;
+    //! CM Manager Shim instance
+    CmManagerShim *mCmManager;
+    //! CM Connection Method Shim instance
+    CmConnectionMethodShim *mCmConnectionMethod;
+};
+
+#endif // CPWLANAPPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/inc/cpwlanapview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel WLAN AP settings view header file.
+*
+*/
+
+#ifndef CPWLANAPVIEW_H
+#define CPWLANAPVIEW_H
+
+// System includes
+#include <QSharedPointer>
+#include <QMap>
+#include <HbMessageBox>
+#include <cpbasesettingview.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class HbMessageBox;
+class CmConnectionMethodShim;
+class CpWlanApPlugin;
+class CpWlanSecurityPluginInterface;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class CpWlanApView : public CpBaseSettingView
+{
+    Q_OBJECT
+    
+public:
+    CpWlanApView(
+        CmConnectionMethodShim *cmConnectionMethod,
+        QGraphicsItem *parent = 0);
+    ~CpWlanApView();
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+ 
+private:
+    Q_DISABLE_COPY(CpWlanApView)
+
+    void createAccessPointSettingsGroup();
+    void updateAccessPointSettingsGroup();
+    void loadSecurityPlugins(
+        CMManagerShim::WlanConnMode networkMode);
+    void updateSecurityGroup(int index);
+    void showMessageBox(
+        HbMessageBox::MessageBoxType type,
+        const QString &text);
+    bool tryUpdate();
+    void handleUpdateError();
+    void updateAdHocChannelItem(
+        CMManagerShim::WlanConnMode networkMode);
+    void updateSecurityModeItem(
+        CMManagerShim::WlanConnMode networkMode);
+    
+private slots:
+    void connectionNameChanged();
+    void wlanNetworkNameChanged();
+    void networkStatusChanged(int index);
+    void networkModeChanged(int index);
+    void adHocChannelChanged(int index);
+    void securityModeChanged(int index);
+    void homepageChanged();
+    void menuActionTriggered(HbAction *action);
+    void restoreCurrentView();
+    void setEditorPreferences(const QModelIndex modelIndex);
+    
+private: // data
+    // WLAN ad-hoc channel minimum and maximum values 
+    static const uint WlanAdHocChannelMinValue = 1;
+    static const uint WlanAdHocChannelMaxValue = 11;
+    
+    //! Dataform
+    HbDataForm *mForm;
+    //! Dataform model
+    HbDataFormModel *mModel;
+    //! Control Panel item data helper for WLAN security plugins
+    CpItemDataHelper *mItemDataHelper;
+    //! "Access point settings" group
+    HbDataFormModelItem *mApSettingsGroupItem;
+    //! "Connection name" setting item
+    HbDataFormModelItem *mConnectionNameItem;
+    //! "WLAN network name" setting item
+    HbDataFormModelItem *mWlanNetworkNameItem;
+    //! "Network status" setting item
+    HbDataFormModelItem *mNetworkStatusItem;
+    //! "Network mode" setting item
+    HbDataFormModelItem *mNetworkModeItem;
+    //! "Ad-hoc channel" setting item
+    HbDataFormModelItem *mAdHocChannelItem;
+    //! "Security mode" setting item
+    HbDataFormModelItem *mSecurityModeItem;
+    //! "Homepage" setting item
+    HbDataFormModelItem *mHomepageItem;
+    //! "Security settings" group
+    HbDataFormModelItem *mSecuritySettingsGroupItem;
+    //! "Advanced settings" action for view menu
+    HbAction *mAdvancedSettingsAction;
+    //! Connection Settings Shim connection method pointer
+    CmConnectionMethodShim *mCmConnectionMethod;
+    //! Message box for info notes
+    QSharedPointer<HbMessageBox> mMessageBox;
+    //! Maps network status combobox index to CMManagerShim::WlanScanSSID value
+    QMap<int, bool> mNetworkStatusMap;
+    //! Maps network mode combobox index to CMManagerShim::WlanConnectionMode value
+    QMap<int, int> mNetworkModeMap;
+    //! Maps security mode combobox index to corresponding security plugin pointer
+    QMap<int, CpWlanSecurityPluginInterface *> mSecurityModeMap;
+    
+    // Friend classes
+    friend class TestCpWlanApPlugin;
+};
+
+#endif // CPWLANAPVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/rom/cpwlanapplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin iby file.
+*
+*/
+
+#ifndef CPWLANAPPLUGIN_IBY
+#define CPWLANAPPLUGIN_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR/BUILD_DIR/cpwlanapplugin.dll SHARED_LIB_DIR/cpwlanapplugin.dll
+
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/bearerap/cpwlanapplugin.qtplugin resource/qt/plugins/controlpanel/bearerap/cpwlanapplugin.qtplugin
+
+#endif // __PROTOCOL_WLAN
+
+#endif // CPWLANAPPLUGIN_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/src/cpwlanapadvancedview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1099 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel WLAN AP advanced settings view implementation.
+*
+*/
+
+// System includes
+#include <QHostAddress>
+#include <HbCheckBox>
+#include <HbLineEdit>
+#include <HbDataFormViewItem>
+#include <HbWidget>
+#include <HbEditorInterface>
+#include <HbUrlFilter>
+#include <HbInputDialog>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <cmconnectionmethod_shim.h>
+#include <cmmanagerdefines_shim.h>
+#include <cpsettingformitemdata.h>
+
+// User includes
+#include "cpipv4filter.h"
+#include "cpipv6filter.h"
+#include "cpwlanapadvancedview.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpwlanapadvancedviewTraces.h"
+#endif
+
+/*!
+    \class CpWlanApAdvancedView
+    \brief This class implements the WLAN AP Control Panel advanced
+           settings view.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpWlanApAdvancedView::CpWlanApAdvancedView(
+    CmConnectionMethodShim *cmConnectionMethod,
+    QGraphicsItem *parent) :
+        CpBaseSettingView(0, parent),
+        mForm(0),
+        mModel(0),
+        mCmConnectionMethod(cmConnectionMethod),
+        mIpv4Group(0),
+        mIpv4Automatic(0),
+        mIpv4Address(0),
+        mIpv4SubnetMask(0),
+        mIpv4Gateway(0),
+        mIpv4DnsAutomatic(0),
+        mIpv4DnsAddress1(0),
+        mIpv4DnsAddress2(0),
+        mIpv6Group(0),
+        mIpv6DnsAutomatic(0),
+        mIpv6DnsAddress1(0),
+        mIpv6DnsAddress2(0),
+        mProxyGroup(0),
+        mProxyServer(0),
+        mProxyPort(0),
+        mMessageBox(0),
+        mIpv6Supported(false)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CPWLANAPADVANCEDVIEW_ENTRY);
+    
+    // Construct WLAN AP advanced settings UI
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    mModel = new HbDataFormModel(mForm);
+    mForm->setModel(mModel);
+
+    mIpv6Supported = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIPv6Supported);
+        
+    // Add advanced settings groups
+    createAdvancedSettings();
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CPWLANAPADVANCEDVIEW_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpWlanApAdvancedView::~CpWlanApAdvancedView()
+{
+    OstTraceFunctionEntry0(DUP1_CPWLANAPADVANCEDVIEW_CPWLANAPADVANCEDVIEW_ENTRY);
+    
+    OstTraceFunctionExit0(DUP1_CPWLANAPADVANCEDVIEW_CPWLANAPADVANCEDVIEW_EXIT);
+}
+
+/*!
+    Creates all advanced settings groups.
+*/
+void CpWlanApAdvancedView::createAdvancedSettings()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CREATEADVANCEDSETTINGS_ENTRY);
+    
+    // Create settings groups
+    createIpv4Group();
+    if (mIpv6Supported) {
+        createIpv6Group();
+    }
+    createProxyGroup();
+    
+    // Read values and update UI
+    updateIpv4Group();
+    if (mIpv6Supported) {
+        updateIpv6Group();
+    }
+    updateProxyGroup();
+    
+    // Connect signal to initialize settings item widgets
+    bool status = connect(
+        mForm,
+        SIGNAL(itemShown(const QModelIndex)),
+        this,
+        SLOT(setEditorPreferences(const QModelIndex)));
+    Q_ASSERT(status);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CREATEADVANCEDSETTINGS_EXIT);
+}
+
+/*!
+    Creates the IPv4 settings group.
+*/
+void CpWlanApAdvancedView::createIpv4Group()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CREATEIPV4GROUP_ENTRY);
+    
+    // IPv4 settings group
+    mIpv4Group = new CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem,
+        hbTrId("txt_occ_subhead_ipv4_settings"));
+    mModel->appendDataFormItem(mIpv4Group);
+    
+    // Phone IP address
+    // "Automatic" checkbox
+    mIpv4Automatic = new CpSettingFormItemData(
+        HbDataFormModelItem::CheckBoxItem,
+        hbTrId("txt_occ_setlabel_phone_ip_address"));
+    mIpv4Automatic->setContentWidgetData(
+        "text",
+        hbTrId("txt_occ_setlabel_val_automatic"));
+    mForm->addConnection(
+        mIpv4Automatic,
+        SIGNAL(stateChanged(int)),
+        this,
+        SLOT(changeIpv4AddressMode(int)));
+    mIpv4Automatic->setContentWidgetData("objectName", "ipv4AutomaticCB");
+    mIpv4Group->appendChild(mIpv4Automatic);
+    
+    // Phone IP address
+    mIpv4Address = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_phone_ip_address"));
+    mForm->addConnection(
+        mIpv4Address,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv4Address()));
+    mIpv4Address->setContentWidgetData("objectName", "ipv4AddressEdit");
+    mIpv4Group->appendChild(mIpv4Address);
+    
+    // Subnet mask
+    mIpv4SubnetMask = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_subnet_mask"));
+    mForm->addConnection(
+        mIpv4SubnetMask,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv4SubnetMask()));
+    mIpv4SubnetMask->setContentWidgetData("objectName", "ipv4SubnetmaskEdit");
+    mIpv4Group->appendChild(mIpv4SubnetMask);
+    
+    // Gateway
+    mIpv4Gateway = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_default_gateway"));
+    mForm->addConnection(
+        mIpv4Gateway,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv4Gateway()));
+    mIpv4Gateway->setContentWidgetData("objectName", "ipv4GatewayEdit");
+    mIpv4Group->appendChild(mIpv4Gateway);
+    
+    // DNS addresses
+    // "Automatic" checkbox
+    mIpv4DnsAutomatic = new CpSettingFormItemData(
+        HbDataFormModelItem::CheckBoxItem,
+        hbTrId("txt_occ_setlabel_dns_addresses"));
+    mIpv4DnsAutomatic->setContentWidgetData(
+        "text",
+        hbTrId("txt_occ_setlabel_val_automatic"));
+    mForm->addConnection(
+        mIpv4DnsAutomatic,
+        SIGNAL(stateChanged(int)), 
+        this,
+        SLOT(changeIpv4DnsMode(int)));
+    mIpv4DnsAutomatic->setContentWidgetData("objectName", "ipv4DnsAutomaticCB");
+    mIpv4Group->appendChild(mIpv4DnsAutomatic);
+    
+    // Primary DNS address
+    mIpv4DnsAddress1 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_primary_name_server"));
+    mForm->addConnection(
+        mIpv4DnsAddress1,
+        SIGNAL(editingFinished()), 
+        this,
+        SLOT(changeIpv4PrimaryDnsAddress()));
+    mIpv4DnsAddress1->setContentWidgetData("objectName", "ipv4DnsAddress1Edit");
+    mIpv4Group->appendChild(mIpv4DnsAddress1);
+    
+    // Secondary DNS address
+    mIpv4DnsAddress2 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_secondary_name_server"));
+    mForm->addConnection(
+        mIpv4DnsAddress2,
+        SIGNAL(editingFinished()), 
+        this,
+        SLOT(changeIpv4SecondaryDnsAddress()));
+    mIpv4DnsAddress2->setContentWidgetData("objectName", "ipv4DnsAddress2Edit");
+    mIpv4Group->appendChild(mIpv4DnsAddress2);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CREATEIPV4GROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates the IPv4 settings group.
+*/
+void CpWlanApAdvancedView::updateIpv4Group()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_UPDATEIPV4GROUP_ENTRY);
+    
+    // Phone IP address
+    // "Automatic" checkbox
+    bool ipAddressFromServer = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIPAddrFromServer);
+    Qt::CheckState state = Qt::Unchecked;
+    if (ipAddressFromServer) {
+        state = Qt::Checked;
+    }
+    mIpv4Automatic->setContentWidgetData("checkState", state);
+
+    // Enable/disable user defined IP address fields
+    enableIpv4AddressFields(state);
+    
+    // Phone IP address
+    QString string = getIpAddress(CMManagerShim::CmIPAddress);
+    mIpv4Address->setContentWidgetData("text", string);
+    
+    // Subnet mask
+    string = getIpAddress(CMManagerShim::CmIPNetmask);
+    mIpv4SubnetMask->setContentWidgetData("text", string);
+    
+    // Gateway
+    string = getIpAddress(CMManagerShim::CmIPGateway);
+    mIpv4Gateway->setContentWidgetData("text", string);
+    
+    // DNS addresses
+    // "Automatic" checkbox
+    state = Qt::Unchecked;
+    if (mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIPDNSAddrFromServer)) {
+        state = Qt::Checked;
+    }
+    mIpv4DnsAutomatic->setContentWidgetData("checkState", state);
+
+    // Enable/disable user defined DNS address fields
+    enableIpv4DnsFields(state);
+    
+    // Primary DNS address
+    string = getIpAddress(CMManagerShim::CmIPNameServer1);
+    mIpv4DnsAddress1->setContentWidgetData("text", string);
+    
+    // Secondary DNS address
+    string = getIpAddress(CMManagerShim::CmIPNameServer2);
+    mIpv4DnsAddress2->setContentWidgetData("text", string);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_UPDATEIPV4GROUP_EXIT);
+}
+
+/*!
+    Creates the IPv6 settings group.
+*/
+void CpWlanApAdvancedView::createIpv6Group()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CREATEIPV6GROUP_ENTRY);
+    
+    // IPv6 settings group
+    mIpv6Group = new CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_ipv6_settings"));
+    mModel->appendDataFormItem(mIpv6Group);
+    
+    // DNS addresses
+    // Automatic/well-known/user defined combobox
+    mIpv6DnsAutomatic = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_dns_addresses"));
+    QStringList dnsModeList;
+    // Order of the list must match the Ipv6DnsType enum
+    dnsModeList
+        << hbTrId("txt_occ_setlabel_val_automatic")
+        << hbTrId("txt_occ_setlabel_dns_addresses_val_wellknown")
+        << hbTrId("txt_occ_setlabel_dns_addresses_val_user_defined");
+    mIpv6DnsAutomatic->setContentWidgetData("items", dnsModeList);
+    mForm->addConnection(
+        mIpv6DnsAutomatic,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(changeIpv6DnsMode(int)));
+    mIpv6DnsAutomatic->setContentWidgetData("objectName", "ipv6DnsAutomaticCB");
+    mIpv6Group->appendChild(mIpv6DnsAutomatic);
+    
+    // Primary DNS address
+    mIpv6DnsAddress1 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_primary_name_server"));
+    mForm->addConnection(
+        mIpv6DnsAddress1,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv6PrimaryDnsAddress()));
+    mIpv6DnsAddress1->setContentWidgetData("objectName", "ipv6DnsAddress1Edit");
+    mIpv6Group->appendChild(mIpv6DnsAddress1);
+    
+    // Secondary DNS address
+    mIpv6DnsAddress2 = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_secondary_name_server"));
+    mForm->addConnection(
+        mIpv6DnsAddress2,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeIpv6SecondaryDnsAddress()));
+    mIpv6DnsAddress2->setContentWidgetData("objectName", "ipv6DnsAddress2Edit");
+    mIpv6Group->appendChild(mIpv6DnsAddress2);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CREATEIPV6GROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates the IPv6 settings group.
+*/
+void CpWlanApAdvancedView::updateIpv6Group()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_UPDATEIPV6GROUP_ENTRY);
+    
+    // DNS addresses
+    // Automatic/well-known/user defined combobox
+    uint type = getIpv6DnsType();
+    mIpv6DnsAutomatic->setContentWidgetData("currentIndex", type);
+
+    // Enable/disable user defined DNS address fields
+    enableIpv6DnsFields(type);
+    
+    // Primary DNS address
+    QString string = getIpAddress(CMManagerShim::CmIP6NameServer1);
+    mIpv6DnsAddress1->setContentWidgetData("text", string);
+    
+    // Secondary DNS address
+    string = getIpAddress(CMManagerShim::CmIP6NameServer2);
+    mIpv6DnsAddress2->setContentWidgetData("text", string);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_UPDATEIPV6GROUP_EXIT);
+}
+
+/*!
+    Creates the proxy settings group.
+*/
+void CpWlanApAdvancedView::createProxyGroup()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CREATEPROXYGROUP_ENTRY);
+    
+    // Proxy settings group
+    mProxyGroup = new CpSettingFormItemData(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_proxy_settings"));
+    mModel->appendDataFormItem(mProxyGroup);
+    
+    // Proxy server address
+    mProxyServer = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_proxy_server_address"));
+    mForm->addConnection(
+        mProxyServer,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeProxyServer()));
+    mProxyServer->setContentWidgetData("objectName", "proxyServerEdit");
+    mProxyGroup->appendChild(mProxyServer);
+    
+    // Proxy port number
+    mProxyPort = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_proxy_port_number"));
+    mForm->addConnection(
+        mProxyPort,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(changeProxyPort()));
+    mProxyPort->setContentWidgetData("objectName", "proxyPortEdit");
+    mProxyGroup->appendChild(mProxyPort);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CREATEPROXYGROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates the proxy settings group.
+*/
+void CpWlanApAdvancedView::updateProxyGroup()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_UPDATEPROXYGROUP_ENTRY);
+    
+    // Proxy server address
+    QString serverAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmProxyServerName);
+    mProxyServer->setContentWidgetData("text", serverAddress);
+    
+    // Proxy port number
+    uint portNumber = mCmConnectionMethod->getIntAttribute(
+        CMManagerShim::CmProxyPortNumber);
+    if (portNumber > 0) {
+        mProxyPort->setContentWidgetData("text", QVariant(portNumber));
+    } else {
+        mProxyPort->setContentWidgetData("text", "");
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_UPDATEPROXYGROUP_EXIT);
+}
+
+/*!
+    Reads an IP address from CommsDat with given attribute. If string is
+    empty, a zero address (0.0.0.0 or 0:0:0:0:0:0:0:0) is returned.
+*/
+QString CpWlanApAdvancedView::getIpAddress(
+    CMManagerShim::ConnectionMethodAttribute attribute)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_GETIPADDRESS_ENTRY);
+    
+    QString ipAddress = mCmConnectionMethod->getStringAttribute(attribute);
+    
+    if (ipAddress.isEmpty()) {
+        // String is empty, return a zero address instead
+        switch (attribute) {
+        case CMManagerShim::CmIP6NameServer1:
+        case CMManagerShim::CmIP6NameServer2:
+            // IPv6 address
+            ipAddress = CMManagerShim::DynamicIpv6Address;
+            break;
+        default:
+            // IPv4 address
+            ipAddress = CMManagerShim::UnspecifiedIpv4Address; 
+            break;
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_GETIPADDRESS_EXIT);
+    return ipAddress;
+}
+
+/*!
+    Resolves IPv6 DNS address type.
+*/
+CpWlanApAdvancedView::Ipv6DnsType CpWlanApAdvancedView::getIpv6DnsType()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_GETIPV6DNSTYPE_ENTRY);
+    
+    // Read "DNS address from server" flag
+    bool dnsAddressFromServer = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::CmIP6DNSAddrFromServer);
+    
+    // Read IPv6 DNS addresses from CommsDat
+    QString primaryAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmIP6NameServer1);
+    QString secondaryAddress = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmIP6NameServer2);
+
+    // Resolve IPv6 DNS address type
+    Ipv6DnsType type = Ipv6DnsTypeUserDefined;
+    if (dnsAddressFromServer) {
+        // Automatic
+        type = Ipv6DnsTypeAutomatic;
+    } else if (primaryAddress.toLower() == CMManagerShim::KnownIpv6NameServer1
+        && secondaryAddress.toLower() == CMManagerShim::KnownIpv6NameServer2) {
+        // Well-known IPv6 DNS addresses
+        type = Ipv6DnsTypeWellKnown;
+    }
+
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_GETIPV6DNSTYPE_EXIT);
+    return type;
+}
+
+/*!
+    Sets IPv4 address field enabled/disabled.
+*/
+void CpWlanApAdvancedView::enableIpv4AddressFields(int state)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_ENABLEIPV4ADDRESSFIELDS_ENTRY);
+    
+    if (state == Qt::Checked) {
+        // Automatic, disable text field
+        mIpv4Address->setEnabled(false);
+        mIpv4SubnetMask->setEnabled(false);
+        mIpv4Gateway->setEnabled(false);
+    } else {
+        // Manual, enable text field
+        mIpv4Address->setEnabled(true);
+        mIpv4SubnetMask->setEnabled(true);
+        mIpv4Gateway->setEnabled(true);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_ENABLEIPV4ADDRESSFIELDS_EXIT);
+}
+
+/*!
+    Sets IPv4 DNS address fields enabled/disabled.
+*/
+void CpWlanApAdvancedView::enableIpv4DnsFields(int state)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_ENABLEIPV4DNSFIELDS_ENTRY);
+    
+    if (state == Qt::Checked) {
+        // Automatic, disable text fields
+        mIpv4DnsAddress1->setEnabled(false);
+        mIpv4DnsAddress2->setEnabled(false);
+    } else {
+        // Manual, enable text fields
+        mIpv4DnsAddress1->setEnabled(true);
+        mIpv4DnsAddress2->setEnabled(true);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_ENABLEIPV4DNSFIELDS_EXIT);
+}
+
+/*!
+    Sets IPv6 DNS address fields enabled/disabled.
+*/
+void CpWlanApAdvancedView::enableIpv6DnsFields(int selectionIndex)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_ENABLEIPV6DNSFIELDS_ENTRY);
+    
+    // Check combobox value
+    if (selectionIndex == Ipv6DnsTypeUserDefined) {
+        // User-defined, enable text fields
+        mIpv6DnsAddress1->setEnabled(true);
+        mIpv6DnsAddress2->setEnabled(true);
+    } else {
+        // Automatic or well-known, disable text fields
+        mIpv6DnsAddress1->setEnabled(false);
+        mIpv6DnsAddress2->setEnabled(false);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_ENABLEIPV6DNSFIELDS_EXIT);
+}
+
+/*!
+    Validates an IP address and saves it to CommsDat in case it was a valid
+    address or an empty string. In case the address is not valid, an error
+    note is shown to the user and previous setting is restored to the UI.
+*/
+bool CpWlanApAdvancedView::validateAndSaveIpAddress(
+    HbDataFormModelItem *item,
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    QAbstractSocket::NetworkLayerProtocol protocol)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_VALIDATEANDSAVEIPADDRESS_ENTRY);
+    
+    bool success = false;
+    
+    // Check address
+    QString address = item->contentWidgetData("text").toString();
+    QHostAddress hostAddress;
+    if (hostAddress.setAddress(address)
+        && hostAddress.protocol() == protocol) {
+        // Proper address, convert to lower case (IPv6)
+        address = hostAddress.toString().toLower();
+    } else if (address.isEmpty()) {
+        // Empty string, replace with 0.0.0.0 or 0:0:0:0:0:0:0:0
+        if (protocol == QAbstractSocket::IPv4Protocol) {
+            address = CMManagerShim::UnspecifiedIpv4Address;
+        } else {
+            address = CMManagerShim::DynamicIpv6Address;
+        }
+    } else {
+        // Invalid address
+        address.clear();
+    }
+
+    if (!address.isEmpty()) {
+        // Save to CommsDat
+        mCmConnectionMethod->setStringAttribute(attribute, address);
+        if (tryUpdate()) {
+            success = true;
+            item->setContentWidgetData("text", address);
+        }
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_input"));
+        // Restore previous setting
+        address = getIpAddress(attribute);
+        item->setContentWidgetData("text", address);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_VALIDATEANDSAVEIPADDRESS_EXIT);
+    return success;
+}
+
+/*!
+    Shows message box with "OK" button using given text.
+*/
+void CpWlanApAdvancedView::showMessageBox(
+    HbMessageBox::MessageBoxType type,
+    const QString &text)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_SHOWMESSAGEBOX_ENTRY);
+    
+    // Create a message box
+    mMessageBox = QSharedPointer<HbMessageBox>(new HbMessageBox(type));
+    mMessageBox->setText(text);
+    mMessageBox->setModal(true);
+    mMessageBox->setTimeout(HbPopup::NoTimeout);
+    mMessageBox->setDismissPolicy(HbPopup::NoDismiss);
+    mMessageBox->open();
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_SHOWMESSAGEBOX_EXIT);
+}
+
+/*!
+    Tries to update connection method changes to CommsDat.
+    Returns "true" if success, "false" if some error happened. 
+*/
+bool CpWlanApAdvancedView::tryUpdate()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_TRYUPDATE_ENTRY);
+    
+    // Try update
+    bool success = true;
+    try {
+        mCmConnectionMethod->update();
+    }
+    catch (const std::exception&) {
+        // Handle error
+        handleUpdateError();
+        
+        success = false;
+    }
+
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_TRYUPDATE_EXIT);
+    return success;
+}
+
+/*!
+    Handles failed CommsDat update.
+ */
+void CpWlanApAdvancedView::handleUpdateError()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_HANDLEUPDATEERROR_ENTRY);
+    
+    // Show error note to user
+    showMessageBox(
+        HbMessageBox::MessageTypeWarning,
+        hbTrId("txt_occ_info_unable_to_save_setting"));
+    // Reload settings from CommsDat and update UI
+    try {
+        mCmConnectionMethod->refresh();
+    }
+    catch (const std::exception&) {
+        // Ignore error from refresh. Most likely this will not happen, but
+        // if it does, there isn't very much we can do.
+        OstTrace0(
+            TRACE_ERROR,
+            CPWLANAPPADVANCEDVIEW_HANDLEUPDATEERROR,
+            "Refresh failed");
+    };
+    updateIpv4Group();
+    if (mIpv6Supported) {
+        updateIpv6Group();
+    }
+    updateProxyGroup();
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_HANDLEUPDATEERROR_EXIT);
+}
+
+/*!
+    Initializes all settings groups.
+*/
+void CpWlanApAdvancedView::setEditorPreferences(const QModelIndex index)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_SETEDITORPREFERENCES_ENTRY);
+    
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(index));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(index);
+
+    if (modelItem == mIpv4Address
+        || modelItem == mIpv4SubnetMask
+        || modelItem == mIpv4Gateway
+        || modelItem == mIpv4DnsAddress1
+        || modelItem == mIpv4DnsAddress2
+        || modelItem == mIpv6DnsAddress1
+        || modelItem == mIpv6DnsAddress2
+        || modelItem == mProxyServer
+        || modelItem == mProxyPort) {
+        // HbLineEdit items, get editor and editor interface
+        HbLineEdit *edit = qobject_cast<HbLineEdit *>
+            (viewItem->dataItemContentWidget());
+        HbEditorInterface editorInterface(edit);
+
+        if (modelItem == mIpv4Address
+            || modelItem == mIpv4SubnetMask
+            || modelItem == mIpv4Gateway
+            || modelItem == mIpv4DnsAddress1
+            || modelItem == mIpv4DnsAddress2) {
+            // IPv4 IP address
+            editorInterface.setMode(HbInputModeNumeric);
+            editorInterface.setFilter(CpIpv4Filter::instance());
+            edit->setMaxLength(CMManagerShim::CmIP4AddressLength);
+        } else if (modelItem == mIpv6DnsAddress1
+            || modelItem == mIpv6DnsAddress2) {
+            // IPv6 IP address
+            editorInterface.setInputConstraints(
+                HbEditorConstraintLatinAlphabetOnly);
+            editorInterface.setFilter(CpIpv6Filter::instance());
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::CmIP6NameServerLength);
+        } else if (modelItem == mProxyServer) {                
+            // Proxy server address
+            editorInterface.setMode(HbInputModeNone);
+            editorInterface.setInputConstraints(
+                HbEditorConstraintLatinAlphabetOnly);
+            editorInterface.setFilter(HbUrlFilter::instance());
+            editorInterface.setEditorClass(HbInputEditorClassUrl);
+            editorInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText
+                | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::CmProxyServerNameLength);
+        } else { /* mProxyPort */                
+            // Proxy port number
+            editorInterface.setMode(HbInputModeNumeric);
+            edit->setInputMethodHints(Qt::ImhDigitsOnly);
+            edit->setMaxLength(CMManagerShim::CmProxyPortNumberLength);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_SETEDITORPREFERENCES_EXIT);
+}
+
+/*!
+    Handles change to IPv4 address mode (automatic/user defined).
+*/
+void CpWlanApAdvancedView::changeIpv4AddressMode(int state)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4ADDRESSMODE_ENTRY);
+    
+    bool ipv4AddressFromServer;
+    if (state == Qt::Checked) {
+        ipv4AddressFromServer = true;
+    } else {
+        ipv4AddressFromServer = false;
+    }
+    
+    if (!ipv4AddressFromServer
+        && getIpAddress(CMManagerShim::CmIPAddress) ==
+            CMManagerShim::UnspecifiedIpv4Address) {
+        // User defined IP address selected, but no valid address is stored.
+        // Just enable the UI IP editors, because CMManager will update the
+        // "IP address from server" flag by itself when a valid IP address
+        // is stored.
+        enableIpv4AddressFields(state);
+    } else {
+        // Save setting to CommsDat
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPAddrFromServer,
+            ipv4AddressFromServer);
+        if (tryUpdate()) {
+            enableIpv4AddressFields(state);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4ADDRESSMODE_EXIT);
+}
+
+/*!
+    Saves IPv4 address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv4Address()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4ADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4Address,
+        CMManagerShim::CmIPAddress,
+        QAbstractSocket::IPv4Protocol)) {
+        // In case the IP address is empty or 0.0.0.0, CMManager changes the
+        // "IP address from server" flag to true. We need to refresh the UI to
+        // make sure we are in sync.
+        updateIpv4Group();
+    }
+
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4ADDRESS_EXIT);
+}
+
+/*!
+    Saves IPv4 subnet mask to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv4SubnetMask()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4SUBNETMASK_ENTRY);
+    
+    (void)validateAndSaveIpAddress(
+        mIpv4SubnetMask,
+        CMManagerShim::CmIPNetmask,
+        QAbstractSocket::IPv4Protocol);
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4SUBNETMASK_EXIT);
+}
+
+/*!
+    Saves IPv4 gateway to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv4Gateway()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4GATEWAY_ENTRY);
+    
+    (void)validateAndSaveIpAddress(
+        mIpv4Gateway,
+        CMManagerShim::CmIPGateway,
+        QAbstractSocket::IPv4Protocol);
+
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4GATEWAY_EXIT);
+}
+
+/*!
+    Handles change to IPv4 DNS mode (automatic/user defined).
+*/
+void CpWlanApAdvancedView::changeIpv4DnsMode(int state)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4DNSMODE_ENTRY);
+    
+    bool dnsAddressFromServer;
+    if (state == Qt::Checked) {
+        dnsAddressFromServer = true;
+    } else {
+        dnsAddressFromServer = false;
+    }
+    // Save setting to CommsDat
+    mCmConnectionMethod->setBoolAttribute(
+        CMManagerShim::CmIPDNSAddrFromServer,
+        dnsAddressFromServer);
+    if (tryUpdate()) {
+        enableIpv4DnsFields(state);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4DNSMODE_EXIT);
+}
+
+/*!
+    Saves IPv4 primary DNS address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv4PrimaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4PRIMARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4DnsAddress1,
+        CMManagerShim::CmIPNameServer1,
+        QAbstractSocket::IPv4Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPDNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0.0.0.0, CMManager will
+            // check secondary DNS address and in case it is a valid address,
+            // move it to the primary DNS address. We need to refresh the
+            // UI to make sure we are in sync. If tryUpdate() fails it does
+            // the refresh automatically, so only success case is handled
+            // here.
+            updateIpv4Group();            
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4PRIMARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves IPv4 secondary DNS address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv4SecondaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV4SECONDARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv4DnsAddress2,
+        CMManagerShim::CmIPNameServer2,
+        QAbstractSocket::IPv4Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIPDNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0.0.0.0, CMManager will
+            // write the address there instead of secondary DNS address, so we
+            // need to refresh the UI to make sure we are in sync. If
+            // tryUpdate() fails it does the refresh automatically, so only
+            // success case is handled here.
+            updateIpv4Group();
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV4SECONDARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Handles change to IPv6 DNS mode (automatic/well-known/user defined).
+*/
+void CpWlanApAdvancedView::changeIpv6DnsMode(int state)
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV6DNSMODE_ENTRY);
+    
+    // Update "DNS address from server" flag
+    if (state == Ipv6DnsTypeAutomatic) {
+        // Automatic
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            true);
+    } else {
+        // User defined or well-known address
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        
+        if (state == Ipv6DnsTypeWellKnown) {
+            // Well-known address, set DNS addresses and update UI
+            mCmConnectionMethod->setStringAttribute(
+                CMManagerShim::CmIP6NameServer1,
+                CMManagerShim::KnownIpv6NameServer1);
+            mIpv6DnsAddress1->setContentWidgetData(
+                "text",
+                CMManagerShim::KnownIpv6NameServer1);
+            mCmConnectionMethod->setStringAttribute(
+                CMManagerShim::CmIP6NameServer2,
+                CMManagerShim::KnownIpv6NameServer2);
+            mIpv6DnsAddress2->setContentWidgetData(
+                "text",
+                CMManagerShim::KnownIpv6NameServer2);        
+        }
+    }
+
+    if (tryUpdate()) {
+        enableIpv6DnsFields(state);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV6DNSMODE_EXIT);
+}
+
+/*!
+    Saves IPv6 primary DNS address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv6PrimaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV6PRIMARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv6DnsAddress1,
+        CMManagerShim::CmIP6NameServer1,
+        QAbstractSocket::IPv6Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0:0:0:0:0:0:0:0,
+            // CMManager will check secondary DNS address and in case it is a
+            // valid address, move it to the primary DNS address. We need to
+            // refresh the UI to make sure we are in sync. If tryUpdate()
+            // fails it does the refresh automatically, so only success case
+            // is handled here.
+            updateIpv6Group();            
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV6PRIMARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves IPv6 secondary DNS address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeIpv6SecondaryDnsAddress()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEIPV6SECONDARYDNSADDRESS_ENTRY);
+    
+    if (validateAndSaveIpAddress(
+        mIpv6DnsAddress2,
+        CMManagerShim::CmIP6NameServer2,
+        QAbstractSocket::IPv6Protocol)) {
+        // Address saved successfully, update "DNS address from server" flag
+        mCmConnectionMethod->setBoolAttribute(
+            CMManagerShim::CmIP6DNSAddrFromServer,
+            false);
+        if (tryUpdate()) {
+            // In case primary DNS address is empty or 0:0:0:0:0:0:0:0,
+            // CMManager will write the address there instead of secondary DNS
+            // address, so we need to refresh the UI to make sure we are in
+            // sync. If tryUpdate() fails it does the refresh automatically,
+            // so only success case is handled here.
+            updateIpv6Group();
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEIPV6SECONDARYDNSADDRESS_EXIT);
+}
+
+/*!
+    Saves proxy server address to CommsDat.
+*/
+void CpWlanApAdvancedView::changeProxyServer()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEPROXYSERVER_ENTRY);
+    
+    QString proxyServer = mProxyServer->contentWidgetData("text").toString();
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::CmProxyServerName,
+        proxyServer);
+    if (tryUpdate()) {
+        // If proxy server name is empty, CMManager will also clear the
+        // proxy port. Therefore UI needs to be updated.
+        updateProxyGroup();
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEPROXYSERVER_EXIT);
+}
+
+/*!
+    Saves proxy port to CommsDat.
+*/
+void CpWlanApAdvancedView::changeProxyPort()
+{
+    OstTraceFunctionEntry0(CPWLANAPADVANCEDVIEW_CHANGEPROXYPORT_ENTRY);
+    
+    uint proxyPort = mProxyPort->contentWidgetData("text").toInt();
+    if (proxyPort <= 65535) {
+        if (proxyPort == 0) {
+            // Don't show zero
+            mProxyPort->setContentWidgetData("text", "");
+        }
+        mCmConnectionMethod->setIntAttribute(
+            CMManagerShim::CmProxyPortNumber,
+            proxyPort);
+        (void)tryUpdate();
+    } else {
+        // Inform user of invalid value
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_input"));
+        // Restore previous setting
+        proxyPort = mCmConnectionMethod->getIntAttribute(
+            CMManagerShim::CmProxyPortNumber);
+        if (proxyPort > 0) {
+            mProxyPort->setContentWidgetData("text", QVariant(proxyPort));
+        } else {
+            mProxyPort->setContentWidgetData("text", "");
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPADVANCEDVIEW_CHANGEPROXYPORT_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/src/cpwlanapplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin implementation.
+*
+*/
+
+// System includes
+#include <HbTranslator>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+// User includes
+#include "cpwlanapplugin.h"
+#include "cpwlanapview.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpwlanappluginTraces.h"
+#endif
+
+/*!
+    \class CpWlanApPlugin
+    \brief Implements the WLAN bearer AP (access point) Control Panel plugin.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpWlanApPlugin::CpWlanApPlugin() :
+    mTranslator(new HbTranslator("cpapplugin")),
+    mCmManager(0),
+    mCmConnectionMethod(0)
+{
+    OstTraceFunctionEntry0(CPWLANAPPLUGIN_CPWLANAPPLUGIN_ENTRY);
+
+    OstTraceFunctionExit0(CPWLANAPPLUGIN_CPWLANAPPLUGIN_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpWlanApPlugin::~CpWlanApPlugin()
+{
+    OstTraceFunctionEntry0(DUP1_CPWLANAPPLUGIN_CPWLANAPPLUGIN_ENTRY);
+    
+    delete mCmConnectionMethod;
+    delete mCmManager;
+
+    OstTraceFunctionExit0(DUP1_CPWLANAPPLUGIN_CPWLANAPPLUGIN_EXIT);
+}
+
+/*!
+    Returns the bearer type handled by the plugin.
+*/
+uint CpWlanApPlugin::bearerType() const
+{
+    OstTraceFunctionEntry0(CPWLANAPPLUGIN_BEARERTYPE_ENTRY);
+    
+    OstTraceFunctionExit0(CPWLANAPPLUGIN_BEARERTYPE_EXIT);
+    return CMManagerShim::BearerTypeWlan;
+}
+
+/*!
+    Creates the WLAN AP settings view.
+*/
+CpBaseSettingView *CpWlanApPlugin::createSettingView(uint connectionMethod)
+{
+    OstTraceFunctionEntry0(CPWLANAPPLUGIN_CREATESETTINGVIEW_ENTRY);
+
+    // Find the connection method
+    try {
+        mCmManager = new CmManagerShim();
+        mCmConnectionMethod = mCmManager->connectionMethod(connectionMethod);
+    }
+    catch (const std::exception&) {
+        // Error, don't create settings view, just return
+        OstTrace1(
+            TRACE_ERROR,
+            CPWLANAPPLUGIN_CREATESETTINGVIEW,
+            "Connection method loading failed;connectionMethod=%u",
+            connectionMethod);
+
+        OstTraceFunctionExit0(DUP1_CPWLANAPPLUGIN_CREATESETTINGVIEW_EXIT);
+        return NULL;
+    }
+    
+    // Connection method found, create settings view
+    OstTraceFunctionExit0(CPWLANAPPLUGIN_CREATESETTINGVIEW_EXIT);
+    return new CpWlanApView(mCmConnectionMethod);
+}
+
+Q_EXPORT_PLUGIN2(cpwlanapplugin, CpWlanApPlugin);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/src/cpwlanapview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,856 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Control Panel WLAN AP settings view implementation.
+*
+*/
+
+// System includes
+#include <QString>
+#include <QVariant>
+#include <QDir>
+#include <QPluginLoader>
+#include <HbMainWindow>
+#include <HbMenu>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormViewItem>
+#include <HbLineEdit>
+#include <HbEditorInterface>
+#include <HbUrlFilter>
+#include <HbPopup>
+#include <HbMessageBox>
+#include <HbAction>
+#include <HbStringUtil>
+#include <wlanmgmtcommon.h>
+#include <cpitemdatahelper.h>
+#include <cpsettingformitemdata.h>
+#include <cppluginutility.h>
+#include <cmconnectionmethod_shim.h>
+#include <cpwlansecurityplugininterface.h>
+
+// User includes
+#include "cpwlanapplugin.h"
+#include "cpwlanapview.h"
+#include "cpwlanapadvancedview.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpwlanapviewTraces.h"
+#endif
+
+/*!
+    \class CpWlanApView
+    \brief This class implements the WLAN AP Control Panel settings view.
+*/
+
+// External function prototypes
+
+// Local constants
+
+static const QString wlanSecurityPluginsDir =
+    "\\resource\\qt\\plugins\\controlpanel\\wlansecurity";
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+CpWlanApView::CpWlanApView(
+    CmConnectionMethodShim *cmConnectionMethod,
+    QGraphicsItem *parent) :
+        CpBaseSettingView(0, parent),
+        mForm(0),
+        mModel(0),
+        mItemDataHelper(0),
+        mApSettingsGroupItem(0),
+        mConnectionNameItem(0),
+        mWlanNetworkNameItem(0),
+        mNetworkStatusItem(0),
+        mNetworkModeItem(0),
+        mAdHocChannelItem(0),
+        mSecurityModeItem(0),
+        mHomepageItem(0),
+        mSecuritySettingsGroupItem(0),
+        mAdvancedSettingsAction(0),
+        mCmConnectionMethod(cmConnectionMethod),
+        mMessageBox(0)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_CPWLANAPVIEW_ENTRY);
+    
+    // Add "Advanced settings" menu item
+    HbMenu *menu = this->menu();
+    mAdvancedSettingsAction = menu->addAction(
+        hbTrId("txt_occ_opt_advanced_settings"));
+    bool status = connect(
+        menu,
+        SIGNAL(triggered(HbAction*)),
+        this,
+        SLOT(menuActionTriggered(HbAction*)));
+    Q_ASSERT(status);
+
+    // Construct WLAN AP settings UI
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    CpPluginUtility::addCpItemPrototype(mForm);
+    mModel = new HbDataFormModel(mForm);
+    
+    // The parameter given as 0 is a HbDataForm pointer, not parent
+    mItemDataHelper = new CpItemDataHelper(0);
+    mItemDataHelper->setParent(this);
+
+    // Add access point settings group
+    createAccessPointSettingsGroup();
+        
+    mItemDataHelper->bindToForm(mForm);
+    mForm->setModel(mModel);
+
+    status = connect(
+        mForm,
+        SIGNAL(itemShown(const QModelIndex)),
+        this,
+        SLOT(setEditorPreferences(const QModelIndex)));
+    Q_ASSERT(status);
+
+    // Expand access point settings group
+    mForm->setExpanded(mModel->indexFromItem(mApSettingsGroupItem), TRUE);
+        
+    // Add security settings group if necessary
+    updateSecurityGroup(
+        mSecurityModeItem->contentWidgetData("currentIndex").toInt());
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_CPWLANAPVIEW_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+CpWlanApView::~CpWlanApView()
+{
+    OstTraceFunctionEntry0(DUP1_CPWLANAPVIEW_CPWLANAPVIEW_ENTRY);
+    
+    OstTraceFunctionExit0(DUP1_CPWLANAPVIEW_CPWLANAPVIEW_EXIT);
+}
+
+/*!
+    Creates the WLAN "Access point settings" group.
+*/
+void CpWlanApView::createAccessPointSettingsGroup()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_CREATEACCESSPOINTSETTINGSGROUP_ENTRY);
+    
+    // Access point settings group
+    mApSettingsGroupItem = new HbDataFormModelItem(
+        HbDataFormModelItem::GroupItem, 
+        hbTrId("txt_occ_subhead_access_point_settings"));
+    mModel->appendDataFormItem(mApSettingsGroupItem);
+    
+    // Connection name
+    mConnectionNameItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_connection_name"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mConnectionNameItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(connectionNameChanged()));
+    mConnectionNameItem->setContentWidgetData("objectName", "connectionNameEdit");
+    mApSettingsGroupItem->appendChild(mConnectionNameItem); 
+    
+    // WLAN network name
+    mWlanNetworkNameItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_wlan_network_name"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mWlanNetworkNameItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(wlanNetworkNameChanged()));
+    mWlanNetworkNameItem->setContentWidgetData("objectName", "wlanNetworkNameEdit");
+    mApSettingsGroupItem->appendChild(mWlanNetworkNameItem);
+    
+    // Network status
+    mNetworkStatusItem = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_network_status"));
+    // Add items to combobox
+    QStringList networkStatusItems;
+    networkStatusItems
+        << hbTrId("txt_occ_setlabel_network_status_val_public")
+        << hbTrId("txt_occ_setlabel_network_status_val_hidden");
+    mNetworkStatusItem->setContentWidgetData("items", networkStatusItems);
+    // Construct map to link item indexes to setting values
+    mNetworkStatusMap.insert(0, false); // public
+    mNetworkStatusMap.insert(1, true); // hidden
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mNetworkStatusItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(networkStatusChanged(int)));
+    mNetworkStatusItem->setContentWidgetData("objectName", "networkStatusCB");
+    mApSettingsGroupItem->appendChild(mNetworkStatusItem);
+    
+    // Network mode
+    mNetworkModeItem = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_wlan_network_mode"));
+    // Add items to combobox
+    QStringList networkModeItems;
+    networkModeItems
+        << hbTrId("txt_occ_setlabel_wlan_network_mode_val_infrastruct")
+        << hbTrId("txt_occ_setlabel_wlan_network_mode_val_adhoc");
+    mNetworkModeItem->setContentWidgetData("items", networkModeItems);
+    // Construct map to link item indexes to setting values
+    mNetworkModeMap.insert(0, CMManagerShim::Infra); // infrastructure
+    mNetworkModeMap.insert(1, CMManagerShim::Adhoc); // adhoc
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mNetworkModeItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(networkModeChanged(int)));
+    mNetworkModeItem->setContentWidgetData("objectName", "networkModeCB");
+    mApSettingsGroupItem->appendChild(mNetworkModeItem);
+    
+    // Ad-hoc channel
+    // Added dynamically according to set network mode
+    
+    // Security mode
+    mSecurityModeItem = new CpSettingFormItemData(
+        HbDataFormModelItem::ComboBoxItem,
+        hbTrId("txt_occ_setlabel_wlan_security_mode"));
+    // Security modes added dynamically according to set network mode
+
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mSecurityModeItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(securityModeChanged(int)));
+    mSecurityModeItem->setContentWidgetData("objectName", "securityModeCB");
+    mApSettingsGroupItem->appendChild(mSecurityModeItem);
+    
+    // Homepage
+    mHomepageItem = new CpSettingFormItemData(
+        HbDataFormModelItem::TextItem,
+        hbTrId("txt_occ_setlabel_homepage"));
+    // Connect signal and add item to group
+    mForm->addConnection(
+        mHomepageItem,
+        SIGNAL(editingFinished()),
+        this,
+        SLOT(homepageChanged()));
+    mHomepageItem->setContentWidgetData("objectName", "homepageEdit");
+    mApSettingsGroupItem->appendChild(mHomepageItem);
+    
+    // Read settings from CommsDat and update widgets
+    updateAccessPointSettingsGroup();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_CREATEACCESSPOINTSETTINGSGROUP_EXIT);
+}
+
+/*!
+    Reads attribute values and updates "Access point settings" group settings.
+*/
+void CpWlanApView::updateAccessPointSettingsGroup()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_UPDATEACCESSPOINTSETTINGSGROUP_ENTRY);
+    
+    // Get attributes from CommsDat and set values to UI widgets
+    
+    // Connection name
+    QString connectionName = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmName);
+    mConnectionNameItem->setContentWidgetData("text", connectionName);
+    
+    // WLAN network name
+    QString networkName = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::WlanSSID);
+    mWlanNetworkNameItem->setContentWidgetData("text", networkName);
+    
+    // Network status
+    bool scanSsid = mCmConnectionMethod->getBoolAttribute(
+        CMManagerShim::WlanScanSSID);
+    mNetworkStatusItem->setContentWidgetData(
+        "currentIndex",
+        mNetworkStatusMap.key(scanSsid));
+    
+    // Network mode
+    CMManagerShim::WlanConnMode networkMode =
+		static_cast<CMManagerShim::WlanConnMode>
+      	(mCmConnectionMethod->getIntAttribute(
+            CMManagerShim::WlanConnectionMode));
+    mNetworkModeItem->setContentWidgetData(
+        "currentIndex",
+        mNetworkModeMap.key(networkMode));
+    
+    // Ad-hoc channel
+    updateAdHocChannelItem(networkMode);
+    
+    // Security mode
+    updateSecurityModeItem(networkMode);
+    
+    // Homepage
+    QString homepage = mCmConnectionMethod->getStringAttribute(
+        CMManagerShim::CmStartPage);
+    mHomepageItem->setContentWidgetData("text", homepage);
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_UPDATEACCESSPOINTSETTINGSGROUP_EXIT);
+}
+
+/*!
+    Loads all WLAN security plugins.
+*/
+void CpWlanApView::loadSecurityPlugins(
+    CMManagerShim::WlanConnMode networkMode)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_LOADSECURITYPLUGINS_ENTRY);
+    
+    // Load security plugins
+    QList<CpWlanSecurityPluginInterface *> plugins;
+    QDir pluginsDir(wlanSecurityPluginsDir);
+    foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
+        QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
+        CpWlanSecurityPluginInterface *plugin = 
+            qobject_cast<CpWlanSecurityPluginInterface *>(loader.instance());
+        if (plugin) {
+            // Sort items based on the orderNumber()
+            QList<CpWlanSecurityPluginInterface *>::iterator i;
+            for (i = plugins.begin(); i != plugins.end(); ++i) {
+                if ((*i)->orderNumber() > plugin->orderNumber()) {
+                    plugins.insert(i, plugin);
+                    plugin = NULL;
+                    break;
+                }
+            }
+            if (plugin) {
+                plugins.append(plugin);
+            }
+        }
+    }
+    
+    // Add security plugins to map. If network mode is ad-hoc, only WEP
+    // is allowed.
+    int i;
+    i = mSecurityModeMap.size();
+    foreach (CpWlanSecurityPluginInterface *plugin, plugins) {
+        if (networkMode != CMManagerShim::Adhoc
+            || plugin->securityMode() == CMManagerShim::WlanSecModeWep) {
+            mSecurityModeMap.insert(i, plugin);
+            i++;
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_LOADSECURITYPLUGINS_EXIT);
+}
+
+/*!
+    Updates the "Security settings" group.
+*/
+void CpWlanApView::updateSecurityGroup(int index)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_UPDATESECURITYGROUP_ENTRY);
+    
+    // Remove old security settings group
+    if (mSecuritySettingsGroupItem) {
+        mModel->removeItem(mSecuritySettingsGroupItem);
+        mSecuritySettingsGroupItem = NULL;
+    }
+
+    // Add new security settings group
+    if (index > 0) {
+        // Get correct security plugin
+        CpWlanSecurityPluginInterface *plugin = mSecurityModeMap.value(index);
+        if (plugin) {
+            // Ask plugin to create the security group
+            plugin->setReference(
+                mCmConnectionMethod,
+                mCmConnectionMethod->getIntAttribute(CMManagerShim::CmId));
+            mSecuritySettingsGroupItem = plugin->uiInstance(*mItemDataHelper);
+            if (mSecuritySettingsGroupItem) {
+                // And add it to dataform
+                mModel->appendDataFormItem(mSecuritySettingsGroupItem);
+            }
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_UPDATESECURITYGROUP_EXIT);
+}
+
+/*!
+    Shows message box with "OK" button using given text.
+*/
+void CpWlanApView::showMessageBox(
+    HbMessageBox::MessageBoxType type,
+    const QString &text)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_SHOWMESSAGEBOX_ENTRY);
+    
+    // Create a message box
+    mMessageBox = QSharedPointer<HbMessageBox>(new HbMessageBox(type));
+    mMessageBox->setText(text);
+    mMessageBox->setModal(true);
+    mMessageBox->setTimeout(HbPopup::NoTimeout);
+    mMessageBox->open();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_SHOWMESSAGEBOX_EXIT);
+}
+
+/*!
+    Tries to update connection method changes to CommsDat.
+    Returns "true" if success, "false" if some error happened. 
+*/
+bool CpWlanApView::tryUpdate()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_TRYUPDATE_ENTRY);
+    
+    // Try update
+    try {
+        mCmConnectionMethod->update();
+    }
+    catch (const std::exception&) {
+        // Handle error
+        handleUpdateError();
+        
+        OstTraceFunctionExit0(CPWLANAPVIEW_TRYUPDATE_EXIT);
+        return false;
+    }
+
+    OstTraceFunctionExit0(DUP1_CPWLANAPVIEW_TRYUPDATE_EXIT);
+    return true;
+}
+
+/*!
+    Handles failed CommsDat update.
+ */
+void CpWlanApView::handleUpdateError()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_HANDLEUPDATEERROR_ENTRY);
+    
+    // Show error note to user
+    showMessageBox(
+        HbMessageBox::MessageTypeWarning,
+        hbTrId("txt_occ_info_unable_to_save_setting"));
+    // Reload settings from CommsDat and update UI
+    try {
+        mCmConnectionMethod->refresh();
+    }
+    catch (const std::exception&) {
+        // Ignore error from refresh. Most likely this will not happen, but
+        // if it does, there isn't very much we can do.
+        OstTrace0(
+            TRACE_ERROR,
+            CPWLANAPPLUGIN_HANDLEUPDATEERROR,
+            "Refresh failed");
+    };
+    updateAccessPointSettingsGroup();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_HANDLEUPDATEERROR_EXIT);
+}
+
+/*!
+    Updates Ad-hoc channel item. Setting item is shown if network mode is
+    ad-hoc, otherwise it is not shown.
+ */
+void CpWlanApView::updateAdHocChannelItem(
+    CMManagerShim::WlanConnMode networkMode)
+{
+    if (networkMode == CMManagerShim::Infra) {
+        // Infrastructure
+        if (mAdHocChannelItem) {
+            mApSettingsGroupItem->removeChild(
+                mApSettingsGroupItem->indexOf(mAdHocChannelItem));
+            mAdHocChannelItem = NULL;
+        }
+    } else {
+        // Ad-hoc
+        if (!mAdHocChannelItem) {
+            // Ad-hoc channel item not shown, add it
+            mAdHocChannelItem = new CpSettingFormItemData(
+                HbDataFormModelItem::ComboBoxItem,
+                hbTrId("txt_occ_setlabel_adhoc_channel"));
+            // Add items to combobox
+            QStringList adHocChannelItems;
+            adHocChannelItems
+                << hbTrId("txt_occ_setlabel_adhoc_channel_val_automatic");
+            for (int i = WlanAdHocChannelMinValue;
+                i <= WlanAdHocChannelMaxValue;
+                i++) {
+                QString channel;
+                channel.setNum(i);
+                adHocChannelItems << HbStringUtil::convertDigits(channel);
+            }
+            mAdHocChannelItem->setContentWidgetData(
+                "items",
+                adHocChannelItems);
+            // Connect signal and add item to group
+            mForm->addConnection(
+                mAdHocChannelItem,
+                SIGNAL(currentIndexChanged(int)),
+                this,
+                SLOT(adHocChannelChanged(int)));
+            // Add item after the network mode item
+            mApSettingsGroupItem->insertChild(
+                mApSettingsGroupItem->indexOf(mNetworkModeItem) + 1,
+                mAdHocChannelItem);
+        }
+        // Update ad-hoc item
+        int adHocChannelId = mCmConnectionMethod->getIntAttribute(
+            CMManagerShim::WlanChannelID);
+        mAdHocChannelItem->setContentWidgetData(
+            "currentIndex",
+            adHocChannelId);
+    }
+}
+
+/*!
+    Updates security mode item.
+ */
+void CpWlanApView::updateSecurityModeItem(
+    CMManagerShim::WlanConnMode networkMode)
+{
+    // Load WLAN security plugins and construct map
+    mSecurityModeMap.clear();
+    mSecurityModeMap.insert(0, NULL); // open mode
+    loadSecurityPlugins(networkMode);
+    
+    // Add items to combobox
+    QStringList securityModeItems;
+    foreach (CpWlanSecurityPluginInterface *plugin, mSecurityModeMap) {
+        if (plugin) {
+            // Add security mode from plugin
+            securityModeItems
+                << hbTrId(plugin->securityModeTextId().toLatin1());
+        } else {
+            // Add open mode
+            securityModeItems
+                << hbTrId("txt_occ_setlabel_wlan_security_mode_val_open");
+        }
+    }
+    // Remove connection before setting new content, because combobox
+    // will emit currentIndexChanged signal and we don't want that.
+    mForm->removeConnection(
+        mSecurityModeItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(securityModeChanged(int)));
+    mSecurityModeItem->setContentWidgetData("items", securityModeItems);
+    mForm->addConnection(
+        mSecurityModeItem,
+        SIGNAL(currentIndexChanged(int)),
+        this,
+        SLOT(securityModeChanged(int)));
+    
+    uint securityMode = mCmConnectionMethod->getIntAttribute(
+        CMManagerShim::WlanSecurityMode);
+    // Iterate through the map to find correct security plugin and set
+    // mode index
+    int securityModeIndex = 0;
+    QMapIterator<int, CpWlanSecurityPluginInterface *> i(mSecurityModeMap);
+    while (i.hasNext()) {
+        i.next();
+        if (i.value()
+            && i.value()->securityMode() == securityMode) {
+            securityModeIndex = i.key();
+        }
+    }
+    mSecurityModeItem->setContentWidgetData("currentIndex",
+        securityModeIndex);
+    
+    if (securityMode != CMManagerShim::WlanSecModeOpen
+        && securityModeIndex == 0) {
+        // Security plugin implementing the selected security mode not found,
+        // set security mode to open also in CommsDat  
+        mCmConnectionMethod->setIntAttribute(
+            CMManagerShim::WlanSecurityMode,
+            CMManagerShim::WlanSecModeOpen);
+        // Try update
+        try {
+            mCmConnectionMethod->update();
+        }
+        catch (const std::exception&) {
+            // Error in update, but can't show error notes at this point
+        }
+    }
+}
+
+/*!
+    Stores connection name.
+*/
+void CpWlanApView::connectionNameChanged()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_CONNECTIONNAMECHANGED_ENTRY);
+    
+    QString connectionName =
+        mConnectionNameItem->contentWidgetData("text").toString();
+    if (!connectionName.isEmpty()) {
+        // Update to CommsDat
+        mCmConnectionMethod->setStringAttribute(
+            CMManagerShim::CmName,
+            connectionName);
+        if (tryUpdate()) {
+            // Update successful
+            // Read name because in case the name already exists it will
+            // be made unique by CMManager
+            connectionName = mCmConnectionMethod->getStringAttribute(
+                CMManagerShim::CmName);
+            mConnectionNameItem->setContentWidgetData("text", connectionName);
+        }
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_name"));
+
+        // Empty name not allowed, revert back to old value
+        connectionName = mCmConnectionMethod->getStringAttribute(
+            CMManagerShim::CmName);
+        mConnectionNameItem->setContentWidgetData("text", connectionName);
+    }
+
+    OstTraceFunctionExit0(CPWLANAPVIEW_CONNECTIONNAMECHANGED_EXIT);
+}
+
+/*!
+    Stores WLAN network name.
+*/
+void CpWlanApView::wlanNetworkNameChanged()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_WLANNETWORKNAMECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QString wlanNetworkName =
+        mWlanNetworkNameItem->contentWidgetData("text").toString();
+    if (!wlanNetworkName.isEmpty()) {
+        mCmConnectionMethod->setStringAttribute(
+            CMManagerShim::WlanSSID,
+            wlanNetworkName);
+        (void)tryUpdate();
+    } else {
+        // Inform user of invalid name
+        showMessageBox(
+            HbMessageBox::MessageTypeInformation,
+            hbTrId("txt_occ_info_invalid_name"));
+
+        // Empty name not allowed, revert back to old value
+        wlanNetworkName = mCmConnectionMethod->getStringAttribute(
+            CMManagerShim::WlanSSID);
+        mWlanNetworkNameItem->setContentWidgetData("text", wlanNetworkName);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_WLANNETWORKNAMECHANGED_EXIT);
+}
+
+/*!
+    Stores WLAN network status.
+*/
+void CpWlanApView::networkStatusChanged(int index)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_NETWORKSTATUSCHANGED_ENTRY);
+    
+    // Update to CommsDat
+    mCmConnectionMethod->setBoolAttribute(
+        CMManagerShim::WlanScanSSID,
+        mNetworkStatusMap.value(index));
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_NETWORKSTATUSCHANGED_EXIT);
+}
+
+/*!
+    Stores WLAN network mode.
+*/
+void CpWlanApView::networkModeChanged(int index)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_NETWORKMODECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    mCmConnectionMethod->setIntAttribute(
+        CMManagerShim::WlanConnectionMode,
+        mNetworkModeMap.value(index));
+    if (tryUpdate()) {
+        // If mode is ad-hoc, ad-hoc channel item must be shown
+        CMManagerShim::WlanConnMode networkMode =
+            static_cast<CMManagerShim::WlanConnMode>
+                (mNetworkModeMap.value(index));
+        updateAdHocChannelItem(networkMode);
+		// Also security mode list may need updating
+        updateSecurityModeItem(networkMode);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_NETWORKMODECHANGED_EXIT);
+}
+
+/*!
+    Stores ad-hoc channel ID.
+*/
+void CpWlanApView::adHocChannelChanged(int index)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_ADHOCCHANNELCHANGED_ENTRY);
+    
+    // Update to CommsDat
+    mCmConnectionMethod->setIntAttribute(
+        CMManagerShim::WlanChannelID,
+        index);
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_ADHOCCHANNELCHANGED_EXIT);
+}
+
+/*!
+    Stores WLAN security mode.
+*/
+void CpWlanApView::securityModeChanged(int index)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_SECURITYMODECHANGED_ENTRY);
+    
+    // Get security plugin
+    CpWlanSecurityPluginInterface *plugin = mSecurityModeMap.value(index);
+    // Update to CommsDat
+    if (plugin) {
+        mCmConnectionMethod->setIntAttribute(
+            CMManagerShim::WlanSecurityMode,
+            plugin->securityMode());
+    } else {
+        mCmConnectionMethod->setIntAttribute(
+            CMManagerShim::WlanSecurityMode,
+            CMManagerShim::WlanSecModeOpen);
+    }
+    (void)tryUpdate();
+    
+    // Update UI
+    updateSecurityGroup(
+        mSecurityModeItem->contentWidgetData("currentIndex").toInt());
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_SECURITYMODECHANGED_EXIT);
+}
+
+/*!
+    Stores homepage.
+*/
+void CpWlanApView::homepageChanged()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_HOMEPAGECHANGED_ENTRY);
+    
+    // Update to CommsDat
+    QString homepage = mHomepageItem->contentWidgetData("text").toString();
+    mCmConnectionMethod->setStringAttribute(
+        CMManagerShim::CmStartPage,
+        homepage);
+    (void)tryUpdate();
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_HOMEPAGECHANGED_EXIT);
+}
+
+/*!
+    Handles view menu actions.
+*/
+void CpWlanApView::menuActionTriggered(HbAction *action)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_MENUACTIONTRIGGERED_ENTRY);
+    
+    if (action == mAdvancedSettingsAction) {
+        HbMainWindow *mainWindow = this->mainWindow();
+
+        // Create the advanced settings view
+        HbView *newView = new CpWlanApAdvancedView(mCmConnectionMethod);
+        // Connect signal to return back to the previous view
+        bool status = QObject::connect(
+            newView,
+            SIGNAL(aboutToClose()),
+            this,
+            SLOT(restoreCurrentView()));
+        Q_ASSERT(status);
+        
+        mainWindow->addView(newView);
+        mainWindow->setCurrentView(newView);
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_MENUACTIONTRIGGERED_EXIT);
+}
+
+/*!
+    Removes current view from main window and sets this view as the
+    current view. Used when "back" button is pressed in "Advanced settings"
+    view.
+*/
+void CpWlanApView::restoreCurrentView()
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_RESTORECURRENTVIEW_ENTRY);
+    
+    HbMainWindow *mainWindow = this->mainWindow();
+    
+    // Remove the previous view and delete it
+    HbView *prevView = mainWindow->currentView();
+    mainWindow->removeView(prevView);
+    prevView->deleteLater();
+    
+    // Set this view on top
+    mainWindow->setCurrentView(this);
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_RESTORECURRENTVIEW_EXIT);
+}
+
+/*!
+    Sets editor preferences for all HbLineEdit items.
+*/
+void CpWlanApView::setEditorPreferences(const QModelIndex modelIndex)
+{
+    OstTraceFunctionEntry0(CPWLANAPVIEW_SETEDITORPREFERENCES_ENTRY);
+    
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(modelIndex));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex);
+    
+    if (modelItem == mConnectionNameItem
+        || modelItem == mWlanNetworkNameItem
+        || modelItem == mHomepageItem ) {
+        // HbLineEdit items, get editor and editor interface
+        HbLineEdit *edit = qobject_cast<HbLineEdit *>
+            (viewItem->dataItemContentWidget());
+        HbEditorInterface editInterface(edit);
+        
+        if (modelItem == mConnectionNameItem) {
+            // Setup editor for connection name
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            edit->setInputMethodHints(Qt::ImhNoPredictiveText); 
+            edit->setMaxLength(CMManagerShim::CmNameLength);
+        } else if (modelItem == mWlanNetworkNameItem) {
+            // Setup editor for WLAN SSID
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setEditorClass(HbInputEditorClassNetworkName); 
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::WlanSSIDLength);
+        } else { /* mHomepageItem */
+            // Setup editor for URL
+            editInterface.setMode(HbInputModeNone);
+            editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+            editInterface.setFilter(HbUrlFilter::instance());
+            editInterface.setEditorClass(HbInputEditorClassUrl);
+            editInterface.setDigitType(HbDigitTypeNone);
+            edit->setInputMethodHints(
+                Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+            edit->setMaxLength(CMManagerShim::CmStartPageLength);
+        }
+    }
+    
+    OstTraceFunctionExit0(CPWLANAPVIEW_SETEDITORPREFERENCES_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * OST trace header file.
+ *
+ */
+
+#ifndef OSTTRACEDEFINITIONS_H
+#define OSTTRACEDEFINITIONS_H
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/hbautotest.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,823 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "hbautotest.h"
+#include <hbmainwindow.h>
+#include <hbwidget.h>
+
+
+const qreal STEP = 4; //How many pixels to drag before sending an event
+
+//Init static members
+bool HbAutoTest::pointerPressed = false;
+QPointF HbAutoTest::pressPoint = QPointF();
+
+void HbAutoTest::mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    if (pointerPressed) {
+        //Now we should drag an item
+        drag(window, targetPoint);
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            QCoreApplication::sendEvent(window->viewport(), &me);
+            QTest::qWait(1);
+    } else {
+            HbAutoTestMouseEvent me (
+            QEvent::MouseMove, 
+            targetPoint.toPoint(), 
+            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+            Qt::NoButton, 
+            Qt::NoButton, 
+            Qt::NoModifier);
+            QSpontaneKeyEvent::setSpontaneous(&me);
+            QCoreApplication::sendEvent(window->viewport(), &me);
+            QTest::qWait(1);
+
+    }
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+ 
+void HbAutoTest::mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=true;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    pressPoint=targetPoint;
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    pointerPressed=false;
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    pressPoint=QPointF();
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton, 
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}
+
+void HbAutoTest::mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos, int delay)
+{
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+    QPointF targetPoint=QPointF();
+    if (pos==QPointF()) {
+        targetPoint = middlePointOfWidget(widget);
+    } else {
+        targetPoint = widget->mapToScene(pos);
+    }
+    
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+    
+    HbAutoTestMouseEvent me (
+    QEvent::MouseButtonPress, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::LeftButton, 
+    Qt::NoModifier);
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+
+    if (delay!=-1) {
+        QTest::qWait(delay);
+    }
+
+    HbAutoTestMouseEvent me2 (
+    QEvent::MouseButtonRelease, 
+    targetPoint.toPoint(), 
+    window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+    Qt::LeftButton, 
+    Qt::NoButton,
+    Qt::NoModifier);
+
+    QSpontaneKeyEvent::setSpontaneous(&me2);
+    QCoreApplication::sendEvent(window->viewport(), &me2);
+
+    QTest::qWait(1);
+    QTest::qWait(1);
+}   
+
+QPointF HbAutoTest::middlePointOfWidget( const HbWidget* widget)
+{
+    QRectF widgetRect = widget->rect();
+    QRectF widgetSceneRect = widget->mapRectToScene(widgetRect);
+    qreal middleX = ((widgetSceneRect.right() - widgetSceneRect.left())/2)+widgetSceneRect.left();
+    qreal middleY = ((widgetSceneRect.bottom() - widgetSceneRect.top())/2)+widgetSceneRect.top();  
+    return QPointF(middleX,middleY);
+}
+
+
+
+void HbAutoTest::drag(HbAutoTestMainWindow *window, QPointF targetPoint)
+{
+    qreal tempX = targetPoint.x() - pressPoint.x();
+    qreal tempY = targetPoint.y() - pressPoint.y();
+    qreal totalTrip = sqrt ((tempX * tempX) + (tempY * tempY));
+    
+    int numberOfSteps = qRound(totalTrip / STEP);
+    HbAutoTestMouseEvent me (
+        QEvent::MouseMove, 
+        targetPoint.toPoint(), 
+        window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+        Qt::NoButton , 
+        Qt::LeftButton, 
+        Qt::NoModifier);
+
+    QPointF nextPanPoint=pressPoint;
+    for (int i=1; i<numberOfSteps; i++) { //On purpose not =<
+        
+        nextPanPoint.setY (pressPoint.y()+((i / (qreal)numberOfSteps) * tempY));
+        nextPanPoint.setX (pressPoint.x()+((i / (qreal)numberOfSteps) * tempX));
+        
+        QCursor::setPos(window->mapToGlobal(nextPanPoint.toPoint()));
+
+        me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            nextPanPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(nextPanPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+
+        QSpontaneKeyEvent::setSpontaneous(&me);
+        QCoreApplication::sendEvent(window->viewport(), &me);
+        QTest::qWait(1);
+    }
+
+    QCursor::setPos(window->mapToGlobal(targetPoint.toPoint()));
+
+    //One more (or the only one) step to the target
+    me =  HbAutoTestMouseEvent (QEvent::MouseMove,
+                            targetPoint.toPoint(), 
+                            window->viewport()->mapToGlobal(targetPoint.toPoint()), 
+                            Qt::NoButton, 
+                            Qt::LeftButton, 
+                            Qt::NoModifier);   
+    QSpontaneKeyEvent::setSpontaneous(&me);
+    QCoreApplication::sendEvent(window->viewport(), &me);
+}
+
+
+void HbAutoTest::simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        extern int Q_TESTLIB_EXPORT defaultKeyDelay();
+
+        if (delay == -1 || delay < 10) // defaultKeyDelay())
+            delay = 10; //defaultKeyDelay();
+        if(delay > 0)
+            QTest::qWait(delay);
+//        Q_UNUSED(delay);
+//        QTest::qWait(10); //TODO: Remove this and reveal above out-commented code
+
+        HbAutoTestKeyEvent a(press ? QEvent::KeyPress : QEvent::KeyRelease, code, modifier, text, repeat);
+        QSpontaneKeyEvent::setSpontaneous(&a);
+        if (!QCoreApplication::sendEvent(widget, &a))
+            QTest::qWarn("Keyboard event not accepted by receiving widget");
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay)
+    {
+        QTEST_ASSERT(qApp);
+
+        if (!widget)
+            widget = QWidget::keyboardGrabber();
+        if (!widget) {
+            if (QWidget *apw = QApplication::activePopupWidget())
+                widget = apw->focusWidget() ? apw->focusWidget() : apw;
+            else
+                widget = QApplication::focusWidget();
+        }
+        if (!widget)
+            widget = QApplication::activeWindow();
+
+        QTEST_ASSERT(widget);
+
+        if (action == QTest::Click) {
+            QPointer<QWidget> ptr(widget);
+            sendKeyEvent(QTest::Press, widget, code, text, modifier, delay);
+            if (!ptr) {
+                // if we send key-events to embedded widgets, they might be destroyed
+                // when the user presses Return
+                return;
+            }
+            sendKeyEvent(QTest::Release, widget, code, text, modifier, delay);
+            return;
+        }
+
+        bool repeat = false;
+
+        if (action == QTest::Press) {
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, true, Qt::Key_Shift, 0, QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, true, Qt::Key_Control, modifier & Qt::ShiftModifier, QString(), false, delay);
+
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, true, Qt::Key_Alt,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, true, Qt::Key_Meta, modifier & (Qt::ShiftModifier
+                                                                      | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+            simulateEvent(widget, true, code, modifier, text, repeat, delay);
+        } else if (action == QTest::Release) {
+            simulateEvent(widget, false, code, modifier, text, repeat, delay);
+
+            if (modifier & Qt::MetaModifier)
+                simulateEvent(widget, false, Qt::Key_Meta, modifier, QString(), false, delay);
+            if (modifier & Qt::AltModifier)
+                simulateEvent(widget, false, Qt::Key_Alt, modifier &
+                              (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier), QString(), false, delay);
+
+            if (modifier & Qt::ControlModifier)
+                simulateEvent(widget, false, Qt::Key_Control,
+                              modifier & (Qt::ShiftModifier | Qt::ControlModifier), QString(), false, delay);
+
+            if (modifier & Qt::ShiftModifier)
+                simulateEvent(widget, false, Qt::Key_Shift, modifier & Qt::ShiftModifier, QString(), false, delay);
+        }
+    }
+
+void HbAutoTest::sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        QString text;
+        if (ascii)
+            text = QString(QChar::fromLatin1(ascii));
+        sendKeyEvent(action, widget, code, text, modifier, delay);
+    }
+
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, asciiToKey(ascii), ascii, modifier, delay); 
+     }
+     
+void HbAutoTest::keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        sendKeyEvent(action, widget, key, keyToAscii(key), modifier, delay); 
+     }
+
+void HbAutoTest::keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier, int delay)
+    {
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        for (int i=0; i < sequence.length(); i++)
+            keyEvent(QTest::Click, widget, sequence.at(i).toLatin1(), modifier, delay);
+    }
+
+void HbAutoTest::keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Press, widget, key, modifier, delay); 
+    }
+    
+void HbAutoTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Release, widget, key, modifier, delay); }
+    
+void HbAutoTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
+    { 
+        Q_ASSERT_X(dynamic_cast<HbAutoTestMainWindow *>(( widget) ) != 0, "HbAutoTest", "Always use with HbAutoTestMainWindow");
+        keyEvent(QTest::Click, widget, key, modifier, delay); 
+    }
+
+Qt::Key HbAutoTest::asciiToKey(char ascii)
+{
+    switch ((unsigned char)ascii) {
+    case 0x08: return Qt::Key_Backspace;
+    case 0x09: return Qt::Key_Tab;
+    case 0x0b: return Qt::Key_Backtab;
+    case 0x0d: return Qt::Key_Return;
+    case 0x1b: return Qt::Key_Escape;
+    case 0x20: return Qt::Key_Space;
+    case 0x21: return Qt::Key_Exclam;
+    case 0x22: return Qt::Key_QuoteDbl;
+    case 0x23: return Qt::Key_NumberSign;
+    case 0x24: return Qt::Key_Dollar;
+    case 0x25: return Qt::Key_Percent;
+    case 0x26: return Qt::Key_Ampersand;
+    case 0x27: return Qt::Key_Apostrophe;
+    case 0x28: return Qt::Key_ParenLeft;
+    case 0x29: return Qt::Key_ParenRight;
+    case 0x2a: return Qt::Key_Asterisk;
+    case 0x2b: return Qt::Key_Plus;
+    case 0x2c: return Qt::Key_Comma;
+    case 0x2d: return Qt::Key_Minus;
+    case 0x2e: return Qt::Key_Period;
+    case 0x2f: return Qt::Key_Slash;
+    case 0x30: return Qt::Key_0;
+    case 0x31: return Qt::Key_1;
+    case 0x32: return Qt::Key_2;
+    case 0x33: return Qt::Key_3;
+    case 0x34: return Qt::Key_4;
+    case 0x35: return Qt::Key_5;
+    case 0x36: return Qt::Key_6;
+    case 0x37: return Qt::Key_7;
+    case 0x38: return Qt::Key_8;
+    case 0x39: return Qt::Key_9;
+    case 0x3a: return Qt::Key_Colon;
+    case 0x3b: return Qt::Key_Semicolon;
+    case 0x3c: return Qt::Key_Less;
+    case 0x3d: return Qt::Key_Equal;
+    case 0x3e: return Qt::Key_Greater;
+    case 0x3f: return Qt::Key_Question;
+    case 0x40: return Qt::Key_At;
+    case 0x41: return Qt::Key_A;
+    case 0x42: return Qt::Key_B;
+    case 0x43: return Qt::Key_C;
+    case 0x44: return Qt::Key_D;
+    case 0x45: return Qt::Key_E;
+    case 0x46: return Qt::Key_F;
+    case 0x47: return Qt::Key_G;
+    case 0x48: return Qt::Key_H;
+    case 0x49: return Qt::Key_I;
+    case 0x4a: return Qt::Key_J;
+    case 0x4b: return Qt::Key_K;
+    case 0x4c: return Qt::Key_L;
+    case 0x4d: return Qt::Key_M;
+    case 0x4e: return Qt::Key_N;
+    case 0x4f: return Qt::Key_O;
+    case 0x50: return Qt::Key_P;
+    case 0x51: return Qt::Key_Q;
+    case 0x52: return Qt::Key_R;
+    case 0x53: return Qt::Key_S;
+    case 0x54: return Qt::Key_T;
+    case 0x55: return Qt::Key_U;
+    case 0x56: return Qt::Key_V;
+    case 0x57: return Qt::Key_W;
+    case 0x58: return Qt::Key_X;
+    case 0x59: return Qt::Key_Y;
+    case 0x5a: return Qt::Key_Z;
+    case 0x5b: return Qt::Key_BracketLeft;
+    case 0x5c: return Qt::Key_Backslash;
+    case 0x5d: return Qt::Key_BracketRight;
+    case 0x5e: return Qt::Key_AsciiCircum;
+    case 0x5f: return Qt::Key_Underscore;
+    case 0x60: return Qt::Key_QuoteLeft;
+    case 0x61: return Qt::Key_A;
+    case 0x62: return Qt::Key_B;
+    case 0x63: return Qt::Key_C;
+    case 0x64: return Qt::Key_D;
+    case 0x65: return Qt::Key_E;
+    case 0x66: return Qt::Key_F;
+    case 0x67: return Qt::Key_G;
+    case 0x68: return Qt::Key_H;
+    case 0x69: return Qt::Key_I;
+    case 0x6a: return Qt::Key_J;
+    case 0x6b: return Qt::Key_K;
+    case 0x6c: return Qt::Key_L;
+    case 0x6d: return Qt::Key_M;
+    case 0x6e: return Qt::Key_N;
+    case 0x6f: return Qt::Key_O;
+    case 0x70: return Qt::Key_P;
+    case 0x71: return Qt::Key_Q;
+    case 0x72: return Qt::Key_R;
+    case 0x73: return Qt::Key_S;
+    case 0x74: return Qt::Key_T;
+    case 0x75: return Qt::Key_U;
+    case 0x76: return Qt::Key_V;
+    case 0x77: return Qt::Key_W;
+    case 0x78: return Qt::Key_X;
+    case 0x79: return Qt::Key_Y;
+    case 0x7a: return Qt::Key_Z;
+    case 0x7b: return Qt::Key_BraceLeft;
+    case 0x7c: return Qt::Key_Bar;
+    case 0x7d: return Qt::Key_BraceRight;
+    case 0x7e: return Qt::Key_AsciiTilde;
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case 0xa0: return Qt::Key_nobreakspace;
+    case 0xa1: return Qt::Key_exclamdown;
+    case 0xa2: return Qt::Key_cent;
+    case 0xa3: return Qt::Key_sterling;
+    case 0xa4: return Qt::Key_currency;
+    case 0xa5: return Qt::Key_yen;
+    case 0xa6: return Qt::Key_brokenbar;
+    case 0xa7: return Qt::Key_section;
+    case 0xa8: return Qt::Key_diaeresis;
+    case 0xa9: return Qt::Key_copyright;
+    case 0xaa: return Qt::Key_ordfeminine;
+    case 0xab: return Qt::Key_guillemotleft;
+    case 0xac: return Qt::Key_notsign;
+    case 0xad: return Qt::Key_hyphen;
+    case 0xae: return Qt::Key_registered;
+    case 0xaf: return Qt::Key_macron;
+    case 0xb0: return Qt::Key_degree;
+    case 0xb1: return Qt::Key_plusminus;
+    case 0xb2: return Qt::Key_twosuperior;
+    case 0xb3: return Qt::Key_threesuperior;
+    case 0xb4: return Qt::Key_acute;
+    case 0xb5: return Qt::Key_mu;
+    case 0xb6: return Qt::Key_paragraph;
+    case 0xb7: return Qt::Key_periodcentered;
+    case 0xb8: return Qt::Key_cedilla;
+    case 0xb9: return Qt::Key_onesuperior;
+    case 0xba: return Qt::Key_masculine;
+    case 0xbb: return Qt::Key_guillemotright;
+    case 0xbc: return Qt::Key_onequarter;
+    case 0xbd: return Qt::Key_onehalf;
+    case 0xbe: return Qt::Key_threequarters;
+    case 0xbf: return Qt::Key_questiondown;
+    case 0xc0: return Qt::Key_Agrave;
+    case 0xc1: return Qt::Key_Aacute;
+    case 0xc2: return Qt::Key_Acircumflex;
+    case 0xc3: return Qt::Key_Atilde;
+    case 0xc4: return Qt::Key_Adiaeresis;
+    case 0xc5: return Qt::Key_Aring;
+    case 0xc6: return Qt::Key_AE;
+    case 0xc7: return Qt::Key_Ccedilla;
+    case 0xc8: return Qt::Key_Egrave;
+    case 0xc9: return Qt::Key_Eacute;
+    case 0xca: return Qt::Key_Ecircumflex;
+    case 0xcb: return Qt::Key_Ediaeresis;
+    case 0xcc: return Qt::Key_Igrave;
+    case 0xcd: return Qt::Key_Iacute;
+    case 0xce: return Qt::Key_Icircumflex;
+    case 0xcf: return Qt::Key_Idiaeresis;
+    case 0xd0: return Qt::Key_ETH;
+    case 0xd1: return Qt::Key_Ntilde;
+    case 0xd2: return Qt::Key_Ograve;
+    case 0xd3: return Qt::Key_Oacute;
+    case 0xd4: return Qt::Key_Ocircumflex;
+    case 0xd5: return Qt::Key_Otilde;
+    case 0xd6: return Qt::Key_Odiaeresis;
+    case 0xd7: return Qt::Key_multiply;
+    case 0xd8: return Qt::Key_Ooblique;
+    case 0xd9: return Qt::Key_Ugrave;
+    case 0xda: return Qt::Key_Uacute;
+    case 0xdb: return Qt::Key_Ucircumflex;
+    case 0xdc: return Qt::Key_Udiaeresis;
+    case 0xdd: return Qt::Key_Yacute;
+    case 0xde: return Qt::Key_THORN;
+    case 0xdf: return Qt::Key_ssharp;
+    case 0xe5: return Qt::Key_Aring;
+    case 0xe6: return Qt::Key_AE;
+    case 0xf7: return Qt::Key_division;
+    case 0xf8: return Qt::Key_Ooblique;
+    case 0xff: return Qt::Key_ydiaeresis;
+    default: QTEST_ASSERT(false); return Qt::Key(0);
+    }
+}
+
+char HbAutoTest::keyToAscii(Qt::Key key)
+{
+    switch (key) {
+    case Qt::Key_Backspace: return 0x8; //BS
+    case Qt::Key_Tab: return 0x09; // HT
+    case Qt::Key_Backtab: return 0x0b; // VT
+    case Qt::Key_Enter:
+    case Qt::Key_Return: return 0x0d; // CR
+    case Qt::Key_Escape: return 0x1b; // ESC
+    case Qt::Key_Space: return 0x20;        // 7 bit printable ASCII
+    case Qt::Key_Exclam: return 0x21;
+    case Qt::Key_QuoteDbl: return 0x22;
+    case Qt::Key_NumberSign: return 0x23;
+    case Qt::Key_Dollar: return 0x24;
+    case Qt::Key_Percent: return 0x25;
+    case Qt::Key_Ampersand: return 0x26;
+    case Qt::Key_Apostrophe: return 0x27;
+    case Qt::Key_ParenLeft: return 0x28;
+    case Qt::Key_ParenRight: return 0x29;
+    case Qt::Key_Asterisk: return 0x2a;
+    case Qt::Key_Plus: return 0x2b;
+    case Qt::Key_Comma: return 0x2c;
+    case Qt::Key_Minus: return 0x2d;
+    case Qt::Key_Period: return 0x2e;
+    case Qt::Key_Slash: return 0x2f;
+    case Qt::Key_0: return 0x30;
+    case Qt::Key_1: return 0x31;
+    case Qt::Key_2: return 0x32;
+    case Qt::Key_3: return 0x33;
+    case Qt::Key_4: return 0x34;
+    case Qt::Key_5: return 0x35;
+    case Qt::Key_6: return 0x36;
+    case Qt::Key_7: return 0x37;
+    case Qt::Key_8: return 0x38;
+    case Qt::Key_9: return 0x39;
+    case Qt::Key_Colon: return 0x3a;
+    case Qt::Key_Semicolon: return 0x3b;
+    case Qt::Key_Less: return 0x3c;
+    case Qt::Key_Equal: return 0x3d;
+    case Qt::Key_Greater: return 0x3e;
+    case Qt::Key_Question: return 0x3f;
+    case Qt::Key_At: return 0x40;
+    case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a'
+    case Qt::Key_B: return 0x62;
+    case Qt::Key_C: return 0x63;
+    case Qt::Key_D: return 0x64;
+    case Qt::Key_E: return 0x65;
+    case Qt::Key_F: return 0x66;
+    case Qt::Key_G: return 0x67;
+    case Qt::Key_H: return 0x68;
+    case Qt::Key_I: return 0x69;
+    case Qt::Key_J: return 0x6a;
+    case Qt::Key_K: return 0x6b;
+    case Qt::Key_L: return 0x6c;
+    case Qt::Key_M: return 0x6d;
+    case Qt::Key_N: return 0x6e;
+    case Qt::Key_O: return 0x6f;
+    case Qt::Key_P: return 0x70;
+    case Qt::Key_Q: return 0x71;
+    case Qt::Key_R: return 0x72;
+    case Qt::Key_S: return 0x73;
+    case Qt::Key_T: return 0x74;
+    case Qt::Key_U: return 0x75;
+    case Qt::Key_V: return 0x76;
+    case Qt::Key_W: return 0x77;
+    case Qt::Key_X: return 0x78;
+    case Qt::Key_Y: return 0x79;
+    case Qt::Key_Z: return 0x7a;
+    case Qt::Key_BracketLeft: return 0x5b;
+    case Qt::Key_Backslash: return 0x5c;
+    case Qt::Key_BracketRight: return 0x5d;
+    case Qt::Key_AsciiCircum: return 0x5e;
+    case Qt::Key_Underscore: return 0x5f;
+    case Qt::Key_QuoteLeft: return 0x60;
+
+    case Qt::Key_BraceLeft: return 0x7b;
+    case Qt::Key_Bar: return 0x7c;
+    case Qt::Key_BraceRight: return 0x7d;
+    case Qt::Key_AsciiTilde: return 0x7e;
+
+    case Qt::Key_Delete: return 0;
+    case Qt::Key_Insert: return 0; // = 0x1006,
+    case Qt::Key_Pause: return 0; // = 0x1008,
+    case Qt::Key_Print: return 0; // = 0x1009,
+    case Qt::Key_SysReq: return 0; // = 0x100a,
+
+    case Qt::Key_Clear: return 0; // = 0x100b,
+
+    case Qt::Key_Home: return 0; // = 0x1010,        // cursor movement
+    case Qt::Key_End: return 0; // = 0x1011,
+    case Qt::Key_Left: return 0; // = 0x1012,
+    case Qt::Key_Up: return 0; // = 0x1013,
+    case Qt::Key_Right: return 0; // = 0x1014,
+    case Qt::Key_Down: return 0; // = 0x1015,
+    case Qt::Key_PageUp: return 0; // = 0x1016,
+    case Qt::Key_PageDown: return 0; // = 0x1017,
+    case Qt::Key_Shift: return 0; // = 0x1020,        // modifiers
+    case Qt::Key_Control: return 0; // = 0x1021,
+    case Qt::Key_Meta: return 0; // = 0x1022,
+    case Qt::Key_Alt: return 0; // = 0x1023,
+    case Qt::Key_CapsLock: return 0; // = 0x1024,
+    case Qt::Key_NumLock: return 0; // = 0x1025,
+    case Qt::Key_ScrollLock: return 0; // = 0x1026,
+    case Qt::Key_F1: return 0; // = 0x1030,        // function keys
+    case Qt::Key_F2: return 0; // = 0x1031,
+    case Qt::Key_F3: return 0; // = 0x1032,
+    case Qt::Key_F4: return 0; // = 0x1033,
+    case Qt::Key_F5: return 0; // = 0x1034,
+    case Qt::Key_F6: return 0; // = 0x1035,
+    case Qt::Key_F7: return 0; // = 0x1036,
+    case Qt::Key_F8: return 0; // = 0x1037,
+    case Qt::Key_F9: return 0; // = 0x1038,
+    case Qt::Key_F10: return 0; // = 0x1039,
+    case Qt::Key_F11: return 0; // = 0x103a,
+    case Qt::Key_F12: return 0; // = 0x103b,
+    case Qt::Key_F13: return 0; // = 0x103c,
+    case Qt::Key_F14: return 0; // = 0x103d,
+    case Qt::Key_F15: return 0; // = 0x103e,
+    case Qt::Key_F16: return 0; // = 0x103f,
+    case Qt::Key_F17: return 0; // = 0x1040,
+    case Qt::Key_F18: return 0; // = 0x1041,
+    case Qt::Key_F19: return 0; // = 0x1042,
+    case Qt::Key_F20: return 0; // = 0x1043,
+    case Qt::Key_F21: return 0; // = 0x1044,
+    case Qt::Key_F22: return 0; // = 0x1045,
+    case Qt::Key_F23: return 0; // = 0x1046,
+    case Qt::Key_F24: return 0; // = 0x1047,
+    case Qt::Key_F25: return 0; // = 0x1048,        // F25 .. F35 only on X11
+    case Qt::Key_F26: return 0; // = 0x1049,
+    case Qt::Key_F27: return 0; // = 0x104a,
+    case Qt::Key_F28: return 0; // = 0x104b,
+    case Qt::Key_F29: return 0; // = 0x104c,
+    case Qt::Key_F30: return 0; // = 0x104d,
+    case Qt::Key_F31: return 0; // = 0x104e,
+    case Qt::Key_F32: return 0; // = 0x104f,
+    case Qt::Key_F33: return 0; // = 0x1050,
+    case Qt::Key_F34: return 0; // = 0x1051,
+    case Qt::Key_F35: return 0; // = 0x1052,
+    case Qt::Key_Super_L: return 0; // = 0x1053,        // extra keys
+    case Qt::Key_Super_R: return 0; // = 0x1054,
+    case Qt::Key_Menu: return 0; // = 0x1055,
+    case Qt::Key_Hyper_L: return 0; // = 0x1056,
+    case Qt::Key_Hyper_R: return 0; // = 0x1057,
+    case Qt::Key_Help: return 0; // = 0x1058,
+    case Qt::Key_Direction_L: return 0; // = 0x1059,
+    case Qt::Key_Direction_R: return 0; // = 0x1060,
+
+    // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+    case Qt::Key_nobreakspace: return char(0xa0);
+    case Qt::Key_exclamdown: return char(0xa1);
+    case Qt::Key_cent: return char(0xa2);
+    case Qt::Key_sterling: return char(0xa3);
+    case Qt::Key_currency: return char(0xa4);
+    case Qt::Key_yen: return char(0xa5);
+    case Qt::Key_brokenbar: return char(0xa6);
+    case Qt::Key_section: return char(0xa7);
+    case Qt::Key_diaeresis: return char(0xa8);
+    case Qt::Key_copyright: return char(0xa9);
+    case Qt::Key_ordfeminine: return char(0xaa);
+    case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar
+    case Qt::Key_notsign: return char(0xac);
+    case Qt::Key_hyphen: return char(0xad);
+    case Qt::Key_registered: return char(0xae);
+    case Qt::Key_macron: return char(0xaf);
+    case Qt::Key_degree: return char(0xb0);
+    case Qt::Key_plusminus: return char(0xb1);
+    case Qt::Key_twosuperior: return char(0xb2);
+    case Qt::Key_threesuperior: return char(0xb3);
+    case Qt::Key_acute: return char(0xb4);
+    case Qt::Key_mu: return char(0xb5);
+    case Qt::Key_paragraph: return char(0xb6);
+    case Qt::Key_periodcentered: return char(0xb7);
+    case Qt::Key_cedilla: return char(0xb8);
+    case Qt::Key_onesuperior: return char(0xb9);
+    case Qt::Key_masculine: return char(0xba);
+    case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar
+    case Qt::Key_onequarter: return char(0xbc);
+    case Qt::Key_onehalf: return char(0xbd);
+    case Qt::Key_threequarters: return char(0xbe);
+    case Qt::Key_questiondown: return char(0xbf);
+    case Qt::Key_Agrave: return char(0xc0);
+    case Qt::Key_Aacute: return char(0xc1);
+    case Qt::Key_Acircumflex: return char(0xc2);
+    case Qt::Key_Atilde: return char(0xc3);
+    case Qt::Key_Adiaeresis: return char(0xc4);
+    case Qt::Key_Aring: return char(0xe5);
+    case Qt::Key_AE: return char(0xe6);
+    case Qt::Key_Ccedilla: return char(0xc7);
+    case Qt::Key_Egrave: return char(0xc8);
+    case Qt::Key_Eacute: return char(0xc9);
+    case Qt::Key_Ecircumflex: return char(0xca);
+    case Qt::Key_Ediaeresis: return char(0xcb);
+    case Qt::Key_Igrave: return char(0xcc);
+    case Qt::Key_Iacute: return char(0xcd);
+    case Qt::Key_Icircumflex: return char(0xce);
+    case Qt::Key_Idiaeresis: return char(0xcf);
+    case Qt::Key_ETH: return char(0xd0);
+    case Qt::Key_Ntilde: return char(0xd1);
+    case Qt::Key_Ograve: return char(0xd2);
+    case Qt::Key_Oacute: return char(0xd3);
+    case Qt::Key_Ocircumflex: return char(0xd4);
+    case Qt::Key_Otilde: return char(0xd5);
+    case Qt::Key_Odiaeresis: return char(0xd6);
+    case Qt::Key_multiply: return char(0xd7);
+    case Qt::Key_Ooblique: return char(0xf8);
+    case Qt::Key_Ugrave: return char(0xd9);
+    case Qt::Key_Uacute: return char(0xda);
+    case Qt::Key_Ucircumflex: return char(0xdb);
+    case Qt::Key_Udiaeresis: return char(0xdc);
+    case Qt::Key_Yacute: return char(0xdd);
+    case Qt::Key_THORN: return char(0xde);
+    case Qt::Key_ssharp: return char(0xdf);
+    case Qt::Key_division: return char(0xf7);
+    case Qt::Key_ydiaeresis: return char(0xff);
+
+    // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
+
+    case Qt::Key_Back : return 0; // = 0x1061,
+    case Qt::Key_Forward : return 0; // = 0x1062,
+    case Qt::Key_Stop : return 0; // = 0x1063,
+    case Qt::Key_Refresh : return 0; // = 0x1064,
+
+    case Qt::Key_VolumeDown: return 0; // = 0x1070,
+    case Qt::Key_VolumeMute : return 0; // = 0x1071,
+    case Qt::Key_VolumeUp: return 0; // = 0x1072,
+    case Qt::Key_BassBoost: return 0; // = 0x1073,
+    case Qt::Key_BassUp: return 0; // = 0x1074,
+    case Qt::Key_BassDown: return 0; // = 0x1075,
+    case Qt::Key_TrebleUp: return 0; // = 0x1076,
+    case Qt::Key_TrebleDown: return 0; // = 0x1077,
+
+    case Qt::Key_MediaPlay : return 0; // = 0x1080,
+    case Qt::Key_MediaStop : return 0; // = 0x1081,
+    case Qt::Key_MediaPrevious : return 0; // = 0x1082,
+    case Qt::Key_MediaNext : return 0; // = 0x1083,
+    case Qt::Key_MediaRecord: return 0; // = 0x1084,
+
+    case Qt::Key_HomePage : return 0; // = 0x1090,
+    case Qt::Key_Favorites : return 0; // = 0x1091,
+    case Qt::Key_Search : return 0; // = 0x1092,
+    case Qt::Key_Standby: return 0; // = 0x1093,
+    case Qt::Key_OpenUrl: return 0; // = 0x1094,
+
+    case Qt::Key_LaunchMail : return 0; // = 0x10a0,
+    case Qt::Key_LaunchMedia: return 0; // = 0x10a1,
+    case Qt::Key_Launch0 : return 0; // = 0x10a2,
+    case Qt::Key_Launch1 : return 0; // = 0x10a3,
+    case Qt::Key_Launch2 : return 0; // = 0x10a4,
+    case Qt::Key_Launch3 : return 0; // = 0x10a5,
+    case Qt::Key_Launch4 : return 0; // = 0x10a6,
+    case Qt::Key_Launch5 : return 0; // = 0x10a7,
+    case Qt::Key_Launch6 : return 0; // = 0x10a8,
+    case Qt::Key_Launch7 : return 0; // = 0x10a9,
+    case Qt::Key_Launch8 : return 0; // = 0x10aa,
+    case Qt::Key_Launch9 : return 0; // = 0x10ab,
+    case Qt::Key_LaunchA : return 0; // = 0x10ac,
+    case Qt::Key_LaunchB : return 0; // = 0x10ad,
+    case Qt::Key_LaunchC : return 0; // = 0x10ae,
+    case Qt::Key_LaunchD : return 0; // = 0x10af,
+    case Qt::Key_LaunchE : return 0; // = 0x10b0,
+    case Qt::Key_LaunchF : return 0; // = 0x10b1,
+
+    default: QTEST_ASSERT(false); return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/hbautotest.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef HBAUTOTEST_H
+#define HBAUTOTEST_H
+
+#include <hbnamespace.h>
+#include <hbmainwindow.h>
+#include <QtTest/QtTest>
+
+class HbMainWindow;
+class HbWidget;
+class HbAutoTestMainWindow;
+class HbAutoTest;
+class HbAutoTestMouseEvent; 
+/*
+INSTRUCTIONS:
+The class HbAutoTest is meant to be used with Orbit applications auto testing instead of GUI testing APIs of QTestLib.
+
+The functions of this class is to used similarily to the related QTestLib functions.
+
+Use HbAutoTestMainWindow (defined below) instead of HbMainWindow to enble filtering.
+Filterin filters out UI events that are not sent by function defined in HbAutoTest class.
+
+*/
+
+class HbAutoTestMouseEvent : public QMouseEvent
+{
+public:
+    HbAutoTestMouseEvent(Type type, const QPoint & pos, const QPoint & globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers ) 
+        : QMouseEvent(type,pos,globalPos,button,buttons,modifiers){}
+};
+
+class HbAutoTestKeyEvent : public QKeyEvent
+{
+public:
+        HbAutoTestKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(),
+              bool autorep = false, ushort count = 1 ) 
+        : QKeyEvent(type, key, modifiers, text, autorep, count){}
+};
+
+class HbAutoTest 
+{
+public:
+    
+    static void mouseMove (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1 );
+    static void mousePress (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseRelease (HbAutoTestMainWindow *window, HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+    static void mouseClick (HbAutoTestMainWindow *window, const HbWidget *widget, QPointF pos = QPointF(), int delay = -1);
+   
+private:
+    static void drag(HbAutoTestMainWindow *window, QPointF targetPoint);
+    static QPointF middlePointOfWidget( const HbWidget* widget);
+
+    static bool pointerPressed;
+    static QPointF pressPoint;
+
+//Key event Part: copy-pasted from QTestLib and modified to support HbAutoTestKeyEvent to enable filtering.
+//see HbAutoTestMainWindow below.
+public:
+    
+    static Qt::Key asciiToKey(char ascii);
+    static char keyToAscii(Qt::Key key);
+
+    static void simulateEvent(QWidget *widget, bool press, int code,
+                              Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1);
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             QString text, Qt::KeyboardModifiers modifier, int delay=-1);    
+
+    static void sendKeyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key code,
+                             char ascii, Qt::KeyboardModifiers modifier, int delay=-1);
+
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, char ascii,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+ 
+    static void keyEvent(QTest::KeyAction action, QWidget *widget, Qt::Key key,
+                                Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClicks(QWidget *widget, const QString &sequence,
+                                 Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+    
+    static void keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+   
+    static void keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+
+    static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1);
+};
+
+class HbTestEvent
+{
+public:
+    virtual void simulate(QWidget *w) = 0;
+    virtual HbTestEvent *clone() const = 0;
+
+    virtual ~HbTestEvent() {}
+};
+
+class HbTestKeyEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyEvent(QTest::KeyAction action, Qt::Key key, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers), _ascii(0), _key(key) {}
+    inline HbTestKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers, int delay)
+        : _action(action), _delay(delay), _modifiers(modifiers),
+          _ascii(ascii), _key(Qt::Key_unknown) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        if (_ascii == 0)
+            HbAutoTest::keyEvent(_action, w, _key, _modifiers, _delay);
+        else
+            HbAutoTest::keyEvent(_action, w, _ascii, _modifiers, _delay);
+    } 
+
+protected:
+    QTest::KeyAction _action;
+    int _delay;
+    Qt::KeyboardModifiers _modifiers;
+    char _ascii;
+    Qt::Key _key;
+};
+
+class HbTestKeyClicksEvent: public HbTestEvent
+{
+public:
+    inline HbTestKeyClicksEvent(const QString &keys, Qt::KeyboardModifiers modifiers, int delay)
+        : _keys(keys), _modifiers(modifiers), _delay(delay) {}
+    inline HbTestEvent *clone() const { return new HbTestKeyClicksEvent(*this); }
+
+    inline void simulate(QWidget *w)
+    {
+        HbAutoTest::keyClicks(w, _keys, _modifiers, _delay);
+    }
+
+private:
+    QString _keys;
+    Qt::KeyboardModifiers _modifiers;
+    int _delay;
+};
+
+class HbTestDelayEvent: public HbTestEvent
+{
+public:
+    inline HbTestDelayEvent(int msecs): _delay(msecs) {}
+    inline HbTestEvent *clone() const { return new HbTestDelayEvent(*this); }
+
+    inline void simulate(QWidget * /*w*/) { QTest::qWait(_delay); }
+
+private:
+    int _delay;
+};
+
+class HbTestEventList: public QList<HbTestEvent *>
+{
+public:
+    inline HbTestEventList() {}
+    inline HbTestEventList(const HbTestEventList &other): QList<HbTestEvent *>()
+    { for (int i = 0; i < other.count(); ++i) append(other.at(i)->clone()); }
+    inline ~HbTestEventList()
+    { clear(); }
+    inline void clear()
+    { qDeleteAll(*this); QList<HbTestEvent *>::clear(); }
+
+    inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
+    inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, qtKey, modifiers, msecs); }
+    inline void addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, qtKey, modifiers, msecs); }
+    inline void addKeyEvent(QTest::KeyAction action, Qt::Key qtKey,
+                            Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, qtKey, modifiers, msecs)); }
+
+    inline void addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Click, ascii, modifiers, msecs); }
+    inline void addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Press, ascii, modifiers, msecs); }
+    inline void addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { addKeyEvent(QTest::Release, ascii, modifiers, msecs); }
+    inline void addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyClicksEvent(keys, modifiers, msecs)); }
+    inline void addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+    { append(new HbTestKeyEvent(action, ascii, modifiers, msecs)); }
+
+    inline void addDelay(int msecs)
+    { append(new HbTestDelayEvent(msecs)); }
+
+    inline void simulate(QWidget *w)
+    {
+        for (int i = 0; i < count(); ++i)
+            at(i)->simulate(w);
+    }
+};
+
+class HbAutoTestMainWindow : public HbMainWindow
+{
+public:
+    HbAutoTestMainWindow() : HbMainWindow() {}
+    
+    void mousePressEvent(QMouseEvent *event)
+    {
+        qDebug(
+            "HbAutoTestMainWindow::mousePressEvent: x(%d) y(%d)",
+            event->x(),
+            event->y());
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mousePressEvent(event);
+            } else {
+                ;//Do nothing 
+         }
+    }
+
+    void mouseMoveEvent(QMouseEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseMoveEvent(event);
+            } else {
+                ;//Do nothing
+         }
+    }
+
+    void mouseReleaseEvent(QMouseEvent *event)
+    {
+         if ( dynamic_cast<HbAutoTestMouseEvent *>(event) ) {
+                HbMainWindow::mouseReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void keyPressEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyPressEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+    void keyReleaseEvent(QKeyEvent *event)
+    {
+        if ( dynamic_cast<HbAutoTestKeyEvent *>(event) ) {
+                HbMainWindow::keyReleaseEvent(event);
+            } else {
+                ;//Do nothing  
+         }
+    }
+
+    void mouseDoubleClickEvent(QMouseEvent *event)
+    {
+        Q_UNUSED(event);
+        //Just ignore, not supported in Orbit
+    }
+};
+
+
+Q_DECLARE_METATYPE(HbTestEventList)
+#endif //HBAUTOTEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1519 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin unit testing.
+*/
+
+#include <HbApplication>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbDialog>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormModelItem>
+#include <HbDataFormViewItem>
+#include <HbModelIterator>
+#include <QSharedPointer>
+#include <QtTest/QtTest>
+#include <cpbearerapplugininterface.h>
+#include <cmmanager_shim.h>
+#include <cmconnectionmethod_shim.h>
+
+#include "cpwlanapview.h"
+#include "cpwlanapadvancedview.h"
+
+#include "hbautotest.h"
+#include "testcpwlanapplugin.h"
+
+// Following flag must be defined if WLAN security settings plugins
+// (WEP, WPA/WPA2 and WPA2) are available. Flag can be removed when the
+// plugins are released.
+#define WLAN_SECURITY_PLUGINS_AVAILABLE
+
+// -----------------------------------------------------------------------------
+// STATIC TEST DATA
+// -----------------------------------------------------------------------------
+
+// Connection method (AP) ID used for testing
+static const uint testApId = 5;
+
+static const QString pluginDir =
+    "\\resource\\qt\\plugins\\controlpanel\\bearerap";
+
+static const QString pluginName = "cpwlanapplugin.dll";
+
+// Time to wait before continuing after an UI step
+static const int waitTime = 10;
+
+// UI coordinates
+static const QPoint scrollMiddle(350, 280);
+static const QPoint scrollTop(350, 30);
+static const QPoint scrollBottom(350, 540);
+
+// Use positive offset if dropdown opens under the combobox
+static const QPoint comboBoxFirstItemOffset(80, 75);
+static const QPoint comboBoxItemOffset(0, 51);
+// Use negative offset if dropdown opens above the combobox
+static const QPoint comboBoxFirstItemNegativeOffset(80, -29);
+static const QPoint comboBoxItemNegativeOffset(0, -51);
+
+static const QPoint exitEditorOffset(-10, -20);
+
+static const QPoint messageBoxOkButtonOffset(160, 140);
+
+// Advanced settings groups
+static const QPoint ipv4Group(160, 10);
+static const QPoint ipv6Group(160, 60);
+static const QPoint proxyGroup(160, 110);
+
+// -----------------------------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// -----------------------------------------------------------------------------
+
+/**
+ * Test main function. Runs all test cases.
+ */
+#ifndef TESTCMAPPLSETTINGSUI_NO_OUTPUT_REDIRECT
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    app.setApplicationName("TestCpWlanApPlugin");
+    
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\data\\TestCpWlanApPlugin.txt";
+ 
+    TestCpWlanApPlugin tc;
+    int res = QTest::qExec(&tc, 3, pass);
+ 
+    return res;
+}
+#else
+QTEST_MAIN(TestCpWlanApPlugin)
+#endif
+
+/**
+ * This function is be called before the first test case is executed.
+ */
+void TestCpWlanApPlugin::initTestCase()
+{
+    mMainWindow = new HbAutoTestMainWindow;
+    //mMainWindow = new HbMainWindow;
+    mMainWindow->show();
+    
+    // Load plugin
+    QDir dir(pluginDir);
+    mPluginLoader = new QPluginLoader(dir.absoluteFilePath(pluginName));
+    mPlugin = qobject_cast<CpBearerApPluginInterface *>(mPluginLoader->instance());
+    QVERIFY(mPlugin != NULL);
+    
+    // Verify plugin bearer type
+    QVERIFY(mPlugin->bearerType() == CMManagerShim::BearerTypeWlan);
+    
+    // Create WLAN settings view (connection method ID given)
+    subCreateSettingsView(testApId);
+    
+    subGetUiWidgets();
+}
+
+/**
+ * This function is be called after the last test case was executed.
+ */
+void TestCpWlanApPlugin::cleanupTestCase()
+{
+    delete mMainWindow;
+    mMainWindow = 0;
+    
+    // Force unloading of plugin
+    mPluginLoader->unload();
+    delete mPluginLoader;
+    mPluginLoader = 0;
+}
+
+/**
+ * This function is be called before each test case is executed.
+ */
+void TestCpWlanApPlugin::init()
+{
+    QTest::qWait(1000);
+}
+
+/**
+ * This function is be called after each test case is executed.
+ */
+void TestCpWlanApPlugin::cleanup()
+{
+}
+
+// -----------------------------------------------------------------------------
+// TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Tests changing of connection name.
+ */
+void TestCpWlanApPlugin::tcChangeConnectionName()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmName,
+        mTestView->mConnectionNameItem,
+        result);
+}
+
+/**
+ * Test data for connection name change test case.
+ */
+void TestCpWlanApPlugin::tcChangeConnectionName_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+    
+    QTest::newRow("maximum length")
+        << "really long name 123456789012345678901234567890123"
+        << "really long name 123456789012345678901234567890123";
+    QTest::newRow("too long")
+        << "too long name 12345678901234567890123456789012345678901234"
+        << "too long name 123456789012345678901234567890123456";
+    QTest::newRow("basic") // last one must always fit on one line in UI
+        << "test WLAN AP"
+        << "test WLAN AP";
+}
+
+/**
+ * Tests that empty connection name is not accepted.
+ */
+void TestCpWlanApPlugin::tcConnectionNameEmpty()
+{
+    QString previous = 
+        mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget);
+
+    // Erase old string
+    QString text = mTestView->mConnectionNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    HbAutoTest::mouseClick(mMainWindow, mConnectionNameWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestView->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmName,
+        mTestView->mConnectionNameItem,
+        previous);
+}
+
+/**
+ * Tests changing of WLAN network name.
+ */
+void TestCpWlanApPlugin::tcChangeWlanNetworkName()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mWlanNetworkNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mWlanNetworkNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mWlanNetworkNameWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::WlanSSID,
+        mTestView->mWlanNetworkNameItem,
+        result);
+}
+
+/**
+ * Test data for WLAN network name change test case.
+ */
+void TestCpWlanApPlugin::tcChangeWlanNetworkName_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+    
+    QTest::newRow("maximum length")
+        << "really long name 123456789012345"
+        << "really long name 123456789012345";
+    QTest::newRow("too long")
+        << "too long name 123456789012345678901234567890"
+        << "too long name 123456789012345678";
+    QTest::newRow("basic") // last one must always fit on one line in UI
+        << "test SSID"
+        << "test SSID";
+}
+
+/**
+ * Tests that empty WLAN network name is not accepted.
+ */
+void TestCpWlanApPlugin::tcWlanNetworkNameEmpty()
+{
+    QString previous = 
+        mTestView->mWlanNetworkNameItem->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mWlanNetworkNameWidget);
+    
+    // Erase old string
+    QString text = mTestView->mWlanNetworkNameItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    HbAutoTest::mouseClick(mMainWindow, mWlanNetworkNameWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestView->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::WlanSSID,
+        mTestView->mWlanNetworkNameItem,
+        previous);
+}
+
+/**
+ * Tests changing of WLAN network status.
+ */
+void TestCpWlanApPlugin::tcChangeNetworkStatus()
+{
+    QPointF publicPointOffset = comboBoxFirstItemOffset;
+    QPointF hiddenPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    
+    // Set network status to hidden
+    HbAutoTest::mouseClick(mMainWindow, mNetworkStatusWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkStatusWidget, hiddenPointOffset, 100);
+    subVerifyNetworkStatus(HiddenStatus);
+
+    // Set network status to public
+    HbAutoTest::mouseClick(mMainWindow, mNetworkStatusWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkStatusWidget, publicPointOffset, 100);
+    subVerifyNetworkStatus(PublicStatus);
+}
+
+/**
+ * Tests changing of WLAN network mode.
+ */
+void TestCpWlanApPlugin::tcChangeNetworkMode()
+{
+    QPointF infraPointOffset = comboBoxFirstItemOffset;
+    QPointF adHocPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    
+    // Set network mode to ad-hoc
+    HbAutoTest::mouseClick(mMainWindow, mNetworkModeWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkModeWidget, adHocPointOffset, 100);
+    subVerifyUint(CMManagerShim::WlanConnectionMode, CMManagerShim::Adhoc);
+
+    // Set network mode to infrastructure
+    HbAutoTest::mouseClick(mMainWindow, mNetworkModeWidget);
+    HbAutoTest::mouseClick(mMainWindow, mNetworkModeWidget, infraPointOffset, 100);
+    subVerifyUint(CMManagerShim::WlanConnectionMode, CMManagerShim::Infra);
+}
+
+/**
+ * Tests changing of WLAN security mode.
+ */
+void TestCpWlanApPlugin::tcChangeSecurityMode()
+{
+#ifdef WLAN_SECURITY_PLUGINS_AVAILABLE
+    QPointF openPointOffset = comboBoxFirstItemNegativeOffset + comboBoxItemNegativeOffset * 3;
+    QPointF wepPointOffset = comboBoxFirstItemNegativeOffset + comboBoxItemNegativeOffset * 2;
+    QPointF wpaPointOffset = comboBoxFirstItemNegativeOffset + comboBoxItemNegativeOffset;
+    QPointF wpa2PointOffset = comboBoxFirstItemNegativeOffset;
+#else
+    QPointF openPointOffset = comboBoxFirstItemNegativeOffset;
+#endif
+    
+#ifdef WLAN_SECURITY_PLUGINS_AVAILABLE
+    // Set security mode to WEP
+    HbAutoTest::mouseClick(mMainWindow, mSecurityModeWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mSecurityModeWidget, wepPointOffset, 100);
+    subVerifyUint(
+        CMManagerShim::WlanSecurityMode,
+        CMManagerShim::WlanSecModeWep);
+    
+    QTest::qWait(1000);
+#endif
+    // Set security mode to open
+    HbAutoTest::mouseClick(mMainWindow, mSecurityModeWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mSecurityModeWidget, openPointOffset, 100);
+    subVerifyUint(
+        CMManagerShim::WlanSecurityMode,
+        CMManagerShim::WlanSecModeOpen);
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpWlanApPlugin::tcScrollToBottom()
+{
+    subScrollToBottom();
+}
+
+/**
+ * Gets UI widget pointers because homepage view item may have been
+ * created before it was visible on the UI.
+ */
+void TestCpWlanApPlugin::tcGetUiWidgets()
+{
+    subGetUiWidgets();
+}
+
+/**
+ * Tests changing of homepage.
+ */
+void TestCpWlanApPlugin::tcChangeHomepage()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mHomepageWidget);
+    
+    // Erase old string
+    QString text = mTestView->mHomepageItem->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mHomepageWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmStartPage,
+        mTestView->mHomepageItem,
+        result);
+}
+
+/**
+ * Test data for homepage change test case.
+ */
+void TestCpWlanApPlugin::tcChangeHomepage_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("long")
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html"
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html";
+    QTest::newRow("basic") // last one should always fit on one line in UI
+        << "http://www.symbian.org/"
+        << "http://www.symbian.org/";
+    QTest::newRow("empty")
+        << ""
+        << "";
+}
+
+/**
+ * Opens advanced settings view.
+ */
+void TestCpWlanApPlugin::tcOpenAdvancedSettingsView()
+{
+    // Launch advanced settings view
+    bool status = connect(
+        this,
+        SIGNAL(menuActionTriggered(HbAction *)),
+        mTestView,
+        SLOT(menuActionTriggered(HbAction *)));
+    Q_ASSERT(status);
+    emit menuActionTriggered(mTestView->mAdvancedSettingsAction);
+    
+    QTest::qWait(1000);
+    
+    mTestViewAdvanced = static_cast<CpWlanApAdvancedView *>(mMainWindow->currentView());
+}
+
+/**
+ * Expands the IPv4 settings group and gets UI widget pointers.
+ */
+void TestCpWlanApPlugin::tcExpandIpv4SettingsAndGetUiWidgets()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipv4Group);
+    
+    QTest::qWait(500);
+
+    subGetAdvancedUiWidgets(0);
+}
+
+/**
+ * Tests enabling of automatic phone IP address.
+ */
+void TestCpWlanApPlugin::tcEnableAutomaticIpv4Address()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4Automatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IP address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    }
+    // Enable automatic IP address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    subVerifyBool(
+        CMManagerShim::CmIPAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SubnetMaskWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv4GatewayWidget);
+}
+
+/**
+ * Tests disabling of automatic phone IP address.
+ */
+void TestCpWlanApPlugin::tcEnableUserDefinedIpv4Address()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4Automatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IP address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4AddressAutomaticWidget);
+    }
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpAddress().
+}
+
+/**
+ * Tests changing of IP address.
+ */
+void TestCpWlanApPlugin::tcChangeIpAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4Address->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4AddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPAddress,
+        mTestViewAdvanced->mIpv4Address,
+        result);
+    subVerifyBool(
+        CMManagerShim::CmIPAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IP address change test case.
+ */
+void TestCpWlanApPlugin::tcChangeIpAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Tests changing of subnet mask.
+ */
+void TestCpWlanApPlugin::tcChangeSubnetMask()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SubnetMaskWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4SubnetMask->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SubnetMaskWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPNetmask,
+        mTestViewAdvanced->mIpv4SubnetMask,
+        result);
+}
+
+/**
+ * Test data for subnet mask change test case.
+ */
+void TestCpWlanApPlugin::tcChangeSubnetMask_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("empty")
+        << ""
+        << "0.0.0.0";
+    QTest::newRow("zero")
+        << "0.0.0.0"
+        << "0.0.0.0";
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Tests invalid subnet mask.
+ */
+void TestCpWlanApPlugin::tcInvalidSubnetMask()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv4SubnetMask->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SubnetMaskWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4SubnetMask->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "999.999.999.999", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SubnetMaskWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPNetmask,
+        mTestViewAdvanced->mIpv4SubnetMask,
+        previous);
+}
+
+/**
+ * Tests changing of gateway.
+ */
+void TestCpWlanApPlugin::tcChangeGateway()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4GatewayWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4Gateway->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4GatewayWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPGateway,
+        mTestViewAdvanced->mIpv4Gateway,
+        result);
+}
+
+/**
+ * Test data for gateway change test case.
+ */
+void TestCpWlanApPlugin::tcChangeGateway_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("empty")
+        << ""
+        << "0.0.0.0";
+    QTest::newRow("zero")
+        << "0.0.0.0"
+        << "0.0.0.0";
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Tests invalid gateway address.
+ */
+void TestCpWlanApPlugin::tcInvalidGateway()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv4Gateway->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4GatewayWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4Gateway->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "999.999.999.999", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4GatewayWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPGateway,
+        mTestViewAdvanced->mIpv4Gateway,
+        previous);
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpWlanApPlugin::tcScrollToBottom2()
+{
+    subScrollToBottom();
+}
+
+/**
+ * Tests enabling of automatic IPv4 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcEnableAutomaticIpv4DnsAddress()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4DnsAutomatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IPv4 DNS address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    }
+    // Enable automatic IPv4 DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    subVerifyBool(
+        CMManagerShim::CmIPDNSAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests disabling of automatic IPv4 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcEnableUserDefinedIpv4DnsAddress()
+{
+    Qt::CheckState state = static_cast<Qt::CheckState>
+        (mTestViewAdvanced->mIpv4DnsAutomatic->contentWidgetData("checkState").toInt());
+    if (state == Qt::Checked) {
+        // Disable automatic IPv4 DNS address
+        HbAutoTest::mouseClick(mMainWindow, mIpv4DnsAddressAutomaticWidget);
+    }
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpv4DnsAddress().
+}
+
+/**
+ * Tests changing of IPv4 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcChangeIpv4DnsAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    // Primary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPNameServer1,
+        mTestViewAdvanced->mIpv4DnsAddress1,
+        result);
+    
+    // Secondary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget);
+    
+    // Erase old string
+    text = mTestViewAdvanced->mIpv4DnsAddress2->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4SecondaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPNameServer2,
+        mTestViewAdvanced->mIpv4DnsAddress2,
+        result);
+    
+    // Verify user defined address is in use
+    subVerifyBool(
+        CMManagerShim::CmIPDNSAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IPv4 DNS address change test case.
+ */
+void TestCpWlanApPlugin::tcChangeIpv4DnsAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("too long")
+        << "255.255.255.2551234"
+        << "255.255.255.255";
+    QTest::newRow("normal")
+        << "192.168.0.1"
+        << "192.168.0.1";
+}
+
+/**
+ * Tests invalid IPv4 DNS address.
+ */
+void TestCpWlanApPlugin::tcInvalidIpv4DnsAddress()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv4DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "999.999.999.999", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv4PrimaryDnsAddressWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIPNameServer1,
+        mTestViewAdvanced->mIpv4DnsAddress1,
+        previous);
+}
+
+/**
+ * Scrolls the tested view to the top.
+ */
+void TestCpWlanApPlugin::tcScrollToTop()
+{
+    subScrollToTop();
+}
+
+/**
+ * Collapses the IPv4 settings group.
+ */
+void TestCpWlanApPlugin::tcCollapseIpv4Settings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipv4Group);
+}
+
+/**
+ * Expands the IPv6 settings group and gets UI widget pointers.
+ */
+void TestCpWlanApPlugin::tcExpandIpv6SettingsAndGetUiWidgets()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipv6Group);
+
+    QTest::qWait(500);
+    
+    subGetAdvancedUiWidgets(1);
+}
+
+/**
+ * Tests enabling of automatic IPv6 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcEnableAutomaticIpv6DnsAddress()
+{
+    // Enable automatic IPv6 DNS address
+    QPointF automaticPointOffset = comboBoxFirstItemOffset;
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, automaticPointOffset, 100);
+    QTest::qWait(100);
+    subVerifyBool(
+        CMManagerShim::CmIP6DNSAddrFromServer,
+        true);
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests enabling of well-known IPv6 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcEnableWellKnownIpv6DnsAddress()
+{
+    // Enable well-known IPv6 DNS address
+    QPointF wellKnownPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset;
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, wellKnownPointOffset, 100);
+    QTest::qWait(100);
+    subVerifyBool(
+        CMManagerShim::CmIP6DNSAddrFromServer,
+        false);
+    subVerifyString(
+        CMManagerShim::CmIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        "fec0:000:0000:ffff::1");
+    subVerifyString(
+        CMManagerShim::CmIP6NameServer2,
+        mTestViewAdvanced->mIpv6DnsAddress2,
+        "fec0:000:0000:ffff::2");
+    
+    // Ensure that editing the IP address is not allowed
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+}
+
+/**
+ * Tests enabling of user defined IPv6 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcEnableUserDefinedIpv6DnsAddress()
+{
+    // Select user defined IPv6 DNS address
+    QPointF userDefinedPointOffset = comboBoxFirstItemOffset + comboBoxItemOffset * 2;
+    //QPointF userDefinedPointOffset(0, 160);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget);
+    QTest::qWait(100);
+    HbAutoTest::mouseClick(mMainWindow, mIpv6DnsAddressAutomaticWidget, userDefinedPointOffset, 100);
+    QTest::qWait(100);
+    // Can't verify the setting from CommsDat here, because CMManager will
+    // set it back to true if no valid IP address is yet defined. The flag
+    // is verified in tcChangeIpv4DnsAddress().
+}
+
+/**
+ * Tests changing of IPv6 DNS addresses.
+ */
+void TestCpWlanApPlugin::tcChangeIpv6DnsAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    // Primary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        result);
+    
+    // Secondary DNS address
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget);
+    
+    // Erase old string
+    text = mTestViewAdvanced->mIpv6DnsAddress2->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6SecondaryDnsAddressWidget, exitEditorOffset);
+
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIP6NameServer2,
+        mTestViewAdvanced->mIpv6DnsAddress2,
+        result);
+    
+    // Verify user defined address is in use
+    subVerifyBool(
+        CMManagerShim::CmIP6DNSAddrFromServer,
+        false);
+}
+
+/**
+ * Test data for IPv6 DNS address change test case.
+ */
+void TestCpWlanApPlugin::tcChangeIpv6DnsAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("normal")
+        << "2001:db8:85a3::8a2e:370:7334"
+        << "2001:db8:85a3:0:0:8a2e:370:7334";
+}
+
+/**
+ * Tests invalid IPv6 DNS address.
+ */
+void TestCpWlanApPlugin::tcInvalidIpv6DnsAddress()
+{
+    QString previous = 
+        mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mIpv6DnsAddress1->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "abcdef:fedcba", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mIpv6PrimaryDnsAddressWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmIP6NameServer1,
+        mTestViewAdvanced->mIpv6DnsAddress1,
+        previous);
+}
+
+/**
+ * Collapses the IPv6 settings group.
+ */
+void TestCpWlanApPlugin::tcCollapseIpv6Settings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, ipv6Group);
+}
+
+/**
+ * Expands the proxy settings group and gets UI widget pointers.
+ */
+void TestCpWlanApPlugin::tcExpandProxySettingsAndGetUiWidgets()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, proxyGroup);
+
+    QTest::qWait(500);
+    
+    subGetAdvancedUiWidgets(2);
+}
+
+/**
+ * Tests changing of proxy server address.
+ */
+void TestCpWlanApPlugin::tcChangeProxyServerAddress()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyServerAddressWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyServer->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyServerAddressWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    
+    // Verify both commsdat and UI widget
+    subVerifyString(
+        CMManagerShim::CmProxyServerName,
+        mTestViewAdvanced->mProxyServer,
+        result);
+    // Verify user defined address flag is set correctly
+    if (result.isEmpty()) {
+        subVerifyBool(
+            CMManagerShim::CmProxyUsageEnabled,
+            false);
+    } else {
+        subVerifyBool(
+            CMManagerShim::CmProxyUsageEnabled,
+            true);
+    }
+}
+
+/**
+ * Test data for proxy server address change test case.
+ */
+void TestCpWlanApPlugin::tcChangeProxyServerAddress_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("long")
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html"
+        << "http://developer.symbian.org/main/documentation/reference/s^3/doc_source/AboutSymbianOSLibrary9.6/index.html";
+    QTest::newRow("empty")
+        << ""
+        << "";
+    QTest::newRow("basic") // last one should always fit on one line in UI
+        << "http://www.symbian.org/"
+        << "http://www.symbian.org/";
+}
+
+/**
+ * Tests changing of proxy port number.
+ */
+void TestCpWlanApPlugin::tcChangeProxyPortNumber()
+{
+    QFETCH(QString, string);
+    QFETCH(QString, result);
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyPort->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, string, 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+
+    // Verify both commsdat and UI widget
+    subVerifyUint(
+        CMManagerShim::CmProxyPortNumber,
+        result.toInt());
+    QCOMPARE(
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt(),
+        result.toInt());
+}
+
+/**
+ * Test data for proxy port number change test case.
+ */
+void TestCpWlanApPlugin::tcChangeProxyPortNumber_data()
+{
+    QTest::addColumn<QString>("string");
+    QTest::addColumn<QString>("result");
+  
+    QTest::newRow("basic")
+        << "8080"
+        << "8080";
+    QTest::newRow("too long")
+        << "1234567890"
+        << "12345";
+    QTest::newRow("zero")
+        << "0"
+        << "";
+    QTest::newRow("empty")
+        << ""
+        << "";
+}
+
+/**
+ * Tests invalid proxy port number.
+ */
+void TestCpWlanApPlugin::tcInvalidProxyPortNumber()
+{
+    int previous = 
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt();
+    
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget);
+    
+    // Erase old string
+    QString text = mTestViewAdvanced->mProxyPort->contentWidgetData("text").toString();
+    subClearLineEdit(text.size());
+    
+    // Enter new string
+    HbAutoTest::keyClicks(mMainWindow, "65536", 0, waitTime);
+
+    HbAutoTest::mouseClick(mMainWindow, mProxyPortNumberWidget, exitEditorOffset);
+
+    QTest::qWait(100);
+    // Dismiss messagebox
+    HbAutoTest::mouseClick(
+        mMainWindow,
+        mTestViewAdvanced->mMessageBox.data(),
+        messageBoxOkButtonOffset);
+    
+    // Verify both commsdat and UI widget
+    subVerifyUint(
+        CMManagerShim::CmProxyPortNumber,
+        previous);
+    QCOMPARE(
+        mTestViewAdvanced->mProxyPort->contentWidgetData("text").toInt(),
+        previous);
+}
+
+/**
+ * Collapses the proxy settings group.
+ */
+void TestCpWlanApPlugin::tcCollapseProxySettings()
+{
+    HbAutoTest::mouseClick(mMainWindow, mTestViewAdvanced, proxyGroup);
+}
+
+/**
+ * Returns from advanced settings view.
+ */
+void TestCpWlanApPlugin::tcCloseAdvancedSettingsView()
+{
+    // Return from advanced settings view
+    subClickWidget("HbNavigationButton");
+}
+
+// -----------------------------------------------------------------------------
+// SUB TEST CASES
+// -----------------------------------------------------------------------------
+
+/**
+ * Gets UI widget pointers.
+ */
+void TestCpWlanApPlugin::subGetUiWidgets()
+{
+    HbModelIterator iterator(mTestView->mModel);
+    
+    // Get "Access point settings" group item
+    QModelIndex apGroupIndex = iterator.index(0);
+    
+    // Get UI widgets
+    mConnectionNameWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(0, apGroupIndex));
+    mWlanNetworkNameWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(1, apGroupIndex));
+    mNetworkStatusWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(2, apGroupIndex));
+    mNetworkModeWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(3, apGroupIndex));
+    mSecurityModeWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(4, apGroupIndex));
+    mHomepageWidget = subGetWidgetByIndex(
+        mTestView->mForm,
+        iterator.index(5, apGroupIndex));
+}
+
+/**
+ * Gets advanced settings view UI widget pointers by group index.
+ */
+void TestCpWlanApPlugin::subGetAdvancedUiWidgets(
+    uint index)
+{
+    // Get the group item
+    HbModelIterator iterator(mTestViewAdvanced->mModel);
+    QModelIndex groupIndex = iterator.index(index);
+    
+    // Get UI widgets
+    if (index == 0) {
+        // IPv4 settings group
+        mIpv4AddressAutomaticWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(0, groupIndex));
+        mIpv4AddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(1, groupIndex));
+        mIpv4SubnetMaskWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(2, groupIndex));
+        mIpv4GatewayWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(3, groupIndex));
+        mIpv4DnsAddressAutomaticWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(4, groupIndex));
+        mIpv4PrimaryDnsAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(5, groupIndex));
+        mIpv4SecondaryDnsAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(6, groupIndex));
+    } else if (index == 1) {
+        // IPv6 settings group
+        mIpv6DnsAddressAutomaticWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(0, groupIndex));
+        mIpv6PrimaryDnsAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(1, groupIndex));
+        mIpv6SecondaryDnsAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(2, groupIndex));    
+    } else {
+        // Proxy settings group
+        mProxyServerAddressWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(0, groupIndex));
+        mProxyPortNumberWidget = subGetWidgetByIndex(
+            mTestViewAdvanced->mForm,
+            iterator.index(1, groupIndex));
+    }
+}
+
+/**
+ * Gets an UI widget from HbDataForm by index. 
+ */
+HbWidget *TestCpWlanApPlugin::subGetWidgetByIndex(
+    HbDataForm *form,
+    const QModelIndex &index)
+{
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (form->itemByIndex(index));
+    HbWidget *widget = viewItem->dataItemContentWidget();
+    //QString widgetClassName(widget->metaObject()->className());
+    //qDebug() << widgetClassName;
+    return widget;
+}
+
+/**
+ * Verifies that given string is correctly stored in CommsDat and shown on UI. 
+ */
+void TestCpWlanApPlugin::subVerifyString(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    HbDataFormModelItem *item,
+    QString expected)
+{
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    QString commsdat = connectionMethod->getStringAttribute(attribute);
+
+    QCOMPARE(commsdat, expected);
+
+    // Get value from UI widget
+    QString widget = item->contentWidgetData("text").toString();
+
+    QCOMPARE(widget, expected);
+}
+
+/**
+ * Verifies that given attribute contains expected integer value in CommsDat. 
+ */
+void TestCpWlanApPlugin::subVerifyUint(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    uint expected)
+{
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    uint commsdat = connectionMethod->getIntAttribute(attribute);
+    
+    QCOMPARE(commsdat, expected);
+}
+
+/**
+ * Verifies that WLAN network status in CommsDat is correct.
+ */
+void TestCpWlanApPlugin::subVerifyNetworkStatus(
+    NetworkStatus expected)
+{
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    bool commsdatScanSsid = connectionMethod->getBoolAttribute(
+        CMManagerShim::WlanScanSSID);
+    
+    if (expected == HiddenStatus) {
+        QVERIFY(commsdatScanSsid == true);
+    } else if (expected == PublicStatus) {
+        QVERIFY(commsdatScanSsid == false);
+    } else {
+        Q_ASSERT(false);
+    }
+}
+
+/**
+ * Clears a HbLineEdit.
+ */
+void TestCpWlanApPlugin::subClearLineEdit(
+    uint length)
+{
+    // Move cursor to end of string
+    //HbAutoTest::keyClick(mMainWindow, Qt::Key_End, Qt::ControlModifier, waitTime); // doesn't seem to do anything? 
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    HbAutoTest::keyClick(mMainWindow, Qt::Key_Down, 0, waitTime);
+    for (int i=0; i<25; i++) {
+        HbAutoTest::keyClick(mMainWindow, Qt::Key_Right, 0, waitTime);
+    }
+    // Erase string
+    for (int i=0; i<length; i++) {
+        HbAutoTest::keyClick(mMainWindow, Qt::Key_Backspace, 0, waitTime);
+    }
+}
+
+/**
+ * Creates the settings view and shows it.
+ */
+void TestCpWlanApPlugin::subCreateSettingsView(uint connectionMethodId)
+{
+    // Create settings view
+    HbView *view = mPlugin->createSettingView(connectionMethodId);
+    QVERIFY(view != NULL);
+    
+    // Display the view
+    mMainWindow->addView(view);
+    mMainWindow->setCurrentView(view);
+    // Store pointer to settings view class
+    mTestView = static_cast<CpWlanApView *>(view);    
+}
+
+/**
+ * Clicks a widget currently on UI by class name.
+ */
+void TestCpWlanApPlugin::subClickWidget(const QString &name)
+{
+    QList<QGraphicsItem *> itemList = mMainWindow->scene()->items();
+
+    QGraphicsItem *target = 0;
+    foreach (QGraphicsItem* item, itemList) {
+        if (item->isWidget()) {
+            QString widgetClassName(static_cast<QGraphicsWidget*>(item)->metaObject()->className());
+            //qDebug() << widgetClassName;
+            
+            if (widgetClassName == name) {
+                target = item;
+                break;
+            }
+        }
+    }
+
+    Q_ASSERT(target);
+    HbAutoTest::mouseClick(mMainWindow, static_cast<HbWidget *>(target));
+}
+
+/**
+ * Returns the middle point of a widget.
+ */
+QPointF TestCpWlanApPlugin::subMiddlePointOfWidget(const HbWidget *widget)
+{
+    QRectF widgetRect = widget->rect();
+    QRectF widgetSceneRect = widget->mapRectToScene(widgetRect);
+    qreal middleX = ((widgetSceneRect.right() - widgetSceneRect.left()) / 2) + widgetSceneRect.left();
+    qreal middleY = ((widgetSceneRect.bottom() - widgetSceneRect.top()) / 2) + widgetSceneRect.top();
+    
+    return QPointF(middleX, middleY);
+}
+
+/**
+ * Verifies that given attribute contains expected boolean value in CommsDat. 
+ */
+void TestCpWlanApPlugin::subVerifyBool(
+    CMManagerShim::ConnectionMethodAttribute attribute,
+    bool expected)
+{
+    // Read attribute value from CommsDat
+    QScopedPointer<CmManagerShim> cmManager(new CmManagerShim);
+    QScopedPointer<CmConnectionMethodShim> connectionMethod( 
+        cmManager->connectionMethod(testApId));
+    bool commsdat = connectionMethod->getBoolAttribute(attribute);
+    
+    QCOMPARE(commsdat, expected);
+}
+
+/**
+ * Scrolls the tested view to the bottom.
+ */
+void TestCpWlanApPlugin::subScrollToBottom()
+{
+    // Scroll to the bottom of the view
+    HbAutoTest::mousePress(mMainWindow, mTestView, scrollMiddle);
+    QTest::qWait(1000);
+    HbAutoTest::mouseMove(mMainWindow, mTestView, scrollTop);
+    HbAutoTest::mouseRelease(mMainWindow, mTestView, scrollTop);
+}
+
+/**
+ * Scrolls the tested view to the top.
+ */
+void TestCpWlanApPlugin::subScrollToTop()
+{
+    // Scroll to the top of the view
+    HbAutoTest::mousePress(mMainWindow, mTestView, scrollMiddle);
+    QTest::qWait(1000);
+    HbAutoTest::mouseMove(mMainWindow, mTestView, scrollBottom);
+    HbAutoTest::mouseRelease(mMainWindow, mTestView, scrollBottom);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Control Panel WLAN AP plugin unit testing.
+*/
+
+#include <QStringList>
+#include <QtTest/QtTest>
+#include <cmmanagerdefines_shim.h>
+
+class HbWidget;
+class HbDialog;
+class HbMainWindow;
+class HbAutoTestMainWindow;
+class HbDataForm;
+class HbDataFormModelItem;
+class HbDataFormViewItem;
+class HbAction;
+class CpWlanApView;
+class CpWlanApAdvancedView;
+class CpBearerApPluginInterface;
+
+enum NetworkStatus {
+    HiddenStatus,
+    PublicStatus
+};
+
+class TestCpWlanApPlugin : public QObject
+{
+    Q_OBJECT
+
+    signals:
+        // Test signals
+        void menuActionTriggered(HbAction *);
+    
+    public slots:
+        // Test framework functions
+        void initTestCase();
+        void cleanupTestCase();
+        void init();
+        void cleanup();
+
+    private slots:
+        // Test cases
+        void tcChangeConnectionName();
+        void tcChangeConnectionName_data();
+        void tcConnectionNameEmpty();
+        void tcChangeWlanNetworkName();
+        void tcChangeWlanNetworkName_data();
+        void tcWlanNetworkNameEmpty();
+        void tcChangeNetworkStatus();
+        void tcChangeNetworkMode();
+        void tcChangeSecurityMode();
+        void tcScrollToBottom();
+        void tcGetUiWidgets();
+        void tcChangeHomepage();
+        void tcChangeHomepage_data();
+        void tcOpenAdvancedSettingsView();
+        void tcExpandIpv4SettingsAndGetUiWidgets();
+        void tcEnableAutomaticIpv4Address();
+        void tcEnableUserDefinedIpv4Address();
+        void tcChangeIpAddress();
+        void tcChangeIpAddress_data();
+        void tcChangeSubnetMask();
+        void tcChangeSubnetMask_data();
+        void tcInvalidSubnetMask();
+        void tcChangeGateway();
+        void tcChangeGateway_data();
+        void tcInvalidGateway();
+        void tcScrollToBottom2();
+        void tcEnableAutomaticIpv4DnsAddress();
+        void tcEnableUserDefinedIpv4DnsAddress();
+        void tcChangeIpv4DnsAddress();
+        void tcChangeIpv4DnsAddress_data();
+        void tcInvalidIpv4DnsAddress();
+        void tcScrollToTop();
+        void tcCollapseIpv4Settings();
+        void tcExpandIpv6SettingsAndGetUiWidgets();
+        void tcEnableAutomaticIpv6DnsAddress();
+        void tcEnableWellKnownIpv6DnsAddress();
+        void tcEnableUserDefinedIpv6DnsAddress();
+        void tcChangeIpv6DnsAddress();
+        void tcChangeIpv6DnsAddress_data();
+        void tcInvalidIpv6DnsAddress();
+        void tcCollapseIpv6Settings();
+        void tcExpandProxySettingsAndGetUiWidgets();
+        void tcChangeProxyServerAddress();
+        void tcChangeProxyServerAddress_data();
+        void tcChangeProxyPortNumber();
+        void tcChangeProxyPortNumber_data();
+        void tcInvalidProxyPortNumber();
+        void tcCollapseProxySettings();
+        void tcCloseAdvancedSettingsView();
+
+    private:
+        // Sub test cases
+        void subGetUiWidgets();
+        void subGetAdvancedUiWidgets(uint index);
+        HbWidget *subGetWidgetByIndex(
+            HbDataForm *form,
+            const QModelIndex &index);
+        void subVerifyString(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            HbDataFormModelItem *item,
+            QString expected);
+        void subVerifyUint(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            uint expected);
+        void subVerifyNetworkStatus(
+            NetworkStatus expected);
+        void subClearLineEdit(uint length);
+        void subCreateSettingsView(uint connetionMethodId);
+        void subClickWidget(const QString &name);
+        QPointF subMiddlePointOfWidget(const HbWidget *widget);
+        void subVerifyBool(
+            CMManagerShim::ConnectionMethodAttribute attribute,
+            bool expected);
+        void subScrollToBottom();
+        void subScrollToTop();
+
+    private:
+        // Code references
+        CpWlanApView *mTestView;
+        CpWlanApAdvancedView *mTestViewAdvanced;
+        // "Access point settings" UI widgets
+        HbWidget *mConnectionNameWidget;
+        HbWidget *mWlanNetworkNameWidget;
+        HbWidget *mNetworkStatusWidget;
+        HbWidget *mNetworkModeWidget;
+        HbWidget *mSecurityModeWidget;
+        HbWidget *mHomepageWidget;
+        // "Advanced settings" UI widgets
+        HbDataFormViewItem *mIpv4GroupViewItem;
+        HbDataFormViewItem *mIpv6GroupViewItem;
+        HbDataFormViewItem *mProxyGroupViewItem;
+        HbWidget *mIpv4AddressAutomaticWidget;
+        HbWidget *mIpv4AddressWidget;
+        HbWidget *mIpv4SubnetMaskWidget;
+        HbWidget *mIpv4GatewayWidget;
+        HbWidget *mIpv4DnsAddressAutomaticWidget;
+        HbWidget *mIpv4PrimaryDnsAddressWidget;
+        HbWidget *mIpv4SecondaryDnsAddressWidget;
+        HbWidget *mIpv6DnsAddressAutomaticWidget;
+        HbWidget *mIpv6PrimaryDnsAddressWidget;
+        HbWidget *mIpv6SecondaryDnsAddressWidget;
+        HbWidget *mProxyServerAddressWidget;
+        HbWidget *mProxyPortNumberWidget;
+        
+        // Test data
+        HbAutoTestMainWindow *mMainWindow;
+        QPluginLoader *mPluginLoader;
+        CpBearerApPluginInterface *mPlugin;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/testcpwlanapplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for Control Panel WLAN AP plugin unit tests.
+
+TEMPLATE = app
+
+TARGET = testcpwlanapplugin
+
+CONFIG += hb qtestlib
+
+INCLUDEPATH += . ../../inc
+DEPENDPATH += .
+
+HEADERS += \
+    hbautotest.h \
+    testcpwlanapplugin.h
+SOURCES += \
+    hbautotest.cpp \
+    testcpwlanapplugin.cpp
+
+LIBS += \
+    -lcpwlanapplugin \
+    -lconnection_settings_shim
+
+symbian: {
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/tools/commsdat_restore.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for restoring backup of commsdat.
+
+copy backup\cccccc00.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/tools/commsdat_set.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem Script for setting test commsdat.
+
+md backup
+copy \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre backup\
+copy default.cre \epoc32\winscw\c\private\10202be9\persists\cccccc00.cre
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpwlanapplugin/tsrc/ut/tools/cpwlanapplugin_ctc.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,89 @@
+::
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+:: Script running Control Panel WLAN AP plugin test cases with CTC analysis.
+
+@echo off
+
+:: -----------------------------------------------------------------------------
+:: Instructions
+:: -----------------------------------------------------------------------------
+:: 
+:: Remember to use the test CommsDat that can be set and restored with the
+:: helper scripts:
+:: - commsdat_set.bat
+:: - commsdat_restore.bat
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+:: Control Panel WLAN AP plugin base directory
+set cpwlanapplugin_dir=..\..\..
+pushd %cpwlanapplugin_dir%
+
+:: CTC instrumentation excludes
+set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp
+
+
+::-----------------------------------------------------------------------------
+:: Remove old coverage data
+::-----------------------------------------------------------------------------
+
+echo Cleaning up...
+del MON.* ctcerr.txt profile.txt
+rd /s /q CTCHTML
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build & instrument code
+::-----------------------------------------------------------------------------
+
+echo Building code and instrumenting..
+call del MON.* ctcerr.txt profile.txt
+call make distclean
+call qmake
+call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Build test code
+::-----------------------------------------------------------------------------
+
+echo Building test code...
+call cd tsrc\ut
+call make distclean
+call qmake
+call sbs -c winscw_udeb
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Execute the tests
+::-----------------------------------------------------------------------------
+
+echo Running tests..
+cd ..\..
+call \epoc32\release\winscw\udeb\testcpwlanapplugin.exe
+echo ...done
+
+::-----------------------------------------------------------------------------
+:: Create coverage results
+::-----------------------------------------------------------------------------
+
+echo Creating results...
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
+echo ...done
+
+popd
Binary file cmmanager/cpwlanapplugin/tsrc/ut/tools/default.cre has changed
--- a/cmmanager/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/cmmanager/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -27,4 +27,3 @@
 // None
 
 #include "../cmmgr/group/bld.inf"
-#include "../gsconnsettingsplugin/group/bld.inf"
\ No newline at end of file
--- a/cmmanager/gsconnsettingsplugin/data/200255B8.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:    ECOM resource file for Connectivity Settings plugin.
-*
-*/
-
-#include <registryinfo.rh>
-
-
-RESOURCE REGISTRY_INFO theInfo
-	{
-	dll_uid     = 0x200255B8;
-	interfaces  = 
-		{
-		INTERFACE_INFO
-			{
-			interface_uid   = 0x10207236;
-			implementations = 
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid  = 0x200255B9;
-					version_no          = 1;
-					display_name        = "Connectivity Settings Plugin"; // Debug name
-					default_data        = "0x10207250";// Parent UID
-					opaque_data         = "69";// Order number
-					}
-				};
-			}
-		};
-	}
-
--- a/cmmanager/gsconnsettingsplugin/data/gsconnsettingspluginrsc.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,515 +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:    Resource file for Connectivity Settings plugin.
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME    CNST // 4 letter ID
-
-//  INCLUDES
-#include    "gsconnsettingsplugin.hrh"
-#include    <gsconnsettingsplugin.loc>
-#include    <data_caging_paths_strings.hrh>
-#include    <avkon.loc> // Avkon localized strings
-#include    <avkon.rh>
-#include    <avkon.mbg>
-#include    <avkon.rsg>
-#include    <eikon.rh>
-#include    <EIKCORE.rsg>
-#include    <eikon.rsg>
-#include    <gscommon.rh>
-#include    <GSApp.rsg>
-#include    <gs.loc> // Common localized GS strings
-#include    <uikon.rh>
-
-
-// CONSTANTS
-
-//  RESOURCE DEFINITIONS
-
-//----------------------------------------------------
-//
-//    Needed or loading the resource fails!
-//
-//----------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// r_setting_listbox
-// Common listbox editor resource for setting pages.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_setting_listbox
-    {
-    flags = EEikListBoxMultipleSelection;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// r_gs_conn_settings_menubar_open_exit
-// GS menu with 'Open', 'Help' and 'Exit'items.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_gs_conn_settings_menubar_open_exit
-    {
-    titles =
-        {
-        MENU_TITLE
-            {
-            menu_pane = r_gs_conn_settings_menu_item_exit;
-            },
-        MENU_TITLE
-            {
-            menu_pane = r_gs_conn_settings_menu_item_help;
-            },
-        MENU_TITLE
-            {
-            menu_pane = r_gs_conn_settings_menu_item_open;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-// r_gs_conn_settings_menu_item_open
-// Resource for 'Open' or 'Change' text in menu 
-//
-//----------------------------------------------------
-
-RESOURCE MENU_PANE r_gs_conn_settings_menu_item_open
-     {
-     items =
-         {
-         MENU_ITEM
-             {
-             command = EGSConnSettMenuOpen;
-             txt = qtn_set_options_open;
-             flags = EEikMenuItemAction;
-             },
-         MENU_ITEM
-             {
-             command = EGSConnSettMenuChange;
-             txt = qtn_set_options_change;
-             flags = EEikMenuItemAction;
-             }
-         };
-     }
- 
-// -----------------------------------------------------------------------------
-//
-// r_gs_conn_settings_menu_item_exit
-// Resource for 'Exit' text in menu
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_gs_conn_settings_menu_item_exit
-     {
-     items =
-         {
-         MENU_ITEM
-             {
-             command = EAknCmdExit;
-             txt = qtn_options_exit;
-             }
-         };
-     }
-
-// -----------------------------------------------------------------------------
-//
-// r_gs_conn_settings_menu_item_help
-// Resource for 'Help' text in menu
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_gs_conn_settings_menu_item_help
-     {
-     items =
-         {
-         MENU_ITEM
-             {
-             command = EAknCmdHelp;
-             txt = qtn_options_help;
-             }
-         };
-     }
-
-//----------------------------------------------------
-//
-// r_gs_conn_settings_plugin_view
-// Resource for the main view of Connectivity Settings plugin
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_gs_conn_settings_plugin_view
-    {
-    menubar = r_gs_conn_settings_menubar_open_exit;
-    cba = r_gs_conn_settings_softkeys_options_back_open;
-    }
-
-//----------------------------------------------------
-//
-// r_gs_conn_settings_softkeys_options_back_open
-// Resource for the main view buttons
-//
-//----------------------------------------------------
-//
-RESOURCE CBA r_gs_conn_settings_softkeys_options_back_open
-     {
-     buttons =
-         {
-         CBA_BUTTON 
-             {
-             id=EAknSoftkeyOptions; 
-             txt = text_softkey_option;
-             },
-         CBA_BUTTON 
-             {
-             id=EAknSoftkeyBack; 
-             txt = text_softkey_back; 
-             },
-         CBA_BUTTON 
-             {
-             id=EGSConnSettMskGeneral;
-             txt = qtn_msk_open;
-             }
-         };
-     }
-
-//----------------------------------------------------
-//
-// r_gs_conn_settings_plugin_view_title
-// Connectivity Settings plugin view title.
-//
-//----------------------------------------------------
-//
-RESOURCE TITLE_PANE r_gs_conn_settings_plugin_view_title
-    {
-    txt = qtn_occ_title_connectivity_settings;
-    }
-
-//----------------------------------------------------
-//
-// r_gs_conn_settings_view_caption
-// Plugin name in Connectivity folder
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_gs_conn_settings_view_caption
-    {
-    buf = qtn_set_folder_occ_connectivity_settings;
-    }
-
-//----------------------------------------------------
-//    
-// r_conn_settings_lbx    
-// Resource for main view listbox.
-//
-//----------------------------------------------------
-//
-RESOURCE GS_FEATURE_ARRAY r_conn_settings_lbx
-    {
-    items =
-        {
-        GS_FEATURE
-            {
-            txt = " \t"qtn_occ_sett_usage_of_wlan"\t\t"; 
-            item = EGSSettIdUsageOfWlan;
-            type = EGSListBoxItemTypeIsAlwaysVisible;            
-            },
-        GS_FEATURE
-            {
-            txt = " \t"qtn_occ_sett_data_usage_home_nw"\t\t"; 
-            item = EGSSettIdDataUsageHomeNw;
-            type = EGSListBoxItemTypeIsAlwaysVisible;            
-            },
-        GS_FEATURE
-            {
-            txt = " \t"qtn_occ_sett_data_usage_abroad"\t\t"; 
-            item = EGSSettIdDataUsageAbroad;
-            type = EGSListBoxItemTypeIsAlwaysVisible;            
-            }
-        };    
-    }
-
-//----------------------------------------------------
-//    
-// r_conn_settings_lbx_nowlan
-// Resource for main view listbox.
-//
-//----------------------------------------------------
-//
-RESOURCE GS_FEATURE_ARRAY r_conn_settings_lbx_nowlan
-    {
-    items =
-        {
-        GS_FEATURE
-            {
-            txt = " \t"qtn_occ_sett_data_usage_home_nw"\t\t"; 
-            item = EGSSettIdDataUsageHomeNw;
-            type = EGSListBoxItemTypeIsAlwaysVisible;            
-            },
-        GS_FEATURE
-            {
-            txt = " \t"qtn_occ_sett_data_usage_abroad"\t\t"; 
-            item = EGSSettIdDataUsageAbroad;
-            type = EGSListBoxItemTypeIsAlwaysVisible;            
-            }
-        };    
-    }
-
-//----------------------------------------------------
-//    
-//    r_conn_settings_lbx_txt
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_conn_settings_lbx_txt
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_usage_of_wlan;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-//    r_conn_settings_lbx_txt_nowlan
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_conn_settings_lbx_txt_nowlan
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_usage_of_new_wlan_setting_page_lbx
-// Resource for "Join new WLAN networks" listbox items
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_usage_of_wlan_setting_page_lbx
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_usage_of_wlan_known;
-            },                                       
-        LBUF
-            {
-            txt = qtn_occ_sett_usage_of_wlan_manual;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_abroad_setting_page
-// Resource for "" setting page
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_data_usage_abroad_setting_page
-    {
-    number = EAknSettingPageNoOrdinalDisplayed; 
-    label = qtn_occ_sett_data_usage_abroad;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EAknSetListBox;
-    editor_resource_id = r_setting_listbox;
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_abroad_setting_page_lbx
-// Resource for "" listbox items
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_data_usage_abroad_setting_page_lbx
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_automatic;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_confirm;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_wlan_only;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_abroad_setting_page_lbx_nowlan
-// Resource for "" listbox items
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_data_usage_abroad_setting_page_lbx_nowlan
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_automatic;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_confirm;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_abroad_disabled;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_home_nw_setting_page
-// Resource for "" setting page
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_data_usage_home_nw_setting_page
-    {
-    number = EAknSettingPageNoOrdinalDisplayed; 
-    label = qtn_occ_sett_data_usage_home_nw;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EAknSetListBox;
-    editor_resource_id = r_setting_listbox;
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_home_nw_setting_page_lbx
-// Resource for "" listbox items
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_data_usage_home_nw_setting_page_lbx
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_automatic;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_confirm;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_wlan_only;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_data_usage_home_nw_setting_page_lbx_nowlan
-// Resource for "" listbox items
-//
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_data_usage_home_nw_setting_page_lbx_nowlan
-    {
-    items =
-        {
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_automatic;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_confirm;
-            },
-        LBUF
-            {
-            txt = qtn_occ_sett_data_usage_home_nw_disabled;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// r_gs_conn_settings_msk_label_open
-// "Open" text resource for MSK label 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_gs_conn_settings_msk_label_open
-    {
-    buf = qtn_set_options_open;
-    }
-
-//----------------------------------------------------
-//    
-// r_gs_conn_settings_msk_label_change
-// "Change" text resource for MSK label
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_gs_conn_settings_msk_label_change
-    {
-    buf = qtn_set_options_change;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// r_gs_conn_settings_rsk_label_exit
-// Exit text for RSK
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_gs_conn_settings_rsk_label_exit { buf = text_softkey_exit; }
-
-// End of file
--- a/cmmanager/gsconnsettingsplugin/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file provides the information required for building
-*               Connectivity Settings plugin
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../rom/gsconnsettingsplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH( gsconnsettingsplugin.iby )
-../rom/gsconnsettingspluginresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( gsconnsettingspluginresources.iby )
-
-../loc/gsconnsettingsplugin.loc MW_LAYER_LOC_EXPORT_PATH( gsconnsettingsplugin.loc )
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-  OPTION TARGETFILE gsconnsettingsplugin.mif
-  OPTION HEADERFILE gsconnsettingsplugin.mbg
-  /* Using Connectivity plugin icon. Should be changed when correct (qgn_prop_cp_conn_settings) icon available */
-  OPTION SOURCES -c8,8 qgn_prop_cp_conn
-END
-
-PRJ_MMPFILES
-gsconnsettingsplugin.mmp
-
-PRJ_TESTMMPFILES
-
-//  End of File
--- a/cmmanager/gsconnsettingsplugin/group/gsconnsettingsplugin.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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:    Resource file for plugin.
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-CAPABILITY          CAP_ECOM_PLUGIN
-TARGET              gsconnsettingsplugin.dll
-TARGETTYPE          PLUGIN
-UID                 0x10009D8D 0x200255B8
-VENDORID            VID_DEFAULT
-
-
-USERINCLUDE         ../inc
-USERINCLUDE         ../data
-USERINCLUDE         ../loc
-USERINCLUDE         ../traces
-
-SYSTEMINCLUDE       /epoc32/include/ecom
-// Default system include paths for middleware layer modules.
-MW_LAYER_SYSTEMINCLUDE
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-APP_LAYER_SYSTEMINCLUDE
-#endif
-
-SOURCEPATH          ../src
-
-SOURCE              gsconnsettingspluginimpltable.cpp 
-SOURCE              gsconnsettingsplugin.cpp
-SOURCE              gsconnsettingsplugincontainer.cpp
-SOURCE              gsconnsettingspluginmodel.cpp gsconnsettingsselectiondlg.cpp
-
-START RESOURCE ../data/200255B8.rss
-	TARGET gsconnsettingsplugin.rsc
-END
-
-// View resources
-START RESOURCE ../data/gsconnsettingspluginrsc.rss
-DEPENDS gsapp.rsg
-	HEADER
-	TARGETPATH RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
-LIBRARY             egul.lib
-LIBRARY             aknskins.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             commonengine.lib// For RConeResourceLoader
-LIBRARY             GSEcomPlugin.lib
-LIBRARY             GSFramework.lib
-LIBRARY             GSListBox.lib         // For CGSListBoxItemTextArray
-LIBRARY             FeatMgr.lib           // Feature manager
-LIBRARY             hlplch.lib            // for "Help" options menu
-LIBRARY             cmmanager.lib
-
-//Documents. Defining these is optional. Used only by IDE's file browser.
-//DOCUMENT            ./gsconnsettingspluginicons.mk
-
-DOCUMENT ../data/200255B8.rss
-DOCUMENT ../data/gsconnsettingspluginrsc.rss
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsmskobserver.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  MSK key event observer interface
-*
-*/
-
-
-#ifndef GSCONNSETTINGSMSKOBSERVER_H
-#define GSCONNSETTINGSMSKOBSERVER_H
-
-// INCLUDES
-#include <e32base.h>
-
-// Middle Softkey control ID.
-const TInt KGSConnSettingsMSKControlID = 3;
-
-/**
- *  Interface for MSK label change observers. 
- *
- *  @lib gsconnsettingsplugin.lib
- *  @since S60 5.0
- */
-NONSHARABLE_CLASS( MGSConnSettingsMskObserver )
-    {
-    public:
-        /**
-         * Notification to this observer to change MSK label if needed
-         */
-         virtual void CheckMiddleSoftkeyLabelL() = 0;
-    };
-
-#endif //GSCONNSETTINGSMSKOBSERVER_H
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +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:    Header file for Connectivity Settings plugin.
-*
-*/
-
-
-#ifndef GSCONNSETTINGSPLUGIN_H
-#define GSCONNSETTINGSPLUGIN_H
-
-// Includes
-#include <gspluginloader.h>
-#include <gsbaseview.h>
-#include "gsconnsettingsmskobserver.h"
-
-#include <aknview.h>
-#include <eikclb.h>
-
-// Classes referenced
-class CAknViewAppUi;
-class RConeResourceLoader;
-class CGSConnSettingsPluginModel;
-class CGSConnSettingsPluginContainer;
-
-// Constants
-
-//Should we put these to .hrh 
-// This UID is used for both the view UID 
-// and the ECOM plugin implementation ID.
-const TUid KGSConnSettingsPluginUid = { 0x200255B9 };
-const int KGConnSettingsPluginCount = 10;
-
-_LIT( KGSConnSettingsPluginResourceFileName, "z:gsconnsettingspluginrsc.rsc" );
-_LIT( KGSConnSettingsPluginIconDirAndName, "z:gsconnsettingsplugin.mbm"); // Use KDC_BITMAP_DIR
-
-// CLASS DECLARATION
-
-/**
-* CConnSettingsPlugin view class.
-*
-* @since Series60_3.1
-*/
-class CGSConnSettingsPlugin : public CGSBaseView, public MGSPluginLoadObserver, public MGSConnSettingsMskObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Symbian OS two-phased constructor
-        * @return
-        */
-        static CGSConnSettingsPlugin* NewL( TAny* aInitParams );
-
-        /**
-        * Destructor.
-        */
-        ~CGSConnSettingsPlugin();
-
-// From CAknView
-
-        /**
-        * See base class.
-        */
-        TUid Id() const;
-        
-        /**
-        * Handles commands.
-        * @param aCommand Command to be handled.
-        * 
-        */
-        void HandleCommandL( TInt aCommand );
-        
-
-        /**
-        * See base class.
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                          TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-        /**
-        * See base class.
-        */
-        void DoDeactivate();
-        
-        /**
-        * See base class.
-        */
-        void HandleForegroundEventL( TBool aForeground );  
-
-        
-        /**
-        * From MEikMenuObserver.
-        * Changes MenuPane dynamically.
-        */
-        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-        
-// From CGSParentPlugin
-
-        /**
-        * See base class.
-        */
-        TUid UpperLevelViewUid();
-
-        
-        /**
-        * See base class.
-        */
-        void GetHelpContext( TCoeHelpContext& aContext );
-
-// From CGSPluginInterface
-
-        /**
-        * See base class.
-        */
-        void GetCaptionL( TDes& aCaption ) const;
-
-        /**
-        * See base class.
-        */
-        CGulIcon* CreateIconL( const TUid aIconType );
-
-        /**
-        * See base class.
-        */
-        TInt PluginProviderCategory() const;
-
-        /**
-        * @see MGSPluginLoadObserver header file.
-        */
-        void HandlePluginLoaded( KGSPluginLoaderStatus aStatus );
-
-        
-        /**
-        * Updates listbox's item's value.
-        * @param aItemId An item which is updated.
-        * 
-        */
-        void UpdateListBoxL( TInt aItemId );
-
-        /**
-        * Get CGSConnSettingsPlugin's ccontainer.
-        */
-        CGSConnSettingsPluginContainer* Container();
-                
-        /**
-         * From MGSSensorMskObserver.
-         * Checks currently activated item in list and updates MSK label if needed
-         */
-        void CheckMiddleSoftkeyLabelL();
-        
-        /**
-         * From MEikListBoxObserver (through CGSBaseView)
-         */
-        void HandleListBoxEventL( CEikListBox* aListBox,
-                    TListBoxEvent aEventType );
-        
-        
-    protected: // New
-        /**
-        * C++ default constructor.
-        */
-        CGSConnSettingsPlugin();
-
-        /**
-        * Symbian OS default constructor.
-        */
-        void ConstructL();
-        
-    private:
-
-        void NewContainerL();
-        
-        /**
-         * From CGSBaseView. Handles list box selection
-         */
-        void HandleListBoxSelectionL();
-
-        /**
-        * Show "Join new WLAN networks" setting page
-        */
-        void ShowUsageOfWlanSettingPageL();
-        
-        /**
-        * Show "Cellular data usage abroad" setting page
-        */
-        void ShowDataUsageAbroadSettingPageL();
-        
-        /**
-        * Show "Cellular data usage in home network" setting page
-        */
-        void ShowDataUsageInHomeNwSettingPageL();
-        
-        /**
-         * Removes current label from MSK
-         */
-        void RemoveCommandFromMSK();
-
-        /**
-         * Adds new label for MSK
-         *
-         * @param aResourceId Text of the new label
-         * @param aCommandId Command id of the MSK
-         */
-        void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId );       
-        
-        
-    private: //Private data
-
-        /**
-         * Resource loader
-         */
-        RConeResourceLoader iResourceLoader;
-
-        /**
-         * Pointer to model.
-         * Owned by CGSConnSettingsPluginContainer
-         */
-        CGSConnSettingsPluginModel *iModel;
-
-        /**
-         * Asynchronous loader for the GS plug-ins.
-         */
-        CGSPluginLoader* iPluginLoader;
-        
-        /**
-         * Array of the child plugins
-         */
-        CArrayPtrFlat<CGSPluginInterface>* iPluginArray;
-
-        /**
-         * Flag is set when wlan is supported
-         */
-        TBool iIsWlanSupported;
-        
-        /**
-         * Flag is uised to ignore duplicate Window's events
-         */
-        TBool iProcessing;
-    };
-
-
-#endif // GSCONNSETTINGSPLUGIN_H
-// End of File
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +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:  Contains common definitions for Connectivity Settings plugin
-*
-*/
-
-
-#ifndef GSCONNECTIVITYSETTINGSPLUGIN_HRH
-#define GSCONNECTIVITYSETTINGSPLUGIN_HRH
-
-// commands
-enum TMenuCommands
-    {     // GS plugin commands starts from 500
-    EGSConnSettMenuOpen = 550, // Menu command Open
-    EGSConnSettMenuChange,     // Menu command change
-    EGSConnSettMskGeneral,     // MSK general in main view. Can be either 'Change' or 'Open'
-    EGSConnSettMenuExit        // 'Exit' menu command. Overridden to take control of exit
-    };
-
-// Main view item identifiers
-enum {
-    EGSSettIdUsageOfWlan,
-    EGSSettIdDataUsageHomeNw,
-    EGSSettIdDataUsageAbroad,
-    EGSExtPluginsListItemId
-    };
-
-//Indexes for usage of new WLAN values
-//These have to match to the order of r_usage_of_wlan_setting_page_lbx
-//resource in gsconnsettingsplugin.rss
-enum {
-    EUsageOfWlanKnown = 0,
-    EUsageOfNewWlanManual = 1
-    };
-
-//Indexes for data usage abroad values
-//These have to match to the order of r_data_usage_abroad_setting_page_lbx
-//resource in gsconnsettingsplugin.rss
-enum {
-    EDataUsageAbroadAutomatic = 0,
-    EDataUsageAbroadConfirm = 1,
-    EDataUsageAbroadWlanOnly = 2,
-    EDataUsageAbroadDisabled = 3
-    };
-
-//Indexes for data usage in home NW values
-//These have to match to the order of r_data_usage_home_nw_setting_page_lbx
-//resource in gsconnsettingsplugin.rss
-enum {
-    EDataUsageHomeNwAutomatic = 0,
-    EDataUsageHomeNwConfirm = 1,
-    EDataUsageHomeNwWlanOnly = 2,
-    EDataUsageHomeNwDisabled = 3
-    };
-
-#endif //  GSCONNECTIVITYSETTINGSPLUGIN_HRH
-
-//End of File
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +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:  Container for the Connectivity Settings Plugin
-*
-*/
-
-
-#ifndef GSCONNSETTINGSPLUGINCONTAINER_H
-#define GSCONNSETTINGSPLUGINCONTAINER_H
-
-// INCLUDES
-#include "gsconnsettingspluginmodel.h"
-#include <gsbasecontainer.h>
-
-
-// CONSTANTS
-
-// MACROS
-
-// DATA TYPES
-
-// FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-class CGSListBoxItemTextArray;
-class CGSPluginInterface;
-class MGSConnSettingsMskObserver;
-
-// CLASS DECLARATION
-
-/**
-*  GSConnSettingsPluginContainer container class
-*
-*  Container class for Connectivity Settings plugin view
-*  @lib gsconnsettingsplugin.lib
-*  @since Series 60_3.1
-*/
-class CGSConnSettingsPluginContainer : public CGSBaseContainer
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Symbian OS constructor.
-        * @param aRect Listbox's rect.
-        * 
-        */
-        void ConstructL( const TRect& aRect );
-        
-        /**
-        * Destructor.
-        */
-        ~CGSConnSettingsPluginContainer();
-        
-        /**
-        * Constructor
-        */
-        CGSConnSettingsPluginContainer( MGSConnSettingsMskObserver& aMskObserver );
-
-    public: //new
-
-        /**
-        * Updates listbox's item's value.
-        * @since Series 60_3.1
-        * @param aItemId An item which is updated.
-        */
-        void UpdateListBoxL( TInt aFeatureId );
-        
-        /**
-        * Retrieves the currently selected listbox feature id
-        * @since Series 60_3.1
-        * @return feature id.
-        */
-        TInt CurrentFeatureId() const;
-        
-        /**
-         * Return its member variable iMode
-         * @param
-         */
-        CGSConnSettingsPluginModel* Model();
-        
-        /**
-         * Finds user selected plugin from plugin array
-         *
-         * @return Plugin which is selected in the lbx or leaves 
-         * with KErrnotFound if no plugins exist.
-         */
-        CGSPluginInterface* SelectedPluginL();
-
-        /**
-         * Makes ECOM plugin item
-         */
-        void MakeECOMPluginItemL();
-
-        /**
-        * Sets iPluginArray member.
-        * @param aPluginArray Pointer to loaded ECOM plugin array
-        */
-        void SetPluginArray ( CArrayPtrFlat<CGSPluginInterface>* aPluginArray );
-        
-        
-    protected: // from CGSBaseContainer
-        void ConstructListBoxL( TInt aResLbxId );
-        
-    private: // new
-        // create listbox from resource
-        void CreateListBoxItemsL();
-
-        /**
-         * Adds items from iUsageOfWlanItems to main views list
-         */
-        void MakeUsageOfWlanNetworksItemL();
-                
-        /**
-         * Adds items from iDataUsageAbroadItems to main views list
-         */
-        void MakeDataUsageAbroadItemL();
-        
-        /**
-         * Adds items from iDataUsageHomeNwItems to main views list
-         */
-        void MakeDataUsageHomeNwItemL();
-        
-        /**
-         * From CGSBaseContainer. Constructs correct textformat for one list box item 
-         * and adds it in listbox
-         *
-         * @param aPos Position of text in listbox
-         * @param aFirstLabel Text in first row of listbox item
-         * @param aSecondLabel Text in second row of listbox item
-         */
-        void AppendListItemL( const TInt aPos, 
-                              const TDesC16& aFirstLabel, 
-                              const TDesC16& aSecondLabel );
-               
-        /**
-         * Handles changes in MSK label between item changes in listbox
-         */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-                        
-        /**
-         * Return list index according to wlan variation.
-         */
-        TInt Index( TInt aIndex );
-        
-        // from CGSBaseContainer
-        /**
-        * Required for help.
-        */
-        void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-    private: // Data
-        
-        /**
-        * This holds items from resource R_USAGE_OF_WLAN_SETTING_PAGE_LBX
-        */
-        CDesCArrayFlat* iUsageOfWlanItems;
-                
-        /**
-        * This holds items from resource R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX
-        */
-        CDesCArrayFlat* iDataUsageAbroadItems;
-        
-        /**
-        * This holds items from resource R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX
-        */
-        CDesCArrayFlat* iDataUsageHomeNwItems;
-        
-        /**
-         * Listbox item array.
-         */
-        CGSListBoxItemTextArray* iListboxItemArray;
-        
-        /**
-         * Listbox item text array. Contains listbox item texts
-         */
-        CDesCArray* iListBoxTextArray;
-               
-        /** 
-         * General list box items. Contains localized listbox texts
-         * from R_CONN_SETTINGS_LBX_TXT resource .
-         */
-        CDesCArrayFlat* iListItems;
-        
-        // plugin model
-        CGSConnSettingsPluginModel* iModel;        
-
-        /**
-         * Array of the child plugins. Owned by CGSConnSettingsPlugin.
-         */
-        CArrayPtrFlat<CGSPluginInterface>* iPluginArray;
-        
-        /**
-         * General item count. Used when calculating item indexes to ECOM plugins
-         */
-        TInt iGeneralItemCount;
-        
-        /**
-         * Reference to main view. Does not own
-         */
-        MGSConnSettingsMskObserver& iMskObserver;
-
-        /**
-         * Flag is set when wlan is supported
-         */
-        TBool iIsWlanSupported;              
-    };
-
-#endif //GSCONNSETTINGSPLUGINCONTAINER_H
-
-//End of File
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +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:  Display Settings model.
-*
-*/
-
-#ifndef GSCONNSETTINGSPLUGINMODEL_H
-#define GSCONNSETTINGSPLUGINMODEL_H
-
-#include <e32base.h>
-#include <cmgenconnsettings.h>
-
-class CGSConnSettingsPluginContainer;
-
-// CONSTANTS
-
-// MACROS
-
-// DATA TYPES
-
-// FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// CLASS DEFINITION
-/**
-*   CGSConnSettingsPluginModel is the model class of Connectivity Settings plugin.
-*  It provides functions to get and set setting values.
-*  @lib gsconnsettingsplugin.lib
-*  @since Series 60_3.1
-
-*/
-NONSHARABLE_CLASS( CGSConnSettingsPluginModel ): public CBase
-    {
-    public:  // Constructor and destructor
-        /**
-        * Two-phased constructor
-        */
-        static CGSConnSettingsPluginModel* NewL();
-
-        /**
-        * Destructor
-        */
-        ~CGSConnSettingsPluginModel();
-
-    public:
-        /**
-        * Loads settings by using CMManager's general connection settings API
-        */
-        void LoadSettingsL();
-
-        /**
-        * Saves settings by using CMManager's general connection settings API
-        */
-        void SaveSettingsL();
-
-        /**
-        * Gets and maps value from general connection settings API to match index in UI
-        * @return TInt
-        */ 
-        TInt UsageOfWlan();
-        
-        /**
-        * Gets and maps value from general connection settings API to match index in UI
-        * @return TInt
-        */ 
-        TInt DataUsageAbroad();
-
-        /**
-        * Gets and maps value from general connection settings API to match index in UI
-        * @return TInt
-        */ 
-        TInt DataUsageInHomeNw();
-
-        /**
-        * Maps UI index to according general connection setting API value
-        * @param aValue index to be mapped to API value
-        */
-        void SetUsageOfWlan( TInt aValue );
-        
-        /**
-        * Maps UI index to according general connection setting API value
-        * @param aValue index to be mapped to API value
-        */
-        void SetDataUsageAbroad( TInt aValue );
-
-        /**
-        * Maps UI index to according general connection setting API value
-        * @param aValue index to be mapped to API value
-        */
-        void SetDataUsageInHomeNw( TInt aValue );
-        
-        /**
-         * @param
-         */
-        void SetOwner( CGSConnSettingsPluginContainer* aPlugin);
-
-    private: // Private constructors
-
-        /**
-        * Default C++ contructor
-        */
-        CGSConnSettingsPluginModel();
-
-        /**
-        * Symbian OS default constructor
-        * @return void
-        */
-        void ConstructL();
-
-    private:
-        /**
-        * Pointer to container class
-        */
-        CGSConnSettingsPluginContainer* iContainer;
-
-        /**
-        * Struct to hold current settings
-        */
-        TCmGenConnSettings iSettings;
-        
-        /**
-         * Flag is set when wlan is supported
-         */
-        TBool iIsWlanSupported;
-        
-    };
-
-#endif //GSCONNSETTINGSPLUGINMODEL_H
-
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    Header file for CGSConnSettingsSelectionDlg class
-*
-*/
-
-#ifndef GSCONNSETTINGSSELECTIONDLG_H
-#define GSCONNSETTINGSSELECTIONDLG_H
-
-#include <aknradiobuttonsettingpage.h>
-
-class CGSConnSettingsSelectionDlg : public CAknRadioButtonSettingPage
-    {
-    
-public:
-    
-    /**
-     * Symbian OS two-phased constructor
-     * 
-     * @param aResourceID               Text at top of setting pane
-     * @param aCurrentSelectionIndex    Current slected item
-     * @param aItemArray                Pointer to array of loaded resource texts for radio buttons
-     * @return 
-     * 
-    */
-    static CGSConnSettingsSelectionDlg* NewL(TInt aResourceID, 
-            TInt& aCurrentSelectionIndex, 
-            const MDesCArray* aItemArray );
-    
-    /**
-     * C++ default constructor.
-     *
-     * @param aResourceID               Text at top of setting pane
-     * @param aCurrentSelectionIndex    Current slected item
-     * @param aItemArray                Pointer to array of loaded resource texts for radio buttons
-    */
-    CGSConnSettingsSelectionDlg( 
-            TInt aResourceID, 
-            TInt& aCurrentSelectionIndex, 
-            const MDesCArray* aItemArray );
-			
-    /**
-     * Destructor.
-     */
-    virtual ~CGSConnSettingsSelectionDlg();
-    
-private:
-
-    //From CAknListBoxSettingPage
-    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-    
-    //From CAknSettingPage
-    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
-
-    };
-#endif // GSCONNSETTINGSSELECTIONDLG_H
--- a/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +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:    Localization strings for Connectivity Settings plugin.
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-// **CAPTIONS
-
-//d:Plugin title.
-//d:Long string.
-//l:title_pane_t2/opt9
-//w:
-//r:5.2
-//
-#define qtn_occ_title_connectivity_settings "Connectivity Settings"
-
-//d:Plugin caption.
-//d:Used by GS FW.
-//l:list_single_large_graphic_pane_t1
-//w:
-//r:5.2
-//
-#define qtn_set_folder_occ_connectivity_settings "Connectivity settings"
-
-// **OPTIONS MENU
-
-//d:Text of a list item in Connectivity Settings plugin main view's list
-//d:Item opens "Join new WLAN networks" radio button setting page
-//l:list_setting_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_usage_of_wlan "Join WLAN networks"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_usage_of_wlan_known "Known"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_usage_of_wlan_manual "Manual"
-
-//d:Text of a list item in Connectivity Settings plugin main view's list
-//d:Item opens "Cellular data usage abroad" radio button setting page
-//l:list_setting_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_abroad "Cellular data usage abroad"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_abroad_automatic "Automatic"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_abroad_confirm "Confirm"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_abroad_wlan_only "WLAN only"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_abroad_disabled "Disabled"
-
-
-//d:Text of a list item in Connectivity Settings plugin main view's list
-//d:Item opens "Cellular data usage in home network" radio button setting page
-//l:list_setting_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_home_nw "Cellular data usage in home network"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_home_nw_automatic "Automatic"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_home_nw_confirm "Confirm" 
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_home_nw_wlan_only "WLAN only"
-
-//d:Text in radio button list
-//l:list_set_graphic_pane_t1
-//w:
-//r: 5.2
-#define qtn_occ_sett_data_usage_home_nw_disabled "Disabled"
-
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/rom/gsconnsettingsplugin.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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:  Connectivity Settings Plugin ROM files.
-*
-*/
-
-#ifndef GSCONNSETTINGSPLUGIN_IBY
-#define GSCONNSETTINGSPLUGIN_IBY
-
-#ifdef RD_CONTROL_PANEL
-
-    ECOM_PLUGIN( gsconnsettingsplugin.dll, 200255B8.rsc )
-    data=DATAZ_\BITMAP_DIR\gsconnsettingsplugin.mif BITMAP_DIR\gsconnsettingsplugin.mif
-
-#endif // RD_CONTROL_PANEL
-
-#endif // GSCONNSETTINGSPLUGIN_IBY
-// End of File
--- a/cmmanager/gsconnsettingsplugin/rom/gsconnsettingspluginresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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:  Connectivity Settings Plugin ROM resources.
-*
-*/
-
-#ifndef GSCONNSETTINGSPLUGINRESOURCES_IBY
-#define GSCONNSETTINGSPLUGINRESOURCES_IBY
-
-    #ifdef RD_CONTROL_PANEL
-
-        data=DATAZ_\RESOURCE_FILES_DIR\gsconnsettingspluginrsc.rsc RESOURCE_FILES_DIR\gsconnsettingspluginrsc.rsc
-
-    #endif // RD_CONTROL_PANEL
-
-#endif // GSCONNSETTINGSPLUGINRESOURCES_IBY
-// End of File
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,684 +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: Cpp file for Connectivity Settings plugin.
-*
-*/
-
-
-// Includes
-#include <featmgr.h>
-#include "gsconnsettingsplugin.h"
-#include "gsconnsettingsplugin.hrh"
-#include "gsconnsettingspluginmodel.h"
-#include "gsconnsettingsplugincontainer.h"
-#include "gsconnsettingsselectiondlg.h"
-
-#include <gsconnsettingspluginrsc.rsg>
-#include <gsconnsettingsplugin.mbg>
-
-// Includes from GS framework:
-#include <gscommon.hrh>
-#include <gsfwviewuids.h>
-#include <gsprivatepluginproviderids.h>
-#include <gstabhelper.h>
-#include <gsmainview.h>
-
-#include <hlplch.h> // For HlpLauncher
-#include <featmgr.h>
-#include <csxhelp/cp.hlp.hrh>
-
-#include <gulicon.h>
-#include <AknsUtils.h>
-#include <aknViewAppUi.h>
-#include <aknradiobuttonsettingpage.h>
-#include <AknQueryDialog.h>
-#include <ConeResLoader.h>
-#include <barsread.h> // For TResourceReader
-#include <StringLoader.h>
-
-// Constants
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::CConnectivitySettingsPlugin()
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPlugin::CGSConnSettingsPlugin()
-    : iResourceLoader( *iCoeEnv )
-    , iProcessing( EFalse )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::~CConnectivitySettingsPlugin()
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPlugin::~CGSConnSettingsPlugin()
-    {
-    iResourceLoader.Close();
-    
-    
-    // Delete plugin loader
-    if ( iPluginLoader )
-        {
-        delete iPluginLoader;
-        }
-
-    // Delete possible plugins
-    if ( iPluginArray )
-        {
-        // Since the plugins are actually avkon views, avkon is responsible
-        // for owning the plugins. This means we do not reset and destroy
-        // the contents of the array in which the plugins reside. We have to
-        // leave it up to avkon to tidy up.
-        delete iPluginArray;
-        }      
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::NewL()
-// First phase constructor
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPlugin* CGSConnSettingsPlugin::NewL( TAny* /*aInitParams*/ )
-    {
-    CGSConnSettingsPlugin* self = new(ELeave) CGSConnSettingsPlugin();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::ConstructL()
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::ConstructL()
-    {
-    // Initialize FeatureManager
-    FeatureManager::InitializeLibL();
-    iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-    // Unload FeatureManager
-    FeatureManager::UnInitializeLib();
-    
-    OpenLocalizedResourceFileL( KGSConnSettingsPluginResourceFileName,
-                                iResourceLoader ); 
-    BaseConstructL( R_GS_CONN_SETTINGS_PLUGIN_VIEW );
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::Id()
-// ---------------------------------------------------------------------------
-//
-TUid CGSConnSettingsPlugin::Id() const
-    {
-    return KGSConnSettingsPluginUid;
-    }
-
-
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::NewContainerL()
-// Creates new iContainer.
-//
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::NewContainerL()
-    {
-    iContainer = new( ELeave ) CGSConnSettingsPluginContainer( *this );
-    
-    //Check if ECOM plugins are already loaded
-    if ( iPluginArray == NULL )
-        {
-        //Load plugins here after container is constructed. This saves memory when Connectivity Settings view
-        //is not visible(object from CGSConnSettingsPlugin is constructed already in Connectivity view by GS and
-        //container class only when the plugin is actually accessed) 
-
-        iPluginArray = new  ( ELeave ) CArrayPtrFlat<CGSPluginInterface>( KGConnSettingsPluginCount );
-        iPluginLoader = CGSPluginLoader::NewL( iAppUi );
-        iPluginLoader->SetObserver( this );
-        iPluginLoader->LoadAsyncL( KGSPluginInterfaceUid, Id(), iPluginArray ); 
-        }
-    
-    Container()->SetPluginArray( iPluginArray );
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::DoActivateL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::DoActivateL( const TVwsViewId& aPrevViewId,
-                                    TUid aCustomMessageId,
-                                    const TDesC8& aCustomMessage )
-    {
-    CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
-
-    // Add support for external view activation    
-    if ( iPrevViewId.iAppUid != KUidGS || iPrevViewId.iViewUid == TUid::Uid(0x0DEADBED) )
-      {
-      CEikButtonGroupContainer* cbaGroup = Cba();
-      if(cbaGroup)
-        {
-        HBufC* rightSKText = StringLoader::LoadLC (R_GS_CONN_SETTINGS_RSK_LABEL_EXIT);
-        TPtr rskPtr = rightSKText->Des();
-        cbaGroup->SetCommandL(2,EAknSoftkeyExit,*rightSKText);
-        CleanupStack::PopAndDestroy(rightSKText);
-        }
-      }    
-    iModel = Container()->Model();
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::DoDeactivate()
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::DoDeactivate()
-    {
-    CGSBaseView::DoDeactivate();
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin:: HandleForegroundEventL
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::HandleForegroundEventL( TBool aForeground )
-    {
-    //Load saved settings from Connection Settings API
-    //If function leaves it is trapped and ignored as there is nothing that we can do about it
-    if ( iModel && aForeground )
-        {
-        TRAP_IGNORE( iModel->LoadSettingsL() );
-        UpdateListBoxL( EGSSettIdDataUsageHomeNw );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::HandleCommandL
-//
-// Handles menu commands directed to this class.
-// ----------------------------------------------------------------------------
-void CGSConnSettingsPlugin::HandleCommandL( TInt aCommand )
-    {
-    switch ( aCommand )
-        {
-        case EGSConnSettMenuOpen:
-        case EGSConnSettMenuChange:
-        case EGSConnSettMskGeneral:
-            HandleListBoxSelectionL();
-            break;
-            
-        case EAknSoftkeyBack:
-            iAppUi->ActivateLocalViewL( KGSConPluginUid );
-            break;
-            
-        case EAknCmdHelp:
-            {
-            if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
-                {
-                HlpLauncher::LaunchHelpApplicationL(
-                    iEikonEnv->WsSession(), iAppUi->AppHelpContextL() );
-                }
-            break;
-            }
-        default:
-            iAppUi->HandleCommandL( aCommand );
-            break;
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CGSSensorPlugin::DynInitMenuPaneL
-// -----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
-    {
-    // Check resource
-    if ( R_GS_CONN_SETTINGS_MENU_ITEM_OPEN == aResourceId )
-        {
-        // First, resolve current item in listbox
-        const TInt currentItem = Container()->CurrentFeatureId();
-
-        switch (currentItem)
-            {
-            case EGSSettIdUsageOfWlan:
-            case EGSSettIdDataUsageAbroad:
-            case EGSSettIdDataUsageHomeNw:
-                // Hide menu item 'Open'
-                aMenuPane->SetItemDimmed( EGSConnSettMenuOpen, ETrue );
-                aMenuPane->SetItemDimmed( EGSConnSettMenuChange, EFalse );
-            break;
-            
-            default:
-                {
-                // Hide menu item 'Change' if current item is ECOM plugin
-                aMenuPane->SetItemDimmed( EGSConnSettMenuOpen, EFalse );
-                aMenuPane->SetItemDimmed( EGSConnSettMenuChange, ETrue );
-                break;
-                }
-            }
-        }
-    // Forward to base class
-    CGSBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
-    }
-
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::HandleListBoxSelectionL()
-//
-// Handles events raised through a rocker key
-// ----------------------------------------------------------------------------
-void CGSConnSettingsPlugin::HandleListBoxSelectionL()
-    {
-    const TInt currentFeatureId = Container()->CurrentFeatureId();
-        
-    switch ( currentFeatureId )
-        {
-        case EGSSettIdUsageOfWlan:
-            ShowUsageOfWlanSettingPageL();
-            break;
-            
-        case EGSSettIdDataUsageAbroad:
-            ShowDataUsageAbroadSettingPageL();
-            break;
-            
-        case EGSSettIdDataUsageHomeNw:
-            ShowDataUsageInHomeNwSettingPageL();
-            break;
-            
-        default:
-            {
-            //Feature ID didn't match, try plugins
-            CGSPluginInterface* selectedPlugin( Container()->SelectedPluginL() );
-
-            switch( selectedPlugin->ItemType() )
-                {
-                // In these cases the plugin is a view:
-                case EGSItemTypeSingleLarge:
-                case EGSItemTypeSetting:
-                case EGSItemTypeSettingIcon:
-                    {
-                    CleanupStack::PushL( selectedPlugin );
-                    iAppUi->ActivateLocalViewL( selectedPlugin->Id() );
-                    CleanupStack::Pop( selectedPlugin );
-                    break;
-                    }
-                    
-                // In these cases the plugin is a dialog:
-                case EGSItemTypeSettingDialog:
-                case EGSItemTypeSingleLargeDialog:
-                    // Ignore duplicate Window's events
-                    if( iProcessing )
-                        {
-                        return;
-                        }
-                    
-                    iProcessing = ETrue;
-                    selectedPlugin->HandleSelection( EGSSelectionByMenu );
-                    iProcessing = EFalse;
-                    break;
-                default:
-                    break;
-                }
-            break;
-            }        
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::UpdateListBoxL
-//
-//
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::UpdateListBoxL( TInt aItemId )
-    {
-    if( Container() )
-        {
-        Container()->UpdateListBoxL( aItemId );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::Container
-//
-// Return handle to container class.
-// ----------------------------------------------------------------------------
-//
-CGSConnSettingsPluginContainer* CGSConnSettingsPlugin::Container()
-    {
-    return static_cast<CGSConnSettingsPluginContainer*>( iContainer );
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::UpperLevelViewUid()
-//
-//
-// ---------------------------------------------------------------------------
-//
-TUid CGSConnSettingsPlugin::UpperLevelViewUid()
-    {
-    return KGSConPluginUid;
-    }
-
-// -----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::GetHelpContext()
-//
-//
-// -----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::GetHelpContext( TCoeHelpContext& aContext )
-    {
-    aContext.iMajor = KUidGS;
-    aContext.iContext = KHLP_OCC_CONN_SETTINGS;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::GetCaptionL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::GetCaptionL( TDes& aCaption ) const
-    {
-    // The resource file is already opened by iResourceLoader.
-    HBufC* result = StringLoader::LoadL( R_GS_CONN_SETTINGS_VIEW_CAPTION );
-    aCaption.Copy( *result );
-    delete result;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::CreateIconL
-//
-// Return the icon, if has one.
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CGSConnSettingsPlugin::CreateIconL( const TUid aIconType )
-    {
-
-    //EMbm<Mbm_file_name><Bitmap_name>
-    CGulIcon* icon;
-    TParse* fp = new( ELeave ) TParse();
-    CleanupStack::PushL( fp );
-    fp->Set( KGSConnSettingsPluginIconDirAndName, &KDC_BITMAP_DIR, NULL );
-
-    if( aIconType == KGSIconTypeLbxItem )
-        {
-        icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(),
-        KAknsIIDQgnPropCpConnAdmin,
-        fp->FullName(),
-// Let's use Connectivity plugin icon until we get graphics
-// for Connectivity Settings plugin icon
-//      EMbmGsconnsettingspluginQgn_prop_cp_conn_settings,
-//      EMbmGsconnsettingspluginQgn_prop_cp_conn_settings_mask );
-        EMbmGsconnsettingspluginQgn_prop_cp_conn, //from generated \epoc32\include\gsconnsettingsplugin.mbg
-        EMbmGsconnsettingspluginQgn_prop_cp_conn_mask ); //from generated \epoc32\include\gsconnsettingsplugin.mbg
-        }
-       else
-           {
-           icon = CGSPluginInterface::CreateIconL( aIconType );
-           }
-    CleanupStack::PopAndDestroy( fp );
-    return icon;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::PluginProviderCategory()
-//
-//
-// ---------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPlugin::PluginProviderCategory() const
-    {
-    return KGSPluginProviderInternal;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::ShowUsageOfNewWlanSettingPageL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::ShowUsageOfWlanSettingPageL()
-    {
-    TBool currentItem = (TBool)iModel->UsageOfWlan();
-    iModel->SetUsageOfWlan( !currentItem );
-    UpdateListBoxL( EGSSettIdUsageOfWlan );
-    //Save current settings when the setting is changed
-    //If function leaves it is trapped and ignored as there is nothing that we can do about it
-    TRAP_IGNORE(iModel->SaveSettingsL());
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::ShowDataUsageAbroadSettingPageL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::ShowDataUsageAbroadSettingPageL()
-    {
-    CDesCArrayFlat* items;
-    
-    if ( iIsWlanSupported )
-        {
-        items = iCoeEnv->ReadDesC16ArrayResourceL(
-                R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX );
-        }
-    else
-        {
-        items = iCoeEnv->ReadDesC16ArrayResourceL(
-                R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX_NOWLAN );        
-        }
-    
-    CleanupStack::PushL( items );
-
-    TInt currentItem = iModel->DataUsageAbroad();
-    
-    // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3
-    // and the actual index number should be 2 in this case
-    if( !iIsWlanSupported && currentItem == EDataUsageAbroadDisabled )
-        {
-        currentItem --;
-        }
-    
-    TInt oldItem = currentItem;
-
-    CAknSettingPage* dlg = new( ELeave ) CAknRadioButtonSettingPage(
-            R_DATA_USAGE_ABROAD_SETTING_PAGE, currentItem, items );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-
-        if( currentItem != oldItem )
-            {
-            iModel->SetDataUsageAbroad( currentItem );
-            UpdateListBoxL( EGSSettIdDataUsageAbroad );
-            //Save current settings when the setting is changed
-            //If function leaves it is trapped and ignored as there is nothing that we can do about it
-            TRAP_IGNORE(iModel->SaveSettingsL());
-            }
-        }
-    CleanupStack::PopAndDestroy( items );
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::ShowDataUsageInHomeNwSettingPageL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::ShowDataUsageInHomeNwSettingPageL()
-    {
-    CDesCArrayFlat* items;
-    
-    if ( iIsWlanSupported )
-        {
-        items = iCoeEnv->ReadDesC16ArrayResourceL(
-            R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX );
-        }
-    else
-        {
-        items = iCoeEnv->ReadDesC16ArrayResourceL(
-            R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX_NOWLAN );        
-        }
-    
-    CleanupStack::PushL( items );
-
-    TInt currentItem = iModel->DataUsageInHomeNw();
-    
-    // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3
-    // and the actual index number should be 2 in this case
-    if( !iIsWlanSupported && currentItem == EDataUsageAbroadDisabled )
-        {
-        currentItem --;
-        }
-    
-    TInt oldItem = currentItem;
-
-    CAknSettingPage* dlg = new( ELeave ) CAknRadioButtonSettingPage(
-            R_DATA_USAGE_HOME_NW_SETTING_PAGE, currentItem, items );
-
-    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
-        {
-
-        if( currentItem != oldItem )
-            {
-            iModel->SetDataUsageInHomeNw( currentItem );
-            UpdateListBoxL(  EGSSettIdDataUsageHomeNw );
-            //Save current settings when the setting is changed
-            //If function leaves it is trapped and ignored as there is nothing that we can do about it
-            TRAP_IGNORE(iModel->SaveSettingsL());
-            }
-        }
-    CleanupStack::PopAndDestroy( items );
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::CheckMiddleSoftkeyLabelL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::CheckMiddleSoftkeyLabelL() 
-    {
-    //Resolve current item
-    const TInt currentItem = Container()->CurrentFeatureId();
-
-    //remove current middle soft key label
-    RemoveCommandFromMSK();
-
-    switch (currentItem)
-        {
-        case EGSSettIdUsageOfWlan:
-        case EGSSettIdDataUsageAbroad:
-        case EGSSettIdDataUsageHomeNw:
-            //Set middle soft key label to "Change"
-            SetMiddleSoftKeyLabelL( R_GS_CONN_SETTINGS_MSK_LABEL_CHANGE, EGSConnSettMskGeneral );
-        break;
-        
-        default:
-            {
-            //If current item is ECOM plugin set middle soft key label to "Open"
-            SetMiddleSoftKeyLabelL( R_GS_CONN_SETTINGS_MSK_LABEL_OPEN, EGSConnSettMskGeneral );
-            break;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::HandleListBoxEventL
-//
-// -----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                                TListBoxEvent aEventType )
-    {
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        case EEventItemSingleClicked:
-            HandleListBoxSelectionL();
-            break;
-        default:
-           break;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CGSConnSettingsPlugin::RemoveCommandFromMSK
-//
-// -----------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::RemoveCommandFromMSK()
-    {
-    CEikButtonGroupContainer* cbaGroup = Cba();
-    if ( cbaGroup )
-        {
-        // Remove command from stack
-        cbaGroup->RemoveCommandFromStack( KGSConnSettingsMSKControlID, EGSConnSettMskGeneral );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::SetMiddleSoftKeyLabelL 
-// Sets middle softkey label.
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::SetMiddleSoftKeyLabelL( 
-    const TInt aResourceId, const TInt aCommandId )
-    {
-    CEikButtonGroupContainer* cbaGroup = Cba();
-    if ( cbaGroup )
-        {
-        HBufC* middleSKText = StringLoader::LoadLC( aResourceId );
-        TPtr mskPtr = middleSKText->Des();
-        cbaGroup->AddCommandToStackL( 
-                KGSConnSettingsMSKControlID, 
-            aCommandId, 
-            mskPtr );
-        CleanupStack::Pop( middleSKText );
-        delete middleSKText;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPlugin::HandlePluginLoaded
-// Called by GSPluginLoader when plugins are loaded or error occured during that
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPlugin::HandlePluginLoaded( KGSPluginLoaderStatus aStatus )
-    {
-    if ( iContainer && MGSPluginLoadObserver::EGSFinished == aStatus )
-        {
-        #ifdef __DEBUG
-        TRAPD( ignore, Container()->UpdateListBoxL( EGSExtPluginsListItemId ); );
-        TRACE_1( "[GSSensorPlugin] CGSSensorPlugin::HandlePluginLoaded() - Error: %i", ignore );
-        #else
-        TRAP_IGNORE( Container()->UpdateListBoxL( EGSExtPluginsListItemId ); );
-        #endif // __DEBUG
-        }
-    }
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,507 +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:  Container for the Connectivity Settings plugin
-*
-*/
-
-// INCLUDE FILES
-#include <featmgr.h>
-#include "gsconnsettingsplugincontainer.h"
-#include "gsconnsettingspluginmodel.h"
-#include "gsconnsettingsplugin.h"
-#include "gsconnsettingsplugin.hrh"
-#include "gsconnsettingsmskobserver.h"
-#include <gsconnsettingspluginrsc.rsg>
-
-#include <aknlists.h>
-#include <csxhelp/cp.hlp.hrh>
-#include <gsfwviewuids.h>     // for KUidGS
-#include <gslistbox.h>
-
-
-// EXTERNAL DATA STRUCTURES
-
-// EXTERNAL FUNCTION PROTOTYPES
-
-// CONSTANTS
-
-// MACROS
-
-// LOCAL CONSTANTS AND MACROS
-const   TInt    KGSBufSize128 = 128;
-
-// MODULE DATA STRUCTURES
-
-// LOCAL FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// ============================= LOCAL FUNCTIONS ==============================
-
-// ========================== MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// CGSDisplayPluginContainer::ConstructL(const TRect& aRect)
-// Symbian OS two phased constructor
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::ConstructL( const TRect& aRect )
-    {
-    iListBox = new ( ELeave ) CAknSettingStyleListBox;
-    iModel = CGSConnSettingsPluginModel::NewL();
-    iModel->SetOwner( this );
-    
-    //Load saved settings from Connection Settings API
-    //If function leaves it is trapped and ignored as there is nothing that we can do about it
-    TRAP_IGNORE(iModel->LoadSettingsL());
-
-    if ( iIsWlanSupported )
-        {
-        BaseConstructL( aRect, R_GS_CONN_SETTINGS_PLUGIN_VIEW_TITLE, R_CONN_SETTINGS_LBX );
-        }
-    else
-        {
-        BaseConstructL( aRect, R_GS_CONN_SETTINGS_PLUGIN_VIEW_TITLE, R_CONN_SETTINGS_LBX_NOWLAN );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::~GSConnSettingsPluginContainer()
-//
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPluginContainer::~CGSConnSettingsPluginContainer()
-    {    
-    //Note: iListbox is not deleted here as base class destructor handels it
-    
-    if ( iModel )
-        {        
-        delete iModel;
-        iModel = NULL;
-        }
-
-    if ( iListboxItemArray )
-        {
-        delete iListboxItemArray;
-        }
-    
-    if ( iListBoxTextArray )
-       {
-       iListBoxTextArray->Reset();
-       delete iListBoxTextArray;
-       }
-    
-    if ( iIsWlanSupported )
-        {
-        if ( iUsageOfWlanItems )
-            {
-            iUsageOfWlanItems->Reset();
-            delete iUsageOfWlanItems;
-            }
-        }
-
-    if ( iDataUsageAbroadItems )
-        {
-        iDataUsageAbroadItems->Reset();
-        delete iDataUsageAbroadItems;
-        }
-
-    if ( iDataUsageHomeNwItems )
-        {
-        iDataUsageHomeNwItems->Reset();
-        delete iDataUsageHomeNwItems;
-        }    
-
-    if ( iListItems )
-        {
-        iListItems->Reset();
-        delete iListItems;
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::GSConnSettingsPluginContainer()
-//
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPluginContainer::CGSConnSettingsPluginContainer( 
-        MGSConnSettingsMskObserver& aMskObserver )
-        : iMskObserver( aMskObserver )
-    {
-    FeatureManager::InitializeLibL();
-    iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-    FeatureManager::UnInitializeLib();
-    }
-
-void CGSConnSettingsPluginContainer::SetPluginArray ( 
-                                CArrayPtrFlat<CGSPluginInterface>* aPluginArray )
-{
-    iPluginArray = aPluginArray;
-}
-
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::ConstructListBoxL()
-// 
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::ConstructListBoxL( TInt aResLbxId )
-    {
-    iListBox->ConstructL( this, EAknListBoxSelectionList );
-    iListboxItemArray = CGSListBoxItemTextArray::NewL( aResLbxId, *iListBox, *iCoeEnv );
-    iListBoxTextArray = static_cast<CDesCArray*>( iListBox->Model()->ItemTextArray() );
-    iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
-    
-    if ( iIsWlanSupported )
-        {
-        iUsageOfWlanItems = iCoeEnv->ReadDesC16ArrayResourceL(
-                R_USAGE_OF_WLAN_SETTING_PAGE_LBX );
-
-        iDataUsageHomeNwItems = iCoeEnv->ReadDesC16ArrayResourceL( 
-                R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX );
-    
-        iDataUsageAbroadItems = iCoeEnv->ReadDesC16ArrayResourceL( 
-                R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX );
-        
-        iListItems = iCoeEnv->ReadDesC16ArrayResourceL( R_CONN_SETTINGS_LBX_TXT );
-        }
-    else
-        {
-        iDataUsageHomeNwItems = iCoeEnv->ReadDesC16ArrayResourceL( 
-                R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX_NOWLAN );
-    
-        iDataUsageAbroadItems = iCoeEnv->ReadDesC16ArrayResourceL( 
-                R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX_NOWLAN );
-        
-        iListItems = iCoeEnv->ReadDesC16ArrayResourceL( R_CONN_SETTINGS_LBX_TXT_NOWLAN );
-        }
-        
-    CreateListBoxItemsL();
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::CreateListBoxItemsL()
-//
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::CreateListBoxItemsL()
-    {   
-    if ( iIsWlanSupported )
-        {
-        MakeUsageOfWlanNetworksItemL();
-        iGeneralItemCount++;
-        }
-
-    MakeDataUsageHomeNwItemL();
-    iGeneralItemCount++;
-
-    MakeDataUsageAbroadItemL();
-    iGeneralItemCount++;
-
-    if ( iPluginArray )
-        {
-        MakeECOMPluginItemL();
-        }
-    iListBox->HandleItemAdditionL();
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::UpdateListBoxL(TInt aFeatureId)
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::UpdateListBoxL( TInt aFeatureId )
-    {
-    switch ( aFeatureId )
-        {
-        case  EGSSettIdUsageOfWlan:
-            iListBoxTextArray->Delete( EGSSettIdUsageOfWlan );
-            MakeUsageOfWlanNetworksItemL();
-            break;
-
-        case EGSSettIdDataUsageHomeNw:
-            iListBoxTextArray->Delete( Index( EGSSettIdDataUsageHomeNw ) );
-            MakeDataUsageHomeNwItemL();
-            break;
-            
-        case EGSSettIdDataUsageAbroad:
-            iListBoxTextArray->Delete( Index ( EGSSettIdDataUsageAbroad ) );
-            MakeDataUsageAbroadItemL();
-            break;
-
-        case EGSExtPluginsListItemId:
-            MakeECOMPluginItemL();
-            break;     
-                        
-        default:
-            break;
-        }
-    iListBox->HandleItemAdditionL();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPluginContainer::AppendListItem
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::AppendListItemL( 
-    const TInt aPos,
-    const TDesC16& aFirstLabel, 
-    const TDesC16& aSecondLabel )
-    {
-    TBuf<KGSBufSize128> itemText;
-    _LIT( KSpaceAndTab, " \t" );
-    _LIT( KTab, "\t" );
-
-    // The format is: " \tFirstLabel\tSecondLabel\t0\t0"
-    // First, append space and tab
-    itemText.Append( KSpaceAndTab );
-    itemText.Append( aFirstLabel );
-    itemText.Append( KTab );
-    itemText.Append( KTab );
-    // Currently this is used only to show sensors active status (on/off)
-    itemText.Append( aSecondLabel ); 
-
-    // No need to add last tabs
-    if ( ( KErrNotFound != aPos ) && ( aPos <= iListBoxTextArray->Count() ) )
-        {
-        iListBoxTextArray->InsertL( aPos, itemText );
-        }
-    else
-        {
-        iListBoxTextArray->AppendL( itemText );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::MakeUsageOfNewWlanNetworksItemL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::MakeUsageOfWlanNetworksItemL()
-    {
-    TInt currValue = iModel->UsageOfWlan();
-    AppendListItemL( EGSSettIdUsageOfWlan, 
-        iListItems->operator[]( EGSSettIdUsageOfWlan ), 
-        ( *iUsageOfWlanItems )[currValue] );
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::MakeDataUsageAbroadItemL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::MakeDataUsageAbroadItemL()
-{
-    TInt currValue = iModel->DataUsageAbroad();
-    
-    // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3
-    // and the actual index number should be 2 in this case
-    if( !iIsWlanSupported && currValue == EDataUsageAbroadDisabled )
-        {
-        currValue --;
-        }
-    
-    AppendListItemL( Index( EGSSettIdDataUsageAbroad ),
-        iListItems->operator[]( Index( EGSSettIdDataUsageAbroad ) ),
-        ( *iDataUsageAbroadItems )[currValue] );
-}
-            
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::MakeDataUsageAbroadItemL()
-//
-// 
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::MakeDataUsageHomeNwItemL()
-{
-    TInt currValue = iModel->DataUsageInHomeNw();
-    
-    // We may have to do in this way because EDataUsageAbroadDisabled is equal to 3
-    // and the actual index number should be 2 in this case
-    if( !iIsWlanSupported && currValue == EDataUsageAbroadDisabled )
-        {
-        currValue --;
-        }
-    
-    AppendListItemL( Index( EGSSettIdDataUsageHomeNw ),
-        iListItems->operator[]( Index( EGSSettIdDataUsageHomeNw ) ),
-        ( *iDataUsageHomeNwItems )[currValue] );
-}
-
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPluginContainer::MakeExtendedPluginsItemL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::MakeECOMPluginItemL()
-    {
-
-    // Create list item for all child plug-ins
-    const TInt pluginCount( iPluginArray->Count() );
-    CGSPluginInterface* plugin = NULL;
-
-    // 1) Read item descriptor from plugin:
-    TBuf<KGSBufSize128> caption;
-
-    for ( TInt i = 0; i < pluginCount; i++ )
-        {
-        plugin = iPluginArray->operator[]( i );
-        //Append to list only if plugin is meant to be visible
-        if( ( plugin ) && ( plugin->Visible() ) )
-            {
-            plugin->GetCaptionL( caption );
-
-            // Append text to list
-            AppendListItemL( KErrNotFound, caption, KNullDesC16 );
-            }
-        }        
-    }
-    
- 
-// -----------------------------------------------------------------------------
-// CGSConnSettingsPluginContainer::SelectedPlugin
-// Returns pointer to selected plugin
-// -----------------------------------------------------------------------------
-//
-CGSPluginInterface* CGSConnSettingsPluginContainer::SelectedPluginL()
-    {
-    CGSPluginInterface* plugin = NULL;
-
-    // Plugins are in list box after general menu items.
-    TInt listBoxIndex = iListBox->CurrentItemIndex() - iGeneralItemCount;
-    
-    // Pick the correct plugin: Skip the invisible plugin array items.
-    TInt i = 0;
-    TInt invisibleItems = 0;
-    CGSPluginInterface* tmpPlugin;
-    while ( i <= listBoxIndex + invisibleItems )
-        {
-        tmpPlugin = iPluginArray->operator[]( i );
-        if ( tmpPlugin->Visible() == EFalse )
-            {
-            invisibleItems++;
-            }
-        else if ( i == listBoxIndex + invisibleItems )
-            {
-            plugin = tmpPlugin;
-            break; // Correct plugin found.
-            }
-        i++;
-        }
-
-    // Leave if not found
-    if ( !plugin )
-        {
-        User::Leave( KErrNotFound );
-        }
-
-    return plugin;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsPluginContainer::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CGSConnSettingsPluginContainer::OfferKeyEventL( 
-    const TKeyEvent& aKeyEvent, TEventCode aType )
-    {
-
-    TKeyResponse returnValue( EKeyWasNotConsumed );
-
-    switch ( aKeyEvent.iCode )
-        {
-        case EKeyUpArrow:
-        case EKeyDownArrow:
-            {
-            // Send key event to Listbox
-            returnValue = iListBox->OfferKeyEventL( aKeyEvent, aType );
-            // Change MSK label if needs to changed
-            iMskObserver.CheckMiddleSoftkeyLabelL();
-            break;
-            }
-        case EKeyLeftArrow:
-        case EKeyRightArrow:
-            {
-            // Listbox takes all events even if it doesn't use them.
-            // Stick with the default return value
-            break;
-            }
-        default:
-            {
-            // Forward key event to listbox
-            returnValue = iListBox->OfferKeyEventL( aKeyEvent, aType );
-            break;
-            }
-        }
-
-    return returnValue;
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::CurrentFeatureId()
-//
-// ---------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPluginContainer::CurrentFeatureId( ) const
-    {
-    return iListboxItemArray->CurrentFeature( );
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::GetHelpContext() const
-// Gets Help
-//
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginContainer::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KUidGS;
-    aContext.iContext = KHLP_OCC_CONN_SETTINGS;
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::Model()
-//
-// Return its member variable iModel.
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsPluginModel* CGSConnSettingsPluginContainer::Model()
-    {
-    return iModel;
-    }
-
-// ---------------------------------------------------------------------------
-// GSConnSettingsPluginContainer::Index()
-//
-// Return index for the list.
-// ---------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPluginContainer::Index( TInt aIndex )
-    {
-    return ( iIsWlanSupported ? ( aIndex ) : ( aIndex - 1) );
-    }
-    
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginimpltable.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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:    ECOM proxy table for plugin.
-*
-*/
-
-// System includes
-#include <e32std.h>
-#include <implementationproxy.h>
-
-// User includes
-#include "gsconnsettingsplugin.h"
-
-// Constants
-const TImplementationProxy KGSConnSettingsPluginImplTable[] = 
-	{
-	IMPLEMENTATION_PROXY_ENTRY( 0x200255B9, CGSConnSettingsPlugin::NewL )
-	};
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
-    TInt& aTableCount )
-	{
-	aTableCount = sizeof( KGSConnSettingsPluginImplTable ) 
-        / sizeof( TImplementationProxy );
-	return KGSConnSettingsPluginImplTable;
-	}
-
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingspluginmodel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +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:  Connectivity Settings Plugin model implementation.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <featmgr.h>
-#include "gsconnsettingsplugincontainer.h"
-#include "gsconnsettingspluginmodel.h"
-#include "cmmanager.h"
-#include "gsconnsettingsplugin.hrh"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "gsconnsettingspluginmodelTraces.h"
-#endif
-
-
-// EXTERNAL DATA STRUCTURES
-
-// EXTERNAL FUNCTION PROTOTYPES
-
-// CONSTANTS
-
-// MACROS
-
-// LOCAL CONSTANTS AND MACROS
-
-// MODULE DATA STRUCTURES
-
-// LOCAL FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-// ============================= LOCAL FUNCTIONS ==============================
-
-// ========================= MEMBER FUNCTIONS =================================
-
-
-// ----------------------------------------------------------------------------
-// CGSDisplayPluginModel::NewL
-//
-// Symbian OS two-phased constructor
-// ----------------------------------------------------------------------------
-//
-CGSConnSettingsPluginModel* CGSConnSettingsPluginModel::NewL()
-    {
-    CGSConnSettingsPluginModel* self = new( ELeave ) CGSConnSettingsPluginModel;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::CGSConnSettingsPluginModel
-//
-//
-// C++ default constructor can NOT contain any code, that might leave.
-// ----------------------------------------------------------------------------
-//
-CGSConnSettingsPluginModel::CGSConnSettingsPluginModel()
-    {
-    }
-
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::ConstructL
-//
-// EPOC default constructor can leave.
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::ConstructL()
-    {
-    FeatureManager::InitializeLibL();
-    iIsWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-    FeatureManager::UnInitializeLib();
-    }
-
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::~CGSConnSettingsPluginModel
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CGSConnSettingsPluginModel::~CGSConnSettingsPluginModel()
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::LoadSettings
-//
-// Loads settings by using CMManager's general connection settings API
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::LoadSettingsL()
-    {
-    RCmManager CmManager;
-    CmManager.CreateTablesAndOpenL();
-    CleanupClosePushL(CmManager); 
-    CmManager.ReadGenConnSettingsL( iSettings );
-    CleanupStack::PopAndDestroy( 1 );     //CmManager
-
-    //Print out loaded settings
-    OstTrace1( TRACE_NORMAL, CSP_LOADSETTINGSL_USAGE_OF_NEW_WLAN_PARAM_TRACE, "iSettings.iUsageOfWlan=%d", iSettings.iUsageOfWlan );
-    OstTrace1( TRACE_NORMAL, CSP_LOADSETTINGSL_CELLULAR_DATA_USAGE_VISITOR_PARAM_TRACE, "iSettings.iCellularDataUsageVisitor=%d", iSettings.iCellularDataUsageVisitor );
-    OstTrace1( TRACE_NORMAL, CSP_LOADSETTINGSL_CELLULAR_DATA_USAGE_HOME_PARAM_TRACE, "iSettings.iCellularDataUsageHome=%d", iSettings.iCellularDataUsageHome );
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::SaveSettingsL
-//
-// Saves settings by using CMManager's general connection settings API
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::SaveSettingsL()
-    {
-    RCmManager CmManager;
-    CmManager.CreateTablesAndOpenL();
-    CleanupClosePushL(CmManager); 
-    CmManager.WriteGenConnSettingsL( iSettings );
-    CleanupStack::PopAndDestroy( 1 );     //CmManager
-
-    //Print out saved settings
-    OstTrace1( TRACE_NORMAL, CSP_SAVESETTINGSL_USAGE_OF_NEW_WLAN_PARAM_TRACE, "iSettings.iUsageOfWlan=%d", iSettings.iUsageOfWlan );
-    OstTrace1( TRACE_NORMAL, CSP_SAVESETTINGSL_CELLULAR_DATA_USAGE_VISITOR_PARAM_TRACE, "iSettings.iCellularDataUsageVisitor=%d", iSettings.iCellularDataUsageVisitor );
-    OstTrace1( TRACE_NORMAL, CSP_SAVESETTINGSL_CELLULAR_DATA_USAGE_HOME_PARAM_TRACE, "iSettings.iCellularDataUsageHome=%d", iSettings.iCellularDataUsageHome );
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::UsageOfWlan
-//
-// Maps value from general connection settings API to match index in UI
-// ----------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPluginModel::UsageOfWlan()
-    {
-    TInt mappedValue = 0;
-    
-    //Map to correct index    
-    switch ( iSettings.iUsageOfWlan )
-        {
-        case ECmUsageOfWlanKnown: 
-            mappedValue = EUsageOfWlanKnown; //Known
-            break;
-            
-        case ECmUsageOfWlanManual:
-            mappedValue = EUsageOfNewWlanManual; //Manual
-            break;
-                        
-        default:
-            break;
-        }
-    return mappedValue;
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::DataUsageAbroad
-//
-// Maps value from general connection settings API to match index in UI
-// ----------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPluginModel::DataUsageAbroad()
-    {   
-    TInt mappedValue = 0;
-
-    //Map to correct index    
-    switch ( iSettings.iCellularDataUsageVisitor )
-        {
-        case ECmCellularDataUsageAutomatic:
-            mappedValue = EDataUsageAbroadAutomatic; // Automatic
-            break;
-
-        case ECmCellularDataUsageConfirm:
-            mappedValue = EDataUsageAbroadConfirm; // Confirm
-            break;
-
-        case ECmCellularDataUsageDisabled:
-            if( iIsWlanSupported )
-                {
-                mappedValue = EDataUsageAbroadWlanOnly; // Wlan only
-                }
-            else
-                {
-                mappedValue = EDataUsageAbroadDisabled; // Disabled when nowlan
-                }
-            break;
-
-        default:
-            break;
-        }
-    return mappedValue;
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::DataUsageInHomeNw
-//
-// Maps value from general connection settings API to match index in UI
-// ----------------------------------------------------------------------------
-//
-TInt CGSConnSettingsPluginModel::DataUsageInHomeNw()
-    {     
-    TInt mappedValue = 0;
-
-    //Map to correct index    
-    switch ( iSettings.iCellularDataUsageHome )
-        {
-        case ECmCellularDataUsageAutomatic:
-            mappedValue = EDataUsageHomeNwAutomatic; // Automatic
-            break;
-
-        case ECmCellularDataUsageConfirm:
-            mappedValue = EDataUsageHomeNwConfirm; // Confirm
-            break;
-
-        case ECmCellularDataUsageDisabled:
-            if( iIsWlanSupported )
-                {
-                mappedValue = EDataUsageHomeNwWlanOnly; // Wlan only
-                }
-            else
-                {
-                mappedValue = EDataUsageHomeNwDisabled; // Disabled when nowlan
-                }
-            break;
-
-        default:
-            break;
-        }
-    return mappedValue;
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::SetUsageOfNewWlanL
-//
-// Maps UI index to according general connection setting API value
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::SetUsageOfWlan( TInt aValue )
-    {    
-    //Map to correct index
-    switch ( aValue )
-        {        
-        case EUsageOfWlanKnown: //Join and inform
-            iSettings.iUsageOfWlan = ECmUsageOfWlanKnown;
-            break;
-            
-        case EUsageOfNewWlanManual: //inform
-            iSettings.iUsageOfWlan = ECmUsageOfWlanManual;
-            break;
-                        
-        default:
-            break;
-        }   
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::SetDataUsageAbroadL
-//
-// Maps UI index to according general connection setting API value
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::SetDataUsageAbroad( TInt aValue )
-    {
-    switch ( aValue )
-        {
-        case EDataUsageAbroadAutomatic:  //Automatic
-            iSettings.iCellularDataUsageVisitor = ECmCellularDataUsageAutomatic; 
-            break;
-        case EDataUsageAbroadConfirm: //Confirm
-            iSettings.iCellularDataUsageVisitor = ECmCellularDataUsageConfirm;
-            break;
-
-        case EDataUsageAbroadWlanOnly: //Wlan only
-        case EDataUsageAbroadDisabled:
-            iSettings.iCellularDataUsageVisitor = ECmCellularDataUsageDisabled;
-            break;
-                        
-        default:
-            break;
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::SetDataUsageInHomeNwL
-//
-// Maps UI index to according general connection setting API value
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::SetDataUsageInHomeNw( TInt aValue )
-    {
-    switch ( aValue )
-        {
-        case EDataUsageHomeNwAutomatic: //Automatic
-            iSettings.iCellularDataUsageHome = ECmCellularDataUsageAutomatic; 
-            break;
-
-        case EDataUsageHomeNwConfirm: //Confirm
-            iSettings.iCellularDataUsageHome = ECmCellularDataUsageConfirm;
-            break;
-
-        case EDataUsageHomeNwWlanOnly: //Wlan only
-        case EDataUsageHomeNwDisabled:
-            iSettings.iCellularDataUsageHome = ECmCellularDataUsageDisabled;
-            break;
-                        
-        default:
-            break;
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CGSConnSettingsPluginModel::SetOwner
-//
-// Sets its owner.
-// ----------------------------------------------------------------------------
-//
-void CGSConnSettingsPluginModel::SetOwner( CGSConnSettingsPluginContainer* aContainer)
-    {
-    iContainer = aContainer;
-    }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsselectiondlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Cpp file for CGSConnSettingsSelectionDlg class.
-*
-*/
-
-// Includes
-#include "gsconnsettingsselectiondlg.h"
-#include <StringLoader.h>
-#include <eiklbo.h>
-#include <gulalign.h>
-
-#include <gsconnsettingspluginrsc.rsg>
-
-// Constants
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::NewL
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsSelectionDlg* CGSConnSettingsSelectionDlg::NewL( TInt aResourceID, 
-                TInt& aCurrentSelectionIndex, 
-                const MDesCArray* aItemArray )
-    {
-    CGSConnSettingsSelectionDlg* self = new( ELeave ) CGSConnSettingsSelectionDlg(
-                                                        aResourceID,
-                                                        aCurrentSelectionIndex,
-                                                        aItemArray );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg(
-                TInt aResourceID, 
-                TInt& aCurrentSelectionIndex, 
-                const MDesCArray* aItemArray )
-        :    CAknRadioButtonSettingPage( 
-                aResourceID,
-                aCurrentSelectionIndex,
-                aItemArray )
-    {
-
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::~CGSConnSettingsSelectionDlg
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsSelectionDlg::~CGSConnSettingsSelectionDlg()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CGSConnSettingsSelectionDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType)
-    {    
-    TKeyResponse response( EKeyWasNotConsumed );
-    response =  CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType );
-    return response;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsSelectionDlg::HandleListBoxEventL( 
-        CEikListBox* aListBox, 
-        TListBoxEvent aEventType )
-    {
-    CAknRadioButtonSettingPage::HandleListBoxEventL( aListBox, aEventType );
-    }
-
-// End of file
-
--- a/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-#include <OpenSystemTrace.h>
-#endif
--- a/cmmanager/gsconnsettingsplugin/traces/gsconnsettingspluginmodelTraces.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-// Created by TraceCompiler 1.3.1
-// DO NOT EDIT, CHANGES WILL BE LOST
-
-#ifndef __GSCONNSETTINGSPLUGINMODELTRACES_H__
-#define __GSCONNSETTINGSPLUGINMODELTRACES_H__
-
-#define KOstTraceComponentID 0x200255b8
-
-#define CSP_LOADSETTINGSL_USAGE_OF_NEW_WLAN_PARAM_TRACE 0x30001
-#define CSP_SAVESETTINGSL_USAGE_OF_NEW_WLAN_PARAM_TRACE 0x30004
-#define CSP_LOADSETTINGSL_CELLULAR_DATA_USAGE_VISITOR_PARAM_TRACE 0x30007
-#define CSP_LOADSETTINGSL_CELLULAR_DATA_USAGE_HOME_PARAM_TRACE 0x30008
-#define CSP_SAVESETTINGSL_CELLULAR_DATA_USAGE_VISITOR_PARAM_TRACE 0x30009
-#define CSP_SAVESETTINGSL_CELLULAR_DATA_USAGE_HOME_PARAM_TRACE 0x3000a
-
-
-#endif
-
-// End of file
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/cellularindicatorplugin.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+CONFIG += plugin
+CONFIG += hb
+
+# Directories
+DEPENDPATH += .
+INCLUDEPATH += .\inc
+
+# Sources
+HEADERS += inc\cellularindicatorplugin.h \
+           traces\OstTraceDefinitions.h
+
+SOURCES += src\cellularindicatorplugin.cpp
+
+symbian*: {
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.UID3 = 0x2002C3AB
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+    BLD_INF_RULES.prj_exports += "rom/cellularindicatorplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cellularindicatorplugin.iby)"
+    BLD_INF_RULES.prj_exports += "rom/cellularindicatorplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cellularindicatorplugin_resources.iby)"
+    pluginstub.sources = cellularindicatorplugin.dll
+    pluginstub.path = /resource/plugins/indicators
+    DEPLOYMENT += pluginstub
+}
+
+TRANSLATIONS = cellularindicatorplugin.ts
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/inc/cellularindicatorplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CELLULARINDICATORPLUGIN_H
+#define CELLULARINDICATORPLUGIN_H
+
+#include <hbindicatorplugininterface.h>
+#include <hbindicatorinterface.h>
+#include <QtCore/QProcess>
+#include <QtCore/QVariant>
+#include <QSharedPointer>
+
+// Forward declarations
+class HbTranslator;
+
+/**
+ * This class describes cellular indicator plug-in
+ */
+class CellularIndicatorPlugin : public HbIndicatorInterface,
+    public HbIndicatorPluginInterface
+{
+
+    Q_OBJECT
+    Q_INTERFACES(HbIndicatorPluginInterface)
+
+public:
+
+    CellularIndicatorPlugin();
+    ~CellularIndicatorPlugin();
+
+public:
+
+    //from HbIndicatorPluginInterface
+    
+    // Return indicator type of indicator
+    QStringList indicatorTypes() const;
+    
+    // Access is allowed allways
+    bool accessAllowed(const QString &indicatorType,
+                       const QVariantMap &securityInfo) const;
+    
+    // Create indicator. Currently installs translation.
+    HbIndicatorInterface* createIndicator(const QString &indicatorType);
+    
+    // Return error if any
+    int error() const;
+
+public:
+
+    //from HbIndicatorInterface
+    
+    // Client requests are directed to here
+    bool handleClientRequest (RequestType type, const QVariant &parameter);
+    
+    // This called when item is selected in indicator menu
+    bool handleInteraction(InteractionType type);
+    
+    // Used to get indicator data (icon or text)
+    QVariant indicatorData(int role) const;
+
+private: // data
+
+    // Disable copy constructor
+    Q_DISABLE_COPY(CellularIndicatorPlugin)
+    // Indicator type
+    QStringList mIndicatorTypes;
+    // Error stored to member variable
+    int mError;
+    // Used to store the connection info
+    QVariant mParameter;
+    // Process to start external programs
+    QProcess process;
+    
+    // Translator for the localisation Text Id's
+    QSharedPointer<HbTranslator> mTranslator;
+
+};
+
+
+
+
+#endif // CELLULARINDICATORPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/rom/cellularindicatorplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+file=ABI_DIR\BUILD_DIR\cellularindicatorplugin.dll SHARED_LIB_DIR\cellularindicatorplugin.dll
+data=\epoc32\data\z\resource\plugins\indicators\cellularindicatorplugin.qtplugin RESOURCE_FILES_DIR\plugins\indicators\cellularindicatorplugin.qtplugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/rom/cellularindicatorplugin_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CELLULARINDICATORPLUGIN_RESOURCES_IBY
+#define CELLULARINDICATORPLUGIN_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cellularindicatorplugin.qm QT_TRANSLATIONS_DIR/cellularindicatorplugin.qm
+
+#endif // CELLULARINDICATORPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/src/cellularindicatorplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#include <QtPlugin>
+#include <HbTranslator>
+#include <QLocale>
+#include <QList>
+#include <HbLabel>
+#include <HbDialog>
+#include <HbDocumentLoader>
+#include <HbPushButton>
+#include <HbView>
+#include <HbApplication>
+#include "cellularindicatorplugin.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cellularindicatorpluginTraces.h"
+#endif
+
+Q_EXPORT_PLUGIN(CellularIndicatorPlugin)
+
+const static char IndicatorType[] =
+    "com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0";
+
+/*!
+    CellularIndicatorPlugin::CellularIndicatorPlugin
+ */
+CellularIndicatorPlugin::CellularIndicatorPlugin() :
+    HbIndicatorInterface(IndicatorType, SettingCategory,
+        InteractionActivated),
+    mError(0)
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_CELLULARINDICATORPLUGIN_ENTRY );
+    mIndicatorTypes <<
+        "com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0";
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_CELLULARINDICATORPLUGIN_EXIT );
+}
+
+/*!
+    CellularIndicatorPlugin::~CellularIndicatorPlugin
+ */
+CellularIndicatorPlugin::~CellularIndicatorPlugin()
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_DCELLULARINDICATORPLUGIN_ENTRY );
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_DCELLULARINDICATORPLUGIN_EXIT );
+}
+
+/*!
+    CellularIndicatorPlugin::indicatorTypes
+ */
+QStringList CellularIndicatorPlugin::indicatorTypes() const
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_INDICATORTYPES_ENTRY );
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_INDICATORTYPES_EXIT );
+    return mIndicatorTypes;
+}
+
+/*!
+    CellularIndicatorPlugin::accessAllowed
+ */
+bool CellularIndicatorPlugin::accessAllowed(const QString &indicatorType,
+    const QVariantMap &securityInfo) const
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_ACCESSALLOWED_ENTRY );
+    Q_UNUSED(indicatorType)
+    Q_UNUSED(securityInfo)
+
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_ACCESSALLOWED_EXIT );
+    return true;
+}
+
+/*!
+    CellularIndicatorPlugin::createIndicator
+ */
+HbIndicatorInterface* CellularIndicatorPlugin::createIndicator(
+    const QString &indicatorType)
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_CREATEINDICATOR_ENTRY );
+    
+    Q_UNUSED(indicatorType)
+    
+    // Install localization
+    mTranslator = QSharedPointer<HbTranslator>(new HbTranslator("cellularindicatorplugin"));
+        
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_CREATEINDICATOR_EXIT );
+    return this;
+}
+
+/*!
+    CellularIndicatorPlugin::error
+ */
+int CellularIndicatorPlugin::error() const
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_ERROR_ENTRY );
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_ERROR_EXIT );
+    return mError;
+}
+
+/*!
+    CellularIndicatorPlugin::handleClientRequest
+ */
+bool CellularIndicatorPlugin::handleClientRequest(RequestType type,
+    const QVariant &parameter)
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_HANDLECLIENTREQUEST_ENTRY );
+    
+    bool handled(false);
+
+    switch (type) {
+    case RequestActivate:
+        if (mParameter != parameter) {
+            mParameter = parameter;
+            emit dataChanged();
+        }
+        handled =  true;
+        break;
+    
+    case RequestDeactivate:
+        mParameter.clear();
+        break;
+        
+    default:
+        // Do nothing
+        break;
+    }
+
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_HANDLECLIENTREQUEST_EXIT );
+    return handled;
+}
+
+/*!
+    CellularIndicatorPlugin::handleInteraction
+ */
+bool CellularIndicatorPlugin::handleInteraction(InteractionType type)
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_HANDLEINTERACTION_ENTRY );
+    
+    Q_UNUSED(type)
+    bool handled = false;
+    QVariantMap data;
+    
+    switch(type) {
+    case InteractionActivated:
+        // Emit a signal that will inform the client to start the connectionview client
+        emit userActivated(data);
+
+        handled = true;
+        break;
+    
+    default:
+        break;
+    }
+
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_HANDLEINTERACTION_EXIT );
+    return handled;
+}
+
+/*!
+    CellularIndicatorPlugin::indicatorData
+*/
+QVariant CellularIndicatorPlugin::indicatorData(int role) const
+{
+    OstTraceFunctionEntry0( CELLULARINDICATORPLUGIN_INDICATORDATA_ENTRY );
+    QVariant ret = NULL;
+    
+    switch(role) {
+    case PrimaryTextRole:
+        ret = QString(hbTrId("txt_occ_dblist_cellular_data"));
+        break;
+
+    case SecondaryTextRole:
+        if (mParameter.isValid() && (mParameter.type() == QVariant::List)) {
+
+            QList<QVariant> indicatorInfo; 
+            indicatorInfo = mParameter.toList();
+
+            if (!indicatorInfo.count()) {
+                // No entries on the list -> don't even try to use this
+                break;
+            }
+            
+            if ( (indicatorInfo[0].toInt() > 1) && indicatorInfo.count() ) {
+                
+                // More than one connection -> show number of connections
+                QString str = QString(hbTrId("txt_occ_dblist_cellular_data_val_l1_connections"));
+                ret = str.arg(indicatorInfo[0].toInt());
+            }
+            else if ( indicatorInfo[0].toInt() && (indicatorInfo.count() >= 2)) {
+                
+                // Only one connection -> show name of the iap
+                ret = indicatorInfo[1].toString();
+            }
+        }
+        break;
+
+    case DecorationNameRole:
+        // Return the icon
+        ret = QString("qtg_small_gprs");
+        break;
+    
+    default:
+        // Do nothing
+        break;
+    }
+    
+    OstTraceFunctionExit0( CELLULARINDICATORPLUGIN_INDICATORDATA_EXIT );
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/cellularindicatorplugin/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionmonitoring.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS  += \
+    cellularindicatorplugin \
+    indicatorobserver \
+    connectionview
+            
+CONFIG += ordered
+
+symbian*: {
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+} 
--- a/connectionmonitoring/connectionmonitorplugin/data/10281BC1.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM plugin resource file for ConnectionMonitorPlugin.
-*
-*/
-
-#include <registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
-    {
-    dll_uid     = 0x10281BC1;
-    interfaces  =
-        {
-        INTERFACE_INFO
-            {
-            interface_uid   = 0x10207236;
-            implementations =
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid  = 0x10281BC2;
-                    version_no          = 1;
-                    display_name        = "Connection Monitor Plugin";
-                                                        // Plugin debug name
-                    default_data        = "0x10207250"; // Parent UID
-                    opaque_data         = "70"; // Order number
-                    }
-                };
-            }
-        };
-    }
-
--- a/connectionmonitoring/connectionmonitorplugin/data/connectionmonitorpluginrsc.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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:  Localization strings for Plugin.
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME        CMPI // 4 letter ID
-
-// INCLUDES
-#include    <connectionmonitorplugin.loc> // config localized strings
-
-#include    <avkon.loc> // Avkon localized strings
-#include    <avkon.mbg>
-#include    <avkon.rsg>
-#include    <EIKCORE.rsg>
-#include    <uikon.rh>
-
-// CONSTANTS
-
-//  RESOURCE DEFINITIONS
-
-//----------------------------------------------------
-//
-//    Needed or loading the resource fails!
-//
-//----------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
-    {
-    }
-
-//----------------------------------------------------
-//
-//    r_qtn_cp_folder_connection_management
-//    Connection Monitor Plugin caption.
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_cp_folder_connection_management
-    {
-    buf = qtn_cp_folder_connection_management;
-    }
-    
-RESOURCE TBUF r_qtn_err_os_general { buf = qtn_err_os_general; }
-
-//End of File
--- a/connectionmonitoring/connectionmonitorplugin/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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:  Information required for building ConnectionMonitorPlugin.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-// export iby files
-../rom/connectionmonitorplugin.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(connectionmonitorplugin.iby)
-../rom/connectionmonitorpluginresources.iby	LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(connectionmonitorpluginresources.iby)
-
-// export localised loc file
-../loc/connectionmonitorplugin.loc	MW_LAYER_LOC_EXPORT_PATH(connectionmonitorplugin.loc)
-
-PRJ_MMPFILES
-
-#ifdef RD_CONTROL_PANEL
-
-    connectionmonitorplugin.mmp
-
-#endif //RD_CONTROL_PANEL
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE connectionmonitorplugin.mif
-OPTION HEADERFILE connectionmonitorplugin.mbg
-OPTION SOURCES -c8,8 qgn_prop_cp_conn_man.bmp
-END
-
-PRJ_TESTMMPFILES
-
-//  End of File
--- a/connectionmonitoring/connectionmonitorplugin/group/connectionmonitorplugin.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:  Localization strings for Plugin.
-*
-*/
-
-#include <data_caging_paths.hrh>    //this is needed for RESOURCE_FILES_DIR
-#include <platform_paths.hrh>
-
-CAPABILITY          CAP_ECOM_PLUGIN
-TARGET              connectionmonitorplugin.dll
-TARGETTYPE          PLUGIN
-UID                 0x10009D8D 0x10281BC1
-VENDORID            VID_DEFAULT
-
-SOURCEPATH          ../src
-SOURCE              connectionmonitorplugin.cpp
-SOURCE              connectionmonitorpluginimplementationtable.cpp
-
-USERINCLUDE         ../data
-USERINCLUDE         ../inc
-
-SYSTEMINCLUDE       .
-SYSTEMINCLUDE       /epoc32/include/cshelp
-SYSTEMINCLUDE       /epoc32/include/ecom
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH          ../data
-
-//ECOM resource definition
-START RESOURCE      10281BC1.rss
-TARGET              connectionmonitorplugin.rsc
-TARGETPATH          ECOM_RESOURCE_DIR
-END                 //  ECOM resource definition
-
-// Plugin's own resources.
-START RESOURCE      connectionmonitorpluginrsc.rss
-HEADER
-TARGETPATH          RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END // own resource file
-
-
-LIBRARY             apgrfx.lib // RApaLsSession
-LIBRARY             apparc.lib
-LIBRARY             avkon.lib
-LIBRARY             bafl.lib
-LIBRARY             commonengine.lib // RConeResourceLoader
-LIBRARY             cone.lib
-LIBRARY             ecom.lib
-LIBRARY             efsrv.lib
-LIBRARY             eikcoctl.lib
-LIBRARY             eikcore.lib
-LIBRARY             euser.lib
-LIBRARY             GSEcomPlugin.lib
-LIBRARY             GSFramework.lib // Base classes
-LIBRARY             ws32.lib
-LIBRARY             egul.lib // CGulIcon
-LIBRARY             aknskins.lib // AknsUtils.h
-
-LIBRARY             commonui.lib
-LIBRARY             aknnotify.lib 
-LIBRARY             eiksrv.lib
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +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:  ConnectionMonitorPlugin implementation.
-*
-*/
-
-#ifndef CONNECTIONMONITORPLUGIN_H
-#define CONNECTIONMONITORPLUGIN_H
-
-// User includes
-
-// System includes
-#include <gsplugininterface.h>
-#include <aknview.h>
-#include <ConeResLoader.h>
-#include <eikclb.h>
-#include <AknServerApp.h>
-
-// Classes referenced
-class CAknNavigationDecorator;
-class CAknViewAppUi;
-class CAknNullService;
-
-// Constants
-const TUid KConnectionMonitorPluginUID = { 0x10281BC2 };
-
-const TUid KConnectionMonitorAppUid    = { 0x101F84D0 };
-
-_LIT( KConnectionMonitorPluginResourceFileName,
-                                    "z:connectionmonitorpluginrsc.rsc" );
-_LIT( KConnectionMonitorPluginIconDirAndName,
-                                    "z:connectionmonitorplugin.mif ");
-                                                    // Use KDC_BITMAP_DIR
-
-// CLASS DECLARATION
-
-/**
-* CConnectionMonitorPlugin.
-*
-*/
-class CConnectionMonitorPlugin : 
-                            public CGSPluginInterface,
-                            public MAknServerAppExitObserver // Embedding
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Symbian OS two-phased constructor
-        * @param aInitParams initialization parameters.
-        * @return new instance of CConnectionMonitorPlugin.
-        */
-        static CConnectionMonitorPlugin* NewL( TAny* aInitParams );
-
-        /**
-        * Destructor.
-        */
-        ~CConnectionMonitorPlugin();
-
-    public: // From CAknView
-
-        /**
-        * From CAknView.
-        * This view's Id.
-        * @return This plugin's UID.
-        */
-        TUid Id() const;
-
-    public: // From CGSPluginInterface
-
-        /**
-        * From CGSPluginInterface.
-        * @param aCaption this plugin's caption.
-        */
-        void GetCaptionL( TDes& aCaption ) const;
-
-        /**
-        * From CGSPluginInterface.
-        * @return this plugin's provider category.
-        */
-        TInt PluginProviderCategory() const;
-
-        /**
-        * From CGSPluginInterface.
-        * @return this plugin's item type.
-        */
-        TGSListboxItemTypes ItemType();
-
-        /**
-        * From CGSPluginInterface.
-        * @param aKey key name.
-        * @param aValue key value.
-        */
-        void GetValue( const TGSPluginValueKeys aKey,
-                       TDes& aValue );
-
-        /**
-        * From CGSPluginInterface.
-        * @param aSelectionType selection type.
-        */
-        void HandleSelection( const TGSSelectionTypes aSelectionType );
-        
-        /**
-        * From CEikonEnv.
-        * @return this plugin's pointer to the created icon.
-        */
-        CGulIcon* CreateIconL( const TUid aIconType );
-
-    protected: // New
-
-        /**
-        * C++ default constructor.
-        */
-        CConnectionMonitorPlugin();
-
-        /**
-        * Symbian OS default constructor.
-        */
-        void ConstructL();
-
-    protected: // From CAknView
-
-        /**
-        * From CAknView.
-        * This implementation is empty because this class, being just
-        * a dialog, does not implement the CAknView finctionality.
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                          TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-
-        /**
-        * From CAknView.
-        * This implementation is empty because this class, being just 
-        * a dialog, does not implement the CAknView finctionality.
-        */
-        void DoDeactivate();
-
-    private: // New
-
-        /**
-        * Opens localized resource file.
-        */
-        void OpenLocalizedResourceFileL(
-                            const TDesC& aResourceFileName,
-                            RConeResourceLoader& aResourceLoader );
-
-        /**
-        * Launches ConnectionMonitor application as embedded.
-        */
-        void LaunchConnectionMonitorAppL();
-        
-        /**
-        * Shows an error note in case of error. 
-        * @param aErrorCode The error code.
-        */
-        void ShowErrorNote(TInt aErrorCode);
-
-        /**
-        * Shows the error note and resolves the error.
-        * @param aErrorCode The error code.
-        */
-        TBool ShowErrorNoteL(TInt aErrorCode);
-    
-        /**
-        * Shows a general error note
-        */
-        void ShowGeneralErrorNoteL();
-        
-    protected: // Data
-
-        /**
-        * Resource loader for this plugin's resources.
-        */
-        RConeResourceLoader iResources;
-
-        /**
-        * AVKON NULL Service.
-        * Own.
-        */
-        CAknNullService* iNullService;
-    };
-
-#endif // CONNECTIONMONITORPLUGIN_H
-// End of File
--- a/connectionmonitoring/connectionmonitorplugin/loc/connectionmonitorplugin.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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:  Localization strings for Plugin.
-*
-*/
-
-
-//  LOCALISATION STRINGS
-
-
-//d:Connection Monitor Plugin caption
-//d:ConnectionMonitorPlugin
-//l:list_double_large_graphic_pane_t1
-//w:
-//r:5.0 
-//
-#define qtn_cp_folder_connection_management "Connection management"
-
-//d: In case of error, the error code is passed to error resolver
-//d: and the error note is displayed accordingly. If error resolver
-//d: cannot resolve the error, an error note "System error" is displayed.
-//l: popup_note_window/opt2
-//w:
-//r:5.0
-//
-#define qtn_err_os_general "System error"
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorplugin/rom/connectionmonitorplugin.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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:  ConnectionMonitorPlugin ROM resources.
-*
-*/
-
-#ifndef CONNECTIONMONITORPUGIN_IBY
-#define CONNECTIONMONITORPUGIN_IBY
-
-    #ifdef RD_CONTROL_PANEL
-
-        ECOM_PLUGIN( connectionmonitorplugin.dll, 10281BC1.rsc )
-        data=DATAZ_\BITMAP_DIR\connectionmonitorplugin.mif BITMAP_DIR\connectionmonitorplugin.mif
-
-    #endif // RD_CONTROL_PANEL
-
-#endif // CONNECTIONMONITORPUGIN_IBY
-//  End of File
--- a/connectionmonitoring/connectionmonitorplugin/rom/connectionmonitorpluginresources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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:  ConnectionMonitorPlugin ROM resources.
-*
-*/
-
-#ifndef CONNECTIONMONITORPUGINRESOURCES_IBY
-#define CONNECTIONMONITORPUGINRESOURCES_IBY
-
-    #ifdef RD_CONTROL_PANEL
-
-        data=DATAZ_\RESOURCE_FILES_DIR\connectionmonitorpluginrsc.rsc RESOURCE_FILES_DIR\connectionmonitorpluginrsc.rsc
-
-    #endif // RD_CONTROL_PANEL
-
-#endif // CONNECTIONMONITORPUGINRESOURCES_IBY
-//  End of File
--- a/connectionmonitoring/connectionmonitorplugin/src/connectionmonitorplugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +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:  ConnectionMonitorPlugin implementation.
-*
-*/
-
-
-// User includes
-#include    "connectionmonitorplugin.h"
-#include    <gsparentplugin.h>
-#include    <gscommon.hrh>
-#include    <connectionmonitorpluginrsc.rsg> // GUI Resource
-#include    <connectionmonitorplugin.mbg>
-#include    <gsprivatepluginproviderids.h>
-#include    <gsfwviewuids.h>
-
-// System includes
-#include    <AknNullService.h>
-#include    <bautils.h>
-#include    <StringLoader.h>
-#include    <AknGlobalNote.h>
-#include    <ErrorUI.h>
-
-// Constants
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorPlugin::CConnectionMonitorPlugin()
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CConnectionMonitorPlugin::CConnectionMonitorPlugin()
-    : iResources( *iCoeEnv ),
-      iNullService(NULL)
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorPlugin::~CConnectionMonitorPlugin()
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CConnectionMonitorPlugin::~CConnectionMonitorPlugin()
-    {
-    iResources.Close();
-
-    if ( iNullService )
-        {
-        delete iNullService;
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorPlugin::ConstructL()
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::ConstructL()
-    {
-    BaseConstructL();
-    
-    OpenLocalizedResourceFileL( KConnectionMonitorPluginResourceFileName,
-                                iResources );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorPlugin::NewL()
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CConnectionMonitorPlugin* CConnectionMonitorPlugin::NewL( 
-                                                    TAny* /*aInitParams*/ )
-    {
-    CConnectionMonitorPlugin* self = 
-                                new( ELeave ) CConnectionMonitorPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::Id
-// -----------------------------------------------------------------------------
-//
-TUid CConnectionMonitorPlugin::Id() const
-    {
-    return KConnectionMonitorPluginUID;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::DoActivateL
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::DoActivateL( 
-                                  const TVwsViewId& /*aPrevViewId*/,
-                                  TUid /*aCustomMessageId*/,
-                                  const TDesC8& /*aCustomMessage*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::DoDeactivate
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::DoDeactivate()
-    {
-    }
-
-
-// ========================= From CGSPluginInterface ==================
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::GetCaptionL
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::GetCaptionL( TDes& aCaption ) const
-    {
-    HBufC* result = StringLoader::LoadL( 
-                                    R_QTN_CP_FOLDER_CONNECTION_MANAGEMENT );
-    aCaption.Copy( *result );
-    delete result;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::PluginProviderCategory
-// -----------------------------------------------------------------------------
-//
-TInt CConnectionMonitorPlugin::PluginProviderCategory() const
-    {
-    return KGSPluginProviderInternal;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::ItemType()
-// -----------------------------------------------------------------------------
-//
-TGSListboxItemTypes CConnectionMonitorPlugin::ItemType()
-    {
-    return EGSItemTypeSettingDialog;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::GetValue()
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::GetValue( const TGSPluginValueKeys /*aKey*/,
-                                      TDes& /*aValue*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::HandleSelection()
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::HandleSelection(
-    const TGSSelectionTypes /*aSelectionType*/ )
-    {
-    TRAPD( error, LaunchConnectionMonitorAppL() );
-    if( error != KErrNone )
-        {
-        ShowErrorNote( error );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorPlugin::CreateIconL
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CConnectionMonitorPlugin::CreateIconL( const TUid aIconType )
-    {
-    //EMbm<Mbm_file_name><Bitmap_name>
-    CGulIcon* icon;
-    TParse* fp = new( ELeave ) TParse();
-    CleanupStack::PushL( fp );
-    fp->Set( KConnectionMonitorPluginIconDirAndName, &KDC_BITMAP_DIR, NULL );
-
-    if ( aIconType == KGSIconTypeLbxItem )
-        {
-        icon = AknsUtils::CreateGulIconL(
-        AknsUtils::SkinInstance(),
-        KAknsIIDQgnPropCpConnMan,
-        fp->FullName(),
-        EMbmConnectionmonitorpluginQgn_prop_cp_conn_man,
-        EMbmConnectionmonitorpluginQgn_prop_cp_conn_man_mask );
-        }    
-    else
-        {
-        icon = CGSPluginInterface::CreateIconL( aIconType );
-        }
-
-    CleanupStack::PopAndDestroy( fp );
-
-    return icon;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::OpenLocalizedResourceFileL()
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::OpenLocalizedResourceFileL(
-    const TDesC& aResourceFileName,
-    RConeResourceLoader& aResourceLoader )
-    {
-    RFs fsSession;
-    User::LeaveIfError( fsSession.Connect() );
-
-    // Find the resource file:
-    TParse parse;
-    parse.Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
-    TFileName fileName( parse.FullName() );
-
-    // Get language of resource file:
-    BaflUtils::NearestLanguageFile( fsSession, fileName );
-
-    // Open resource file:
-    aResourceLoader.OpenL( fileName );
-
-    // If leave occurs before this, close is called automatically when the
-    // thread exits.
-    fsSession.Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorPlugin::LaunchConnectionMonitorAppL()
-// -----------------------------------------------------------------------------
-//
-void CConnectionMonitorPlugin::LaunchConnectionMonitorAppL()
-    {
-    // Launch app
-    if ( iNullService )
-        {
-        delete iNullService;
-        iNullService = NULL;
-        }
-    iNullService = CAknNullService::NewL( KConnectionMonitorAppUid, this );
-    }
-
-// ---------------------------------------------------------
-// CWlanPlugin::ShowErrorNote
-// ---------------------------------------------------------
-//
-void CConnectionMonitorPlugin::ShowErrorNote(TInt aErrorCode)
-    {
-    TBool errorNoteShowed = EFalse;
-        
-    TRAPD(error, errorNoteShowed = ShowErrorNoteL(aErrorCode));
-            
-    if(error || !errorNoteShowed) 
-        {
-        TRAP_IGNORE( ShowGeneralErrorNoteL() );
-        }    
-    }
-
-// ---------------------------------------------------------
-// CWlanPlugin::ShowErrorNoteL
-// ---------------------------------------------------------
-//
-TBool CConnectionMonitorPlugin::ShowErrorNoteL(TInt aErrorCode)
-    {
-    CErrorUI* errorUi = CErrorUI::NewLC();
-    
-    TBool errorNoteShowed = errorUi->ShowGlobalErrorNoteL( aErrorCode );
-    
-    CleanupStack::PopAndDestroy( errorUi );
-        
-    return errorNoteShowed;
-    }    
-
-// ---------------------------------------------------------
-// CWlanPlugin::ShowGeneralErrorNoteL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorPlugin::ShowGeneralErrorNoteL()
-    {
-    HBufC *msg = HBufC::NewL( R_QTN_ERR_OS_GENERAL );
-    
-	msg->Des().Copy( _L( "" ) );
-    CAknGlobalNote *note = CAknGlobalNote::NewLC();
-    
-    
-    note->ShowNoteL( EAknGlobalErrorNote, *msg );
-
-
-    CleanupStack::PopAndDestroy( note );
-    CleanupStack::PopAndDestroy( msg );
-    }
-   
-// End of file
--- a/connectionmonitoring/connectionmonitorplugin/src/connectionmonitorpluginimplementationtable.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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:  ECOM proxy table for ConnectionMonitorPlugin.
-*
-*/
-
-
-// User includes
-#include "connectionmonitorplugin.h"
-
-// System includes
-#include <e32std.h>
-#include <implementationproxy.h>
-
-
-// Constants
-const TImplementationProxy KConnectionMonitorPluginImplementationTable[] =
-    {
-    IMPLEMENTATION_PROXY_ENTRY( 0x10281BC2, CConnectionMonitorPlugin::NewL )
-    };
-
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Gate/factory function
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
-    TInt& aTableCount )
-    {
-    aTableCount = sizeof( KConnectionMonitorPluginImplementationTable )
-        / sizeof( TImplementationProxy );
-    return KConnectionMonitorPluginImplementationTable;
-    }
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUi.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IBY file for ConnectionMonitorUi application
- *
-*/
-
- 
-#ifndef __CONNECTIONMONITORUI_IBY__
-#define __CONNECTIONMONITORUI_IBY__
-
-S60_APP_EXE(ConnectionMonitorUi)
-S60_APP_BITMAP(ConnectionMonitorUi)
-S60_APP_AIF_ICONS(ConnectionMonitorUi)
-S60_APP_AIF_RSC(ConnectionMonitorUi)
-
-#endif	// __CONNECTIONMONITORUI_IBY__
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUiResources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IBY file for those parts of ConnectionMonitorUi that needs localization
- *
-*/
-
-
-#ifndef __CONNECTIONMONITORUIRESOURCES_IBY__
-#define __CONNECTIONMONITORUIRESOURCES_IBY__
-
-S60_APP_RESOURCE(ConnectionMonitorUi)
-S60_APP_CAPTION(ConnectionMonitorUi)
-
-#endif	// __CONNECTIONMONITORUIRESOURCES_IBY__
-
-// End of File
-
--- a/connectionmonitoring/connectionmonitorui/aif/ConnectionMonitorUiaif.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     
-*
-*/
-
-
-#include <aiftool.rh>
-
-RESOURCE AIF_DATA
-    {
-    app_uid=0x101F84D0;
-    num_icons=2;
-    embeddability=KAppNotEmbeddable;
-    newfile=KAppDoesNotSupportNewFile;
-    }
-
-// End of File
Binary file connectionmonitoring/connectionmonitorui/aif/context_pane_icon.bmp has changed
Binary file connectionmonitoring/connectionmonitorui/aif/context_pane_icon_mask.bmp has changed
Binary file connectionmonitoring/connectionmonitorui/aif/list_icon.bmp has changed
Binary file connectionmonitoring/connectionmonitorui/aif/list_icon_mask.bmp has changed
--- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*     This file contains all the resources for the ConnectionMonitorUi.
-*
-*
-*/
-
-
-//  RESOURCE IDENTIFIER
-NAME    CMUI // 4 letter ID
-//
-//  INCLUDES
-
-#include <connectionmonitorui.loc>
-#include <eikon.rh>
-#include "ConnectionMonitorUi.hrh"
-#include <ConnectionMonitorUi.mbg>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.hrh>
-#include <avkon.loc>
-
-#include <appinfo.rh>
-#include <data_caging_paths_strings.hrh>
-
-//  CONSTANTS
-//#define ?constant   ?value
-
-//  MACROS
-//#define ?macro
-
-//  RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="ConnectionMonitorUi"; }
-
-RESOURCE EIK_APP_INFO
-    {
-    status_pane = r_connmonui_status_pane;
-    }
-
-RESOURCE STATUS_PANE_APP_MODEL r_connmonui_status_pane
-    {
-    panes =
-        {
-        SPANE_PANE
-            {
-            id = EEikStatusPaneUidTitle;
-            type = EAknCtTitlePane;
-            resource = r_connmonui_title_pane;
-            }
-        };
-    }
-
-RESOURCE TITLE_PANE r_connmonui_title_pane
-    {
-    txt = qtn_cmon_title;
-    }
-
-RESOURCE TBUF r_qtn_cmon_no_active_connections { buf=qtn_cmon_no_active_connections; }
-RESOURCE TBUF r_qtn_cmon_navi_one_active_conn   { buf=qtn_cmon_navi_one_active_conn; }
-RESOURCE TBUF r_qtn_cmon_navi_many_active_conns { buf=qtn_cmon_navi_many_active_conns; }
-
-RESOURCE TBUF r_qtn_set_bearer_data_call    { buf=qtn_set_bearer_data_call; }
-RESOURCE TBUF r_qtn_set_bearer_packet_data  { buf=qtn_set_bearer_packet_data; }
-RESOURCE TBUF r_qtn_cmon_bearer_hscsd       { buf=qtn_cmon_bearer_hscsd; }
-RESOURCE TBUF r_qtn_wlan_sett_bearer_wlan   { buf=qtn_wlan_sett_bearer_wlan; }
-
-
-RESOURCE TBUF r_qtn_cmon_heading_conn_name { buf=qtn_cmon_heading_conn_name; }
-RESOURCE TBUF r_qtn_cmon_heading_bearer { buf=qtn_cmon_heading_bearer; }
-RESOURCE TBUF r_qtn_cmon_heading_status { buf=qtn_cmon_heading_status; }
-RESOURCE TBUF r_qtn_cmon_heading_data_total { buf=qtn_cmon_heading_data_total; }
-RESOURCE TBUF r_qtn_cmon_heading_data_received { buf=qtn_cmon_heading_data_received; }
-RESOURCE TBUF r_qtn_cmon_heading_data_sent { buf=qtn_cmon_heading_data_sent; }
-RESOURCE TBUF r_qtn_cmon_heading_duration { buf=qtn_cmon_heading_duration; }
-RESOURCE TBUF r_qtn_cmon_heading_speed { buf=qtn_cmon_heading_speed; }
-RESOURCE TBUF r_qtn_cmon_heading_csd_number { buf=qtn_cmon_heading_csd_number; }
-RESOURCE TBUF r_qtn_cmon_heading_gprs_apn { buf=qtn_cmon_heading_gprs_apn; }
-RESOURCE TBUF r_qtn_cmon_heading_sharing_info { buf=qtn_cmon_heading_sharing_info; }
-
-RESOURCE TBUF r_qtn_cmon_status_creating { buf=qtn_cmon_status_creating; }
-RESOURCE TBUF r_qtn_cmon_status_idle { buf=qtn_cmon_status_idle; }
-RESOURCE TBUF r_qtn_cmon_status_active { buf=qtn_cmon_status_active; }
-RESOURCE TBUF r_qtn_cmon_status_suspended { buf=qtn_cmon_status_suspended; }
-RESOURCE TBUF r_qtn_cmon_status_closing { buf=qtn_cmon_status_closing; }
-RESOURCE TBUF r_qtn_cmon_status_closed { buf=qtn_cmon_status_closed; }
-
-RESOURCE TBUF r_qtn_cmon_status_details_creating { buf=qtn_cmon_status_details_creating; }
-RESOURCE TBUF r_qtn_cmon_status_details_idle { buf=qtn_cmon_status_details_idle; }
-RESOURCE TBUF r_qtn_cmon_status_details_active { buf=qtn_cmon_status_details_active; }
-RESOURCE TBUF r_qtn_cmon_status_details_suspended { buf=qtn_cmon_status_details_suspended; }
-RESOURCE TBUF r_qtn_cmon_status_details_closing { buf=qtn_cmon_status_details_closing; }
-RESOURCE TBUF r_qtn_cmon_status_details_closed { buf=qtn_cmon_status_details_closed; }
-
-RESOURCE TBUF r_qtn_log_gprs_amount_b { buf=qtn_log_gprs_amount_b; }
-RESOURCE TBUF r_qtn_log_gprs_amount_kb { buf=qtn_log_gprs_amount_kb; }
-RESOURCE TBUF r_qtn_log_gprs_amount_mb { buf=qtn_log_gprs_amount_mb; }
-RESOURCE TBUF r_qtn_log_gprs_amount_gb { buf=qtn_log_gprs_amount_gb; }
-
-RESOURCE TBUF r_qtn_cmon_data_transf_rate_dl { buf=qtn_cmon_data_transf_rate_dl; }
-RESOURCE TBUF r_qtn_cmon_data_transf_rate_ul { buf=qtn_cmon_data_transf_rate_ul; }
-
-RESOURCE TBUF r_qtn_cmon_ul_dl_data_amounts { buf=qtn_cmon_ul_dl_data_amounts; }
-RESOURCE TBUF r_qtn_cmon_navi_nof_connection { buf=qtn_cmon_navi_nof_connection; }
-
-RESOURCE TBUF r_text_calc_decimal_separator { buf=text_calc_decimal_separator; }
-
-RESOURCE TBUF r_qtn_cmon_item_conn_name_modem { buf=qtn_cmon_item_conn_name_modem; }
-
-RESOURCE TBUF r_qtn_cmon_conf_end_single_conn { buf=qtn_cmon_conf_end_single_conn; }
-RESOURCE TBUF r_qtn_cmon_conf_end_all_conns { buf=qtn_cmon_conf_end_all_conns; }
-RESOURCE TBUF r_qtn_cmon_conf_end_modem_conn { buf=qtn_cmon_conf_end_modem_conn; }
-RESOURCE TBUF r_qtn_cmon_duration_over_24h { buf=qtn_cmon_duration_over_24h; }
-RESOURCE TBUF r_qtn_cmon_info_conn_already_end { buf=qtn_cmon_info_conn_already_end; }
-
-RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_low { buf=qtn_cmon_wlan_singal_strength_low; }
-RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_medium { buf=qtn_cmon_wlan_singal_strength_medium; }
-RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_good { buf=qtn_cmon_wlan_singal_strength_good; }
-RESOURCE TBUF r_qtn_cmon_wlan_signal_strength_no_signal
-                            { buf=qtn_cmon_wlan_signal_strength_no_signal; }
-
-RESOURCE TBUF r_qtn_cmon_wlan_newtwork_mode_adhoc { buf=qtn_cmon_wlan_newtwork_mode_adhoc; }
-RESOURCE TBUF r_qtn_cmon_wlan_newtwork_mode_infra { buf=qtn_cmon_wlan_newtwork_mode_infra; }
-
-RESOURCE TBUF r_qtn_cmon_wlan_security_mode_open { buf=qtn_cmon_wlan_security_mode_open; }
-RESOURCE TBUF r_qtn_cmon_wlan_security_mode_wep { buf=qtn_cmon_wlan_security_mode_wep; }
-RESOURCE TBUF r_qtn_cmon_wlan_security_mode_802_1x { buf=qtn_cmon_wlan_security_mode_802_1x; }
-RESOURCE TBUF r_qtn_cmon_wlan_security_mode_wpa { buf=qtn_cmon_wlan_security_mode_wpa; }
-
-RESOURCE TBUF r_qtn_cmon_wlan_tx_power_level { buf=qtn_cmon_wlan_tx_power_level; }
-
-RESOURCE TBUF r_qtn_cmon_heading_wlan_network_name { buf=qtn_cmon_heading_wlan_network_name; }
-RESOURCE TBUF r_qtn_cmon_heading_wlan_signal_strength
-                            { buf=qtn_cmon_heading_wlan_signal_strength; }
-RESOURCE TBUF r_qtn_cmon_heading_wlan_network_mode { buf=qtn_cmon_heading_wlan_network_mode; }
-RESOURCE TBUF r_qtn_cmon_heading_wlan_security_mode { buf=qtn_cmon_heading_wlan_security_mode; }
-RESOURCE TBUF r_qtn_cmon_heading_wlan_tx_power { buf=qtn_cmon_heading_wlan_tx_power; }
-
-RESOURCE TBUF r_qtn_cmon_parameter_unavailable { buf=qtn_cmon_parameter_unavailable; }
-
-RESOURCE TBUF r_qtn_cmon_sharing_app_msg_server { buf=qtn_cmon_sharing_app_msg_server; }
-RESOURCE TBUF r_qtn_cmon_sharing_app_dl_mg { buf=qtn_cmon_sharing_app_dl_mg; }
-RESOURCE TBUF r_qtn_cmon_sharing_app_rss_server { buf=qtn_cmon_sharing_app_rss_server; }
-RESOURCE TBUF r_qtn_cmon_sharing_app_java_midlet { buf=qtn_cmon_sharing_app_java_midlet; }
-RESOURCE TBUF r_qtn_cmon_sharing_app_unknown { buf=qtn_cmon_sharing_app_unknown; }
-RESOURCE TBUF r_qtn_cmon_sharing_app_supl { buf=qtn_cmon_sharing_app_supl; }
-
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_title
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_connectionmonitorui_title
-    {
-    buf = qtn_cmon_title_active_conns;
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_hotkeys
-//
-//----------------------------------------------------
-//
-RESOURCE HOTKEYS r_connectionmonitorui_hotkeys
-    {
-    control=
-        {
-        HOTKEY { command=EAknCmdExit; key='e'; }
-        };
-    }
-
-#ifdef RD_CONTROL_PANEL
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_view_buttons
-//
-//----------------------------------------------------
-//
-RESOURCE CBA r_cp_connectionmonitorui_view_buttons
-    {
-    buttons =
-        {
-        CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
-        CBA_BUTTON {id=EAknSoftkeyExit; txt=text_softkey_back;},
-        CBA_BUTTON {id=EAknSoftkeyDetails; txt=qtn_msk_cmon_details;}
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_view
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_cp_connectionmonitorui_view
-    {
-      hotkeys=r_connectionmonitorui_hotkeys;
-      menubar=r_connectionmonitorui_menubar_view;
-      cba=r_cp_connectionmonitorui_view_buttons;
-    }
-
-#endif // RD_CONTROL_PANEL
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_view_buttons
-//
-//----------------------------------------------------
-//
-RESOURCE CBA r_connectionmonitorui_view_buttons
-    {
-    buttons =
-        {
-        CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
-        CBA_BUTTON {id=EAknSoftkeyExit; txt=text_softkey_exit;},
-        CBA_BUTTON {id=EAknSoftkeyDetails; txt=qtn_msk_cmon_details;}
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_view
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_connectionmonitorui_view
-    {
-      hotkeys=r_connectionmonitorui_hotkeys;
-      menubar=r_connectionmonitorui_menubar_view;
-      cba=r_connectionmonitorui_view_buttons;
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_menubar_view
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_BAR r_connectionmonitorui_menubar_view
-    {
-    titles=
-        {
-        MENU_TITLE { menu_pane=r_connectionmonitorui_app_menu; txt="App"; },
-        MENU_TITLE { menu_pane=r_connectionmonitorui_view_menu; txt="View"; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_view_menu
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_connectionmonitorui_view_menu
-    {
-    items=
-        {
-        MENU_ITEM { command=EConnectionMonitorUiCmdAppDetails;
-                                txt = qtn_cmon_list_options_details;  flags = EEikMenuItemSpecific;},
-        MENU_ITEM { command=EConnectionMonitorUiCmdAppEndConn;
-                                txt = qtn_cmon_list_options_end_conn; flags = EEikMenuItemSpecific;},
-        MENU_ITEM { command=EConnectionMonitorUiCmdAppEndAll;
-                                txt = qtn_cmon_list_options_end_all; }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_detailsview
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_connectionmonitorui_detailsview
-    {
-    hotkeys=r_connectionmonitorui_hotkeys;
-    cba=R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_app_menu
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_connectionmonitorui_app_menu
-    {
-    items=
-        {
-        MENU_ITEM { command=EAknCmdHelp; txt = qtn_options_help; },
-        MENU_ITEM { command=EAknCmdExit; txt=qtn_options_exit; }
-        };
-    }
-
-// ICONARRAYS
-
-RESOURCE AKN_ICON_ARRAY r_listbox_icons
-    {
-    bmpfile = APP_BITMAP_DIR"\\ConnectionMonitorUi.mbm";
-    icons =
-        {
-        AKN_ICON
-            {
-            iconId = EMbmConnectionmonitoruiQgn_prop_wml_gprs;
-            maskId = EMbmConnectionmonitoruiQgn_prop_wml_gprs_mask;
-            },
-        AKN_ICON
-            {
-            iconId = EMbmConnectionmonitoruiQgn_prop_wml_csd;
-            maskId = EMbmConnectionmonitoruiQgn_prop_wml_csd_mask;
-            },
-        AKN_ICON
-            {
-            iconId = EMbmConnectionmonitoruiQgn_prop_wml_hscsd;
-            maskId = EMbmConnectionmonitoruiQgn_prop_wml_hscsd_mask;
-            },
-        AKN_ICON
-            {
-            iconId = EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended;
-            maskId = EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended_mask;
-            }
-        };
-    }
-
-RESOURCE TBUF r_qtn_appl_option_item { buf=qtn_appl_option_item; }
-
-RESOURCE DIALOG r_end_conn_confirmation_query
-    {
-    flags=EGeneralQueryFlags;
-    buttons=R_AVKON_SOFTKEYS_YES_NO__YES;
-    items=
-        {
-        DLG_LINE
-            {
-            type=EAknCtQuery;
-            id = EGeneralQuery;
-            control= AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationQueryLayout;
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_qtn_cmon_connection_summary_note_text
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_cmon_connection_summary_note_text { buf =
-    qtn_cmon_summary_heading"\n"qtn_cmon_summary_transferred"\n%0U\n"qtn_cmon_summary_duration"\n%1U"; }
-
-//----------------------------------------------------
-//
-//    r_qtn_cmon_connection_summary_note
-//
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_qtn_cmon_connection_summary_note
-    {
-    flags = EAknInformationNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_EMPTY;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control= AVKON_NOTE
-                {
-                layout = ETextualNotificationLayout;
-                singular_label = "";
-                plural_label = "";
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-//    r_connectionmonitorui_localisable_app_info
-//
-//----------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_connectionmonitorui_localisable_app_info
-    {
-    short_caption = qtn_apps_cmon_grid;
-    caption_and_icon =
-    CAPTION_AND_ICON_INFO
-        {
-        caption = qtn_apps_cmon_list;
-#ifdef __SCALABLE_ICONS
-        number_of_icons = 1;
-        icon_file = "Z:"APP_BITMAP_DIR"\\connectionmonitorui_aif.mif";
-#else
-        number_of_icons = 2;
-        icon_file =  "Z:"APP_BITMAP_DIR"\\connectionmonitorui_aif.mbm";
-#endif
-        };
-    }
-
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_caption.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*     Caption file for ConnectionMonitorUi.
-*
-*
-*/
-
-
-#include <ConnectionMonitorUi.loc>
-#include <apcaptionfile.rh>
-
-RESOURCE CAPTION_DATA
-    {
-    caption=qtn_apps_cmon_list;
-    shortcaption=qtn_apps_cmon_grid;
-    }
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_reg.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include <appinfo.rh>
-#include <ConnectionMonitorUi.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x101F84D0 // Define your application UID here
-
-RESOURCE APP_REGISTRATION_INFO
-    {
-    app_file = "ConnectionMonitorUi";
-
-    localisable_resource_file = APP_RESOURCE_DIR"\\ConnectionMonitorUi";
-    localisable_resource_id = R_CONNECTIONMONITORUI_LOCALISABLE_APP_INFO;
-    embeddability = KAppNotEmbeddable;
-    newfile = KAppDoesNotSupportNewFile;
-
-    }
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/group/ConnectionMonitorUI.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     This is the project specification file for ConnectionMonitorUi.
-*     
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-
-TARGET        ConnectionMonitorUi.exe
-TARGETTYPE    exe
-
-
-UID  0x100039CE 0x101F84D0
-
-CAPABILITY   CAP_APPLICATION NetworkControl ProtServ
-
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE  ConnectionMonitorUiApp.cpp 
-SOURCE  ConnectionMonitorUiAppUi.cpp
-SOURCE  ConnectionMonitorUiDocument.cpp
-SOURCE  ConnectionMonitorUiContainer.cpp
-SOURCE  ConnectionMonitorUiView.cpp
-SOURCE  ConnectionMonitorUiDetailsView.cpp
-SOURCE  ConnectionMonitorUiDetailsContainer.cpp
-SOURCE  ConnectionInfoBase.cpp
-SOURCE  CsdConnectionInfo.cpp
-SOURCE  GprsConnectionInfo.cpp
-SOURCE  ConnectionArray.cpp
-SOURCE  FeatureManagerWrapper.cpp
-SOURCE  WlanConnectionInfo.cpp
-SOURCE  EasyWLANConnectionInfo.cpp
-SOURCE  ActiveWrapper.cpp
-
-
-START RESOURCE ../data/ConnectionMonitorUi.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END  // RESOURCE
-
-// Component specific internal headers 
-USERINCLUDE			../inc
-
-// ADO-SUBSYSTEM specific internal headers 
-SYSTEMINCLUDE		../../inc
-
-// ADO specific internal headers 
-SYSTEMINCLUDE		../../../inc
-
-//Macro to /epoc32 headers
-MW_LAYER_SYSTEMINCLUDE
-
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-APP_LAYER_SYSTEMINCLUDE
-#endif
-
-
-SYSTEMINCLUDE   /epoc32/include/libc
-
-
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib 
-LIBRARY eikcoctl.lib
-LIBRARY avkon.lib
-LIBRARY eikctl.lib
-LIBRARY	bafl.lib
-LIBRARY commonengine.lib
-LIBRARY	connmon.lib
-LIBRARY	estlib.lib
-LIBRARY egul.lib 
-LIBRARY apgrfx.lib
-LIBRARY hlplch.lib
-LIBRARY AknSkins.lib 
-LIBRARY AKNNOTIFY.LIB
-LIBRARY FeatMgr.lib
-LIBRARY commsdat.lib
-LIBRARY cmmanager.lib
-
-DEBUGLIBRARY flogger.lib
-DEBUGLIBRARY efsrv.lib
-
-
-epocstacksize 0x5000
-
-// DEFFILE ?filename
-
-
-START RESOURCE ../data/ConnectionMonitorUi_reg.rss
-DEPENDS connectionmonitorui.rsg
-// Do not change the UID below.
-TARGETPATH /private/10003a3f/apps
-END
-
-
--- a/connectionmonitoring/connectionmonitorui/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-// Help exports
-#include "../help/group/bld.inf"
-
-PRJ_EXPORTS
-// export iby files
-../ROM/ConnectionMonitorUi.iby		CORE_MW_LAYER_IBY_EXPORT_PATH(ConnectionMonitorUi.iby)
-../ROM/ConnectionMonitorUiResources.iby	LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ConnectionMonitorUiResources.iby)
-
-// export localised loc file
-../loc/connectionmonitorui.loc	MW_LAYER_LOC_EXPORT_PATH(connectionmonitorui.loc)
-
-PRJ_MMPFILES
-./ConnectionMonitorUI.mmp
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-OPTION TARGETFILE ConnectionMonitorUi.mif
-OPTION HEADERFILE ConnectionMonitorUi.mbg
-OPTION SOURCES -c8,1 qgn_prop_wml_gprs.bmp \
-               -c8,1 qgn_prop_wml_csd.bmp \
-               -c8,1 qgn_prop_wml_hscsd.bmp \
-               -c8,1 qgn_prop_empty.bmp \
-               -c8,1 qgn_prop_cmon_gprs_suspended.bmp \
-               -c8,8 qgn_prop_cmon_conn_active.bmp \
-               -c8,8 qgn_prop_cmon_wlan_avail.bmp \
-               -c8,1 qgn_prop_wlan_bearer.bmp \
-               -c8,1 qgn_prop_cmon_wlan_conn.bmp \
-               -c8,1 qgn_indi_wlan_signal_low_add.bmp \
-               -c8,1 qgn_indi_wlan_signal_med_add.bmp \
-               -c8,1 qgn_indi_wlan_signal_good_add.bmp \
-               -c8,1 qgn_indi_wlan_secure_network_add.bmp
-END
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
-  OPTION TARGETFILE ConnectionMonitorUi_aif.mif
-  OPTION SOURCES -c8,8 qgn_prop_cp_conn_man.bmp
-END
-
-//PRJ_TESTMMPFILES
\ No newline at end of file
Binary file connectionmonitoring/connectionmonitorui/help/data/xhtml.zip has changed
--- a/connectionmonitoring/connectionmonitorui/help/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-* 
-* Contributors:
-* 
-* 
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>				
-PRJ_EXPORTS
-:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
-
-../inc/cmon.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cmon.hlp.hrh)
-../rom/connectionmonitoruihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(connectionmonitoruihelps_variant.iby)
--- a/connectionmonitoring/connectionmonitorui/help/inc/cmon.hlp.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* 
-* Description:
-*
-*/
-	
-//
-// cmon.hlp.hrh generated by CSXHelp Utilities.
-//           
-
-#ifndef __CMON_HLP_HRH__
-#define __CMON_HLP_HRH__
-
-_LIT(KCMON_HLP_CMON_MAIN_VIEW, "CMON_HLP_CMON_MAIN_VIEW"); // 
-_LIT(KCMON_HLP_CMON_WLAN_VIEW, "CMON_HLP_CMON_WLAN_VIEW"); // 
-
-#endif 
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/help/rom/connectionmonitoruihelps_variant.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IBY file for ConnectionMonitorUi helps
- *
-*/
-
-
-#ifndef __CONNECTIONMONITORUIHELPS_VARIANT_IBY__
-#define __CONNECTIONMONITORUIHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\contents.zip)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\index.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\keywords.xml)
-    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/inc/ActiveWrapper.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +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:  CActiveWrapper header file
-*
-*/
-
-
-#ifndef __ACTIVE_WRAPPER_H__
-#define __ACTIVE_WRAPPER_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <rconnmon.h>
-
-// CONSTANTS
-
-// CLASS DECLARATION
-
-/**
-*  Definition of CActiveWrapper
-*
-*  @since S60 v3.2
-*/
-NONSHARABLE_CLASS( CActiveWrapper ) : public CActive
-    {
-    public:  // Constructors and destructor
-        
-        /**
-        * Two-phased constructor.
-        */
-        static CActiveWrapper* NewL();
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CActiveWrapper();
-
-    public: // New functions
-
-        /**
-        * Starts the active object and gets the value for a string attribute.
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested string.
-        */
-        void StartGetStringAttribute( TInt const aConnectionId, 
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TDes& aValue );
-
-        /**
-        * Starts the active object and gets the value for a TInt attribute.
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TInt attribute.
-        */
-        void StartGetIntAttribute( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TInt& aValue );
-
-        /**
-        * Starts the active object and gets the value for a TUint attribute.
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TUint attribute.
-        */
-        void StartGetUintAttribute( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TUint& aValue );
-
-        /**
-        * Starts the active object and gets the value for a packaged 
-        * attribute (TConnMonClientEnumBuf).
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aValue On completion, contains the requested packaged attribute.
-        */
-        void StartGetConnSharings( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TConnMonClientEnumBuf& aValue );
-
-        /**
-        * Starts the active object and gets the value for a packaged 
-        * attribute (TConnMonTimeBuf).
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aValue On completion, contains the requested packaged attribute.
-        */
-        void StartGetConnTime( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TConnMonTimeBuf& aValue );
-
-        /**
-        * Starts the active object and gets the value for a TInt attribute
-        * for the used Bearer type.
-        * @param aConnectionId Connection id.
-        * @param aConnectionMonitor RConnectionMonitor
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @param aValue On completion, contains the requested TInt attribute.
-        */
-        void StartGetBearerType( TInt const aConnectionId,
-                            RConnectionMonitor& aConnectionMonitor,
-                            TUint const aAttribute,
-                            TInt& aValue );
-
-        /**
-        * Starts the active object and gathers information on 
-        * currently active connections.
-        * @param aConnectionCount On completion, contains the number of active connections.
-        * @param aConnectionMonitor RConnectionMonitor
-        */
-        void StartGetConnectionCount( TUint& aConnectionCount,
-                            RConnectionMonitor& aConnectionMonitor );
-                            
-    public: // Functions from base classes (CActive)
-
-        void DoCancel();
-        void RunL();
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CActiveWrapper();
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-    private: // data
-        
-        /**
-        * Own: sync. helper in async. requests
-        */
-        CActiveSchedulerWait    iWait;
-    };
-
-#endif // __ACTIVE_WRAPPER_H__
-
-            
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionArray.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Contains and handles CConnectionInfo instances
-*     
-*
-*/
-
-
-#ifndef CONNECTIONARRAY_H_INCLUDED
-#define CONNECTIONARRAY_H_INCLUDED
-
-// INCLUDES
-#include    "ConnectionInfoBase.h"
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-/**
-* Contains and handles CConnectionInfo instances.
-*/
-class CConnectionArray : public CBase, public MDesCArray
-    {
-    public:
-        /**
-        * Constructor.
-        */
-        CConnectionArray();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CConnectionArray();
-
-        /**
-        * Contructs dynamic data members
-        */
-        virtual void ConstructL();
-   
-    public: // from MDesCArray
-        /** 
-        * Returns the number of descriptor elements in a descriptor array.
-        * @return The number of descriptor elements in a descriptor array. 
-        */
-        virtual TInt MdcaCount() const;
-
-        /** 
-        * Indexes into a descriptor array.    
-        * @param aIndex The position of the descriptor element within a 
-        * descriptor array. 
-        * The position is relative to zero; i.e. zero implies the first 
-        * descriptor element in a descriptor array. 
-        * @return A  non-modifiable pointer descriptor representing 
-        * the descriptor element located at position aIndex within a 
-        * descriptor array. 
-        */
-        virtual TPtrC MdcaPoint( TInt aIndex ) const;
-
-    public:
-    
-        /**
-        * Give back a copy of connectionarray. 
-        */
-        virtual CConnectionArray* DeepCopyL();
-    
-        /**
-        * Returns the index of the given connection
-        * @param aConnectionId connection id
-        * @return index value of connection in the array, or -1 if there
-        * is no connection the given Id
-        */
-        TInt GetArrayIndex( TUint aConnectionId ) const;
-
-        /**
-        * Returns the index of the given connection
-        * @param aConnection connection 
-        * @return index value of connection in the array, or -1 if there
-        * is no the given connection 
-        */
-        TInt GetArrayIndex( CConnectionInfoBase* aConnection ) const;
-
-        /**
-        * Add only new connection to the array
-        * @param aConnection the connection to be added to the array
-        */
-        void AppendL( CConnectionInfoBase* aConnection );
-
-        /**
-        * Delete connection from the array
-        * @param aConnectionId id of connection to be removed from the array
-        */
-        void Delete( TUint aConnectionId );
-
-        /**
-        * Delete connection from the array
-        * @param aConnection the connection to be removed from the array
-        */
-        void Delete( CConnectionInfoBase* aConnection );
-
-        /**
-        * Destroys the connection array
-        */
-        void Reset();
-
-        /**
-        * Returns info object of connection given by index value in the array
-        * @param aIndex index value of connection in the array
-        * @return CConnectionInfo* pointer to the connection info object
-        */
-        CConnectionInfoBase* operator[]( TUint aIndex ) const;
-        
-        /**
-        * Returns info object of connection given by index value in the array
-        * Checks the boundaries of array.
-        * @param aIndex index value of connection in the array
-        * @return CConnectionInfoBase* pointer to the connection info object if
-        * the given index is valid, NULL otherwise
-        */
-        CConnectionInfoBase* At( TInt aIndex ) const;
-        
-        /**
-        * Gives back the number of active connections (created or suspended)
-        * @return the number of active connections
-        */
-        TInt NumberOfActiveConnections() const;
-
-        /**
-        * Gives back the number of suspended connections
-        * @return the number of suspended connections
-        */
-        TInt NumberOfSuspendedConnections() const;
-
-    protected:
-        /**
-        * Contains the connections.
-        */
-        CArrayPtrFlat<CConnectionInfoBase>* iConnectionArray;   ///< Owned.
-    };
-
-#endif // CONNECTIONARRAY_H_INCLUDED
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionInfoBase.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,506 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a connection
-*     
-*
-*/
-
-
-#ifndef CONNECTIONINFOBASE_H_INCLUDED
-#define CONNECTIONINFOBASE_H_INCLUDED
-
-// INCLUDES
-#include    <rconnmon.h>
-#include    <stdlib.h>
-#include    <badesca.h>
-#include    <e32std.h>
-#include    <stdlib.h>
-
-// CONSTANTS
-LOCAL_D const TUint KConnectionListItemText = 64;
-LOCAL_D const TUint KDetailsListItemText = 64;
-
-_LIT( KConnectonListItemTextFormat, "%o\t%S\t%S" );
-_LIT( KDetailsListItemTextFormat, "%S\t%S" );  
-
-// FORWARD DECLARATIONS
-
-class CActiveWrapper;
-
-// CLASS DECLARATION
-
-enum TConnectionStatus
-    {
-    EConnectionUninitialized,
-    EConnectionCreating,
-    EConnectionCreated,
-    EConnectionSuspended,
-    EConnectionClosing,
-    EConnectionClosed
-    };
-
-/**
-* Order of icons in icon array of containers
-*/
-enum TIconsOrder
-    {
-    EGprs = 0,
-    ECsd,
-    EHscsd,
-    EEmpty,
-    ESuspended,
-    EWlan
-    };
-
-
-/**
-* Represents a connection.
-*/
-class CConnectionInfoBase : public CBase
-    {
-    public: // Constructors, Desturctor
-                
-        /**
-        * Destructor
-        */
-        virtual ~CConnectionInfoBase();
-
-    protected:
-        /**
-        * Constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aConnectionMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        CConnectionInfoBase( TInt aConnectionId,
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-
-    public: // New functions
-    
-        /**
-        * Give back a copy of connection. 
-        */
-        virtual CConnectionInfoBase* DeepCopyL() = 0;
-    
-
-        /**
-        * Refresh required details of connection. 
-        */
-        virtual void RefreshDetailsL() = 0;
-
-        /**
-        * Refresh iListBoxItemText text, connection ListBox has a reference to
-        * this text.
-        */
-        virtual void RefreshConnectionListBoxItemTextL() = 0;
-
-        /**
-        * Refresh details array of connection. DetailsListBox has a reference
-        * to this array.
-        */
-        virtual void RefreshDetailsArrayL() = 0;
-
-        /**
-        * Called, if the status of connection is changed.
-        */ 
-        void StatusChangedL();
-
-        /**
-        * Gives back the connection is alive or not.
-        * @return ETrue if connection is created or suspended, 
-        * EFalse otherwise
-        */
-        TBool IsAlive() const;
-
-        /**
-        * Gives back the connection is suspended or not.
-        * @return ETrue if connection is suspended, 
-        * EFalse otherwise
-        */
-        TBool IsSuspended() const;
-                
-        /**
-        * @return ETrue if deletion of connection started form CMUI,
-        * EFalse otherwise
-        */
-        TBool GetDeletedFromCMUI() const;
-        
-        /**
-        * Sets status of connection to EConnectionClosing
-        */
-        void SetAllDeletedFromCMUI();        
-        
-        /**
-        * Sets iDeletedFromCMUI to ETrue, means dletion of connection
-        * was established from CMUI
-        */
-        void SetDeletedFromCMUI();        
-        
-        /**
-        * Gives back a pointer to the DetailsArray of connection.
-        * @return CDesCArraySeg* iDetailsArray of connection
-        */
-        CDesCArrayFlat* GetDetailsArray() const;
-
-        /**
-        * Gives back the id of connection
-        * @return the id of connection.
-        */
-        TUint GetConnectionId() const;
-
-        /**
-        * Gives back the icon id of connection 
-        * @return the icon id of connection 
-        */
-        virtual TUint GetIconId() const = 0;
-
-        /**
-        * Gives back the connection is EasyWLAN or not.
-        * @return ETrue if the selected conenction EasyWLAN,
-        * EFalse otherwise
-        */
-        virtual TBool IsEasyWLAN() const { return EFalse; };
-        
-        /**
-        * Gives back current Name of Network ( SSID )
-        * @return iNetworkName
-        */
-        virtual HBufC* GetWlanNetworkNameLC() const { return NULL; };
-
-        /**
-        * Gives back the status of connection 
-        * @return the status of connection 
-        */
-        TConnectionStatus GetStatus() const;
-
-        /**
-        * Refresh status of connection
-        * @param aConnectionStatus new status of connection
-        */
-        void RefreshConnectionStatus( 
-                                   const TInt aConnectionStatus );
-
-        /**
-        * Gives back the name of connection 
-        * @return the name of connection 
-        */
-        HBufC* GetNameLC() const;        
-        
-        /**
-        * Gives back the bearertype of connection 
-        * @return the bearertype of connection 
-        */
-        TConnMonBearerType GetBearerType() const;
-        
-        /**
-        * Gives back a pointer the iListBoxItemText of connection 
-        * @return the iListBoxItemText of connection 
-        */
-        TPtrC GetConnectionListBoxItemText() const;
-
-        /**
-        * Check if connection name is starts with "mRouter" string or not.
-        * ( if this connection is not IR/BT )
-        * @retrun ETrue if starts wiht "mRouter", EFalse otherwise.
-        */
-        TBool CheckMrouterIap();
-    
-    protected:
-        /**
-        * Creates a string for DetailsListBoxItem, title came from resource 
-        * and value from aValueText
-        * @param aResourceId a resource id
-        * @param aValueText the value of text
-        * @retrun  a string consist of resource and value text
-        */
-        HBufC*  ToDetailsListBoxItemTextL( const TUint aResourceId, 
-                                           const HBufC* aValueText ) const;
-
-        /**
-        * Creates a string for DetailsListBoxItem, title came from resource 
-        * and value from aValueText, and Appends to iDetailsArray
-        * @param aResourceId a resource id
-        * @param aValueText the value of text
-        */
-        void  ToDetailsListBoxItemTextWithAppendL( const TUint aResourceId, 
-                                                   const HBufC* aValueText );
-
-        /**
-        * Creates a string for DetailsListBoxItem, title came from resource 
-        * and value from aValueText, and Replaces the given element with it
-        * @param aResourceId a resource id
-        * @param aValueText the value of text
-        */
-        void  ToDetailsListBoxItemTextWithReplaceL( const TUint aResourceId, 
-                                                    const HBufC* aValueText,
-                                                    TInt aIndex );
-
-
-        /**
-        * Creates an array with requrired details of connection to
-        * the listbox which visulaize details of connection. This member
-        * is called at initialization.
-        */
-        virtual void ToArrayDetailsL() = 0;
-
-        /**
-        * Refresh status of connection
-        */
-        void RefreshConnectionStatus();
-
-        /**
-        * Refresh amount of sent and received data of connection
-        */
-        void RefreshSentReceivedDataL();
-
-        /**
-        * Refresh the value of transfer speeds (Up/Down) of connection
-        */
-        void RefreshTransferSpeedsL();
-                        
-        /**
-        * Refresh the duration of connection.
-        */
-        void RefreshDuration();
-        
-        /**
-        * Refresh the applications names which uses the connection
-        * @return the count of applications use connection 
-        *         (from the user point of view)
-        */
-        TInt RefreshAppNamesL();
-        
- 
-     public: // New functions        
-
-        /**
-        * Creates a string from bearer of connection
-        * @return string representation of bearer of connection.
-        */
-        HBufC* ToStringBearerLC() const;
-
-        /**
-        * Creates a string from status of connection
-        * @param aIsDetailsView is ETrue then get localised resources 
-        * to details view otherwise to connections view
-        * @return string representation of status of connection.
-        */
-        HBufC* ToStringStatusLC( TBool aIsDetailsView = ETrue ) const;
-
-        /**
-        * Creates a string from amount of received data 
-        * and sent data combined/summarized.
-        * @return string representation  of summarized of 
-        * Received and Sent data.
-        */
-        HBufC* ToStringTotalTransmittedDataLC() const;
-
-        /**
-        * Creates a string from amount of Sent data
-        * @param aToBeThreeDigit the shown digits numbers limited to three
-        * @return string representation of Sent data.
-        */
-        HBufC* ToStringSentDataLC( TBool aToBeThreeDigit = EFalse ) const;
-
-        /**
-        * Creates a string from amount of Received data
-        * @param aToBeThreeDigit the shown digits numbers limited to three
-        * @return string representation of Received data.
-        */
-        HBufC* ToStringReceivedDataLC( TBool aToBeThreeDigit = EFalse ) const;
-
-        /**
-        * Creates a string from transfer speed Up of connection
-        * @return string representation of transfer speed Up of 
-        * connection.
-        */
-        HBufC* ToStringTransferSpeedUpLC() const;
-
-        /**
-        * Creates a string from transfer speed Down of connection
-        * @return string representation of transfer speed Down of 
-        * connection.
-        */
-        HBufC* ToStringTransferSpeedDownLC() const;
-
-        /**
-        * Creates a string from duraion of the connection.
-        * @return string representation duraion of the connection.
-        */
-        HBufC* ToStringDurationLC() const;
-
-        /**
-        * Remove directional markers from a string.
-        * @param aStringHolder the string which markers has to remove.
-        */
-        void StringMarkerRemoval( HBufC* aStringHolder );
-
-        /**
-        * Remove directional markers from a string.
-        * @param aAppIndex the index of Applicaions names array.
-        * @return string representation of used app. name 
-        */
-        HBufC* ToStringAppNameLC( TInt aAppIndex );
-
-
-    private:
-        /**
-        * Creates a string from aLoadedData, extended with measure
-        * @param aLoadedData the data is converted to string
-        * @param aToBeThreeDigit the shown digits numbers limited to three
-        * @param aArrowChar the character representation of arrow (Up/Down)
-        * @return string representation of loaded data 
-        */
-        HBufC* ToStringLoadedDataLC( TUint aLoadedData, 
-                                     TBool aToBeThreeDigit = EFalse,
-                                     const TUint aArrowChar = 0 ) const;
-
-
-        /**
-        * Creates a string from transfer speed of connection
-        * @param aSpeed the speed is converted to string
-        * @param aArrowChar the character representation of arrow (Up/Down)
-        * @return string representation of transfer speed of 
-        * connection, extended with measure 
-        */
-        HBufC* ToStringTransferSpeedLC( div_t aSpeed, 
-                                        const TUint aArrowChar ) const;
-
-        /**
-        * Called if iConnectionStatus is changed to created. Initializes
-        * changable details of connection.
-        */
-        void InitializeConnectionInfoL();
-
-        /**
-         * Compare the provided UID array with the current cached UID array
-         * iClientBuf.
-         * @param aClients New array of UIDs.
-         * @return ETrue if the contents are the same, EFalse otherwise.
-         */
-        TBool IsTheSameUids( TConnMonClientEnumBuf& aClients );
-
-        /**
-         * Copy the provided UIDs into the cached UID array.
-         * @param aClients New array of UIDs.
-         */
-        void CopyUidsToBuf( TConnMonClientEnumBuf& aClients );
-
-    protected:
-        
-        /**
-        * Used for refreshing details of connection.
-        */
-        RConnectionMonitor* const           iConnectionMonitor;   
-
-        /**
-        * The id of connection, given by RConnectionMonitor.
-        */
-        TUint                               iConnectionId;
-
-        /**
-        * The name of connection
-        */
-        TName                               iConnectionName;    // IAPName
-        
-        /**
-        * BearerType of connection
-        */
-        TConnMonBearerType                  iConnectionBearerType;
-        
-        /**
-        * The status of connection
-        */
-        TConnectionStatus                   iConnectionStatus;
-
-        /**
-        * The amount of Uploaded data
-        */
-        TUint                               iUploaded;
-
-        /**
-        * The amount of Downloaded data
-        */
-        TUint                               iDownloaded;
-
-        /**
-        * The start time of connection
-        */
-        TTime                               iStartTime;
-
-        /**
-        * The duration of connection
-        */
-        TTime                               iDuration;
-
-        /**
-        * Used for calculating speed data
-        */
-        TTime                               iLastSpeedUpdate;
- 
-        /**
-        * The speed of transferring Uploaded data
-        */
-        div_t                               iUpSpeed;
-
-        /**
-        * The speed of transferring Downloaded data
-        */
-        div_t                               iDownSpeed;
-
-        /**
-        * The text of list item.
-        */
-        TBuf<KConnectionListItemText>       iListBoxItemText; 
-
-        /**
-        * Descriptor array, contains details of connection. Owned.
-        */
-        CDesCArrayFlat*                     iDetailsArray;
-        
-        /**
-        * ETrue if deletion of connection started form CMUI, EFalse otherwise
-        */
-        TBool								iDeletedFromCMUI;
-        
-        /**
-        * The names of applications use connection.Owned.
-        */
-        CDesCArrayFlat*                     iAppNames;
-        
-        /**
-        * The active object for info. refreshing. NOT Owned.
-        */
-        CActiveWrapper*                     iActiveWrapper;
-
-        /**
-         * Buffer to cache a connection's client application UIDs.
-         * These are kept in cache so application names are resolved only when
-         * the client list has changed.
-         */
-        TConnMonClientEnumBuf               iClientBuf;
-    };
-
-
-#endif //CONNECTIONINFOBASE_H_INCLUDED
-
-// End of File
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUi.hrh	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  resource header file
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUI_HRH
-#define CONNECTIONMONITORUI_HRH
-
-// Command ID-s for Option menu items
-enum TConnectionMonitorUiCommandIds
-    {
-    EConnectionMonitorUiCmdAppDetails = 1,
-    EConnectionMonitorUiCmdAppEndConn,
-    EConnectionMonitorUiCmdAppEndAll
-    };
-
-// Tab view Id-s
-enum TConnectionMonitorUiTabViewId
-    {
-    EConnectionMonitorUiMainViewTab = 2,
-    EConnectionMonitorUiDetailsViewTab
-    };
-
-
-#endif      // CONNECTIONMONITORUI_HRH
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiApp.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  CConnectionMonitorUiApp application class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUIAPP_H
-#define CONNECTIONMONITORUIAPP_H
-
-// INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidConnectionMonitorUi = { 0x101F84D0 };
-
-const TInt KErrUnknownConnectionState   = -50000;
-const TInt KErrCorruptedBearerType      = -50001;
-
-/**
-* Global panic function
-*/
-extern void Panic( TInt aReason );
-
-// CLASS DECLARATION
-
-/**
-* CConnectionMonitorUiApp application class.
-* Provides factory to create concrete document object.
-* 
-*/
-class CConnectionMonitorUiApp : public CAknApplication
-    {
-    public:
-
-    public: // Functions from base classes
-
-    private:
-
-        /**
-        * From CApaApplication, creates CConnectionMonitorUiDocument
-        * @return A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-        
-        /**
-        * From CApaApplication, returns application's UID
-        * @return The value of KUidConnectionMonitorUi.
-        */
-        TUid AppDllUid() const;
-
-    };
-
-#endif  // CONNECTIONMONITORUIAPP_H
-
-// End of File
-
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiAppUi.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,312 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Application UI class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUIAPPUI_H
-#define CONNECTIONMONITORUIAPPUI_H
-
-// INCLUDES
-#include <aknViewAppUi.h>
-#include <aknnavide.h>
-#include <rconnmon.h>
-
-#include "ConnectionMonitorUiLogger.h"
-
-// FORWARD DECLARATIONS
-class CConnectionMonitorUiContainer;
-class CConnectionArray;
-class CConnectionInfoBase;
-
-class CFeatureManagerWrapper;
-class CActiveWrapper;
-
-// CONSTANTS
-
-/**
-* For iPeriodic Timer. The interval between events generated
-* after the initial delay, in microseconds.
-*/
-LOCAL_D const TInt KTickInterval = 1000000;
-
-
-// CLASS DECLARATION
-
-/**
-*
-*/
-class MActiveEventObserverInterface
-    {
-    public:
-        /**
-        * Called if MConnectionMonitorObserver is raised EventL event. 
-        * @param aConnMonEvent The event information.
-        * @param aIndex The index of connection in the iConnectionArray. 
-        */
-        virtual void OnEventL( const CConnMonEventBase& aConnMonEvent,
-                               const TInt aIndex ) = 0;
-
-        /**
-        * Called by iPeriodic. It refreshes details of connections.
-        */
-        virtual void OnTimerEventL() = 0;
-    };
-  
-/**
-*
-*/    
-class MTimerExpiredObserverInterface     
-    {
-    public:
-        /**
-        * Called by iPeriodic.
-        */
-        virtual void OnTimerExpiredL() = 0;   
-        
-        /**
-        * Gives back Timer interval.
-        */
-        virtual TInt GetTickInerval() const = 0; 
-    };
-
-/**
-* Application UI class.
-* Provides support for the following features:
-* - EIKON control architecture
-* - view architecture
-* - status pane
-* 
-*/
-class CConnectionMonitorUiAppUi : public CAknViewAppUi,
-                                  public MConnectionMonitorObserver,
-                                  public MTimerExpiredObserverInterface
-    {
-    public: // Constructors and destructor
-        /**
-        * EPOC default constructor.
-        */      
-        void ConstructL();
-
-        /**
-        * Destructor.
-        */      
-        ~CConnectionMonitorUiAppUi();
-
-    public:
-        /**
-        * Returns pointer to AppUi object.
-        */      
-        static CConnectionMonitorUiAppUi* Static();
-
-        /**
-        * from MConnectionMonitorObserver
-        */
-        void EventL( const CConnMonEventBase &aConnMonEvent );
-
-    public:
-        /**
-        * Register and start connection monitor engine callback notification,
-        * and starts periodic timer.
-        * @param aObserver Observer object
-        */
-        void StartConnEventNotification( 
-                                    MActiveEventObserverInterface* aObserver );
-
-        /**
-        * Stops connection monitor notification and periodic timer
-        * @param aObserver Observer object
-        */
-        void StopConnEventNotification( 
-                                    MActiveEventObserverInterface* aObserver );
-
-        /**
-        * Starts iPeriodic.
-        * @param aInterval Refresh interval
-        */
-        void StartTimerL( const TInt aInterval = KTickInterval );
-
-        /**
-        * Stops iPeriodic.
-        */
-        void StopTimer();
-
-        /**
-        * Timer callback of iPeridoc.
-        */
-        static TInt Tick( TAny* aObject );
-        
-        /**
-        * called by Tick( TAny* aObject ).
-        */
-        TInt Tick();        
-
-        /**
-        * Delete and remove a connection from the View
-        * @param aConnId the id of the currect selected connection
-        * @param aConnInfo pointer to the current selected connection
-        */
-        void DeleteDetailsView( 
-                            TInt aConnId, CConnectionInfoBase* aConnInfo );
-
-#ifdef RD_CONTROL_PANEL
-    
-        /**
-        * This function is used for querying whether the application
-        * is launched in embedded mode or not.
-        * @return ETrue:  The application is launched in embedded mode.
-        *         EFalse: The application is launched in standalone mode.
-        */
-        TBool IsEmbedded() const;
-
-#endif // RD_CONTROL_PANEL        
-
-    protected:
-        /**
-        * from CCoeAppUi, for icon skinning
-        */
-        void HandleForegroundEventL( TBool aForeground );
-
-    private:
-        /**
-        * From MEikMenuObserver
-        */
-        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
-        /**
-        * From CEikAppUi, takes care of command handling.
-        * @param aCommand command to be handled
-        */
-        void HandleCommandL( TInt aCommand );
-
-        /**
-        * From CEikAppUi, handles key events.
-        * @param aKeyEvent Event to handled.
-        * @param aType Type of the key event. 
-        * @return Response code ( EKeyWasConsumed, EKeyWasNotConsumed ). 
-        */
-        virtual TKeyResponse HandleKeyEventL(
-                                const TKeyEvent& aKeyEvent, TEventCode aType );
-
-        /**
-        * Called by Tick.
-        */
-        void OnTimerExpiredL( );
-        
-        /**
-        * Gives back Timer interval.
-        */        
-        TInt GetTickInerval() const;         
-        
-        /**
-        * Call one after the other RefreshDetails() function of connections
-        * which are contained by iConnectionArray.
-        */
-        void RefreshAllConnectionsL();
-
-        /**
-        * Creates a CConnectionInfBase class, the given connection id. 
-        * The Dynamic type of the returned class depends on the bearer type 
-        * of the connection.
-        * @params aConnectionId the id of the connection
-		* @params aBearerType the bearer type of the connection
-        * @return CConnectionInfBase instance, The Dynamic type of the returned
-        * class depends on the bearer type of the connection.
-        */
-        CConnectionInfoBase* CreateConnectionInfoL( TUint aConnectionId, TConnMonBearerType aBearerType );
-            
-        /**
-        * Initialize connection array
-        */
-        void InitializeConnectionArrayL();
-        
-        /**
-        * Gets the IAP of Easy Wlan access point
-        */
-        void GetEasyWlanIAPNameL();
-
-        /**
-        * Shows connection summary note.
-        * @param aConnection
-        */        
-        void ShowConnectionSummaryInformationNoteL( 
-        							const CConnectionInfoBase* aConnection );
-    private: // Data
-
-        /**
-        * For refresh details of connections.
-        */
-        RConnectionMonitor              iMonitor;       
-       
-        /**
-        * Contains CConnectionInfoBase instances, which are represents 
-        * the connections in the system.
-        */
-        CConnectionArray*               iConnectionArray; // Owned
-        
-        /**
-        * Timer, to refresh details of connections
-        */
-        CPeriodic*                      iPeriodic;  // Owned
-        
-        /**
-        * Actual observer instance. This observer handles refreshing details
-        * of connection on the screen.
-        */
-        MActiveEventObserverInterface*  iObserver;  // Not owned
-                
-        /**
-        * CFeatureManagerWrapper wraps FeatureManager to eliminate maintenance 
-        * of existance of FeatureManager.
-        * Owned.
-        */
-        CFeatureManagerWrapper*         iFeatureManagerWrapper;
-        
-        /**
-        * The active object for info. refreshing. Owned.
-        */
-        CActiveWrapper*                 iActiveWrapper;
-
-        /**
-        * the name of Easy Wlan access point it there is, otherwise NULL
-        */
-        HBufC*                          iEasyWlanIAPName;        
-                
-        /**
-        * A pointer to actual timer observer instance
-        */
-        MTimerExpiredObserverInterface* iTimerObserver;
-
-        /**
-        * Should the Main View be activeted during HandleForegroundEventL() method
-        */
-        TBool activateMainView;
-        
-        /**
-         * An array to hold the connectionIds in situations when creating
-         * connectionInfo object fails
-         */
-        RArray<TUint> iNewConnectionIdArray;
-        
-        /**
-         * Connections waiting for first event
-         */
-        RArray<TInt> iConnectionsWaitingFirstEvent;
-    };
-
-#endif  // CONNECTIONMONITORUIAPPUI_H
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiContainer.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  container control class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUICONTAINER_H
-#define CONNECTIONMONITORUICONTAINER_H
-
-// INCLUDES
-#include <AknUtils.h>
-#include "ConnectionMonitorUiAppUi.h"
-   
-// FORWARD DECLARATIONS
-class CConnectionArray;
-class RConnectionMonitor;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-class CActiveWrapper;
-
-// CLASS DECLARATION
-/**
-*  CConnectionMonitorUiContainer  container control class.
-*/
-class CConnectionMonitorUiContainer : public CCoeControl,
-                                      public MActiveEventObserverInterface
-    {
-    public: // Constructors and destructor
-        /**
-        * Constructor
-        * @param aConnectionArray array contains connection infos
-        * @param aMonitor to handlin connection details
-        * @param aActiveWrapper the for refreshing
-        */
-        CConnectionMonitorUiContainer( 
-                                     CConnectionArray* const aConnectionArray,
-                                     RConnectionMonitor* aMonitor,
-                                     CActiveWrapper* aActiveWrapper );
-        
-        /**
-        * Second phase constructor.
-        * @param aSelectedItem index of selected item in the list
-        * @param aRect Frame rectangle for container.        
-        */
-        void ConstructL( TInt aSelectedItem, const TRect& aRect  );
-
-        /**
-        * Destructor.
-        */
-        ~CConnectionMonitorUiContainer();
-
-    public: // Functions from base classes
-    
-        /** 
-        * From CCoeControl, gets the control's help context.
-     	* @param aContext help context.
-        */
-        virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
-
-        /**
-        * From CoeControl OfferKeyEventL.
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
-                                     TEventCode aType );
-
-        /**
-        * From CoeControl,CountComponentControls.
-        */
-        TInt CountComponentControls() const;
-
-        /**
-        * From CCoeControl, ComponentControl.
-        */
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-
-        /**
-        * From CCoeControl        
-        */
-        void HandleResourceChange( TInt aType ) ;
-        
-    public:  
-        /**
-        * from MActiveEventObserverInterface
-        */
-        void OnEventL( const CConnMonEventBase& aConnMonEvent, 
-                       const TInt aIndex );
-        /**
-        * from MActiveEventObserverInterface
-        */
-        void OnTimerEventL();
-
-        /**
-        * Returns the item index of selected connection
-        * @return index of selected connection
-        */
-        TInt SelectedConnection();
-
-        /**
-        * Close the selected connection.
-        */
-        void EndConnectionL();
-
-        /**
-        * Close all connection
-        */
-        void EndAllConnectionL();
-
-        /**
-        * Returns pointer to the listbox.
-        * @return pointer to the listbox.
-        */
-        CAknDoubleGraphicStyleListBox*  ListBox() const;
-
-        /**
-        * Refresh the content of Navi pane and 
-        * Push it to stack. Called by View DoActivateL()
-        */
-        void PushAndRefreshNaviPaneL();
-
-        /**
-        * Pop and destroy the NaviPane from stack. 
-        * Called by View DoDeactivateL()
-        */
-        void PopNaviPane();
-
-        /**
-        * Called by HandleForegroundEventL, draw all item of list box.
-        */
-        void DrawFirstAllListBoxItem();
-    
-    protected:
-        /**
-        * From CoeControl,SizeChanged.
-        */
-        void SizeChanged();
-        
-        /**
-        * From CoeControl,SizeChanged.
-        */        
-        virtual void FocusChanged(TDrawNow aDrawNow);
-
-    protected: // New functions
-        /**
-        * Sets the icons of listbox
-        */
-        void SetIconsL();
-
-        /**
-        * Gets the title panes.
-        */
-        void GetPanesL();        
-
-    protected: // data
-        /**
-        * List box contains connection items
-        */
-        CAknDoubleGraphicStyleListBox* iListBox;
-        
-        /**
-        * To handling details of connections
-        */
-        RConnectionMonitor* iMonitor;   
-
-        /**
-        * Contains connections info
-        */
-        CConnectionArray* const iConnectionArray;
-
-        /**
-        * Owned. For NaviPane.
-        */
-        CAknNavigationDecorator* iNaviDecorator;
-
-        /**
-        * Not Owned. For NaviPane.
-        */
-        CAknNavigationControlContainer* iNaviPane;
-    
-    private: // data
-
-        /**
-        * ETrue if Wlan connection is supported, EFalse otherwise.
-        */
-        TBool isWlanSupported;
-        
-        /**
-        * The active object for info. refreshing. NOT Owned.
-        */
-        CActiveWrapper* iActiveWrapper;
-        
-        /**
-        * Connection count
-        */
-        TInt iOldConnectionCount;
-        
-        /**
-        * Set when main view list comes to focus
-        */
-        TBool iFocusChanged;
-    };
-
-#endif // CONNECTIONMONITORUICONTAINER_H
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsContainer.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  container control class
-*     
-*
-*/
-
-#ifndef CONNECTIONMONITORUIDETAILSCONTAINER_H
-#define CONNECTIONMONITORUIDETAILSCONTAINER_H
-
-// INCLUDES
-#include <aknlists.h>
-#include "ConnectionMonitorUiAppUi.h"
-
-// FORWARD DECLARATIONS
-class CConnectionArray;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-class CConnectionMonitorUiDetailsView;
-
-// CLASS DECLARATION
-/**
-*  CConnectionMonitorUiDetailsContainer  container control class.
-*/
-class CConnectionMonitorUiDetailsContainer : 
-                                          public CCoeControl,
-                                          public MActiveEventObserverInterface,
-                                          public MAknNaviDecoratorObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * Constructor
-        * @param aConnectionArray array containing connection list
-        */
-        CConnectionMonitorUiDetailsContainer( 
-                            const CConnectionArray* const aConnectionArray );
-
-        /**
-        * EPOC second-phase constructor.
-        * @param aRect Frame rectangle for container.
-        * @param aParentView ParentView of the container
-        */
-        void ConstructL( const TRect& aRect, 
-                              CConnectionMonitorUiDetailsView* aParentView );
-
-        /**
-        * Destructor.
-        */
-        ~CConnectionMonitorUiDetailsContainer();
-
-    public: // New functions
-        /**
-        * Sets iConnectionInfo and iConnectionId to the selected
-        * connection
-        * @param aConnectionIndex the index of selected connection
-        */
-        void SetSelectedConnectionL( TUint aConnectionIndex );
-
-        /**
-        * Returns pointer to the listbox.
-        * @return pointer to the listbox.
-        */
-        CAknSingleHeadingStyleListBox* ListBox() const;
-
-        /**
-        * Refresh the content of Navi pane and 
-        * Push it to stack. Called by View DoActivateL()
-        */
-        void PushAndRefreshNaviPaneL();
-
-        /**
-        * Pop the NaviPane from stack. Called by View DoDeactivateL()
-        */
-        void PopNaviPane();
-
-
-    public: 
-        /**
-         * Handler for pointer events, when the Navi Pane arrows have been tapped (from MAknNaviDecoratorObserver)
-         *
-         * @param aEventID  The enum indicating wether right or left arrow was tapped
-         */
-        void HandleNaviDecoratorEventL( TInt aEventID ); 
-
-        /**
-        * from MActiveEventObserverInterface
-        */
-        virtual void OnEventL( const CConnMonEventBase& aConnMonEvent,
-                               const TInt aIndex );
-
-        /**
-        * from MActiveEventObserverInterface
-        */
-        void OnTimerEventL();
-
-        /**
-        * From CCoeControl
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
-                                     TEventCode aType );
-
-        /**
-        * Called by HandleForegroundEventL, draw all item of list box.
-        */
-        void DrawFirstAllListBoxItem();
-
-        /**
-        * From CCoeControl,ComponentControl.
-        */
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-        
-	    /**
-        * From CCoeControl, used for sclable ui and landscape support.
-        */        
-        void HandleResourceChange( TInt aType );    
-        
-        /**
-        * Gets index of the selected item
-        * @return the index of selected item
-        */
-        TInt GetIndexOfSelectedItem(); 
-        
-        /**
-        * Gets iConnectionInfo of the selected connection
-        * @return CConnectionInfoBase* pointer to the connection info object
-        */
-        CConnectionInfoBase* GetSelectedConnectionInfo() const;
-
-    protected:
-        /**
-        * Gets the title panes.
-        */
-        void GetPanesL();
-
-    private: // Functions from base classes
-        /**
-        * From CoeControl,SizeChanged.
-        */
-        void SizeChanged();
-
-        /**
-        * From CoeControl,CountComponentControls.
-        */
-        TInt CountComponentControls() const;
-        
-        /**
-        * From CoeControl,SizeChanged.
-        */        
-        virtual void FocusChanged(TDrawNow aDrawNow);        
-
-    protected: // data       
-        /**
-        * Listbox contains details a connection
-        */
-        CAknSingleHeadingStyleListBox* iListBox;
-
-        /**
-        * Refers to the current selected connection
-        */
-        CConnectionInfoBase*            iConnectionInfo;    // Not Owned.
-
-        /**
-        * The index of selected connection
-        */
-        TUint                           iConnectionIndex;
-        
-        /**
-        * A pointer to connections array
-        */
-        const CConnectionArray* const   iConnectionArray; // Not Owned.
-
-        /**
-        * Owned. For NaviPane.
-        */
-        CAknNavigationDecorator*        iNaviDecorator;
-
-        /**
-        * Not Owned. For NaviPane.
-        */
-        CAknNavigationControlContainer* iNaviPane;
-
-        /**
-        * Not Owned. A pointer to DetailsView
-        */
-        CConnectionMonitorUiDetailsView* iParentView; // Not Owned.
-    };
-
-#endif
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsView.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  view class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUIDETAILSVIEW_H
-#define CONNECTIONMONITORUIDETAILSVIEW_H
-
-// INCLUDES
-#include <aknview.h>
-#include <aknlists.h>
-
-// CONSTANTS
-
-/**
-* UID of view
-*/
-const TUid KDetailsViewId = {3};
-
-// FORWARD DECLARATIONS
-class CConnectionMonitorUiDetailsContainer;
-class CConnectionInfo;
-class CConnectionInfoBase;
-class CConnectionArray;
-
-// CLASS DECLARATION
-/**
-*  CConnectionMonitorUiDetailsView view class.
-*/
-class CConnectionMonitorUiDetailsView : public CAknView, 
-                                        public MEikListBoxObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * Constructor 
-        * @param aConnectionArray array containing connection list
-        */
-        CConnectionMonitorUiDetailsView( 
-                               CConnectionArray* const aConnectionArray );
-
-        /**
-        * EPOC second phase constructor.
-        */
-        void ConstructL();
-
-        /**
-        * Destructor.
-        */
-        ~CConnectionMonitorUiDetailsView();
-
-    public: // Functions from base classes        
-        /**
-        * From CAknView
-        */
-        TUid Id() const;
-
-        /**
-        * From CAknView
-        */
-        void HandleCommandL( TInt aCommand );
-        
-    public: // New functions
-        /**
-        * Call SetSelectedConnection function of iContrainer  
-        * @param aIndex index of connection in the connection array
-        */
-        void SetSelectedConnection( TUint aIndex );
-        
-        /**
-        * Returns index of selected connection 
-        * @return index of selected connection in the connection array
-        */
-        TUint GetSelectedConnection();
-
-        /**
-        * Returns ETrue if the refreshing stopped for the View
-        * @return the staus of View refreshing
-        */
-        TBool GetViewRefreshState();
-
-        /**
-        * Set the View the refreshing status. Stopped or not
-        * @param aViewRefreshState staus of View refreshing
-        */
-        void SetViewRefreshState( TBool aViewRefreshState );
-
-        /**
-        * Closes the Details View.
-        */
-        void CloseViewL();
-
-        /**
-        * Activate the Main View
-        */
-        void ActivateMainViewL();
-
-    protected:
-        /**
-        * From AknView
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId, 
-                          TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-
-        /**
-        * From AknView
-        */
-        void DoDeactivate();
-
-        /** 
-        * From MEikListBoxObserver    
-        */
-        void HandleListBoxEventL( CEikListBox* aListBox, 
-                                  TListBoxEvent aEventType );
-
-    private: // Data
-        /**
-        * Container of View
-        */
-        CConnectionMonitorUiDetailsContainer*   iContainer;
-
-        /**
-        * Array contains connections
-        */
-        CConnectionArray* const           iConnectionArray; // Not Owned.
-
-        /**
-        * The index of selected connection
-        */
-        TUint                                   iConnectionId;
-
-        /**
-        * Staus of View refreshing. If the refreshing stopped its ETrue
-        */
-        TBool                                   iViewRefreshState;
-    };
-
-#endif // CONNECTIONMONITORUIDETAILSVIEW_H
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDocument.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  application class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUIDOCUMENT_H
-#define CONNECTIONMONITORUIDOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-   
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class  CEikAppUi;
-
-// CLASS DECLARATION
-
-/**
-*  CConnectionMonitorUiDocument application class.
-*/
-class CConnectionMonitorUiDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @param aApp Eikon Application
-        */
-        static CConnectionMonitorUiDocument* NewL(CEikApplication& aApp);
-
-        /**
-        * Destructor.
-        */
-        virtual ~CConnectionMonitorUiDocument();
-
-    public: // New functions
-
-    private:
-
-        /**
-        * EPOC default constructor.
-        * @param aApp Eikon Application
-        */
-        CConnectionMonitorUiDocument(CEikApplication& aApp);
-        void ConstructL();
-
-    private:
-
-        /**
-        * From CEikDocument, create CConnectionMonitorUiAppUi "App UI" object.
-        */
-        CEikAppUi* CreateAppUiL();
-    };
-
-#endif // CONNECTIONMONITORUIDOCUMENT_H
-
-// End of File
-
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiLogger.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Logging support for R&D purposes
-*
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUILOGGER_H_INCLUDED
-#define CONNECTIONMONITORUILOGGER_H_INCLUDED
-
-// ========== INCLUDE FILES ================================
-
-#include <eikenv.h>
-#include <flogger.h>
-
-// ========== CONSTANTS ====================================
-
-#ifdef _DEBUG
-
-_LIT( KCMUILogDir,              "CMUI");
-_LIT( KCMUILogFile,             "CMUI.txt");
-_LIT(KCMUILogBanner,            "CMUI 0.1.0");
-_LIT(KCMUILogEnterFn,           "CMUI: -> %S");
-_LIT(KCMUILogLeaveFn,           "CMUI: <- %S");
-_LIT(KCMUILogExit,              "CMUI: Application exit");
-_LIT( KCMUILogTimeFormatString, "%H:%T:%S:%*C2");
-
-// ========== MACROS =======================================
-
-#define CMUILOGGER_CREATE             {FCreate();}
-#define CMUILOGGER_DELETE             {RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogExit);}
-#define CMUILOGGER_ENTERFN(a)         {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogEnterFn, &temp);}
-#define CMUILOGGER_LEAVEFN(a)         {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogLeaveFn, &temp);}
-#define CMUILOGGER_WRITE(a)           {_LIT(temp, a); RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, temp);}
-#define CMUILOGGER_WRITE_F(a, b)      {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, temp, b);}
-#define CMUILOGGER_WRITE_TIMESTAMP(a) {_LIT(temp, a); TTime time; time.HomeTime(); TBuf<256> buffer; time.FormatL( buffer, KCMUILogTimeFormatString ); buffer.Insert(0, temp); RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, buffer); }
-#define CMUILOGGER_WRITEF             FPrint
-
-
-inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
-    {
-    VA_LIST list;
-    VA_START(list,aFmt);
-    RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, aFmt, list);
-    }
-
-inline void FPrint(const TDesC& aDes)
-    {
-    RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, aDes);
-    }
-
-inline void FHex(const TUint8* aPtr, TInt aLen)
-    {
-    RFileLogger::HexDump(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, 0, 0, aPtr, aLen);
-    }
-
-inline void FHex(const TDesC8& aDes)
-    {
-    FHex(aDes.Ptr(), aDes.Length());
-    }
-
-inline void FCreate()
-    {
-    TFileName path(_L("c:\\logs\\"));
-    path.Append(KCMUILogDir);
-    path.Append(_L("\\"));
-    RFs& fs = CEikonEnv::Static()->FsSession();
-    fs.MkDirAll(path);
-    RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeOverwrite, KCMUILogBanner);
-    }
-
-#else // ! _DEBUG
-
-inline void FPrint(const TRefByValue<const TDesC> /*aFmt*/, ...) { };
-
-#define CMUILOGGER_CREATE
-#define CMUILOGGER_DELETE
-#define CMUILOGGER_ENTERFN(a)
-#define CMUILOGGER_LEAVEFN(a)
-#define CMUILOGGER_WRITE(a)
-#define CMUILOGGER_WRITE_F(a, b)
-#define CMUILOGGER_WRITEF   1 ? ((void)0) : FPrint
-#define CMUILOGGER_WRITE_TIMESTAMP(a)
-
-#endif // _DEBUG
-
-// ========== DATA TYPES ===================================
-
-// ========== FUNCTION PROTOTYPES ==========================
-
-// ========== FORWARD DECLARATIONS =========================
-
-// ========== CLASS DECLARATION ============================
-
-#endif // CONNECTIONMONITORUILOGGER_H_INCLUDED
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  view class
-*     
-*
-*/
-
-
-#ifndef CONNECTIONMONITORUI_VIEW_H
-#define CONNECTIONMONITORUI_VIEW_H
-
-// INCLUDES
-#include <aknview.h>
-#include <aknlists.h>
-
-// CONSTANTS
-
-// UID of view
-const TUid KConnectionsViewId = {2};
-
-// FORWARD DECLARATIONS
-class CConnectionMonitorUiContainer;
-class CConnectionArray;
-class CActiveWrapper;
-
-// CLASS DECLARATION
-/**
-*  CConnectionMonitorUiView view class.
-*/
-class CConnectionMonitorUiView : public CAknView, public MEikListBoxObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * Constructor
-        * @param aConnectionArray array contains connection infos
-        * @param aMonitor Connection Monitor engine session
-        * @param aActiveWrapper the for refreshing
-        */
-#ifdef RD_CONTROL_PANEL        
-        CConnectionMonitorUiView( CConnectionArray* const aConnectionArray,
-                                  RConnectionMonitor* aMonitor,
-                                  TBool aIsEmbedded,
-                                  CActiveWrapper* aActiveWrapper );
-#else
-        CConnectionMonitorUiView( CConnectionArray* const aConnectionArray,
-                                  RConnectionMonitor* aMonitor,
-                                  CActiveWrapper* aActiveWrapper );
-#endif // RD_CONTROL_PANEL                                  
-
-        /**
-        * EPOC default constructor.
-        */
-        void ConstructL();
-
-        /**
-        * Destructor.
-        */
-        ~CConnectionMonitorUiView();
-
-    public: // Functions from base classes
-        /**
-        * From AknView
-        */
-        TUid Id() const;
-
-        /**
-        * From AknView
-        */
-        void HandleCommandL( TInt aCommand );
-
-        /**
-        * From MEikMenuObserver 
-        * Dynamic handling of menus.
-        */
-        virtual void DynInitMenuPaneL( TInt aResourceId,
-                                       CEikMenuPane* aMenuPane );
-
-        /**
-        * Observe the connection stat and set the right Soft Keys.
-        */
-        void ConnectionKeyObserver() const;
-
-
-    protected: 
-        /**
-        * from MEikListBoxObserver    
-        */
-        void HandleListBoxEventL( CEikListBox* aListBox, 
-                                  TListBoxEvent aEventType );
-
-    protected:
-        /**
-        * From AknView
-        */
-        void DoActivateL( const TVwsViewId& aPrevViewId,
-                          TUid aCustomMessageId,
-                          const TDesC8& aCustomMessage );
-
-        /**
-        * From AknView
-        */
-        void DoDeactivate();
-
-        /**
-        * Sets the tile pane to the given resource.
-        * @param aResourceId the id of resource string
-        */
-        void SetTitlePaneTextL( TInt aResourceId );
-
-    private:
-        /**
-        * Brings up details view.
-        */
-        void BringupDetailsViewL();
-        
-        /**
-        * Check if selecred connection is Alilve or not
-        * @return if the selected connection is alive ETrue, oterwise EFalse
-        */
-        TBool IsSelectedConnectionAlive() const;
-        
-        /**
-        * Check if selecred connection is Suspended or not
-        * @return if the selected connection is alive ETrue, oterwise EFalse
-        */
-        TBool IsSelectedConnectionSuspended() const;
-
-    private: // Data   
-        /**
-        * Continer instance of view.
-        */
-        CConnectionMonitorUiContainer*        iContainer; // Owned
-
-        /**
-        * Constant pointe to array of connections.
-        */
-        CConnectionArray* const             iConnectionArray; // Not Owned
-        
-        /**
-        * Pointer to RConnectionMonitor for deleting connection(s).
-        */
-        RConnectionMonitor*                 iMonitor;  // Not Owned
-                
-        /**
-        * ETrue if Help is supported, EFalse otherwise.
-        */
-        TBool isHelpSupported;
-
-#ifdef RD_CONTROL_PANEL
-
-        /**
-        * ETrue:  The application is launched in embedded mode.
-        * EFalse: The application is launched in standalone mode.
-        */
-        TBool iIsEmbedded;
-
-#endif // RD_CONTROL_PANEL
-
-        /**
-        * The active object for info. refreshing. NOT Owned.
-        */
-        CActiveWrapper* iActiveWrapper;
-    };
-
-#endif // CONNECTIONMONITORUI_VIEW_H
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/inc/CsdConnectionInfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a connection
-*     
-*
-*/
-
-
-#ifndef CSDCONNECTIONINFO_H_INCLUDED
-#define CSDCONNECTIONINFO_H_INCLUDED
-
-// INCLUDES
-#include    <rconnmon.h>
-#include    <stdlib.h>
-#include    "ConnectionInfoBase.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-
-/**
-* Represents a connection.
-*/
-class CCsdConnectionInfo : public CConnectionInfoBase     
-    {
-    public: 
-        /**
-        * Static constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        static CCsdConnectionInfo* NewL( TInt aConnectionId, 
-                                  RConnectionMonitor* const aConnectionMonitor,
-                                  TConnMonBearerType aConnectionBearerType,
-                                  CActiveWrapper* aActiveWrapper );
-                
-        /**
-        * Destructor
-        */
-        virtual ~CCsdConnectionInfo();
-    public:
-    
-        /**
-        * Give back a copy of connection. 
-        */
-        virtual CConnectionInfoBase* DeepCopyL();
-    
-        /**
-        * Refresh required details of connection. 
-        */
-        virtual void RefreshDetailsL();
-
-        /**
-        * Refresh iListBoxItemText text, connection ListBox has a reference to
-        * this text.
-        */
-        virtual void RefreshConnectionListBoxItemTextL();
-
-        /**
-        * Refresh details array of connection. DetailsListBox has a reference
-        * to this array.
-        */
-        virtual void RefreshDetailsArrayL();
-
-        /**
-        * Gives back the icon id of connection type
-        * @return the icon id of connection type
-        */
-        virtual TUint GetIconId() const;
-
-    protected:
-        /**
-        * Constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        CCsdConnectionInfo(  TInt aConnectionId, 
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-
-    protected:
-        /**
-        * Creates an array with requrired details of connection to
-        * the listbox which visulaize details of connection. This member
-        * is called at initialization.
-        */
-        virtual void ToArrayDetailsL();
-
-        /**
-        * Creates a string from dialup number of the connection.
-        * @return string representation count of sharigs of the connection.
-        */
-        HBufC* ToStringDialupNumberLC() const;
-
-    private:
-
-    protected: // Data members
-    
-        TBuf<KTelNumber>    iDialupNumber;  ///< DialupNumber of connection
-        
-    };
-
-
-#endif // CSDCONNECTIONINFO_H_INCLUDED
-
-// Enf of File
--- a/connectionmonitoring/connectionmonitorui/inc/EasyWLANConnectionInfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a WLAN connection
-*     
-*
-*/
-
-
-#ifndef EASYWLANCONNECTIONINFO_H_INCLUDED
-#define EASYWLANCONNECTIONINFO_H_INCLUDED
-
-// INCLUDES
-#include "WlanConnectionInfo.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class RConnectionMonitor;
-
-// CLASS DECLARATION
-/**
-* Represents a WLAN connection.
-*/
-class CEasyWlanConnectionInfo : public CWlanConnectionInfo
-    {
-    public:
-        /**
-        * Static constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        static CEasyWlanConnectionInfo* NewL( TInt aConnectionId, 
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Destructor
-        */
-        virtual ~CEasyWlanConnectionInfo();
-        
-    public:
-        /**
-        * Give back a copy of connection. 
-        */
-        virtual CConnectionInfoBase* DeepCopyL();
-    
-        /**
-        * Refresh iListBoxItemText text, connection ListBox has a 
-        * reference to this text.
-        */
-        virtual void RefreshConnectionListBoxItemTextL();
-
-        /**
-        * Refresh details array of connection. 
-        * DetailsListBox has a reference to this array.
-        */
-        virtual void RefreshDetailsArrayL();
-
-    protected:  // Constructors
-        /**
-        * Constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        CEasyWlanConnectionInfo( TInt aConnectionId, 
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-
-    protected:
-        /**
-        * Creates an array with requrired details of connection to
-        * the listbox which visulaize details of connection. This member
-        * is called at initialization.
-        */
-        virtual void ToArrayDetailsL();
-
-    };
-
-#endif // EASYWLANCONNECTIONINFO_H_INCLUDED
-//End of File.
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/inc/FeatureManagerWrapper.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CFeatureManagerWrapper.
-*
-*/
-
-
-#ifndef FEATURE_MANAGER_WRAPPER_H
-#define FEATURE_MANAGER_WRAPPER_H
-
-// INCLUDE FILES
-#include    <e32base.h>        //CBase
-#include    <featmgr.h>
-
-// CLASS DECLARATION
-
-/**
-* CFeatureManagerWrapper wraps FeatureManager to ease its usage
-*/
-class CFeatureManagerWrapper :  public CBase
-    {  
-   
-   public:
-
-       /**
-       * Destructor. Uninitalize FeatureManager.
-       */
-       virtual ~CFeatureManagerWrapper();
-    
-       /**
-       * Static constructor.
-       */
-       static CFeatureManagerWrapper* NewL();        
-        
-   protected:
-
-       /**
-       * Default constructor.
-       */
-       CFeatureManagerWrapper();
-
-       /**
-       * Second-phase constructor. Initialize FeatureManager
-       */
-       void ConstructL();
-   
-   private:
-
-       /**
-       * Indicates Featuremanger is initialized or not.
-       */
-       TBool iIsFeatureMgrInitialized; 
-    
-    };
-
-#endif
-
-// End of file
--- a/connectionmonitoring/connectionmonitorui/inc/GprsConnectionInfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a connection
-*     
-*
-*/
-
-
-#ifndef GPRSCONNECTIONINFO_H_INCLUDED
-#define GPRSCONNECTIONINFO_H_INCLUDED
-
-// INCLUDES
-#include    <rconnmon.h>
-#include    <stdlib.h>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include    <commsdat.h>
-#else
-#include    <commsdat.h>
-#include    <commsdat_partner.h>
-#endif
-#include    "ConnectionInfoBase.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-
-/**
-* Represents a connection.
-*/
-class CGprsConnectionInfo : public CConnectionInfoBase      
-    {
-    public: 
-        /**
-        * Static constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        static CGprsConnectionInfo* NewL( TInt aConnectionId, 
-                                  RConnectionMonitor* const aConnectionMonitor,
-                                  TConnMonBearerType aConnectionBearerType,
-                                  CActiveWrapper* aActiveWrapper );
-                
-        /**
-        * Destructor
-        */
-        virtual ~CGprsConnectionInfo();
-    public:    
-        /**
-        * Give back a copy of connection. 
-        */
-        virtual CConnectionInfoBase* DeepCopyL();
-    
-        /**
-        * Refresh required details of connection. 
-        */
-        virtual void RefreshDetailsL();
-
-        /**
-        * Refresh iListBoxItemText text, connection ListBox has a reference to
-        * this text.
-        */
-        virtual void RefreshConnectionListBoxItemTextL();
-
-        /**
-        * Refresh details array of connection. DetailsListBox has a reference
-        * to this array.
-        */
-        virtual void RefreshDetailsArrayL();
-
-        /**
-        * Gives back the icon id of connection type
-        * @return the icon id of connection type
-        */
-        virtual TUint GetIconId() const;
-
-    protected:
-        /**
-        * Constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        CGprsConnectionInfo( TInt aConnectionId, 
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-
-    protected:
-        /**
-        * Creates an array with requrired details of connection to
-        * the listbox which visulaize details of connection. This member
-        * is called at initialization.
-        */
-        virtual void ToArrayDetailsL();
-
-        /**
-        * Creates a string from Access Point name of the connection.
-        * @return string representation count of Access Point name of 
-        * the connection.
-        */
-        HBufC* ToStringApNameLC() const;
-
-    private:
-
-    protected: // Data members
-    
-        TBuf<CommsDat::KMaxTextLength> iApName;    ///< Used AccessPoint name
-        
-    };
-
-
-#endif // GPRSCONNECTIONINFO_H_INCLUDED
-
-// Enf of File
--- a/connectionmonitoring/connectionmonitorui/inc/WlanConnectionInfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a WLAN connection
-*     
-*
-*/
-
-
-#ifndef WLANCONNECTIONINFO_H_INCLUDED
-#define WLANCONNECTIONINFO_H_INCLUDED
-
-// INCLUDES
-#include "ConnectionInfoBase.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class RConnectionMonitor;
-
-// Calibration of WLAN signal strength
-enum TWlanSignalStrength
-    {
-    EWlanSignalStrengthMax = 60,
-    EWlanSignalStrengthGood = 74,
-    EWlanSignalStrengthLow = 87,
-    EWlanSignalStrengthMin = 100,
-    EWlanSignalUnavailable = 9999
-    };
-
-// WLAN Network modes
-enum TWlanNetworkMode
-    {
-    EWlanNetworkModeInfrastructure = 0,
-    EWlanNetworkModeAdHoc,
-    EWlanNetworkModeSecInfrastructure,
-    EWlanNetworkModeUnavailable
-    };
-
-// WLAN security modes
-enum TWlanSecurityMode
-    {
-    EWlanSecurityModeOpenNetwork = 0,
-    EWlanSecurityModeWEP,
-    EWlanSecurityMode8021x,
-    EWlanSecurityModeWPA,
-    EWlanSecurityWpaPsk,
-    EWlanSecurityModeUnavailable
-    };
-
-// CONSTANTS
-
-const TReal32 KDiffOfWlanSignalStrength = 
-                            EWlanSignalStrengthMin - EWlanSignalStrengthMax;
-
-
-// CLASS DECLARATION
-/**
-* Represents a WLAN connection.
-*/
-class CWlanConnectionInfo : public CConnectionInfoBase
-    {
-    public:
-        /**
-        * Static constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aEasyWlanIAPName Name of the Easy WLAN access point
-        * @param aActiveWrapper the for refreshing
-        */
-        static CWlanConnectionInfo* NewL( TInt aConnectionId, 
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              const HBufC* aEasyWlanIAPName,
-                              CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Destructor
-        */
-        virtual ~CWlanConnectionInfo();
-        
-    public:    
-        /**
-        * Give back a copy of connection. 
-        */
-        virtual CConnectionInfoBase* DeepCopyL();
-    
-        /**
-        * Refreshing all details of connection. Leaves if refreshing 
-        * any of detais is failed.
-        */
-        virtual void RefreshDetailsL();
-
-        /**
-        * Refresh iListBoxItemText text, connection ListBox has a 
-        * reference to this text.
-        */
-        virtual void RefreshConnectionListBoxItemTextL();
-
-        /**
-        * Refresh details array of connection. DetailsListBox has a 
-        * reference to this array.
-        */
-        virtual void RefreshDetailsArrayL();
-
-        /**
-        * Gives back the icon id of connection 
-        * @return the icon id of connection 
-        */
-        virtual TUint GetIconId() const;
-
-        /**
-        * Gives back the connection is EasyWLAN or not.
-        * @return ETrue if the selected conenction EasyWLAN,
-        * EFalse otherwise
-        */
-        virtual TBool IsEasyWLAN() const;
-        
-        /**
-        * Gives back current Name of Network ( SSID )
-        * @return iNetworkName
-        */
-        virtual HBufC* GetWlanNetworkNameLC() const;
-
-        /**
-        * Gives back current SignalStrength
-        * @return iSignalStrength
-        */        
-        TWlanSignalStrength GetWlanSignalStrength() const;
-
-        /**
-        * Gives back current NetworkMode
-        * @return iNetworkMode
-        */
-        TWlanNetworkMode GetWlanNetworkMode() const;
-
-        /**
-        * Gives back current SecurityMode
-        * @return iSecurityMode
-        */        
-        TWlanSecurityMode GetWlanSecurityMode() const;
-
-        /**
-        * Gives back current TxPower
-        * @return iTxPower
-        */        
-        TUint GetWlanTxPower() const;
-
-    protected:  // Constructors
-        /**
-        * Constructor
-        * @param aConnectionId The id of the given connection.
-        * @param aMonitor for refreshing details
-        * @param aConnectionBearerType the bearer type of connection
-        * @param aActiveWrapper the for refreshing
-        */
-        CWlanConnectionInfo( TInt aConnectionId, 
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper );
-
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-
-    protected:
-        /**
-        * Creates an array with requrired details of connection to
-        * the listbox which visulaize details of connection. This member
-        * is called at initialization.
-        */
-        virtual void ToArrayDetailsL();
-
-        /**
-        * Refreshing NetworkName. Leaves if did not get valid data from
-        * ConnectionMonitor.
-        */
-        void RefreshNetworkNameL();
-        
-        /**
-        * Refreshing SignalStrength. Leaves if did not get valid data from
-        * ConnectionMonitor.
-        */
-        void RefreshSignalStrength();
-
-        /**
-        * Refreshing NetworkMode. Leaves if did not get valid data from
-        * ConnectionMonitor.
-        */
-        void RefreshNetworkMode();
-
-        /**
-        * Refreshing SecurityMode. Leaves if did not get valid data from
-        * ConnectionMonitor.
-        */
-        void RefreshSecurityMode();
-
-        /**
-        * Refreshing TxPower. Leaves if did not get valid data from
-        * ConnectionMonitor.
-        */
-        void RefreshTxPowerL();
-
-        /**
-        * Gives back the string representation of SignalStrength.
-        */
-        HBufC* ToStringSignalStrengthLC() const;
-
-        /**
-        * Gives back the string representation of Mode.
-        */
-        HBufC* ToStringNetworkModeLC() const;
-
-        /**
-        * Gives back the string representation of Security.
-        */
-        HBufC* ToStringSecurityModeLC() const;
-
-        /**
-        * Gives back the string representation of TxPower.
-        */
-        HBufC* ToStringTxPowerLC() const;
-
-    private:
-
-    protected:
-
-        /**
-        * The name of network (SSID)
-        */
-        TName                       iWlanNetworkName;
-        
-        /**
-        * Signale strength of WLAN connection
-        */
-        TWlanSignalStrength         iSignalStrength;
-        
-        /**
-        * Network mode of WLAN conenction
-        */ 
-        TWlanNetworkMode            iNetworkMode;
-    
-        /**
-        * Security mode of WLAN conenction
-        */ 
-        TWlanSecurityMode           iSecurityMode;
-
-        /**
-        * TxPower of WLAN conenction
-        */
-        TUint                        iTxPower;
-        
-        /**
-        * ETrue if the selected conenction EasyWLAN
-        */ 
-        TBool                        iEasyWlan;
-    };
-
-#endif // WLANCONNECTIONINFO_H_INCLUDED
-//End of File.
\ No newline at end of file
--- a/connectionmonitoring/connectionmonitorui/loc/connectionmonitorui.loc	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,762 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Localization texts for ConnectionMonitorUi
-*     
-*
-*/
-
-
-
-// LOCALISATION STRINGS
-//d:Title pane text in main view
-//l:title_pane_t2/opt9
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_title	"Conn. Manager"
-
-//d:No active connection in main view
-//l:main_list_empty_pane
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_no_active_connections	"(no active connections)"
-
-//d:Title pane text in main view.
-//l:navi_navi_text_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_navi_one_active_conn "1 active connection"
-
-//d:Title pane text in main view.
-//l:navi_navi_text_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_navi_many_active_conns "%N active connections"
-
-//d:downloaded / uploaded data amounts with two decimal 
-//d:digits (for GPRS connections)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_ul_dl_data_amounts "%0U / %1U"
-
-//d:duration of the connection over 24h (for CSD and HSCSD connections)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_duration_over_24h  "%0Ud %1U"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_creating    "Creating connection"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_idle    "Idle"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_active  "Active"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_suspended   "On hold"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_closing "Closing connection"
-
-//d:Connection status (main view)
-//l:list_double_graphic_pane_t2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_closed  "Closed"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_creating    "Creating connection"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_idle    "Idle"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_active  "Active"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_suspended   "On hold"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_closing "Closing connection"
-
-//d:Connection status (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_status_details_closed  "Closed"
-
-//d:The navi pane displays the “serial number” (%1N) of the
-//d:connection in question and the total amount of the 
-//d:connections.
-//l:navi_navi_text_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_navi_nof_connection    "%0N/%1N"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_conn_name  "Name"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_bearer   "Bearer"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_status "Status"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_data_received  "Received"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_data_sent  "Sent"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_duration   "Duration"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_speed      "Speed"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_csd_number "Dial-up no."
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_gprs_apn   "APN"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_heading_sharing_info   "Sharing"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_set_bearer_data_call    "Data call"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_set_bearer_packet_data  "Packet data"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_bearer_hscsd    "High speed GSM"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_log_gprs_amount_b   "%U B"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_log_gprs_amount_kb   "%U kB"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_log_gprs_amount_mb   "%U MB"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_log_gprs_amount_gb   "%U GB"
-
-//d:
-//l:list_double_number_pane_t3
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_data_transf_rate_dl    "%U kB/s"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_sharing_information    "Between %N instances" 
-
-//d:Confirmation query to close selected connection
-//l:popup_note_window
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_conf_end_single_conn "End connection ’%U’?"
-
-//d:Confirmation query to close all connections
-//l:popup_note_window
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_conf_end_all_conns "%N connections active. End all connections?"
-
-//d:Main view menu item
-//l:list_single_pane_t1_cp2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_list_options_details "Details"
-
-//d:Main view menu item
-//l:list_single_pane_t1_cp2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_list_options_end_conn "End connection"
-
-//d:Main view menu item
-//l:list_single_pane_t1_cp2
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_list_options_end_all "End all connections"
-
-//d:Application name
-//l:list_single_large_graphic_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_apps_cmon_list "Conn. manager"
-
-//d:Application name
-//l:cell_app_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_apps_cmon_grid "Conn. manager"
-
-//d:Transferred KBytes
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_data_transf_rate_ul    "%U kB/s"
-
-//d:
-//l:list_single_heading_pane_t1
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_item_conn_name_modem   "Modem connection"
-
-//d:Confirmation query to close modem connection
-//l:popup_note_window
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_conf_end_modem_conn    "End modem connection?"
-
-//d:when user rejects the query, an information note
-//l:popup_note_window
-//w:
-//r:1.0
-//
-
-#define qtn_cmon_info_conn_already_end    "Connection was already closed."
-
-//d:Connection Manager’s Active connections main view
-//l:list_double2_large_graphic_pane
-//w:
-//r:3.0
-//
-#define qtn_cmon_active_data_connections 		"Active data connections"
-
-//d:Connection Manager’s Available WLAN networks main view
-//l:list_double2_large_graphic_pane
-//w:
-//r:3.0
-//
-#define qtn_cmon_available_wlan_networks 		"Available WLAN networks"
-
-//d: WLAN network mode value text,mode, terminal is connected to another terminal or multiple
-//d:terminals (point-to-multipoint) without utilising any physical access points.  
-//l:list_single_heading_pane_t1  
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_newtwork_mode_adhoc 		"Ad-hoc"
-
-//d: WLAN network mode value text, the terminal is connected over WLAN to a physical WLAN access point.
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_newtwork_mode_infra		"Infrastructure"
-
-
-//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode 
-//l:list_single_heading_pane_t1  
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_security_mode_wep             	"WEP"
-
-//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode  
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_security_mode_802_1x           	"802.1x"
-
-//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode  
-//l:list_single_heading_pane_t1  
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_security_mode_wpa             	"WPA/WPA2"
-
-//d:Title of Active connections main view 
-//l:title_pane_t2/opt9
-//w:
-//r:3.0
-//
-#define qtn_cmon_title_active_conns                	 	"Active data connections"
-
-//d: Title of Available WLAN networks main view
-//l:title_pane_t2/opt9
-//w:
-//r:3.0
-//
-#define qtn_cmon_title_available_wlan               		"Available WLAN networks"
-
-//d: WLAN network bearer type value text 
-//l:list_single_heading_pane_t1
-//w:
-//r:3.0
-//
-#define qtn_wlan_sett_bearer_wlan            		"Wireless LAN"
-
-//d: WLAN network security mode value text 
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.1
-//
-#define qtn_cmon_wlan_security_mode_open            	"Open network"
-
-//d: WLAN network name (SSID) detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_network_name               	"Network"
-
-//d: WLAN network signal strength detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_signal_strength            	"Signal"
-
-//d: WLAN network mode detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_network_mode               	"Mode"
-
-//d:WLAN network  Security mode used by the WLAN network detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_security_mode              	"Security"
-
-//d:WLAN network  Current transmit (TX) power level detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_tx_power              	"TX power"
-
-//d:WLAN network  Amount of physical WLAN access points detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_nw_ap_amount          	"Coverage"
-
-//d:WLAN network  Maximum data rate detail of the network
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_wlan_nw_max_rate           	"Max. rate"
-
-//d:WLAN network Amount of physical WLAN access points (AP) in range, if a single AP is in range
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_ap_amount_in_range            	"1 access point"
-
-//d:WLAN network Amount of physical WLAN access points (AP) in range, if multiple APs in range (%N is the amount)
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_ap_amount_in_range_many       	"%N access points"
-
-//d:WLAN network Current transmit (TX) power level in milliwatts (mW
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_tx_power_level                		"%N mW"
-
-//d:WLAN network Maximum data rate in network (of best AP in range)
-//d:in megabits per secondin
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_max_data_rate                 	"%U Mbit/s"
-
-//d: WLAN network signal strength value text 
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_singal_strength_low           	"Low (%N%)"
-
-//d: WLAN network signal strength value text 
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_singal_strength_medium        	"Medium (%N%)"
-
-//d: WLAN network signal strength value text 
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_singal_strength_good          	"Good (%N%)"
-
-//d: WLAN network signal strength text  if the network in question becomes unavailable while
-//d:in details view,
-//l:list_single_heading_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_wlan_signal_strength_no_signal            	"No signal"
-
-//d:Navi pane text in Available WLAN networks main view, if only one network is available. 
-//l:navi_navi_text_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_navi_one_wlan_nw_available         	"1 network available"
-
-//d:Navi pane text in Available WLAN networks main view, if more than one network is available 
-//d:(%N is the amount of networks).
-//l:navi_navi_text_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_navi_many_wlan_nws_available       	"%N networks available"
-
-//d:Navi pane text in Available WLAN networks details view. 
-//d:The navi pane displays the “serial number” (%0N) of the
-//d:network in question and the total amount of the connections
-//d:(%1N) using the navigation text component: %0N/%1N
-//l:navi_navi_text_pane_t1 
-//w:
-//r:3.0
-//
-#define qtn_cmon_navi_nof_wlan_network       		"%0N/%1N"
-
-//d:Available WLAN networks main view — No networks available
-//l:main_list_empty_pane
-//w:
-//r:3.0
-//
-#define qtn_cmon_no_wlan_networks_available         	"(no available WLAN networks)"
-
-//d:Available WLAN networks main view options menu item. 
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.0
-//
-#define qtn_cmon_options_create_wlan_iap       	"Create internet access point"
-
-//d:Available WLAN networks main view options menu - create internet access point item 
-//d:was selected this confirmation query note is displayed.
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_cmon_quest_create_wlan_iap  "Create internet access point for WLAN network '%U'?"
-
-//d:Available WLAN networks main view options menu - create internet access point item 
-//d:and secure network was selected this information note is poped up.
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_cmon_info_wlan_secure_nw_iap_create     	"You can create an internet access point for a secure WLAN network via Connection settings, Access points."
-
-//d:Available WLAN networks main view — One or more networks available, options menu item
-//l:list_single_pane_t1_cp2
-//w:
-//r:3.0
-//
-#define qtn_cmon_options_refresh               		"Refresh"
-
-
-//d: Unavailable attribute (details view)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.0
-//
-#define qtn_cmon_parameter_unavailable  "(unavailable)"
-
-//d:
-//l:list_single_heading_pane_t2 
-//w:
-//r:3.0
-//
-#define qtn_cmon_heading_data_total  "Total"
-
-
-//d:"Connection summary note" note- info text
-//l:heading_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_cmon_summary_heading  "Connection summary"
-
-//d:First line topic of "Connection summary note" note
-//d:displays the total transferred data amount (received and sent summarized)
-//l:heading_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_cmon_summary_transferred "Transferred data:"
-
-//d:Third line topic of "Connection summary note" note,
-//d:displays the duration of the connection
-//l:heading_pane_t1
-//w:
-//r:3.1
-//
-#define qtn_cmon_summary_duration "Duration:"
-
-//d:Available WLAN networks main view options menu - create internet access point item 
-//d:final confirmation note is poped up when access point item has been created successfully
-//l:popup_note_window
-//w:
-//r:3.1
-//
-#define qtn_cmon_conf_wlan_iap_created	"Internet access point defined for WLAN network '%U'."
-
-//d:Text in middle soft key (opens a view for detailed information)
-//l:control_pane_t3/opt7
-//w:
-//r:3.2
-//
-#define qtn_msk_cmon_details "Details"
-
-//d:The name of the application which uses the connection (MessagingServer)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_msg_server  "Messaging" 
-
-//d:The name of the application which uses the connection (DownaloadMgrServer)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_dl_mg  "Downloads" 
-
-//d:The name of the application which uses the connection (Feeds Server)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_rss_server  "Web Feeds" 
-
-//d:The name of the application which uses the connection (Java MIDlets)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_java_midlet  "Application" 
-
-//d:The name of the application which uses the connection (Unknown instance)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_unknown  "(unknown)" 
-
-//d:The name of the application which uses the connection 
-//d:(SUPL (Secure User Plane Location) server)
-//l:list_single_heading_pane_t1
-//w:
-//r:3.2
-//
-#define qtn_cmon_sharing_app_supl "Positioning server" 
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/sis/ConnectionMonitorUI.pkg	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: ; Installation file for ConnectionMonitorUi application
-;
-; Installation file for ConnectionMonitorUi application
-; Installation file for ConnectionMonitorUi application
-
-;Languages
-&EN
-
-; Package header
-#{"ConnectionMonitorUi"},(0x101F84D0),0,2,0,TYPE=SA
-
-%{"some vendor"}
-; Unique Vendor name
-:"Unique Vendor NameXXXX"
-
-;Key and certificate
-*"rd-key.pem","rd.cer"
-
-
-; Entries - files to install
-
-"\Epoc32\release\armv5\udeb\CONNECTIONMONITORUI.exe"         -"!:\sys\bin\CONNECTIONMONITORUI.exe"
-"\epoc32\data\Z\Resource\apps\CONNECTIONMONITORUI.rsc"         -"!:\resource\apps\CONNECTIONMONITORUI.rsc"
-"\epoc32\data\Z\private\10003a3f\apps\CONNECTIONMONITORUI_reg.rsc" -"!:\private\10003a3f\import\apps\CONNECTIONMONITORUI_reg.rsc"
--- a/connectionmonitoring/connectionmonitorui/src/ActiveWrapper.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +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:  CActiveWrapper implementation file
-*
-*/
-
-
-#include <e32base.h>
-
-#include "ActiveWrapper.h"
-#include "ConnectionMonitorUiLogger.h"
-
-// LOCAL CONSTANTS AND MACROS
-
-// ---------------------------------------------------------
-// CActiveWrapper::NewL
-//
-// Two-phased constructor.
-// ---------------------------------------------------------
-//
-CActiveWrapper* CActiveWrapper::NewL()
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::NewL()" );
-    
-    CActiveWrapper* self = new ( ELeave ) CActiveWrapper();
-    CleanupStack::PushL( self );
-
-    self->ConstructL();
-    
-    CleanupStack::Pop( self );
-
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::NewL()" );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CActiveWrapper::ConstructL
-//
-// Symbian OS default constructor can leave.
-// ---------------------------------------------------------
-//
-void CActiveWrapper::ConstructL()
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::ConstructL()" );
-
-    CActiveScheduler::Add( this );
-
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::ConstructL()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::CActiveWrapper
-//
-// C++ constructor can NOT contain any code, that
-// might leave.
-// ---------------------------------------------------------
-//
-CActiveWrapper::CActiveWrapper() : CActive( CActive::EPriorityStandard )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::~CActiveWrapper
-//
-// Destructor
-// ---------------------------------------------------------
-//
-CActiveWrapper::~CActiveWrapper()
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::~CActiveWrapper()" );
-    
-    Cancel();
-    
-    CMUILOGGER_WRITE( "CActiveWrapper::~CActiveWrapper Canceled" );
-    
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::~CActiveWrapper()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::RunL
-//
-// From active object framework
-// ---------------------------------------------------------
-//
-void CActiveWrapper::RunL() 
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::RunL()" );
-
-    if ( iWait.IsStarted() )
-        {
-        CMUILOGGER_WRITE( "AsyncStop" );
-
-        iWait.AsyncStop();
-        }
-
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::RunL()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::DoCancel
-//
-// From active object framework
-// ---------------------------------------------------------
-//
-void CActiveWrapper::DoCancel()
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::DoCancel()" );
-
-    if ( iWait.IsStarted() )
-        {
-        CMUILOGGER_WRITE( "AsyncStop" );
-
-        iWait.AsyncStop();
-        }
-
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::DoCancel()" );
-    }
-    
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetStringAttribute
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetStringAttribute( TInt const aConnectionId, 
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TDes& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetStringAttribute()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );
-        aConnectionMonitor->GetStringAttribute( aConnectionId, 0, aAttribute,
-                                                aValue, iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetStringAttribute()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetIntAttribute
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetIntAttribute( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TInt& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetIntAttribute()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );
-        aConnectionMonitor->GetIntAttribute( aConnectionId, 
-                                             0,
-                                             aAttribute,
-                                             aValue,
-                                             iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetIntAttribute()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetUintAttribute
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetUintAttribute( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TUint const aAttribute,
-                            TUint& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetUintAttribute()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );
-        aConnectionMonitor->GetUintAttribute( aConnectionId,
-                                              0,
-                                              aAttribute,
-                                              aValue,
-                                              iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetUintAttribute()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetConnSharings
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetConnSharings( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TConnMonClientEnumBuf& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnSharings()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );   
-        aConnectionMonitor->GetPckgAttribute( aConnectionId,
-                                              0,
-                                              KClientInfo,
-                                              aValue,
-                                              iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnSharings()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetConnTime
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetConnTime( TInt const aConnectionId,
-                            RConnectionMonitor* const aConnectionMonitor,
-                            TConnMonTimeBuf& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnTime()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );   
-        aConnectionMonitor->GetPckgAttribute( aConnectionId,
-                                              0,
-                                              KStartTime,
-                                              aValue,
-                                              iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnTime()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetBearerType
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetBearerType( TInt const aConnectionId,
-                            RConnectionMonitor& aConnectionMonitor,
-                            TUint const aAttribute,
-                            TInt& aValue )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetBearerType()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );
-        aConnectionMonitor.GetIntAttribute( aConnectionId, 
-                                            0,
-                                            aAttribute,
-                                            aValue,
-                                            iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetBearerType()" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartGetConnectionCount
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartGetConnectionCount( TUint& aConnectionCount,
-                            RConnectionMonitor& aConnectionMonitor )
-    {
-    CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnectionCount()" );
-
-    if ( IsActive() == EFalse )
-        {
-        CMUILOGGER_WRITE( "NOT active" );
-        aConnectionMonitor.GetConnectionCount( aConnectionCount, iStatus );
-        SetActive();
-        iWait.Start();
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Already active" );
-        }
-        
-    CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnectionCount()" );
-    }
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionArray.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Contains and handles CConnectionInfo instances
-*     
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "ConnectionArray.h"
-#include "ConnectionMonitorUiLogger.h"
-
-// CONSTANTS
-/**
-* Count of allowed connections.
-*/
-const TUint KConnArrayGranuality = KConnMonMaxClientUids;   
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CConnectionArray::~CConnectionArray
-// ---------------------------------------------------------
-//
-CConnectionArray::~CConnectionArray()
-    {
-    if ( iConnectionArray )
-        {
-        iConnectionArray->ResetAndDestroy();
-        }
-    delete iConnectionArray;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::CConnectionArray
-// ---------------------------------------------------------
-//
-CConnectionArray::CConnectionArray()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::ConstructL
-// ---------------------------------------------------------
-//
-void CConnectionArray::ConstructL()
-    {
-    iConnectionArray = new ( ELeave ) 
-                    CArrayPtrFlat<CConnectionInfoBase>( KConnArrayGranuality );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::MdcaCount
-// ---------------------------------------------------------
-//
-TInt  CConnectionArray::MdcaCount() const
-    {
-    return iConnectionArray->Count();
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::MdcaPoint
-// ---------------------------------------------------------
-//
-TPtrC CConnectionArray::MdcaPoint( TInt aIndex ) const
-    {
-    return ( *iConnectionArray )[aIndex]->GetConnectionListBoxItemText();
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::DeepCopyL
-// ---------------------------------------------------------
-//
-CConnectionArray* CConnectionArray::DeepCopyL()
-	{
-	CConnectionArray* temp = new ( ELeave ) CConnectionArray();
-	CleanupStack::PushL( temp );
-    temp->ConstructL();
-    TInt count = iConnectionArray->Count();
-    CConnectionInfoBase* tempConnInfo = NULL;
-    for ( TInt i = 0; i < count; ++i )
-	    {
-	    tempConnInfo = ( *iConnectionArray )[i]->DeepCopyL();
-		CleanupStack::PushL( tempConnInfo );	    
-	    temp->AppendL( tempConnInfo );
-		CleanupStack::Pop( tempConnInfo );	    
-	    }
-	CleanupStack::Pop( temp );
-	return temp;
-	}
-
-// ---------------------------------------------------------
-// CConnectionArray::GetArrayIndex
-// ---------------------------------------------------------
-//
-TInt CConnectionArray::GetArrayIndex( TUint aConnectionId ) const
-    {
-    CMUILOGGER_WRITE_F( "GetArrayIndex: %d", aConnectionId );
-    TBool found( EFalse );
-    TInt index( 0 );
-    TInt count = iConnectionArray->Count();
-    TUint connectionId( 0 );
-
-    while ( ( index <  count ) && !found  )
-        {
-        connectionId = ( *iConnectionArray )[index]->GetConnectionId();
-        if ( connectionId == aConnectionId )
-            {
-            found = ETrue;
-            }
-        else
-            {
-            ++index;            
-            }
-        }
-
-    CMUILOGGER_WRITE_F( "Found: %d", found );
-
-    return ( found ? index : KErrNotFound );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::GetArrayIndex
-// ---------------------------------------------------------
-//
-TInt CConnectionArray::GetArrayIndex( CConnectionInfoBase* aConnection ) const
-    {
-    CMUILOGGER_WRITE_F( "GetArrayIndex: %d", 
-                       aConnection->GetConnectionId() );
-    TBool found( EFalse );
-    TInt index( 0 );
-    TInt count = iConnectionArray->Count();
-
-    while ( ( index <  count ) && !found  )
-        {
-        if ( ( *iConnectionArray )[index] == aConnection )
-            {
-            found = ETrue;
-            }
-        else
-            {
-            ++index;            
-            }        
-        }
-
-    CMUILOGGER_WRITE_F( "Found: %d", found );
-
-    return ( found ? index : KErrNotFound );        
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::AppendL
-// ---------------------------------------------------------
-//
-void CConnectionArray::AppendL( CConnectionInfoBase* aConnection )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionArray::AppendL" );
-    if ( aConnection )
-        {
-        TUint connectionId = aConnection->GetConnectionId();
-        TInt index = GetArrayIndex( connectionId );
-
-        if ( index == KErrNotFound )
-            {
-            if ( aConnection->GetStatus() != EConnectionClosed &&
-                aConnection->GetStatus() != EConnectionUninitialized )
-                {
-                iConnectionArray->AppendL( aConnection );
-                }
-            }
-        }
-
-    CMUILOGGER_LEAVEFN( "CConnectionArray::AppendL" );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::Delete
-// ---------------------------------------------------------
-//
-void CConnectionArray::Delete( TUint aConnectionId )
-    {
-    CMUILOGGER_WRITE_F( "Deleting connection: %d", aConnectionId );
-    TInt count = iConnectionArray->Count();
-    TUint connectionId( 0 );
-    TBool deleted( EFalse );
-    for ( TInt i = 0; (i < count) && !deleted; ++i )
-        {
-        connectionId = ( *iConnectionArray )[i]->GetConnectionId();
-        if ( connectionId == aConnectionId )
-            {
-            delete ( *iConnectionArray )[i];
-            iConnectionArray->Delete( i );
-            iConnectionArray->Compress();
-            deleted = ETrue;
-            }
-        }
-    CMUILOGGER_WRITE_F( "Found and deleted: %b", deleted );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::Delete
-// ---------------------------------------------------------
-//
-void CConnectionArray::Delete( CConnectionInfoBase* aConnection )
-    {
-    CMUILOGGER_WRITE_F( "Deleting connection: %d", 
-                        aConnection->GetConnectionId() );
-    TInt count = iConnectionArray->Count();
-    TBool deleted( EFalse );
-    for ( TInt i = 0; (i < count) && !deleted; ++i )
-        {
-        if ( ( *iConnectionArray )[i] == aConnection )
-            {
-            delete ( *iConnectionArray )[i];
-            iConnectionArray->Delete( i );
-            iConnectionArray->Compress();
-            deleted = ETrue;
-            }
-        }
-    CMUILOGGER_WRITE_F( "Found and deleted: %b", deleted );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionArray::Reset
-// ---------------------------------------------------------
-//
-void CConnectionArray::Reset()
-    {
-    iConnectionArray->ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------
-// CConnectionArray::operator[]
-// ---------------------------------------------------------
-//
-CConnectionInfoBase* CConnectionArray::operator[]( TUint aIndex ) const
-    {
-    return ( *iConnectionArray )[aIndex];
-    }
-    
-// ---------------------------------------------------------
-// CConnectionArray::At
-// ---------------------------------------------------------
-//
-CConnectionInfoBase* CConnectionArray::At( TInt aIndex ) const
-    {
-    CMUILOGGER_ENTERFN( "CConnectionArray::At()" );
-    CConnectionInfoBase* temp( NULL );
-    TInt count = iConnectionArray->Count();
-    CMUILOGGER_WRITE_F( "count %d", count );
-    
-    if ( count  && ( aIndex < count ) )
-        {
-        temp = ( *iConnectionArray )[aIndex];
-        }
-    
-    CMUILOGGER_LEAVEFN( "CConnectionArray::At()" );
-    return temp;
-    }    
-
-// ---------------------------------------------------------
-// CConnectionArray::NumberOfActiveConnections
-// ---------------------------------------------------------
-//
-TInt CConnectionArray::NumberOfActiveConnections() const 
-    {
-    TInt count( 0 );
-
-    CMUILOGGER_WRITE_F(
-         "NumberOfActiveConnections: all in array: [%d]\n",
-         MdcaCount() );
-
-    // we need to count all and only the open connection
-    for ( TInt i = 0; i < MdcaCount(); ++i )
-        {
-         if ( ( *iConnectionArray )[i]->IsAlive() )
-             {
-             ++count;
-             }
-        }
-
-    CMUILOGGER_WRITE_F( "Active connections: [%d]\n", count );
-    return count;
-    }    
-
-// ---------------------------------------------------------
-// CConnectionArray::NumberOfSuspendedConnections
-// ---------------------------------------------------------
-//
-TInt CConnectionArray::NumberOfSuspendedConnections() const 
-    {
-    TInt count( 0 );
-    
-    CMUILOGGER_WRITE_F(
-         "Number of all connection in array: [%d]\n", MdcaCount() );
-
-    // we need to count all and only the open connection
-    for ( TInt i = 0; i < MdcaCount(); ++i )
-        {
-         if ( ( *iConnectionArray )[i]->IsSuspended() )
-             {
-             ++count;
-             }
-        }
-    
-    CMUILOGGER_WRITE_F( "Suspended connections: [%d]\n", count );
-    return count;
-    }
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1345 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a connection
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <stdlib.h>
-#include <nifvar.h>
-#include <StringLoader.h>
-#include <ConnectionMonitorUi.rsg>
-#include <avkon.rsg>
-#include <AknUtils.h>
-#include <apgcli.h>
-
-#include "ConnectionMonitorUiLogger.h"
-#include "ConnectionInfoBase.h"
-#include "ActiveWrapper.h"
-
-// CONSTANTS
-
-const TUint KUpArrowChar = 0x2191; ///< ASCII code of UpArrow
-const TUint KDownArrowChar = 0x2193; ///< ASCII code of DownArrow
-
-#ifndef _DEBUG
-const TUint KHiddenDhcpServerUid = 0x101fd9c5; ///< Hidden DHCP server UID (dhcpserv.exe)
-const TUint KHiddenDnsServerUid = 0x10000882; ///< Hidden DNS server UID (dnd.exe)
-#endif
-
-const TInt KFeedsServerUid         = 0x1020728E;
-const TInt KDownloadMgrServerUid   = 0x10008D60;
-const TInt KMessagingServerUid     = 0x1000484b;
-const TInt KJavaVMUid              = 0x102033E6;
-const TInt KSUPLServerUid          = 0x102073CA;
-
-LOCAL_D const TInt KStringsGranularity = 5;
-
-_LIT( KMrouterName, "mRouter"); ///< see CheckMrouteIap
-_LIT( KEmpty, "");      ///< Empty string
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::~CConnectionInfoBase
-// ---------------------------------------------------------
-//
-CConnectionInfoBase::~CConnectionInfoBase()
-    {
-    delete iDetailsArray;
-    delete iAppNames;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::CConnectionInfoBase
-// ---------------------------------------------------------
-//
-CConnectionInfoBase::CConnectionInfoBase(
-                           TInt aConnectionId,
-                           RConnectionMonitor* const aConnectionMonitor,
-                           TConnMonBearerType aConnectionBearerType,
-                           CActiveWrapper* aActiveWrapper ) :
-    iConnectionMonitor( aConnectionMonitor ), 
-    iStartTime( NULL ),
-    iLastSpeedUpdate( 0 ),
-    iDeletedFromCMUI( EFalse ),
-    iActiveWrapper( aActiveWrapper )
-    {
-    CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - start " );
-    iConnectionStatus = EConnectionUninitialized;
-    iConnectionId = aConnectionId;
-    iConnectionBearerType = aConnectionBearerType;
-    iClientBuf().iCount = 0;
-    CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - end " );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ConstructL
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::ConstructL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::ConstructL() start" );
-
-    if ( iConnectionBearerType >= EBearerExternalCSD )
-        {
-        StringLoader::Load( iConnectionName,
-                            R_QTN_CMON_ITEM_CONN_NAME_MODEM );
-        }
-    else
-        {
-        iActiveWrapper->StartGetStringAttribute( iConnectionId,
-                                                 iConnectionMonitor,
-                                                 KIAPName,
-                                                 iConnectionName );
-        TInt err( iActiveWrapper->iStatus.Int() );
-        CMUILOGGER_WRITE_F( "CConnectionInfoBase::ConstructL() status: %d",
-                            err );
-        CMUILOGGER_WRITE_F( "iConnectionName : %S", &iConnectionName );
-        CMUILOGGER_WRITE_F( "iConnectionId : %d", iConnectionId );
-        CMUILOGGER_WRITE_F( "iConnectionBearerType : %d", 
-                            ( TInt )iConnectionBearerType );
-        if ( err != KErrNone )
-            {
-            User::Leave( err );
-            }
-        }
-    
-    if ( !iAppNames )
-        {
-        iAppNames = new( ELeave ) CDesCArrayFlat( KStringsGranularity );
-        }
-
-    StatusChangedL();
-    if ( GetStatus() == EConnectionSuspended )
-        {
-        InitializeConnectionInfoL();
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ConstructL() end" );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::StatusChangedL
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::StatusChangedL()
-    {
-    CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() start" );
-
-    RefreshConnectionStatus();
-
-    switch ( iConnectionStatus )
-        {
-        case EConnectionCreated:
-            {
-            InitializeConnectionInfoL();
-            break;
-            }
-        case EConnectionSuspended:
-            {
-            RefreshDetailsL();
-            if ( !iDetailsArray )
-                {
-                ToArrayDetailsL();
-                }
-            RefreshDetailsArrayL();
-            break;
-            }
-        case EConnectionClosing:
-        case EConnectionClosed:
-        case EConnectionUninitialized:
-        	{
-        	if ( iDetailsArray ) // if there is details array
-        	    {
-        	    RefreshDetailsArrayL();
-        	    }
-            break;
-        	}
-        case EConnectionCreating:
-        default :
-            {
-            break;
-            }
-        }
-
-    RefreshConnectionListBoxItemTextL();
-
-    CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() end" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::IsAlive
-// ---------------------------------------------------------
-//
-TBool CConnectionInfoBase::IsAlive() const
-    {
-    TBool alive( EFalse );
-    if ( ( iConnectionStatus == EConnectionSuspended ) ||
-         ( iConnectionStatus == EConnectionCreated ) )
-        {
-        alive = ETrue;
-        }
-    return alive;
-    }
-    
-// ---------------------------------------------------------
-// CConnectionInfoBase::IsSuspended
-// ---------------------------------------------------------
-//
-TBool CConnectionInfoBase::IsSuspended() const
-    {
-    TBool suspended( EFalse );
-    if ( iConnectionStatus == EConnectionSuspended )
-        {
-        suspended = ETrue;
-        }
-    return suspended;
-    }    
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetConnectionId
-// ---------------------------------------------------------
-//
-CDesCArrayFlat* CConnectionInfoBase::GetDetailsArray() const
-    {
-    return iDetailsArray;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetConnectionId
-// ---------------------------------------------------------
-//
-TUint CConnectionInfoBase::GetConnectionId() const
-    {
-    return iConnectionId;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetStatus
-// ---------------------------------------------------------
-//
-TConnectionStatus CConnectionInfoBase::GetStatus() const
-    {
-    return iConnectionStatus;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetName
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::GetNameLC() const
-    {
-    HBufC* name = iConnectionName.AllocLC();
-    return name;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetBearerType
-// ---------------------------------------------------------
-//
-TConnMonBearerType CConnectionInfoBase::GetBearerType() const
-    {
-    return iConnectionBearerType;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetConnectionListBoxItemText
-// ---------------------------------------------------------
-//
-TPtrC CConnectionInfoBase::GetConnectionListBoxItemText() const
-    {
-    return iListBoxItemText;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshConnectionStatus
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::RefreshConnectionStatus()
-    {
-    TConnectionStatus connStatus( EConnectionUninitialized );
-    iActiveWrapper->StartGetIntAttribute( iConnectionId,
-                                          iConnectionMonitor,
-                                          KConnectionStatus,
-                                          ( ( TInt& )( connStatus ) ) );
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "RefreshConnectionStatus status : %d",
-                        err );
-    if ( err == KErrNone )
-        {
-        RefreshConnectionStatus( connStatus );
-        }
-    else
-        {
-        iActiveWrapper->Cancel();
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshConnectionStatus
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::RefreshConnectionStatus(
-                                   const TInt aConnectionStatus )
-    {
-    CMUILOGGER_ENTERFN( "RefreshConnectionStatus" );
-    CMUILOGGER_WRITE_F( "RefreshConnectionStatus aConnectionStatus %d",
-                        ( TInt )aConnectionStatus );
-    CMUILOGGER_WRITE_F( "iConnectionStatus before %d",
-                        ( TInt )iConnectionStatus );
-                        
-
-    if ( ( aConnectionStatus == KLinkLayerOpen ) ||
-          ( ( aConnectionStatus == KConnectionOpen ) &&
-            ( iConnectionBearerType >= EBearerExternalCSD ) ) )
-        {
-        CMUILOGGER_WRITE("1");
-        iConnectionStatus = EConnectionCreated;
-        }
-    else if ( ( aConnectionStatus == KConnectionClosed ) ||
-              ( aConnectionStatus == KLinkLayerClosed ) ) 
-        {
-        CMUILOGGER_WRITE("2");        
-        iConnectionStatus = EConnectionClosed;
-        }
-    else if ( ( ( aConnectionStatus >= KMinAgtProgress ) &&
-               ( aConnectionStatus <= KConnectionOpen ) ) ||
-               ( aConnectionStatus == KStartingSelection ) ||
-               ( aConnectionStatus == KFinishedSelection ) ||
-               ( aConnectionStatus == KConfigDaemonStartingRegistration ) ||
-               ( aConnectionStatus == KConfigDaemonFinishedRegistration ) )
-        // creating
-        {
-        CMUILOGGER_WRITE("5");
-        iConnectionStatus = EConnectionCreating;
-        }
-    else if ( aConnectionStatus == KDataTransferTemporarilyBlocked )
-        {
-        CMUILOGGER_WRITE("6");
-        iConnectionStatus = EConnectionSuspended;
-        }
-    else if ( ( iConnectionStatus == EConnectionCreated ) &&
-              ( ( aConnectionStatus >= KConnectionStartingClose ) &&
-                ( aConnectionStatus < KConnectionClosed ) ||  
-                ( aConnectionStatus == KConfigDaemonFinishedDeregistrationStop ) || 
-                ( aConnectionStatus == KConfigDaemonStartingDeregistration ) ||
-                ( aConnectionStatus == KLinkLayerClosed ) ||
-                ( aConnectionStatus == KConnectionUninitialised )
-              ) )
-        // closing
-        {
-        CMUILOGGER_WRITE("7");        
-        iConnectionStatus = EConnectionClosing;
-        }
-    else if ( ( aConnectionStatus == KConnectionUninitialised ) &&
-             ( iConnectionStatus == EConnectionSuspended ) )
-        { // Back to created from suspended
-        CMUILOGGER_WRITE("4");
-        iConnectionStatus = EConnectionCreated;
-        }
-    else if ( aConnectionStatus == KConnectionUninitialised )
-        {
-        CMUILOGGER_WRITE("3");
-        iConnectionStatus = EConnectionUninitialized;
-        }
-        
-    else
-        {
-        CMUILOGGER_WRITE_F( " else iConnectionStatus  %d",
-                            ( TInt )iConnectionStatus );
-        CMUILOGGER_WRITE_F( "else aConnectionStatus  %d",
-                            ( TInt )aConnectionStatus );
-        
-        CMUILOGGER_WRITE("else");
-        }
-
-
-    CMUILOGGER_WRITE_F( "iConnectionStatus after %d",
-                        ( TInt )iConnectionStatus );
-    CMUILOGGER_LEAVEFN( "RefreshConnectionStatus" );                                                
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshSentReceivedDataL
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::RefreshSentReceivedDataL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshSentReceivedDataL" );
-    // Downloaded
-	CMUILOGGER_WRITE("Downloaded before");
-    iActiveWrapper->StartGetUintAttribute( iConnectionId,
-                                           iConnectionMonitor,
-                                           KDownlinkData,
-                                           iDownloaded );
-    TInt errDownload( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "Download status: %d", errDownload );
-    if ( errDownload != KErrNone )
-        {
-        iActiveWrapper->Cancel();
-        User::Leave( errDownload );
-        }
-   	CMUILOGGER_WRITE("Downloaded after");
-    // Uploaded
-	CMUILOGGER_WRITE("Uploaded before");
-    iActiveWrapper->StartGetUintAttribute( iConnectionId,
-                                           iConnectionMonitor,
-                                           KUplinkData,
-                                           iUploaded );
-    TInt errUpload( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "Upload status: %d", errUpload );
-    if ( errUpload != KErrNone )
-        {
-        iActiveWrapper->Cancel();
-        User::Leave( errUpload );
-        }
-	CMUILOGGER_WRITE("Uploaded after");
-
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshSentReceivedDataL" );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshTransferSpeedsL
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::RefreshTransferSpeedsL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshTransferSpeedsL" );
-    const TInt KUpdatingIntervalInMillisec = 500;
-    const TInt KStandardKilo = 1000;
-    const TInt KDataKilo = 1024;
-    
-    TUint up = iUploaded;
-    TUint down = iDownloaded;
-
-    RefreshSentReceivedDataL();
-
-    TTime now;
-    now.UniversalTime();
-    
-    // calculate time difference in milliseconds
-    TInt diffTime = I64INT( now.MicroSecondsFrom( iLastSpeedUpdate ).Int64() / 
-            TInt64( KStandardKilo ) );
-
-    if ( iLastSpeedUpdate.Int64() == 0 )
-        {
-        iLastSpeedUpdate = now;
-
-        // speed cannot be calculated at the first time
-        iUpSpeed.quot = 0;
-        iUpSpeed.rem = 0;
-        iDownSpeed.quot = 0;
-        iDownSpeed.rem = 0;
-        }
-    else if ( diffTime > KUpdatingIntervalInMillisec )         
-        {
-        // bytes/millisec
-        TInt upSpeed = ( iUploaded - up ) / diffTime;
-        TInt downSpeed = ( iDownloaded - down ) / diffTime;
-        
-        // bytes/sec       
-        upSpeed *= KStandardKilo;
-        downSpeed *= KStandardKilo;
-    
-        // kbytes/sec
-        iUpSpeed = div( upSpeed, KDataKilo );
-        iDownSpeed = div( downSpeed, KDataKilo );
-
-        iLastSpeedUpdate = now;
-        }
-    
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshTransferSpeedsL" );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshDuration
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::RefreshDuration()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshDuration" );
-    TTime now;
-    now.UniversalTime();
-
-    // passed time since connection established.
-    iDuration = now.MicroSecondsFrom( iStartTime ).Int64();
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshDuration" );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::RefreshAppNamesL
-// ---------------------------------------------------------
-//
-TInt CConnectionInfoBase::RefreshAppNamesL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshAppNamesL" );
-
-    TInt sharings( 0 );
-
-    if ( IsAlive() )
-        {
-        if ( iAppNames )
-            {
-            // Check whether it is an internal or external (modem) connection
-            // External (modem) connections does not need application name
-            if ( iConnectionBearerType >= EBearerExternalCSD )
-                {
-                CMUILOGGER_WRITE( "External (modem) connections does not need application name" );
-                return sharings;
-                }
-            else
-                {
-                TInt count( 0 );
-                TConnMonClientEnumBuf clientBuf;
-                iActiveWrapper->StartGetConnSharings( iConnectionId,
-                                                      iConnectionMonitor,
-                                                      clientBuf );
-
-                TInt err( iActiveWrapper->iStatus.Int() );
-                CMUILOGGER_WRITE_F( "RefreshSharings status: %d", err );
-
-                if ( !err )
-                    {
-                    count = clientBuf().iCount;
-                    }
-                CMUILOGGER_WRITE_F( "clientBuf().iCount: %d", count );
-
-                if ( IsTheSameUids( clientBuf ) )
-                    {
-                    // Same client list, use cached application names.
-                    CMUILOGGER_WRITE( "Client list unchanged, use cached names" );
-                    CMUILOGGER_WRITE_F( "sharings: %d", iAppNames->Count() );
-                    return iAppNames->Count();
-                    }
-                else
-                    {
-                    CMUILOGGER_WRITE( "Client list changed, update names" );
-                    CopyUidsToBuf ( clientBuf );
-                    }
-
-                iAppNames->Reset();
-                HBufC* actAppName = NULL;
-
-#ifndef __WINS__ // Appl. uid is always zero in emulator
-
-                RApaLsSession appSess;
-                TApaAppInfo appInfo;
-
-                // The connection could be shared by several applications
-                User::LeaveIfError( appSess.Connect() );
-
-                TUint i;
-                for ( i = 0; i < count; i++ )
-                    {
-                    actAppName = NULL;
-                    appInfo.iCaption.Zero();
-
-                    TInt result = appSess.GetAppInfo( appInfo,
-                            clientBuf().iUid[i] );
-
-                    //================================
-                    CMUILOGGER_WRITE_F( "result: %d", result );
-                    CMUILOGGER_WRITE_F( "iClientInfo.iUid[i].iUid: %x",
-                            clientBuf().iUid[i].iUid );
-
-                    if ( result != KErrNone )
-                        {
-                        TInt resId = 0;
-                        switch ( clientBuf().iUid[i].iUid )
-                            {
-                            case KMessagingServerUid: // Messaging
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_MSG_SERVER;
-                                break;
-                                }
-                            case KDownloadMgrServerUid: // Downloads
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_DL_MG;
-                                break;
-                                }
-                            case KFeedsServerUid: // Web Feeds
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_RSS_SERVER;
-                                break;
-                                }
-                            case KJavaVMUid: // Application
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_JAVA_MIDLET;
-                                break;
-                                }
-#ifndef _DEBUG
-                            // Hide DHCP & DNS from UI in release build.
-                            case KHiddenDhcpServerUid:
-                            case KHiddenDnsServerUid:
-                                {
-                                break;
-                                }
-#endif
-                            case KSUPLServerUid:
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_SUPL;
-                                break;
-                                }
-                            default: // (unknown)
-                                {
-                                resId = R_QTN_CMON_SHARING_APP_UNKNOWN;
-                                break;
-                                }
-                            }
-
-                        if ( resId && resId != R_QTN_CMON_SHARING_APP_UNKNOWN  )
-                            {
-                            actAppName = StringLoader::LoadL( resId );
-                            }
-                        else if ( resId ) // Try to find application process name from system.
-                            {
-                            TFileName name;
-                            TFindProcess find;
-                            TBool name_solved( EFalse );
-                            while ( find.Next( name ) == KErrNone )
-                                {
-                                RProcess ph;
-                                TInt err2( KErrNone );
-                                err2 = ph.Open( name );
-
-                                if ( err2 )
-                                    {
-                                    ph.Close();
-                                    }
-                                else
-                                    {
-                                    TUidType procUid = ph.Type();
-                                    ph.Close();
-
-                                    // There are three UIDs in procUid. The last one is the second
-                                    // UID defined in MMP file and clientBuf().iUid[i].iUid is also
-                                    // the same kind of UID. So, we only need to compare them to
-                                    // find application name.
-                                    if ( procUid[2].iUid == clientBuf().iUid[i].iUid )
-                                        {
-                                        // Name is in format "app_name[uid]001", so cut rest of
-                                        // string starting from "[".
-                                        TInt index = name.LocateReverse('[');
-                                        if ( index >= 1 )
-                                            {
-                                            name.SetLength( index );
-                                            }
-
-                                        actAppName = HBufC::NewL( name.Length() );
-                                        TPtr actAppNameBuf = actAppName->Des();
-                                        actAppNameBuf.Append( name );
-
-#ifdef _DEBUG
-                                        CMUILOGGER_WRITE( "--------------------" );
-                                        CMUILOGGER_WRITE( " Application is Found:" );
-                                        CMUILOGGER_WRITE_F( "Client Uid: %x", clientBuf().iUid[i].iUid );
-                                        CMUILOGGER_WRITE_F( "Proc Uid: %x", procUid[2].iUid );
-                                        CMUILOGGER_WRITE_F( "App Name: %S", &name);
-                                        CMUILOGGER_WRITE( "--------------------" );
-#endif
-
-                                        name_solved = ETrue;
-                                        break;
-                                        }
-                                    }
-                                }
-
-                            if ( !name_solved )
-                                {
-                                actAppName = StringLoader::LoadL( R_QTN_CMON_SHARING_APP_UNKNOWN );
-                                }
-                            }
-                        }
-                    else
-                        {
-                        actAppName = HBufC::NewL( appInfo.iCaption.Length() );
-                        TPtr actAppNameBuf = actAppName->Des();
-                        actAppNameBuf.Append( appInfo.iCaption );
-                        }
-
-                    if ( actAppName )
-                        {
-                        iAppNames->AppendL( actAppName->Des() );
-                        delete actAppName;
-                        }
-                    }
-
-                iAppNames->Sort();
-                appSess.Close();
-#else
-                TInt countBan( 0 );
-
-#ifndef _DEBUG
-                if ( !err )
-                    {
-                    // Remove DHCP and DNS from the client list. 
-                    for ( TUint tmp = 0; tmp < count; tmp++ )
-                        {
-                        TUid uid = clientBuf().iUid[tmp];
-
-                        if ( uid.iUid == KHiddenDhcpServerUid || uid.iUid == KHiddenDnsServerUid )
-                            {
-                            countBan++;
-                            }
-                        }
-                    }
-#endif
-
-                _LIT( KStrApplication, "Application" );
-                // Give a dummy name for all applications.
-                for ( TInt i = 0; i < ( count - countBan ); i++ )
-                    {
-                    iAppNames->AppendL( KStrApplication );
-                    }
-
-#endif // __WINS__
-                } // End of else in if ( iConnectionBearerType > EBearerExternalCSD )
-            sharings = iAppNames->Count();
-            CMUILOGGER_WRITE_F( "sharings: %d", sharings );
-            } // End of if ( iAppNames )
-        } // End of if ( IsAlive() )
-
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshAppNamesL" );
-    return sharings;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::IsTheSameUids
-// ---------------------------------------------------------
-//
-TBool CConnectionInfoBase::IsTheSameUids( TConnMonClientEnumBuf& aClients )
-    {
-    TBool ret( EFalse );
-
-    if ( iClientBuf().iCount != aClients().iCount )
-        {
-        return ret;
-        }
-    else
-        {
-        TInt count = aClients().iCount;
-        for ( TInt i = 0; i < count; i++ )
-            {
-            // Is the current value inside aClients found from iClientBuf.
-            TBool found( EFalse );
-            for ( TInt j = 0; j < count; j++ )
-                {
-                if ( aClients().iUid[i].iUid == iClientBuf().iUid[j].iUid )
-                    {
-                    found = ETrue;
-                    break;
-                    }
-                }
-
-            if ( !found )
-                {
-                return ret;
-                }
-            }
-
-        // If we reach this point, aClients contents are identical with iClientBuf.
-        ret = ETrue;
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::CopyUidsToBuf
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::CopyUidsToBuf( TConnMonClientEnumBuf& aClients )
-    {
-    TInt count = aClients().iCount;
-
-    for ( TInt i = 0; i < count; i++ )
-        {
-        iClientBuf().iUid[i].iUid = aClients().iUid[i].iUid;
-        }
-    iClientBuf().iCount = count;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToDetailsListBoxItemTextL
-// ---------------------------------------------------------
-//
-HBufC*  CConnectionInfoBase::ToDetailsListBoxItemTextL(
-                                                const TUint aResourceId,
-                                                const HBufC* aValueText ) const
-    {
-    CMUILOGGER_ENTERFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" );
-
-    HBufC* columnName = NULL;
-    if ( aResourceId )
-        {
-        columnName = StringLoader::LoadLC( aResourceId );
-        }
-    else
-        {
-        columnName = KEmpty().AllocLC();
-        }
-
-    HBufC* listBoxItemText = HBufC::NewL( KDetailsListItemText );
-
-    TPtr ptrToListBoxItemText = listBoxItemText->Des();
-
-    ptrToListBoxItemText.Format( KDetailsListItemTextFormat,
-                                 columnName, aValueText );
-    CleanupStack::PopAndDestroy( columnName );
-
-
-    CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" );
-
-    return listBoxItemText;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL
-// ---------------------------------------------------------
-//
-void  CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL(
-                                                const TUint aResourceId,
-                                                const HBufC* aValueText )
-    {
-    HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId,
-                                                        aValueText );
-    CleanupStack::PushL( listBoxItemText );
-    CMUILOGGER_WRITE_F( "LISTBOXITEM: %S", listBoxItemText );
-    iDetailsArray->AppendL( *listBoxItemText );
-    CleanupStack::PopAndDestroy( listBoxItemText );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL
-// ---------------------------------------------------------
-//
-void  CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL(
-                                                    const TUint aResourceId,
-                                                    const HBufC* aValueText,
-                                                    TInt aIndex )
-    {
-    CMUILOGGER_ENTERFN
-        ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" );
-    CMUILOGGER_WRITE_F( "aValueText: %S", aValueText );
-
-    if ( /*( iDetailsArray ) && */
-            ( aIndex < iDetailsArray->Count() ) &&
-                ( aIndex > KErrNotFound ) )
-        {
-        HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId,
-                                                            aValueText );
-        iDetailsArray->Delete( aIndex );
-        CleanupStack::PushL( listBoxItemText );
-        iDetailsArray->InsertL( aIndex, *listBoxItemText );
-        CleanupStack::PopAndDestroy( listBoxItemText );
-        iDetailsArray->Compress();
-        }
-    CMUILOGGER_LEAVEFN
-        ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" );
-
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringBearerLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringBearerLC() const
-    {
-    HBufC* bearer = NULL;
-    TUint resourceId( 0 );
-
-    // Bearer type
-    if ( iConnectionBearerType == EBearerHSCSD ||
-        iConnectionBearerType == EBearerExternalHSCSD )
-        {
-        resourceId = R_QTN_CMON_BEARER_HSCSD;
-
-        }
-    else if ( iConnectionBearerType == EBearerCSD ||
-             iConnectionBearerType == EBearerExternalCSD ||
-             iConnectionBearerType == EBearerWcdmaCSD ||
-             iConnectionBearerType == EBearerExternalWcdmaCSD )
-        {
-        resourceId = R_QTN_SET_BEARER_DATA_CALL;
-        }
-    else if ( iConnectionBearerType == EBearerWLAN )
-        {
-        resourceId = R_QTN_WLAN_SETT_BEARER_WLAN;
-        }
-    else
-        {
-        resourceId = R_QTN_SET_BEARER_PACKET_DATA;
-        }
-
-    bearer = StringLoader::LoadLC( resourceId );
-
-    return bearer;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringStatusLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringStatusLC( TBool aIsDetailsView ) const
-    {
-    HBufC* status = NULL;
-    TUint resourceId( 0 );
-    switch ( iConnectionStatus )
-        {
-        case EConnectionCreated:
-            {
-            if ( iUpSpeed.quot || iUpSpeed.rem ||
-                iDownSpeed.quot || iDownSpeed.rem )
-                {
-                resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_ACTIVE 
-                                            : R_QTN_CMON_STATUS_ACTIVE;
-                }
-            else
-                {
-                resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_IDLE 
-                                            : R_QTN_CMON_STATUS_IDLE;
-                }
-            break;
-            }
-        case EConnectionUninitialized:
-        case EConnectionClosed:
-            {
-            resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSED 
-                                        : R_QTN_CMON_STATUS_CLOSED;
-            break;
-            }
-        case EConnectionClosing:
-            {
-            resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSING 
-                                        : R_QTN_CMON_STATUS_CLOSING;
-            break;
-            }
-        case EConnectionSuspended:
-            {
-            resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_SUSPENDED 
-                                        : R_QTN_CMON_STATUS_SUSPENDED;
-            break;
-            }
-        case EConnectionCreating:
-        default :
-            {
-            resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CREATING 
-                                        : R_QTN_CMON_STATUS_CREATING;
-            break;
-            }
-        }
-
-    status = StringLoader::LoadLC( resourceId );
-
-    return status;
-    }
-    
-    
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringTotalTransmittedDataLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringTotalTransmittedDataLC() const
-    {
-    TUint total = iUploaded + iDownloaded;
-    CMUILOGGER_WRITE_F( "iUploaded : %d", iUploaded );
-    CMUILOGGER_WRITE_F( "iDownloaded : %d", iDownloaded );
-    CMUILOGGER_WRITE_F( "total : %d", total );
-    
-    return ToStringLoadedDataLC( total );
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringSentDataLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringSentDataLC( TBool aToBeThreeDigit ) const
-    {
-    return ToStringLoadedDataLC( iUploaded, aToBeThreeDigit, KUpArrowChar );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringReceivedDataLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringReceivedDataLC( TBool aToBeThreeDigit ) const
-    {
-    return ToStringLoadedDataLC( iDownloaded, aToBeThreeDigit, KDownArrowChar );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringTransferSpeedUpLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringTransferSpeedUpLC() const
-    {
-    return ToStringTransferSpeedLC( iUpSpeed, KUpArrowChar );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringTransferSpeedDownLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringTransferSpeedDownLC() const
-    {
-    return ToStringTransferSpeedLC( iDownSpeed, KDownArrowChar );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringDurationLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringDurationLC() const
-    {
-    const TUint KTimeStringLength = 64;
-    const TUint KTimeFormatBuf = 16;
-    const TUint KDateFormatBuf = 16;
-    _LIT( KDayFormat, "%d" );
-
-
-    TTime now;
-    now.UniversalTime();
-    HBufC* timeString = NULL;
-    
-    TTimeIntervalDays days = NULL;
-    
-    if  ( iStartTime != NULL )
-        {
-        // calculate days passed since connection started
-        days = now.DaysFrom( iStartTime );
-        CMUILOGGER_WRITEF( _L( "ToStringDurationLC days before: %d" ),
-                               days.Int() );
-        }
-    
-    // passed time since connection established.
-    if ( days.Int() <= 0 )
-        // it's still within 1 day
-        {
-        timeString = HBufC::NewLC( KTimeStringLength );
-        TPtr16 tempBuf( timeString->Des() );
-
-        HBufC* temp = StringLoader::LoadLC( R_QTN_TIME_DURAT_LONG_WITH_ZERO );
-
-        iDuration.FormatL( tempBuf, *temp );
-        CleanupStack::PopAndDestroy( temp );
-        }
-    else
-        // more than 1 day
-        {
-        CMUILOGGER_WRITEF( _L( "ToStringDurationLC days after: %d" ),
-                               days.Int() );
-            
-        TBuf<KDateFormatBuf>  dayFormat;
-        dayFormat.Format( KDayFormat, days.Int() );
-
-        // format time format string
-        HBufC* tempFormat = StringLoader::LoadLC(
-                                            R_QTN_TIME_DURAT_SHORT_WITH_ZERO );
-        TBuf<KTimeFormatBuf> tempBuf;
-
-        // format hours:mins
-        iDuration.FormatL( tempBuf, *tempFormat );
-
-        CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 );
-        CleanupStack::PushL( strings );
-
-        strings->AppendL( dayFormat );
-        strings->AppendL( tempBuf );
-
-        timeString = StringLoader::LoadL( R_QTN_CMON_DURATION_OVER_24H,
-                                          *strings );
-
-        CleanupStack::PopAndDestroy( strings );
-        CleanupStack::PopAndDestroy( tempFormat );
-        CleanupStack::PushL( timeString );
-        }
-
-    CMUILOGGER_WRITE_F( "duration time1: %S", timeString );
-    
-    TPtr temp( timeString->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-    CMUILOGGER_WRITE_F( "duration temp: %S", &temp );
-    
-    CMUILOGGER_WRITE_F( "duration time2: %S", timeString );
-    
-
-    return timeString;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::CheckMrouterIap
-// ---------------------------------------------------------
-//
-TBool CConnectionInfoBase::CheckMrouterIap()
-    {
-    CMUILOGGER_ENTERFN( "CheckMrouterIap" );
-    TBool result( ETrue );
-
-    CMUILOGGER_WRITE_F( "IAP name: %S", &iConnectionName );
-    iConnectionName.Trim();
-    if ( iConnectionName.Left(
-                      KMrouterName().Length() ).CompareF( KMrouterName ) )
-        {
-        result = EFalse;
-        }
-    CMUILOGGER_LEAVEFN( "CheckMrouterIap" );
-    return result;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringLoadedDataLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringLoadedDataLC( TUint aLoadedData, 
-                                                  TBool aToBeThreeDigit, 
-                                                  const TUint aArrowChar ) const
-    {
-    const TUint KTransferedBytesFormatBuf = 16;
-    const TUint KTransferedBytesWidth = 10;
-    TUint transferedBytesDecimalPlaces(2);
-    TUint resId;
-    HBufC* loadedTxt = NULL;
-
-    TBuf<KTransferedBytesFormatBuf> buf;
-
-    if ( aLoadedData < 1000 )          // bytes
-        {
-        if ( aToBeThreeDigit ) // added arrow to listbox
-            {
-            _LIT( KUdLinkFormatBytes, "%c%d" );
-
-            buf.Format( KUdLinkFormatBytes, aArrowChar, aLoadedData );
-            }
-        else
-            {
-            _LIT( KUdLinkFormatBytes, "%d" );
-
-            buf.Format( KUdLinkFormatBytes, aLoadedData );
-            }
-        resId = R_QTN_LOG_GPRS_AMOUNT_B;
-        }
-    else
-        {                           // KB, MB, GB
-        TUint denom;
-
-        if ( aLoadedData < 1000 * 1024 )
-            {
-            denom = 1024;
-            resId = R_QTN_LOG_GPRS_AMOUNT_KB;
-            }
-        else if ( aLoadedData < 1000 * 1024 * 1024 )
-            {
-            denom = 1024 * 1024;
-            resId = R_QTN_LOG_GPRS_AMOUNT_MB;
-            }
-        else
-            {
-            denom = 1024 * 1024 * 1024;
-            resId = R_QTN_LOG_GPRS_AMOUNT_GB;
-            }
-
-        TReal value = STATIC_CAST( TReal, aLoadedData ) /
-                      STATIC_CAST( TReal, denom );
-                      
-		if ( aToBeThreeDigit )
-			{
-			if ( value < 10 )	// number of decimal places
-				{
-				transferedBytesDecimalPlaces = 2;
-				}
-			else if ( value < 100 )
-				{
-				transferedBytesDecimalPlaces = 1;
-				}
-			else
-				{
-				transferedBytesDecimalPlaces = 0;
-				}
-			}
-
-		TRealFormat Format( KTransferedBytesWidth, 
-							transferedBytesDecimalPlaces );
-
-        HBufC* number = HBufC::NewLC( KTransferedBytesWidth );
-        number->Des().Num( value, Format );
-
-        if ( aToBeThreeDigit ) // added arrow to listbox
-            {
-            _LIT( KUdFormatLarge, "%c%S" );
-            buf.Format( KUdFormatLarge, aArrowChar, number );
-            }
-        else
-            {
-            _LIT( KUdFormatLarge, "%S" );
-            buf.Format( KUdFormatLarge, number );
-            }
-        CleanupStack::PopAndDestroy( number );
-        }
-
-    loadedTxt = StringLoader::LoadLC( resId, buf );
-
-    TPtr temp( loadedTxt->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-
-    return  loadedTxt;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringTransferSpeedLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringTransferSpeedLC( div_t aSpeed,
-                                               const TUint aArrowChar ) const
-    {
-    const TUint KUpDownSpeedBufSize = 16;
-    _LIT( KUdSpeedFmt, "%c%d%S%02d" );
-
-    TBuf<KUpDownSpeedBufSize> buf;
-    TInt resId;
-
-    HBufC* decSep = StringLoader::LoadLC( R_TEXT_CALC_DECIMAL_SEPARATOR );
-
-    resId = R_QTN_CMON_DATA_TRANSF_RATE_UL;
-    buf.Format( KUdSpeedFmt, aArrowChar, aSpeed.quot, decSep, aSpeed.rem );
-
-    CleanupStack::PopAndDestroy( decSep );
-
-    HBufC* speedTxt = StringLoader::LoadLC( resId, buf );
-
-    TPtr temp( speedTxt->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-
-    return speedTxt;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::InitializeConnectionInfoL
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::InitializeConnectionInfoL()
-    {
-    CMUILOGGER_WRITE( "InitializeConnectionInfoL - start " );
-    TConnMonTimeBuf timeBuf;
-    iActiveWrapper->StartGetConnTime( iConnectionId,
-                                      iConnectionMonitor,
-                                      timeBuf );
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "IntiConnectionInfo() status: %d", err );
-    if ( err != KErrNone )
-        {
-        User::Leave( err );
-        }
-
-    iStartTime = timeBuf();
-    TDateTime dt = iStartTime.DateTime();
-    CMUILOGGER_WRITE_F( "Day : %d", dt.Day() );
-    CMUILOGGER_WRITE_F( "Hour : %d", dt.Hour() );
-    CMUILOGGER_WRITE_F( "Minute : %d", dt.Minute() );
-    CMUILOGGER_WRITE_F( "Second : %d", dt.Second() );
-    
-    
-    RefreshDetailsL();
-    if ( !iDetailsArray )
-        {
-        ToArrayDetailsL();
-        }
-    CMUILOGGER_WRITE( "InitializeConnectionInfoL - end " );
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::StringMarkerRemoval
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::StringMarkerRemoval( HBufC* aStringHolder )
-    {
-    TPtr bufPtr = aStringHolder->Des();
-    
-    const TText KLRMarker = 0x200E;
-    const TText KRLMarker = 0x200F;
-
-    TBuf<2> markers;
-    markers.Append( KLRMarker );
-    markers.Append( KRLMarker );
-
-    // This function is requested to remove directional markers, because they
-    // cause a display error in languages such Hebrew. Directional markers will
-    // be correctly added later, when the one or two parts of the time string 
-    // are merged, again with StringLoader functions.
-    AknTextUtils::StripCharacters( bufPtr, markers ); 
-    }
-    
-// ---------------------------------------------------------
-// CConnectionInfoBase::ToStringAppNameLC
-// ---------------------------------------------------------
-//
-HBufC* CConnectionInfoBase::ToStringAppNameLC( TInt aAppIndex )
-    {
-    HBufC* appName = ( iAppNames->MdcaPoint( aAppIndex ) ).AllocLC();
-    
-    return appName;
-    }
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::GetDeletedFromCMUI
-// ---------------------------------------------------------
-//
-TBool CConnectionInfoBase::GetDeletedFromCMUI() const
-	{
-	return iDeletedFromCMUI;	
-	}
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::SetAllDeletedFromCMUI
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::SetAllDeletedFromCMUI()
-	{
-	iConnectionStatus = EConnectionClosing;
-	}
-
-// ---------------------------------------------------------
-// CConnectionInfoBase::SetDeletedFromCMUI
-// ---------------------------------------------------------
-//
-void CConnectionInfoBase::SetDeletedFromCMUI()
-	{
-	iConnectionStatus = EConnectionClosing;
-	
-	iDeletedFromCMUI = ETrue;	
-	}
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiApp.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  CConnectionMonitorUiApp application class
-*     
-*
-*/
-
-
-// INCLUDE FILES
-#include    <eikstart.h>
-#include    "ConnectionMonitorUiApp.h"
-#include    "ConnectionMonitorUiDocument.h"
-
-// ---------------------------------------------------------
-// Panic
-// ---------------------------------------------------------
-//
-void Panic( TInt aReason )
-    {
-    _LIT( KAppName, "Conn. Monitor" );
-    User::Panic( KAppName, aReason );
-    }
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CConnectionMonitorUiApp::AppDllUid() const
-    {
-    return KUidConnectionMonitorUi;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiApp::CreateDocumentL()
-// Creates CConnectionMonitorUiDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CConnectionMonitorUiApp::CreateDocumentL()
-    {
-    return CConnectionMonitorUiDocument::NewL( *this );
-    }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-
-LOCAL_C CApaApplication* NewApplication()
-    {
-    return new CConnectionMonitorUiApp;
-    }
-
-GLDEF_C TInt E32Main()
-    {
-    return EikStart::RunApplication( NewApplication );
-    }
-
-
-// End of File  
-
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,974 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Application UI class
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <StringLoader.h>
-#include <aknnotedialog.h>
-#include <AknUtils.h>
-#include <cmmanagerext.h>
-#include <nifvar.h>
-#include <ConnectionMonitorUi.rsg>
-#include "ConnectionMonitorUi.hrh"
-#include "ConnectionMonitorUiAppUi.h"
-#include "ConnectionMonitorUiView.h"
-#include "ConnectionMonitorUiDetailsView.h"
-#include "ConnectionArray.h"
-#include "CsdConnectionInfo.h"
-#include "GprsConnectionInfo.h"
-#include "WlanConnectionInfo.h"
-#include "EasyWLANConnectionInfo.h"
-#include "FeatureManagerWrapper.h"
-#include "ActiveWrapper.h"
-
-
-// CONSTANTS
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------
-// CConnectionMonitorUiAppUi::ConstructL()
-// ----------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::ConstructL()
-    {
-    CMUILOGGER_CREATE;
-
-    CMUILOGGER_WRITE( "Constructing CConnectionMonitorUiAppUi" );
-
-    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
-
-#ifdef RD_CONTROL_PANEL
-    
-    TBool isEmbeddedApp = IsEmbedded();
-    CMUILOGGER_WRITE_F( "IsEmbedded(): %d", isEmbeddedApp );
-
-#endif // RD_CONTROL_PANEL                                  
-
-    iFeatureManagerWrapper = CFeatureManagerWrapper::NewL();
-    TBool isWlanSupported = FeatureManager::FeatureSupported( 
-                                                    KFeatureIdProtocolWlan );
-          
-   CMUILOGGER_WRITE_F( "isWlanSupported: %b", isWlanSupported );
-
-    // connect to connection monitor engine
-    CMUILOGGER_WRITE( "Connection monitor engine" );
-    iMonitor.ConnectL();
-    CMUILOGGER_WRITE( "Connected" );
-
-    CMUILOGGER_WRITE( "Creating connection array" );
-    iConnectionArray = new ( ELeave ) CConnectionArray();
-    iConnectionArray->ConstructL();
-    
-    iActiveWrapper = CActiveWrapper::NewL(); // start ActiveWrapper
-
-    if ( isWlanSupported )
-        {
-        GetEasyWlanIAPNameL();
-        }
-
-    InitializeConnectionArrayL();
-
-    CMUILOGGER_WRITE( "Created" );
-
-    CMUILOGGER_WRITE( "Creating main view" );
-
-#ifdef RD_CONTROL_PANEL
-    CConnectionMonitorUiView* mainView =
-        new ( ELeave ) CConnectionMonitorUiView( iConnectionArray,
-                                                 &iMonitor,
-                                                 isEmbeddedApp,
-                                                 iActiveWrapper );
-#else
-    CConnectionMonitorUiView* mainView =
-        new ( ELeave ) CConnectionMonitorUiView( iConnectionArray,
-                                                 &iMonitor,
-                                                 iActiveWrapper );
-#endif // RD_CONTROL_PANEL
-
-    CleanupStack::PushL( mainView );
-    CMUILOGGER_WRITE( "Constructing main view" );
-    mainView->ConstructL();
-    CMUILOGGER_WRITE( "Adding main view" );
-    AddViewL( mainView );      // transfer ownership to CAknViewAppUi
-
-    SetDefaultViewL( *mainView );
-    iTimerObserver = this;
-
-    CleanupStack::Pop( mainView );
-    CMUILOGGER_WRITE( "Done" );
-
-    CMUILOGGER_WRITE( "Creating details view" );
-    CConnectionMonitorUiDetailsView* detailsView =
-        new ( ELeave ) CConnectionMonitorUiDetailsView( iConnectionArray );
-    CleanupStack::PushL( detailsView );
-    CMUILOGGER_WRITE( "Constructing details view" );
-    detailsView->ConstructL();
-    CMUILOGGER_WRITE( "Adding details view" );
-    AddViewL( detailsView );      // transfer ownership to CAknViewAppUi
-    CleanupStack::Pop( detailsView );
-    CMUILOGGER_WRITE( "Done" );
-    
-    // from this point we can listen to events of RConnectionMonitor server
-    iMonitor.NotifyEventL( *this );
-    
-    activateMainView = EFalse;
-    }
-
-// ----------------------------------------------------
-// CConnectionMonitorUiAppUi::~CConnectionMonitorUiAppUi()
-// Destructor
-// Frees reserved resources
-// ----------------------------------------------------
-//
-CConnectionMonitorUiAppUi::~CConnectionMonitorUiAppUi()
-    {
-    CMUILOGGER_ENTERFN( "~CConnectionMonitorUiAppUi" );
-
-    StopTimer();
-    delete iConnectionArray;
-    delete iEasyWlanIAPName;
-    delete iActiveWrapper;
-    delete iFeatureManagerWrapper;
-
-    // it's needed because views are still active here
-    // and a call from handleforegroundevent from them
-    // can cause exception in StopConnEventNotificationL
-    iMonitor.CancelNotifications();
-    iMonitor.Close();
-    iNewConnectionIdArray.Close();
-    iConnectionsWaitingFirstEvent.Close();
-    CMUILOGGER_LEAVEFN( "~CConnectionMonitorUiAppUi" );
-
-    CMUILOGGER_DELETE;
-    }
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorUiAppUi::InitializeConnectionArrayL
-// ---------------------------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::InitializeConnectionArrayL()
-    {
-    CMUILOGGER_ENTERFN( "InitializeConnectionArrayL" );
-
-    CConnectionInfoBase* connectionInfo = NULL;
-    TUint connectionNumber( 0 );
-    TUint connectionId( 0 );
-    TUint subConnectionCount;
-
-    TUint wlanConnectionCounter( 0 );
-    TUint wlanConnectionId( 0 );
-    TConnMonBearerType bearerType( EBearerUnknown );
-    RArray<TUint> connIds;
-    RArray<TInt> bearers;
-    CleanupClosePushL( connIds );
-    CleanupClosePushL( bearers );
-
-    iActiveWrapper->StartGetConnectionCount( connectionNumber, iMonitor );
-
-    if ( !iActiveWrapper->iStatus.Int() )
-        {
-        CMUILOGGER_WRITE_F( "Number of connections: %d",
-                            connectionNumber );
-
-        for ( TUint i = 1; i <= connectionNumber; ++i )
-            {
-            iMonitor.GetConnectionInfo( i, connectionId, subConnectionCount );
-            connIds.AppendL( connectionId );
-            
-            iActiveWrapper->StartGetBearerType( connectionId,
-                                                iMonitor,
-                                                KBearer,
-                                                ( TInt& )bearerType );                                           
-            CMUILOGGER_WRITE_F( "status.Int(): %d", 
-                                iActiveWrapper->iStatus.Int() );
-            CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType );
-            bearers.AppendL( (TInt)bearerType );
-            
-            if ( bearerType == EBearerWLAN )
-                {
-                wlanConnectionCounter++;
-                wlanConnectionId = connectionId;
-                }
-            }
-        
-        for ( TInt i = 0; i < connectionNumber; i++ )
-            {           
-            if ( bearers[i] != EBearerWLAN || wlanConnectionCounter < 2 || connIds[i] == wlanConnectionId )
-                {
-                TInt err;
-                TRAP(err, connectionInfo = CreateConnectionInfoL( connIds[i], (TConnMonBearerType)bearers[i] ));
-                
-                if ( !err && connectionInfo )
-                    {
-                    CleanupStack::PushL( connectionInfo );
-                    iConnectionArray->AppendL( connectionInfo );
-                    CleanupStack::Pop( connectionInfo );
-                    }
-                else
-                    {
-                    iNewConnectionIdArray.Append( connIds[i] );
-                    }
-                }
-            else
-                {
-                CMUILOGGER_WRITE( "Fake WLAN connection, skipping" );
-                }
-            }
-        }
-    else
-        {
-        CMUILOGGER_WRITE_F( "GetConnectionCount status: %d", 
-                            iActiveWrapper->iStatus.Int() );
-        }
-
-    CleanupStack::Pop( &bearers );
-    bearers.Close();
-    CleanupStack::Pop( &connIds );
-    connIds.Close();
-
-    CMUILOGGER_LEAVEFN( "InitializeConnectionArrayL Done" );
-    }
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorUiAppUi::EventL
-// ---------------------------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::EventL(
-                                       const CConnMonEventBase &aConnMonEvent )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::EventL" );
-
-    CMUILOGGER_WRITE_F( "EventL type: %d", aConnMonEvent.EventType() );
-
-    CConnectionInfoBase* connectionInfo = NULL;
-    TInt index( 0 );
-    TConnMonEvent event = ( TConnMonEvent ) aConnMonEvent.EventType();
-    TInt connectionId = aConnMonEvent.ConnectionId();
-
-    CMUILOGGER_WRITE_F( "Connection Id:  %d", connectionId );
-
-    switch ( event )
-        {
-        case EConnMonCreateConnection:
-            {
-            CMUILOGGER_WRITE( "EConnMonCreateConnection" );
-
-            if ( connectionId > 0 )
-                {
-                iConnectionsWaitingFirstEvent.AppendL( connectionId );
-                }
-            break;
-            }
-        case EConnMonDeleteConnection:
-            {
-            CMUILOGGER_WRITE( "EConnMonDeleteConnection" );
-            TInt count = iNewConnectionIdArray.Count();
-            TInt i = 0;
-            TBool newConn = EFalse;
-            
-            for ( TInt cindex = 0; cindex < iConnectionsWaitingFirstEvent.Count(); cindex++ )
-                {
-                if ( iConnectionsWaitingFirstEvent[cindex] == connectionId )
-                    {
-                    newConn = ETrue;
-                    iConnectionsWaitingFirstEvent.Remove(cindex);
-                    break;
-                    }
-                }
-
-            if ( newConn )
-                {
-                // Job done
-                break;
-                }
-                
-            while ( i < count )
-                {
-                if ( iNewConnectionIdArray[i] == connectionId )
-                    {
-                    iNewConnectionIdArray.Remove( i );
-                    CMUILOGGER_WRITE_F( "Removed id %d from array", ( TUint )connectionId );
-                    count--;
-                    }
-                else 
-                    {
-                    i++;
-                    }
-                }
-            
-            index = iConnectionArray->GetArrayIndex( connectionId );
-            if ( index >= 0 )
-                {
-                connectionInfo = ( *iConnectionArray )[index]; 
-            
-                if ( iView->Id() == KDetailsViewId )
-                    {               
-                        // Mark the connection as closed and refresh details view.
-                        // It will change the status there.
-                        connectionInfo->RefreshConnectionStatus( KConnectionClosed );
-                        connectionInfo->RefreshDetailsArrayL();                        
-                    }
-                else // MainView
-                    {
-                    TBool deleting = connectionInfo->GetDeletedFromCMUI();
-                    if ( deleting )
-                        {
-                        ShowConnectionSummaryInformationNoteL( connectionInfo );
-                        }
-                    // Mark the connection as closed and update the status text. 
-                    // When the timer ticks the next time the marked connection 
-                    // is deleted and removed from the main view.
-                    connectionInfo->RefreshConnectionStatus( KConnectionClosed );
-                    connectionInfo->RefreshConnectionListBoxItemTextL();
-                    }                
-                CMUILOGGER_WRITE_F( "Deleted: %d", connectionId );
-                }
-            break;
-            }
-        case EConnMonConnectionStatusChange:
-            {
-            CMUILOGGER_WRITE( "EConnMonConnectionStatusChange" );
-            
-            TBool newConn = EFalse;
-                
-            for ( TInt cindex = 0; cindex < iConnectionsWaitingFirstEvent.Count(); cindex++ )
-                {
-                if ( iConnectionsWaitingFirstEvent[cindex] == connectionId )
-                    {
-                    newConn = ETrue;
-                    iConnectionsWaitingFirstEvent.Remove(cindex);
-                    break;
-                    }
-                }
-
-            index = iConnectionArray->GetArrayIndex( connectionId );
-
-            if ( newConn || ( index < 0 ) )
-                {
-                if ( connectionId > 0)
-                    {
-                    TConnMonBearerType bearerType( EBearerUnknown );
-                    iActiveWrapper->StartGetBearerType( connectionId,
-                                                        iMonitor,
-                                                        KBearer,
-                                                        ( TInt& )bearerType );  
-                    CMUILOGGER_WRITE_F( "status.Int(): %d", 
-                                        iActiveWrapper->iStatus.Int() );
-                    CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType );
-                    if ( bearerType == 0 )
-                        {
-                        if ( connectionId )
-                            {
-                            iNewConnectionIdArray.AppendL( connectionId );
-                            CMUILOGGER_WRITE_F( "id %d added to array", ( TUint )connectionId );
-                            break;
-                            }
-                        }          
-                    
-                    connectionInfo = CreateConnectionInfoL( connectionId, bearerType );
-                    }
-                
-                if ( connectionInfo )
-                    {
-                    CleanupStack::PushL( connectionInfo );
-                    iConnectionArray->AppendL( connectionInfo );
-                    CleanupStack::Pop( connectionInfo );                   
-                    }
-                }
-            
-            index = iConnectionArray->GetArrayIndex( connectionId );
-            CMUILOGGER_WRITE_F( "Found index :  %d", index );
-
-            if ( index >= 0 )
-                {
-                ( *iConnectionArray )[index]->StatusChangedL();
-                }
-            break;
-            }
-        case EConnMonCreateSubConnection:
-        case EConnMonDeleteSubConnection:
-            {
-            CMUILOGGER_WRITE( "SubConnection" );
-            index = iConnectionArray->GetArrayIndex( connectionId );
-            if ( index >= 0)
-                {
-                ( *iConnectionArray )[index]->RefreshDetailsL();
-                }
-            break;
-            }
-        default:
-            {
-            CMUILOGGER_WRITE( "On event default" );
-            break;
-            }
-        }
-
-    if ( iObserver && ( index >= 0 ) )
-        {
-        CMUILOGGER_WRITE( "EventL calls observer" );
-        iObserver->OnEventL( aConnMonEvent, index );
-        }
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::EventL" );
-    }
-
-// ---------------------------------------------------------------------------
-// CConnectionMonitorUiAppUi::Static
-// ---------------------------------------------------------------------------
-//
-CConnectionMonitorUiAppUi* CConnectionMonitorUiAppUi::Static()
-    {
-    return REINTERPRET_CAST( CConnectionMonitorUiAppUi*,
-                             CEikonEnv::Static()->EikAppUi() );
-    }
-
-// ---------------------------------------------------------------------------
-//  CConnectionMonitorUiAppUi::::DynInitMenuPaneL( TInt aResourceId,
-//  CEikMenuPane* aMenuPane )
-//  This function is called by the EIKON framework just before it displays
-//  a menu pane. Its default implementation is empty, and by overriding it,
-//  the application can set the state of menu items dynamically according
-//  to the state of application data.
-// ---------------------------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::DynInitMenuPaneL(
-    TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/ )
-    {
-    }
-
-// ----------------------------------------------------
-// CConnectionMonitorUiAppUi::HandleKeyEventL(
-//     const TKeyEvent& aKeyEvent, TEventCode /*aType*/ )
-// ----------------------------------------------------
-//
-TKeyResponse CConnectionMonitorUiAppUi::HandleKeyEventL(
-    const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/ )
-    {
-    return EKeyWasNotConsumed;
-    }
-
-// ----------------------------------------------------
-// CConnectionMonitorUiAppUi::HandleCommandL( TInt aCommand )
-// ----------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::HandleCommandL( TInt aCommand )
-    {
-    switch ( aCommand )
-        {
-        case EEikCmdExit:
-        case EAknCmdExit:
-        case EAknSoftkeyExit:
-            {
-            Exit();
-            break;
-            }
-        default:
-            break;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::StartConnEventNotification
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::StartConnEventNotification(
-                                    MActiveEventObserverInterface* aObserver )
-    {
-    CMUILOGGER_ENTERFN
-        ( "CConnectionMonitorUiAppUi::StartConnEventNotification" );
-
-    iObserver = aObserver;
-
-    CMUILOGGER_LEAVEFN
-        ( "CConnectionMonitorUiAppUi::StartConnEventNotification" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::StopConnEventNotification
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::StopConnEventNotification(
-                                MActiveEventObserverInterface* aObserver )
-    {
-    CMUILOGGER_ENTERFN
-        ( "CConnectionMonitorUiAppUi::StopConnEventNotification" );
-
-    if ( iObserver == aObserver )
-        {
-        iObserver = NULL;
-        }
-
-    CMUILOGGER_LEAVEFN
-        ( "CConnectionMonitorUiAppUi::StopConnEventNotification" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::StartTimerL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::StartTimerL( const TInt aInterval )
-    {
-    CMUILOGGER_WRITE( "Starting timer" );
-
-    if ( !iPeriodic )
-        {
-        iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-	    CMUILOGGER_WRITE_F( "aInterval  :  %d", aInterval );
-        
-        iPeriodic->Start( aInterval, aInterval,
-                          TCallBack( Tick, this ) );
-        }
-
-    CMUILOGGER_WRITE( "Timer started" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::StopTimer
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::StopTimer()
-    {
-    CMUILOGGER_WRITE( "Stopping timer" );
-    if ( iPeriodic )
-        {
-        CMUILOGGER_WRITE( "Timer existing" );
-        iPeriodic->Cancel();
-        delete iPeriodic;
-        iPeriodic = NULL;
-        }
-
-    CMUILOGGER_WRITE( "Timer stopped" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::Tick
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiAppUi::Tick( TAny* aObject )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::Tick(TAny* aObject)" );
-
-    CConnectionMonitorUiAppUi* myself =
-                        static_cast<CConnectionMonitorUiAppUi*>( aObject );
-    myself->Tick();
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::Tick(TAny* aObject)" );
-    return 1;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::Tick
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiAppUi::Tick()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::Tick()" );
-
-    if ( iTimerObserver )
-        {
-        TInt error( KErrNone );
-
-        TRAP( error, iTimerObserver->OnTimerExpiredL() );
-        CMUILOGGER_WRITE_F( "OnTimerExpiredL error id  :  %d", error );
-
-        // refresh listboxes
-        if ( !error && ( iObserver ) )
-            {
-            CMUILOGGER_WRITE( "Tick !error && ( iObserver )" );
-            TRAP( error, iObserver->OnTimerEventL() );
-            }
-        CMUILOGGER_WRITE( "after Tick !error && ( iObserver )" );
-        }
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::Tick()" );
-    return 1;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::OnTimerExpiredL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::OnTimerExpiredL()
-    {
-    CMUILOGGER_WRITE_F( "MdcaCount: %d", iConnectionArray->MdcaCount());
-    // First check if there are connections that need to be deleted.
-    // The conditions for deletion are:
-    // 1. Connection status must be closed
-    // 2. Main view must be active (details view should be shown also for closed connections)
-    // 3. There must not be active request ongoing (otherwise deletion might cause crash)    
-    for(TUint i = 0; i < iConnectionArray->MdcaCount(); i++)
-       {
-       CMUILOGGER_WRITE_F( "i: %d", i );
-       CMUILOGGER_WRITE_F( "Status: %d", (*iConnectionArray)[i]->GetStatus() );
-       CMUILOGGER_WRITE_F( "active: %d", iActiveWrapper->IsActive() );
-       if( (*iConnectionArray)[i]->GetStatus() == EConnectionClosed 
-            && !iActiveWrapper->IsActive()
-            && iView->Id() != KDetailsViewId)
-           {
-           CMUILOGGER_WRITE_F( "Delete conn id: %d", (*iConnectionArray)[i]->GetConnectionId() );
-           iConnectionArray->Delete( (*iConnectionArray)[i]->GetConnectionId() );
-           i--;
-           }
-       }
-    
-    
-    TInt count = iNewConnectionIdArray.Count();
-    if ( count > 0 )
-        {
-        for ( TInt i = 0; i < count; i++ )
-            {
-            TConnMonBearerType bearerType( EBearerUnknown );
-            iActiveWrapper->StartGetBearerType( iNewConnectionIdArray[i],
-                                                iMonitor,
-                                                KBearer,
-                                                ( TInt& )bearerType );  
-            CMUILOGGER_WRITE_F( "status.Int(): %d", 
-                                iActiveWrapper->iStatus.Int() );
-            CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType );
-            if ( bearerType == 0 )
-                {
-                continue;
-                }
-            CConnectionInfoBase* connectionInfo = NULL;
-            TInt err;
-            TRAP(err, connectionInfo = CreateConnectionInfoL( iNewConnectionIdArray[i], bearerType ));
-            if ( err )
-                {
-                continue;
-                }
-            
-            
-            if ( connectionInfo )
-                {
-                CleanupStack::PushL( connectionInfo );
-                iConnectionArray->AppendL( connectionInfo );
-                CleanupStack::Pop( connectionInfo );
-                
-                iNewConnectionIdArray.Remove( i );
-                count--;
-                i--;
-                CMUILOGGER_WRITE_F( "Removed index %d from array", ( TInt )i );
-                }
-            
-            }
-        }
-    RefreshAllConnectionsL();
-    if ( iView )
-        {
-        CMUILOGGER_WRITE_F( "iView->Id() %d", iView->Id() );
-        if ( iView->Id() == KConnectionsViewId )
-            {
-            CConnectionMonitorUiView* view =
-                    ( CConnectionMonitorUiView* )iView;
-            view->ConnectionKeyObserver();
-            }
-        }
-    }
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::GetTickInerval
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiAppUi::GetTickInerval() const
-	{
-	return KTickInterval;
-	}    
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::RefreshAllConnectionsL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::RefreshAllConnectionsL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::RefreshAllConnectionsL" );
-    TUint index( 0 );
-    CConnectionInfoBase* connection = NULL;
-    if ( iConnectionArray )
-        {
-        TUint count = iConnectionArray->MdcaCount();
-        while ( index < count )
-            {
-            connection = ( *iConnectionArray )[index];
-            // MainView Refresh
-            if ( ( connection->IsAlive() ) && 
-                 ( !connection->IsSuspended() ) )
-                 {
-                 CMUILOGGER_WRITE( "MainView Refresh" );
-                 CMUILOGGER_WRITE_F( "RefreshAllConnectionsL index: %d", 
-                                     index );
-                 CMUILOGGER_WRITE_F( "RefreshAllConnectionsL connId: %d", 
-                                     connection->GetConnectionId() );
-                 connection->RefreshDetailsL();
-                 }
-            // DetailsView Refresh
-            if ( ( connection->IsAlive() && 
-                 ( iView->Id() == KDetailsViewId ) ) )
-                {
-                CMUILOGGER_WRITE( "DetailsView Refresh" );
-                connection->RefreshDetailsArrayL();
-                }
-            connection->RefreshConnectionListBoxItemTextL();
-            count = iConnectionArray->MdcaCount();
-            ++index;
-            }
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::RefreshAllConnectionsL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::HandleForegroundEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::HandleForegroundEventL( TBool aForeground )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::HandleForegroundEventL" );
-
-    CAknViewAppUi::HandleForegroundEventL( aForeground );
-    if ( aForeground )
-        {
-        CMUILOGGER_WRITE( "Foreground" );
-        if ( activateMainView && iView != NULL && iView->Id() == KDetailsViewId )
-            {
-            ((CConnectionMonitorUiDetailsView*) iView)->ActivateMainViewL();
-            activateMainView = EFalse;
-            }
-       
-        TInt interval( KTickInterval );
-        if ( iTimerObserver )
-  	        {
-	          interval = iTimerObserver->GetTickInerval();
-	          }
-        StartTimerL( interval );
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Background" );
-        StopTimer();
-        activateMainView = EFalse;
-        }
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::HandleForegroundEventL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::CreateConnectionInfoL
-// ---------------------------------------------------------
-//
-CConnectionInfoBase* CConnectionMonitorUiAppUi::CreateConnectionInfoL(
-                                                TUint aConnectionId,
-                                                TConnMonBearerType aBearerType )
-    {
-    CMUILOGGER_ENTERFN( "CreateConnectionInfoL - start " );
-
-    CConnectionInfoBase* connection = NULL;
-
-    if ( aConnectionId > 0 )
-        {
-
-#ifdef  __WINS__
-        if ( aBearerType == EBearerLAN )
-            {
-            aBearerType = EBearerGPRS;
-            }
-#endif
-        switch ( aBearerType )
-            {
-            case EBearerGPRS:
-            case EBearerWCDMA:
-            case EBearerEdgeGPRS:
-            case EBearerExternalGPRS:
-            case EBearerExternalWCDMA:
-            case EBearerExternalEdgeGPRS:
-                {
-                CMUILOGGER_WRITE( "CGprsConnectionInfo" );
-                
-                connection = CGprsConnectionInfo::NewL(
-                        aConnectionId,
-                        &iMonitor,
-                        aBearerType,
-                        iActiveWrapper );
-                break;
-                }
-            case EBearerCSD:
-            case EBearerHSCSD:
-            case EBearerWcdmaCSD:
-            case EBearerExternalCSD:
-            case EBearerExternalHSCSD:
-            case EBearerExternalWcdmaCSD:
-                {
-                CMUILOGGER_WRITE( "CCsdConnectionInfo" );
-
-                connection = CCsdConnectionInfo::NewL(
-                        aConnectionId,
-                        &iMonitor,
-                        aBearerType,
-                        iActiveWrapper );
-                break;
-                }
-            case EBearerWLAN:
-                //case EBearerExternalWLAN:
-                {
-                CMUILOGGER_WRITE( "CWlanConnectionInfo" );
-                
-                connection = CWlanConnectionInfo::NewL(
-                        aConnectionId,
-                        &iMonitor,
-                        aBearerType,
-                        iEasyWlanIAPName,
-                        iActiveWrapper );
-                break;
-                }
-            default :
-                {
-                CMUILOGGER_WRITE( "CreateConnectionInfoL, default" );
-                break;
-                }
-            }
-            CMUILOGGER_WRITE_F( "Connection created: %d", aConnectionId );
-
-        if (  connection && connection->CheckMrouterIap() )
-            {
-            CMUILOGGER_WRITE_F( "Connection deleted: %d", aConnectionId );
-            delete connection;
-            connection = NULL;
-            }
-        }
-    else
-        {
-        CMUILOGGER_WRITE( "Connection id is invalid" );
-        }
-
-    CMUILOGGER_LEAVEFN( "CreateConnectionInfoL - end " );
-
-    return connection;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL" );
-
-    delete iEasyWlanIAPName;
-    iEasyWlanIAPName = NULL;
-
-    RCmManagerExt cmManagerExt;
-    cmManagerExt.OpenL();
-    CleanupClosePushL( cmManagerExt );
-    
-    TUint32 easyWlanId = cmManagerExt.EasyWlanIdL();
-    if ( easyWlanId )
-            {
-            CMUILOGGER_WRITE_F( "easyWlanId %d", easyWlanId );
-            iEasyWlanIAPName = cmManagerExt
-                                .GetConnectionMethodInfoStringL( 
-                                                        easyWlanId, 
-                                                        CMManager::ECmName );
-            CMUILOGGER_WRITE_F( "iEasyWlanIAPName: %S", iEasyWlanIAPName );
-            }
-
-    CleanupStack::PopAndDestroy( &cmManagerExt );
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::ShowConnectionSummaryInformationNoteL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::ShowConnectionSummaryInformationNoteL( 
-										const CConnectionInfoBase* aConnection )
-    {
-    CMUILOGGER_ENTERFN( 
-    	"CConnectionMonitorUiContainer::ShowConnectionSummaryInformationNoteL" );
-    	
- 	HBufC* total = aConnection->ToStringTotalTransmittedDataLC();
-    HBufC* duration = aConnection->ToStringDurationLC();
-    
-    CMUILOGGER_WRITE_F( "total: %S", total );
-    CMUILOGGER_WRITE_F( "duration: %S", duration );
-      	
-    CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 );
-    CleanupStack::PushL( strings );
-
-    strings->AppendL( *total );
-    strings->AppendL( *duration );    	
-    	
-    HBufC* informationText;
-    informationText = StringLoader::LoadLC( R_QTN_CMON_CONNECTION_SUMMARY_NOTE_TEXT, 
-    										*strings );
-    										        
-    CAknNoteDialog* dlg = new ( ELeave ) CAknNoteDialog( 
-    										CAknNoteDialog::ENoTone, 
-    										CAknNoteDialog::TTimeout( 5000000 ) );
-    dlg->PrepareLC( R_QTN_CMON_CONNECTION_SUMMARY_NOTE );
-    dlg->SetTextWrapping( EFalse );
-    
-    TPtr temp( informationText->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-    
-    dlg->SetCurrentLabelL( EGeneralNote, temp ); //SetTextL
-    
-    dlg->RunDlgLD();    
-        
-    CleanupStack::PopAndDestroy( informationText );
-    CleanupStack::PopAndDestroy( strings );
-	CleanupStack::PopAndDestroy( duration );
-	CleanupStack::PopAndDestroy( total );
-    
-    CMUILOGGER_LEAVEFN( 
-    	"CConnectionMonitorUiContainer::ShowConnectionSummaryInformationNoteL" );        
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiAppUi::DeleteDetailsView
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiAppUi::DeleteDetailsView(
-                                            TInt aConnId,
-                                            CConnectionInfoBase* aConnInfo )
-    {
-    CMUILOGGER_WRITE( "CConnectionMonitorUiAppUi::DeleteDetailsView Start" );
-    CMUILOGGER_WRITE_F( "aConnInfo:  %d", aConnInfo );
-    CMUILOGGER_WRITE_F( "aConnId:  %d", aConnId );
-
-	TBool deleting = aConnInfo->GetDeletedFromCMUI();
-    iConnectionArray->Delete( aConnId );
-    
-    CMUILOGGER_WRITE_F( "Deleted: %d", aConnId );
-    CMUILOGGER_WRITE( "CConnectionMonitorUiAppUi::DeleteDetailsView End" );
-    }
-
-#ifdef RD_CONTROL_PANEL
-
-// -----------------------------------------------------------------------------
-// CConnectionMonitorUiAppUi::IsEmbedded
-// -----------------------------------------------------------------------------
-//
-TBool CConnectionMonitorUiAppUi::IsEmbedded() const
-    {
-    return iEikonEnv->StartedAsServerApp();
-    }
-    
-#endif // RD_CONTROL_PANEL 
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,768 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  container control class
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <aknnavi.h>    //for CNaviPane
-#include <aknnavide.h>  //for CAknNavigationDecorator
-
-#include <AknIconArray.h>
-#include <aknlists.h>
-#include <StringLoader.h>
-#include <AknQueryDialog.h>
-#include <AknsUtils.h>
-#include <AknGlobalNote.h>
-
-#include "ConnectionArray.h"
-#include "ConnectionMonitorUiContainer.h"
-#include "FeatureManagerWrapper.h"
-#include "ActiveWrapper.h"
-
-#include <ConnectionMonitorUi.rsg>
-#include <ConnectionMonitorUi.mbg>
-#include <data_caging_path_literals.hrh>
-
-#include  <hlplch.h>
-#include <csxhelp/cmon.hlp.hrh>
-
-// CONSTANTS 
-/**
-* UID of ConnectionMonitorUi App.
-*/
-LOCAL_D const TUid KUidConnMonUI = { 0x101F84D0 };
-
-
-// CONSTANTS
-// Granularity of the model array.
-/**
-* Granularity of icon array
-*/
-LOCAL_D const TInt KGranularity = 5;
-
-
-_LIT( KEmpty, "");  ///< Empty string
-
-// ROM folder
-_LIT( KDriveZ, "z:" );
-
-// Name of the MBM file containing bitmaps
-_LIT( KConnectionMonitorUiMBMFile, "ConnectionMonitorUi.mbm" );
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::CConnectionMonitorUiContainer
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiContainer::CConnectionMonitorUiContainer(
-                                  CConnectionArray* const aConnectionArray,
-                                  RConnectionMonitor* aMonitor,
-                                  CActiveWrapper* aActiveWrapper )
-    : CCoeControl(), 
-    iMonitor( aMonitor ),
-    iConnectionArray( aConnectionArray ), 
-    isWlanSupported( EFalse ),
-    iActiveWrapper( aActiveWrapper ),
-    iFocusChanged( EFalse )
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::ConstructL
-// EPOC two phased constructor
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::ConstructL( TInt aSelectedItem, const TRect& aRect )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::ConstructL" );
-
-    CreateWindowL(); 
-    
-    iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox;
-    TInt flags( EAknGenericListBoxFlags );
-    iListBox->ConstructL( this, flags );
-    iListBox->CreateScrollBarFrameL( ETrue );
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-                                               CEikScrollBarFrame::EOff,
-                                               CEikScrollBarFrame::EAuto );
-    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray
-                                         /*ELbmDoesNotOwnItemArray*/ );
-    iListBox->Model()->SetItemTextArray( iConnectionArray );
-    iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
-    
-    TInt actCount = iConnectionArray->MdcaCount() - 1;
-    
-    if ( actCount > KErrNotFound )
-		{
-		iListBox->SetCurrentItemIndex( aSelectedItem > actCount ? actCount : aSelectedItem );	    
-		}
-
-    SetIconsL();
-
-    HBufC* noConn = StringLoader::LoadLC( R_QTN_CMON_NO_ACTIVE_CONNECTIONS,
-                                          iEikonEnv );
-
-    CListBoxView *lbview = iListBox->View();
-    lbview->SetListEmptyTextL( *noConn );
-    CleanupStack::PopAndDestroy( noConn );
-
-    GetPanesL();
-    SetRect( aRect );    
-    ActivateL();
-
-    isWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-    iOldConnectionCount = iConnectionArray->MdcaCount();
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::ConstructL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CConnectionMonitorUiContainer::OfferKeyEventL(
-                                                   const TKeyEvent& aKeyEvent,
-                                                   TEventCode aType )
-    {
-    TKeyResponse result( EKeyWasNotConsumed );
-    if ( aType == EEventKey )
-        {
-        TInt index = iListBox->CurrentItemIndex();
-        if ( ( aKeyEvent.iCode == EKeyBackspace ) && ( index != -1 ) )
-            {
-            if ( !( *iConnectionArray )[index]->IsSuspended() )
-                {
-                EndConnectionL();
-                result = EKeyWasConsumed;
-                }
-            }
-        else
-            {
-            result = iListBox->OfferKeyEventL( aKeyEvent, aType );
-            }
-        }
-    return result;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::~CConnectionMonitorUiContainer
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiContainer::~CConnectionMonitorUiContainer()
-    {
-    delete iListBox;
-    delete iNaviDecorator;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::SizeChanged()
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::SizeChanged()
-    {
-    iListBox->SetRect( Rect() );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::CountComponentControls
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiContainer::CountComponentControls() const
-    {
-    return 1; // only iListBox
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::ComponentControl( TInt aIndex ) const
-// ---------------------------------------------------------
-//
-CCoeControl* CConnectionMonitorUiContainer::ComponentControl(
-                                                          TInt aIndex ) const
-    {
-    switch ( aIndex )
-        {
-        case 0:
-            return iListBox;
-        default:
-            return NULL;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::OnEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::OnEventL(
-                                       const CConnMonEventBase& aConnMonEvent,
-                                       const TInt aIndex )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::OnEventL" );
-    CMUILOGGER_WRITE_F( "OnEventL type: %d", aConnMonEvent.EventType() );
-    CMUILOGGER_WRITE_F( "OnEventL index: %d", aIndex );
-
-    TBool validIndex =( iListBox->Model()->NumberOfItems() > KErrNotFound ) &&
-                      ( aIndex > KErrNotFound ) &&
-                      ( iListBox->Model()->NumberOfItems() >= aIndex );
-
-    if ( aConnMonEvent.ConnectionId() )
-        {
-        switch ( aConnMonEvent.EventType() )
-            {
-            case EConnMonCreateConnection:
-                {
-                CMUILOGGER_WRITE( "OnEventL EConnMonCreateConnection" );
-                iListBox->HandleItemAdditionL();
-                break;
-                }
-            case EConnMonDeleteConnection:
-                {
-                CMUILOGGER_WRITE( "OnEventL EConnMonDeleteConnection" );
-                CMUILOGGER_WRITE_F( "validIndex: %b", validIndex );
-                
-                iListBox->UpdateScrollBarsL();
-                break;
-                }
-            case EConnMonConnectionStatusChange:
-            case EConnMonCreateSubConnection:
-            case EConnMonDeleteSubConnection:
-                {
-                CMUILOGGER_WRITE( "OnEventL StatusChange SubConnection" );
-                break;
-                }
-            default:
-                {
-                CMUILOGGER_WRITE( "OnEventL default" );
-                break;
-                }
-            }
-        }
-    PushAndRefreshNaviPaneL();
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::OnEventL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::OnTimerEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::OnTimerEventL()
-    {
-    iListBox->DrawNow();
-    TInt iNewConnectionCount = iConnectionArray->MdcaCount();
-    if( iOldConnectionCount < iNewConnectionCount )
-       {
-        iListBox->HandleItemAdditionL();
-        }
-    else if ( iOldConnectionCount > iNewConnectionCount )
-        {
-        iListBox->HandleItemRemovalL();
-        }
-    
-    //Update the scrollbar only if lisbox focus 
-    //has changed
-    //
-    if ( iFocusChanged )
-        {
-        iListBox->UpdateScrollBarsL();
-        iFocusChanged = EFalse;
-        }
-    iOldConnectionCount = iNewConnectionCount;
-    PushAndRefreshNaviPaneL();
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::DrawFirstAllListBoxItem
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::DrawFirstAllListBoxItem()
-    {
-    TInt count = iListBox->Model()->NumberOfItems() - 1;
-    for ( TInt i = count; i > -1; --i )
-        {
-        iListBox->DrawItem( i );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::SelectedConnection
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiContainer::SelectedConnection()
-    {
-    return iListBox->CurrentItemIndex();
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::EndConnectionL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::EndConnectionL()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::EndConnectionL " );
-    TInt index = iListBox->CurrentItemIndex();
-    if ( ( index >= 0 ) && ( index < iConnectionArray->MdcaCount() ) )
-        {
-        CConnectionInfoBase* connection = ( *iConnectionArray )[index];
-        TUint connectionId = connection->GetConnectionId();
-        HBufC* connectionName = NULL;
-        HBufC* promptConnectionName = NULL;
-
-        // Get the bearertype of a single connection
-        TConnMonBearerType bearer;
-        bearer = connection->GetBearerType();
-
-        if ( isWlanSupported ) // WLAN ON
-            {
-            if ( ( bearer == EBearerWLAN ) && connection->IsEasyWLAN() )
-                {
-                /* check and load the SSID for EasyWLAN */
-                connectionName = connection->GetWlanNetworkNameLC();
-                CMUILOGGER_WRITE_F( "GetWlanNetworkNameLC: %S",
-                                    connectionName );
-                }
-            else
-                {
-                connectionName = connection->GetNameLC();
-                CMUILOGGER_WRITE_F( "GetNameLC: %S", connectionName );
-                }
-            }
-        else // WLAN OFF
-            {
-            connectionName = connection->GetNameLC();
-            CMUILOGGER_WRITE_F( "GetNameLC: %S", connectionName );
-            }
-
-        if ( bearer >= EBearerExternalCSD )
-            {
-            CMUILOGGER_WRITE( "R_QTN_CMON_CONF_END_MODEM_CONN" );
-            promptConnectionName = StringLoader::LoadLC( 
-                                            R_QTN_CMON_CONF_END_MODEM_CONN );
-            }
-        else
-            {
-            CMUILOGGER_WRITE( "R_QTN_CMON_CONF_END_SINGLE_CONN" );
-            promptConnectionName = StringLoader::LoadLC( 
-                                            R_QTN_CMON_CONF_END_SINGLE_CONN,
-                                            *connectionName );
-            }
-
-        CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-        TInt ret = dlg->ExecuteLD( R_END_CONN_CONFIRMATION_QUERY,
-                                   *promptConnectionName );
-
-        CleanupStack::PopAndDestroy( promptConnectionName );
-        CleanupStack::PopAndDestroy( connectionName );
-        
-        TInt connStatus;
-        iActiveWrapper->StartGetIntAttribute( connectionId,
-                                             iMonitor,
-                                             KConnectionStatus,
-                                             ( ( TInt& )( connStatus ) ) );
-        CMUILOGGER_WRITE_F( "KConnectionStatus status.Int(): %d",
-                            iActiveWrapper->iStatus.Int() );
-        CMUILOGGER_WRITE_F( "KConnectionStatus connStatus: %d",
-                            connStatus );
-        CMUILOGGER_WRITE_F( "ret ret: %d", ret );
-                           
-        if ( ( ret == EAknSoftkeyOk ) || ( ret == EAknSoftkeyYes ) )
-            {
-            if ( KErrNone == iActiveWrapper->iStatus.Int() )
-                {                
-                connection->SetDeletedFromCMUI();
-                
-                connection->RefreshConnectionListBoxItemTextL();
-                DrawFirstAllListBoxItem();
-                
-                iMonitor->SetBoolAttribute( connectionId, 0,
-                                            KConnectionStop, ETrue );
-                CMUILOGGER_WRITE( "after SetBoolAttribute" );                                            
-                }
-            }            
-        else
-            {
-            if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-                {
-                /* It is already closed */
-                /* An information note must be displayed */
-                CAknGlobalNote * note = CAknGlobalNote::NewL();
-                CleanupStack::PushL( note );
-                HBufC* informationText =
-                    StringLoader::LoadLC( R_QTN_CMON_INFO_CONN_ALREADY_END );
-
-                note->ShowNoteL(EAknGlobalInformationNote, *informationText );
-                CleanupStack::PopAndDestroy( informationText );
-                CleanupStack::PopAndDestroy( note );
-                CMUILOGGER_WRITE( "It is already closed" );
-                }
-            }
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::EndConnectionL " );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::EndAllConnectionL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::EndAllConnectionL()
-    {
-    CMUILOGGER_ENTERFN( "EndAllConnectionL - start" );
-
-    const TInt KOnlyOneConnection = 1;
-    const TInt KFirstConnection = 0;
-	CConnectionArray* tempConnArray =  iConnectionArray->DeepCopyL();	
-	CleanupStack::PushL( tempConnArray );
-	
-    TInt connectionCount = tempConnArray->MdcaCount();
-    HBufC* promptTxt = NULL;
-    if ( connectionCount == KOnlyOneConnection )
-        {
-        HBufC* temp = ( *tempConnArray )[KFirstConnection]->GetNameLC();
-        TName iapName = *temp;
-        CleanupStack::PopAndDestroy( temp );
-        promptTxt = StringLoader::LoadLC( R_QTN_CMON_CONF_END_SINGLE_CONN,
-                                       iapName );
-        }
-    else
-        {
-        promptTxt = StringLoader::LoadLC( R_QTN_CMON_CONF_END_ALL_CONNS,
-                                       connectionCount );
-        TPtr temp( promptTxt->Des() );
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-                                       
-        }
-    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-    TInt ret = dlg->ExecuteLD( R_END_CONN_CONFIRMATION_QUERY, *promptTxt );
-    CleanupStack::PopAndDestroy( promptTxt );
-
-    CConnectionInfoBase* connection = NULL;
-    TUint connectionId( 0 );
-
-    CMUILOGGER_WRITE_F( "ret: %d", ret );
-
-    /* End connections one by one, First CSD, after GPRS and WLAN. */
-    if ( ( ret == EAknSoftkeyOk ) || ( ret == EAknSoftkeyYes ) )
-        {
-        for ( TUint i = 0; i < iConnectionArray->MdcaCount(); ++i )
-            {
-            connection = ( *iConnectionArray )[i];
-            connection->SetAllDeletedFromCMUI();
-            connection->RefreshConnectionListBoxItemTextL();
-            }
-              
-        DrawFirstAllListBoxItem();
-        
-        TConnMonBearerType bearer;
-        for ( TUint i = 0; i < connectionCount; ++i )
-            {
-            CMUILOGGER_WRITE_F( "i: %d", i );
-
-            connection = ( *tempConnArray )[i];
-
-			bearer = connection->GetBearerType();
-		    switch ( bearer )
-		        {
-		        case EBearerCSD:
-		        case EBearerExternalCSD:
-		        case EBearerWcdmaCSD:
-		        case EBearerExternalWcdmaCSD:
-		        case EBearerHSCSD:
-		        case EBearerExternalHSCSD:
-		            {
-		            connectionId = connection->GetConnectionId();
-	            	iMonitor->SetBoolAttribute( connectionId, 0,
-	                                        	KConnectionStop, ETrue );	
-		            CMUILOGGER_WRITE_F( "CSD i: %d", i );
-		            CMUILOGGER_WRITE_F( "connectionId: %d", connectionId );
-		            break;
-		            }		        
-		        default :
-		            {
-		            break;
-		            }
-		        }
-            }
-            
-        for ( TUint i = 0; i < connectionCount; ++i )
-            {
-            CMUILOGGER_WRITE_F( "i: %d", i );
-
-            connection = ( *tempConnArray )[i];
-
-			bearer = connection->GetBearerType();
-		    switch ( bearer )
-		        {
-                case EBearerGPRS:
-                case EBearerWCDMA:
-                case EBearerEdgeGPRS:
-                case EBearerExternalGPRS:
-                case EBearerExternalWCDMA:
-                case EBearerExternalEdgeGPRS:
-                case EBearerWLAN:
-		            {
-		            connectionId = connection->GetConnectionId();
-	            	iMonitor->SetBoolAttribute( connectionId, 0,
-	                                        	KConnectionStop, ETrue );	
-		            CMUILOGGER_WRITE_F( "GPRS i: %d", i );
-		            CMUILOGGER_WRITE_F( "connectionId: %d", connectionId );
-		            break;
-		            }		        
-		        default :
-		            {
-		            break;
-		            }
-		        }
-            }
-        }
-     else
-        {
-        for ( TUint i = 0; 
-             ( ( i < connectionCount ) && 
-               ( KErrNotFound != iActiveWrapper->iStatus.Int() ) ); ++i )
-            {
-            connection = ( *tempConnArray )[i];
-            connectionId = connection->GetConnectionId();
-        	TInt connStatus;
-        	iActiveWrapper->StartGetIntAttribute( connectionId,
-                                                  iMonitor,
-                                                  KConnectionStatus,
-                                                  ( ( TInt& )( connStatus ) ) );
-            }
-            
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            /* It is already closed */
-            /* An information note must be displayed */
-            CAknGlobalNote * note = CAknGlobalNote::NewL();
-            CleanupStack::PushL( note );
-            HBufC* informationText =
-                StringLoader::LoadLC( R_QTN_CMON_INFO_CONN_ALREADY_END );
-
-            note->ShowNoteL(EAknGlobalInformationNote, *informationText );
-            CleanupStack::PopAndDestroy( informationText );
-            CleanupStack::PopAndDestroy( note );
-            CMUILOGGER_WRITE( "It is already closed in All" );
-            }
-        }
-        
-    CleanupStack::PopAndDestroy( tempConnArray );
-        
-    CMUILOGGER_LEAVEFN( "EndAllConnectionL - end" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::ListBox
-// ---------------------------------------------------------
-//
-CAknDoubleGraphicStyleListBox* CConnectionMonitorUiContainer::ListBox() const
-    {
-    return iListBox;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::SetIconsL()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::SetIconsL()
-    {
-    CMUILOGGER_ENTERFN( "SetIconsL" );
-    
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-
-    iconsFileName.Append( KConnectionMonitorUiMBMFile );
-
-    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity );
-    CleanupStack::PushL( icons );
-
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-                            KAknsIIDQgnPropWmlGprs,
-                            iconsFileName,
-                            EMbmConnectionmonitoruiQgn_prop_wml_gprs,
-                            EMbmConnectionmonitoruiQgn_prop_wml_gprs_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-                            KAknsIIDQgnPropWmlCsd,
-                            iconsFileName,
-                            EMbmConnectionmonitoruiQgn_prop_wml_csd,
-                            EMbmConnectionmonitoruiQgn_prop_wml_csd_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-                        KAknsIIDQgnPropWmlHscsd,
-                        iconsFileName,
-                        EMbmConnectionmonitoruiQgn_prop_wml_hscsd,
-                        EMbmConnectionmonitoruiQgn_prop_wml_hscsd_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-                  KAknsIIDQgnPropEmpty,
-                  iconsFileName,
-                  EMbmConnectionmonitoruiQgn_prop_empty,
-                  EMbmConnectionmonitoruiQgn_prop_empty_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-              KAknsIIDQgnPropWmlSms,
-              iconsFileName,
-              EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended,
-              EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance,
-                  KAknsIIDQgnPropWlanBearer,
-                  iconsFileName,
-                  EMbmConnectionmonitoruiQgn_prop_wlan_bearer,
-                  EMbmConnectionmonitoruiQgn_prop_wlan_bearer_mask ) );
-
-    iListBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
-    CleanupStack::Pop( icons ); // icons
-    CMUILOGGER_LEAVEFN( "SetIconsL" );        
-    
-    }
-
-// ---------------------------------------------------------------------------
-// void CConnectionMonitorUiContainer::HandleResourceChange( TInt aType )
-// Handle resource change events.
-// ---------------------------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::HandleResourceChange( TInt aType )
-    {
-    CMUILOGGER_ENTERFN( "HandleResourceChange" );
-    CMUILOGGER_WRITE_F( "aType: %d", aType );            
-    
-    CCoeControl::HandleResourceChange( aType );
-    
-    if ( aType == KAknsMessageSkinChange )
-        {
-        TInt error( KErrNone );
-        TRAP( error,  SetIconsL() );
-        CMUILOGGER_WRITE_F( "KAknsMessageSkinChange error: %d", error );
-        SizeChanged();
-        }
-        
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                           mainPaneRect );        
-        SetRect( mainPaneRect );                
-        DrawNow();                
-        }        
-    CMUILOGGER_LEAVEFN( "HandleResourceChange" );        
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::GetPanesL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::GetPanesL()
-    {
-    CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
-
-    iNaviPane =  STATIC_CAST( CAknNavigationControlContainer*,
-               statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) );
-
-    PushAndRefreshNaviPaneL();
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::PushAndRefreshNaviPaneL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::PushAndRefreshNaviPaneL()
-    {
-    CMUILOGGER_ENTERFN( "PushAndRefreshNaviPaneL - start" );
-
-    HBufC* textOfNaviPane = NULL;
-    TUint countOfConnection = iConnectionArray->NumberOfActiveConnections();
-    CMUILOGGER_WRITE_F( "countOfConnection: %d", countOfConnection );
-
-    if ( iNaviDecorator )
-        {
-        PopNaviPane();
-        }
-
-    if ( countOfConnection )
-        {
-        if ( countOfConnection == 1 )
-            {
-            textOfNaviPane = StringLoader::LoadLC(
-                                         R_QTN_CMON_NAVI_ONE_ACTIVE_CONN );
-            }
-        else
-            {
-            textOfNaviPane = StringLoader::LoadLC(
-                                            R_QTN_CMON_NAVI_MANY_ACTIVE_CONNS,
-                                            countOfConnection );
-            }
-        }
-    else
-        {
-        textOfNaviPane =  KEmpty().AllocLC();
-        }
-
-    TPtr temp( textOfNaviPane->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-        
-    iNaviDecorator = iNaviPane->CreateNavigationLabelL( *textOfNaviPane );
-    CleanupStack::PopAndDestroy( textOfNaviPane );
-
-    iNaviPane->PushL( *iNaviDecorator );
-    CMUILOGGER_LEAVEFN( "PushAndRefreshNaviPaneL - end" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::PopNaviPane
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::PopNaviPane()
-    {
-    iNaviPane->Pop( iNaviDecorator );
-    delete iNaviDecorator;
-    iNaviDecorator = NULL;
-    }   
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::FocusChanged( TDrawNow aDrawNow )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::FocusChanged" );
-    CCoeControl::FocusChanged( aDrawNow ); 
-    iFocusChanged = ETrue;     
-    if ( iListBox )
-        {
-        iListBox->SetFocus( IsFocused() );
-        }        
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::FocusChanged" );    
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::GetHelpContext()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiContainer::GetHelpContext( TCoeHelpContext& aContext) const
-    {
-    aContext.iMajor = KUidConnMonUI;
-    aContext.iContext = KCMON_HLP_CMON_MAIN_VIEW;
-    }
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,584 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  container control class
-*
-*
-*/
-
-// INCLUDE FILES
-#include "ConnectionMonitorUiDetailsContainer.h"
-
-#include <aknnavi.h>    //for CNaviPane
-#include <aknnavide.h>  //for CAknNavigationDecorator
-#include <StringLoader.h>
-#include <ConnectionMonitorUi.rsg>
-
-#include "ConnectionArray.h"
-#include "ConnectionMonitorUiLogger.h"
-#include "ConnectionMonitorUiDetailsView.h"
-#include "ConnectionMonitorUi.hrh"
-
-// CONSTANTS
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect )
-// EPOC two phased constructor
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect,
-                               CConnectionMonitorUiDetailsView* aParentView )
-    {
-    CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" );
-    CreateWindowL();
-    
-    iParentView = aParentView;
-    iListBox = new( ELeave ) CAknSingleHeadingStyleListBox;
-    iListBox->SetContainerWindowL( *this );
-    TInt flags = 0;
-    flags |= EAknListBoxViewerFlags | EAknListBoxDisableItemSpecificMenu;
-    iListBox->ConstructL( this, flags );
-    iListBox->CreateScrollBarFrameL( ETrue );
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-                                                 CEikScrollBarFrame::EOff,
-                                                 CEikScrollBarFrame::EAuto );
-
-    CMUILOGGER_WRITE( "Creating connection details array" );
-
-    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
-
-    SetRect( aRect );
-
-    HBufC* noConn = StringLoader::LoadLC( R_QTN_CMON_NO_ACTIVE_CONNECTIONS,
-                                          iEikonEnv );
-    CListBoxView *lbview = iListBox->View();
-    lbview->SetListEmptyTextL( *noConn );
-    CleanupStack::PopAndDestroy( noConn );
-
-
-    GetPanesL();
-
-    ActivateL();
-    CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL(
-                                                    TUint aConnectionIndex )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" );
-    CMUILOGGER_WRITE_F( "aConnectionIndex : %d", &aConnectionIndex );
-    CMUILOGGER_WRITE_F( "iConnectionArray->MdcaCount() : %d",
-                        iConnectionArray->MdcaCount() );
-    
-    CConnectionInfoBase* temp = ( *iConnectionArray ).At( aConnectionIndex );
-    CDesCArrayFlat* tempArray = temp ? temp->GetDetailsArray() : NULL ;
-    if ( tempArray )
-        {
-        iConnectionIndex = aConnectionIndex;
-        iConnectionInfo = temp;
-        iListBox->Model()->SetItemTextArray( tempArray );
-        iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
-        iListBox->Reset();
-        iListBox->UpdateScrollBarsL();        
-        }
-    
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" );    
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer()
-    {
-    delete iListBox;
-    delete iNaviDecorator;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiContainer::CConnectionMonitorUiContainer
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiDetailsContainer::CConnectionMonitorUiDetailsContainer(
-                             const CConnectionArray* const aConnectionArray )
-    : iConnectionArray( aConnectionArray )
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::SizeChanged()
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::SizeChanged()
-    {
-    iListBox->SetRect( Rect() );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::CountComponentControls() const
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiDetailsContainer::CountComponentControls() const
-    {
-    return 1; // return nbr of controls inside this container
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::ComponentControl( TInt aIndex ) const
-// ---------------------------------------------------------
-//
-CCoeControl* CConnectionMonitorUiDetailsContainer::ComponentControl(
-                                                       TInt aIndex ) const
-    {
-    switch ( aIndex )
-        {
-        case 0:
-            return iListBox;
-        default:
-            return NULL;
-        }
-    }
-	
-// ----------------------------------------------------------------------------
-// CLogsDetailView::HandleNaviDecoratorEventL
-// Handler for pointer events, when the Navi Pane arrows have been tapped
-// ----------------------------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::HandleNaviDecoratorEventL( TInt aEventID )
-    {
-    switch (aEventID)
-        {
-        case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow:
-            if ( iConnectionIndex < (iConnectionArray->MdcaCount() - 1) ) {
-                SetSelectedConnectionL(iConnectionIndex + 1);
-            }
-            break;
-        
-        case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow:
-            if ( iConnectionIndex > 0 ) {
-                SetSelectedConnectionL(iConnectionIndex - 1);
-            }
-            break;
-            
-        default:
-            return;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CConnectionMonitorUiDetailsContainer::OfferKeyEventL(
-                                                   const TKeyEvent& aKeyEvent,
-                                                   TEventCode aType )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" );    
-    
-    TKeyResponse result( EKeyWasNotConsumed );
-    TInt index = iConnectionIndex;
-    TInt index_closed = iConnectionIndex;
-    CConnectionInfoBase* connection = NULL;
-    if ( aType == EEventKey )
-        {
-        if ( ( aKeyEvent.iCode == EKeyLeftArrow ) ||
-            ( aKeyEvent.iCode == EKeyRightArrow ) )
-            {
-            
-            TInt dir = 0;
-            switch (aKeyEvent.iCode)
-                {
-                case EKeyLeftArrow:
-                    {
-                    dir = -1;
-                    break;
-                    }
-                case EKeyRightArrow:
-                    {
-                    dir = 1;
-                    break;
-                    }
-                }
-            // Handle mirrored layout by negating the directionality
-            if (AknLayoutUtils::LayoutMirrored())
-                {
-                dir = -1 * dir;
-                }
-                
-            index += dir; 
-            
-            TBool step( EFalse );
-            
-            CMUILOGGER_WRITE_F( "OfferKeyEventL index: %d", index );
-            
-            while ( ( index > -1 ) && ( index < iConnectionArray->MdcaCount()
-                    && !step ) )
-                {
-                connection = ( *iConnectionArray )[index];
-                TBool alive = connection->IsAlive();
-                CMUILOGGER_WRITE_F( "OfferKeyEventL alive: %b", alive );
-
-                if ( alive )
-                    {
-                    if ( ( index_closed > -1 ) && 
-                       ( index_closed < iConnectionArray->MdcaCount() ) )
-                        {
-                        CConnectionInfoBase* connection_closed 
-                                       = ( *iConnectionArray )[index_closed];
-
-                        if ( iParentView->GetViewRefreshState() )
-                             {
-                             step = ETrue;
-                             CConnectionMonitorUiAppUi* appUi =
-                                            (CConnectionMonitorUiAppUi*)
-                                            iEikonEnv->EikAppUi();
-                            appUi->DeleteDetailsView( 
-                                        GetSelectedConnectionInfo()
-                                                        ->GetConnectionId(),
-                                        GetSelectedConnectionInfo() );
-                            appUi->StartTimerL();
-                            iParentView->SetViewRefreshState( EFalse );
-                            if ( index_closed > index )
-                                {
-                                iConnectionInfo = connection;
-                                iConnectionIndex = index;
-                                }
-                            iListBox->Model()->SetItemTextArray(
-                                            connection->GetDetailsArray() );
-                            iListBox->DrawNow();
-                            iListBox->UpdateScrollBarsL();
-                            PushAndRefreshNaviPaneL();
-                            }
-                        else
-                            {
-                            step = ETrue;
-                            iConnectionInfo = connection;
-                            iConnectionIndex = index;
-                            iListBox->Model()->SetItemTextArray(
-                                            connection->GetDetailsArray() );
-                            iListBox->DrawNow();
-                            iListBox->UpdateScrollBarsL();
-                            PushAndRefreshNaviPaneL();
-                            }
-                        }
-                    }
-                else
-                    {                        
-                    index += dir; 
-                    }    
-                }
-            result = iListBox->OfferKeyEventL( aKeyEvent, aType );                
-            }
-        else if ( aKeyEvent.iCode == EKeyDevice3 )
-            // selection key press -> go back to main view
-            {
-            CConnectionMonitorUiAppUi::Static()->ActivateLocalViewL(
-                            TUid::Uid( EConnectionMonitorUiMainViewTab ) );
-            result = EKeyWasConsumed;
-            }
-        else
-            {
-            result = iListBox->OfferKeyEventL( aKeyEvent, aType );
-            }
-        }
-
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" );    
-
-    return result;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::OnEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::OnEventL(
-                                    const CConnMonEventBase& aConnMonEvent,
-                                    const TInt aIndex )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" );
-    CMUILOGGER_WRITE_F( "aIndex : %d", aIndex );
-    
-    switch ( aConnMonEvent.EventType() )
-        {
-        case EConnMonDeleteConnection:
-            {
-            // Do nothing
-            }
-            break;            
-        case EConnMonCreateConnection:
-            {
-        CMUILOGGER_WRITE_F( "iConnectionInfo : %d", iConnectionInfo );
-            
-            if ( !iConnectionInfo )
-                {
-                SetSelectedConnectionL( 0 );
-                }
-            break;
-            }
-        default:
-            {
-            if ( !iConnectionInfo )
-                {
-                SetSelectedConnectionL( 0 );
-                }            
-            else if ( ( aIndex == iConnectionIndex ) && ( iConnectionArray->MdcaCount() ) )
-                {
-                iListBox->DrawNow();
-                iListBox->UpdateScrollBarsL();
-                }
-            break;
-            }
-        }
-    PushAndRefreshNaviPaneL();
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" );    
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::OnTimerEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::OnTimerEventL()
-    {
-    if ( iConnectionArray->MdcaCount() )
-       {
-        iListBox->DrawNow();
-
-        CMUILOGGER_WRITE_F( "CMUIDW GetStatus() before: %d", 
-                            iConnectionInfo->GetStatus() );
-        if ( iConnectionInfo->GetStatus() == EConnectionClosing )
-            {
-            CConnectionMonitorUiAppUi* tempApUi = 
-                        CConnectionMonitorUiAppUi::Static();
-            iConnectionInfo->StatusChangedL();
-            }
-        CMUILOGGER_WRITE_F( "CMUIDW GetStatus() after: %d",
-                            iConnectionInfo->GetStatus() );
-        }
-    PushAndRefreshNaviPaneL();
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem()
-    {
-    TInt count = iListBox->Model()->NumberOfItems() - 1;
-    for ( TInt i = count; i > -1; --i )
-        {
-        iListBox->DrawItem( i );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::ListBox
-// ---------------------------------------------------------
-//
-CAknSingleHeadingStyleListBox*
-                        CConnectionMonitorUiDetailsContainer::ListBox() const
-    {
-    return iListBox;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::GetPanesL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::GetPanesL()
-    {
-    CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
-
-    iNaviPane =  STATIC_CAST( CAknNavigationControlContainer*,
-                  statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) );
-
-    PushAndRefreshNaviPaneL();
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL()
-    {
-    TUint countOfConnection = iConnectionArray->MdcaCount();
-    
-    CMUILOGGER_WRITE_F( "countOfConnection : %d", countOfConnection );
-    
-    if ( ( iConnectionIndex > countOfConnection ) && // spec. index update
-         ( countOfConnection == 0 ) )
-        {
-        iConnectionIndex = iConnectionArray->
-                                GetArrayIndex( 
-                                        GetSelectedConnectionInfo()
-                                                    ->GetConnectionId() );
-        }
-    
-    CMUILOGGER_WRITE_F( "iConnectionIndex : %d", iConnectionIndex );
-
-    if ( iNaviDecorator )
-        {
-        PopNaviPane();
-        }
-    
-    if ( iParentView->GetViewRefreshState() ) // connection closed
-        {
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
-        }
-    else // connection alive
-        {
-        HBufC* textOfNaviPane = NULL;
-
-        CArrayFixFlat<TInt>* array = new( ELeave ) CArrayFixFlat<TInt>( 2 );
-        CleanupStack::PushL( array );
-        
-        if ( ( countOfConnection == 1 ) &&
-             ( iConnectionIndex + 1 >= countOfConnection ) )
-            {
-            array->AppendL( countOfConnection );
-            }
-        else            
-            {            
-            array->AppendL( countOfConnection ? iConnectionIndex + 1 : 0 );
-            }
-            
-        array->AppendL( countOfConnection );
-        textOfNaviPane = StringLoader::LoadLC( 
-                                            R_QTN_CMON_NAVI_NOF_CONNECTION,
-                                            *array );
-
-        iNaviDecorator = iNaviPane->CreateNavigationLabelL( 
-                                                        *textOfNaviPane );
-        
-        CleanupStack::PopAndDestroy( textOfNaviPane );
-        CleanupStack::PopAndDestroy( array );
-        }
-
-    iNaviDecorator->MakeScrollButtonVisible( ETrue );
-    
-    CAknNavigationDecorator::TScrollButton left = CAknNavigationDecorator::ELeftButton;
-    CAknNavigationDecorator::TScrollButton right = CAknNavigationDecorator::ERightButton;
-    if ( AknLayoutUtils::LayoutMirrored() )
-    	{
-    	left = CAknNavigationDecorator::ERightButton;
-    	right = CAknNavigationDecorator::ELeftButton;
-    	}
-
-    if ( iParentView->GetViewRefreshState() )
-        {
-        iNaviDecorator->SetScrollButtonDimmed( left, 
-                                           ( ( iConnectionIndex == 0 ) ||
-                                             ( countOfConnection == 0 ) ) );
-        }
-    else
-        {
-        iNaviDecorator->SetScrollButtonDimmed( 
-                          left, 
-                          ( ( iConnectionIndex == 0 ) ||
-                            ( countOfConnection == 0 ) ||
-                            ( ( countOfConnection == 1 ) &&
-                              ( iConnectionIndex + 1 >= 
-                                    countOfConnection ) ) ) );
-        }
-
-    if ( iParentView->GetViewRefreshState() )
-        {
-        iNaviDecorator->SetScrollButtonDimmed( right, 
-    			                iConnectionIndex >= countOfConnection );
-        }
-    else
-        {
-        iNaviDecorator->SetScrollButtonDimmed( right, 
-    			                iConnectionIndex + 1 >= countOfConnection );
-        }
-        
-    iNaviDecorator->SetNaviDecoratorObserver( this );
-        
-    iNaviPane->PushL( *iNaviDecorator );
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::PopNaviPane
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::PopNaviPane()
-    {
-    iNaviPane->Pop( iNaviDecorator );
-    delete iNaviDecorator;
-    iNaviDecorator = NULL;
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::HandleResourceChange
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::HandleResourceChange( TInt aType )
-    {
-    CCoeControl::HandleResourceChange( aType );
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                           mainPaneRect );
-        SetRect( mainPaneRect );
-        DrawNow();
-        }
-    }
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsContainer::FocusChanged( TDrawNow aDrawNow )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" );
-    CCoeControl::FocusChanged( aDrawNow );    
-    if ( iListBox )
-        {
-        iListBox->SetFocus( IsFocused() );
-        }        
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" );    
-    }    
-    
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem
-// ---------------------------------------------------------
-//
-TInt CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem()
-	{
-    CMUILOGGER_WRITE_F(
-        "CMUIDetailsContainer::GetIndexOfSelectedItem  iConnectionIndex: %d",
-        iConnectionIndex );
-
-    return iConnectionIndex;	
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsContainer::GetSelectedConnectionInfo()
-// ---------------------------------------------------------
-//
-    CConnectionInfoBase* CConnectionMonitorUiDetailsContainer::
-                                        GetSelectedConnectionInfo() const
-	{
-	return iConnectionInfo;	
-	}
-    
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsView.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  view class
-*     
-*
-*/
-
-
-// INCLUDE FILES
-#include  <ConnectionMonitorUi.rsg>
-#include  "ConnectionMonitorUiDetailsView.h"
-#include  "ConnectionMonitorUiDetailsContainer.h" 
-#include  "ConnectionMonitorUi.hrh"
-#include  "ConnectionArray.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// ConnectionMonitorUiDetailsView::ConnectionMonitorUiDetailsView( 
-//                                 const CConnectionArray* aConnectionArray )
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiDetailsView::CConnectionMonitorUiDetailsView( 
-                             CConnectionArray* const aConnectionArray )
-    : CAknView(), 
-      iConnectionArray( aConnectionArray ), 
-      iViewRefreshState( EFalse )
-    {}
-
-// ---------------------------------------------------------
-// ConnectionMonitorUiDetailsView::ConstructL()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::ConstructL()
-    {
-    BaseConstructL( R_CONNECTIONMONITORUI_DETAILSVIEW );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::~CConnectionMonitorUiDetailsView()
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiDetailsView::~CConnectionMonitorUiDetailsView()
-    {
-    delete iContainer;
-    }
-
-// ---------------------------------------------------------
-// TUid CConnectionMonitorUiDetailsView::Id()
-// ?implementation_description
-// ---------------------------------------------------------
-//
-TUid CConnectionMonitorUiDetailsView::Id() const
-    {
-    return KDetailsViewId;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::HandleCommandL( TInt aCommand )
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::HandleCommandL( TInt aCommand )
-    {   
-    switch ( aCommand )
-        {
-        case EAknSoftkeyOk:
-            {
-            CloseViewL();
-            ActivateMainViewL();
-            break;
-            }
-        default:
-            {
-            AppUi()->HandleCommandL( aCommand );
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::CloseViewL()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::CloseViewL()
-    {   
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::CloseViewL" );    
-    
-    if ( GetViewRefreshState() )
-        {
-        // Now delete this view
-        CConnectionMonitorUiAppUi* appUi =
-            (CConnectionMonitorUiAppUi*)AppUi();
-        appUi->StartTimerL();
-        SetViewRefreshState( EFalse );
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsView::CloseViewL" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::SetSelectedConnectionId
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::SetSelectedConnection( TUint aIndex )
-    {
-    iConnectionId = aIndex;
-    }
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::GetSelectedConnection
-// ---------------------------------------------------------
-//
-TUint CConnectionMonitorUiDetailsView::GetSelectedConnection()
-	{
-	TUint result( KErrNone );
-	if ( iContainer )
-		{
-		result = iContainer->GetIndexOfSelectedItem();	
-		}
-	return result;		
-	}
-
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::DoActivateL(...)
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::DoActivateL(
-   const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/,
-   const TDesC8& /*aCustomMessage*/ )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::DoActivateL" );
-    
-    if ( !iContainer )
-        {
-        iContainer = new ( ELeave ) CConnectionMonitorUiDetailsContainer( 
-                                                            iConnectionArray );
-        iContainer->SetMopParent( this );
-        iContainer->ConstructL( ClientRect(), this );
-        iContainer->SetSelectedConnectionL( iConnectionId );
-        CConnectionMonitorUiAppUi::Static()->StartConnEventNotification( 
-                                                                  iContainer );
-        iContainer->DrawFirstAllListBoxItem();
-
-        iContainer->PushAndRefreshNaviPaneL();
-        iContainer->MakeVisible( ETrue );
-        AppUi()->AddToViewStackL( *this, iContainer );
-        }
-    
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsView::DoActivateL" );
-    
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::DoDeactivate
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::DoDeactivate()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::DoDeactivate" );
-    
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        CConnectionMonitorUiAppUi::Static()->StopConnEventNotification( 
-                                                             iContainer );
-        iContainer->PopNaviPane();
-        iContainer->MakeVisible( EFalse );
-
-        delete iContainer;
-        iContainer = NULL;
-        }                
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::HandleListBoxEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::HandleListBoxEventL( 
-                                                    CEikListBox* /*aListBox*/,
-                                                    TListBoxEvent aEventType )
-    {
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        //case EEventItemDoubleClicked:
-        case EEventItemSingleClicked:
-            {
-            AppUi()->ActivateLocalViewL( 
-                            TUid::Uid( EConnectionMonitorUiMainViewTab ) );
-            }
-            break;
-
-        default:
-            break;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::GetViewRefreshState
-// ---------------------------------------------------------
-//
-TBool CConnectionMonitorUiDetailsView::GetViewRefreshState()
-    {
-    return iViewRefreshState;	
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::SetViewRefreshState
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::SetViewRefreshState( 
-                                                    TBool aViewRefreshState )
-    {
-    iViewRefreshState = aViewRefreshState;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiDetailsView::ActivateMainViewL()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiDetailsView::ActivateMainViewL()
-    {   
-    AppUi()->ActivateLocalViewL( TUid::Uid( EConnectionMonitorUiMainViewTab ) );
-    }
-
-
-// End of File
-
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDocument.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  application class
-*     
-*
-*/
-
-
-// INCLUDE FILES
-#include "ConnectionMonitorUiDocument.h"
-#include "ConnectionMonitorUiAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// constructor
-CConnectionMonitorUiDocument::CConnectionMonitorUiDocument
-    (
-    CEikApplication& aApp
-    )
-: CAknDocument(aApp)    
-    {
-    }
-
-// destructor
-CConnectionMonitorUiDocument::~CConnectionMonitorUiDocument()
-    {
-    }
-
-// EPOC default constructor can leave.
-void CConnectionMonitorUiDocument::ConstructL()
-    {
-    }
-
-// Two-phased constructor.
-CConnectionMonitorUiDocument* CConnectionMonitorUiDocument::NewL(
-        CEikApplication& aApp)     // CConnectionMonitorUiApp reference
-    {
-    CConnectionMonitorUiDocument* myself =
-        new (ELeave) CConnectionMonitorUiDocument( aApp );
-    CleanupStack::PushL( myself );
-    myself->ConstructL();
-    CleanupStack::Pop( myself );
-
-    return myself;
-    }
-    
-// ----------------------------------------------------
-// CConnectionMonitorUiDocument::CreateAppUiL()
-// constructs CConnectionMonitorUiAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CConnectionMonitorUiDocument::CreateAppUiL()
-    {
-    return new (ELeave) CConnectionMonitorUiAppUi;
-    }
-
-// End of File  
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  view class
-*     
-*
-*/
-
-
-// INCLUDE FILES
-#include  <eikmenup.h>
-#include  <akntitle.h>   //for CAknTitlePane
-#include  <ConnectionMonitorUi.rsg>
-#include  <StringLoader.h>
-
-#include  <hlplch.h>
-#include <csxhelp/cmon.hlp.hrh>
-
-    
-#include  "ConnectionMonitorUiDetailsView.h"
-#include  "ConnectionMonitorUi.hrh"
-#include  "ConnectionMonitorUiAppUi.h"
-#include  "ConnectionMonitorUiView.h"
-#include  "ConnectionMonitorUiContainer.h" 
-#include  "ConnectionArray.h"
-#include  "FeatureManagerWrapper.h"
-
-
-// CONSTANTS 
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::CConnectionMonitorUiView
-// ---------------------------------------------------------
-//
-#ifdef RD_CONTROL_PANEL
-CConnectionMonitorUiView::CConnectionMonitorUiView( 
-                                    CConnectionArray* const aConnectionArray,
-                                    RConnectionMonitor* aMonitor,
-                                    TBool aIsEmbedded,
-                                    CActiveWrapper* aActiveWrapper )
-    : CAknView(),
-      iConnectionArray( aConnectionArray ),
-      iMonitor( aMonitor ),
-      isHelpSupported( EFalse ),
-      iIsEmbedded( EFalse ),
-      iActiveWrapper( aActiveWrapper )
-    {
-   	iIsEmbedded = aIsEmbedded;
-    }
-#else
-CConnectionMonitorUiView::CConnectionMonitorUiView( 
-                                    CConnectionArray* const aConnectionArray,
-                                    RConnectionMonitor* aMonitor,
-                                    CActiveWrapper* aActiveWrapper )
-    : CAknView(),
-      iConnectionArray( aConnectionArray ),
-      iMonitor( aMonitor ),
-      isHelpSupported( EFalse ),
-      iActiveWrapper( aActiveWrapper )
-    {
-    }
-#endif // RD_CONTROL_PANEL
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::ConstructL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::ConstructL()
-    {
-    isHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp );
-
-    TInt actView( NULL );
-
-#ifdef RD_CONTROL_PANEL
-    if ( iIsEmbedded )
-        {
-        actView = R_CP_CONNECTIONMONITORUI_VIEW;
-        }
-    else
-        {
-        actView = R_CONNECTIONMONITORUI_VIEW;
-        }
-#else
-        actView = R_CONNECTIONMONITORUI_VIEW;
-#endif // RD_CONTROL_PANEL
-
-    BaseConstructL( actView );        
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::~CConnectionMonitorUiView()
-// ---------------------------------------------------------
-//
-CConnectionMonitorUiView::~CConnectionMonitorUiView()
-    {
-    delete iContainer;
-    }
-
-// ---------------------------------------------------------
-// TUid CConnectionMonitorUiView::Id()
-// ---------------------------------------------------------
-//
-TUid CConnectionMonitorUiView::Id() const
-    {
-    return KConnectionsViewId;
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::HandleCommandL( TInt aCommand )
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::HandleCommandL( TInt aCommand )
-    {   
-    switch ( aCommand )
-        {
-        case EAknSoftkeyDetails:
-            {
-            if ( IsSelectedConnectionAlive() )
-                {
-                BringupDetailsViewL();
-                }
-            break;
-            }
-        case EConnectionMonitorUiCmdAppDetails:
-            {
-            BringupDetailsViewL();
-            break;
-            }
-        case EConnectionMonitorUiCmdAppEndConn:
-            {
-            iContainer->EndConnectionL();
-            break;
-            }
-        case EConnectionMonitorUiCmdAppEndAll:
-            {
-            iContainer->EndAllConnectionL();
-            break;
-            }
-       case EAknCmdHelp:
-            {
-            if ( isHelpSupported )
-                {
-                HlpLauncher::LaunchHelpApplicationL(
-                    CEikonEnv::Static()->WsSession(),
-                    CEikonEnv::Static()->EikAppUi()->AppHelpContextL() );
-                }
-            break;
-            }
-       default:
-            {
-            AppUi()->HandleCommandL( aCommand );
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::DynInitMenuPaneL()
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::DynInitMenuPaneL( TInt aResourceId,
-                                                 CEikMenuPane* aMenuPane )
-    {
-    MEikMenuObserver::DynInitMenuPaneL( aResourceId, aMenuPane );
-    // This is a security measure to prevent menu pane updates when
-    // the main view is not active. This should not happen but
-    // just to be safe it is checked.
-    if ( !iContainer )
-        {
-        return;
-        }
-    switch ( aResourceId )
-        {
-        case R_CONNECTIONMONITORUI_VIEW_MENU:
-            {
-            if ( !iConnectionArray->MdcaCount() )
-                {
-                aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppDetails );
-                aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndConn );
-                aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndAll );
-                }
-            else if ( iConnectionArray->MdcaCount() == 1 )
-                {
-                aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndAll );
-                if ( !IsSelectedConnectionAlive() )
-                    {
-                    aMenuPane->DeleteMenuItem( 
-                                    EConnectionMonitorUiCmdAppDetails );
-                    }
-                else if ( IsSelectedConnectionSuspended() )
-                    {
-                    aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndConn );
-                    }
-                }
-            else if ( iConnectionArray->NumberOfSuspendedConnections() >= 1 )
-                {
-                aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndAll );
-                if ( IsSelectedConnectionSuspended() )
-                    {
-                    aMenuPane->DeleteMenuItem( 
-                                EConnectionMonitorUiCmdAppEndConn );
-                    }
-                }
-            else
-                {
-                if ( !IsSelectedConnectionAlive() )
-                    {
-                    aMenuPane->DeleteMenuItem( 
-                                    EConnectionMonitorUiCmdAppDetails );
-                    aMenuPane->DeleteMenuItem( 
-                                    EConnectionMonitorUiCmdAppEndConn );
-                    }
-                }
-            break;
-            }
-        case R_CONNECTIONMONITORUI_APP_MENU:
-            {
-            if ( !isHelpSupported )
-                {
-                aMenuPane->DeleteMenuItem( EAknCmdHelp );
-                }
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::HandleListBoxEventL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::HandleListBoxEventL( CEikListBox* /*aListBox*/, 
-                                                    TListBoxEvent aEventType )
-    {
-    switch ( aEventType )
-        {
-        case EEventEnterKeyPressed:
-        //case EEventItemDoubleClicked:
-        case EEventItemSingleClicked:
-            {
-            if ( IsSelectedConnectionAlive() )
-                {
-                BringupDetailsViewL();
-                }
-            }
-            break;
-        default:
-            break;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::DoActivateL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::DoActivateL(
-                                            const TVwsViewId& /*aPrevViewId*/, 
-                                            TUid /*aCustomMessageId*/,
-                                            const TDesC8& /*aCustomMessage*/ )
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiView::DoActivateL" );
-    
-    if ( !iContainer )
-        {
-        iContainer = new( ELeave ) CConnectionMonitorUiContainer( 
-                                                            iConnectionArray,
-                                                            iMonitor,
-                                                            iActiveWrapper );
-        iContainer->SetMopParent( this );
-        
-        
-	    CConnectionMonitorUiDetailsView* view = 
-	        STATIC_CAST( CConnectionMonitorUiDetailsView*,
-	        AppUi()->View( TUid::Uid( EConnectionMonitorUiDetailsViewTab ) ) );
-
-	    TInt index  = view->GetSelectedConnection();
-    	CMUILOGGER_WRITE_F( "index: %d", index );
-                
-        iContainer->ConstructL( index, ClientRect() );
-        iContainer->ListBox()->SetListBoxObserver( this );
-
-        CConnectionMonitorUiAppUi::Static()->StartConnEventNotification( 
-                                                                  iContainer );
-        iContainer->PushAndRefreshNaviPaneL();
-        AppUi()->AddToViewStackL( *this, iContainer );
-        ConnectionKeyObserver();
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiView::DoActivateL" );
-    
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::DoDeactivate
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::DoDeactivate()
-    {
-    CMUILOGGER_ENTERFN( "CConnectionMonitorUiView::DoDeactivate" );
-    
-    if ( iContainer )
-        {
-        AppUi()->RemoveFromViewStack( *this, iContainer );
-        CConnectionMonitorUiAppUi::Static()->StopConnEventNotification( 
-                                                                  iContainer );
-        iContainer->PopNaviPane();
-        delete iContainer;
-        iContainer = NULL;
-        }
-    CMUILOGGER_LEAVEFN( "CConnectionMonitorUiView::DoDeactivate" );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::SetTitlePaneTextL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::SetTitlePaneTextL( TInt aResourceId )
-    {
-    CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
-    CAknTitlePane* titlePane =
-        ( CAknTitlePane* )statusPane->ControlL(
-                            TUid::Uid( EEikStatusPaneUidTitle ) );
-    HBufC* text = iEikonEnv->AllocReadResourceLC( aResourceId );
-    titlePane->SetTextL( text->Des() );
-    CleanupStack::PopAndDestroy( text );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::BringupDetailsViewL
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::BringupDetailsViewL()
-    {
-    CConnectionMonitorUiDetailsView* view = 
-        STATIC_CAST( CConnectionMonitorUiDetailsView*,
-                     AppUi()->View( TUid::Uid( 
-                     EConnectionMonitorUiDetailsViewTab ) ) );
-
-    TInt selIndex = iContainer->SelectedConnection();
-    view->SetSelectedConnection( selIndex );
-    AppUi()->ActivateLocalViewL( 
-                             TUid::Uid( EConnectionMonitorUiDetailsViewTab ) );
-    }
-
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::IsSelectedConnectionAlive
-// ---------------------------------------------------------
-//
-TBool CConnectionMonitorUiView::IsSelectedConnectionAlive() const
-    {
-    TInt selIndex = iContainer->SelectedConnection();
-    TBool result( EFalse );
-    if ( selIndex > -1 )
-        {
-        result = ( *iConnectionArray )[selIndex]->IsAlive();
-        }
-
-    return result;
-    }
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::IsSelectedConnectionSuspended
-// ---------------------------------------------------------
-//
-TBool CConnectionMonitorUiView::IsSelectedConnectionSuspended() const
-    {
-    TInt selIndex = iContainer->SelectedConnection();
-    TBool result( EFalse );
-    if ( selIndex > -1 )
-        {
-        result = ( *iConnectionArray )[selIndex]->IsSuspended();
-        }
-
-    return result;
-    }    
-    
-// ---------------------------------------------------------
-// CConnectionMonitorUiView::ConnectionKeyObserver
-// ---------------------------------------------------------
-//
-void CConnectionMonitorUiView::ConnectionKeyObserver() const
-    {
-    if ( !( iConnectionArray->MdcaCount() ) )
-        {
-        Cba()->MakeCommandVisible( EAknSoftkeyDetails,EFalse );
-        }
-    else
-        {
-        if ( iConnectionArray->NumberOfActiveConnections() )
-            {
-            Cba()->MakeCommandVisible( EAknSoftkeyDetails,ETrue );
-            }
-        else
-            {
-            Cba()->MakeCommandVisible( EAknSoftkeyDetails,EFalse );
-            }
-        }
-	}
-
-
-    
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/CsdConnectionInfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,444 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a connection
-*
-*
-*/
-
-
-// INCLUDE FILES
-//#include <nifvar.h>
-#include <StringLoader.h>
-#include <ConnectionMonitorUi.rsg>
-#include <ConnectionMonitorUi.mbg>
-#include <AknUtils.h>
-
-#include "ConnectionMonitorUiLogger.h"
-#include "CsdConnectionInfo.h"
-#include "ActiveWrapper.h"
-
-// CONSTANTS
-
-LOCAL_D const TUint KDetailsArrayGranularityInternal = 9;
-LOCAL_D const TUint KDetailsArrayGranularityExternal = 4;
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CCsdConnectionInfo::NewL
-// ---------------------------------------------------------
-//
-CCsdConnectionInfo* CCsdConnectionInfo::NewL( TInt aConnectionId,
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              CActiveWrapper* aActiveWrapper )
-    {
-    CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - start " );
-
-    CCsdConnectionInfo* self = new ( ELeave ) CCsdConnectionInfo(
-                                                    aConnectionId,
-                                                    aConnectionMonitor,
-                                                    aConnectionBearerType,
-                                                    aActiveWrapper );
-    CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - created " );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - end " );
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::~CCsdConnectionInfo
-// ---------------------------------------------------------
-//
-CCsdConnectionInfo::~CCsdConnectionInfo()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::CCsdConnectionInfo
-// ---------------------------------------------------------
-//
-CCsdConnectionInfo::CCsdConnectionInfo(  TInt aConnectionId,
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper ) :
-    CConnectionInfoBase( aConnectionId,
-                         aConnectionMonitor,
-                         aConnectionBearerType,
-                         aActiveWrapper )
-        {
-        CMUILOGGER_WRITE( "CCsdConnectionInfo constuctor" );
-        }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::ConstructL
-// ---------------------------------------------------------
-//
-void CCsdConnectionInfo::ConstructL()
-    {
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::ConstructL() start" );
-    
-    iActiveWrapper->StartGetStringAttribute( iConnectionId,
-                                             iConnectionMonitor,
-                                             KTelNumber,
-                                             iDialupNumber );
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "CCsdConnectionInfo::ConstructL() status: %d",
-                        err );
-    if ( err != KErrNone )
-        {
-        User::Leave( err );
-        }
-        
-    CConnectionInfoBase::ConstructL();
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::ConstructL() end" );
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::DeepCopyL
-// ---------------------------------------------------------
-//        
-CConnectionInfoBase* CCsdConnectionInfo::DeepCopyL()
-	{
-	CCsdConnectionInfo* temp = new ( ELeave ) CCsdConnectionInfo(
-                                                    iConnectionId,
-                                                    iConnectionMonitor,
-                                                    iConnectionBearerType,
-                                                    iActiveWrapper );
-                              							
-	temp->iConnectionName = iConnectionName;
-	temp->iConnectionStatus = iConnectionStatus;
-	temp->iUploaded = iUploaded;
-	temp->iDownloaded = iDownloaded;
-	temp->iStartTime = iStartTime;
-	temp->iDuration = iDuration;
-	temp->iLastSpeedUpdate = iLastSpeedUpdate;
-	temp->iUpSpeed = iUpSpeed;
-	temp->iDownSpeed = iDownSpeed;
-	temp->iListBoxItemText = iListBoxItemText;
-	
-	temp->iDialupNumber = iDialupNumber;
-		
-	if ( iDetailsArray )
-		{
-		CleanupStack::PushL( temp );		
-		temp->ToArrayDetailsL();
-		CleanupStack::Pop( temp );			
-		}
-		
-	return temp;	
-	}
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::GetIconId
-// ---------------------------------------------------------
-//
-TUint CCsdConnectionInfo::GetIconId() const
-    {
-    TUint iconId = ECsd;
-    if ( ( iConnectionBearerType == EBearerHSCSD ) || 
-         ( iConnectionBearerType == EBearerExternalHSCSD ) )
-        {
-        iconId = EHscsd;
-        }
-    return iconId;
-    }
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::RefreshDetailsL
-// ---------------------------------------------------------
-//
-void CCsdConnectionInfo::RefreshDetailsL()
-    {
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsL start" );
-    
-    CMUILOGGER_WRITE_F( "before iConnectionBearerType: %d", 
-                        ( TInt )iConnectionBearerType );
-    
-    TConnMonBearerType bearerType;
-    
-    iActiveWrapper->StartGetIntAttribute( iConnectionId,
-                                          iConnectionMonitor,
-                                          KBearer,
-                                          ( TInt& )bearerType );
-        
-    if ( !iActiveWrapper->iStatus.Int() )
-        {
-        iConnectionBearerType = bearerType;
-        }
-    
-    CMUILOGGER_WRITE_F( "status.Int(): %d", iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType );    
-    CMUILOGGER_WRITE_F( "after iConnectionBearerType: %d", ( TInt )iConnectionBearerType );
-    
-    if ( iConnectionBearerType < EBearerExternalCSD )
-        {
-        RefreshTransferSpeedsL();
-        }
-    RefreshDuration();
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsL end" );
-    }
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::ToStringDialupNumberLC
-// ---------------------------------------------------------
-//
-HBufC* CCsdConnectionInfo::ToStringDialupNumberLC() const
-    {
-    HBufC* dialupNumber = iDialupNumber.AllocLC();
-    TPtr temp( dialupNumber->Des() );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp );
-    
-    return dialupNumber;
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::RefreshConnectionListBoxItemTextL
-// ---------------------------------------------------------
-//
-void CCsdConnectionInfo::RefreshConnectionListBoxItemTextL()
-    {
-    CMUILOGGER_WRITE(
-        "CCsdConnectionInfo::RefreshConnectionListBoxItemTextL start" );
-
-    TUint  iconId;
-    HBufC* secondRow = NULL;
-
-    iconId = GetIconId();
-
-    if ( iConnectionStatus == EConnectionCreated )
-        {
-        secondRow =  ToStringDurationLC();
-        }
-    else    // if connection has not created yet gives back the status of its.
-        {
-        secondRow = ToStringStatusLC( EFalse );
-        }
-
-    iListBoxItemText.Format( KConnectonListItemTextFormat, iconId,
-                             &iConnectionName, secondRow );
-    CleanupStack::PopAndDestroy( secondRow );
-    CMUILOGGER_WRITE(
-        "CCsdConnectionInfo::RefreshConnectionListBoxItemTextL end" );
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::RefreshDetailsArrayL
-// ---------------------------------------------------------
-//
-void CCsdConnectionInfo::RefreshDetailsArrayL()
-    {
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsArrayL start" );
-    if ( iDetailsArray )
-        {
-        TBool internal = iConnectionBearerType < EBearerExternalCSD ;
-        HBufC* temp = NULL;
-
-        if ( internal )
-            {
-            temp = ToStringStatusLC();
-            ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS,
-                                                  temp, 2 );
-                                                  
-            ToDetailsListBoxItemTextWithReplaceL
-                ( 
-                R_QTN_CMON_HEADING_DATA_TOTAL,
-                ToStringTotalTransmittedDataLC(), 
-                3   
-                );                                                  
-
-            ToDetailsListBoxItemTextWithReplaceL
-                (
-                R_QTN_CMON_HEADING_DATA_RECEIVED,
-                ToStringReceivedDataLC(),
-                4
-                );
-
-            ToDetailsListBoxItemTextWithReplaceL
-                (
-                R_QTN_CMON_HEADING_DATA_SENT,
-                ToStringSentDataLC(),
-                5
-                );
-
-            ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION,
-                                                  ToStringDurationLC(), 6 );
-
-            ToDetailsListBoxItemTextWithReplaceL
-                (
-                R_QTN_CMON_HEADING_SPEED,
-                ToStringTransferSpeedDownLC(),
-                7
-                );
-
-            ToDetailsListBoxItemTextWithReplaceL
-                (
-                0, 
-                ToStringTransferSpeedUpLC(),
-                8
-                );
-
-            CleanupStack::PopAndDestroy( 7, temp );   // ToString...LC()
-
-            TInt sharing = RefreshAppNamesL();
-
-            if ( sharing >= 1 )
-                {
-                if ( iDetailsArray->Count() > 10 )
-                    {
-                    iDetailsArray->Delete( 10, 
-                                           iDetailsArray->Count() - 10 );
-                    iDetailsArray->Compress();
-                    }
-                
-                for ( TInt i = 0; i < sharing; i++ )
-                    {
-                    if ( i == 0 )
-                        {
-                        ToDetailsListBoxItemTextWithAppendL( 
-                                        R_QTN_CMON_HEADING_SHARING_INFO,
-                                        ToStringAppNameLC( i ) );
-                        }
-                    else
-                        {
-                        ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                    ToStringAppNameLC( i ) );
-                        }
-                    }
-                CleanupStack::PopAndDestroy( sharing ); 
-                                                    // ToStringAppNameLC()
-                }
-            else
-                {
-                if ( iDetailsArray->Count() > 10 )
-                    {
-                    iDetailsArray->Delete( 10, iDetailsArray->Count() - 10 );
-                    iDetailsArray->Compress();
-                    }
-                }
-            }
-        else
-            {
-            ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION,
-                                                  ToStringDurationLC(), 2 );
-            CleanupStack::PopAndDestroy( 1 );   // ToStringDurationLC()
-            }
-        }
-    CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsArrayL end" );
-    }
-
-
-// ---------------------------------------------------------
-// CCsdConnectionInfo::ToArrayDetailsL
-// ---------------------------------------------------------
-//
-void CCsdConnectionInfo::ToArrayDetailsL()
-    {
-    CMUILOGGER_ENTERFN("CCsdConnectionInfo::ToArrayDetailsL");
-    TBool internal = iConnectionBearerType < EBearerExternalCSD ;
-    TUint granularity = KDetailsArrayGranularityExternal;
-    HBufC* temp = NULL;
-
-    if ( internal )
-        {
-        granularity = KDetailsArrayGranularityInternal;
-        }
-    delete iDetailsArray;
-    iDetailsArray = NULL;
-    iDetailsArray = new ( ELeave ) CDesCArrayFlat( granularity );
-
-    temp = iConnectionName.AllocLC();
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CONN_NAME,
-                                         temp );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER,
-                                         ToStringBearerLC() );
-    CleanupStack::PopAndDestroy( 2, temp );   // ToString...LC()
-
-
-    if ( internal )
-        {
-        temp = ToStringStatusLC();
-        ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS,
-                                             temp );
-
-        ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                             ToStringTotalTransmittedDataLC() );
-                                             
-        ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                             ToStringReceivedDataLC() );
-
-        ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT,
-                                             ToStringSentDataLC() );
-        CleanupStack::PopAndDestroy( 4, temp );   // ToString...LC()
-        }
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION,
-                                         ToStringDurationLC() );
-    CleanupStack::PopAndDestroy( 1 );   // ToStringDurationLC()
-
-    if ( internal )
-        {
-        temp = ToStringTransferSpeedDownLC();
-
-        ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED,
-                                             temp );
-
-        ToDetailsListBoxItemTextWithAppendL( 0, 
-                                             ToStringTransferSpeedUpLC() );
-        CleanupStack::PopAndDestroy( 2, temp );   // ToString...LC()
-        }
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CSD_NUMBER,
-                                         ToStringDialupNumberLC() );
-    CleanupStack::PopAndDestroy( 1 );   // ToStringDialupNumberLC()
-
-    if ( internal )
-        {
-        TInt sharing = RefreshAppNamesL();
-        
-        if ( sharing >= 1 )
-            {
-            for ( TInt i = 0; i < sharing; i++ )
-                {
-                if ( i == 0 )
-                    {
-                    ToDetailsListBoxItemTextWithAppendL( 
-                                    R_QTN_CMON_HEADING_SHARING_INFO,
-                                    ToStringAppNameLC( i ) );
-                    }
-                else
-                    {
-                    ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                ToStringAppNameLC( i ) );
-                    }
-                }
-            CleanupStack::PopAndDestroy( sharing ); 
-                                                    // ToStringAppNameLC()
-            }
-        }
-    CMUILOGGER_LEAVEFN("CCsdConnectionInfo::ToArrayDetailsL");
-    }
-
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/EasyWLANConnectionInfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,371 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a WLAN connection
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <ConnectionMonitorUi.rsg>
-#include <ConnectionMonitorUi.mbg>
-
-#include "EasyWLANConnectionInfo.h"
-#include "ConnectionArray.h"
-#include <StringLoader.h>
-
-#include "ConnectionMonitorUiLogger.h"
-
-
-// CONSTANTS
-/**
-* Count of details of WLAN connection
-*/
-LOCAL_D const TUint KMaxNumOfListBoxItems = 14;
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::NewL
-// ---------------------------------------------------------
-//
-CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL( TInt aConnectionId,
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              CActiveWrapper* aActiveWrapper )
-    {
-    CMUILOGGER_ENTERFN(
-        "CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL" );
-    CEasyWlanConnectionInfo* self = new ( ELeave ) CEasyWlanConnectionInfo(
-                                                    aConnectionId,
-                                                    aConnectionMonitor,
-                                                    aConnectionBearerType,
-                                                    aActiveWrapper );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    CMUILOGGER_LEAVEFN(
-        "CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL" );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::CEasyWlanConnectionInfo
-// ---------------------------------------------------------
-//
-CEasyWlanConnectionInfo::CEasyWlanConnectionInfo( TInt aConnectionId,
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              CActiveWrapper* aActiveWrapper )
-    : CWlanConnectionInfo( aConnectionId,
-                           aConnectionMonitor,
-                           aConnectionBearerType,
-                           aActiveWrapper )
-    {
-    iEasyWlan= ETrue;
-    }
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::ConstructL
-// ---------------------------------------------------------
-//
-void CEasyWlanConnectionInfo::ConstructL()
-    {
-    CMUILOGGER_ENTERFN( "void CEasyWlanConnectionInfo::ConstructL()" );
-
-    CWlanConnectionInfo::ConstructL();
-
-    CMUILOGGER_LEAVEFN( "void CEasyWlanConnectionInfo::ConstructL()" );
-    }
-
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::~CEasyWlanConnectionInfo
-// ---------------------------------------------------------
-//
-CEasyWlanConnectionInfo::~CEasyWlanConnectionInfo()
-    {
-    }
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::DeepCopyL
-// ---------------------------------------------------------
-//        
-CConnectionInfoBase* CEasyWlanConnectionInfo::DeepCopyL()
-	{
-	CEasyWlanConnectionInfo* temp = new ( ELeave ) CEasyWlanConnectionInfo(
-                                                    iConnectionId,
-                                                    iConnectionMonitor,
-                                                    iConnectionBearerType,
-                                                    iActiveWrapper );
-                              							
-	temp->iConnectionName = iConnectionName;
-	temp->iConnectionStatus = iConnectionStatus;
-	temp->iUploaded = iUploaded;
-	temp->iDownloaded = iDownloaded;
-	temp->iStartTime = iStartTime;
-	temp->iDuration = iDuration;
-	temp->iLastSpeedUpdate = iLastSpeedUpdate;
-	temp->iUpSpeed = iUpSpeed;
-	temp->iDownSpeed = iDownSpeed;
-	temp->iListBoxItemText = iListBoxItemText;
-	
-	temp->iWlanNetworkName = iWlanNetworkName;
-	temp->iSignalStrength = iSignalStrength;
-	temp->iNetworkMode = iNetworkMode;
-	temp->iSecurityMode = iSecurityMode;
-	temp->iTxPower = iTxPower;
-
-	if ( iDetailsArray )
-		{
-		CleanupStack::PushL( temp );		
-		temp->ToArrayDetailsL();
-		CleanupStack::Pop( temp );			
-		}
-		
-	return temp;	
-	}    
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::ToArrayDetailsL
-// ---------------------------------------------------------
-//
-void CEasyWlanConnectionInfo::ToArrayDetailsL()
-    {
-    CMUILOGGER_ENTERFN( "void CEasyWlanConnectionInfo::ToArrayDetailsL()" );
-
-    HBufC* temp = NULL;
-    delete iDetailsArray;
-    iDetailsArray = NULL;
-
-    iDetailsArray = new ( ELeave ) CDesCArrayFlat
-        ( KMaxNumOfListBoxItems );
-
-    temp = ToStringBearerLC();
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER,
-                                         temp );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS,
-                                         ToStringStatusLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_NETWORK_NAME,
-                                         GetWlanNetworkNameLC() );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH,
-        ToStringSignalStrengthLC()
-        );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_NETWORK_MODE,
-                                         ToStringNetworkModeLC() );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_WLAN_SECURITY_MODE,
-        ToStringSecurityModeLC()
-        );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_TX_POWER,
-                                         ToStringTxPowerLC() );
-        
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                         ToStringTotalTransmittedDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                         ToStringReceivedDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT,
-                                         ToStringSentDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION,
-                                         ToStringDurationLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED,
-                                         ToStringTransferSpeedDownLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( 0, 
-                                         ToStringTransferSpeedUpLC() );
-
-    CleanupStack::PopAndDestroy
-        (
-        KMaxNumOfListBoxItems - 1,
-        temp
-        );
-
-    CMUILOGGER_WRITE_F( "KMaxNumOfListBoxItems + cCXSupported : %d",
-                        KMaxNumOfListBoxItems );
-
-    TInt sharing = RefreshAppNamesL();
-        
-    if ( sharing >= 1 )
-        {
-        for ( TInt i = 0; i < ( sharing ); i++ )
-            {
-            if ( i == 0 )
-                {
-                ToDetailsListBoxItemTextWithAppendL( 
-                                    R_QTN_CMON_HEADING_SHARING_INFO,
-                                    ToStringAppNameLC( i ) );
-                }
-            else
-                {
-                ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                ToStringAppNameLC( i ) );
-                }
-            }
-        CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC()
-        }
-        
-    CMUILOGGER_LEAVEFN( "void CEasyWlanConnectionInfo::ToArrayDetailsL()" );
-    }
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::RefreshDetailsArrayL
-// ---------------------------------------------------------
-//
-void CEasyWlanConnectionInfo::RefreshDetailsArrayL()
-    {
-    CMUILOGGER_ENTERFN( "CEasyWlanConnectionInfo::RefreshDetailsArrayL()" );
-
-    HBufC* temp = NULL;
-
-    temp = ToStringStatusLC();
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS,
-                                          temp, 1 );
-
-    ToDetailsListBoxItemTextWithReplaceL
-        (
-        R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH,
-        ToStringSignalStrengthLC(),
-        3
-        );
-
-    ToDetailsListBoxItemTextWithReplaceL
-        (
-        R_QTN_CMON_HEADING_WLAN_TX_POWER,
-        ToStringTxPowerLC(),
-        6
-        );
-        
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                          ToStringTotalTransmittedDataLC(),
-                                          7 );
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                          ToStringReceivedDataLC(),
-                                          8 );
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT,
-                                          ToStringSentDataLC(),
-                                          9 );
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION,
-                                          ToStringDurationLC(),
-                                          10 );
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_SPEED,
-                                          ToStringTransferSpeedDownLC(),
-                                          11 );
-
-    ToDetailsListBoxItemTextWithReplaceL( 0, 
-                                          ToStringTransferSpeedUpLC(),
-                                          12 );
-
-    CleanupStack::PopAndDestroy( 9, temp );
-
-    TInt count = iDetailsArray->Count();
-    TInt realElementsMaxCount = KMaxNumOfListBoxItems;
-
-    CMUILOGGER_WRITE_F( "count : %d", count );
-    CMUILOGGER_WRITE_F( "realElementsMaxCount : %d", 
-                        realElementsMaxCount );
-
-    TInt sharing = RefreshAppNamesL();
-
-    if ( sharing >= 1 )
-        {
-        if ( count >= realElementsMaxCount )
-            {  
-            iDetailsArray->Delete( realElementsMaxCount - 1,
-                                       iDetailsArray->Count() - 13 );
-            iDetailsArray->Compress(); 
-            }
-
-        for ( TInt i = 0; i < sharing; i++ )
-            {
-            if ( i == 0 )
-                {
-                ToDetailsListBoxItemTextWithAppendL( 
-                                        R_QTN_CMON_HEADING_SHARING_INFO,
-                                        ToStringAppNameLC( i ) );
-                }
-            else
-                {
-                ToDetailsListBoxItemTextWithAppendL( 0, 
-                                            ToStringAppNameLC( i ) );
-                }
-            }
-        CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC()
-        }
-    else
-        {
-        if ( count >= realElementsMaxCount )
-            {
-            iDetailsArray->Delete( realElementsMaxCount - 1,
-                                   iDetailsArray->Count() - 13 );
-            iDetailsArray->Compress();              
-            }
-        } 
-
-    CMUILOGGER_LEAVEFN(
-        "void CEasyWlanConnectionInfo::RefreshDetailsArrayL()" );
-    }
-
-// ---------------------------------------------------------
-// CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL
-// ---------------------------------------------------------
-//
-void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL()
-    {
-    CMUILOGGER_ENTERFN(
-    "void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" );
-
-    TUint  iconId;
-    HBufC* secondRow = NULL;
-
-    iconId = GetIconId();
-
-    if ( iConnectionStatus == EConnectionCreated )
-        {
-        secondRow =  ToStringDurationLC();
-        }
-    else    // if connection has not created yet gives back the status of its.
-        {
-        secondRow = ToStringStatusLC( EFalse );
-        }
-
-    iListBoxItemText.Format( KConnectonListItemTextFormat, iconId,
-                             &iWlanNetworkName, secondRow );
-    CleanupStack::PopAndDestroy( secondRow );
-
-    CMUILOGGER_LEAVEFN(
-    "void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" );
-    }
-
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/FeatureManagerWrapper.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CFeatureManagerWrapper.
-*
-*/
-
-
-// INCLUDE FILES
-#include    "FeatureManagerWrapper.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CFeatureManagerWrapper::CFeatureManagerWrapper
-// ---------------------------------------------------------
-//
-CFeatureManagerWrapper::CFeatureManagerWrapper() : CBase()
-    {
-    }
-
-// ---------------------------------------------------------
-// CFeatureManagerWrapper::~CFeatureManagerWrapper
-// ---------------------------------------------------------
-//
-CFeatureManagerWrapper::~CFeatureManagerWrapper() 
-    {
-    if ( iIsFeatureMgrInitialized )
-        {
-        FeatureManager::UnInitializeLib();    
-        }
-    }
-
-// ---------------------------------------------------------
-// CFeatureManagerWrapper::ConstructL
-// ---------------------------------------------------------
-//
-void CFeatureManagerWrapper::ConstructL()
-    {
-    FeatureManager::InitializeLibL();
-    iIsFeatureMgrInitialized = ETrue ;
-    }
-
-// ---------------------------------------------------------
-// CFeatureManagerWrapper::NewL
-// ---------------------------------------------------------
-//
-CFeatureManagerWrapper*  CFeatureManagerWrapper::NewL()
-    {
-    CFeatureManagerWrapper* self = new ( ELeave ) CFeatureManagerWrapper;
-    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-//End of file.
-
--- a/connectionmonitoring/connectionmonitorui/src/GprsConnectionInfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,426 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a GPRS connection
-*     
-*
-*/
-
-
-// INCLUDE FILES
-//#include <nifvar.h>
-#include <StringLoader.h>
-#include <ConnectionMonitorUi.rsg>
-#include <ConnectionMonitorUi.mbg>
-//#include <Avkon.rsg>
-
-#include "ConnectionMonitorUiLogger.h"
-#include "GprsConnectionInfo.h"
-#include "ActiveWrapper.h"
-
-// CONSTANTS
-LOCAL_D const TUint KDetailsArrayGranularityInternal = 11;
-LOCAL_D const TUint KDetailsArrayGranularityExternal = 10;
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CGprsConnectionInfo::NewL
-// ---------------------------------------------------------
-//
-CGprsConnectionInfo* CGprsConnectionInfo::NewL( TInt aConnectionId, 
-                              RConnectionMonitor* const aConnectionMonitor,
-                              TConnMonBearerType aConnectionBearerType,
-                              CActiveWrapper* aActiveWrapper )
-    {
-    CGprsConnectionInfo* self = new ( ELeave ) CGprsConnectionInfo( 
-                                                    aConnectionId, 
-                                                    aConnectionMonitor, 
-                                                    aConnectionBearerType,
-                                                    aActiveWrapper );
-    CleanupStack::PushL( self );
-    self->ConstructL(); // Have to call this ConstructL at first,
-    CleanupStack::Pop( self );
-    CMUILOGGER_WRITE( "NewL, CGprsConnectionInfo" );
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::~CGprsConnectionInfo
-// ---------------------------------------------------------
-//
-CGprsConnectionInfo::~CGprsConnectionInfo()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::CGprsConnectionInfo
-// ---------------------------------------------------------
-//
-CGprsConnectionInfo::CGprsConnectionInfo(  TInt aConnectionId, 
-                             RConnectionMonitor* const aConnectionMonitor,
-                             TConnMonBearerType aConnectionBearerType,
-                             CActiveWrapper* aActiveWrapper ) :
-    CConnectionInfoBase( aConnectionId, 
-                         aConnectionMonitor, 
-                         aConnectionBearerType,
-                         aActiveWrapper )
-        {
-        CMUILOGGER_WRITE( "CGprsConnectionInfo constuctor" );
-        }
-
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::ConstructL
-// ---------------------------------------------------------
-//
-void CGprsConnectionInfo::ConstructL()
-    {
-    CMUILOGGER_ENTERFN( "CGprsConnectionInfo::ConstructL() start" );
-    
-    iActiveWrapper->StartGetStringAttribute( iConnectionId,
-                                             iConnectionMonitor,
-                                             KAccessPointName,
-                                             iApName );
-#ifdef  __WINS__
-    iApName = _L( "LAN" );
-#else
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "CGprsConnectionInfo::ConstructL status: %d", err );
-    if ( err != KErrNone )
-        {
-        User::Leave( err );
-        }
-#endif
-    CMUILOGGER_WRITE_F( "iApName Connection name: %S", &iApName );
-    
-    CConnectionInfoBase::ConstructL(); // and base class ConstructL next.
-    CMUILOGGER_WRITE( "CGprsConnectionInfo::ConstructL() end" );
-    }
-    
-// ---------------------------------------------------------
-// CGprsConnectionInfo::DeepCopyL
-// ---------------------------------------------------------
-//        
-CConnectionInfoBase* CGprsConnectionInfo::DeepCopyL()
-	{
-	CGprsConnectionInfo* temp = new ( ELeave ) CGprsConnectionInfo(
-                                                    iConnectionId,
-                                                    iConnectionMonitor,
-                                                    iConnectionBearerType,
-                                                    iActiveWrapper );
-                              							
-	temp->iConnectionName = iConnectionName;
-	temp->iConnectionStatus = iConnectionStatus;
-	temp->iUploaded = iUploaded;
-	temp->iDownloaded = iDownloaded;
-	temp->iStartTime = iStartTime;
-	temp->iDuration = iDuration;
-	temp->iLastSpeedUpdate = iLastSpeedUpdate;
-	temp->iUpSpeed = iUpSpeed;
-	temp->iDownSpeed = iDownSpeed;
-	temp->iListBoxItemText = iListBoxItemText;
-	
-	temp->iApName = iApName;
-	
-	if ( iDetailsArray )
-		{
-		CleanupStack::PushL( temp );		
-		temp->ToArrayDetailsL();
-		CleanupStack::Pop( temp );			
-		}
-
-	return temp;	
-	}
-    
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::GetIconId
-// ---------------------------------------------------------
-//
-TUint CGprsConnectionInfo::GetIconId() const
-    {
-    TUint iconId = EGprs;
-    if ( iConnectionStatus == EConnectionSuspended )
-	    {
-	    iconId = ESuspended;
-	    }
-    return iconId;
-    }
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::RefreshDetailsL
-// ---------------------------------------------------------
-//
-void CGprsConnectionInfo::RefreshDetailsL()
-    {
-    CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsL start" );
-
-    iActiveWrapper->StartGetStringAttribute( iConnectionId,
-                                             iConnectionMonitor,
-                                             KAccessPointName,
-                                             iApName );
-#ifdef  __WINS__
-    iActiveWrapper->Cancel();
-    iApName = _L( "LAN" );
-#else
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "CGprsConnectionInfo::RefreshDetailsL status: %d",
-                        err );
-    if ( err != KErrNone )
-        {
-        User::Leave( err );
-        }
-#endif
-    CMUILOGGER_WRITE_F( "iApName Connection name: %S", &iApName );
-          
-    RefreshTransferSpeedsL();
-    RefreshDuration();
-    CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsL end" );
-    }
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::ToStringApNameLC
-// ---------------------------------------------------------
-//
-HBufC* CGprsConnectionInfo::ToStringApNameLC() const
-    {
-    HBufC* apName = iApName.AllocLC();
-    return apName;    
-    }
-
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::RefreshConnectionListBoxItemTextL
-// ---------------------------------------------------------
-//
-void CGprsConnectionInfo::RefreshConnectionListBoxItemTextL()
-    {
-    CMUILOGGER_WRITE( 
-        "CGprsConnectionInfo::RefreshConnectionListBoxItemTextL start" );
-
-    TUint  iconId;
-    HBufC* secondRow = NULL;
-    
-    iconId = GetIconId();
-
-    if ( iConnectionStatus == EConnectionCreated )
-        {
-        CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(2);
-        CleanupStack::PushL( array );
-      
-        HBufC* stringReceivedData = ToStringReceivedDataLC( ETrue );
-        HBufC* stringSentData = ToStringSentDataLC( ETrue );
-
-        StringMarkerRemoval( stringReceivedData );
-        StringMarkerRemoval( stringSentData );
-        
-        array->AppendL( *stringReceivedData );
-        array->AppendL( *stringSentData );
-
-        secondRow = StringLoader::LoadL( R_QTN_CMON_UL_DL_DATA_AMOUNTS, 
-                                         *array );
-
-        CleanupStack::PopAndDestroy( stringSentData );
-        CleanupStack::PopAndDestroy( stringReceivedData );
-        CleanupStack::PopAndDestroy( array );
-        }
-    else // if connection has not created yet gives back the status of its.
-        {
-        secondRow = ToStringStatusLC( EFalse );
-        CleanupStack::Pop( secondRow ); 
-        }
-
-    iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, 
-                             &iConnectionName, secondRow );
-    delete secondRow;
-    CMUILOGGER_WRITE( 
-        "CGprsConnectionInfo::RefreshConnectionListBoxItemTextL end" );
-    }
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::RefreshDetailsArrayL
-// ---------------------------------------------------------
-//
-void CGprsConnectionInfo::RefreshDetailsArrayL()
-    {
-    CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsArrayL start" );
-    if ( iDetailsArray )
-        {
-        TBool internal = iConnectionBearerType < EBearerExternalCSD ;   
-        HBufC* temp = NULL;
-
-        temp = ToStringStatusLC();
-        ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS,
-                                              temp, 2 );
-
-        ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                              ToStringTotalTransmittedDataLC(),
-                                              3 );
-        ToDetailsListBoxItemTextWithReplaceL
-            (
-            R_QTN_CMON_HEADING_DATA_RECEIVED,
-            ToStringReceivedDataLC(),
-            4
-            );                                              
-
-        ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT,
-                                              ToStringSentDataLC(), 5 );
-    
-        ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION,
-                                              ToStringDurationLC(), 6 );
-        
-        ToDetailsListBoxItemTextWithReplaceL
-            (
-            R_QTN_CMON_HEADING_SPEED,
-            ToStringTransferSpeedDownLC(),
-            7
-            );
-
-        ToDetailsListBoxItemTextWithReplaceL
-            (
-            0, 
-            ToStringTransferSpeedUpLC(),
-            8
-            );
-    
-        CleanupStack::PopAndDestroy( 7, temp );   // ToString...LC()
-    
-        if ( internal )
-            {
-            TInt sharing = RefreshAppNamesL();
-                
-            if ( sharing >= 1 )
-                {
-                if ( iDetailsArray->Count() > 10 )
-                    {                
-                    iDetailsArray->Delete( 10, 
-                                           iDetailsArray->Count() - 10 );
-                    iDetailsArray->Compress();
-                    }
-
-                for ( TInt i = 0; i < sharing; i++ )
-                    {
-                    if ( i == 0 )
-                        {
-                        ToDetailsListBoxItemTextWithAppendL( 
-                                        R_QTN_CMON_HEADING_SHARING_INFO,
-                                        ToStringAppNameLC( i ) );
-                        }
-                    else
-                        {
-                        ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                    ToStringAppNameLC( i ) );
-                        }
-                    }
-                CleanupStack::PopAndDestroy( sharing ); 
-                                                    // ToStringAppNameLC()
-                }
-            else
-                {
-                if ( iDetailsArray->Count() > 10 )
-                    {
-                    iDetailsArray->Delete( 10, iDetailsArray->Count() - 10 );
-                    iDetailsArray->Compress();
-                    }
-                }
-            }
-        }
-    CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsArrayL end" );    
-    }
-
-
-// ---------------------------------------------------------
-// CGprsConnectionInfo::ToArrayDetailsL
-// ---------------------------------------------------------
-//
-void CGprsConnectionInfo::ToArrayDetailsL()
-    {
-    CMUILOGGER_ENTERFN("CGprsConnectionInfo::ToArrayDetailsL");
-    TBool internal = iConnectionBearerType < EBearerExternalCSD ;
-    TUint granularity = KDetailsArrayGranularityExternal;
-    HBufC* temp = NULL;
-
-
-    if ( internal )
-        {
-        granularity = KDetailsArrayGranularityInternal;
-        }
-    delete iDetailsArray;
-    iDetailsArray = NULL;
-    iDetailsArray = new ( ELeave ) CDesCArrayFlat( granularity );
-  
-    temp = iConnectionName.AllocLC();
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CONN_NAME,
-                                         temp );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER,
-                                         ToStringBearerLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS,
-                                         ToStringStatusLC() );
-    
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                         ToStringTotalTransmittedDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                         ToStringReceivedDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT,
-                                         ToStringSentDataLC() );
-    
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION,
-                                         ToStringDurationLC() );
-        
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED,
-                                         ToStringTransferSpeedDownLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( 0, 
-                                         ToStringTransferSpeedUpLC() );
-    
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_GPRS_APN,
-                                         ToStringApNameLC() );
-    CleanupStack::PopAndDestroy( 10, temp );   // ToString...LC()
-    
-    if ( internal )
-        {
-        TInt sharing = RefreshAppNamesL();
-
-        if ( sharing >= 1 )
-            {
-            for ( TInt i = 0; i < sharing; i++ )
-                {
-                if ( i == 0 )
-                    {
-                    ToDetailsListBoxItemTextWithAppendL( 
-                                    R_QTN_CMON_HEADING_SHARING_INFO,
-                                    ToStringAppNameLC( i ) );
-                    }
-                else
-                    {
-                    ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                ToStringAppNameLC( i ) );
-                    }
-                }
-            CleanupStack::PopAndDestroy( sharing ); 
-                                                    // ToStringAppNameLC()
-            }
-        }
-    CMUILOGGER_LEAVEFN("CGprsConnectionInfo::ToArrayDetailsL");
-    }
-
-
-// End of File
--- a/connectionmonitoring/connectionmonitorui/src/WlanConnectionInfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,851 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Represents a WLAN connection
-*     
-*
-*/
-
-
-// INCLUDE FILES
-#include <ConnectionMonitorUi.rsg>
-#include <ConnectionMonitorUi.mbg>
-
-#include "ConnectionArray.h"
-#include "WlanConnectionInfo.h"
-#include "EasyWLANConnectionInfo.h"
-#include "ActiveWrapper.h"
-
-#include <StringLoader.h>
-
-#include "ConnectionMonitorUiLogger.h"
-
-// CONSTANTS
-
-/**
-* Count of details of WLAN connection
-*/
-LOCAL_D const TUint KDetailsArrayMaxGranularityCCX = 15;
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CWlanConnectionInfo::NewL
-// ---------------------------------------------------------
-//
-CWlanConnectionInfo* CWlanConnectionInfo::NewL( TInt aConnectionId, 
-                                RConnectionMonitor* const aConnectionMonitor,
-                                TConnMonBearerType aConnectionBearerType,
-                                const HBufC* aEasyWlanIAPName,
-                                CActiveWrapper* aActiveWrapper )
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo* CWlanConnectionInfo::NewL" ); 
-       
-    CWlanConnectionInfo* self = new ( ELeave ) CWlanConnectionInfo( 
-                                                      aConnectionId, 
-                                                      aConnectionMonitor, 
-                                                      aConnectionBearerType,
-                                                      aActiveWrapper );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    
-    if ( aEasyWlanIAPName )
-        {
-        if ( self->iConnectionName.Compare( *aEasyWlanIAPName ) )
-            {
-            CleanupStack::Pop( self );        
-            }
-        else
-            {
-            CEasyWlanConnectionInfo* temp = CEasyWlanConnectionInfo::NewL( 
-                                                      aConnectionId, 
-                                                      aConnectionMonitor, 
-                                                      aConnectionBearerType,
-                                                      aActiveWrapper );
-            CleanupStack::PopAndDestroy( self );
-            self = temp;
-            }        
-        }
-    else
-        {
-        CleanupStack::Pop( self );                            
-        }
- 
-    
-    
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo* CWlanConnectionInfo::NewL" );
-        
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::CWlanConnectionInfo
-// ---------------------------------------------------------
-//
-CWlanConnectionInfo::CWlanConnectionInfo( TInt aConnectionId, 
-                                RConnectionMonitor* const aConnectionMonitor,
-                                TConnMonBearerType aConnectionBearerType,
-                                CActiveWrapper* aActiveWrapper ) 
-    : CConnectionInfoBase( aConnectionId, 
-                           aConnectionMonitor, 
-                           aConnectionBearerType,
-                           aActiveWrapper ), iEasyWlan( EFalse )
-    {
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ConstructL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::ConstructL()
-    {  
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::ConstructL()" ); 
-     
-    RefreshNetworkNameL();
-    RefreshSignalStrength();
-    RefreshSecurityMode();
-    RefreshNetworkMode();        
-    RefreshTxPowerL();        
-    
-    CConnectionInfoBase::ConstructL(); // and base class ConstructL next.
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::ConstructL()" );    
-    }
-
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::~CWlanConnectionInfo
-// ---------------------------------------------------------
-//
-CWlanConnectionInfo::~CWlanConnectionInfo()
-    {
-    }
-    
-// ---------------------------------------------------------
-// CWlanConnectionInfo::DeepCopyL
-// ---------------------------------------------------------
-//        
-CConnectionInfoBase* CWlanConnectionInfo::DeepCopyL()
-	{
-	CWlanConnectionInfo* temp = new ( ELeave ) CWlanConnectionInfo(
-                                                    iConnectionId,
-                                                    iConnectionMonitor,
-                                                    iConnectionBearerType,
-                                                    iActiveWrapper );
-                              							
-	temp->iConnectionName = iConnectionName;
-	temp->iConnectionStatus = iConnectionStatus;
-	temp->iUploaded = iUploaded;
-	temp->iDownloaded = iDownloaded;
-	temp->iStartTime = iStartTime;
-	temp->iDuration = iDuration;
-	temp->iLastSpeedUpdate = iLastSpeedUpdate;
-	temp->iUpSpeed = iUpSpeed;
-	temp->iDownSpeed = iDownSpeed;
-	temp->iListBoxItemText = iListBoxItemText;
-	
-	temp->iWlanNetworkName = iWlanNetworkName;
-	temp->iSignalStrength = iSignalStrength;
-	temp->iNetworkMode = iNetworkMode;
-	temp->iSecurityMode = iSecurityMode;
-	temp->iTxPower = iTxPower;
-	
-	if ( iDetailsArray )
-		{
-		CleanupStack::PushL( temp );		
-		temp->ToArrayDetailsL();
-		CleanupStack::Pop( temp );			
-		}
-		
-	return temp;	
-	}    
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetIconId
-// ---------------------------------------------------------
-//
-TUint CWlanConnectionInfo::GetIconId() const
-    {
-    CMUILOGGER_ENTERFN( "TUint CWlanConnectionInfo::GetIconId() const" ); 
-    
-    TUint iconId = EWlan;    
-    
-    CMUILOGGER_LEAVEFN( "TUint CWlanConnectionInfo::GetIconId() const" );
-    
-    return iconId;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::IsEasyWLAN
-// ---------------------------------------------------------
-//
-TBool CWlanConnectionInfo::IsEasyWLAN() const
-    {
-    return iEasyWlan;    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetWlanNetworkNameLC
-// ---------------------------------------------------------
-//
-HBufC* CWlanConnectionInfo::GetWlanNetworkNameLC() const
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo::GetWlanNetworkNameLC()" ); 
-    
-    HBufC* name = iWlanNetworkName.AllocLC();
-    
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::GetWlanNetworkNameLC()" );
-    
-    return name;    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetWlanSignalStrength
-// ---------------------------------------------------------
-//
-TWlanSignalStrength CWlanConnectionInfo::GetWlanSignalStrength()  const
-    {
-    return iSignalStrength;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetWlanNetworkMode
-// ---------------------------------------------------------
-//
-TWlanNetworkMode CWlanConnectionInfo::GetWlanNetworkMode()  const
-    {
-    return iNetworkMode;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetWlanSecurityMode
-// ---------------------------------------------------------
-//
-TWlanSecurityMode CWlanConnectionInfo::GetWlanSecurityMode()  const
-    {
-    return iSecurityMode;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::GetWlanTxPower
-// ---------------------------------------------------------
-//
-TUint CWlanConnectionInfo::GetWlanTxPower() const
-    {
-    return iTxPower;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshDetailsL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshDetailsL()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshDetailsL()" ); 
-
-    if ( IsAlive() )
-        {
-        RefreshNetworkNameL();
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshNetworkMode();
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshSecurityMode();
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshTransferSpeedsL();
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshDuration(); 
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshSignalStrength();
-        }
-    
-    if ( IsAlive() )
-        {
-        RefreshTxPowerL();
-        }
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshDetailsL()" );    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshNetworkNameL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshNetworkNameL()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshNetworkNameL()" ); 
-    
-    iActiveWrapper->StartGetStringAttribute( iConnectionId,
-                                             iConnectionMonitor,
-                                             KNetworkName,
-                                             iWlanNetworkName );
-    
-    CMUILOGGER_WRITE_F( "RefreshNetworkName status : %d", 
-                        iActiveWrapper->iStatus.Int() );
-
-    if ( iActiveWrapper->iStatus.Int() )
-        {
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            iConnectionStatus = EConnectionClosed;
-            }
-        HBufC* temp = StringLoader::LoadL( R_QTN_CMON_PARAMETER_UNAVAILABLE );
-        iWlanNetworkName = *temp;  
-        delete temp;
-        }
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshNetworkNameL()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshSignalStrength
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshSignalStrength()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshSignalStrength()" );
-    
-    iActiveWrapper->StartGetIntAttribute( iConnectionId,
-                                          iConnectionMonitor,
-                                          KSignalStrength,
-                                          ( TInt& )iSignalStrength );
-
-    CMUILOGGER_WRITE_F( "RefreshSignalStrengthL status : %d",
-                        iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "iSignalStrength : %d", ( TInt )iSignalStrength );
-
-    if ( iActiveWrapper->iStatus.Int() )
-        {
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            iConnectionStatus = EConnectionClosed;
-            }
-        iSignalStrength = EWlanSignalUnavailable;   
-        }
-            
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshSignalStrength()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshSecurityMode
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshSecurityMode()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshSecurityMode()" ); 
-    
-    iActiveWrapper->StartGetIntAttribute( iConnectionId,
-                                          iConnectionMonitor,
-                                          KSecurityMode,
-                                          ( TInt& )iSecurityMode );
-
-    CMUILOGGER_WRITE_F( "RefreshSecurityMode status: %d",
-                        iActiveWrapper->iStatus.Int() );
-    
-    if ( iActiveWrapper->iStatus.Int() )
-        {
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            iConnectionStatus = EConnectionClosed;
-            }
-        iSecurityMode = EWlanSecurityModeUnavailable;    
-        }
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshSecurityMode()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshNetworkMode
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshNetworkMode()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshNetworkMode()" ); 
-    
-    iActiveWrapper->StartGetIntAttribute( iConnectionId,
-                                          iConnectionMonitor,
-                                          KNetworkMode,
-                                          ( TInt& )iNetworkMode );
-
-    CMUILOGGER_WRITE_F( "RefreshNetworkMode status : %d",
-                        iActiveWrapper->iStatus.Int() );
-    
-    if ( iActiveWrapper->iStatus.Int() )
-        {
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            iConnectionStatus = EConnectionClosed;
-            }
-        iNetworkMode = EWlanNetworkModeUnavailable;   
-        }
-        
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshNetworkMode()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshTxPowerL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshTxPowerL()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshTxPowerL()" ); 
-    
-    iActiveWrapper->StartGetUintAttribute( iConnectionId,
-                                           iConnectionMonitor,
-                                           KTransmitPower,
-                                           iTxPower );
-
-    if ( iActiveWrapper->iStatus.Int() )
-        {
-        if ( KErrNotFound == iActiveWrapper->iStatus.Int() )
-            {
-            iConnectionStatus = EConnectionClosed;
-            }
-        iSignalStrength = EWlanSignalUnavailable;   
-        }
-            
-    CMUILOGGER_WRITE_F( "iTxPower : %d", iTxPower );
-    TInt err( iActiveWrapper->iStatus.Int() );
-    CMUILOGGER_WRITE_F( "RefreshTxPowerL status: %d", err );
-            
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshTxPowerL()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ToStringSignalStrengthLC
-// ---------------------------------------------------------
-//
-HBufC* CWlanConnectionInfo::ToStringSignalStrengthLC() const
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringSignalStrengthLC()" );
-    
-    HBufC* signalStrength = NULL;
-    TInt resourceId( 0 );
-        
-    if ( iSignalStrength == EWlanSignalUnavailable )
-        {
-        resourceId =  R_QTN_CMON_WLAN_SIGNAL_STRENGTH_NO_SIGNAL;   
-        signalStrength = StringLoader::LoadLC( resourceId );
-        }                    
-    else if ( iSignalStrength < EWlanSignalStrengthGood )
-        {
-        resourceId =  R_QTN_CMON_WLAN_SINGAL_STRENGTH_GOOD;
-        }
-    else if ( iSignalStrength > EWlanSignalStrengthLow )
-        {
-        resourceId =  R_QTN_CMON_WLAN_SINGAL_STRENGTH_LOW;
-        }
-    else 
-        {
-        resourceId = R_QTN_CMON_WLAN_SINGAL_STRENGTH_MEDIUM;
-        }
-        
-    TInt signalInPercent( 0 );
-    if ( iSignalStrength <= EWlanSignalStrengthMax )
-        {
-        signalInPercent = 100;
-        }
-    else if ( iSignalStrength >= EWlanSignalStrengthMin )
-        {
-        signalInPercent = 0;        
-        }
-    else
-        {
-        TInt diff = EWlanSignalStrengthMin - iSignalStrength;
-        signalInPercent = diff * 100 / KDiffOfWlanSignalStrength;        
-        }        
-    
-    if ( !signalStrength ) // there is connection to network
-        {
-        CMUILOGGER_WRITE_F( "signalInPercent : %d", signalInPercent );
-        
-        signalStrength = StringLoader::LoadLC( resourceId, 
-                                               signalInPercent );
-        }        
-            
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringSignalStrengthLC()" );
-            
-    return signalStrength;    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ToStringNetworkModeLC
-// ---------------------------------------------------------
-//
-HBufC* CWlanConnectionInfo::ToStringNetworkModeLC() const
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringNetworkModeLC()" ); 
-    
-    HBufC* networkMode = NULL;
-    TInt resourceId( 0 );
-
-    switch ( iNetworkMode )
-        {
-        case EWlanNetworkModeInfrastructure:
-        case EWlanNetworkModeSecInfrastructure:        
-            {
-            resourceId = R_QTN_CMON_WLAN_NEWTWORK_MODE_INFRA;    
-            break;
-            }
-        case EWlanNetworkModeAdHoc:
-            {
-            resourceId = R_QTN_CMON_WLAN_NEWTWORK_MODE_ADHOC;
-            break;
-            }            
-        case EWlanNetworkModeUnavailable:
-        default:
-            {
-            resourceId = R_QTN_CMON_PARAMETER_UNAVAILABLE;    
-            break;                
-            }
-        }
-    
-    networkMode = StringLoader::LoadLC( resourceId );        
-    
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringNetworkModeLC()" );
-        
-    return networkMode;
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ToStringSecurityModeLC
-// ---------------------------------------------------------
-//
-HBufC* CWlanConnectionInfo::ToStringSecurityModeLC() const
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringSecurityModeLC()" );
-    
-    HBufC* securityMode = NULL;
-    TInt resourceId( 0 );
-
-    switch ( iSecurityMode )
-        {
-        case EWlanSecurityModeOpenNetwork:
-            {
-            resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_OPEN;
-            break;
-            }
-        case EWlanSecurityModeWEP:
-            {
-            resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WEP;
-            break;
-            }
-        case EWlanSecurityMode8021x:
-            {
-            resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_802_1X;
-            break;
-            }
-        case EWlanSecurityModeWPA:
-            {
-            resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WPA;
-            break;
-            }
-        case EWlanSecurityWpaPsk:
-            {
-            resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WPA;
-            break;
-            }
-        case EWlanSecurityModeUnavailable:            
-        default:
-            {
-            resourceId = R_QTN_CMON_PARAMETER_UNAVAILABLE;    
-            break;
-            }
-        }
-    
-    securityMode = StringLoader::LoadLC( resourceId );    
-    
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringSecurityModeLC()" );
-            
-    return securityMode;    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ToStringTxPowerLC
-// ---------------------------------------------------------
-//
-HBufC* CWlanConnectionInfo::ToStringTxPowerLC() const
-    {
-    CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringTxPowerLC()" ); 
-    
-    HBufC* txPower = StringLoader::LoadLC( R_QTN_CMON_WLAN_TX_POWER_LEVEL,
-                                           iTxPower );
-    
-    CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringTxPowerLC()" );
-                                               
-    return txPower;    
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::ToArrayDetailsL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::ToArrayDetailsL()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::ToArrayDetailsL()" ); 
-    
-    HBufC* temp = NULL;
-    delete iDetailsArray;
-    iDetailsArray = NULL;
-    iDetailsArray = new ( ELeave ) CDesCArrayFlat
-                                    ( KDetailsArrayMaxGranularityCCX );
-    
-    temp = iConnectionName.AllocLC();
- 
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_CONN_NAME,
-        temp );    
-  
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_BEARER,
-        ToStringBearerLC()
-        );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_STATUS,
-        ToStringStatusLC()
-        );
-    
-    ToDetailsListBoxItemTextWithAppendL
-    (
-    R_QTN_CMON_HEADING_WLAN_NETWORK_NAME,
-    GetWlanNetworkNameLC()
-    );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH,
-        ToStringSignalStrengthLC()
-        );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_WLAN_NETWORK_MODE,
-        ToStringNetworkModeLC()
-        );
-
-    ToDetailsListBoxItemTextWithAppendL
-        (
-        R_QTN_CMON_HEADING_WLAN_SECURITY_MODE,
-        ToStringSecurityModeLC()
-        );
-        
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_TX_POWER,
-                                         ToStringTxPowerLC() );
-        
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                         ToStringTotalTransmittedDataLC() );
-                                         
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                         ToStringReceivedDataLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT,
-                                         ToStringSentDataLC() );
-    
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION,
-                                         ToStringDurationLC() );
-        
-    ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED,
-                                         ToStringTransferSpeedDownLC() );
-
-    ToDetailsListBoxItemTextWithAppendL( 0, 
-                                         ToStringTransferSpeedUpLC() );
-                
-                                         
-    CleanupStack::PopAndDestroy
-        (
-        KDetailsArrayMaxGranularityCCX - 1, 
-        temp );
-                                 
-    TInt sharing = RefreshAppNamesL();
-
-    if ( sharing >= 1 )
-        {
-        for ( TInt i = 0; i < sharing; i++ )
-            {
-            if ( i == 0 )
-                {
-                ToDetailsListBoxItemTextWithAppendL( 
-                                    R_QTN_CMON_HEADING_SHARING_INFO,
-                                    ToStringAppNameLC( i ) );
-                }
-            else
-                {
-                ToDetailsListBoxItemTextWithAppendL( 0, 
-                                                ToStringAppNameLC( i ) );
-                }
-            }
-        CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC()
-        }
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::ToArrayDetailsL()" );
-    }
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshDetailsArrayL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshDetailsArrayL()
-    {
-    CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshDetailsArrayL()" );
-
-    HBufC* temp = NULL;
-
-    temp = ToStringStatusLC();
-
-    ToDetailsListBoxItemTextWithReplaceL
-        (
-        R_QTN_CMON_HEADING_STATUS,
-        temp,
-        2
-        );
-
-    ToDetailsListBoxItemTextWithReplaceL
-        (
-        R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH,
-        ToStringSignalStrengthLC(),
-        4
-        );
-                                          
-    ToDetailsListBoxItemTextWithReplaceL
-        (
-        R_QTN_CMON_HEADING_WLAN_TX_POWER,
-        ToStringTxPowerLC(),
-        7
-        );
-        
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL,
-                                          ToStringTotalTransmittedDataLC(),
-                                          8 );
-        
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_RECEIVED,
-                                          ToStringReceivedDataLC(), 
-                                          9 );
-
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT,
-                                          ToStringSentDataLC(), 
-                                          10 );
-    
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION,
-                                          ToStringDurationLC(), 
-                                          11 );
-        
-    ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_SPEED,
-                                          ToStringTransferSpeedDownLC(), 
-                                          12 );
-
-    ToDetailsListBoxItemTextWithReplaceL( 0, 
-                                          ToStringTransferSpeedUpLC(), 
-                                          13 );
-                                          
-    CleanupStack::PopAndDestroy( 9, temp );
-    
-
-    TInt count = iDetailsArray->Count();
-    TInt realElementsMaxCount = KDetailsArrayMaxGranularityCCX;
-    
-    CMUILOGGER_WRITE_F( "count : %d", count );
-    CMUILOGGER_WRITE_F( "realElementsMaxCount : %d", realElementsMaxCount );
-    
-    TInt sharing = RefreshAppNamesL();
-
-    if ( sharing >= 1 )
-        {
-        if ( count >= realElementsMaxCount ) // 15
-            {  
-            iDetailsArray->Delete( realElementsMaxCount - 1,
-                                   iDetailsArray->Count() - 14 );
-            iDetailsArray->Compress(); 
-            }
-        
-        for ( TInt i = 0; i < sharing; i++ )
-            {
-            if ( i == 0 )
-                {
-                ToDetailsListBoxItemTextWithAppendL( 
-                                        R_QTN_CMON_HEADING_SHARING_INFO,
-                                        ToStringAppNameLC( i ) );
-                }
-            else
-                {
-                ToDetailsListBoxItemTextWithAppendL( 0, 
-                                        ToStringAppNameLC( i ) );
-                }
-            }
-        CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC()
-        }
-    else
-        {
-        if ( count >= realElementsMaxCount )
-            {
-            iDetailsArray->Delete( realElementsMaxCount - 1,
-                                   iDetailsArray->Count() - 14 );
-            iDetailsArray->Compress();              
-            }
-        }               
-    
-    CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshDetailsArrayL()" );
-    }
-
-
-// ---------------------------------------------------------
-// CWlanConnectionInfo::RefreshConnectionListBoxItemTextL
-// ---------------------------------------------------------
-//
-void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL()
-    {
-    CMUILOGGER_ENTERFN( 
-    "void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" ); 
-    
-    TUint  iconId;
-    HBufC* secondRow = NULL;
-    
-    iconId = GetIconId();
-
-    if ( iConnectionStatus == EConnectionCreated )
-        {
-        secondRow =  ToStringDurationLC();          
-        }
-    else // if connection has not created yet gives back the status of itself.
-        {
-        secondRow = ToStringStatusLC( EFalse );
-        }
-
-    iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, 
-                             &iConnectionName, secondRow );
-    CleanupStack::PopAndDestroy( secondRow );
-    
-    CMUILOGGER_LEAVEFN( 
-    "void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" );    
-    }
-
-
-
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/connectionview.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Connection view build file
+#
+#
+TEMPLATE = app
+TARGET = connview
+
+CONFIG += hb no_icon mobility
+MOBILITY+=bearer
+
+DEPENDPATH += . inc src
+INCLUDEPATH += .
+
+# Input
+HEADERS += inc/connectionview.h \
+           traces/OstTraceDefinitions.h \
+           inc/scrollareawidget.h
+SOURCES += src/connectionview.cpp \
+           src/main.cpp \
+           src/scrollareawidget.cpp
+
+TRANSLATIONS = connectionview.ts
+
+RESOURCES = res/connectionview.qrc
+
+SYMBIAN_PLATFORMS = WINSCW ARMV5
+
+symbian {
+    TARGET.CAPABILITY = NetworkServices NetworkControl
+    TARGET.UID3 = 0x2002C36A
+    BLD_INF_RULES.prj_exports += "rom/connectionview.iby CORE_MW_LAYER_IBY_EXPORT_PATH(connectionview.iby)"
+	BLD_INF_RULES.prj_exports += "rom/connectionview_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(connectionview_resources.iby)"
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/inc/connectionview.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __CONNECTIONVIEW_H__
+#define __CONNECTIONVIEW_H__
+
+#include <QObject>
+#include <QSharedPointer>
+#include <HbMainWindow>
+#include <HbDialog>
+#include <QStringList>
+#include <HbWidget>
+#include <QtNetwork>
+#include <QGraphicsLinearLayout>
+#include <HbGroupBox>
+#include <HbScrollArea>
+#include <HbToolBar>
+#include <HbLabel>
+#include <qnetworksession.h>
+#include <qnetworkconfigmanager.h>
+
+// Forward declarations
+class HbTranslator;
+
+
+QTM_USE_NAMESPACE
+
+class QSignalMapper;
+
+const QString bearer2G = "2G";
+const QString bearerWCDMA = "WCDMA";
+const QString bearerHSPA = "HSPA";
+const QString bearerCDMA2000 = "CDMA2000";
+const int timerValue = 3000;
+
+class ConnectionView: public HbMainWindow
+    {
+    Q_OBJECT
+    
+    public:
+        /* Constructor */
+        ConnectionView();
+        
+        /* Destructor */
+        ~ConnectionView();
+        
+        /**
+         * This is the re-implemented timerEvent function used to trigger
+         * closing of the application. It is received every time the set timer expires.
+         */
+        void timerEvent(QTimerEvent * /*event*/);
+        
+    private slots: 
+        /* Handles the changes in the cellular data connections */
+        void handleConfigurationChanged(const QNetworkConfiguration& config);
+       
+        /* Disonnects the iap given as a parameter */
+        void disconnectSelectedIap(int iapId);
+       
+        /* Disconnects all the cellular iaps */
+        void disconnectAll();
+       
+        /* 
+         * Does the actual stopping of the sessions, once the session's 
+         * opened-signal is received 
+         */
+        void stopSessions();
+        
+        /* Deletes the sender when the session opening fails */
+        void errorSessions(QNetworkSession::SessionError);
+
+    private:     
+        
+        /* Constructs the view */
+        void createView();
+        
+        /* 
+         * Creates group boxes into the view for all the active cellular 
+         * connections.
+         */
+        void createGroupBoxesForConnections();
+        
+        /*
+         * Updates the list of active cellular connections into the
+         * list received as a reference parameter.
+         */
+        void getActiveCellularConnections(QList<QNetworkConfiguration> &activeConfigurations);
+        
+        /*
+         * Creates a single groupbox for the iap given as a paremeters. Attaches the
+         * group boxes disconnect button to the disconnectSelectedIap slot
+         */
+        void addGroupBox(int iapId, QString iapName);
+        
+        /* Clears the groupboxes from the view */
+        void clearGroupBoxView();
+
+    private:
+        /* Pointer to network configuration manager */
+        QNetworkConfigurationManager* mNetConfigurationManager;
+        
+        /* Pointer to the main view of the window */
+        HbView *mMainView;
+        
+        /* Pointer to the secondary view of the window */
+        HbView *mNoConnView;
+        
+        /* The main vertical layout which contains the group box container */
+        QGraphicsLinearLayout* mMainLayout;
+        
+        /* The scroll area of the view */
+        HbScrollArea *mScrollArea;
+        
+        /* The layout into which the groupboxes are inserted */
+        QGraphicsLinearLayout *mBoxLayout;
+        
+        /* 
+         * Pointer to the signalmapper used in mapping the disconnect buttons clicks
+         * to the disconnectSelectedIap function
+         */
+        QSignalMapper *mSignalMapper;
+        
+        /* The amount of active cellular data connections */
+        int mConnectionCount;
+        
+        /* The toolbar on the view */
+        HbToolBar *mToolBar;
+        
+        /* The id of the timer used to close the application */
+        int mClosingTimer;
+        
+        /* Translator for the localisation Text Id's */
+        QSharedPointer<HbTranslator> mTranslator;
+        
+        /* definition for unit test purposes */
+        friend class TestConnectionView;
+    
+    };
+
+
+#endif // __CONNECTIONVIEW_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/inc/scrollareawidget.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef SCROLLAREAWIDGET_H_
+#define SCROLLAREAWIDGET_H_
+
+#include <QObject>
+#include <QGraphicsWidget>
+#include <qnetworkconfigmanager.h>
+
+QTM_USE_NAMESPACE
+
+class ScrollAreaWidget: public QGraphicsWidget
+{
+    Q_OBJECT
+    
+public:
+    /* Constructor */
+    ScrollAreaWidget(QGraphicsItem *parent = 0);
+    
+    /* Destructor */
+    ~ScrollAreaWidget();
+    
+    /* 
+     * Function to filter all the resizing events to get the widget to
+     * resize itself when switched to landscape and back
+     */
+    bool eventFilter(QObject *object, QEvent *event);
+};
+
+#endif /* SCROLLAREAWIDGET_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/res/connectionview.css	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+HbLabel#mInfoLabel::text
+{
+    font-variant: secondary;
+    text-height: var(hb-param-text-height-secondary);
+    text-align: center;
+}
+
+HbPushButton#disconnectButton
+{
+    max-width: expr(var(hb-param-screen-short-edge)-var(hb-param-margin-gene-left)-var(hb-param-margin-gene-right));
+}
+
+HbLabel#mConnectionLabel::text
+{
+    font-variant: secondary;
+    text-height: var(hb-param-text-height-tiny);
+    text-line-count-max: 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/res/connectionview.qrc	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+    <qresource prefix="/layout" >
+        <file>connectionview.css</file>
+    </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/rom/connectionview.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CONNECTIONVIEW_IBY
+#define CONNECTIONVIEW_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR\BUILD_DIR\connview.exe PROGRAMS_DIR\connview.exe
+data=\epoc32\data\z\private\10003a3f\import\Apps\connview_reg.rsc	\private\10003a3f\import\apps\connview_reg.rsc
+data=\epoc32\data\z\resource\apps\connview.rsc \resource\apps\connview.rsc
+
+#endif // CONNECTIONVIEW_IBY
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/rom/connectionview_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef CONNECTIONVIEW_RESOURCES_IBY
+#define CONNECTIONVIEW_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/connectionview.qm QT_TRANSLATIONS_DIR/connectionview.qm 
+
+#endif // CONNECTIONVIEW_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/src/connectionview.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,501 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <HbTranslator>
+#include <QLocale>
+#include <QList>
+#include <HbLabel>
+#include <HbPushButton>
+#include <HbMainWindow>
+#include <HbGroupBox>
+#include <HbListWidget>
+#include <QHBoxLayout>
+#include <HbScrollArea>
+#include <HbView>
+#include <HbIcon>
+#include <HbAction>
+#include <HbToolBar>
+#include <HbStyleLoader>
+#include <QGraphicsLinearLayout>
+#include <QtCore/QSignalMapper>
+#include <QtNetwork>
+#include "connectionview.h"
+#include "scrollareawidget.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "connectionviewTraces.h"
+#endif
+
+
+QTM_USE_NAMESPACE
+
+const qreal typeLabelWidth = 18.0;
+const QString iapIdentifierPrefix = "I_";
+
+ConnectionView::ConnectionView():
+    mNetConfigurationManager(new QNetworkConfigurationManager(this)),
+    mSignalMapper(new QSignalMapper(this)),
+    mConnectionCount(0),
+    mClosingTimer(0)
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_CONNECTIONVIEW_ENTRY );
+    // Install localization
+    mTranslator = QSharedPointer<HbTranslator>(new HbTranslator("connectionview"));
+   
+    // Register custom layout location
+    bool registerStatus = HbStyleLoader::registerFilePath(":/layout/");
+    Q_ASSERT(registerStatus);
+    
+    // Map the configurationChanged signal to a slot in order to get
+    // information about the changes in the connections
+    bool connectStatus = connect(
+            mNetConfigurationManager,
+            SIGNAL(configurationChanged(const QNetworkConfiguration&)),
+            this,
+            SLOT(handleConfigurationChanged(const QNetworkConfiguration&)));
+    
+    // Create the view and show it
+    createView();
+    OstTraceFunctionExit0( CONNECTIONVIEW_CONNECTIONVIEW_EXIT );
+}
+
+
+ConnectionView::~ConnectionView()
+{
+    OstTraceFunctionEntry0( DUP1_CONNECTIONVIEW_CONNECTIONVIEW_ENTRY );
+    // other widgets are childs of this widget, so they will be
+    // deleted along with mMainView. 
+    delete mMainView;
+    delete mNoConnView;
+    OstTraceFunctionExit0( DUP1_CONNECTIONVIEW_CONNECTIONVIEW_EXIT );
+}
+
+/* !
+     Quit the application when the timer is triggered
+*/
+void ConnectionView::timerEvent(QTimerEvent * /*event*/)
+{
+    killTimer(mClosingTimer);
+    mClosingTimer = 0;
+    qApp->quit();
+}
+
+
+/*!
+    Builds the actual view for the main window
+*/ 
+void ConnectionView::createView()
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_CREATEVIEW_ENTRY );
+    
+    // Create the secondary view for displaying the "No active connections"-text
+    mNoConnView = new HbView();
+    mNoConnView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    addView(mNoConnView);
+    QGraphicsLinearLayout *noConnViewLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    noConnViewLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+    HbLabel *infoLabel = new HbLabel;
+    infoLabel->setObjectName("mInfoLabel");
+    infoLabel->setPlainText(hbTrId("txt_occ_info_no_active_connections"));
+    infoLabel->setAlignment(Qt::AlignCenter);
+    noConnViewLayout->addItem(infoLabel);
+    noConnViewLayout->setAlignment(infoLabel, Qt::AlignCenter);
+    mNoConnView->setLayout(noConnViewLayout);
+   
+    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mMainLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mScrollArea = new HbScrollArea();
+    mScrollArea->setScrollDirections(Qt::Vertical);
+    mScrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mMainLayout->addItem(mScrollArea);
+
+    // Create the mainView and the layout for the window
+    mMainView = new HbView();
+    addView(mMainView);
+    ScrollAreaWidget *scrollContent = new ScrollAreaWidget();
+    scrollContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mScrollArea->installEventFilter(scrollContent);
+    
+    mBoxLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mBoxLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    scrollContent->setLayout(mBoxLayout);
+    mMainView->setLayout(mMainLayout);
+    mScrollArea->setContentWidget(scrollContent);
+    
+    // Create the toolbar and the disconnection action
+    mToolBar = new HbToolBar();    
+    HbIcon icon("qtg_mono_disconnect");
+    HbAction *disconnectAction = new HbAction(mToolBar);
+    disconnectAction->setIcon(icon);
+    mToolBar->addAction(disconnectAction);
+    mMainView->setToolBar(mToolBar);
+    bool connectStatus = connect(
+            disconnectAction,
+            SIGNAL(triggered(bool)),
+            this,
+            SLOT(disconnectAll()));
+    
+    // Create the actual groupboxes for all the active connections
+    createGroupBoxesForConnections();  
+    show();
+    
+    OstTraceFunctionExit0( CONNECTIONVIEW_CREATEVIEW_EXIT );
+}
+
+
+/*!
+    Loops all the active cellular connections and creates groupboxes for those
+*/ 
+void ConnectionView::createGroupBoxesForConnections()
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_CREATEGROUPBOXESFORCONNECTIONS_ENTRY );
+    
+    // disconnect all the old connections and then make the new connections
+    mSignalMapper->disconnect();
+    
+    //Let's find active connections if any
+    QList<QNetworkConfiguration> activeConfigurations;
+    getActiveCellularConnections(activeConfigurations);
+    
+    // If there are no active connections, then the dialog is not shown to the user
+    mConnectionCount = activeConfigurations.count();
+    
+    // Toolbar is shown only if there are more than one connections active
+    if (mConnectionCount > 1) {
+        mMainView->setItemVisible(Hb::ToolBarItem, true);
+    } else {
+        mMainView->setItemVisible(Hb::ToolBarItem, false);
+    }
+    
+    // if there are connections, the main view with the connections is shown
+    if (mConnectionCount > 0) { 
+        setCurrentView(mMainView);
+
+        for (int i=0; i<mConnectionCount; i++) {
+            // Get the iap id and the iap name for the UI construction
+            bool ok = true;
+            int iapId = activeConfigurations[i].identifier().remove(iapIdentifierPrefix).toInt(&ok);
+            QString iapName = activeConfigurations[i].name();
+
+            if (ok) {
+                addGroupBox(iapId, iapName);
+            }        
+        }
+        // This connection must be done only once, thus it's done here separately
+        bool connectStatus = connect(
+            mSignalMapper, 
+            SIGNAL(mapped(int)), 
+            this, 
+            SLOT(disconnectSelectedIap(int)));
+        
+        // there are no connections, show the view with the "no connections" label
+    } else {
+        setCurrentView(mNoConnView);
+        // start the timer to close the application after 3 seconds
+        if (mClosingTimer == 0) {
+            mClosingTimer = startTimer(timerValue);
+        }
+    }
+   
+   OstTraceFunctionExit0( CONNECTIONVIEW_CREATEGROUPBOXESFORCONNECTIONS_EXIT );
+}
+
+
+/*
+    Returns a list of all the available active cellular connections
+*/
+void ConnectionView::getActiveCellularConnections(QList<QNetworkConfiguration> &activeConfigurations)
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_GETACTIVECELLULARCONNECTIONS_ENTRY );
+    //Let's find active connections if any
+    activeConfigurations.clear();
+
+    QList<QNetworkConfiguration> configurations = 
+        mNetConfigurationManager->allConfigurations(QNetworkConfiguration::Active);
+
+    // Connection are open if they are in active state
+    for (int i=0; i<configurations.count(); i++) {  
+        if (configurations[i].type() == QNetworkConfiguration::InternetAccessPoint) {
+            QString bearerName = configurations[i].bearerName();
+            
+            // WLAN connections are filtered out
+            // TODO At some point QNetwork configuration will provide these constants
+            if (bearerName==bearer2G || bearerName==bearerWCDMA || 
+                bearerName==bearerHSPA || bearerName==bearerCDMA2000) {
+                activeConfigurations.append(configurations[i]);
+            }
+        }
+    }
+    OstTraceFunctionExit0( CONNECTIONVIEW_GETACTIVECELLULARCONNECTIONS_EXIT );
+}
+    
+
+/*!
+    Handles the changes in the configurations whose states change to 
+    active or discovered (meaning connected and disconnected)
+*/ 
+void ConnectionView::handleConfigurationChanged(const QNetworkConfiguration& config)
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_HANDLECONFIGURATIONCHANGED_ENTRY );
+    switch (config.state())
+    {
+        case QNetworkConfiguration::Undefined:
+            //Nothing done
+            break;
+        case QNetworkConfiguration::Defined:
+        case QNetworkConfiguration::Discovered:
+        case QNetworkConfiguration::Active:
+        {
+            // If the Configuration change is to Discovered or Active, it means
+            // that a connection was either opened or closed. Update the connections
+            // on the ui
+            QString bearerName = config.bearerName();
+        
+            // Update the view if there are changes in the cellular connections
+            // TODO At some point QNetwork configuration will provide these constants
+            if (bearerName==bearer2G || bearerName==bearerWCDMA || 
+                bearerName==bearerHSPA || bearerName==bearerCDMA2000) {     
+                // kill the application closing timer if it was started (there were no 
+                // active connections)
+                if (mClosingTimer != 0) {
+                    killTimer(mClosingTimer);
+                    mClosingTimer = 0;
+                }
+                clearGroupBoxView();
+                // redraw the boxes
+                createGroupBoxesForConnections();
+                update();
+            } 
+            break;
+        }
+    }    
+    OstTraceFunctionExit0( CONNECTIONVIEW_HANDLECONFIGURATIONCHANGED_EXIT );
+}
+
+
+/*!
+    Adds one groupbox into the boxlayout for the given iap
+*/ 
+void ConnectionView::addGroupBox(int iapId, QString iapName)
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_ADDGROUPBOX_ENTRY );
+    // Create the groupbox and its layouts
+    HbGroupBox *groupBox = new HbGroupBox();
+    groupBox->setObjectName("groupBox");
+    groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
+    groupBox->setHeading(hbTrId("txt_occ_subhead_connection_details"));
+    groupBox->setCollapsable(true);
+    
+    // Create the disconnection button
+    HbPushButton* button = new HbPushButton(
+            hbTrId("txt_occ_button_disconnect"), mMainView);
+    button->setObjectName("disconnectButton");
+    button->setSizePolicy(QSizePolicy::Preferred, 
+                          QSizePolicy::Preferred, 
+                          QSizePolicy::PushButton);
+    
+    // Create the horizontal layout for the labels
+    QGraphicsLinearLayout *labelLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    labelLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    HbLabel *typeLabel = new HbLabel(hbTrId("txt_occ_list_name"));
+
+    // get the pixel size matching the spesified 18 units using the HbDeviceProfile
+    // and set the width of the label
+    HbDeviceProfile profile = HbDeviceProfile::profile(mMainView);
+    typeLabel->setPreferredWidth(typeLabelWidth*profile.unitValue());
+    typeLabel->setObjectName("mConnectionLabel");
+    
+    HbLabel *nameLabel = new HbLabel(iapName);
+    nameLabel->setAlignment(Qt::AlignRight);
+    nameLabel->setObjectName("mConnectionLabel");
+    labelLayout->addItem(typeLabel);
+    labelLayout->addItem(nameLabel);
+   
+    HbWidget *labelWidget = new HbWidget();
+    labelWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    labelWidget->setLayout(labelLayout);
+    
+    // a layout cannot be added directly to a layout, we need to use this container widget 
+    HbWidget *boxWidget = new HbWidget();  
+    boxWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    QGraphicsLinearLayout *boxLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    boxLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    boxWidget->setLayout(boxLayout);
+
+    // Add the label layout and the button into the groupbox
+    boxLayout->addItem(labelWidget);
+    boxLayout->addItem(button);
+    boxLayout->setAlignment(button, Qt::AlignHCenter);
+    groupBox->setContentWidget(boxWidget);
+    groupBox->setCollapsed(true);
+    
+    // add the group box to the main layout
+    mBoxLayout->addItem(groupBox);
+    mBoxLayout->setAlignment(groupBox, Qt::AlignHCenter);
+        
+    // Expand the groupbox if connection count is 1 
+    if (mConnectionCount == 1) {
+        groupBox->setCollapsed(false);
+    }
+    
+    // Connect the button to the mapper
+    bool connectStatus = connect(
+        button, 
+        SIGNAL(clicked()), 
+        mSignalMapper, 
+        SLOT(map()));
+    mSignalMapper->setMapping(button, iapId);
+    OstTraceFunctionExit0( CONNECTIONVIEW_ADDGROUPBOX_EXIT );
+}
+
+
+/*!
+    Closes the connection to the given iap
+*/ 
+void ConnectionView::disconnectSelectedIap(int iapId)
+{   
+    OstTraceFunctionEntry0( CONNECTIONVIEW_DISCONNECTSELECTEDIAP_ENTRY );
+   
+    // Get all the active connections 
+    QList<QNetworkConfiguration> activeConfigurations;
+    getActiveCellularConnections(activeConfigurations);
+    int count = activeConfigurations.count();
+            
+    for (int i=0; i < count; i++) {
+        bool ok = true;
+        int loopedIapId = activeConfigurations[i].identifier().remove(iapIdentifierPrefix).toInt(&ok);
+        
+        // if the looped iap matches the iap, stop the connection
+        if (loopedIapId == iapId) {
+            
+            QNetworkSession *networkSession = new QNetworkSession(activeConfigurations[i], mMainView);
+
+            bool connectStatus = connect(
+                networkSession, 
+                SIGNAL(opened()), 
+                this, 
+                SLOT(stopSessions()));
+                      
+            // This connection is done basically for memory handling
+            // to be able to delete the session if one of the error signal is emitted
+            connect(
+                networkSession, 
+                SIGNAL(error(QNetworkSession::SessionError)), 
+                this, 
+                SLOT(errorSessions(QNetworkSession::SessionError)));
+            
+            // open the session only if the connection succeeded, otherwise it's no use
+            if (connectStatus) {
+                // session needs to be opened in order to stop all the sessions of this configurations
+                networkSession->open();
+            } else {
+                OstTrace1( CONNECTSTATUS, CONNECTIONVIEW_DISCONNECTSELECTEDIAP, "ConnectionView::disconnectSelectedIap failed;iapId=%d", iapId );
+            }
+   
+            // the searched iap was found, stop looping
+            break;
+        }
+    }
+    OstTraceFunctionExit0( CONNECTIONVIEW_DISCONNECTSELECTEDIAP_EXIT );
+}
+
+
+/*!
+    Closes all the connections to active iaps
+*/ 
+void ConnectionView::disconnectAll()
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_DISCONNECTALL_ENTRY );
+    
+    // Get all the active connections 
+    QList<QNetworkConfiguration> activeConfigurations;
+    getActiveCellularConnections(activeConfigurations);
+    int count = activeConfigurations.count();
+    
+    for (int i=0; i < count; i++) {
+        QNetworkSession *networkSession = new QNetworkSession(activeConfigurations[i], mMainView);
+        bool connectStatus = connect(
+            networkSession, 
+            SIGNAL(opened()), 
+            this, 
+            SLOT(stopSessions()));
+        // This connection is done basically for memory handling
+        // to be able to delete the session if one of the error signal is emitted
+        connect(
+            networkSession, 
+            SIGNAL(error(QNetworkSession::SessionError)), 
+            this, 
+            SLOT(errorSessions(QNetworkSession::SessionError)));
+        
+        // open the session only if the connection succeeded, otherwise it's no use
+        if (connectStatus) {
+            // session needs to be opened in order to stop all the sessions of this configurations
+            networkSession->open();
+        }
+    }
+    OstTraceFunctionExit0( CONNECTIONVIEW_DISCONNECTALL_EXIT );
+}
+
+
+void ConnectionView::stopSessions() 
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_STOPSESSIONS_ENTRY );
+
+    // get the sender-session and stop the sessions
+    QObject *senderObject = QObject::sender();
+    if (senderObject != NULL) {
+        QNetworkSession *session = qobject_cast<QNetworkSession *>(senderObject);
+        session->stop();
+        session->deleteLater();
+    }
+    OstTraceFunctionExit0( CONNECTIONVIEW_STOPSESSIONS_EXIT );
+}
+
+void ConnectionView::errorSessions(QNetworkSession::SessionError) 
+{
+    OstTraceFunctionEntry0( DUP2_CONNECTIONVIEW_ERRORSESSIONS_ENTRY );
+
+    // something went wrong in session opening
+    // get the sender-session and delete the sender
+    QObject *senderObject = QObject::sender();
+    if (senderObject != NULL) {
+        senderObject->deleteLater();
+    }
+    OstTraceFunctionExit0( DUP1_CONNECTIONVIEW_ERRORSESSIONS_EXIT );
+}
+
+/*!
+    Removes the items from the boxlayout in order to be costructed again.
+*/ 
+void ConnectionView::clearGroupBoxView()
+{
+    OstTraceFunctionEntry0( CONNECTIONVIEW_CLEARGROUPBOXVIEW_ENTRY );
+    // Loop all the groupbox items through and remove them from the view
+    int count = mBoxLayout->count();
+    for (int i = 0; i < count; i++ )  {
+        // store the pointer to the item to be able to delete it
+        QGraphicsLayoutItem *item = mBoxLayout->itemAt(0);
+        mBoxLayout->removeAt(0);
+        delete item;
+    }
+    OstTraceFunctionExit0( CONNECTIONVIEW_CLEARGROUPBOXVIEW_EXIT );
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/src/main.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <QApplication>
+#include "connectionview.h"
+
+int main(int argc, char *argv[])
+    {
+    QApplication app(argc, argv);
+    ConnectionView connDetails;
+    return app.exec();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/src/scrollareawidget.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <QGraphicsItem>
+#include <QEvent>
+#include <QGraphicsSceneResizeEvent>
+#include "scrollareawidget.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "scrollareawidgetTraces.h"
+#endif
+
+
+QTM_USE_NAMESPACE
+
+
+ScrollAreaWidget::ScrollAreaWidget(QGraphicsItem *parent):
+    QGraphicsWidget(parent)
+{
+    OstTraceFunctionEntry0( SCROLLAREAWIDGET_SCROLLAREAWIDGET_ENTRY ); 
+    OstTraceFunctionExit0( SCROLLAREAWIDGET_SCROLLAREAWIDGET_EXIT );
+}
+
+ScrollAreaWidget::~ScrollAreaWidget() 
+{
+    OstTraceFunctionEntry0( DUP1_SCROLLAREAWIDGET_SCROLLAREAWIDGET_ENTRY );
+    OstTraceFunctionExit0( DUP1_SCROLLAREAWIDGET_SCROLLAREAWIDGET_EXIT );
+}
+
+/*!
+    Filters the resizing events to get the widget resized when switching to 
+    landscape and back
+*/
+bool ScrollAreaWidget::eventFilter(QObject *object, QEvent *event)
+{
+    OstTraceFunctionEntry0( SCROLLAREAWIDGET_EVENTFILTER_ENTRY );
+    
+    if(event->type() == QEvent::GraphicsSceneResize){
+        resize(((QGraphicsSceneResizeEvent*)event)->newSize());
+        OstTraceFunctionExit0( SCROLLAREAWIDGET_EVENTFILTER_EXIT );
+        return true;
+    } else {
+        return QGraphicsWidget::eventFilter(object, event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/connectionview/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- a/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/BWINSCW/CONNMON_EKA2U.def	Tue Aug 31 15:35:44 2010 +0300
@@ -94,4 +94,7 @@
 	?ToBuf@CConnMonWlanProbeRawBuffer@@QBEPBVHBufC8@@XZ @ 93 NONAME ; class HBufC8 const * CConnMonWlanProbeRawBuffer::ToBuf(void) const
 	?Total@CConnMonWlanProbeRawBuffersPckg@@QBEIXZ @ 94 NONAME ; unsigned int CConnMonWlanProbeRawBuffersPckg::Total(void) const
 	?UnpackToL@CConnMonWlanProbeRawBuffersPckg@@QBEXAAV?$RPointerArray@VCConnMonWlanProbeRawBuffer@@@@@Z @ 95 NONAME ; void CConnMonWlanProbeRawBuffersPckg::UnpackToL(class RPointerArray<class CConnMonWlanProbeRawBuffer> &) const
+	?NewL@CConnMonWlanNetwork@@SAPAV1@ABV?$TBuf@$0CA@@@IIIIIABV?$TBuf8@$05@@ABVTDesC16@@@Z @ 96 NONAME ; class CConnMonWlanNetwork * CConnMonWlanNetwork::NewL(class TBuf<32> const &, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, class TBuf8<6> const &, class TDesC16 const &)
+	?SecurityModeV2@CConnMonWlanNetwork@@QAEIXZ @ 97 NONAME ; unsigned int CConnMonWlanNetwork::SecurityModeV2(void)
+	?IsProtectedSetupSupported@CConnMonWlanNetwork@@QAEHXZ @ 98 NONAME ; int CConnMonWlanNetwork::IsProtectedSetupSupported(void)
 
--- a/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/EABI/ConnMon_EKA2U.def	Tue Aug 31 15:35:44 2010 +0300
@@ -105,8 +105,8 @@
 	_ZTV18TConnMonVirtualIap @ 104 NONAME ; #<VT>#
 	_ZTV19ConnMonIdsArrayPckg @ 105 NONAME ; #<VT>#
 	_ZTV19TConnMonWLANNetwork @ 106 NONAME ; #<VT>#
-	_ZTV20CCDIAPMetadataRecord @ 107 NONAME ABSENT; #<VT>#
-	_ZTV21CCDSNAPMetadataRecord @ 108 NONAME  ABSENT ; #<VT>#
+	_ZTV20CCDIAPMetadataRecord @ 107 NONAME ABSENT ; #<VT>#
+	_ZTV21CCDSNAPMetadataRecord @ 108 NONAME ABSENT ; #<VT>#
 	_ZTV22CCDMIPServiceExtRecord @ 109 NONAME ABSENT ; #<VT>#
 	_ZTV25CConnMonCommsDataNotifier @ 110 NONAME ; #<VT>#
 	_ZTV27CConnMonAvailabilityManager @ 111 NONAME ; #<VT>#
@@ -137,25 +137,28 @@
 	_ZNK24CConnMonBearerInfoChange10BearerInfoEv @ 136 NONAME
 	_ZNK25CConnMonBearerGroupChange12BearerGroupsERjS0_ @ 137 NONAME
 	_ZNK25CConnMonBearerGroupChange8InternalEv @ 138 NONAME
-	_ZN26CConnMonWlanProbeRawBuffer4NewLEPK6HBufC8 @139
-	_ZN26CConnMonWlanProbeRawBuffer4NewLERS_ @140
-	_ZN26CConnMonWlanProbeRawBuffer4NewLEv @141
-	_ZN26CConnMonWlanProbeRawBuffer8FromPtrCERK6TPtrC8PS_ @142
-	_ZN26CConnMonWlanProbeRawBufferD0Ev @143
-	_ZN26CConnMonWlanProbeRawBufferD1Ev @144
-	_ZN26CConnMonWlanProbeRawBufferD2Ev @145
-	_ZN26CConnMonWlanProbeRawBufferaSERS_ @146
-	_ZN31CConnMonWlanProbeRawBuffersPckgC1Ej @147
-	_ZN31CConnMonWlanProbeRawBuffersPckgC2Ej @148
-	_ZN31CConnMonWlanProbeRawBuffersPckgD0Ev @149
-	_ZN31CConnMonWlanProbeRawBuffersPckgD1Ev @150
-	_ZN31CConnMonWlanProbeRawBuffersPckgD2Ev @151
-	_ZNK26CConnMonWlanProbeRawBuffer5ToBufEv @152
-	_ZNK31CConnMonWlanProbeRawBuffersPckg3BufEv @153
-	_ZNK31CConnMonWlanProbeRawBuffersPckg9UnpackToLER13RPointerArrayI26CConnMonWlanProbeRawBufferE @154
-	_ZTI31CConnMonWlanProbeRawBuffersPckg @155
-	_ZTV31CConnMonWlanProbeRawBuffersPckg @156
-	_ZNK26CConnMonWlanProbeRawBuffer9RawBufferEv @157
-	_ZNK31CConnMonWlanProbeRawBuffersPckg5CountEv @158
-	_ZNK31CConnMonWlanProbeRawBuffersPckg5TotalEv @159
+	_ZN26CConnMonWlanProbeRawBuffer4NewLEPK6HBufC8 @ 139 NONAME
+	_ZN26CConnMonWlanProbeRawBuffer4NewLERS_ @ 140 NONAME
+	_ZN26CConnMonWlanProbeRawBuffer4NewLEv @ 141 NONAME
+	_ZN26CConnMonWlanProbeRawBuffer8FromPtrCERK6TPtrC8PS_ @ 142 NONAME
+	_ZN26CConnMonWlanProbeRawBufferD0Ev @ 143 NONAME
+	_ZN26CConnMonWlanProbeRawBufferD1Ev @ 144 NONAME
+	_ZN26CConnMonWlanProbeRawBufferD2Ev @ 145 NONAME
+	_ZN26CConnMonWlanProbeRawBufferaSERS_ @ 146 NONAME
+	_ZN31CConnMonWlanProbeRawBuffersPckgC1Ej @ 147 NONAME
+	_ZN31CConnMonWlanProbeRawBuffersPckgC2Ej @ 148 NONAME
+	_ZN31CConnMonWlanProbeRawBuffersPckgD0Ev @ 149 NONAME
+	_ZN31CConnMonWlanProbeRawBuffersPckgD1Ev @ 150 NONAME
+	_ZN31CConnMonWlanProbeRawBuffersPckgD2Ev @ 151 NONAME
+	_ZNK26CConnMonWlanProbeRawBuffer5ToBufEv @ 152 NONAME
+	_ZNK31CConnMonWlanProbeRawBuffersPckg3BufEv @ 153 NONAME
+	_ZNK31CConnMonWlanProbeRawBuffersPckg9UnpackToLER13RPointerArrayI26CConnMonWlanProbeRawBufferE @ 154 NONAME
+	_ZTI31CConnMonWlanProbeRawBuffersPckg @ 155 NONAME
+	_ZTV31CConnMonWlanProbeRawBuffersPckg @ 156 NONAME
+	_ZNK26CConnMonWlanProbeRawBuffer9RawBufferEv @ 157 NONAME
+	_ZNK31CConnMonWlanProbeRawBuffersPckg5CountEv @ 158 NONAME
+	_ZNK31CConnMonWlanProbeRawBuffersPckg5TotalEv @ 159 NONAME
+	_ZN19CConnMonWlanNetwork14SecurityModeV2Ev @ 160 NONAME
+	_ZN19CConnMonWlanNetwork25IsProtectedSetupSupportedEv @ 161 NONAME
+	_ZN19CConnMonWlanNetwork4NewLERK4TBufILi32EEjjjjjRK5TBuf8ILi6EERK7TDesC16 @ 162 NONAME
 
--- a/connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/inc/CWlanSupport.h	Tue Aug 31 15:35:44 2010 +0300
@@ -369,6 +369,16 @@
      */
     TBool WlanRssGoodEnough();
 
+    /**
+     * Converts a WLAN security mode from ConnMon's
+     * TConnMonSecurityModeV2-format to ConnMon's TConnMonSecurityMode-format.
+     *
+     * @since 5.2
+     * @param aSecModeV2 Security mode in TConnMonSecurityModeV2-format.
+     * @return Security mode in TConnMonSecurityMode-format.
+     */
+    TInt ConvertConMonSecModeV2ToConnMonSecMode( TInt aSecModeV2 );
+
 private:
     CWlanSupport( CConnMonServer* aServer );
 
@@ -377,13 +387,17 @@
      */
     void ConstructL();
     
-    /*
-     * Converts WLAN's security modes into ConnMon's.
+    /**
+     * Converts a WLAN security mode from WLAN engine's
+     * TWlanConnectionExtentedSecurityMode-format to ConnMon's
+     * TConnMonSecurityModeV2-format.
+     *
      * @since 5.2
-     * @param scanInfo Wlan scan info
-     * @return Connection monitor's security mode (TConnMonSecurityMode).
+     * @param aWlanExtSecMode Security mode in
+     * TWlanConnectionExtentedSecurityMode-format.
+     * @return Security mode in TConnMonSecurityModeV2-format.
      */
-    TUint ConvertWlan2ConnMonExtSecMode(CWlanScanInfo* scanInfo);
+    TInt ConvertWlanExtSecModeToConnMonSecModeV2( TInt aWlanExtSecMode );
 
 private: // Data
     // Pointer to server module
--- a/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/CWlanSupport.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -591,33 +591,13 @@
     LOGENTRFN("CWlanSupport::GetConnectionSecurity()")
     TInt err( KErrNone );
 
-    TWlanConnectionSecurityMode mode( EWlanConnectionSecurityOpen );
+    TWlanConnectionExtentedSecurityMode mode( EWlanConnectionExtentedSecurityModeOpen );
 
     // Get security mode
-    err = iWlanMgmt->GetConnectionSecurityMode( mode );
+    err = iWlanMgmt->GetExtendedConnectionSecurityMode( mode );
     if ( KErrNone == err )
         {
-        switch ( mode )
-            {
-            case EWlanConnectionSecurityOpen:
-                aConnectionSecurity = EConnMonSecurityOpen;
-                break;
-            case EWlanConnectionSecurityWep:
-                aConnectionSecurity = EConnMonSecurityWep;
-                break;
-            case EWlanConnectionSecurity802d1x:
-                aConnectionSecurity = EConnMonSecurity802d1x;
-                break;
-            case EWlanConnectionSecurityWpa:
-                aConnectionSecurity = EConnMonSecurityWpa;
-                break;
-            case EWlanConnectionSecurityWpaPsk:
-                aConnectionSecurity = EConnMonSecurityWpaPsk;
-                break;
-            default:
-                aConnectionSecurity = EConnMonSecurityOpen;
-                break;
-            }
+        aConnectionSecurity = ConvertWlanExtSecModeToConnMonSecModeV2( mode );
         LOGIT1("GetConnectionSecurity: security mode %d", aConnectionSecurity)
         }
 
@@ -773,8 +753,10 @@
             TUint signalStrength(scanInfo->RXLevel());
             LOGIT1("CWlanSupport::GetWLANNetworksL: signalStrength %d", signalStrength)
 
-            // SecurityMode
-            TUint securityMode = ConvertWlan2ConnMonExtSecMode(scanInfo);
+            // Security mode
+            TInt wlanExtSecurityMode( scanInfo->ExtendedSecurityMode() );
+            TInt securityModeV2( ConvertWlanExtSecModeToConnMonSecModeV2( wlanExtSecurityMode ) );
+            TInt securityMode( ConvertConMonSecModeV2ToConnMonSecMode( securityModeV2 ) );
             LOGIT1("CWlanSupport::GetWLANNetworksL: securityMode %d", securityMode)
 
             // SSID == name
@@ -879,9 +861,14 @@
         // Signal strength
         TUint signalStrength( aScanInfo->RXLevel() );
 
-        // SecurityMode
-        TUint securityMode = ConvertWlan2ConnMonExtSecMode(aScanInfo);
-                
+        // Security mode
+        TInt wlanExtSecurityMode( aScanInfo->ExtendedSecurityMode() );
+        TInt securityModeV2( ConvertWlanExtSecModeToConnMonSecModeV2( wlanExtSecurityMode ) );
+        TInt securityMode( ConvertConMonSecModeV2ToConnMonSecMode( securityModeV2 ) );
+
+        // Protected setup
+        TBool protectedSetupSupport( aScanInfo->IsProtectedSetupSupported() );
+
         // SSID == name
         TBuf8<CConnMonWlanNetwork::KMaxNameLength> name8;
         TUint8 ieLen( 0 );
@@ -915,6 +902,8 @@
                 connectionMode,
                 signalStrength,
                 securityMode,
+                securityModeV2,
+                protectedSetupSupport,
                 bssid,
                 KNullDesC() );
         CleanupStack::PushL( net );
@@ -941,6 +930,7 @@
 
     TInt connectionMode;
     TInt connectionSecurity;
+    TInt connectionSecurityV2;
     TInt connectionSignalQuality;
     TBuf<CConnMonWlanNetwork::KMaxNameLength> connectionSsid;
     TBuf8<CConnMonWlanNetwork::KWlanBssId> connectionBssid;
@@ -950,7 +940,8 @@
     if ( KErrNone == err )
         {
         // Get connection security mode
-        err = GetConnectionSecurity( connectionSecurity );
+        err = GetConnectionSecurity( connectionSecurityV2 );
+        connectionSecurity = ConvertConMonSecModeV2ToConnMonSecMode( connectionSecurityV2 );
         }
     if ( KErrNone == err )
         {
@@ -975,6 +966,8 @@
                 connectionMode,
                 connectionSignalQuality,
                 connectionSecurity,
+                connectionSecurityV2,
+                0,
                 connectionBssid,
                 KNullDesC() );
         CleanupStack::PushL( net );
@@ -1432,48 +1425,87 @@
     }
 
 // -----------------------------------------------------------------------------
-// CWlanSupport::ConvertWlan2ConnMonExtSecMode
+// CWlanSupport::ConvertConMonSecModeV2ToConnMonSecMode
 // -----------------------------------------------------------------------------
 //
-TUint CWlanSupport::ConvertWlan2ConnMonExtSecMode(CWlanScanInfo* scanInfo)
+TInt CWlanSupport::ConvertConMonSecModeV2ToConnMonSecMode( TInt aConnMonSecModeV2 )
     {
-    LOGENTRFN("CWlanSupport::ConvertWlan2ConnMonExtSecMode()")
-
-    TUint securityMode(EConnMonSecurityOpen);
-    switch (scanInfo->ExtendedSecurityMode())
+    TInt connMonSecMode( EConnMonSecurityOpen );
+    switch ( aConnMonSecModeV2 )
+        {
+        case EConnMonSecurityV2Open:
+            connMonSecMode = EConnMonSecurityOpen;
+            break;
+        case EConnMonSecurityV2WepOpen:
+        case EConnMonSecurityV2WepShared:
+            connMonSecMode = EConnMonSecurityWep;
+            break;
+        case EConnMonSecurityV2802d1x:
+            connMonSecMode = EConnMonSecurity802d1x;
+            break;
+        case EConnMonSecurityV2Wpa:
+        case EConnMonSecurityV2Wpa2:
+            connMonSecMode = EConnMonSecurityWpa;
+            break;
+        case EConnMonSecurityV2WpaPsk:
+        case EConnMonSecurityV2Wpa2Psk:
+            connMonSecMode = EConnMonSecurityWpaPsk;
+            break;
+        case EConnMonSecurityV2Wapi:
+        case EConnMonSecurityV2WapiPsk:
+            connMonSecMode = EConnMonSecurity802d1x;
+            break;
+        default:
+            connMonSecMode = EConnMonSecurityOpen;
+            break;
+        }
+    return connMonSecMode;
+    }
+
+// -----------------------------------------------------------------------------
+// CWlanSupport::ConvertWlanExtSecModeToConnMonSecModeV2
+// -----------------------------------------------------------------------------
+//
+TInt CWlanSupport::ConvertWlanExtSecModeToConnMonSecModeV2( TInt aWlanExtSecMode )
+    {
+    TInt connMonSecModeV2( EConnMonSecurityV2Open );
+    switch ( aWlanExtSecMode )
         {
         case EWlanConnectionExtentedSecurityModeOpen:
-            securityMode = EConnMonSecurityOpen;
+            connMonSecModeV2 = EConnMonSecurityV2Open;
             break;
-            
         case EWlanConnectionExtentedSecurityModeWepOpen:
+            connMonSecModeV2 = EConnMonSecurityV2WepOpen;
+            break;
         case EWlanConnectionExtentedSecurityModeWepShared:
-            securityMode = EConnMonSecurityWep;
+            connMonSecModeV2 = EConnMonSecurityV2WepShared;
             break;
-            
         case EWlanConnectionExtentedSecurityMode802d1x:
-            securityMode = EConnMonSecurity802d1x;
+            connMonSecModeV2 = EConnMonSecurityV2802d1x;
             break;
-            
         case EWlanConnectionExtentedSecurityModeWpa:
-        case EWlanConnectionExtentedSecurityModeWpa2:
-            securityMode = EConnMonSecurityWpa;
+            connMonSecModeV2 = EConnMonSecurityV2Wpa;
             break;
-            
         case EWlanConnectionExtentedSecurityModeWpaPsk:
+            connMonSecModeV2 = EConnMonSecurityV2WpaPsk;
+            break;
+        case EWlanConnectionExtentedSecurityModeWpa2:
+            connMonSecModeV2 = EConnMonSecurityV2Wpa2;
+            break;
         case EWlanConnectionExtentedSecurityModeWpa2Psk:
-            securityMode = EConnMonSecurityWpaPsk;
+            connMonSecModeV2 = EConnMonSecurityV2Wpa2Psk;
             break;
-            
         case EWlanConnectionExtentedSecurityModeWapi:
+            connMonSecModeV2 = EConnMonSecurityV2Wapi;
+            break;
         case EWlanConnectionExtentedSecurityModeWapiPsk:
+            connMonSecModeV2 = EConnMonSecurityV2WapiPsk;
+            break;
         default:
-            securityMode = EConnMonSecurityOpen;
+            connMonSecModeV2 = EConnMonSecurityV2Open;
             break;
         }
-
-    LOGEXITFN1("CWlanSupport::ConvertWlan2ConnMonExtSecMode()", securityMode)
-    return securityMode;
+    return connMonSecModeV2;
     }
 
 // ============================ MEMBER FUNCTIONS ===============================
--- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonIAP.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1142,6 +1142,20 @@
                 {
                 if ( iWlanSupport )
                     {
+                    TInt secModeV2( EConnMonSecurityV2Open );
+                    ret = iWlanSupport->GetConnectionSecurity( secModeV2 );
+                    aValue = iWlanSupport->ConvertConMonSecModeV2ToConnMonSecMode( secModeV2 );
+                    }
+                }
+            break;
+
+        case KSecurityMode_v2:
+            // SECURITY MODE V2
+            ret = KErrNotSupported;
+            if ( iConnInfos[index].iBearer == EBearerWLAN )
+                {
+                if ( iWlanSupport )
+                    {
                     ret = iWlanSupport->GetConnectionSecurity( aValue );
                     }
                 }
--- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonServ.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonServ.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -352,6 +352,14 @@
     // Identify ourselves and open for service
     StartL( KConnectionMonitorServerName );
 
+    //Start Indicator observer process
+    _LIT(KIndicatorObserverExeFile,"indicatorobserver.exe");
+    _LIT(KIndicatorObserverExeFileCmd,"");
+    RProcess proc;
+    User::LeaveIfError(proc.Create(KIndicatorObserverExeFile,KIndicatorObserverExeFileCmd));
+    proc.Resume();
+    proc.Close(); // Closes the handle, not the process.
+
     LOGIT("ConstructL: Server started successfully")
     LOGEXITFN("CConnMonServer::ConstructL()")
     }
--- a/connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -524,7 +524,9 @@
     TInt err( KErrNone );
 
     TBool availabilityEventsEnabled( EFalse );
-    if ( ( aBearerId == EBearerIdAll ) || ( aBearerId == EBearerIdVirtualVPN ) )
+    if ( ( aBearerId == EBearerIdAll ) || 
+         ( aBearerId == EBearerIdVirtualVPN ) ||
+         ( aBearerId == EBearerIdWLAN ) )
         {
         // If WLAN background scanning is on, and client is asking IAP
         // availability for all- or virtual IAPs, send IAP availability changed
--- a/connectionmonitoring/connmon/connectionmonitor/src/connmonwlannetwork_v2.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/connmonwlannetwork_v2.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -75,6 +75,40 @@
 //  Constructor
 // ---------------------------------------------------------------------------
 //
+CConnMonWlanNetwork::CConnMonWlanNetwork(
+        const TBuf<KMaxNameLength>& aName,
+        TUint aConnectionMode,
+        TUint aSignalStrength,
+        TUint aSecurityMode,
+        TUint aSecurityModeV2,
+        TUint aProtectedSetupSupport,
+        const TBuf8<KWlanBssId>& aBssId,
+        const TDesC& aVendorData )
+        :
+        iName( aName ),
+        iConnectionMode( aConnectionMode ),
+        iSignalStrength( aSignalStrength ),
+        iSecurityMode( aSecurityMode ),
+        iWlanBssId( aBssId ),
+        iVendorData( NULL ),
+        iSecurityModeV2( aSecurityModeV2 ),
+        iProtectedSetupSupport( aProtectedSetupSupport )
+    {
+    if ( aVendorData != KNullDesC() && aVendorData.Length() > 0 )
+        {
+        // Can't leave here, copy contents only if enough memory
+        iVendorData = HBufC::New( aVendorData.Length() );
+        if ( iVendorData )
+            {
+            iVendorData->Des().Copy( aVendorData );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//  Constructor
+// ---------------------------------------------------------------------------
+//
 EXPORT_C CConnMonWlanNetwork* CConnMonWlanNetwork::NewL(
         const TBuf<KMaxNameLength>& aName,
         TUint aConnectionMode,
@@ -95,6 +129,33 @@
     }
 
 // ---------------------------------------------------------------------------
+//  Constructor
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CConnMonWlanNetwork* CConnMonWlanNetwork::NewL(
+        const TBuf<KMaxNameLength>& aName,
+        TUint aConnectionMode,
+        TUint aSignalStrength,
+        TUint aSecurityMode,
+        TUint aSecurityModeV2,
+        TUint aProtectedSetupSupport,
+        const TBuf8<KWlanBssId>& aBssId,
+        const TDesC& aVendorData )
+    {
+    CConnMonWlanNetwork* wlanNet = new( ELeave ) CConnMonWlanNetwork(
+            aName,
+            aConnectionMode,
+            aSignalStrength,
+            aSecurityMode,
+            aSecurityModeV2,
+            aProtectedSetupSupport,
+            aBssId,
+            aVendorData );
+
+    return wlanNet;
+    }
+
+// ---------------------------------------------------------------------------
 //  Second-phase constructor
 // ---------------------------------------------------------------------------
 //
@@ -117,6 +178,8 @@
                 aConnMonWlanNetwork.iConnectionMode,
                 aConnMonWlanNetwork.iSignalStrength,
                 aConnMonWlanNetwork.iSecurityMode,
+                aConnMonWlanNetwork.iSecurityModeV2,
+                aConnMonWlanNetwork.iProtectedSetupSupport,
                 aConnMonWlanNetwork.iWlanBssId,
                 aConnMonWlanNetwork.iVendorData->Des() );
         }
@@ -127,6 +190,8 @@
                 aConnMonWlanNetwork.iConnectionMode,
                 aConnMonWlanNetwork.iSignalStrength,
                 aConnMonWlanNetwork.iSecurityMode,
+                aConnMonWlanNetwork.iSecurityModeV2,
+                aConnMonWlanNetwork.iProtectedSetupSupport,
                 aConnMonWlanNetwork.iWlanBssId,
                 KNullDesC() );
         }
@@ -155,6 +220,8 @@
     iConnectionMode = aConnMonWlanNetwork.ConnectionMode();
     iSignalStrength = aConnMonWlanNetwork.SignalStrength();
     iSecurityMode = aConnMonWlanNetwork.SecurityMode();
+    iSecurityModeV2 = aConnMonWlanNetwork.SecurityModeV2();
+    iProtectedSetupSupport = aConnMonWlanNetwork.IsProtectedSetupSupported();
     iWlanBssId = aConnMonWlanNetwork.WlanBssid();
 
     if ( aConnMonWlanNetwork.iVendorData )
@@ -199,6 +266,29 @@
     }
 
 // ---------------------------------------------------------------------------
+// Obtains the more detailed security mode of the network.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TUint CConnMonWlanNetwork::SecurityModeV2()
+    {
+    return iSecurityModeV2;
+    }
+
+// ---------------------------------------------------------------------------
+// Finds whether Wi-Fi Protected Setup is supported.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CConnMonWlanNetwork::IsProtectedSetupSupported()
+    {
+    TBool result( EFalse );
+    if ( iProtectedSetupSupport )
+        {
+        result = ETrue;
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
 // Packages object to HBufC descriptor
 // ---------------------------------------------------------------------------
 //
--- a/connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or 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,14 +11,13 @@
 *
 * Contributors:
 *
-* Description:  Data Connection Logger.
-*
+* Description:
+* Data Connection Logger.
 */
 
 #ifndef DCLEVENT_H
 #define DCLEVENT_H
 
-#include <cntdef.h>
 #include <logwrap.h>
 #include <logcli.h>
 
--- a/connectionmonitoring/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2010 Nokia Corporation and/or 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,9 +11,8 @@
 *
 * Contributors:
 *
-* Description:  Build information file for all projects in connectionmonitoring
-*                subsystem.
-*
+* Description:
+* Build information file for all projects in connectionmonitoring subsystem.
 */
 
 PRJ_PLATFORMS
@@ -22,8 +21,6 @@
 PRJ_EXPORTS
 
 PRJ_MMPFILES
-#include "../connectionmonitorplugin/group/bld.inf"
-#include "../connectionmonitorui/group/bld.inf"
 #include "../connmon/connectionmonitor/group/bld.inf"
 #include "../connmon/dataconnectionlogger/group/bld.inf"
 #include "../connmonext/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/inc/indicatorobserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef INDICATOROBSERVER_H
+#define INDICATOROBSERVER_H
+
+#include <QtCore>
+
+#include <qnetworkconfigmanager.h>
+#include <qnetworkconfiguration.h>
+#include <xqsettingskey.h>
+
+class XQSettingsManager;
+class HbIndicator;
+
+QTM_USE_NAMESPACE
+
+const int wlanNotConnected = 0;
+const int wlanConnected = 1;
+
+const QString bearerWLAN = "WLAN";
+const QString bearer2G = "2G";
+const QString bearerWCDMA = "WCDMA";
+const QString bearerHSPA = "HSPA";
+const QString bearerCDMA2000 = "CDMA2000";
+
+class IndicatorObserver : public QCoreApplication
+    {
+    Q_OBJECT
+    
+public:
+    IndicatorObserver(int argc, char* argv[]);
+    
+    virtual ~IndicatorObserver();
+    
+    void initializeIndicators();
+    
+    void findActiveConfigurations();
+    
+    void updateWlanIndicator();
+    
+    void updateCellularIndicator();
+    
+    void activateCellularIndicatorPlugin(QList<QVariant> list);
+    
+    void deactivateCellularIndicatorPlugin();
+     
+    void activateWlanIndicatorPlugin(QList<QVariant> list);
+    
+    void deactivateWlanIndicatorPlugin();
+    
+private slots:
+    void updateWlanRadioStatus(const XQSettingsKey &key, const QVariant &value);
+
+    void handleConfigurationChanged(const QNetworkConfiguration& config);
+    
+    void userActivateCellularIndicator(const QString &type, const QVariantMap &data);
+
+    void userActivateWlanIndicator(const QString &type, const QVariantMap &data);
+    
+private:
+    /*!
+        Pointer to network configuration manager
+    */
+    QNetworkConfigurationManager* mNetConfigurationManager;
+    
+    /*!
+        Pointer to settings manager for reading PS keys
+    */
+    XQSettingsManager *mSettingsManager;
+    
+    /*!
+        Pointer to a list of active cellular configurations
+    */
+    QList<QNetworkConfiguration>* mActiveCellularConfigurations;
+    
+    /*!
+        Pointer to a list of active WLAN configurations
+    */
+    QList<QNetworkConfiguration>* mActiveWlanConfigurations;
+    
+    /*!
+        Indicates whether WLAN radio is switched on
+    */
+    bool mWlanEnabled;
+    
+    /*!
+        Indicates whether WLAN radio is forced off
+    */
+    bool mWlanForceDisabled;
+    
+    /*!
+        Indicates whether WLAN indicator plugin is activated
+    */
+    bool mWlanIndicatorIsActivated;
+    
+    /*!
+        Indicates whether cellular indicator plugin is activated
+    */
+    bool mCellularIndicatorIsActivated;
+    
+    /*!
+         Pointer to the WLAN indicator
+     */
+    HbIndicator *mWlanIndicator;
+    
+    /*!
+         Pointer to the cellular indicator
+     */
+    HbIndicator *mCellularIndicator;
+
+    friend class ObserverTester;
+    
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/indicatorobserver.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = indicatorobserver
+CONFIG += hb no_icon mobility
+MOBILITY += bearer
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+               ./inc \
+               ./traces
+               
+LIBS += -lxqsettingsmanager
+
+QT += core \
+      network 
+
+QT -= gui
+
+HEADERS += inc/indicatorobserver.h \
+           traces/OstTraceDefinitions.h
+    
+SOURCES += src/indicatorobserver.cpp \
+           src/main.cpp
+    
+symbian*: {
+	TARGET.UID3 = 0x2002C36C
+    TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
+    SYMBIAN_PLATFORMS = WINSCW ARMV5
+    BLD_INF_RULES.prj_exports += "rom/indicatorobserver.iby CORE_MW_LAYER_IBY_EXPORT_PATH(indicatorobserver.iby)"
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/rom/indicatorobserver.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef INDICATOROBSERVER_IBY
+#define INDICATOROBSERVER_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR\BUILD_DIR\indicatorobserver.exe PROGRAMS_DIR\indicatorobserver.exe
+
+#endif // INDICATOROBSERVER_IBY
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/src/indicatorobserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#include <QtCore>
+#include <QCoreApplication>
+
+#include <hbindicator.h>
+#include <hbindicatorplugininterface.h>
+#include <hbindicatorinterface.h>
+#include <qnetworkconfigmanager.h>
+#include <qnetworkconfiguration.h>
+#include <xqsettingsmanager.h>
+#include <wlandevicesettingsinternalcrkeys.h>
+
+#include "indicatorobserver.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "indicatorobserverTraces.h"
+#endif
+
+QTM_USE_NAMESPACE
+
+/*!
+    IndicatorObserver::IndicatorObserver
+*/
+IndicatorObserver::IndicatorObserver(int argc, char* argv[]) :
+    QCoreApplication(argc, argv),
+    mNetConfigurationManager(new QNetworkConfigurationManager(this)),
+    mSettingsManager(new XQSettingsManager(this)),
+    mActiveCellularConfigurations(new QList<QNetworkConfiguration>),
+    mActiveWlanConfigurations(new QList<QNetworkConfiguration>),    
+    mWlanEnabled(0),
+    mWlanForceDisabled(0),
+    mWlanIndicatorIsActivated(false),
+    mCellularIndicatorIsActivated(false),
+    mWlanIndicator(NULL),
+    mCellularIndicator(NULL)
+    
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONSTRUCTOR_ENTRY, "-->");
+
+    bool connectStatus = false;
+
+    connectStatus = connect(
+        mNetConfigurationManager,
+        SIGNAL(configurationChanged(const QNetworkConfiguration&)),
+        this,
+        SLOT(handleConfigurationChanged(const QNetworkConfiguration&)));
+    
+    if (!connectStatus){
+        OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONNECT_FAILED, "Connecting handleConfigurationChanged SLOT failed");     
+        }
+    
+    connectStatus = connect(
+        mSettingsManager,
+        SIGNAL(valueChanged(const XQSettingsKey, const QVariant)),
+        this,
+        SLOT(updateWlanRadioStatus(const XQSettingsKey, const QVariant)));
+    
+    if (!connectStatus){
+        OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONNECT_FAILED_DUP1, "Connecting updateWlanRadioStatus SLOT failed");     
+        }
+    
+    // Subscribe for WLAN ON/OFF change indications
+    XQSettingsKey wlanKey(
+        XQSettingsKey::TargetCentralRepository,
+        KCRUidWlanDeviceSettingsRegistryId.iUid,
+        KWlanOnOff);
+    
+    // Also subscribe for KForceDisableWlan change indications
+    XQSettingsKey wlanForceKey(
+        XQSettingsKey::TargetCentralRepository,
+        KCRUidWlanDeviceSettingsRegistryId.iUid, 
+        KWlanForceDisable);
+    
+    //Read current status of WLAN radio
+    mWlanEnabled = mSettingsManager->readItemValue(wlanKey).toInt() ? true : false;
+    mWlanForceDisabled = mSettingsManager->readItemValue(wlanForceKey).toInt() ? true : false;
+
+    mSettingsManager->startMonitoring(wlanKey);
+    mSettingsManager->startMonitoring(wlanForceKey);
+
+    initializeIndicators();
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONSTRUCTOR_EXIT, "<--");
+}
+
+
+/*!
+    IndicatorObserver::~IndicatorObserver
+*/
+IndicatorObserver::~IndicatorObserver()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DESTRUCTOR_ENTRY, "-->");
+     
+    if(mCellularIndicatorIsActivated) {
+        deactivateCellularIndicatorPlugin();
+    }
+    
+    if (mActiveCellularConfigurations) {
+        mActiveCellularConfigurations->clear();
+        delete mActiveCellularConfigurations;
+        }
+    
+
+    if (mWlanIndicatorIsActivated) {
+        deactivateWlanIndicatorPlugin();
+    }
+    
+    if (mActiveWlanConfigurations) {
+        mActiveWlanConfigurations->clear();
+        delete mActiveWlanConfigurations;
+        }
+    
+    delete mCellularIndicator;
+    delete mWlanIndicator;
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DESTRUCTOR_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::initializeIndicators
+*/
+void IndicatorObserver::initializeIndicators()
+{
+
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_INITIALIZEINDICATORS_ENTRY, "-->");
+    
+    // create the indicators and make connections
+    mCellularIndicator = new HbIndicator();  
+    // connect the user activated slot here, so that the indicator know to start the connview in case
+    // the user taps the indicator
+    bool conn = QObject::connect(
+                    mCellularIndicator, 
+                    SIGNAL(userActivated(const QString&, const QVariantMap&)), 
+                    this, 
+                    SLOT(userActivateCellularIndicator(const QString&, const QVariantMap&)));
+    
+    mWlanIndicator = new HbIndicator();  
+    // connect the user activated slot here, so that the indicator know to start the wlan sniffer in case
+    // the user taps the indicator
+    conn = QObject::connect(
+                    mWlanIndicator, 
+                    SIGNAL(userActivated(const QString&, const QVariantMap&)), 
+                    this, 
+                    SLOT(userActivateWlanIndicator(const QString&, const QVariantMap&)));
+    
+    findActiveConfigurations();
+    updateWlanIndicator();
+    updateCellularIndicator();
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_INITIALIZEINDICATORS_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::updateWlanRadioStatus
+*/
+void IndicatorObserver::updateWlanRadioStatus(const XQSettingsKey &key, const QVariant &value)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_ENTRY, "-->");
+    
+    // The change notification is received either for the WlanOnoff key, or the
+    // ForceDisableWlan key
+    if (KWlanOnOff == key.key()) {
+        mWlanEnabled = value.toInt() ? true : false;
+    } else {
+        mWlanForceDisabled = value.toInt() ? true : false;
+    }
+    
+    if (mWlanEnabled == false || mWlanForceDisabled == true) {    
+        deactivateWlanIndicatorPlugin();
+    } else {
+        updateWlanIndicator();
+    }
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::findActiveConfigurations
+*/
+void IndicatorObserver::findActiveConfigurations()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_ENTRY, "-->");
+    
+    mActiveWlanConfigurations->clear();
+    mActiveCellularConfigurations->clear();
+            
+    //Let's find active connections if any    
+    QList<QNetworkConfiguration> allConfigurations = mNetConfigurationManager->allConfigurations(QNetworkConfiguration::Active);
+    
+    for (int i=0; i<allConfigurations.count(); i++) {
+        if (allConfigurations[i].type() == QNetworkConfiguration::InternetAccessPoint) {
+
+            //Let's check the bearer type
+            QString bearerName = allConfigurations[i].bearerName();
+        
+            if (bearerName == bearerWLAN) {
+                mActiveWlanConfigurations->append(allConfigurations[i]);
+            } else if (bearerName == bearer2G ||
+                       bearerName == bearerWCDMA ||
+                       bearerName == bearerHSPA || 
+                       bearerName == bearerCDMA2000) {
+                mActiveCellularConfigurations->append(allConfigurations[i]);
+            }  
+        }
+    }
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::updateWlanIndicator
+*/
+void IndicatorObserver::updateWlanIndicator()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANINDICATOR_ENTRY, "-->");
+    QList<QVariant> list;
+    
+    int count = mActiveWlanConfigurations->count();
+
+    //We do not deactivate WlanIndicator plugin here as it is done in updateWlanRadioStatus method
+    //as WLAN radio status determines whether to show indicator or not
+    if ( mWlanEnabled && !mWlanForceDisabled) {
+        if(count == 0) {
+            list.insert(0, wlanNotConnected);
+            activateWlanIndicatorPlugin(list);
+        } else {
+            list.insert(0, wlanConnected);
+            list.insert(1, mActiveWlanConfigurations->at(0).name());          
+            activateWlanIndicatorPlugin(list);
+        }
+    }
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANINDICATOR_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::updateCellularIndicator
+*/
+void IndicatorObserver::updateCellularIndicator()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATECELLULARINDICATOR_ENTRY, "-->");
+    
+    QList<QVariant> list;
+
+    int count = mActiveCellularConfigurations->count();
+ 
+    if ( count == 0 ) {
+        if ( mCellularIndicatorIsActivated ){
+            deactivateCellularIndicatorPlugin();
+        }
+    } else {
+        if (count == 1) {
+            list.insert(0, count);
+            list.insert(1, mActiveCellularConfigurations->at(0).name());
+            list.insert(2, mActiveCellularConfigurations->at(0).identifier().toInt());
+        } else {
+            list.insert(0, count);
+        
+        } 
+        activateCellularIndicatorPlugin(list);        
+    }
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATECELLULARINDICATOR_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::handleConfigurationChanged
+*/
+void IndicatorObserver::handleConfigurationChanged(const QNetworkConfiguration& config)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_ENTRY, "-->");
+    
+    switch (config.state())
+    {   
+        case QNetworkConfiguration::Defined: //To handle situation where we have active connection and it is lost due to bad radio conditions 
+        case QNetworkConfiguration::Discovered:            
+        case QNetworkConfiguration::Active:
+            {
+                findActiveConfigurations();
+
+                QString bearerName = config.bearerName();
+                
+                if (bearerName == bearerWLAN) {
+                    updateWlanIndicator();
+                } else if (bearerName == bearer2G ||
+                           bearerName == bearerWCDMA ||
+                           bearerName == bearerHSPA  ||
+                           bearerName == bearerCDMA2000) {                   
+                    updateCellularIndicator();
+                }
+            }
+            break;
+            
+        default:
+            break;
+    }
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_EXIT, "<--");
+}
+
+void IndicatorObserver::userActivateCellularIndicator(const QString &type, const QVariantMap &data)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_ENTRY, "-->");
+    
+    Q_UNUSED(data);
+    Q_UNUSED(type);
+    // Show connection view
+    QProcess::startDetached("connview");
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_EXIT, "<--");
+}
+
+void IndicatorObserver::userActivateWlanIndicator(const QString &type, const QVariantMap &data)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_ENTRY, "-->");
+    
+    Q_UNUSED(data);
+    Q_UNUSED(type);
+    // Show wlan list view
+    QProcess::startDetached("WlanSniffer");
+
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::activateCellularIndicatorPlugin
+*/
+void IndicatorObserver::activateCellularIndicatorPlugin(QList<QVariant> list)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_ENTRY, "-->");
+    
+    bool success = mCellularIndicator->activate("com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0", list);
+     
+    if (!success) {
+        mCellularIndicatorIsActivated = false;
+        OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CELLULAR_INDICATOR_ACTIVATION_FAILED, "Cellular indicator activation failed"); 
+    } else {
+        mCellularIndicatorIsActivated = true;
+    }
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::deactivateCellularIndicatorPlugin
+*/
+void IndicatorObserver::deactivateCellularIndicatorPlugin()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_ENTRY, "-->");
+    
+    mCellularIndicator->deactivate("com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0");
+    mCellularIndicatorIsActivated = false;
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_EXIT, "<--");
+}
+
+/*!
+    IndicatorObserver::activateWlanIndicatorPlugin
+*/
+void IndicatorObserver::activateWlanIndicatorPlugin(QList<QVariant> list)
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_ENTRY, "-->");
+    
+    bool success = mWlanIndicator->activate("com.nokia.hb.indicator.connectivity.wlanindicatorplugin/1.0", list);
+   
+    if (!success) {
+        mWlanIndicatorIsActivated = false;
+        OstTrace0(TRACE_FLOW, INDICATOROBSERVER_WLAN_INDICATOR_ACTIVATION_FAILED, "WLAN indicator activation failed"); 
+    } else {
+        mWlanIndicatorIsActivated = true;
+    }
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_EXIT, "<--");    
+}
+
+/*!
+    IndicatorObserver::deactivateWlanIndicatorPlugin
+*/
+void IndicatorObserver::deactivateWlanIndicatorPlugin()
+{
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_ENTRY, "-->");
+
+    mWlanIndicator->deactivate("com.nokia.hb.indicator.connectivity.wlanindicatorplugin/1.0");
+    mWlanIndicatorIsActivated = false;
+    
+    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_EXIT, "<--");   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/src/main.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#include "indicatorobserver.h"
+
+int main(int argc, char *argv[])
+{    
+    IndicatorObserver app(argc, argv);
+
+    return app.exec();
+}
+
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionmonitoring/indicatorobserver/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_ALRU.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_ALRU.def	Tue Aug 31 15:35:44 2010 +0300
@@ -41,7 +41,7 @@
 	?EasyWpaDlg@CConnectionUiUtilities@@QAEXAAVTRequestStatus@@PAVTDes16@@@Z @ 40 NONAME ; void CConnectionUiUtilities::EasyWpaDlg(class TRequestStatus &, class TDes16 *)
 	?SearchWLANNetwork@CConnectionUiUtilities@@QAEHAAV?$TBuf8@$0CA@@@AAW4TWlanConnectionMode@@AAW4TWlanConnectionExtentedSecurityMode@@@Z @ 41 NONAME ; int CConnectionUiUtilities::SearchWLANNetwork(class TBuf8<32> &, enum TWlanConnectionMode &, enum TWlanConnectionExtentedSecurityMode &)
 	?SearchWLANNetworkAsync@CConnectionUiUtilities@@QAEXAAVTRequestStatus@@AAV?$TBuf8@$0CA@@@AAW4TWlanConnectionMode@@AAW4TWlanConnectionExtentedSecurityMode@@@Z @ 42 NONAME ; void CConnectionUiUtilities::SearchWLANNetworkAsync(class TRequestStatus &, class TBuf8<32> &, enum TWlanConnectionMode &, enum TWlanConnectionExtentedSecurityMode &)
-	?CancelWlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXXZ @ 43 NONAME ABSENT ; void CConnectionUiUtilities::CancelWlanPowerSaveTestNote(void)
-	?WlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXAAHAAVTRequestStatus@@@Z @ 44 NONAME ABSENT ; void CConnectionUiUtilities::WlanPowerSaveTestNote(int &, class TRequestStatus &)
+	?CancelWlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXXZ @ 43 NONAME ; void CConnectionUiUtilities::CancelWlanPowerSaveTestNote(void)
+	?WlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXAAHAAVTRequestStatus@@@Z @ 44 NONAME ; void CConnectionUiUtilities::WlanPowerSaveTestNote(int &, class TRequestStatus &)
 	?EasyWapiDlg@CConnectionUiUtilities@@QAEHPAVTDes16@@@Z @ 45 NONAME ; int CConnectionUiUtilities::EasyWapiDlg(class TDes16 *)
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROTU.def	Tue Aug 31 15:35:44 2010 +0300
@@ -46,11 +46,13 @@
 	?SearchWLANNetworkAsync@CConnectionUiUtilities@@QAEXAAVTRequestStatus@@AAV?$TBuf8@$0CA@@@AAW4TWlanConnectionMode@@AAW4TWlanConnectionExtentedSecurityMode@@@Z @ 45 NONAME ; void CConnectionUiUtilities::SearchWLANNetworkAsync(class TRequestStatus &, class TBuf8<32> &, enum TWlanConnectionMode &, enum TWlanConnectionExtentedSecurityMode &)
 	?SearchWLANNetworkAsync@CConnectionUiUtilities@@QAEXAAVTRequestStatus@@AAV?$TBuf8@$0CA@@@AAW4TWlanConnectionMode@@AAW4TWlanConnectionExtentedSecurityMode@@AAH@Z @ 46 NONAME ; void CConnectionUiUtilities::SearchWLANNetworkAsync(class TRequestStatus &, class TBuf8<32> &, enum TWlanConnectionMode &, enum TWlanConnectionExtentedSecurityMode &, int &)
 	?SearchWLANNetwork@CConnectionUiUtilities@@QAEHAAV?$TBuf8@$0CA@@@AAW4TWlanConnectionMode@@AAW4TWlanConnectionExtentedSecurityMode@@AAH@Z @ 47 NONAME ; int CConnectionUiUtilities::SearchWLANNetwork(class TBuf8<32> &, enum TWlanConnectionMode &, enum TWlanConnectionExtentedSecurityMode &, int &)
-	?CancelWlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXXZ @ 48 NONAME ABSENT ; void CConnectionUiUtilities::CancelWlanPowerSaveTestNote(void)
-	?WlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXAAHAAVTRequestStatus@@@Z @ 49 NONAME ABSENT ; void CConnectionUiUtilities::WlanPowerSaveTestNote(int &, class TRequestStatus &)
+	?CancelWlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXXZ @ 48 NONAME ; void CConnectionUiUtilities::CancelWlanPowerSaveTestNote(void)
+	?WlanPowerSaveTestNote@CConnectionUiUtilities@@QAEXAAHAAVTRequestStatus@@@Z @ 49 NONAME ; void CConnectionUiUtilities::WlanPowerSaveTestNote(int &, class TRequestStatus &)
 	?EasyWapiDlg@CConnectionUiUtilities@@QAEHPAVTDes16@@@Z @ 50 NONAME ; int CConnectionUiUtilities::EasyWapiDlg(class TDes16 *)
 	?NoWLANNetworksAvailableNote@CConnectionUiUtilities@@QAEXXZ @ 51 NONAME ; void CConnectionUiUtilities::NoWLANNetworksAvailableNote(void)
 	?ConfirmMethodUsageQuery@CConnectionUiUtilities@@QAEXAAW4TMsgQueryLinkedResults@@HAAVTRequestStatus@@@Z @ 52 NONAME ; void CConnectionUiUtilities::ConfirmMethodUsageQuery(enum TMsgQueryLinkedResults &, int, class TRequestStatus &)
-	?ConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXABK@Z @ 53 NONAME ; void CConnectionUiUtilities::ConnectingViaDiscreetPopup(unsigned long const &)
+	?ConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXABKH@Z @ 53 NONAME ; void CConnectionUiUtilities::ConnectingViaDiscreetPopup(unsigned long const &, int)
 	?ConnectionErrorDiscreetPopup@CConnectionUiUtilities@@QAEXABH@Z @ 54 NONAME ; void CConnectionUiUtilities::ConnectionErrorDiscreetPopup(int const &)
+	?CancelConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXXZ @ 55 NONAME ; void CConnectionUiUtilities::CancelConnectingViaDiscreetPopup(void)
+	?ConnectingViaDiscreetPopup@CConnectionUiUtilities@@QAEXXZ @ 56 NONAME ; void CConnectionUiUtilities::ConnectingViaDiscreetPopup(void)
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_ALRU.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_ALRU.def	Tue Aug 31 15:35:44 2010 +0300
@@ -43,7 +43,7 @@
 	_ZN22CConnectionUiUtilities10EasyWpaDlgER14TRequestStatusP6TDes16 @ 42 NONAME
 	_ZN22CConnectionUiUtilities17SearchWLANNetworkER5TBuf8ILi32EER19TWlanConnectionModeR35TWlanConnectionExtentedSecurityMode @ 43 NONAME
 	_ZN22CConnectionUiUtilities22SearchWLANNetworkAsyncER14TRequestStatusR5TBuf8ILi32EER19TWlanConnectionModeR35TWlanConnectionExtentedSecurityMode @ 44 NONAME
-	_ZN22CConnectionUiUtilities21WlanPowerSaveTestNoteERiR14TRequestStatus @ 45 NONAME ABSENT
-	_ZN22CConnectionUiUtilities27CancelWlanPowerSaveTestNoteEv @ 46 NONAME ABSENT
+	_ZN22CConnectionUiUtilities21WlanPowerSaveTestNoteERiR14TRequestStatus @ 45 NONAME
+	_ZN22CConnectionUiUtilities27CancelWlanPowerSaveTestNoteEv @ 46 NONAME
 	_ZN22CConnectionUiUtilities11EasyWapiDlgEP6TDes16 @ 47 NONAME
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROTU.def	Tue Aug 31 15:35:44 2010 +0300
@@ -48,11 +48,13 @@
 	_ZN22CConnectionUiUtilities17SearchWLANNetworkER5TBuf8ILi32EER19TWlanConnectionModeR35TWlanConnectionExtentedSecurityModeRi @ 47 NONAME
 	_ZN22CConnectionUiUtilities22SearchWLANNetworkAsyncER14TRequestStatusR5TBuf8ILi32EER19TWlanConnectionModeR35TWlanConnectionExtentedSecurityMode @ 48 NONAME
 	_ZN22CConnectionUiUtilities22SearchWLANNetworkAsyncER14TRequestStatusR5TBuf8ILi32EER19TWlanConnectionModeR35TWlanConnectionExtentedSecurityModeRi @ 49 NONAME
-	_ZN22CConnectionUiUtilities21WlanPowerSaveTestNoteERiR14TRequestStatus @ 50 NONAME ABSENT
-	_ZN22CConnectionUiUtilities27CancelWlanPowerSaveTestNoteEv @ 51 NONAME ABSENT
+	_ZN22CConnectionUiUtilities21WlanPowerSaveTestNoteERiR14TRequestStatus @ 50 NONAME
+	_ZN22CConnectionUiUtilities27CancelWlanPowerSaveTestNoteEv @ 51 NONAME
 	_ZN22CConnectionUiUtilities11EasyWapiDlgEP6TDes16 @ 52 NONAME
 	_ZN22CConnectionUiUtilities23ConfirmMethodUsageQueryER22TMsgQueryLinkedResultsiR14TRequestStatus @ 53 NONAME
-	_ZN22CConnectionUiUtilities26ConnectingViaDiscreetPopupERKm @ 54 NONAME
+	_ZN22CConnectionUiUtilities26ConnectingViaDiscreetPopupERKmi @ 54 NONAME
 	_ZN22CConnectionUiUtilities27NoWLANNetworksAvailableNoteEv @ 55 NONAME
 	_ZN22CConnectionUiUtilities28ConnectionErrorDiscreetPopupERKi @ 56 NONAME
+	_ZN22CConnectionUiUtilities32CancelConnectingViaDiscreetPopupEv @ 57 NONAME
+	_ZN22CConnectionUiUtilities26ConnectingViaDiscreetPopupEv @ 58 NONAME
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ActiveConnectViaNote.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +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:  Declaration of CActiveConnectViaNote
-*
-*/
-
-
-#ifndef __ACTIVE_CONNECT_VIA_NOTE_H__
-#define __ACTIVE_CONNECT_VIA_NOTE_H__
-
-// INCLUDES
-#include "ConnectionUiUtilitiesCommon.h"
-#include <e32base.h>
-#include <cmmanager.h>
-
-// FORWARD DECLARATIONS
-class CConnectViaNoteNotif;
-class CGulIcon;
-class CEikImage;
-
-
-/**
- * CActiveConnectViaNote class,
- * an active object for COfflineWlanDisabledNoteNotif
- */     
-NONSHARABLE_CLASS( CActiveConnectViaNote ) : public CActive
-{
-public:
-    /**
-    * Constructor
-    */    
-    CActiveConnectViaNote( CConnectViaNoteNotif* aNotif, 
-                           const TConnUiUiDestConnMethodNoteId aData );
-
-    /**
-    * Launch ConnectViaNote setactive and starts active object
-    */    
-    void LaunchActiveConnectViaNote();
-    
-    /**
-    * Destructor
-    */
-    virtual ~CActiveConnectViaNote();
-
-protected:
-    /**
-    * DoCancel from CActive
-    */    
-    virtual void DoCancel();
-      
-    /**
-    * RunL from CActive
-    */      
-    virtual void RunL();
-    
-    /**
-    * GetDialogTextL() 
-    * @return 
-    */
-    HBufC* GetDialogTextL();
-
-    /**
-    * GetDestinationNameLC() 
-    * @param  aDestId
-    * @return 
-    */
-    HBufC* GetDestinationNameLC( const TUint32 aDestId );
-    
-    /**
-    * GetConnectionMethodNameLC
-    * @param aConnMId
-    * @return
-    */
-    HBufC* GetConnectionMethodNameLC( const TUint32 aConnMId );
-    
-    /**
-    * CreateEikImageFromCGulIconLC
-    * @return CEikImage*
-    */
-    CEikImage* CreateEikImageFromCGulIconLC();    
-    
-protected:
-    TRequestStatus* iClientStatus;   ///< used for complete runl, not owned 
-    CConnectViaNoteNotif* iNotif; ///< poiter to notifer, not owned
-    CGulIcon* iIcon;    
-    
-    TConnUiUiDestConnMethodNoteId iData;
-    RCmManager iCmManager;    
-};         
-
-#endif // __ACTIVE_CONNECT_VIA_NOTE_H__
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ActiveSelectWLanDlgPlugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ActiveSelectWLanDlgPlugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,6 @@
 #define __ACTIVE_SELECT_WLAN_DLG_PLUGIN_H__
 
 // INCLUDES
-#include <e32base.h>
 #include "SelectWLanDlgPlugin.h"
 #include "SelectWLANDlg.h"
 #include "WlanNetworkDataProvider.h"
@@ -58,9 +57,9 @@
     /**
     * Timer callback of iPeridoc.
     */
-    void DoTick();
-
-
+    void DoTick();    
+      
+        
 protected:
     /**
     * ConstructL 
@@ -109,18 +108,6 @@
     */
     void DestroyResultsListDialog();
     
-    /**
-    * Destroy results dialog
-    */
-    void DestroyAsyncWaitTrigger();
-
-
-private:
-    /**
-     * Start wait note
-     */
-    static TInt StartWaitNoteL( TAny* aObject );
-
 
 protected:
     
@@ -138,9 +125,6 @@
     
     CAknWaitDialog* iWaitDialog;
     
-    CAsyncCallBack* iAsyncWaitTrigger;
-    
-    TInt iRefreshInterval;
 };     
 
 #endif // __ACTIVE_SELECT_WLAN_DLG_PLUGIN_H__
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +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:  Implementation of class CConfirmationQuery.
-*
-*/
-
-
-#ifndef __CONFIRMATION_QUERY_H__
-#define __CONFIRMATION_QUERY_H__
-
-// INCLUDES
-#include <aknmessagequerydialog.h>
-#include <ConnectionUiUtilities.h>
-#include "ExpiryTimerCallback.h"
-// FORWARD DECLARATIONS
-class CConfirmationQueryNotif;
-class CExpiryTimer;
-
-// CLASS DECLARATIONS
-
-/**
- * Class implements a query dialog in home network.
- */
-NONSHARABLE_CLASS( CConfirmationQuery ) : public CAknListQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-        /**
-        * Constructor the CConfirmationQuery class
-        * @param aNotif notifier pointer
-        * @param aNameOfConnMethod 
-        * @param aUIId    
-        * @return -
-        */
-        CConfirmationQuery( CConfirmationQueryNotif* aNotif );
-
-        /**
-        * Exit function the CConfirmationQuery
-        * @param aButtonId 
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-    
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-        
-        /**
-        * Destructor
-        */
-        virtual ~CConfirmationQuery();     
-
-        /**
-        * Tries to exit the dialog when the specified button is pressed, if this 
-        * button should exit the dialog.
-        *
-        * See @c OkToExitL() to determine which buttons can exit the dialog.
-        * 
-        * This will fail if user exit is prevented by the 
-        * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag
-        * is not set and the dialog has been cancelled it immediately deletes 
-        * itself.
-        * 
-        * @param aButtonId The id of the pressed button.
-        */
-        void TryExitL( TInt aButtonId );
-        
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType);
-        
-        /**
-        * Sets the available choices for the query into the class variable
-        * @param    aChoices RArray<TInt>
-        */
-        void SetChoices( RArray<TMsgQueryLinkedResults> aChoices );
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();    
-
-    private:
-        CConfirmationQueryNotif* iNotif;  // Pointer to the Notifier, not owned
-        TBool iButtonGroupPreviouslyChanged;    // Was ButtonGroup modified?
-        
-        RArray<TMsgQueryLinkedResults> iChoiceIds;
-        // For base class, unused.
-        TInt iDummy;
-		
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-/**
- * Class implements a query dialog in visitor network.
- */
-NONSHARABLE_CLASS( CConfirmationQueryVisitor ) : public CAknMessageQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-        /**
-        * Constructor the CConfirmationQuery class
-        * @param aNotif notifier pointer
-        * @param aNameOfConnMethod 
-        * @param aUIId    
-        * @return -
-        */
-        CConfirmationQueryVisitor( CConfirmationQueryNotif* aNotif );
-
-        /**
-        * Exit function the CConfirmationQuery
-        * @param aButtonId 
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-    
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-        
-        /**
-        * Destructor
-        */
-        virtual ~CConfirmationQueryVisitor();     
-
-        /**
-        * Tries to exit the dialog when the specified button is pressed, if this 
-        * button should exit the dialog.
-        *
-        * See @c OkToExitL() to determine which buttons can exit the dialog.
-        * 
-        * This will fail if user exit is prevented by the 
-        * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag
-        * is not set and the dialog has been cancelled it immediately deletes 
-        * itself.
-        * 
-        * @param aButtonId The id of the pressed button.
-        */
-        void TryExitL( TInt aButtonId );
-        
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType);
-        
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();    
-
-    private:
-        CConfirmationQueryNotif* iNotif;  // Pointer to the Notifier, not owned
-                
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-#endif  // __CONFIRMATION_QUERY_H__
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQueryNotif.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +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:  Declaration of CConfirmationQueryNotif
-*
-*/
-
-
-
-#ifndef __CONFIRMATIONQUERYNOTIF_H__
-#define __CONFIRMATIONQUERYNOTIF_H__
-
-
-// INCLUDES
-#include "ConnectionDialogsNotifBase.h"
-#include "ConnectionUiUtilitiesCommon.h"
-#include <etel3rdparty.h>
-#include <ConnectionUiUtilities.h>
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class CConfirmationQuery;
-class CConfirmationQueryVisitor;
-class CRoamingInfo;
-
-/**
- * OfflineWlanNoteNotif class
- */
-NONSHARABLE_CLASS( CConfirmationQueryNotif ) 
-                                        : public CConnectionDialogsNotifBase
-    {
-    public:
-    
-        /**
-        * Constructor.
-        */
-        CConfirmationQueryNotif();
-
-        /**
-        * NewL function
-        * @param  -
-        * return CConfirmationQueryNotif*
-        */
-        static CConfirmationQueryNotif* NewL( 
-                                        const TBool aResourceFileResponsible );
-
-        /**
-         * ~CConfirmationQueryNotif() destructor
-         * @param  -
-         * return  -
-         */
-         virtual ~CConfirmationQueryNotif();
-                
-        /**
-        * RegisterL register the client notifier function
-        * @param  -
-        * return TNotifierInfo
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * Start the Notifier
-        * @param  aBuffer    Buffer
-        * @param  aReplySlot Identifies which message argument to use for the 
-        *                    reply. This message argument will refer to a 
-        *                    modifiable descriptor, a TDes8 type, into which
-        *                    data can be returned. 
-        * @param  aMessage   Message
-        * return -
-        */
-        void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                     const RMessagePtr2& aMessage );
-
-        /**
-        * Cancel() the notifier
-        * @param  -
-        * return -
-        */
-        void Cancel();
-
-
-    public:
-
-        /**
-        * CompleteL the notifier is complete
-        * @param  aStatus status
-        * return  -
-        */
-        void CompleteL( TInt aStatus );
-
-        /**
-        * Sets the selected choise
-        * @param  aChoice TInt 
-        * return  -
-        */
-        void SetSelectedChoiceL ( TInt aChoice );
-
-        void SetVisitorNetwork();
-      
-    private:
-        
-        /**
-         * Callback is called to launch dialog asynchronously
-         * @param  aObject Pointer to notifier object.
-         * return  Error code
-         */  
-        static TInt LaunchDialogL( TAny* aObject );
-        
-        /**
-         * Callback is called to launch dialog asynchronously
-         * @param  aObject Pointer to notifier object.
-         * return  Error code
-         */  
-        static TInt LaunchDialogVisitorL( TAny* aObject );
-        
-    private:
-        TBool iTryNextBest;
-        TUint32 iConnMethod;
-        CConfirmationQuery*        iDialog;         // Home network dialog
-        CConfirmationQueryVisitor* iDialogVisitor;  // Visitor network dialog
-        TBool iIsVisitorNetwork;
-        TMsgQueryLinkedResults iChoice;
-        TConnUiUiDestConnMethodNoteId iNoteInfo;
-        CAsyncCallBack *iLaunchDialogAsync; // One shot active object
-    };
-
-#endif // __CONFIRMATIONQUERYNOTIF_H__
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConnectViaNoteNotif.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +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:  Declaration of CConnectViaNoteNotif
-*
-*/
-
-
-
-#ifndef __CONNECT_VIA_NOTE_H__
-#define __CONNECT_VIA_NOTE_H__
-
-
-// INCLUDES
-#include "ConnectionDialogsNotifBase.h"
-
-// FORWARD DECLARAIONS
-class CActiveConnectViaNote;
-/**
- * ConnectViaNoteNotif class
- */
-NONSHARABLE_CLASS( CConnectViaNoteNotif ) : public CConnectionDialogsNotifBase
-    {
-public:
-    
-    /**
-    * NewL function
-    * @param  -
-    * return CConnectViaNoteNotif*
-    */
-    static CConnectViaNoteNotif* NewL( const TBool aResourceFileResponsible );
-
-    /**
-    * RegisterL register the client notifier function
-    * @param  -
-    * return TNotifierInfo
-    */
-    TNotifierInfo RegisterL();
-
-    /**
-    * Start the Notifier
-    * @param  aBuffer    Buffer
-    * @param  aReplySlot Identifies which message argument to use for the 
-    *                    reply. This message argument will refer to a 
-    *                    modifiable descriptor, a TDes8 type, into which data
-    *                    can be returned. 
-    * @param  aMessage   Message
-    * return -
-    */
-    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                 const RMessagePtr2& aMessage );
-
-    /**
-    * Cancel() the notifier
-    * @param  -
-    * return -
-    */
-    void Cancel();
-
-public:
-    /**
-    * CompleteL the notifier is complete
-    * @param  aStatus status
-    * return  -
-    */
-    void CompleteL( TInt aStatus );
-
-private:    
-    CActiveConnectViaNote* iActiveNote; // owned
-    
-    };
-
-
-#endif // __CONNECT_VIA_NOTE_H__
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/NetworkInfoArray.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/NetworkInfoArray.h	Tue Aug 31 15:35:44 2010 +0300
@@ -83,7 +83,7 @@
         * @return index value of network in the array, or -1 if there
         * is no network the given Id
         */
-        TInt GetArrayIndex( TName aNetworkName ) const;
+        TInt GetArrayIndex( TName& aNetworkName ) const;
 
         /**
         * Add only new network to the array
@@ -125,4 +125,4 @@
         CArrayPtrFlat<CNetworkInfoBase>* iNetworkInfoArray;   ///< Owned.
     };
 
-#endif // NETWORKINFOARRAY_NOTIF_H_INCLUDED
\ No newline at end of file
+#endif // NETWORKINFOARRAY_NOTIF_H_INCLUDED
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/WepWpaQueryDlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/WepWpaQueryDlg.h	Tue Aug 31 15:35:44 2010 +0300
@@ -88,7 +88,7 @@
     * @param aResId resource id
     * @return -
     */
-    void CWepWpaQueryDlg::ShowInfoNoteL( TInt aResId );
+    void ShowInfoNoteL( TInt aResId );
     
     /**
     * PreLayoutDynInitL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/cellulardataconfirmation.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#ifndef __CELLULARDATACONFIRMATION_H__
+#define __CELLULARDATACONFIRMATION_H__
+
+#include <e32base.h>
+#include <ConnectionUiUtilities.h>
+#include <hb/hbcore/hbdevicedialogsymbian.h>
+#include "ConnectionDialogsNotifBase.h"
+#include "ConnectionUiUtilitiesCommon.h"
+
+class CDeviceDialogObserver;
+
+
+NONSHARABLE_CLASS ( CCellularDataConfirmation ) : public CConnectionDialogsNotifBase
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        */
+        static CCellularDataConfirmation* NewL( 
+                                const TBool aResourceFileResponsible );
+        
+        /**
+        * Destructor
+        */
+        ~CCellularDataConfirmation();
+        
+        /**
+        * Start the Notifier
+        * @param  aBuffer    Buffer
+        * @param  aReplySlot Identifies which message argument to use for the 
+        *                    reply. This message argument will refer to a 
+        *                    modifiable descriptor, a TDes8 type, into which
+        *                    data can be returned. 
+        * @param  aMessage   Message
+        * return -
+        */
+        void StartL( const TDesC8& aBuffer, 
+                    TInt aReplySlot, 
+                    const RMessagePtr2& aMessage );
+        
+        /**
+        * Cancel() the notifier
+        * @param  -
+        * return -
+        */
+        void Cancel();
+        
+        /**
+        * RegisterL register the client notifier function
+        * @param  -
+        * return TNotifierInfo
+        */
+        TNotifierInfo RegisterL();
+        
+        /**
+        * CompleteL the notifier is complete
+        * @param  aStatus status
+        * return  -
+        */
+        void CompleteL( TInt aStatus );
+        /**
+        * Sets the selected choice of the presented dialog
+        * @param  aChoice TInt 
+        * return  -
+        */
+        void SetSelectedChoice( TInt aChoice );
+       
+    private:
+        /**
+        * Constructor
+        */
+        CCellularDataConfirmation();
+    
+    private:
+        /** Pointer to the device dialog interface for handling the dialog */
+        CHbDeviceDialogSymbian* iDialog;
+        /** The observer to handle the data received from the orbit dialog */
+        CDeviceDialogObserver* iObserver;
+        /* The choice selected by the user from the dialog */
+        TMsgQueryLinkedResults iChoice;
+        /* Information if request was already completed, in case the
+         * observer receives the data signal and the signal about closing the
+         * dialog.
+         */
+        TBool iCompleted;
+        
+    
+    };
+
+#endif //__CELLULARDATACONFIRMATION_H__
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopup.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +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:  Declaration of CConnectingViaDiscreetPopup
- *
- */
-
-#ifndef CCONNECTINGVIADISCREETPOPUP_H
-#define CCONNECTINGVIADISCREETPOPUP_H
-
-// INCLUDES
-#include <e32base.h>	// For CActive, link against: euser.lib
-#include <cmmanager.h>
-
-#include "connectingviadiscreetpopupnotif.h"
-
-/**
- * CConnectingViaDiscreetPopup class
- */
-NONSHARABLE_CLASS( CConnectingViaDiscreetPopup ) : public CActive
-    {
-public:
-    /**
-     * Destructor
-     * Cancel and destroy
-     */
-    ~CConnectingViaDiscreetPopup();
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CConnectingViaDiscreetPopup* NewL(
-            CConnectingViaDiscreetPopupNotif* aNotif);
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CConnectingViaDiscreetPopup* NewLC(
-            CConnectingViaDiscreetPopupNotif* aNotif);
-
-public:
-    /**
-     * StartL Function for making the initial request
-     */
-    void StartL(TUint32 aIapId );
-
-private:
-    /**
-     * C++ constructor
-     */
-    CConnectingViaDiscreetPopup(CConnectingViaDiscreetPopupNotif* aNotif);
-
-    /**
-     * Second-phase constructor
-     */
-    void ConstructL();
-
-private:
-    /**
-     * From CActive
-     */
-    void RunL();
-
-    /**
-     * From CActive 
-     */
-    void DoCancel();
-
-    /**
-     * From CActive 
-     */
-    TInt RunError(TInt aError);
-
-private:
-
-    // Used for complete runl, not owned 
-    TRequestStatus* iClientStatus;
-
-    // Pointer to notifer, not owned
-    CConnectingViaDiscreetPopupNotif* iNotif;
-
-    // Handle to cmmanager interface
-    RCmManager icmManager;
-
-    // Bearer type from cmmanager
-    TUint iBearerType;
-
-    // Connection name - owned
-    HBufC* iConnectionName;
-
-    // Popup flags
-    TInt iPopupFlags;
-
-    };
-
-#endif // CCONNECTINGVIADISCREETPOPUP_H
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectingviadiscreetpopupnotif.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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:  Declaration of Generic Connection Ui Utilities Notifier
- *
- */
-
-#ifndef __CONNECTINGVIADISCREETPOPUPNOTIF_H__
-#define __CONNECTINGVIADISCREETPOPUPNOTIF_H__
-
-// INCLUDES
-#include "ConnectionDialogsNotifBase.h"
-
-//FORWARD DECLARATION
-class CConnectingViaDiscreetPopup;
-
-/**
- * CConnectingViaDiscreetPopupNotif class
- */
-NONSHARABLE_CLASS( CConnectingViaDiscreetPopupNotif ) : public CConnectionDialogsNotifBase
-    {
-public:
-    /**
-     * NewL function
-     * @param  -
-     * return CConnectingViaDiscreetPopupNotif*
-     */
-    static CConnectingViaDiscreetPopupNotif* NewL(
-            const TBool aResourceFileResponsible);
-
-    /**
-     * RegisterL register the client notifier function
-     * @param  -
-     * return TNotifierInfo
-     */
-    TNotifierInfo RegisterL();
-
-    /**
-     * Start the Notifier
-     * @param  aBuffer    Buffer
-     * @param  aReplySlot Identifies which message argument to use for the 
-     *                    reply. This message argument will refer to a 
-     *                    modifiable descriptor, a TDes8 type, into which
-     *                    data can be returned. 
-     * @param  aMessage   Message
-     * return -
-     */
-    void StartL(const TDesC8& aBuffer, TInt aReplySlot,
-            const RMessagePtr2& aMessage);
-
-    /**
-     * Cancel() the notifier
-     * @param  -
-     * return -
-     */
-    void Cancel();
-
-    /**
-     * CompleteL the notifier is complete
-     * @param  aStatus status
-     * return  -
-     */
-    void CompleteL(TInt aStatus);
-
-protected:
-    /**
-     * Constructor
-     */
-    CConnectingViaDiscreetPopupNotif();
-
-protected:
-
-    // pointer to active object, owned
-    CConnectingViaDiscreetPopup* iActiveNote;
-
-    };
-
-#endif //__CONNECTINGVIADISCREETPOPUPNOTIF_H__
-// End of File
-
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectionerrordiscreetpopup.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Declaration of CConnectingViaDiscreetPopup
- *
- */
-
-#ifndef CCONNECTIONERRORDISCREETPOPUP_H
-#define CCONNECTIONERRORDISCREETPOPUP_H
-
-// INCLUDES
-#include <e32base.h>	// For CActive, link against: euser.lib
-#include <cmmanager.h>
-
-#include "connectionerrordiscreetpopupnotif.h"
- 
-/**
- * CConnectingViaDiscreetPopup class
- */
-NONSHARABLE_CLASS( CConnectionErrorDiscreetPopup ) : public CActive
-    {
-public:
-    /**
-     * Destructor
-     * Cancel and destroy
-     */
-    ~CConnectionErrorDiscreetPopup();
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CConnectionErrorDiscreetPopup* NewL(
-            CConnectionErrorDiscreetPopupNotif* aNotif );
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CConnectionErrorDiscreetPopup* NewLC(
-            CConnectionErrorDiscreetPopupNotif* aNotif );
-
-public:
-    /**
-     * StartL Function for making the initial request
-     */
-    void StartL( TUint32 aErrCode );
-
-private:
-    /**
-     * C++ constructor
-     */
-    CConnectionErrorDiscreetPopup( CConnectionErrorDiscreetPopupNotif* aNotif );
-
-    /**
-     * Second-phase constructor
-     */
-    void ConstructL();
-
-private:
-    /**
-     * From CActive
-     */
-    void RunL();
-
-    /**
-     * From CActive 
-     */
-    void DoCancel();
-
-    /**
-     * From CActive 
-     */
-    TInt RunError( TInt aError );
-    
-    /**
-     * Resolves error code saved in iErrorCode.
-     * @return EFalse when resolve failed.
-     */
-    TBool ResolveErrorCode( TInt& aText1, TInt& aText2,
-            TInt& aBitmap, TInt& aMask );
-
-private:
-
-    // Used for complete runl, not owned 
-    TRequestStatus* iClientStatus;
-
-    // Pointer to notifer, not owned
-    CConnectionErrorDiscreetPopupNotif* iNotif;
-    
-    // Error code to be shown
-    TInt iErrorCode;
-    
-    // Handle to cmmanager interface
-    RCmManager icmManager;
-
-    };
-
-#endif // CCONNECTIONERRORDISCREETPOPUP_H
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/connectionerrordiscreetpopupnotif.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Declaration of Generic Connection Ui Utilities Notifier
- *
- */
-
-#ifndef __CONNECTIONERRORDISCREETPOPUPNOTIF_H__
-#define __CONNECTIONERRORDISCREETPOPUPNOTIF_H__
-
-// INCLUDES
-#include "ConnectionDialogsNotifBase.h"
-
-//FORWARD DECLARATION
-class CConnectionErrorDiscreetPopup;
-
-/**
- * CConnectionErrorDiscreetPopupNotif class
- */
-NONSHARABLE_CLASS( CConnectionErrorDiscreetPopupNotif ) : 
-public CConnectionDialogsNotifBase
-    {
-public:
-    /**
-     * NewL function
-     * @param  -
-     * return CConnectionErrorDiscreetPopupNotif*
-     */
-    static CConnectionErrorDiscreetPopupNotif* NewL(
-            const TBool aResourceFileResponsible );
-
-    /**
-     * RegisterL register the client notifier function
-     * @param  -
-     * return TNotifierInfo
-     */
-    TNotifierInfo RegisterL();
-
-    /**
-     * Start the Notifier
-     * @param  aBuffer    Buffer
-     * @param  aReplySlot Identifies which message argument to use for the 
-     *                    reply. This message argument will refer to a 
-     *                    modifiable descriptor, a TDes8 type, into which
-     *                    data can be returned. 
-     * @param  aMessage   Message
-     * return -
-     */
-    void StartL( const TDesC8& aBuffer, TInt aReplySlot,
-            const RMessagePtr2& aMessage );
-
-    /**
-     * Cancel() the notifier
-     * @param  -
-     * return -
-     */
-    void Cancel();
-
-    /**
-     * CompleteL the notifier is complete
-     * @param  aStatus status
-     * return  -
-     */
-    void CompleteL( TInt aStatus );
-
-protected:
-    /**
-     * Constructor
-     */
-    CConnectionErrorDiscreetPopupNotif();
-
-protected:
-
-    // pointer to active object, owned
-    CConnectionErrorDiscreetPopup* iActiveNote;
-
-    };
-
-#endif //__CONNECTINGVIADISCREETPOPUPNOTIF_H__
-// End of File
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#ifndef __DEVICEDIALOGOBSERVER_H__
+#define __DEVICEDIALOGOBSERVER_H__
+
+#include "cellulardataconfirmation.h"
+
+NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        */
+        static CDeviceDialogObserver* NewL( CCellularDataConfirmation* aNotifier );
+        
+        /**
+        * Destructor
+        */
+        ~CDeviceDialogObserver();
+        
+        /**
+        * Handles the user input received from the dialog
+        * @param    aData CHbSymbianVariantMap&
+        */
+        void DataReceived(CHbSymbianVariantMap& aData);
+        
+        /**
+        * Handles the closing of the dialog
+        * @param    aCompletionCode TInt
+        */
+        void DeviceDialogClosed(TInt /*aCompletionCode*/);
+        /**
+        * Sets the available choices for the query into the class variable
+        * @param    aChoices RArray<TInt>
+        */
+        void SetChoices( RArray<TMsgQueryLinkedResults>& aChoices );
+    private:
+        /**
+        * Constructor
+        */
+        CDeviceDialogObserver( CCellularDataConfirmation* aNotifier );
+        
+    private:
+        /* Pointer to the object that triggered the dialog opening,
+         * needed to update the information about the user input.
+         */
+        CCellularDataConfirmation* iNotifier;
+        /* The order of the buttons in the dialog, in order to map the
+         * data received from the dialog into the actual selected choice.
+         */
+        RArray<TMsgQueryLinkedResults> iChoiceIds;
+    };
+
+#endif /* __DEVICEDIALOGOBSERVER_H__ */
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/nowlannetworksavailablenotif.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of CNoWLANNetworksAvailableNotif
-*
-*/
-
-
-
-#ifndef __NO_WLAN_NETWORKS_AVAILABLE_NOTE_H__
-#define __NO_WLAN_NETWORKS_AVAILABLE_NOTE_H__
-
-// INCLUDES
-#include "ConnectionDialogsNotifBase.h"
-#include "nowlansdiscreetpopup.h"
-
-//FORWARD DECLARATION
-class CNoWlansDiscreetPopup;
-
-/**
- * CNoWLANNetworksAvailableNotif class
- */
-NONSHARABLE_CLASS( CNoWLANNetworksAvailableNotif ) 
-                                        : public CConnectionDialogsNotifBase
-    {
-    public:
-        /**
-        * NewL function
-        * @param  -
-        * return CNoWLANNetworksAvailableNotif*
-        */
-        static CNoWLANNetworksAvailableNotif* NewL( 
-                                        const TBool aResourceFileResponsible );
-        
-        /**
-        * RegisterL register the client notifier function
-        * @param  -
-        * return TNotifierInfo
-        */
-        TNotifierInfo RegisterL();
-
-        /**
-        * Start the Notifier
-        * @param  aBuffer    Buffer
-        * @param  aReplySlot Identifies which message argument to use for the 
-        *                    reply. This message argument will refer to a 
-        *                    modifiable descriptor, a TDes8 type, into which
-        *                    data can be returned. 
-        * @param  aMessage   Message
-        * return -
-        */
-        void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                     const RMessagePtr2& aMessage );
-                 
-        /**
-        * Cancel() the notifier
-        * @param  -
-        * return -
-        */
-        void Cancel();         
-    
-        /**
-        * CompleteL the notifier is complete
-        * @param  aStatus status
-        * return  -
-        */
-        void CompleteL( TInt aStatus );
-                     
-    protected:    
-        /**
-        * Constructor
-        */
-        CNoWLANNetworksAvailableNotif();    
-    
-    protected:
-        // pointer to active object, owned
-        CNoWlansDiscreetPopup* iActiveNote;
-
-    };    
-
-#endif //__NO_WLAN_NETWORKS_AVAILABLE_NOTE_H__
-
-// End of File
-    
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/nowlansdiscreetpopup.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Declaration of CNoWlansDiscreetPopup
- *
- */
-
-#ifndef CNOWLANSDISCREETPOPUP_H
-#define CNOWLANSDISCREETPOPUP_H
-
-// INCLUDES
-#include <e32base.h>	// For CActive, link against: euser.lib
-
-#include "ConnectionDialogsNotifBase.h"
- 
-/**
- * CConnectingViaDiscreetPopup class
- */
-NONSHARABLE_CLASS( CNoWlansDiscreetPopup ) : public CActive
-    {
-public:
-    /**
-     * Destructor
-     * Cancel and destroy
-     */
-    virtual ~CNoWlansDiscreetPopup();
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CNoWlansDiscreetPopup* NewL(
-            CConnectionDialogsNotifBase* aNotif );
-
-    /**
-     * NewL function 
-     * Two-phased constructor.
-     * @param  aNotif a pointer to notifier plugin
-     */
-    static CNoWlansDiscreetPopup* NewLC(
-            CConnectionDialogsNotifBase* aNotif );
-
-public:
-    /**
-     * StartL Function for making the initial request
-     */
-    void StartL();
-
-private:
-    /**
-     * C++ constructor
-     */
-    CNoWlansDiscreetPopup( CConnectionDialogsNotifBase* aNotif );
-
-    /**
-     * Second-phase constructor
-     */
-    void ConstructL();
-
-private:
-    /**
-     * From CActive
-     */
-    void RunL();
-
-    /**
-     * From CActive 
-     */
-    void DoCancel();
-
-    /**
-     * From CActive 
-     */
-    TInt RunError( TInt aError );
-    
-private:
-    // Used for complete runl, not owned 
-    TRequestStatus* iClientStatus;
-
-    // Pointer to notifer, not owned
-    CConnectionDialogsNotifBase* iNotif;
-    };
-
-#endif // CNOWLANSDISCREETPOPUP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/wlanpowersavetest.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialog that implements WLAN Power Save Testing notification
+*
+*/
+
+
+#ifndef __POWERSAVETEST_QUERY_H__
+#define __POWERSAVETEST_QUERY_H__
+
+// INCLUDES
+#include <aknmessagequerydialog.h>
+
+// FORWARD DECLARATIONS
+class CWlanPowerSaveQueryNotif;
+
+
+// CLASS DECLARATIONS
+
+/**
+ * Class implements a query dialog.
+ */
+NONSHARABLE_CLASS( CWlanPowerSaveQuery ) : public CAknMessageQueryDialog 
+    {
+    public:
+        /**
+        * Constructor the CWlanPowerSaveQuery class
+        * @param aNotif notifier pointer  
+        * @return -
+        */
+        CWlanPowerSaveQuery( CWlanPowerSaveQueryNotif* aNotif );
+
+        /**
+        * Exit function the CWlanPowerSaveQuery
+        * @param aButtonId 
+        * @return TBool exit or no
+        */
+        virtual TBool OkToExitL( TInt aButtonId );
+    
+        /**
+        * Destructor
+        */
+        virtual ~CWlanPowerSaveQuery();     
+
+        /** 
+        * From @c CCoeControl.
+        *
+        * Handles key events.
+        * 
+        * If a control wishes to process key events, it should implement this
+        * function. The implementation must ensure that the function returns 
+        * @c EKeyWasNotConsumed if it does not do anything in response to a 
+        * key event, otherwise, other controls or dialogs may be prevented 
+        * from receiving the key event. If it is able to process the event it 
+        * should return @c EKeyWasConsumed.
+        * 
+        * @param aKeyEvent The key event. 
+        * @param aType The type of key event: @c EEventKey, @c EEventKeyUp or 
+        *        @c EEventKeyDown. 
+        * @return Indicates whether or not the key event was used
+        *         by this control. 
+        */
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode );
+
+        /**
+        * Tries to exit the dialog when the specified button is pressed, if this 
+        * button should exit the dialog.
+        *
+        * See @c OkToExitL() to determine which buttons can exit the dialog.
+        * 
+        * This will fail if user exit is prevented by the 
+        * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag
+        * is not set and the dialog has been cancelled it immediately deletes 
+        * itself.
+        * 
+        * @param aButtonId The id of the pressed button.
+        */
+        void TryExitL( TInt aButtonId );
+
+    private:
+        /**
+        * PreLayoutDynInitL
+        * @param    -
+        */
+        virtual void PreLayoutDynInitL();    
+
+    private:
+        CWlanPowerSaveQueryNotif* iNotif;      // Pointer to the Notifier, not owned
+        TBool iButtonGroupPreviouslyChanged;   // Was ButtonGroup modified?
+    };
+
+
+#endif  // __POWERSAVETEST_QUERY_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/wlanpowersavetestnotif.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Notifier part for WLAN Power Save Testing notification dialog
+*
+*/
+
+#ifndef __POWERSAVETESTQUERYNOTIF_H__
+#define __POWERSAVETESTQUERYNOTIF_H__
+
+
+// INCLUDES
+#include <e32base.h>
+
+#include "ConnectionDialogsNotifBase.h"
+
+// FORWARD DECLARATIONS
+class CWlanPowerSaveQuery;
+
+/**
+ * OfflineWlanNoteNotif class
+ */
+NONSHARABLE_CLASS( CWlanPowerSaveQueryNotif ) 
+                                        : public CConnectionDialogsNotifBase
+    {
+    public:
+    
+        /**
+        * NewL function
+        * @param  -
+        * return CWlanPowerSaveQueryNotif*
+        */
+        static CWlanPowerSaveQueryNotif* NewL( 
+                                        const TBool aResourceFileResponsible );
+                                        
+        /**
+        * ~CWlanPowerSaveQueryNotif() destructor
+        * @param  -
+        * return  -
+        */
+        virtual ~CWlanPowerSaveQueryNotif();
+                                
+
+        /**
+        * RegisterL register the client notifier function
+        * @param  -
+        * return TNotifierInfo
+        */
+        TNotifierInfo RegisterL();
+
+        /**
+        * Start the Notifier
+        * @param  aBuffer    Buffer
+        * @param  aReplySlot Identifies which message argument to use for the 
+        *                    reply. This message argument will refer to a 
+        *                    modifiable descriptor, a TDes8 type, into which
+        *                    data can be returned. 
+        * @param  aMessage   Message
+        * return -
+        */
+        void StartL( const TDesC8&       aBuffer, 
+                     TInt                aReplySlot, 
+                     const RMessagePtr2& aMessage );
+
+        /**
+        * Cancel() the notifier
+        * @param  -
+        * return -
+        */
+        void Cancel();
+
+    public:
+
+        /**
+        * CompleteL the notifier is complete
+        * @param  aStatus status
+        * return  -
+        */
+        void CompleteL( TInt aStatus );
+
+         /**
+        * Callback is called when user selects dialog's link
+        * @param  aObject Pointer to notifier object.
+        * return  Error code
+        */  
+        static TInt DisableTestLinkL( TAny* aObject );
+        
+    private:        
+
+        /**
+        * Constructor.
+        */
+        CWlanPowerSaveQueryNotif();
+        
+        /**
+        * Exits the dialog.
+        */
+        void DoDisableTestLinkL();
+        
+    private:
+        CWlanPowerSaveQuery* iDialog;    // Pointer to the dialog
+        TBool                iDisable;   // Disable notification in the future
+        CAsyncCallBack*      iExitAsync; // One shot active object
+    };
+
+
+#endif // __POWERSAVETESTQUERYNOTIF_H__
+
+// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveConnectViaNote.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +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:  Implementation of CActiveConnectViaNote.
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveConnectViaNote.h"
-#include "ConnectViaNoteNotif.h"
-#include "NoteDlgSuppressingSwitch.h"
-#include "ConnectionDialogsLogger.h"
-
-#include <ConnUiUtilsNotif.rsg>
-#include <StringLoader.h>
-
-#include <eikimage.h>
-#include <gulicon.h>
-
-#include <cmconnectionmethod.h>
-#include <cmdestination.h>
-
-#ifndef __WINS__
-#include <featmgr.h>
-#include <wlanmgmtclient.h>
-#include <cmmanagerext.h>
-#endif  // !__WINS__
-
-// CONSTANTS
-
-LOCAL_D const TInt KStringsGranularity = 2;
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CActiveConnectViaNote::CActiveConnectViaNote()
-// ---------------------------------------------------------
-//
-CActiveConnectViaNote::CActiveConnectViaNote( 
-                           CConnectViaNoteNotif* aNotif, 
-                           const TConnUiUiDestConnMethodNoteId aData ) 
-: CActive( KErrNone ), 
-  iNotif( aNotif ), 
-  iIcon( NULL ), 
-  iData( aData )
-    {
-    CActiveScheduler::Add( this );            
-    }
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::DoCancel()
-// ---------------------------------------------------------
-// 
-void CActiveConnectViaNote::DoCancel()
-    {
-    }
- 
-// ---------------------------------------------------------
-// CActiveConnectViaNote::RunL()
-// ---------------------------------------------------------
-//     
-void CActiveConnectViaNote::RunL()
-    {
-    CLOG_ENTERFN( "CActiveConnectViaNote::RunL" );  
-    
-    if( iStatus == KErrNone )
-        {
-        iCmManager.OpenL();
-        
-        HBufC* noteText = GetDialogTextL();
-        CleanupStack::PushL( noteText );
-                
-        CNoteDlgSuppressingSwitch* dialog = new (ELeave) 
-                            CNoteDlgSuppressingSwitch( 
-                            REINTERPRET_CAST( CEikDialog**, &dialog ) );
-        CleanupStack::PushL( dialog );
-        
-        CEikImage* image = CreateEikImageFromCGulIconLC();
-        dialog->SetIconL( image ); //The dialog takes ownership of the pointer
-        CleanupStack::Pop( image );
-        
-        CleanupStack::Pop( dialog );
-
-        TInt resId = R_CONNECTING_VIA_INFO_NOTE;    
-        switch( iData.iNoteId )
-            {
-            case EConnectedViaDestConnMethodConfirmationNote:
-            case EConnectedViaConnMethodConfirmationNote:
-                {
-                resId = R_CONNECTED_VIA_CONFIRM_NOTE;
-                break;
-                }
-            case EConnectingToConnMethodInfoNote:
-            default :
-                {                
-                break;
-                }
-            }
-            
-        dialog->PrepareLC( resId );
-        dialog->ActivateL();
-        dialog->SetCurrentLabelL( EGeneralNote, noteText->Des() );
-        
-        dialog->RunDlgLD( CAknNoteDialog::ELongTimeout, 
-                          CAknNoteDialog::ENoTone );
-                                         
-        CleanupStack::PopAndDestroy( noteText );
-        
-        CLOG_WRITE( "CActiveConnectViaNote::RunL: Completing with KErrNone" );
-
-        iNotif->CompleteL( KErrNone );                     
-        }     
-    
-    CLOG_LEAVEFN( "CActiveConnectViaNote::RunL" );  
-    }
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::LaunchActiveConnectViaNote()
-// ---------------------------------------------------------
-//    
-void CActiveConnectViaNote::LaunchActiveConnectViaNote()
-    {
-    CLOG_ENTERFN( "CActiveConnectViaNote::LaunchActiveConnectViaNote" );  
-    
-    SetActive();    
-    iClientStatus = &iStatus;
-    User::RequestComplete( iClientStatus, KErrNone );    
-    }
-    
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::~CActiveConnectViaNote()
-// ---------------------------------------------------------
-//    
-CActiveConnectViaNote::~CActiveConnectViaNote()
-    {
-    Cancel();  
-    iCmManager.Close();  
-       
-    delete iIcon;
-    iIcon = NULL;      
-    }
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::GetDialogTextL()
-// ---------------------------------------------------------
-//    
-HBufC* CActiveConnectViaNote::GetDialogTextL()
-    {
-    HBufC* tempText = NULL;
-    switch( iData.iNoteId )
-        {
-        case EConnectedViaDestConnMethodConfirmationNote:
-            {
-            HBufC* destName = GetDestinationNameLC( iData.iDestination );
-            HBufC* cmName = GetConnectionMethodNameLC( 
-                                                    iData.iConnectionMethod );
-            CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 
-                                                        KStringsGranularity );
-            CleanupStack::PushL( strings );
-            
-            strings->AppendL( *destName );   
-            strings->AppendL( *cmName );
-            tempText = StringLoader::LoadL( 
-                                        R_QTN_NETW_CONSET_CONF_CONNECTED_TO,
-                                        *strings );
-
-            CleanupStack::PopAndDestroy( strings );  
-            CleanupStack::PopAndDestroy( cmName );
-            CleanupStack::PopAndDestroy( destName );
-            break;
-            }
-
-        case EConnectedViaConnMethodConfirmationNote:
-        case EConnectingToConnMethodInfoNote:
-        default:
-            {
-            HBufC* cmNname = GetConnectionMethodNameLC( 
-                                                    iData.iConnectionMethod );
-            tempText = StringLoader::LoadL( 
-                ( iData.iNoteId == EConnectedViaConnMethodConfirmationNote ) ?
-                R_QTN_NETW_CONSET_CONF_CONNECTED_VIA_METHOD : 
-                R_QTN_NETW_CONSET_INFO_ROAMING_TO,
-                *cmNname );
-            CleanupStack::PopAndDestroy( cmNname ); 
-            break;
-            }
-        }
-
-    return tempText;
-    }
-
-// ---------------------------------------------------------
-// CActiveConnectViaNote::GetDestinationNameLC()
-// ---------------------------------------------------------
-//    
-HBufC* CActiveConnectViaNote::GetDestinationNameLC( const TUint32 aDestId )
-    {
-    HBufC* tempDestName( NULL );
-        
-    RCmDestination destination = iCmManager.DestinationL( aDestId );    
-    CleanupClosePushL( destination );
-
-    tempDestName = destination.NameLC();
-    CleanupStack::Pop( tempDestName );  // tempDestName
-
-    CleanupStack::PopAndDestroy();  // destination
-    CleanupStack::PushL( tempDestName );
-            
-    return tempDestName;
-    }
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::GetConnectionMethodNameLC()
-// ---------------------------------------------------------
-//    
-HBufC* CActiveConnectViaNote::GetConnectionMethodNameLC( 
-                                                    const TUint32 aConnMId )
-    {
-    HBufC* tempCMName( NULL );
-    TBool isEasyWlan = EFalse;
-
-#ifndef __WINS__
-    
-    FeatureManager::InitializeLibL();
-    TBool isWlanSupported = 
-                    FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
-    FeatureManager::UnInitializeLib();
-
-    if ( isWlanSupported )
-        {
-        if ( iCmManager.EasyWlanIdL() == iData.iConnectionMethod )
-            {
-            TWlanSsid ssidConn;
-            CWlanMgmtClient *wlanMgmtClient = CWlanMgmtClient::NewL();
-            CleanupStack::PushL( wlanMgmtClient );
-
-            if ( !wlanMgmtClient->GetConnectionSsid( ssidConn ) )
-                {
-                tempCMName = HBufC::NewL( ssidConn.Length() );
-                tempCMName->Des().Copy( ssidConn ); 
-                isEasyWlan = ETrue;
-                }
-
-            wlanMgmtClient->CancelNotifications();
-            CleanupStack::PopAndDestroy( wlanMgmtClient );
-            }
-        }
-#endif  // !__WINS__
-    
-    CLOG_WRITEF( _L( "Connection Method id in CActiveConnectViaNote: %d" ), aConnMId );
-
-    RCmConnectionMethod connMethod = iCmManager.ConnectionMethodL( aConnMId );
-    CleanupClosePushL( connMethod );
-
-    TInt tempIcon = connMethod.GetIntAttributeL( CMManager::ECmBearerIcon );
-    CLOG_WRITEF( _L( "tempIcon in CActiveConnectViaNote: %d" ), tempIcon );
-    iIcon = REINTERPRET_CAST( CGulIcon*, tempIcon );
-    
-    if ( !isEasyWlan )
-        {
-        tempCMName = connMethod.GetStringAttributeL( CMManager::ECmName );
-        }
-    
-    CleanupStack::PopAndDestroy();  // connMethod
-    CleanupStack::PushL( tempCMName );
-    
-    return tempCMName;
-    }
-    
-// ---------------------------------------------------------
-// CActiveConnectViaNote::CreateEikImageFromCGulIconLC()
-// ---------------------------------------------------------
-//   
-CEikImage* CActiveConnectViaNote::CreateEikImageFromCGulIconLC()
-    {
-    CEikImage* tempImage = new ( ELeave ) CEikImage();
-    
-    if( iIcon )
-        {                
-        CFbsBitmap* bm = iIcon->Bitmap();
-        CFbsBitmap* m = iIcon->Mask();
-        tempImage->SetPicture( bm, m );
-        iIcon->SetBitmapsOwnedExternally( ETrue );                
-        }
-    
-    CleanupStack::PushL( tempImage );
-    return tempImage;    
-    }
-
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -19,7 +19,7 @@
 // INCLUDE FILES
 #include "ActiveOfflineWlanDisabledNote.h"
 
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <AknGlobalNote.h>
 #include <StringLoader.h>
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -18,7 +18,7 @@
 
 // INCLUDE FILES
 #include <AknWaitDialog.h>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <AknGlobalNote.h>
 #include <StringLoader.h>
 #include <centralrepository.h>
@@ -84,7 +84,11 @@
 CActiveSelectWLanDlgPlugin::CActiveSelectWLanDlgPlugin( 
                                                 CSelectWLanDlgPlugin* aPlugin )
 : CActive( EPriorityStandard ), 
-  iPlugin( aPlugin )
+  iPlugin( aPlugin ),
+  iWlanDataProv( NULL ),
+  iPeriodic( NULL),
+  iResultsListDialog( NULL),
+  iWaitDialog( NULL )
     {
     }
     
@@ -107,10 +111,7 @@
         iResultsListDialog = NULL;
         }
     
-    DestroyAsyncWaitTrigger();
-        
     delete iWlanDataProv;
-    iWlanDataProv = NULL;
 
     CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::~CActiveSelectWLanDlgPlugin " );
     }
@@ -137,8 +138,6 @@
     delete iWlanDataProv;
     iWlanDataProv = NULL;
 
-    DestroyAsyncWaitTrigger();
-
     CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DoCancel " );
     }
     
@@ -233,8 +232,6 @@
     {
     CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::RunL " );  
     
-    DestroyAsyncWaitTrigger();
-
     if ( iWaitDialog )
         {
         iWaitDialog->ProcessFinishedL();     
@@ -268,9 +265,12 @@
 
                 iResultsListDialog->ExecuteLD( R_SELECT_WLAN_LIST_QUERY );
 
-                if( iRefreshInterval )
+                TInt interval = GetRefreshInterval();
+                CLOG_WRITEF( _L( "interval : %d" ),  interval );
+
+                if( interval )
                     {
-                    StartTimerL( iRefreshInterval );
+                    StartTimerL( interval );
                     }
                 }
             }
@@ -325,7 +325,13 @@
 void CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL()
     {    
     CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " );  
+    
+    DestroyWaitDialog();
 
+    iWaitDialog = new( ELeave )CAknWaitDialog
+                    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ), ETrue );
+    iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE ); 
+    
     SetActive();    
 
 #ifdef __WINS__
@@ -334,24 +340,10 @@
 #else
     iWlanDataProv->RefreshScanInfo( iStatus );
 #endif
- 
-    // Start wait dialog asynchronously with low priority.
-    // The reason for this is that sometimes WLAN scan results
-    // are already in the cache and returned fast.
-    // When this happens there is no point in displaying wait note.
-    iRefreshInterval = GetRefreshInterval();
-    CLOG_WRITEF( _L( "interval : %d" ),  iRefreshInterval );
-
-    if ( !iAsyncWaitTrigger )
-        {
-        TCallBack cb( StartWaitNoteL, this );
-        iAsyncWaitTrigger = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityLow );
-        }
-    iAsyncWaitTrigger->CallBack();
 
     CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " );
     }
-
+    
 // ---------------------------------------------------------
 // CActiveSelectWLanDlgPlugin::GetRefreshInterval()
 // ---------------------------------------------------------
@@ -428,37 +420,5 @@
     CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DestroyResultsListDialog " );
     }
 
-// ---------------------------------------------------------
-// CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger()
-// ---------------------------------------------------------
-//
-void CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger()
-    {
-    if ( iAsyncWaitTrigger )
-        {
-        iAsyncWaitTrigger->Cancel();
-        delete  iAsyncWaitTrigger;
-        iAsyncWaitTrigger= NULL;
-        }
-    }
-
-// ---------------------------------------------------------
-// CActiveSelectWLanDlgPlugin::StartWaitNoteL()
-// ---------------------------------------------------------
-//
-TInt CActiveSelectWLanDlgPlugin::StartWaitNoteL( TAny* aObject )
-    {
-    CActiveSelectWLanDlgPlugin* myself = 
-            static_cast<CActiveSelectWLanDlgPlugin*>( aObject );
-    
-    myself->DestroyWaitDialog();
-    
-    myself->iWaitDialog = new( ELeave )CAknWaitDialog
-                        ( REINTERPRET_CAST( CEikDialog**, &(myself->iWaitDialog) ), ETrue );
-    myself->iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE );
-        
-    return 0;   
-    }
-
 // End of File
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -19,7 +19,7 @@
 // INCLUDE FILES
 #include "ActiveWLANNetworkUnavailableNote.h"
 
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <AknGlobalNote.h>
 #include <StringLoader.h>
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQuery.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +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:  Implementation of class CConfirmationQuery.
-*
-*/
-
-
-// INCLUDE FILES
-#include "ConfirmationQuery.h"
-#include "ConfirmationQueryNotif.h"
-#include "ConnectionUiUtilitiesCommon.h"
-#include "ConnectionDialogsLogger.h"
-#include "ExpiryTimer.h"
-
-#include <uikon/eiksrvui.h>
-#include <StringLoader.h>
-#include <ConnUiUtilsNotif.rsg>
-
-
-
-// CONSTANTS
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CConfirmationQuery::CConfirmationQuery
-// HOME NETWORK
-// ---------------------------------------------------------
-//
-CConfirmationQuery::CConfirmationQuery( CConfirmationQueryNotif* aNotif )
-: CAknListQueryDialog( &iDummy ),
-  iNotif( aNotif ),
-  iButtonGroupPreviouslyChanged( EFalse )
-   {
-   }
-
-// ---------------------------------------------------------
-// CConfirmationQuery::~CConfirmationQuery
-// ---------------------------------------------------------
-//
-CConfirmationQuery::~CConfirmationQuery()
-    {
-    STATIC_CAST( CEikServAppUi*, 
-                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    iChoiceIds.Close();
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQuery::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CConfirmationQuery::OkToExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CConfirmationQuery::OkToExitL" );
-    TBool result( EFalse );
-    TInt status = KErrCancel;
-    if ( aButtonId == EAknSoftkeySelect || 
-         aButtonId == EAknSoftkeyDone || aButtonId == EAknSoftkeyOk )
-        {
-        iNotif->SetSelectedChoiceL( iChoiceIds[ListBox()->CurrentItemIndex()] );
-        result = ETrue;
-        status = KErrNone;
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        status = KErrCancel;
-        result = ETrue;
-        }
-
-    if ( result )
-        {
-        CLOG_WRITEF( _L( "aButtonId = %d" ), aButtonId );
-        __ASSERT_DEBUG( iNotif, User::Panic( KErrNullPointer, KErrNone ) );
-        iNotif->CompleteL( status );
-        }
-
-    CLOG_LEAVEFN( "CConfirmationQuery::OkToExitL" );
-
-    return result;  
-    }
-    
-// ---------------------------------------------------------
-// CConfirmationQuery::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CConfirmationQuery::PreLayoutDynInitL()
-    {      
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQuery::TryExitL()
-// ---------------------------------------------------------
-//
-void CConfirmationQuery::TryExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CConfirmationQuery::TryExitL" );
-    CAknListQueryDialog::TryExitL( aButtonId );
-    CLOG_LEAVEFN( "CConfirmationQuery::TryExitL" );
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQuery::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CConfirmationQuery::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                 TEventCode aType)
-    {
-    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
-        {
-        // Let's not obscure the Dialer in the background
-        if ( iExpiryTimer )
-            {
-            iExpiryTimer->Cancel();
-            iExpiryTimer->StartShort();    
-            }
-        }
-    
-    return CAknListQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
-    } 
-
-// ---------------------------------------------------------
-// CConfirmationQuery::SetChoices
-// ---------------------------------------------------------
-//
-void CConfirmationQuery::SetChoices( RArray<TMsgQueryLinkedResults> aChoices )
-    {
-    iChoiceIds = aChoices;
-    }
-
-void CConfirmationQuery::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::CConfirmationQueryVisitor
-// VISITOR NETWORK
-// ---------------------------------------------------------
-//
-CConfirmationQueryVisitor::CConfirmationQueryVisitor( 
-        CConfirmationQueryNotif* aNotif )
-    : 
-    iNotif( aNotif )
-    {
-    }
-    
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::~CConfirmationQueryVisitor
-// ---------------------------------------------------------
-//
-CConfirmationQueryVisitor::~CConfirmationQueryVisitor()
-    {
-    STATIC_CAST( CEikServAppUi*, 
-        CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CConfirmationQueryVisitor::OkToExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CConfirmationQueryVisitor::OkToExitL" );
-    TBool result( EFalse );
-    TInt status = KErrCancel;
-    
-    if ( aButtonId == EAknSoftkeySelect || 
-         aButtonId == EAknSoftkeyDone || aButtonId == EAknSoftkeyOk )
-        {
-        iNotif->SetSelectedChoiceL( EMsgQueryThisTime );
-        result = ETrue;
-        status = KErrNone;
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        status = KErrCancel;
-        result = ETrue;
-        }
-
-    if ( result )
-        {
-        CLOG_WRITEF( _L( "aButtonId = %d" ), aButtonId );
-        if ( iNotif )
-            {
-            iNotif->CompleteL( status );
-            }
-        }
-
-    CLOG_LEAVEFN( "CConfirmationQueryVisitor::OkToExitL" );
-
-    return result;  
-    }
-    
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CConfirmationQueryVisitor::PreLayoutDynInitL()
-    {      
-    CAknMessageQueryDialog::PreLayoutDynInitL();
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::TryExitL()
-// ---------------------------------------------------------
-//
-void CConfirmationQueryVisitor::TryExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CConfirmationQueryVisitor::TryExitL" );
-    CAknMessageQueryDialog::TryExitL( aButtonId );
-    CLOG_LEAVEFN( "CConfirmationQueryVisitor::TryExitL" );
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQueryVisitor::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CConfirmationQueryVisitor::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                 TEventCode aType)
-    {
-    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
-        {
-        // Let's not obscure the Dialer in the background
-        if ( iExpiryTimer )
-            {
-            iExpiryTimer->Cancel();
-            iExpiryTimer->StartShort();    
-            }
-        }
-    
-    return CAknMessageQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
-    } 
-
-void CConfirmationQueryVisitor::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +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:  Implementation of CConfirmationQueryNotif.
-*
-*/
-
-
-// INCLUDE FILES
-#include "ConfirmationQueryNotif.h"
-#include "ConfirmationQuery.h"
-#include "ConnectionUiUtilitiesCommon.h"
-#include "ConnUiUtilsNotif.h"
-#include "ConnectionDialogsLogger.h"
-
-#include <ConnUiUtilsNotif.rsg>
-#include <StringLoader.h>
-
-#include <cmmanager.h>
-#include <cmmanagerext.h>
-#include <cmconnectionmethod.h>
-#include <cmdestination.h>
-#include <ConnectionUiUtilities.h>
-#include <datamobilitycommsdattypes.h>
-#include <ctsydomainpskeys.h>
-
-using namespace CMManager;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConfirmationQueryNotif::CConfirmationQueryNotif()
-// ---------------------------------------------------------
-//
-CConfirmationQueryNotif::CConfirmationQueryNotif()
-: iConnMethod( 0 ), 
-  iChoice( EMsgQueryCancelled )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CConfirmationQueryNotif* CConfirmationQueryNotif::NewL()
-// ---------------------------------------------------------
-//
-CConfirmationQueryNotif* CConfirmationQueryNotif::NewL( 
-                                        const TBool aResourceFileResponsible )
-    {
-    CConfirmationQueryNotif* self = new ( ELeave ) CConfirmationQueryNotif();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CConfirmationQueryNotif::~CConfirmationQueryNotif()
-// ---------------------------------------------------------
-//
-CConfirmationQueryNotif::~CConfirmationQueryNotif()
-    {   
-    if ( iLaunchDialogAsync )
-        {
-        delete iLaunchDialogAsync;
-        iLaunchDialogAsync = NULL;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConfirmationQueryNotif::RegisterL()
-// ---------------------------------------------------------
-//
-CConfirmationQueryNotif::TNotifierInfo CConfirmationQueryNotif::RegisterL()
-    {
-    iInfo.iUid = KUidConfirmationQuery;
-    iInfo.iPriority = ENotifierPriorityHigh;
-    iInfo.iChannel = KUidConfirmationQuery;
-
-    return iInfo;
-    }
-
-// ---------------------------------------------------------
-// void CConfirmationQueryNotif::StartL
-// ---------------------------------------------------------
-//
-void CConfirmationQueryNotif::StartL( const TDesC8& aBuffer, 
-                                    TInt aReplySlot,
-                                    const RMessagePtr2& aMessage )
-    {
-    if ( iLaunchDialogAsync )
-        {
-        if ( iLaunchDialogAsync->IsActive() )
-           {
-           // Dialog is already active
-           aMessage.Complete( KErrServerBusy );
-           return;
-           }    
-        }
-    
-    TInt err( KErrNone );
-    TInt emergencyCallState( 0 );
-    
-    // Check if emergency call is ongoing. If it is then do not display the dialog.    
-    err = RProperty::Get( KPSUidCtsyEmergencyCallInfo,
-            KCTSYEmergencyCallInfo,
-            emergencyCallState );
-
-    if ( (err == KErrNone && emergencyCallState) || ScreenSaverOn() || AutolockOn() )
-        {
-        // Emergency call, screen saver or autolock is active. Cancel the dialog. 
-        CLOG_WRITE( "CConfirmationQueryNotif::StartL: Emergency call, Screen saver or Autolock is active." );
-        aMessage.WriteL( aReplySlot, TPckg<TMsgQueryLinkedResults>( EMsgQueryCancelled ) );
-        aMessage.Complete( KErrNone );
-        return;
-        }
-
-    iChoice = EMsgQueryCancelled; 
-    TPckgBuf<TConnUiUiDestConnMethodNoteId> input;
-    input.Copy( aBuffer );
-    iNoteInfo = input();
-    
-    iReplySlot = aReplySlot;
-    iMessage = aMessage;
-    iCancelled = EFalse;
-
-    if ( iLaunchDialogAsync )
-        {
-        delete iLaunchDialogAsync;
-        iLaunchDialogAsync = NULL;
-        }
-    
-    if ( iNoteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork )
-        {
-        TCallBack cb( LaunchDialogL, this );
-        iLaunchDialogAsync = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );    
-        }
-    else
-        {
-        TCallBack cb( LaunchDialogVisitorL, this );
-        iLaunchDialogAsync = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );    
-        }
-
-    iLaunchDialogAsync->CallBack();
-    }
-
-
-// ---------------------------------------------------------
-// void CConfirmationQueryNotif::Cancel()
-// ---------------------------------------------------------
-//
-void CConfirmationQueryNotif::Cancel()
-    {
-    CLOG_ENTERFN( "CConfirmationQueryNotif::Cancel" );
-    if ( !iCancelled )
-        {
-        iCancelled = ETrue;
-        if ( !iMessage.IsNull() )
-            {
-            iMessage.Complete( KErrCancel );
-            }
-        
-        if ( iDialog )
-            {
-            delete iDialog;
-            iDialog = NULL;
-            }
-        
-        if ( iDialogVisitor )
-            {
-            delete iDialogVisitor;
-            iDialogVisitor = NULL;
-            }
-        }
-    
-    CLOG_LEAVEFN( "CConfirmationQueryNotif::Cancel" );
-    }
-
-
-// ---------------------------------------------------------
-// void CConfirmationQueryNotif::CompleteL( TInt aStatus )
-// ---------------------------------------------------------
-//
-void CConfirmationQueryNotif::CompleteL( TInt aStatus )
-    {  
-    CLOG_ENTERFN( "CConfirmationQueryNotif::CompleteL" );
-    iCancelled = ETrue;   
-    if ( !iMessage.IsNull() )
-        {  
-        if ( aStatus == KErrNone )
-            {
-            iMessage.WriteL( iReplySlot, TPckg<TMsgQueryLinkedResults>( iChoice ) );
-            }
-        iMessage.Complete( aStatus );
-        }
-      
-    Cancel();
-    
-    CLOG_LEAVEFN( "CConfirmationQueryNotif::CompleteL" );
-    }
-
-// ---------------------------------------------------------------
-// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice )
-// ----------------------------------------------------------------
-//
-void CConfirmationQueryNotif::SetSelectedChoiceL ( TInt aChoice )
-    {
-    CLOG_ENTERFN( "CConfirmationQueryNotif::SetSelectedChoiceL" );
-    iChoice = (TMsgQueryLinkedResults)aChoice;
-    CLOG_LEAVEFN( "CConfirmationQueryNotif::SetSelectedChoiceL" );
-    }
-
-// ---------------------------------------------------------
-// TInt CConfirmationQueryNotif::LaunchDialogL()
-// ---------------------------------------------------------
-//
-TInt CConfirmationQueryNotif::LaunchDialogL( TAny* aObject )
-    {
-    CLOG_ENTERFN( "CCConfirmationQueryNotif::LaunchDialogL" );
-    CConfirmationQueryNotif* myself =
-                            static_cast<CConfirmationQueryNotif*>( aObject );
-    
-    myself->iDialog = new ( ELeave ) CConfirmationQuery( myself );
-    myself->iDialog->PrepareLC( R_MESSAGE_QUERY );
-                            
-    // Create the list box items
-    RArray<TMsgQueryLinkedResults> choices;
-    CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(2);
-    CleanupStack::PushL( array );
-    HBufC* heading = NULL;
-    HBufC* messageBase = NULL;
-    HBufC* automatic = NULL;
-    HBufC* thisTime = NULL;
-
-    automatic = StringLoader::LoadLC( R_QTN_OCC_LIST_CS_DATA_HOME_NW_AUTOMATIC );
-    thisTime = StringLoader::LoadLC( R_QTN_OCC_LIST_CS_DATA_HOME_NW_THIS_TIME );
-                                
-    heading = StringLoader::LoadLC( R_QTN_OCC_PRMPT_CS_DATA_HOME_NW );
-    messageBase = StringLoader::LoadLC( R_QTN_OCC_DETAIL_CS_DATA_HOME_NW );
-    // the order of the query options depends on the location
-    choices.Append(EMsgQueryAutomatically);
-    choices.Append(EMsgQueryThisTime);
-    array->AppendL( *automatic );
-    array->AppendL( *thisTime );
- 
-    // Set the dialog heading and message text
-    myself->iDialog->Heading()->SetTextL(*heading);
-    myself->iDialog->MessageBox()->SetMessageTextL(messageBase);
-    CleanupStack::PopAndDestroy( messageBase );
-    CleanupStack::PopAndDestroy( heading );
-                            
-    // Set the options to the listbox
-    myself->iDialog->SetChoices(choices);
-
-    myself->iDialog->SetItemTextArray( array );
-    myself->iDialog->SetOwnershipType(ELbmOwnsItemArray); // ownership transferred to listbox
-    myself->iDialog->ListBox()->HandleItemAdditionL();
-                            
-    CleanupStack::Pop( thisTime );
-    CleanupStack::Pop( automatic );
-    CleanupStack::Pop( array );
-    myself->iDialog->RunLD();
-                                 
-    CLOG_LEAVEFN( "CConfirmationQueryNotif::LaunchDialogL" );
-    return 0;   
-    }
-
-// ---------------------------------------------------------
-// TInt CConfirmationQueryNotif::LaunchDialogVisitorL()
-// ---------------------------------------------------------
-//
-TInt CConfirmationQueryNotif::LaunchDialogVisitorL( TAny* aObject )
-    {
-    CLOG_ENTERFN( "CCConfirmationQueryNotif::LaunchDialogVisitorL" );
-    CConfirmationQueryNotif* myself =
-                            static_cast<CConfirmationQueryNotif*>( aObject );
-
-    myself->iDialogVisitor = new ( ELeave ) CConfirmationQueryVisitor( myself );
-    myself->iDialogVisitor->PrepareLC( R_VISITOR_QUERY );
-
-    HBufC* heading  = NULL;
-    HBufC* message  = NULL;
-    TInt resourceId = R_QTN_OCC_DETAIL_CS_DATA_FOREIGN_NW;
-    heading         = StringLoader::LoadLC( 
-                      R_QTN_OCC_PRMPT_CS_DATA_FOREIGN_NW );
-
-    CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 );
-    CleanupStack::PushL( strings );
-
-    HBufC* messageBase = StringLoader::LoadL( resourceId, *strings );
-    CleanupStack::PopAndDestroy( strings );
-
-    CleanupStack::PushL( messageBase );
-    TInt lenMsg = messageBase->Des().Length();
-
-    message = HBufC::NewL( lenMsg );
-    TPtr messagePtr = message->Des();
-    messagePtr.Append( messageBase->Des() ); 
-
-    CleanupStack::PopAndDestroy( messageBase );
-
-    CleanupStack::PushL( message );
-    myself->iDialogVisitor->SetMessageTextL( *message );
-    CleanupStack::PopAndDestroy( message );
-
-    myself->iDialogVisitor->QueryHeading()->SetTextL( *heading );
-    CleanupStack::PopAndDestroy( heading );
-
-    myself->iDialogVisitor->RunLD();
-    CLOG_LEAVEFN( "CConfirmationQueryNotif::LaunchDialogVisitorL" );
-    return 0;
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnUiUtilsNotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -26,12 +26,9 @@
 #include "EasyWepDlgNotif.h"
 #include "EasyWpaDlgNotif.h"
 #include "WLANNetworkUnavailableNoteNotif.h"
-#include "ConfirmationQueryNotif.h"
-#include "ConnectViaNoteNotif.h"
+#include "wlanpowersavetestnotif.h"
 #include "easywapidlgnotif.h"
-#include "nowlannetworksavailablenotif.h"
-#include "connectingviadiscreetpopupnotif.h"
-#include "connectionerrordiscreetpopupnotif.h"
+#include "cellulardataconfirmation.h"
 
 // CONSTANTS
 
@@ -49,8 +46,9 @@
 //
 EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
     {
-    CArrayPtrFlat<MEikSrvNotifierBase2>* array = new (ELeave) 
-                    CArrayPtrFlat<MEikSrvNotifierBase2>( KPluginGranularity );
+    CArrayPtrFlat<MEikSrvNotifierBase2>* array = NULL;
+    TRAP_IGNORE( array = new (ELeave) 
+                    CArrayPtrFlat<MEikSrvNotifierBase2>( KPluginGranularity ); )
 
     if ( array )
         {
@@ -113,12 +111,12 @@
     aNotifiers->AppendL( serNotify );
     CleanupStack::Pop( serNotify );      
 
-    serNotify = CConfirmationQueryNotif::NewL( resourceFileResponsible );
+    serNotify = CCellularDataConfirmation::NewL( resourceFileResponsible );
     CleanupStack::PushL( serNotify );
     aNotifiers->AppendL( serNotify );
     CleanupStack::Pop( serNotify );     
     
-    serNotify = CConnectViaNoteNotif::NewL( resourceFileResponsible );
+    serNotify = CWlanPowerSaveQueryNotif::NewL( resourceFileResponsible );
     CleanupStack::PushL( serNotify );
     aNotifiers->AppendL( serNotify );
     CleanupStack::Pop( serNotify );
@@ -128,20 +126,6 @@
     aNotifiers->AppendL( serNotify );
     CleanupStack::Pop( serNotify );    
 
-    serNotify = CConnectingViaDiscreetPopupNotif::NewL( resourceFileResponsible );
-    CleanupStack::PushL( serNotify );
-    aNotifiers->AppendL( serNotify );
-    CleanupStack::Pop( serNotify );
-    
-    serNotify = CNoWLANNetworksAvailableNotif::NewL( resourceFileResponsible );
-    CleanupStack::PushL( serNotify );
-    aNotifiers->AppendL( serNotify );
-    CleanupStack::Pop( serNotify );
-
-    serNotify = CConnectionErrorDiscreetPopupNotif::NewL( resourceFileResponsible );
-    CleanupStack::PushL( serNotify );
-    aNotifiers->AppendL( serNotify );
-    CleanupStack::Pop( serNotify );
     }
     
 // End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConnectViaNoteNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +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:  Implementation of CConnectViaNoteNotif.
-*
-*/
-
-
-// INCLUDE FILES
-#include "ConnectViaNoteNotif.h"
-#include "ConnectionUiUtilitiesCommon.h"
-#include "ActiveConnectViaNote.h"
-#include "ConnUiUtilsNotif.h"
-#include "ConnectionDialogsLogger.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectViaNoteNotif::TNotifierInfo CConnectViaNoteNotif::RegisterL()
-// ---------------------------------------------------------
-//
-CConnectViaNoteNotif::TNotifierInfo CConnectViaNoteNotif::RegisterL()
-    {
-    iInfo.iUid = KUidConnectViaNote;
-    iInfo.iPriority = ENotifierPriorityHigh;
-    iInfo.iChannel = KUidConnectViaNote;
-
-    return iInfo;
-    }
-
-// ---------------------------------------------------------
-// void CConnectViaNoteNotif::StartL
-// ---------------------------------------------------------
-//
-void CConnectViaNoteNotif::StartL( const TDesC8& aBuffer, 
-                                    TInt aReplySlot,
-                                    const RMessagePtr2& aMessage )
-    {
-    CLOG_ENTERFN( "CConnectViaNoteNotif::StartL" );  
-
-    TPckgBuf<TConnUiUiDestConnMethodNoteId> input;
-    input.Copy( aBuffer );
-    TConnUiUiDestConnMethodNoteId info = input();
-    
-    iReplySlot = aReplySlot;
-    iMessage = aMessage;
-    iCancelled = EFalse;
-
-    iActiveNote = new( ELeave ) CActiveConnectViaNote( this, info );
-        
-    iActiveNote->LaunchActiveConnectViaNote();       
-    }
-
-// ---------------------------------------------------------
-// void CConnectViaNoteNotif::Cancel()
-// ---------------------------------------------------------
-//
-void CConnectViaNoteNotif::Cancel()
-    {
-    CLOG_ENTERFN( "CConnectViaNoteNotif::Cancel" );  
-
-    if ( !iCancelled )
-        {
-        iCancelled = ETrue;
-        if ( !iMessage.IsNull() )
-            {   // No need to return an error code, we are just completing!
-            CLOG_WRITEF( _L( "Completing CConnectViaNoteNotif with KErrNone" ) );
-            iMessage.Complete( KErrNone );
-            }
-        
-        delete iActiveNote;
-        iActiveNote = NULL;
-        }
-
-    CLOG_LEAVEFN( "CConnectViaNoteNotif::Cancel" );  
-    }
-
-// ---------------------------------------------------------
-// void CConnectViaNoteNotif::CompleteL( TInt aStatus )
-// ---------------------------------------------------------
-//
-void CConnectViaNoteNotif::CompleteL( TInt aStatus )
-    {    
-    CLOG_ENTERFN( "CConnectViaNoteNotif::CompleteL" );  
-    CLOG_WRITEF( _L( "aStatus: %d" ),  aStatus );
-
-    delete iActiveNote;
-    iActiveNote = NULL;
-    iCancelled = ETrue;    
-    if ( !iMessage.IsNull() )
-        {
-        CLOG_WRITEF( _L( "Completing CConnectViaNoteNotif with %d" ),  aStatus );
-        iMessage.Complete( aStatus );
-        }
-    CLOG_LEAVEFN( "CConnectViaNoteNotif::CompleteL" );  
-    }
-
-
-// ---------------------------------------------------------
-// CConnectViaNoteNotif* CConnectViaNoteNotif::NewL()
-// ---------------------------------------------------------
-//
-CConnectViaNoteNotif* CConnectViaNoteNotif::NewL( 
-                                        const TBool aResourceFileResponsible )
-    {
-    CConnectViaNoteNotif* self = new ( ELeave ) CConnectViaNoteNotif();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-    return self;
-    }
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWepDlgNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWepDlgNotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #include "WepWpaQueryDlg.h"
 #include "ConnUiUtilsNotif.h"
 
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <StringLoader.h>
 #include <featmgr.h>
 
@@ -49,13 +49,6 @@
                                     TInt aReplySlot,
                                     const RMessagePtr2& aMessage )
     {
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog.
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-    
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     iCancelled = EFalse;
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWpaDlgNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/EasyWpaDlgNotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #include "WepWpaQueryDlg.h"
 #include "ConnUiUtilsNotif.h"
 
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <StringLoader.h>
 
 
@@ -48,13 +48,6 @@
                                     TInt aReplySlot,
                                     const RMessagePtr2& aMessage )
     {
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-    
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     iCancelled = EFalse;
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoArray.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoArray.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -37,6 +37,7 @@
 // ---------------------------------------------------------
 //
 CNetworkInfoArray::CNetworkInfoArray()
+: iNetworkInfoArray( NULL )
     {
     }
 
@@ -121,7 +122,7 @@
 // CNetworkInfoArray::GetArrayIndex
 // ---------------------------------------------------------
 //
-TInt CNetworkInfoArray::GetArrayIndex( TName aNetworkName ) const
+TInt CNetworkInfoArray::GetArrayIndex( TName& aNetworkName ) const
     {
     CLOG_ENTERFN( "CNetworkInfoArray::GetArrayIndex" );
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoBase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/NetworkInfoBase.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -19,7 +19,7 @@
 
 // INCLUDE FILES
 #include <StringLoader.h>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 
 #include "NetworkInfoBase.h"
 #include "ConnUiUtilsNotif.hrh"
@@ -35,9 +35,12 @@
 // ---------------------------------------------------------
 //
 CNetworkInfoBase::CNetworkInfoBase()
-: iOthersEntry( EFalse ),
-  iProtectedSetupSupported( EFalse )
-  
+: iSignalStrength( ESignalStrengthMin ),
+  iNetworkMode( ENetworkModeInfrastructure ),
+  iSecurityMode( EWlanConnectionSecurityOpen ),
+  iOthersEntry( EFalse ),
+  iProtectedSetupSupported( EFalse ),
+  iExtendedSecurityMode( EWlanConnectionExtentedSecurityModeOpen )
     {
     }
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -37,7 +37,8 @@
 // ---------------------------------------------------------
 //
 COfflineWlanNoteDlg::COfflineWlanNoteDlg( COfflineWlanNoteNotif* aNotif )
-: iNotif( aNotif )    
+: iNotif( aNotif ),
+  iExpiryTimer( NULL )
     {
     }
     
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -25,7 +25,7 @@
 
 #include <e32property.h>         // For RProperty 
 #include <UikonInternalPSKeys.h> // For KPSUidUikon and KUikGlobalNotesAllowed.
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -56,6 +56,8 @@
     TPckgBuf<TBool> asyncVersion;
     asyncVersion.Copy( aBuffer );
 
+    iCancelled = EFalse;
+
     // We are about to display the Offline note.
     // Since this part of the code can be executed during the bootup, check if
     // the UI has really started up to display notes/dialogs.
@@ -63,17 +65,8 @@
     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
                                         notesAllowed ) );
 
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        CLOG_WRITE( "COfflineWlanNoteNotif::StartL: Screen saver or Autolock is active." );
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-
     iReplySlot = aReplySlot;
     iMessage = aMessage;
-    iCancelled = EFalse;
 
     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -26,7 +26,7 @@
 #include <aknnotewrappers.h>
 #include <aknnotedialog.h>
 #include <connectionuiutilities.mbg>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <StringLoader.h>
 #include <data_caging_path_literals.hrh>
 #include <uikon/eiksrvui.h>
@@ -65,7 +65,9 @@
 : CAknListQueryDialog( &aIndex ),
   iPlugin( aPlugin ),
   iNetworkArray( aNetworkArray ),
-  iFromOkToExit( EFalse )
+  iFromOkToExit( EFalse ),
+  iWaitDialog( NULL ),
+  iExpiryTimer( NULL )
     {
     }
 
@@ -210,12 +212,7 @@
                 TWlanConnectionSecurityMode sMode;
                 TWlanConnectionExtentedSecurityMode sExtMode;
 
-                //sSID.Copy( buff->Des() );
-                TInt err = CnvUtfConverter::ConvertFromUnicodeToUtf8( sSID, buff->Des() );
-                if ( err )
-                    {
-                    sSID.Copy( buff->Des() );
-                    }        
+                sSID.Copy( buff->Des() );       
                 CleanupStack::PopAndDestroy( buff );
 
                 iPlugin->SetEasyWlanToHiddenL( ETrue ); 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -84,13 +84,6 @@
     {
     CLOG_ENTERFN( "CSelectWLanDlgPlugin::StartL " );  
     
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-    
     TPckgBuf<TBool> asyncVersion;
     asyncVersion.Copy( aBuffer );
 
@@ -110,7 +103,8 @@
         {
         aMessage.ReadL( aReplySlot, iNetworkPrefs );
     
-        TRAPD( err, iActivePlugin = CActiveSelectWLanDlgPlugin::NewL( this ) ); 
+        TInt err( KErrNone );
+        TRAP( err, iActivePlugin = CActiveSelectWLanDlgPlugin::NewL( this ) ); 
         if ( err )
             {
             delete iActivePlugin;
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WepWpaQueryDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WepWpaQueryDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #include <aknnotewrappers.h>
 #include <StringLoader.h>
 #include <aknnotedialog.h>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <uikon/eiksrvui.h>
 
 #include "WepWpaQueryDlg.h"
@@ -61,7 +61,8 @@
 : CAknTextQueryDialog( aDataText ),
   iNotif( aNotif ), 
   iDialogType( aDialogType ), 
-  iHex( aHex )
+  iHex( aHex ),
+  iExpiryTimer( NULL)
     {
     }
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/WlanNetworkDataProvider.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -64,7 +64,12 @@
 // ---------------------------------------------------------
 //
 CWlanNetworkDataProvider::CWlanNetworkDataProvider() 
-: CBase()
+: CBase(),
+#ifndef __WINS__
+  iWlanMgmt( NULL ),
+  iScanInfo( NULL ),
+#endif // !__WINS__
+  iNetworkInfoArray( NULL )
     {
     }
 
@@ -85,7 +90,7 @@
         }
     delete iWlanMgmt;
     delete iScanInfo;
-#endif
+#endif // !__WINS__
 
     CLOG_LEAVEFN( "CWlanNetworkDataProvider::~CWlanNetworkDataProvider" );
     }
@@ -277,7 +282,7 @@
                                    TWlanConnectionExtentedSecurityMode aExtSecurityMode,
                                    TBool aProtectedSetupSupported )
     {
-    TBuf<KWlanMaxSsidLength> networkName16;
+    TName networkName16;
     networkName16.Copy( aNetworkName );
     TInt index = iNetworkInfoArray->GetArrayIndex( networkName16 );
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/cellulardataconfirmation.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h>
+#include <connuiutilsnotif.rsg>
+#include <hb/hbcore/hbsymbianvariant.h>
+#include "ConnectionDialogsLogger.h"
+#include "cellulardataconfirmation.h"
+#include "ConnectionDialogsNotifBase.h"
+#include "ConnectionDialogsUidDefs.h"
+#include "ConnUiUtilsNotif.h"
+#include "devicedialogobserver.h"
+
+
+// CONSTANTS
+const TInt KVariableLength = 30;
+_LIT( KHomenetwork, "homenetwork");
+_LIT(KType, "com.nokia.ipconnmgmt.promptdialog/1.0");
+
+// ---------------------------------------------------------
+// CCellularDataConfirmation::CCellularDataConfirmation()
+// ---------------------------------------------------------
+//
+CCellularDataConfirmation::CCellularDataConfirmation()
+    {
+    iCompleted = EFalse;
+    iChoice = EMsgQueryCancelled;
+    iObserver = NULL;
+    iDialog = NULL;
+    }
+
+// ---------------------------------------------------------
+// CCellularDataConfirmation::~CCellularDataConfirmation()
+// ---------------------------------------------------------
+//
+CCellularDataConfirmation::~CCellularDataConfirmation()
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::~CCellularDataConfirmation" );
+    delete iDialog;
+    delete iObserver;
+    CLOG_LEAVEFN( "CCellularDataConfirmation::~CCellularDataConfirmation" );
+    }
+
+// ---------------------------------------------------------
+// CCellularDataConfirmation* CCellularDataConfirmation::NewL
+// ---------------------------------------------------------
+//
+CCellularDataConfirmation* CCellularDataConfirmation::NewL( 
+                                        const TBool aResourceFileResponsible )
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::NewL" );
+    CCellularDataConfirmation* self = new ( ELeave ) CCellularDataConfirmation();
+    CleanupStack::PushL( self );
+    self->ConstructL( KResourceFileName, aResourceFileResponsible );
+    CleanupStack::Pop();
+    CLOG_LEAVEFN( "CCellularDataConfirmation::NewL" );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// void CCellularDataConfirmation::StartL
+// ---------------------------------------------------------
+//
+void CCellularDataConfirmation::StartL( const TDesC8& aBuffer, 
+                                        TInt aReplySlot, 
+                                        const RMessagePtr2& aMessage )
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::StartL" );
+    iChoice = EMsgQueryCancelled; 
+    TPckgBuf<TConnUiUiDestConnMethodNoteId> input;
+    TConnUiUiDestConnMethodNoteId noteInfo;
+    input.Copy( aBuffer );
+    noteInfo = input();   
+    iReplySlot = aReplySlot;
+    iMessage = aMessage;
+    
+    // Create the list box items
+    RArray<TMsgQueryLinkedResults> choices;           
+    
+    // Observer is needed in order to get the user inputs
+    iObserver = CDeviceDialogObserver::NewL( this );
+    iDialog = CHbDeviceDialogSymbian::NewL();
+    
+    // The variant map is needed to construct the dialog correctly,
+    // information whether we are in home network is needed
+    TBuf<KVariableLength> key(KHomenetwork);
+    TBool homeNetwork;
+    if ( noteInfo.iNoteId == EConfirmMethodUsageQueryInHomeNetwork ) 
+        {
+        homeNetwork = ETrue;
+        choices.Append(EMsgQueryAutomatically);
+        choices.Append(EMsgQueryThisTime);
+        choices.Append(EMsgQueryCancelled);
+        }
+    else
+        {
+        homeNetwork = EFalse;
+        choices.Append(EMsgQueryThisTime);
+        choices.Append(EMsgQueryAutomatically);
+        choices.Append(EMsgQueryCancelled);
+        }
+    // Set the choice order for the observer so that it knows which button press
+    // means which choice
+    iObserver->SetChoices(choices);
+    
+    // Create the variant data information for the plugin
+    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
+    CleanupStack::PushL( map );
+    CHbSymbianVariant *variant =  CHbSymbianVariant::NewL ( &homeNetwork, CHbSymbianVariant::EBool );
+    CleanupStack::PushL( variant );
+    TInt error = map->Add( key, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+    
+    // Show the dialog.
+    error = iDialog->Show( KType, *map, iObserver );
+    User::LeaveIfError( error );
+    CleanupStack::PopAndDestroy( map ); 
+    CLOG_LEAVEFN( "CCellularDataConfirmation::StartL" );
+    }
+
+// ---------------------------------------------------------
+// void CConfirmationQueryNotif::CompleteL( TInt aStatus )
+// ---------------------------------------------------------
+//
+void CCellularDataConfirmation::CompleteL( TInt aStatus )
+    {   
+    CLOG_ENTERFN( "CCellularDataConfirmation::CompleteL" );
+    if ( !iCompleted )
+        {
+        if ( !iMessage.IsNull() )
+            {  
+            iMessage.WriteL( iReplySlot, TPckg<TMsgQueryLinkedResults>( iChoice ) );
+            iMessage.Complete( aStatus );
+            iCompleted = ETrue;
+            } 
+        }
+    CLOG_LEAVEFN( "CCellularDataConfirmation::CompleteL" );
+    }
+
+// ---------------------------------------------------------------
+// void CConfirmationQueryNotif::SetSelectedChoiceL( TInt aChoice )
+// ----------------------------------------------------------------
+//
+void CCellularDataConfirmation::SetSelectedChoice ( TInt aChoice )
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::SetSelectedChoice" );
+    iChoice = (TMsgQueryLinkedResults)aChoice;
+    CLOG_LEAVEFN( "CCellularDataConfirmation::SetSelectedChoice" );
+    }
+
+// ---------------------------------------------------------------
+// void CCellularDataConfirmation::Cancel()
+// ----------------------------------------------------------------
+//
+void CCellularDataConfirmation::Cancel()
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::Cancel" );
+    if ( !iCompleted )
+        {
+        iDialog->Cancel(); 
+        TRAP_IGNORE( iMessage.WriteL( iReplySlot, 
+            TPckg<TMsgQueryLinkedResults>( EMsgQueryCancelled ) ));
+        iMessage.Complete( KErrCancel ); 
+        }
+    CLOG_LEAVEFN( "CCellularDataConfirmation::Cancel" );
+    }
+
+// ---------------------------------------------------------------
+// CCellularDataConfirmation::TNotifierInfo 
+// CCellularDataConfirmation::RegisterL()
+// ----------------------------------------------------------------
+//
+CCellularDataConfirmation::TNotifierInfo CCellularDataConfirmation::RegisterL()
+    {
+    CLOG_ENTERFN( "CCellularDataConfirmation::RegisterL" );
+    iInfo.iUid = KUidConfirmationQuery;
+    iInfo.iPriority = ENotifierPriorityHigh;
+    iInfo.iChannel = KUidConfirmationQuery;
+    CLOG_LEAVEFN( "CCellularDataConfirmation::RegisterL" );
+    return iInfo;
+    }
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopup.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +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:  Implementation of CConnectingViaDiscreetPopup.
- *
- */
-
-// INCLUDE FILES
-#include <avkon.hrh>
-#include <akndiscreetpopup.h>
-#include <aknsconstants.hrh>
-#include <StringLoader.h>
-#include <utf.h>
-
-#include <cmmanagerext.h>
-#include <cmconnectionmethod.h>
-#include <cmconnectionmethodext.h>
-#include <cmpluginwlandef.h>
-
-#include <connectionuiutilities.mbg>
-#include <ConnUiUtilsNotif.rsg>
-
-#include "connectingviadiscreetpopup.h"
-
-// Connection Manager UIDs
-const TUid KDiscreetPopupUid =
-    {
-    0x101F84D0
-    };
-const TUid KDiscreetPopupViewUid =
-    {
-    0x2
-    };
-// Path of the app's iconfile
-_LIT( KIconFileName, "\\resource\\apps\\connectionuiutilities.mif" );
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::CConnectingViaDiscreetPopup
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopup::CConnectingViaDiscreetPopup(
-        CConnectingViaDiscreetPopupNotif* aNotif) :
-            CActive(EPriorityUserInput), // Standard priority
-            iNotif(aNotif), iBearerType(0),
-            iConnectionName(NULL), iPopupFlags(0)
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::NewLC
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopup* CConnectingViaDiscreetPopup::NewLC(
-        CConnectingViaDiscreetPopupNotif* aNotif)
-    {
-    CConnectingViaDiscreetPopup* self =
-            new (ELeave) CConnectingViaDiscreetPopup(aNotif);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::NewL
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopup* CConnectingViaDiscreetPopup::NewL(
-        CConnectingViaDiscreetPopupNotif* aNotif)
-    {
-    CConnectingViaDiscreetPopup* self = CConnectingViaDiscreetPopup::NewLC(
-            aNotif);
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::ConstructL
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopup::ConstructL()
-    {
-    CActiveScheduler::Add(this); // Add to scheduler
-    icmManager.OpenL();
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::~CConnectingViaDiscreetPopup
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopup::~CConnectingViaDiscreetPopup()
-    {
-    Cancel(); // Cancel any request, if outstanding
-    icmManager.Close();
-    // Delete instance variables if any
-    if (iConnectionName)
-        {
-        delete iConnectionName;
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::DoCancel
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopup::DoCancel()
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::StartL
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopup::StartL( TUint32 aIapId )
-    {
-    Cancel(); // Cancel any request, just to be sure
-    iBearerType = 0;
-    delete iConnectionName;
-    iConnectionName = NULL;
-    iPopupFlags = KAknDiscreetPopupDurationLong;
-    
-    RCmConnectionMethod plugin;
-    CleanupClosePushL(plugin);
-    if (aIapId)
-        {
-        plugin = icmManager.ConnectionMethodL(aIapId);
-        iBearerType = plugin.GetIntAttributeL(CMManager::ECmBearerType);
-        TUint32 easyWLANIapId = icmManager.EasyWlanIdL();
-        if (easyWLANIapId != aIapId)
-            {
-            iConnectionName = plugin.GetStringAttributeL(CMManager::ECmName);
-            }
-        else
-            {
-            iConnectionName = plugin.GetStringAttributeL(CMManager::EWlanUsedSSID);
-            }
-        }
-    CleanupStack::PopAndDestroy(&plugin);
-
-    SetActive(); // Tell scheduler a request is active
-    iClientStatus = &iStatus;
-    User::RequestComplete(iClientStatus, KErrNone);
-    
-    // Complete client request before launching dialog
-    iNotif->SetCancelledFlag(ETrue);
-    iNotif->CompleteL(KErrNone);
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::RunL
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopup::RunL()
-    {
-    if (iStatus == KErrNone)
-        {
-        TUint bitmapId = 0;
-        TUint maskId = 0;
-        if (iBearerType == KUidWlanBearerType)
-            {
-            bitmapId = EMbmConnectionuiutilitiesQgn_prop_wlan_bearer;
-            maskId = EMbmConnectionuiutilitiesQgn_prop_wlan_bearer_mask;
-            }
-        else
-            {
-            bitmapId = EMbmConnectionuiutilitiesQgn_prop_wml_gprs;
-            maskId = EMbmConnectionuiutilitiesQgn_prop_wml_gprs_mask;
-            }
-
-        // Load strings from resources
-        HBufC* stringText1 = StringLoader::LoadLC(
-                R_QTN_OCC_CONNECTING_DISCREET_POPUP_TEXT1);
-
-        HBufC* stringText2 = NULL;
-        if (iConnectionName)
-            {
-            stringText2 = iConnectionName;
-            }
-        else
-            {
-            stringText2 = KNullDesC().AllocLC();
-            }
-
-        CAknDiscreetPopup::ShowGlobalPopupL(*stringText1, // first text row
-                *stringText2, // second text row
-                KAknsIIDDefault, // icon skin id
-                KIconFileName, // bitmap file path
-                bitmapId, // bitmap id
-                maskId, // mask id
-                iPopupFlags, // flags
-                0, // command id
-                NULL, // command observer
-                KDiscreetPopupUid, // application to be launched
-                KDiscreetPopupViewUid); // view to be activated
-        
-        if (!iConnectionName)
-            {
-            CleanupStack::PopAndDestroy( stringText2 );
-            }
-        
-        CleanupStack::PopAndDestroy( stringText1 );
-        }
-
-    // Cleanup
-    iNotif->Cancel();
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopup::RunError
-// ---------------------------------------------------------
-//
-TInt CConnectingViaDiscreetPopup::RunError(TInt aError)
-    {
-    return aError;
-    }
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectingviadiscreetpopupnotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +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:  Implementation of CConnectingViaDiscreetPopupNotif.
- *
- */
-
-// INCLUDE FILES
-#include <e32property.h>
-#include <ScreensaverInternalPSKeys.h>
-#include "connectingviadiscreetpopupnotif.h"
-#include "connectingviadiscreetpopup.h"
-#include "ConnUiUtilsNotif.h"
-#include "ConnectionDialogsUidDefs.h"
-#include "ConnectionUiUtilitiesCommon.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopupNotif::TNotifierInfo 
-//                               CConnectingViaDiscreetPopupNotif::RegisterL()
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopupNotif::TNotifierInfo CConnectingViaDiscreetPopupNotif::RegisterL()
-    {
-    iInfo.iUid = KUidConnectingViaDiscreetPopup;
-    iInfo.iPriority = ENotifierPriorityVHigh;
-    iInfo.iChannel = KUidConnectingViaDiscreetPopup;
-
-    return iInfo;
-    }
-
-// ---------------------------------------------------------
-// void CConnectingViaDiscreetPopupNotif::StartL()
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopupNotif::StartL(const TDesC8& aBuffer,
-        TInt aReplySlot, const RMessagePtr2& aMessage)
-    {    
-    TInt screenSaverOn( 0 );
-    RProperty::Get( KPSUidScreenSaver, 
-                    KScreenSaverOn, 
-                    screenSaverOn );
-
-    if ( iActiveNote || screenSaverOn > 0 )
-        {
-        // Note is already active or Screensaver is on.
-        aMessage.Complete( KErrNone );
-        return;
-        }
-    
-    iReplySlot = aReplySlot;
-    iMessage = aMessage;
-    iCancelled = ETrue;
-    iActiveNote = CConnectingViaDiscreetPopup::NewL(this);
-
-    TPckgBuf<TConnUiConnectingViaDiscreetPopup> data;
-    data.Copy(aBuffer);
-
-    iActiveNote->StartL( data().iIapId );
-    iCancelled = EFalse;
-    }
-
-// ---------------------------------------------------------
-// void CConnectingViaDiscreetPopupNotif::CompleteL( TInt aStatus )
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopupNotif::CompleteL(TInt aStatus)
-    {
-    iCancelled = ETrue;
-    if (!iMessage.IsNull())
-        {
-        iMessage.Complete(aStatus);
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopupNotif* CConnectingViaDiscreetPopupNotif::NewL()
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopupNotif* CConnectingViaDiscreetPopupNotif::NewL(
-        const TBool aResourceFileResponsible)
-    {
-    CConnectingViaDiscreetPopupNotif* self =
-            new (ELeave) CConnectingViaDiscreetPopupNotif();
-    CleanupStack::PushL(self);
-    self->ConstructL(KResourceFileName, aResourceFileResponsible);
-    CleanupStack::Pop();
-
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectingViaDiscreetPopupNotif::CConnectingViaDiscreetPopupNotif()
-// ---------------------------------------------------------
-//
-CConnectingViaDiscreetPopupNotif::CConnectingViaDiscreetPopupNotif() :
-    CConnectionDialogsNotifBase(), iActiveNote(NULL)
-    {
-    }
-
-// ---------------------------------------------------------
-// void CConnectingViaDiscreetPopupNotif::Cancel()
-// ---------------------------------------------------------
-//
-void CConnectingViaDiscreetPopupNotif::Cancel()
-    {
-    if (!iCancelled)
-        {
-        iCancelled = ETrue;
-        if (!iMessage.IsNull())
-            {
-            iMessage.Complete(KErrCancel);
-            }
-        }
-    if ( iActiveNote )
-        {
-        delete iActiveNote;
-        iActiveNote = NULL;
-        }
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopup.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,432 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Implementation of CConnectionErrorDiscreetPopup.
- *
- */
-
-// INCLUDE FILES
-#include "connectionerrordiscreetpopup.h"
-#include <akndiscreetpopup.h>
-#include <aknsconstants.hrh>
-#include <StringLoader.h>
-#include <cmmanagerext.h>
-#include <cmconnectionmethod.h>
-#include <cmconnectionmethodext.h>
-#include <cmpluginwlandef.h>
-#include <avkon.hrh>
-#include <connectionuiutilities.mbg>
-#include <ConnUiUtilsNotif.rsg>
-
-#ifdef _DEBUG
-#include <e32debug.h>
-#endif
-
-// Error code definitions are from these headers
-#include <wlanerrorcodes.h> // WLAN-specific error code definitions
-#include <in_iface.h>
-#include <etelpckt.h>       // GPRS-specific causes for Session Management
-#include <nd_err.h>         // NetDial errors
-#include <inet6err.h>       // IPv6 error constants
-#include <rmmcustomapi.h>
-
-// Errors in UI spec not found elsewhere
-const TInt KErrPDPMaxContextsReached = -6000;
-const TInt KErrDndNameNotFound = -5120;
-const TInt KErrGeneralConnection = -50000;
-const TInt KErrGenConnNoGPRSNetwork = -3609;
-
-// No discreet popup => Uid 0
-const TUid KDiscreetPopupUidNone =
-    {
-    0x0
-    };
-// Path of the app's iconfile
-_LIT( KIconFileName, "\\resource\\apps\\connectionuiutilities.mif" );
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::CConnectionErrorDiscreetPopup
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopup::CConnectionErrorDiscreetPopup(
-        CConnectionErrorDiscreetPopupNotif* aNotif) :
-    CActive(EPriorityUserInput), // Standard priority
-            iNotif(aNotif), iErrorCode(KErrNone)
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::NewLC
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopup* CConnectionErrorDiscreetPopup::NewLC(
-        CConnectionErrorDiscreetPopupNotif* aNotif)
-    {
-    CConnectionErrorDiscreetPopup* self =
-            new (ELeave) CConnectionErrorDiscreetPopup(aNotif);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::NewL
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopup* CConnectionErrorDiscreetPopup::NewL(
-        CConnectionErrorDiscreetPopupNotif* aNotif)
-    {
-    CConnectionErrorDiscreetPopup* self =
-            CConnectionErrorDiscreetPopup::NewLC(aNotif);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::ConstructL
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopup::ConstructL()
-    {
-    CActiveScheduler::Add(this); // Add to scheduler
-    icmManager.OpenL();
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::~CConnectionErrorDiscreetPopup
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopup::~CConnectionErrorDiscreetPopup()
-    {
-    Cancel(); // Cancel any request, if outstanding
-    icmManager.Close();
-    // Delete instance variables if any
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::DoCancel
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopup::DoCancel()
-    {
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::StartL
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopup::StartL(TUint32 aErrCode)
-    {
-    Cancel(); // Cancel any request, just to be sure
-
-    iErrorCode = aErrCode;
-
-    SetActive(); // Tell scheduler a request is active
-    iClientStatus = &iStatus;
-    User::RequestComplete(iClientStatus, KErrNone);
-
-    // Complete the note so client can continue its tasks
-    // immediately
-    iNotif->SetCancelledFlag(ETrue);
-    iNotif->CompleteL(KErrNone);
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::RunL
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopup::RunL()
-    {
-    if (iStatus == KErrNone)
-        {
-        TInt text1 = 0;
-        TInt text2 = 0;
-        TInt bitmapId = 0;
-        TInt maskId = 0;
-        // Show only if error code can be resolved
-        if (ResolveErrorCode(text1, text2, bitmapId, maskId))
-            {
-            // Load strings from resources
-            HBufC* stringText1 = StringLoader::LoadLC(text1);
-            HBufC* stringText2 = StringLoader::LoadLC(text2);
-            CAknDiscreetPopup::ShowGlobalPopupL(*stringText1, // 1st text row
-                    *stringText2, // second text row
-                    KAknsIIDDefault, // icon skin id
-                    KIconFileName, // bitmap file path
-                    bitmapId, // bitmap id
-                    maskId, // mask id
-                    KAknDiscreetPopupDurationLong, // flags
-                    0, // command id
-                    NULL, // command observer
-                    KDiscreetPopupUidNone, // application to be launched
-                    KDiscreetPopupUidNone); // view to be activated
-
-            CleanupStack::PopAndDestroy(2, stringText1);
-            }
-        }
-
-    // Cleanup
-    iNotif->Cancel();
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::RunError
-// ---------------------------------------------------------
-//
-TInt CConnectionErrorDiscreetPopup::RunError(TInt aError)
-    {
-    return aError;
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopup::ResolveErrorCode
-// ---------------------------------------------------------
-//
-TInt CConnectionErrorDiscreetPopup::ResolveErrorCode(TInt& aText1,
-        TInt& aText2, TInt& aBitmap, TInt& aMask)
-    {
-    
-#ifdef _DEBUG
-    RDebug::Print( _L("CConnectionErrorDiscreetPopup::ResolveErrorCode - code %d"),
-            iErrorCode );
-#endif
-    
-    // Icons, which are resolved at the end
-    enum TIconType
-        {
-        EIconWlan, EIconCellular, EIconNone
-        };
-
-    // For most cases, icon is WLAN
-    TIconType icon = EIconWlan;
-
-    // For most cases, aText1 = "Connection failed"
-    aText1 = R_QTN_OCC_CONNECTION_FAILED_DISCREET_POPUP_TEXT1;
-
-    // Resolve aText1, aText2 and icon of error code.
-    // Groups are from OCC GUI spec 1.0
-    switch (iErrorCode)
-        {
-        
-        // Group 1
-        case KErrIfChangingPassword:
-            icon = EIconCellular;
-            // These were GPRS; fall through
-        case KErrWlanInternalError:
-            aText2 = R_QTN_OCC_INTERNAL_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 2
-        case KErrWlanNetworkNotFound:
-            aText2 = R_QTN_OCC_WLAN_NOT_FOUND_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 3
-        case KErrGprsUserAuthenticationFailure:
-            icon = EIconCellular;
-        // These were GPRS; fall through
-        case KErrWlanOpenAuthFailed:
-        case KErrWlanSharedKeyAuthRequired:
-        case KErrWlanWpaAuthRequired:
-        case KErrWlanWpaAuthFailed:
-        case KErrWlan802dot1xAuthFailed:
-        case KErrWlanWpaCounterMeasuresActive:
-        case KErrWlanPskModeRequired:
-        case KErrWlanEapModeRequired:
-        case KErrWlanEapSimFailed:
-        case KErrWlanEapTlsFailed:
-        case KErrWlanEapPeapFailed:
-        case KErrWlanEapMsChapv2: // Is the same as KErrWlanEapMsChaPFailed
-        case KErrWlanEapAkaFailed:
-        case KErrWlanEapTtlsFailed:
-        case KErrWlanLeapFailed:
-        case KErrWlanEapGtcFailed:
-        case KErrWlanWpa2OnlyModeNotSupported:
-        case KErrWlanEapFastTunnelCompromiseError:
-        case KErrWlanEapFastUnexpextedTlvExhanged:
-        case KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled:
-        case KErrWlanEapFastNoMatchingPacForAid:
-        case KErrWlanEapFastAuthFailed:
-        case KErrWlanEapFastPacStoreCorrupted:
-            aText2 = R_QTN_OCC_AUTH_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 4
-        case KErrWlanSharedKeyAuthFailed:
-        case KErrWlanIllegalWpaPskKey:
-        case KErrWlanIllegalEncryptionKeys:
-            aText2 = R_QTN_OCC_CHECK_KEY_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 5
-        case KErrExitModemError:
-        case KErrExitLoginFail:
-        case KErrExitScriptTimeOut:
-        case KErrExitScriptError:
-        case KErrIfAuthenticationFailure:
-        case KErrIfAuthNotSecure:
-        case KErrIfAccountDisabled:
-        case KErrIfRestrictedLogonHours:
-        case KErrIfPasswdExpired:
-        case KErrIfNoDialInPermission:
-        case KErrGprsMissingorUnknownAPN:
-            icon = EIconCellular;
-            aText2 = R_QTN_OCC_CHECK_SETTINGS_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 6
-        case KErrWlanSimNotInstalled:
-            aText2 = R_QTN_OCC_SIM_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 7
-        case KErrWlanNotSubscribed:
-        case KErrWlanAccessBarred:
-            aText2 = R_QTN_OCC_SERVICE_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 8
-        case KErrPermissionDenied:
-            icon = EIconNone;  // Permission denied may come with any bearer.
-        // Fall through
-        case KErrWlanPasswordExpired:
-        case KErrWlanNoDialinPermissions:
-        case KErrWlanAccountDisabled:
-        case KErrWlanRestrictedLogonHours:
-        case KErrWlanServerCertificateExpired:
-        case KErrWlanCerficateVerifyFailed:
-        case KErrWlanNoUserCertificate:
-        case KErrWlanNoCipherSuite:
-        case KErrWlanUserRejected:
-        case KErrWlanUserCertificateExpired:
-            aText2 = R_QTN_OCC_ACCESS_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 9
-        case KErrPDPMaxContextsReached:
-            icon = EIconCellular;
-            // These were GPRS; fall through
-        case KErrWlanConnAlreadyActive:
-            aText2 = R_QTN_OCC_ALREADY_ACT_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 10
-        case KErrWlanSignalTooWeak:
-            aText2 = R_QTN_OCC_WLAN_WEAK_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 11
-        case KErrIfCallbackNotAcceptable:
-        case KErrIfDNSNotFound:
-        case KErrIfLRDBadLine:
-        case KErrNetUnreach:
-        case KErrHostUnreach:
-        case KErrNoProtocolOpt:
-        case KErrUrgentData:
-        case KErrInet6NoRoute:
-        case KErrDndNameNotFound:
-        case KErrGeneralConnection:
-        case KErrGprsMSCTemporarilyNotReachable:
-        case KErrGprsLlcOrSndcpFailure:
-        case KErrGprsInsufficientResources:
-        case KErrGprsActivationRejectedByGGSN:
-        case KErrPacketDataTsyInvalidAPN:
-            icon = EIconCellular;
-            // These were GPRS; fall through
-        case KErrWlanRoamingFailed:
-            aText2 = R_QTN_OCC_TRY_AGAIN_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 12
-        case KErrGenConnNoGPRSNetwork:
-        case KErrGprsServicesNotAllowed:
-        case KErrGprsAndNonGprsServicesNotAllowed:
-        case KErrGprsMSIdentityCannotBeDerivedByTheNetwork:
-        case KErrGprsMSImplicitlyDetached:
-        case KErrGsmMMNetworkFailure:
-        case KErrGprsUnknownPDPAddress:
-        case KErrGprsActivationRejected:
-        case KErrGsmMMServiceOptionNotSubscribed:
-        case KErrGsmMMServiceOptionTemporaryOutOfOrder:
-        case KErrGprsNSAPIAlreadyUsed:
-        case KErrGprsQoSNotAccepted:
-        case KErrGprsReactivationRequested:
-            icon = EIconCellular;
-            aText2 = R_QTN_OCC_CONN_UNAVAILABLE_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 13
-        case KErrWlanProtectedSetupDevicePasswordAuthFailure:
-        case KErrWlanProtectedSetupPINMethodNotSupported:
-        case KErrWlanProtectedSetupPBMethodNotSupported:
-            aText1 = R_QTN_OCC_CONFIG_FAILED_DISCREET_POPUP_TEXT1;
-            aText2 = R_QTN_OCC_AUTH_ERROR_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Group 14
-        case KErrWlanProtectedSetupOOBInterfaceReadError:
-        case KErrWlanProtectedSetupDecryptionCRCFailure:
-        case KErrWlanProtectedSetup2_4ChannelNotSupported:
-        case KErrWlanProtectedSetup5_0ChannelNotSupported:
-        case KErrWlanProtectedSetupNetworkAuthFailure:
-        case KErrWlanProtectedSetupNoDHCPResponse:
-        case KErrWlanProtectedSetupFailedDHCPConfig:
-        case KErrWlanProtectedSetupIPAddressConflict:
-        case KErrWlanProtectedSetupCouldNotConnectToRegistrar:
-        case KErrWlanProtectedSetupMultiplePBCSessionsDetected:
-        case KErrWlanProtectedSetupRogueActivitySuspected:
-        case KErrWlanProtectedSetupDeviceBusy:
-        case KErrWlanProtectedSetupSetupLocked:
-        case KErrWlanProtectedSetupMessageTimeout:
-        case KErrWlanProtectedSetupRegistrationSessionTimeout:
-            aText1 = R_QTN_OCC_CONFIG_FAILED_DISCREET_POPUP_TEXT1;
-            aText2 = R_QTN_OCC_TRY_AGAIN_DISCREET_POPUP_TEXT2;
-            break;
-
-        // Skipped errors, for which popup is not shown.
-        case KErrNone:
-        case KErrConnectionTerminated:
-        case KErrDisconnected:
-        case KErrCancel:
-            return EFalse;
-
-        // For error values not specifically mapped to any error message
-        // the discreet pop-up #12 is used.
-        default:
-            aText2 = R_QTN_OCC_CONN_UNAVAILABLE_DISCREET_POPUP_TEXT2;
-            icon = EIconNone;
-            break;
-        }
-
-    // Resolve icon to aBitmap & aMask
-    switch (icon)
-        {
-        case EIconWlan:
-            aBitmap = EMbmConnectionuiutilitiesQgn_prop_wlan_bearer;
-            aMask = EMbmConnectionuiutilitiesQgn_prop_wlan_bearer_mask;
-            break;
-        case EIconCellular:
-            aBitmap = EMbmConnectionuiutilitiesQgn_prop_wml_gprs;
-            aMask = EMbmConnectionuiutilitiesQgn_prop_wml_gprs_mask;
-            break;
-        default:
-            ASSERT(icon == EIconNone);
-            aBitmap = -1;
-            aMask = -1;
-            break;
-        }
-
-    return ETrue;
-    }
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/connectionerrordiscreetpopupnotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  Implementation of CConnectionErrorDiscreetPopupNotif.
- *
- */
-
-// INCLUDE FILES
-#include <e32property.h>
-#include <ScreensaverInternalPSKeys.h>
-#include "connectionerrordiscreetpopupnotif.h"
-#include "connectionerrordiscreetpopup.h"
-#include "ConnUiUtilsNotif.h"
-#include "ConnectionDialogsUidDefs.h"
-#include "ConnectionUiUtilitiesCommon.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopupNotif::TNotifierInfo 
-//                               CConnectionErrorDiscreetPopupNotif::RegisterL()
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopupNotif::TNotifierInfo 
-        CConnectionErrorDiscreetPopupNotif::RegisterL()
-    {
-    iInfo.iUid = KUidConnectionErrorDiscreetPopup;
-    iInfo.iPriority = ENotifierPriorityVHigh;
-    iInfo.iChannel = KUidConnectionErrorDiscreetPopup;
-
-    return iInfo;
-    }
-
-// ---------------------------------------------------------
-// void CConnectionErrorDiscreetPopupNotif::StartL()
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopupNotif::StartL( const TDesC8& aBuffer,
-        TInt aReplySlot, const RMessagePtr2& aMessage )
-    {
-    TInt screenSaverOn( 0 );
-    RProperty::Get( KPSUidScreenSaver, 
-                    KScreenSaverOn, 
-                    screenSaverOn );
-
-    if ( iActiveNote || screenSaverOn > 0 )
-        {
-        // Note is already active or Screensaver is on.
-        aMessage.Complete( KErrNone );
-        return;
-        }
-    iReplySlot = aReplySlot;
-    iMessage = aMessage;
-    iCancelled = EFalse;
-
-    iActiveNote = CConnectionErrorDiscreetPopup::NewL( this );
-
-    TPckgBuf<TUint32> data;
-    data.Copy( aBuffer );
-
-    iActiveNote->StartL( data() );
-    iCancelled = EFalse;
-    }
-
-// ---------------------------------------------------------
-// void CConnectionErrorDiscreetPopupNotif::CompleteL( TInt aStatus )
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopupNotif::CompleteL( TInt aStatus )
-    {
-    iCancelled = ETrue;
-    if ( !iMessage.IsNull() )
-        {
-        iMessage.Complete( aStatus );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopupNotif* 
-//        CConnectionErrorDiscreetPopupNotif::NewL()
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopupNotif* CConnectionErrorDiscreetPopupNotif::NewL(
-        const TBool aResourceFileResponsible )
-    {
-    CConnectionErrorDiscreetPopupNotif* self =
-            new (ELeave) CConnectionErrorDiscreetPopupNotif();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CConnectionErrorDiscreetPopupNotif::CConnectionErrorDiscreetPopupNotif()
-// ---------------------------------------------------------
-//
-CConnectionErrorDiscreetPopupNotif::CConnectionErrorDiscreetPopupNotif() :
-    CConnectionDialogsNotifBase(), iActiveNote( NULL )
-    {
-    }
-
-// ---------------------------------------------------------
-// void CConnectionErrorDiscreetPopupNotif::Cancel()
-// ---------------------------------------------------------
-//
-void CConnectionErrorDiscreetPopupNotif::Cancel()
-    {
-    if ( !iCancelled )
-        {
-        iCancelled = ETrue;
-        if ( !iMessage.IsNull() )
-            {
-            iMessage.Complete( KErrCancel );
-            }
-        }
-    if ( iActiveNote )
-        {
-        delete iActiveNote;
-        iActiveNote = NULL;
-        }
-    }
-
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/devicedialogobserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <hb/hbcore/hbsymbianvariant.h>
+#include "devicedialogobserver.h"
+
+_LIT(KButton, "button");
+
+// ---------------------------------------------------------
+// CDeviceDialogObserver* CDeviceDialogObserver::NewL
+// ---------------------------------------------------------
+//
+CDeviceDialogObserver* CDeviceDialogObserver::NewL( CCellularDataConfirmation* aNotifier )
+    {
+    CDeviceDialogObserver* self = new ( ELeave ) CDeviceDialogObserver( aNotifier );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CDeviceDialogObserver::CDeviceDialogObserver
+// ---------------------------------------------------------
+//
+CDeviceDialogObserver::CDeviceDialogObserver( CCellularDataConfirmation* aNotifier ): 
+    iNotifier( aNotifier )
+    {
+    
+    }
+
+// ---------------------------------------------------------
+// CDeviceDialogObserver::~CDeviceDialogObserver()
+// ---------------------------------------------------------
+//
+CDeviceDialogObserver::~CDeviceDialogObserver()
+    {
+    
+    }
+
+// ---------------------------------------------------------
+// void CConfirmationQuery::SetChoices
+// ---------------------------------------------------------
+//
+void CDeviceDialogObserver::SetChoices( RArray<TMsgQueryLinkedResults>& aChoices )
+    {
+    iChoiceIds = aChoices;
+    }
+
+// ---------------------------------------------------------
+// void CDeviceDialogObserver::DataReceived
+// ---------------------------------------------------------
+//
+void CDeviceDialogObserver::DataReceived( CHbSymbianVariantMap& aData )
+{
+    // The key that is returned by the promptdialog is "button",
+    // meaning the id of the pressed button.
+    TInt intData = *(TInt*)(aData.Get(KButton)->Data());
+    
+    TInt status = KErrNone;
+    
+    iNotifier->SetSelectedChoice( iChoiceIds[intData-1] );
+    TRAP_IGNORE( iNotifier->CompleteL( status ));
+
+}
+
+// ---------------------------------------------------------
+// void CDeviceDialogObserver::DeviceDialogClosed
+// ---------------------------------------------------------
+//
+void CDeviceDialogObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ )
+{
+    // Dialog was closed, let's complete with that error code
+    TInt status = KErrCancel;
+    iNotifier->SetSelectedChoice( EMsgQueryCancelled );
+    TRAP_IGNORE( iNotifier->CompleteL( status ));
+}
+
+
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/easywapidlgnotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/easywapidlgnotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #include "WepWpaQueryDlg.h"
 #include "ConnUiUtilsNotif.h"
 
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 #include <StringLoader.h>
 
 
@@ -47,13 +47,6 @@
                                 TInt                aReplySlot,
                                 const RMessagePtr2& aMessage )
     {
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-    
     iReplySlot = aReplySlot;
     iMessage   = aMessage;
     iCancelled = EFalse;
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/nowlannetworksavailablenotif.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CNoWLANNetworksAvailableNotif.
-*
-*/
-
-// INCLUDE FILES
-#include <e32property.h>
-#include <ScreensaverInternalPSKeys.h>
-#include "ConnectionDialogsUidDefs.h"
-#include "nowlannetworksavailablenotif.h"
-#include "nowlansdiscreetpopup.h"
-#include "ConnUiUtilsNotif.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CNoWLANNetworksAvailableNotif::TNotifierInfo 
-//                 CNoWLANNetworksAvailableNotif::RegisterL()
-// ---------------------------------------------------------
-//
-CNoWLANNetworksAvailableNotif::TNotifierInfo 
-                   CNoWLANNetworksAvailableNotif::RegisterL()
-    {
-    iInfo.iUid      = KUidNoWLANNetworksAvailableNote;
-    iInfo.iPriority = ENotifierPriorityVHigh;
-    iInfo.iChannel  = KUidNoWLANNetworksAvailableNote;
-
-    return iInfo;
-    }
-
-
-// ---------------------------------------------------------
-// void CNoWLANNetworksAvailableNotif::StartL()
-// ---------------------------------------------------------
-//
-void CNoWLANNetworksAvailableNotif::StartL( const TDesC8& /*aBuffer*/, 
-                                            TInt aReplySlot,
-                                            const RMessagePtr2& aMessage )
-    {
-    TInt screenSaverOn( 0 );
-    RProperty::Get( KPSUidScreenSaver, 
-                    KScreenSaverOn, 
-                    screenSaverOn );
-
-    if ( iActiveNote || screenSaverOn > 0 )
-        {
-        // Note is already active or Screensaver is on.
-        aMessage.Complete( KErrNone );
-        return;
-        }
-    
-    iReplySlot = aReplySlot;
-    iMessage   = aMessage;
-    iCancelled = EFalse;
-            
-    iActiveNote = CNoWlansDiscreetPopup::NewL( this );
-        
-    iActiveNote->StartL();       
-    }
-    
-// ---------------------------------------------------------
-// void CNoWLANNetworksAvailableNotif::CompleteL( TInt aStatus )
-// ---------------------------------------------------------
-//
-void CNoWLANNetworksAvailableNotif::CompleteL( TInt aStatus )
-    {
-    iCancelled = ETrue;
-    
-    if ( !iMessage.IsNull() )
-        {
-        iMessage.Complete( aStatus );
-        }
-    }    
-
-// ---------------------------------------------------------
-// CNoWLANNetworksAvailableNotif* CNoWLANNetworksAvailableNotif::NewL()
-// ---------------------------------------------------------
-//
-CNoWLANNetworksAvailableNotif* CNoWLANNetworksAvailableNotif::NewL( 
-                                        const TBool aResourceFileResponsible )
-    {
-    CNoWLANNetworksAvailableNotif* self = 
-                            new( ELeave ) CNoWLANNetworksAvailableNotif();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
-    return self;
-    }
-    
-
-// ---------------------------------------------------------
-// CNoWLANNetworksAvailableNotif::CNoWLANNetworksAvailableNotif()
-// ---------------------------------------------------------
-//
-CNoWLANNetworksAvailableNotif::CNoWLANNetworksAvailableNotif() 
-: CConnectionDialogsNotifBase(), 
-  iActiveNote( NULL )
-{    
-}    
-
-// ---------------------------------------------------------
-// void CNoWLANNetworksAvailableNotif::Cancel()
-// ---------------------------------------------------------
-//
-void CNoWLANNetworksAvailableNotif::Cancel()
-    {
-    if ( !iCancelled )
-        {
-        iCancelled = ETrue;
-        
-        if ( !iMessage.IsNull() )
-            {
-            iMessage.Complete( KErrCancel );
-            }
-        }
-    
-    if ( iActiveNote )
-        {
-        delete iActiveNote;
-        iActiveNote = NULL;
-        }
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/nowlansdiscreetpopup.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/nowlansdiscreetpopup.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,7 @@
 #include <StringLoader.h>
 #include <avkon.hrh>
 #include <connectionuiutilities.mbg>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
 
 #include "nowlansdiscreetpopup.h"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/wlanpowersavetest.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialog that implements WLAN Power Save Testing notification
+*
+*/
+
+
+// INCLUDE FILES
+#include "wlanpowersavetest.h"
+#include "wlanpowersavetestnotif.h"
+#include "ConnectionUiUtilitiesCommon.h"
+#include "ConnectionDialogsLogger.h"
+
+#include <uikon/eiksrvui.h>
+#include <StringLoader.h>
+#include <connuiutilsnotif.rsg>
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::CWlanPowerSaveQuery
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQuery::CWlanPowerSaveQuery( CWlanPowerSaveQueryNotif* aNotif )
+: iNotif( aNotif ),
+  iButtonGroupPreviouslyChanged( EFalse )
+   {
+   }
+    
+    
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::~CWlanPowerSaveQuery
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQuery::~CWlanPowerSaveQuery()
+    {
+    STATIC_CAST( CEikServAppUi*, 
+                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
+    }
+
+
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::OkToExitL
+// ---------------------------------------------------------
+//
+TBool CWlanPowerSaveQuery::OkToExitL( TInt aButtonId )
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQuery::OkToExitL" );
+    TInt status = KErrCancel;
+    if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeySelect || 
+         aButtonId == EAknSoftkeyDone || aButtonId == EAknSoftkeyOk )
+        {
+        status = KErrNone;
+        }
+
+    CLOG_WRITEF( _L( "aButtonId = %d" ), aButtonId );
+    
+    if ( iNotif )
+        {
+        iNotif->CompleteL( status );	
+        }
+    
+    CLOG_LEAVEFN( "CWlanPowerSaveQuery::OkToExitL" );
+
+    return ETrue;
+    }
+    
+    
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::PreLayoutDynInitL()
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQuery::PreLayoutDynInitL()
+    {    
+    CAknMessageQueryDialog::PreLayoutDynInitL();
+
+    STATIC_CAST( CEikServAppUi*, 
+                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
+    }
+
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::OfferKeyEventL()
+// ---------------------------------------------------------
+//
+TKeyResponse CWlanPowerSaveQuery::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
+                                                 TEventCode aModifiers )
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQuery::OfferKeyEventL" );
+    TInt code = aKeyEvent.iCode;
+        
+    switch ( code )
+        {    
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            {
+            CAknMessageQueryControl* messageQueryControl = STATIC_CAST( 
+                                        CAknMessageQueryControl*, 
+                                        Control( EAknMessageQueryContentId ) );
+            if ( messageQueryControl )
+                {
+                TKeyResponse answer = messageQueryControl->OfferKeyEventL( 
+                                                    aKeyEvent, aModifiers );
+                if ( answer == EKeyWasConsumed )
+                    {
+                    if ( messageQueryControl->LinkHighLighted() ) 
+                        {
+                        if ( !iButtonGroupPreviouslyChanged )
+                            {
+                            CEikButtonGroupContainer& cba = 
+                                                        ButtonGroupContainer();
+
+                            ButtonGroupContainer().AddCommandSetToStackL( 
+                                                    R_SOFTKEYS_VIEW_EMPTY__VIEW );
+
+                            cba.UpdateCommandObserverL( 
+                              CEikButtonGroupContainer::ELeftSoftkeyPosition,
+                              *this );
+
+                            cba.UpdateCommandObserverL( 
+                              CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+                              *this );
+
+                            cba.DrawDeferred();
+ 
+                            iButtonGroupPreviouslyChanged = ETrue;
+                           }
+                        }
+                    else if ( iButtonGroupPreviouslyChanged )
+                        {                            
+                        CEikButtonGroupContainer& cba = ButtonGroupContainer();
+
+                        cba.RemoveCommandObserver( 
+                            CEikButtonGroupContainer::ELeftSoftkeyPosition );
+
+                        cba.RemoveCommandObserver( 
+                            CEikButtonGroupContainer::EMiddleSoftkeyPosition );
+
+                        cba.RemoveCommandFromStack( 
+                            CEikButtonGroupContainer::ELeftSoftkeyPosition,
+                            EAknSoftkeyView );
+
+                        cba.RemoveCommandFromStack( 
+                            CEikButtonGroupContainer::ERightSoftkeyPosition, 
+                            EAknSoftkeyNo );
+
+                        cba.RemoveCommandFromStack( 
+                            CEikButtonGroupContainer::EMiddleSoftkeyPosition, 
+                            EAknSoftkeyView );
+
+                        cba.DrawDeferred();
+
+                        iButtonGroupPreviouslyChanged = EFalse;
+                        }
+                    }
+                CLOG_WRITEF( _L( "answer = %d" ), answer );
+                CLOG_LEAVEFN( "CWlanPowerSaveQuery::OfferKeyEventL 1" );
+                return answer;  
+                }
+            }
+            break;
+            
+        default:
+            break;
+        }
+
+    CLOG_LEAVEFN( "CWlanPowerSaveQuery::OfferKeyEventL 2" );
+    return CAknMessageQueryDialog::OfferKeyEventL( aKeyEvent, aModifiers );
+    }
+
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQuery::TryExitL()
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQuery::TryExitL( TInt aButtonId )
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQuery::TryExitL" );
+    CAknMessageQueryDialog::TryExitL( aButtonId );
+    CLOG_LEAVEFN( "CWlanPowerSaveQuery::TryExitL" );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/wlanpowersavetestnotif.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,259 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Notier part for WLAN Power Save Testing notification dialog
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "wlanpowersavetestnotif.h"
+#include "wlanpowersavetest.h"
+#include "ConnectionUiUtilitiesCommon.h"
+#include "ConnUiUtilsNotif.h"
+#include "ConnectionDialogsLogger.h"
+
+#include <connuiutilsnotif.rsg>
+#include <StringLoader.h>
+
+#include <ConnectionUiUtilities.h>
+
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQueryNotif::CWlanPowerSaveQueryNotif()
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQueryNotif::CWlanPowerSaveQueryNotif()
+    :
+    iDialog( NULL ),
+    iDisable( EFalse ),
+    iExitAsync( NULL )
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQueryNotif* CWlanPowerSaveQueryNotif::NewL()
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQueryNotif* CWlanPowerSaveQueryNotif::NewL( 
+                                        const TBool aResourceFileResponsible )
+    {
+    CWlanPowerSaveQueryNotif* self = new ( ELeave ) CWlanPowerSaveQueryNotif();
+    CleanupStack::PushL( self );
+    self->ConstructL( KResourceFileName, aResourceFileResponsible );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQueryNotif::~CWlanPowerSaveQueryNotif()
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQueryNotif::~CWlanPowerSaveQueryNotif()
+    {   
+    if ( iExitAsync )
+        {
+    	delete iExitAsync;
+    	iExitAsync = NULL;
+        }
+    }
+
+// ---------------------------------------------------------
+// CWlanPowerSaveQueryNotif::RegisterL()
+// ---------------------------------------------------------
+//
+CWlanPowerSaveQueryNotif::TNotifierInfo CWlanPowerSaveQueryNotif::RegisterL()
+    {
+    iInfo.iUid      = KUidWlanPowerSaveTestNote;
+    iInfo.iPriority = ENotifierPriorityHigh;
+    iInfo.iChannel  = KUidWlanPowerSaveTestNote;
+
+    return iInfo;
+    }
+
+// ---------------------------------------------------------
+// void CWlanPowerSaveQueryNotif::StartL
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQueryNotif::StartL( const TDesC8& /*aBuffer*/, 
+                                       TInt aReplySlot,
+                                       const RMessagePtr2& aMessage )
+    {
+    if ( iDialog )
+        {
+        // Dialog is already on the display
+        aMessage.Complete( KErrServerBusy );
+        return;
+        }
+            
+    iReplySlot = aReplySlot;
+    iMessage   = aMessage;
+    iCancelled = EFalse;    
+
+    iDialog = new ( ELeave ) CWlanPowerSaveQuery( this );
+    iDialog->PrepareLC( R_POWERSAVE_QUERY );
+    
+    HBufC* heading  = NULL;
+    HBufC* message  = NULL;
+    TInt resourceId = 0;
+    
+    resourceId = R_QTN_WLAN_POWER_SAVE_TEST_DLG_TEXT;
+    heading    = StringLoader::LoadLC( 
+                     R_QTN_WLAN_POWER_SAVE_TEST_DLG_TITLE );
+    
+    CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 );
+    CleanupStack::PushL( strings );
+    
+    HBufC* messageBase = StringLoader::LoadL( resourceId, *strings );
+
+    CleanupStack::PopAndDestroy( strings );
+
+    CleanupStack::PushL( messageBase );
+
+    _LIT( KLinkStartTag, "\n<AknMessageQuery Link>" );
+    _LIT( KLinkEndTag, "</AknMessageQuery Link>" );
+
+    HBufC* linkString1 = StringLoader::LoadLC( 
+                            R_QTN_WLAN_POWER_SAVE_TEST_DLG_LINK );
+
+    TInt lenMsg = messageBase->Des().Length()+
+                  linkString1->Des().Length()+
+                  KLinkStartTag().Length()+
+                  KLinkEndTag().Length();
+
+
+    message = HBufC::NewL( lenMsg );
+    TPtr messagePtr = message->Des();
+
+    messagePtr.Append( messageBase->Des() ); 
+
+    messagePtr.Append( KLinkStartTag ); 
+    messagePtr.Append( linkString1->Des() );
+    messagePtr.Append( KLinkEndTag );
+
+    CleanupStack::PopAndDestroy( linkString1 );
+    CleanupStack::PopAndDestroy( messageBase );
+
+    CleanupStack::PushL( message );
+
+    iDialog->SetMessageTextL( *message );
+    CleanupStack::PopAndDestroy( message );
+
+    iDialog->QueryHeading()->SetTextL( *heading );
+    CleanupStack::PopAndDestroy( heading );
+
+    // Set callback for the link
+    TCallBack callBackFirstLink( DisableTestLinkL, this );
+    iDialog->SetLink( callBackFirstLink );
+
+    iDialog->RunLD();
+    }
+
+// ---------------------------------------------------------
+// void CWlanPowerSaveQueryNotif::Cancel()
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQueryNotif::Cancel()
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQueryNotif::Cancel" );
+    if ( !iCancelled )
+        {
+        iCancelled = ETrue;
+        if ( !iMessage.IsNull() )
+            {
+            iMessage.Complete( KErrCancel );
+            }
+        
+        delete iDialog;
+        iDialog = NULL;
+        }
+            
+    CLOG_LEAVEFN( "CWlanPowerSaveQueryNotif::Cancel" );
+    }
+
+
+// ---------------------------------------------------------
+// void CWlanPowerSaveQueryNotif::CompleteL( TInt aStatus )
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQueryNotif::CompleteL( TInt aStatus )
+    {  
+    CLOG_ENTERFN( "CWlanPowerSaveQueryNotif::CompleteL" );
+    if ( !iMessage.IsNull() )
+        {        
+        iMessage.WriteL( iReplySlot, TPckg< TBool >( iDisable ) );
+        iMessage.Complete( aStatus );
+        }
+    
+    iCancelled = ETrue;
+    iDialog    = NULL; //deleted by AVKON when OkToExitL completes
+    
+    CLOG_LEAVEFN( "CWlanPowerSaveQueryNotif::CompleteL" );
+    }
+
+
+// ---------------------------------------------------------
+// TInt CWlanPowerSaveQueryNotif::DisableTestLinkL()
+// ---------------------------------------------------------
+//
+TInt CWlanPowerSaveQueryNotif::DisableTestLinkL( TAny* aObject )
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQueryNotif::DisableTestLinkL" );
+    CWlanPowerSaveQueryNotif* myself =
+                            static_cast<CWlanPowerSaveQueryNotif*>( aObject );
+    
+    if ( !myself->iExitAsync )
+        {
+        // Can't exit now. This call could be triggered by a pointer
+        // event. AVKON would crash if exit is done now.
+        // Trigger a one shot active object to delay exit. 
+        TCallBack cb( myself->DisableTestLinkL, myself );
+	    myself->iExitAsync = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );
+	    myself->iExitAsync->CallBack();
+	    
+	    CLOG_LEAVEFN( "CWlanPowerSaveQueryNotif::DisableTestLinkL" );
+	    return 1;
+        }
+    else
+        {
+        // We can exit now. Called by one shot active object.
+        myself->DoDisableTestLinkL();
+        
+        CLOG_LEAVEFN( "CWlanPowerSaveQueryNotif::DisableTestLinkL" );
+        return 0;	
+        }
+    }
+
+
+// ---------------------------------------------------------
+// void CWlanPowerSaveQueryNotif::DoDisableTestLinkL()
+// ---------------------------------------------------------
+//
+void CWlanPowerSaveQueryNotif::DoDisableTestLinkL()
+    {
+    CLOG_ENTERFN( "CWlanPowerSaveQueryNotif::DoDisableTestLinkL" );
+
+    iDisable = ETrue;
+    
+    iDialog->TryExitL( EAknSoftkeySelect );
+    
+    CLOG_LEAVEFN( "CWlanPowerSaveQueryNotif::DoDisableTestLinkL" );
+    }
+
+// End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -83,30 +83,32 @@
     }    
 
 RESOURCE DIALOG r_easy_wep_wpa_dlg
-    {
+	{
     flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons | 
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar;
-    buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
+            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
+            EEikDialogFlagVirtualInput;
+	buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
     items=
-        {
-        DLG_LINE
-            {
-            type=EAknCtQuery;
-            id=EGeneralQuery;
-            control= AVKON_DATA_QUERY
-                { 
-                layout=EDataLayout;
+		{
+		DLG_LINE
+			{
+			type=EAknCtQuery;
+			id=EGeneralQuery;
+			control= AVKON_DATA_QUERY
+				{ 
+				layout=EDataLayout;
                 control = EDWIN
                     {
                     avkon_flags = EAknEditorFlagLatinInputModesOnly;
                     default_case = EAknEditorLowerCase;
-                    default_input_mode = EAknEditorTextInputMode;
+					default_input_mode = EAknEditorTextInputMode;
                     allowed_input_modes = EAknEditorAllInputModes;
                     };
-                };
-             }
-        };
-    }
+				};
+			}
+		};
+
+	}
 
 RESOURCE TBUF r_info_no_networks_found
     { 
@@ -351,6 +353,11 @@
     buf = qtn_occ_connecting_discreet_popup_text1;
     }
 
+RESOURCE TBUF r_qtn_occ_connecting_discreet_popup_text2
+    {
+    buf = qtn_occ_connecting_discreet_popup_text2;
+    }
+
 RESOURCE TBUF r_qtn_occ_connection_failed_discreet_popup_text1
     {
     buf = qtn_occ_connection_failed_discreet_popup_text1;
@@ -493,44 +500,4 @@
     buf = qtn_occ_list_cs_data_home_nw_this_time;
     }
 
-RESOURCE CBA r_softkeys_connect_cancel__connect
-    {
-    buttons =
-        {
-        CBA_BUTTON {id=EAknSoftkeySelect; txt=qtn_netw_conset_softkey_connect; },
-        CBA_BUTTON {id=EAknSoftkeyCancel; txt=text_softkey_cancel; },
-        CBA_BUTTON {id=EAknSoftkeySelect; txt=qtn_netw_conset_softkey_connect; }
-        };
-    }
-
-RESOURCE DIALOG r_visitor_query
-    {
-    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | 
-            EEikDialogFlagCbaButtons | EEikDialogFlagNoBorder | 
-            EEikDialogFlagNoShadow | EEikDialogFlagNotifyEsc;
-    buttons = r_softkeys_connect_cancel__connect;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                label = "";
-                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
-                };
-            },
-
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                };
-            }
-        };
-    }
-
 // End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ActiveWrapper.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ActiveWrapper.h	Tue Aug 31 15:35:44 2010 +0300
@@ -26,7 +26,7 @@
 
 
 // CONSTANTS
-const TUint KNumberOfWrappedDialogs = 13;
+const TUint KNumberOfWrappedDialogs = 7;
 
 enum TWrappedDialogs
     {
@@ -34,15 +34,9 @@
     EOffLineWlan,
     EWlanDisabled,
     EWlanNetwUnavail,
-    EConnViaDestCM,
-    EChangingConnTo,
-    EConnViaCM,
     EWlanEasyWep,
     EWlanEasyWpa,
-    EWlanEasyWapi,
-    ENoWlanNetwsAvail,
-    EConnectingViaDiscreetPopup,
-    EConnectionErrorDiscreetPopup
+    EWlanEasyWapi
     };
 
 
@@ -96,10 +90,6 @@
     
         TInt StartEasyWapiDlg( TPckgBuf< TBuf< KEasyWapiQueryMaxLength > >& aKey );
 
-        void StartConnectingViaDiscreetPopup(TPckgBuf< TConnUiConnectingViaDiscreetPopup>& aInfo);
-
-        void StartConnectionErrorDiscreetPopup( TPckgBuf<TInt>& aErrCode);
-        
     public: // Functions from base classes
 
         void DoCancel();
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ChangeConnectionDlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ChangeConnectionDlg.h	Tue Aug 31 15:35:44 2010 +0300
@@ -102,15 +102,6 @@
         */
         void HandleTimedOut();
 
-    private:  // New functions
-
-        /**
-        * Sets graphic icons
-        * @param    -
-        */
-        void SetIconsL();
-
-
     private: //data
         TUint32*            iIAPId;
         TBuf<CommsDat::KMaxTextLength> iConnectionName;
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesClient.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesClient.h	Tue Aug 31 15:35:44 2010 +0300
@@ -135,36 +135,6 @@
         void WLANNetworkUnavailableNote( TRequestStatus& aStatus );       
 
         /**
-        * Confirmation note is used after the connection has been successfully 
-        * established via destination and connection method.
-        * @param aDestId Id of used destination.
-        * @param aConnMId Id of used connection method.
-        * @param aStatus Status object of notifier.
-        */
-        void ConnectedViaDestAndConnMethodNote( const TUint32 aDestId, 
-                                                const TUint32 aConnMId,
-                                                TRequestStatus& aStatus );
-        /**
-        * Cancel ConnectedViaDestAndConnMethodNote notifier.
-        */
-        void CancelConnectedViaDestAndConnMethodNote();
-
-        /**
-        * Information note is used when "Automatically" roaming is enabled
-        * The actual connection establishment take places in the background
-        * (no wait note).
-        * @param aConnMId Id of used connection method.
-        * @param aStatus Status object of notifier.
-        */
-        void ChangingConnectionToNote( const TUint32 aConnMId,
-                                       TRequestStatus& aStatus );
-
-        /**
-        * Cancel ChangingConnectionToNote notifier.
-        */
-        void CancelChangingConnectionToNote();
-
-        /**
         * Notifier. Shows a query, "Connect to\n '%0U' via\n '%1U'?"
         * @param aResult Result of user selection, ETrue if user accepted
         * roaming, to more preferred method, EFlase otherwise
@@ -180,19 +150,18 @@
         */
         void CancelConfirmMethodUsageQuery();
 
-
         /**
-        * Confirmation note is used after the connection has been successfully 
-        * established via a connection method.
-        * @param aConnMId Id of used connection method.
+        * This note is displayed when power-save feature of the WLAN station 
+        * is incompatible and thus battery consumption of the mobile will increase.
+        * @param aDisable ETrue if user wants to disable this note in the future.
         * @param aStatus Status object of notifier.
         */
-        void ConnectedViaConnMethodNote( const TUint32 aConnMId,
-                                        TRequestStatus& aStatus );
+        void WlanPowerSaveTestNote( TBool& aDisable, TRequestStatus& aStatus );
+        
         /**
-        * Cancel ConnectedViaConnMethodNote notifier.
+        * Cancel WlanPowerSaveTestNote notifier.
         */
-        void CancelConnectedViaConnMethodNote();
+        void CancelWlanPowerSaveTestNote();
         
         /**
         * Notifier. Prompts WAPI-PSK.
@@ -208,36 +177,6 @@
         */                  
         void CancelEasyWapiDlg();
 
-        /**
-        * Pops up an information note: 
-        * "No WLAN networks are available at the moment. Connection not available."
-        */ 
-        void NoWLANNetworksAvailableNote( TRequestStatus& aStatus );                  
-        
-        /**
-        * Discreet popup. Shows "connecting via %U" discreet popup.
-        * @param aInfo Information about bearer.
-        */
-        void ConnectingViaDiscreetPopup( TPckgBuf< TConnUiConnectingViaDiscreetPopup>& aInfo, 
-                          TRequestStatus& aStatus );
-        
-        /**
-        * Cancel ConnectingViaDiscreetPopup notifier.
-        */                  
-        void CancelConnectingViaDiscreetPopup();                  
-
-        /**
-        * Discreet popup. Shows discreet popup about connection error.
-        * @param aErrCode Error code.
-        */
-        void ConnectionErrorDiscreetPopup( TPckgBuf< TInt >& aErrCode, 
-                          TRequestStatus& aStatus );
-        
-        /**
-        * Cancel ConnectionErrorDiscreetPopup notifier.
-        */                  
-        void CancelConnectionErrorDiscreetPopup();                  
-
     private:
 
         // Pointer to the client interface
@@ -260,8 +199,6 @@
 
         TPckgBuf<TConnUiUiDestConnMethodNoteId> iPassedInfo;
 
-        // used for get response from notifier
-        TBuf8<8> iResponseStrNoWLANNetworksAvailableNote;
     };
 
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesCommon.h	Tue Aug 31 15:35:44 2010 +0300
@@ -83,12 +83,6 @@
 
     };
 
-class TConnUiConnectingViaDiscreetPopup
-    {
-public:
-    TUint32   iIapId;
-    };
-
 #endif  // CONNECTIONUIUTILITIES_COMMON_H
 
 
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/ConnectionUiUtilitiesImpl.h	Tue Aug 31 15:35:44 2010 +0300
@@ -40,7 +40,7 @@
 class CCommsDatabase;
 class TConnectionPrefs;
 class CAknGlobalNote;
-
+class CConnectionStatusPopup;
 
 // CLASS DECLARATION
 
@@ -370,56 +370,6 @@
         void WLANNetworkUnavailableNote();           
 
         /**
-        * DEPRECATED, PLEASE USE ASYNC VERSION!
-        * Confirmation note is used after the connection has been successfully 
-        * established via destination and connection method.
-        * @param aDestId Id of used destination.
-        * @param aConnMId Id of used connection method.
-        */
-        void ConnectedViaDestAndConnMethodNote( const TUint32 aDestId, 
-                                                const TUint32 aConnMId );
-
-        /**
-        * Confirmation note is used after the connection has been successfully 
-        * established via destination and connection method.
-        * @param aDestId Id of used destination.
-        * @param aConnMId Id of used connection method.
-        * @param aStatus caller's TRequestStatus to handle asynchronous call.
-        */
-        void ConnectedViaDestAndConnMethodNote( const TUint32 aDestId, 
-                                                const TUint32 aConnMId, 
-                                                TRequestStatus& aStatus );
-
-        /**
-        * Cancel ConnectedViaDestAndConnMethodNote notifier.
-        */
-        void CancelConnectedViaDestAndConnMethodNote();
-
-
-        /**
-        * Information note is used when "Automatically" roaming is enabled. The
-        * actual connection establishment take places in the background 
-        * (no wait note).
-        * @param aConnMId Id of used connection method.
-        */
-        void ChangingConnectionToNote( const TUint32 aConnMId );
-        
-        /**
-        * Information note is used when "Automatically" roaming is enabled. The
-        * actual connection establishment take places in the background 
-        * (no wait note).
-        * @param aConnMId Id of used connection method.
-        * @param aStatus Status object of notifier.
-        */       
-        void ChangingConnectionToNote( const TUint32 aConnMId, 
-        								TRequestStatus& aStatus );
-
-        /**
-        * Cancel ChangingConnectionToNote notifier.
-        */
-        void CancelChangingConnectionToNote();
-        
-        /**
         * Notifier. Shows a query, "Connect to\n '%0U' via\n '%1U'?"
         * @param aResult Result of user selection, ETrue if user accepted 
         * roaming, to more preferred method, EFlase otherwise
@@ -436,25 +386,17 @@
         void CancelConfirmMethodUsageQuery();
 
         /**
-        * DEPRECATED, PLEASE USE ASYNC VERSION!
-        * Confirmation note is used after the connection has been successfully 
-        * established via a connection method.
-        * @param aConnMId Id of used connection method.
+        * This note is displayed when power-save feature of the WLAN station 
+        * is incompatible and thus battery consumption of the mobile will increase.
+        * @param aDisable ETrue if user wants to disable this note in the future.
+        * @param aStatus Status object of notifier.
         */
-        void ConnectedViaConnMethodNote( const TUint32 aConnMId );
-
+        void WlanPowerSaveTestNote( TBool& aDisable, TRequestStatus& aStatus );
+        
         /**
-        * Confirmation note is used after the connection has been successfully 
-        * established via a connection method.
-        * @param aConnMId Id of used connection method.
-        * @param aStatus caller's TRequestStatus to handle asynchronous call.
+        * Cancel WlanPowerSaveTestNote notifier.
         */
-        void ConnectedViaConnMethodNote( const TUint32 aConnMId, 
-                                         TRequestStatus& aStatus );
-                /**
-        * Cancel ConnectedViaConnMethodNote notifier.
-        */
-        void CancelConnectedViaConnMethodNote();
+        void CancelWlanPowerSaveTestNote();
         
         /**
         * Notifier. Query for prompting WAPI-PSK. 
@@ -464,19 +406,25 @@
         */
         TBool EasyWapiDlg( TDes* aKey );
 
-        /**
-        * Pops up an information note: 
-        * "No WLAN networks are available at the moment. Connection not available."
-        */        
-        void NoWLANNetworksAvailableNote();
+        /**           
+        * Discreet popup. Shows "Connecting" discreet popup 
+        */
+        void ConnectingViaDiscreetPopup( );
 
         /**           
         * Discreet popup. Shows "Connecting via %U" discreet popup 
         * @param aIapId IAP id of the access point.
+        * @param aConnectionAlreadyActive True if connection is already active
+        *   (shared).
         */
-        void ConnectingViaDiscreetPopup( const TUint32& aIapId );
+        void ConnectingViaDiscreetPopup( const TUint32& aIapId, 
+                                         TBool aConnectionAlreadyActive );
 
-        
+        /**           
+        * Cancels (hides) "Connecting via %U" discreet popup. 
+        */
+        void CancelConnectingViaDiscreetPopup();
+
         /**           
         * Discreet popup. Shows discreet popup about connection errors 
         * @param aErrorCode Error code
@@ -528,8 +476,8 @@
         // buffer for passing WAPI key between client and server
         TPckgBuf< TBuf< KEasyWapiQueryMaxLength > > iWapiKey;
         
-        // buffer for passing connecting discreet popup info
-        TPckgBuf< TConnUiConnectingViaDiscreetPopup > iConnInfo;
+        // Connection status (via, error) implementation
+        CConnectionStatusPopup* iConnStatusPopup;
         
     };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declaration of CConnectionStatusPopup
+*
+*/
+#ifndef __CCONNECTIONSTATUSPOPUP_H_
+#define __CCONNECTIONSTATUSPOPUP_H_
+
+// INCLUDES
+#include <e32base.h>
+#include "hbdevicenotificationdialogsymbian.h"
+
+/**
+ * CConnectionStatusPopup
+ * Handler for connection status popups
+ */
+NONSHARABLE_CLASS( CConnectionStatusPopup ) : public CBase, 
+    public MHbDeviceNotificationDialogObserver
+    {
+public: // Constructors and destructor
+
+    /**
+    * Two-phased constructor. Leaves on failure.
+    * @return The constructed CConnectionStatusPopup object.
+    */
+    static CConnectionStatusPopup* NewL();
+    
+    /**
+     * Destructor
+     */
+    virtual ~CConnectionStatusPopup();
+
+public:
+    
+    /**
+     * Shows "Connecting" discreet popup.
+     */
+    void ConnectingViaDiscreetPopup( );
+
+    /**
+     * Shows "Connecting via '%U'" discreet popup.
+     */
+    void ConnectingViaDiscreetPopup( TUint32 aIAPId, 
+            TBool aConnectionAlreadyActive );
+    /**
+     * Cancels the "Connecting via '%U'" discreet popup.
+     */
+    void CancelConnectingViaDiscreetPopup();
+
+    /**
+     * Shows connection error discreet popup.
+     */
+    void ConnectionErrorDiscreetPopup( TInt aErrorCode );
+    
+public: // MHbDeviceNotificationDialogObserver
+
+    void NotificationDialogActivated(
+            const CHbDeviceNotificationDialogSymbian* aDialog );
+    
+    void NotificationDialogClosed(
+            const CHbDeviceNotificationDialogSymbian* aDialog,
+            TInt aCompletionCode );
+    
+private:
+    
+    /**
+     * Defines long enough timeout for the popup to be considered shown
+     * "forever".
+     */
+    const static TInt KForeverTimeout = 3*60*1000*1000;
+
+    /**
+     * The state of the popup
+     */
+    enum TPopupState
+        {
+        /**
+         *  Not shown
+         */
+        EPopupClosed,
+        /**
+         *  "Connecting" one-liner
+         */
+        EPopupConnecting,
+        /**
+         *  "Connecting" with iap name on second row
+         */
+        EPopupConnectingIap,
+        /**
+         *  "Connection failed/error"
+         */
+        EPopupError
+        };
+    
+    /**
+     * Constructor
+     */
+    CConnectionStatusPopup();
+
+    /**
+     * Second-phase constructor
+     */
+    void ConstructL();
+    
+    /**
+     * Sets the new state for the popup.
+     */
+    void SetState( TPopupState aNewState );
+
+    /**
+     * Formats iap info for Connecting via -popup.
+     */
+    void FormatIapInfoL( TUint32 aIapId );
+
+    /**
+     * Prepares popup for error code.
+     * @return ETrue when popup should be shown.
+     */
+    TBool ResolveErrorCodeL( TInt aErrorCode );
+
+private:
+
+    // Popup dialog
+    CHbDeviceNotificationDialogSymbian* iPopup;
+    
+    // The state of the popup
+    TPopupState iPopupState;
+    
+    enum TTouchAction
+        {
+        /**
+         * Do nothing
+         */
+        EDoNothing,
+        
+        /**
+         * Open WLAN view
+         */
+        EOpenWlanView,
+        
+        /**
+         *  Open connection view
+         */
+        EOpenCellularView,
+        
+        };
+    
+    /**
+     * Indicates what to do when popup is activated (tapped) and
+     * enables/disables touch activation based on value.
+     */
+    TTouchAction iTouchAction;
+    
+    };
+
+#endif /* __CCONNECTIONSTATUSPOPUP_H_ */
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/loc/connectionuiutilities.loc	Tue Aug 31 15:35:44 2010 +0300
@@ -94,7 +94,7 @@
 //w:
 //r:3.0
 //
-#define qtn_offline_activate_wlan               "Allow WLAN connections during this offline session?"
+#define qtn_offline_activate_wlan               "Do you want to create a WLAN connection in Off-line mode?"
 
 //d: Wait note text during collection of access points
 //l: popup_note_wait_window
@@ -253,6 +253,14 @@
 //
 #define qtn_occ_connecting_discreet_popup_text1 "Connecting"
 
+//d:Text of discreet popup row 2 informing about the used IAP for the connection
+//l:popup_discreet_window_t2
+//w:
+//r:5.2
+//
+#define qtn_occ_connecting_discreet_popup_text2 "Via '%U'"
+
+
 //d:No WLAN networks are available at the moment - note
 //l:popup_discreet_window_t1/opt4
 //w:
@@ -304,7 +312,7 @@
 //w:
 //r:5.2
 //
-#define qtn_occ_detail_cs_data_foreign_nw    "Connect to Internet using cellular data? Phone is outside of home network, and data costs may increase considerably.\nTo allow connecting automatically, adjust the Connection settings."
+#define qtn_occ_detail_cs_data_foreign_nw    "Connect to Internet in this country using cellular data? Data costs may increase considerably."
 
 //d:Option for connection query in foreign network.
 //l:list_single_pane_t1_cp2
@@ -429,11 +437,4 @@
 //
 #define qtn_occ_config_failed_discreet_popup_text1 "Configuration failed"
 
-//d:Softkey used to confirm the query
-//l:control_pane_t1/opt7
-//w:
-//r:5.2
-//
-#define qtn_netw_conset_softkey_connect             "Connect"
-
 // End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveCChangeConnectionDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveCChangeConnectionDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -26,7 +26,7 @@
 #include <wlanmgmtclient.h>
 #endif
 
-#include <ConnectionUiUtilities.rsg>
+#include <connectionuiutilities.rsg>
 
 #include "ActiveCChangeConnectionDlg.h"
 #include "ChangeConnectionDlg.h"
@@ -81,7 +81,8 @@
                                             TUint32* aIAPId, 
                                             const TConnectionPrefs& aPrefs,
                                             TDes& aConnectionName  ) 
-: CActiveIAPListing( aPrefs ), 
+: CActiveIAPListing( aPrefs ),
+  iDialog( NULL ),
   isDialogDeleting( EFalse ),
   iIAPId( aIAPId ),
   iConnectionName( aConnectionName ),
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveWrapper.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ActiveWrapper.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -71,7 +71,15 @@
 //
 CActiveWrapper::CActiveWrapper( const TUint aIndexOfNote ) 
 : CActive( CActive::EPriorityStandard ),
-  iIndexOfNote( aIndexOfNote )
+  iSSID( NULL ),
+  iConnectionMode( NULL ),
+  iSecurityMode( NULL ),
+  iExtSecurityMode( NULL ),
+  iProtectedSetupSupported( NULL ),
+  iRS( NULL ),
+  iIndexOfNote( aIndexOfNote ),
+  iKey( NULL ),
+  iHex( NULL )
     {
     }
 
@@ -199,23 +207,6 @@
             break;
             }
 
-        case EConnViaDestCM:
-            {
-            iNotif.CancelConnectedViaDestAndConnMethodNote();
-            break;
-            }
-
-        case EChangingConnTo:
-            {
-            iNotif.CancelChangingConnectionToNote();
-            break;
-            }
-
-        case EConnViaCM:
-            {
-            iNotif.CancelConnectedViaConnMethodNote();            
-            break;
-            }
         case EWlanEasyWep:
             {
             iNotif.CancelEasyWepDlg();
@@ -437,31 +428,6 @@
                 break;
                 }
 
-            case EConnViaDestCM:
-                {
-                iNotif.ConnectedViaDestAndConnMethodNote( aDestId, aConnMId,
-                                                          iStatus );
-                break;
-                }
-
-            case EChangingConnTo:
-                {
-                iNotif.ChangingConnectionToNote( aConnMId, iStatus );
-                break;
-                }
-
-            case EConnViaCM:
-                {
-                iNotif.ConnectedViaConnMethodNote( aConnMId, iStatus );
-                break;
-                }
-
-            case ENoWlanNetwsAvail:
-                {
-                iNotif.NoWLANNetworksAvailableNote( iStatus );
-                break;
-                }
-
             default:
                 {
                 return;
@@ -496,41 +462,4 @@
     return iStatus.Int();  
     }
 
-// ---------------------------------------------------------
-// CActiveWrapper::StartConnectingViaDiscreetPopup
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartConnectingViaDiscreetPopup( TPckgBuf< TConnUiConnectingViaDiscreetPopup>& aInfo )
-    {
-    if ( IsActive() == EFalse )
-        {
-        iIndexOfNote = EConnectingViaDiscreetPopup;
-        iNotif.ConnectingViaDiscreetPopup( aInfo, iStatus );
-        SetActive();
-        iWait.Start();
-        }
-
-    }
-
-
-// ---------------------------------------------------------
-// CActiveWrapper::StartConnectionErrorDiscreetPopup
-//
-// Starts the active object
-// ---------------------------------------------------------
-//
-void CActiveWrapper::StartConnectionErrorDiscreetPopup( TPckgBuf<TInt>& aErrCode )
-    {
-    if ( IsActive() == EFalse )
-        {
-        iIndexOfNote = EConnectionErrorDiscreetPopup;
-        iNotif.ConnectionErrorDiscreetPopup( aErrCode, iStatus );
-        SetActive();
-        iWait.Start();
-        }
-
-    }
-
 // End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -27,8 +27,7 @@
 #include <WlanCdbCols.h>
 
 #include <data_caging_path_literals.hrh>
-#include <ConnectionUiUtilities.rsg>
-#include <apsettings.mbg>
+#include <connectionuiutilities.rsg>
 
 #include "ChangeConnectionDlg.h"
 #include "ActiveCChangeConnectionDlg.h"
@@ -37,18 +36,10 @@
 
 // CONSTANTS
 
-// ROM folder
-_LIT( KDriveZ, "z:" );
-
-// Name of the MBM file containing icons
-_LIT( KFileIcons, "ApSettings.mbm" );
-
 #if defined(_DEBUG)
 _LIT( KErrNullPointer, "NULL pointer" );
 #endif
 
-LOCAL_D const TInt KIconsGranularity = 4;
-
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -61,7 +52,8 @@
   iIAPId( aIAPId ),
   iConnectionName( aConnectionName ),
   iIsWLANFeatureSupported( EFalse ),
-  iActiveDlg( aActiveDlg )
+  iActiveDlg( aActiveDlg ),
+  iExpiryTimer( NULL )
     {
     }
 
@@ -166,8 +158,6 @@
     SetItemTextArray( iActiveDlg->ActIAPs() );       
     SetOwnershipType( ELbmDoesNotOwnItemArray );
 
-    SetIconsL();
-    
     // Timer not in use due the unresolved crash
     //iExpiryTimer = CExpiryTimer::NewL( *this );
     //iExpiryTimer->Start();
@@ -196,67 +186,6 @@
     }
 
 
-// ---------------------------------------------------------
-// CChangeConnectionDlg::SetIconsL()
-// ---------------------------------------------------------
-//
-void CChangeConnectionDlg::SetIconsL()
-    {
-    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( 
-                                                        KIconsGranularity );
-    CleanupStack::PushL( icons );
-
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-
-    iconsFileName.Append( KFileIcons );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlGprs,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_gprs, 
-                            EMbmApsettingsQgn_prop_wml_gprs_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlCsd,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_csd, 
-                            EMbmApsettingsQgn_prop_wml_csd_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlHscsd,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_hscsd, 
-                            EMbmApsettingsQgn_prop_wml_hscsd_mask ) );
-
-    if ( iIsWLANFeatureSupported )
-        {
-        icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWlanEasy,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wlan_easy, 
-                            EMbmApsettingsQgn_prop_wlan_easy_mask ) );
-    
-        icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWlanBearer,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wlan_bearer, 
-                            EMbmApsettingsQgn_prop_wlan_bearer_mask ) );
-        }
-    
-    SetIconArrayL( icons );
-
-    CleanupStack::Pop( icons );
-    }
-
-
-
-
 // ----------------------------------------------------------------------------
 // void CChangeConnectionDlg::HandleResourceChange( TInt aType )
 // Handle resource change events. 
@@ -268,7 +197,6 @@
         {
         CAknListQueryDialog::HandleResourceChange( aType );
 
-        TRAP_IGNORE( SetIconsL() );
         SizeChanged();
         }
     else
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilities.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -278,10 +278,10 @@
 // ---------------------------------------------------------
 //
 EXPORT_C void CConnectionUiUtilities::ConnectedViaDestAndConnMethodNote( 
-                                                const TUint32 aDestId, 
-                                                const TUint32 aConnMId )
+                                                const TUint32 /*aDestId*/, 
+                                                const TUint32 /*aConnMId*/ )
     {
-    iImpl->ConnectedViaDestAndConnMethodNote( aDestId, aConnMId );    
+    // Deprecated.    
     }
  
 // ---------------------------------------------------------
@@ -289,11 +289,11 @@
 // ---------------------------------------------------------
 //
 EXPORT_C void CConnectionUiUtilities::ConnectedViaDestAndConnMethodNote( 
-                                                const TUint32 aDestId, 
-                                                const TUint32 aConnMId, 
-                                                TRequestStatus& aStatus  )
+                                                const TUint32 /*aDestId*/, 
+                                                const TUint32 /*aConnMId*/, 
+                                                TRequestStatus& /*aStatus*/  )
     {
-    iImpl->ConnectedViaDestAndConnMethodNote( aDestId, aConnMId, aStatus ); 
+    // Deprecated. 
     }
            
 // ---------------------------------------------------------
@@ -302,7 +302,7 @@
 //
 EXPORT_C void CConnectionUiUtilities::CancelConnectedViaDestAndConnMethodNote()
     {
-    iImpl->CancelConnectedViaDestAndConnMethodNote();            
+    // Deprecated.            
     }
 
 // ---------------------------------------------------------
@@ -354,19 +354,19 @@
 // ---------------------------------------------------------
 //
 EXPORT_C void CConnectionUiUtilities::ChangingConnectionToNote( 
-                                                const TUint32 aConnMId )
+                                                const TUint32 /*aConnMId*/ )
     {
-    iImpl->ChangingConnectionToNote( aConnMId );                
+    // Deprecated.                
     }
 
 // ---------------------------------------------------------
 // CConnectionUiUtilities::ChangingConnectionToNote
 // ---------------------------------------------------------
 //    
-EXPORT_C void CConnectionUiUtilities::ChangingConnectionToNote( const TUint32 aConnMId, 
-        											TRequestStatus& aStatus )
+EXPORT_C void CConnectionUiUtilities::ChangingConnectionToNote( const TUint32 /*aConnMId*/, 
+        											TRequestStatus& /*aStatus*/ )
 	{
-	iImpl->ChangingConnectionToNote( aConnMId, aStatus ); 
+	// Deprecated. 
 	}
 
 // ---------------------------------------------------------
@@ -375,7 +375,7 @@
 //
 EXPORT_C void CConnectionUiUtilities::CancelChangingConnectionToNote()
     {
-    iImpl->CancelChangingConnectionToNote();            
+    // Deprecated.            
     }
 
 // ---------------------------------------------------------
@@ -408,9 +408,9 @@
 // ---------------------------------------------------------
 //
 EXPORT_C void CConnectionUiUtilities::ConnectedViaConnMethodNote( 
-                                                    const TUint32 aConnMId )
+                                                    const TUint32 /*aConnMId*/ )
     {
-    iImpl->ConnectedViaConnMethodNote( aConnMId );    
+    // Deprecated.    
     }
 
 // ---------------------------------------------------------
@@ -418,10 +418,10 @@
 // ---------------------------------------------------------
 //
 EXPORT_C void CConnectionUiUtilities::ConnectedViaConnMethodNote( 
-                                                    const TUint32 aConnMId, 
-                                                    TRequestStatus& aStatus )
+                                                    const TUint32 /*aConnMId*/, 
+                                                    TRequestStatus& /*aStatus*/ )
     {
-    iImpl->ConnectedViaConnMethodNote( aConnMId , aStatus );    
+    // Deprecated.    
     }
 
 // ---------------------------------------------------------
@@ -430,7 +430,7 @@
 //
 EXPORT_C void CConnectionUiUtilities::CancelConnectedViaConnMethodNote()
     {
-    iImpl->CancelConnectedViaConnMethodNote();
+    // Deprecated.
     }
 
 
@@ -490,6 +490,26 @@
     }
     
 // ---------------------------------------------------------
+// CConnectionUiUtilities::WlanPowerSaveTestNote
+// ---------------------------------------------------------
+//
+EXPORT_C void CConnectionUiUtilities::WlanPowerSaveTestNote(
+                                               TBool&          aDisable,
+                                               TRequestStatus& aStatus )
+    {
+    iImpl->WlanPowerSaveTestNote( aDisable, aStatus );
+    }
+
+// ---------------------------------------------------------
+// CConnectionUiUtilities::CancelWlanPowerSaveTestNote
+// ---------------------------------------------------------
+//
+EXPORT_C void CConnectionUiUtilities::CancelWlanPowerSaveTestNote()
+    {
+    iImpl->CancelWlanPowerSaveTestNote();
+    }
+
+// ---------------------------------------------------------
 // CConnectionUiUtilities::EasyWapiDlg
 // ---------------------------------------------------------
 //
@@ -504,7 +524,7 @@
 //
 EXPORT_C void CConnectionUiUtilities::NoWLANNetworksAvailableNote()
     {
-    iImpl->NoWLANNetworksAvailableNote();
+    // Note removed.
     }
 
 // ---------------------------------------------------------
@@ -587,13 +607,32 @@
 // CConnectionUiUtilities::ConnectingViaDiscreetPopup
 // ---------------------------------------------------------
 //
-EXPORT_C void CConnectionUiUtilities::ConnectingViaDiscreetPopup( 
-        const TUint32& aIapId )
+EXPORT_C void CConnectionUiUtilities::ConnectingViaDiscreetPopup( )
     {
-    iImpl->ConnectingViaDiscreetPopup( aIapId );
+    iImpl->ConnectingViaDiscreetPopup( );
     } 
 
 // ---------------------------------------------------------
+// CConnectionUiUtilities::ConnectingViaDiscreetPopup
+// ---------------------------------------------------------
+//
+EXPORT_C void CConnectionUiUtilities::ConnectingViaDiscreetPopup( 
+        const TUint32& aIapId,
+        TBool aConnectionAlreadyActive )
+    {
+    iImpl->ConnectingViaDiscreetPopup( aIapId, aConnectionAlreadyActive );
+    } 
+
+// ---------------------------------------------------------
+// CConnectionUiUtilities::CancelConnectingViaDiscreetPopup
+// ---------------------------------------------------------
+//
+EXPORT_C void CConnectionUiUtilities::CancelConnectingViaDiscreetPopup()
+    {
+    iImpl->CancelConnectingViaDiscreetPopup();
+    }
+
+// ---------------------------------------------------------
 // CConnectionUiUtilities::ConnectionErrorDiscreetPopup
 // ---------------------------------------------------------
 //
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesClient.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesClient.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -263,98 +263,6 @@
     }
     
 // ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::ConnectedViaDestAndConnMethodNote
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::ConnectedViaDestAndConnMethodNote( 
-                                                    const TUint32 aDestId, 
-                                                    const TUint32 aConnMId,
-                                                    TRequestStatus& aStatus )
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::ConnectedViaDestAndConnMethodNote" );
-
-    ::new( &iPassedInfo ) TPckgBuf<TConnUiUiDestConnMethodNoteId>( 
-                                            TConnUiUiDestConnMethodNoteId() );
-
-    iPassedInfo().iDestination = aDestId;    
-    iPassedInfo().iConnectionMethod = aConnMId;
-    iPassedInfo().iNoteId = EConnectedViaDestConnMethodConfirmationNote;
-    iPassedInfo().iNextBestExists = EFalse;
-    
-    if ( iNotifier )
-        {
-        iNotifier->StartNotifierAndGetResponse( aStatus, 
-                                                KUidConnectViaNote,
-                                                iPassedInfo,
-                                                iBool );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::ConnectedViaDestAndConnMethodNote" );
-    }
-    
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::CancelConnectedViaDestAndConnMethodNote
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::CancelConnectedViaDestAndConnMethodNote()
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelConnectedViaDestAndConnMethodNote" );
-
-    if ( iNotifier )
-        {
-        iNotifier->CancelNotifier( KUidConnectViaNote );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelConnectedViaDestAndConnMethodNote" );
-    }
-    
-
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::ChangingConnectionToNote
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::ChangingConnectionToNote( 
-                                                const TUint32 aConnMId,
-                                                TRequestStatus& aStatus )
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::ChangingConnectionToNote" );
-
-    ::new( &iPassedInfo ) TPckgBuf<TConnUiUiDestConnMethodNoteId>( 
-                                            TConnUiUiDestConnMethodNoteId() );
-
-    iPassedInfo().iDestination = 0;    
-    iPassedInfo().iConnectionMethod = aConnMId;
-    iPassedInfo().iNoteId = EConnectingToConnMethodInfoNote;
-    iPassedInfo().iNextBestExists = EFalse;
-    
-    if ( iNotifier )
-        {
-        iNotifier->StartNotifierAndGetResponse( aStatus, 
-                                                KUidConnectViaNote,
-                                                iPassedInfo,
-                                                iBool );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::ChangingConnectionToNote" );
-    }
-        
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::CancelChangingConnectionToNote
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::CancelChangingConnectionToNote()
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelChangingConnectionToNote" );
-
-    if ( iNotifier )
-        {
-        iNotifier->CancelNotifier( KUidConnectViaNote );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelChangingConnectionToNote" );
-    }
-    
-// ---------------------------------------------------------
 // RConnectionUiUtilitiesSession::ConfirmMethodUsageQuery()
 // ---------------------------------------------------------
 //
@@ -406,50 +314,43 @@
     CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelConfirmMethodUsageQuery" );
     }    
 
-
 // ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::ConnectedViaConnMethodNote
+// RConnectionUiUtilitiesSession::CWlanPowerSaveTestNote
 // ---------------------------------------------------------
 //
-void RConnectionUiUtilitiesSession::ConnectedViaConnMethodNote( 
-                                                    const TUint32 aConnMId,
+void RConnectionUiUtilitiesSession::WlanPowerSaveTestNote( 
+                                                    TBool&          aDisable,
                                                     TRequestStatus& aStatus )
     {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::ConnectedViaConnMethodNote" );
-
-    ::new( &iPassedInfo ) TPckgBuf<TConnUiUiDestConnMethodNoteId>( 
-                                            TConnUiUiDestConnMethodNoteId() );
+    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::WlanPowerSaveTestNote" );
 
-    iPassedInfo().iDestination = 0;
-    iPassedInfo().iConnectionMethod = aConnMId;
-    iPassedInfo().iNoteId = EConnectedViaConnMethodConfirmationNote;
-    iPassedInfo().iNextBestExists = EFalse;
-    
+    ::new( &iBool ) TPckg< TBool >( aDisable );
+
     if ( iNotifier )
         {
         iNotifier->StartNotifierAndGetResponse( aStatus, 
-                                                KUidConnectViaNote,
-                                                iPassedInfo,
+                                                KUidWlanPowerSaveTestNote,
+                                                KNullDesC8(),
                                                 iBool );
         }
 
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::ConnectedViaConnMethodNote" );
+    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::WlanPowerSaveTestNote" );
     }
     
 // ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::CancelConnectedViaConnMethodNote
+// RConnectionUiUtilitiesSession::CancelWlanPowerSaveTestNote
 // ---------------------------------------------------------
 //
-void RConnectionUiUtilitiesSession::CancelConnectedViaConnMethodNote()
+void RConnectionUiUtilitiesSession::CancelWlanPowerSaveTestNote()
     {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelConnectedViaConnMethodNote" );
+    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelWlanPowerSaveTestNote" );
 
     if ( iNotifier )
         {
-        iNotifier->CancelNotifier( KUidConnectViaNote );
+        iNotifier->CancelNotifier( KUidWlanPowerSaveTestNote );
         }
 
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelConnectedViaConnMethodNote" );
+    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelWlanPowerSaveTestNote" );
     }
 
 // ---------------------------------------------------------
@@ -487,95 +388,4 @@
     CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelEasyWapiDlg" );
     }
 
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::NoWLANNetworksAvailableNote()
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::NoWLANNetworksAvailableNote(
-                                                     TRequestStatus& aStatus )
-    {    
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::NoWLANNetworksAvailableNote" );
-
-    if ( iNotifier )
-        {
-        iNotifier->StartNotifierAndGetResponse( aStatus, 
-                                    KUidNoWLANNetworksAvailableNote, 
-                                    KNullDesC8(), 
-                                    iResponseStrNoWLANNetworksAvailableNote );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::NoWLANNetworksAvailableNote" );
-    }    
-
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::ConnectingViaDiscreetPopup()
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::ConnectingViaDiscreetPopup( 
-        TPckgBuf< TConnUiConnectingViaDiscreetPopup>& aInfo,
-        TRequestStatus& aStatus )
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::ConnectingViaDiscreetPopup" );
-
-    if ( iNotifier )
-        {
-        iNotifier->StartNotifierAndGetResponse( aStatus, KUidConnectingViaDiscreetPopup,
-                                                aInfo, aInfo );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::ConnectingViaDiscreetPopup" );
-    }    
-    
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::CancelConnectingViaDiscreetPopup()
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::CancelConnectingViaDiscreetPopup()
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelConnectingViaDiscreetPopup" );
-
-    if ( iNotifier )
-        {
-        iNotifier->CancelNotifier( KUidConnectingViaDiscreetPopup );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelConnectingViaDiscreetPopup" );
-    }    
-
-
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::ConnectionErrorDiscreetPopup()
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::ConnectionErrorDiscreetPopup( 
-        TPckgBuf< TInt >& aErrCode,
-        TRequestStatus& aStatus )
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::ConnectionErrorDiscreetPopup" );
-
-    if ( iNotifier )
-        {
-        iNotifier->StartNotifierAndGetResponse( aStatus, KUidConnectionErrorDiscreetPopup,
-                                                aErrCode, aErrCode );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::ConnectionErrorDiscreetPopup" );
-    }    
-    
-// ---------------------------------------------------------
-// RConnectionUiUtilitiesSession::CancelConnectionErrorDiscreetPopup()
-// ---------------------------------------------------------
-//
-void RConnectionUiUtilitiesSession::CancelConnectionErrorDiscreetPopup()
-    {
-    CLOG_ENTERFN( "RConnectionUiUtilitiesSession::CancelConnectionErrorDiscreetPopup" );
-
-    if ( iNotifier )
-        {
-        iNotifier->CancelNotifier( KUidConnectionErrorDiscreetPopup );
-        }
-
-    CLOG_LEAVEFN( "RConnectionUiUtilitiesSession::CancelConnectionErrorDiscreetPopup" );
-    }    
-
 // End of File
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ConnectionUiUtilitiesImpl.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -44,8 +44,9 @@
 #include "ConnectionUiUtilitiesImpl.h"
 #include "ChangeConnectionDlg.h"
 #include "ActiveCChangeConnectionDlg.h"
+#include "connectionstatuspopup.h"
 
-#include <ConnectionUiUtilities.rsg>
+#include <connectionuiutilities.rsg>
 #include <data_caging_path_literals.hrh>
 
 #include "ConnectionDialogsLogger.h"
@@ -84,7 +85,11 @@
 //
 CConnectionUiUtilitiesImpl::CConnectionUiUtilitiesImpl() 
 : iResOffset( 0 ),
-  iIsWlanSupported( EFalse )
+  iIsWlanSupported( EFalse ),
+  iDummy( EFalse ),
+  iDummySecMode( EWlanConnectionSecurityOpen ),
+  iDummyExtSecMode( EWlanConnectionExtentedSecurityModeOpen ),
+  iConnStatusPopup( NULL )
     {
     for ( TInt i = 0; i < KNumberOfWrappedDialogs; i++ )
         {
@@ -105,6 +110,7 @@
     iIsWlanSupported = 
                 FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
     FeatureManager::UnInitializeLib();
+    iConnStatusPopup = CConnectionStatusPopup::NewL();
     }
 
 
@@ -124,6 +130,8 @@
         {
         delete iActiveWrapper[i];
         }
+
+    delete iConnStatusPopup;
     }
 
 // ---------------------------------------------------------
@@ -900,89 +908,6 @@
     CLOG_LEAVEFN( "CConnectionUiUtilitiesImpl::SearchWLANNetworkAsync" );    
     }
 
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ConnectedViaDestAndConnMethodNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::ConnectedViaDestAndConnMethodNote( 
-                                                const TUint32 aDestId, 
-                                                const TUint32 aConnMId )
-    {
-    if ( !iActiveWrapper[EConnViaDestCM] )
-        {
-        TRAP_IGNORE( iActiveWrapper[EConnViaDestCM] = 
-                                    CActiveWrapper::NewL( EConnViaDestCM ) );
-        }
-
-    if ( iActiveWrapper[EConnViaDestCM] )
-        {
-        iActiveWrapper[EConnViaDestCM]->StartGenericNote( EConnViaDestCM, 
-                                                          aConnMId, aDestId );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ConnectedViaDestAndConnMethodNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::ConnectedViaDestAndConnMethodNote( 
-                                                const TUint32 aDestId, 
-                                                const TUint32 aConnMId, 
-                                                TRequestStatus& aStatus )
-    {
-    iNotif.ConnectedViaDestAndConnMethodNote( aDestId, aConnMId, aStatus );
-    }
-        
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::CancelConnectedViaDestAndConnMethodNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::CancelConnectedViaDestAndConnMethodNote()
-    {
-    iNotif.CancelConnectedViaDestAndConnMethodNote();
-    }
-
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ChangingConnectionToNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::ChangingConnectionToNote( 
-                                                const TUint32 aConnMId )
-    {
-    if ( !iActiveWrapper[EChangingConnTo] )
-        {
-        TRAP_IGNORE( iActiveWrapper[EChangingConnTo] = 
-                                    CActiveWrapper::NewL( EChangingConnTo ) );
-        }
-
-    if ( iActiveWrapper[EChangingConnTo] )
-        {
-        iActiveWrapper[EChangingConnTo]->StartGenericNote( EChangingConnTo,
-                                                           aConnMId );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ChangingConnectionToNote
-// ---------------------------------------------------------
-//    
-void CConnectionUiUtilitiesImpl::ChangingConnectionToNote( 
-                                                const TUint32 aConnMId, 
-                                                TRequestStatus& aStatus )
-    {
-    iNotif.ChangingConnectionToNote( aConnMId, aStatus );  
-    }
-
-
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::CancelChangingConnectionToNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::CancelChangingConnectionToNote()
-    {
-    iActiveWrapper[EChangingConnTo]->Cancel();
-    }
-
 // ---------------------------------------------------------    
 // CConnectionUiUtilitiesImpl::ConfirmMethodUsageQuery
 // ---------------------------------------------------------
@@ -1004,47 +929,28 @@
     iNotif.CancelConfirmMethodUsageQuery();
     }
 
-
+    
 // ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ConnectedViaConnMethodNote
+// CConnectionUiUtilitiesImpl::WlanPowerSaveTestNote
 // ---------------------------------------------------------
 //
-void CConnectionUiUtilitiesImpl::ConnectedViaConnMethodNote( 
-                                                    const TUint32 aConnMId )
-    {
-    if ( !iActiveWrapper[EConnViaCM] )
-        {
-        TRAP_IGNORE( iActiveWrapper[EConnViaCM] = 
-                                        CActiveWrapper::NewL( EConnViaCM ) );
-        }
-
-    if ( iActiveWrapper[EConnViaCM] )
-        {
-        iActiveWrapper[EConnViaCM]->StartGenericNote( EConnViaCM, aConnMId );
-        }
-    }
-
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::ConnectedViaConnMethodNote
-// ---------------------------------------------------------
-//
-void CConnectionUiUtilitiesImpl::ConnectedViaConnMethodNote( 
-                                                    const TUint32 aConnMId,
+void CConnectionUiUtilitiesImpl::WlanPowerSaveTestNote( 
+                                                    TBool&          aDisable,
                                                     TRequestStatus& aStatus )
     {
-    iNotif.ConnectedViaConnMethodNote( aConnMId, aStatus );
+    iNotif.WlanPowerSaveTestNote( aDisable, aStatus );
     }
 
         
 // ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::CancelConnectedViaConnMethodNote
+// CConnectionUiUtilitiesImpl::CancelWlanPowerSaveTestNote
 // ---------------------------------------------------------
 //
-void CConnectionUiUtilitiesImpl::CancelConnectedViaConnMethodNote()
+void CConnectionUiUtilitiesImpl::CancelWlanPowerSaveTestNote()
     {
-    iNotif.CancelConnectedViaConnMethodNote();
+    iNotif.CancelWlanPowerSaveTestNote();
     }
-
+    
 // ---------------------------------------------------------    
 // CConnectionUiUtilitiesImpl::EasyWapiDlg
 // ---------------------------------------------------------
@@ -1073,26 +979,13 @@
     return ( status == KErrNone ) ? ETrue : EFalse;
     }
 
-// ---------------------------------------------------------
-// CConnectionUiUtilitiesImpl::NoWLANNetworksAvailableNote
+// ---------------------------------------------------------    
+// CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup
 // ---------------------------------------------------------
 //
-void CConnectionUiUtilitiesImpl::NoWLANNetworksAvailableNote()
-    {
-    if ( iIsWlanSupported )    
-        {
-        if ( !iActiveWrapper[ ENoWlanNetwsAvail ] )
-            {
-            TRAP_IGNORE( iActiveWrapper[ ENoWlanNetwsAvail ] = 
-                                    CActiveWrapper::NewL( ENoWlanNetwsAvail ) );
-            }
-
-        if ( iActiveWrapper[ ENoWlanNetwsAvail ] )
-            {
-            iActiveWrapper[ ENoWlanNetwsAvail ]->StartGenericNote( 
-                                                            ENoWlanNetwsAvail );
-            }
-        }
+void CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup( )
+    { 
+    iConnStatusPopup->ConnectingViaDiscreetPopup( );
     }
 
 
@@ -1100,45 +993,33 @@
 // CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup
 // ---------------------------------------------------------
 //
-void CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup( const TUint32& aIapId )
+void CConnectionUiUtilitiesImpl::ConnectingViaDiscreetPopup(
+        const TUint32& aIapId,
+        TBool aConnectionAlreadyActive )
     { 
-    iConnInfo().iIapId = aIapId;
-    
-    if ( !iActiveWrapper[ EConnectingViaDiscreetPopup ] )
-        {
-        TRAP_IGNORE( iActiveWrapper[ EConnectingViaDiscreetPopup ] = 
-                                CActiveWrapper::NewL( EConnectingViaDiscreetPopup ) );
-        }
-
-    if ( iActiveWrapper[ EConnectingViaDiscreetPopup ] )
-        {
-        iActiveWrapper[ EConnectingViaDiscreetPopup ]
-                        ->StartConnectingViaDiscreetPopup( iConnInfo );
-        }
+    iConnStatusPopup->ConnectingViaDiscreetPopup( aIapId,
+            aConnectionAlreadyActive );
     }
 
 
+// ---------------------------------------------------------    
+// CConnectionUiUtilitiesImpl::CancelConnectingViaDiscreetPopup
+// ---------------------------------------------------------
+//
+void CConnectionUiUtilitiesImpl::CancelConnectingViaDiscreetPopup()
+    {
+    iConnStatusPopup->CancelConnectingViaDiscreetPopup();
+    }
+
 
 // ---------------------------------------------------------    
 // CConnectionUiUtilitiesImpl::ConnectionErrorDiscreetPopup
 // ---------------------------------------------------------
 //
-void CConnectionUiUtilitiesImpl::ConnectionErrorDiscreetPopup( const TInt& aErrCode )
+void CConnectionUiUtilitiesImpl::ConnectionErrorDiscreetPopup(
+        const TInt& aErrCode )
     {
-    TPckgBuf< TInt > buf;
-    buf() = aErrCode;
-    
-    if ( !iActiveWrapper[ EConnectionErrorDiscreetPopup ] )
-        {
-        TRAP_IGNORE( iActiveWrapper[ EConnectionErrorDiscreetPopup ] = 
-                                CActiveWrapper::NewL( EConnectionErrorDiscreetPopup ) );
-        }
-
-    if ( iActiveWrapper[ EConnectionErrorDiscreetPopup ] )
-        {
-        iActiveWrapper[ EConnectionErrorDiscreetPopup ]
-                        ->StartConnectionErrorDiscreetPopup( buf );
-        }
+    iConnStatusPopup->ConnectionErrorDiscreetPopup( aErrCode );
     }
         
 // End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/connectionstatuspopup.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,668 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*      Implementation of class CConnectionStatusPopup.   
+*      
+*
+*/
+
+#include "connectionstatuspopup.h"
+
+#include <cmmanager.h>
+#include <cmmanagerext.h>
+#include <cmconnectionmethod.h>
+#include <cmconnectionmethodext.h>
+#include <cmpluginwlandef.h>
+#include <cmpluginvpndef.h>
+
+#include <hbtextresolversymbian.h>
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "connectionstatuspopupTraces.h"
+#endif
+
+// Error code definitions are from these headers
+#include <wlanerrorcodes.h> // WLAN-specific error code definitions
+#include <gsmerror.h>       // KErrPacketDataTsyMaxPdpContextsReached 
+#include <in_iface.h>
+#include <etelpckt.h>       // GPRS-specific causes for Session Management
+#include <nd_err.h>         // NetDial errors
+#include <inet6err.h>       // IPv6 error constants
+#include <rmmcustomapi.h>
+
+// Errors in UI spec not found elsewhere
+const TInt KErrDndNameNotFound          = -5120;
+const TInt KErrGeneralConnection        = -50000;
+const TInt KErrGenConnNoGPRSNetwork     = -3609;
+
+// Icons representing bearer
+_LIT( KIconCellular, "qtg_small_gprs" );
+_LIT( KIconWlan,     "qtg_small_wlan" );
+_LIT( KIconVpn,      "qtg_small_vpn" ); 
+_LIT( KIconNone,     "" );
+
+// Empty text
+_LIT( KTextNone,     "" );
+
+// Programs to fire at tap
+_LIT( KWlanViewExeFile, "wlansniffer.exe" );
+_LIT( KConnViewExeFile, "connview.exe" );
+// Command line
+_LIT( KExeFileCmd, "" );
+
+// Localization files and texts
+_LIT(KTrFile, "connectionstatuspopups_");
+_LIT(KTrFilePath, "z:\\resource\\qt\\translations");
+
+_LIT(Ktxt_occ_dpophead_connecting,
+        "txt_occ_dpophead_connecting");
+_LIT(Ktxt_occ_dpophead_connection_failed,
+        "txt_occ_dpophead_connection_failed");
+_LIT(Ktxt_occ_dpopinfo_internal_error,
+        "txt_occ_dpopinfo_internal_error");
+_LIT(Ktxt_occ_dpopinfo_wlan_network_not_found,
+        "txt_occ_dpopinfo_wlan_network_not_found");
+_LIT(Ktxt_occ_dpopinfo_authentication_unsuccessful,
+        "txt_occ_dpopinfo_authentication_unsuccessful");
+_LIT(Ktxt_occ_dpopinfo_check_security_key,
+        "txt_occ_dpopinfo_check_security_key");
+_LIT(Ktxt_occ_dpopinfo_check_connection_settings,
+        "txt_occ_dpopinfo_check_connection_settings");
+_LIT(Ktxt_occ_dpopinfo_sim_card_missing,
+        "txt_occ_dpopinfo_sim_card_missing");
+_LIT(Ktxt_occ_dpopinfo_service_unreachable,
+        "txt_occ_dpopinfo_service_unreachable");
+_LIT(Ktxt_occ_dpopinfo_permission_denied,
+        "txt_occ_dpopinfo_permission_denied");
+_LIT(Ktxt_occ_dpopinfo_connection_already_active,
+        "txt_occ_dpopinfo_connection_already_active");
+_LIT(Ktxt_occ_dpopinfo_signal_too_weak,
+        "txt_occ_dpopinfo_signal_too_weak");
+_LIT(Ktxt_occ_dpopinfo_please_try_again,
+        "txt_occ_dpopinfo_please_try_again");
+_LIT(Ktxt_occ_dpopinfo_connection_unavailable,
+        "txt_occ_dpopinfo_connection_unavailable");
+_LIT(Ktxt_occ_dpophead_configuration_failed,
+        "txt_occ_dpophead_configuration_failed");
+_LIT(Ktxt_occ_dpophead_maximum_connections_in_use,
+        "txt_occ_dpophead_maximum_connections_in_use");
+_LIT(Ktxt_occ_dpopinfo_select_to_manage,
+        "txt_occ_dpopinfo_select_to_manage");
+
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::CConnectionStatusPopup()
+//-----------------------------------------------------------------------------
+//
+CConnectionStatusPopup::CConnectionStatusPopup()
+:iPopup( NULL ), iPopupState( EPopupClosed ), iTouchAction( EDoNothing )
+    {
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::NewL()
+//-----------------------------------------------------------------------------
+//
+CConnectionStatusPopup* CConnectionStatusPopup::NewL()
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_NEWL_ENTRY );
+    
+    CConnectionStatusPopup* popup = new ( ELeave ) CConnectionStatusPopup();
+    CleanupStack::PushL( popup );
+    popup->ConstructL();
+    CleanupStack::Pop( popup ); 
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_NEWL_EXIT );
+    return popup;
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::ConstructL()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::ConstructL()
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_CONSTRUCTL_ENTRY );
+    
+    iPopup = CHbDeviceNotificationDialogSymbian::NewL( this );
+
+    TBool result = HbTextResolverSymbian::Init( KTrFile, KTrFilePath );
+    if (!result)
+        {
+        OstTrace0( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_CONSTRUCTL,"CConnectionStatusPopup::ConstructL; Loading of localization failed!" );
+        }
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_CONSTRUCTL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::~CConnectionStatusPopup()
+//-----------------------------------------------------------------------------
+//
+CConnectionStatusPopup::~CConnectionStatusPopup()
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_CCONNECTIONSTATUSPOPUP_ENTRY );
+    
+    if (iPopup)
+        {
+        iPopup->Close();
+        delete iPopup;
+        }
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_CCONNECTIONSTATUSPOPUP_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::ConnectingDiscreetPopup()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::ConnectingViaDiscreetPopup( )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_CONNECTINGVIADISCREETPOPUP_ENTRY );
+
+    TRAP_IGNORE( 
+        HBufC* title = HbTextResolverSymbian::LoadLC(
+                Ktxt_occ_dpophead_connecting );
+        iPopup->SetTitleL( title->Des() );
+        CleanupStack::PopAndDestroy( title );
+        iPopup->SetTextL( KTextNone );
+        iPopup->SetIconNameL( KIconNone );
+        );
+    iTouchAction = EDoNothing;
+    iPopup->SetTimeout( KForeverTimeout );
+
+    SetState( EPopupConnecting );
+ 
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_CONNECTINGVIADISCREETPOPUP_EXIT );
+    }
+
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::ConnectingViaDiscreetPopup()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::ConnectingViaDiscreetPopup(
+        TUint32 aIapId,
+        TBool aConnectionAlreadyActive )
+    {
+    OstTraceFunctionEntry0( DUP1_CCONNECTIONSTATUSPOPUP_CONNECTINGVIADISCREETPOPUP_ENTRY );
+    OstTraceExt2( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_CONNECTINGVIADISCREETPOPUP, "CConnectionStatusPopup::ConnectingViaDiscreetPopup;aIapId=%u;aConnectionAlreadyActive=%u", aIapId, aConnectionAlreadyActive );
+
+    // Grab iap info even if we do not need it yet (when sharing),
+    // because icon may be used later if general error happens.
+    TRAP_IGNORE( FormatIapInfoL( aIapId ); );
+
+    if (aConnectionAlreadyActive)
+        {
+        // If sharing a connection, do not show the popup.
+        SetState( EPopupClosed );
+        }
+    else
+        {
+        iPopup->SetTimeout( KForeverTimeout );
+        SetState( EPopupConnectingIap );
+        }
+    
+    OstTraceFunctionExit0( DUP1_CCONNECTIONSTATUSPOPUP_CONNECTINGVIADISCREETPOPUP_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::CancelConnectingViaDiscreetPopup()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::CancelConnectingViaDiscreetPopup()
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_CANCELCONNECTINGVIADISCREETPOPUP_ENTRY );
+    
+    SetState( EPopupClosed );
+
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_CANCELCONNECTINGVIADISCREETPOPUP_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::ConnectionErrorDiscreetPopup()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::ConnectionErrorDiscreetPopup( TInt aErrorCode )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_CONNECTIONERRORDISCREETPOPUP_ENTRY );
+    
+    TBool showPopup( EFalse );
+    TRAP_IGNORE( showPopup = ResolveErrorCodeL( aErrorCode ); );
+    
+    OstTraceExt2( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_CONNECTIONERRORDISCREETPOPUP, "CConnectionStatusPopup::ConnectionErrorDiscreetPopup;aErrorCode=%d;showPopup=%u", aErrorCode, showPopup );
+    
+    if (showPopup)
+        {
+        iPopup->SetTimeout( KHbLongNotificationDialogTimeout ); 
+        SetState( EPopupError );
+        }
+
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_CONNECTIONERRORDISCREETPOPUP_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::SetState()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::SetState( TPopupState aNewState )
+    {
+    OstTraceExt2( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_SETSTATE, "CConnectionStatusPopup::SetState;iPopupState=%u;aNewState=%u", iPopupState, aNewState );
+
+    if (aNewState != EPopupClosed)
+        {
+        // Enable touch activation based on defined action
+        iPopup->EnableTouchActivation( iTouchAction != EDoNothing );
+
+        // Show or update popup
+        if (iPopupState == EPopupClosed)
+            {
+            TRAP_IGNORE( iPopup->ShowL() );
+            }
+        else
+            {
+            TRAP_IGNORE( iPopup->UpdateL() );
+            }
+        }
+    else
+        {
+        // Close popup if it's not already closed or closing 
+        if (iPopupState != EPopupClosed && iPopupState != EPopupError)
+            {
+            iPopup->Close();
+            }
+        }
+    
+    iPopupState = aNewState;
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::FormatIapInfoL()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::FormatIapInfoL( TUint32 aIapId )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_FORMATIAPINFOL_ENTRY );
+    
+    // Title
+    HBufC* title = HbTextResolverSymbian::LoadLC(
+            Ktxt_occ_dpophead_connecting );
+    iPopup->SetTitleL( title->Des() );
+    CleanupStack::PopAndDestroy( title );
+
+    // Load iap info from cmmanager
+    HBufC* connectionName( NULL );
+    TUint bearerType( 0 );
+
+    RCmManager cmMgr;
+    CleanupClosePushL( cmMgr );
+    RCmConnectionMethod plugin;
+    CleanupClosePushL( plugin );
+    cmMgr.OpenL();
+    plugin = cmMgr.ConnectionMethodL( aIapId );
+    bearerType = plugin.GetIntAttributeL( CMManager::ECmBearerType );
+    connectionName = plugin.GetStringAttributeL( CMManager::ECmName );
+    CleanupStack::PopAndDestroy( &plugin );
+    CleanupStack::PopAndDestroy( &cmMgr );
+    
+    // Text
+    CleanupStack::PushL( connectionName );
+    if (connectionName)
+        {
+        iPopup->SetTextL( connectionName->Des() );
+        }
+    else
+        {
+        iPopup->SetTextL( KTextNone );
+        }
+    CleanupStack::PopAndDestroy( connectionName ); 
+
+    // Icon and action
+    switch (bearerType)
+        {
+        case KUidWlanBearerType:
+            iTouchAction = EOpenWlanView;
+            iPopup->SetIconNameL( KIconWlan );
+            break;
+        case KPluginVPNBearerTypeUid:
+            iTouchAction = EDoNothing;
+            iPopup->SetIconNameL( KIconVpn );
+            break;
+        default:
+            iTouchAction = EOpenCellularView;
+            iPopup->SetIconNameL( KIconCellular );
+        }
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_FORMATIAPINFOL_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::ResolveErrorCodeL()
+//-----------------------------------------------------------------------------
+//
+TBool CConnectionStatusPopup::ResolveErrorCodeL( TInt aErrorCode )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_RESOLVEERRORCODEL_ENTRY );
+    
+    // Icons, which are resolved at the end
+    enum TIconType
+        {
+        // WLAN icon
+        EIconWlan, 
+        // Cellular icon
+        EIconCellular, 
+        // No icon to be used
+        EIconNoneSet, 
+        // Icon from connecting popup to be used
+        EIconUsePreviouslyDefined
+        };
+
+    // Most errors have following values
+    TIconType icon = EIconWlan;
+    iTouchAction = EDoNothing;
+    TPtrC titlePtr;
+    titlePtr.Set( Ktxt_occ_dpophead_connection_failed );
+    
+    TPtrC textPtr;
+
+    // Resolve title, text and icon of error code.
+    // Groups are from OCC UI spec 1.0
+    switch (aErrorCode)
+        {
+
+        // Skipped errors, for which the popup is not shown.
+        case KErrNone:
+        case KErrConnectionTerminated:
+        case KErrDisconnected:
+        case KErrCancel:
+            return EFalse;
+
+        // Group 1
+        case KErrIfChangingPassword:
+            icon = EIconCellular;
+        // These were GPRS; fall through
+        case KErrWlanInternalError:
+            textPtr.Set( Ktxt_occ_dpopinfo_internal_error );
+            break;
+
+        // Group 2
+        case KErrWlanNetworkNotFound:
+            textPtr.Set( Ktxt_occ_dpopinfo_wlan_network_not_found );
+            break;
+
+        // Group 3
+        case KErrGprsUserAuthenticationFailure:
+            icon = EIconCellular;
+        // These were GPRS; fall through
+        case KErrWlanOpenAuthFailed:
+        case KErrWlanSharedKeyAuthRequired:
+        case KErrWlanWpaAuthRequired:
+        case KErrWlanWpaAuthFailed:
+        case KErrWlan802dot1xAuthFailed:
+        case KErrWlanWpaCounterMeasuresActive:
+        case KErrWlanPskModeRequired:
+        case KErrWlanEapModeRequired:
+        case KErrWlanEapSimFailed:
+        case KErrWlanEapTlsFailed:
+        case KErrWlanEapPeapFailed:
+        case KErrWlanEapMsChapv2: // Is the same as KErrWlanEapMsChaPFailed
+        case KErrWlanEapAkaFailed:
+        case KErrWlanEapTtlsFailed:
+        case KErrWlanLeapFailed:
+        case KErrWlanEapGtcFailed:
+        case KErrWlanWpa2OnlyModeNotSupported:
+        case KErrWlanEapFastTunnelCompromiseError:
+        case KErrWlanEapFastUnexpextedTlvExhanged:
+        case KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled:
+        case KErrWlanEapFastNoMatchingPacForAid:
+        case KErrWlanEapFastAuthFailed:
+        case KErrWlanEapFastPacStoreCorrupted:
+            textPtr.Set( Ktxt_occ_dpopinfo_authentication_unsuccessful );
+            break;
+
+        // Group 4
+        case KErrWlanSharedKeyAuthFailed:
+        case KErrWlanIllegalWpaPskKey:
+        case KErrWlanIllegalEncryptionKeys:
+            textPtr.Set( Ktxt_occ_dpopinfo_check_security_key );
+            break;
+
+        // Group 5
+        case KErrExitModemError:
+        case KErrExitLoginFail:
+        case KErrExitScriptTimeOut:
+        case KErrExitScriptError:
+        case KErrIfAuthenticationFailure:
+        case KErrIfAuthNotSecure:
+        case KErrIfAccountDisabled:
+        case KErrIfRestrictedLogonHours:
+        case KErrIfPasswdExpired:
+        case KErrIfNoDialInPermission:
+        case KErrGprsMissingorUnknownAPN:
+            icon = EIconCellular;
+            textPtr.Set( Ktxt_occ_dpopinfo_check_connection_settings );
+            break;
+
+        // Group 6
+        case KErrWlanSimNotInstalled:
+            textPtr.Set( Ktxt_occ_dpopinfo_sim_card_missing );
+            break;
+
+        // Group 7
+        case KErrWlanNotSubscribed:
+        case KErrWlanAccessBarred:
+            textPtr.Set( Ktxt_occ_dpopinfo_service_unreachable );
+            break;
+
+        // Group 8
+        case KErrPermissionDenied:
+        case KErrWlanPasswordExpired:
+        case KErrWlanNoDialinPermissions:
+        case KErrWlanAccountDisabled:
+        case KErrWlanRestrictedLogonHours:
+        case KErrWlanServerCertificateExpired:
+        case KErrWlanCerficateVerifyFailed:
+        case KErrWlanNoUserCertificate:
+        case KErrWlanNoCipherSuite:
+        case KErrWlanUserRejected:
+        case KErrWlanUserCertificateExpired:
+            textPtr.Set( Ktxt_occ_dpopinfo_permission_denied );
+            break;
+
+        // Group 9
+        case KErrWlanConnAlreadyActive:
+            textPtr.Set( Ktxt_occ_dpopinfo_connection_already_active );
+            break;
+
+        // Group 10
+        case KErrWlanSignalTooWeak:
+            textPtr.Set( Ktxt_occ_dpopinfo_signal_too_weak );
+            break;
+
+        // Group 11
+        case KErrIfCallbackNotAcceptable:
+        case KErrIfDNSNotFound:
+        case KErrIfLRDBadLine:
+        case KErrNetUnreach:
+        case KErrHostUnreach:
+        case KErrNoProtocolOpt:
+        case KErrUrgentData:
+        case KErrInet6NoRoute:
+        case KErrDndNameNotFound:
+        case KErrGeneralConnection:
+        case KErrGprsMSCTemporarilyNotReachable:
+        case KErrGprsLlcOrSndcpFailure:
+        case KErrGprsActivationRejectedByGGSN:
+        case KErrPacketDataTsyInvalidAPN:
+            icon = EIconCellular;
+            // These were GPRS; fall through
+        case KErrWlanRoamingFailed:
+            textPtr.Set( Ktxt_occ_dpopinfo_please_try_again );
+            break;
+
+        // Group 12
+        case KErrGenConnNoGPRSNetwork:
+        case KErrGprsServicesNotAllowed:
+        case KErrGprsAndNonGprsServicesNotAllowed:
+        case KErrGprsMSIdentityCannotBeDerivedByTheNetwork:
+        case KErrGprsMSImplicitlyDetached:
+        case KErrGsmMMNetworkFailure:
+        case KErrGprsUnknownPDPAddress:
+        case KErrGprsActivationRejected:
+        case KErrGsmMMServiceOptionNotSubscribed:
+        case KErrGsmMMServiceOptionTemporaryOutOfOrder:
+        case KErrGprsNSAPIAlreadyUsed:
+        case KErrGprsQoSNotAccepted:
+        case KErrGprsReactivationRequested:
+        case KErrGprsOfflineMode:
+            icon = EIconCellular;
+            // These were GPRS; fall through
+        case KErrWlanOff:
+        case KErrWlanForceOff:
+            textPtr.Set( Ktxt_occ_dpopinfo_connection_unavailable );
+            break;
+
+        // Group 13
+        case KErrWlanProtectedSetupDevicePasswordAuthFailure:
+        case KErrWlanProtectedSetupPINMethodNotSupported:
+        case KErrWlanProtectedSetupPBMethodNotSupported:
+            titlePtr.Set( Ktxt_occ_dpophead_configuration_failed );
+            textPtr.Set( Ktxt_occ_dpopinfo_authentication_unsuccessful );
+            break;
+
+        // Group 14
+        case KErrWlanProtectedSetupOOBInterfaceReadError:
+        case KErrWlanProtectedSetupDecryptionCRCFailure:
+        case KErrWlanProtectedSetup2_4ChannelNotSupported:
+        case KErrWlanProtectedSetup5_0ChannelNotSupported:
+        case KErrWlanProtectedSetupNetworkAuthFailure:
+        case KErrWlanProtectedSetupNoDHCPResponse:
+        case KErrWlanProtectedSetupFailedDHCPConfig:
+        case KErrWlanProtectedSetupIPAddressConflict:
+        case KErrWlanProtectedSetupCouldNotConnectToRegistrar:
+        case KErrWlanProtectedSetupMultiplePBCSessionsDetected:
+        case KErrWlanProtectedSetupRogueActivitySuspected:
+        case KErrWlanProtectedSetupDeviceBusy:
+        case KErrWlanProtectedSetupSetupLocked:
+        case KErrWlanProtectedSetupMessageTimeout:
+        case KErrWlanProtectedSetupRegistrationSessionTimeout:
+            titlePtr.Set( Ktxt_occ_dpophead_configuration_failed );
+            textPtr.Set( Ktxt_occ_dpopinfo_please_try_again );
+            break;
+            
+        // Group 15, errors related to maximum number of PDP contexts
+        case KErrGprsInsufficientResources:
+        case KErrUmtsMaxNumOfContextExceededByNetwork: 
+        case KErrUmtsMaxNumOfContextExceededByPhone:
+        case KErrPacketDataTsyMaxPdpContextsReached:
+            // Open cellular view for these errors
+            iTouchAction = EOpenCellularView;
+            // The icon is left out from these popups in order to make room 
+            // for the text which needs to be as descriptive as possible
+            icon = EIconNoneSet;
+            titlePtr.Set( Ktxt_occ_dpophead_maximum_connections_in_use );
+            textPtr.Set( Ktxt_occ_dpopinfo_select_to_manage );
+            break;
+            
+        // For error values not specifically mapped to any error message
+        // the discreet pop-up #12 is used.
+        default:
+            icon = EIconUsePreviouslyDefined;
+            textPtr.Set( Ktxt_occ_dpopinfo_connection_unavailable );
+            break;
+        }
+
+    // Load and set title, text and icon
+    HBufC* titleBuf = HbTextResolverSymbian::LoadLC( titlePtr );
+    iPopup->SetTitleL( titleBuf->Des() );
+    HBufC* textBuf = HbTextResolverSymbian::LoadLC( textPtr );
+    iPopup->SetTextL( textBuf->Des() );
+    CleanupStack::PopAndDestroy( 2, titleBuf );
+
+    switch (icon)
+        {
+        case EIconWlan:
+            iPopup->SetIconNameL( KIconWlan );
+            break;
+        case EIconCellular:
+            iPopup->SetIconNameL( KIconCellular );
+            break;
+        case EIconNoneSet:
+            iPopup->SetIconNameL( KIconNone );
+            break;
+        default:
+            __ASSERT_DEBUG( icon == EIconUsePreviouslyDefined, User::Invariant());
+            // Leave icon as-is, either set by ConnectingViaDiscreetPopup
+            // or undefined.
+            break;
+        }
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_RESOLVEERRORCODEL_EXIT );
+    return ETrue;
+    }
+
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::NotificationDialogActivated()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::NotificationDialogActivated(
+        const CHbDeviceNotificationDialogSymbian* /*aDialog*/ )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGACTIVATED_ENTRY );
+    
+    // Launch wlan view or connection view depending on bearer
+    TPtrC procName; 
+    if ( iTouchAction == EOpenWlanView )
+        {
+        procName.Set( KWlanViewExeFile );
+        }
+    else if ( iTouchAction == EOpenCellularView )
+        {
+        procName.Set( KConnViewExeFile );
+        }
+    else
+        {
+        OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGACTIVATED_EXIT );
+
+        return;
+        }
+
+    RProcess proc;
+    TInt procError = proc.Create( procName, KExeFileCmd );
+    OstTrace1( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGACTIVATED, "CConnectionStatusPopup::NotificationDialogActivated;procError=%d", procError );
+    if (!procError)
+        {
+        proc.Resume();
+        proc.Close(); // Closes the handle, not the process.
+        }
+
+    OstTraceFunctionExit0( DUP1_CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGACTIVATED_EXIT );
+    }
+
+//-----------------------------------------------------------------------------
+//  CConnectionStatusPopup::NotificationDialogClosed()
+//-----------------------------------------------------------------------------
+//
+void CConnectionStatusPopup::NotificationDialogClosed(
+        const CHbDeviceNotificationDialogSymbian* /*aDialog*/,
+        TInt /*aCompletionCode*/ )
+    {
+    OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGCLOSED_ENTRY );
+    
+    SetState( EPopupClosed );
+    
+    OstTraceFunctionExit0( CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGCLOSED_EXIT );
+    }
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/data/DisconnectDlg.rss	Tue Aug 31 15:35:44 2010 +0300
@@ -39,6 +39,21 @@
     {
     }
 
+RESOURCE TBUF r_qtn_netw_conf_conn_disconnected 
+    { 
+    buf = qtn_netw_conf_conn_disconnected; 
+    }
+
+RESOURCE TBUF r_qtn_netw_conf_modem_conn_disconnected 
+    { 
+    buf = qtn_netw_conf_modem_conn_disconnected; 
+    }
+
+RESOURCE TBUF r_qtn_cmon_info_conn_already_end 
+    { 
+    buf = qtn_cmon_info_conn_already_end; 
+    }
+
 RESOURCE TBUF r_qtn_netw_info_disconnect_failed 
     { 
     buf = qtn_netw_info_disconnect_failed; 
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h	Tue Aug 31 15:35:44 2010 +0300
@@ -75,6 +75,13 @@
         */
         void InitConnectionArrayL();
 
+        /**
+        * It is called when RConnectionMonitor has sent its event after ending
+        * connection
+        * @return -
+        */
+        void SelectedConnectionClosedL();
+
 
     public:
 
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionInfo.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionInfo.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -26,7 +26,7 @@
 #include <apgcli.h>
 #include <AknsUtils.h>
 
-#include <DisconnectDlg.rsg>
+#include <disconnectdlg.rsg>
 #include <disconnectdlgui.mbg>
 #include <data_caging_path_literals.hrh>
 
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -34,7 +34,7 @@
 #include <commsdat_partner.h>
 #endif
 
-#include <DisconnectDlg.rsg>
+#include <disconnectdlg.rsg>
 
 
 // CONSTANTS
@@ -165,12 +165,12 @@
             User::WaitForRequest( status );
             CLOG_WRITEF(_L( "KClientInfo status: %d" ), status.Int() );  
             
-            bearer = EBearerUnknown;
+    
             iMonitor.GetIntAttribute( connId, 0, KBearer, bearer, status );
             User::WaitForRequest( status );
             CLOG_WRITEF(_L( "KBearer status: %d" ), status.Int() ); 
             
-            connStatus = KConnectionUninitialised;
+    
             iMonitor.GetIntAttribute( connId, 0, KConnectionStatus, connStatus,
                                       status );
             User::WaitForRequest( status );
@@ -308,12 +308,8 @@
         {
         // notifier will finish, so cancel all other notifications
         iMonitor.CancelNotifications();     
-
-        // Bring back the 3s delay to avoid possible problems.
-        // (GPRS Detach and Attach overlapping, when only 1 context allowed,
-        // causing 15s delay.)
-        User::After( CAknNoteDialog::ELongTimeout );
-
+        SelectedConnectionClosedL();
+        
         iDisconnectDialogUi->CompleteL( KErrNone );
         }
     else if( iDisconnectDialogUi  && 
@@ -352,6 +348,33 @@
 
 
 // ---------------------------------------------------------
+// CConnectionModel::SelectedConnectionClosedL
+// ---------------------------------------------------------
+//
+void CConnectionModel::SelectedConnectionClosedL()
+    {
+    CLOG_ENTERFN("CConnectionModel::SelectedConnectionClosedL");    
+    
+    // the connection is succesfully closed
+    CConnectionInfo* info = iConnArray->At( iClosingConnectionIndex );
+
+    TPtrC iap = info->GetIapNameL();
+    TInt bearerType = info->GetBearerType();
+
+    if( bearerType < EBearerExternalCSD )
+        {
+        InfoNoteL( R_QTN_NETW_CONF_CONN_DISCONNECTED, &iap );
+        }
+    else
+        {
+        InfoNoteL( R_QTN_NETW_CONF_MODEM_CONN_DISCONNECTED );
+        }
+
+    CLOG_LEAVEFN("CConnectionModel::SelectedConnectionClosedL");    
+    }
+
+
+// ---------------------------------------------------------
 // CDisconnectDlgDialog::InfoNoteL
 // ---------------------------------------------------------
 //
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgDialog.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -12,8 +12,7 @@
 * Contributors:
 *
 * Description: 
-*     Defines the pop-up selection list with the active connections.
-*
+* Defines the pop-up selection list with the active connections.
 */
 
 
@@ -26,7 +25,7 @@
 #include "ConnectionDialogsLogger.h"
 #include "ExpiryTimer.h"
 
-#include <DisconnectDlg.rsg>
+#include <disconnectdlg.rsg>
 #include <AknIconArray.h>
 #include <StringLoader.h>
 #include <uikon/eiksrvui.h>
--- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/DisconnectDlgUi.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -19,9 +19,6 @@
 
 
 // INCLUDE FILES
-#include <e32property.h>
-#include <ScreensaverInternalPSKeys.h>
-#include <coreapplicationuisdomainpskeys.h>
 #include "DisconnectDlgUi.h"
 #include "ActiveDisconnectDlgPlugin.h"
 #include "ConnectionModel.h"
@@ -32,7 +29,7 @@
 #include <bautils.h>
 #include <textresolver.h>
 
-#include <DisconnectDlg.rsg>
+#include <disconnectdlg.rsg>
 #include <data_caging_path_literals.hrh>
 
 
@@ -254,31 +251,6 @@
     { 
     CLOG_ENTERFN("CDisconnectDialogUi::StartL");        
       
-    TInt err( KErrNone );
-    TInt screenSaverOn( 0 );
-    
-    // Cancel the dialog if screensaver is on.
-    err = RProperty::Get( KPSUidScreenSaver, 
-            KScreenSaverOn, 
-            screenSaverOn );
-
-    TBool autolockOn( EFalse );
-#ifdef RD_STARTUP_CHANGE
-    TInt autolockStatus( 0 );
-    // Cancel the dialog if Autolock is on.
-    err |= RProperty::Get( KPSUidCoreApplicationUIs, 
-            KCoreAppUIsAutolockStatus, 
-            autolockStatus );
-    autolockOn = autolockStatus > EAutolockOff;
-#endif
-
-    if ( err == KErrNone && ( screenSaverOn > 0 || autolockOn ) )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-    
     iStarted = ETrue;
 
     TPckgBuf<TDisconnectConnectionPrefs> passedInfo;
@@ -290,7 +262,7 @@
     
     CLOG_WRITEF(_L( "iCntPrefs.iPrompt: %d" ), iConnectionPrefs.iPrompt );
     
-    err = KErrNone;    
+    TInt err( KErrNone );    
     TRAP( err, iActivePlugin = CActiveDisconnectDlgPlugin::NewL( this ) ); 
     
     if ( err )
--- a/connectionutilities/ConnectionDialogs/cconndlg/clientinc/ActiveLogin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#ifndef __ACTIVELOGIN_H__
-#define __ACTIVELOGIN_H__
-
-// INCLUDES
-#include "ConnDlgPlugin.h"
-#include <e32base.h>
-
-
-// CLASS DECLARATION
-
-/**
-* ActiveObject for asynchronous operations
-*/
-NONSHARABLE_CLASS( CActiveLogin ) : public CActive
-    {
-    private:
-        /**
-        * C++ default constructor.
-        * @param aUsername The address where the caller of the Authenticate
-        *                  dialog needs to save the username data inserted by 
-        *                  the user.
-        * @param aPassword The address where the caller of the Authenticate
-        *                  dialog needs to save the password data inserted by 
-        *                  the user.
-        */
-        CActiveLogin( TDes& aUsername, TDes& aPassword );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-
-    public:  // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @param aUsername The address where the caller of the Authenticate
-        *                  dialog needs to save the username data inserted by 
-        *                  the user.
-        * @param aPassword The address where the caller of the Authenticate
-        *                  dialog needs to save the password data inserted by 
-        *                  the user.
-        */
-        static CActiveLogin* NewL( TDes& aUsername, TDes& aPassword );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CActiveLogin();
-
-
-    public: // From base class
-        /**
-        * This function is called when the scheduled function ends.
-        */
-        void RunL();
-
-        /**
-        * Cancel operations.
-        */
-        void DoCancel();
-
-
-    public: // New functions
-        /**
-        * Add this class on the ActiveScheduler and puts itself active.
-        * @param aStatus The status that is checked by the caller of the 
-        *                Authenticate dialog.
-        */
-        void Observe( TRequestStatus &aStatus );
-
-        /**
-        * Returns the TAuthenticationPairBuff 
-        * @return A pointer to iAuthenticationPairBuff.
-        */
-        TPckgBuf<TAuthenticationPairBuff>* GetBuffer();
-
-
-    private:    // Data
-        // The status that is checked by the caller of the Authentication 
-        // dialog. Not owned.
-        TRequestStatus* iRs;    
-
-        // The address of the area where the caller of the Authentication 
-        // dialog expects the value for username. Not owned.
-        TDes* iUsername;
-
-        // The address of the area where the caller of the Authentication 
-        // dialog expects the value for password. Not owned.
-        TDes* iPassword;
-
-        // Packed buffer containing user name and password used as input and 
-        // output for Authentication dialog.
-        TPckgBuf<TAuthenticationPairBuff> iAuthenticationPairBuff;
-    };
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/clientsrc/ActiveLogin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of CActiveLogin class
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveLogin.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ----------------------------------------------------------------------------
-// CActiveLogin::CActiveLogin
-// ----------------------------------------------------------------------------
-//
-CActiveLogin::CActiveLogin( TDes& aUsername, TDes& aPassword )
-: CActive( CActive::EPriorityUserInput ),
-  iUsername( &aUsername ),
-  iPassword( &aPassword )
-    {
-    iAuthenticationPairBuff().iUsername = aUsername;
-    iAuthenticationPairBuff().iPassword = aPassword;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::NewL
-// ----------------------------------------------------------------------------
-//
-CActiveLogin* CActiveLogin::NewL( TDes& aUsername, TDes& aPassword )
-    {
-    CActiveLogin* self = new( ELeave )CActiveLogin( aUsername, aPassword );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::ConstructL
-// ----------------------------------------------------------------------------
-//
-void CActiveLogin::ConstructL()
-    {
-    }
-
-
-// ----------------------------------------------------
-// CActiveLogin::~CActiveLogin()
-// ----------------------------------------------------
-//
-CActiveLogin::~CActiveLogin()
-    {
-    Cancel();
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::RunL
-// ----------------------------------------------------------------------------
-//
-void CActiveLogin::RunL()
-    {
-    if ( iStatus.Int() == KErrNone )
-        {
-        *iUsername = iAuthenticationPairBuff().iUsername;
-        *iPassword = iAuthenticationPairBuff().iPassword;
-        }
-
-    TRequestStatus* pS = iRs;
-    User::RequestComplete( pS, iStatus.Int() );
-
-    delete this;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::DoCancel
-// ----------------------------------------------------------------------------
-//
-void CActiveLogin::DoCancel()
-    {
-    TRequestStatus* pS = iRs;
-    User::RequestComplete( pS, KErrCancel );
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::Observe
-// ----------------------------------------------------------------------------
-//
-void CActiveLogin::Observe( TRequestStatus &aStatus )
-    {
-    CActiveScheduler::Add( this );
-
-    iRs = &aStatus;
-    *iRs = KRequestPending;
-
-    SetActive();
-    }
-
-
-// ----------------------------------------------------------------------------
-// CActiveLogin::GetBuffer
-// ----------------------------------------------------------------------------
-//
-TPckgBuf<TAuthenticationPairBuff>* CActiveLogin::GetBuffer() 
-    { 
-    return &iAuthenticationPairBuff; 
-    }
-
-
-// End of File  
--- a/connectionutilities/ConnectionDialogs/cconndlg/clientsrc/GenConAgentDialogServer.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/cconndlg/clientsrc/GenConAgentDialogServer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -20,11 +20,14 @@
 // INCLUDE FILES
 #include "GenConAgentDialogServer.h"
 #include "ConnectionDialogsUidDefs.h"
-#include "ActiveLogin.h"
 #include "ConnectionDialogsLogger.h"
 
 #include <agentdialog.h>
 
+// NOTE that the functionality this file is DEPRECATED
+// None on the methods have UI functionality, the plugins complete the requests
+// immediately when they are started
+
 
 // ---------------------------------------------------------
 // ThreadFunction
@@ -223,31 +226,20 @@
     {
     CLOG_ENTERFN( "RGenConAgentDialogServer::Authenticate" );
 
-    CActiveLogin* activeLogin = NULL;
-
-    TRAPD( err, activeLogin = CActiveLogin::NewL( aUsername, aPassword ) );
-
-    iNotUsed() = ( TUint32 )activeLogin;
+    // To get rid of compile warnings;
+    aPassword = aPassword;
+    aUsername = aUsername;
     
-    if ( err != KErrNone )
-        {
-        TRequestStatus* pS = &aStatus;
-        User::RequestComplete( pS, err );
-        }
-    else
+
+    // temporaty variable to get the notifier started
+    TPckgBuf<TUint32> notUsed;
+
+    if ( iNotifier )
         {
-        activeLogin->Observe( aStatus );
-
-        TPckgBuf<TAuthenticationPairBuff>* authenticationPairBuff = 
-                                                    activeLogin->GetBuffer();
-
-        if ( iNotifier )
-            {
-            iNotifier->StartNotifierAndGetResponse( activeLogin->iStatus,
-                                                    KUidCConnDlgAuthentication,
-                                                    *authenticationPairBuff,
-                                                    *authenticationPairBuff );
-            }
+        iNotifier->StartNotifierAndGetResponse( aStatus,
+                                                KUidCConnDlgAuthentication,
+                                                notUsed,
+                                                notUsed );
         }
 
     CLOG_LEAVEFN( "RGenConAgentDialogServer::Authenticate" );
@@ -439,11 +431,6 @@
         iNotifier->CancelNotifier( KUidCConnDlgAuthentication );
         }
 
-    CActiveLogin* activeLogin = ( CActiveLogin* )iNotUsed();
-
-    activeLogin->Cancel();
-    delete activeLogin;
-
     CLOG_LEAVEFN( "RGenConAgentDialogServer::CancelAuthenticate" );
     }
 
--- a/connectionutilities/ConnectionDialogs/cconndlg/data/CConnDlgPlugin.rss	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,364 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  resorce of CConnDLGPLUGIN.
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME CDLG
-
-
-// INCLUDES
-#include <eikon.rh>
-#include <eikon.rsg>
-
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <apsettings.mbg>
-
-#include <avkon.hrh>
-#include <AvkonIcons.hrh>
-#include <avkon.loc>
-
-#include <agentdialog.loc>
-#include "ConnectionDialogs.hrh"
-
-
-// RESOURCE DEFINITIONS 
-
-RESOURCE RSS_SIGNATURE { }
-
-
-RESOURCE CBA r_softkeys_done_cancel__select
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyDone;   txt = text_softkey_done; },
-        CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
-        CBA_BUTTON { id = EAknSoftkeyDone;   txt = qtn_msk_select; }
-        };
-    }
-
-
-RESOURCE DIALOG r_conndlg_authentication
-    {
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagNoDrag | 
-            EEikDialogFlagNoTitleBar | EEikDialogFlagCbaButtons;
-    buttons = r_softkeys_done_cancel__select;
-    items=
-        {
-        DLG_LINE
-            {
-            type = EAknCtMultilineQuery;
-            id = EMultilineFirstLine;
-            control = AVKON_DATA_QUERY
-                {
-                layout = EMultiDataFirstEdwin;
-                label = qtn_netw_iap_auth_username;
-                control = EDWIN
-                    {
-                    avkon_flags = EAknEditorFlagLatinInputModesOnly;
-                    allowed_input_modes = EAknEditorTextInputMode | 
-                                          EAknEditorNumericInputMode;
-                    width = 50;
-                    lines = 1;
-                    maxlength = 50;
-                    };
-                };
-            },
-
-        DLG_LINE
-            {
-            type = EAknCtMultilineQuery;
-            id = EMultilineSecondLine;
-            control = AVKON_DATA_QUERY
-                {
-                layout = EMultiDataSecondSecEd;
-                label = qtn_netw_iap_auth_password;
-                control = SECRETED
-                    {
-                    num_letters = 50;
-                    };
-                };
-            }
-        };
-    }
-
-
-RESOURCE DIALOG r_conndlg_reconnect
-    {
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons | 
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | 
-            EEikDialogFlagCbaButtons;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control= AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationLayout;
-                label = qtn_ics_q_conn_lost_reconn;
-                };
-            }
-        };
-    }
-
-
-RESOURCE DIALOG r_conndlg_qos
-    {
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons | 
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | 
-            EEikDialogFlagCbaButtons;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control = AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationLayout;
-                label = qtn_ics_q_conn_qos_reconn;
-                };
-            }
-        };
-    }
-
-
-RESOURCE AVKON_LIST_QUERY r_list_query
-    {
-    softkeys = R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT;
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons |
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar;
-
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            id = EListQueryControl;
-            control = AVKON_LIST_QUERY_CONTROL
-                {
-                listtype = EAknCtSingleGraphicPopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    flags = EAknListBoxSelectionList;
-                    };
-
-                heading = qtn_ics_ap_list_title;
-                };
-            }
-        };
-    }
-
-
-RESOURCE DIALOG r_conndlg_new_iap
-    {
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons | 
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar;
-    buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtQuery;
-            id = EGeneralQuery;
-            control= AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationLayout;
-                };
-            }
-        };
-    }
-
-
-RESOURCE TBUF r_conndlg_new_connection_attempt 
-    { 
-    buf = qtn_ics_ap_connect_text; 
-    }
-
-
-RESOURCE TBUF r_wlan_search_for_networks 
-    { 
-    buf = qtn_wlan_search_for_networks; 
-    }
-
-    
-RESOURCE DIALOG r_searching_wait_note
-	{
-	flags = EAknWaitNoteFlags;
-	buttons=R_AVKON_SOFTKEYS_EMPTY;
-    items=
-		{
-		DLG_LINE
-			{
-			type = EAknCtNote;
-			id = 0x112; // 
-			control= AVKON_NOTE 
-                { 
-				layout = EWaitLayout;
-				singular_label = qtn_netw_wait_checking_avail_conn;			
-                imagefile = AVKON_ICON_FILE;
-				imageid = EMbmAvkonQgn_note_progress;
-				imagemask = EMbmAvkonQgn_note_progress_mask;
-				animation = R_QGN_GRAF_WAIT_BAR_ANIM;				
-				};
-			}
-		};
-    }
-
-
-RESOURCE TBUF r_wlan_easy_wlan
-    { 
-    buf = qtn_netw_conset_easy_wlan; 
-    }
-
-    
-RESOURCE TBUF r_list_uncategorized
-    { 
-    buf = qtn_netw_conset_dest_uncategorized; 
-    }
-
-
-RESOURCE TBUF r_conn_methods_many
-    { 
-    buf = qtn_netw_conset_conn_methods_amount_many;
-    }
-
-
-RESOURCE TBUF r_conn_methods_one
-    { 
-    buf = qtn_netw_conset_conn_methods_amount_one;
-    }
-
-
-RESOURCE CBA r_softkeys_options_cancel__connect
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option; },
-        CBA_BUTTON { id = EAknSoftkeyCancel;  txt = text_softkey_cancel; },
-        CBA_BUTTON { id = EAknSoftkeyDone;    txt = qtn_msk_connect; }
-        };
-    }
-
-
-    
-RESOURCE AVKON_LIST_QUERY r_select_connection_query
-    {
-    softkeys = r_softkeys_options_cancel__connect;
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons |
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar;
-
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            id = EListQueryControl;
-            control = AVKON_LIST_QUERY_CONTROL
-                {
-                listtype = EAknCtDoubleLargeGraphicPopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    };
-
-                heading = qtn_netw_conset_prmpt_select_connection;
-                };
-            }
-        };
-    }
-
-
-RESOURCE MENU_BAR r_select_connection_menubar
-    {
-    titles =
-        {
-        MENU_TITLE { menu_pane = r_select_connection_menu_pane; txt = ""; }
-        };
-    }
-
-
-RESOURCE MENU_PANE r_select_connection_menu_pane
-    {
-    items =
-        {
-        MENU_ITEM 
-            { 
-            command = ESelectConnectionCmdSelect;  
-            txt = qtn_set_cmd_select;
-            flags = EEikMenuItemAction; 
-            },
-
-        MENU_ITEM 
-            { 
-            command = ESelectConnectionCmdConnect;  
-            txt = qtn_set_cmd_connect;
-            flags = EEikMenuItemAction;
-            },
-
-        MENU_ITEM 
-            { 
-            command = ESelectConnectionCmdChooseMethod; 
-            txt = qtn_netw_conset_options_select_method;
-            flags = EEikMenuItemSpecific; 
-            }
-        };
-    }
-
-
-RESOURCE CBA r_softkeys_connect_cancel__select
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeySelect; txt = qtn_netw_conset_softkey_connect; },
-        CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
-        CBA_BUTTON { id = EAknSoftkeySelect; txt = qtn_msk_select; }
-        };
-    }
-
-
-RESOURCE AVKON_LIST_QUERY r_list_explicit_query
-    {
-    softkeys = r_softkeys_connect_cancel__select;
-    flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons |
-            EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar;
-
-    items =
-        {
-        AVKON_LIST_QUERY_DLG_LINE
-            {
-            id = EListQueryControl;
-            control = AVKON_LIST_QUERY_CONTROL
-                {
-                listtype = EAknCtSingleGraphicPopupMenuListBox;
-                listbox = AVKON_LIST_QUERY_LIST
-                    {
-                    flags = EAknListBoxSelectionList;
-                    };
-
-                heading = qtn_netw_conset_prmpt_select_conn_method;
-                };
-            }
-        };
-    }
-
-
-// End of File
-
-
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveBase.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of a CActive base class 
-*
-*/
-
-
-
-#ifndef __ACTIVEBASE_H__
-#define __ACTIVEBASE_H__
-
-
-// INCLUDES
-#include <e32base.h>
-
-
-// CLASS DECLARATION
-
-/**
- * CActiveBase class, an active object for selection plugin
- */     
-NONSHARABLE_CLASS( CActiveBase ) : public CActive
-    {
-    public:
-        /**
-        * NewL function
-        */
-        static CActiveBase* NewL();
-    
-        /**
-        * Destructor
-        */    
-        virtual ~CActiveBase();
-    
-        /**
-        * Cancels the active object
-        */
-        void Cancel();
-
-        /**
-        * Timer callback of iPeridoc.
-        */
-        static TInt Tick( TAny* aObject );    
-    
-        
-    protected:
-        /**
-        * ConstructL 
-        */
-        void ConstructL();
-    
-        /**
-        * Constructor
-        */    
-        CActiveBase();
-    
-        /**
-        * DoCancel from CActive
-        */    
-        virtual void DoCancel();
-
-        /**
-        * RunL from CActive
-        */
-        virtual void RunL();
-
-        /**
-        * Starts Timer
-        * @param aTickInterval refersh interval
-        */
-        void StartTimerL( TInt aTickInterval );
-    
-        /**
-        * Stops Timer
-        */
-        void StopTimer();                                            
-        
-
-    protected:
-    
-        // Timer, to refresh iaps of networks. Owned.
-        CPeriodic* iPeriodic;
-            
-        // used for complete runl, not owned.
-        TRequestStatus* iClientStatus;  
-    };     
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveIapPlugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of Active Iap 
-*
-*/
-
-
-
-#ifndef __ACTIVEIAPPLUGIN_H__
-#define __ACTIVEIAPPLUGIN_H__
-
-
-// INCLUDES
-#include "ConnDlgPlugin.h"
-#include "ActiveIAPListing.h"
-
-
-// FORWARD DECLARATION
-class CIapDialog;
-
-
-// CLASS DECLARATION
-
-/**
- * CActiveCConnDlgIapPlugin class,
- * an active object for CConnDlgIapPlugin
- */     
-NONSHARABLE_CLASS( CActiveCConnDlgIapPlugin ) : public CActiveIAPListing
-    {
-    public:
-        /**
-        * NewL function
-        * @param  aPlugin a pointer to notifier plugin
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer    
-        */
-        static CActiveCConnDlgIapPlugin* NewL( CConnDlgIapPlugin* aPlugin,                            
-                                           const TConnectionPrefs& aPrefs );
-    
-        /**
-        * StartSearchIAPsL setactive and starts active object
-        */    
-        void StartSearchIAPsL();
-
-        /**
-        * Destructor
-        */    
-        virtual ~CActiveCConnDlgIapPlugin();
-    
-        /**
-        * Cancels the active object
-        */
-        void Cancel();
-
-              
-    protected:
-        /**
-        * ConstructL 
-        */
-        void ConstructL();
-    
-        /**
-        * Constructor
-        * @param  aPlugin a pointer to notifier plugin    
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer        
-        */    
-        CActiveCConnDlgIapPlugin( CConnDlgIapPlugin* aPlugin,
-                                  const TConnectionPrefs& aPrefs );
-    
-        /**
-        * DoCancel from CActive
-        */    
-        virtual void DoCancel();
-
-        /**
-        * RunL from CActive
-        */
-        virtual void RunL();
-
-        /**
-        * Gives back, refresh interval of scan for network
-        */
-        TInt GetRefreshInterval();
-
-
-    protected:
-    
-        // a pointer to notifer, not owned
-        CConnDlgIapPlugin* iPlugin;
-    
-        ///< Pointer to the dialog, not owned 
-        CIapDialog* iDialog;
-    
-        TBool isDialogDeleting; 
-     
-    };     
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveSelectConnectionPlugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of Active SelectConnection 
-*
-*/
-
-
-
-#ifndef __ACTIVESELECTCONNECTIONPLUGIN_H__
-#define __ACTIVESELECTCONNECTIONPLUGIN_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <agentdialog.h>
-#include <cmmanagerext.h>
-#include <rmpm.h>
-#include "ActiveBase.h"
-
-
-// FORWARD DECLARATION
-class CSelectConnectionDialog;
-class CConnectionInfoArray;
-class MEikSrvNotifierBase2;
-class CGulIcon;
-class TSortSnapUtils;
-
-// CLASS DECLARATION
-
-/**
- * CActiveSelectConnectionPlugin class,
- * an active object for selection plugin
- */     
-NONSHARABLE_CLASS( CActiveSelectConnectionPlugin ) : public CActiveBase
-    {
-    public:
-        /**
-        * NewL function
-        * @param  aPlugin a pointer to notifier plugin
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer    
-        */
-        static CActiveSelectConnectionPlugin* NewL( 
-                                                MEikSrvNotifierBase2* aPlugin,
-                                                const TUint32 aElementId,
-                                                TUint32 aBearerSet );
-    
-        /**
-        * Setactive and starts active object
-        */    
-        void ShowSelectConnectionL();
-
-        /**
-        * Destructor
-        */    
-        virtual ~CActiveSelectConnectionPlugin();
-    
-        /**
-        * Cancels the active object
-        */
-        void Cancel();
-
-        /**
-        * Sets the preferred iap into db.
-        * calls iActivePlugin    
-        * @param aIAPId id of the preferred iap
-        * @param aDestinationId id of the preferred Destination
-        */
-        TUint32 GetElementIDL( TUint32 aIAPId, TUint32 aDestinationId );
-
-
-    protected:
-        /**
-        * ConstructL 
-        */
-        void ConstructL();
-    
-        /**
-        * Constructor
-        * @param  aPlugin a pointer to notifier plugin    
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer        
-        */    
-        CActiveSelectConnectionPlugin( MEikSrvNotifierBase2* aPlugin,
-                                       const TUint32 aElementId,
-                                       TUint32 aBearerSet );
-    
-        /**
-        * DoCancel from CActive
-        */    
-        virtual void DoCancel();
-
-        /**
-        * RunL from CActive
-        */
-        virtual void RunL();
-
-        /**
-        * BuildConnectionListL
-        * @param    -
-        */
-        void BuildConnectionListL();
-
-        void AddSearchForWLanItemL();
-
-        void AddDestinationItemsL();
-        void AddDestinationItemL( RCmDestinationExt aDestination, 
-                                  TUint32 aDestId, TBool aFirstItem, 
-                                  TBool aDefaultDest,
-                                  TSortSnapUtils& aSortSnapUtils );
-
-        void AddUncategorizedItemL( TSortSnapUtils& aSortSnapUtils );
-        
-        /**
-        * Gives back, refresh interval of scan for network
-        */
-        TInt GetRefreshIntervalL();
-        
-        /**
-        * Counts the number of ad-hoc WLAN iaps
-        */
-        TInt CountAdhocWlanIapsL();
-
-    protected:
-        // contains all iaps from db, owned
-        CConnectionInfoArray *iItems;   
-
-        // Selected preferences
-        TUint32 iBearerSet;
-
-        // Requested bearer set preference
-        TUint32 iReqBearerSet;
-        
-        // Selected preferences
-        TUint32 iElementId;
-
-        // a pointer to notifer, not owned
-        MEikSrvNotifierBase2* iPlugin;
-    
-        ///< Pointer to the dialog, not owned 
-        CSelectConnectionDialog* iDialogConn;
-    
-        TBool iIsWLANFeatureSupported;
-
-        TInt iRefreshInterval;
-
-        TInt iHighlightedItem;
-
-        CArrayPtr< CGulIcon >* iIcons;
-
-        RMPM iMPM;
-
-        RCmManagerExt iCmManagerExt;
-
-        TUint iDefaultDestId;
-
-        TUint iDefaultCMId;
-    };     
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveSelectExplicit.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of Active Iap 
-*
-*/
-
-
-
-#ifndef __ACTIVESELECTEXPLICIT_H__
-#define __ACTIVESELECTEXPLICIT_H__
-
-
-// INCLUDES
-#include "ConnDlgPlugin.h"
-#include "ActiveIAPListing.h"
-#include "SelectConnectionDialog.h"
-#include "ActiveBase.h"
-#include <cmmanagerext.h>
-#include <rmpm.h>
-
-
-// FORWARD DECLARATION
-class CSelectExplicitDialog;
-
-
-// CLASS DECLARATION
-
-/**
- * CActiveSelectExplicit class,
- * an active object for SelectExplicit
- */     
-NONSHARABLE_CLASS( CActiveSelectExplicit ) : public CActiveBase
-    {
-    public:
-        /**
-        * NewL function
-        * @param  aPlugin a pointer to notifier plugin
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer    
-        */
-        static CActiveSelectExplicit* NewL( 
-                                        CSelectConnectionDialog* aCallerDialog,
-                                        TUint aDestId, 
-                                        TInt aRefreshInterval,
-                                        TUint32 aBearerSet, 
-                                        TBool aIsWLANFeatureSupported, 
-                                        TUint aDefaultCMId );
-
-        /**
-        * Setactive and starts active object
-        */    
-        void ShowSelectExplicitL();
-
-        /**
-        * Destructor
-        */    
-        virtual ~CActiveSelectExplicit();
-    
-        /**
-        * Cancels the active object
-        */
-        void Cancel();
-
-        /**
-        * Gives back the id of preferred iap.
-        * @return the id of iap
-        */
-        TUint32 GetPreferredIapIdL();
-    
-    
-        /**
-        * Sets the preferred iap into db.
-        * @param aIAPId id of the preferred iap
-        */
-        void SetPreferredIapIdL( TUint32 aIAPId );
-
-        
-    protected:
-        /**
-        * ConstructL 
-        */
-        void ConstructL();
-    
-        /**
-        * Constructor
-        * @param  aPlugin a pointer to notifier plugin    
-        * @param aIAPId iap id
-        * @param aPrefs preferences pointer        
-        */    
-        CActiveSelectExplicit( CSelectConnectionDialog* aCallerDialog,
-                               TUint aDestId, 
-                               TInt aRefreshInterval,
-                               TUint32 aBearerSet, 
-                               TBool aIsWLANFeatureSupported, 
-                               TUint aDefaultCMId );
-
-
-        /**
-        * DoCancel from CActive
-        */    
-        virtual void DoCancel();
-
-        /**
-        * RunL from CActive
-        */
-        virtual void RunL();
-
-        /**
-        * BuildConnectionListL
-        * @param    -
-        */
-        void BuildConnectionListL();
-
-        void AddConnectionMethodItemL( TUint32 aId,
-                                       TBool aCheckForEasyWlan, 
-                                       TBool& aEasyWlanIsInDb, 
-                                       TBool aDefaultCM );
-                                       
-        void AddAdhocWlanIapsL();                               
-
-
-    protected:
-        // contains all iaps from db, owned
-        CConnectionInfoArray *iItems;   
-
-        CSelectConnectionDialog* iCallerDialog;
-
-        TUint iDestId;
-
-        ///< Pointer to the dialog, not owned 
-        CSelectExplicitDialog* iDialog;
-    
-        TInt iRefreshInterval;
-
-        CArrayPtr< CGulIcon >* iIcons;
-
-        RMPM iMPM;
-        RCmManagerExt iCmManagerExt;
-
-        TUint32 iBearerSet;
-        TBool iIsWLANFeatureSupported;
-        TUint iDefaultCMId;
-    };     
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/AuthenticationDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CAuthenticationDialog.
-*
-*/
-
-
-#ifndef __AUTHENTICATIONDIALOG_H__
-#define __AUTHENTICATIONDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <AknQueryDialog.h>
-
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATION
-class CConnDlgAuthenticationPlugin;
-class CExpiryTimer;
-
-// CLASS DECLARATION
-/**
- * Class implementing Authentication (username and password) dialog
- */
-NONSHARABLE_CLASS( CAuthenticationDialog ) : 
-                                            public CAknMultiLineDataQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-        /**
-        * NewL function
-        * @param aPlugin    plugin pointer
-        * @param aDb        database pointer
-        * @param aUsername  username
-        * @param aPassword  password
-        * return CAuthenticationDialog*
-        */
-        static CAuthenticationDialog* NewL( 
-                                        CConnDlgAuthenticationPlugin* aPlugin,
-                                        TDes& aUsername, 
-                                        TDes& aPassword );
-
-    private:
-        /**
-        * CAuthenticationDialog default constructor
-        * @param aPlugin    plugin pointer
-        * @param aDb        database pointer
-        * @param aUsername  username
-        * @param aPassword  password
-        */
-        CAuthenticationDialog( CConnDlgAuthenticationPlugin* aPlugin );
-
-        /**
-        * OkToExitL destructor
-        * @param  aButtonId button exit id
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-
-        /**
-        * ~CAuthenticationDialog destructor
-        * @param    -
-        */
-        ~CAuthenticationDialog();
-
-        /**
-        * HandleQueryEditorStateEventL function
-        * @param    aQueryControl   Control to be queried
-        * @param    aEventType      Type of event (not used)
-        * @param    aStatus         Status of the control (empty or not)
-        * return    TBool
-        */
-        TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl, 
-                                            TQueryControlEvent aEventType, 
-                                            TQueryValidationStatus aStatus );
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-    private:
-        /**
-        * PreLayoutDynInitL function
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-        /**
-        * SetInitialCurrentLine function
-        * @param    -
-        */
-        virtual void SetInitialCurrentLine();
-
-
-    private:
-        // Status of username field (empty or not)
-        TBool iFirstEmpty;
-
-        // Status of password field (empty or not)
-        TBool iSecondEmpty;
-
-        // Pointer to the plugin
-        CConnDlgAuthenticationPlugin* iPlugin;
-        
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/CConnDlgPrivateCRKeys.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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:  Defining local variation for the module
-*
-*
-*/
-
-
-#ifndef CCONNDLGPRIVATECRKEYS_H
-#define CCONNDLGPRIVATECRKEYS_H
-
-const TUid KCRUidCConnDlg = {0x10008D55};
-
-// Local variation for CConnDlg
-
-// KCConnDlgScanInterval defines the WLAN scanning interval for IAP dialog in
-// microseconds
-const TUint32 KCConnDlgScanInterval = 0x00000001;
-
-
-#endif      // CCONNDLGPRIVATECRKEYS_H
\ No newline at end of file
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -16,6 +16,10 @@
 */
 
 
+// NOTE that the functionality this header contains is DEPRECATED
+// None on the methods have UI functionality, the plugins complete the requests
+// immediately when they are started
+
 
 #ifndef __CONNDLGPLUGIN_H__
 #define __CONNDLGPLUGIN_H__
@@ -87,8 +91,6 @@
 // FORWARD DECLARATION
 class CAknMultiLineDataQueryDialog;
 class CAknQueryDialog;
-class CActiveCConnDlgIapPlugin;
-class CActiveSelectConnectionPlugin;
 
 // CLASS DECLARATION
 
@@ -111,7 +113,65 @@
     * @param  -
     * return CConnDlgIapPlugin*
     */
-    static CConnDlgIapPlugin* NewL( const TBool aResourceFileResponsible );
+    static CConnDlgIapPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
+
+    /**
+    * RegisterL register the client notifier function
+    * @param  -
+    * return TNotifierInfo
+    */
+    TNotifierInfo RegisterL();
+
+    /**
+    * Start the Notifier
+    * @param  aBuffer    Buffer
+    * @param  aReplySlot Identifies which message argument to use for the 
+    *                    reply. This message argument will refer to a 
+    *                    modifiable descriptor, a TDes8 type, into which data
+    *                    can be returned. 
+    * @param  aMessage   Message
+    * return -
+    */
+    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
+                 const RMessagePtr2& aMessage );
+
+    /**
+    * Cancel() the notifier
+    * @param  -
+    * return -
+    */
+    void Cancel();
+
+public:
+
+    /**
+    * CompleteL the notifier is complete
+    * @param  aStatus status
+    * return  -
+    */
+    void CompleteL( TInt aStatus );   
+    
+private:
+    TUint32 iIAP;                       // Internet Access Point
+    };
+
+
+/**
+ * Authentication Plugin class
+ */
+NONSHARABLE_CLASS( CConnDlgAuthenticationPlugin ) : 
+                                            public CConnectionDialogsNotifBase
+    {
+public:
+    CConnDlgAuthenticationPlugin();
+
+    /**
+    * NewL function
+    * @param  -
+    * return CConnDlgAuthenticationPlugin*
+    */
+    static CConnDlgAuthenticationPlugin* NewL( 
+                                        const TBool /*aResourceFileResponsible*/ );
 
     /**
     * RegisterL register the client notifier function
@@ -148,102 +208,6 @@
     * return  -
     */
     void CompleteL( TInt aStatus );
-    
-    /**
-    * Sets the preferred iap into db.
-    * calls iActivePlugin    
-    * @param aIAPId id of the preferred iap
-    */
-    void SetPreferredIapIdL( TUint32 aIAPId );
-    
-private:
-
-    /**
-    * Gets user connection info.    
-    * @param aIapId id of the iap
-    */ 
-    TInt GetUserConnection( TInt& aIapId );
-    
-    /**
-    * Gets active connection info.    
-    * @param aIapId id of the iap
-    * @param aBearer bearer type
-    */
-    TInt GetActiveConnection( TInt& aIapId, TInt& aBearer );    
-    
-private:
-    TUint32 iIAP;                       // Internet Access Point
-    TPckgBuf<TConnectionPrefs> iPrefs;  // Selected preferences
-    CActiveCConnDlgIapPlugin* iActivePlugin;    // pointer to active object
-    };
-
-
-/**
- * Authentication Plugin class
- */
-NONSHARABLE_CLASS( CConnDlgAuthenticationPlugin ) : 
-                                            public CConnectionDialogsNotifBase
-    {
-public:
-    CConnDlgAuthenticationPlugin::CConnDlgAuthenticationPlugin();
-
-    /**
-    * NewL function
-    * @param  -
-    * return CConnDlgAuthenticationPlugin*
-    */
-    static CConnDlgAuthenticationPlugin* NewL( 
-                                        const TBool aResourceFileResponsible );
-
-    /**
-    * RegisterL register the client notifier function
-    * @param  -
-    * return TNotifierInfo
-    */
-    TNotifierInfo RegisterL();
-
-    /**
-    * Start the Notifier
-    * @param  aBuffer    Buffer
-    * @param  aReplySlot Identifies which message argument to use for the 
-    *                    reply. This message argument will refer to a 
-    *                    modifiable descriptor, a TDes8 type, into which data
-    *                    can be returned. 
-    * @param  aMessage   Message
-    * return -
-    */
-    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                 const RMessagePtr2& aMessage );
-
-    /**
-    * Cancel() the notifier
-    * @param  -
-    * return -
-    */
-    void Cancel();
-
-public:
-
-    /**
-    * GetAuthenticationL() show the Authenticate  dialog
-    * @param  -
-    * return -
-    */
-    void GetAuthenticationL();
-
-    /**
-    * CompleteL the notifier is complete
-    * @param  aStatus status
-    * return  -
-    */
-    void CompleteL( TInt aStatus );
-
-private:
-    TPckgBuf<TAuthenticationPair> iAuthPair;    // Authentication pair 
-                                                // (username and password)
-    TPckgBuf<TAuthenticationPairBuff> iAuthPairBuff;    // Authentication pair 
-                                                // (username and password)
-    CAknMultiLineDataQueryDialog *iDialog;      // Pointer to the dialog
     };
 
 
@@ -261,7 +225,7 @@
     * return CConnDlgReconnectPlugin*
     */
     static CConnDlgReconnectPlugin* NewL( 
-                                        const TBool aResourceFileResponsible );
+                                        const TBool /*aResourceFileResponsible*/ );
 
     /**
     * RegisterL register the client notifier function
@@ -293,22 +257,11 @@
 public:
 
     /**
-    * GetReconnectL() call the reconnect dialog
-    * @param  -
-    * return -
-    */
-    void GetReconnectL();
-
-    /**
     * CompleteL the notifier is complete
     * @param  aStatus status
     * return  -
     */
     void CompleteL(TInt aStatus);
-
-private:
-    CAknQueryDialog* iDialog;   // Pointer to the dialog
-    TBool iBool;                // Tells if it has to connect to the IAP
     };
 
 
@@ -324,137 +277,7 @@
     * @param  -
     * return CConnDlgReconnectPlugin*
     */
-    static CConnDlgQosPlugin* NewL( const TBool aResourceFileResponsible );
-
-    /**
-    * RegisterL register the client notifier function
-    * @param  -
-    * return TNotifierInfo
-    */
-    TNotifierInfo RegisterL();
-
-    /**
-    * Start the Notifier
-    * @param  aBuffer    Buffer
-    * @param  aReplySlot Identifies which message argument to use for the 
-    *                    reply. This message argument will refer to a 
-    *                    modifiable descriptor, a TDes8 type, into which data
-    *                    can be returned. 
-    * @param  aMessage   Message
-    * return -
-    */
-    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                 const RMessagePtr2& aMessage );
-
-    /**
-    * Cancel() the notifier
-    * @param  -
-    * return -
-    */
-    void Cancel();
-
-public:
-
-    /**
-    * GetReconnectL() call the reconnect dialog
-    * @param  -
-    * return -
-    */
-    void GetReconnectL();
-
-    /**
-    * CompleteL the notifier is complete
-    * @param  aStatus status
-    * return  -
-    */
-    void CompleteL( TInt aStatus );
-
-private:
-    CAknQueryDialog* iDialog;   // Pointer to the dialog
-    TBool iBool;                // Tells if it has to connect to the IAP
-    };
-
-
-/**
- * New IAP Plugin class
- */
-NONSHARABLE_CLASS( CConnDlgNewIapPlugin ) : public CConnectionDialogsNotifBase
-    {
-public:
-
-    /**
-    * NewL function
-    * @param  -
-    * return CConnDlgNewIapPlugin*
-    */
-    static CConnDlgNewIapPlugin* NewL( const TBool aResourceFileResponsible );
-
-    /**
-    * RegisterL register the client notifier function
-    * @param  -
-    * return TNotifierInfo
-    */
-    TNotifierInfo RegisterL();
-
-    /**
-    * Start the Notifier
-    * @param  aBuffer    Buffer
-    * @param  aReplySlot Identifies which message argument to use for the 
-    *                    reply. This message argument will refer to a 
-    *                    modifiable descriptor, a TDes8 type, into which data
-    *                    can be returned. 
-    * @param  aMessage   Message
-    * return -
-    */
-    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
-                 const RMessagePtr2& aMessage );
-
-    /**
-    * Cancel() the notifier
-    * @param  -
-    * return -
-    */
-    void Cancel();
-
-public:
-
-    /**
-    * GetNewIapL show NewIap dialog
-    * @param  -
-    * return  -
-    */
-    void GetNewIapL();
-
-    /**
-    * CompleteL the notifier is complete
-    * @param  aStatus status
-    * return  -
-    */
-    void CompleteL( TInt aStatus );
-
-private:
-    CAknQueryDialog* iDialog;                   // Pointer to the dialog
-    TBool iConnect;                             // Tells if it has to connect 
-                                                // to the IAP
-    TPckgBuf<TNewIapConnectionPrefs> iPrefs;    // Selected preferences
-    };
-
-
-
-/**
- * Connection Selection Plugin class
- */
-NONSHARABLE_CLASS( CConnDlgSelectConnectionPlugin ) : 
-                                            public CConnectionDialogsNotifBase
-    {
-public:
-    /**
-    * NewL function
-    * @param  -
-    * return CConnDlgSelectConnectionPlugin*
-    */
-    static CConnDlgSelectConnectionPlugin* NewL( 
-                                        const TBool aResourceFileResponsible );
+    static CConnDlgQosPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
 
     /**
     * RegisterL register the client notifier function
@@ -491,36 +314,115 @@
     * return  -
     */
     void CompleteL( TInt aStatus );
-    
+    };
+
+
+/**
+ * New IAP Plugin class
+ */
+NONSHARABLE_CLASS( CConnDlgNewIapPlugin ) : public CConnectionDialogsNotifBase
+    {
+public:
+
+    /**
+    * NewL function
+    * @param  -
+    * return CConnDlgNewIapPlugin*
+    */
+    static CConnDlgNewIapPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
+
     /**
-    * Sets the preferred iap into db.
-    * calls iActivePlugin    
-    * @param aIAPId id of the preferred iap
-    * @param aDestinationId id of the preferred Destination
+    * RegisterL register the client notifier function
+    * @param  -
+    * return TNotifierInfo
     */
-    void SetElementIDL( TUint32 aIAPId, TUint32 aDestinationId );
-    
-private:
+    TNotifierInfo RegisterL();
+
+    /**
+    * Start the Notifier
+    * @param  aBuffer    Buffer
+    * @param  aReplySlot Identifies which message argument to use for the 
+    *                    reply. This message argument will refer to a 
+    *                    modifiable descriptor, a TDes8 type, into which data
+    *                    can be returned. 
+    * @param  aMessage   Message
+    * return -
+    */
+    void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
+                 const RMessagePtr2& aMessage );
+
+    /**
+    * Cancel() the notifier
+    * @param  -
+    * return -
+    */
+    void Cancel();
+
+public:
 
     /**
-    * Gets user connection info.    
-    * @param aIapId id of the iap
-    * @param aSnapId id of the destination
+    * CompleteL the notifier is complete
+    * @param  aStatus status
+    * return  -
     */
-    TInt GetUserConnection( TInt& aIapId, TInt& aSnapId );
-    
+    void CompleteL( TInt aStatus );
+    };
+
+
+
+/**
+ * Connection Selection Plugin class
+ */
+NONSHARABLE_CLASS( CConnDlgSelectConnectionPlugin ) : 
+                                            public CConnectionDialogsNotifBase
+    {
+public:
+    /**
+    * NewL function
+    * @param  -
+    * return CConnDlgSelectConnectionPlugin*
+    */
+    static CConnDlgSelectConnectionPlugin* NewL( 
+                                        const TBool /*aResourceFileResponsible*/ );
+
     /**
-    * Gets active connection info.    
-    * @param aIapId id of the iap
-    * @param aSnapId id of the destination
-    * @param aBearer bearer type
-    */    
-    TInt GetActiveConnection( TInt& aIapId, TInt& aSnapId, TInt& aBearer );
+    * RegisterL register the client notifier function
+    * @param  -
+    * return TNotifierInfo
+    */
+    TNotifierInfo RegisterL();
+
+    /**
+    * Start the Notifier
+    * @param  aBuffer    Buffer
+    * @param  aReplySlot Identifies which message argument to use for the 
+    *                    reply. This message argument will refer to a 
+    *                    modifiable descriptor, a TDes8 type, into which data
+    *                    can be returned. 
+    * @param  aMessage   Message
+    * return -
+    */
+    void StartL( const TDesC8& /*aBuffer*/, TInt aReplySlot, 
+                 const RMessagePtr2& aMessage );
+
+    /**
+    * Cancel() the notifier
+    * @param  -
+    * return -
+    */
+    void Cancel();
+
+public:
+
+    /**
+    * CompleteL the notifier is complete
+    * @param  aStatus status
+    * return  -
+    */
+    void CompleteL( TInt aStatus );
 
 private:
     TUint32 iElementID;
-    TPckgBuf<TConnectionPrefs> iPrefs;  // Selected preferences
-    CActiveSelectConnectionPlugin* iActivePlugin;   // pointer to active object
     };
 
 #endif
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/IAPDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CIapDialog.
-*
-*/
-
-
-#ifndef __IAPDIALOG_H__
-#define __IAPDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <aknlistquerydialog.h>
-
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATION
-class CConnDlgIapPlugin;
-class CConnectionInfoArray;
-class CExpiryTimer;
-
-// CLASS DECLARATION 
-/**
- * Class implementing IAP dialog
- */
-NONSHARABLE_CLASS( CIapDialog ) : public CAknListQueryDialog, public MExpiryTimerCallback
-    {
-    private:
-        /**
-        * CIapDialog constructor
-        * @param aPlugin    plugin pointer
-        */
-        CIapDialog( CConnDlgIapPlugin* aPlugin );
-
-        /**
-        * Symbian default constructor.
-        */      
-        void ConstructL();
-
-
-    public:
-        /**
-        * NewL function
-        * @param aPlugin    plugin pointer
-        * return CIapDialog*
-        */
-        static CIapDialog* NewL( CConnDlgIapPlugin* aPlugin );
-
-        /**
-        * ~CIapDialog destructor
-        */
-        ~CIapDialog();
-
-        /**
-        * Exit function OF the CIapDialog
-        * @param    aButtonId button exit id
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        /**
-        * from CCoeControl
-        * @param aKeyEvent Event to handled.
-        * @param aType Type of the key event. 
-        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType);
-        
-        /**
-        * Dialog refreshing
-        */
-        void RefreshDialogL( CConnectionInfoArray* aIAP, 
-                             TBool aIsReallyRefreshing );
-                             
-       /**
-        *
-        * @return The value of iFromOkToExit.
-        */
-        inline TBool GetOkToExit();
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-
-    private:
-        /**
-        * Sets graphic icons
-        * @param    -
-        */
-        void SetIconsL();
-
-        
-    private:    // Data
-
-        // Pointer to the plugin, not owned
-        CConnDlgIapPlugin* iPlugin;     
-        
-        RArray<TUint> iIAPIds;
-
-        // For base class, unused.
-        TInt iDummy;
-        
-        TBool iFromOkToExit; ///< closed the dialof from OkToExitL or not
-        
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-#include "IapDialog.inl"
-
-#endif
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/IapDialog.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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: 
-*      Inline method definitions of the class IAPDIALOG.
-*
-*
-*/
-
-
-
-#ifndef __IAPDIALOG_H__INL
-#define __IAPDIALOG_H__INL
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// void CIapDialog::GetOkToExit
-// ----------------------------------------------------------------------------
-//
-TBool CIapDialog::GetOkToExit()
-	{
-	return iFromOkToExit;
-	}
-        
-
-
-#endif // __IAPDIALOG_H__INL
-
-// End of File
\ No newline at end of file
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/NewIapDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CNewIapDialog.
-*
-*/
-
-
-#ifndef __NEWIAPDIALOG_H__
-#define __NEWIAPDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <AknQueryDialog.h>
-#include <agentdialog.h>
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATIONS
-class CConnDlgNewIapPlugin;
-class CExpiryTimer;
-
-// CLASS DECLARATIONS
-
-/**
- * Class implementing New IAP warning dialog.
- */
-NONSHARABLE_CLASS( CNewIapDialog ) : public CAknQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-
-        /**
-        * Constructor the CNewIapDialog class
-        * @param aPlugin plugin pointer
-        * @param aConnect connect to the IAP
-        * @param aPrefs preferences infomation
-        * @return -
-        */
-        CNewIapDialog( CConnDlgNewIapPlugin* aPlugin, 
-                       TBool& aConnect,
-                       const TNewIapConnectionPrefs& aPrefs );
-
-    /**
-    * Destructor
-    */
-    virtual ~CNewIapDialog();
-
-        /**
-        * CBA handling function
-        * @param aButtonId button Uid
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-    private:
-        /**
-        * PreLayoutDynInitL function
-        * @param -
-        * @return -
-        */
-        void PreLayoutDynInitL();
-
-    private:
-        // Pointer to the plugin
-        CConnDlgNewIapPlugin* iPlugin;      
-
-        // Specifies way of closing of the dialog. ETrue when 'Yes' or 'Done'
-        // softkeys pressed.
-        TBool& iConnect;                    
-
-        // Selected preferences
-        const TNewIapConnectionPrefs& iPrefs;
-
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/QosDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CQosDialog.
-*
-*/
-
-
-#ifndef __QOSDIALOG_H__
-#define __QOSDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <AknQueryDialog.h>
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATIONS
-class CConnDlgQosPlugin;
-class CExpiryTimer;
-
-// CLASS DECLARATIONS
-
-/**
- * Class implementing Quality of services dialog.
- */
-NONSHARABLE_CLASS( CQosDialog ) : public CAknQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-        /**
-        * Constructor the CQosDialog class
-        * @param aPlugin plugin pointer
-        * @param aBool reconnect to the Qos
-        * @return -
-        */
-        CQosDialog( CConnDlgQosPlugin* aPlugin, TBool& aBool );
-
-        /**
-        * Exit function the CQosDialog
-        * @param aButtonId plugin pointer
-        * @param aBool reconnect to the IAP
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-    /**
-    * Destructor
-    */
-    virtual ~CQosDialog();
-
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-
-    private:
-        // Pointer to the plugin
-        CConnDlgQosPlugin* iPlugin;
-
-        // Specifies way of closing of the dialog. ETrue when 'Yes' or 'Done'
-        // softkeys pressed.
-        TBool& iBool;     
-
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-        
-    };
-
-#endif  // __QOSDIALOG_H__
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/ReconnectDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CReconnectDialog.
-*
-*/
-
-
-#ifndef __RECONNECTDIALOG_H__
-#define __RECONNECTDIALOG_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <AknQueryDialog.h>
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATIONS
-class CConnDlgReconnectPlugin;
-class CExpiryTimer;
-
-// CLASS DECLARATIONS
-
-/**
- * Class implementing Reconnect dialog
- */
-NONSHARABLE_CLASS( CReconnectDialog ) : public CAknQueryDialog, public MExpiryTimerCallback
-    {
-    public:
-        /**
-        * Constructor of the CReconnetDialog class
-        * @param aPlugin plugin pointer
-        * @param aBool reconnect to the IAP
-        * @return -
-        */
-        CReconnectDialog( CConnDlgReconnectPlugin* aPlugin, TBool& aBool );
-
-        /**
-        * Exit function the CReconnectDialog
-        * @param aButtonId plugin pointer
-        * @param aBool reconnect to the IAP
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-
-    /**
-    * Destructor
-    */
-    virtual ~CReconnectDialog();
-
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-
-    private:
-        // Pointer to the plugin
-        CConnDlgReconnectPlugin* iPlugin;
-
-        // Specifies way of closing of the dialog. ETrue when 'Yes' or 'Done'
-        // softkeys pressed.
-        TBool& iBool;
-        
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-#endif  // __RECONNECTDIALOG_H__
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/SelectConnectionDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CSelectConnectionDialog.
-*
-*/
-
-
-#ifndef __SELECTCONNECTIONDIALOG_H__
-#define __SELECTCONNECTIONDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <aknlistquerydialog.h>
-#include "ExpiryTimerCallback.h"
-
-
-// FORWARD DECLARATION
-class CConnDlgSelectConnectionPlugin;
-class CConnectionInfoArray;
-class MEikSrvNotifierBase2;
-class CActiveSelectExplicit;
-class CExpiryTimer;
-
-// CLASS DECLARATION 
-/**
- * Class implementing SelectConnection dialog
- */
-NONSHARABLE_CLASS( CSelectConnectionDialog ) : public CAknListQueryDialog, public MExpiryTimerCallback
-    {
-    private:
-        /**
-        * CSelectConnectionDialog constructor
-        * @param aPlugin    plugin pointer
-        */
-        CSelectConnectionDialog( MEikSrvNotifierBase2* aPlugin, 
-                                 TInt aRefreshInterval,
-                                 TUint32 aBearerSet, 
-                                 TBool aIsWLANFeatureSupported, 
-                                 TUint aDefaultCMId );
-
-        /**
-        * Symbian default constructor.
-        */      
-        void ConstructL();
-
-
-    public:
-        /**
-        * NewL function
-        * @param aPlugin    plugin pointer
-        * return CSelectConnectionDialog*
-        */
-        static CSelectConnectionDialog* NewL( MEikSrvNotifierBase2* aPlugin,
-                                        TInt aRefreshInterval,
-                                        TUint32 aBearerSet, 
-                                        TBool aIsWLANFeatureSupported, 
-                                        TUint aDefaultCMId );
-
-        /**
-        * ~CSelectConnectionDialog destructor
-        */
-        ~CSelectConnectionDialog();
-
-        /**
-        * Exit function OF the CSelectConnectionDialog
-        * @param    aButtonId button exit id
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        void PrepareAndRunLD( CConnectionInfoArray* aIAP, 
-                             CArrayPtr< CGulIcon >* aIcons,
-                             TBool aIsReallyRefreshing,
-                             const TInt aHighlightedItem );
-                             
-        /**
-        * Dialog refreshing
-        */
-        void RefreshDialogL( CConnectionInfoArray* aIAP, 
-                             CArrayPtr< CGulIcon >* aIcons,
-                             TBool aIsReallyRefreshing,
-                             const TInt aHighlightedItem );
-                             
-       /**
-        *
-        * @return The value of iFromOkToExit.
-        */
-        inline TBool GetOkToExit();          
-        
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-
-        /**
-        * From CCoeControl  Handle key events. When a key event occurs, 
-        *                   CONE calls this function for each control on the control stack, 
-        *                   until one of them returns EKeyWasConsumed to indicate that it processed the key event.  
-        * @param aKeyEvent  The key event.
-        * @param aType      The type of the event: EEventKey, EEventKeyUp or EEventKeyDown.
-        * @return           Indicates whether or not the key event was used by this control.
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType );
-
-        TInt RunLD();
-
-        void SetElementIDL( TUint32 aIAPId );
-
-        void CompleteL( TInt aStatus );
-        
-        void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
-        void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-        /**
-        * Initialize menu pane.
-        * @param aResourceId Menu pane resource id.
-        * @param CEikMenuPane Menu pane.
-        */
-        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
-        void ProcessCommandL( TInt aCommand );
-
-
-    private:    // Data
-
-        // Pointer to the plugin, not owned
-        CConnDlgSelectConnectionPlugin* iPlugin;     
-        
-        RArray<TUint> iIapIDs;
-        RArray<TUint> iDestIDs;
-
-        // For base class, unused.
-        TInt iDummy;
-        
-        TBool iFromOkToExit; ///< closed the dialof from OkToExitL or not
-
-        CArrayPtr< CGulIcon >* iIcons;
-
-        // pointer to active object
-        CActiveSelectExplicit* iActiveSelectExplicit;
-        TInt iRefreshInterval;
-
-        // Selected preferences
-        TUint32 iBearerSet;
-
-        TBool iIsWLANFeatureSupported;
-
-        TUint iDefaultCMId;
-        
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-    };
-
-
-#include "SelectConnectionDialog.inl"
-
-#endif
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/SelectConnectionDialog.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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: 
-*      Inline method definitions of the class SelectConnectionDIALOG.
-*
-*
-*/
-
-
-
-#ifndef __SELECTCONNECTIONDIALOG_H__INL
-#define __SELECTCONNECTIONDIALOG_H__INL
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// void CSelectConnectionDialog::GetOkToExit
-// ----------------------------------------------------------------------------
-//
-TBool CSelectConnectionDialog::GetOkToExit()
-	{
-	return iFromOkToExit;
-	}
-        
-
-
-#endif // __SELECTCONNECTIONDIALOG_H__INL
-
-// End of File
\ No newline at end of file
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/SelectExplicitDialog.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of class CSelectExplicitDialog.
-*
-*/
-
-
-#ifndef __SELECTEXPLICITDIALOG_H__
-#define __SELECTEXPLICITDIALOG_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <aknlistquerydialog.h>
-#include "ExpiryTimerCallback.h"
-
-// FORWARD DECLARATION
-class CConnectionInfoArray;
-class CSelectConnectionDialog;
-class CExpiryTimer;
-
-// CLASS DECLARATION 
-/**
- * Class implementing SelectExplicit dialog
- */
-NONSHARABLE_CLASS( CSelectExplicitDialog ) : public CAknListQueryDialog, public MExpiryTimerCallback
-    {
-    private:
-        /**
-        * CSelectExplicitDialog constructor
-        * @param aPlugin    plugin pointer
-        */
-        CSelectExplicitDialog( CSelectConnectionDialog* aCallerDialog );
-
-        
-        /**
-        * Symbian default constructor.
-        */      
-        void ConstructL();
-
-
-    public:
-        /**
-        * NewL function
-        * @param aPlugin    plugin pointer
-        * return CSelectExplicitDialog*
-        */
-        static CSelectExplicitDialog* NewL( 
-                                    CSelectConnectionDialog* aCallerDialog );
-
-
-        /**
-        * ~CSelectExplicitDialog destructor
-        */
-        ~CSelectExplicitDialog();
-
-        /**
-        * Exit function OF the CSelectExplicitDialog
-        * @param    aButtonId button exit id
-        * @return TBool exit or no
-        */
-        virtual TBool OkToExitL( TInt aButtonId );
-        
-        void PrepareAndRunLD( CConnectionInfoArray* aIAP, 
-                             CArrayPtr< CGulIcon >* aIcons,
-                             TBool aIsReallyRefreshing );
-                             
-        /**
-        * Dialog refreshing
-        */
-        void RefreshDialogL( CConnectionInfoArray* aIAP, 
-                             CArrayPtr< CGulIcon >* aIcons,
-                             TBool aIsReallyRefreshing );
-                             
-       /**
-        *
-        * @return The value of iFromOkToExit.
-        */
-        inline TBool GetOkToExit();
-        
-        /**
-        * from CCoeControl
-        * @param aKeyEvent Event to handled.
-        * @param aType Type of the key event. 
-        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                     TEventCode aType);
-
-        /**
-        * Dialog expiration timeout callback
-        */
-        void HandleTimedOut();
-    private:
-        /**
-        * PreLayoutDynInitL
-        * @param    -
-        */
-        virtual void PreLayoutDynInitL();
-
-
-    private:    // Data
-
-        // Pointer to the plugin, not owned
-        CSelectConnectionDialog* iCallerDialog;
-
-        RArray<TUint> iIAPIds;
-
-        TBool iFromOkToExit; ///< closed the dialof from OkToExitL or not
-        
-        TInt iDummy;
-        
-        CArrayPtr< CGulIcon >* iIcons;
-        
-        // Pointer for dialog expiration timer
-        CExpiryTimer* iExpiryTimer;
-
-    };
-
-
-#include "SelectExplicitDialog.inl"
-
-#endif
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/SelectExplicitDialog.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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: 
-*      Inline method definitions of the class SelectExplicitDialog.
-*
-*
-*/
-
-
-
-#ifndef __SELECTEXPLICITDIALOG__INL
-#define __SELECTEXPLICITDIALOG__INL
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// void CSelectExplicitDialog::GetOkToExit
-// ----------------------------------------------------------------------------
-//
-TBool CSelectExplicitDialog::GetOkToExit()
-	{
-	return iFromOkToExit;
-	}
-        
-
-#endif // __SELECTEXPLICITDIALOG__INL
-
-// End of File
\ No newline at end of file
--- a/connectionutilities/ConnectionDialogs/cconndlg/inc/sortsnaputils.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Declaration of TSortSnapUtils 
-*
-*/
-
-
-
-#ifndef __SORTSNAPUTILS_H__
-#define __SORTSNAPUTILS_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <cmmanagerext.h>
-#include <rmpm.h>
-
-
-// CLASS DECLARATION
-
-/**
- * TSortSnapUtils class,
- * utility class to use P&S mechanism to
- * avoid circular reference with MPM
- */     
-class TSortSnapUtils 
-    {
-    public:
-        enum TSortSnapUtilsState
-            {
-            EUninitialised = 0,
-            EUseMPM,
-            EUsePubSub
-            } ;
-
-        /**
-        * Constructor
-        */    
-        TSortSnapUtils( RMPM& aMPM );
-        
-        /**
-        * Destructor
-        */    
-        ~TSortSnapUtils();
-
-        void GetDestIdArrayL( RCmManagerExt& aCmManagerExt, RArray<TUint32>& aDestArray );     
-
-        /**
-        * GetSortSNAPDataL
-        * Gets snap data 
-        * Reads P&S values first, then uses MPM if
-        * unsuccessful. This is needed to avoid a deadlock situation
-        * with MPM.
-        * @param aSnapData - iSnap attribute of TMpmSnapPubSubFormat is the
-        * input parameter, iSortedIaps attribute holds the iap ids if 
-        * returned with KErrNone
-        */
-        TInt GetSortSnapData( TUint32 aSnapId, TMpmSnapBuffer& aSnapBuffer );  
-
-    private:
-        void InitDestIdArray();
-       
-    private:
-        TUint32 iSnapIdArray[KMPMSortSnapMaxKey]; 
-        TInt iSnapCount;
-        TSortSnapUtilsState iSSUState;
-        RMPM& iMPM; 
-    };     
-
-
-#endif
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ActiveBase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of base CActive class with a timer
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveBase.h"
-#include "ConnectionDialogsLogger.h"
-
-/*#include <FeatMgr.h>
-#include <StringLoader.h>
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-#include <data_caging_path_literals.hrh>
-
-#include <cmdestinationext.h>
-#include <CmConnectionMethodDef.h>
-#include <cmpluginWlanDef.h>
-
-#include <cmmanager.mbg>
-#include <CConnDlgPlugin.rsg>
-*/
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------
-// CActiveBase::CActiveBase()
-// ---------------------------------------------------------
-//
-CActiveBase::CActiveBase()
-: CActive( EPriorityUserInput )
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveBase* CActiveBase::NewL()
-// ---------------------------------------------------------
-//
-CActiveBase* CActiveBase::NewL()
-    {
-    CLOG_ENTERFN( "CActiveBase::NewL " );  
-    
-    CActiveBase* self = new ( ELeave ) CActiveBase();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CLOG_LEAVEFN( "CActiveBase::NewL " );      
-
-    return self;        
-    }
-
-
-// ---------------------------------------------------------
-// CActiveBase::ConstructL()
-// ---------------------------------------------------------
-//
-void CActiveBase::ConstructL()
-    {
-    CActiveScheduler::Add( this );            
-    iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveBase::~CActiveBase()
-// ---------------------------------------------------------
-//    
-CActiveBase::~CActiveBase()
-    {
-    Cancel();
-    }
-
-
-// ---------------------------------------------------------
-// CActiveBase::Cancel()
-// ---------------------------------------------------------
-// 
-void CActiveBase::Cancel()
-    {
-    StopTimer();
-    CActive::Cancel();
-    }
-
-
-// ---------------------------------------------------------
-// CActiveBase::DoCancel()
-// ---------------------------------------------------------
-// 
-void CActiveBase::DoCancel()
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveBase::RunL()
-// ---------------------------------------------------------
-//     
-void CActiveBase::RunL()
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveBase::StartTimerL
-// ---------------------------------------------------------
-//    
-void CActiveBase::StartTimerL( TInt aTickInterval )
-    {    
-    CLOG_ENTERFN( "CActiveBase::StartTimerL " );
-    
-    if( !iPeriodic )
-        {
-        iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard ); 
-        }
-        
-    iPeriodic->Start( aTickInterval, aTickInterval, TCallBack( Tick, this ) );
-    
-    CLOG_LEAVEFN( "CActiveBase::StartTimerL " );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveBase::StopTimer
-// ---------------------------------------------------------
-//
-void CActiveBase::StopTimer()
-    {
-    CLOG_ENTERFN( "CActiveBase::StopTimer " );  
-    
-    if( iPeriodic )
-        {
-        CLOG_WRITE( "iPeriodic" );
-        iPeriodic->Cancel();
-        CLOG_WRITE( "Cancel" );
-        
-        delete iPeriodic;
-        CLOG_WRITE( "delete" );
-        
-        iPeriodic = NULL;
-        }        
-    
-    CLOG_LEAVEFN( "CActiveBase::StopTimer " );
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveBase::Tick
-// ---------------------------------------------------------
-//
-TInt CActiveBase::Tick( TAny* aObject )
-    {
-    CLOG_ENTERFN( "CActiveBase::Tick " );  
-    
-    CActiveBase* myself = static_cast<CActiveBase*>( aObject );
-
-    if ( myself->iStatus == KErrCancel )
-        {
-        CLOG_WRITE( "iStatus == KErrCancel" );        
-        myself->StopTimer();            
-        }
-    else
-        {
-        CLOG_WRITE( "iStatus != KErrCancel" );    
-                                                              
-        myself->SetActive();
-        myself->iClientStatus = &( myself->iStatus );  
-        *( myself->iClientStatus ) = KRequestPending;  
-
-        User::RequestComplete( myself->iClientStatus, KErrNone );         
-        }
-    
-    CLOG_LEAVEFN( "CActiveBase::Tick " );      
-    
-    return 1;
-    }        
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ActiveIapPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of plugins (base & all derived).
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveIapPlugin.h"
-#include "IAPDialog.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "CConnDlgPrivateCRKeys.h"
-#include "ConnectionDialogsLogger.h"
-
-#include <commdb.h>
-#include <StringLoader.h>
-#include <wlanmgmtcommon.h>
-#ifndef __WINS__
-#include <wlanmgmtclient.h>
-#endif
-#include <AknWaitDialog.h>
-
-#include <CConnDlgPlugin.rsg>
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::CActiveCConnDlgIapPlugin()
-// ---------------------------------------------------------
-//
-CActiveCConnDlgIapPlugin::CActiveCConnDlgIapPlugin( 
-                                            CConnDlgIapPlugin* aPlugin,
-                                            const TConnectionPrefs& aPrefs )
-: CActiveIAPListing( aPrefs ),
-  iPlugin( aPlugin ), 
-  isDialogDeleting( EFalse )
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin* CActiveCConnDlgIapPlugin::NewL()
-// ---------------------------------------------------------
-//
-CActiveCConnDlgIapPlugin* CActiveCConnDlgIapPlugin::NewL( 
-                                              CConnDlgIapPlugin* aPlugin,              
-                                              const TConnectionPrefs& aPrefs )
-    {
-    CLOG_ENTERFN( "CActiveCConnDlgIapPlugin::NewL " );  
-    
-    CActiveCConnDlgIapPlugin* self = 
-                         new ( ELeave ) CActiveCConnDlgIapPlugin( aPlugin,                                                                  
-                                                                  aPrefs );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CLOG_LEAVEFN( "CActiveCConnDlgIapPlugin::NewL " );      
-
-    return self;        
-    }
-
-
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::ConstructL()
-// ---------------------------------------------------------
-//
-void CActiveCConnDlgIapPlugin::ConstructL()
-    {
-    BaseConstructL();
-    }
-
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::~CActiveCConnDlgIapPlugin()
-// ---------------------------------------------------------
-//    
-CActiveCConnDlgIapPlugin::~CActiveCConnDlgIapPlugin()
-    {
-    CLOG_ENTERFN( "CActiveCConnDlgIapPlugin::~CActiveCConnDlgIapPlugin" );      
-
-    Cancel();
-
-    CLOG_LEAVEFN( "CActiveCConnDlgIapPlugin::~CActiveCConnDlgIapPlugin" );      
-    }
-
-
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::Cancel()
-// ---------------------------------------------------------
-// 
-void CActiveCConnDlgIapPlugin::Cancel()
-    {
-    CLOG_ENTERFN( "CActiveCConnDlgIapPlugin::Cancel" );      
-
-    CActiveIAPListing::Cancel();
-
-    CLOG_WRITE( "Returned from CActiveIAPListing::Cancel" );
-
-    if( iDialog  && !( iDialog->GetOkToExit() ) )
-        {
-        CLOG_WRITEF( _L( "iDialog->GetOkToExit() : %b" ), iDialog->GetOkToExit() );
-        delete iDialog;
-        iDialog = NULL;
-        }
-
-    CLOG_LEAVEFN( "CActiveCConnDlgIapPlugin::Cancel" );      
-    }
-
-
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::DoCancel()
-// ---------------------------------------------------------
-// 
-void CActiveCConnDlgIapPlugin::DoCancel()
-    {
-    CLOG_ENTERFN( "CActiveCConnDlgIapPlugin::DoCancel " );  
-    
-    if( isDialogDeleting )
-        {
-        CLOG_WRITE( "isDialogDeleting" );
-        
-        delete iDialog;
-        iDialog = NULL;   
-        
-        isDialogDeleting = EFalse;         
-        }
-        
-    CLOG_LEAVEFN( "CActiveCConnDlgIapPlugin::DoCancel " );          
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::RunL()
-// ---------------------------------------------------------
-//     
-void CActiveCConnDlgIapPlugin::RunL()
-    {
-    CLOG_ENTERFN( "CActiveCConnDlgIapPlugin::RunL " );  
-    
-    CLOG_WRITEF( _L( "iStatus.Int() : %d" ), iStatus.Int() );
-    CLOG_WRITEF( _L( "&iStatus : %d" ), &iStatus );
-    
-    if( iStatus == KErrNone )
-        {
-        
-        if( iIAPs ) // if iIAPs has been created
-            {            
-            // merge arrays and sort
-            MergeArraysL( R_WLAN_SEARCH_FOR_NETWORKS );
-            
-            if ( iDialog )  // if dialog has been created
-                {
-                iDialog->RefreshDialogL( iActIAPs, ETrue );
-                }
-            else
-                {
-                TInt interval = 0;
-                if ( iIsWLANFeatureSupported )
-                    {                                    
-                    interval = GetRefreshInterval(); 
-                    CLOG_WRITEF( _L( "interval : %d" ),  interval );
-
-                    if ( iWaitDialog )
-                        {
-                        iWaitDialog->ProcessFinishedL();     
-                        delete iWaitDialog;
-                        iWaitDialog = NULL;    
-                        }
-                    }
-
-                iDialog = CIapDialog::NewL( iPlugin );
-                iDialog->PrepareLC( R_LIST_QUERY );
-                iDialog->RefreshDialogL( iActIAPs, EFalse );
-                iDialog->RunLD();
-
-                if ( iIsWLANFeatureSupported )
-                    {                                           
-                    if( interval )
-                        {
-                        StartTimerL( interval );
-                        }     
-                    }
-                }   // else
-            } // if iIAPs
-        else
-            {            
-            CreateArraysL( R_WLAN_SEARCH_FOR_NETWORKS, EFalse, 0 );
-            }            
-        }     
-    
-    CLOG_LEAVEFN( "CActiveCConnDlgIapPlugin::RunL " );      
-        
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::StartSearchIAPsL()
-// ---------------------------------------------------------
-//    
-void CActiveCConnDlgIapPlugin::StartSearchIAPsL()
-    {    
-    CActiveIAPListing::BaseStartSearchIAPsL( R_SEARCHING_WAIT_NOTE );
-    }
-   
- 
-// ---------------------------------------------------------
-// CActiveCConnDlgIapPlugin::GetRefreshInterval()
-// ---------------------------------------------------------
-//    
-TInt CActiveCConnDlgIapPlugin::GetRefreshInterval()
-    {
-    return CActiveIAPListing::GetRefreshInterval( KCRUidCConnDlg,
-                                                  KCConnDlgScanInterval );
-    }
-            
-   
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ActiveSelectConnectionPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,819 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of plugins (base & all derived).
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveSelectConnectionPlugin.h"
-#include "SelectConnectionDialog.h"
-#include "ConnectionDialogsLogger.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "sortsnaputils.h"
-#include "cdbcols.h"
-
-#include <featmgr.h>
-#include <StringLoader.h>
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-#include <AknIconUtils.h>
-#include <data_caging_path_literals.hrh>
-
-#include <cmdestinationext.h>
-#include <cmconnectionmethoddef.h>
-#include <cmpluginwlandef.h>
-
-#include <cmmanager.mbg>
-#include <CConnDlgPlugin.rsg>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat.h>
-#else
-#include <commsdat.h>
-#include <commsdat_partner.h>
-#endif
-
-#include <wlancontainer.h>
-#include <metadatabase.h>
-
-// CONSTANTS
-
-// Category for all panics in this module
-_LIT( KASCPCategory, "Select Connection Plugin" );
-
-LOCAL_D const TInt KIconsGranularity = 4;
-LOCAL_D const TInt KArrayGranularity = 4;
-LOCAL_D const TInt KMaxEntryLength = CommsDat::KMaxTextLength*2 + 20;
-/**
-* For iPeriodic Timer, 60 seconds
-*/
-LOCAL_C const TInt KTickDefaultInterval = 60000000;
-LOCAL_C const TInt KMicrosecondsToSecondsMultiplier = 1000000;
-
-// background scan automatic scanning value
-static const TUint KWlanBgScanIntervalAuto = 0xffffffff;
-
-using namespace CMManager;
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::CActiveSelectConnectionPlugin()
-// ---------------------------------------------------------
-//
-CActiveSelectConnectionPlugin::CActiveSelectConnectionPlugin( 
-                                                MEikSrvNotifierBase2* aPlugin,
-                                                const TUint32 aElementId,
-                                                TUint32 aBearerSet )
-: iBearerSet( aBearerSet ),
-  iReqBearerSet( aBearerSet ),
-  iElementId( aElementId ),
-  iPlugin( aPlugin ), 
-  iDialogConn( NULL ),
-  iIsWLANFeatureSupported( EFalse ),
-  iRefreshInterval( KTickDefaultInterval ),
-  iHighlightedItem( -1 ),
-  iDefaultDestId( 0 ),
-  iDefaultCMId( 0 )
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin* CActiveSelectConnectionPlugin::NewL()
-// ---------------------------------------------------------
-//
-CActiveSelectConnectionPlugin* CActiveSelectConnectionPlugin::NewL( 
-                                                MEikSrvNotifierBase2* aPlugin,
-                                                const TUint32 aElementId,
-                                                TUint32 aBearerSet )
-    {
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::NewL " );  
-    
-    CActiveSelectConnectionPlugin* self = new ( ELeave ) 
-                CActiveSelectConnectionPlugin( aPlugin, aElementId, 
-                                               aBearerSet );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::NewL " );      
-
-    return self;        
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::ConstructL()
-// ---------------------------------------------------------
-//
-void CActiveSelectConnectionPlugin::ConstructL()
-    {
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::ConstructL " );  
-
-    CActiveBase::ConstructL();
-    
-    FeatureManager::InitializeLibL();
-
-    iIsWLANFeatureSupported = FeatureManager::FeatureSupported( 
-                                                KFeatureIdProtocolWlan );
-
-    FeatureManager::UnInitializeLib();
-    
-    iBearerSet |= ECommDbBearerVirtual;    // To get also VPN APs
-
-#ifdef __WINS__
-    iBearerSet |= ECommDbBearerLAN;     // To add Ethernet AP
-#endif  // __WINS__
-
-    if ( iIsWLANFeatureSupported )
-        {
-        CLOG_WRITE( "WLAN Supported!" );        
-        iBearerSet |= ECommDbBearerWLAN; // To add WLan AP
-        iRefreshInterval = GetRefreshIntervalL();
-        }
-
-
-
-    iItems = new( ELeave ) CConnectionInfoArray();
-    iIcons = new( ELeave ) CAknIconArray( KIconsGranularity );
-
-    iCmManagerExt.OpenL();
-
-    TInt ret = iMPM.LaunchServer();
-    if ( ret != KErrAlreadyExists )
-        {
-        User::LeaveIfError( ret );
-        }
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::ConstructL " );  
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::~CActiveSelectConnectionPlugin()
-// ---------------------------------------------------------
-//    
-CActiveSelectConnectionPlugin::~CActiveSelectConnectionPlugin()
-    {
-    CLOG_ENTERFN( "~CActiveSelectConnectionPlugin" );
-    Cancel();
-    
-    if ( iItems )
-        {
-        iItems->ResetAndDestroy();
-        }
-    delete iItems;    
-    iItems = NULL;
-
-    iCmManagerExt.Close();
-    iMPM.Close();
-
-    CLOG_LEAVEFN( "~CActiveSelectConnectionPlugin" );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::Cancel()
-// ---------------------------------------------------------
-// 
-void CActiveSelectConnectionPlugin::Cancel()
-    {
-    StopTimer();
-    CActive::Cancel();
-
-    if( iDialogConn && !( iDialogConn->GetOkToExit() ) )
-        {
-        CLOG_WRITEF( _L( "iDialogConn->GetOkToExit() : %b" ), iDialogConn->GetOkToExit() );
-        delete iDialogConn;
-        iDialogConn = NULL;
-        }
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::DoCancel()
-// ---------------------------------------------------------
-// 
-void CActiveSelectConnectionPlugin::DoCancel()
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::RunL()
-// ---------------------------------------------------------
-//     
-void CActiveSelectConnectionPlugin::RunL()
-    {
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::RunL " );  
-    
-    if( iStatus == KErrNone )
-        {
-        BuildConnectionListL();
-        iDialogConn->RefreshDialogL( iItems, iIcons, ETrue, iHighlightedItem );
-        }     
-    
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::RunL " );      
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::ShowSelectConnectionL()
-// ---------------------------------------------------------
-//    
-void CActiveSelectConnectionPlugin::ShowSelectConnectionL()
-    {    
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::ShowSelectConnectionL" );
-    
-    BuildConnectionListL();
-
-    iDialogConn = CSelectConnectionDialog::NewL( iPlugin, iRefreshInterval,
-                                                 iBearerSet, 
-                                                 iIsWLANFeatureSupported, 
-                                                 iDefaultCMId );
-
-    iDialogConn->PrepareAndRunLD( iItems, iIcons, EFalse, iHighlightedItem );
-
-    if( iRefreshInterval )
-        {
-        StartTimerL( iRefreshInterval );
-        }     
-
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::ShowSelectConnectionL" );
-    }
- 
-  
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::BuildConnectionListL()
-// ---------------------------------------------------------
-//
-void CActiveSelectConnectionPlugin::BuildConnectionListL()
-    {
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::BuildConnectionListL " );  
-    
-    // iItems and iIcons are allocated at construction and deallocated at 
-    // destruction. Unless memory allocation has failed, they cannot be NULL.
-    __ASSERT_ALWAYS( iItems, User::Panic( KASCPCategory, KErrGeneral ) );
-    __ASSERT_ALWAYS( iIcons, User::Panic( KASCPCategory, KErrGeneral ) );
-    
-    iItems->ResetAndDestroy();
-    iIcons->ResetAndDestroy();
-
-    _LIT( KDriveZ, "z:" );  // ROM folder
-    // Name of the MBM file containing icons
-    _LIT( KManagerIconFilename, "cmmanager.mbm" );
-
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-    iconsFileName.Append( KManagerIconFilename );
-
-//    iIcons->AppendL( AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
-//                                KAknsIIDQgnIndiCbHotAdd,
-//                                iconsFileName, 
-//                                EMbmCmmanagerQgn_indi_cb_hot_add, 
-//                                EMbmCmmanagerQgn_indi_cb_hot_add_mask ) );
-
-    // Create color icon for marking the default connection
-    //
-    CFbsBitmap* bitmap = NULL;
-    CFbsBitmap* mask   = NULL;               
-    CGulIcon* icon     = CGulIcon::NewLC();
-    
-    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(), 
-                    KAknsIIDQgnIndiCbHotAdd, 
-                    KAknsIIDQsnIconColors, EAknsCIQsnIconColorsCG13, 
-                    bitmap, 
-                    mask, 
-                    iconsFileName,
-                    EMbmCmmanagerQgn_indi_cb_hot_add, 
-                    EMbmCmmanagerQgn_indi_cb_hot_add_mask,
-                    KRgbBlack );
-
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );    
-    iIcons->AppendL( icon );
-                
-    CleanupStack::Pop( icon ); 
-
-    TCmDefConnValue defaultConnSetting;
-
-    iCmManagerExt.ReadDefConnL( defaultConnSetting );
-    if ( defaultConnSetting.iType == ECmDefConnDestination )
-        {
-        iDefaultDestId = defaultConnSetting.iId;
-        }
-    else if ( defaultConnSetting.iType == ECmDefConnConnectionMethod )
-        {
-        iDefaultCMId = defaultConnSetting.iId;
-        }
-
-    if ( iIsWLANFeatureSupported && (iReqBearerSet & ECommDbBearerWLAN) )
-        {
-        AddSearchForWLanItemL();
-        }
-
-    AddDestinationItemsL();
-
-    CLOG_WRITEF( _L( "iItems count: %d" ), iItems->Count() );
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::BuildConnectionListL " );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::AddSearchForWLanItemL
-// ---------------------------------------------------------
-//    
-void CActiveSelectConnectionPlugin::AddSearchForWLanItemL()
-    {
-    TUint32 easyWlanId = iCmManagerExt.EasyWlanIdL();
-    if ( easyWlanId )
-        {
-        CLOG_WRITEF( _L( "easyWlanId %d" ), easyWlanId );
-
-        RCmConnectionMethodExt cmConnMethodExt;
-        TRAPD( err, cmConnMethodExt = iCmManagerExt.ConnectionMethodL( 
-                                                                easyWlanId ) );
-        if ( err == KErrNone )
-            {
-            CleanupClosePushL( cmConnMethodExt );
-
-            CGulIcon* wlanIcon = ( CGulIcon* )
-                            cmConnMethodExt.GetIntAttributeL( ECmBearerIcon );
-            CleanupStack::PopAndDestroy();  // cmConnMethodExt
-
-            if ( wlanIcon )
-                {
-                CleanupStack::PushL( wlanIcon );
-                iIcons->AppendL( wlanIcon );
-
-                // icon array took over ownership
-                CleanupStack::Pop( wlanIcon );
-
-                // +1 because it "Zero terminates" the string
-                TBuf<CommsDat::KMaxTextLength+1> nameSearch;
-                _LIT( KIconIdNameEmpty, "%d\t%s\t" );
-
-                HBufC *msg = StringLoader::LoadL( R_WLAN_EASY_WLAN );
-                nameSearch = *msg;
-                nameSearch.ZeroTerminate();
-                delete msg;
-
-                TBuf<KMaxEntryLength> temp;
-                temp.FillZ( KMaxEntryLength );
-                temp.Format( KIconIdNameEmpty, iIcons->Count()-1,
-                             nameSearch.Ptr() );
-
-                CConnectionInfo* conIn = CConnectionInfo::NewL( easyWlanId, 
-                                                    0, temp );
-                CleanupStack::PushL( conIn );
-                iItems->AppendL( conIn );
-                CleanupStack::Pop( conIn );
-                iHighlightedItem = 0;
-                }
-            }
-        }
-    }
-        
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::AddDestinationItemsL
-// ---------------------------------------------------------
-//    
-void CActiveSelectConnectionPlugin::AddDestinationItemsL()
-    {
- /*   TInt errConnect = iMPM.Connect();
-    CLOG_WRITEF( _L( "errConnect = %d" ), errConnect );
-    if ( errConnect == KErrNone )
-        {*/
-        TSortSnapUtils sortSnapUtils( iMPM );
-        RArray<TUint32> destIdArray( KArrayGranularity );
-        TRAPD( err, sortSnapUtils.GetDestIdArrayL( iCmManagerExt, destIdArray ) );
-        //TRAPD( err, iCmManagerExt.AllDestinationsL( destIdArray ) );
-        // Append the destinations to the list
-        CLOG_WRITEF( _L( "GetDestIdArrayL returned with  %d" ), err );
-    if ( err == KErrNone )
-            {
-            CleanupClosePushL( destIdArray );
-
-            CLOG_WRITEF( _L( "destIdArray.Count() =  %d" ), destIdArray.Count() );
-            for ( TInt i = 0; i < destIdArray.Count(); i++ )
-                {
-                RCmDestinationExt cmDestExt = iCmManagerExt.DestinationL( 
-                                                            destIdArray[i] );
-                CleanupClosePushL( cmDestExt );
-                if ( /*cmDestExt.ElementId() != iElementId &&*/ 
-                     !cmDestExt.MetadataL( ESnapMetadataHiddenAgent ) )
-                    {
-                    CLOG_WRITEF( _L( "Destination id %d, Total number of methods %d" ), 
-                                destIdArray[i], cmDestExt.ConnectionMethodCount() );
-
-#ifdef _DEBUG
-                    for ( TInt j = 0; 
-                            j < cmDestExt.ConnectionMethodCount(); j++ )
-                        {
-                        RCmConnectionMethodExt cmConnMethodExt;
-                        TRAP( err, cmConnMethodExt = 
-                                            cmDestExt.ConnectionMethodL( j ) );
-                        if ( err == KErrNone )
-                            {
-                            CleanupClosePushL( cmConnMethodExt );
-                            HBufC* bufMethod = 
-                                cmConnMethodExt.GetStringAttributeL( ECmName );
-                            CleanupStack::PushL( bufMethod );
-                            TBuf<CommsDat::KMaxTextLength+1> nameMethod;
-                            nameMethod = *bufMethod;
-                            nameMethod.ZeroTerminate();
-
-                            /*CLOG_WRITEF( _L( "ConnMethod id %d, Method name %s" ), 
-                                cmConnMethodExt.GetIntAttributeL( ECmIapId ),
-                                nameMethod.Ptr() );*/
-
-                            CleanupStack::PopAndDestroy( bufMethod );
-                            CleanupStack::PopAndDestroy();  // cmConnMethodExt
-                            }
-                        }
-#endif
-
-                        AddDestinationItemL( cmDestExt, destIdArray[i], i == 0,
-                                             destIdArray[i] == iDefaultDestId,
-                                             sortSnapUtils );
-                    }
-                CleanupStack::PopAndDestroy();  // cmDestExt
-                }
-            CleanupStack::PopAndDestroy(); // destIdArray
-            }
-        AddUncategorizedItemL( sortSnapUtils );
-/*        }*/
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::AddDestinationItemL
-// ---------------------------------------------------------
-//    
-void CActiveSelectConnectionPlugin::AddDestinationItemL( 
-                                                RCmDestinationExt aDestination,
-                                                TUint32 aDestId, 
-                                                TBool aFirstItem, 
-                                                TBool aDefaultDest,
-                                                TSortSnapUtils& aSortSnapUtils )
-    {
-    TMpmSnapBuffer list;
-
-    TInt errMPM = aSortSnapUtils.GetSortSnapData( aDestId, list );
-    CLOG_WRITEF( _L( "errMPM = %d. list.Count() = %d" ), errMPM, list.Count() );
-
-    if ( errMPM == KErrNone )
-        {
-        for ( TInt numCM = 0; numCM < list.Count(); numCM++ )
-            {
-            RCmConnectionMethodExt cmConnMethodExt;
-            TRAPD( err, cmConnMethodExt = iCmManagerExt.ConnectionMethodL(
-                                                        list.iIapId[numCM] ) );
-
-            CLOG_WRITEF( _L( "Trapped err = %d" ), err );
-
-            if ( err == KErrNone )
-                {
-                CleanupClosePushL( cmConnMethodExt );
-                if ( iBearerSet & cmConnMethodExt.GetIntAttributeL( 
-                                                    ECmCommsDBBearerType ) )
-                    {
-                    HBufC* bufBest = cmConnMethodExt.GetStringAttributeL(
-                                                                    ECmName );
-
-                    CleanupStack::PopAndDestroy();      // cmConnMethodExt
-                    CleanupStack::PushL( bufBest );
-
-                    _LIT( KIconIdNameBest, "%d\t%s\t\"%s\"" );
-                    _LIT( KIconIdNameBestDefaultConn, "%d\t%s\t\"%s\"\t0" );
-
-                    TBuf<CommsDat::KMaxTextLength+1> nameBest;
-                    nameBest = *bufBest;
-                    nameBest.ZeroTerminate();
-                    CleanupStack::PopAndDestroy( bufBest );
-
-                    TBuf<CommsDat::KMaxTextLength+1> nameDest;
-                    HBufC* name = aDestination.NameLC();
-                    nameDest = *name;
-                    nameDest.ZeroTerminate();
-                    CleanupStack::PopAndDestroy( name );
-
-                    CGulIcon* destIcon = aDestination.IconL();
-                    if ( destIcon )
-                        {
-                        CleanupStack::PushL( destIcon );
-                        iIcons->AppendL( destIcon );
-
-                        // icon array took over ownership
-                        CleanupStack::Pop( destIcon );
-                    
-                        TBuf<KMaxEntryLength> temp;
-                        temp.FillZ( KMaxEntryLength );
-                        if ( aDefaultDest )
-                            {
-                            temp.Format( KIconIdNameBestDefaultConn, 
-                                         iIcons->Count()-1,
-                                         nameDest.Ptr(), nameBest.Ptr() );
-                            }
-                        else
-                            {
-                            temp.Format( KIconIdNameBest, 
-                                         iIcons->Count()-1,
-                                         nameDest.Ptr(), nameBest.Ptr() );
-                            }
-
-                        CConnectionInfo* conIn = 
-                            CConnectionInfo::NewL( 0, aDestId, temp );
-                        CleanupStack::PushL( conIn );
-                        iItems->AppendL( conIn );
-                        CleanupStack::Pop( conIn );
-
-                        if ( aFirstItem || 
-                             aDestination.MetadataL( ESnapMetadataHighlight ) )
-                            {   // It sets the highlight to the
-                                // first Destination (Internet),
-                                // but if it finds another with
-                                // the bit set, then it changes
-                            iHighlightedItem = iItems->Count()-1;
-                            }
-                        }
-
-                    numCM = list.Count();   // break;
-                    }
-				else
-					{
-                    CleanupStack::PopAndDestroy();  // cmConnMethodExt
-					}
-                }
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::AddUncategorizedItemL
-// ---------------------------------------------------------
-//    
-void CActiveSelectConnectionPlugin::AddUncategorizedItemL(TSortSnapUtils& aSortSnapUtils )
-    {
-    TMpmSnapBuffer list;
-
-    TInt errMPM = aSortSnapUtils.GetSortSnapData( 0, list );
-    CLOG_WRITEF( _L( "Uncategorized: errMPM = %d. list.Count() = %d" ), errMPM, list.Count() );
-
-    if ( errMPM == KErrNone )
-        {
-        TUint numOfUncatToBeListed = 0;
-
-        for ( TInt numCM = 0; numCM < list.Count(); numCM++ )
-            {
-            RCmConnectionMethodExt cmConnMethodExt;
-            TRAPD( err, cmConnMethodExt = iCmManagerExt.ConnectionMethodL(
-                                                        list.iIapId[numCM] ) );
-            if ( err == KErrNone )
-                {
-                CleanupClosePushL( cmConnMethodExt );
-                if ( iBearerSet & cmConnMethodExt.GetIntAttributeL( 
-                                                    ECmCommsDBBearerType ) )
-                    {
-                    numOfUncatToBeListed++;
-                    }
-                CleanupStack::PopAndDestroy();  // cmConnMethodExt
-                }
-            }
-
-        if ( ( iBearerSet & ECommDbBearerWLAN ) && iIsWLANFeatureSupported )
-            {
-            numOfUncatToBeListed += CountAdhocWlanIapsL();	
-            }
-            
-        if ( numOfUncatToBeListed > 0 )
-            {
-            CGulIcon* uncatIcon = 
-                            ( CGulIcon* )iCmManagerExt.UncategorizedIconL();
-            if ( uncatIcon )
-                {
-                CleanupStack::PushL( uncatIcon );
-                iIcons->AppendL( uncatIcon );
-                CleanupStack::Pop( uncatIcon );  // icon array took over ownership
-
-                // +1 because it "Zero terminates" the string
-                TBuf<CommsDat::KMaxTextLength+1> nameUncat;
-                TBuf<CommsDat::KMaxTextLength+1> numUncat;
-
-                HBufC *bufUncat = StringLoader::LoadL( R_LIST_UNCATEGORIZED );
-                nameUncat = *bufUncat;
-                nameUncat.ZeroTerminate();
-                delete bufUncat;
-
-                HBufC *bufNumOfUncat;
-                if ( numOfUncatToBeListed == 1 )
-                    {
-                    bufNumOfUncat = StringLoader::LoadL( R_CONN_METHODS_ONE );
-                    }
-                else
-                    {
-                    bufNumOfUncat = StringLoader::LoadL( R_CONN_METHODS_MANY, 
-                                                        numOfUncatToBeListed );
-                    }
-
-                numUncat = *bufNumOfUncat;
-                numUncat.ZeroTerminate();
-                delete bufNumOfUncat;
-
-                TBuf<KMaxEntryLength> temp;
-                _LIT( KIconIdNameNumber, "%d\t%s\t%s" );
-
-                temp.FillZ( KMaxEntryLength );
-                temp.Format( KIconIdNameNumber, iIcons->Count()-1, nameUncat.Ptr(),
-                             numUncat.Ptr() );
-
-                CConnectionInfo* conIn = CConnectionInfo::NewL( 0, 0, temp );
-                CleanupStack::PushL( conIn );
-                iItems->AppendL( conIn );        
-                CleanupStack::Pop( conIn );
-                if ( iHighlightedItem < 0 )
-                    {
-                    iHighlightedItem = 0;
-                    }
-                }
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::GetElementIDL
-// ---------------------------------------------------------
-//    
-TUint32 CActiveSelectConnectionPlugin::GetElementIDL( TUint32 aIAPId,
-                                                      TUint32 aDestinationId )
-    {
-    TUint32 retval = 0;
-    TInt err;
-
-    if ( aDestinationId )
-        {
-        RCmDestinationExt cmDestExt;
-        TRAP( err, cmDestExt = iCmManagerExt.DestinationL( aDestinationId ) );
-        if ( err == KErrNone )
-            {
-            retval = cmDestExt.ElementId();
-            cmDestExt.Close();
-            }
-        }
-    else if ( aIAPId )
-        {
-        RCmConnectionMethodExt cmConnMethodExt;
-        TRAP( err, cmConnMethodExt = iCmManagerExt.ConnectionMethodL( 
-                                                                    aIAPId ) );
-        if ( err == KErrNone )
-            {
-            CleanupClosePushL( cmConnMethodExt );
-            retval = cmConnMethodExt.GetIntAttributeL( ECmElementID );
-            CleanupStack::PopAndDestroy();  // cmConnMethodExt
-            }
-        }
-
-    return retval;
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::GetRefreshIntervalL()
-// ---------------------------------------------------------
-//    
-TInt CActiveSelectConnectionPlugin::GetRefreshIntervalL( )
-    {
-    CLOG_ENTERFN( "CActiveSelectConnectionPlugin::GetRefreshInterval" );  
-
-    TInt variant( KTickDefaultInterval );  
-
-
-    CMDBSession* session = CMDBSession::NewL(KCDLatestVersion);
-    CleanupStack::PushL( session );
-    
-  	//session->OpenTransactionL();
-    TMDBElementId tableId = 0;
-    
-    tableId = CCDWlanDeviceSettingsRecord::TableIdL( *session);
-        
-    CCDWlanDeviceSettingsRecord* record = new(ELeave)
-    		CCDWlanDeviceSettingsRecord(tableId); 		
-    CleanupStack::PushL(record);
-    
-    record->iWlanDeviceSettingsType = KWlanUserSettings;
-    
-    if(record->FindL( *session ))
-    	{
-    	record->LoadL( *session );
-        
-    	// In case iBgScanInterval is -1 (= automatic) then just use 
-    	// KTickDefaultInterval as refresh interval
-        if ( record->iBgScanInterval != KWlanBgScanIntervalAuto
-             && record->iBgScanInterval > 0 )
-            {
-            variant = record->iBgScanInterval;
-            variant = variant * KMicrosecondsToSecondsMultiplier;    
-            }
-    	}
-    CleanupStack::PopAndDestroy( record ); 
-    
-    //session->CommitTransactionL();
-
-    CleanupStack::PopAndDestroy( session ); 
-    
-    TUint32 variantToLog = variant;
-
-    CLOG_WRITEF( _L( "Refresh interval (microseconds) : %d" ), variantToLog );
-    
-    CLOG_LEAVEFN( "CActiveSelectConnectionPlugin::GetRefreshInterval" );
-    
-    return variant;            
-    }
-    
-// ---------------------------------------------------------
-// CActiveSelectConnectionPlugin::CountAdhocWlanIapsL()
-// ---------------------------------------------------------
-//
-TInt CActiveSelectConnectionPlugin::CountAdhocWlanIapsL()
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::CountAdhocWlanIapsL " );
-    
-    // Creating a session with the latest version
-    CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() );
-    db->SetAttributeMask( ECDProtectedWrite );
-    
-    // Create wlan service record set (RArray (or RPtrArray?))
-    CMDBRecordSet<CCDWlanServiceRecord>* wlanSet =
-        new (ELeave)CMDBRecordSet<CCDWlanServiceRecord>(   CCDWlanServiceRecord::TableIdL( *db )   );
-    CleanupStack::PushL( wlanSet ); 
-    
-    // Create wlan service record
-    CCDWlanServiceRecord* wlanRecord =
-        new (ELeave)CCDWlanServiceRecord(   CCDWlanServiceRecord::TableIdL( *db )   );
-    
-    CleanupStack::PushL( wlanRecord );
-    
-    // Set ConnectionMode field in wlan service record (see wlancontainer.h)
-    // This works with EWlanOperatingModeAdhoc, fails with EWlanConnectionModeAdhoc
-    wlanRecord->iWlanConnMode.SetL( EWlanOperatingModeAdhoc );
-    
-    // Append wlan service record to wlan service record set (currently empty)
-    wlanSet->iRecords.AppendL( wlanRecord );
-    CleanupStack::Pop( wlanRecord ); // ownership moved to RPointerArray
-    
-    TInt wlanRecordCount( 0 );
-    
-    // Find matcing wlan service records
-    if( wlanSet->FindL( *db ) )
-        {
-        wlanRecordCount = wlanSet->iRecords.Count();
-        
-        for ( TInt i = 0; i < wlanRecordCount; i++ )
-            {
-            // Load the current record again to be sure all fields are up to date
-            wlanRecord->SetElementId( wlanSet->iRecords[i]->ElementId() );
-    
-            // Load will only look at ElementId and updates the rest of the fields
-            wlanRecord->LoadL( *db );
-              
-            if ( wlanRecord->iWLanSSID.IsNull() )
-                {
-                // Count active Easy WLAN using adhoc out
-                wlanRecordCount--;
-                break; 
-                }    
-            }
-        
-        CLOG_WRITEF( _L("wlanSet record count = %d"), wlanRecordCount );
-        }
-    else
-        {
-        CLOG_WRITEF( _L("no matcing wlan records found." ));
-        }
-        
-    CleanupStack::PopAndDestroy( wlanSet );
-    CleanupStack::PopAndDestroy( db );
-    
-    CLOG_LEAVEFN( "CActiveSelectExplicit::CountAdhocWlanIapsL" );
-    
-    return ( wlanRecordCount );
-    }
-    
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ActiveSelectExplicit.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,519 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of plugins (base & all derived).
-*
-*/
-
-
-// INCLUDE FILES
-#include "ActiveSelectExplicit.h"
-#include "SelectExplicitDialog.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "CConnDlgPrivateCRKeys.h"
-#include "ConnectionDialogsLogger.h"
-#include "sortsnaputils.h"
-
-#include <commdb.h>
-#include <StringLoader.h>
-#include <wlanmgmtcommon.h>
-#include <cmdestinationext.h>
-#include <cmpluginwlandef.h>
-#ifndef __WINS__
-#include <wlanmgmtclient.h>
-#endif
-#include <AknWaitDialog.h>
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-
-#include <CConnDlgPlugin.rsg>
-#include <data_caging_path_literals.hrh>
-#include <cmmanager.mbg>
-#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include <commsdat.h>
-#else
-#include <commsdat.h>
-#include <commsdat_partner.h>
-#endif
-#include <wlancontainer.h>
-
-
-// CONSTANTS
-
-LOCAL_D const TInt KMaxEntryLength = CommsDat::KMaxTextLength*2 + 20;
-LOCAL_D const TInt KIconsGranularity = 4;
-
-using namespace CMManager;
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::CActiveSelectExplicit()
-// ---------------------------------------------------------
-//
-CActiveSelectExplicit::CActiveSelectExplicit( 
-                                        CSelectConnectionDialog* aCallerDialog,
-                                        TUint aDestId, 
-                                        TInt aRefreshInterval,
-                                        TUint32 aBearerSet, 
-                                        TBool aIsWLANFeatureSupported, 
-                                        TUint aDefaultCMId )
-: iCallerDialog( aCallerDialog ),
-  iDestId( aDestId ),
-//  isDialogDeleting( EFalse ),
-  iRefreshInterval( aRefreshInterval ),
-  iBearerSet( aBearerSet ),
-  iIsWLANFeatureSupported( aIsWLANFeatureSupported ), 
-  iDefaultCMId( aDefaultCMId )
-    {
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectExplicit* CActiveSelectExplicit::NewL()
-// ---------------------------------------------------------
-//
-CActiveSelectExplicit* CActiveSelectExplicit::NewL( 
-                                        CSelectConnectionDialog* aCallerDialog,
-                                        TUint aDestId, 
-                                        TInt aRefreshInterval,
-                                        TUint32 aBearerSet, 
-                                        TBool aIsWLANFeatureSupported, 
-                                        TUint aDefaultCMId )
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::NewL " );  
-    
-    CActiveSelectExplicit* self = new ( ELeave ) CActiveSelectExplicit(
-                                    aCallerDialog, aDestId, aRefreshInterval,
-                                    aBearerSet, aIsWLANFeatureSupported, 
-                                    aDefaultCMId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CLOG_LEAVEFN( "CActiveSelectExplicit::NewL " );      
-
-    return self;        
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::ConstructL()
-// ---------------------------------------------------------
-//
-void CActiveSelectExplicit::ConstructL()
-    {
-    CActiveBase::ConstructL();
-
-    iItems = new( ELeave ) CConnectionInfoArray();
-    iIcons = new( ELeave ) CAknIconArray( KIconsGranularity );
-
-    iCmManagerExt.OpenL();
-    }
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::~CActiveSelectExplicit()
-// ---------------------------------------------------------
-//    
-CActiveSelectExplicit::~CActiveSelectExplicit()
-    {
-    Cancel();
-
-    if ( iItems )
-        {
-        iItems->ResetAndDestroy();
-        }
-    delete iItems;    
-    iItems = NULL;
-
-    iCmManagerExt.Close();
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::Cancel()
-// ---------------------------------------------------------
-// 
-void CActiveSelectExplicit::Cancel()
-    {
-    StopTimer();
-    CActive::Cancel();
-
-    if( iDialog  && !( iDialog->GetOkToExit() ) )
-        {
-        CLOG_WRITEF( _L( "iDialog->GetOkToExit() : %b" ), iDialog->GetOkToExit() );
-        delete iDialog;
-        iDialog = NULL;
-        }
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::DoCancel()
-// ---------------------------------------------------------
-// 
-void CActiveSelectExplicit::DoCancel()
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::DoCancel " );  
-    
-/*    if( isDialogDeleting )
-        {
-        CLOG_WRITE( "isDialogDeleting" );
-        
-        delete iDialog;
-        iDialog = NULL;   
-        
-        isDialogDeleting = EFalse;         
-        }
-  */      
-    CLOG_LEAVEFN( "CActiveSelectExplicit::DoCancel " );          
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectExplicit::RunL()
-// ---------------------------------------------------------
-//     
-void CActiveSelectExplicit::RunL()
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::RunL " );  
-    
-    if( iStatus == KErrNone )
-        {
-        BuildConnectionListL();
-        iDialog->RefreshDialogL( iItems, iIcons, ETrue );
-        }     
-    
-    CLOG_LEAVEFN( "CActiveSelectExplicit::RunL " );      
-        
-    }
-
-    
-// ---------------------------------------------------------
-// CActiveSelectExplicit::StartSearchIAPsL()
-// ---------------------------------------------------------
-//    
-void CActiveSelectExplicit::ShowSelectExplicitL()
-    {    
-    BuildConnectionListL();
-
-    iDialog = CSelectExplicitDialog::NewL( iCallerDialog );
-    iDialog->PrepareAndRunLD( iItems, iIcons, EFalse );
-
-    if( iRefreshInterval )
-        {
-        StartTimerL( iRefreshInterval );
-        }     
-    }
-   
- 
-// ---------------------------------------------------------
-// CActiveSelectExplicit::BuildConnectionListL()
-// ---------------------------------------------------------
-//
-void CActiveSelectExplicit::BuildConnectionListL()
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::BuildConnectionListL " );  
-
-    if ( iItems )
-        {
-        iItems->ResetAndDestroy();
-        }
-
-    if ( iIcons )
-        {
-        iIcons->ResetAndDestroy();
-        }
-
-    if ( iDefaultCMId != 0 )  
-        {   // It automatically means also that the feature is supported
-        _LIT( KDriveZ, "z:" );  // ROM folder
-        // Name of the MBM file containing icons
-        _LIT( KManagerIconFilename, "cmmanager.mbm" );
-    
-        TFileName iconsFileName;
-
-        iconsFileName.Append( KDriveZ );
-        iconsFileName.Append( KDC_APP_BITMAP_DIR );
-        iconsFileName.Append( KManagerIconFilename );
-
-        iIcons->AppendL( AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
-                                    KAknsIIDQgnIndiCbHotAdd,
-                                    iconsFileName, 
-                                    EMbmCmmanagerQgn_indi_cb_hot_add, 
-                                    EMbmCmmanagerQgn_indi_cb_hot_add_mask ) );
-        }
-
-    TBool easyWlanIsInDb = EFalse;
-
-#ifdef _DEBUG
-    if ( iDestId )
-        {   // Real destination, not for uncategorized
-        RCmDestinationExt cmDestExt = iCmManagerExt.DestinationL( iDestId );
-        CleanupClosePushL( cmDestExt );
-        CLOG_WRITEF( _L( "Destination id %d, Total number of methods %d" ),
-                    iDestId, cmDestExt.ConnectionMethodCount() );
-
-        for ( TInt j = 0; j < cmDestExt.ConnectionMethodCount(); j++ )
-            {
-            RCmConnectionMethodExt cmConnMethodExt;
-            TRAPD( err, cmConnMethodExt = cmDestExt.ConnectionMethodL( j ) );
-            if ( err == KErrNone )
-                {
-                CleanupClosePushL( cmConnMethodExt );
-                HBufC* bufMethod = cmConnMethodExt.GetStringAttributeL(
-                                                                    ECmName );
-                CleanupStack::PushL( bufMethod );
-                TBuf<CommsDat::KMaxTextLength+1> nameMethod;
-                nameMethod = *bufMethod;
-                nameMethod.ZeroTerminate();
-
-                CLOG_WRITEF( _L( "ConnMethod id %d, Method name %s" ), 
-                    cmConnMethodExt.GetIntAttributeL( ECmIapId ), nameMethod.Ptr() );
-
-                CleanupStack::PopAndDestroy( 2 ); // bufMethod, cmConnMethodExt
-                }
-            }
-        CleanupStack::PopAndDestroy();  // cmDestExt
-        }
-#endif
-        TSortSnapUtils sortSnapUtils( iMPM );
-        TMpmSnapBuffer snapBuffer;
-        TInt err = sortSnapUtils.GetSortSnapData( iDestId, snapBuffer );
-        CLOG_WRITEF( _L( "GetSortSNAPDataL returned = %d. list.Count() = %d" ), err, snapBuffer.Count() );
-
-        if ( err == KErrNone )
-            {
-            RCmConnectionMethodExt cmConnMethodExt;
-            CleanupClosePushL( cmConnMethodExt );
-            for ( TInt numCM = 0; numCM < snapBuffer.Count(); numCM++ )
-                {
-                AddConnectionMethodItemL( snapBuffer.iIapId[numCM], 
-                                          iDestId == 0,
-                                          easyWlanIsInDb, 
-                                          snapBuffer.iIapId[numCM] == iDefaultCMId );
-                }
-            CleanupStack::PopAndDestroy();  // cmConnMethodExt
-            }   
-
-    // Add any ad-hoc WLAN iaps to the list
-    if ( ( iBearerSet & ECommDbBearerWLAN ) && ( iDestId == 0 ) && iIsWLANFeatureSupported )
-        {
-        AddAdhocWlanIapsL();	
-        }
-
-    CLOG_LEAVEFN( "CActiveSelectExplicit::BuildConnectionListL " );
-    }
-
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::AddConnectionMethodItemL()
-// ---------------------------------------------------------
-//
-void CActiveSelectExplicit::AddConnectionMethodItemL( TUint32 aId,
-                                                TBool aCheckForEasyWlan, 
-                                                TBool& aEasyWlanIsInDb, 
-                                                TBool aDefaultCM )
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::AddConnectionMethodItemL" );  
-
-    CConnectionInfo* conIn;
-
-    RCmConnectionMethodExt cmConnMethodExt;
-    CLOG_WRITEF( _L( "Uncat dest id %d" ), aId );
-
-    TRAPD( err, cmConnMethodExt = iCmManagerExt.ConnectionMethodL( aId ) );
-    CLOG_WRITEF( _L( "err %d" ), err );
-
-    if ( err == KErrNone )
-        {
-        CleanupClosePushL( cmConnMethodExt );
-
-        TUint32 bearer = cmConnMethodExt.GetIntAttributeL( 
-                                                        ECmCommsDBBearerType );
-        CLOG_WRITEF( _L( "bearer %d" ), bearer );
-
-        if ( bearer & iBearerSet )
-            {
-            CLOG_WRITE( "To be listed!" );
-
-            TBool isCMEasyWlan = EFalse;
-
-            HBufC* bufName = cmConnMethodExt.GetStringAttributeL(
-                                                                ECmName );
-
-            TBuf<CommsDat::KMaxTextLength+1> nameCM;
-            nameCM = *bufName;
-            nameCM.ZeroTerminate();
-            delete bufName;
-
-            CLOG_WRITEF( _L( "Method name %s. Bearer = %d" ), nameCM.Ptr(), bearer );
-
-            if ( aCheckForEasyWlan && bearer == KCommDbBearerWLAN && 
-                 iIsWLANFeatureSupported )
-                {
-                if ( !aEasyWlanIsInDb )
-                    {
-                    HBufC* bufSSID = cmConnMethodExt.GetStringAttributeL( 
-                                                                EWlanSSID );
-                    if ( !bufSSID || bufSSID->Des().Length() == 0 )
-                        {
-                        isCMEasyWlan = ETrue;
-                        aEasyWlanIsInDb = ETrue;
-                        }
-                    delete bufSSID;
-                    }
-                }
-
-            if ( !isCMEasyWlan )
-                {
-                CGulIcon* iconCM = ( CGulIcon* )
-                                    cmConnMethodExt.GetIntAttributeL(
-                                                            ECmBearerIcon );
-                if ( iconCM )
-                    {
-                    CLOG_WRITEF( _L( "iconCM found" ) );
-                    CleanupStack::PushL( iconCM );
-                    iIcons->AppendL( iconCM );
-
-                    // icon array took over ownership
-                    CleanupStack::Pop( iconCM );
-                    }
-                else
-                    {
-                    CLOG_WRITEF( _L( "iconCM not found" ) );
-                    }
-
-                TBuf<KMaxEntryLength> temp;
-                _LIT( KIconIdName, "%d\t%s" );
-                _LIT( KIconIdNameDefaultConn, "%d\t%s\t0" );
-
-                if ( aDefaultCM )
-                    {
-                    temp.Format( KIconIdNameDefaultConn, iIcons->Count()-1,
-                                 nameCM.Ptr() );
-                    }
-                else
-                    {
-                    temp.Format( KIconIdName, iIcons->Count()-1, 
-                                 nameCM.Ptr() );
-                    }
-
-                conIn = CConnectionInfo::NewL( aId, 0, temp );
-                CleanupStack::PushL( conIn );
-                iItems->AppendL( conIn );
-                CleanupStack::Pop( conIn );
-                }
-            }
-        CleanupStack::PopAndDestroy();  // cmConnMethodExt
-        }
-
-    CLOG_LEAVEFN( "CActiveSelectExplicit::AddConnectionMethodItemL" );
-    }
-
-// ---------------------------------------------------------
-// CActiveSelectExplicit::AddAdhocWlanIapsL()
-// ---------------------------------------------------------
-//
-void CActiveSelectExplicit::AddAdhocWlanIapsL()
-    {
-    CLOG_ENTERFN( "CActiveSelectExplicit::AddAdhocWlanIapsL " );
-    
-    // Creating a session with the latest version
-    CMDBSession* db = CMDBSession::NewLC( CMDBSession::LatestVersion() );
-    db->SetAttributeMask( ECDProtectedWrite );
-    
-    // Create wlan service record set (RArray (or RPtrArray?))
-    CMDBRecordSet<CCDWlanServiceRecord>* wlanSet =
-        new (ELeave)CMDBRecordSet<CCDWlanServiceRecord>(   CCDWlanServiceRecord::TableIdL( *db )   );
-    CleanupStack::PushL( wlanSet ); 
-    
-    // Create wlan service record
-    CCDWlanServiceRecord* wlanRecord =
-        new (ELeave)CCDWlanServiceRecord(   CCDWlanServiceRecord::TableIdL( *db )   );
-    
-    CleanupStack::PushL( wlanRecord );
-    
-    // Set ConnectionMode field in wlan service record (see wlancontainer.h)
-    // This works with EWlanOperatingModeAdhoc, fails with EWlanConnectionModeAdhoc
-    wlanRecord->iWlanConnMode.SetL( EWlanOperatingModeAdhoc );
-    
-    // Append wlan service record to wlan service record set (currently empty)
-    wlanSet->iRecords.AppendL( wlanRecord );
-    CleanupStack::Pop( wlanRecord ); // ownership moved to RPointerArray
-    
-    // Find matcing wlan service records
-    if( wlanSet->FindL( *db ) )
-        {
-        TInt wlanRecordCount( wlanSet->iRecords.Count() );
-        CLOG_WRITEF( _L("wlanSet record count = %d"), wlanRecordCount );
-        
-        TBool easyWlanIsInDb = EFalse;
-        
-        // loop for each record found
-        for ( TInt i = 0; i < wlanRecordCount; i++ )
-            {
-            // Seems we need to specifically load the current record again to be sure all fields are up to date
-            wlanRecord->SetElementId( wlanSet->iRecords[i]->ElementId() );
-            // Load will only look at ElementId and updates the rest of the fields
-            wlanRecord->LoadL( *db );
-            
-            if ( !( wlanRecord->iWLanSSID.IsNull() ) )
-                {
-                // Don't include Easy WLAN
-                // lets print some stuff to log            
-                CLOG_WRITEF( _L("New ad-hoc WLAN IAP:" ));
-                CLOG_WRITEF( _L("  iWlanServiceId = %d"), static_cast<TUint>( wlanRecord->iWlanServiceId ) );
-                CLOG_WRITEF( _L("  iWlanConnMode  = %d"), static_cast<TUint>( wlanRecord->iWlanConnMode ) );
-                CLOG_WRITEF( _L("  iWLanSSID      = %S"), &(static_cast<TDesC>( wlanRecord->iWLanSSID ) ) );
-            
-                // Create an iap record
-                CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*> ( 
-                    CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
-                CleanupStack::PushL( iapRecord );
-            
-                iapRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
-                // Set the service field to the same value as in the wlan service record we are currently looking
-                iapRecord->iService = wlanRecord->iWlanServiceId;
-                // Find the matching iap record
-                if( iapRecord->FindL( *db ) )
-                    {
-                    TUint iapId( 0 );
-                
-                    // read the iap id
-                    iapId = iapRecord->RecordId();
-                    CLOG_WRITEF( _L("  iapId          = %d"), iapId );
-                
-                    AddConnectionMethodItemL( iapId, 
-                                              iDestId == 0,
-                                              easyWlanIsInDb, 
-                                              iapId == iDefaultCMId );
-                    }
-                CleanupStack::PopAndDestroy( iapRecord );
-                }
-            }
-        }
-    else
-        {
-        CLOG_WRITEF( _L("no matcing wlan records found." ));
-        }
-        
-    CleanupStack::PopAndDestroy( wlanSet );
-    CleanupStack::PopAndDestroy( db );
-    
-    CLOG_LEAVEFN( "CActiveSelectExplicit::AddAdhocWlanIapsL" );
-    }
-    
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/AuthenticationDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CAuthenticationDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "AuthenticationDialog.h"
-#include "ConnDlgPlugin.h"
-#include "ExpiryTimer.h"
-
-#include <uikon/eiksrvui.h>
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::CAuthenticationDialog
-// ---------------------------------------------------------
-//
-CAuthenticationDialog::CAuthenticationDialog( 
-                                        CConnDlgAuthenticationPlugin* aPlugin )
-: CAknMultiLineDataQueryDialog( CAknQueryDialog::ENoTone ),
-  iPlugin( aPlugin )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::~CAuthenticationDialog
-// ---------------------------------------------------------
-//
-CAuthenticationDialog::~CAuthenticationDialog()
-    {
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::NewL
-// ---------------------------------------------------------
-//
-CAuthenticationDialog* CAuthenticationDialog::NewL( 
-                                        CConnDlgAuthenticationPlugin* aPlugin, 
-                                        TDes& aUsername, TDes& aPassword )
-    {
-    CAuthenticationDialog* dialog = new( ELeave ) 
-                                            CAuthenticationDialog( aPlugin );
-    CleanupStack::PushL( dialog );
-
-    dialog->SetDataL( aUsername, aPassword );
-
-    CleanupStack::Pop( dialog );
-
-    return dialog;
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CAuthenticationDialog::PreLayoutDynInitL()
-    {
-    CAknMultiLineDataQueryDialog::PreLayoutDynInitL();
-
-    if( FirstData( TPtr( 0, 0 ) ).Length() > 0 )
-        {
-        MakeLeftSoftkeyVisible( ETrue );
-        }
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-    
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::SetInitialCurrentLine()
-// ---------------------------------------------------------
-//
-void CAuthenticationDialog::SetInitialCurrentLine()
-    {
-    CAknMultiLineDataQueryDialog::SetInitialCurrentLine();
-
-    iFirstEmpty = FirstData( TPtr( 0,0 ) ).Length() == 0;
-    iSecondEmpty = SecondData( TPtr( 0,0 ) ).Length() == 0;
-    if( !iFirstEmpty || !iSecondEmpty )
-        {
-        MakeLeftSoftkeyVisible( ETrue );
-        }
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CAuthenticationDialog::OkToExitL( TInt aButtonId )
-    {
-    if ( CAknMultiLineDataQueryDialog::OkToExitL( aButtonId ) )
-        {
-        if ( aButtonId == EAknSoftkeySelect || 
-             aButtonId == EAknSoftkeyOk || 
-             aButtonId == EAknSoftkeyDone )
-            {
-            iPlugin->CompleteL( KErrNone );
-            }
-        else if ( aButtonId== EAknSoftkeyCancel )
-            {
-            iPlugin->CompleteL( KErrCancel );
-            }
-
-        return( ETrue );
-        }
-
-    return( EFalse );
-    }
-
-
-// ---------------------------------------------------------
-// CAuthenticationDialog::HandleQueryEditorStateEventL
-//
-// This code is based on AknQueryDialog.cpp
-// ---------------------------------------------------------
-//
-TBool CAuthenticationDialog::HandleQueryEditorStateEventL( 
-                                            CAknQueryControl* aQueryControl,
-                                            TQueryControlEvent /*aEventType*/,
-                                            TQueryValidationStatus aStatus )
-    {
-    if( STATIC_CAST( CAknMultilineQueryControl*, aQueryControl )->IsFirst() )
-        {
-        iFirstEmpty = ( aStatus == EEditorEmpty );
-        }
-
-    if( STATIC_CAST( CAknMultilineQueryControl*, aQueryControl)->IsSecond() )
-        {
-        iSecondEmpty = ( aStatus == EEditorEmpty );
-        }
-
-    MakeLeftSoftkeyVisible( ( !iFirstEmpty ) || ( !iSecondEmpty ) );
-
-    return EFalse;
-    }
-	
-void CAuthenticationDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ConnDlgPlugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/cconndlg/src/ConnDlgPlugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -17,14 +17,7 @@
 
 // INCLUDE FILES
 #include "ConnDlgPlugin.h"
-#include "AuthenticationDialog.h"
-#include "ReconnectDialog.h"
-#include "QosDialog.h"
-#include "NewIapDialog.h"
-#include "ActiveIapPlugin.h"
 
-#include "ActiveSelectConnectionPlugin.h"
-#include "CConnDlgPrivateCRKeys.h"
 #include <centralrepository.h>
 
 #include "ConnectionDialogsUidDefs.h"
@@ -34,29 +27,23 @@
 #include <bautils.h>
 #include <e32property.h> 
 #include <rmpm.h>
-#include <startupdomainpskeys.h>
+#include <cmmanager.h>
+#include <cmdestination.h>
+#include <commsdat.h>
 
-#include <CConnDlgPlugin.rsg>
 #include <data_caging_path_literals.hrh>
-#include <vpnapi.h>
+
+
+// NOTE that the functionality this file is DEPRECATED
+// None on the methods have UI functionality, the plugins complete the requests
+// immediately when they are started
 
 using namespace CommsDat;
 
 // CONSTANTS
 
-// RSC file name.
-_LIT( KResourceFileName, "CConnDlgPlugin.rsc" );
-
-// Panic string
-_LIT( KConnDlgPluginPanic, "CConnDlgPlugin" );
-
 LOCAL_D const TInt KPluginGranularity = 4;
 
-#if defined(_DEBUG)
-_LIT( KErrActiveObjectNull, "iActivePlugin not NULL" );
-#endif
-
-
 
 LOCAL_C void CreateNotifiersL( 
                             CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers );
@@ -72,8 +59,9 @@
 
 EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
     {
-    CArrayPtrFlat<MEikSrvNotifierBase2>* array = new (ELeave) 
-                    CArrayPtrFlat<MEikSrvNotifierBase2>( KPluginGranularity );
+    CArrayPtrFlat<MEikSrvNotifierBase2>* array = NULL;
+    TRAP_IGNORE( array = new (ELeave) 
+                    CArrayPtrFlat<MEikSrvNotifierBase2>( KPluginGranularity ); )
 
     if ( array )
         {
@@ -161,64 +149,62 @@
 
 void CConnDlgIapPlugin::StartL( const TDesC8& aBuffer, TInt aReplySlot,
                                 const RMessagePtr2& aMessage )
-    {    
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        CLOG_WRITE( "CConnDlgAuthenticationPlugin::StartL: Screen saver or Autolock is active." );
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-
-    iPrefs.Copy( (TPtrC8) aBuffer );
+    {
 
     iCancelled = EFalse;
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     
-    // Check if there is a suitable active connection
-    TInt iap( 0 );
-    TInt bearer( ECommDbBearerWLAN ); // User conn. is always WLAN in 9.1
-                                      
-    // Is there active User connection
-    TInt err = GetUserConnection( iap );
+    // The UI is deprectad, complete the request and return the best available iap
+    RCmManager cmManager;
+    cmManager.OpenL();     
+    CleanupClosePushL( cmManager ); 
+    
+    RArray<TUint32> destinationArray;    
+    cmManager.AllDestinationsL( destinationArray );
+    CleanupClosePushL(destinationArray);   
+    TInt error = KErrNotFound;
     
-    if ( err != KErrNone || iap == 0 )
-        {
-        // Is there any active connection
-    	err = GetActiveConnection( iap, bearer );
+    // loop the destinations and find the internet snap
+    for (TInt i = 0; i < destinationArray.Count(); ++i)
+        {   
+        RCmDestination destination = cmManager.DestinationL( destinationArray[i] );
+        CleanupClosePushL(destination);
+        TUint32 purposeMetaData = destination.MetadataL( CMManager::ESnapMetadataPurpose );
+        
+        // If the internet snap was found, check out the IAPs
+        if ( CMManager::ESnapPurposeInternet ==  purposeMetaData )
+            {
+            RMPM mpm;
+            User::LeaveIfError(mpm.Connect());
+            TMpmSnapBuffer buffer;
+            buffer.Reset();
+            User::LeaveIfError( mpm.SortSNAP( destination.Id(), buffer )); 
+            mpm.Close();
+            // if there are iaps in the list, return the first
+            // if there are none, return an error
+            if ( buffer.Count() > 0 )
+                {
+                iIAP = buffer.iIapId[0];
+                error = KErrNone;
+                }
+            CleanupStack::PopAndDestroy(); //destination
+            break;
+            }                
+        CleanupStack::PopAndDestroy(); //destination
         }
-
-    if ( ( err == KErrNone ) && 
-         ( iap != 0 )        &&  
-         ( iPrefs().iBearerSet & bearer ) )
-        {
-    	// a suitable connection is already active
-    	iIAP = iap;
-    	CompleteL( KErrNone );
-        }
-    else
-        {
-        // display a dialog
-        __ASSERT_DEBUG( !iActivePlugin, 
-                    User::Panic( KErrActiveObjectNull, KErrNone ) );
+    CleanupStack::PopAndDestroy(); //destinationArray
+    CleanupStack::PopAndDestroy(); //cmManager
     
-        iActivePlugin = CActiveCConnDlgIapPlugin::NewL( this, iPrefs() );
-        iActivePlugin->StartSearchIAPsL();	
-        }
+    CompleteL( error );
     }
 
-
-
 // ---------------------------------------------------------
 // void CConnDlgIapPlugin::Cancel()
 // ---------------------------------------------------------
 //
 void CConnDlgIapPlugin::Cancel()
-    {
-    delete iActivePlugin;
-    iActivePlugin = NULL;
-    
+    { 
     if ( !iCancelled )
         {
         iCancelled = ETrue;
@@ -261,79 +247,11 @@
 // ---------------------------------------------------------
 //
 CConnDlgIapPlugin* CConnDlgIapPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgIapPlugin* self = new (ELeave) CConnDlgIapPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
-
-// ---------------------------------------------------------
-// CConnDlgIapPlugin::SetPreferredIapIdL
-// ---------------------------------------------------------
-//    
-void CConnDlgIapPlugin::SetPreferredIapIdL( TUint32 aIAPId )
-    {
-    CLOG_ENTERFN( "CConnDlgIapPlugin::SetPreferredIapIdL " );
-    
-    iIAP = aIAPId;
-        
-    CLOG_LEAVEFN( "CConnDlgIapPlugin::SetPreferredIapIdL " );
-    }
-    
-    
-// ---------------------------------------------------------
-// CConnDlgIapPlugin::GetActiveConnection
-// ---------------------------------------------------------
-//    
-TInt CConnDlgIapPlugin::GetActiveConnection( TInt& aIapId, 
-                                             TInt& aBearer )
-    {
-    aIapId  = 0;
-    aBearer = 0;
-    
-    TInt err = RProperty::Get( KMPMActiveConnectionCategory, 
-                               KMPMPSKeyActiveConnectionIap, 
-                               aIapId );
-                               
-    CLOG_WRITEF( _L( "KMPMPSKeyActiveConnectionIap : %d" ), aIapId );                           
-    CLOG_WRITEF( _L( "err : %d" ), err );                           
-                               
-    if ( err == KErrNone )
-        {
-    	err = RProperty::Get( KMPMActiveConnectionCategory, 
-                              KMPMPSKeyActiveConnectionBearer, 
-                              aBearer );
-        }
-        
-    CLOG_WRITEF( _L( "KMPMPSKeyActiveConnectionBearer : %d" ), aBearer );                           
-    CLOG_WRITEF( _L( "err : %d" ), err );
-    CLOG_WRITEF( _L( "iPrefs().iBearerSet : %d" ), iPrefs().iBearerSet );
-    
-    return err;
-    }
-    
-    
-// ---------------------------------------------------------
-// CConnDlgIapPlugin::GetUserConnection
-// ---------------------------------------------------------
-//    
-TInt CConnDlgIapPlugin::GetUserConnection( TInt& aIapId )
-    {
-    aIapId  = 0;
-    
-    TInt err = RProperty::Get( KMPMUserConnectionCategory, 
-                               KMPMPSKeyUserConnectionIap, 
-                               aIapId );
-                
-    CLOG_WRITEF( _L( "KMPMPSKeyUserConnectionIap : %d" ), aIapId );                           
-    CLOG_WRITEF( _L( "err : %d" ), err );                            
-        
-    return err;    
-    }
             
 
 // ---------------------------------------------------------
@@ -363,27 +281,12 @@
     {
     CLOG_ENTERFN( "CConnDlgAuthenticationPlugin::StartL" );
 
-    if ( ScreenSaverOn() || AutolockOn() )
-        {
-        // Screen saver or Autolock is active. Cancel the dialog. 
-        CLOG_WRITE( "CConnDlgAuthenticationPlugin::StartL: Screen saver or Autolock is active." );
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-
-    if ( aBuffer.Length() > iAuthPairBuff.Length() )
-        {
-        CLOG_WRITE( "User::Panic, EConnDlgIllegalRequest" );
-        User::Panic( KConnDlgPluginPanic, EConnDlgIllegalRequest );
-        }
-
-    iAuthPairBuff.Copy( aBuffer );
-
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     iCancelled = EFalse;
 
-    GetAuthenticationL();
+    // The UI is deprecated, just complete the request
+    CompleteL(KErrNotSupported);
 
     CLOG_LEAVEFN( "CConnDlgAuthenticationPlugin::StartL" );
     }
@@ -405,8 +308,6 @@
             {
             iMessage.Complete( KErrCancel );
             }
-        delete iDialog;
-        iDialog = NULL;
         }
 
     CLOG_LEAVEFN( "CConnDlgAuthenticationPlugin::Cancel" );
@@ -414,24 +315,6 @@
 
 
 // ---------------------------------------------------------
-// void CConnDlgAuthenticationPlugin::GetAuthenticationL()
-// ---------------------------------------------------------
-//
-void CConnDlgAuthenticationPlugin::GetAuthenticationL()
-    {
-    CLOG_ENTERFN( "CConnDlgAuthenticationPlugin::GetAuthenticationL" );
-
-    iDialog = CAuthenticationDialog::NewL( this, iAuthPairBuff().iUsername, 
-                                           iAuthPairBuff().iPassword );
-
-
-    iDialog->ExecuteLD( R_CONNDLG_AUTHENTICATION );
-
-    CLOG_LEAVEFN( "CConnDlgAuthenticationPlugin::GetAuthenticationL" );
-    }
-
-
-// ---------------------------------------------------------
 // void CConnDlgAuthenticationPlugin::CompleteL( TInt aStatus )
 // ---------------------------------------------------------
 //
@@ -442,11 +325,6 @@
     iCancelled = ETrue;
     if ( !iMessage.IsNull() )
         {
-        if ( aStatus == KErrNone )
-            {
-            iMessage.WriteL( iReplySlot, iAuthPairBuff );
-            }
-
         iMessage.Complete( aStatus );
         }
     Cancel();
@@ -460,14 +338,10 @@
 // ---------------------------------------------------------
 //
 CConnDlgAuthenticationPlugin* CConnDlgAuthenticationPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgAuthenticationPlugin* self = new (ELeave) 
                                                 CConnDlgAuthenticationPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
 
@@ -477,7 +351,6 @@
 // ---------------------------------------------------------
 //
 CConnDlgAuthenticationPlugin::CConnDlgAuthenticationPlugin()
-: iAuthPair( TAuthenticationPair() )
     {
     }
 
@@ -507,7 +380,7 @@
     iMessage = aMessage;
     iCancelled = EFalse;
 
-    GetReconnectL();
+    CompleteL(KErrNotSupported);
     }
 
 
@@ -524,24 +397,11 @@
             {
             iMessage.Complete( KErrCancel );
             }
-        delete iDialog;
-        iDialog = NULL;
         }
     }
 
 
 // ---------------------------------------------------------
-// void CConnDlgQosPlugin::GetReconnectL()
-// ---------------------------------------------------------
-//
-void CConnDlgQosPlugin::GetReconnectL()
-    {
-    iDialog = new (ELeave) CQosDialog( this, iBool );
-    iDialog->ExecuteLD( R_CONNDLG_QOS );
-    }
-
-
-// ---------------------------------------------------------
 // void CConnDlgQosPlugin::CompleteL( TInt aStatus )
 // ---------------------------------------------------------
 //
@@ -550,11 +410,6 @@
     iCancelled = ETrue;
     if ( !iMessage.IsNull() )
         {
-        if ( aStatus == KErrNone )
-            {
-            TRAP_IGNORE( iMessage.WriteL( iReplySlot, TPckg<TBool>( iBool ) ) );
-            }
-
         iMessage.Complete( aStatus );
         }
     Cancel();
@@ -566,13 +421,9 @@
 // ---------------------------------------------------------
 //
 CConnDlgQosPlugin* CConnDlgQosPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgQosPlugin* self = new (ELeave) CConnDlgQosPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
 
@@ -603,7 +454,8 @@
     iMessage = aMessage;
     iCancelled = EFalse;
 
-    GetReconnectL();
+    // The UI is deprecated, just complete the request
+    CompleteL(KErrNotSupported);
     }
 
 
@@ -620,24 +472,11 @@
             {
             iMessage.Complete( KErrCancel );
             }
-        delete iDialog;
-        iDialog = NULL;
         }
     }
 
 
 // ---------------------------------------------------------
-// void CConnDlgReconnectPlugin::GetReconnectL()
-// ---------------------------------------------------------
-//
-void CConnDlgReconnectPlugin::GetReconnectL()
-    {
-    iDialog = new (ELeave) CReconnectDialog( this, iBool );
-    iDialog->ExecuteLD( R_CONNDLG_RECONNECT );
-    }
-
-
-// ---------------------------------------------------------
 // void CConnDlgReconnectPlugin::CompleteL( TInt aStatus )
 // ---------------------------------------------------------
 //
@@ -646,11 +485,6 @@
     iCancelled = ETrue;
     if ( !iMessage.IsNull() )
         {
-        if ( aStatus == KErrNone )
-            {
-            iMessage.WriteL( iReplySlot, TPckg<TBool>( iBool ) );
-            }
-
         iMessage.Complete( aStatus );
         }
     Cancel();
@@ -663,13 +497,9 @@
 // ---------------------------------------------------------
 //
 CConnDlgReconnectPlugin* CConnDlgReconnectPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgReconnectPlugin* self = new (ELeave) CConnDlgReconnectPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
 
@@ -696,17 +526,12 @@
 void CConnDlgNewIapPlugin::StartL( const TDesC8& aBuffer, TInt aReplySlot,
                                    const RMessagePtr2& aMessage )
     {
-    if ( aBuffer.Length() > iPrefs.Length() )
-        {
-        User::Panic( KConnDlgPluginPanic, EConnDlgIllegalRequest );
-        }
-
-    iPrefs.Copy( aBuffer );
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     iCancelled = EFalse;
 
-    GetNewIapL();
+    // This api has been deprecated, just Complete the request
+    CompleteL(KErrNotSupported);
     }
 
 
@@ -723,24 +548,11 @@
             {
             iMessage.Complete( KErrCancel );
             }
-        delete iDialog;
-        iDialog = NULL;
         }
     }
 
 
 // ---------------------------------------------------------
-// void CConnDlgNewIapPlugin::GetNewIapL()
-// ---------------------------------------------------------
-//
-void CConnDlgNewIapPlugin::GetNewIapL()
-    {
-    iDialog = new (ELeave) CNewIapDialog( this, iConnect, iPrefs() );
-    iDialog->ExecuteLD( R_CONNDLG_NEW_IAP );
-    }
-
-
-// ---------------------------------------------------------
 // void CConnDlgNewIapPlugin::CompleteL( TInt aStatus )
 // ---------------------------------------------------------
 //
@@ -749,11 +561,6 @@
     iCancelled = ETrue;
     if ( !iMessage.IsNull() )
         {
-        if ( aStatus == KErrNone )
-            {
-            iMessage.WriteL( iReplySlot, TPckg<TBool>( iConnect ) );
-            }
-
         iMessage.Complete( aStatus );
         }
     Cancel();
@@ -765,13 +572,9 @@
 // ---------------------------------------------------------
 //
 CConnDlgNewIapPlugin* CConnDlgNewIapPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgNewIapPlugin* self = new (ELeave) CConnDlgNewIapPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
 
@@ -797,105 +600,59 @@
 // ---------------------------------------------------------
 //
 
-void CConnDlgSelectConnectionPlugin::StartL( const TDesC8& aBuffer, 
+void CConnDlgSelectConnectionPlugin::StartL( const TDesC8& /*aBuffer*/, 
                                              TInt aReplySlot,
                                              const RMessagePtr2& aMessage )
     {
-     CLOG_ENTERFN( "CConnDlgSelectConnectionPlugin::StartL" );      	
-    	
-    if ( iActivePlugin )
-        {
-        aMessage.Complete( KErrServerBusy );
-        return;
-        }
-     
-    TInt iStartUpPhaseValue( EStartupUiPhaseUninitialized );
-    RProperty::Get( KPSUidStartup, KPSStartupUiPhase, iStartUpPhaseValue );
-    CLOG_WRITEF( _L( "CConnDlgSelectConnectionPlugin::Phone start up phase: %d" ), 
-    									iStartUpPhaseValue );           
-    // Don't show the dialog if phone boot up isn't complete or screen saver or Autolock is on.
-    if ( iStartUpPhaseValue != EStartupUiPhaseAllDone || ScreenSaverOn() || AutolockOn() )
-        { 
-        CLOG_WRITE( "CConnDlgSelectConnectionPlugin::StartL: Screen saver or Autolock is active or start up phase not completed yet." );
-        aMessage.Complete( KErrCancel );
-        return;
-        }
-
-    iPrefs.Copy( ( TPtrC8 ) aBuffer );
-
-    iCancelled = ETrue; // This method could leave before displaying the dialog.
+        
     iReplySlot = aReplySlot;
     iMessage = aMessage;
     
-    __ASSERT_DEBUG( !iActivePlugin, 
-                     User::Panic( KErrActiveObjectNull, KErrNone ) );
-    
-    iElementID = iPrefs().iRank;
-    iActivePlugin = CActiveSelectConnectionPlugin::NewL( this,
-                                                         iElementID,
-                                                         iPrefs().iBearerSet );
-    // Check if there is a suitable active connection
-    TInt snap( 0 );
-    TInt iap( 0 );
-    TInt bearer( ECommDbBearerWLAN ); // User conn. is always WLAN in 9.1
+    // because the connection dialog is deprecated and removed functionality,
+    // return the Internet SNAP and complete
+    RCmManager cmManager;
+    cmManager.OpenL();     
+    CleanupClosePushL( cmManager ); 
     
-    // Is there active User connection
-    TInt err = GetUserConnection( iap, snap );
-    
-    if ( ( err != KErrNone ) || ( iap == 0 && snap == 0 ) )
-        {
-        // Is there any active connection
-    	err = GetActiveConnection( iap, snap, bearer );
-        }
-                                      
-    RVpnServ vpn;
-    TInt vpnErr( KErrNone );
-    TInt policyCount( 0 );
-    TBool forceDialogForIntranetUsers( EFalse );
+    RArray<TUint32> destinationArray;    
+    cmManager.AllDestinationsL( destinationArray );
+    CleanupClosePushL(destinationArray);   
+    bool found = false;
     
-    vpnErr = vpn.Connect();
-    if ( !vpnErr ) 
-    	  {
-    	  vpnErr = vpn.EnumeratePolicies(policyCount);
-    	  if ( !vpnErr && policyCount > 0 )
-    	  	  {
-    	  	  forceDialogForIntranetUsers = ETrue;
-    	  	  }
-        vpn.Close();
-        }
+    // loop the destinations and find the internet snap
+    for (TInt i = 0; i < destinationArray.Count() && !found; ++i)
+        {   
+        RCmDestination destination = cmManager.DestinationL( destinationArray[i] );
+        CleanupClosePushL(destination);
         
-    if ( !forceDialogForIntranetUsers &&
-    	 ( err == KErrNone ) && 
-         ( iap != 0 || snap != 0 ) && 
-         ( iPrefs().iBearerSet & bearer ) &&
-         ( iPrefs().iDirection == 0 ) )     // JavaVM sets iDirection to "1"
+        TUint32 purposeMetaData = destination.MetadataL( CMManager::ESnapMetadataPurpose );
+        if ( CMManager::ESnapPurposeInternet ==  purposeMetaData )
+            {
+            iElementID = destination.ElementId();
+            found = true;
+            }                
+        CleanupStack::PopAndDestroy(); //destination
+        }
+    CleanupStack::PopAndDestroy(); //destinationArray
+    CleanupStack::PopAndDestroy(); //cmManager
+    
+    if (found)
         {
-    	// a suitable connection is already active
-    	SetElementIDL( iap, snap );
-    	CompleteL( KErrNone );
-        }
-    else
+        CompleteL(KErrNone);
+        } 
+    else 
         {
-        // display dialog
-        iActivePlugin->ShowSelectConnectionL();
-        iCancelled = EFalse; // Dialog is now up and running
+        CompleteL(KErrNotFound);
         }
     }
 
-
-
 // ---------------------------------------------------------
 // void CConnDlgSelectConnectionPlugin::Cancel()
 // ---------------------------------------------------------
 //
 void CConnDlgSelectConnectionPlugin::Cancel()
     {
-    CLOG_ENTERFN( "CConnDlgSelectConnectionPlugin::Cancel" );      
-
-    delete iActivePlugin;
-    CLOG_WRITE( "iActivePlugin deleted" );      
-    iActivePlugin = NULL;
-    CLOG_WRITE( "iActivePlugin NULLed" );      
+    CLOG_ENTERFN( "CConnDlgSelectConnectionPlugin::Cancel" );          
     
     if ( !iCancelled )
         {
@@ -944,97 +701,12 @@
 // ---------------------------------------------------------
 //
 CConnDlgSelectConnectionPlugin* CConnDlgSelectConnectionPlugin::NewL( 
-                                        const TBool aResourceFileResponsible )
+                                        const TBool /*aResourceFileResponsible*/ )
     {
     CConnDlgSelectConnectionPlugin* self = 
                             new (ELeave) CConnDlgSelectConnectionPlugin();
-    CleanupStack::PushL( self );
-    self->ConstructL( KResourceFileName, aResourceFileResponsible );
-    CleanupStack::Pop();
-
     return self;
     }
-
-
-// ---------------------------------------------------------
-// CConnDlgSelectConnectionPlugin::SetSelectedIDsL
-// ---------------------------------------------------------
-//    
-void CConnDlgSelectConnectionPlugin::SetElementIDL( TUint32 aIAPId, 
-                                                    TUint32 aDestinationId )
-    {
-    iElementID = iActivePlugin->GetElementIDL( aIAPId, aDestinationId );
-    }
     
-    
-// ---------------------------------------------------------
-// CConnDlgSelectConnectionPlugin::GetUserConnection
-// ---------------------------------------------------------
-//    
-TInt CConnDlgSelectConnectionPlugin::GetUserConnection( TInt& aIapId, 
-                                                        TInt& aSnapId )
-    {
-    aIapId  = 0;
-    aSnapId = 0;
-    
-    TInt err = RProperty::Get( KMPMUserConnectionCategory, 
-                               KMPMPSKeyUserConnectionSnap, 
-                               aSnapId );
-    
-    if ( err != KErrNone || aSnapId == 0 )
-        {
-        err = RProperty::Get( KMPMUserConnectionCategory, 
-                              KMPMPSKeyUserConnectionIap, 
-                              aIapId );
-        }
-       
-    CLOG_WRITEF( _L( "KMPMPSKeyUserConnectionSnap : %d" ), aSnapId );                      
-    CLOG_WRITEF( _L( "KMPMPSKeyUserConnectionIap : %d" ), aIapId );                           
-    CLOG_WRITEF( _L( "err : %d" ), err );
-        
-    return err;    
-    }
-
-
-// ---------------------------------------------------------
-// CConnDlgSelectConnectionPlugin::GetActiveConnection
-// ---------------------------------------------------------
-//    
-TInt CConnDlgSelectConnectionPlugin::GetActiveConnection( TInt& aIapId, 
-                                                          TInt& aSnapId,
-                                                          TInt& aBearer )
-    {
-    aIapId  = 0;
-    aSnapId = 0;
-    aBearer = 0;
-    
-    TInt err = RProperty::Get( KMPMActiveConnectionCategory, 
-                               KMPMPSKeyActiveConnectionSnap, 
-                               aSnapId );
-                                  
-    if ( err != KErrNone || aSnapId == 0 )
-        {
-        err = RProperty::Get( KMPMActiveConnectionCategory, 
-                              KMPMPSKeyActiveConnectionIap, 
-                              aIapId );
-        }
-         
-    CLOG_WRITEF( _L( "KMPMPSKeyActiveConnectionSnap : %d" ), aSnapId );                      
-    CLOG_WRITEF( _L( "KMPMPSKeyActiveConnectionIap : %d" ), aIapId );                           
-    CLOG_WRITEF( _L( "err : %d" ), err );                           
-                               
-    if ( err == KErrNone )
-        {
-    	err = RProperty::Get( KMPMActiveConnectionCategory, 
-                              KMPMPSKeyActiveConnectionBearer, 
-                              aBearer );
-        }
-
-    CLOG_WRITEF( _L( "KMPMPSKeyActiveConnectionBearer : %d" ), aBearer );                           
-    CLOG_WRITEF( _L( "iPrefs().iBearerSet : %d" ), iPrefs().iBearerSet );
-    CLOG_WRITEF( _L( "err : %d" ), err );
-    
-    return err;
-    }
 
 // End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/IAPDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CIapDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "IAPDialog.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "ConnDlgPlugin.h"
-#include "ConnectionDialogsLogger.h"
-#include "ExpiryTimer.h"
-
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-#include <uikon/eiksrvui.h>
-
-#include <data_caging_path_literals.hrh>
-#include <apsettings.mbg>
-
-
-// CONST DECLARATIONS
-
-// ROM folder
-_LIT( KDriveZ, "z:" );
-
-
-// Name of the MBM file containing icons
-_LIT( KApsettingsMBMFile, "ApSettings.mbm" );
-
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-// CONSTANTS
-
-LOCAL_D const TInt KIconsGranularity = 4;
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CIapDialog::CIapDialog
-// ---------------------------------------------------------
-//
-CIapDialog::CIapDialog( CConnDlgIapPlugin* aPlugin )
-: CAknListQueryDialog( &iDummy ),
-  iPlugin( aPlugin ),
-  iFromOkToExit( EFalse )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::NewL
-// ---------------------------------------------------------
-//
-CIapDialog* CIapDialog::NewL( CConnDlgIapPlugin* aPlugin )
-    {
-    CIapDialog* self = new( ELeave ) CIapDialog( aPlugin );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::ConstructL()
-// ---------------------------------------------------------
-//
-void CIapDialog::ConstructL()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::~CIapDialog()
-// ---------------------------------------------------------
-//
-CIapDialog::~CIapDialog()
-    {
-    CLOG_ENTERFN( "CIapDialog::~CIapDialog " );
-    iIAPIds.Close();
-    delete iExpiryTimer;
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    CLOG_LEAVEFN( "CIapDialog::~CIapDialog " );
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CIapDialog::PreLayoutDynInitL()
-    {
-    CLOG_ENTERFN( "CIapDialog::PreLayoutDynInitL " );  
-    
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    SetOwnershipType( ELbmDoesNotOwnItemArray );
-    SetIconsL();
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    
-    CLOG_LEAVEFN( "CIapDialog::PreLayoutDynInitL " );      
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::SetIconsL()
-// ---------------------------------------------------------
-//
-void CIapDialog::SetIconsL()
-    {
-    CLOG_ENTERFN( "CIapDialog::SetIconsL " );  
-    
-    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( 
-                                                        KIconsGranularity );
-    CleanupStack::PushL( icons );
-
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-
-    TFileName iconsFileName;
-
-    iconsFileName.Append( KDriveZ );
-    iconsFileName.Append( KDC_APP_BITMAP_DIR );
-    iconsFileName.Append( KApsettingsMBMFile );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlGprs,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_gprs, 
-                            EMbmApsettingsQgn_prop_wml_gprs_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlCsd,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_csd, 
-                            EMbmApsettingsQgn_prop_wml_csd_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                            KAknsIIDQgnPropWmlHscsd,
-                            iconsFileName, 
-                            EMbmApsettingsQgn_prop_wml_hscsd, 
-                            EMbmApsettingsQgn_prop_wml_hscsd_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                        KAknsIIDQgnPropWlanEasy,
-                        iconsFileName, 
-                        EMbmApsettingsQgn_prop_wlan_easy, 
-                        EMbmApsettingsQgn_prop_wlan_easy_mask ) );
-
-    icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, 
-                        KAknsIIDQgnPropWlanBearer,
-                        iconsFileName, 
-                        EMbmApsettingsQgn_prop_wlan_bearer, 
-                        EMbmApsettingsQgn_prop_wlan_bearer_mask ) );
-    
-    SetIconArrayL( icons );
-
-    CleanupStack::Pop( icons );
-    CLOG_LEAVEFN( "CIapDialog::SetIconsL " );      
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CIapDialog::OkToExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CIapDialog::OkToExitL " );      
-    
-    TBool result( EFalse );
-    TInt completeCode( KErrNone );
-    
-    if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ||
-         aButtonId == EAknSoftkeyDone )
-        {
-        iPlugin->SetPreferredIapIdL( iIAPIds[ListBox()->CurrentItemIndex()] );
-        result = ETrue;
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        completeCode = KErrCancel;
-        result = ETrue;
-        }
-        
-    if ( result )
-        {
-        iFromOkToExit = ETrue;        
-        
-        __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
-        iPlugin->CompleteL( completeCode );
-        }
-
-    CLOG_LEAVEFN( "CIapDialog::OkToExitL " );      
-
-    return result;
-    }
-
-
-// ---------------------------------------------------------
-// CIapDialog::RefreshDialogL
-// ---------------------------------------------------------
-//    
-void CIapDialog::RefreshDialogL( CConnectionInfoArray* aIAP, 
-                                 TBool aIsReallyRefreshing )
-    {  
-    CLOG_ENTERFN( "CIapDialog::RefreshDialogL " );  
-     
-    SetItemTextArray( aIAP );
-
-    iIAPIds.Reset();
-    
-    TInt numAPs = aIAP->Count();
-    for( TInt ii = 0; ii < numAPs; ii++ )
-        {
-        TUint32 id = aIAP->At( ii )->Id();
-        iIAPIds.AppendL( id );        
-        }
-    
-    ListBox()->SetCurrentItemIndex( 0 );
-
-    ListBox()->HandleItemAdditionL();
-
-    if ( aIsReallyRefreshing )
-        {   // If we are really making a refresh, we need to recalculate the 
-            // layout, because the number of items could be different and the
-            // dialog should be resized accordingly
-        Layout();   
-        SizeChanged();
-        DrawNow();
-        }
-
-    CLOG_LEAVEFN( "CIapDialog::RefreshDialogL " );  
-    }
-
-// ---------------------------------------------------------
-// CIapDialog::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CIapDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                         TEventCode aType)
-    {
-    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
-        {
-        // Let's not obscure the Dialer in the background
-        if ( iExpiryTimer )
-            {
-            iExpiryTimer->Cancel();
-            iExpiryTimer->StartShort();    
-            }
-        }
-        
-    return CAknListQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
-    }
-
-void CIapDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/NewIapDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CNewIapDialog.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "NewIapDialog.h"
-#include "ConnDlgPlugin.h"
-#include "ExpiryTimer.h"
-
-#include <uikon/eiksrvui.h>
-#include <StringLoader.h>
-
-#include <CConnDlgPlugin.rsg>
-
-
-// CONST DECLARATIONS
-
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CNewIapDialog::CNewIapDialog
-// ---------------------------------------------------------
-//
-CNewIapDialog::CNewIapDialog( CConnDlgNewIapPlugin* aPlugin, TBool& aConnect,
-                              const TNewIapConnectionPrefs& aPrefs )
-: iPlugin( aPlugin ),
-  iConnect( aConnect ),
-  iPrefs( aPrefs )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CNewIapDialog::~CNewIapDialog
-// ---------------------------------------------------------
-//
-CNewIapDialog::~CNewIapDialog()
-    {
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    }
-
-// ---------------------------------------------------------
-// CNewIapDialog::PreLayoutDynInitL
-// ---------------------------------------------------------
-//
-void CNewIapDialog::PreLayoutDynInitL()
-    {
-    CAknQueryDialog::PreLayoutDynInitL();
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-
-    // New connection name
-    HBufC *msg = StringLoader::LoadL( R_CONNDLG_NEW_CONNECTION_ATTEMPT, 
-                                      iPrefs.iName );
-    CleanupStack::PushL( msg );
-    SetPromptL( msg->Des() );
-    CleanupStack::PopAndDestroy( msg );
-    
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    }
-
-
-// ---------------------------------------------------------
-// CNewIapDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CNewIapDialog::OkToExitL( TInt aButtonId )
-    {
-    iConnect = EFalse;
-    if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone || 
-         aButtonId == EAknSoftkeyOk )
-        {
-        iConnect = ETrue;
-        }
-
-    __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
-    iPlugin->CompleteL( KErrNone );
-
-    return( ETrue );
-    }
-
-void CNewIapDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/QosDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CQosDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "QosDialog.h"
-#include "ConnDlgPlugin.h"
-#include "ExpiryTimer.h"
-
-#include <uikon/eiksrvui.h>
-
-
-// CONSTANTS
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CQosDialog::CQosDialog
-// ---------------------------------------------------------
-//
-CQosDialog::CQosDialog( CConnDlgQosPlugin* aPlugin, TBool& aBool )
-: iPlugin( aPlugin ),
-  iBool( aBool )
-    {
-    }
-    
-    
-// ---------------------------------------------------------
-// CQosDialog::~CQosDialog
-// ---------------------------------------------------------
-//
-CQosDialog::~CQosDialog()
-    {
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    }
-
-
-// ---------------------------------------------------------
-// CQosDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CQosDialog::PreLayoutDynInitL()
-    {
-    CAknQueryDialog::PreLayoutDynInitL();
-    
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-    }
-
-
-// ---------------------------------------------------------
-// CQosDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CQosDialog::OkToExitL( TInt aButtonId )
-    {
-    iBool = EFalse;
-    if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone ||
-         aButtonId == EAknSoftkeyOk )
-        {
-        iBool = ETrue;
-        }
-
-
-    __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
-    iPlugin->CompleteL( KErrNone );
-
-    return ETrue;
-    }
-
-void CQosDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/ReconnectDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CReconnectDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "ReconnectDialog.h"
-#include "ConnDlgPlugin.h"
-#include "ExpiryTimer.h"
-
-#include <uikon/eiksrvui.h>
-
-
-// CONSTANTS
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CReconnectDialog::CReconnectDialog
-// ---------------------------------------------------------
-//
-CReconnectDialog::CReconnectDialog( CConnDlgReconnectPlugin* aPlugin, 
-                                    TBool& aBool )
-: iPlugin( aPlugin ),
-  iBool( aBool )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CReconnectDialog::~CReconnectDialog
-// ---------------------------------------------------------
-//
-CReconnectDialog::~CReconnectDialog()
-    {
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    }
-
-// ---------------------------------------------------------
-// CReconnectDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CReconnectDialog::PreLayoutDynInitL()
-    {
-    CAknQueryDialog::PreLayoutDynInitL();
-    
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-    }
-
-
-// ---------------------------------------------------------
-// CReconnectDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CReconnectDialog::OkToExitL( TInt aButtonId )
-    {
-    iBool = EFalse;
-    if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone || 
-         aButtonId == EAknSoftkeyOk )
-        {
-        iBool = ETrue;
-        }
-
-
-    __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
-    iPlugin->CompleteL( KErrNone );
-
-    return ETrue;
-    }
-
-void CReconnectDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/SelectConnectionDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,594 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CSelectConnectionDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "SelectConnectionDialog.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "ConnectionDialogsLogger.h"
-#include "ActiveSelectExplicit.h"
-#include "ExpiryTimer.h"
-#include "ConnectionDialogs.hrh"
-
-
-#include "ConnDlgPlugin.h"
-#include <CConnDlgPlugin.rsg>
-
-#include <uikon/eiksrvui.h>
-
-#include <AknsFrameBackgroundControlContext.h>
-#include <aknsoundsystem.h>
-#include <AknsDrawUtils.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-#include <eiklbi.h>
-
-// CONST DECLARATIONS
-
-#if defined(_DEBUG)
-_LIT( KErrNullPointer, "NULL pointer" );
-#endif
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CSelectConnectionDialog::CSelectConnectionDialog
-// ---------------------------------------------------------
-//
-CSelectConnectionDialog::CSelectConnectionDialog( 
-                                        MEikSrvNotifierBase2* aPlugin,
-                                        TInt aRefreshInterval,
-                                        TUint32 aBearerSet, 
-                                        TBool aIsWLANFeatureSupported,
-                                        TUint aDefaultCMId )
-: CAknListQueryDialog( &iDummy ),
-  iPlugin( ( CConnDlgSelectConnectionPlugin* )aPlugin ),
-  iFromOkToExit( EFalse ),
-  iActiveSelectExplicit( NULL ),
-  iRefreshInterval( aRefreshInterval ),
-  iBearerSet( aBearerSet ),
-  iIsWLANFeatureSupported( aIsWLANFeatureSupported ),
-  iDefaultCMId( aDefaultCMId )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::NewL
-// ---------------------------------------------------------
-//
-CSelectConnectionDialog* CSelectConnectionDialog::NewL( 
-                                                MEikSrvNotifierBase2* aPlugin,
-                                                TInt aRefreshInterval,
-                                                TUint32 aBearerSet, 
-                                                TBool aIsWLANFeatureSupported, 
-                                                TUint aDefaultCMId )
-    {
-    CSelectConnectionDialog* self = new( ELeave ) CSelectConnectionDialog( 
-                                                    aPlugin,
-                                                    aRefreshInterval,
-                                                    aBearerSet, 
-                                                    aIsWLANFeatureSupported, 
-                                                    aDefaultCMId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::ConstructL()
-// ---------------------------------------------------------
-//
-void CSelectConnectionDialog::ConstructL()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::~CSelectConnectionDialog()
-// ---------------------------------------------------------
-//
-CSelectConnectionDialog::~CSelectConnectionDialog()
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::~CSelectConnectionDialog " );
-    iIapIDs.Close();
-    iDestIDs.Close();
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
-    delete iExpiryTimer;
-    CLOG_LEAVEFN( "CSelectConnectionDialog::~CSelectConnectionDialog " );
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CSelectConnectionDialog::PreLayoutDynInitL()
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::PreLayoutDynInitL " );  
-    
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    SetOwnershipType( ELbmDoesNotOwnItemArray );
-    SetIconArrayL( iIcons );
-
-    STATIC_CAST( CEikServAppUi*, 
-                CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
-    
-    // Hide Options button if single-click enabled
-    //
-    if ( static_cast< CAknAppUi* >( iCoeEnv->AppUi() )->IsSingleClickCompatible() )
-        {
-        CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-        cba->MakeCommandVisible( EAknSoftkeyOptions, EFalse );
-        cba->DrawDeferred();
-        }
-
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    
-    CLOG_LEAVEFN( "CSelectConnectionDialog::PreLayoutDynInitL " );      
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CSelectConnectionDialog::OkToExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::OkToExitL " );      
-    
-    TBool result( EFalse );
-    TInt completeCode( KErrNone );
-    
-    if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ||
-         aButtonId == EAknSoftkeyDone )
-        {
-        CLOG_WRITE( "OkToExitL Ok-ed" );  
-        TInt index = ListBox()->CurrentItemIndex();
-        if ( iIapIDs[index] == 0 && iDestIDs[index] == 0 ) 
-            {      // Uncategorized
-            ProcessCommandL( ESelectConnectionCmdChooseMethod );
-            }
-        else
-            {
-            iPlugin->SetElementIDL( iIapIDs[index], iDestIDs[index] );
-            result = ETrue;
-            }
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        CLOG_WRITE( "OkToExitL Cancel" );  
-        completeCode = KErrCancel;
-        result = ETrue;
-        }
-    else if ( aButtonId == EAknSoftkeyOptions )
-        {
-        DisplayMenuL();
-        }
-        
-    if ( result )
-        {
-        iFromOkToExit = ETrue;        
-        
-        __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
-        CLOG_WRITE( "OkToExitL Going to CompleteL" );  
-        iPlugin->CompleteL( completeCode );
-        CLOG_WRITE( "OkToExitL Returned from CompleteL" );  
-        }
-
-    CLOG_LEAVEFN( "CSelectConnectionDialog::OkToExitL " );      
-
-    return result;
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::PrepareAndRunLD
-// ---------------------------------------------------------
-//    
-void CSelectConnectionDialog::PrepareAndRunLD( CConnectionInfoArray* aIAP,
-                                               CArrayPtr< CGulIcon >* aIcons,
-                                               TBool aIsReallyRefreshing,
-                                               const TInt aHighlightedItem )
-    {
-    PrepareLC( R_SELECT_CONNECTION_QUERY );
-    RefreshDialogL( aIAP, aIcons, aIsReallyRefreshing, aHighlightedItem );
-    RunLD();
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::RefreshDialogL
-// ---------------------------------------------------------
-//    
-void CSelectConnectionDialog::RefreshDialogL( CConnectionInfoArray* aIAP, 
-                                              CArrayPtr< CGulIcon >* aIcons,
-                                              TBool aIsReallyRefreshing,
-                                              const TInt aHighlightedItem )
-    {  
-    CLOG_ENTERFN( "CSelectConnectionDialog::RefreshDialogL " );  
-     
-    if ( aIAP->Count() == 0 )
-        {
-        ListBox()->Reset();	
-        }
-    else
-        {
-        SetItemTextArray( aIAP );	
-        } 
-    
-    iIcons = aIcons;
-
-    iIapIDs.Reset();
-    iDestIDs.Reset();
-
-    // Determine the preferred IAP
-    TInt numAPs = aIAP->Count();
-    for( TInt ii = 0; ii < numAPs; ii++ )
-        {
-        iIapIDs.AppendL( aIAP->At( ii )->Id() );
-        iDestIDs.AppendL( aIAP->At( ii )->DestinationId() );
-        }
-
-    if ( aHighlightedItem >= 0 && aHighlightedItem < numAPs )
-        {
-        ListBox()->SetCurrentItemIndex( aHighlightedItem );
-        if ( aHighlightedItem == 1 )
-            {
-            // To have the Search for Wlan also visible. But this is valid only
-            // if the highlighted item can be the first or the second, 
-            // otherwise we risk to hide the highlighted item!
-            ListBox()->ScrollToMakeItemVisible( 0 );    
-            }
-        }
-
-    ListBox()->HandleItemAdditionL();
-
-    if ( aHighlightedItem >= 0 && aHighlightedItem < numAPs )
-        {
-        CEikButtonGroupContainer& cba = ButtonGroupContainer();
-        HBufC* label;
-
-        if ( iIapIDs[aHighlightedItem] != 0 )
-            {       // Easy Wlan
-            label = StringLoader::LoadL( R_QTN_MSK_SELECT );
-            }
-        else if ( iDestIDs[aHighlightedItem] != 0 )
-            {       // Destination
-            label = StringLoader::LoadL( R_QTN_MSK_CONNECT );
-            }
-        else        // if ( iIapIDs[aHighlightedItem] == 0 && iDestIDs[aHighlightedItem] == 0 )
-            {      // Uncategorized
-            label = StringLoader::LoadL( R_QTN_MSK_OPEN );
-            }
-
-        CleanupStack::PushL( label );
-        cba.SetCommandL( EAknSoftkeyDone, label->Des() );
-        CleanupStack::PopAndDestroy(); // label
-        }
-
-    if ( aIsReallyRefreshing )
-        {   // If we are really making a refresh, we need to recalculate the 
-            // layout, because the number of items could be different and the
-            // dialog should be resized accordingly
-        Layout();   
-        SizeChanged();
-        DrawDeferred();
-        }
-
-    CLOG_LEAVEFN( "CSelectConnectionDialog::RefreshDialogL " );  
-    }
-    
-
-// ----------------------------------------------------------------------------
-// CSelectConnectionDialog::DynInitMenuPaneL
-// ----------------------------------------------------------------------------
-//
-void CSelectConnectionDialog::DynInitMenuPaneL( TInt aResourceId, 
-                                             CEikMenuPane* aMenuPane )
-    {
-    CAknListQueryDialog::DynInitMenuPaneL( aResourceId, aMenuPane );
-
-    if ( aResourceId == R_SELECT_CONNECTION_MENU_PANE )
-        {
-        if ( aMenuPane )
-            {
-            TInt index = ListBox()->CurrentItemIndex();
-
-            if ( iIapIDs[index] != 0 )   
-                {      // Easy Wlan
-                aMenuPane->DeleteMenuItem( ESelectConnectionCmdChooseMethod );
-                aMenuPane->DeleteMenuItem( ESelectConnectionCmdConnect );
-                }
-            else if ( iDestIDs[index] != 0 )
-                {       // Destination
-                aMenuPane->DeleteMenuItem( ESelectConnectionCmdSelect );
-                }
-            else // if ( iIapIDs[index] == 0 && iDestIDs[index] == 0 ) 
-                {      // Uncategorized
-                aMenuPane->DeleteMenuItem( ESelectConnectionCmdSelect );
-                aMenuPane->DeleteMenuItem( ESelectConnectionCmdConnect );
-                }
-            }
-        }
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectConnectionDialog::ProcessCommandL
-// ----------------------------------------------------------------------------
-//
-void CSelectConnectionDialog::ProcessCommandL( TInt aCommand )
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::ProcessCommandL" );  
-    if ( MenuShowing() )
-        {
-        HideMenu();
-        }
-
-    switch( aCommand )
-        {
-        case ESelectConnectionCmdSelect:
-        case ESelectConnectionCmdConnect:
-            {
-            TryExitL( EAknSoftkeySelect );
-            break;
-            }
-
-        case ESelectConnectionCmdChooseMethod:
-            {
-            if ( !iActiveSelectExplicit )
-                {
-                iActiveSelectExplicit = CActiveSelectExplicit::NewL( this, 
-                                        iDestIDs[ListBox()->CurrentItemIndex()],
-                                        iRefreshInterval,
-                                        iBearerSet, 
-                                        iIsWLANFeatureSupported,
-                                       iDefaultCMId );
-                iActiveSelectExplicit->ShowSelectExplicitL();
-                }
-            break;
-            }
-
-        default:
-            {
-            break;
-            }
-        }
-    CLOG_LEAVEFN( "CSelectConnectionDialog::ProcessCommandL" );  
-    }
-
-
-// ---------------------------------------------------------
-// CNetworksViewContainer::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CSelectConnectionDialog::OfferKeyEventL( 
-                                                   const TKeyEvent& aKeyEvent,
-                                                   TEventCode aType )
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::OfferKeyEventL" );
-    
-    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
-        {
-        // Let's not obscure the Dialer in the background
-        if ( iExpiryTimer && !iActiveSelectExplicit )
-            {
-            iExpiryTimer->Cancel();
-            iExpiryTimer->StartShort();    
-            }
-        }
-
-    TKeyResponse result( EKeyWasNotConsumed );
-    TInt indexBefore = -1;
-    TInt indexAfter = -1;
-
-    if ( aKeyEvent.iScanCode == EStdKeyDownArrow || 
-         aKeyEvent.iScanCode == EStdKeyUpArrow )
-        {
-        CLOG_WRITE( "Arrow pressed" );
-        indexBefore = ListBox()->CurrentItemIndex();
-        }
-
-    result = CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType );
-    
-    if ( iFromOkToExit )
-        {     
-        return result;
-        }
-    
-    CLOG_WRITEF( _L ( "Returned from CAknListQueryDialog::OfferKeyEventL: %d" ), result );
-
-    if ( aKeyEvent.iScanCode == EStdKeyDownArrow || 
-         aKeyEvent.iScanCode == EStdKeyUpArrow )
-        {
-        indexAfter = ListBox()->CurrentItemIndex();
-        }
-
-    if ( indexBefore != indexAfter )
-        {
-        CLOG_WRITEF( _L ( "IndexBefore = %d, IndexAfter = %d" ), indexBefore, indexAfter );
-        CEikButtonGroupContainer& cba = ButtonGroupContainer();
-        HBufC* label;
-        if ( iIapIDs[indexAfter] != 0 )
-            {       // Easy Wlan
-            label = StringLoader::LoadL( R_QTN_MSK_SELECT );
-            }
-        else if ( iDestIDs[indexAfter] != 0 )
-            {       // Destination
-            label = StringLoader::LoadL( R_QTN_MSK_CONNECT );
-            }
-        else        // if ( iIapIDs[indexAfter] == 0 && iDestIDs[indexAfter] == 0 )
-            {      // Uncategorized
-            label = StringLoader::LoadL( R_QTN_MSK_OPEN );
-            }
-        CleanupStack::PushL( label );
-        cba.SetCommandL( EAknSoftkeyDone, label->Des() );
-        CleanupStack::PopAndDestroy(); // label
-        cba.DrawDeferred();
-        }
-
-    // Show Options button if some listbox row gets highlighted
-    //
-    if ( static_cast< CAknAppUi* >( iCoeEnv->AppUi() )->IsSingleClickCompatible() )
-        {
-        CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-
-        if ( ( ListBox()->View()->ItemDrawer()->Flags()
-               & CListItemDrawer::ESingleClickDisabledHighlight )
-              )
-            {
-            cba->MakeCommandVisible( EAknSoftkeyOptions, EFalse );
-            }
-        else
-            {
-            cba->MakeCommandVisible( EAknSoftkeyOptions, ETrue );
-            }
-
-        cba->DrawDeferred();
-        }
-    
-    CLOG_LEAVEFN( "CSelectConnectionDialog::OfferKeyEventL" );  
-
-    return result;
-    }
-
-
-// ----------------------------------------------------------------------------
-// CSelectConnectionDialog::RunLD
-// ----------------------------------------------------------------------------
-//
-TInt CSelectConnectionDialog::RunLD()
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::RunLD" );  
-    CAknDialog::ConstructL( R_SELECT_CONNECTION_MENUBAR );
-    User::ResetInactivityTime();
-
-    CAknKeySoundSystem* soundSystem = NULL;
-    if ( iSoundSystem )
-        {
-        iSoundSystem->PushContextL( R_AVKON_DEFAULT_SKEY_LIST );
-        // Need to store local copy of iSoundSystem, since it will have been
-        // destroyed when RunLD returns
-        soundSystem = iSoundSystem;
-        }
-
-    CAknsFrameBackgroundControlContext* cc = 
-        ( CAknsFrameBackgroundControlContext* )AknsDrawUtils::ControlContext(
-                                                                        this );
-    cc->SetCenter( KAknsIIDQsnFrPopupCenterQuery );
-
-    TInt ret = CAknDialog::RunLD();
-    if ( soundSystem )
-        {
-        soundSystem->PopContext();
-        }
-    CLOG_LEAVEFN( "CSelectConnectionDialog::RunLD" );  
-    return ret;
-    }
-
-
-// ---------------------------------------------------------
-// CSelectConnectionDialog::SetElementIDL
-// ---------------------------------------------------------
-//    
-void CSelectConnectionDialog::SetElementIDL( TUint32 aIAPId )
-    {
-    iPlugin->SetElementIDL( aIAPId, 0 );
-    }
-
-
-// ---------------------------------------------------------
-// void CSelectConnectionDialog::CompleteL
-// ---------------------------------------------------------
-//
-void CSelectConnectionDialog::CompleteL( TInt aStatus )
-    {
-    CLOG_ENTERFN( "CSelectConnectionDialog::CompleteL" );  
-    delete iActiveSelectExplicit;
-    iActiveSelectExplicit = NULL;
-    iPlugin->CompleteL( aStatus );
-    CLOG_LEAVEFN( "CSelectConnectionDialog::CompleteL" );  
-    }
-
-void CSelectConnectionDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-
-// ---------------------------------------------------------
-// void CSelectConnectionDialog::HandleListBoxEventL
-// ---------------------------------------------------------
-//    
-void CSelectConnectionDialog::HandleListBoxEventL(CEikListBox* aListBox, 
-												TListBoxEvent aEventType)
-	{	
-    if( aEventType == EEventItemClicked )
-        {
-        // Do not forward to the base class. 
-        // The first click must only select the item.        
-        return;
-        }
-    else if( aEventType == EEventItemDoubleClicked )
-        {
-        // Forward as EEventItemClicked to open the item on the second click.
-        CAknListQueryDialog::HandleListBoxEventL( aListBox, EEventItemClicked );
-        }
-	else
-        {
-        // normal forward
-        CAknListQueryDialog::HandleListBoxEventL( aListBox, aEventType );
-        }
-    }
-
-// ---------------------------------------------------------
-// void CSelectConnectionDialog::HandlePointerEventL
-// ---------------------------------------------------------
-//    
-void CSelectConnectionDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-    {
-    if( ListBox()->Rect().Contains( aPointerEvent.iPosition ) )
-        {
-        if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
-            {
-            TInt index;
-            TInt oldIndex = ListBox()->CurrentItemIndex();
-            if ( ListBox()->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ) &&
-                   ( index == oldIndex ) )
-                {
-                // Pressed Down Effect
-                ListBox()->View()->ItemDrawer()->SetFlags( CListItemDrawer::EPressedDownState );
-                }
-            }
-        CAknControl::HandlePointerEventL(aPointerEvent);
-        }
-    else
-        {
-        CAknListQueryDialog::HandlePointerEventL( aPointerEvent );
-        }
-    }
-
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/SelectExplicitDialog.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class CSelectExplicitDialog.
-*
-*/
-
-
-// INCLUDE FILES
-#include "SelectExplicitDialog.h"
-#include "ConnectionInfo.h"
-#include "ConnectionInfoArray.h"
-#include "ConnDlgPlugin.h"
-#include "ConnectionDialogsLogger.h"
-#include "SelectConnectionDialog.h"
-#include "ExpiryTimer.h"
-
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-#include <uikon/eiksrvui.h>
-
-#include <data_caging_path_literals.hrh>
-#include <apsettings.mbg>
-
-#include <CConnDlgPlugin.rsg>
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// CSelectExplicitDialog::CSelectExplicitDialog
-// ---------------------------------------------------------
-//
-CSelectExplicitDialog::CSelectExplicitDialog( 
-                                    CSelectConnectionDialog* aCallerDialog )
-: CAknListQueryDialog( &iDummy ),
-  iCallerDialog( aCallerDialog ),
-  iFromOkToExit( EFalse )
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::NewL
-// ---------------------------------------------------------
-//
-CSelectExplicitDialog* CSelectExplicitDialog::NewL( 
-                                    CSelectConnectionDialog* aCallerDialog )
-    {
-    CSelectExplicitDialog* self = new( ELeave ) 
-                                        CSelectExplicitDialog( aCallerDialog );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::ConstructL()
-// ---------------------------------------------------------
-//
-void CSelectExplicitDialog::ConstructL()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::~CSelectExplicitDialog()
-// ---------------------------------------------------------
-//
-CSelectExplicitDialog::~CSelectExplicitDialog()
-    {
-    CLOG_ENTERFN( "CSelectExplicitDialog::~CSelectExplicitDialog " );
-    iIAPIds.Close();
-    delete iExpiryTimer;
-    CLOG_LEAVEFN( "CSelectExplicitDialog::~CSelectExplicitDialog " );
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::PreLayoutDynInitL()
-// ---------------------------------------------------------
-//
-void CSelectExplicitDialog::PreLayoutDynInitL()
-    {
-    CLOG_ENTERFN( "CSelectExplicitDialog::PreLayoutDynInitL " );  
-    
-    CAknListQueryDialog::PreLayoutDynInitL();
-
-    SetOwnershipType( ELbmDoesNotOwnItemArray );
-    SetIconArrayL( iIcons );
-
-    iExpiryTimer = CExpiryTimer::NewL( *this );
-    iExpiryTimer->Start();
-    
-    CLOG_LEAVEFN( "CSelectExplicitDialog::PreLayoutDynInitL " );      
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::OkToExitL
-// ---------------------------------------------------------
-//
-TBool CSelectExplicitDialog::OkToExitL( TInt aButtonId )
-    {
-    CLOG_ENTERFN( "CSelectExplicitDialog::OkToExitL " );      
-    
-    TBool result( EFalse );
-    TInt completeCode( KErrNone );
-    
-    if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ||
-         aButtonId == EAknSoftkeyDone )
-        {
-        iCallerDialog->SetElementIDL( iIAPIds[ListBox()->CurrentItemIndex()] );
-        result = ETrue;
-        }
-    else if ( aButtonId == EAknSoftkeyCancel )
-        {
-        completeCode = KErrCancel;
-        result = ETrue;
-        }
-        
-    if ( result )
-        {
-        iFromOkToExit = ETrue;        
-        
-        iCallerDialog->CompleteL( completeCode );
-        }
-
-    CLOG_LEAVEFN( "CSelectExplicitDialog::OkToExitL " );      
-
-    return result;
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::PrepareAndRunLD
-// ---------------------------------------------------------
-//    
-void CSelectExplicitDialog::PrepareAndRunLD( CConnectionInfoArray* aIAP,
-                                               CArrayPtr< CGulIcon >* aIcons,
-                                               TBool aIsReallyRefreshing )
-    {
-    PrepareLC( R_LIST_EXPLICIT_QUERY );
-    RefreshDialogL( aIAP, aIcons, aIsReallyRefreshing );
-    RunLD();
-    }
-
-
-// ---------------------------------------------------------
-// CSelectExplicitDialog::RefreshDialogL
-// ---------------------------------------------------------
-//    
-void CSelectExplicitDialog::RefreshDialogL( CConnectionInfoArray* aIAP, 
-                                              CArrayPtr< CGulIcon >* aIcons,
-                                              TBool aIsReallyRefreshing )
-    {  
-    CLOG_ENTERFN( "CSelectExplicitDialog::RefreshDialogL " );  
-     
-    SetItemTextArray( aIAP );
-    iIcons = aIcons;
-
-    iIAPIds.Reset();
-
-    // Determine the preferred IAP
-    TInt numAPs = aIAP->Count();
-    for( TInt ii = 0; ii < numAPs; ii++ )
-        {
-        iIAPIds.AppendL( aIAP->At( ii )->Id() );
-        }
-
-    if ( numAPs )
-        {
-        ListBox()->SetCurrentItemIndex( 0 );
-        }
-    ListBox()->HandleItemAdditionL();
-
-    if ( aIsReallyRefreshing )
-        {   // If we are really making a refresh, we need to recalculate the 
-            // layout, because the number of items could be different and the
-            // dialog should be resized accordingly
-        Layout();   
-        SizeChanged();
-        DrawNow();
-        }
-
-    CLOG_LEAVEFN( "CSelectExplicitDialog::RefreshDialogL " );  
-    }
-    
-// ---------------------------------------------------------
-// CSelectExplicitDialog::OfferKeyEventL
-// ---------------------------------------------------------
-//
-TKeyResponse CSelectExplicitDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                    TEventCode aType)
-    {
-    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
-        {
-        // Let's not obscure the Dialer in the background
-        if ( iExpiryTimer )
-            {
-            iExpiryTimer->Cancel();
-            iExpiryTimer->StartShort();    
-            }
-        }
-        
-    return CAknListQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
-    }    
-	
-void CSelectExplicitDialog::HandleTimedOut()
-    {
-    TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
-    }
-// End of File
--- a/connectionutilities/ConnectionDialogs/cconndlg/src/sortsnaputils.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of class TSortSnapUtils.
-*
-*/
-
-
-// INCLUDE FILES
-#include "sortsnaputils.h"
-#include "ConnectionDialogsLogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// TSortSnapUtils::TSortSnapUtils
-// ---------------------------------------------------------
-//
-TSortSnapUtils::TSortSnapUtils( RMPM& aMPM ):
-iSnapCount( 0 ),
-iSSUState( EUninitialised ),
-iMPM( aMPM )
-    {
-    CLOG_ENTERFN( "TSortSnapUtils::TSortSnapUtils" );
-    CLOG_LEAVEFN( "TSortSnapUtils::TSortSnapUtils" );
-    }
-
-
-// ---------------------------------------------------------
-// TSortSnapUtils::~TSortSnapUtils
-// ---------------------------------------------------------
-//
-TSortSnapUtils::~TSortSnapUtils()
-    {
-    CLOG_ENTERFN( "TSortSnapUtils::~TSortSnapUtils" );
-    CLOG_LEAVEFN( "TSortSnapUtils::~TSortSnapUtils" );
-    }
-
-// ---------------------------------------------------------
-// TSortSnapUtils::InitDestIdArray
-// ---------------------------------------------------------
-//
-void TSortSnapUtils::InitDestIdArray()
-    {
-    CLOG_ENTERFN( "TSortSnapUtils::InitDestIdArray" );
-    switch (iSSUState)
-        {
-        case EUseMPM:
-            {
-            // we already know that MPM is used
-            CLOG_WRITE( "using MPM, no need to re-read from P&S " );
-            break;
-            }
-        case EUninitialised:
-        case EUsePubSub:
-        default:
-            {
-            iSnapCount = 0;
-            TMpmSnapPubSubFormat snapData;
-            TPtr8 e( reinterpret_cast< TUint8* >( &snapData ), 
-                     sizeof( snapData ) );
-            for (TInt i = 0 ; i < KMPMSortSnapMaxKey; i++ )
-                {
-                TInt err = RProperty::Get( KMPMSortSnapCategory, 
-                                           i, 
-                                           e );
-               CLOG_WRITEF( _L( "RProperty::Get returned: %d" ), err );
-               CLOG_WRITEF( _L( "Snap Id: %d" ), snapData.iSnap );
-               CLOG_WRITEF( _L( "Snap Number: %d" ), iSnapCount );
-
-                if (err == KErrNone)                            
-                    {
-                    iSnapIdArray[iSnapCount] = snapData.iSnap;
-                    iSnapCount++;
-                    }
-                }
-            //determine what method to use:
-            // we always have at least one snap element
-            // in P&S
-            // if we are called from MPM                
-            if (iSnapCount)
-                {
-                CLOG_WRITE( "iSSUState = EUsePubSub " );
-                iSSUState = EUsePubSub;       
-                }
-             else
-                {
-                CLOG_WRITE( "iSSUState = EUseMPM " );
-                iSSUState = EUseMPM;       
-                }
-            }
-        }
-    CLOG_LEAVEFN( "TSortSnapUtils::InitDestIdArray" );
-    }
-
-// ---------------------------------------------------------
-// TSortSnapUtils::GetDestIdArrayL
-// ---------------------------------------------------------
-//
-void TSortSnapUtils::GetDestIdArrayL( RCmManagerExt& aCmManagerExt, RArray<TUint32>& aDestArray )
-    {
-    CLOG_ENTERFN( "TSortSnapUtils::GetDestIdArrayL" );
-    aDestArray.Reset();
-    InitDestIdArray(); // re-read the values, set iSSUState
-    switch (iSSUState)
-        {
-        case EUsePubSub:
-            {
-            CLOG_WRITE( "Using P&S " );
-            // append from 1, do not append uncategorised destination!
-            for ( TInt i = 1 ; i < iSnapCount; i++ )
-                {
-                aDestArray.Append( iSnapIdArray[i] );
-                CLOG_WRITEF( _L( "Appending to array: Snap Id: %d" ), iSnapIdArray[i] );                
-                }
-            break;
-            }
-        case EUseMPM:
-            {
-            CLOG_WRITE( "Using MPM " );
-            aCmManagerExt.AllDestinationsL( aDestArray );
-            break;
-            }
-        case EUninitialised:
-        default:
-            {
-            //should not ever happen, as we initialise at the beginning of the 
-            // function
-            User::Leave( KErrNotReady );
-            }
-        }
-    CLOG_LEAVEFN( "TSortSnapUtils::GetDestIdArrayL" );
-    }
-
-// ---------------------------------------------------------
-// TSortSnapUtils::GetSortSnapDataL()
-// ---------------------------------------------------------
-//
-TInt TSortSnapUtils::GetSortSnapData( TUint32 aSnapId, TMpmSnapBuffer& aSnapBuffer )
-    {
-    CLOG_ENTERFN( "TSortSnapUtils::GetSortSnapDataL" );
-    
-    if (iSSUState ==  EUninitialised)
-        {
-        InitDestIdArray();
-        }
-    
-    switch (iSSUState)
-        {
-        case EUsePubSub:
-            {
-            CLOG_WRITE( "Using P&S " );
-            TMpmSnapPubSubFormat snapData;
-            TPtr8 e( reinterpret_cast< TUint8* >( &snapData ), 
-            sizeof( snapData ) );
-            // initialize snap to invalid value
-            snapData.iSnap = (TUint32) KErrNotFound;
-            for ( TInt i = 0 ; i < iSnapCount; i++ )
-                {
-                if ( aSnapId == iSnapIdArray[i] )
-                    {
-                    
-                    TInt err = RProperty::Get( KMPMSortSnapCategory, 
-                                               i, 
-                                               e );
-                    CLOG_WRITEF( _L( "RProperty::Get returned: %d" ), err );
-
-                    if (err == KErrNone)                            
-                        {
-                        if ( aSnapId == snapData.iSnap )
-                            {
-                            aSnapBuffer = snapData.iSortedIaps;
-                            
-                            CLOG_WRITEF( _L( "Found: Snap id: %d" ), snapData.iSnap );
-                            CLOG_WRITEF( _L( "Iap count: %d" ), snapData.iSortedIaps.iCount );
-                            
-                            CLOG_LEAVEFN( "TSortSnapUtils::GetSortSnapDataL" );
-                            return KErrNone;
-                            }
-                        }
-                    else
-                        {
-                        CLOG_LEAVEFN( "TSortSnapUtils::GetSortSnapDataL" );
-                        return err;
-                        }
-                    }
-                }
-            break;    
-            }
-        case EUseMPM:
-            {
-            CLOG_WRITE( "Using MPM " );
-            TInt errConnect = iMPM.Connect();
-            CLOG_WRITEF( _L( "errConnect = %d" ), errConnect );
-            if ( errConnect == KErrNone )
-                {
-                TInt err = iMPM.SortSNAP( aSnapId, aSnapBuffer ); 
-                iMPM.Close();
-                CLOG_LEAVEFN( "TSortSnapUtils::GetSortSnapDataL" );
-                return err;       
-                }
-            else
-                {
-                CLOG_LEAVEFN( "TSortSnapUtils::GetSortSnapDataL" );
-                return errConnect;
-                }
-            }
-        case EUninitialised:
-        default:
-            {
-            //should not ever happen, as we initialise at the beginning of the 
-            // function            
-            CLOG_LEAVEFN( "TSortSnapUtils::GetSortSnapDataL" );
-            return KErrNotReady;
-            }
-        }
-    return KErrNone;
-    }
-
--- a/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ecomsrc/connectiondialogswrapper.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,6 @@
 
 #include <ecom/implementationproxy.h>
 #include <AknNotifierWrapper.h> // link against aknnotifierwrapper.lib
-#include <wifiprotuiddefs.h>
 
 
 // CONSTANTS
@@ -102,19 +101,6 @@
                                             KUidCConnDlgSelectConn,
                                             KMyPriority ) );
 
-_LIT( KWiFiProtSetupPluginName , "wifiprotplugin.dll" );
-   master = 
-        CAknCommonNotifierWrapper::NewL( KUidWiFiProtSetup,
-                                         KUidWiFiProtSetup,
-                                         KMyPriority,
-                                         KWiFiProtSetupPluginName,
-                                         1 ); // we don't use synch reply
-
-    CleanupStack::PushL( master );   
-    subjects->AppendL( master );
-    CleanupStack::Pop( master );
-
-
     // Disconnect dialog
     subjects->AppendL( CAknCommonNotifierWrapper::NewL( KUidDisconnectDlg,
                                                         KUidDisconnectDlg,
@@ -172,27 +158,17 @@
                                                         KMyPriority ) );
                                                         
     // WLAN wrappers
+                                                        
+    subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master,
+                                            KUidWlanPowerSaveTestNote,
+                                            KUidWlanPowerSaveTestNote,
+                                            KMyPriority ) );
                                             
     subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master,
                                             KUidEasyWapiDlg,
                                             KUidEasyWapiDlg,
                                             KMyPriority ) );
 
-    subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master,
-                                            KUidNoWLANNetworksAvailableNote,
-                                            KUidNoWLANNetworksAvailableNote,
-                                            KMyPriority ) );   
-
-    subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master,
-                                            KUidConnectingViaDiscreetPopup,
-                                            KUidConnectingViaDiscreetPopup,
-                                            KMyPriority ) );
-
-    subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master,
-                                            KUidConnectionErrorDiscreetPopup,
-                                            KUidConnectionErrorDiscreetPopup,
-                                            KMyPriority ) );                                                                                           
-                                            
     CleanupStack::Pop();    // array cleanup
     return( subjects );
     }
--- a/connectionutilities/ConnectionDialogs/group/CConnDlgClient.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/CConnDlgClient.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -31,7 +31,6 @@
 
 SOURCEPATH  ../cconndlg/clientsrc
 SOURCE GenConAgentDialogServer.cpp
-SOURCE ActiveLogin.cpp
 
 USERINCLUDE     ../cconndlg/inc ../cconndlg/clientinc
 
--- a/connectionutilities/ConnectionDialogs/group/CConnDlgPlugin.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/CConnDlgPlugin.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -41,24 +41,11 @@
 //Macro to /epoc32 headers
 MW_LAYER_SYSTEMINCLUDE
 
-
-START RESOURCE ../cconndlg/data/CConnDlgPlugin.rss
-HEADER
-TARGETPATH RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END  // RESOURCE
+SYSTEMINCLUDE   /epoc32/include/uikon
 
 
 SOURCEPATH  ../cconndlg/src
-SOURCE  ConnDlgPlugin.cpp IAPDialog.cpp  AuthenticationDialog.cpp
-SOURCE  ReconnectDialog.cpp NewIapDialog.cpp QosDialog.cpp
-SOURCE  ActiveIapPlugin.cpp
-SOURCE  ActiveBase.cpp
-SOURCE  SelectConnectionDialog.cpp
-SOURCE  ActiveSelectConnectionPlugin.cpp
-SOURCE  SelectExplicitDialog.cpp
-SOURCE  ActiveSelectExplicit.cpp
-SOURCE  sortsnaputils.cpp
+SOURCE  ConnDlgPlugin.cpp
 
 SOURCEPATH  ../src
 SOURCE  ConnectionInfo.cpp ConnectionInfoKey.cpp ConnectionInfoArray.cpp ExpiryTimer.cpp
@@ -81,16 +68,16 @@
 LIBRARY cmmanagerdatabase.lib
 LIBRARY	egul.lib
 
-LIBRARY vpnapi.lib
 
 DEBUGLIBRARY flogger.lib
 DEBUGLIBRARY efsrv.lib
 
 
 #ifdef WINSCW
-    DEFFILE ../cconndlg/BWinsCw/CConnDlgPlugin.DEF
+DEFFILE ../cconndlg/BWinsCw/CConnDlgPlugin.DEF
 #else
-    DEFFILE ../cconndlg/EABI/CCONNDLGPLUGIN.DEF
+DEFFILE ../cconndlg/EABI/CCONNDLGPLUGIN.DEF
 #endif
 
 // End of File
+
--- a/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/ConnUiUtilsNotif.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -65,18 +65,12 @@
 SOURCE      WLANNetworkUnavailableNoteNotif.cpp
 SOURCE      ActiveWLANNetworkUnavailableNote.cpp
 
-SOURCE      ConfirmationQuery.cpp
-SOURCE      ConfirmationQueryNotif.cpp
-SOURCE      ActiveConnectViaNote.cpp
-SOURCE      ConnectViaNoteNotif.cpp
 SOURCE      NoteDlgSuppressingSwitch.cpp
+SOURCE      wlanpowersavetest.cpp
+SOURCE      wlanpowersavetestnotif.cpp
 SOURCE      easywapidlgnotif.cpp
-SOURCE      nowlannetworksavailablenotif.cpp
-SOURCE      connectingviadiscreetpopup.cpp
-SOURCE      connectingviadiscreetpopupnotif.cpp
-SOURCE      connectionerrordiscreetpopup.cpp
-SOURCE      connectionerrordiscreetpopupnotif.cpp
-SOURCE      nowlansdiscreetpopup.cpp
+SOURCE      cellulardataconfirmation.cpp 
+SOURCE      devicedialogobserver.cpp
 
 SOURCEPATH  ../src
 SOURCE      ConnectionInfo.cpp
@@ -96,11 +90,11 @@
 MW_LAYER_SYSTEMINCLUDE
 
 SYSTEMINCLUDE   /epoc32/include/libc 
-
+SYSTEMINCLUDE   /epoc32/include/uikon
 
 LIBRARY     euser.lib eikdlg.lib eiksrv.lib cone.lib eikcore.lib eikcoctl.lib
 LIBRARY     bafl.lib avkon.lib AknSkins.lib Ecom.lib 
-LIBRARY		eiksrvui.lib
+LIBRARY     eiksrvui.lib
 LIBRARY     commonengine.lib
 LIBRARY     AKNNOTIFY.LIB
 LIBRARY     AknIcon.lib
@@ -112,11 +106,13 @@
 LIBRARY     charconv.lib
 
 LIBRARY     commdb.lib
-LIBRARY		  cmmanager.lib
+LIBRARY     cmmanager.lib
 LIBRARY     etel3rdparty.lib 
+LIBRARY     HbCore.lib
+LIBRARY     HbWidgets.lib
 
 #if defined(ARMCC)
-    DEFFILE ../ConnectionUiUtilities/EABI/ConnUiUtilsNotif.DEF
+DEFFILE ../ConnectionUiUtilities/EABI/ConnUiUtilsNotif.DEF
 #elif defined( WINSCW )
     DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnUiUtilsNotif.DEF
 #endif
--- a/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/ConnectionUiUtilities.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -23,6 +23,7 @@
 
 TARGET      ConnectionUiUtilities.dll
 TARGETTYPE  DLL
+UID         0x1000008d 0x2002FF74
 
 CAPABILITY CAP_GENERAL_DLL
 VENDORID VID_DEFAULT
@@ -43,7 +44,7 @@
 SOURCE ChangeConnectionDlg.cpp
 SOURCE ActiveCChangeConnectionDlg.cpp
 SOURCE ActiveWrapper.cpp
-
+SOURCE connectionstatuspopup.cpp
 
 SOURCEPATH ../src
 SOURCE ConnectionInfo.cpp
@@ -52,11 +53,11 @@
 SOURCE ActiveIAPListing.cpp
 SOURCE ExpiryTimer.cpp
 
-
 USERINCLUDE	    ../ConnectionUiUtilities/inc
 
 // Component specific internal headers 
 USERINCLUDE			../inc
+USERINCLUDE         ../traces
 
 // ADO specific internal headers 
 SYSTEMINCLUDE		../../../inc
@@ -64,23 +65,31 @@
 //Macro to /epoc32 headers
 MW_LAYER_SYSTEMINCLUDE
 
+// Hb orbit headers
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets
+
 LIBRARY euser.lib cone.lib eikcore.lib eikcoctl.lib avkon.lib eikdlg.lib 
 LIBRARY bafl.lib commonengine.lib commdb.lib AknSkins.lib FeatMgr.lib 
 LIBRARY AknNotify.lib
 LIBRARY Ecom.lib
 LIBRARY	centralrepository.lib 
 LIBRARY	aknlayout.lib 
+LIBRARY hbcore.lib
+LIBRARY hbwidgets.lib
+LIBRARY cmmanager.lib
+LIBRARY efsrv.lib
 
 DEBUGLIBRARY flogger.lib
 
 
 #if defined( ARMCC )
 
-    DEFFILE ../ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROT.def
+DEFFILE ../ConnectionUiUtilities/EABI/ConnectionUiUtilities_PROT.def
 
 #elif defined( WINSCW )
 
-    DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROT.def
+DEFFILE ../ConnectionUiUtilities/BWinsCw/ConnectionUiUtilities_PROT.def
 
 #endif
 
--- a/connectionutilities/ConnectionDialogs/group/DisconnectDlg.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/DisconnectDlg.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -62,6 +62,8 @@
 //Macro to /epoc32 headers
 MW_LAYER_SYSTEMINCLUDE
 
+SYSTEMINCLUDE   /epoc32/include/uikon
+
 
 LIBRARY euser.lib
 LIBRARY cone.lib
--- a/connectionutilities/ConnectionDialogs/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -27,7 +27,6 @@
 // export iby files
 ../rom/agentdialog.iby				CORE_MW_LAYER_IBY_EXPORT_PATH(agentdialog.iby)
 ../rom/cconndlg.iby				CORE_MW_LAYER_IBY_EXPORT_PATH(cconndlg.iby)
-../rom/cconndlgResources.iby			LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(cconndlgResources.iby)
 
 ../rom/ConnectionDialogs.iby			CORE_MW_LAYER_IBY_EXPORT_PATH(ConnectionDialogs.iby)
 
--- a/connectionutilities/ConnectionDialogs/inc/ConnectionDialogsNotifBase.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/inc/ConnectionDialogsNotifBase.h	Tue Aug 31 15:35:44 2010 +0300
@@ -108,20 +108,6 @@
         void ConstructL( const TDesC& aResourceFileName,
                          const TBool aResourceFileResponsible );
 
-        /**
-        * ScreenSaverOn()
-        * @param  -
-        * return  ETrue if Screen saver is on, EFalse if not.
-        */
-        TBool ScreenSaverOn();
-
-        /**
-        * AutolockOn()
-        * @param  -
-        * return  ETrue if Autolock is on, EFalse if not.
-        */
-        TBool AutolockOn();
-
     private:
 
         /**
--- a/connectionutilities/ConnectionDialogs/inc/ConnectionDialogsUidDefs.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/inc/ConnectionDialogsUidDefs.h	Tue Aug 31 15:35:44 2010 +0300
@@ -58,10 +58,12 @@
 const TUid KUidDisconnectDlg = { 0x101F85F1 };
 
 // ID of Connecting via discreet popup
-const TUid KUidConnectingViaDiscreetPopup = { 0x20026FC5 };
+// Deprecated. Left here for documentation purpose.
+// const TUid KUidConnectingViaDiscreetPopup = { 0x20026FC5 };
 
 // ID of Connection error discreet popup
-const TUid KUidConnectionErrorDiscreetPopup = { 0x20026FEF };
+// Deprecated. Left here for documentation purpose.
+// const TUid KUidConnectionErrorDiscreetPopup = { 0x20026FEF };
 
 // WLAN uids
 
@@ -90,11 +92,15 @@
 // ID of two info notes
 const TUid KUidConnectViaNote = { 0x10281BB0 };
 
+// ID of WLAN Power Save Test query
+const TUid KUidWlanPowerSaveTestNote = { 0x101F6D4F };
+
 // ID of Easy Wapi dialog
 const TUid KUidEasyWapiDlg = { 0x101F6D51 };
 
 // ID of No WLAN networks are available at the moment -note
-const TUid KUidNoWLANNetworksAvailableNote = { 0x20016A83 };
+// Deprecated. Left here for documentation purpose.
+// const TUid KUidNoWLANNetworksAvailableNote = { 0x20016A83 };
 
 #endif  // __CONNECTIONDIALOGSUIDDEFS_H__
 
--- a/connectionutilities/ConnectionDialogs/inc/ConnectionInfo.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/inc/ConnectionInfo.h	Tue Aug 31 15:35:44 2010 +0300
@@ -102,7 +102,7 @@
         * Returns iId member
         * @return iId member
         */
-        inline const TUint32 Id() const;
+        inline TUint32 Id() const;
 
         /**
         * ListItem() function
@@ -123,7 +123,7 @@
         * Returns iVPN_iap_id member
         * @return iVPN_iap_id member
         */
-        inline const TUint32 VPNIapId() const;
+        inline TUint32 VPNIapId() const;
 
 
         /**
@@ -131,7 +131,7 @@
         * Returns iDestinationId member
         * @return iDestinationId member
         */
-        inline const TUint32 DestinationId() const;
+        inline TUint32 DestinationId() const;
 
 
         /**
@@ -139,7 +139,7 @@
         * Tells if connection is VPN
         * @return ETrue if connection is VPN
         */
-        inline const TBool IsVPN() const;
+        inline TBool IsVPN() const;
 
 
     private:    // Data
--- a/connectionutilities/ConnectionDialogs/inc/ConnectionInfo.inl	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/inc/ConnectionInfo.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -28,7 +28,7 @@
 // CConnectionInfo::Id
 // ---------------------------------------------------------
 //
-const TUint32 CConnectionInfo::Id() const
+TUint32 CConnectionInfo::Id() const
     {
     return iId;
     }
@@ -58,7 +58,7 @@
 // CConnectionInfo::VPNIapId()
 // ---------------------------------------------------------
 //
-const TUint32 CConnectionInfo::VPNIapId() const
+TUint32 CConnectionInfo::VPNIapId() const
     {
     return iVPN_iap_id;
     }
@@ -68,7 +68,7 @@
 // CConnectionInfo::DestinationId()
 // ---------------------------------------------------------
 //
-const TUint32 CConnectionInfo::DestinationId() const
+TUint32 CConnectionInfo::DestinationId() const
     {
     return iDestinationId;
     }
@@ -78,7 +78,7 @@
 // CConnectionInfo::VPNIapId()
 // ---------------------------------------------------------
 //
-const TBool CConnectionInfo::IsVPN() const
+TBool CConnectionInfo::IsVPN() const
     {
     return iIsVPN;
     }
--- a/connectionutilities/ConnectionDialogs/rom/cconndlgResources.iby	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CCONNDLGRESOURCES_IBY__
-#define __CCONNDLGRESOURCES_IBY__
-
-data=DATAZ_\RESOURCE_FILES_DIR\CConndlgplugin.rsc	RESOURCE_FILES_DIR\CConndlgplugin.rsc
-
-#endif
\ No newline at end of file
--- a/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/src/ActiveIAPListing.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -92,10 +92,16 @@
 CActiveIAPListing::CActiveIAPListing( const TConnectionPrefs& aPrefs )
 : CActive( EPriorityUserInput ), 
   iDb( NULL ), 
+  iPeriodic( NULL ),
   iWaitDialog( NULL ), 
 #ifndef __WINS__
   iWlanMgmt( NULL ),
 #endif // !__WINS__
+  iIAPs( NULL ),
+  iWlanIAPs( NULL ),
+  iActIAPs( NULL ),
+  iClientStatus( NULL ),
+  iIsWLANFeatureSupported( EFalse ),
   iPrefs( aPrefs )
     {
     }
--- a/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -18,19 +18,12 @@
 
 // INCLUDE FILES
 
-#include <e32property.h>
-#include <ScreensaverInternalPSKeys.h>
-#include <coreapplicationuisdomainpskeys.h>
+#include "ConnectionDialogsNotifBase.h"
+
 #include <bautils.h>
 #include <eikenv.h>
 #include <data_caging_path_literals.hrh>
 
-#include "ConnectionDialogsLogger.h"
-#include "ConnectionDialogsNotifBase.h"
-
-#ifdef _DEBUG
-#include <e32debug.h>
-#endif
 
 // CONSTANTS
 
@@ -95,9 +88,13 @@
 // ---------------------------------------------------------
 //
 CConnectionDialogsNotifBase::CConnectionDialogsNotifBase()
-: iCancelled( EFalse ), 
+: iReplySlot( 0 ),
+  iCancelled( EFalse ),
   iResource( 0 )
     {
+    iInfo.iUid = TUid::Null();
+    iInfo.iChannel = TUid::Null();
+    iInfo.iPriority = 0;
     }
 
 
@@ -137,55 +134,6 @@
         }
     }
 
-// ---------------------------------------------------------
-// CConnectionDialogsNotifBase::ScreenSaverOn()
-// ---------------------------------------------------------
-//
-TBool CConnectionDialogsNotifBase::ScreenSaverOn()
-    {
-    TInt err( KErrNone );
-    TInt screenSaverOn( 0 );
-
-    // Cancel the dialog if screen saver is on.
-    err = RProperty::Get( KPSUidScreenSaver, 
-            KScreenSaverOn, 
-            screenSaverOn );
-    
-    return (err == KErrNone && screenSaverOn > 0); 
-    }
-
-// ---------------------------------------------------------
-// CConnectionDialogsNotifBase::AutolockOn()
-// ---------------------------------------------------------
-//
-TBool CConnectionDialogsNotifBase::AutolockOn()
-    {
-    TBool retval( EFalse );
-
-    CLOG_ENTERFN( "CConnectionDialogsNotifBase::AutolockOn" );
-    
-#ifdef RD_STARTUP_CHANGE
-    TInt err( KErrNone );
-    TInt autolockOn( 0 );
-    // Cancel the dialog if screen saver is on.
-    err = RProperty::Get( KPSUidCoreApplicationUIs, 
-            KCoreAppUIsAutolockStatus, 
-            autolockOn );
-    // In boot there may come EAutolockStatusUninitialized, when it should be EAutolockOn...
-    retval = (err == KErrNone && autolockOn != EAutolockOff); 
-
-#ifdef _DEBUG
-    RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: autolockOn: %d"), autolockOn );
-    RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: err: %d"), err );
-    RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: %d"), retval );
-#endif
-    
-#endif // RD_STARTUP_CHANGE
-    
-    CLOG_LEAVEFN( "CConnectionDialogsNotifBase::AutolockOn" );
-
-    return retval; 
-    }
 
 
 // End of File
--- a/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/src/ConnectionInfoKey.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -29,7 +29,9 @@
 //
 CConnectionInfoKey::CConnectionInfoKey( TBool aIsWLANFeatureSupported )
 : TKeyArrayFix( 0, ECmpCollated ),
-  iIsWLANFeatureSupported( aIsWLANFeatureSupported )
+  iPtr( NULL ),
+  iIsWLANFeatureSupported( aIsWLANFeatureSupported ),
+  iNameEasyWLAN( NULL )
     {
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/confirmqueries.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Prompt Dialog build file
+#
+#
+
+TEMPLATE = lib
+TARGET = cellularpromptdialogplugin
+CONFIG += hb plugin
+
+# directories
+INCLUDEPATH += .
+DEPENDPATH += .
+DESTDIR = $${HB_BUILD_DIR}/plugins/devicedialogs
+
+
+HEADERS += inc/cellularpromptdialog.h  \
+           inc/cellularpromptdialogplugin.h \
+           traces/OstTraceDefinitions.h
+
+SOURCES += src/cellularpromptdialog.cpp \
+           src/cellularpromptdialogplugin.cpp
+
+symbian: {
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.UID3 = 0x2002C2F7
+    BLD_INF_RULES.prj_exports += "rom/promptdialogplugin.iby CORE_APP_LAYER_IBY_EXPORT_PATH(promptdialogplugin.iby)"
+    BLD_INF_RULES.prj_exports += "rom/promptdialogplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(promptdialogplugin_resources.iby)"
+
+    pluginstub.sources = cellularpromptdialogplugin.dll
+    pluginstub.path = /resource/plugins/devicedialogs
+    DEPLOYMENT += pluginstub
+}
+TRANSLATIONS = cellularpromptdialog.ts
+
+RESOURCES += res/promptdialog.qrc
+
+DOCML += \
+    res/prompt_home.docml \
+    res/prompt_abroad.docml
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/inc/cellularpromptdialog.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __CELLULARPROMPTDIALOG_H__
+#define __CELLULARPROMPTDIALOG_H__
+
+#include <QObject>
+#include <HbDialog>
+#include <hbdevicedialoginterface.h>
+#include <QSharedPointer>
+
+// Forward declarations
+class HbTranslator;
+
+class CellularPromptDialog: public HbDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        CellularPromptDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~CellularPromptDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters);
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+        
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when one of the buttons is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the first button's Clicked signal */
+        void firstButtonPressed();
+        
+        /* Slot that is mapped to the second button's Clicked signal */
+        void middleButtonPressed();
+        
+        /* Slot that is mapped to the cancel button's Clicked signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+        
+    private:
+        Q_DISABLE_COPY(CellularPromptDialog)
+   
+    private:
+        /* Pointer to the confml dialog object */
+        HbDialog *mDialog;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+
+        /* Translator for the localisation Text Id's */
+        QSharedPointer<HbTranslator> mTranslator;
+    };
+
+
+#endif // __CELLULARPROMPTDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/inc/cellularpromptdialogplugin.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef ____CELLULARPROMPTDIALOG_H__PLUGIN_H__
+#define ____CELLULARPROMPTDIALOG_H__PLUGIN_H__
+
+#include <QObject>
+#include <hbdevicedialogplugin.h>
+
+class CellularPromptDialog;
+
+class CellularPromptDialogPlugin : public HbDeviceDialogPlugin
+{
+    Q_OBJECT
+
+public:
+    
+    /* Constructor */
+    CellularPromptDialogPlugin();
+    /* Destructor */
+    ~CellularPromptDialogPlugin();
+    
+    /* Check whether access is allowed, true is always returned */
+    bool accessAllowed(const QString &deviceDialogType,
+        const QVariantMap &parameters, const QVariantMap &securityInfo) const;
+    
+    /* Creates the dialog widget */
+    HbDeviceDialogInterface *createDeviceDialog(const QString &deviceDialogType,
+        const QVariantMap &parameters);
+    
+    /* Returns the device dialog type */
+    bool deviceDialogInfo(const QString &deviceDialogType,
+        const QVariantMap &parameters, DeviceDialogInfo *info) const;
+    
+    /* Returns a list of dialog types that this plugin implements.
+     * Only one dialog type is supported.
+     */
+    QStringList deviceDialogTypes() const;
+    
+    /* Returns the possible plugin flags, there are none */
+    PluginFlags pluginFlags() const;
+    
+    /* Not supported */
+    int error() const;
+
+private:
+    Q_DISABLE_COPY(CellularPromptDialogPlugin)
+
+};
+
+#endif // ___CELLULARPROMPTDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/res/prompt_abroad.docml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+    <widget name="dialog" type="HbDialog">
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            <string name="plainText" value="=== Heading ==="/>
+        </widget>
+        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="label" type="HbLabel">
+                <enums name="textWrapping" value="TextWordWrap"/>
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="40un"/>
+                <bool name="visible" value="TRUE"/>
+                <string name="plainText" value="Lorem ipsum dolot sit amet, consecterur adispicing elit, sed do eiusmod temopr incidictunt."/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+            </widget>
+            <widget name="topButton" type="HbPushButton">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-touch-area-gene-primary-medium)" type="PREFERRED"/>
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <string name="text" value="Push Button"/>
+                <bool name="visible" value="TRUE"/>
+            </widget>
+            <widget name="cancelButton" type="HbPushButton">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-touch-area-gene-primary-medium)" type="PREFERRED"/>
+                <string name="text" value="Push Button"/>
+                <bool name="visible" value="TRUE"/>
+            </widget>
+            <real name="z" value="0"/>
+            <layout orientation="Vertical" spacing="expr(var(hb-param-margin-gene-bottom)+var(hb-param-margin-gene-top))" type="linear">
+                <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+                <linearitem itemname="label" spacing="expr(var(hb-param-margin-gene-middle-vertical)+var(hb-param-margin-gene-top))"/>
+                <linearitem itemname="topButton"/>
+                <linearitem itemname="cancelButton"/>
+            </layout>
+        </widget>
+    </widget>
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/res/prompt_home.docml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+    <widget name="dialog" type="HbDialog">
+        <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            <string name="plainText" value="=== Heading ==="/>
+        </widget>
+        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="label" type="HbLabel">
+                <enums name="textWrapping" value="TextWordWrap"/>
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="40un"/>
+                <bool name="visible" value="TRUE"/>
+                <string name="plainText" value="Lorem ipsum dolot sit amet, consecterur adispicing elit, sed do eiusmod temopr incidictunt."/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+            </widget>
+            <widget name="topButton" type="HbPushButton">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-touch-area-gene-primary-medium)" type="PREFERRED"/>
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <string name="text" value="Push Button"/>
+                <bool name="visible" value="TRUE"/>
+            </widget>
+            <widget name="middleButton" type="HbPushButton">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-touch-area-gene-primary-medium)" type="PREFERRED"/>
+                <string name="text" value="Push Button"/>
+                <bool name="visible" value="TRUE"/>
+            </widget>
+            <widget name="cancelButton" type="HbPushButton">
+                <sizepolicy horizontalPolicy="Minimum" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-touch-area-gene-primary-medium)" type="PREFERRED"/>
+                <string name="text" value="Push Button"/>
+                <bool name="visible" value="TRUE"/>
+            </widget>
+            <real name="z" value="0"/>
+            <layout orientation="Vertical" spacing="expr(var(hb-param-margin-gene-bottom)+var(hb-param-margin-gene-top))" type="linear">
+                <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+                <linearitem itemname="label" spacing="expr(var(hb-param-margin-gene-middle-vertical)+var(hb-param-margin-gene-top))"/>
+                <linearitem itemname="topButton"/>
+                <linearitem itemname="middleButton"/>
+                <linearitem itemname="cancelButton"/>
+            </layout>
+        </widget>
+    </widget>
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/res/promptdialog.qrc	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,6 @@
+<RCC>
+    <qresource prefix="/xml" >
+        <file alias="prompt_home.docml">prompt_home.docml.bin</file>
+        <file alias="prompt_abroad.docml">prompt_abroad.docml.bin</file>
+    </qresource>
+</RCC>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/rom/promptdialogplugin.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+ 
+#ifndef __PROMPTDIALOGPLUGIN_IBY__
+#define __PROMPTDIALOGPLUGIN_IBY__
+
+#include <bldvariant.hrh>
+
+#define HB_PLUGIN_STUB(NAME, SUBDIR) data=\epoc32\data\z\resource\plugins\##SUBDIR##\##NAME##.qtplugin RESOURCE_FILES_DIR\plugins\##SUBDIR##\##NAME##.qtplugin
+
+file=ABI_DIR\BUILD_DIR\CellularPromptDialogPlugin.dll                  SHARED_LIB_DIR\cellularpromptdialogplugin.dll
+HB_PLUGIN_STUB(cellularpromptdialogplugin, devicedialogs)
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/rom/promptdialogplugin_resources.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef PROMPTDIALOGPLUGIN_RESOURCES_IBY
+#define PROMPTDIALOGPLUGIN_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cellularpromptdialog.qm QT_TRANSLATIONS_DIR/cellularpromptdialog.qm 
+
+#endif // PROMPTDIALOGPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/src/cellularpromptdialog.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <HbTranslator>
+#include <QLocale>
+#include <QList>
+#include <HbLabel>
+#include <HbDialog>
+#include <HbDocumentLoader>
+#include <HbPushButton>
+#include <HbView>
+#include <HbApplication>
+#include "cellularpromptdialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cellularpromptdialogTraces.h"
+#endif
+
+
+
+// The index numbers of the buttons of the dialog
+const int firstButtonIndex = 1;
+const int middleButtonIndex = 2;
+const int cancelButtonIndex = 3;
+
+/**
+ * The constructor
+ */
+CellularPromptDialog::CellularPromptDialog(const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_CELLULARPROMPTDIALOG_ENTRY );
+
+    // Install localization
+    mTranslator = QSharedPointer<HbTranslator>(new HbTranslator("cellularpromptdialog"));
+
+    createDialog(parameters);
+    mClose = false;
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_CELLULARPROMPTDIALOG_EXIT );
+}
+
+
+/**
+ * The construction of the dialog
+ */ 
+void CellularPromptDialog::createDialog(const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_CREATEDIALOG_ENTRY );
+    
+    // Set the button and label texts according to the network (home or abroad)
+    QString labelText;
+    QString button1Text;
+    QString button2Text;
+    QString button3Text(hbTrId("txt_occ_button_cellular_cancel"));
+    
+    // There is only one value in the QVariantMap that we are interested in,
+    // whether we are in home network or not
+    QList<QVariant> list = parameters.values();
+    bool homeNetwork = true;
+    
+    if (list.count() > 0) {
+        homeNetwork = list[0].toBool();
+    }
+    
+    if (homeNetwork) {
+        labelText = QString(hbTrId("txt_occ_title_connect_to_internet_using_cellular_d"));
+        button1Text = QString(hbTrId("txt_occ_button_connect_automatically"));
+        button2Text = QString(hbTrId("txt_occ_button_connect_this_time"));
+    } else {
+        labelText = QString(hbTrId("txt_occ_title_connect_to_internet_in_this_country"));
+        button1Text = QString(hbTrId("txt_occ_button_connect_this_time"));
+    }
+    
+    HbDocumentLoader loader;
+    bool ok = true;
+
+    if (homeNetwork) {
+        loader.load(":/xml/prompt_home.docml", &ok);
+    } else {
+        loader.load(":/xml/prompt_abroad.docml", &ok);
+    }
+
+    if ( !ok ) {
+        // send information about cancelling to the observer, the xml loading failed
+        cancelPressed();
+        OstTraceFunctionExit0( CELLULARPROMPTDIALOG_CREATEDIALOG_EXIT );
+        return;
+    }
+    
+    // store the pointer to the dialog in order to be able to delete
+    // it in the destructor
+    mDialog = qobject_cast<HbDialog*>( loader.findWidget ("dialog"));
+    Q_ASSERT(mDialog != NULL);
+    
+    // fetch the needed widgets, update their texts and connect the
+    // clicked signals of the buttons to correct slots.
+    HbWidget *container = qobject_cast<HbWidget*>( loader.findWidget ("container"));
+    this->setContentWidget(container);
+    
+    // Set the dialog to be on the screen for 30 seconds, unless
+    // the user reacts earlier
+    this->setModal(true);
+    this->setTimeout(30000);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+    
+    HbLabel* label = qobject_cast<HbLabel*>( loader.findWidget("label") );
+    Q_ASSERT(label != NULL);
+    label->setPlainText(labelText);
+    label->setTextWrapping(Hb::TextWordWrap);
+
+    HbPushButton* firstButton = qobject_cast<HbPushButton*>( loader.findWidget("topButton") );
+    Q_ASSERT(firstButton != NULL);
+    firstButton->setText(button1Text);
+    
+    HbPushButton* middleButton = NULL;
+    if ( homeNetwork ) {
+    middleButton = qobject_cast<HbPushButton*>( loader.findWidget("middleButton") );
+    Q_ASSERT(middleButton != NULL); 
+    middleButton->setText(button2Text);
+    } 
+    
+    HbPushButton* cancelButton = qobject_cast<HbPushButton*>( loader.findWidget("cancelButton") );
+    Q_ASSERT(cancelButton != NULL);
+    cancelButton->setText(button3Text);
+      
+    // Connect the button clicks to slots, assert if connecting fails
+    bool connected = connect( firstButton, SIGNAL(clicked()), this, SLOT( firstButtonPressed() ));
+    Q_ASSERT(connected == true);
+    
+    if ( homeNetwork ) {
+    connected = connect( middleButton, SIGNAL(clicked()), this, SLOT( middleButtonPressed() ));
+    Q_ASSERT(connected == true);
+    }
+    
+    connected = connect( cancelButton, SIGNAL(clicked()), this, SLOT( cancelPressed() ));
+    Q_ASSERT(connected == true);
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed, for example due to timeout
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_CELLULARPROMPTDIALOG_CREATEDIALOG_EXIT );
+}
+
+/**
+ * Destructor
+ */
+CellularPromptDialog::~CellularPromptDialog()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_DCELLULARPROMPTDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    if (mDialog != NULL) {
+        delete mDialog;
+    }
+    mDialog = NULL;
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_DCELLULARPROMPTDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the first button is pressed and the 
+ * index of the button is emitted
+ */
+void CellularPromptDialog::firstButtonPressed()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_FIRSTBUTTONPRESSED_ENTRY );
+    
+    QVariantMap data;
+    QVariant variant(firstButtonIndex);
+    data.insert("button", variant);
+    // emit the data of the selected button and close the dialog
+    emit deviceDialogData(data);
+    close();
+
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_FIRSTBUTTONPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the second button is pressed and the 
+ * index of the button is emitted
+ */
+void CellularPromptDialog::middleButtonPressed()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_MIDDLEBUTTONPRESSED_ENTRY );
+    
+    QVariantMap data;
+    QVariant variant(middleButtonIndex);
+    data.insert("button", variant);
+    // emit the data of the selected button and close the dialog
+    emit deviceDialogData(data);
+    close();
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_MIDDLEBUTTONPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the third button is pressed and the 
+ * index of the button is emitted
+ */
+void CellularPromptDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_CANCELPRESSED_ENTRY );
+    
+    QVariantMap data;
+    QVariant variant(cancelButtonIndex);
+    data.insert("button", variant);
+    // emit the data of the selected button and close the dialog
+    emit deviceDialogData(data);
+    close();
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ */
+void CellularPromptDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_CLOSINGDIALOG_ENTRY );
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(false);
+    }
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool CellularPromptDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int CellularPromptDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void CellularPromptDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    
+    Q_UNUSED(byClient)
+    close();
+    // If the user closes the dialog, then the deviceDialogClosed is emitted
+    emit deviceDialogClosed();
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *CellularPromptDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<CellularPromptDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/src/cellularpromptdialogplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog plugin implementation
+*
+*/
+
+
+#include <hbdevicedialoginterface.h>
+#include <QVariantMap>
+#include "cellularpromptdialogplugin.h"
+#include "cellularpromptdialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cellularpromptdialogpluginTraces.h"
+#endif
+
+
+/* Initializes the resource file */
+inline void initMyResource() { Q_INIT_RESOURCE(promptdialog); }
+/* removes the resource file */
+inline void cleanupMyResource() { Q_CLEANUP_RESOURCE(promptdialog); }
+ 
+
+Q_EXPORT_PLUGIN2(cellularpromptdialogplugin, CellularPromptDialogPlugin)
+
+
+// This plugin implements one device dialog type
+static const struct {
+    const char *mTypeString;
+} dialogInfos[] = {
+    {"com.nokia.ipconnmgmt.promptdialog/1.0"}
+};
+
+/**
+ * Constructor
+ */ 
+CellularPromptDialogPlugin::CellularPromptDialogPlugin()
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_CELLULARPROMPTDIALOGPLUGIN_ENTRY );
+    
+    // Initializes the resource file which contains the
+    // docml building up the dialog
+    initMyResource();
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_CELLULARPROMPTDIALOGPLUGIN_EXIT );
+}
+
+/**
+ * Destructor
+ */ 
+CellularPromptDialogPlugin::~CellularPromptDialogPlugin()
+{
+    OstTraceFunctionEntry0( DUP1_CELLULARPROMPTDIALOGPLUGIN_DCELLULARPROMPTDIALOGPLUGIN_ENTRY );
+    
+    // Remove the loaded resources
+    cleanupMyResource();
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_DCELLULARPROMPTDIALOGPLUGIN_EXIT );
+}
+
+/**
+ * Create device dialog widget
+ */ 
+HbDeviceDialogInterface *CellularPromptDialogPlugin::createDeviceDialog(
+    const QString &deviceDialogType,
+    const QVariantMap &parameters)
+{  
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_CREATEDEVICEDIALOG_ENTRY );
+    
+    Q_UNUSED(deviceDialogType)
+    CellularPromptDialog* dialog = new CellularPromptDialog(parameters);
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_CREATEDEVICEDIALOG_EXIT );
+    return dialog;
+}
+
+/**
+ * Check if client is allowed to use device dialog widget
+ */
+bool CellularPromptDialogPlugin::accessAllowed(const QString &deviceDialogType,
+    const QVariantMap &parameters, const QVariantMap &securityInfo) const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_ACCESSALLOWED_ENTRY );
+    
+    Q_UNUSED(deviceDialogType)
+    Q_UNUSED(parameters)
+    Q_UNUSED(securityInfo)
+
+    // This plugin doesn't perform operations that may compromise security.
+    // All clients are allowed to use.
+    return true;
+}
+
+/**
+ * Return information of device dialog the plugin creates
+ */ 
+bool CellularPromptDialogPlugin::deviceDialogInfo(const QString &deviceDialogType,
+    const QVariantMap &parameters, DeviceDialogInfo *info) const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_DEVICEDIALOGINFO_ENTRY );
+    
+    Q_UNUSED(parameters)
+    Q_UNUSED(deviceDialogType)
+    
+    info->group = GenericDeviceDialogGroup;
+    info->flags = NoDeviceDialogFlags;
+    info->priority = DefaultPriority;
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_DEVICEDIALOGINFO_EXIT );
+    return true;
+}
+
+/**
+ * Return device dialog types this plugin implements
+ */ 
+QStringList CellularPromptDialogPlugin::deviceDialogTypes() const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_DEVICEDIALOGTYPES_ENTRY );
+    
+    QStringList types;
+    const int numTypes = sizeof(dialogInfos) / sizeof(dialogInfos[0]);
+    for(int i = 0; i < numTypes; i++) {
+        types.append(dialogInfos[i].mTypeString);
+    }
+    
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_DEVICEDIALOGTYPES_EXIT );
+    return types;
+}
+
+/**
+ * Return plugin flags
+ */ 
+CellularPromptDialogPlugin::PluginFlags CellularPromptDialogPlugin::pluginFlags() const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_PLUGINFLAGS_ENTRY );   
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_PLUGINFLAGS_EXIT );
+    return NoPluginFlags;
+}
+
+/**
+ * The last error is not stored, not supported
+ */ 
+int CellularPromptDialogPlugin::error() const
+{
+    OstTraceFunctionEntry0( CELLULARPROMPTDIALOGPLUGIN_ERROR_ENTRY );
+    OstTraceFunctionExit0( CELLULARPROMPTDIALOGPLUGIN_ERROR_EXIT );
+    return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/connectionutilities.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS  += confirmqueries
+
+CONFIG += ordered
+						
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build info for ipconnmgmt package. 
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Export CommsDat to emulator
+cccccc00_emulator.cre   /epoc32/winscw/c/private/10202be9/persists/cccccc00.cre
+
+// Export default configuration options
+../inc/meshpreface1.cfg         /epoc32/release/winscw/udeb/z/system/data/meshpreface1.cfg
Binary file data/cccccc00_emulator.cre has changed
--- a/dbcreator/commsdatcreator/Inc/cdcprocessordn.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Inc/cdcprocessordn.h	Tue Aug 31 15:35:44 2010 +0300
@@ -114,14 +114,7 @@
         * Writes the actual created access point to the log file.
         */
         void DoLogL();
-    
-    private:
-        /**
-        * Helper function for creating destinations. 
-        * @param aDnId Destination ID for the new destination
-        */
-        void CreateDestination( TInt aDnId );
-        
+            
     private:
     
         // @var The destiantion that is created
--- a/dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Inc/cdcprocessorglobal.h	Tue Aug 31 15:35:44 2010 +0300
@@ -62,12 +62,8 @@
                                 RPointerArray< RCmConnectionMethodExt >& aPluginArray,
                                 RPointerArray< HBufC >& aPluginNames, 
                                 RPointerArray< RCmDestinationExt >& aDestArray,
-                                RPointerArray< HBufC >& aDestNames,
-                                RPointerArray< HBufC >& aDefCon );
+                                RPointerArray< HBufC >& aDestNames );
 
-        // Stores the default connection values
-        void SetDefaultConnectionL();
-        
         /**
         * Destructor.
         */
@@ -84,8 +80,7 @@
                           RPointerArray< RCmConnectionMethodExt >& aPluginArray,
                           RPointerArray< HBufC >& aPluginNames, 
                           RPointerArray< RCmDestinationExt >& aDestArray,
-                          RPointerArray< HBufC >& aDestNames,
-                          RPointerArray< HBufC >& aDefCon);
+                          RPointerArray< HBufC >& aDestNames );
                           
         /**
         * Second phase constructor. Leaves on failure.
@@ -119,22 +114,7 @@
         void UpdateGlobalBearerArrayL
                             ( TDbCreatorGlobalSettings aField, TUint32 aPrio );
                 
-        /**
-        * Sets the value of default connection type parsing and converting
-        *                           the param string to the right enum. 
-        * @param aPtrTag string of the type.
-        */
-        void SetDefaultConnectionTypeL( HBufC16* aPtrTag );
-                            
-        /**
-        * Sets the id of default connection method. It founds the connection
-        *     method or destination corresponding to the given name.
-        *     Type depends on the default connection type.
-        *     If the method/destination cannot be found then no id is set.
-        * @param aPtrTag string of the connection method/destination name.
-        */
-        void SetDefaultConnectionNameL( HBufC16* aPtrTag );
-
+                         
         /**
         * Sets the WLAN Usage parameter in general connection settings.
         * @param aPtrTag string containing the parameter's value.
@@ -158,9 +138,6 @@
         // Stores the general connection settings, using CMM
         void SetGenConnSettingsL();
         
-        // Stores the default connection's values, using CMM
-        void SetDefConnRecordL( const TInt aId );
-        
         // Stores the WLAN parameters
         void SaveGlobalWlanParameterL( const TUint32 aTableType, 
         							   const TDbCreatorGlobalSettings aField, 
@@ -168,9 +145,6 @@
 
     private:
         
-        // @var Default connection's data
-        TCmDefConnType iDefaultConnectionType;
-        TBool iDefaultConnectionSet;
 
         // @var GPRS attach mode : whenneeded/whenavailable
         TBool  iAttachWhenNeeded;
@@ -178,9 +152,6 @@
         RArray< TBearerPriority > iBearerArray;
         TBool iBearerArrayChanged;
         
-        // @var Stores the default connection type / name pair
-        RPointerArray< HBufC >* iDefCon; 
-        
         // @var Stores the general connection settings
         TCmGenConnSettings* iGenConnSettings;
         
--- a/dbcreator/commsdatcreator/Inc/cdcprocessorvpn.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Inc/cdcprocessorvpn.h	Tue Aug 31 15:35:44 2010 +0300
@@ -84,12 +84,8 @@
                        RPointerArray< HBufC >& aUnderLying );
         
         /**
-        * From CProcessorBase. Processes the actual tag.
-        * @param aFieldIDPresent shows if field id is read from input file
-        * @return the result of the process, KErrNone if the actual tag is
-        * valid.
+        * From CProcessorBase. 
         */
-        ////virtual void ProcessTagL( TBool aFieldIDPresent );
         virtual void ProcessSpecialFieldsL( TInt aField, HBufC* aTagPtr, TInt aDx );
 
     private:
@@ -105,4 +101,4 @@
 #endif PROCESSOR_VPN_H
 
 
-// End of File.
\ No newline at end of file
+// End of File.
--- a/dbcreator/commsdatcreator/Inc/cdcprocessorwlan.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Inc/cdcprocessorwlan.h	Tue Aug 31 15:35:44 2010 +0300
@@ -28,7 +28,8 @@
 #include <cmmanagerext.h>
 #include <cmconnectionmethodext.h>
 #include <metadatabase.h>
-#include <EapSettings.h>
+#include <EapGeneralSettings.h>
+#include <EapExpandedType.h>
 
 #include "cdcprocessorbase.h"
 
@@ -49,7 +50,7 @@
         ~CEapTypeElement();
 		HBufC* iName;
         EAPSettings* iEapSettings; 
-        EAPSettings::TEapType iEncapsulatingEapId;
+        TEapExpandedType iEncapsulatingEapId; 
         };
 
 
@@ -220,6 +221,13 @@
         void SaveWPAL( TUint32 aIapId );
         
         /**
+        * Gets the expanded EAP type
+        * @param aFieldId is the id of the field 
+        * @return expanded EAP type
+        */
+        TEapExpandedType GetExpandedEapTypeIdL( TDesC& aField );
+        
+        /**
         * Gets the TagContainer index that belongst to the given WPA field
         * @param aFieldId is the id of the field 
         * @return index in TagContainer
@@ -260,51 +268,25 @@
         
         /*
          * Sets the values of the expanded Eap lists to the database 
-         * @param aGeneric for accessing the database records 
+         * @param aServiceId for accessing the EAP data 
          */
-        void SetExpandedEapListL( CMDBGenericRecord* aGeneric );
+        void SetExpandedEapListL( const TUint aServiceId );
         
-        /*
-         * Creates expanded Eap list from the common Eap list
-         * @param aEapList the common Eap list from which the expanded list
-         *              will be created 
-         * @param aEnabledNeed indicates the type of the result expanded  
-         *           Eap list. If it is ETrue then the enabled expanded
-         *           Eap list will be created. Else the disbled one.
-         * @return The created expanded Eap list. It can be empty. 
-         */
-        HBufC8* ExpandedEapListLC( HBufC16* aEapList, TBool aEnabledNeed );
-  
-        /*
-         * Adds one item to the expanded Eap list
-         * @param aExpandedEapList to which the new item will be added.
-         * @param aSlice the common Eap list slice containing one 
-         *              3 digit long number with sign.
-         */
-        void AddToList( HBufC8* aExpandedEapList, TPtrC16 aSlice );
-
     private:
     
         void AddSecurityDataL( TInt aField, HBufC* aPtrTag, TBool aIsWep );
 
-		void AddEAPSettingL( const TInt aField, const HBufC16* const aValue );
+		void AddEAPSettingL( const TInt aField, HBufC16* aValue );
 		
 		TBool EAPSetting( const TInt aField );
 	
 		void FillCipherSuitesL( const HBufC16* const aPtrTag, const TInt aEapIndex );
 		
-		EAPSettings::TEapType GetEapTypeIdFromSettingId( const TInt aField );
-		
-		TUint FindCertificateEntryL( const CertificateEntry::TCertType aCertType, const TInt aEapIndex );
+		TEapExpandedType GetEapTypeIdFromSettingId( const TInt aField ); 
 		
-		void ConvertSubjectKeyIdToBinaryL( const HBufC16* const aSubjectKeyIdString, TDes& aBinaryKey);
-        /*
-        // @var Stores indexes of WEP fields
-        TInt iWEPIndex[KWEPKeyNumOfFields];
-        
-        // @var Stores indexes of WPA fields
-        TInt iWPAIndex[KWPAKeyNumOfFields];
-        */
+		TUint FindCertificateEntryL( const EapCertificateEntry::TCertType aCertType, const TInt aEapIndex );
+		
+		void ConvertSubjectKeyIdToBinaryL( const HBufC16* const aSubjectKeyIdString, TKeyIdentifier& aBinaryKey);
         
         // @var Indicates the WLAN security mode
         TDbCreatorSecurityMode iSecurityMode;
@@ -322,15 +304,9 @@
        
         // @var HBufC for empty WEP and WPA tags
         HBufC* iEmptyTag;
-
-        // @var Stores indexes of WEP fields
-        ////RPointerArray< HBufC > iWepData;
         
         HBufC* iWepData[KWEPKeyNumOfFields];
         
-        // @var Stores indexes of WPA fields
-        ////RPointerArray< HBufC > iWpaData;
-        
         HBufC* iWpaData[KWPAKeyNumOfFields];
 
         TInt iDataStart;
@@ -343,4 +319,4 @@
 #endif PROCESSOR_WLAN_H
 
 
-// End of File.
\ No newline at end of file
+// End of File.
--- a/dbcreator/commsdatcreator/Src/cdccommsdatcreator.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdccommsdatcreator.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -150,8 +150,6 @@
     CLOG_WRITE( "Processing started...\n" )
     CLOG_WRITE( "=====================\n" )               
 
-	iCmManager.OpenL();
-
     TDbCreatorInputCharSet charSet( ECharSetUnknown );//input character set
 
     //Creates access points
@@ -303,8 +301,7 @@
                                                           iPluginArray,
                                                           iPluginNames,
                                                           iDestArray,
-                                                          iDestNames,
-                                                          iDefCon ); 
+                                                          iDestNames ); 
                 iFileProcessor->ParseFileL();
 
                 delete iFileProcessor;
@@ -325,7 +322,7 @@
                   
 
     // Updates the IAPs that are not in destinations.
-    UpdateUncatCmsL( iCmInDest /*, iPluginNames, iPluginArray*/ );
+    UpdateUncatCmsL( iCmInDest );
 
     // Sets the underlying IAP/SNAPS for vpn IAPs    
     SetUnderlyingIapL( iUnderLying );
@@ -349,9 +346,6 @@
     // Sets linger settings
     SetLingerSettingsL( iLingerSettings );
 
-    // Sets the default connection    
-    SetDefaultConnectionL( iDefCon );
-
     // Logs IAPs in UDEB mode
     #ifdef _DEBUG
     LogIapIdsL();
@@ -416,8 +410,6 @@
     
     iLingerSettings.ResetAndDestroy();
 
-    iDefCon.ResetAndDestroy();
-    
     iCmInDest.Close(); 
     
     iCmManager.Close();
@@ -435,7 +427,9 @@
     FeatureManager::InitializeLibL();
     iIsWlanS = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
     FeatureManager::UnInitializeLib();
-    CLOG_WRITE( "FeatureManager closed\n" )               
+    CLOG_WRITE( "FeatureManager closed\n" )
+
+    iCmManager.OpenL();
     }
     
 //------------------------------------------------
@@ -583,34 +577,6 @@
         }
     }
 
-// ---------------------------------------------------------
-// CCdcCommsDatCreator::ProcessDNL
-// ---------------------------------------------------------
-//
-void CCdcCommsDatCreator::SetDefaultConnectionL( RPointerArray< HBufC >& aDefCon )
-    {
-    // Sets the default connection    
-    if( aDefCon.Count() > 0 )
-        {
-        CLOG_WRITE_FORMAT( "SetDefaultConnectionL: %d\n", aDefCon.Count() )
-        CLOG_WRITE( "--------------------------------------\n" )
-
-        CProcessorGlobal* glb = CProcessorGlobal::NewL( iReader,
-                                               iCmManager,
-                                               iPluginArray,
-                                               iPluginNames,
-                                               iDestArray,
-                                               iDestNames,
-                                               aDefCon );
-        
-        CleanupStack::PushL( glb );
-        glb->SetDefaultConnectionL();
-                
-        CleanupStack::PopAndDestroy( glb );
-
-        CLOG_WRITE( "--------------------------------------\n" )
-        }
-    }
 
 // ---------------------------------------------------------
 // CCdcCommsDatCreator::SetUnderlyingIapL
--- a/dbcreator/commsdatcreator/Src/cdcprocessordn.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdcprocessordn.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -145,7 +145,16 @@
                 break;
                 }
             }
-        CreateDestination(dnId);
+        if (dnId == -1)
+            {
+            iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName );        
+            CLOG_WRITE( "Destinaton created without dnId.");
+            }
+        else
+            {
+            iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, dnId);        
+            CLOG_WRITE_FORMAT( "Destinaton created. dnId:%d", dnId);
+            }
         }
         
     HBufC *destName( NULL );
@@ -178,17 +187,6 @@
                         }
                     }
                 break;
-                case EDN_Icon:
-                    {
-                    TPtrC16 iconPtr = ptrTag->Right( ptrTag->Length() );
-                    TLex16 lex( iconPtr );
-                    TUint32 icon( 0 );
-                    if ( lex.Val( icon, EDecimal ) == KErrNone )
-                        {
-                        iDestination.SetIconL( icon );
-                        }
-                    }
-                break;
                 case EDN_Metadata:
                     {
                     if( !ptrTag->Compare( KPurposeUnknown ) )
@@ -459,34 +457,4 @@
     CleanupStack::PopAndDestroy( tmp ); // Removes tmp.
     }
 
-// ---------------------------------------------------------
-// CProcessorDN::CreateDestination
-// ---------------------------------------------------------
-//
-void CProcessorDN::CreateDestination(TInt aDnId)
-    {
-    if (aDnId == -1)
-        {
-        iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName );        
-        CLOG_WRITE( "Destinaton created without dnId.");
-        }
-    else
-        {
-        TRAPD( err, iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, aDnId ) );
-        switch ( err )
-            {
-            case KErrNone:
-                CLOG_WRITE_FORMAT( "Destination created. dnId:%d", aDnId);
-                break;
-            case KErrAlreadyExists:
-                CLOG_WRITE_FORMAT( "Destination already exists dnId:%d. Creation failed.", aDnId);
-                iDestination = iCmManager->DestinationL( aDnId );
-                break;
-            default:
-                CLOG_WRITE( "Destination reading failed.");
-                break;
-            }
-        }
-    }
-
 // End of File.
--- a/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdcprocessorglobal.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -38,7 +38,6 @@
 #include <cmmanagerext.h>
 #include <cmmanager.h>
 #include <cmdestinationext.h>
-#include <cmdefconnvalues.h>
 #include <WlanCdbCols.h>
 #include <wlancontainer.h>
 #include <featmgr.h>
@@ -106,16 +105,14 @@
                           RPointerArray< RCmConnectionMethodExt >& aPluginArray,
                           RPointerArray< HBufC >& aPluginNames, 
                           RPointerArray< RCmDestinationExt >& aDestArray,
-                          RPointerArray< HBufC >& aDestNames,
-                          RPointerArray< HBufC >& aDefCon )
+                          RPointerArray< HBufC >& aDestNames )
     {
     CProcessorGlobal* self = new ( ELeave ) CProcessorGlobal( aFileReader,
                                                               aCmManager,
                                                               aPluginArray,
                                                               aPluginNames,
                                                               aDestArray,
-                                                              aDestNames,
-                                                              aDefCon );
+                                                              aDestNames );
     CleanupStack::PushL( self );
 
     // From base class
@@ -134,12 +131,10 @@
                                     RPointerArray< RCmConnectionMethodExt >& aPluginArray,
                                     RPointerArray< HBufC >& aPluginNames, 
                                     RPointerArray< RCmDestinationExt >& aDestArray,
-                                    RPointerArray< HBufC >& aDestNames,
-                                    RPointerArray< HBufC >& aDefCon ) :
+                                    RPointerArray< HBufC >& aDestNames ) :
     CProcessorBase( aFileReader, aCmManager, aPluginArray, aPluginNames, aDestArray, aDestNames ),
     iAttachWhenNeeded ( EFalse )
     {
-    iDefCon = &aDefCon;
     }
     
     
@@ -156,7 +151,7 @@
     // Create General connection settings struct and set the default values
     iGenConnSettings = new (ELeave) TCmGenConnSettings;
     iGenConnSettings->iUsageOfWlan = ECmUsageOfWlanKnown;
-    iGenConnSettings->iCellularDataUsageHome = ECmCellularDataUsageConfirm;
+    iGenConnSettings->iCellularDataUsageHome = ECmCellularDataUsageAutomatic;
     iGenConnSettings->iCellularDataUsageVisitor = ECmCellularDataUsageConfirm;
 
     CLOG_WRITE( "Initialising FeatureManager\n" )   
@@ -267,19 +262,10 @@
                     CCDSNAPMetadataRecord* defaultRecord = new( ELeave )
                             CCDSNAPMetadataRecord( snapTable->TableId() );
                     CleanupStack::PushL( defaultRecord );
+                    defaultRecord->SetRecordId( KCDNewRecordRequest );
                     defaultRecord->iMetadata.SetL( 0 );
-                    
-                    if ( !defaultRecord->FindL( *iSession ) )
-                        {
-                        defaultRecord->SetRecordId( KCDNewRecordRequest );
-                        defaultRecord->iIcon.SetL( icon );
-                        defaultRecord->StoreL( *iSession );
-                        }
-                    else
-                        {
-                        defaultRecord->iIcon.SetL( icon );
-                        defaultRecord->ModifyL( *iSession );
-                        }
+                    defaultRecord->iIcon.SetL( icon );
+                    defaultRecord->StoreL( *iSession );
                     
                     CleanupStack::PopAndDestroy( defaultRecord ); // defaultRecord
                     CleanupStack::PopAndDestroy( snapTable ); // snapTable
@@ -317,20 +303,6 @@
                 break;
                 }
                 
-            case EDefaultConnectionType:
-                {
-                iDefCon->Append( ptrTag->AllocL() );
-                //SetDefaultConnectionTypeL( ptrTag )
-                break;
-                }
-                
-            case EDefaultConnectionName:
-                {
-                iDefCon->Append( ptrTag->AllocL() );
-                //SetDefaultConnectionNameL( ptrTag )
-                break;
-                }
-                
             case EGprsLastSocketActivityTimeout:
             case EGprsLastSessionClosedTimeout:
             case EGprsLastSocketClosedTimeout:		
@@ -620,87 +592,6 @@
     }
 
 // ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionL()
-    {
-    if( iDefCon->Count() > 0 )
-        {
-        SetDefaultConnectionTypeL( (*iDefCon)[0] );
-        }
-    if( iDefCon->Count() > 1 )
-        {
-        SetDefaultConnectionNameL( (*iDefCon)[1] );
-        }
-    }
-
-// ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionTypeL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionTypeL( HBufC16* aPtrTag )
-    {
-    iDefaultConnectionSet = EFalse;
-    
-    if ( aPtrTag->CompareF( KStrAlwaysAsk ) == 0 ) 
-        {
-        iDefaultConnectionType = ECmDefConnAlwaysAsk;
-        SetDefConnRecordL( 0 );
-        }
-    else if ( aPtrTag->CompareF( KStrAskOnce ) == 0 ) 
-        {
-        iDefaultConnectionType = ECmDefConnAskOnce;
-        SetDefConnRecordL( 0 );
-        }
-    else if ( aPtrTag->CompareF( KStrDestination ) == 0 ) 
-        {
-        iDefaultConnectionType = ECmDefConnDestination;
-        }
-    else if ( aPtrTag->CompareF( KStrConnectionMethod ) == 0 ) 
-        {
-        iDefaultConnectionType = ECmDefConnConnectionMethod;
-        }
-    else
-        {
-        CLOG_WRITE(
-        "Warning: Default connection type is not valid. Always ask is set.")
-        iDefaultConnectionType = ECmDefConnAlwaysAsk;
-        SetDefConnRecordL( 0 );
-        }    
-    }
-
-// ---------------------------------------------------------
-// CProcessorGlobal::SetDefaultConnectionNameL
-// ---------------------------------------------------------
-//
-void CProcessorGlobal::SetDefaultConnectionNameL( HBufC16* aPtrTag )
-    {
-        
-    // Name is ignored if the defconn has been set. It can happen e.g.
-    // if iDefaultConnectionType is ECmDefConnAlwaysAsk or ECmDefConnAskOnce     
-    if ( iDefaultConnectionSet )
-        {
-        return;
-        }
-        
-    TInt uId = KErrNotFound;
-    if ( iDefaultConnectionType == ECmDefConnDestination )
-        {
-        uId = GetDestinationIdL( aPtrTag );
-        }
-    else if ( iDefaultConnectionType == ECmDefConnConnectionMethod )
-        {
-        uId = GetPluginIdL( aPtrTag );
-        }
-        
-    if( uId != KErrNotFound )
-        {
-        SetDefConnRecordL( uId );
-        }
-    }
-
-// ---------------------------------------------------------
 // CProcessorGlobal::SetGenConnSettingWlanUsage
 // ---------------------------------------------------------
 //
@@ -765,25 +656,6 @@
     }
 
 //-----------------------------------------------------------------------------
-//  CProcessorGlobal::SetDefConnRecordL()
-//-----------------------------------------------------------------------------
-//
-void CProcessorGlobal::SetDefConnRecordL( const TInt aId )
-    {
-
-    TCmDefConnValue value;
-    value.iType = iDefaultConnectionType;
-    value.iId = aId;
-    
-    iCmManager->WriteDefConnL( value );
-    
-    // It gets true if the defconn was set correctly
-    iDefaultConnectionSet = ETrue;
-
-    }
-    
-
-//-----------------------------------------------------------------------------
 //  CProcessorGlobal::SaveGlobalWlanParameterL()
 //-----------------------------------------------------------------------------
 //
--- a/dbcreator/commsdatcreator/Src/cdcprocessorwlan.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdcprocessorwlan.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -33,7 +33,6 @@
 #include <WlanCdbCols.h>
 #include <commsdattypesv1_1.h>
 #include <wlancontainer.h>
-#include <EapType.h>
 
 using namespace CMManager;
 
@@ -60,12 +59,6 @@
 // ratio between sizes of ascii and unicode characters
 const TUint KAsciiUnicodeRatio = 2;
 
-// Length of expanded EAP type identifier
-const TUint KExpandedEAPIdLength = 8;
-
-// Plain MSCHAPv2 EAP identifier. Needed because of special handling
-const TUint8 KMschapv2TypeId[] = {0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x63};
-
 // ================= MEMBER FUNCTIONS =======================
 
 CEapTypeElement::~CEapTypeElement()
@@ -144,6 +137,7 @@
 CProcessorWlan::~CProcessorWlan()
     {
     delete iEmptyTag;
+    REComSession::FinalClose();
     }
 
 // ---------------------------------------------------------
@@ -379,7 +373,7 @@
             //WPA
             case EWPAPresharedKey:
             case EWPAKeyLength:
-            case EWPAListOfEAPs:
+            case EWPAEapMethod:
             case EWPAUseOfPresharedKey:
                 {
                 if( iSecurityMode != ESecurityModeWEP && iSecurityMode != ESecurityModeOpen )
@@ -601,50 +595,30 @@
 	    
 	    CleanupStack::PopAndDestroy( iapRecord );	        
 	            
-		TInt err = KErrNone;
-	    TUint8 expandedEapId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-	    TBuf8<KExpandedEAPIdLength> cue;
-	    
-		// Set-up 64-bit expanded EAP id
-		if ( eap->iEapSettings->iEAPType == KMschapv2TypeId[7] )
-			{
-			// This is plain MSCHAPv2. Set vendor ID correctly
-			expandedEapId[1] = KMschapv2TypeId[1];
-			expandedEapId[2] = KMschapv2TypeId[2];
-			expandedEapId[3] = KMschapv2TypeId[3];
-			}
-		
-		expandedEapId[KExpandedEAPIdLength - 1] = static_cast<TUint8> ( eap->iEapSettings->iEAPType );	
-		cue.Copy( expandedEapId, KExpandedEAPIdLength );
-		
-		// Try loading EAP ECOM module
-		CLOG_WRITE_FORMAT( "Try to load EAP module: %d", expandedEapId[7]);
-		CEapType* eapType = 0;
-		TRAP( err, eapType = CEapType::NewL( cue, ELan, serviceId ) );
-		// The error is caused by probably missing EAP method from the device. Ignore the error
-		// because same scripts can be used for devices with and without certain methods.
-		if( err == KErrNone )
-			{
-		    CleanupStack::PushL( eapType );
-		        
-		    // Check if this type is tunneled
-		    if ( eap->iEncapsulatingEapId != EAPSettings::EEapNone )
-		    	{
-		    	// It is tunneled. Take the last byte of the expanded id.
-		    	eapType->SetTunnelingType( eap->iEncapsulatingEapId );    	
-		    	}
-		    CLOG_WRITE( "Calling eapType->SetConfiguration" );
-		    eapType->SetConfigurationL( *eap->iEapSettings );
-		    CLOG_WRITE( "eapType->SetConfiguration success!" );
-		    CleanupStack::PopAndDestroy( eapType );
-			}
+        CEapType* eapType ( NULL );
+        TRAPD( leave, 
+               eapType = CEapType::NewL( ELan, 
+                                         serviceId, 
+                                         eap->iEapSettings->iEAPExpandedType ) );
+        if ( leave == KErrNone )
+            {
+            CleanupStack::PushL( eapType );
+            
+            // Inner EAP
+            if ( eap->iEncapsulatingEapId != *EapExpandedTypeNone.GetType() )
+                {
+                eapType->SetTunnelingType( eap->iEncapsulatingEapId );
+                }
+                    
+            // write EAP setting
+            eapType->SetConfigurationL(*eap->iEapSettings);
+            CleanupStack::PopAndDestroy( eapType );
+            }
         }
-        
+    
     session->Close();
     CleanupStack::PopAndDestroy( session );
     CLOG_WRITE( "Finished EAP settings saving" );
-	//iEapSettings.ResetAndDestroy();
 
     CLOG_WRITE_FORMAT( "SaveSecurityInfoL end %d", iSecurityInfo->Count() );
 }
@@ -1206,6 +1180,7 @@
 void CProcessorWlan::SaveWPAL( TUint32 aIapId )
     {
     CLOG_WRITE( "CProcessorWlan::SaveWPAL enter" );
+    
     CMDBSession* session = CMDBSession::NewL( CMDBSession::LatestVersion() );
     CleanupStack::PushL( session );
     
@@ -1248,17 +1223,11 @@
     secModeField->SetL( iSecurityMode );
     
     CLOG_WRITE( "Wrote securityMode" );
+
     // Save EAP list
-    CMDBField<TDesC>* wlanEapsField = static_cast<CMDBField<TDesC>*>
-                                ( generic->GetFieldByIdL( KCDTIdWlanEaps ) );
-    wlanEapsField->SetL( WPAFieldData( EWPAListOfEAPs )->Des() );
-
-	CLOG_WRITE( "Wrote EAPList" );
-	
-    SetExpandedEapListL( generic );
-
-	CLOG_WRITE( "Wrote expandedEapList" );	
-	
+    SetExpandedEapListL( service );
+    CLOG_WRITE( "Wrote Expanded EAPList" );
+    
     // Save PreShared Key
     TBuf8<KMaxLengthOfKeyData> keyWPA;
     //convert to 8 bit
@@ -1296,122 +1265,105 @@
 // CProcessorWlan::SetExpandedEapListL
 // ---------------------------------------------------------
 //
-void CProcessorWlan::SetExpandedEapListL( CMDBGenericRecord* generic )
+void CProcessorWlan::SetExpandedEapListL( const TUint aServiceId )
     {
+    CLOG_WRITE( "CProcessorWlan::SetExpandedEapListL" )
     // Gets the text format eap list
-    HBufC16* eapList = WPAFieldData( EWPAListOfEAPs );
+    HBufC16* eapList = WPAFieldData( EWPAEapMethod );
     
     if ( eapList != NULL && 0 < eapList->Length() )
         {
+        // load general EAP settings If
+        CEapGeneralSettings* eapGs;
+        eapGs = CEapGeneralSettings::NewL( ELan, aServiceId );
+        CleanupStack::PushL( eapGs );
         
-        // Creates the expanded eap lists    
-        HBufC8* enabledEapList = ExpandedEapListLC( eapList, ETrue );
-        HBufC8* disabledEapList = ExpandedEapListLC( eapList, EFalse );
+        // get lists of enabled/disabled EAPs for the IAP
+        RArray< TEapExpandedType > enabledEapMethods;
+        RArray< TEapExpandedType > disabledEapMethods;
         
-        // Save enabled EAP list
-        CMDBField<TDesC8>* wlanEnabledEapsField = static_cast<CMDBField<TDesC8>*>
-                                ( generic->GetFieldByIdL( KCDTIdWlanEnabledEaps ) );
-        wlanEnabledEapsField->SetL( enabledEapList->Des() );
-
-        // Save disabled EAP list
-        CMDBField<TDesC8>* wlanDisabledEapsField = static_cast<CMDBField<TDesC8>*>
-                                ( generic->GetFieldByIdL( KCDTIdWlanDisabledEaps ) );
-        wlanDisabledEapsField->SetL( disabledEapList->Des() );
+        enabledEapMethods.Append( GetExpandedEapTypeIdL( *eapList ) );
         
-        CleanupStack::PopAndDestroy( disabledEapList );
-        CleanupStack::PopAndDestroy( enabledEapList );
-        
+        // disabledEapMethods can be empty, SetEapMethods takes care of it,
+        // only enabledEapMethods is a must with correct contents
+        User::LeaveIfError( eapGs->SetEapMethods( enabledEapMethods, 
+                                                     disabledEapMethods ) );
+   
+        CleanupStack::PopAndDestroy( eapGs );
         }
     }
 
 // ---------------------------------------------------------
-// CProcessorWlan::ExpandedEapListLC
+// CProcessorWlan::GetExpandedEapTypeId
 // ---------------------------------------------------------
 //
-HBufC8* CProcessorWlan::ExpandedEapListLC( HBufC16* aEapList, TBool aEnabledNeed )
+TEapExpandedType CProcessorWlan::GetExpandedEapTypeIdL( TDesC& aField )
     {
-    // The eap list has a well defined form 
-    // so this parser supposes this concrete form like this:
-    // "+018,-023,+026,-021,-006"
+    TUint8 resultByte;
+    TLex16 lex( aField.Ptr() );
+    User::LeaveIfError( lex.Val( resultByte, EDecimal ) );
     
-    // Lenght of a 3 digit long signed number 
-     const TInt sliceLength = 4;
-     
-   // Max lenght of the resulted list.
-    // Adding one "," then divide the lenght of a slice+1   
-    TInt maxLenght = ( ( aEapList->Length()+1 ) / 5 ) * 8;
+    CLOG_WRITE_FORMAT( "CProcessorWlan::GetExpandedEapTypeIdL: EAP %d",
+                    (int)resultByte )
     
-    HBufC8* expandedEapList = HBufC8::NewLC( maxLenght );
-    
-    TInt pos = 0;
-    while ( pos + sliceLength <= aEapList->Length() )
+    switch ( resultByte )
         {
-        // Getting a slice
-        TPtrC16 slice = aEapList->Mid( pos, sliceLength );
-        
-        // Checks the sign
-        if( slice[0] == '+' )
+        case 0x06:
             {
-            if( aEnabledNeed )
-                {
-                AddToList( expandedEapList, slice );
-                }
+            return *EapExpandedTypeGtc.GetType();
+            }
+        case 0x0d:
+            {
+            return *EapExpandedTypeTls.GetType();
             }
-        else if( slice[0] == '-' )
+        case 0x11:
+            {
+            return *EapExpandedTypeLeap.GetType();
+            }
+        case 0x12:
             {
-            if( !aEnabledNeed )
-                {
-                AddToList( expandedEapList, slice );
-                }
+            return *EapExpandedTypeSim.GetType();
             }
-        else
+        case 0x15:
             {
-            CLOG_WRITE_FORMAT( "! Error : Wrong Eap list format %S", aEapList );
+            return *EapExpandedTypeTtls.GetType();
             }
-        
-        // Step over one slice and "," e.g. "+023,"
-        pos+=5;    
-        
+        case 0x17:
+            {
+            return *EapExpandedTypeAka.GetType();
+            }
+        case 0x19:
+            {
+            return *EapExpandedTypePeap.GetType();
+            }
+        case 0x1a:
+            {
+            return *EapExpandedTypeMsChapv2.GetType();
+            }
+        case 0x2b:
+            {
+            return *EapExpandedTypeFast.GetType();
+            }
+        case 0x01:
+            {
+            return *EapExpandedTypeProtectedSetup.GetType();
+            }
+        case 0x62:
+            {
+            return *EapExpandedTypeTtlsPap.GetType();
+            }
+        case 0x63:
+            {
+            return *EapExpandedPlainMsChapv2.GetType();
+            }
+        default:
+            {
+            return *EapExpandedTypeNone.GetType();
+            }
         }
-    if( pos != aEapList->Length() + 1)    
-        {
-        CLOG_WRITE_FORMAT( "! Warning : possible wrong Eap list format %S", aEapList );
-        }
-        
-    return expandedEapList;    
     }
 
 // ---------------------------------------------------------
-// CProcessorWlan::AddToList
-// ---------------------------------------------------------
-//
-void CProcessorWlan::AddToList( HBufC8* aExpandedEapList, TPtrC16 aSlice )
-    {
-    // Fills the 8 byte form with "0xFE000000000000"        
-    TBuf8<8> expandedForm;
-    expandedForm.AppendFill( 0xFE, 1 );
-    expandedForm.AppendFill( 0x00, 6 );
-        
-    // Leave the "sign"     
-    TPtrC16 number = aSlice.Mid( 1 );    
-    TUint8 resultByte;
-    TLex16 lex( number );
-        
-    if( KErrNone == lex.Val( resultByte, EDecimal ) )
-        {
-        expandedForm.AppendFill( resultByte, 1 );
-        }
-    else
-        {
-        expandedForm.AppendFill( 0x00, 1 );
-        CLOG_WRITE( "! Error : Unlexed Eap number. 0 is addded" );
-        }
-
-    aExpandedEapList->Des().Append( expandedForm ); 
-    }
-
-
-// ---------------------------------------------------------
 // CProcessorWlan::WPAIndex
 // ---------------------------------------------------------
 //       
@@ -1423,7 +1375,6 @@
     return aFieldId - 0x2000 + iDataStart;                     
     }
     
-    
 // ---------------------------------------------------------
 // CProcessorWlan::WPAFieldData
 // ---------------------------------------------------------
@@ -1582,11 +1533,12 @@
 		return EFalse;
 		}
 	}
+
 // ---------------------------------------------------------
 // CProcessorWlan::GetEapTypeIdFromSettingId
 // ---------------------------------------------------------
 //
-EAPSettings::TEapType CProcessorWlan::GetEapTypeIdFromSettingId( const TInt aField )
+TEapExpandedType CProcessorWlan::GetEapTypeIdFromSettingId( const TInt aField )
 	{
 	switch ( aField )
 		{
@@ -1594,7 +1546,7 @@
 		case EEapGtcSessionValidityTime:
 		case EEapGtcEncapsulation:
 			{
-			return EAPSettings::EEapGtc;
+			return *EapExpandedTypeGtc.GetType();
 			}
 		case EEapTlsUsername:
 		case EEapTlsRealm:
@@ -1610,13 +1562,13 @@
 		case EEapTlsCaCertSerialNumber:
 		case EEapTlsEncapsulation:
 			{
-			return EAPSettings::EEapTls;
+			return *EapExpandedTypeTls.GetType();
 			}
 		case EEapLeapUsername:
 		case EEapLeapPassword:
 		case EEapLeapSessionValidityTime:
 			{
-			return EAPSettings::EEapLeap;
+			return *EapExpandedTypeLeap.GetType();
 			}
 		case EEapSimUsername:
 		case EEapSimRealm:
@@ -1624,7 +1576,7 @@
 		case EEapSimSessionValidityTime:
 		case EEapSimEncapsulation:
 			{
-			return EAPSettings::EEapSim;
+			return *EapExpandedTypeSim.GetType();
 			}
 		case EEapTtlsUsername:
 		case EEapTtlsRealm:
@@ -1640,7 +1592,7 @@
 		case EEapTtlsCaCertIssuerName:
 		case EEapTtlsCaCertSerialNumber:
 			{
-			return EAPSettings::EEapTtls;
+			return *EapExpandedTypeTtls.GetType();
 			}
 		case EEapAkaUsername:
 		case EEapAkaRealm:
@@ -1648,7 +1600,7 @@
 		case EEapAkaSessionValidityTime:
 		case EEapAkaEncapsulation:
 			{
-			return EAPSettings::EEapAka;
+			return *EapExpandedTypeAka.GetType();
 			}
 		case EEapPeapUsername:
 		case EEapPeapRealm:
@@ -1667,14 +1619,14 @@
 		case EEapPeapCaCertIssuerName:
 		case EEapPeapCaCertSerialNumber:		
 			{
-			return EAPSettings::EEapPeap;
+			return *EapExpandedTypePeap.GetType();
 			}
 		case EEapMschapv2Username:
 		case EEapMschapv2Password:
 		case EEapMschapv2SessionValidityTime:
 		case EEapMschapv2Encapsulation:
 			{
-			return EAPSettings::EEapMschapv2;
+			return *EapExpandedTypeMsChapv2.GetType();
 			}
 		case EEapFastUsername:
 		case EEapFastRealm:
@@ -1695,7 +1647,7 @@
 		case EEapFastCaCertIssuerName:
 		case EEapFastCaCertSerialNumber:
 			{
-			return EAPSettings::EEapFast; 
+			return *EapExpandedTypeFast.GetType();
 			}
 		
 		case EMschapv2Username:
@@ -1703,23 +1655,24 @@
 		case EMschapv2SessionValidityTime:
 		case EMschapv2Encapsulation:
 			{
-			return EAPSettings::EPlainMschapv2;
+			return *EapExpandedPlainMsChapv2.GetType();
 			}
 		default:
 			{
-			return EAPSettings::EEapNone;
+			return *EapExpandedTypeNone.GetType();
 			}
 		
 		}
 	}
+	
 // ---------------------------------------------------------
 // CProcessorWlan::AddEAPSetting
 // ---------------------------------------------------------
 //
-void CProcessorWlan::AddEAPSettingL( const TInt aField, const HBufC16* const aValue  )
+void CProcessorWlan::AddEAPSettingL( const TInt aField, HBufC16* aValue  )
     {
-    EAPSettings::TEapType eapId = GetEapTypeIdFromSettingId( aField );
-    if ( eapId == EAPSettings::EEapNone )
+    TEapExpandedType eapId = GetEapTypeIdFromSettingId( aField );
+    if ( eapId == *EapExpandedTypeNone.GetType() )
     	{
     	CLOG_WRITE( "! Error : Unknown EAP method" );
     	User::Leave( KErrArgument ); 
@@ -1729,7 +1682,7 @@
 	// Search if the EAP instance already exists in the array for this
 	for ( eapIndex = 0 ; eapIndex < iEapSettings.Count() ; eapIndex++ )
 		{       				
-		if ( ( iEapSettings[eapIndex]->iEapSettings->iEAPType == eapId )
+		if ( ( iEapSettings[eapIndex]->iEapSettings->iEAPExpandedType == eapId )
 			 && ( iEapSettings[eapIndex]->iName != NULL ) 
 			 && ( iEapSettings[eapIndex]->iName->Compare( *iName ) == 0 ))        					 	
 		 	{       				
@@ -1746,7 +1699,7 @@
 		
 		newEap->iEapSettings = new (ELeave) EAPSettings;
 		
-		newEap->iEapSettings->iEAPType = eapId;
+		newEap->iEapSettings->iEAPExpandedType = eapId;
 		
 		newEap->iName = iName->AllocL();                           
 		               	    	
@@ -1773,6 +1726,8 @@
 			{
 			iEapSettings[eapIndex]->iEapSettings->iUsernamePresent = ETrue;
 			iEapSettings[eapIndex]->iEapSettings->iUsername.Copy( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticUsernamePresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticUsername = EFalse;
 			break;
 			}
 			
@@ -1781,7 +1736,9 @@
 		case EMschapv2Password:
 			{
 			iEapSettings[eapIndex]->iEapSettings->iPasswordPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iPassword.Copy( *aValue );			
+			iEapSettings[eapIndex]->iEapSettings->iPassword.Copy( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iShowPassWordPromptPresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticUsername = EFalse;
 			break;
 			}
 
@@ -1793,7 +1750,9 @@
 		case EEapFastRealm:
 			{
 			iEapSettings[eapIndex]->iEapSettings->iRealmPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iRealm.Copy( *aValue );			
+			iEapSettings[eapIndex]->iEapSettings->iRealm.Copy( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticRealmPresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticRealm = EFalse;
 			break;
 			}
 				
@@ -1813,7 +1772,7 @@
 			TUint value( 0 );
 			if( lex.Val( value, EDecimal) != KErrNone )
 				{				
-				CLOG_WRITE_FORMAT( "! Error : Invalid session validity time value. EapId: %d", eapId );
+				CLOG_WRITE_FORMAT( "! Error : Invalid session validity time value. EapId: %d", eapId.GetVendorType() );
 				User::Leave( KErrArgument );
 				}			
 
@@ -1833,11 +1792,10 @@
 			TUint eapTypeId( 0 );						
 			if( lex.Val( eapTypeId, EDecimal) != KErrNone )
 				{
-				CLOG_WRITE_FORMAT( "! Error : Invalid encapsulation value. EapId: %d", eapId );
+				CLOG_WRITE_FORMAT( "! Error : Invalid encapsulation value. EapId: %d", eapId.GetVendorType() );
 				User::Leave( KErrArgument );
 				}			
-
-			iEapSettings[eapIndex]->iEncapsulatingEapId = static_cast< EAPSettings::TEapType >( eapTypeId );
+			iEapSettings[eapIndex]->iEncapsulatingEapId.SetValue( eapId.GetVendorId(), eapTypeId ); 
 			break;
 			}
 		
@@ -1858,7 +1816,7 @@
                 }
             else 
                 {                
-                CLOG_WRITE_FORMAT( "! Error : Invalid VerifyServerRealm. EapId: %d", eapId );                
+                CLOG_WRITE_FORMAT( "! Error : Invalid VerifyServerRealm. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
                 }
 
@@ -1882,7 +1840,7 @@
                 }
             else 
                 {                
-                CLOG_WRITE_FORMAT( "! Error : Invalid RequireClientAuth. EapId: %d", eapId );                
+                CLOG_WRITE_FORMAT( "! Error : Invalid RequireClientAuth. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
                 }
 			
@@ -1897,7 +1855,7 @@
 			TRAPD( err, FillCipherSuitesL( aValue, eapIndex ) );
 			if( err != KErrNone )
 				{
-				CLOG_WRITE_FORMAT( "! Error : Invalid CipherSuites. EapId: %d", eapId );
+				CLOG_WRITE_FORMAT( "! Error : Invalid CipherSuites. EapId: %d", eapId.GetVendorType() );
 				User::Leave( KErrArgument );
 				}
 			break;
@@ -1908,20 +1866,21 @@
 		case EEapPeapUserCertSubjectKeyId:
 		case EEapFastUserCertSubjectKeyId:
 			{
-			TInt certIndex = FindCertificateEntryL( CertificateEntry::EUser, eapIndex );
+			TInt certIndex = FindCertificateEntryL( EapCertificateEntry::EUser, eapIndex ); 
 
-			TBuf<KKeyIdentifierLength> key;
+			TKeyIdentifier key;
 			
 			TRAPD( err, ConvertSubjectKeyIdToBinaryL( aValue, key) );
 			if( err != KErrNone )
 				{
-				CLOG_WRITE_FORMAT( "! Error : Invalid UserCertSubjectKeyId. EapId: %d", eapId );
+				CLOG_WRITE_FORMAT( "! Error : Invalid UserCertSubjectKeyId. EapId: %d", eapId.GetVendorType() );
 				User::Leave( KErrArgument );
 				}
    			
    			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSubjectKeyID.Copy(key);
-   			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSubjectKeyIDPresent = ETrue;
+   			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+   			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSubjectKeyId( key );
+   			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSubjectKeyIdPresent();
 			break;
 			}
 		
@@ -1930,11 +1889,12 @@
 		case EEapPeapUserCertIssuerName:
 		case EEapFastUserCertIssuerName:
 			{
-			TUint certIndex = FindCertificateEntryL( CertificateEntry::EUser, eapIndex );
+			TUint certIndex = FindCertificateEntryL( EapCertificateEntry::EUser, eapIndex ); 
 			
 			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iIssuerNamePresent= ETrue;
-	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iIssuerName.Copy( *aValue );			
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSubjectKeyIdPresent();
+	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIssuerName( *aValue );			
 			break;
 			}
 		
@@ -1943,11 +1903,12 @@
 		case EEapPeapUserCertSerialNumber:
 		case EEapFastUserCertSerialNumber:
 			{
-			TUint certIndex = FindCertificateEntryL( CertificateEntry::EUser, eapIndex );
+			TUint certIndex = FindCertificateEntryL( EapCertificateEntry::EUser, eapIndex );
 			
 			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSerialNumberPresent= ETrue;
-	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSerialNumber.Copy( *aValue );			
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSerialNumberPresent();
+	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSerialNumber( *aValue );			
 			break;
 			}
 		
@@ -1956,20 +1917,23 @@
 		case EEapPeapCaCertSubjectKeyId:
 		case EEapFastCaCertSubjectKeyId:
 			{
-			TInt certIndex = FindCertificateEntryL( CertificateEntry::ECA, eapIndex );
+			TInt certIndex = FindCertificateEntryL( EapCertificateEntry::ECA, eapIndex ); 
 
-			TBuf<KKeyIdentifierLength> key;
+			TKeyIdentifier key;
 			
 			TRAPD( err, ConvertSubjectKeyIdToBinaryL( aValue, key) );
 			if( err != KErrNone )
 				{
-				CLOG_WRITE_FORMAT( "! Error : Invalid UserCertSubjectKeyId. EapId: %d", eapId );
+				CLOG_WRITE_FORMAT( "! Error : Invalid UserCertSubjectKeyId. EapId: %d", eapId.GetVendorType() );
 				User::Leave( KErrArgument );
 				}
 
 			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSubjectKeyID.Copy(key);   			
-   			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSubjectKeyIDPresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSubjectKeyId( key );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSubjectKeyIdPresent();
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificatePresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificate = EFalse;
 			break;
 			}
 		
@@ -1978,10 +1942,13 @@
 		case EEapPeapCaCertIssuerName:
 		case EEapFastCaCertIssuerName:
 			{
-			TUint certIndex = FindCertificateEntryL( CertificateEntry::ECA, eapIndex );
+			TUint certIndex = FindCertificateEntryL( EapCertificateEntry::ECA, eapIndex ); 
 			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iIssuerNamePresent= ETrue;
-	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iIssuerName.Copy( *aValue );			
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIssuerNamePresent();
+	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIssuerName( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificatePresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificate = EFalse;
 			
 			break;
 			}
@@ -1991,10 +1958,13 @@
 		case EEapPeapCaCertSerialNumber:
 		case EEapFastCaCertSerialNumber:
 			{
-			TUint certIndex = FindCertificateEntryL( CertificateEntry::ECA, eapIndex );
+			TUint certIndex = FindCertificateEntryL( EapCertificateEntry::ECA, eapIndex ); 
 			iEapSettings[eapIndex]->iEapSettings->iCertificatesPresent = ETrue;
-			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSerialNumberPresent= ETrue;
-	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex].iSerialNumber.Copy( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetIsEnabled( ETrue );
+			iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSerialNumberPresent();
+	 		iEapSettings[eapIndex]->iEapSettings->iCertificates[certIndex]->SetSerialNumber( *aValue );
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificatePresent = ETrue;
+			iEapSettings[eapIndex]->iEapSettings->iUseAutomaticCACertificate = EFalse;
 			break;
 			}
 		
@@ -2013,7 +1983,7 @@
 	            }
 	        else 
 	            {
-	            CLOG_WRITE_FORMAT( "! Error : Invalid UsePseudonyms. EapId: %d", eapId );                
+	            CLOG_WRITE_FORMAT( "! Error : Invalid UsePseudonyms. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			break;
@@ -2023,35 +1993,8 @@
 		case EEapPeapEncapsulatedTypes:
 		case EEapFastEncapsulatedTypes:
 			{
-		    // Lenght of a 3 digit long signed number 
-		     const TInt sliceLength = 4;
-    
-		    TInt pos = 0;
-    		while ( pos + sliceLength <= aValue->Length() )
-        		{
-	        	// Getting a slice
-	        	TPtrC16 slice = aValue->Mid( pos, sliceLength );
-	        
-	        	// Checks the sign
-	        	if( slice[0] == '+' )
-	            	{
-         		   	TLex lex( slice.Ptr() + 1 );		
-					TUint encapsEapId( 0 );		
-					
-					if( lex.Val( encapsEapId, EDecimal) != KErrNone )
-						{				
-						CLOG_WRITE_FORMAT( "! Error : Invalid EncapsulatedTypes. EapId: %d", eapId );
-						User::Leave( KErrArgument );
-						}								
-					
-           			iEapSettings[eapIndex]->iEapSettings->iEncapsulatedEAPTypes.Append( encapsEapId );
-					iEapSettings[eapIndex]->iEapSettings->iEncapsulatedEAPTypesPresent = ETrue;
-	            	}
-	                    	       
-		        // Step over one slice and "," e.g. "+023,"
-		        pos+=5;            
-        		}
-
+			iEapSettings[eapIndex]->iEapSettings->iEnabledEncapsulatedEAPExpandedTypes.Append( GetExpandedEapTypeIdL( *aValue ) );
+            iEapSettings[eapIndex]->iEapSettings->iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue;
 			break;
 			}
 		
@@ -2069,7 +2012,7 @@
 	            }
 	        else 
 	            {
-   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV0Allowed. EapId: %d", eapId );                
+   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV0Allowed. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2090,7 +2033,7 @@
 	            }
 	        else 
 	            {
-   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV1Allowed. EapId: %d", eapId );                
+   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV1Allowed. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2111,7 +2054,7 @@
 	            }
 	        else 
 	            {
-   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV2Allowed. EapId: %d", eapId );
+   	            CLOG_WRITE_FORMAT( "! Error : Invalid EapPeapV2Allowed. EapId: %d", eapId.GetVendorType() );
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2132,7 +2075,7 @@
 	            }
 	        else 
 	            {
-  	            CLOG_WRITE_FORMAT( "! Error : Invalid EEapFastAuthProvModeAllowed. EapId: %d", eapId );                
+  	            CLOG_WRITE_FORMAT( "! Error : Invalid EEapFastAuthProvModeAllowed. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2154,7 +2097,7 @@
 	        else 
 	            {
 
-  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastUnauthProvModeAllowed. EapId: %d", eapId );                
+  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastUnauthProvModeAllowed. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2175,7 +2118,7 @@
 	            }
 	        else 
 	            {
-  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnADHPNoPAC. EapId: %d", eapId );                
+  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnADHPNoPAC. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2196,7 +2139,7 @@
 	            }
 	        else 
 	            {
-  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnADHPNoMatchingPAC. EapId: %d", eapId );                
+  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnADHPNoMatchingPAC. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2217,7 +2160,7 @@
 	            }
 	        else 
 	            {
-  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnNotDefaultServer. EapId: %d", eapId );                
+  	            CLOG_WRITE_FORMAT( "! Error : Invalid EapFastWarnNotDefaultServer. EapId: %d", eapId.GetVendorType() );                
                 User::Leave( KErrArgument );
 	            }
 			
@@ -2268,12 +2211,12 @@
 // CProcessorWlan::FindCertificateEntry
 // ---------------------------------------------------------
 //
-TUint CProcessorWlan::FindCertificateEntryL( const CertificateEntry::TCertType aCertType, const TInt aEapIndex )
+TUint CProcessorWlan::FindCertificateEntryL( const EapCertificateEntry::TCertType aCertType, const TInt aEapIndex )
     {
     TUint certIndex( 0 );
 	for( certIndex = 0; certIndex < iEapSettings[aEapIndex]->iEapSettings->iCertificates.Count() ; certIndex++ )
 		{
-		if( iEapSettings[aEapIndex]->iEapSettings->iCertificates[certIndex].iCertType == aCertType )
+		if( iEapSettings[aEapIndex]->iEapSettings->iCertificates[certIndex]->GetCertType() == aCertType )
 			{
 			// Found
 			break;
@@ -2282,9 +2225,9 @@
 	if( certIndex == iEapSettings[aEapIndex]->iEapSettings->iCertificates.Count() )
 		{
 		// Not found. Create
-		CertificateEntry entry;
-
-		entry.iCertType = aCertType;
+		EapCertificateEntry* entry;
+		entry = new (ELeave) EapCertificateEntry;
+		entry->SetCertType( aCertType );
 
 		iEapSettings[aEapIndex]->iEapSettings->iCertificates.AppendL( entry );
 
@@ -2297,7 +2240,7 @@
 // CProcessorWlan::ConvertSubjectKeyIdToBinary
 // ---------------------------------------------------------
 //
-void CProcessorWlan::ConvertSubjectKeyIdToBinaryL( const HBufC16* const aSubjectKeyIdString, TDes& aBinaryKey)
+void CProcessorWlan::ConvertSubjectKeyIdToBinaryL( const HBufC16* const aSubjectKeyIdString, TKeyIdentifier& aBinaryKey)
 	{
 	TInt err( KErrNone );
 	
--- a/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,12 +11,9 @@
 *
 * Contributors:
 *
-* Description:   Implementation of the class CReaderXML
-*
+* Description:
+* Implementation of the class CReaderXML
 */
-
-
-
  
 // INCLUDE FILES
 
@@ -169,7 +166,7 @@
 //---------------
 //WPAPresharedKey         string    WPA/WPA2 pre-shared key in plain text. 
 //WPAKeyLength            integer   The length of the WPA/WPA2 pre-shared key.
-//WPAListOfEAPs           string    A list of EAPs in use
+//WPAEapMethod            string    A EAP method in use
 //WPAUseOfPresharedKey    string    WPA/WPA2 pre-shared key usage.
 //=============
 //VPN specific:
@@ -323,7 +320,7 @@
 //WPA security
 _LIT16( KWPAPresharedKey,           "WPAPresharedKey" );
 _LIT16( KWPAKeyLength,              "WPAKeyLength" );
-_LIT16( KWPAListOfEAPs,             "WPAListOfEAPs" );
+_LIT16( KWPAEapMethod,              "WPAEapMethod");
 _LIT16( KWPAUseOfPresharedKey,      "WPAUseOfPresharedKey" );
 
 //EAP security
@@ -473,8 +470,6 @@
 _LIT16( KUIPriorityDialIn,          "UIPriorityDialIn" );
 _LIT16( KUIPriorityVpn,             "UIPriorityVpn" );
 _LIT16( KUIPriorityMip,             "UIPriorityMip" );
-_LIT16( KDefaultConnectionType,     "DefaultConnectionType" );
-_LIT16( KDefaultConnectionName,     "DefaultConnectionName" );
 _LIT16( KUsageOfWlan,               "UsageOfWlan" );
 _LIT16( KCellularDataUsageHome,     "CellularDataUsageHome" );
 _LIT16( KCellularDataUsageVisitor,  "CellularDataUsageVisitor" );
@@ -494,15 +489,6 @@
 _LIT16( KWlanPowerMode,             "WlanPowerMode" );
 
 
-//maximum number of PacketData AP parameters
-const TInt KMaxPacketDataParam = 28;
-const TInt KMaxLANParam = 26;
-const TInt KMaxWLANParam = 125;
-const TInt KMaxGlobalParam = 42;
-const TInt KMaxVPNParam = 12;
-const TInt KMaxDNParam = 19;
-
-
 // ================= MEMBER FUNCTIONS =======================
 
 // ---------------------------------------------------------
@@ -912,26 +898,32 @@
     
     if ( iLine->FindF( KFeatureHeadPacketData ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeaturePacketData" );
         feature = EFeaturePacketData;
         }
     else if ( iLine->FindF( KFeatureHeadWLAN ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureWLAN" );
         feature = EFeatureWLAN;
         }
     else if ( iLine->FindF( KFeatureHeadLAN ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureLAN" );
         feature = EFeatureLAN;
         }
     else if ( iLine->FindF( KFeatureHeadVPN ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureVPN" );
         feature = EFeatureVPN;
         }
     else if ( iLine->FindF( KFeatureHeadDN ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureDN" );
         feature = EFeatureDN;
         }
     else if ( iLine->FindF( KFeatureHeadGlobal ) != KErrNotFound )
         {
+        CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureGlobal" );
         feature = EFeatureGlobal;
         iFoundGlobal = ETrue;        
         }
@@ -1020,7 +1012,6 @@
 //
 TInt CReaderXML::DetectParam()
     {
-    TInt maxParam( 0 );           //maximum nunber of params in array
     TInt fieldId( KErrNotFound ); //field id of detected parameter 
     RArray<EInputParams> *params( NULL ); //pointer to the table used 
                                         //for or detection    
@@ -1028,27 +1019,21 @@
     switch ( CurrentFeature() )        
         {
         case EFeaturePacketData:
-            maxParam = KMaxPacketDataParam;
             params   = &iPDParams;
             break;
         case EFeatureWLAN:
-            maxParam = KMaxWLANParam;
             params   = &iWLanParams;
             break;
         case EFeatureLAN:
-            maxParam = KMaxLANParam;
             params   = &iLanParams;
             break;
         case EFeatureVPN:
-            maxParam = KMaxVPNParam;
             params   = &iVpnParams;
             break;
         case EFeatureDN:
-            maxParam = KMaxDNParam;
             params =   &iDNParams;
             break;
         case EFeatureGlobal:
-            maxParam = KMaxGlobalParam;
             params   = &iGlobalParams;
             break;
         default:
@@ -1057,14 +1042,13 @@
        
     //looks for parameter match
     HBufC16* paramName = ReadParam( EParamName );
-    TBool found ( EFalse );
-    
     if ( paramName == NULL )
             {
             return fieldId;
             }
 
-    for ( TInt idx = 0; idx < maxParam && !found; idx++ )
+    TBool found ( EFalse );
+    for ( TInt idx = 0; idx < params->Count() && !found; idx++ )
         {        
         if ( paramName->CompareF( (*params)[idx].iParam ) == 0 )
             {
@@ -1127,6 +1111,18 @@
             CLOG_WRITE_FORMAT( "! Warning: tag could not be allocated %S:",
                                      &tag );
             }
+// Debugging help; commented out for clearer log.
+//        else 
+//            {
+//            if (aSegment == EParamValue)
+//                {
+//                CLOG_WRITE_FORMAT( "CReaderXML::ReadParam: value %S", &tag );
+//                }
+//            else if (aSegment == EParamName)
+//                {
+//                CLOG_WRITE_FORMAT( "CReaderXML::ReadParam: name %S", &tag );
+//                }
+//            }
         }
     return ret;
     }
@@ -1208,310 +1204,310 @@
     _LIT16( sp5, "\'" );
     ReplaceInString( aPtrTag, spXML5, sp5 );
     _LIT16( spXML6, "&iexcl;" );
-    _LIT16( sp6, "¡" );
+    _LIT16( sp6, "\u00a1" );
     ReplaceInString( aPtrTag, spXML6, sp6 );
     _LIT16( spXML7, "&cent;" );
-    _LIT16( sp7, "¢" );
+    _LIT16( sp7, "\u00a2" );
     ReplaceInString( aPtrTag, spXML7, sp7 );
     _LIT16( spXML8, "&pound;" );
-    _LIT16( sp8, "£" );
+    _LIT16( sp8, "\u00a3" );
     ReplaceInString( aPtrTag, spXML8, sp8 );
     _LIT16( spXML9, "&curren;" );
-    _LIT16( sp9, "¤" );
+    _LIT16( sp9, "\u00a4" );
     ReplaceInString( aPtrTag, spXML9, sp9 );
     _LIT16( spXML10, "&yen;" );
-    _LIT16( sp10, "¥" );
+    _LIT16( sp10, "\u00a5" );
     ReplaceInString( aPtrTag, spXML10, sp10 );
     _LIT16( spXML11, "&brvbar;" );
-    _LIT16( sp11, "¦" );
+    _LIT16( sp11, "\u00a6" );
     ReplaceInString( aPtrTag, spXML11, sp11 );
     _LIT16( spXML12, "&sect;" );
-    _LIT16( sp12, "§" );
+    _LIT16( sp12, "\u00a7" );
     ReplaceInString( aPtrTag, spXML12, sp12 );
     _LIT16( spXML13, "&uml;" );
-    _LIT16( sp13, "¨" );
+    _LIT16( sp13, "\u00a8" );
     ReplaceInString( aPtrTag, spXML13, sp13 );
     _LIT16( spXML14, "&copy;" );
-    _LIT16( sp14, "©" );
+    _LIT16( sp14, "\u00a9" );
     ReplaceInString( aPtrTag, spXML14, sp14 );
     _LIT16( spXML15, "&ordf;" );
-    _LIT16( sp15, "ª" );
+    _LIT16( sp15, "\u00aa" );
     ReplaceInString( aPtrTag, spXML15, sp15 );
     _LIT16( spXML16, "&laquo;" );
-    _LIT16( sp16, "«" );
+    _LIT16( sp16, "\u00ab" );
     ReplaceInString( aPtrTag, spXML16, sp16 );
     _LIT16( spXML17, "&not;" );
-    _LIT16( sp17, "¬" );
+    _LIT16( sp17, "\u00ac" );
     ReplaceInString( aPtrTag, spXML17, sp17 );
     _LIT16( spXML18, "&reg;" );
-    _LIT16( sp18, "®" );
+    _LIT16( sp18, "\u00ae" );
     ReplaceInString( aPtrTag, spXML18, sp18 );
     _LIT16( spXML19, "&macr;" );
-    _LIT16( sp19, "¯" );
+    _LIT16( sp19, "\u00af" );
     ReplaceInString( aPtrTag, spXML19, sp19 );
     _LIT16( spXML20, "&deg;" );
-    _LIT16( sp20, "°" );
+    _LIT16( sp20, "\u00b0" );
     ReplaceInString( aPtrTag, spXML20, sp20 );
     _LIT16( spXML21, "&plusmn;" );
-    _LIT16( sp21, "±" );
+    _LIT16( sp21, "\u00b1" );
     ReplaceInString( aPtrTag, spXML21, sp21 );
     _LIT16( spXML22, "&sup2;" );
-    _LIT16( sp22, "²" );
+    _LIT16( sp22, "\u00b2" );
     ReplaceInString( aPtrTag, spXML22, sp22 );
     _LIT16( spXML23, "&sup3;" );
-    _LIT16( sp23, "³" );
+    _LIT16( sp23, "\u00b3" );
     ReplaceInString( aPtrTag, spXML23, sp23 );
     _LIT16( spXML24, "&acute;" );
-    _LIT16( sp24, "´" );
+    _LIT16( sp24, "\u00b4" );
     ReplaceInString( aPtrTag, spXML24, sp24 );
     _LIT16( spXML25, "&micro;" );
-    _LIT16( sp25, "µ" );
+    _LIT16( sp25, "\u00b5" );
     ReplaceInString( aPtrTag, spXML25, sp25 );
     _LIT16( spXML26, "&para;" );
-    _LIT16( sp26, "¶" );
+    _LIT16( sp26, "\u00b6" );
     ReplaceInString( aPtrTag, spXML26, sp26 );  
     _LIT16( spXML27, "&middot;" );
-    _LIT16( sp27, "·" );
+    _LIT16( sp27, "\u00b7" );
     ReplaceInString( aPtrTag, spXML27, sp27 );
     _LIT16( spXML28, "&cedil;" );
-    _LIT16( sp28, "¸" );
+    _LIT16( sp28, "\u00b8" );
     ReplaceInString( aPtrTag, spXML28, sp28 );
     _LIT16( spXML29, "&sup1;" );
-    _LIT16( sp29, "¹" );
+    _LIT16( sp29, "\u00b9" );
     ReplaceInString( aPtrTag, spXML29, sp29 );
     _LIT16( spXML30, "&ordm;" );
-    _LIT16( sp30, "º" );
+    _LIT16( sp30, "\u00ba" );
     ReplaceInString( aPtrTag, spXML30, sp30 );
     _LIT16( spXML31, "&raquo;" );
-    _LIT16( sp31, "»" );
+    _LIT16( sp31, "\u00bb" );
     ReplaceInString( aPtrTag, spXML31, sp31 );
     _LIT16( spXML32, "&frac14;" );
-    _LIT16( sp32, "¼" );
+    _LIT16( sp32, "\u00bc" );
     ReplaceInString( aPtrTag, spXML32, sp32 );
     _LIT16( spXML33, "&frac12;" );
-    _LIT16( sp33, "½" );
+    _LIT16( sp33, "\u00bd" );
     ReplaceInString( aPtrTag, spXML33, sp33 );
     _LIT16( spXML34, "&frac34;" );
-    _LIT16( sp34, "¾" );
+    _LIT16( sp34, "\u00be" );
     ReplaceInString( aPtrTag, spXML34, sp34 );
     _LIT16( spXML35, "&iquest;" );
-    _LIT16( sp35, "¿" );
+    _LIT16( sp35, "\u00bf" );
     ReplaceInString( aPtrTag, spXML35, sp35 );
     _LIT16( spXML36, "&Agrave;" );
-    _LIT16( sp36, "À" );
+    _LIT16( sp36, "\u00c0" );
     ReplaceInString( aPtrTag, spXML36, sp36 );
     _LIT16( spXML37, "&Aacute;" );
-    _LIT16( sp37, "Á" );
+    _LIT16( sp37, "\u00c1" );
     ReplaceInString( aPtrTag, spXML37, sp37 );
     _LIT16( spXML38, "&Acirc;" );
-    _LIT16( sp38, "Â" );
+    _LIT16( sp38, "\u00c2" );
     ReplaceInString( aPtrTag, spXML38, sp38 );
     _LIT16( spXML39, "&Atilde;" );
-    _LIT16( sp39, "Ã" );
+    _LIT16( sp39, "\u00c3" );
     ReplaceInString( aPtrTag, spXML39, sp39 );
     _LIT16( spXML40, "&Auml;" );
-    _LIT16( sp40, "Ä" );
+    _LIT16( sp40, "\u00c4" );
     ReplaceInString( aPtrTag, spXML40, sp40 );
     _LIT16( spXML41, "&Aring;" );
-    _LIT16( sp41, "Å" );
+    _LIT16( sp41, "\u00c5" );
     ReplaceInString( aPtrTag, spXML41, sp41 );
     _LIT16( spXML42, "&AElig;" );
-    _LIT16( sp42, "Æ" );
+    _LIT16( sp42, "\u00c6" );
     ReplaceInString( aPtrTag, spXML42, sp42 ); 
     _LIT16( spXML43, "&Ccedil;" );
-    _LIT16( sp43, "Ç" );
+    _LIT16( sp43, "\u00c7" );
     ReplaceInString( aPtrTag, spXML43, sp43 );
     _LIT16( spXML44, "&Egrave;" );
-    _LIT16( sp44, "È" );
+    _LIT16( sp44, "\u00c8" );
     ReplaceInString( aPtrTag, spXML44, sp44 );
     _LIT16( spXML45, "&Eacute;" );
-    _LIT16( sp45, "É" );
+    _LIT16( sp45, "\u00c9" );
     ReplaceInString( aPtrTag, spXML45, sp45 );
     _LIT16( spXML46, "&Ecirc;" );
-    _LIT16( sp46, "Ê" );
+    _LIT16( sp46, "\u00ca" );
     ReplaceInString( aPtrTag, spXML46, sp46 );
     _LIT16( spXML47, "&Euml;" );
-    _LIT16( sp47, "Ë" );
+    _LIT16( sp47, "\u00cb" );
     ReplaceInString( aPtrTag, spXML47, sp47 );
     _LIT16( spXML48, "&Igrave;" );
-    _LIT16( sp48, "Ì" );
+    _LIT16( sp48, "\u00cc" );
     ReplaceInString( aPtrTag, spXML48, sp48 );
     _LIT16( spXML49, "&Iacute;" );
-    _LIT16( sp49, "Í" );
+    _LIT16( sp49, "\u00cd" );
     ReplaceInString( aPtrTag, spXML49, sp49 );
     _LIT16( spXML50, "&Icirc;" );
-    _LIT16( sp50, "Î" );
+    _LIT16( sp50, "\u00ce" );
     ReplaceInString( aPtrTag, spXML50, sp50 );
     _LIT16( spXML51, "&Iuml;" );
-    _LIT16( sp51, "Ï" );
+    _LIT16( sp51, "\u00cf" );
     ReplaceInString( aPtrTag, spXML51, sp51 );
     _LIT16( spXML52, "&ETH;" );
-    _LIT16( sp52, "Ð" );
+    _LIT16( sp52, "\u00d0" );
     ReplaceInString( aPtrTag, spXML52, sp52 );
     _LIT16( spXML53, "&Ntilde;" );
-    _LIT16( sp53, "Ñ" );
+    _LIT16( sp53, "\u00d1" );
     ReplaceInString( aPtrTag, spXML53, sp53 );
     _LIT16( spXML54, "&Ograve;" );
-    _LIT16( sp54, "Ò" );
+    _LIT16( sp54, "\u00d2" );
     ReplaceInString( aPtrTag, spXML54, sp54 );
     _LIT16( spXML55, "&Oacute;" );
-    _LIT16( sp55, "Ó" );
+    _LIT16( sp55, "\u00d3" );
     ReplaceInString( aPtrTag, spXML55, sp55 );
     _LIT16( spXML56, "&Ocirc;" );
-    _LIT16( sp56, "Ô" );
+    _LIT16( sp56, "\u00d4" );
     ReplaceInString( aPtrTag, spXML56, sp56 );
     _LIT16( spXML57, "&Otilde;" );
-    _LIT16( sp57, "Õ" );
+    _LIT16( sp57, "\u00d5" );
     ReplaceInString( aPtrTag, spXML57, sp57 );
     _LIT16( spXML58, "&Ouml;" );
-    _LIT16( sp58, "Ö" );
+    _LIT16( sp58, "\u00d6" );
     ReplaceInString( aPtrTag, spXML58, sp58 );
     _LIT16( spXML59, "&times;" );
-    _LIT16( sp59, "×" );
+    _LIT16( sp59, "\u00d7" );
     ReplaceInString( aPtrTag, spXML59, sp59 );
     _LIT16( spXML60, "&Oslash;" );
-    _LIT16( sp60, "Ø" );
+    _LIT16( sp60, "\u00d8" );
     ReplaceInString( aPtrTag, spXML60, sp60 );
     _LIT16( spXML61, "&Ugrave;" );
-    _LIT16( sp61, "Ù" );
+    _LIT16( sp61, "\u00d9" );
     ReplaceInString( aPtrTag, spXML61, sp61 );
     _LIT16( spXML62, "&Uacute;" );
-    _LIT16( sp62, "Ú" );
+    _LIT16( sp62, "\u00da" );
     ReplaceInString( aPtrTag, spXML62, sp62 );
     _LIT16( spXML63, "&Ucirc;" );
-    _LIT16( sp63, "Û" );
+    _LIT16( sp63, "\u00db" );
     ReplaceInString( aPtrTag, spXML63, sp63 );
     _LIT16( spXML64, "&Uuml;" );
-    _LIT16( sp64, "Ü" );
+    _LIT16( sp64, "\u00dc" );
     ReplaceInString( aPtrTag, spXML64, sp64 );
     _LIT16( spXML65, "&Yacute;" );
-    _LIT16( sp65, "Ý" );
+    _LIT16( sp65, "\u00dd" );
     ReplaceInString( aPtrTag, spXML65, sp65 );
     _LIT16( spXML66, "&THORN;" );
-    _LIT16( sp66, "Þ" );
+    _LIT16( sp66, "\u00de" );
     ReplaceInString( aPtrTag, spXML66, sp66 );
     _LIT16( spXML67, "&szlig;" );
-    _LIT16( sp67, "ß" );
+    _LIT16( sp67, "\u00df" );
     ReplaceInString( aPtrTag, spXML67, sp67 );
     _LIT16( spXML68, "&agrave;" );
-    _LIT16( sp68, "à" );
+    _LIT16( sp68, "\u00e0" );
     ReplaceInString( aPtrTag, spXML68, sp68 );
     _LIT16( spXML69, "&aacute;" );
-    _LIT16( sp69, "á" );
+    _LIT16( sp69, "\u00e1" );
     ReplaceInString( aPtrTag, spXML69, sp69 );
     _LIT16( spXML70, "&acirc;" );
-    _LIT16( sp70, "â" );
+    _LIT16( sp70, "\u00e2" );
     ReplaceInString( aPtrTag, spXML70, sp70 );
     _LIT16( spXML71, "&atilde;" );
-    _LIT16( sp71, "ã" );
+    _LIT16( sp71, "\u00e3" );
     ReplaceInString( aPtrTag, spXML71, sp71 );
     _LIT16( spXML72, "&auml;");
-    _LIT16( sp72, "ä" );
+    _LIT16( sp72, "\u00e4" );
     ReplaceInString( aPtrTag, spXML72, sp72 );
     _LIT16( spXML73, "&aring;" );
-    _LIT16( sp73, "å" );
+    _LIT16( sp73, "\u00e5" );
     ReplaceInString( aPtrTag, spXML73, sp73 );
     _LIT16( spXML74, "&aelig;" );
-    _LIT16( sp74, "æ" );
+    _LIT16( sp74, "\u00e6" );
     ReplaceInString( aPtrTag, spXML74, sp74 );
     _LIT16( spXML75, "&acedil;" );
-    _LIT16( sp75, "ç" );
+    _LIT16( sp75, "\u00e7" );
     ReplaceInString( aPtrTag, spXML75, sp75 );
     _LIT16( spXML76, "&egrave;" );
-    _LIT16( sp76, "è" );
+    _LIT16( sp76, "\u00e8" );
     ReplaceInString( aPtrTag, spXML76, sp76 );
     _LIT16( spXML77, "&eacute;" );
-    _LIT16( sp77, "é" );
+    _LIT16( sp77, "\u00e9" );
     ReplaceInString( aPtrTag, spXML77, sp77 );
     _LIT16( spXML78, "&ecirc;" );
-    _LIT16( sp78, "ê" );
+    _LIT16( sp78, "\u00ea" );
     ReplaceInString( aPtrTag, spXML78, sp78 );
     _LIT16( spXML79, "&euml;" );
-    _LIT16( sp79, "ë" );
+    _LIT16( sp79, "\u00eb" );
     ReplaceInString( aPtrTag, spXML79, sp79 );
     _LIT16( spXML80, "&igrave;" );
-    _LIT16( sp80, "ì" );
+    _LIT16( sp80, "\u00ec" );
     ReplaceInString( aPtrTag, spXML80, sp80 );
     _LIT16( spXML81, "&iacute;" );
-    _LIT16( sp81, "í" );
+    _LIT16( sp81, "\u00ed" );
     ReplaceInString( aPtrTag, spXML81, sp81 );
     _LIT16( spXML82, "&icirc;" );
-    _LIT16( sp82, "î" );
+    _LIT16( sp82, "\u00ee" );
     ReplaceInString( aPtrTag, spXML82, sp82 );
     _LIT16( spXML83, "&iuml;" );
-    _LIT16( sp83, "ï" );
+    _LIT16( sp83, "\u00ef" );
     ReplaceInString( aPtrTag, spXML83, sp83 );
     _LIT16( spXML84, "&eth;" );
-    _LIT16( sp84, "ð" );
+    _LIT16( sp84, "\u00f0" );
     ReplaceInString( aPtrTag, spXML84, sp84 );
     _LIT16( spXML85, "&ntilde;" );
-    _LIT16( sp85, "ñ" );
+    _LIT16( sp85, "\u00f1" );
     ReplaceInString( aPtrTag, spXML85, sp85 );
     _LIT16( spXML86, "&ograve;" );
-    _LIT16( sp86, "ò" );
+    _LIT16( sp86, "\u00f2" );
     ReplaceInString( aPtrTag, spXML86, sp86 );
     _LIT16( spXML87, "&oacute;" );
-    _LIT16( sp87, "ó" );
+    _LIT16( sp87, "\u00f3" );
     ReplaceInString( aPtrTag, spXML87, sp87 );
     _LIT16( spXML88, "&ocirc;" );
-    _LIT16( sp88, "ô" );
+    _LIT16( sp88, "\u00f4" );
     ReplaceInString( aPtrTag, spXML88, sp88 );
     _LIT16( spXML89, "&otilde;" );
-    _LIT16( sp89, "õ" );
+    _LIT16( sp89, "\u00f5" );
     ReplaceInString( aPtrTag, spXML89, sp89 );
     _LIT16( spXML90, "&ouml;" );
-    _LIT16( sp90, "ö" );
+    _LIT16( sp90, "\u00f6" );
     ReplaceInString( aPtrTag, spXML90, sp90 );
     _LIT16( spXML91, "&divide;" );
-    _LIT16( sp91, "÷" );
+    _LIT16( sp91, "\u00f7" );
     ReplaceInString( aPtrTag, spXML91, sp91 );
     _LIT16( spXML92, "&oslash;" );
-    _LIT16( sp92, "ø" );
+    _LIT16( sp92, "\u00f8" );
     ReplaceInString( aPtrTag, spXML92, sp92 );
     _LIT16( spXML93, "&ugrave;" );
-    _LIT16( sp93, "ù" );
+    _LIT16( sp93, "\u00f9" );
     ReplaceInString( aPtrTag, spXML93, sp93 );
     _LIT16( spXML94, "&uacute;" );
-    _LIT16( sp94, "ú" );
+    _LIT16( sp94, "\u00fa" );
     ReplaceInString( aPtrTag, spXML94, sp94 );
     _LIT16( spXML95, "&ucirc;" );
-    _LIT16( sp95, "û" );
+    _LIT16( sp95, "\u00fb" );
     ReplaceInString( aPtrTag, spXML95, sp95 );
     _LIT16( spXML96, "&uuml;" );
-    _LIT16( sp96, "ü" );
+    _LIT16( sp96, "\u00fc" );
     ReplaceInString( aPtrTag, spXML96, sp96 );
     _LIT16( spXML97, "&yacute;" );
-    _LIT16( sp97, "ý" );
+    _LIT16( sp97, "\u00fd" );
     ReplaceInString( aPtrTag, spXML97, sp97 );
     _LIT16( spXML98, "&thorn;" );
-    _LIT16( sp98, "þ" );
+    _LIT16( sp98, "\u00de" );
     ReplaceInString( aPtrTag, spXML98, sp98 );
     _LIT16( spXML99, "&yuml;" );
-    _LIT16( sp99, "ÿ" );
+    _LIT16( sp99, "\u00ff" );
     ReplaceInString( aPtrTag, spXML99, sp99 );
     _LIT16( spXML100, "&OElig;" );
-    _LIT16( sp100, "Œ" );
+    _LIT16( sp100, "\u0152" );
     ReplaceInString( aPtrTag, spXML100, sp100 );
     _LIT16( spXML101, "&oelig;" );
-    _LIT16( sp101, "œ" );
+    _LIT16( sp101, "\u0153" );
     ReplaceInString( aPtrTag, spXML101, sp101 );
     _LIT16( spXML102, "&Scaron;" );
-    _LIT16( sp102, "Š" );
+    _LIT16( sp102, "\u0160" );
     ReplaceInString( aPtrTag, spXML102, sp102 );
     _LIT16( spXML103, "&scaron;" );
-    _LIT16( sp103, "š" );
+    _LIT16( sp103, "\u0161" );
     ReplaceInString( aPtrTag, spXML103, sp103 );
     _LIT16( spXML104, "&Yuml;" );
-    _LIT16( sp104, "Ÿ" );
+    _LIT16( sp104, "\u0178" );
     ReplaceInString( aPtrTag, spXML104, sp104 );
     _LIT16( spXML105, "&fnof;" );
-    _LIT16( sp105, "ƒ" );
+    _LIT16( sp105, "\u0192" );
     ReplaceInString( aPtrTag, spXML105, sp105 );
     _LIT16( spXML106, "&circ;" );
-    _LIT16( sp106, "ˆ" );
+    _LIT16( sp106, "\u02c6" );
     ReplaceInString( aPtrTag, spXML106, sp106 );
     _LIT16( spXML107, "&tilde;" );
-    _LIT16( sp107, "˜" );
+    _LIT16( sp107, "\u02dc" );
     ReplaceInString( aPtrTag, spXML107, sp107 );
     }
 
@@ -1642,7 +1638,7 @@
     iWLanParams.Append( EInputParams( EWEPKey4Data,                 KWEPKey4Data ) );
     iWLanParams.Append( EInputParams( EWPAPresharedKey,             KWPAPresharedKey ) );
     iWLanParams.Append( EInputParams( EWPAKeyLength,                KWPAKeyLength ) );
-    iWLanParams.Append( EInputParams( EWPAListOfEAPs,               KWPAListOfEAPs ) );
+    iWLanParams.Append( EInputParams( EWPAEapMethod,                KWPAEapMethod ) );
     iWLanParams.Append( EInputParams( EWPAUseOfPresharedKey,        KWPAUseOfPresharedKey ) );
     iWLanParams.Append( EInputParams( EEapGtcUsername,              KEapGtcUsername ) );
     iWLanParams.Append( EInputParams( EEapGtcSessionValidityTime,   KEapGtcSessionValidityTime ) );
@@ -1777,8 +1773,6 @@
     iGlobalParams.Append( EInputParams( EUIPriorityDialIn,      KUIPriorityDialIn ) );
     iGlobalParams.Append( EInputParams( EUIPriorityVpn,         KUIPriorityVpn ) );
     iGlobalParams.Append( EInputParams( EUIPriorityMip,         KUIPriorityMip ) );
-    iGlobalParams.Append( EInputParams( EDefaultConnectionType, KDefaultConnectionType ) );
-    iGlobalParams.Append( EInputParams( EDefaultConnectionName, KDefaultConnectionName ) );
     iGlobalParams.Append( EInputParams( EUsageOfWlan,           KUsageOfWlan ) );
     iGlobalParams.Append( EInputParams( ECellularDataUsageHome,         KCellularDataUsageHome ) );
     iGlobalParams.Append( EInputParams( ECellularDataUsageVisitor,      KCellularDataUsageVisitor ) );
@@ -1823,6 +1817,5 @@
     iDNParams.Append( EInputParams( EDN_IAPName,        KDN_IAPName9 ) );
     iDNParams.Append( EInputParams( EDN_IAPName,        KDN_IAPName10 ) );   
     };
-
         
 // End of File.
--- a/dbcreator/commsdatcreator/bwins/commsdatcreatoru.def	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/bwins/commsdatcreatoru.def	Tue Aug 31 15:35:44 2010 +0300
@@ -1,8 +1,7 @@
 EXPORTS
-	??1CCdcCommsDatCreator@@UAE@XZ @ 1 NONAME ; CCdcCommsDatCreator::~CCdcCommsDatCreator(void)
+	?NewL@CCdcCommsDatCreator@@SAPAV1@XZ @ 1 NONAME ; class CCdcCommsDatCreator * CCdcCommsDatCreator::NewL(void)
 	?CreateCommsDatL@CCdcCommsDatCreator@@QAEXABV?$TBuf@$0BAA@@@@Z @ 2 NONAME ; void CCdcCommsDatCreator::CreateCommsDatL(class TBuf<256> const &)
-	?CreateTablesL@CCdcCommsDatCreator@@QAEXXZ @ 3 NONAME ; void CCdcCommsDatCreator::CreateTablesL(void)
-	?DumpCommsDatL@CCdcCommsDatCreator@@QAEXABV?$TBuf@$0BAA@@@@Z @ 4 NONAME ; void CCdcCommsDatCreator::DumpCommsDatL(class TBuf<256> const &)
-	?NewL@CCdcCommsDatCreator@@SAPAV1@XZ @ 5 NONAME ; class CCdcCommsDatCreator * CCdcCommsDatCreator::NewL(void)
-	?NewLC@CCdcCommsDatCreator@@SAPAV1@XZ @ 6 NONAME ; class CCdcCommsDatCreator * CCdcCommsDatCreator::NewLC(void)
+	?DumpCommsDatL@CCdcCommsDatCreator@@QAEXABV?$TBuf@$0BAA@@@@Z @ 3 NONAME ; void CCdcCommsDatCreator::DumpCommsDatL(class TBuf<256> const &)
+	?NewLC@CCdcCommsDatCreator@@SAPAV1@XZ @ 4 NONAME ; class CCdcCommsDatCreator * CCdcCommsDatCreator::NewLC(void)
+	?CreateTablesL@CCdcCommsDatCreator@@QAEXXZ @ 5 NONAME ; void CCdcCommsDatCreator::CreateTablesL(void)
 
--- a/dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 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"
@@ -11,12 +11,10 @@
 *
 * Contributors:
 *
-* Description:   Project description file for commsdatcreator
-*
+* Description:
+* Project description file for commsdatcreator
 */
 
-
-
 #include <platform_paths.hrh>
 
 TARGET      commsdatcreator.dll
@@ -30,7 +28,7 @@
   
 LANG SC
     
-SOURCEPATH     ../Src
+SOURCEPATH     ../src
 
 SOURCE        cdcreaderbase.cpp
 SOURCE        cdcreaderxml.cpp
@@ -50,7 +48,7 @@
 
 
 // Component specific internal headers 
-USERINCLUDE			../Inc
+USERINCLUDE			../inc
 
 USERINCLUDE			../../inc
 
@@ -73,3 +71,4 @@
 LIBRARY        cmmanagerdatabase.lib
 LIBRARY        flogger.lib 
 LIBRARY        centralrepository.lib
+LIBRARY        eaptools.lib
--- a/dbcreator/commsdatcreatorrfsplugin/src/cdccommsdatcreatorrfsplugin.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatcreatorrfsplugin/src/cdccommsdatcreatorrfsplugin.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -18,7 +18,6 @@
 
 
 #include <centralrepository.h>
-#include "cdccommsdatcreatorcrkeys.h"
 
 #include "cdccommsdatcreatorrfsplugin.h"
 #include "cdclogger.h"
--- a/dbcreator/commsdatstartup/Inc/cdccommsdatstartup.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatstartup/Inc/cdccommsdatstartup.h	Tue Aug 31 15:35:44 2010 +0300
@@ -67,17 +67,6 @@
     */
     void CheckCreatorUIdL();
 
-    /*
-    * Reads the database descriptor input file name
-    * @param out: Name of the database descriptor file 
-    */
-    void GetInputFileNameL( TFileName &aFileName );
-
-    /*
-    * Creates repository
-    */
-    void CreateRepositoryL();
-
    	/**
     * Resets the commsdat repository. This causes the default Commsdat
     * from z to be copied to c
@@ -89,15 +78,6 @@
     */
     void ResetEAPSettingsL();
     
-    /*
-    * Sets the startup status
-    * @param startup status to be set.
-    */
-    void SetStartupStatusL( TInt aStatus );
-    
-    // Repository
-    CRepository *iRepository;
-
     };
 
 
--- a/dbcreator/commsdatstartup/Src/cdccommsdatstartup.cpp	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/commsdatstartup/Src/cdccommsdatstartup.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -27,7 +27,6 @@
 #include <etelpckt.h>
 
 #include <centralrepository.h>
-#include "cdccommsdatcreatorcrkeys.h"
 
 #include "cdccommsdatstartup.h"
 #include "cdccommsdatcreator.h"
@@ -37,6 +36,7 @@
 
 // CONSTANTS
 const TUid KCRUidCommsDb = { 0xcccccc00 };
+_LIT( KVariantXmlFile, "Z:\\private\\10281BC3\\VariantData_commsdat.xml" );
 
 //------------------------------------------------
 // CCdcCommsDatStartup::DoStartL
@@ -50,11 +50,6 @@
     
     CheckCreatorUIdL();
 
-    CreateRepositoryL();
-    
-    // Set status to not initialised
-    SetStartupStatusL( ECommsDatInitialisationFailed );
-
 	CLOG_WRITE( "CCdcCommsDatStartup::ResetCommsDatToDefaultL()" );
 	// In all RFS cases CommsDat must be reset 
 	ResetCommsDatToDefaultL();
@@ -71,136 +66,40 @@
 	// In all RFS cases CommsDat tables must be checked/created
 	cdc->CreateTablesL();
 	
-    TFileName fileName;
-    GetInputFileNameL( fileName );
-        
-    // CommsDatCreator feature is supported if input file name
-    // lenght is not 0. However file name lenght at least 5. (x.xml)     
-    if( fileName.Length() > 0 )
+    // If variant XML file exists, read it and create settings
+    TFileName fileName( KVariantXmlFile );
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    RFile file;
+    if ( KErrNone == file.Open( fs, fileName, EFileRead ) )
         {
+        file.Close();
         CLOG_WRITE( "CCdcCommsDatStartup::CommsDat generation enabled" );
-        
-        TFileName path( _L("Z:\\private\\10281BC3\\" )  );
-        path.Append( fileName );
+    
+        TRAPD(err, cdc->CreateCommsDatL( fileName ) );
+        if ( err != KErrNone )
+            {
+            // CommsDat creation leaved so something must be wrong.
+            // Reset CommsDat and EAP settings.
+            ResetCommsDatToDefaultL();
+            ResetEAPSettingsL();
+            cdc->CreateTablesL();
+            User::Leave( err );
+            }
 
-		CLOG_WRITE( "CCdcCommsDatStartup::CreateCommsDatL begin" );
-	
-        TRAPD(err, cdc->CreateCommsDatL( path ) );
-        if(err != KErrNone )
-        	{
-        	// CommsDat creation leaved so something must be wrong.
-        	// Reset CommsDat and EAP settings.
-        	ResetCommsDatToDefaultL();
-        	ResetEAPSettingsL();
-        	cdc->CreateTablesL();
-        	User::Leave( err );
-        	}
-
-        CLOG_WRITE( "CCdcCommsDatStartup::CreateCommsDatL end" );               
+        CLOG_WRITE( "CCdcCommsDatStartup::CommsDat generation done" );
         }
-       else
-       	{
-       	CLOG_WRITE( "CCdcCommsDatStartup::CommsDat generation disabled" );
-       	}
-        
-    // If nothing has leaved then everything is okay (both in disabled and
-    // enabled cases.
-    SetStartupStatusL( ECommsDatInitialised );
+    else
+        {
+        CLOG_WRITE( "CCdcCommsDatStartup::CommsDat generation disabled" );
+        }
+    fs.Close();
         
     CleanupStack::PopAndDestroy( cdc );
     CLOG_WRITE( "CCdcCommsDatStartup::DoStartL end" );
     }
 
 // ----------------------------------------------------------------------------
-// CCdcCommsDatStartup::CreateRepositoryL()
-// ----------------------------------------------------------------------------
-//    
-void CCdcCommsDatStartup::CreateRepositoryL()
-    {
-    CLOG_WRITE( "CCdcCommsDatStartup::CreateRepositoryL()" );
-
-    TRAPD( err, iRepository = CRepository::NewL( KCRUidCommsDatCreator ) );
-    
-    // Log is important now, because repository cannot contain the 
-    // error value if it cannot be used 
-    if( err != KErrNone )
-        {
-        CLOG_WRITE_FORMAT( "Repository could not created err : %d", err );
-        User::Leave( err );
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// CCdcCommsDatStartup::SetStartupStatusL()
-// ----------------------------------------------------------------------------
-//    
-void CCdcCommsDatStartup::SetStartupStatusL( TInt aResult )
-    {
-    CLOG_WRITE_FORMAT( "CCdcCommsDatStartup::SetStartupStatusL() %d", aResult );
-
-    TInt err = iRepository->Set( KCommsDatCreatorStartupStatus, aResult );
-    if( err != KErrNone )
-        {
-        CLOG_WRITE_FORMAT( 
-                "Value could not write to repository err : %d", err );
-        User::Leave( err );
-        }
-
-    CLOG_WRITE_FORMAT( "CCdcCommsDatStartup::SetStartupStatusL() %d", aResult );
-    }
-
-// ----------------------------------------------------------------------------
-// CCdcCommsDatStartup::GetInputFileNameL()
-// ----------------------------------------------------------------------------
-//    
-void CCdcCommsDatStartup::GetInputFileNameL( TFileName &aFileName )
-    {
-    CLOG_WRITE( "CCdcCommsDatStartup::GetInputFileNameL()" );
-
-    TInt err = iRepository->Get( KCommsDatCreatorInputFileName, aFileName );
-    if( err != KErrNone )
-        {
-        CLOG_WRITE_FORMAT(
-                 "Value could not red from repository err : %d", err );
-        User::Leave( err );
-        }
-
-    CLOG_WRITE( "Input filename red" );
-
-    HBufC *fileName = aFileName.AllocLC();
-
-    CLOG_WRITE_FORMAT( "Input filename value : %S", fileName );
-    
-    CleanupStack::PopAndDestroy( fileName );
-    
-    // Check if file exists. If it doesn't reset filename.
-    RFs fs;
-    err = fs.Connect();//check
-    
-    if( err == KErrNone )
-    	{
-    	RFile file;
-    
-    	TFileName path( _L("Z:\\private\\10281BC3\\" )  );
-    	path.Append( aFileName );
-
-    	err = file.Open(fs, path, EFileRead);
-    	if( err != KErrNone )
-    	{
-	    	CLOG_WRITE( "CCdcCommsDatStartup::GetInputFileNameL() File does not exist");
-  	  	aFileName.Zero();
-    	}
-    	else
-    	{
-    		file.Close();
-    	}
-    	fs.Close();
-    	}
-    
-    CLOG_WRITE( "CCdcCommsDatStartup::GetInputFileNameL()" );
-    }
-
-// ----------------------------------------------------------------------------
 // CCdcCommsDatStartup::CheckCreatorUIdL()
 // ----------------------------------------------------------------------------
 //   	
@@ -211,7 +110,7 @@
     
     CLOG_WRITE( "CCdcCommsDatStartup::CheckCreatorUIdL" );
     
-    TUid creatorId = User::CreatorIdentity();
+    TUid creatorId = User::CreatorSecureId();
 
     CLOG_WRITE_FORMAT( "CreatorId : %x", creatorId );
    
@@ -229,10 +128,6 @@
 //   	
 CCdcCommsDatStartup::~CCdcCommsDatStartup()
     {
-    if( iRepository )
-        {
-        delete iRepository;
-        }
     }
 
 // ----------------------------------------------------------------------------
Binary file dbcreator/commsdatstartup/cenrep/keys_commsdatcreator.xls has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dbcreator/conf/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Build information for the DbCreator Config files and ROM
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+commsdatcreator.confml				MW_LAYER_CONFML(commsdatcreator.confml)
+commsdatcreator_01.gcfml			MW_LAYER_GCFML(commsdatcreator_01.gcfml)
+commsdatcreator.implml          MW_LAYER_CRML(commsdatcreator.implml)
+../rom/commsdatcreator.iby						CORE_MW_LAYER_IBY_EXPORT_PATH(commsdatcreator.iby)
Binary file dbcreator/conf/commsdatcreator.confml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dbcreator/conf/commsdatcreator.implml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<container xmlns="http://www.symbianfoundation.org/xml/implml/1">
+
+	<tempVariable ref="TempCommsDatCreator.InputPath" />
+
+	<container>
+		<tag name='target' value='rofs3' />
+		<phase name='pre' />
+		<ruleml xmlns="http://www.s60.com/xml/ruleml/3">
+
+			<!-- correct cccccc00.cre to image -->
+			<rule>
+		  ${APs.AP} or
+		  ${VPN_APs.VPN_AP} or
+		  ${LAN_APs.LAN_AP} or
+		  ${WLAN_APs.WLAN_AP}
+		  configures 
+		  ${TempCommsDatCreator.InputPath} = '/epoc32/data/Z/private/10202be9'
+		 </rule>
+
+		</ruleml>
+
+	</container>
+
+	<container>
+		<tag name='target' value='rofs3' />
+		<phase name='normal' />
+		<content xmlns="http://www.s60.com/xml/content/2">
+			<desc>Copy commsdat content</desc>
+			<output dir="content/private/10202be9" file="cccccc00.cre">
+				<externalinput dir="${TempCommsDatCreator.InputPath}">
+					<include files="cccccc00_empty.cre" />
+				</externalinput>
+			</output>
+		</content>
+	</container>
+
+</container>
\ No newline at end of file
Binary file dbcreator/conf/commsdatcreator_10281BC8.crml has changed
--- a/dbcreator/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -24,7 +24,7 @@
 PRJ_EXPORTS
 ../conf/commsdatcreator.confml				MW_LAYER_CONFML(commsdatcreator.confml)
 ../conf/commsdatcreator_01.gcfml			MW_LAYER_GCFML(commsdatcreator_01.gcfml)
-../conf/commsdatcreator_10281BC8.crml	MW_LAYER_CRML(commsdatcreator_10281BC8.crml)
+../conf/commsdatcreator.implml          MW_LAYER_CRML(commsdatcreator.implml)
 ../rom/commsdatcreator.iby						CORE_MW_LAYER_IBY_EXPORT_PATH(commsdatcreator.iby)
 
 
--- a/dbcreator/inc/cdccommon.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/inc/cdccommon.h	Tue Aug 31 15:35:44 2010 +0300
@@ -162,7 +162,7 @@
     {
     EWPAPresharedKey = 0x00002000,    // Preshared key 
     EWPAKeyLength    = 0x00002001,    // Key length
-    EWPAListOfEAPs   = 0x00002002,    // List of EA plugins
+    EWPAEapMethod    = 0x00002002,    // EAP Method
     EWPAUseOfPresharedKey =0x00002003,// Use of preshared key
     };
     
--- a/dbcreator/inc/cdccommsdatcreator.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/dbcreator/inc/cdccommsdatcreator.h	Tue Aug 31 15:35:44 2010 +0300
@@ -67,7 +67,7 @@
 
 
         /** Destructor */
-	    IMPORT_C virtual ~CCdcCommsDatCreator();
+        virtual ~CCdcCommsDatCreator();
         
     private:
     
@@ -96,7 +96,7 @@
 
         void SetUnderlyingIapL( RPointerArray< HBufC >& aUnderLying );
 
-        void SetDefaultConnectionL( RPointerArray< HBufC >& aDefCon );
+//        void SetDefaultConnectionL( RPointerArray< HBufC >& aDefCon );
         
         void SetWlanSecurityL( RPointerArray< HBufC >& aWlanSecurity );
         
--- a/dbcreator/inc/cdccommsdatcreatorcrkeys.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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:   Commsdatcreator related central repository keys
-*
-*/
-
-
-
-#ifndef __CDC_COMMSDAT_CREATOR_CR_KEYS_H__
-#define __CDC_COMMSDAT_CREATOR_CR_KEYS_H__
-
-/** CommsDatCreator API */
-/** Provides access CDCCommsDatCreator Startup Status CenRep key*/
-
-const TUid KCRUidCommsDatCreator= {0x10281BC8};
-
-
-/** 
-* Defines the status of the CommsDat creation. 
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KCommsDatCreatorStartupStatus = 0x00000001;
-
-
-/** 
-* Defines the input file name for CommsDat creation. 
-*
-* String type
-*
-* Default value: VariantData.xml
-*/
-const TUint32 KCommsDatCreatorInputFileName = 0x00000002;
-
-/** 
-* Possible statuses of the CommsDat creation. 
-*
-* enum type
-*
-* Default value: 0
-*/
-
-enum TCommsDatCreatorStartupStatus
-	{
-	ECommsDatNotInitialised,
-	ECommsDatInitialised,
-	ECommsDatInitialisationFailed
-	};
-
-
-
-#endif // __CDC_COMMSDAT_CREATOR_CR_KEYS_H__
\ No newline at end of file
--- a/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -26,13 +26,13 @@
 ../inc/meshpreface1.cfg         /epoc32/release/winscw/udeb/z/system/data/meshpreface1.cfg
 
 PRJ_MMPFILES
-#include "../accesspointcontrol/apcontrollistplugin/group/bld.inf"
 #include "../alwayson_net_plugin/group/bld.inf"
 #include "../apengine/group/bld.inf"
 #include "../bearermanagement/group/bld.inf"
 #include "../cmmanager/group/bld.inf"
 #include "../connectionmonitoring/group/bld.inf"
 #include "../connectionutilities/ConnectionDialogs/group/bld.inf"
+#include "../keepalive/group/bld.inf"
 #include "../dbcreator/group/bld.inf"
 #include "../ipcm_plat/group/bld.inf"
 #include "../ipcm_pub/group/bld.inf"
--- a/ipcm_plat/access_point_engine_misc_api/inc/ApProtHandler.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/access_point_engine_misc_api/inc/ApProtHandler.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define CAPPROTHANDLER_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_plat/access_point_engine_misc_api/inc/VpnAPEngine.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/access_point_engine_misc_api/inc/VpnAPEngine.h	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,7 @@
 #define VPN_AP_ENGINE_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 // INCLUDES
--- a/ipcm_plat/access_point_engine_misc_api/inc/VpnAPItem.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/access_point_engine_misc_api/inc/VpnAPItem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,7 @@
 #define VPN_AP_ITEM_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 // INCLUDES
--- a/ipcm_plat/bearer_settings_plugin_api/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,8 +11,8 @@
 *
 * Contributors:
 *
-* Description:  File that exports the files belonging to 
-:                Bearer Settings Plugin API
+* Description:
+* File that exports the files belonging to Bearer Settings Plugin API.
 *
 */
 
@@ -24,13 +24,13 @@
 
 PRJ_EXPORTS
 
-../inc/cmpbasesettingsdlgip.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpbasesettingsdlgip.h)
-../inc/cmpluginlanbase.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginlanbase.h)
-../inc/cmpbasesettingsdlgadv.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpbasesettingsdlgadv.h)
-../inc/cmpluginlandef.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginlandef.h)
-../inc/cmcommonconstants.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmcommonconstants.h)
-../inc/cmpluginbaseeng.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginbaseeng.h)
-../inc/cmpluginbase.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginbase.h)
+../inc/cmpbasesettingsdlgip.h   MW_LAYER_PLATFORM_EXPORT_PATH(cmpbasesettingsdlgip.h)
+../inc/cmpluginlanbase.h        MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginlanbase.h)
+../inc/cmpbasesettingsdlgadv.h  MW_LAYER_PLATFORM_EXPORT_PATH(cmpbasesettingsdlgadv.h)
+../inc/cmpluginlandef.h         MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginlandef.h)
+../inc/cmcommonconstants.h      MW_LAYER_PLATFORM_EXPORT_PATH(cmcommonconstants.h)
+../inc/cmpluginbaseeng.h        MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginbaseeng.h)
+../inc/cmpluginbase.h           MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginbase.h)
 ../inc/cmpluginlanbasedef.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpluginlanbasedef.h)
 ../inc/cmpbasesettingsdlg.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpbasesettingsdlg.h)
-../inc/mcmdexec.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcmdexec.h)
+../inc/mcmdexec.h               MW_LAYER_PLATFORM_EXPORT_PATH(mcmdexec.h)
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,7 @@
 #include <eiklbo.h>
 #include <aknlists.h>
 #include <AknDialog.h>
-#include <ConeResLoader.h>
+#include <coneresloader.h>
 #include <cmcommonconstants.h>
 #include <cmconnectionmethoddef.h>
 
@@ -399,10 +399,6 @@
         // A flag to indicate if setting has been changed by user
         TBool                   iHasSettingChanged;
         
-        // A flag to indicate if edited IAP can be continued
-        // IAP may be possible to be modified or deleted by other application
-        TBool                   iCanEditingContinue;
-        
     };
 
 #endif // CMPLUGINBASE_SETTINGS_DLG_H
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlgadv.h	Tue Aug 31 15:35:44 2010 +0300
@@ -25,7 +25,7 @@
 #include <eikapp.h>
 #include <eikdoc.h>
 #include <aknlists.h>
-#include <AknDialog.h>
+#include <akndialog.h>
 #include <cmpbasesettingsdlg.h>
 
 // FORWARD DECLARATIONS
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbase.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbase.h	Tue Aug 31 15:35:44 2010 +0300
@@ -241,30 +241,7 @@
 
         IMPORT_C CommsDat::CMDBSession& Session() const;
 
-        /**
-        * Launches the settings dialog of the plugin
-        *
-        * @since S60 3.2
-        * @return soft key selection
-        */
-        TInt RunSettingsL();
-
-        /**
-        * Called on a newly created connection method to initialize it properly
-        * with user interaction (e.g. APN setting for a packet data-, WEP-key
-        * setting for a WLAN connection method, etc.).
-        * Note: each plug-in should set its name (i.e. ECmName) in this
-        * function call.
-        *
-        * @since S60 3.2
-        * @param aManuallyConfigure let's the plugin know if a plugin should 
-        *                           be configured manually or automatically
-        * @return ETrue if initialization was successful and wasn't cancelled.
-        * EFalse, if initialization process was cancelled (i.e. user pressed
-        * Cancel button).
-        */
-        TBool InitializeWithUiL( TBool aManuallyConfigure );
-        
+       
         /**
         * Checks if the plug-in can handle the given AP.
         * @param aIapId IAPId of the AP to be checked
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,8 @@
 *
 * Contributors:
 *
-* Description:  IF implementation class for connection method plugins.
+* Description:
+* IF implementation class for connection method plugins.
 *
 */
 
@@ -23,14 +24,28 @@
 
 #include <e32std.h>
 #include <e32base.h>
-#include <ecom/ecom.h>        // For REComSession
+#include <ecom/ecom.h>
 #include <metadatabase.h>
 #include <commsdattypesv1_1.h>
+#include <cmmanagerdef.h>
 
+
+/**
+ * Macro for getting element id from Iap Id.
+ * @param iapRecId Record id of an Iap.
+ */
 #define IAP_ELEMENT_ID( iapRecId )  (KCDTIdIAPRecord | \
                                      KCDMaskShowFieldType | \
                                      (iapRecId << 8))
 
+/**
+ * Macros for getting/setting diffrerent type of values from/to the records(CommsDat)
+ * @param record Pointer to the record which has the field requested/to be set.
+ * @param fieldId Id of the field to get/set the value.
+ * @param ***Val Value to be set.
+ * @return Returns the requested value in get operation.
+ */
+
 #define QUERY_HBUFC_FIELD( record, fieldId ) *STATIC_CAST(CommsDat::CMDBField<HBufC*>*, record->GetFieldByIdL( fieldId ))
 #define QUERY_UINT32_FIELD( record, fieldId ) *STATIC_CAST(CommsDat::CMDBField<TUint32>*, record->GetFieldByIdL( fieldId ))
 #define QUERY_INT_FIELD( record, fieldId ) *STATIC_CAST(CommsDat::CMDBField<TInt>*, record->GetFieldByIdL( fieldId ))
@@ -41,11 +56,23 @@
 
 // CONSTANTS
 const TInt32 KExtensionBaseLevel = 1;
-const TUint32 KDefAttrsArrayGranSize = 32;
-const TUint32 KMaxProxyServerNameLength = 1000;
+const TUint32 KMaxProxyServerNameLength = 1024;
 
 const TUint32 KDummyBearerType = 1;
 
+/**
+ * Record indexes for generic iap records in the Client instance table.
+ */
+const TInt KIapRecordIndex = 0;         // Mandatory record
+const TInt KServiceRecordIndex = 1;     // Mandatory record
+const TInt KNetworkRecordIndex = 2;     // Mandatory record
+const TInt KWAPAPRecordIndex = 3;       // Mandatory record
+const TInt KWAPBearerRecordIndex = 4;   // Mandatory record
+const TInt KMetaDataRecordIndex = 5;    // Mandatory record
+const TInt KLocationRecordIndex = 6;    // Optional record
+const TInt KProxyRecordIndex = 7;       // Mandatory record (flag in record tells if in use)
+
+
 // DATA TYPES
 typedef enum
     {
@@ -53,8 +80,8 @@
     ECmInt,
     ECmText,
     ECmText8
-    }TCMFieldTypes;
-    
+    } TCMFieldTypes;
+
 // Attributes that are related to bearer plugin creation
 enum TBearerCreationCommonAttributes
     {
@@ -63,976 +90,851 @@
                                                 * bearer creation related
                                                 * attributes
                                                 */
-    
+
     ECmExtensionLevel,          /**<
-                                * Return the extension level of the given 
+                                * Return the extension level of the given
                                 * bearer type. 1 means the level 1st.
                                 * (TUint32 - default: none - read only)
                                 */
-    
+
     ECmBearerCreationCommonAttributesEnd = 9999 /**<
                                                 * Marks the end of bearer
                                                 * creation related attributes
                                                 */
     };
 
-class CCmPluginBaseEng;
-class CCmPluginBase;
-
 /**
-* Validation function called before data is stored.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute to be set
-* @param aValue value to be checked
-* @return ETrue if value is stored.
-*/
-typedef TBool (*TValidationFunctionL)( CCmPluginBaseEng* aThis,
-                                      TUint32 aAttribute,
-                                      const TAny* aValue );
-
-/**
-* Structure of conversion table between CM attributes and
-* CommsDat ids. The first element must indicate the 
-* range of the conversion table. iAttribId is the lowest Id, 
-* iCommsDatId is the highest one. The last element is a
-* terminator. e.g. Proxy table:
-* static const TCmAttribConvTable SProxyConvTbl[] = 
-*   {
-        { ECMProxyUsageEnabled, ECMProxyRangeMax, NULL }
-        { ECMProxyUseProxyServer, KCDTIdUseProxyServer, NULL },
-        { ECmProxyPortNumber, KCDTIdPortNumber, &CheckPortNumberValidityL },
-        ...
-        { 0, 0 }
-    }
-*/
-typedef struct
-    {
-    TInt    iAttribId;
-    TInt    iCommsDatId;
-    TValidationFunctionL iValidFuncL;
-    TInt    iTitleId;
-    TInt    iMaxLength;
-    TUint32 iAttribFlags;   // see TCmConvAttribFlags
-    TInt    iDefSettingResId;
-    TInt    iEditorResId;
-    TInt    iDefValueResId;
-    TAny*   iNotUsed1;
-    TAny*   iNotUsed2;
-    }TCmAttribConvTable;
-    
-enum TCmConvAttribFlags
-    {
-    EConvNoZeroLength   = 0x00000001,   // Zero length NOT acceptable
-    EConvCompulsory     = 0x00000002,
-    EConv8Bits          = 0x00000004,
-    EConvReadOnly       = 0x00000008,
-    EConvNumber         = 0x00000010,
-    EConvIPv4           = 0x00000020,
-    EConvIPv6           = 0x00000040,
-    EConvPassword       = 0x00000080,
-    };
-
-typedef struct
-    {
-    CommsDat::CCDRecordBase*      *iRecord;
-    TBool*              iEnabled;
-    const TCmAttribConvTable* iConvTable;
-    }TCmAttrConvArrayItem;
-
-typedef struct
-    {
-    TInt                iAttribId;
-    TInt                iCommonAttribId;
-    }TCmCommonAttrConvArrayItem;
-    
+ * Flags for Iap metadata to indicate:
+ * EMetaHighlight: If it's set it indicates that a connection method is
+ *                 highlighted in Agent dialog. Only one connection
+ *                 method can have this flag set.
+ * EMetaHiddenAgent: If it's set it indicates that an connection method is
+ *                   hidden connection method in Agent dialog.
+ * EMetaHotSpot: If it's set it indicates that an connection method is
+ *               HotSpot connection method.
+ */
 enum TCmMetaDataFields
     {
     EMetaHighlight    = 0x00000001,
-    EMetaHiddenAgent  = 0x00000002
+    EMetaHiddenAgent  = 0x00000002,
+    EMetaHotSpot      = 0x00000004
     };
-    
-// FUNCTION PROTOTYPES
-
-/**
-* TValidationFunctionL functions.
-*/
-
-/**
-* Function should be called if client tries to set attribute that is read-only
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute not used
-* @param aValue not used
-* @leave KErrNotSupported in every cases
-*/
-IMPORT_C TBool ReadOnlyAttributeL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute, 
-                                  const TAny* aValue );
-
-/**
-* Function to check if the passed IPv4 address is valid.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param aValue TDesC* IPv4 address buffer to be checked
-*/
-IMPORT_C TBool CheckIPv4ValidityL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute, 
-                                  const TAny* aValue );
-
-/**
-* Function to check if the passed IPv6 address is valid.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param aValue TDesC* IPv6 address buffer to be checked
-*/
-IMPORT_C TBool CheckIPv6ValidityL( CCmPluginBaseEng* aThis, 
-                                  TUint32 aAttribute, 
-                                  const TAny* aValue );
-
-/**
-* Function to check if the passed port number is valid.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param aValue TUint32 the port number to be check
-*/
-IMPORT_C TBool CheckPortNumberValidityL( CCmPluginBaseEng* aThis, 
-                                        TUint32 aAttribute, 
-                                        const TAny* aValue );
-
-/**
-* Function to check if the passed record is valid.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param aValue TUint32 the record id to be checked
-*/
-IMPORT_C TBool CheckRecordIdValidityL( CCmPluginBaseEng* aThis, 
-                                      TUint32 aAttribute, 
-                                      const TAny* aValue );
-
-/**
-* Function to check if the passed WAPWspOption is valid.
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param TUint32 the WPSOption to be checked
-*/
-IMPORT_C TBool CheckWAPWspOptionValidityL( CCmPluginBaseEng* aThis, 
-                                          TUint32 aAttribute, 
-                                          const TAny* aValue );
-
-/**
-* @param aThis 'this' pointer of the plugin instance
-* @param aAttribute attribute client wants to set
-* @param TUint32 the WPSOption to be checked
-*/
-IMPORT_C TBool SetProxyServerNameL( CCmPluginBaseEng* aThis, 
-                                   TUint32 aAttribute, 
-                                   const TAny* aValue );
-                          
-/**
-* Miscellaneous utility functions.
-*/
-
-/**
-* Check if the passed IP address is '0.0.0.0' or empty string
-* @param aIpAddress IP address to be checked
-*/
-IMPORT_C TBool IsUnspecifiedIPv4Address( const TDesC& aIpv4Address );
-
-/**
-* Check if the passed IP address is one of these:
-* - empty string    -   
-* - '0:0:0:0:0:0:0:0' 
-* - 'fec0:000:0000:ffff::1'
-* - 'fec0:000:0000:ffff::2'
-* @param aIpAddress IP address to be checked
-*/
-IMPORT_C CMManager::TIPv6Types ClassifyIPv6Address( const TDesC& aIpv6Address );
 
 // FORWARD DECLARATIONS
-class CCmDestinationImpl;
-class CCmManagerImpl;
+class CCmPluginBaseEng;
 class CCDIAPMetadataRecord;
-class CCmTransactionHandler;
-class CCmPluginBasePrivate;
-        
+
 // CLASS DECLARATION
+/**
+ * Initialisation instance for plugin creation. Used in plugin
+ * construction phase.
+ */
 NONSHARABLE_CLASS(TCmPluginInitParam)
     {
     public:
-    
-        TCmPluginInitParam( CCmManagerImpl& aCmMgr );
-        
+        /**
+         * Constructor.
+         * @param aSessionRef Reference for open Session handle to CommsDat.
+         */
+        IMPORT_C TCmPluginInitParam( CommsDat::CMDBSession& aSessionRef );
+
+    public:
+        /**
+         * Reference to CommsDat session handle.
+         */
+        CommsDat::CMDBSession& iSessionRef;
+
+        /**
+         * Reserved for future.
+         */
+        TAny* iNotused1;
+        TAny* iNotused2;
+    };
+
+// CLASS DECLARATION
+/**
+ * This defines the data object used for moving data between
+ * cmm server and plugins.
+ */
+NONSHARABLE_CLASS( CCmClientPluginInstance ): public CBase
+    {
     public:
-    
-        CCmManagerImpl&     iCmMgr;
-        TUint32             iParentDest;// Parent destination
-        TAny*               iNotused1;
-        TAny*               iNotused2;
+        /**
+         * Two-phase constructor. Returns pointer to the new
+         * CCmClientPluginInstance object.
+         */
+        IMPORT_C static CCmClientPluginInstance* NewL();
+
+        /**
+         * Two-phase constructor. Returns pointer to the new
+         * CCmClientPluginInstance object.
+         */
+        IMPORT_C static CCmClientPluginInstance* NewLC();
+
+        /**
+         * Destructor
+         */
+        IMPORT_C ~CCmClientPluginInstance();
+
+    private:
+        /**
+         * Default constructor.
+         */
+        CCmClientPluginInstance();
+
+        /**
+         * Second phase constructor.
+         */
+        void ConstructL();
+
+    public:
+        /**
+         * Pointer array for generic record pointers. Those are copies
+         * from CommsDat versions for the client usage.
+         */
+        RPointerArray<CommsDat::CCDRecordBase> iGenRecordArray;
+
+        /**
+         * Pointer array for bearer specific record pointers. Those are copies
+         * from CommsDat versions for the client usage. These are asked from
+         * the different plugins.
+         */
+        RPointerArray<CommsDat::CCDRecordBase> iBearerSpecRecordArray;
+
+        /** Naming way of the CM. e.g. ENamingUnique */
+        CMManager::TNamingMethod iNamingMethod;
+
+        /** Boolean to keep the information if location is enabled */
+        TBool iLocationEnabled;
+
+        /** Iap Record id of this Connection Method */
+        TUint32 iIapId;
     };
 
 /**
- *  CCmPluginBaseEng is base class for every connection method plugin
+ *  CCmPluginBaseEng is base class for every connection method plugin.
+ *  It handles all the generic iap informations e.g. record handling
+ *  and attribute reaquests to generic records.
  *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
+ *  @lib cmmpluginbase.lib
+ *  @since S60 v5.2
  */
 class CCmPluginBaseEng : public CBase
     {
     public:
-    
-        /** Destructor. */
-        IMPORT_C virtual ~CCmPluginBaseEng();
-        
-        /**
-        * Create a new instance of the given bearer type plugin.
-        * Used from framework to avoid using slow ECom framework.
-        * @param aInitParam initialization data
+       /**
+        * Destructor.
         */
-        virtual CCmPluginBaseEng* 
-                CreateInstanceL( TCmPluginInitParam& aInitParam ) const = 0;
-        
-    public: // Attribute handlers
-    
+       IMPORT_C virtual ~CCmPluginBaseEng();
+
         /**
-        * Gets the value for a TInt attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @return contains the requested TInt attribute.
-        */
-        IMPORT_C virtual TUint32 
-                        GetIntAttributeL( const TUint32 aAttribute ) const;
+         * Create a new instance of the given bearer type plugin.
+         * Used from CMM server to avoid using slow ECom framework.
+         * @param aInitParam initialization data
+         * @return Returns CCmPluginBaseEng type pointer which represents pure
+         * bearer instance for the CMM server.
+         */
+        virtual CCmPluginBaseEng* CreateInstanceL(
+                TCmPluginInitParam& aInitParam ) const = 0;
 
         /**
-        * Gets the value for a TBool attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @return contains the requested TBool attribute.
-        */
-        IMPORT_C virtual TBool 
-                        GetBoolAttributeL( const TUint32 aAttribute ) const;
+         * Following GetBearerInfoXXXL methods return the values of the
+         * requested attributes. These values are bearerspecific so they
+         * don't vary between CMs with same bearer type.
+         * @param aAttribute An attribute identifier.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+        IMPORT_C virtual TUint32 GetBearerInfoIntL(
+                TUint32 aAttribute ) const = 0;
+
+        IMPORT_C virtual TBool GetBearerInfoBoolL(
+                TUint32 aAttribute ) const = 0;
+
+        IMPORT_C virtual HBufC* GetBearerInfoStringL(
+                TUint32 aAttribute ) const = 0;
+
+        IMPORT_C virtual HBufC8* GetBearerInfoString8L(
+                TUint32 aAttribute ) const = 0;
+
+        /**
+         * Checks if the plug-in can handle the Connection Method identified
+         * with parameter aIapId.
+         * @param aIapId IAPId of the AP to be checked
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const = 0;
+
+        /**
+         * Checks if the plug-in can handle the given IAP record.
+         * @param aIapRecord IAP record to be checked
+         * @return ETrue if plug-in can handle the IAP, otherwise EFalse.
+         */
+        virtual TBool CanHandleIapIdL(
+                CommsDat::CCDIAPRecord* aIapRecord ) const = 0;
+
+    public: // Client interface
+        /**
+         * Loads all the records belonging to this Connection Method.
+         * @param aIapId Id of the IAP record. Identifies the CM
+         * related records to load.
+         */
+        IMPORT_C void LoadL( TUint32 aIapId );
+
+        /**
+         * Resets and loads all the records belonging to this Connection Method.
+         */
+        IMPORT_C void ReLoadL();
 
         /**
-        * Gets the value for a String16 attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @return copy of the requested attribute. Ownership is passed.
-        */
-        IMPORT_C virtual HBufC* 
-                        GetStringAttributeL( const TUint32 aAttribute ) const;
-        
-        /**
-        * Gets the value for a String8 attribute.
-        * @param aAttribute Identifies the attribute to be retrived.
-        * @return copy of the requested attribute. Ownership is passed.
-        */
-        IMPORT_C virtual HBufC8* 
-                        GetString8AttributeL( const TUint32 aAttribute ) const;
+         * Creates a new Connection Method in memory. Call UpdateL() to store
+         * it in CommsDat. No CommsDat transaction operation is needed for this.
+         * @param aCmId Predefined iapid to be used when saving to CommsDat.
+         *       0 means that CommsDat gives the id.
+         */
+        IMPORT_C void CreateNewL( TUint32 aCmId );
 
         /**
-        * Sets the value for a TInt attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        IMPORT_C virtual void SetIntAttributeL( 
-                             const TUint32 aAttribute, TUint32 aValue );
+         * Creates a copy of an existing Connection Method.
+         * @param aClientPluginInstance The source data to create the copy from.
+         * @return CCmPluginBaseEng type pointer to an object which represents
+         * the new plugin to the CMM server.
+         */
+        IMPORT_C CCmPluginBaseEng* CreateCopyL(
+                CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Sets the value for a TBool attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        IMPORT_C virtual void SetBoolAttributeL( 
-                             const TUint32 aAttribute, TBool aValue );
+         * Updates all records to commsdat. Data is copied from the client's copy
+         * to the original data.
+         * This method does not open/rollback/commit transaction to CommsDat.
+         * Caller must handle transactions.
+         */
+        IMPORT_C virtual void UpdateL(
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        /*
+         * Deletes all the records of this CM from the database.
+         * All the preventing conditions must be checked before calling this.
+         * This method does not open/rollback/commit transaction to CommsDat.
+         * Caller must handle transactions.
+         */
+        IMPORT_C virtual void DeleteL();
+
+        /**
+         * Creates a copy of all plugin data( most of them are CommsDat data ) for a client.
+         * @param aClientPluginInstance An object where to copy the data.
+         */
+        IMPORT_C void GetPluginDataL( CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Sets the value for a String16 attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        IMPORT_C virtual void SetStringAttributeL( 
-                             const TUint32 aAttribute, const TDesC16& aValue );
+         * Following GetXXXXAttributeL methods return the values of the
+         * requested attributes. Attributes are returned from the client's
+         * copy of the data. These values are CM specific.
+         * @param aAttribute An attribute identifier.
+         * @param aClientPluginInstance Client's copy of the data where
+         * to get the return value.
+         * @return Returns the value requested. If not found leaves with
+         * KErrNotFound error code.
+         */
+        IMPORT_C TUint32 GetIntAttributeL(
+                TUint32 aAttribute,
+                CCmClientPluginInstance* aClientPluginInstance );
 
-        /**
-        * Sets the value for a String8 attribute.
-        * @param aAttribute Identifies the attribute to be set.
-        * @param aValue The value to be set.
-        * @return None.
-        */
-        IMPORT_C virtual void SetString8AttributeL( 
-                             const TUint32 aAttribute, const TDesC8& aValue );
+        IMPORT_C TBool GetBoolAttributeL(
+                TUint32 aAttribute,
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        IMPORT_C HBufC* GetStringAttributeL(
+                TUint32 aAttribute,
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        IMPORT_C HBufC8* GetString8AttributeL(
+                TUint32 aAttribute,
+                CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Restore the original value of the attribute from commsdat field.
-        * Base implementation can be used only with attributes 
-        * stored directly in commsdat.
-        * @param aAttribute attribute to be restored
-        */
-        IMPORT_C virtual void RestoreAttributeL( const TUint32 aAttribute );
-        
-        /**
-        * Returns the CCmDestinationImpl* if this is an 
-        * embedded destination CM. Otherwise returns NULL.
-        * @return embedded destination object or NULL
-        */
-        IMPORT_C virtual CCmDestinationImpl* Destination() const;
-        
-        /**
-        * Update or if this is a new CM, creates CM in CommsDat. 
-        * - OpenTransactionLC()
-        * - PrepareToUpdateRecordsL()
-        * - UpdateChargeCardRecordL()
-        * - UpdateServiceRecordL()
-        * - UpdateIAPRecordL()
-        *   - UpdateLocationRecordL()
-        *   - BearerRecordIdLC()
-        *   - UpdateNetworkRecordL()
-        *   - UpdateWapRecordL()
-        *   - UpdateProxyRecordL()
-        *   - UpdateConnPrefSettingL()
-        * - UpdateAdditionalRecordsL()
-        * - CommitTransactionL()
-        * @return None.
-        */        
-        IMPORT_C virtual void UpdateL();     
-        
-        /*
-        * Delete from the database if this CM has no more reference
-        * from the DN_IAP table.
-        * - IsMultipleReferencedL()
-        * - OpenTransactionLC()
-        * - PrepareToDeleteL()
-        * - Delete records (in this order)
-        *   - IAP
-        *   - Proxy
-        *   - Service
-        *   - ChargeCard
-        *   - Network
-        *   - Location
-        *   - WapAP
-        *   - WapBearer
-        * - DeleteAdditionalRecordsL()
-        * - CommitTransactionL()
-        * @param aForced forced delete doesn't check referencies
-        * @param aOneRefsAllowed ETrue if one reference from a destination is 
-        *           acceptable to delete this connection method.
-        */    
-        IMPORT_C virtual TBool DeleteL( TBool aForced,
-                                        TBool aOneRefAllowed = ETrue );
+         * Following SetXXXXAttributeL methods set the given values
+         * identified with attributes. Attributes are set to the
+         * client's copy of the data.
+         * @param aAttribute An attribute identifier.
+         * @param aValue Value to set.
+         * @param aClientPluginInstance Client's copy of the data where
+         * to set the given value.
+         */
+        IMPORT_C void SetIntAttributeL(
+                TUint32 aAttribute,
+                TUint32 aValue,
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        IMPORT_C void SetBoolAttributeL(
+                TUint32 aAttribute,
+                TBool aValue,
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        IMPORT_C void SetStringAttributeL(
+                TUint32 aAttribute,
+                const TDesC16& aValue,
+                CCmClientPluginInstance* aClientPluginInstance );
+
+        IMPORT_C void SetString8AttributeL(
+                TUint32 aAttribute,
+                const TDesC8& aValue,
+                CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Performs the basic loading of records related
-        * to this connection method:
-        * - OpenTransactionLC();
-        * - PrepareToLoadRecordsL()
-        * - LoadIAPRecordL();
-        *       - load IAP
-        *       - load WAP (AP & IP Bearer)
-        *       - load proxy
-        *       - load charge card
-        *       - load network
-        *       - load location
-        * - LoadServiceSettingL();
-        * - LoadAdditionalRecordsL();
-        */
-        IMPORT_C virtual void LoadL( TUint32 aIapId );
+         * Requests CommsDat table ids to be observed for changes by the cmm
+         * server. This is only for generic iap related tables.
+         * @param aTableIdArray A reference to an array where iap related generic
+         * table ids are added.
+         */
+        IMPORT_C void GetGenericTableIdsToBeObservedL( RArray<TUint32>& aTableIdArray ) const;
+
+    public: // plugin interface
+        /**
+         * Creates a copy of all bearer specific CommsDat data for the client.
+         * Called as result of GetPluginDataL().
+         * @param aRecordArray An array where the copy the records. Only
+         * the bearer specific implementation knows the amount and order
+         * of these records in the array.
+         */
+        virtual void GetBearerSpecificRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aRecordArray ) = 0;
 
         /**
-        * Create a new connection method in memory.
-        * Call UpdateL() to store it in CommsDat.
-        * No transaction operation is performed.
-        * - Creates new WAP, IAP, Network records
-        * - CreateNewServiceRecordL()
-        * - CreateAdditionalRecordsL()
-        * - Loads default AP name from resource 
-        *       (R_CMMANAGERENG_DEFAULT_AP_NAME)
-        */
-        IMPORT_C virtual void CreateNewL();
-        
-        /**
-        * Create a copy of the connection method:
-        * - CreateInstanceL()
-        * - CreateNewL()
-        * - PrepareToCopyDataL()
-        * - Copies data:
-        *   - name
-        *   - bearer type
-        *   - records added to the convertion table
-        * - Calls CopyAdditionalDataL().
-        */
-        IMPORT_C virtual CCmPluginBaseEng* CreateCopyL() const;
-        
-        /*
-        * Returns true if the CM has more than one parent destination
-        */        
-        IMPORT_C virtual TInt NumOfConnMethodReferencesL();
+         * Following GetBearerXXXXAttribute methods get only the
+         * fields in records in pointer arrays(parameters).
+         * @param aAttribute Identifier of the requested value.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return Returns the requested value. In error case leaves with
+         * system-wide error code.
+         */
 
-    public:
-    
-        /**
-        * Returns a pointer to the cmmanager
-        * @return a pointer to the cmmanager
-        */
-        CCmManagerImpl& CmMgr() const { return iCmMgr; };
+        virtual TUint32 GetBearerIntAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
+        virtual TBool GetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
 
-        IMPORT_C CommsDat::CMDBSession& Session() const;
+        virtual HBufC* GetBearerStringAttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
 
-        /**
-        * Launches the settings dialog of the plugin
-        *
-        * @since S60 3.2
-        * @return soft key selection
-        */
-        virtual TInt RunSettingsL() = 0;
+        virtual HBufC8* GetBearerString8AttributeL(
+                TUint32 aAttribute,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
 
         /**
-        * Called on a newly created connection method to initialize it properly
-        * with user interaction (e.g. APN setting for a packet data-, WEP-key
-        * setting for a WLAN connection method, etc.).
-        * Note: each plug-in should set its name (i.e. ECmName) in this
-        * function call.
-        *
-        * @since S60 3.2
-        * @param aManuallyConfigure let's the plugin know if a plugin should 
-        *                           be configured manually or automatically
-        * @return ETrue if initialization was successful and wasn't cancelled.
-        * EFalse, if initialization process was cancelled (i.e. user pressed
-        * Cancel button).
-        */
-        virtual TBool InitializeWithUiL( TBool aManuallyConfigure ) = 0;
-        
-        /**
-        * Checks if the plug-in can handle the given AP.
-        * @param aIapId IAPId of the AP to be checked
-        * @return ETrue if plug-in can handle the IAP
-        */
-        virtual TBool CanHandleIapIdL( TUint32 aIapId ) const = 0;
-        
+         * Following SetBearerXXXXAttribute methods set only the
+         * fields in records in pointer arrays(parameters). They are not
+         * allowed to update the original records in plugins.
+         * @param aAttribute Identifier of the field to set.
+         * @param aValue The value to set.
+         * @param aGenRecordArray An array containing pointers to generic
+         * records of the Connection Method.
+         * @param aBearerSpecRecordArray An array containing pointers to bearer
+         * specific records of the Connection Method. aAttribute
+         * parameter should identify one field(integer, boolean string)
+         * in one of these records.
+         * @return None.
+         */
+
+        virtual void SetBearerIntAttributeL(
+                TUint32 aAttribute,
+                TUint32 aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
+        virtual void SetBearerBoolAttributeL(
+                TUint32 aAttribute,
+                TBool aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
+        virtual void SetBearerStringAttributeL(
+                TUint32 aAttribute,
+                const TDesC16& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
+        virtual void SetBearerString8AttributeL(
+                TUint32 aAttribute,
+                const TDesC8& aValue,
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
         /**
-        * Checks if the plug-in can handle the given AP.
-        * @param aIapRecord IAP record to be checked
-        * @return ETrue if plug-in can handle the IAP
-        */
-        virtual TBool CanHandleIapIdL( CommsDat::CCDIAPRecord* aIapRecord ) const = 0;
-        
+         * Inherited class can make some preraration before CCmPluginBaseEng
+         * would start loading bearer specific records.
+         */
+        virtual void PreparePluginToLoadRecordsL() = 0;
+
         /**
-        * Return the parent destination of this connection method.
-        * @return parent destination of this connection method
-        */
-        IMPORT_C CCmDestinationImpl* ParentDestination() const;
-        
+         * Gives the plugin a possibility to do some preparing operations
+         * if needed.
+         * @param aCopyInstance Client side data instance.
+         */
+        virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance ) = 0;
+
         /**
-        * Calls FeatureManager::FeatureSupported directly.
-        * @param aFeature feature ID
-        * @return feature support status
-        * @since 3.2
-        */
-        IMPORT_C static TBool FeatureSupported( TInt aFeature );
-                
+         * Inherited class can make some preraration before CCmPluginBaseEng
+         * would start to update all the records.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records
+         * pointer array.
+         */
+        virtual void PreparePluginToUpdateRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
         /**
-        * Function should be overriden by virtual bearer type plugins.
-        * Returns if the passed IAP id is linked to that connection method.
-        * @param aIapId IAP id to be checked
-        * @return ETrue if the passed IAP id is linked to that connection method.
-        */
-        virtual TBool IsLinkedToIap( TUint32 /*aIapId*/ ){ return EFalse; }
-        
-        /**
-        * Function should be overriden by virtual bearer type plugins.
-        * Returns if the passed SNAP id is linked to that connection method.
-        * @param aSnapId SNAP id to be checked
-        * @return ETrue if the passed SNAP id is linked to that connection method.
-        */
-        virtual TBool IsLinkedToSnap( TUint32 /*aSnapId*/ ){ return EFalse; }
+         * Plugin can prepare to delete the Connection Method with this
+         * function. Called from DeleteL() before any record would be
+         * deleted. No records are deleted here.
+         */
+        virtual void PrepareToDeleteRecordsL(){};
 
         /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void IncrementRefCounter();
+         * Loads the service record. Service record type is known and loaded by
+         * plugin(bearer specific) part of the implementation even if the record
+         * is saved to the generic side. Service record is linked to IAP record.
+         */
+        virtual void LoadServiceRecordL() = 0;
+
+        /**
+         * Creates the service records.
+         */
+        virtual void CreateServiceRecordL() = 0;
+
         /**
-        * Increments the reference counter. Used by the object pool.
-        */
-        void DecrementRefCounter();
+         * Update service record.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records
+         * pointer array.
+         */
+        virtual void UpdateServiceRecordL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
         /**
-        * Returns the reference counter. Used by the object pool.
-        * @return TInt
-        */
-        TInt GetRefCounter();
+         * Copies the service record. Bearer specific part knows the type of it's
+         * service record.
+         * @return Returns the service record pointer.
+         */
+        virtual CommsDat::CCDRecordBase* CopyServiceRecordL() = 0;
 
         /**
-        * Appends uids of connection methods - which were also created during connection method
-        * creation - to the array given as parameter 
-        * @param aIapIds the array the additonal cm uids are appended to
-        */        
-        IMPORT_C virtual void GetAdditionalUids( RArray<TUint32>& aIapIds );
+         * Returns the service record id of the Connection Method.
+         * @return Returns the id of the service record id of the Connection Method.
+         */
+        virtual TUint32 ServiceRecordId() const = 0;
+
+        /**
+         * Returns the service record name of the Connection Method.
+         * @param aServiceName Name of the service record the CM's iap record
+         * points to.
+         */
+        virtual void ServiceRecordNameLC( HBufC* &aServiceName ) = 0;
+
+        /**
+         * Inherited class loads all the bearer specific records after
+         * loading generic records. Called from LoadL().
+         */
+        virtual void LoadBearerRecordsL() = 0;
 
-    protected: // Conversion table API
-    
-        IMPORT_C void AddConverstionTableL( 
-                            CommsDat::CCDRecordBase* *aRecord,
-                            TBool* aEnabled,
-                            const TCmAttribConvTable* aConvTable );
-                                            
-        IMPORT_C void AddCommonConversionTableL( 
-                                const TCmCommonAttrConvArrayItem* aConvTable );
-        
-        IMPORT_C void RemoveConversionTable( 
-                                        const TCmAttribConvTable* aConvTable );
-        
-        IMPORT_C void RemoveCommonConversionTable( 
-                                const TCmCommonAttrConvArrayItem* aConvTable );
-                                   
-    protected: // Resource handling
-    
+        /**
+         * Creates bearer specific records.
+         */
+        virtual void CreateBearerRecordsL(){};
+
         /**
-        * Add file name to the resource file array.
-        * Open it and/or increment reference count.
-        * @param aName resource file name
-        */
-        IMPORT_C void AddResourceFileL( const TDesC& aName );
-        
+         * Update bearer specific records.
+         * @param aGenRecordArray Reference to generic records pointer array.
+         * @param aBearerSpecRecordArray Reference to bearer specific records
+         */
+        virtual void UpdateBearerRecordsL(
+                RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+                RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ) = 0;
+
         /**
-        * Remove file name from the resource file name array.
-        * Close the resource file and/or decrement the reference count.
-        * @param aName resource file name
-        */
-        IMPORT_C void RemoveResourceFile( const TDesC& aName );
+         * Plugin(generic part) can delete bearer specific records
+         * with this function. Called from DeleteL().
+         */
+        virtual void DeleteBearerRecordsL() = 0;
 
         /**
-        * Read string from resource file. Resource file has to be
-        * opened prior this by calling AddResourceFileL().
-        */
-        IMPORT_C HBufC* AllocReadL( TInt aResourceId ) const;
-        
-            
-    protected:
-    
-        /** Constructor */
-        IMPORT_C CCmPluginBaseEng( TCmPluginInitParam *aInitParam );
-        
-        /** Second phase constructor */
-        IMPORT_C virtual void ConstructL();
-    
-        /** Open transaction */
-        void OpenTransactionLC();
-        
+         * Resets the bearer specific records.
+         */
+        virtual void ResetBearerRecords() = 0;
+
         /**
-        * Commit transaction.
-        * @param aError - error id
-        */
-        void CommitTransactionL( TInt aError );
-        
+         * Copies the bearer specific records to copy instance given as
+         * parameter.
+         * @param aCopyInstance Pointer to instance where to copy.
+         */
+        virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance ) = 0;
+
         /**
-        * Rollback transaction.
-        */
-        void RollbackTransaction();
-        
-        /** Make a reset on this class. */
-        IMPORT_C void Reset();
-        
+         * Returns the bearer record id of the Connection Method.
+         * @param aRecordId Id of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordIdL( TUint32& aRecordId ) = 0;
+
         /**
-        * Plug-in implementation can make its on
-        * cleanup in this function. 
-        * Always called from LoadL() and 
-        * should be called from plugin's destructor.
-        */
-        virtual void AdditionalReset() = 0;
-        
-        /**
-        * Check if there's connection established with
-        * this connection method (IAP id).
-        */
-        IMPORT_C virtual TBool CheckIfAlreadyConnected() const;
-        
-    protected:  // virtual loader function
-        
-        /**
-        * Inherited class can make some preraration
-        * before CCmPluginBaseEng would start loading
-        * records from tables.
-        */
-        IMPORT_C virtual void PrepareToLoadRecordsL();
+         * Returns the bearer record name of the Connection Method.
+         * @param aBearerName Name of the bearer record this CM's iap record
+         * points to.
+         */
+        virtual void BearerRecordNameLC( HBufC* &aBearerName ) = 0;
 
         /**
-        * Inherited class can load any additional
-        * records after CCmPluginBaseEng finished.
-        */
-        virtual void LoadAdditionalRecordsL(){};
+         * Requests CommsDat table ids to be observed for changes by the cmm
+         * server. If a table used is not mentioned to be modified a bearer
+         * shouldn't return this. Bearers do not reset the array before adding
+         * ids.
+         * @param aTableIdArray A reference to an array where plugin must add
+         * the ids of the tables it want's to be observed.
+         */
+        IMPORT_C virtual void GetBearerTableIdsToBeObservedL(
+                RArray<TUint32>& aTableIdArray ) const = 0;
+
+    protected:
+        /**
+         * Constructor
+         */
+        IMPORT_C CCmPluginBaseEng( TCmPluginInitParam *aInitParam );
+
+        /**
+         * Second phase constructor
+         */
+        IMPORT_C virtual void ConstructL();
+
+        /**
+         * Checks if the ECmName attribute was set since the last update.
+         * If so, name is updated in passed record
+         * @param aSrcRecord record to be checked against
+         * @param aDestRecord record to be checked against aSrcRecord
+         */
+        IMPORT_C void CheckIfNameModifiedL(
+                CommsDat::CCDRecordBase* aSrcRecord,
+                CommsDat::CCDRecordBase* aDestRecord ) const;
+
+        /**
+         * Plugins can check DNS setting with this function.
+         * Suggested to be called from PrepareToUpdateRecordsL().
+         * It checked the DNS server addresses, moves secord into
+         * first if first is dynamic, and update DNSFromServer field
+         * according to address values.
+         * @param aIPv6 passed DNS server address are in IPv6 form
+         * @param aDNS1 first DNS server address
+         * @param aDNS1 secord DNS server address
+         * @param aDNSFromServer DNS address from server flag
+         */
+        IMPORT_C void CheckDNSServerAddressL(
+                TBool aIPv6,
+                CommsDat::CMDBField<TDesC>& aDNS1,
+                CommsDat::CMDBField<TDesC>& aDNS2,
+                CommsDat::CMDBField<TBool>& aDNSFromServer );
 
         /**
-        * Load service record. Default implementation can
-        * create only factory supported record instances.
-        */
-        IMPORT_C virtual void LoadServiceSettingL();
+         * Copies the values and attributes of all fields from aSource-record
+         * into aDestination record.
+         * Does not copy the record element ID. Also, does not touch any field
+         * in aDestination-record that is NULL in aSource-record.
+         * @param aSource The record that is copied from.
+         * @param aDestination The record that is copied to.
+         */
+        IMPORT_C void CopyRecordFieldsL(
+                CommsDat::CMDBRecordBase& aSource,
+                CommsDat::CMDBRecordBase& aDestination );
 
-    protected:  // virtual update functions
-    
+    private:
         /**
-        * Check if connection method data is valid, before
-        * it would be persisted to commsdat.
-        * If invalid data found, set its attribute id in
-        * iInvalidAttribute.
-        * Base class implementation must be called from
-        * overridden one.
-        */
-        IMPORT_C virtual void PrepareToUpdateRecordsL();
-        
+         * Handles all the Connection Method data copying to instance given as
+         * parameter. This is called from CreateCopyL().
+         * @ param aCopyInstance Pointer to plugin to copy the data.
+         */
+        void CopyDataL( CCmPluginBaseEng* aCopyInstance );
+
         /**
-        * Inherited class can update its additional
-        * records here.
-        */
-        virtual void UpdateAdditionalRecordsL(){};
+         * Handles all the Connection Method related record copying. Called from
+         * CopyDataL().
+         * @ param aCopyInstance Pointer to plugin to copy the data.
+         */
+        void CopyRecordsL( CCmPluginBaseEng* aCopyInstance );
 
         /**
-        * Update service record.
-        */
-        IMPORT_C virtual void UpdateServiceRecordL();
+         * Copies the record identified by aRecordIdentifier to copy instance.
+         * @param aRecordIdentifier Identifies the record which is copied copy.
+         * @param aCopyInstance Pointer to plugin to copy the data.
+         */
+        void CopyRecordDataL(
+                TUint32 aRecordIdentifier,
+                CCmPluginBaseEng* aCopyInstance );
+
+        /**
+         * Creates proxy record and sets the proxy settings enabled for this
+         * Connection Method.
+         */
+        void EnableProxyL( TBool aEnable );
+
+        /**
+         * Creates location record and sets the location enabled for this
+         * Connection Method.
+         */
+        void EnableLocationL( TBool aEnable );
 
         /**
-        * Return the service table name and record id 
-        * of this connection in the service table.
-        * @param - aServiceName name of the service table
-        *           this connection method points to.
-        * @param - aRecordId record id in the service table.
-        */
-        virtual void ServiceRecordIdLC( HBufC* &aServiceName, 
-                                       TUint32& aRecordId ) = 0;
+         * Calls all the loading methods.
+         */
+        void DoLoadL( TUint32 aIapId );
+
+        /**
+         * Loads IAP record.
+         * @param aIapId Identifies the IAP record to load.
+         */
+        void LoadIAPRecordL( TUint32 aIapId );
+
+        /**
+         * Loads proxy record related to this IAP. This is called as a result
+         * of calling LoadL().
+         */
+        void LoadProxyRecordL();
+
+        /**
+         * Loads network record related to this IAP. This is called as a result
+         * of calling LoadL().
+         */
+        void LoadNetworkRecordL();
 
         /**
-        * Return the bearer table name and record id 
-        * of this connection in the bearer table.
-        * @param - aBearerName name of the bearer table
-        *           this connection method points to.
-        * @param - aRecordId record id in the bearer table.
-        */
-        virtual void BearerRecordIdLC( HBufC* &aBearerName, 
-                                       TUint32& aRecordId ) = 0;
+         * Loads location record related to this IAP. This is called as a result
+         * of calling LoadL().
+         */
+        void LoadLocationRecordL();
 
-    protected:  // virtual delete function
-    
         /**
-        * Plugin can prepare to delete the connection method
-        * with this function. Called from DeleteL() before
-        * any record would be deleted. Do NOT delete any
-        * record here.
-        */
-        virtual void PrepareToDeleteRecordsL(){};
-        
+         * Loads WAP AP and WAP IP records related to this IAP. This is called as a result
+         * of calling LoadL().
+         */
+        void LoadWapRecordL();
+
         /**
-        * Plugin can delete additional, bearer specific record
-        * with this function. Called from DeleteL().
-        */
-        virtual void DeleteAdditionalRecordsL(){};
+         * Loads iap metadata record related to this IAP. This is called as a result
+         * of calling LoadL().
+         */
+        void LoadMetadataRecordL();
 
-    protected:  // virtual create function
-    
         /**
-        * Plugin has to create and initialize its bearer specific object
-        * that points to the service record here. Pointer has to be stored in 
-        * iServiceRecord data member.
-        * Do NOT store service record in CommsDat yet.
-        */
-        virtual void CreateNewServiceRecordL() = 0;
-        
-        /**
-        * Plugin can create and initialize its bearer specific record(s) here.
-        * Do NOT store them in CommsDat yet.
-        */
-        virtual void CreateAdditionalRecordsL(){};
-        
-    protected:
+         * Following methods are called as a result of calling method UpdateL().
+         * Each method overwrites the original data in memory with the client copy
+         * of that data. Client data has all the possible changes set by client.
+         * After overwrite the data is written to CommsDat.
+         * @param aClientPluginInstance The client copy of the original data with the
+         * possible changes.
+         */
+        void UpdateIAPRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateProxyRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateConnPrefSettingL();
+        void UpdateNetworkRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateLocationRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateWapRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateMetadataRecordL( CCmClientPluginInstance* aClientPluginInstance );
+        void UpdateServiceRecordL( CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Called from CreateCopyL().
-        * Plugin can prepare for copying every records
-        * added to the conversion tables.
-        *
-        * @param aDestInst copy attributes into this plugin instance
-        */
-        virtual void PrepareToCopyDataL( CCmPluginBaseEng& /*aDestInst*/ ) const {};
-                
-        /**
-        * Copy data of the connection method that is not 
-        * added to the conversion table. (e.g. bearer specific
-        * flags)
-        *
-        * @param aDestInst copy attributes into this plugin instance
-        */    
-        virtual void CopyAdditionalDataL( CCmPluginBaseEng& /*aDestInst*/ ) const {};
-
-    private:
-    
-        void EnableProxyL( TBool aEnable );
-        void EnableChargeCardL( TBool aEnable );
-        void EnableLocationL( TBool aEnable );
-
-        // Loader functions
-        void DoLoadL( TUint32 aIapId );
-        void LoadIAPRecordL( TUint32 aIapId );
-        void LoadChargeCardSettingL( TUint32 aChargeCardId );
-        void LoadProxySettingL();
-        void LoadNetworkSettingL();
-        void LoadLocationSettingL();
-        void LoadWapRecordL();
-        void LoadSeamlessnessRecordL();
-        
-        // Updater functions
-        void UpdateIAPRecordL();
-        void UpdateProxyRecordL();
-        void UpdateChargeCardRecordL();
-        void UpdateConnPrefSettingL();
-        void UpdateNetworkRecordL();
-        void UpdateLocationRecordL();
-        void UpdateWapRecordL();
-        void UpdateSeamlessnessRecordL();
-        
-        /**
-        * No WAP record found in load process,
-        * but client wants to set start page.
+        * Creates new wap records.
         */
         void NewWapRecordL();
-        
+
         /**
-        * Create a new metadata record.
-        * @param aSetDef ETrue if setting default seamlessness valud is needed
-        * @return create metadata record point
+         * Searches the WAP records related to this iap. This is called as a
+         * result of LoadL().
+         * @return Returns pointer to WAP IP record. If it's not found NULL is
+         * returned.
+         */
+        CommsDat::CCDWAPIPBearerRecord* FindWAPRecordL();
+
+        /**
+        * Creates a new metadata record.
+        * @param aSetDef ETrue if setting default seamlessness value is needed
+        * @return Returns metadata record pointer.
         */
-        CCDIAPMetadataRecord* NewSeamlessnessRecordL( TBool aSetDef );
-        
-        CommsDat::CCDWAPIPBearerRecord* FindWAPRecordL();
-        CCDIAPMetadataRecord* FindSeamlessnessRecordL();
+        CCDIAPMetadataRecord* NewMetadataRecordL( TBool aSetDef );
 
         /**
-        * Set attribute flag on the given record
-        * @param aRecord record to be set
-        * @param aAttribute e.g. ECDHidden
+         * Searches the metadata record belonging to this iap. This is called as a
+         * result of LoadL().
+         * @return Returns pointer to WAP IP record. If it's not found NULL is
+         * returned.
+         */
+        CCDIAPMetadataRecord* FindMetadataRecordL(); //TODO, check comment, return value...
+
+        /**
+        * Set attribute flag on the given record.
+        * @param aRecord Record to be set.
+        * @param aAttribute Attribute to be set.
         * @param aSet ETrue to set, EFalse to clear
         */
-        void SetAttribute( CommsDat::CCDRecordBase* aRecord, 
-                           TUint32 aAttribute, 
-                           TBool aSet );
-                           
+        void SetAttribute(
+                CommsDat::CCDRecordBase* aRecord,
+                TUint32 aAttribute,
+                TBool aSet );
+
         /**
         * Copy the attributes of the source record to the destination.
         * @param aSrcRecord record of which attributes are copied
         * @param ADstRecord record of which attributes are set
         */
-        void CopyAttributes( CommsDat::CCDRecordBase* aSrcRecord, 
-                             CommsDat::CCDRecordBase* aDstRecord );
+        void CopyAttributes(
+                CommsDat::CCDRecordBase* aSrcRecord,
+                CommsDat::CCDRecordBase* aDstRecord );
+
 
         /**
-        * Find field element associated with the passed attribute.
-        * @param aAttribute aatribute to find
-        * @aType type of the attribute (e.g. bool, int or string)
-        */               
-        TValidationFunctionL FindFieldL( TUint32 aAttribute,
-                                           TCMFieldTypes aType,
-                                           CommsDat::CMDBElement* &aElement ) const;
-
-        
-        /**
-        * Return Location id
-        * @return location id
+        * Returns the default location record id.
+        * @return Returns the default location record id.
         */
         TUint32 GetLocationIdL() const;
-        
-        /**
-        * Search for common attribute and convert it to plugin specific one.
-        * @param aAttribute common attribute id
-        * @return bearer specific attribute id
-        */
-        TUint32 CheckForCommonAttribute( const TUint32 aAttribute ) const;
-        
+
+    private:
+
         /**
-        * Returns the common attribute for the bearer specific attribute.
-        * Panics if there is no matching common attribute.
-        * @param aAttribute bearer specific attribute
-        * @return common attribute
-        */
-        TUint32 CommonAttribute( const TUint32 aAttribute ) const;
-        
-    public: // Util functions
+         * Gives a possibility to make some prerarations before
+         * starting to load bearer specific records.
+         */
+        void PrepareToLoadRecordsL();
 
-        IMPORT_C CommsDat::TMDBElementId IAPRecordElementId() const;
-        
-        IMPORT_C TBool IsProtected() const;
-        
-        TBool SetProxyServerNameL( const TDesC& aProxyServer );
+        /**
+         * Gives a possibility to make some prerarations before
+         * starting to update bearer specific records.
+         */
+        void PrepareToUpdateRecordsL(
+                CCmClientPluginInstance* aClientPluginInstance );
 
         /**
-        * Return the coversion table item of the attribute
-        * @param aAttribute attribute of which conversion item is requested
-        * @return conversion table item
-        */
-        IMPORT_C const TCmAttribConvTable* ConvTableItem( TUint32 aAttribute );
+         * Returns the element id of the iap record.
+         * @return Returns the element id of the iap record.
+         */
+        CommsDat::TMDBElementId IAPRecordElementId() const;
+
+        /**
+         * Checks the protection attribute of the IAP.
+         * @return Returns ETrue if the IAP is protected. Otherwise returns
+         * EFalse.
+         */
+        TBool IsProtected() const;
+
+        /**
+         * Sets the name of the proxy server to proxy record. If name's
+         * length is 0, proxyport is set to 0 and proxyserver usage
+         * boolean is set to EFalse. If the name is longer than 0,
+         * boolean is set to ETrue.
+         * @param aProxyServer Address to be set.
+         * @param Record pointer where to set.
+         */
+        void SetProxyServerNameL(
+                const TDesC& aProxyServer,
+                CommsDat::CCDRecordBase* aProxyRecord );
 
         /**
-        * Function to set up DNS addresses and DNS address from server flag.
-        * Can be used with both IPv4 and IPv6 attribute. 
-        * Passed bearer specific attributes must be defined in common conversion 
-        * table.
-        * @param aSrv1Attr first DNS server address attribute
-        * @param aSrv1 DNS first DNS server address
-        * @param aSrv2Attr second DNS server address
-        * @param aSrv2 DNS second DNS server address attribute
-        * @param aAddrFromSrvAttr DNS address from server flag attribute
-        * @param aIPv6 ETrue if passed addresses are in IPv6 form
-        */
-        IMPORT_C void SetDNSServerAddressL( TUint32 aSrv1Attr,
-                                            const TDesC& aSrv1,
-                                            TUint32 aSrv2Attr,
-                                            const TDesC& aSrv2,
-                                            TUint32 aAddrFromSrvAttr,
-                                            TBool aIPv6  );
+         * Sets a name to IAP.
+         * @param aName Name to set.
+         * @param aClientPluginInstance Client copy of data where to set the
+         * name. UpdateL() updates the name to the CommsDat.
+         */
+        void SetNameL(
+                const TDesC& aName,
+                CommsDat::CCDRecordBase* aIapRecord,
+                const CMManager::TNamingMethod aNamingMethod );
 
         /**
-        * Plugins can check DNS setting with this function.
-        * Suggested to be called from PrepareToUpdateRecordsL().
-        * It checked the DNS server addresses, moves secord into
-        * first if first is dynamic, and update DNSFromServer field
-        * according to address values.
-        * @param aIPv6 passed DNS server address are in IPv6 form
-        * @param aDNS1 first DNS server address
-        * @param aDNS1 secord DNS server address
-        * @param aDNSFromServer DNS address from server flag
-        */                                            
-        IMPORT_C void CheckDNSServerAddressL( TBool aIPv6,
-                                              CommsDat::CMDBField<TDesC>& aDNS1,
-                                              CommsDat::CMDBField<TDesC>& aDNS2,
-                                              CommsDat::CMDBField<TBool>& aDNSFromServer );
+         * Following methods are called as a result of SetNameL() to
+         * make a valid name of the given string.
+         */
+        HBufC* DoMakeValidNameL( const TDesC& aName, const TUint32& aIapId );
+        HBufC* EnsureMaxLengthLC( const TDesC& aName, TBool& aChanged );
+        TPtrC GetPrefix( const TDesC& aName );
+        TInt GetPostfix( const TDesC& aName, const TDesC& aPrefix );
+        TBool IsValidNameL( const TDesC& aNameText, const TUint32& aIapId );
+        HBufC* EscapeTextLC( const TDesC& aLiteral );
+        void SetDefaultNameL( const TDesC& aName );
+
+        /**
+        * Check if the passed IP address is '0.0.0.0' or empty string
+        * @param aIpAddress IP address to be checked
+        */
+        TBool IsUnspecifiedIPv4Address( const TDesC& aIpv4Address );
+
+        /**
+        * Check if the passed IP address is one of these:
+        * - empty string    -
+        * - '0:0:0:0:0:0:0:0'
+        * - 'fec0:000:0000:ffff::1'
+        * - 'fec0:000:0000:ffff::2'
+        * @param aIpAddress IP address to be checked
+        */
+        CMManager::TIPv6Types ClassifyIPv6Address( const TDesC& aIpv6Address );
+
+    public: // Data
+
+        // Required attribute for the framework
+        // (An identifier used during destruction)
+        TUid    iDtor_ID_Key;
+        TUint32 iBearerType;
 
     protected:
-            
         /**
-        * Checks if the ECmName attribute was set since the last update.
-        * If so, name is updated in passed record
-        * @param aRecord record to be checked against iIapRecord
-        */
-        IMPORT_C void CheckIfNameModifiedL( CommsDat::CCDRecordBase* aRecord ) const;
-        
-        /**
-        * Returns the global priority of the passed bearer type
-        * @param aServiceType bearer type of which priority is requested
-        * @return global bearer priority
-        */        
-        IMPORT_C TInt GlobalBearerPriority( const TDesC& aServiceType ) const;
-        
-        /**
-        * Returns the global UI priority of the passed bearer type
-        * @param aServiceType bearer type of which priority is requested
-        * @return global UI bearer priority
-        */
-        IMPORT_C TInt GlobalUiBearerPriority( const TDesC& aServiceType ) const;
-
-    private: // Util functions
-    
-        HBufC* DoMakeValidNameL( const TDesC& aName );
-        HBufC* EnsureMaxLengthLC( const TDesC& aName, 
-                                  TBool& aChanged );
-                                  
-        TPtrC GetPrefix( const TDesC& aName );
-        TInt GetPostfix( const TDesC& aName, const TDesC& aPrefix );
-
-        TBool IsValidNameL( const TDesC& aNameText );
-        HBufC* EscapeTextLC( const TDesC& aLiteral );
-        
-        void SetNameL( const TDesC& aName );
-        
-        TCmAttrConvArrayItem* ConversionTable( TUint32 aAttribute ) const;
-        CommsDat::CMDBElement& FieldByAttributeL( const TCmAttrConvArrayItem* aItem,
-                                        const TUint32 aAttribute,
-                                        TInt& aIndex ) const;
-        
-        /**
-        * Writes the passed text into the passed attribute.
-        * @param aAttribute The attribute to write into
-        * @param aValue The value to write
-        */
-        void GenericStringWriterL( const TUint32 aAttribute, 
-                                   const TDesC16& aValue );
-        
-        /**
-        * Returns the common attribute for the bearer specific attribute, if 
-        * it is mapped to any. Otherwise, it returns the original attribute.
-        * @param aAttribute bearer specific attribute
-        * @return common/original attribute
-        */
-        TUint32 MappedCommonAttribute( const TUint32 aAttribute ) const;        
-    public:
+         * Reference to cmm's session handle. Initialised at the construction
+         * phase.
+         */
+        CommsDat::CMDBSession& iSession;
 
         /**
-        * Indicates if the Id is valid or if this is a new object which sitll
-        * haven't been updated. 
-        * Used by the object pool.
-        * @return TBool
-        */
-        TBool IdIsValid();
+         * Generic record pointers.
+         */
+        CommsDat::CCDIAPRecord*             iIapRecord;
+        CommsDat::CCDProxiesRecord*         iProxyRecord;
+        CommsDat::CCDRecordBase*            iServiceRecord;
+        CommsDat::CCDNetworkRecord*         iNetworkRecord;
+        CommsDat::CCDLocationRecord*        iLocationRecord;
+        CommsDat::CCDWAPAccessPointRecord*  iWapAPRecord;
+        CommsDat::CCDWAPIPBearerRecord*     iWapIPBearerRecord;
+        CCDIAPMetadataRecord*               iMetaDataRecord;
 
         /**
-        * Sets iIdIsValid attribute
-        * Used by the object pool.
-        */
-        void SetIdValidity(TBool validity);
-        
+         * IAP record id of the CM. 0 means that this is not stored to CommsDat
+         * yet. If in UpdateL phase iap record has an id but iIapId == 0 -->
+         * predefined iap id
+         */
+        TUint32 iCmId;
+
+    private:
         /**
-        * Scans aDests for destinations that may be valid parents 
-        * for this plugin and removes those that may not. The function may be
-        * overriden by virtual bearer type plugins.
-        * @param aDests The array of destination IDs to be filtered.
-        */
-        virtual void FilterPossibleParentsL( RArray<TUint32>& /*aDests*/ ) {}
-        
-        /**
-         * Sets the predefined id for the plugin. This should only be
-         * used by cmmanager framework.
+         * Naming method of the CM.
          */
-        IMPORT_C void SetPreDefinedId( const TUint32 aPreDefId );
-
-    public:
+        CMManager::TNamingMethod iNamingMethod;
 
         /**
-        * Check if there is space to save record
-        * @return ETrue if space is available; otherwise leave with KLeaveWithoutAlert
-        */
-        IMPORT_C TBool CheckSpaceBelowCriticalLevelL() const;
-
-    public: // Data
-    
-        // Required attribute for the framework
-        // (An identifier used during destruction)
-        TUid iDtor_ID_Key;
-        
-    protected:
+         * Table id of the iap metadata table.
+         */
+        CommsDat::TMDBElementId iMetadataTableId;
 
-        CCmManagerImpl&     iCmMgr;         //< Not owned    
-        TUint32             iParentDest;    // id of the parent destinaton
-        
-        // IAP id of the CM. 0 means that this is a newly
-        // created one.
-        TUint32         iIapId;
-        TUint32         iBearerType;        //< Should be set by plugin 
-                                            //< constructor
-        
-        CommsDat::CCDIAPRecord*           iIapRecord;         // created by base class
-        CommsDat::CCDProxiesRecord*       iProxyRecord;       // optional
-        CommsDat::CCDRecordBase*          iServiceRecord;     // created by plugin
-        CommsDat::CCDChargecardRecord*    iChargeCardRecord;  // optional
-        CommsDat::CCDNetworkRecord*       iNetworkRecord;     // created by base class
-        CommsDat::CCDLocationRecord*      iLocationRecord;    // optional
-        
-        TBool           iChargeCardEnabled;
-        TBool           iLocationEnabled;
+        /**
+         * Identifies if the location is enabled.
+         */
+        TBool iLocationEnabled;
+    };
 
-        TUint32         iInvalidAttribute;
-
-    private: // Data
-        
-        CCmPluginBasePrivate* iPriv;
-        //Reference counter for the object pool
-	    TInt                  iRefCounter;
-        //indicates if the Id is valid or not (for the object pool)
-        TBool                 iIdIsValid;
-        // Predefined connection method id(iap id)
-        TUint32               iPreDefIapId;
-	    friend class CCmPluginBase;
-    };
-    
 #endif // CMPLUGINBASEENG_H
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlanbase.h	Tue Aug 31 15:35:44 2010 +0300
@@ -79,20 +79,6 @@
         */
         IMPORT_C void PrepareToUpdateRecordsL();
         
-        /**
-        * No UI for LanBase.
-        * Panics in debug mode, leaves with KErrNotSupported in
-        * release mode.
-        */
-        IMPORT_C virtual TInt RunSettingsL();
-        
-        /**
-        * No UI for LanBase.
-        * Panics in debug mode, leaves with KErrNotSupported in
-        * release mode.
-        */
-        IMPORT_C virtual TBool InitializeWithUiL( TBool aManuallyConfigure );
-                
     private:
     
         IMPORT_C CommsDat::CCDLANServiceRecord& ServiceRecord()const;
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlandef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginlandef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,8 @@
 *
 * Contributors:
 *
-* Description:  Resource headers for LAN Plug-in
+* Description:
+* Resource headers for LAN Plug-in.
 *
 */
 
@@ -21,6 +22,8 @@
 
 #include <cmconnectionmethoddef.h>
 
+const TUint KUidLanBearerType = 0x1020737A;
+
 namespace CMManager
     {
     /** LAN specific connection method attributes */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/bearer_settings_ui_plugin_api/bearer_settings_ui_plugin_api.pri	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Bearer Settings UI Plugin API project include.
+#
+
+PLATFORM_HEADERS += \
+    bearer_settings_ui_plugin_api/inc/cpbearerapplugininterface.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/bearer_settings_ui_plugin_api/inc/cpbearerapplugininterface.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   Control Panel plugin interface for bearer specific AP settings plugins.
+*
+*/
+
+#ifndef CPBEARERAPPLUGININTERFACE_H
+#define CPBEARERAPPLUGININTERFACE_H
+
+// System includes
+#include <QtPlugin>
+
+// User includes
+
+// Forward declarations
+class CpBaseSettingView;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*!
+    \class CpBearerApPluginInterface
+    \brief This class is an interface for bearer specific AP settings plugins
+           which can be displayed in the Control Panel application.
+    
+    Plugin stubs must be located in
+    /resource/qt/plugins/controlpanel/bearerap directory.
+ */
+
+class CpBearerApPluginInterface
+{
+public:
+    /*!
+        Destructor.
+     */
+    virtual ~CpBearerApPluginInterface() {}
+    
+    /*!
+        Getter for bearer type. Bearer types are defined in the Connection
+        Settings Shim API cmmanagerdefines_shim.h.
+        
+        \return Bearer type handled by the plugin.
+     */
+    virtual uint bearerType() const = 0;
+    
+    /*!
+        Creates the settings view. Caller owns the object.
+        
+        \param connectionMethod Connection method ID.
+        \return Pointer to a settings view object.
+     */
+    virtual CpBaseSettingView *createSettingView(
+        uint connectionMethod) = 0;
+        
+signals:
+    
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+private slots:
+
+private: // data
+
+};
+
+Q_DECLARE_INTERFACE(
+    CpBearerApPluginInterface,
+    "com.nokia.plugin.controlpanel.bearerap.platform.interface/1.0");
+
+#endif // CPBEARERAPPLUGININTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_shim_api/connection_settings_shim_api.pri	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Connection Settings Shim API project include.
+#
+
+PLATFORM_HEADERS += \
+    connection_settings_shim_api/inc/cmconnectionmethod_shim.h \
+    connection_settings_shim_api/inc/cmdestination_shim.h \
+    connection_settings_shim_api/inc/cmmanager_shim.h \
+    connection_settings_shim_api/inc/cmmanagerdefines_shim.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmconnectionmethod_shim.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMCONNECTIONMETHOD_SHIM_H
+#define CMCONNECTIONMETHOD_SHIM_H
+
+// System includes
+
+#include <QString>
+#include <cmconnectionmethod.h>
+#include <cmconnectionmethoddef.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+
+class CmConnectionMethodShimPrivate;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*!
+    \class CmConnectionMethodShim
+    \brief Implementation class for CM Manager Connection Method Shim.
+
+    Wrapper for CM Manager Symbian interface.
+    
+    NOTE! This shim is supposed to be used only in middleware code. Usage
+    must be agreed with ipconnmgmt package owner. Applications should use
+    the Qt Bearer Management API instead.
+*/
+
+class CONNECTIONSETTINGSSHIMDLL_EXPORT CmConnectionMethodShim
+{
+
+public:
+
+    // Data types
+
+    /*!
+     *  Constructor.
+     *  
+     *  @param[in] cm CM Manager connection method object.
+     */
+    CmConnectionMethodShim(RCmConnectionMethod &cm);
+
+    /*!
+     *  Destructor.
+     */
+    ~CmConnectionMethodShim();
+    
+    /*!
+     * Gets the value for a uint attribute.
+     * Note: even though the name suggests int attribute, return value is
+     * actually uint. This is how the function is specified in public
+     * RCmConnectionMethod class as well.
+     * 
+     * @param attribute Identifies the attribute to be retrived.
+     * @return Contains the requested uint attribute.
+     */
+    uint getIntAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+
+    /*!
+     * Gets the value for a bool attribute.
+     * 
+     * @param attribute Identifies the attribute to be retrived.
+     * @return Contains the requested bool attribute.
+     */
+    bool getBoolAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+
+    /*!
+     * Gets the value for a 16 bit QString attribute.
+     * 
+     * @param attribute Identifies the attribute to be retrived.
+     * @return Contains the requested QString attribute.
+     */
+    QString getStringAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+    
+    /*!
+     * Gets the value for an 8 bit QString attribute.
+     * 
+     * @param attribute Identifies the attribute to be retrived.
+     * @return Contains the requested QString attribute.
+     */
+    QString getString8Attribute(
+        CMManagerShim::ConnectionMethodAttribute attribute) const;
+    
+    /*!
+     * Sets the value for an uint attribute.
+     * Note: even though the name suggests int attribute, parameter is
+     * actually uint. This is how the function is specified in public
+     * RCmConnectionMethod class as well.
+     * 
+     * @param attribute Identifies the attribute to be set.
+     * @param value The value to be set.
+     */
+    void setIntAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        uint value);
+
+    /*!
+     * Sets the value for a bool attribute.
+     * 
+     * @param attribute Identifies the attribute to be set.
+     * @param value The value to be set.
+     */
+    void setBoolAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute,
+        bool value);
+
+    /*!
+     * Sets the value for a 16 bit QString attribute.
+     * 
+     * @param attribute Identifies the attribute to be set.
+     * @param value The value to be set.
+     */
+    void setStringAttribute(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+    
+    /*!
+     * Sets the value for an 8 bit QString attribute.
+     * 
+     * @param attribute Identifies the attribute to be set.
+     * @param value The value to be set.
+     */
+    void setString8Attribute(
+        CMManagerShim::ConnectionMethodAttribute attribute, 
+        QString value);
+    
+    /*!
+     * Try to delete the connection method. If it is referenced from 
+     * any destination, then the references are removed and the connection
+     * method is deleted.
+     * 
+     * @return True if connection method deleted.
+     */
+    bool deleteConnectionMethod();
+    
+    /*!
+     * Update in the database.
+     */        
+    void update();
+    
+    /*!
+     * Gets the icon identifier(name) of the connection method. It can
+     * contain path information.
+     * @return Contains string representing icon
+     */
+    QString getIcon() const;
+    
+    /*!
+     * Sets the icon identifier(name) of the destination. It can
+     * contain path information.
+     * 
+     * @param icon New icon
+     */      
+    void setIcon(QString icon);
+    
+    /*!
+     * Reload the contents of the connection method from database.
+     * Any current changes made to the connection method are lost.
+     */
+    void refresh();
+    
+protected:
+    
+private:
+    
+private: // data
+    
+    CmConnectionMethodShimPrivate *d_ptr;  //!< Private implementation
+    
+    // Friend classes
+    
+    /*
+     * CmDestinationShimPrivate::AddConnectionMethodL needs direct access
+     * to Connection Methods it is adding to the Destination.
+     */
+    friend class CmDestinationShimPrivate;
+};
+
+#endif /* CMCONNECTIONMETHOD_SHIM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmdestination_shim.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMDESTINATION_SHIM_H
+#define CMDESTINATION_SHIM_H
+
+// System includes
+
+#include <QString>
+#include <cmdestination.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+
+class CmDestinationShim;
+class CmDestinationShimPrivate;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*!
+    \class CmDestinationShim
+    \brief Implementation class for CM Manager Destination Shim.
+
+    Wrapper for CM Manager Symbian interface.
+    
+    NOTE! This shim is supposed to be used only in middleware code. Usage
+    must be agreed with ipconnmgmt package owner. Applications should use
+    the Qt Bearer Management API instead.
+*/
+
+class CONNECTIONSETTINGSSHIMDLL_EXPORT CmDestinationShim
+{
+
+public:
+    
+    // Data types
+
+    /*!
+     *  Constructor.
+     *  
+     *  @param[in] destination CM Manager destination object.
+     */
+    CmDestinationShim(RCmDestination &destination);
+
+    /*!
+     *  Destructor.
+     */
+    ~CmDestinationShim();
+    
+    /*!
+     * Return the number of connection methods in the destination.
+     * 
+     * @return Number of the connection methods in this destination.
+     */                 
+    int connectionMethodCount() const;
+           
+    /*!
+     * Return a reference to the connection method. The index must be less
+     * than the return value of connectionMethodCount().
+     * 
+     * @param[in] index Index of the connection method to be returned.
+     * @return Connection method.
+     */
+    CmConnectionMethodShim *connectionMethod(int index) const;
+           
+    /*!
+     * Returns the connection method with the given ID.
+     * 
+     * @param cmId Unique id of the requested connection method.
+     * @return Connection method.
+     */
+    CmConnectionMethodShim *connectionMethodByID(uint cmId) const;
+
+    // Getting attributes
+
+    /*!
+     * Return the priority of the passed connection method.
+     * 
+     * @param cmItem Connection method.
+     * @return Priority of the queried connection method.
+     */
+    uint priority(CmConnectionMethodShim *cmItem) const;
+           
+    /*!
+     * Return the name of the destination. 
+     * 
+     * @return Name of the destination, empty string in error cases.
+     */      
+    QString name() const;
+           
+    /*!
+     * Return the destination's Id attribute.
+     * 
+     * @return Id of the destination.
+     */
+    uint id() const;
+
+    /*!
+     * Returns the Metadata.
+     *
+     * @param metadataField The meta data field to query.
+     * @return The value of the requested field.
+     */
+    uint metadata(CMManagerShim::SnapMetadataField metadataField) const;
+
+    /*!
+     * Return the protection level of the destination.
+     * 
+     * @return Protection level.
+     */
+    CMManagerShim::CmmProtectionLevel protectionLevel() const;
+           
+    /*!
+     * Return whether the destination is hidden or not.
+     * 
+     * @return True if the destination is hidden.
+     */
+    bool isHidden() const;
+           
+    /*!
+     * Adds an existing connection method to a destination.
+     * 
+     * @param cm Connection method to be added.
+     * @return Index in the Connection Method list.
+     */
+    int addConnectionMethod(CmConnectionMethodShim *cm);            
+       
+    /*!
+     * Remove a connection method from a destination and delete it
+     * on update. 
+     * Exception: connection method is not deleted, if it's referenced 
+     * from any other destination.
+     * 
+     * @param cm The connection method to be deleted.
+     */
+    void deleteConnectionMethod(CmConnectionMethodShim *cm);
+       
+    /*!
+     * Remove connection method from the destination.
+     * 
+     * @param cm Connection method to be removed.
+     */
+    void removeConnectionMethod(CmConnectionMethodShim *cm);
+             
+    /*!
+     * Set the connection method's priority based on the passed
+     * index. Indexing starts from zero(the highest priority).
+     * 
+     * @param cm The connection method item
+     * @param index The new priority of the connection method in the 
+     *              destination.
+     */
+    void modifyPriority(CmConnectionMethodShim *cm, int index);
+           
+    /*!
+     * Set the destination's name.
+     * 
+     * @param name New name of the destination.
+     */
+    void setName(QString name);
+              
+    /*!
+     * Update all values of the destination and its connection methods to
+     * CommsDat. Nothing is stored, if update leaves due to any reason.
+     */
+    void update();
+    
+    /*!
+     * Reload the contents of the destination from database.
+     * Any current changes made to the destination are lost.
+     */
+    void refresh();
+
+    /*!
+     * Delete destination and its connection methods from CommsDat.
+     * Connection methods that belong also to some other destination are
+     * not deleted.
+     */
+    void deleteDestination();
+    
+    /*!
+     * Gets the icon identifier(name) of the destination. It can
+     * contain path information.
+     * 
+     * @return Name of the Icon
+     */      
+    QString getIcon() const;
+    
+    /*!
+     * Sets the icon identifier(name) of the destination. It can
+     * contain path information.
+     * 
+     * @param icon New icon
+     */      
+    void setIcon(QString icon);
+
+protected:
+
+private:
+    
+private: // data
+    
+    CmDestinationShimPrivate *d_ptr;  //!< Private implementation
+
+    // Friend classes
+    
+};
+
+#endif /* CMDESTINATION_SHIM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmmanager_shim.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ * Wrapper for CM Manager Symbian interface.
+ */
+
+#ifndef CMMANAGER_SHIM_H
+#define CMMANAGER_SHIM_H
+
+// System includes
+
+#include <QString>
+#include <cmmanager.h>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+
+class CmDestinationShim;
+class CmManagerShimPrivate;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*!
+    \class CmManagerShim
+    \brief Implementation class for CM Manager Shim.
+
+    Wrapper for CM Manager Symbian interface.
+    
+    NOTE! This shim is supposed to be used only in middleware code. Usage
+    must be agreed with ipconnmgmt package owner. Applications should use
+    the Qt Bearer Management API instead.
+*/
+
+class CONNECTIONSETTINGSSHIMDLL_EXPORT CmManagerShim
+{
+
+public: 
+
+    // Data types
+
+    /*!
+     *  Constructor.
+     */
+    CmManagerShim();
+
+    /*!
+     *  Destructor.
+     */
+    ~CmManagerShim();
+    
+    /*!
+     * Creates a Destination with the passed name.
+     * 
+     * @param[in] name The name of the new destination.
+     * @return New destination. Ownership is passed to the caller.
+     */
+    CmDestinationShim *createDestination(QString name);
+    
+    /*!
+     * Creates a connection method that does not belong to any destination.
+     * 
+     * @param[in] bearerType Bearer type of the new connection method. Types
+     *                       are defined in cmmanagerdefines_shim.h.
+     * @return New connection method. Ownership is passed to the caller.
+     */
+    CmConnectionMethodShim *createConnectionMethod(uint bearerType);
+
+    /*!
+     * Returns the connection method queried by its ID.
+     * 
+     * @param[in] connectionMethodId Id of the connection method.
+     * @return Found connection method instance.
+     */
+    CmConnectionMethodShim *connectionMethod(uint connectionMethodId) const;
+    
+    /*!
+     * Returns the list of connection methods that do not belong to any 
+     * destination.
+     * 
+     * @param[out] cmArray On return it is the array of connection method ids.
+     * @param[in] legacyOnly When set to true only Legacy connection method
+     *                       ids (connection methods which do not belong to
+     *                       any destination) will be returned
+     */
+    void connectionMethod(
+        QList<uint> &cmArray,
+        bool legacyOnly = true) const;
+    
+    /*!
+     * Returns the destination queried by its ID.
+     * 
+     * @param[in] destinationId Id of the destination.
+     * @return Found network destination.
+     */
+    CmDestinationShim *destination(uint destinationId) const;
+            
+    /*!
+     * Returns an array of all destination id's.
+     * 
+     * @param[out] destArray Array of all available network destinations.
+     */ 
+    void allDestinations(QList<uint> &destArray) const;
+    
+    /*!
+     * Gets the "Uncategorized" icon identifier(name). It can
+     * contain path information.
+     * 
+     * @return Name of the Icon
+     */      
+    QString getUncategorizedIcon() const;
+    
+protected:
+
+private:
+    
+private: // data
+    
+    CmManagerShimPrivate *d_ptr;  //!< Private implementation
+};
+
+#endif /* CMMANAGER_SHIM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,329 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+* Defines for data types and attributes used in CmManagerShim interface.
+*/
+
+#ifndef CMMANAGERDEFINES_SHIM_H
+#define CMMANAGERDEFINES_SHIM_H
+
+// System includes
+
+#include <QString>
+#include <cmmanagerdef.h>
+#include <cmconnectionmethoddef.h>
+#include <cmpluginwlandef.h>
+#include <cmpluginpacketdatadef.h>
+
+// User includes
+
+// Macro for exporting Shim classes
+#ifdef BUILD_CONNECTIONSETTINGSSHIMDLL_DLL
+#define CONNECTIONSETTINGSSHIMDLL_EXPORT Q_DECL_EXPORT
+#else
+#define CONNECTIONSETTINGSSHIMDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+/*!
+ *  Constants and data types used in CmManagerShim, CmDestinationShim,
+ *  and CmConnectionMethodShim interfaces.
+ */
+namespace CMManagerShim
+{
+    /*!
+     *  Constants for bearer types.
+     */
+    //! Wlan bearer type
+    const uint BearerTypeWlan           = KUidWlanBearerType;
+    //! Packet data bearer type
+    const uint BearerTypePacketData     = KUidPacketDataBearerType;
+
+    /*!
+     *  Constants for IPv4 and IPv6 addresses.
+     */
+    //! Unspecified IPv4 address
+    const QString UnspecifiedIpv4Address("0.0.0.0");
+    //! Known IPv6 name server 1
+    const QString KnownIpv6NameServer1("fec0:000:0000:ffff::1");
+    //! Known IPv6 name server 2
+    const QString KnownIpv6NameServer2("fec0:000:0000:ffff::2");
+    //! Dynamic IPv6 address
+    const QString DynamicIpv6Address("0:0:0:0:0:0:0:0");
+
+    /*!
+     *  Constants for maximum string lengths.
+     */
+    //! Connection name length
+    const uint CmNameLength                 = 50;
+    //! Homepage address length
+    const uint CmStartPageLength            = 1024;
+    //! IPv4 IP address length
+    const uint CmIP4AddressLength           = 15;
+    //! IPv6 DNS address length
+    const uint CmIP6NameServerLength        = 50;
+    //! Proxy server address length
+    const uint CmProxyServerNameLength      = 1024;
+    //! Proxy server port number length
+    const uint CmProxyPortNumberLength      = 5;
+    //! Packet data AP name length
+    const uint PacketDataAPNameLength       = 100;
+    //! Packet data AP user name length
+    const uint PacketDataIFAuthNameLength   = 50;
+    //! Packet data AP password length
+    const uint PacketDataIFAuthPassLength   = 50;
+    //! WLAN SSID length
+    const uint WlanSSIDLength               = 32;
+    
+    /*!
+     *  Enumerations for connection method attributes.
+     */
+    enum ConnectionMethodAttribute {
+        // Common attributes
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmDestination                   = CMManager::ECmDestination,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmBearerType                    = CMManager::ECmBearerType,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmName                          = CMManager::ECmName,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIapId                         = CMManager::ECmIapId,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmHidden                        = CMManager::ECmHidden,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmProtected                     = CMManager::ECmProtected,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmNetworkId                     = CMManager::ECmNetworkId,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmConnected                     = CMManager::ECmConnected,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmId                            = CMManager::ECmId,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmStartPage                     = CMManager::ECmStartPage,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPv6Supported                 = CMManager::ECmIPv6Supported,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPDNSAddrFromServer           = CMManager::ECmIPDNSAddrFromServer,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPAddress                     = CMManager::ECmIPAddress,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPAddrFromServer              = CMManager::ECmIPAddFromServer,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPNetmask                     = CMManager::ECmIPNetmask,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPGateway                     = CMManager::ECmIPGateway,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPNameServer1                 = CMManager::ECmIPNameServer1,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIPNameServer2                 = CMManager::ECmIPNameServer2,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIP6DNSAddrFromServer          = CMManager::ECmIP6DNSAddrFromServer,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIP6NameServer1                = CMManager::ECmIP6NameServer1,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmIP6NameServer2                = CMManager::ECmIP6NameServer2,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmProxyUsageEnabled             = CMManager::ECmProxyUsageEnabled,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmProxyProtocolName             = CMManager::ECmProxyProtocolName,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmProxyServerName               = CMManager::ECmProxyServerName,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmProxyPortNumber               = CMManager::ECmProxyPortNumber,
+        //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h
+        CmMetaHotSpot                   = CMManager::ECmMetaHotSpot,
+
+        // Packet data specific attributes
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataAPName                = CMManager::EPacketDataAPName,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataPDPType               = CMManager::EPacketDataPDPType,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIFPromptForAuth       = CMManager::EPacketDataIFPromptForAuth,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIFAuthName            = CMManager::EPacketDataIFAuthName,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPAddrFromServer      = CMManager::EPacketDataIPAddrFromServer,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPAddr                = CMManager::EPacketDataIPAddr,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPDNSAddrFromServer   = CMManager::EPacketDataIPDNSAddrFromServer,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPNameServer1         = CMManager::EPacketDataIPNameServer1,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPNameServer2         = CMManager::EPacketDataIPNameServer2,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPIP6DNSAddrFromServer = CMManager::EPacketDataIPIP6DNSAddrFromServer,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPIP6NameServer1      = CMManager::EPacketDataIPIP6NameServer1,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIPIP6NameServer2      = CMManager::EPacketDataIPIP6NameServer2,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataIFAuthPass            = CMManager::EPacketDataIFAuthPass,
+        /*!
+         * From TConnectionMethodPacketDataSpecificAttributes in
+         * cmpluginpacketdatadef.h
+         */
+        PacketDataDisablePlainTextAuth  = CMManager::EPacketDataDisablePlainTextAuth,
+        
+        // WLAN specific attributes
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanConnectionMode              = CMManager::EWlanConnectionMode,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanSSID                        = CMManager::EWlanSSID,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanSecurityMode                = CMManager::EWlanSecurityMode,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanScanSSID                    = CMManager::EWlanScanSSID,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanChannelID                   = CMManager::EWlanChannelID,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey1InHex                = CMManager::EWlanWepKey1InHex,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey2InHex                = CMManager::EWlanWepKey2InHex,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey3InHex                = CMManager::EWlanWepKey3InHex,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey4InHex                = CMManager::EWlanWepKey4InHex,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey1InAscii              = CMManager::EWlanWepKey1InAscii,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey2InAscii              = CMManager::EWlanWepKey2InAscii,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey3InAscii              = CMManager::EWlanWepKey3InAscii,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKey4InAscii              = CMManager::EWlanWepKey4InAscii,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWepKeyIndex                 = CMManager::EWlanWepKeyIndex,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        Wlan802_1xAllowUnencrypted      = CMManager::EWlan802_1xAllowUnencrypted,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanEnableWpaPsk                = CMManager::EWlanEnableWpaPsk,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWpaPreSharedKey             = CMManager::EWlanWpaPreSharedKey,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWapiPsk                     = CMManager::EWlanWapiPsk,
+        //!  From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h
+        WlanWapiPskFormat               = CMManager::EWlanWapiPskFormat
+    };
+    
+    /*!
+     * Enumerations for Wlan connection modes. Values come from
+     * TWlanNetMode in cmpluginwlandef.h
+     */
+    enum WlanConnMode {
+        Adhoc                           = CMManager::EAdhoc,
+        Infra                           = CMManager::EInfra
+    };
+    
+    /*!
+     * Enumerations for Wlan security modes. Values come from
+     * TWlanSecMode in cmpluginwlandef.h
+     */
+    enum WlanSecMode {
+        WlanSecModeOpen                 = CMManager::EWlanSecModeOpen,
+        WlanSecModeWep                  = CMManager::EWlanSecModeWep,
+        WlanSecMode802_1x               = CMManager::EWlanSecMode802_1x,
+        WlanSecModeWpa                  = CMManager::EWlanSecModeWpa,
+        WlanSecModeWpa2                 = CMManager::EWlanSecModeWpa2,
+        WlanSecModeWapi                 = CMManager::EWlanSecModeWAPI
+    };
+    
+    /*!
+     * Enumerations for Wlan WEP key index. Values come from
+     * TWepKeyIndex in cmpluginwlandef.h
+     */
+    enum WlanWepKeyIndex {
+        WepKeyIndex1                    = CMManager::EWepKeyIndex1,
+        WepKeyIndex2                    = CMManager::EWepKeyIndex2,
+        WepKeyIndex3                    = CMManager::EWepKeyIndex3,
+        WepKeyIndex4                    = CMManager::EWepKeyIndex4
+    };
+
+    /*!
+     * Enumerations for SNAP metadata items. Values come from
+     * TSnapMetadataField in cmmanagerdef.h
+     */
+    enum SnapMetadataField {
+        SnapMetadataInternet            = CMManager::ESnapMetadataInternet,
+        SnapMetadataHighlight           = CMManager::ESnapMetadataHighlight,
+        SnapMetadataHiddenAgent         = CMManager::ESnapMetadataHiddenAgent,
+        SnapMetadataDestinationIsLocalised = CMManager::ESnapMetadataDestinationIsLocalised,
+        SnapMetadataPurpose             = CMManager::ESnapMetadataPurpose
+    };
+    
+    /*!
+     * Enumerations for SnapMetadataPurpose. Values come from
+     * TSnapPurpose in cmmanagerdef.h
+     */
+    enum SnapPurpose
+        {
+        SnapPurposeUnknown              = CMManager::ESnapPurposeUnknown,
+        SnapPurposeInternet             = CMManager::ESnapPurposeInternet,
+        SnapPurposeOperator             = CMManager::ESnapPurposeOperator,
+        SnapPurposeMMS                  = CMManager::ESnapPurposeMMS,
+        SnapPurposeIntranet             = CMManager::ESnapPurposeIntranet
+        };
+    
+    /*!
+     * Enumerations for CM Manager protection levels. Values come from
+     * TProtectionLevel in cmmanagerdef.h
+     */
+    enum CmmProtectionLevel {
+        ProtLevel0                      = CMManager::EProtLevel0,
+        ProtLevel1                      = CMManager::EProtLevel1,
+        ProtLevel2                      = CMManager::EProtLevel2,
+        ProtLevel3                      = CMManager::EProtLevel3
+    };
+}
+
+#endif // CMMANAGERDEFINES_SHIM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_ui_api/connection_settings_ui_api.pri	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies 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_HEADERS += \
+    connection_settings_ui_api/inc/cmapplsettingsui.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/connection_settings_ui_api/inc/cmapplsettingsui.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,240 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* CM Manager Application Settings UI interface.  
+*
+*/
+
+#ifndef CMAPPLSETTINGSUI_H
+#define CMAPPLSETTINGSUI_H
+
+// System includes
+
+#include <QObject>
+#include <QFlags>
+#include <QSet>
+
+// User includes
+
+// Forward declarations
+
+class CmApplSettingsUiPrivate;
+class TestCmApplSettingsUi;
+
+// External data types
+
+// Constants
+
+#ifdef BUILD_CMAPPLSETTINGSUI_DLL
+#define CMAPPLSETTINGSUIDLL_EXPORT Q_DECL_EXPORT
+#else
+#define CMAPPLSETTINGSUIDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+// Class declaration
+
+/*!
+    \class CmApplSettingsUi
+    \brief Class for launching the Application Settings UI.
+
+    Displays a radio button list dialog for an application that can be used
+    to select a destination or connection method.
+
+*/
+
+class CMAPPLSETTINGSUIDLL_EXPORT CmApplSettingsUi : public QObject
+{
+    Q_OBJECT
+    
+public:
+
+    // Data types
+
+    /*! 
+       The selection type of a list item in application settings UI
+     */
+    enum SelectionType
+        {
+        //! The user selected a destination
+        SelectionTypeDestination,
+        //! The user selected a connection method
+        SelectionTypeConnectionMethod
+        };
+
+    /*! 
+       These flags control what items the selection UI can contain.
+       Flags that are not listed in the enum are reserved for future usage
+       and they are disabled by default. So extending these flags later on
+       does not cause a BC break. These flags are used as bit fields.
+       
+       The following enumerations control how destinations and 
+       Connection Methods are presented in the selection UI.
+       
+       ShowDestinations is set and ShowConnectionMethods is set:
+         Destination list is shown in selection UI and alternatively
+         the user can select a Connection Method.
+       ShowDestinations is set and ShowConnectionMethods is not set:
+         Destination list is shown in selection UI and no specific
+         Connection Method can be selected. 
+       ShowDestinations is not set and ShowConnectionMethods is set:
+         Connection Method list is shown in selection UI. Destinations
+         can not be selected.
+       ShowDestinations is not set and ShowConnectionMethods is not set:
+         The selection UI will not contain any Destination or
+         Connection Method. If no extension(s) are implemented  (later
+         on), no dialog is shown, and the execution is cancelled
+         (ApplSettingsErrorNoContent).
+     */
+    enum SelectionDialogItems
+        {
+        //! Support destination selection
+        ShowDestinations = 0x01,
+        //! Support connection method selection
+        ShowConnectionMethods = 0x02                              
+        };
+    
+    /*!
+       Error codes for the dialog.
+     */
+    enum ApplSettingsError {
+        //! No error. Dialog succeeded.
+        ApplSettingsErrorNone = 0,
+        //! Selection was canceled.
+        ApplSettingsErrorCancel,
+        //! No items to show (e.g. too strict filters).
+        ApplSettingsErrorNoContent,
+        //! Settings reading failed.
+        ApplSettingsErrorSettingsRead
+    };
+
+    /*!
+       Details of a setting selection. Used both for configuring and
+       selection result.
+     */
+    struct SettingSelection
+        {
+        /*!
+           Selection type, refers to the type of the list item which
+           is selected.
+         */
+        SelectionType result;
+        
+        /*!
+           Id of the selected destination or connection method.
+         */
+        uint id;
+        };
+    
+    /*!
+       Typedef for the bearer filter parameter.
+       This type is used to filter Connection Methods by bearer type.
+
+       The Bearer types are defined in CM Manager's Connection Settings
+       Shim (cmmanagerdefines_shim.h). 
+     */
+    typedef uint BearerTypeFilter;
+    
+    /*!
+        Constructor.
+        
+        @param parent Parent object.
+     */
+    explicit CmApplSettingsUi(QObject *parent = 0);
+    
+    /*!
+        Destructor.
+     */
+    virtual ~CmApplSettingsUi();
+
+    /*!
+        Set dialog options. If this function is not called before running the
+        dialog, the default options are used:
+        -listItems: ShowDestinations | ShowConnectionMethods
+        -bearerFilter: empty
+
+        @param[in] listItems Dialog list items configuration.
+        @param[in] bearerFilter Dialog Connection Method bearer type filter.
+        If empty, all bearers are supported.
+     */
+    void setOptions(
+        const QFlags<SelectionDialogItems> &listItems,
+        const QSet<BearerTypeFilter> &bearerFilter);
+
+    /*!
+        Dialog selection setter. Sets the current selection in the dialog.
+        If not selected, or if the selection is invalid, the default
+        selection is used (the first item in the dialog items list).
+
+        @param[in] selection Dialog selection to set.
+     */
+    void setSelection(const SettingSelection &selection);
+
+    /*!
+        Dialog selection getter. Returns the current selection.
+
+        @return Current dialog selection.
+     */
+    SettingSelection selection() const;
+
+    /*!
+        Launches the Application Settings UI provided for applications
+        for selecting Destinations and/or Connection Methods.
+
+        If a list of Destinations is displayed, and the selection is set to
+        a Connection Method, the destination list highlight is set to
+        "Dedicated access point".
+
+        This function runs the dialog asynchronously.  After the dialog
+        has been closed (or cancelled), the signal finished() is emmitted.
+        If the dialog succeeded, the client can then check the new
+        selection with selection() getter.
+     */
+    void open();
+
+signals:
+
+    /*!
+       Signal used for informing that the dialog has finished.
+       
+       @param[in] status Dialog run status code (ApplSettingsError*).
+     */
+    void finished(uint status);
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    Q_DISABLE_COPY(CmApplSettingsUi)
+
+private slots:
+
+private: // data
+
+    CmApplSettingsUiPrivate *d_ptr;         //!< Private implementation
+
+    // Friend classes
+    
+    // This is defined as a friend class in order to be able to emit
+    // signals directly from private implementation code.
+    friend class CmApplSettingsUiPrivate;
+    
+    // Test class needs direct access
+    friend class TestCmApplSettingsUi;
+};
+
+#endif // CMAPPLSETTINGSUI_H
--- a/ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/connection_ui_utilities_api/inc/ConnectionUiUtilities.h	Tue Aug 31 15:35:44 2010 +0300
@@ -108,17 +108,35 @@
         
         /**
         * Pops up discreet popup indicating that connection is being
+        * established to not yet known access point. The access point details
+        * can be later provided with ConnectingViaDiscreetPopup( aIAPId,
+        * aConnectionAlreadyActive) method.
+        * This method should only be used from the MPM in order to provide
+        * a consistent popup behavior across the platform.
+        */
+        IMPORT_C void ConnectingViaDiscreetPopup( );
+
+        /**
+        * Pops up discreet popup indicating that connection is being
         * established to the given access point.
         * This method should only be used from the MPM in order to provide
         * a consistent popup behavior across the platform.
         * @param aIAPId The id of the access point.
+        * @param aConnectionActive ETrue connection already active.
         */
-        IMPORT_C void ConnectingViaDiscreetPopup( const TUint32& aIAPId );
+        IMPORT_C void ConnectingViaDiscreetPopup( const TUint32& aIAPId,
+                TBool aConnectionAlreadyActive );
+
+        /**
+        * Cancels (hides) connecting via discreet popup.
+        * This method should only be used from the MPM in order to provide
+        * a consistent popup behavior across the platform.
+        */
+        IMPORT_C void CancelConnectingViaDiscreetPopup( );
 
         /**
         * Pops up a discreet popup indicating a connection error.
-        * Only appropriate error codes show the popup, otherwise
-        * (such as with general errors) the popup is not shown.
+        * Only appropriate error codes show the popup.
         * This method should only be used from the MPM in order to provide
         * a consistent popup behavior across the platform.
         * @param aErrCode Symbian error code.
@@ -495,7 +513,19 @@
         */
         IMPORT_C void OffLineWlanNote( TRequestStatus& aStatus );
         
-
+        /**
+        * Notifier that displays "Power save test" information note.
+        * @param aDisable On completion, contains ETrue if user wants to disable
+        *                 the note in the future. EFalse otherwise. 
+        * @param aStatus KErrNone if successful, a system-wide error code if not.
+        */
+        IMPORT_C void WlanPowerSaveTestNote( TBool&          aDisable,
+                                             TRequestStatus& aStatus );
+        
+        /**
+        * Cancel WlanPowerSaveTestNote notifier.
+        */
+        IMPORT_C void CancelWlanPowerSaveTestNote();
         
         /**
         * Notifier. Shows a data query prompting for WAPI pre-shared key. 
--- a/ipcm_plat/extended_connection_settings_api/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,8 +11,8 @@
 *
 * Contributors:
 *
-* Description:  File that exports the files belonging to 
-:                Extended Connection Settings API
+* Description:
+* File that exports the files belonging to Extended Connection Settings API.
 *
 */
 
@@ -24,10 +24,9 @@
 
 PRJ_EXPORTS
 
-../inc/cmdestinationext.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmdestinationext.h)
-../inc/cmconnectionmethodext.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmconnectionmethodext.h)
-../inc/cmpsettingsconsts.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmpsettingsconsts.h)
-../inc/cmsettingsui.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmsettingsui.h)
-../inc/cmcommonui.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmcommonui.h)
-../inc/cmmanagerext.h     MW_LAYER_PLATFORM_EXPORT_PATH(cmmanagerext.h)
-../inc/cmmanagerkeys.h    MW_LAYER_PLATFORM_EXPORT_PATH(cmmanagerkeys.h)
+../inc/cmdestinationext.h       MW_LAYER_PLATFORM_EXPORT_PATH(cmdestinationext.h)
+../inc/cmconnectionmethodext.h  MW_LAYER_PLATFORM_EXPORT_PATH(cmconnectionmethodext.h)
+../inc/cmpsettingsconsts.h      MW_LAYER_PLATFORM_EXPORT_PATH(cmpsettingsconsts.h)
+../inc/cmcommonui.h             MW_LAYER_PLATFORM_EXPORT_PATH(cmcommonui.h)
+../inc/cmmanagerext.h           MW_LAYER_PLATFORM_EXPORT_PATH(cmmanagerext.h)
+../inc/cmmanagerkeys.h          MW_LAYER_PLATFORM_EXPORT_PATH(cmmanagerkeys.h)
--- a/ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/inc/cmcommonui.h	Tue Aug 31 15:35:44 2010 +0300
@@ -18,6 +18,9 @@
 #ifndef CMCOMMONUI_H
 #define CMCOMMONUI_H
 
+// Deprecation warning
+#warning This header file is deprecated and will be removed. See Polonium CR #461 for details.
+
 // INCLUDES
 #include <e32def.h>
 #include <e32cmn.h>
--- a/ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/inc/cmconnectionmethodext.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,24 @@
 *
 * Contributors:
 *
-* Description:  Connection method extended interface class.
+* Description:
+* Connection method extended interface class.
 *
 */
 
 #ifndef CMCONNECTIONMETHODEXT_H
 #define CMCONNECTIONMETHODEXT_H
 
-// INCLUDES
+// Deprecation warning
+#warning This header file is deprecated and shall not be used anymore. Please use cmconnectionmethod.h instead. See Polonium CR #461 for details.
+
 #include <e32base.h>
 #include <cmconnectionmethoddef.h>
 
-// CLASS DECLARATION
-class CCmPluginBaseEng;
+// Forward declarations
 class RCmDestinationExt;
+class CCmConnectionMethodWrapper;
+
 
 /**
  *  RCmConnectionMethodExt is for getting/setting values of a connection method.
@@ -34,44 +38,36 @@
  */
 NONSHARABLE_CLASS( RCmConnectionMethodExt )
     {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
     public:
-    
         /**
-        * Default constructor. 
+        * Default constructor.
         */
         IMPORT_C RCmConnectionMethodExt();
 
+        /**
+        * Copy constructor.
+        */
+        IMPORT_C RCmConnectionMethodExt(
+                const RCmConnectionMethodExt& aConnMethod );
 
         /**
-        * Copy constructor. 
-        */
-        IMPORT_C RCmConnectionMethodExt(const RCmConnectionMethodExt& aItem);
-
-
-        /**
-        * Destructor. 
+        * Destructor.
         */
         IMPORT_C ~RCmConnectionMethodExt();
 
-    //=====================================================================
-    // API functions
     public:
-    
         /**
         * Close the session.
         */
         IMPORT_C void Close();
-        
+
         /**
-        * Creates a copy of this connection method. UpdateL() has to be called 
+        * Creates a copy of this connection method. UpdateL() has to be called
         * to store new connection method in database. Copy is put to
         * the Uncategorized destination. The ownership is passed.
         */
         IMPORT_C RCmConnectionMethodExt CreateCopyL();
-            
+
         /**
         * Gets the value for a TInt attribute.
         * @param aAttribute Identifies the attribute to be retrived.
@@ -93,7 +89,7 @@
         * @return copy of the requested attribute. Ownership is passed.
         */
         IMPORT_C HBufC* GetStringAttributeL( TUint32 aAttribute ) const;
-        
+
         /**
         * Gets the value for a String8 attribute.
         * HBuf ownership is passed to the caller
@@ -124,18 +120,20 @@
         * @param aValue The value to be set.
         * @return None.
         */
-        IMPORT_C void SetStringAttributeL( TUint32 aAttribute, 
-                                           const TDesC16& aValue );
-        
+        IMPORT_C void SetStringAttributeL(
+                TUint32 aAttribute,
+                const TDesC16& aValue );
+
         /**
         * Sets the value for a String8 attribute.
         * @param aAttribute Identifies the attribute to be set.
         * @param aValue The value to be set.
         * @return None.
         */
-        IMPORT_C void SetString8AttributeL( TUint32 aAttribute, 
-                                            const TDesC8& aValue );
-        
+        IMPORT_C void SetString8AttributeL(
+                TUint32 aAttribute,
+                const TDesC8& aValue );
+
         /**
         * Call this function only if this CM is an embedded destination!
         * @return embedded destination
@@ -143,8 +141,8 @@
         IMPORT_C RCmDestinationExt DestinationL() const;
 
         /**
-        * Try to delete the connection method. If it is referenced from 
-        * any destination, then the references are removed and the 
+        * Try to delete the connection method. If it is referenced from
+        * any destination, then the references are removed and the
         * connection method is deleted.
         * Do NOT call this function if you got this
         * connection method from a destination. Call destination's
@@ -152,51 +150,49 @@
         * @return ETrue if connection method deleted.
         */
         IMPORT_C TBool DeleteL();
-        
+
         /**
         * Update in the database.
         * @return None.
-        */        
+        */
         IMPORT_C void UpdateL();
-        
+
         /**
-        * checks if connection methods are the same 
-        * 
+        * checks if connection methods are the same
+        *
         * @since S60 3.2
         * @param aConnMethod the connection method being compared
         * @return ETrue if the destinations are the same
         */
         IMPORT_C TBool operator==( RCmConnectionMethodExt& aConnMethod ) const;
-        
+
         /**
-        * checks if connection methods are not the same 
-        * 
+        * checks if connection methods are not the same
+        *
         * @since S60 3.2
         * @param aConnMethod the connection method being compared
         * @return ETrue if the destinations are different
         */
         IMPORT_C TBool operator!=( RCmConnectionMethodExt& aConnMethod ) const;
-        
+
 
         /**
-        * assignment operator 
-        * 
+        * assignment operator
+        *
         * @since S60 3.2
         * @return RCmConnectionMethod
         */
-        IMPORT_C RCmConnectionMethodExt& operator=(const RCmConnectionMethodExt& 
-                                                    aConnMethod);
+        IMPORT_C RCmConnectionMethodExt& operator=(
+                const RCmConnectionMethodExt& aConnMethod );
 
     private:
-    
         friend class RCmManagerExt;
         friend class RCmDestinationExt;
-        
+
     private:
-    
-        CCmPluginBaseEng* iImplementation;
+        CCmConnectionMethodWrapper* iCmConnectionMethodWrapper;
     };
 
-#endif      // CMCONNECTIONMETHODEXT_H
-           
-//  End of File
\ No newline at end of file
+#endif // CMCONNECTIONMETHODEXT_H
+
+// End of file
--- a/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/inc/cmdestinationext.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,45 +11,39 @@
 *
 * Contributors:
 *
-* Description:  Destination extended interface class.
+* Description:
+* Destination extended interface class.
 *
 */
 
-#ifndef DESTINATIONEXT_H
-#define DESTINATIONEXT_H
+
+#ifndef CMDESTINATIONEXT_H
+#define CMDESTINATIONEXT_H
 
-// System includes
-#include <e32def.h>
+// Deprecation warning
+#warning This header file is deprecated and shall not be used anymore. Please use cmdestination.h instead. See Polonium CR #461 for details.
+
 #include <e32base.h>
 #include <metadatabase.h>
 #include <cmmanagerdef.h>
 
-// FORWARD DECLARATIONS
-class CCmDestinationData;
-class CCmManagerImpl;
+// Forward declarations
 class RCmConnectionMethodExt;
-class RCmDestinationExt;
-class CGulIcon;
+class CCmDestinationWrapper;
+
 
 /**
  *  RCmDestination is for getting/setting values of a network destination.
  *  @lib cmmanager.lib
  *  @since S60 v3.2
  */
-NONSHARABLE_CLASS(RCmDestinationExt)
+NONSHARABLE_CLASS( RCmDestinationExt )
     {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
     public:
-    
         /** Default constructor. */
         IMPORT_C RCmDestinationExt();
 
-    //=====================================================================
-    // API functions
     public:
-        
         /**
         * Close the session.
         */
@@ -57,180 +51,164 @@
 
         IMPORT_C ~RCmDestinationExt();
 
-        IMPORT_C RCmDestinationExt(const RCmDestinationExt& aCmDestination);
-        
-        //=====================================================================
-        // Conn method handling    
-        
+        IMPORT_C RCmDestinationExt( const RCmDestinationExt& aDestination );
+
         /**
         * Return the number of connection methods in the destination
         * @param None
         * @return number of the connection method in this destination
-        */                 
+        */
         IMPORT_C TInt ConnectionMethodCount();
-        
+
         /**
-        * Return a reference to the connection method. 
-        * The index must be less than the return value of 
+        * Return a reference to the connection method.
+        * The index must be less than the return value of
         * ConnectionMethodCount()
         * @param anIndex index of the connection method to be returned
         * @return connection method
-        */        
-        IMPORT_C RCmConnectionMethodExt ConnectionMethodL( TInt anIndex );
-        
+        */
+        IMPORT_C RCmConnectionMethodExt ConnectionMethodL( TInt aIndex );
+
         /**
         * Returns the connection method with the ECmId.
         * Leaves with KErrNotFound if not found.
         * @param aCmId unique id of the requested connection method.
         * @return connection method
         */
-        IMPORT_C RCmConnectionMethodExt ConnectionMethodByIDL( 
-                                                        TInt aCmId );
-
-        //Getting attributes
+        IMPORT_C RCmConnectionMethodExt ConnectionMethodByIDL(
+                TInt aConnMethodId );
 
         /**
         * Return the priority of the passed connection method
         * @param aCCMItem connection method
-        * @return the priority of the queried connection method 
+        * @return the priority of the queried connection method
         */
-        IMPORT_C TUint PriorityL(const RCmConnectionMethodExt& aCCMItem );
-        
+        IMPORT_C TUint PriorityL(
+                const RCmConnectionMethodExt& aConnectionMethod );
+
         /**
         * Return the name of the destination. Ownership is passed.
         * HBuf ownership is passed to the caller
         * @return name of the destination.
-        */      
-        IMPORT_C HBufC* NameLC();                        
-        
+        */
+        IMPORT_C HBufC* NameLC();
+
         /**
         * Return the destination's Id attribute
         * @return id of the destination
-        */                    
+        */
         IMPORT_C TUint32 Id();
 
         /**
         * Return the destination's ElementId attribute
-        * @return TUint32        
-        */            
+        * @return TUint32
+        */
         IMPORT_C TUint32 ElementId();
-                
-        /**
-        * Return the Icon pointer. Ownership is passed.
-        * This fucton leaves if the client does not have a valid UI context
-        * @return icon of the destination
-        */ 
-        IMPORT_C CGulIcon* IconL();
-    
+
         /**
         * Return the Metadata
-        * @return TUint32        
-        */            
-        IMPORT_C TUint32 MetadataL( CMManager::TSnapMetadataField aMetaField ) const;
-    
+        * @return TUint32
+        */
+        IMPORT_C TUint32 MetadataL(
+                CMManager::TSnapMetadataField aMetadataField ) const;
+
         /**
         * Return the protection level of the destination.
         * @return protection level
         */
         IMPORT_C CMManager::TProtectionLevel ProtectionLevel();
-        
+
         /**
         * Return that the destination is hidden or not.
         * @return ETrue if the destination is hidden
         */
-        IMPORT_C TBool IsHidden();        
-                
+        IMPORT_C TBool IsHidden();
+
         /**
         * Create a connection method that belongs to this destination.
-        * @param aImplementationUid - implementation uid (bearer type) of the 
+        * @param aImplementationUid - implementation uid (bearer type) of the
         * connection method to be created
         * @return newly created connection method
         */
-        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL( 
-                                                          TUint32 aBearerType );
-        
+        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL(
+                TUint32 aBearerType );
+
         /*
         * Adds an existing connection method to a destination
         * @param aConnectionMethod Connection method to be added
         * @return index in the Connection Method list
         */
-        IMPORT_C TInt AddConnectionMethodL( 
-                                    RCmConnectionMethodExt aConnectionMethod );            
-    
+        IMPORT_C TInt AddConnectionMethodL(
+                RCmConnectionMethodExt aConnectionMethod );
+
         /*
         * Embeds an existing destination into this destination.
         * @param RCmDestinationExt - Destination to be embedded
         * @return TInt - index in the Connection Method list
         */
         IMPORT_C TInt AddEmbeddedDestinationL(
-                            const RCmDestinationExt& aDestination );     
-    
+                const RCmDestinationExt& aDestination );
+
         /**
         * Remove a connection method from a destination and delete it
-        * on update. 
-        * Exception: conenction method is not deleted  if it's referenced 
+        * on update.
+        * Exception: conenction method is not deleted  if it's referenced
         * from any other destination.
         * @param aConnectionMethod the connection method to be deleted.
         */
-        IMPORT_C void DeleteConnectionMethodL( 
-                                    RCmConnectionMethodExt& aConnectionMethod );
-    
+        IMPORT_C void DeleteConnectionMethodL(
+                RCmConnectionMethodExt& aConnectionMethod );
+
         /**
         * Remove connection method from the destination
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveConnectionMethodL( 
-                                   RCmConnectionMethodExt aConnectionMethod );
-        
-    
+        IMPORT_C void RemoveConnectionMethodL(
+                RCmConnectionMethodExt aConnectionMethod );
+
         /**
         * Set the connection method's priority based on the passed
         * index. Indexing starts from zero(the highest priority).
         * @param aCCMItem the connection method item
-        * @param aIndex the new priority of the connection method in the 
+        * @param aIndex the new priority of the connection method in the
         * destination
         */
-        IMPORT_C void ModifyPriorityL( RCmConnectionMethodExt& aCCMItem, 
-                                       TUint aIndex );
-        
+        IMPORT_C void ModifyPriorityL(
+                RCmConnectionMethodExt& aConnectionMethod,
+                TUint aIndex );
+
         /**
         * Set the destination's name
         * @param aDestinationName new name of the destination
         */
         IMPORT_C void SetNameL( const TDesC& aName );
-           
-        /**
-        * Set the destination's icon index.
-        * This fucton leaves if the client does not have a valid UI context
-        * @param aIconIndex new icon index of the destination
-        */
-        IMPORT_C void SetIconL( TUint32 anIndex );
-        
+
         /**
         * Set the Metadata
         * @param aMetaField field to be modified
         * @param aValue value to be set
-        */            
-        IMPORT_C void SetMetadataL( CMManager::TSnapMetadataField aMetaField, 
-                                    TUint32 aValue );
-        
+        */
+        IMPORT_C void SetMetadataL(
+                CMManager::TSnapMetadataField aMetadataField,
+                TUint32 aValue );
+
         /**
         * Set the protection level of the destination.
-        * @param aProtLevel new protection level 
+        * @param aProtLevel new protection level
         */
         IMPORT_C void SetProtectionL( CMManager::TProtectionLevel aProtLevel );
-        
+
         /**
         * Set if the destination is hidden or not.
         * @param aHidden - ETrue if destination is hidden
         */
-        IMPORT_C void SetHiddenL( TBool aHidden );         
-        
+        IMPORT_C void SetHiddenL( TBool aHidden );
+
         /**
         * Update all values of the destination and its connection method.
         * Nothing if stored, if update leaves due to any reason.
         */
-        IMPORT_C void UpdateL();               
+        IMPORT_C void UpdateL();
 
         /**
         * Delete destination and its connection methods from CommsDat.
@@ -238,7 +216,7 @@
         * not deleted.
         */
         IMPORT_C void DeleteLD();
-        
+
         /**
         * Returns if there's connection created with any of the destination's
         * connection method.
@@ -246,50 +224,53 @@
         * connection method.
         */
         IMPORT_C TBool IsConnectedL() const;
-        
+
         /**
          * Compares whether two objects content is the same.
          * @return ETrue if the content is same.
          */
-        IMPORT_C TBool operator==(const RCmDestinationExt& aDestination) const;
+        IMPORT_C TBool operator==(
+                const RCmDestinationExt& aDestination ) const;
 
         /**
          * Compares whether two objects content is different.
          * @return ETrue if the content is different.
          */
-        IMPORT_C TBool operator!=(const RCmDestinationExt& aDestination) const;
+        IMPORT_C TBool operator!=(
+                const RCmDestinationExt& aDestination ) const;
 
         /**
-        * assignment operator 
-        * 
+        * assignment operator
+        *
         * @since S60 3.2
         * @param aDestination the destination being compared
         * @return RCmDestination
         */
-        IMPORT_C RCmDestinationExt& operator=(const RCmDestinationExt& 
-                                                    aCmDestination);
+        IMPORT_C RCmDestinationExt& operator=(
+                const RCmDestinationExt& aDestination );
 
         /**
-        * Create a connection method with given id that belongs to this destination.
-        * @param aImplementationUid - implementation uid (bearer type) of the 
+        * Create a connection method with given id that belongs to this
+        * destination.
+        * @param aImplementationUid - implementation uid (bearer type) of the
         * connection method to be created
         * @param aConnMethdId Predefined id for the connection method
         * (id range is from 1 to max IAP record amount in CommsDat).
         * @return newly created connection method or leaves with
         * KErrAlreadyExists if there exists CM with the same Id.
         */
-        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL( 
-                                                         TUint32 aBearerType,
-                                                         TUint32 aConnMethId );
-
-    private: // Data
-        
-        CCmDestinationData* iDestinatonData;
+        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL(
+                TUint32 aBearerType,
+                TUint32 aConnMethodId );
 
     private:
-    
         friend class RCmManagerExt;
         friend class RCmConnectionMethodExt;
+
+    private:
+        CCmDestinationWrapper* iCmDestinationWrapper;
     };
-    
-#endif // DESTINATIONEXT_H
+
+#endif // CMDESTINATIONEXT_H
+
+// End of file
--- a/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/inc/cmmanagerext.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,27 +11,28 @@
 *
 * Contributors:
 *
-* Description:  Connection manager IF class.
+* Description:
+* Connection manager IF class.
 *
 */
 
+
 #ifndef CMMANAGEREXT_H
 #define CMMANAGEREXT_H
 
-// System includes
-#include <e32std.h>
+// Deprecation warning
+#warning This header file is deprecated and shall not be used anymore. Please use cmmanager.h instead. See Polonium CR #461 for details.
+
 #include <e32base.h>
-#include <e32cmn.h>
 #include <metadatabase.h>
-#include <ConeResLoader.h>
 #include <cmmanagerdef.h>
 #include <cmconnectionmethodext.h>
 #include <cmdefconnvalues.h>
 
-// FORWARD DECLARATIONS
+// Forward declarations
 class RCmDestinationExt;
-class CCmManagerImpl;
-class CGulIcon;
+class RCmManagerApi;
+
 
 /**
  *  RCmManager is used to query and modify network destinations and connection
@@ -40,208 +41,197 @@
  *  @lib cmmanager.lib
  *  @since S60 v3.2
  */
-NONSHARABLE_CLASS(RCmManagerExt)
+NONSHARABLE_CLASS( RCmManagerExt )
     {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
     public:
-    
         /** Inline constructor */
         inline RCmManagerExt();
 
-    //=====================================================================
-    // API functions
     public:
-        
         /** Open session */
-        IMPORT_C void OpenL();    
+        IMPORT_C void OpenL();
 
-        /** Open session and create tables if they don't exist*/
-        IMPORT_C void CreateTablesAndOpenL();    
-        
+        /** Open session and create tables if they don't exist */
+        IMPORT_C void CreateTablesAndOpenL();
+
         /**
         * Symbian constructor
         * Pushes the object on the cleanup stack
         *
         * @since S60 3.2
         */
-        IMPORT_C void OpenLC();    
-        
+        IMPORT_C void OpenLC();
+
         /** Close session */
         IMPORT_C void Close();
-        
+
         /**
-        * GetBearerInfoXXX function can be used to query
-        * bearer informantion that doesn't belong
-        * to a specific connection method, such as 
+        * GetBearerInfoXXX function can be used to query bearer informantion
+        * that doesn't belong to a specific connection method, such as
         * ECmCoverage or ECmDefaultPriority etc.
-        * NULL pointer, returned from string functions, means
-        * attribute exists but has no value.
+        * NULL pointer, returned from string functions, means attribute exists
+        * but has no value.
+        * HBuf ownership is passed to the caller.
+        */
+        IMPORT_C TUint32 GetBearerInfoIntL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+        IMPORT_C TBool GetBearerInfoBoolL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+        IMPORT_C HBufC* GetBearerInfoStringL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+        IMPORT_C HBufC8* GetBearerInfoString8L(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+
+        /**
+        * GetConnectionMethodInfoXXX function can be used to query any,
+        * non-bearer specific information about a given connection method. This
+        * can be e.g. ECmBearerType, ECmName, ECmStartPage etc.
+        * NULL pointer, returned from string functions, means attribute exists
+        * but has no value.
         * HBuf ownership is passed to the caller
         */
-        IMPORT_C TUint32 GetBearerInfoIntL( TUint32 aBearerType,
-                                  TUint32 aAttribute ) const;
-        IMPORT_C TBool GetBearerInfoBoolL( TUint32 aBearerType,
-                                 TUint32 aAttribute ) const;
-        IMPORT_C HBufC* GetBearerInfoStringL( TUint32 aBearerType,
-                                    TUint32 aAttribute ) const;
-        IMPORT_C HBufC8* GetBearerInfoString8L( TUint32 aBearerType,
-                                    TUint32 aAttribute ) const;
+        IMPORT_C TUint32 GetConnectionMethodInfoIntL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
+        IMPORT_C TBool GetConnectionMethodInfoBoolL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
+        IMPORT_C HBufC* GetConnectionMethodInfoStringL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
+        IMPORT_C HBufC8* GetConnectionMethodInfoString8L(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
 
         /**
-        * GetConnectionMethodInfoXXX function can be used to 
-        * query any, non-bearer specific information about
-        * a given connection method. This can be e.g. ECmBearerType,
-        * ECmName, ECmStartPage etc.
-        * NULL pointer, returned from string functions, means
-        * attribute exists but has no value.
-        * HBuf ownership is passed to the caller
-        */
-        IMPORT_C TUint32 GetConnectionMethodInfoIntL( TUint32 aIapId,
-                                             TUint32 aAttribute ) const;
-        IMPORT_C TBool GetConnectionMethodInfoBoolL( TUint32 aIapId,
-                                            TUint32 aAttribute ) const;
-        IMPORT_C HBufC* GetConnectionMethodInfoStringL( TUint32 aIapId,
-                                               TUint32 aAttribute ) const;
-        IMPORT_C HBufC8* GetConnectionMethodInfoString8L( TUint32 aIapId,
-                                               TUint32 aAttribute ) const;
-                
-        /**
-        * Creates a Destination with the passed name. 
+        * Creates a Destination with the passed name.
         * @param aName the name of the new destination.
-        * @return RCmDestinationExt new destination. ownership is passed to the 
+        * @return RCmDestinationExt new destination. ownership is passed to the
         * caller
         */
         IMPORT_C RCmDestinationExt CreateDestinationL( const TDesC& aName );
-        
+
         /**
         * Creates a connection method does not belong to any destination
         * @param aImplementationUid - bearer type of the new connection method
         * @return RCmConnectionMethodExt newly created connection method.
         */
-        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL( 
-                                                          TUint32 aBearerType );        
-        
+        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL(
+                TUint32 aBearerType );
+
         /**
-        * Copies a connection method belonging to one destination to 
-        * another. The connection method becomes shared.
-        * Calls UpdateL on the destination
+        * Copies a connection method belonging to one destination to another.
+        * The connection method becomes shared. Calls UpdateL on the
+        * destination.
         * @param aTargetDestination
         * @param aConnectionMethodId
         * @return TInt - index in the Connection Method list
         */
-        IMPORT_C TInt CopyConnectionMethodL( 
-                                    RCmDestinationExt& aTargetDestination,
-                                    RCmConnectionMethodExt& aConnectionMethod );
-                                        
+        IMPORT_C TInt CopyConnectionMethodL(
+                RCmDestinationExt& aTargetDestination,
+                RCmConnectionMethodExt& aConnectionMethod );
+
         /**
-        * Moves a connection method belonging to one destination to 
-        * another. The connection method is removed from the source destination
+        * Moves a connection method belonging to one destination to another. The
+        * connection method is removed from the source destination.
         * @param aSourceDestination
         * @param aTargetDestination
         * @param aConnectionMethod
         * @return TInt - index in the Connection Method list
         */
-        IMPORT_C TInt MoveConnectionMethodL( 
-                                    RCmDestinationExt& aSourceDestination,
-                                    RCmDestinationExt& aTargetDestination,
-                                    RCmConnectionMethodExt& aConnectionMethod );
-                                                                                  
+        IMPORT_C TInt MoveConnectionMethodL(
+                RCmDestinationExt& aSourceDestination,
+                RCmDestinationExt& aTargetDestination,
+                RCmConnectionMethodExt& aConnectionMethod );
+
         /**
         * Remove connection method from the destination
         * @param aDestination destination the connection method is attached to
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveConnectionMethodL( 
-                                   RCmDestinationExt& aDestination,
-                                   RCmConnectionMethodExt& aConnectionMethod );
-                                   
+        IMPORT_C void RemoveConnectionMethodL(
+                RCmDestinationExt& aDestination,
+                RCmConnectionMethodExt& aConnectionMethod );
+
         /**
-        * Removes connection method from every destination and make it 
+        * Removes connection method from every destination and make it
         * uncategorized.
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveAllReferencesL( 
-                                    RCmConnectionMethodExt& aConnectionMethod );
+        IMPORT_C void RemoveAllReferencesL(
+                RCmConnectionMethodExt& aConnectionMethod );
 
-    //=========================================================================
-    // API functions - Getter-Setter
     public:
-    
         /**
         * Returns the connection method queried by its ID.
         * @param aId if of the connection method
         * @return RCmConnectionMethodExt connection method instance
         */
-        IMPORT_C RCmConnectionMethodExt ConnectionMethodL( 
-                                                  TUint32 aConnectionMethodId );
-        
+        IMPORT_C RCmConnectionMethodExt ConnectionMethodL(
+                TUint32 aConnectionMethodId );
+
         /**
-        * Returns the list of connection methods that do not belong to any 
-        * destination
+        * Returns the list of connection methods that do not belong to any
+        * destination.
         * @param aCMArray on return it is the array of IAP ids.
-        * @param aCheckBearerType If ETrue only connection methods with 
-        *                         supported bearer types are returned
-        * @param aLegacyOnly when set to ETrue only Legacy IAP ids will
-        *                         be returned
-        * @param aEasyWlan when set to ETrue EasyWlan id is returned, too
+        * @param aCheckBearerType If ETrue only connection methods with
+        * supported bearer types are returned.
+        * @param aLegacyOnly when set to ETrue only Legacy IAP ids will be
+        * returned.
+        * @param aEasyWlan when set to ETrue EasyWlan id is returned, too.
         */
-        IMPORT_C void ConnectionMethodL( RArray<TUint32>& aCMArray,
-                                         TBool aCheckBearerType = ETrue,
-                                         TBool aLegacyOnly = ETrue,
-                                         TBool aEasyWlan = EFalse );
-        
+        IMPORT_C void ConnectionMethodL(
+                RArray<TUint32>& aCmArray,
+                TBool aCheckBearerType = ETrue,
+                TBool aLegacyOnly = ETrue,
+                TBool aEasyWlan = EFalse );
+
         /**
-        * Returns the destination to which a specified 
-        * connection method belongs, search is by destination ID
+        * Returns the destination to which a specified connection method
+        * belongs, search is by destination ID.
         * @param aDestinationId id of the destination
         * @return RCmDestinationExt network destination
         */
         IMPORT_C RCmDestinationExt DestinationL( TUint32 aDestinationId );
-        
+
         /**
         * Returns an array of all destination id's
         * @param aDestArray array of all available network destination
-        */ 
+        */
         IMPORT_C void AllDestinationsL( RArray<TUint32>& aDestArray );
-        
+
         /**
         * Returns the copy of the bearer priority array. Ownership is passed.
         * @param aArray bearer priority array
-        */          
-        IMPORT_C void BearerPriorityArrayL( RArray<TBearerPriority>& aArray ) const;
-        
+        */
+        IMPORT_C void BearerPriorityArrayL(
+                RArray<TBearerPriority>& aArray ) const;
+
         /**
         * Update bearer priority array
         * @param aArray array with new global bearer priority
-        */          
-        IMPORT_C void UpdateBearerPriorityArrayL( 
-                                        const RArray<TBearerPriority>& aArray );
-        
+        */
+        IMPORT_C void UpdateBearerPriorityArrayL(
+                const RArray<TBearerPriority>& aArray );
 
         /**
         * Clean up passed global bearer priority array. Delete
         * the elements and calls Reset and Close on the array.
         * @param aArray array to be cleaned up
         */
-        IMPORT_C void CleanupGlobalPriorityArray( 
-                                        RArray<TBearerPriority>& aArray ) const;
-        
+        IMPORT_C void CleanupGlobalPriorityArray(
+                RArray<TBearerPriority>& aArray ) const;
+
         /**
         * Query all of the supported bearer types.
         * @param aArray list of all supported bearer types.
-        */          
+        */
         IMPORT_C void SupportedBearersL( RArray<TUint32>& aArray ) const;
-        
-        /**
-        * Returns "Uncategorized" icon.
-        * This fucton leaves if the client does not have a valid UI context
-        * @return CGulIcon* Icon of uncategorized connection methods. Ownership 
-        * is passed.
-        */          
-        IMPORT_C CGulIcon* UncategorizedIconL() const;
-        
+
         /**
         * Returns the id of the EasyWlan connection method.
         *
@@ -255,25 +245,27 @@
         *
         * @since S60 3.2
         */
-        IMPORT_C void ReadDefConnL( TCmDefConnValue& aDCSetting );   
+        IMPORT_C void ReadDefConnL( TCmDefConnValue& aDefConnSetting );
+
         /**
         * Stores the default connection method/SNAP.
         *
         * @since S60 3.2
         */
-        IMPORT_C void WriteDefConnL( const TCmDefConnValue& aDCSetting );  
+        IMPORT_C void WriteDefConnL( const TCmDefConnValue& aDefConnSetting );
 
         /**
-        * Creates a Destination with the passed name and id. 
+        * Creates a Destination with the passed name and id.
         * @param aName the name of the new destination.
         * @param aDestId Predefined id of the destination.
         * @return RCmDestinationExt newly created destination or leaves with
         * KErrAlreadyExists if there exists CM with the same Id.
         * Ownership is passed to the caller.
         */
-        IMPORT_C RCmDestinationExt CreateDestinationL( const TDesC& aName,
-                                                       TUint32      aDestId );
-        
+        IMPORT_C RCmDestinationExt CreateDestinationL(
+                const TDesC& aName,
+                TUint32 aDestId );
+
         /**
         * Creates a connection method does not belong to any destination
         * @param aImplementationUid - bearer type of the new connection
@@ -284,35 +276,38 @@
         * method or leaves with KErrAlreadyExists if there exists CM
         * with the same Id.
         */
-        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL( TUint32 aImplementationUid,
-                                                                 TUint32 aConnMethodId );
+        IMPORT_C RCmConnectionMethodExt CreateConnectionMethodL(
+                TUint32 aBearerType,
+                TUint32 aConnMethodId );
 
     private:
         /**
         * This is a private copy constructor without iplemetation.
-        * The sole purpose of this declaration is to forbid the copying of 
+        * The sole purpose of this declaration is to forbid the copying of
         * the objects of this class.
-        */          
-        RCmManagerExt(RCmManagerExt&  );
+        */
+        RCmManagerExt( RCmManagerExt& );
+
         /**
         * This is a private copy constructor without iplemetation.
-        * The sole purpose of this declaration is to forbid the copying of 
+        * The sole purpose of this declaration is to forbid the copying of
         * the objects of this class.
-        */          
+        */
         RCmManagerExt& operator=( RCmManagerExt& );
 
-    friend class CCmManagerImpl;
-    //=========================================================================
-    // Member data
-    
+    private:
+        friend class CCmManagerImpl;
+
     private:
-    
-        CCmManagerImpl* iImplementation;
+        RCmManagerApi* iCmManagerApi;
     };
-    
-inline RCmManagerExt::RCmManagerExt()
-    : iImplementation(NULL)
+
+
+inline RCmManagerExt::RCmManagerExt() : iCmManagerApi( NULL )
     {
     }
-    
+
+
 #endif // CMMANAGEREXT_H
+
+// End of file
--- a/ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/extended_connection_settings_api/inc/cmpsettingsconsts.h	Tue Aug 31 15:35:44 2010 +0300
@@ -19,6 +19,9 @@
 #ifndef CMPSETTINGS_CONSTS_H
 #define CMPSETTINGS_CONSTS_H
 
+// Deprecation warning
+#warning This header file is deprecated and shall not be used anymore. See Polonium CR #461 for details.
+
 // CONSTANTS
 
 #define KMaxConnNameLength            30
--- a/ipcm_plat/extended_connection_settings_api/inc/cmsettingsui.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of settings UI
-*
-*/
-
-#ifndef C_CMSETTINGSUI_H
-#define C_CMSETTINGSUI_H
-
-#include <e32def.h>
-#include <e32base.h>
-
-class CCmSettingsUiImpl;
-
-/**
- *  Implementation of Setting UI
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmSettingsUi) : public CBase
-    {
-    public:
-
-        enum TResult
-                {
-                EBack,
-                EExit
-                };
-
-        /** Epoc constructor */
-        IMPORT_C static CCmSettingsUi* NewL();
-
-        /** Destructor */
-        virtual ~CCmSettingsUi();
-
-    //=========================================================================    
-    // UI API
-    //
-    public:
-
-        /**
-        * Launches the Settings UI 
-        * for handling Destinations and Connection Methods
-        * @since 3.2
-        * @return TResult - the softkey the user exited with
-        */
-        IMPORT_C TResult RunSettingsL();
-        
-        /**
-        * Launches a dialog with a list of Destination
-        * @since 3.2
-        * @param  aDestinationId ID of the selected Destination
-        * @return TBool
-        */
-        IMPORT_C TBool SelectDestinationDlgL( TUint32& aDestinationId );
-
-        /**
-        * Launches the dialog for adding connection methods
-        * @since 3.2.3
-        * @param  aDestUid destination id for the new cm
-        * @param  aBearerType bearer type for the new cm
-        * @return TUint32 id of the new cm
-        */
-        IMPORT_C TUint32 AddCmL( TUint32& aDestUid, TUint32 aBearerType );
-
-        /**
-        * Launches the dialog for editing connection methods
-        * @since 3.2.3
-        * @param  aCmId id of the cm to edit
-        * @return TResult - the softkey the user exited with.
-        *                   EBack in case editing is forbidden.
-        */
-        IMPORT_C TResult EditCmL( TUint32 aCmId );        
-    private:
-
-        /** First stage constructor */
-        CCmSettingsUi();
-
-        /** Epoc constructor */
-        void ConstructL();
-
-    private: // data
-
-        CCmSettingsUiImpl* iImpl;
-    };
-
-#endif // C_CMSETTINGSUI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/flextimer_api/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 
+:               FlexTimer API
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/rflextimer.h			MW_LAYER_PLATFORM_EXPORT_PATH(rflextimer.h)
+../inc/flextimer.h			MW_LAYER_PLATFORM_EXPORT_PATH(flextimer.h)
+../inc/flexperiodic.h		MW_LAYER_PLATFORM_EXPORT_PATH(flexperiodic.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/flextimer_api/inc/flexperiodic.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,415 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  CFlexPeriodic class for Flexible Timer server access.
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CFLEXPERIODIC_H
+#define CFLEXPERIODIC_H
+
+// INCLUDE FILES
+#include "flextimer.h"
+
+// CLASS DECLARATION
+/**
+ *  Class providing access to flexible periodic timer service.
+ *  This class inherits CFlexTimer and provides user with a periodic
+ *  timer very similar to CPeriodic with the exception that both
+ *  the initial delay and the consequent intervals have flexible
+ *  windows of opportunity during which they may expire.
+ *  
+ *  The flexible window sizes are set with Configure-function. If these window
+ *  sizes are not explicitly set by the user, a default window size is used.
+ *  See RFlexTimer for details about default window. 
+ *  
+ *  Note that when CFlexPeriodic expires next expiry interval always starts 
+ *  at that moment. This means that over time, timer expiry can start to 
+ *  "slide" when comparing to CPeriodic. 
+ *  
+ *  For example: CPeriodic is started at 8 o'clock with 30 minute interval.
+ *  It will then expire at 8.30, 9.00, ... 15.30, 16.00
+ *  
+ *  If CFlexPeriodic is used as a timer it can possibly expire at
+ *  8.30, 9.00, 9.28, 9.55, ... 15.45, 16.12 etc. 
+ *
+ *  @see CFlexTimer
+ *  @see RFlexTimer
+ *  @see CPeriodic
+ *
+ *  Example:
+ *  
+ *  Class definition:
+ *  @code
+ *  // Forward declaration
+ *  class CFlexPeriodic;
+ *
+ *  // Class definition
+ *  class CMyNetworkServiceMonitor : public CBase
+ *      {
+ *      public: // Members
+ *
+ *          // Destructor
+ *          virtual ~CMyNetworkServiceMonitor();
+ *
+ *          // Two-phased constructor
+ *          static CMyNetworkServiceMonitor* NewL(
+ *              TTimeIntervalMicroSeconds aWindow,
+ *              TTimeIntervalMicroSeconds aInterval );
+ *
+ *      private: // Members
+ *
+ *          // Constructor
+ *          CMyNetworkServiceMonitor();
+ *
+ *          // 2nd phase constuctor
+ *          void ConstructL(
+ *              TTimeIntervalMicroSeconds aWindow,
+ *              TTimeIntervalMicroSeconds aInterval );
+ *
+ *          // Callback function for periodic timer. A function for TCallBack.
+ *          static TInt DoMonitoring( TAny* aArgument );
+ *
+ *          // Callback function for timer server errors. A function for 
+ *          // TCallBack.
+ *          static TInt HandleError( TAny* aArgument );
+ *
+ *          // Does the network server monitoring.
+ *          // Implementation is not provided by this example.
+ *          DoNetworkServiceMonitoring();
+ *
+ *      private: // Data
+ *
+ *          // Owns. Flexible periodic timer.
+ *          CFlexPeriodic* iTimer;
+ *      };
+ *  @endcode
+ *
+ *  Class implementation:
+ *  @code
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor::CMyNetworkServiceMonitor() : iTimer( NULL )
+ *      {
+ *      // Nothing to do
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor::~CMyNetworkServiceMonitor()
+ *      {
+ *      if ( iTimer != NULL )
+ *          {
+ *          iTimer->Cancel(); // Cancel pending timer
+ *          delete iTimer;
+ *          }
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor* CMyNetworkServiceMonitor::NewL(
+ *      TTimeIntervalMicroSeconds aWindow,
+ *      TTimeIntervalMicroSeconds aInterval )
+ *      {
+ *      CMyNetworkServiceMonitor* self =
+ *          new (ELeave) CMyNetworkServiceMonitor;
+ *      CleanupStack::PushL( self );
+ *      self->ConstructL( aWindow, aInterval );
+ *      CleanupStack::Pop( self );
+ *      return self;
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::ConstructL(
+ *      TTimeIntervalMicroSeconds aWindow,
+ *      TTimeIntervalMicroSeconds aInterval )
+ *      {
+ *      // Constants
+ *      const TTimeIntervalMicroSeconds KNoWindow( 0 );
+ *      const TTimeIntervalMicroSeconds KImmediately( 0 );
+ *
+ *      iTimer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+ *
+ *      // Push timer to cleanup stack due configuration may leave
+ *      CleanupStack::PushL( iTimer );
+ *
+ *      // Set delay window 0 minute
+ *      User::LeaveIfError( 
+ *          iTimer->Configure( KNoWindow, aWindow ) );
+ *
+ *      // Start the timer, 1st call immediately
+ *      iTimer->Start(
+ *          KImmediately,
+ *          aInterval,
+ *          TCallBack( DoMonitoring, this ),
+ *          TCallBack( HandleError, this ) );
+ *
+ *      CleanupStack::Pop( iTimer );
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  TInt CMyNetworkServiceMonitor::DoMonitoring( TAny* aArgument )
+ *      {
+ *      CMyNetworkServiceMonitor* monitor =
+ *          static_cast<CMyNetworkServiceMonitor*>( aArgument );
+ *
+ *      monitor->DoNetworkServerMonitoring();
+ *      return KErrNone;
+ *      }
+ *     
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  TInt CMyNetworkServiceMonitor::HandleError( TAny* aArgument )
+ *      {
+ *      CMyNetworkServiceMonitor* monitor =
+ *          static_cast<CMyNetworkServiceMonitor*>( aArgument );
+ *
+ *      // Handling of the timer server error (e.g. closing up the application)
+ *      // here.
+ *          .
+ *          .
+ *          .
+ *      return KErrNone;
+ *      }     
+ *  @endcode
+ */
+class CFlexPeriodic : public CFlexTimer
+    {
+public:
+
+    /**
+     * A leaving constructor for the object.
+     * 
+     * @param aPriority Priority of the active object. Type CActive::TPriority
+     * 
+     * @return A pointer to a CFlexPeriodic object on success.
+     * 
+     * @leave KErrMemory Not enough memory
+     */
+    static IMPORT_C CFlexPeriodic* NewL( TInt aPriority );
+
+    /**
+     * Destructor for the object.
+     */
+    virtual IMPORT_C ~CFlexPeriodic();
+
+    /**
+     * Starts the periodic timer. After the timer has been started, it first
+     * calls aCallBack function after the aDelay time has expired. Thereafter
+     * the aCallBack function is called periodically after anInterval from the
+     * previous expiry has elapsed. All the expirations happen within timing
+     * tolerancies indicated by the flexibility windows. The flexibility
+     * window sizes are set with a Configure-function. The Configure needs to
+     * be called before Starting the periodic timer. 32-bit delay and interval
+     * values.
+
+     * @param aDelay is the initial delay between this Start-function and the
+     * first timer expiry. This value presents the maximum delay - flexibility
+     * is applied to a time window opening prior to this.
+     * @param anInterval is the size of the intervals after the initial delay.
+     * This value presents the maximum interval - flexibility is applied to
+     * a time window opening prior to this. Interval must be at least one 
+     * microsecond.
+     * @param aCallBack is a reference to a function that is executed at each
+     * expiry of the timer. NULL call back function reference is prohibited.
+     * @param aCallBackError optional, but recommended parameter is a 
+     * reference to a function that is executed if error occurs somewhere 
+     * in FlexTimer system (e.g. memory allocation failed). 
+     * If user does not provide this argument and error occurs, client 
+     * is paniced. Recommended action in case of error is to hold back all 
+     * actions for a while and give system some time to recover and free 
+     * resources.
+     *
+     * @panic CFlexPeriodic  6 aDelay is negative
+     * @panic CFlexPeriodic  7 aInterval is zero or negative
+     * @panic CFlexPeriodic 31 aCallBack.iFunction is NULL
+     * @panic RFlexTimer    15 Start() has been called twice without 
+     * cancelling the timer first
+     *
+     * @see Configure
+     */
+    IMPORT_C void Start( TTimeIntervalMicroSeconds32 aDelay,
+                         TTimeIntervalMicroSeconds32 anInterval,
+                         TCallBack aCallBack,
+                         TCallBack aCallBackError = TCallBack() );
+    
+    /**
+     * This function overloads the Start-function with 64-bit delay and
+     * interval values.
+     *
+     * @param aDelay is the initial delay between this Start-function and the
+     * first timer expiry. This value presents the maximum delay - flexibility
+     * is applied to a time window opening prior to this.
+     * @param anInterval is the size of the intervals after the initial delay.
+     * This value presents the maximum interval - flexibility is applied to
+     * a time window opening prior to this. Interval must be at least one 
+     * microsecond.
+     * @param aCallBack is a reference to a function that is executed at each
+     * expiry of the timer. NULL call back function reference is prohibited.
+     * @param aCallBackError optional, but recommended parameter is a 
+     * reference to a function that is executed if error occurs somewhere 
+     * in FlexTimer system (e.g. memory allocation failed). 
+     * If user does not provide this argument and error occurs, client 
+     * is paniced. Recommended action in case of error is to hold back all 
+     * actions for a while and give system some time to recover and free 
+     * resources.
+     *
+     * @panic CFlexPeriodic  6 aDelay is negative
+     * @panic CFlexPeriodic  7 aInterval is zero or negative
+     * @panic CFlexPeriodic 31 aCallBack.iFunction is NULL
+     * @panic RFlexTimer    15 Start() has been called twice without 
+     * cancelling the timer first
+     * @panic RFlexTimer    24 aDelay or aInterval is too long (over 730 days)
+     *
+     * @see Configure
+     */
+    IMPORT_C void Start( TTimeIntervalMicroSeconds aDelay,
+                         TTimeIntervalMicroSeconds anInterval,
+                         TCallBack aCallBack,
+                         TCallBack aCallBackError = TCallBack() );
+
+    /**
+     * Sets the window sizes inside which the timer can expire. Must be called
+     * before timer is started. If configure is called after the timer has
+     * been Started, this function returns an error code.
+     * 
+     * The window sizes set with this function override the default window
+     * sizes. @see RFlexTimer::Configure
+     *
+     * @param aDelayWindow is the flexibility window size in 32-bit
+     * microseconds for the initial delay.
+     * @param aIntervalWindow is the flexibility window size in 32-bit
+     * microseconds for the intervals after the initial delay.
+     *
+     * @return KErrNone on success. KErrInUse, if timer has been
+     * started already. In case of error, the window sizes not established
+     * into the timer and need to be configured again.
+     *
+     * @panic CFlexPeriodic  8 aDelayWindow is negative
+     * @panic CFlexPeriodic  9 aIntervalWindow is negative
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds32 aDelayWindow,
+                             TTimeIntervalMicroSeconds32 aIntervalWindow );
+
+    /**
+     * This function overloads the Configure-function with 64-bit parameters.
+     *
+     * @param aDelayWindow is the flexibility window size in 64-bit 
+     * microseconds for the initial delay.
+     * @param aIntervalWindow is the flexibility window size in 64-bit
+     * microseconds for the intervals after the initial delay.
+     *
+     * @return KErrNone on success. KErrInUse, if timer has been
+     * started already. In case of error, the window sizes not established
+     * into the timer and need to be configured again.
+     *
+     * @panic CFlexPeriodic  8 aDelayWindow is negative
+     * @panic CFlexPeriodic  9 aIntervalWindow is negative
+     * @panic RFlexTimer    24 aDelayWindow or aIntervalWindow is too long 
+     * (over 730 days)
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds aDelayWindow,
+                             TTimeIntervalMicroSeconds aIntervalWindow );
+
+protected:
+
+    /**
+     * Inherited from CActive.
+     */
+    virtual void RunL();
+    
+private:
+
+    /**
+     * Constructs the object. The second phase of the construction.
+     */
+    void ConstructL();
+
+    /**
+     * Private constructor for the object.
+     * @param aPriority The priority of the active object. If timing is
+     * critical, it should be higher than that of all other active objects
+     * owned by the scheduler.
+     */
+    CFlexPeriodic( TInt aPriority );
+
+private:
+    
+    /**
+     * No definition. This function is not to be used through CFlexPeriodic.
+     * @see CFlexTimer
+     */
+    void After( TTimeIntervalMicroSeconds32 aInterval );
+    
+    /**
+     * No definition. This function is not to be used through CFlexPeriodic.
+     * @see CFlexTimer
+     */
+    void After( TTimeIntervalMicroSeconds aInterval );
+
+    /**
+     * No definition. This function is not to be used through CFlexPeriodic.
+     * @see CFlexTimer
+     */
+    void At( const TTime& aTime );
+
+    /**
+     * No definition. This function is not to be used through CFlexPeriodic.
+     * @see CFlexTimer
+     */
+    void AtUTC( const TTime& aTime );
+    
+    /**
+     * No definition. This function is not to be used through CFlexPeriodic.
+     * @see CFlexTimer
+     */
+    TInt Configure( TTimeIntervalMicroSeconds32 aWindowSize );
+
+    /**
+     * Interval value that is used after the initial delay.
+     */
+    TTimeIntervalMicroSeconds iInterval;
+
+    /**
+     * Flex window size that is used after the initial delay.
+     */
+    TTimeIntervalMicroSeconds iIntervalWindow;
+
+    /**
+     * The callback function which is called at the completion of
+     * flextimer server requests.
+     */
+    TCallBack iCallBack;
+    
+    /**
+     * The callback function which is called if error accurs
+     * somewhere in FlexTimerSystem. i.e. Error code is returned
+     * to RunL.
+     */
+    TCallBack iCallBackError;
+    
+    /**
+     * This member stores information, whether the interval configuration
+     * should be sent to the server or not.
+     */
+    TBool   iSendConfigure;
+
+    };
+
+#endif /* CFLEXPERIODIC_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/flextimer_api/inc/flextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,363 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  CFlexTimer class for Flexible Timer server access.
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CFLEXTIMER_H
+#define CFLEXTIMER_H
+
+// INCLUDE FILES
+#include <e32base.h> 
+#include "rflextimer.h"
+
+// CLASS DECLARATION
+/**
+ *  Class providing access to flexible timer service.
+ *  This class uses RFlexTimer to provide user with timeout services. Each
+ *  timeout that is requested with this class has a time window during which
+ *  it may expire. The size of this window needs to be configured by the user.
+ *  If not configured, a default window size is used. See RFlexTimer for 
+ *  details about default window. 
+ *  
+ *  This class can not be instantiated; it needs to be inherited by a
+ *  user's derived class. The user also needs to implement the RunL
+ *  function.
+ *  
+ *  The timer returns one of the following values for TRequestStatus or any
+ *  other system-wide error codes:
+ *  
+ *  <table border=1 bordercolor="#84B0C7" cellspacing="0" align="center">
+ *  <tr>
+ *      <th>Return value</th>
+ *      <th>Description</th>
+ *      <th>@c At()</th>
+ *      <th>@c AtUTC()</th>
+ *      <th>@c After()</th>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrNone</td>
+ *      <td>Timer has expired normally</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>  
+ *      <td align="center">X</td>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrCancel</td>
+ *      <td>Timer has been cancelled</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrAbort</td>
+ *      <td>Timer has been aborted due time change</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *      <td align="center">&nbsp;</td>
+ *  </tr>
+ *  </table>
+ *  
+ *  Any object derived from this class needs to connect to the flextimer
+ *  server by calling CFlexTimer::ConstructL() function before calling 
+ *  configuration or timeout functions. Otherwise any timeout function will
+ *  result in panic.
+ *
+ *  @see RFlexTimer
+ *  @see CTimer
+ *
+ *  Example:
+ *  
+ *  Class definition:
+ *  @code
+ *  class CMyNetworkServiceMonitor : public CFlexTimer
+ *      {
+ *      public: // Members
+ *
+ *          // Public two-phased constructor
+ *          static CMyNetworkServiceMonitor* NewL( 
+ *              TTimeIntervalMicroSeconds aWindow,
+ *              TTimeIntervalMicroSeconds aInterval );
+ *
+ *          // Destructor
+ *          virtual ~CMyNetworkServiceMonitor();
+ *
+ *      protected: // From CActive
+ *
+ *          // Handles an active object's request completion event
+ *          virtual void RunL();
+ *
+ *      private: // Members
+ *
+ *          // Private constructor
+ *          CMyNetworkServiceMonitor( TTimeIntervalMicroSeconds aInterval );
+ *
+ *          // Second phase constructor
+ *          void ConstructL( TTimeIntervalMicroSeconds aWindow );
+ *
+ *          // Does the network server monitoring.
+ *          // Implementation is not provided by this example.
+ *          DoNetworkServiceMonitoring();
+ *
+ *      private: // Data
+ *
+ *          TTimeIntervalMicroSeconds iInterval;
+ *      };
+ *  @endcode
+ *
+ *  Class implementation:
+ *  @code
+ *  CMyNetworkServiceMonitor::CMyNetworkServiceMonitor( TTimeIntervalMicroSeconds aInterval ) :
+ *      CFlexTimer( CActive::EPriorityStandard ),
+ *      iInterval( aInterval )
+ *      {
+ *      // Nothing to do
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor::~CMyNetworkServiceMonitor()
+ *      {
+ *      Cancel(); // DoCancel() is implemented by CFlexTimer
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::ConstructL( TTimeIntervalMicroSeconds aWindow )
+ *      {
+ *      const TTimeIntervalMicroSeconds KImmediately( 0 );
+ *
+ *      CFlexTimer::ConstructL();
+ *      CActiveScheduler::Add( this );
+ *
+ *      Configure( aWindow );
+ *
+ *      After( KImmediately );  // Kick-off the timer
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor* CMyNetworkServiceMonitor::NewL(
+ *      TTimeIntervalMicroSeconds aWindow,
+ *      TTimeIntervalMicroSeconds aInterval   )
+ *      {
+ *      CMyNetworkServiceMonitor* self =
+ *          new (ELeave) CMyNetworkServiceMonitor( aInterval );
+ *      CleanupStack::PushL( self );
+ *      self->ConstructL( aWindow );
+ *      CleanupStack::Pop( self );
+ *      return self;
+ *      }
+ *
+ *  // ---------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::RunL()
+ *      {
+ *      // Note! If used RFlexTimer::At() or RFlexTimer::AtUTC()
+ *      // iStatus == KErrAbort should also be handled.
+ *    
+ *      if ( iStatus == KErrNone )
+ *          {
+ *          // Do the network server monitor actions
+ *          DoNetworkServiceMonitoring();
+ *
+ *          // Refresh the timer
+ *          After( iInterval );
+ *          }
+ *      else if ( iStatus == KErrCancel )
+ *          {
+ *          // Timer was cancelled. Do not activate it again... 
+ *          }
+ *      else
+ *          {
+ *          // Handle the error by implementing RunError()
+ *          // See also: CActive::RunError()
+ *          User::Leave( iStatus );
+ *          }
+ *      }
+ *  @endcode
+ */
+class CFlexTimer : public CActive
+    {
+public:
+
+    /**
+     * Destructs the object.
+     */
+    IMPORT_C virtual ~CFlexTimer();
+
+    /**
+     * Fire timer at latest on the given interval. 32-bit interval value.
+     * @param aInterval the interval value until which the timer must expire.
+     * 
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer  1 aInterval is negative
+     *
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds32 KInterval32( 600000000 ); // 10 min
+     *      After( KInterval32 );
+     * @endcode
+     */
+    IMPORT_C void After( TTimeIntervalMicroSeconds32 aInterval );
+    
+    /**
+     * Fire timer at latest on the given interval. 64-bit interval value.
+     *
+     * @param aInterval the interval value until which the timer must expire.
+     * 
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer  1 aInterval is negative
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aInterval is too big (over 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds KInterval64( 600000000 ); // 10 min
+     *      After( KInterval64 );
+     * @endcode
+     */
+    IMPORT_C void After( TTimeIntervalMicroSeconds aInterval );
+
+    /**
+     * Fire timer at latest by the given time value. The time value provided
+     * here is related to HomeTime. @see TTime. If the system
+     * time changes before the timer requested with At-function expires, it
+     * will cancel itself. This will result in the aStatus argument to have
+     * KErrAbort-value.
+     *
+     * @param aTime indicates the latest time when this timer should be fired.
+     *
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer 3  aTime is in the past
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aTime is too far to the future (over 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMinutes KWaitTime( 5 );
+     *
+     *      TTime now;
+     *      now.HomeTime();
+     *
+     *      At( nowUtc + KWaitTime );
+     * @endcode
+     */
+    IMPORT_C void At( const TTime& aTime );
+
+    /**
+     * Fire timer at latest by the given UTC (Coordinated Universal Time)
+     * time value. If the system
+     * time changes before the timer requested with At-function expires, it
+     * will cancel itself. This will result in the aStatus argument to have
+     * KErrAbort-value.
+     * @param aTime indicates the latest UTC time when this timer should be
+     * fired. 
+     *
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer 3  aTime is in the past
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aTime is too far to the future (over 730 days)
+     *
+     * Example:
+     * @code
+     *      const TTimeIntervalMinutes KWaitTime( 5 );
+     *
+     *      TTime nowUtc;
+     *      nowUtc.UniversalTime();
+     *
+     *      AtUTC( nowUtc + KWaitTime );
+     * @endcode
+     */
+    IMPORT_C void AtUTC( const TTime& aTime );
+
+    /**
+     * Sets the window size in which flexibility is possible for the timer.
+     * @see RFlexTimer::Configure
+     * @param aWindowSize is the window size in 32-bit microseconds in which
+     * timer flexiblity is possible.
+     * @return KErrNone on success. KErrInUse, if timer has been
+     * started already.
+     *
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer 5  aWindowSize is negative
+     * 
+     * Example:
+     * @code
+     *     const TTimeIntervalMicroSeconds32 KWindow32( 120000000 ); // 2 mins
+     *     Configure( KWindow32 );
+     * @endcode
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds32 aWindowSize );
+    
+    /**
+     * Sets the window size in which flexibility is possible for the timer.
+     * @see RFlexTimer::Configure
+     * @param aWindowSize is the window size in 64-bit microseconds in which
+     * timer flexiblity is possible.
+     * @return KErrNone on success. KErrInUse, if timer has been
+     * started already.
+     *
+     * @panic CFlexTimer 10 CFlexTimer::ConstructL() has not been called yet
+     * @panic RFlexTimer 5  aWindowSize is negative
+     * @panic RFlexTimer 24 aWindowSize is too big (max 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds KWindow64( 120000000 ); // 2 mins
+     *      Configure( KWindow64 );
+     * @endcode
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds aWindowSize );
+
+protected:
+    
+    /**
+     * 2nd phase constructor for this the object. Connects to the flextimer
+     * server and creates a session. This function needs to be called by the
+     * object that is derived from this class.
+     */
+    IMPORT_C void ConstructL();
+
+    /**
+     * Constructs the object.
+     */
+    IMPORT_C CFlexTimer( TInt aPriority );
+
+    /**
+     * Inherited from CActive.
+     */
+    IMPORT_C virtual void DoCancel();
+
+private:
+
+    /**
+     * The timer resource used by this object.
+     */
+    RFlexTimer iTimer;
+
+    };
+
+#endif // CFLEXTIMER_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/flextimer_api/inc/rflextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,594 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  RFlexTimer class for Flexible Timer server access.
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef RFLEXTIMER_H
+#define RFLEXTIMER_H
+
+// INCLUDE FILES
+#include <e32std.h> 
+
+// CLASS DECLARATION
+/**
+ *  Resource class providing access to flexible timer server.
+ *  
+ *  This timer class is in many ways similar to RTimer in its use. The
+ *  main difference is the option to set a timer expiry window. When the timer
+ *  expiry window has been set to a value greater than zero, requested
+ *  timeouts may expire at any point of time inside this window. This timer
+ *  should be used for timed air-interface operations, such as keep-alive
+ *  messages. The use of normal timers is recommended if the timeouts are not
+ *  related to data transmission or reception activity in the device.
+ *  
+ *  The purpose for a flexible timer is to allow the system the opportunity to
+ *  align timed behaviour that uses radio resources. For example, when a
+ *  radio device is otherwise in an idle state, simple keep-alive messaging
+ *  can be grouped together so that all traffic happens in single bursts
+ *  instead of being distributed evenly along time timeline. This maximises
+ *  radio idle time and therefore also battery lifetime.
+ *  
+ *  This class defines a client interface for flexible timer server
+ *  (CFlexTimerServer). When a user requests timeout with RFlexTimer, the
+ *  server will expire the request non-deterministically within an time window
+ *  configured by the user. Timer resolution is one second.
+ *  
+ *  The timer returns one of the following values for TRequestStatus or any
+ *  other system-wide error codes:
+ *  
+ *  <table border=1 bordercolor="#84B0C7" cellspacing="0" align="center">
+ *  <tr>
+ *      <th>Return value</th>
+ *      <th>Description</th>
+ *      <th>@c At()</th>
+ *      <th>@c AtUTC()</th>
+ *      <th>@c After()</th>
+ *      <th>@c AfterTicks()</th>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrNone</td>
+ *      <td>Timer has expired normally</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>  
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrCancel</td>
+ *      <td>Timer has been cancelled by @c Cancel()</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *  </tr>
+ *  <tr>
+ *      <td>@c KErrAbort</td>
+ *      <td>Timer has been aborted due time change</td>
+ *      <td align="center">X</td>
+ *      <td align="center">X</td>
+ *      <td align="center">&nbsp;</td>
+ *      <td align="center">&nbsp;</td>
+ *  </tr>
+ *  </table>
+ *  
+ *  Example: A user uses Configure-function to set the timer window to
+ *  2,000,000 microseconds. Next the user requests a timeout with an interval
+ *  value of 3,000,000 microseconds. Now the timer may expire at any moment
+ *  after 1,000,000 microseconds and at latest after 3,000,000 microseconds
+ *  (+ possible timer inaccuracy (timer resolution) ) has passed from the 
+ *  timeout request. 
+ *
+ *  Passing a negative timer interval value or a past time instant 
+ *  to timer functions will cause a panic . Restarting a timer that is already
+ *  running will cause panic. Cancel must be used before starting timer again.
+ *
+ *  @see CFlexTimer
+ *  @see CFlexPeriodic
+ *  @see RTimer
+ *
+ *  Examples:
+ *
+ *  Synchronous usage of RFlexTimer:
+ *  @code
+ *      const TTimeIntervalMicroSeconds KInterval( 900000000 ); // 15 mins
+ *      const TTimeIntervalMicroSeconds KWindow( 300000000 ); // 5 mins
+ *
+ *      TRequestStatus status;
+ *
+ *      RFlexTimer timer;
+ *      User::LeaveIfError( timer.Connect() );
+ *
+ *      timer.Configure( KWindow );
+ *      timer.After( status, KInterval );
+ *
+ *      User::WaitForRequest( status );     // Wait till the timer expires
+ *
+ *      // Check the request's status
+ *      if ( status == KErrNone )
+ *          {
+ *          // Timer was expired ok
+ *          }
+ *      else if ( status == KErrAborted )
+ *          {
+ *          // Only for At() and AtUTC()
+ *          // Timer was aborted by time change
+ *          }
+ *      else if ( status == KErrCancel )
+ *          {
+ *          // timer.Cancel() was called while the timer was active
+ *          }
+ *      else
+ *          {
+ *          // Some other error has happened
+ *          }
+ *          .
+ *          .
+ *          .
+ *      timer.Close();
+ *  @endcode
+ *
+ *  Asynchronous usage of RFlexTimer (consider using CFlexTimer or 
+ *  CFlexPeriodic instead of own implementation):
+ *  
+ *  Class definition
+ *  @code
+ *      class CMyNetworkServiceMonitor : public CActive
+ *      {
+ *      public: // Members
+ *
+ *          // Public two-phased constructor
+ *          static CMyNetworkServiceMonitor* NewL(
+ *              TTimeIntervalMicroSeconds aWindow,
+ *              TTimeIntervalMicroSeconds aInterval );
+ *
+ *          // Destructor
+ *          virtual ~CMyNetworkServiceMonitor();
+ *
+ *      protected: // From CActive
+ *
+ *          // Cancel outstanding request. Called by CActive::Cancel().
+ *          virtual void DoCancel();
+ *
+ *          // Handle request completion event  
+ *          virtual void RunL();
+ *      
+ *      private: // Members
+ *
+ *          // Constructor
+ *          CMyNetworkServiceMonitor( TTimeIntervalMicroSeconds aInterval );
+ *
+ *          // Second phase constructor
+ *          void ConstructL( TTimeIntervalMicroSeconds aWindow );
+ *
+ *          // Does the network server monitoring.
+ *          // Implementation is not provided by this example.
+ *          void DoNetworkServiceMonitoring();
+ *      
+ *      private: // Data
+ *          RFlexTimer iTimer;
+ *          TTimeIntervalMicroSeconds iInterval;
+ *      };
+ *  @endcode
+ *
+ *  @code
+ *  CMyNetworkServiceMonitor::CMyNetworkServiceMonitor( 
+ *      TTimeIntervalMicroSeconds aInterval ):
+ *      CActive( CActive::EPriorityStandard ),
+ *      iInterval( aInterval )
+ *      {
+ *      // Nothing to do
+ *      } 
+ *
+ *  // -----------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::ConstructL( 
+ *      TTimeIntervalMicroSeconds aWindow )
+ *      {
+ *      User::LeaveIfError( iTimer.Connect() );
+ *      iTimer.Configure( aWindow );
+ *      }
+ *
+ *  // -----------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor* CMyNetworkServiceMonitor::NewL( 
+ *      TTimeIntervalMicroSeconds aWindow,
+ *      TTimeIntervalMicroSeconds aInterval )
+ *      {
+ *      CMyNetworkServerMonitor* self =
+ *          new (ELeave) CMyNetworkServerMonitor( aInterval );
+ *      CleanupStack::PushL( self );
+ *      self->ConstructL( aWindow );
+ *      CleanupStack::Pop( self );
+ *
+ *      iTimer.After( TTimeIntervalMicroSeconds( 0 ) );
+ *      SetActive();
+ *
+ *      return self;
+ *      }
+ *
+ *  // -----------------------------------------------------------------------------
+ *  //
+ *  CMyNetworkServiceMonitor::~CMyNetworkServiceMonitor()
+ *      {
+ *      Cancel();       // Calls CActive::Cancel()
+ *      iTimer.Close(); // Close the timer handle
+ *      }
+ *      
+ *  // -----------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::DoCancel()
+ *      {
+ *      iTimer.Cancel();
+ *      }
+ *
+ *  // -----------------------------------------------------------------------------
+ *  //
+ *  void CMyNetworkServiceMonitor::RunL()
+ *      {
+ *      // Note! If used RFlexTimer::At() or RFlexTimer::AtUTC()
+ *      // iStatus == KErrAbort should also be handled.
+ *      
+ *      if ( iStatus == KErrNone )
+ *          {
+ *          // Do the network server monitor actions
+ *          DoNetworkServiceMonitoring();
+ *
+ *           // Refresh the timer
+ *          iTimer.After( iInterval );
+ *          SetActive();
+ *          }
+ *      else if ( iStatus == KErrCancel )
+ *          {
+ *          // Timer was cancelled. Do not activate it again... 
+ *          }
+ *      else
+ *          {
+ *          // Handle the error by implementing RunError()
+ *          // See also: CActive::RunError()
+ *          User::Leave( iStatus );
+ *          }
+ *      }
+ *  @endcode
+ */
+class RFlexTimer : public RSessionBase
+    {
+public:
+    // Constructors and destructors
+
+    /**
+     * Constructs the object.
+     */
+    IMPORT_C RFlexTimer();
+
+    /**
+     * Destructs the object.
+     */
+    IMPORT_C ~RFlexTimer();
+
+    /**
+     * Connects to the timer server. This function needs to be called before
+     * any timeouts can be requested.
+     * 
+     * @return KErrNone on success. KErrNotSupported if client's and server's
+     * versions don't match. Otherwise returns one of the system-wide error
+     * codes.
+     * @panic RFlexTimer 33 Connected is called twice without closing the
+     * handle first
+     * 
+     * Example:
+     * @code
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *          .
+     *          . // Set timer/wait for expiration.
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C TInt Connect();
+
+    /**
+     * Cancels the timer. Active timer will be completed with status 
+     * KErrCancel. If there are no active timer, Cancel() does nothing.
+     * 
+     * @panic KERN-EXEC 0 Cancel() was called before Connect()
+     * 
+     * Example:
+     * @code
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *          .
+     *          .
+     *          .
+     *      // Oops, no need to wait the timer expiration
+     *      timer.Cancel(); // Cancel the pending timer    
+     *          .
+     *          .
+     *          .  
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C void Cancel();
+
+    /**
+     * An asynchronous timeout request to the flexible timer server.
+     * Fire timer at latest on the given 32-bit interval.
+     * 
+     * @param aStatus active object to be used for getting responses.	
+     * @param aInterval the interval value until which the timer must expire.
+     * 
+     * @panic RFlexTimer 1  aInterval is negative
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     *
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds32 KInterval32( 300000000 ); // 5 mins  
+     *      const TTimeIntervalMicroSeconds32 KWindow32( 120000000 ); // 2 mins  
+     *      
+     *      TRequestStatus status;
+     *      RFlexTimer timer;
+     *      
+     *      User:LeaveIfError( timer.Connect() );
+     *      timer.Configure( KWindow32 );
+     *      timer.After( status, KInterval32 );
+     *      
+     *      User::WaitForRequest( status ); // Wait timer to expire, synchronous
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode 
+     */
+    IMPORT_C void After( TRequestStatus& aStatus,
+                         TTimeIntervalMicroSeconds32 aInterval );
+    
+    /**
+     * An asynchronous timeout request to the flexible timer server.
+     * Fire timer at latest on the given 64-bit interval.
+     * @param aStatus active object to be used for getting responses.   
+     * @param aInterval the interval value until which the timer must expire.   
+     * @panic RFlexTimer 1  aInterval is negative
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aInterval is too big (max 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds KInterval64( 300000000 ); // 5 mins
+     *
+     *      TRequestStatus status;
+     *      RFlexTimer timer;
+     *      
+     *      User::LeaveIfError( timer.Connect() );
+     *      timer.After( status, KInterval64 );
+     *      
+     *      User::WaitForRequest( status ); // Wait timer to expire, synchronous
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C void After( TRequestStatus& aStatus,
+                         TTimeIntervalMicroSeconds aInterval );
+
+    /**
+     * An asynchronous timeout request to the flexible timer server.
+     * Fire timer at latest after the given number of system ticks.
+     * 
+     * By default the system tick is 1/64 second. The exact value for one
+     * system tick can be retrieve via Symbian OS HAL API:
+     * 
+     * @code
+     *      TInt tickInMicroSeconds;
+     *      HAL::Get( HAL::ESystemTickPeriod, tickInMicroSeconds );
+     * @endcode
+     * 
+     * @param aStatus active object to be used for getting responses.
+     * @param aTicks the interval value until which the timer must expire. 	
+     * @panic RFlexTimer 2  aTicks is negative
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * 
+     * Example:
+     * @code
+     *      const TInt KIntervalInTicks( 57600 ); // 15 mins (1 tick = 15625 microseconds)
+     *
+     *      TRequestStatus status;
+     *      RFlexTimer timer;
+     *      
+     *      User::LeaveIfError( timer.Connect() );
+     *      timer.AfterTicks( status, KIntervalInTicks );
+     *      
+     *      User::WaitForRequest( status ); // Wait timer to expire, synchronous
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C void AfterTicks( TRequestStatus& aStatus, TInt aTicks );
+
+    /**
+     * An asynchronous timeout request to the flexible timer server.
+     * Fire timer between at latest by the given time value. If the system
+     * time changes before the timer requested with At-function expires, it
+     * will cancel itself. This will result in the aStatus argument to have
+     * KErrAbort-value.
+     * @param aStatus active object to be used for getting responses.
+     * @param aTime indicates the latest system-time when this timer should
+     * be fired.
+     * @panic RFlexTimer 3  aTime is in the past
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aTime is too far in the future (max 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMinutes KWaitTime( 5 );
+     *      
+     *      TRequestStatus status;
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *      
+     *      TTime now;
+     *      now.HomeTime();
+     *
+     *      timer.At( status, now + KWaitTime );
+     *      
+     *      User::WaitForRequest( status ); // Wait timer to expire, synchronous
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C void At( TRequestStatus& aStatus, const TTime& aTime );
+
+    /**
+     * An asynchronous timeout request to the flexible timer server.
+     * Fire timer between at latest by the given UTC (Coordinated Universal
+     * Time) time value. If the system time changes before the timer requested
+     * with AtUTC-function expires, it will cancel itself. This will result in
+     * the aStatus argument to have KErrAbort-value.
+     * @param aStatus active object to be used for getting responses.
+     * @param aTime indicates the latest UTC time when this timer should be
+     * fired. 
+     * @panic RFlexTimer 4  aTime is in the past
+     * @panic RFlexTimer 15 Timer is already active. Wait it to expire or
+     * cancel it first.
+     * @panic RFlexTimer 24 aTime is too far in the future (max 730 days)
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMinutes KWaitTime( 5 );
+     *
+     *      TRequestStatus status;
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *
+     *      TTime nowUtc;
+     *      nowUtc.UniversalTime();
+     *
+     *      timer.At( status, nowUtc + KWaitTime );
+     *
+     *      User::WaitForRequest( status ); // Wait timer to expire, synchronous
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C void AtUTC( TRequestStatus& aStatus, const TTime& aTime );
+
+    /**
+     * Sets the window size in which alignment is possible for the timer.
+     * This is a synchronous command - it will return only after the server
+     * has completed the configuration message. If the timer is already
+     * running, it will return KErrInUse.
+     * 
+     * If user is not calling this function in prior to start timer, default
+     * value will be used as time window. Default value is currently 20%
+     * of total timer running time 
+     * (0.2 * (requested_expiry_time - current_time)) and this value is in 
+     * subject to change.
+     * 
+	 * If the user wishes to restore the default window size behaviour,
+     * a new timer is needed. 
+	 *
+     * Giving zero value as aWindowSize parameter, means that timer is fired
+     * precisely at requested time.
+	 *
+     * @param aWindowSize is the window size in 32-bit microseconds in which
+     * alignment is possible.
+     *
+     * @return KErrNone on success, KErrInUse if timer is set (wait it to be
+     * expired or cancel it before configuring). Otherwise returns one of the 
+     * system-wide error codes.
+     *
+     * @panic RFlexTimer 5  aWindowSize is negative
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds32 KWindow32( 120000000 ); // 2 mins
+     *
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *      
+     *      timer.Configure( KWindow32 );
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds32 aWindowSize );
+    
+    /**
+     * This function overloads the Configure-function with 64-bit parameters.
+     * 
+     * @param aWindowSize is the window size in 64-bit microseconds in which
+     * alignment is possible.
+     * 
+     * @return KErrNone on success, KErrInUse if timer is set, wait it to 
+     * expire or cancel it before configuring. Otherwise returns one of the 
+     * system-wide error codes.
+     * 
+     * @panic RFlexTimer 5  aWindowSize is negative
+     * @panic RFlexTimer 24 aWindowSize is too big (max 730 days)
+     * 
+     * @see TInt Configure( TTimeIntervalMicroSeconds32 )
+     * 
+     * Example:
+     * @code
+     *      const TTimeIntervalMicroSeconds KWindow64( 120000000 ); // 2 mins
+     *
+     *      RFlexTimer timer;
+     *      User::LeaveIfError( timer.Connect() );
+     *      
+     *      timer.Configure( KWindow64 );
+     *          .
+     *          .
+     *          .
+     *      timer.Close();  // Close the handle
+     * @endcode
+     */
+    IMPORT_C TInt Configure( TTimeIntervalMicroSeconds aWindowSize );
+
+private:
+    
+    /**
+     * Gets the version number.
+     * @return The version.
+     */
+    TVersion Version() const;
+
+    /**
+     * Connects to the server. If server does not exist, it is created.
+     * @return KErrNone on success. Otherwise returns one of the system-wide
+     * error codes.
+     */
+    TInt StartServer();
+
+    };
+
+#endif // RFLEXTIMER_H
+
+// End of File
--- a/ipcm_plat/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_plat/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,8 +23,8 @@
 #include "../disconnect_dialog_api/group/bld.inf"
 #include "../disconnect_dialog_disable_api/group/bld.inf"
 #include "../extended_connection_settings_api/group/bld.inf"
-#include "../mpm_default_connection_api/group/bld.inf"
 #include "../pdpcontextmanager2_reset_factory_settings_api/group/bld.inf"
 #include "../pdpcontextmanager2_settings_api/group/bld.inf"
 #include "../mpm_connect_screen_api/group/bld.inf"
-
+#include "../flextimer_api/group/bld.inf"
+#include "../mpm_vpn_toggle_api/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/ipcm_plat.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Project file for ipcm_plat.
+#
+
+TEMPLATE = subdirs
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+
+include(connection_settings_shim_api/connection_settings_shim_api.pri)
+include(connection_settings_ui_api/connection_settings_ui_api.pri)
+include(bearer_settings_ui_plugin_api/bearer_settings_ui_plugin_api.pri)
+include(wlan_security_settings_ui_plugin_api/wlan_security_settings_ui_plugin_api.pri)
+
+for(filename,PLATFORM_HEADERS){
+    BLD_INF_RULES.prj_exports *= "$$filename MW_LAYER_PLATFORM_EXPORT_PATH($$basename(filename))"
+  }
--- a/ipcm_plat/mpm_default_connection_api/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build info for MPM Default Connection API.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/rmpmdefaultconnection.h     MW_LAYER_PLATFORM_EXPORT_PATH(rmpmdefaultconnection.h)
-
-
--- a/ipcm_plat/mpm_default_connection_api/inc/rmpmdefaultconnection.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +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:  Client interface to MPM Default Connection server
-*
-*/
-
-#ifndef RMPMDEFAULTCONNECTION_H
-#define RMPMDEFAULTCONNECTION_H
-
-#include <e32std.h>
-
-/**
- *  Cleant API for MPM Default Connection server
- *  services.
- *
- *  Enables registering IAP to be used as default connection. 
- *  Only one client may be connected at a time 
- *  @code
- *  RMPMDefaultConnection rmpmdc;
- *  TInt err = KErrNone;
- *  //connect and set default IAP
- *  err = rmpmdc.Connect();
- *  err = rmpmdc.SetDefaultIAP( iapId );
- *
- *  //when IAP no longer used as default
- *  err = rmpmdc.ClearDefaultIAP();
- *  rmpmdc.Close();
- *  @endcode
- *
- *  @lib mpmdefaultconnection.dll
- *  @since S60 v3.2
- */
-class RMPMDefaultConnection : public RSessionBase
-    {
-
-public:
-
-    /**
-     * Constructor.
-     *
-     * @since S60 v3.2
-     */
-    inline RMPMDefaultConnection() : RSessionBase(), 
-    iClientConnected( EFalse )
-    {};
-
-    /**
-     * Creates connection to server
-     *
-     * @since S60 v3.2
-     * @return KErrNone if successful, otherwise one of the
-     * system-wide error codes
-     */
-    IMPORT_C TInt Connect();
-
-    /**
-     * Closes connection to server
-     * If IAP has been registered by the client it is also deregistered here
-     *
-     * @since S60 v3.2
-     */
-    IMPORT_C void Close();
-
-    /**
-     * Sets IAP to be used as default connection
-     *
-     * @since S60 v3.2
-     * @param aIapId CommsDat record id of the IAP
-     * @return KErrNone if successful, otherwise one of the
-     * system-wide error codes
-     */
-    IMPORT_C TInt SetDefaultIAP( TInt aIapId );
-
-
-    /**
-     * Clears IAP from being used as default connection
-     *
-     * @since S60 v3.2
-     * @param aIapId CommsDat record id of the IAP
-     * @return KErrNone if successful, otherwise one of the
-     * system-wide error codes
-     */
-    IMPORT_C TInt ClearDefaultIAP();
-    
-    /**
-     * Returns MPM Default Connection server version.
-     * @since 3.2
-     * @return Version of the MPM Default Connection server
-     */
-     IMPORT_C TVersion Version() const;
-    
-private: // data
-
-    /**
-     * Is client connected to server or not
-     */
-     TBool iClientConnected;    
-
-    };
-
-#endif // RMPMDEFAULTCONNECTION_H
--- a/ipcm_plat/mpm_default_connection_api/mpm_default_connection_api.metaxml	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="b2e86b78ef2622115024f5670a07a915" dataversion="1.0">
-  <name>MPM Default Connection API</name>
-  <description>Used by an Active Idle plugin for setting default IAP (in practice a WLAN IAP that has earlier been started explicitly by the Active Idle plugin itself)</description>
-  <type>c++</type>
-  <subsystem>bearermanagement</subsystem>
-  <libs>
-    <lib name="mpmdefaultconnection.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>yes</htmldocprovided>
-     <adaptation>no</adaptation>
-  </attributes>
-</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/mpm_vpn_toggle_api/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Used to export api headers.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/mpmvpntoggleapi.h     MW_LAYER_PLATFORM_EXPORT_PATH(mpmvpntoggleapi.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/mpm_vpn_toggle_api/inc/mpmvpntoggleapi.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Defines central repository key for VPN toggle
+*
+*/
+
+#ifndef MPMVPNTOGGLEAPI_H
+#define MPMVPNTOGGLEAPI_H
+
+/**
+ * The UID of the repository to be accessed.
+ */
+const TUid KMpmVpnToggleCenRepUid = {0x20016A88}; 
+
+/**
+ * This key contains value, which defines if VPN connection is preferred
+ * connection. Client can set this value if it has WriteDeviceData and
+ * NetworkControl capabilities.
+ */
+const TUint32 KMpmVpnTogglePreferVpn = 0x00000001;
+
+/**
+ * This key contains VPN IAP Id value for VPN IAP which is used to establish
+ * VPN connection, when VPN connection is preferred. Client can set this value
+ * if it has WriteDeviceData and NetworkControl capabilities. TUint32 value
+ * needs to be converted from TInt.
+ */
+const TUint32 KMpmVpnToggleIapId = 0x00000002;
+
+/**
+ * This key contains SNAP Id value SNAP which is used to establish VPN
+ * connection, when VPN connection is preferred. Client can set this value
+ * if it has WriteDeviceData and NetworkControl capabilities. TUint32 value
+ * needs to be converted from TInt.
+ */
+const TUint32 KMpmVpnToggleSnapId = 0x00000003;
+
+#endif // MPMVPNTOGGLEAPI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/mpm_vpn_toggle_api/mpm_vpn_toggle_api.metaxml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="1d6087f5136e401d3622dd9952b7da47" dataversion="2.0">
+  <name>mpm_vpn_toggle_api</name>
+  <description>Provides API to set/get VPN connection preferred value, which defines whether VPN connection is preferred connection. VPN IAP Id or Intranet SNAP Id needs to be also defined, when VPN connection is preferred connection. VPN IAP Id or Intranet SNAP Id needs to be defined, if VPN connection is preferred.</description>
+  <type>c++</type>
+  <collection>mpm_vpn_toggle_api</collection>
+  <libs>
+    <lib name="centralrepository.lib"/>
+  </libs>
+  <release category="platform" sinceversion=""/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/wlan_security_settings_ui_plugin_api/inc/cpwlansecurityplugininterface.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   Control Panel plugin interface for WLAN security settings plugins.
+*
+*/
+
+#ifndef CPWLANSECURITYPLUGININTERFACE_H
+#define CPWLANSECURITYPLUGININTERFACE_H
+
+// System includes
+#include <QtPlugin>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class CmConnectionMethodShim;
+class CpSettingFormItemData;
+class CpItemDataHelper;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*!
+    \class CpWlanSecurityPluginInterface
+    \brief This class is an interface for WLAN security settings plugins
+           which can be displayed in Control Panel application.
+           
+    Plugin stubs must be located in
+    /resource/qt/plugins/controlpanel/wlansecurity directory.
+ */
+
+class CpWlanSecurityPluginInterface
+{
+public:
+    /*!
+        Destructor.
+     */
+    virtual ~CpWlanSecurityPluginInterface() {}
+
+    /*!
+        Getter for security mode. Security modes are defined in Connection
+        Settings Shim WlanSecMode enum, e.g. WlanSecModeWep.
+
+        \return Security mode identifier.
+     */
+    virtual CMManagerShim::WlanSecMode securityMode() const = 0;
+    
+    /*!
+        Getter for localization text identifier for the security mode,
+        e.g. "txt_occ_setlabel_wlan_security_mode_val_wep". This localized
+        text will be shown in the UI.
+
+        \return Localization text ID.
+     */
+    virtual QString securityModeTextId() const = 0;
+
+    /*! 
+        Sets the database reference. Plugin can either use Connection
+        Settings Shim to access the settings or some other way using the
+        provided connection method ID.
+
+        \param cmConnectionMethod Pointer to CmConnectionMethodShim instance
+               which can be used for reading and writing of the settings. Not
+               owned by the plugin.
+        \param id Connection method ID.
+     */
+    virtual void setReference(
+        CmConnectionMethodShim *cmConnectionMethod,
+        uint id) = 0;
+
+    /*!
+        Getter for order number. This order number is used to put the
+        security modes in correct order in the security mode list. Security
+        mode with the lowest order number will be first and so on.
+
+        E.g. WEP = 10, 802.1X = 20, WPA = 30, WPA2 = 40, WAPI = 50
+
+        \return Order number.
+     */
+    virtual int orderNumber() const = 0;
+
+    /*!
+        Creates an UI instance ("Security settings" group with all settings
+        for the security mode). Caller owns the object. The security plugin
+        doesn't need to handle deletion of the UI instance, it will be
+        handled by the caller and Control Panel framework. Every call shall
+        create a new UI instance.
+
+        \param dataHelper Item data helper.
+        \return Pointer to an UI object.
+     */
+    virtual CpSettingFormItemData* uiInstance(
+        CpItemDataHelper &dataHelper) = 0;
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+private slots:
+
+private: // data
+
+};
+
+Q_DECLARE_INTERFACE(
+    CpWlanSecurityPluginInterface,
+    "com.nokia.plugin.controlpanel.wlansecurity.platform.interface/1.0");
+
+#endif // CPWLANSECURITYPLUGININTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipcm_plat/wlan_security_settings_ui_plugin_api/wlan_security_settings_ui_plugin_api.pri	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WLAN Security Settings UI Plugin API project include.
+#
+
+PLATFORM_HEADERS += \
+    wlan_security_settings_ui_plugin_api/inc/cpwlansecurityplugininterface.h
--- a/ipcm_pub/access_point_engine_api/inc/APAccessPointItem.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/APAccessPointItem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define ACCESSPOINTITEM_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
 
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/APDataHandler.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/APDataHandler.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define APDATAHANDLER_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/APNetworks.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/APNetworks.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define CAPNETWORKS_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/APSelect.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/APSelect.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define CAPSELECT_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/APUtils.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/APUtils.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #define APUTILS_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/ActiveApDb.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ActiveApDb.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,8 +21,7 @@
 #define ACTIVE_APDB_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
-
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
 
 //  INCLUDES
 #include <commdb.h>
--- a/ipcm_pub/access_point_engine_api/inc/ApEngineConsts.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ApEngineConsts.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define APENGINE_CONSTS_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 #include <ApEngineVer.h>
--- a/ipcm_pub/access_point_engine_api/inc/ApEngineVer.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ApEngineVer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,8 +20,7 @@
 #define APENGINE_VER_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
- 
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
 // #define     __PROXY_SETTINGS
 
--- a/ipcm_pub/access_point_engine_api/inc/ApListItem.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ApListItem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #define CAPLISTITEM_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/ApNetworkItem.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ApNetworkItem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #define CAPNETWORKITEM_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/ApNetworkItemlist.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/ApNetworkItemlist.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define CAPNETWORKITEMLIST_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_engine_api/inc/Aplistitemlist.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_engine_api/inc/Aplistitemlist.h	Tue Aug 31 15:35:44 2010 +0300
@@ -20,7 +20,7 @@
 #define CAPLISTITEMLIST_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 //  INCLUDES
--- a/ipcm_pub/access_point_settings_handler_api/inc/ApSettingsHandlerCommons.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_settings_handler_api/inc/ApSettingsHandlerCommons.h	Tue Aug 31 15:35:44 2010 +0300
@@ -21,7 +21,7 @@
 #define APSETTINGS_HANDLER_COMMONS_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 // INCLUDES
--- a/ipcm_pub/access_point_settings_handler_api/inc/Apsettingshandlerui.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/access_point_settings_handler_api/inc/Apsettingshandlerui.h	Tue Aug 31 15:35:44 2010 +0300
@@ -22,7 +22,7 @@
 #define APSETTINGS_HANDLER_H
 
 // Deprecation warning
-#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
+#warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
  
  
 // INCLUDES
--- a/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_monitor_server_api/inc/rconnmon.h	Tue Aug 31 15:35:44 2010 +0300
@@ -48,7 +48,8 @@
 /** WLAN mode, defined in TConnMonNetworkMode.
 */
 const TUint KNetworkMode = 7;
-/** WLAN connection security mode, defined in TConnMonSecurityMode.
+/** Old WLAN connection security mode, defined in TConnMonSecurityMode.
+It is recommended to use the more detailed KSecurityMode_v2 instead.
 */
 const TUint KSecurityMode = 8;
 /** Bearer information, defined in TConnMonBearerInfo.
@@ -62,6 +63,10 @@
 /** Network registration values defined in TConnMonNetworkRegistration_v2.
 */
 const TUint KNetworkRegistration_v2 = 11;
+/** WLAN connection security mode, defined in TConnMonSecurityModeV2.
+Replaces the previously used KSecurityMode attribute.
+*/
+const TUint KSecurityMode_v2 = 12;
 
 /** QoS - Not supported.
 */
@@ -509,6 +514,24 @@
     };
 
 /**
+* WLAN connection security modes in more detail.
+* New values will be added to the end of the enumeration.
+*/
+enum TConnMonSecurityModeV2
+    {
+    EConnMonSecurityV2Open      = 100,
+    EConnMonSecurityV2WepOpen   = 101,
+    EConnMonSecurityV2WepShared = 102,
+    EConnMonSecurityV2802d1x    = 103,
+    EConnMonSecurityV2Wpa       = 104,
+    EConnMonSecurityV2WpaPsk    = 105,
+    EConnMonSecurityV2Wpa2      = 106,
+    EConnMonSecurityV2Wpa2Psk   = 107,
+    EConnMonSecurityV2Wapi      = 108,
+    EConnMonSecurityV2WapiPsk   = 109
+    };
+
+/**
 * Network Modes.
 */
 enum TConnMonMobilePhoneNetworkMode
@@ -850,7 +873,7 @@
     static const TUint KWlanBssId = 6;
     /** Reserved for future use.
     */
-    static const TUint KExtraCount = 10;
+    static const TUint KExtraCount = 8;
 
     /**
     * Constructor.
@@ -874,6 +897,29 @@
     /**
     * Constructor.
     *
+    * @param aName Name (SSID) of the network.
+    * @param aConnectionMode Mode of the network.
+    * @param aSignalStrength Signal strength of the network.
+    * @param aSecurityMode Security mode of the network.
+    * @param aSecurityModeV2 More detailed security mode of the network.
+    * @param aProtectedSetupSupport Wi-Fi Protected Setup support.
+    * @param aBssId Mac address (BSSID) of the base station.
+    * @param aVendorData Not in use.
+    * @return Pointer to the created CConnMonWlanNetwork object.
+    */
+    IMPORT_C static CConnMonWlanNetwork* NewL(
+            const TBuf<KMaxNameLength>& aName,
+            TUint aConnectionMode,
+            TUint aSignalStrength,
+            TUint aSecurityMode,
+            TUint aSecurityModeV2,
+            TUint aProtectedSetupSupport,
+            const TBuf8<KWlanBssId>& aBssId,
+            const TDesC& aVendorData );
+
+    /**
+    * Constructor.
+    *
     * @return Pointer to the created empty CConnMonWlanNetwork object.
     */
     IMPORT_C static CConnMonWlanNetwork* NewL();
@@ -944,6 +990,8 @@
 
     /**
     * Obtains the security mode of the network.
+    * This method is offered for backward compatibility
+    * reasons, SecurityModeV2() should be used instead.
     *
     * @return Security mode (defined in TConnMonSecurityMode).
     */
@@ -953,6 +1001,20 @@
         }
 
     /**
+    * Obtains the more detailed security mode of the network.
+    *
+    * @return Security mode (defined in TConnMonSecurityModeV2).
+    */
+    IMPORT_C TUint SecurityModeV2();
+
+    /**
+    * Finds whether Wi-Fi Protected Setup is supported.
+    *
+    * @return ETrue if AP supports Wi-Fi Protected Setup, EFalse if not.
+    */
+    IMPORT_C TBool IsProtectedSetupSupported();
+
+    /**
     * Obtains the mac address (BSSID) of the base station.
     *
     * @return Mac address (BSSID).
@@ -1020,6 +1082,28 @@
             const TDesC& aVendorData );
 
     /**
+    * Constructor.
+    *
+    * @param aName Name (SSID) of the network.
+    * @param aConnectionMode Mode of the network.
+    * @param aSignalStrength Signal strength of the network.
+    * @param aSecurityMode Security mode of the network.
+    * @param aSecurityModeV2 More detailed security mode of the network.
+    * @param aProtectedSetupSupport Wi-Fi Protected Setup support.
+    * @param aBssId Mac address (BSSID) of the base station.
+    * @param aVendorData Not in use.
+    */
+    CConnMonWlanNetwork(
+            const TBuf<KMaxNameLength>& aName,
+            TUint aConnectionMode,
+            TUint aSignalStrength,
+            TUint aSecurityMode,
+            TUint aSecurityModeV2,
+            TUint aProtectedSetupSupport,
+            const TBuf8<KWlanBssId>& aBssId,
+            const TDesC& aVendorData );
+
+    /**
     * Second-phase constructor.
     */
     void ConstructL();
@@ -1031,6 +1115,8 @@
     TUint iSecurityMode;          // See TConnMonSecurityMode
     TBuf8<KWlanBssId> iWlanBssId; // BSSID
     HBufC* iVendorData;           // For vendor specific data
+    TUint iSecurityModeV2;        // See TConnMonSecurityModeV2
+    TUint iProtectedSetupSupport; // Wi-Fi Protected Setup support, 0 if not supported
     TUint iExtraBuf[KExtraCount]; // Reserved for future
     };
 
--- a/ipcm_pub/connection_settings_api/group/bld.inf	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,8 +11,8 @@
 *
 * Contributors:
 *
-* Description:  File that exports the files belonging to 
-:                Connection Settings API
+* Description:
+* File that exports the files belonging to Connection Settings API.
 *
 */
 
@@ -24,20 +24,17 @@
 
 PRJ_EXPORTS
 
-../inc/cmconnectionmethod.inl     MW_LAYER_PUBLIC_EXPORT_PATH(cmconnectionmethod.inl)
 ../inc/cmplugindialcommondefs.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmplugindialcommondefs.h)
-../inc/cmdefconnvalues.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmdefconnvalues.h)
-../inc/cmpluginpacketdatadef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginpacketdatadef.h)
-../inc/cmmanager.inl     MW_LAYER_PUBLIC_EXPORT_PATH(cmmanager.inl)
-../inc/cmconnectionmethod.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmconnectionmethod.h)
-../inc/cmconnectionmethoddef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmconnectionmethoddef.h)
-../inc/cmdestination.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmdestination.h)
-../inc/cmpluginembdestinationdef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginembdestinationdef.h)
-../inc/cmplugincsddef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmplugincsddef.h)
-../inc/cmmanagerdef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmmanagerdef.h)
-../inc/cmpluginwlandef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginwlandef.h)
-../inc/cmpluginvpndef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginvpndef.h)
-../inc/cmpluginhscsddef.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginhscsddef.h)
-../inc/cmmanager.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmmanager.h)
-../inc/cmsettingsui.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmsettingsui.h)
-../inc/cmgenconnsettings.h     MW_LAYER_PUBLIC_EXPORT_PATH(cmgenconnsettings.h)
+../inc/cmdefconnvalues.h            MW_LAYER_PUBLIC_EXPORT_PATH(cmdefconnvalues.h)
+../inc/cmpluginpacketdatadef.h      MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginpacketdatadef.h)
+../inc/cmconnectionmethod.h         MW_LAYER_PUBLIC_EXPORT_PATH(cmconnectionmethod.h)
+../inc/cmconnectionmethoddef.h      MW_LAYER_PUBLIC_EXPORT_PATH(cmconnectionmethoddef.h)
+../inc/cmdestination.h              MW_LAYER_PUBLIC_EXPORT_PATH(cmdestination.h)
+../inc/cmpluginembdestinationdef.h  MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginembdestinationdef.h)
+../inc/cmplugincsddef.h             MW_LAYER_PUBLIC_EXPORT_PATH(cmplugincsddef.h)
+../inc/cmmanagerdef.h               MW_LAYER_PUBLIC_EXPORT_PATH(cmmanagerdef.h)
+../inc/cmpluginwlandef.h            MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginwlandef.h)
+../inc/cmpluginvpndef.h             MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginvpndef.h)
+../inc/cmpluginhscsddef.h           MW_LAYER_PUBLIC_EXPORT_PATH(cmpluginhscsddef.h)
+../inc/cmmanager.h                  MW_LAYER_PUBLIC_EXPORT_PATH(cmmanager.h)
+../inc/cmgenconnsettings.h          MW_LAYER_PUBLIC_EXPORT_PATH(cmgenconnsettings.h)
--- a/ipcm_pub/connection_settings_api/inc/cmconnectionmethod.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmconnectionmethod.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,22 @@
 *
 * Contributors:
 *
-* Description:  Connection Method interface class.
+* Description:
+* Connection Method interface class.
 *
 */
 
+
 #ifndef CMCONNECTIONMETHOD_H
 #define CMCONNECTIONMETHOD_H
 
-// INCLUDES
 #include <e32base.h>
 #include <cmconnectionmethoddef.h>
 
-// CLASS DECLARATION
-class CCmPluginBaseEng;
+// Forward declarations
 class RCmDestination;
+class CCmConnectionMethodWrapper;
+
 
 /**
  *  RCmConnectionMethod is for getting/setting values of a connection method.
@@ -33,39 +35,30 @@
  */
 NONSHARABLE_CLASS( RCmConnectionMethod )
     {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
     public:
-    
         /**
-        * Default constructor. 
+        * Default constructor.
         */
         IMPORT_C RCmConnectionMethod();
 
+        /**
+        * Copy constructor.
+        */
+        IMPORT_C RCmConnectionMethod( const RCmConnectionMethod& aConnMethod );
 
         /**
-        * Copy constructor. 
-        */
-        IMPORT_C RCmConnectionMethod(const RCmConnectionMethod& aItem);
-
-
-        /**
-        * Destructor. 
+        * Destructor.
         */
         IMPORT_C ~RCmConnectionMethod();
 
-    //=====================================================================
-    // API functions
     public:
-    
         /**
         * Close the session
         *
         * @since S60 3.2
         */
         IMPORT_C void Close();
-        
+
         /**
         * Gets the value for a TInt attribute.
         *
@@ -93,7 +86,7 @@
         * @return copy of the requested attribute. Ownership is passed.
         */
         IMPORT_C HBufC* GetStringAttributeL( TUint32 aAttribute ) const;
-        
+
         /**
         * Gets the value for a String8 attribute.
         * HBuf ownership is passed to the caller
@@ -102,8 +95,8 @@
         * @param aAttribute Identifies the attribute to be retrieved.
         * @return copy of the requested attribute. Ownership is passed.
         */
-        IMPORT_C HBufC8* GetString8AttributeL( 
-                                        const TUint32 aAttribute ) const;
+        IMPORT_C HBufC8* GetString8AttributeL(
+                const TUint32 aAttribute ) const;
 
         /**
         * Call this function only if this CM is an embedded destination!
@@ -113,42 +106,42 @@
         */
         IMPORT_C RCmDestination DestinationL() const;
 
-        
+
         /**
-        * checks if connection methods are the same 
-        * 
+        * checks if connection methods are the same
+        *
         * @since S60 3.2
         * @param aConnMethod the connection method being compared
         * @return ETrue if the destinations are the same
         */
         IMPORT_C TBool operator==( RCmConnectionMethod& aConnMethod ) const;
-        
+
         /**
-        * checks if connection methods are not the same 
-        * 
+        * checks if connection methods are not the same
+        *
         * @since S60 3.2
         * @param aConnMethod the connection method being compared
         * @return ETrue if the destinations are different
         */
         IMPORT_C TBool operator!=( RCmConnectionMethod& aConnMethod ) const;
-        
+
 
         /**
-        * assignment operator 
-        * 
+        * assignment operator
+        *
         * @since S60 3.2
         * @return RCmConnectionMethod
         */
-        IMPORT_C RCmConnectionMethod& operator=(const RCmConnectionMethod& 
-                                                    aConnMethod);
+        IMPORT_C RCmConnectionMethod& operator=(
+                const RCmConnectionMethod& aConnMethod );
 
         /**
-        * Creates a copy of this connection method. UpdateL() has to be called 
+        * Creates a copy of this connection method. UpdateL() has to be called
         * to store new connection method in database. Ownership is passed.
         */
         IMPORT_C RCmConnectionMethod CreateCopyL();
 
-                /**
+        /**
         * Sets the value for a TInt attribute.
         * @param aAttribute Identifies the attribute to be set.
         * @param aValue The value to be set.
@@ -170,8 +163,9 @@
         * @param aValue The value to be set.
         * @return None.
         */
-        IMPORT_C void SetStringAttributeL( TUint32 aAttribute, 
-                                           const TDesC16& aValue );
+        IMPORT_C void SetStringAttributeL(
+                TUint32 aAttribute,
+                const TDesC16& aValue );
 
         /**
         * Sets the value for a String8 attribute.
@@ -179,12 +173,13 @@
         * @param aValue The value to be set.
         * @return None.
         */
-        IMPORT_C void SetString8AttributeL( TUint32 aAttribute, 
-                                            const TDesC8& aValue );
+        IMPORT_C void SetString8AttributeL(
+                TUint32 aAttribute,
+                const TDesC8& aValue );
 
         /**
-        * Try to delete the connection method. If it is referenced from 
-        * any destination, then the references are removed and the 
+        * Try to delete the connection method. If it is referenced from
+        * any destination, then the references are removed and the
         * connection method is deleted.
         * Do NOT call this function if you got this
         * connection method from a destination. Call destination's
@@ -196,22 +191,40 @@
         /**
         * Update in the database.
         * @return None.
-        */        
+        */
         IMPORT_C void UpdateL();
 
+        /**
+         * Gets the icon identifier(name) of the connection method. It can
+         * contain path information. HBufC* ownership is passed to the caller.
+         * @return Returns pointer to a buffer which identifies the requested
+         * icon.
+         */
+        IMPORT_C HBufC* GetIconL() const;
+
+        /**
+         * Sets the icon identifier(name) of the connection method. It can
+         * contain path information.
+         * @param aIcon Identifier of the connection method icon.
+         */
+        IMPORT_C void SetIconL( const TDesC& aIcon );
+
+        /**
+        * Reload the contents of the connection method from database.
+        * Any current changes made to the connection method are lost.
+        * @return None.
+        */
+        IMPORT_C void RefreshL();
+
+
     private:
-    
         friend class RCmDestination;
         friend class RCmManager;
-        
+
     private:
-        
-        /**
-         * the implementation class
-         */
-        CCmPluginBaseEng* iImplementation;
+        CCmConnectionMethodWrapper* iCmConnectionMethodWrapper;
     };
 
-#include <cmconnectionmethod.inl>
-    
-#endif      // CMCONNECTIONMETHOD_H
+#endif // CMCONNECTIONMETHOD_H
+
+// End of file
--- a/ipcm_pub/connection_settings_api/inc/cmconnectionmethod.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +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:  implementation of cmconnectionmethod.h inline functions
-*
-*/
-
-
--- a/ipcm_pub/connection_settings_api/inc/cmconnectionmethoddef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmconnectionmethoddef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -25,7 +25,7 @@
 
 // Beginning of the CMManager enum range (internal use)
 const TUint KLanBaseSpecificAttributes = 20000;
-const TUint KLanBaseIfNetworks = 20100; 
+const TUint KLanBaseIfNetworks = 20100;
 // End of the CMManager enum range (internal use)
 const TUint KLanBaseRangeMax = 29999;
 
@@ -34,8 +34,8 @@
 
 namespace CMManager
     {
-    //Enumeration for possible values of seamlessness field 
-    //in IAP Metadata table 
+    //Enumeration for possible values of seamlessness field
+    //in IAP Metadata table
     /**  Naming method options */
     enum TNamingMethod
         {
@@ -44,7 +44,7 @@
         ENamingNotAccept    ///< Do not accept duplication. It will leave with
                             ///< KErrArgument.
         };
-    
+
     // Enumeration for IPv6 types
     enum TIPv6Types
         {
@@ -52,7 +52,7 @@
         EIPv6WellKnown,     ///< Well known IPv6 type
         EIPv6UserDefined    ///< User defined IPv6 type
         };
-    
+
     enum TSeamlessnessValue
         {
         ESeamlessnessNotRoamedTo,   // NOT supported
@@ -60,22 +60,22 @@
         ESeamlessnessShowprogress,  // Shows progress
         ESeamlessnessFullySeamless  // NOT supported
         };
-    
-    
+
+
     /// Unspecified IPv4 address
     _LIT( KUnspecifiedIPv4, "0.0.0.0" );
-    
+
     /// Known IPv6 name server 1
     _LIT( KKnownIp6NameServer1, "fec0:000:0000:ffff::1" );
     /// Known IPv6 name server 2
     _LIT( KKnownIp6NameServer2, "fec0:000:0000:ffff::2" );
-    
+
     /// Dynamic IPv6 address
     _LIT( KDynamicIpv6Address, "0:0:0:0:0:0:0:0" );
 
     /// Default proxy protocol name
     _LIT( KDefProxyProtocolName, "http" );
-    
+
     /// Default proxy port number
     _LIT( KDefaultProxyPortNumber, "0" );
 
@@ -98,26 +98,26 @@
     enum TConnectionMethodCommonAttributes
         {
         /**
-        * The following attributes can be queried via both 
+        * The following attributes can be queried via both
         * the manager interface's and connection method interface's ::Get functions.
         */
         ECmCoverage,                /**<
                                     * Checks if there's coverage for this bearer.
                                     * (TBool - default: none - read only)
                                     */
-                        
+
         ECmDefaultPriority,         /**<
-                                    * Default global priority of the CM's bearer 
+                                    * Default global priority of the CM's bearer
                                     * type.
                                     * (TUint32 - default: none - read only)
                                     */
-                        
+
         ECmDestination,             /**<
-                                    * ETrue if this connection method is 
+                                    * ETrue if this connection method is
                                     * an embedded destination.
                                     * (TBool - default: none - read only)
                                     */
-                            
+
         ECmBearerHasUi,             /**<
                                     * Indicates whether the bearer has any UI.
                                     * (TBool - default: none - read only)
@@ -127,164 +127,116 @@
                                     * Returns ETrue if IPv6 is supported.
                                     * (TBool - default: none - read only)
                                     */
-                                    
+
         ECmDefaultUiPriority,       /**<
-                                    * Priority of this bearer type when shown in UI for 
+                                    * Priority of this bearer type when shown in UI for
                                     * configuring a new IAP.
                                     * (TUint32 - default: none - read only)
                                     */
 
         ECmBearerIcon = 100,        /**<
-                                    * Return the bearer specific icon. Assumes that
-                                    * there's an existing EEikEnv in the client.                        
-                                    * Type cast return value from TUint32 to 
-                                    * CGuiIcon*.
-                                    * Return value 0 means bearer has no icon.
-                                    * (TUint32 - default: none - read only)
-                                    */ 
-                        
-        ECmBearerAvailableIcon,     /**<
-                                    * Return the bearer available specific icon. 
-                                    * Assumes that there's an existing EEikEnv 
-                                    * in the client. Type cast return value from 
-                                    * TUint32 to CGuiIcon*.
-                                    * Return value 0 means bearer has no icon.
-                                    * (TUint32 - default: none - read only)
-                                    */
-                        
-        ECmBearerAvailableName = 200,   /**<
-                                        * Name of the bearer. Can be used in 
-                                        * layout 
-                                        * list_double_large_graphic_popup_menu_pane.
-                                        * (String - default: none - read only)
-                                        */
-                        
-        ECmBearerSupportedName,     /**<
-                                    * Name of the bearer. Can be used in 
-                                    * layout list_single_popup_menu_pane_1.
-                                    * (String - default: none - read only)
-                                    */
-                        
-        ECmBearerAvailableText,     /**<
-                                    * Localized text 'Available'. Can be used in 
-                                    * layout 
-                                    * list_double_large_graphic_popup_menu_pane.
-                                    * (String - default: none - read only)
-                                    */
-                        
-        ECmBearerNamePopupNote,     /**<
-                                    * Localized text of the bearer type name.
-                                    * Can be used in layout popup note.
-                                    * (String - default: none - read only)
+                                    * Sets/Gets the Connection Method specific icon name(may
+                                    * contain the path too).
+                                    * Used with Get/SetStringAttribute().
+                                    * Returns NULL if not found.
+                                    * (String - default: None )
                                     */
 
-        ECmCommsDBBearerType,       /**<
+        ECmCommsDBBearerType = 204, /**<
                                     * For backward compatibility, connection method
                                     * can return its CommsDB specific bearer type.
                                     * (TUint32 - default: none - read only)
-                                    * Leaves with KErrUnknown if no associated bearer 
+                                    * Leaves with KErrUnknown if no associated bearer
                                     * type exists in CommsDat.
                                     */
-                                
-        ECmBearerSettingName,       /**<
-                                    * Name of the data bearer used when 
-                                    * accessing external network.
-                                    * (String - default: none - read only)
-                                    */
-        
-        ECmVirtual,                 /**<
+
+        ECmVirtual = 206,          /**<
                                     * Is the given connection method virtual?
                                     * (TBool - default: none - read only)
                                     */
 
         /**
         * These are not bearer specific, but controling attributes.
-        */    
+        */
         ECmInvalidAttribute = 400,  /**<
-                                    * Client application can check which attribute 
+                                    * Client application can check which attribute
                                     * was incorrect in UpdateL().
                                     * (TUint32 - default: none - read only)
                                     */
-                                    
-        ECmAddToAvailableList,      /**<
-                                    * Bearer type has to be added to the avaialable
-                                    * bearer type list.
-                                    * (TBool - default: EFalse - read only)
-                                    */                   
-                        
-        ECmLoadResult,              /**<
+
+        ECmLoadResult = 402,        /**<
                                     * Result of the load process. KErrNone if there
                                     * was no error. Otherwise a system wide
                                     * error code.
                                     * (TUint32 - default: KErrNone - read only)
                                     */
-        
+
         /**
         * Attributes the can be queried only via
         * - connection method's GetXXXAttributeL()
         * - connection manager's function GetConnectionMethodInfoXXXL()
         * functions
         */
-        ECmBearerType = 500,        /**<   
-                                    * Bearer type of the CM 
+        ECmBearerType = 500,        /**<
+                                    * Bearer type of the CM
                                     * (TUint - default: none - read only)
                                     */
-                        
-        ECmName,                    /**<   
+
+        ECmName,                    /**<
                                     * Name of the CM
                                     * (String - default: none)
                                     */
-        
-        ECmIapId,                   /**<    
+
+        ECmIapId,                   /**<
                                     * IAP id
                                     * (TUint32 - default: none - read only)
                                     */
-                        
+
         ECmStartPage,               /**<
                                     * Start page of the connection method
                                     * (String - default: empty string)
                                     */
 
         ECmHidden,                  /**<
-                                    * Connection method is hidden. 
+                                    * Connection method is hidden.
                                     * (not supported yet)
                                     * (TBool - default: EFalse)
                                     */
 
         ECmProtected,               /**<
-                                    * This connection method is protected. 
+                                    * This connection method is protected.
                                     * Modifying it needs NetworkControl capability.
                                     * (TBool - default: EFalse)
                                     */
-                        
+
         ECmNamingMethod,            /**<
                                     * See acceptable values in TNamingControl.
                                     * (TUint32 - default: ENamingUnique)
-                                    */             
-        
+                                    */
+
         ECmSeamlessnessLevel,   /**<
                                 * Defines whether an IAP can be roamed to.
                                 * See details in TSeamlessnessValue.
                                 * (TUint32 - default: ESeamlessnessConfirmFirst )
                                 */
-                                
+
         ECmElementID,           /**<
                                 * Element id of the connection method in IAP table.
                                 * (TUint32 - default: none - read only)
                                 */
-        
+
         ECmNetworkId,           /**<
                                 * Network id of the connection method.
                                 * (TUint32 - default: none - read only)
                                 */
-                                
+
         ECmConnected,           /**<
                                 * Is network connection created with connection
                                 * method?
                                 * (TBool - default: none - read only)
                                 */
 
-        ECmId,                  /**<    
+        ECmId,                  /**<
                                 * ID to uniquely identify the connection
                                 * methods
                                 * It is guaranteed that every connection
@@ -294,22 +246,22 @@
 
         ECmWapId,               /**
 		                        * Provided for backwards compatibility only.
-                                * The record ID of the connection methods' 
+                                * The record ID of the connection methods'
                                 * corresponding WAP_ACCESS_POINT record, which
-                                * use had been deprecated as the main ID 
+                                * use had been deprecated as the main ID
                                 * should now be ECmIapId, ECmElementID or ECmId.
                                 * (TUint32 - default: none - read only)
                                 */
 
         ECmIapServiceId,        /**
 		                        * Provided for backwards compatibility only.
-                                * The record ID of the connection methods' 
+                                * The record ID of the connection methods'
                                 * service record
                                 * (TUint32 - default: none - read only)
                                 */
 
         /**
-        * The following attributes are stored in the connection method's 
+        * The following attributes are stored in the connection method's
         * meta data record.
         */
         ECmMetaHighlight = 600, /**<
@@ -318,365 +270,370 @@
                                 * method can have this flag set.
                                 * (TBool - default: EFalse)
                                 */
-                                
+
         ECmMetaHiddenAgent,     /**<
                                 * Set to hide this connection method in Agent
                                 * dialog.
                                 * (TBool - default: EFalse)
                                 */
-                                
+
         // These attributes can be used with virtual bearer type
         // connection methods.
         ECmNextLayerIapId,      /**<
                                 * Returns the linked connection method's IAP id.
                                 * (TUint32 - default: None)
                                 */
-                                
+
         ECmNextLayerSNAPId,     /**<
                                 * Returns the linked connection method's SNAP id.
                                 * (TUint32 - default: None)
                                 */
-        
+
+        ECmMetaHotSpot,         /**<
+                                * Sets/Gets the information if the IAP is HotSpot IAP.
+                                * (TBool - default: EFalse)
+                                */
+
         // Proxy attributes
         ECmProxyUsageEnabled = 1000,    /**<
                                         * Set to enable/disable proxy setting
                                         * of connection method.
-                                        * Disabling: record is deleted from proxy 
+                                        * Disabling: record is deleted from proxy
                                         * when UpdateL() is called.
-                                        * Proxy record is deleted on UpdateL() 
+                                        * Proxy record is deleted on UpdateL()
                                         * if ECmProxyServerName is an empty string.
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (TBool: default: EFalse)
                                         */
-     
+
         ECmProxyServerName,             /**<
                                         * Name of the host.
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (String - default: none)
                                         */
-                                        
+
         ECmProxyProtocolName,           /**<
-                                        * Name of the protocol for which this proxy 
+                                        * Name of the protocol for which this proxy
                                         * can be used.
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (String - default: none)
                                         */
-                                        
-        ECmProxyPortNumber,             /**< 
+
+        ECmProxyPortNumber,             /**<
                                         * Port number
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (TUint32 - default: none)
                                         */
-                                        
+
         ECmProxyExceptions,             /**<
-                                        * ";" separated list of the addresses for 
+                                        * ";" separated list of the addresses for
                                         * which the proxy server should not be used.
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (String - default: none)
                                         */
-                                        
+
         ECmProxyRangeMax = 1999,        /**<
                                         * Marks the end of the proxy range
                                         */
-                                  
+
         ECmChargeCardUsageEnabled = 2000,   /**<
-                                            * Same as in ECmProxyUsageEnabled but 
-                                            * for charge card. 
+                                            * Same as in ECmProxyUsageEnabled but
+                                            * for charge card.
                                             * (TBool - default: EFalse)
-                                            */      
-                                            
+                                            */
+
         ECmChargeCardAccountNumber,         /**<
                                             * Account number
                                             * (String - default: none)
                                             */
-                                            
+
         ECmChargeCardPIN,                   /**<
                                             * PIN number
                                             * (String - default: none)
                                             */
-        
+
         ECmChargeCardLocalRule,             /**<
-                                            * Order of dialling account number, 
+                                            * Order of dialling account number,
                                             * PIN and phone number for local calls.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmChargeCardNatRule,               /**<
-                                            * Order of dialling account number, 
-                                            * PIN and phone number for national 
+                                            * Order of dialling account number,
+                                            * PIN and phone number for national
                                             * calls.
                                             * (String - default: none)
                                             */
 
         ECmChargeCardIntlRule,              /**<
-                                            * Order of  dialling account number, 
-                                            * PIN and phone number for 
+                                            * Order of  dialling account number,
+                                            * PIN and phone number for
                                             * international calls.
                                             * (String - default: none)
                                             */
-        
+
         ECmChargeCardRangeMax = 2999,       /**<
                                             * Marks the end of the chargecard range
                                             */
-                                            
+
         ECmLocationUsageEnabled = 3000,     /**<
-                                            * Same as in ECmProxyUsageEnabled but 
-                                            * for location. 
+                                            * Same as in ECmProxyUsageEnabled but
+                                            * for location.
                                             * (TBool - default: EFalse)
                                             */
-                                            
+
         ECmLocationIntlPrefixCode,          /**<
                                             * International prefix code.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationNatPrefixCode,           /**<
                                             * National prefix code.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationNatCode,                 /**<
                                             * National code
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationAreaCode,                /**<
                                             * Area code.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationDialOutCode,             /**<
                                             * Number to dial for an outside line.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationDisableCallWaitingCode,  /**<
-                                            * Code to dial to disable call waiting 
+                                            * Code to dial to disable call waiting
                                             * facility.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmLocationMobile,                  /**<
                                             * Mobile phone?
                                             * (TBool - default: none)
                                             */
-                                            
+
         ECmLocationUsePulseDial,            /**<
                                             * Use pulse dialling?
                                             * (TBool - default: none)
                                             */
-                                            
+
         ECmLocationWaitForDialTone,         /**<
                                             * Wait for the dial tone?
                                             * (TBool - default: none)
                                             */
-                                            
+
         ECmLocationPauseAfterDialOut,       /**<
                                             * Pause time after dial out.
                                             * (TUint32 - default: none)
                                             */
-                                            
+
         ECmLocationRangeMax = 3999,         /**<
                                             * Marks the end of the location
                                             * range
                                             */
-        
+
         // WAP specific attributes
         ECmWapIPGatewayAddress = 4000,      /**<
-                                            * WAP Gateway address, in this case an 
+                                            * WAP Gateway address, in this case an
                                             * IP address.
                                             * (String - default: none)
                                             */
-                                            
+
         ECmWapIPWSPOption,          /**<
-                                    * Enum value indicating whether 
-                                    * connection-oriented 
+                                    * Enum value indicating whether
+                                    * connection-oriented
                                     * or connectionless API should be used.
                                     * See valid values in TWapWSPOption.
-                                    * (TUint32 - default: 
+                                    * (TUint32 - default:
                                     * ECmWapWspOptionConnectionless)
                                     */
-                                            
+
         ECmWapIPSecurity,           /**<
                                     * Attempt secure WTLS connection to the gateway
                                     * (TBool - default: EFalse)
                                     */
-        
+
         ECmWapIPProxyPort,          /**<
                                     * Proxy port number. Required for WAP2.0 only.
                                     * (TUint32 - default: none)
                                     */
-                                            
+
         ECmWapIPProxyLoginName,     /**<
                                     * Proxy login name. Required for WAP2.0 only.
                                     * (String - default: none)
                                     */
-                                            
+
         ECmWapIPProxyLoginPass,     /**<
-                                    * Proxy login password. 
+                                    * Proxy login password.
                                     * Required for WAP2.0 only.
                                     * (String - default: none)
                                     */
-                                            
+
         ECmWapRangeMax = 4099,      /**<
                                     * Marks the end of the WAP specific range
                                     */
 
-        /** 
+        /**
         * The following attributes are common for many bearer types.
         * It's not sure that every IF or IP attribute is supported by
         * all bearer types.
-        * It's not possible to query these attributes via 
+        * It's not possible to query these attributes via
         * GetConnectionInfoXXX() functions.
         */
         ECmCommonAttributesStart = 5000, /**<
                                          * Marks the beginning of the common
                                          * attributes
                                          */
-        
+
         ECmIFName,                  /**<
                                     * Interface name
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIFParams,                /**<
                                     * Interface parameter string
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIFNetworks,              /**<
                                     * List of network protocols
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIFPromptForAuth,         /**<
                                     * Prompt user for authentication
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TBool - default: none)
                                     */
-                                    
+
         ECmIFAuthName,              /**<
                                     * Authentication user name used by PPP
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIFAuthPass,              /**<
                                     * Authentication password used by PPP
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIFAuthRetries,           /**<
                                     * Number of times for retrying authentication
                                     * if it fails
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TUint32 - default: none)
                                     */
-        
+
         ECmIPNetmask = 5050,        /**<
                                     * IP net mask of interface
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPGateway,               /**<
                                     * IP address of gateway
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPAddFromServer,         /**<
                                     * Get IP address from server?
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TBool - default: none)
                                     */
-                                    
+
         ECmIPAddress,               /**<
                                     * IP address of interface
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPDNSAddrFromServer,     /**<
                                     * Get DNS addresses from server?
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TBool - default: none)
                                     */
-                                    
+
         ECmIPNameServer1,           /**<
                                     * IP address of primary name server
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPNameServer2,           /**<
                                     * IP address of secondary name server
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIP6DNSAddrFromServer,    /**<
                                     * Get IP6 DNS addresses from server?
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TBool - default: none)
                                     */
-                                    
+
         ECmIP6NameServer1,          /**<
                                     * IP6 address of primary name server
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIP6NameServer2,          /**<
                                     * IP6 address of secondary name server
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPAddrLeaseValidFrom,    /**<
                                     * IP address valid from this time, used to
                                     * store dynamically assigned address lease
                                     * info
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-                                    
+
         ECmIPAddrLeaseValidTo,      /**<
                                     * IP address valid for use until this time,
                                     * used to store dynamically assigned
                                     * address lease info
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-        
+
         ECmConfigDaemonManagerName = 5100, /**<
                                             * Name of the ECom configuration
                                             * daemon manager component. This
@@ -684,12 +641,12 @@
                                             * server identified in
                                             * ECmConfigDaemonName. If
                                             * specified, ECmConfigDaemonName
-                                            * should also be specified.                                            
-                                            * It can be queried only via the 
+                                            * should also be specified.
+                                            * It can be queried only via the
                                             * connection method's GetXXXAttributeL()
                                             * (String - default: none)
                                             */
-                                            
+
         ECmConfigDaemonName,        /**<
                                     * Name of the configuration daemon server.
                                     * This server is used to provide further
@@ -697,65 +654,65 @@
                                     * dynamic IP address assignment. If
                                     * specified, ECmConfigDaemonManagerName
                                     * should also be specified.
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (String - default: none)
                                     */
-        
+
         ECmEnableLPCExtension = 5110,   /**<
                                         * Enable LCP extensions?
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (TBool - default: none)
                                         */
-                                        
+
         ECmDisablePlainTextAuth,        /**<
                                         * Disable plaintext authentication?
-                                        * It can be queried only via the 
+                                        * It can be queried only via the
                                         * connection method's GetXXXAttributeL()
                                         * (TBool - default: none)
                                         */
-                                        
+
         ECmCommonAttributesEnd = 5999,  /**<
                                         * Marks the end of common attributes
                                         */
-        
+
         /**
-        * The following methods can be queried only via 
+        * The following methods can be queried only via
         * connection method's GetXXXAttributeL()
         */
         ECmSpecialAttributes = 6000,   /**<
                                         * Marks the beginning of special
                                         * attributes
                                         */
-        
+
         ECmIsLinked,                /**<
                                     * Is connection method linked to any
                                     * virtual connection method?
-                                    * It can be queried only via the 
+                                    * It can be queried only via the
                                     * connection method's GetXXXAttributeL()
                                     * (TBool - default: none)
                                     */
-                                    
+
         ECmSpecialAttributesEnd = 8999  /**<
                                         * Marks the end of special attributes
                                         */
         };
 
-    /**  WAP WSP options */        
+    /**  WAP WSP options */
     enum TWapWSPOption
         {
         /**
         * Indicates that connectionless APIs should be used
         */
         ECmWapWspOptionConnectionless,
-        
+
         /**
         * Indicates that connection oriented APIs should be used
         */
         ECmWapWspOptionConnectionOriented
         };
-       
+
     }   // namespace CMManager
 
 #endif // CMCONNECTIONMETHODDEF_H
--- a/ipcm_pub/connection_settings_api/inc/cmdestination.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmdestination.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,24 +11,24 @@
 *
 * Contributors:
 *
-* Description:  Destination interface class.
+* Description:
+* Destination interface class.
 *
 */
 
+
 #ifndef DESTINATION_H
 #define DESTINATION_H
 
-// System includes
 #include <cmconnectionmethod.h>
 #include <cmmanagerdef.h>
-#include <e32def.h>
 #include <e32base.h>
 #include <metadatabase.h>
 
-// FORWARD DECLARATIONS
-class CCmManagerImpl;
-class CCmDestinationData;
-class CGulIcon;
+// Forward declarations
+class RCmConnectionMethod;
+class CCmDestinationWrapper;
+
 
 /**
  *  RCmDestination is for setting/getting values of a network destination.
@@ -36,49 +36,42 @@
  *  @lib cmmanager.lib
  *  @since S60 v3.2
  */
-NONSHARABLE_CLASS(RCmDestination)
+NONSHARABLE_CLASS( RCmDestination )
     {
-    //=====================================================================
-    // Constructors/Destructors
-    // 
     public:
-    
         /** Default constructor. */
         IMPORT_C RCmDestination();
 
         IMPORT_C ~RCmDestination();
 
-        IMPORT_C RCmDestination(const RCmDestination& aCmDestination);
-        
-    //=====================================================================
-    // API functions
+        IMPORT_C RCmDestination( const RCmDestination& aDestination );
+
     public:
-
         /**
         * Close the session.
         *
         * @since S60 3.2
         */
         IMPORT_C void Close();
-            
+
         /**
         * Returns the number of connection methods of the destination
         *
         * @since 3.2
-        * @return the number of connection methods belonging to a destination        
-        */                 
+        * @return the number of connection methods belonging to a destination
+        */
         IMPORT_C TInt ConnectionMethodCount() const;
-        
+
         /**
-        * Returns a reference to the connection method. 
-        * The index must be less than the return value of 
+        * Returns a reference to the connection method.
+        * The index must be less than the return value of
         * ConnectionMethodCount().
         *
         * @since 3.2
         * @param anIndex
         * @return a connection method
-        */        
-        IMPORT_C RCmConnectionMethod ConnectionMethodL( TInt anIndex ) const;
+        */
+        IMPORT_C RCmConnectionMethod ConnectionMethodL( TInt aIndex ) const;
 
         /**
         * Returns the connection method with the ECmId.
@@ -86,19 +79,18 @@
         * @param aCmId unique id of the requested connection method.
         * @return connection method
         */
-        IMPORT_C RCmConnectionMethod ConnectionMethodByIDL( 
-                                                        TInt aCmId ) const;
+        IMPORT_C RCmConnectionMethod ConnectionMethodByIDL(
+                TInt aConnMethodId ) const;
 
         /**
         * Return the priority of the passed connection method
         *
         * @since 3.2
         * @param aCCMItem connection method
-        * @return the priority of the queried connection method 
+        * @return the priority of the queried connection method
         */
-        IMPORT_C TUint PriorityL(const RCmConnectionMethod& aCCMItem ) const;
-        
-        //Getting attributes
+        IMPORT_C TUint PriorityL(
+                const RCmConnectionMethod& aConnectionMethod ) const;
 
         /**
         * Returns the destination's Name attribute
@@ -106,47 +98,39 @@
         *
         * @since 3.2
         * @return HBufC* Passes returned value's ownership to the caller
-        */      
-        IMPORT_C HBufC* NameLC() const;                        
-        
+        */
+        IMPORT_C HBufC* NameLC() const;
+
         /**
         * Returns the destination's Id attribute
         *
         * @since 3.2
         * @return the destination's id
-        */                    
+        */
         IMPORT_C TUint32 Id() const;
-        
+
         /**
         * Returns the destination's ElementId attribute
         *
         * @since 3.2
-        * @return the destination's element id        
-        */            
-        IMPORT_C TUint32 ElementId() const;        
-                
-        /**
-        * Returns the Icon pointer
-        * This function leaves if the client does not have a valid UI context
-        *
-        * @since 3.2
-        * @return the destination icon  
-        */ 
-        IMPORT_C CGulIcon* IconL() const;
+        * @return the destination's element id
+        */
+        IMPORT_C TUint32 ElementId() const;
 
         /**
         * Returns the Metadata
         *
         * @since 3.2
         * @param aMetaField the meta data field to query
-        * @return the value of the requested field        
-        */            
-        IMPORT_C TUint32 MetadataL( CMManager::TSnapMetadataField aMetaField ) const;
-    
+        * @return the value of the requested field
+        */
+        IMPORT_C TUint32 MetadataL(
+                CMManager::TSnapMetadataField aMetadataField ) const;
+
         /**
         * Return the protection level of the destination.
         *
-        * @since 3.2              
+        * @since 3.2
         * @return protection level of the destination
         */
         IMPORT_C CMManager::TProtectionLevel ProtectionLevel() const;
@@ -155,12 +139,12 @@
         * Returns if there's a connection created with any of the destination's
         * connection method.
         *
-        * @since 3.2        
+        * @since 3.2
         * @return ETrue if there's a connection with any of the destination's
         * connection method.
         */
         IMPORT_C TBool IsConnectedL() const;
-        
+
         /**
         * Returns whether the destination is hidden or not.
         *
@@ -170,79 +154,85 @@
         IMPORT_C TBool IsHidden() const;
 
         /**
-        * checks if destinations are the same 
-        * 
+        * checks if destinations are the same
+        *
         * @since S60 3.2
         * @param aDestination the destination being compared
         * @return ETrue if the destinations are the same
         */
-        IMPORT_C TBool operator==(const RCmDestination& aDestination ) const;
-        
+        IMPORT_C TBool operator==( const RCmDestination& aDestination ) const;
+
         /**
-        * checks if destinations are not the same 
-        * 
+        * checks if destinations are not the same
+        *
         * @since S60 3.2
         * @param aDestination the destination being compared
         * @return ETrue if the destinations are different
         */
-        IMPORT_C TBool operator!=(const RCmDestination& aDestination ) const;
+        IMPORT_C TBool operator!=( const RCmDestination& aDestination ) const;
 
         /**
-        * assignment operator 
-        * 
+        * assignment operator
+        *
         * @since S60 3.2
         * @param aDestination the destination being compared
         * @return RCmDestination
         */
-        IMPORT_C RCmDestination& operator=(const RCmDestination& 
-                                                    aCmDestination);
+        IMPORT_C RCmDestination& operator=(
+                const RCmDestination&
+                aDestination );
 
-                /**
+        /**
         * Create a connection method that belongs to this destination.
-        * @param aImplementationUid - implementation uid (bearer type) of the 
+        * @param aImplementationUid - implementation uid (bearer type) of the
         * connection method to be created
         * @return newly created connection method
         */
-        IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aBearerType );
+        IMPORT_C RCmConnectionMethod CreateConnectionMethodL(
+                TUint32 aBearerType );
 
-        /*
+        /**
         * Adds an existing connection method to a destination
         * @param aConnectionMethod Connection method to be added
         * @return index in the Connection Method list
         */
-        IMPORT_C TInt AddConnectionMethodL( RCmConnectionMethod aConnectionMethod );            
+        IMPORT_C TInt AddConnectionMethodL(
+                RCmConnectionMethod aConnectionMethod );
 
-        /*
+        /**
         * Embeds an existing destination into this destination.
         * @param RCmDestination - Destination to be embedded
         * @return TInt - index in the Connection Method list
         */
-        IMPORT_C TInt AddEmbeddedDestinationL( const RCmDestination& aDestination );     
+        IMPORT_C TInt AddEmbeddedDestinationL(
+                const RCmDestination& aDestination );
 
         /**
         * Remove a connection method from a destination and delete it
-        * on update. 
-        * Exception: conenction method is not deleted  if it's referenced 
+        * on update.
+        * Exception: connection method is not deleted if it's referenced
         * from any other destination.
         * @param aConnectionMethod the connection method to be deleted.
         */
-        IMPORT_C void DeleteConnectionMethodL( RCmConnectionMethod& aConnectionMethod );
+        IMPORT_C void DeleteConnectionMethodL(
+                RCmConnectionMethod& aConnectionMethod );
 
         /**
         * Remove connection method from the destination
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveConnectionMethodL( RCmConnectionMethod aConnectionMethod );
-
+        IMPORT_C void RemoveConnectionMethodL(
+                RCmConnectionMethod aConnectionMethod );
 
         /**
         * Set the connection method's priority based on the passed index.
         * @param aCCMItem the connection method item
-        * @param aIndex the new priority of the connection method in the 
+        * @param aIndex the new priority of the connection method in the
         * destination
         */
-        IMPORT_C void ModifyPriorityL( RCmConnectionMethod& aCCMItem, 
-                                       TUint aIndex );
+        IMPORT_C void ModifyPriorityL(
+                RCmConnectionMethod& aConnectionMethod,
+                TUint aIndex );
 
         /**
         * Set the destination's name
@@ -251,23 +241,17 @@
         IMPORT_C void SetNameL( const TDesC& aName );
 
         /**
-        * Set the destination's icon index.
-        * This fucton leaves if the client does not have a valid UI context
-        * @param aIconIndex new icon index of the destination
-        */
-        IMPORT_C void SetIconL( TUint32 anIndex );
-
-        /**
         * Set the Metadata
         * @param aMetaField field to be modified
         * @param aValue value to be set
-        */            
-        IMPORT_C void SetMetadataL( CMManager::TSnapMetadataField aMetaField, 
-                                    TUint32 aValue );
+        */
+        IMPORT_C void SetMetadataL(
+                CMManager::TSnapMetadataField aMetadataField,
+                TUint32 aValue );
 
         /**
         * Set the protection level of the destination.
-        * @param aProtLevel new protection level 
+        * @param aProtLevel new protection level
         */
         IMPORT_C void SetProtectionL( CMManager::TProtectionLevel aProtLevel );
 
@@ -275,13 +259,13 @@
         * Set if the destination is hidden or not.
         * @param aHidden - ETrue if destination is hidden
         */
-        IMPORT_C void SetHiddenL( TBool aHidden );         
+        IMPORT_C void SetHiddenL( TBool aHidden );
 
         /**
         * Update all values of the destination and its connection method.
         * Nothing if stored, if update leaves due to any reason.
         */
-        IMPORT_C void UpdateL();               
+        IMPORT_C void UpdateL();
 
         /**
         * Delete destination and its connection methods from CommsDat.
@@ -291,31 +275,48 @@
         IMPORT_C void DeleteLD();
 
         /**
-        * Create a connection method with given id that belongs to this destination.
-        * @param aImplementationUid - implementation uid (bearer type) of the 
+        * Create a connection method with given id that belongs to this
+        * destination.
+        * @param aImplementationUid - implementation uid (bearer type) of the
         * connection method to be created
         * @return newly created connection method or leaves with
         * KErrAlreadyExists if there exists CM with the same Id.
         */
-        IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aBearerType,
-                                                              TUint32 aConnMethId );
+        IMPORT_C RCmConnectionMethod CreateConnectionMethodL(
+                TUint32 aBearerType,
+                TUint32 aConnMethodId );
+
+        /**
+         * Gets the icon identifier(name) of the destination. It can
+         * contain path information. HBufC* ownership is passed to the caller.
+         * @return Returns pointer to a buffer which identifies the requested
+         * icon.
+         */
+        IMPORT_C HBufC* GetIconL() const;
+
+        /**
+         * Sets the icon identifier(name) of the destination. It can
+         * contain path information.
+         * @param aIcon Identifier of the destination icon.
+         */
+        IMPORT_C void SetIconL( const TDesC& aIcon );
+
+        /**
+        * Reload the contents of the destination from database.
+        * Any current changes made to the destination are lost.
+        * @return None.
+        */
+        IMPORT_C void RefreshL();
 
 
-    //=======================================================================
-    // Member variables
-    //
-    private: 
-        
-        /**
-         * the implementation class
-         */
-        CCmDestinationData* iDestinatonData;
+    private:
+        friend class RCmManager;
+        friend class RCmConnectionMethod;
 
     private:
-    
-        friend class RCmManager;
-        friend class RCmConnectionMethod;
+        CCmDestinationWrapper* iCmDestinationWrapper;
     };
-    
 
 #endif // DESTINATION_H
+
+// End of file
--- a/ipcm_pub/connection_settings_api/inc/cmmanager.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmmanager.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,26 +11,25 @@
 *
 * Contributors:
 *
-* Description:  Connection manager IF class.
+* Description:
+* Connection method manager IF class.
 *
 */
 
+
 #ifndef CMMANAGER_H
 #define CMMANAGER_H
 
-// System Includes
-#include <e32std.h>
 #include <e32base.h>
-#include <e32cmn.h>
 #include <cmdefconnvalues.h>
 #include <cmgenconnsettings.h>
 
-// Forward Declarations
+// Forward declarations
 class RCmConnectionMethod;
 class RCmDestination;
-class CCmManagerImpl;
 class TBearerPriority;
-class CGulIcon;
+class RCmManagerApi;
+
 
 /**
  *  RCmManager gives access to network destinations and connection methods.
@@ -38,51 +37,40 @@
  *  @lib cmmanager.lib
  *  @since S60 v3.2
  */
-NONSHARABLE_CLASS(RCmManager)
-      {          
-    //=====================================================================
-    // Constructors/Destructors
-    // 
+NONSHARABLE_CLASS( RCmManager )
+    {
     public:
-    
         /**
-        * Default constructor. 
+        * Default constructor.
         */
         inline RCmManager();
 
-    //=====================================================================
-    // API functions
-    public:
-        
         /**
         * Symbian constructor
         *
         * @since S60 3.2
         */
-        IMPORT_C void OpenL();    
-        
+        IMPORT_C void OpenL();
+
         /**
         * Symbian constructor
         * Pushes the object on the cleanup stack
         *
         * @since S60 3.2
         */
-        IMPORT_C void OpenLC();    
-        
+        IMPORT_C void OpenLC();
+
         /**
         * Secondary destructor
         *
         * @since S60 3.2
         */
         IMPORT_C void Close();
-        
-    //=======================================================================
-    // Getter API
-    public:    
-      
+
+    public:
         /**
         * Used to query bearer information that doesn't belong
-        * to a specific connection method, such as 
+        * to a specific connection method, such as
         * ECmCoverage or ECmDefaultPriority etc.
         *
         * @since S60 3.2
@@ -90,13 +78,13 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C TUint32 GetBearerInfoIntL( TUint32 aBearerType,
-                                  TUint32 aAttribute ) const;
-                                  
-        
+        IMPORT_C TUint32 GetBearerInfoIntL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+
         /**
         * Used to query bearer information that doesn't belong
-        * to a specific connection method, such as 
+        * to a specific connection method, such as
         * ECmCoverage or ECmDefaultPriority etc.
         *
         * @since S60 3.2
@@ -104,11 +92,13 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C TBool GetBearerInfoBoolL( TUint32 aBearerType,
-                                 TUint32 aAttribute ) const;
+        IMPORT_C TBool GetBearerInfoBoolL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+
         /**
         * Used to query bearer information that doesn't belong
-        * to a specific connection method, such as 
+        * to a specific connection method, such as
         * ECmCoverage or ECmDefaultPriority etc.
         * HBuf ownership is passed to the caller
         *
@@ -116,12 +106,14 @@
         * @param aBearerType the bearer
         * @param aAttribute the setting value
         * @return the setting value
-        */        
-        IMPORT_C HBufC* GetBearerInfoStringL( TUint32 aBearerType,
-                                    TUint32 aAttribute ) const;
+        */
+        IMPORT_C HBufC* GetBearerInfoStringL(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+
         /**
         * Used to query bearer information that does not belong
-        * to a specific connection method, such as 
+        * to a specific connection method, such as
         * ECmCoverage or ECmDefaultPriority, etc.
         * HBuf ownership is passed to the caller
         *
@@ -130,9 +122,10 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C HBufC8* GetBearerInfoString8L( TUint32 aBearerType,
-                                    TUint32 aAttribute ) const;
-                    
+        IMPORT_C HBufC8* GetBearerInfoString8L(
+                TUint32 aBearerType,
+                TUint32 aAttribute ) const;
+
         /**
         * Used to query any non-bearer specific information about
         * a given connection method. This can be e.g. ECmBearerType,
@@ -143,9 +136,10 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C TUint32 GetConnectionMethodInfoIntL( TUint32 aIapId,
-                                             TUint32 aAttribute ) const;
-        
+        IMPORT_C TUint32 GetConnectionMethodInfoIntL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
+
         /**
         * Used to query any, non-bearer specific information about
         * a given connection method. This can be e.g. ECmBearerType,
@@ -156,8 +150,9 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C TBool GetConnectionMethodInfoBoolL( TUint32 aIapId,
-                                            TUint32 aAttribute ) const;
+        IMPORT_C TBool GetConnectionMethodInfoBoolL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
 
         /**
         * Used to query any non-bearer specific information about
@@ -170,8 +165,9 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C HBufC* GetConnectionMethodInfoStringL( TUint32 aIapId,
-                                               TUint32 aAttribute ) const;
+        IMPORT_C HBufC* GetConnectionMethodInfoStringL(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
 
         /**
         * Used to query any non-bearer specific information about
@@ -184,9 +180,10 @@
         * @param aAttribute the setting value
         * @return the setting value
         */
-        IMPORT_C HBufC8* GetConnectionMethodInfoString8L( TUint32 aIapId,
-                                               TUint32 aAttribute ) const;
-                
+        IMPORT_C HBufC8* GetConnectionMethodInfoString8L(
+                TUint32 aIapId,
+                TUint32 aAttribute ) const;
+
         /**
         * Returns the connection method queried by its ID
         *
@@ -194,53 +191,54 @@
         * @param aConnectionMethodId id of the connection method
         * @return RCmConnectionMethod connection method
         */
-        IMPORT_C RCmConnectionMethod ConnectionMethodL( 
-                                     TUint32 aConnectionMethodId ) const;
-                        
+        IMPORT_C RCmConnectionMethod ConnectionMethodL(
+                TUint32 aConnectionMethodId ) const;
+
         /**
-        * Returns the list of connection methods. Connection Methods are 
+        * Returns the list of connection methods. Connection Methods are
         * filtered by the switch parameters e.g. aLegacyOnly.
         *
         * @since S60 3.2
         * @param aCMArray on return it is the array of IAP ids.
-        * @param aCheckBearerType If ETrue only connection methods with 
+        * @param aCheckBearerType If ETrue only connection methods with
         *                         supported bearer type are returned
         * @param aLegacyOnly when set to ETrue only Legacy IAP ids will
         *                         be returned
         * @param aEasyWlan when set to ETrue EasyWlan id is returned, too
         */
-        IMPORT_C void ConnectionMethodL( RArray<TUint32>& aCMArray, 
-                                         TBool aCheckBearerType = ETrue,
-                                         TBool aLegacyOnly = ETrue,
-                                         TBool aEasyWlan = EFalse ) const;
-        
+        IMPORT_C void ConnectionMethodL(
+                RArray<TUint32>& aCmArray,
+                TBool aCheckBearerType = ETrue,
+                TBool aLegacyOnly = ETrue,
+                TBool aEasyWlan = EFalse ) const;
+
         /**
         * Returns an array of all destination id's
         *
         * @since S60 3.2
         * @param aDestArray list all available destinations' id
-        */ 
+        */
         IMPORT_C void AllDestinationsL( RArray<TUint32>& aDestArray ) const;
 
         /**
-        * Returns the destination to which a specified 
+        * Returns the destination to which a specified
         * connection method belongs, search is by destination ID
         *
         * @since S60 3.2
         * @param aDestinationId id of destination
-        * @return RCmDestination network destination 
+        * @return RCmDestination network destination
         */
         IMPORT_C RCmDestination DestinationL( TUint32 aDestinationId ) const;
-       
+
         /**
         * Returns the copy of the bearer priority array. Ownership is passed.
         *
         * @since S60 3.2
         * @param aArray bearer priority array
-        */          
-        IMPORT_C void BearerPriorityArrayL( 
-                                   RArray<TBearerPriority>& aArray ) const;
-       
+        */
+        IMPORT_C void BearerPriorityArrayL(
+                RArray<TBearerPriority>& aArray ) const;
+
         /**
         * Clean up passed global bearer priority array. Delete
         * the elements and calls Reset and Close on the array.
@@ -248,9 +246,9 @@
         * @since S60 3.2
         * @param aArray array to be cleaned up
         */
-        IMPORT_C void CleanupGlobalPriorityArray( 
-                                   RArray<TBearerPriority>& aArray ) const;
-        
+        IMPORT_C void CleanupGlobalPriorityArray(
+                RArray<TBearerPriority>& aArray ) const;
+
         /**
         * Returns the id of the EasyWlan connection method.
         *
@@ -258,20 +256,20 @@
         * @return id of the EasyWLan connection method. 0 if not found.
         */
         IMPORT_C TUint32 EasyWlanIdL() const;
-        
+
         /**
         * Returns the default connection method/SNAP.
         *
         * @since S60 3.2
         */
-        IMPORT_C void ReadDefConnL( TCmDefConnValue& aDCSetting );
+        IMPORT_C void ReadDefConnL( TCmDefConnValue& aDefConnSetting );
 
         /**
         * Stores the default connection method/SNAP.
         *
         * @since S60 3.2
         */
-        IMPORT_C void WriteDefConnL( const TCmDefConnValue& aDCSetting );  
+        IMPORT_C void WriteDefConnL( const TCmDefConnValue& aDefConnSetting );
 
 
         /**
@@ -287,15 +285,15 @@
         * @since S60 9.2
         */
         IMPORT_C void WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
-        
-        
+
+
         /** Open session and create tables if they don't exist*/
-        IMPORT_C void CreateTablesAndOpenL();    
+        IMPORT_C void CreateTablesAndOpenL();
 
         /**
-        * Creates a Destination with the passed name. 
+        * Creates a Destination with the passed name.
         * @param aName the name of the new destination.
-        * @return RCmDestination new destination. ownership is passed to the 
+        * @return RCmDestination new destination. ownership is passed to the
         * caller
         */
         IMPORT_C RCmDestination CreateDestinationL( const TDesC& aName );
@@ -305,62 +303,69 @@
         * @param aImplementationUid - bearer type of the new connection method
         * @return RCmConnectionMethod newly created connection method.
         */
-        IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aBearerType );        
+        IMPORT_C RCmConnectionMethod CreateConnectionMethodL(
+                TUint32 aBearerType );
 
         /**
-        * Copies a connection method belonging to one destination to 
+        * Copies a connection method belonging to one destination to
         * another. The connection method becomes shared.
         * Calls UpdateL on the destination
         * @param aTargetDestination
         * @param aConnectionMethodId
         * @return TInt - index in the Connection Method list
         */
-        IMPORT_C TInt CopyConnectionMethodL( RCmDestination& aTargetDestination,
-                                             RCmConnectionMethod& aConnectionMethod );
+        IMPORT_C TInt CopyConnectionMethodL(
+                RCmDestination& aTargetDestination,
+                RCmConnectionMethod& aConnectionMethod );
 
         /**
-        * Moves a connection method belonging to one destination to 
+        * Moves a connection method belonging to one destination to
         * another. The connection method is removed from the source destination
         * @param aSourceDestination
         * @param aTargetDestination
         * @param aConnectionMethod
         * @return TInt - index in the Connection Method list
         */
-        IMPORT_C TInt MoveConnectionMethodL( RCmDestination& aSourceDestination,
-                                             RCmDestination& aTargetDestination,
-                                             RCmConnectionMethod& aConnectionMethod );
+        IMPORT_C TInt MoveConnectionMethodL(
+                RCmDestination& aSourceDestination,
+                RCmDestination& aTargetDestination,
+                RCmConnectionMethod& aConnectionMethod );
 
         /**
         * Remove connection method from the destination
         * @param aDestination destination the connection method is attached to
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveConnectionMethodL( RCmDestination& aDestination,
-                                               RCmConnectionMethod& aConnectionMethod );
+        IMPORT_C void RemoveConnectionMethodL(
+                RCmDestination& aDestination,
+                RCmConnectionMethod& aConnectionMethod );
 
         /**
-        * Removes connection method from every destination and make it 
+        * Removes connection method from every destination and make it
         * uncategorized.
         * @param aConnectionMethod connection method to be removed
         */
-        IMPORT_C void RemoveAllReferencesL( RCmConnectionMethod& aConnectionMethod );
+        IMPORT_C void RemoveAllReferencesL(
+                RCmConnectionMethod& aConnectionMethod );
 
         /**
         * Update bearer priority array
         * @param aArray array with new global bearer priority
-        */          
-        IMPORT_C void UpdateBearerPriorityArrayL( const RArray<TBearerPriority>& aArray );
+        */
+        IMPORT_C void UpdateBearerPriorityArrayL(
+                const RArray<TBearerPriority>& aArray );
 
         /**
-        * Creates a Destination with the passed name and id. 
+        * Creates a Destination with the passed name and id.
         * @param aName the name of the new destination.
         * @param aDestId Predefined id of the destination.
         * @return RCmDestination newly created destination or leaves with
         * KErrAlreadyExists if there exists CM with the same Id.
         * Ownership is passed to the caller.
         */
-        IMPORT_C RCmDestination CreateDestinationL( const TDesC& aName,
-                                                       TUint32      aDestId );
+        IMPORT_C RCmDestination CreateDestinationL(
+                const TDesC& aName,
+                TUint32 aDestId );
 
         /**
         * Creates a connection method does not belong to any destination
@@ -371,47 +376,50 @@
         * method or leaves with KErrAlreadyExists if there exists CM
         * with the same Id.
         */
-        IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aImplementationUid,
-                                                              TUint32 aConnMethodId );
+        IMPORT_C RCmConnectionMethod CreateConnectionMethodL(
+                TUint32 aBearerType,
+                TUint32 aConnMethodId );
 
         /**
         * Query all of the supported bearer types.
         * @param aArray list of all supported bearer types.
-        */          
+        */
         IMPORT_C void SupportedBearersL( RArray<TUint32>& aArray ) const;
 
         /**
-        * Returns "Uncategorized" icon.
-        * This fucton leaves if the client does not have a valid UI context
-        * @return CGulIcon* Icon of uncategorized connection methods. Ownership 
-        * is passed.
-        */          
-        IMPORT_C CGulIcon* UncategorizedIconL() const;
-        
+         * Gets the "Uncategorized" icon identifier(name). It can
+         * contain path information. HBufC* ownership is passed to the caller.
+         * @return Returns pointer to a buffer which identifies the requested
+         * icon.
+         */
+        IMPORT_C HBufC* GetUncategorizedIconL() const;
+
+
     private:
         /**
         * This is a private copy constructor without implementation.
-        * The sole purpose of this declaration is to forbid the copying of 
+        * The sole purpose of this declaration is to forbid the copying of
         * the objects of this class.
-        */          
-        RCmManager(RCmManager&  );
+        */
+        RCmManager( RCmManager& );
+
         /**
         * This is a private copy constructor without implementation.
-        * The sole purpose of this declaration is to forbid the copying of 
+        * The sole purpose of this declaration is to forbid the copying of
         * the objects of this class.
-        */          
+        */
         RCmManager& operator=( RCmManager& );
-    //=========================================================================
-    // Member data
-    
+
     private:
-    
-        /**
-         * the implementation class
-         */
-        CCmManagerImpl* iImplementation;
+        RCmManagerApi* iCmManagerApi;
     };
 
-#include "cmmanager.inl"
-    
+
+inline RCmManager::RCmManager() : iCmManagerApi( NULL )
+    {
+    }
+
+
 #endif // CMMANAGER_H
+
+// End of file
--- a/ipcm_pub/connection_settings_api/inc/cmmanager.inl	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +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:  implementation of cmmanager.h inline functions
-*
-*/
-
-
-// -----------------------------------------------------------------------------
-// RCmManager::RCmManager
-// -----------------------------------------------------------------------------
-//
-inline RCmManager::RCmManager()
-    : iImplementation(NULL)
-    {
-    }
--- a/ipcm_pub/connection_settings_api/inc/cmmanagerdef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmmanagerdef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,17 +11,19 @@
 *
 * Contributors:
 *
-* Description:  Definition module for Connection Method Manager
+* Description:
+* Definition module for Connection Method Manager.
 *
 */
 
+
 #ifndef CMMANAGERDEF_H
 #define CMMANAGERDEF_H
 
-// System includes
 #include <e32def.h>
 #include <e32std.h>
-           
+
+
 namespace CMManager
     {
     /**
@@ -159,22 +161,22 @@
 NONSHARABLE_CLASS( TBearerPriority )
     {
     public:
-        
+
         HBufC*     iServiceType;    /**<
                                     * Name of the service table to identify
-                                    * type of bearer 
+                                    * type of bearer
                                     */
-                                    
+
         TUint32    iPriority;       /**<
-                                    * Priority of the bearer. 
-                                    * Values must be unique within the table 
+                                    * Priority of the bearer.
+                                    * Values must be unique within the table
                                     */
-                                    
+
         TUint32    iUIPriority;     /**<
                                     * Priority of this bearer type when shown
-                                    * in UI for configuring a new IAP. 
-                                    * Values must be unique within the table 
+                                    * in UI for configuring a new IAP.
+                                    * Values must be unique within the table
                                     */
-    };       
-    
+    };
+
 #endif // CMMANAGERDEF_H
--- a/ipcm_pub/connection_settings_api/inc/cmpluginpacketdatadef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmpluginpacketdatadef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -11,7 +11,8 @@
 *
 * Contributors:
 *
-* Description:  packet data specific enums
+* Description:
+* Packet data specific enums.
 *
 */
 
@@ -274,13 +275,13 @@
                                     * ( TBool - default: None)
                                     */
 
-    EGPRSReqTrafficClass = 10200,   /**< 
+    EGPRSReqTrafficClass = 10200,   /**<
                                     * Requested traffic class
                                     * Defined in etelqos.h in RPacketQoS::TTrafficClass.
                                     * (TUint32 - default: ETrafficClassUnspecified)
                                     */
-    
-    EGPRSMinTrafficClass,           /**< 
+
+    EGPRSMinTrafficClass,           /**<
                                     * Minimum acceptable traffic class.
                                     * Defined in etelqos.h in RPacketQoS::TTrafficClass.
                                     * (TUint32 - default: ETrafficClassUnspecified)
--- a/ipcm_pub/connection_settings_api/inc/cmpluginvpndef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmpluginvpndef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -55,7 +55,8 @@
                                         */
         
         EVpnServicePolicyName = 30100,  /**<
-                                        * Policy name.
+                                        * Deprecated
+                                        * Always leaves with code KErrNotSupported.
                                         * (String - default: None)
                                         */
                                         
@@ -66,13 +67,27 @@
 
 
         EVpnIapId,                      /**<
+                                        * Provided for backward compatibility. 
+                                        * Use ECmNextLayerIapId instead.
+                                        *
                                         * Home IAP Id.
+                                        * 
+                                        * Setting will reset EVpnNetworkId and
+                                        * ECmNextLayerSNAPId to zero
+                                        * 
                                         * (TUint32 - default: None)
                                         */
 
         EVpnNetworkId,                  /**<
-                                        * Network Id.
-                                        * (TUint32 - default: None - read only)
+                                        * Provided for backward compatibility. 
+                                        * Use ECmNextLayerSNAPId instead.
+                                        * 
+                                        * Network Id. 
+                                        * 
+                                        * Setting will reset EVpnIapId and 
+                                        * ECmNextLayerIapId to zero.
+                                        * 
+                                        * (TUint32 - default: None)
                                         */
                                         
         EVpnServiceEnableLLMNR,         /**<
--- a/ipcm_pub/connection_settings_api/inc/cmpluginwlandef.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmpluginwlandef.h	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,8 @@
 *
 * Contributors:
 *
-* Description:  ?description
+* Description:
+* WLAN specific enums.
 *
 */
 
@@ -25,15 +26,15 @@
 
 namespace CMManager
     {
-    /** enumerations for WLAN network modes */
+    /** Enumerations for WLAN network modes. */
     enum TWlanNetMode
         {
         EAdhoc       = 0,   ///< Ad-Hoc mode
         EInfra       = 1    ///< Infrastructure mode
         };
-        
-    /** enumerations for WLAN security modes 
-     ** It's possible to extend this enumeration */
+
+    /** Enumerations for WLAN security modes.
+     ** It's possible to extend this enumeration. */
     enum TWlanSecMode
         {
         EWlanSecModeOpen    = 1,    ///< Open security mode
@@ -44,7 +45,33 @@
         EWlanSecModeWAPI    = 32    ///< WAPI security mode
         };
 
-    /** Wlan specific connection method attributes */
+    /** Enumerations for WLAN authentication modes.
+     ** It's possible to extend this enumeration. */
+    enum TWlanAuthMode
+        {
+        EWlanAuthModeOpen   = 0,
+        EWlanAuthModeShared = 1
+        };
+
+    /** Enumerations for WAPI pre-shared key format (ascii, hex).
+     ** It's possible to extend this enumeration. */
+    enum TWlanWapiPskFormat
+        {
+        EWlanWapiPskFormatAscii = 0,
+        EWlanWapiPskFormatHex
+        };
+
+    /** Enumerations for the WEP key indexes.
+     ** It's possible to extend this enumeration. */
+    enum TWepKeyIndex
+        {
+        EWepKeyIndex1 = 0, // Key number 1
+        EWepKeyIndex2,     // Key number 2
+        EWepKeyIndex3,     // Key number 3
+        EWepKeyIndex4      // Key number 4
+        };
+
+    /** WLAN specific connection method attributes. */
     enum TConnectionMethodWlanSpecificAttributes
         {
         /**
@@ -56,27 +83,27 @@
         /**
         * IP net mask of interface.
         * ( String - default: None)
-        */        
+        */
         EWlanIpNetMask,
-            
+
         /**
-        * IP address of gateway
+        * IP address of gateway.
         * ( String - default: None)
         */
         EWlanIpGateway,
-            
+
         /**
         * Get IP addresses (for EPOC) from server?
         * ( TBool - default: None)
         */
         EWlanIpAddrFromServer,
-        
+
         /**
         * IP address of EPOC.
         * ( String - default: None)
         */
         EWlanIpAddr,
-        
+
         /**
         * Get DNS addresses from server?
         * ( TBool - default: None)
@@ -88,149 +115,204 @@
         * ( String - default: None)
         */
         EWlanIpNameServer1,
-            
+
         /**
         * IP Address of secondary name server.
         * ( String - default: None)
         */
         EWlanIpNameServer2,
-        
+
         /**
         * Get IP6 DNS addresses from server?
         * ( TBool - default: None)
         */
         EWlanIp6DNSAddrFromServer,
-        
+
         /**
         * IP6 Address of primary name server.
         * ( String - default: None)
         */
         EWlanIp6NameServer1,
-        
+
         /**
         * IP6 Address of secondary name server.
         * ( String - default: None)
         */
         EWlanIp6NameServer2,
-        
+
         /**
-        * IP address valid from this time, used to store 
+        * IP address valid from this time, used to store
         * dynamically assigned address lease info.
         * ( String - default: None)
         */
         EWlanIpAddrLeaseValidFrom,
-            
+
         /**
         * IP address valid for use until this time, used to store
         * dynamically assigned address lease info.
         * ( String - default: None)
         */
         EWlanIpAddrLeaseValidTo,
-            
+
         /**
-        * Name of the ECOM configuration daemon manager component. 
-        * This component interfaces with the server identified in 
-        * ISP_CONFIG_DAEMON_NAME. If specified, ISP_CONFIG_DAEMON_NAME 
-        * should also be specified. 
+        * Name of the ECOM configuration daemon manager component.
+        * This component interfaces with the server identified in
+        * ISP_CONFIG_DAEMON_NAME. If specified, ISP_CONFIG_DAEMON_NAME
+        * should also be specified.
         * ( String - default: None)
         */
         EWlanConfigDaemonManagerName,
-            
+
         /**
-        * Name of the configuration daemon server. 
-        * This server is used to provide further configuration for 
-        * a connection, e.g. dynamic IP address assignment. 
-        * If specified, ISP_CONFIG_DAEMON_MANAGER_NAME should also 
+        * Name of the configuration daemon server.
+        * This server is used to provide further configuration for
+        * a connection, e.g. dynamic IP address assignment.
+        * If specified, ISP_CONFIG_DAEMON_MANAGER_NAME should also
         * be specified.
         * ( String - default: None)
         */
         EWlanConfigDaemonName,
-            
+
         /**
         * Name of the WLAN Service Extension table.
         * ( String - default: None)
         */
         EWlanServiceExtensionTableName,
-            
+
         /**
         * The record ID of the linked WLAN Service Extension record in the
         * WLAN Service Extension table.
         * ( TUint32 - default: None)
         */
         EWlanServiceExtensionTableRecordId,
-        
+
         /**
         * Marks the beginning of WLAN specific attributes.
         */
         EWlanSpecificAttributes = 30000,
-            
+
         /**
         * The record ID to which IAP record these settings belong to.
         * ( TUint32 - default: None)
         */
         EWlanServiceId = 30100,
-            
+
         /**
         * The connection mode. This can be either Ad-hoc or infrastructure.
         * TWlanNetMode enum is to be used.
         * ( TUint32 - default: EInfra )
         */
         EWlanConnectionMode,
-            
+
         /**
         * The SSID of this WLAN connection.
         * ( String - default: None)
         */
         EWlanSSID,
-            
+
         /**
         * Used SSID.
         * ( String - default: None)
         */
         EWlanUsedSSID,
-            
+
         /**
         * The security mode of this WLAN connection. It is a TWlanSecMode enum.
         * ( TUint32 - default: EWlanSecModeOpen )
         */
         EWlanSecurityMode,
-            
+
         /**
-        * Authentication type: none, wep, wpa, wpapresharedkey
-        * ( TUint32 - default: None )
+        * Authentication mode: Defined in TWlanAuthMode.
+        * ( TUint32 - default: EWlanAuthModeOpen )
         */
         EWlanAuthenticationMode,
-            
+
         /**
         * Gives whether it should scan for the SSID.
         * (TBool - default: EFalse )
         */
         EWlanScanSSID,
-        
+
         /**
         * This is the channel ID in ad-hoc network mode
         * ( TUint32 - default: EAdhocAutomatic, if set to EAdhocUserDefined default = 7 )
         */
         EWlanChannelID,
-        
+
         /**
         * Gives whether it is allowed to roam inside one SSID or not.
         * (TBool - default: determined through variation )
         */
         EWlanAllowSSIDRoaming,
-        
-            
-        // The following attributes before EWlanRangeMax are for internal use only
+
+        /**
+        * WEP key data.
+        * Key data is in hex-format (0-9, A-F, length 10 or 26).
+        * String (8-bit)
+        */
+        EWlanWepKey1InHex = 31000,
+        EWlanWepKey2InHex,
+        EWlanWepKey3InHex,
+        EWlanWepKey4InHex,
+
+        /**
+        * WEP key data.
+        * Key data is in ascii-format (length 5 or 13).
+        * String (8-bit)
+        */
+        EWlanWepKey1InAscii,
+        EWlanWepKey2InAscii,
+        EWlanWepKey3InAscii,
+        EWlanWepKey4InAscii,
+
+        /**
+        * Used WEP key.
+        * TWepKeyIndex
+        */
+        EWlanWepKeyIndex,
+
+        /**
+        * Is unencrypted mode allowed in 802.1x.
+        * TBool
+        */
+        EWlan802_1xAllowUnencrypted = 31050,
+
+        /**
+        * WPA pre-shared key usage.
+        * TBool
+        */
+        EWlanEnableWpaPsk = 31100,
+
+        /**
+        * WPA pre-shared key.
+        * String (8-bit)
+        */
+        EWlanWpaPreSharedKey,
+
+        /**
+        * WAPI pre-shared key data.
+        * String (8-bit)
+        */
+        EWlanWapiPsk = 31150,
+
+        /**
+        * The format of the WAPI key (ascii, hex)
+        * TWlanWapiKeyFormat
+        */
+        EWlanWapiPskFormat,
+
+        // The following attributes before EWlanRangeMax are for internal use only.
         /**
         * Internal limiter
         */
         EWlanRangeInternal = 35000,
-            
+
         /**
         * Internal, used for the security settings.
         */
         EWlanSecuritySettings,
-        
+
         /**
         * Marks the end of WLAN attributes.
         */
--- a/ipcm_pub/connection_settings_api/inc/cmsettingsui.h	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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:  Implementation of settings UI
-*
-*/
-
-#ifndef C_CMSETTINGSUI_H
-#define C_CMSETTINGSUI_H
-
-#include <e32def.h>
-#include <e32base.h>
-
-class CCmSettingsUiImpl;
-
-/**
- *  Implementation of Setting UI
- *
- *  @lib cmmanager.lib
- *  @since S60 v3.2
- */
-NONSHARABLE_CLASS(CCmSettingsUi) : public CBase
-    {
-    public:
-
-        enum TResult
-                {
-                EBack,
-                EExit
-                };
-
-        /** Epoc constructor */
-        IMPORT_C static CCmSettingsUi* NewL();
-
-        /** Destructor */
-        virtual ~CCmSettingsUi();
-
-    //=========================================================================    
-    // UI API
-    //
-    public:
-
-        /**
-        * Launches the Settings UI 
-        * for handling Destinations and Connection Methods
-        * @since 3.2
-        * @return TResult - the softkey the user exited with
-        */
-        IMPORT_C TResult RunSettingsL();
-        
-        /**
-        * Launches a dialog with a list of Destination
-        * @since 3.2
-        * @param  aDestinationId ID of the selected Destination
-        * @return TBool
-        */
-        IMPORT_C TBool SelectDestinationDlgL( TUint32& aDestinationId );
-
-    private:
-
-        /** First stage constructor */
-        CCmSettingsUi();
-
-        /** Epoc constructor */
-        void ConstructL();
-
-    private: // data
-
-        CCmSettingsUiImpl* iImpl;
-    };
-
-#endif // C_CMSETTINGSUI_H
--- a/ipcm_pub/extendedconnpref_api/inc/extendedconnpref.h	Thu Aug 19 10:18:49 2010 +0300
+++ b/ipcm_pub/extendedconnpref_api/inc/extendedconnpref.h	Tue Aug 31 15:35:44 2010 +0300
@@ -259,8 +259,11 @@
     IMPORT_C TBool DisconnectDialog() const;
 
     /**
-    * Enables or disables Connection selection dialog. Only the SNAPs/IAPs
-    * matching with BearerSet are shown in the dialog.
+    * DEPRECATED
+    *
+    * Enables or disables Connection selection dialog, but since the
+    * Connection selection dialog is deprecated functionality, this
+    * method gets the Internet SNAP chosen if set as enabled.
     * By default, Connection selection dialog is disabled.
     *
     * If Connection selection dialog is enabled, SNAP id shall be zero.
@@ -271,14 +274,20 @@
     * selection dialog shall be enabled.
     *
     * @param aConnSelectionDialog Indicates whether Connection selection
-    *                             dialog is enabled or disabled.
+    * dialog is enabled or disabled.
+    * @deprecated since Symbian^4 
     */
     IMPORT_C void SetConnSelectionDialog( TBool aConnSelectionDialog );
 
     /**
-    * Indicates whether Connection selection dialog is enabled.
+    * DEPRECATED
+    *
+    * Indicates whether Connection selection dialog is enabled. This
+    * function holds no value since the usage of the Connection selection
+    * dialog is deprecated, thus this function is deprecated also.
     *
     * @return Indicates whether Connection selection dialog is enabled.
+    * @deprecated since Symbian^4
     */
     IMPORT_C TBool ConnSelectionDialog() const;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipconnmgmt.pro	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Qt project file for ipconnmgmt package.
+#
+
+TEMPLATE = subdirs
+
+CONFIG += ordered
+
+SUBDIRS  += \
+    ipcm_plat \
+    connectionutilities \
+    cmmanager \
+    connectionmonitoring
+
+symbian {
+    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"./group/bld.inf\""
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/bwins/flextimerclientu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,31 @@
+EXPORTS
+	?ConstructL@CFlexPeriodic@@AAEXXZ @ 1 NONAME ; void CFlexPeriodic::ConstructL(void)
+	?ConstructL@CFlexTimer@@IAEXXZ @ 2 NONAME ; void CFlexTimer::ConstructL(void)
+	?At@CFlexTimer@@QAEXABVTTime@@@Z @ 3 NONAME ; void CFlexTimer::At(class TTime const &)
+	?Configure@CFlexTimer@@QAEHVTTimeIntervalMicroSeconds@@@Z @ 4 NONAME ; int CFlexTimer::Configure(class TTimeIntervalMicroSeconds)
+	?AtUTC@RFlexTimer@@QAEXAAVTRequestStatus@@ABVTTime@@@Z @ 5 NONAME ; void RFlexTimer::AtUTC(class TRequestStatus &, class TTime const &)
+	?After@RFlexTimer@@QAEXAAVTRequestStatus@@VTTimeIntervalMicroSeconds32@@@Z @ 6 NONAME ; void RFlexTimer::After(class TRequestStatus &, class TTimeIntervalMicroSeconds32)
+	??1CFlexPeriodic@@UAE@XZ @ 7 NONAME ; CFlexPeriodic::~CFlexPeriodic(void)
+	?DoCancel@CFlexTimer@@MAEXXZ @ 8 NONAME ; void CFlexTimer::DoCancel(void)
+	?Configure@CFlexPeriodic@@QAEHVTTimeIntervalMicroSeconds@@0@Z @ 9 NONAME ; int CFlexPeriodic::Configure(class TTimeIntervalMicroSeconds, class TTimeIntervalMicroSeconds)
+	?After@CFlexTimer@@QAEXVTTimeIntervalMicroSeconds@@@Z @ 10 NONAME ; void CFlexTimer::After(class TTimeIntervalMicroSeconds)
+	?Configure@CFlexTimer@@QAEHVTTimeIntervalMicroSeconds32@@@Z @ 11 NONAME ; int CFlexTimer::Configure(class TTimeIntervalMicroSeconds32)
+	?After@CFlexTimer@@QAEXVTTimeIntervalMicroSeconds32@@@Z @ 12 NONAME ; void CFlexTimer::After(class TTimeIntervalMicroSeconds32)
+	?Configure@CFlexPeriodic@@QAEHVTTimeIntervalMicroSeconds32@@0@Z @ 13 NONAME ; int CFlexPeriodic::Configure(class TTimeIntervalMicroSeconds32, class TTimeIntervalMicroSeconds32)
+	?NewL@CFlexPeriodic@@SAPAV1@H@Z @ 14 NONAME ; class CFlexPeriodic * CFlexPeriodic::NewL(int)
+	?AtUTC@CFlexTimer@@QAEXABVTTime@@@Z @ 15 NONAME ; void CFlexTimer::AtUTC(class TTime const &)
+	??1RFlexTimer@@QAE@XZ @ 16 NONAME ; RFlexTimer::~RFlexTimer(void)
+	?After@RFlexTimer@@QAEXAAVTRequestStatus@@VTTimeIntervalMicroSeconds@@@Z @ 17 NONAME ; void RFlexTimer::After(class TRequestStatus &, class TTimeIntervalMicroSeconds)
+	?AfterTicks@RFlexTimer@@QAEXAAVTRequestStatus@@H@Z @ 18 NONAME ; void RFlexTimer::AfterTicks(class TRequestStatus &, int)
+	??0CFlexPeriodic@@AAE@H@Z @ 19 NONAME ; CFlexPeriodic::CFlexPeriodic(int)
+	?At@RFlexTimer@@QAEXAAVTRequestStatus@@ABVTTime@@@Z @ 20 NONAME ; void RFlexTimer::At(class TRequestStatus &, class TTime const &)
+	?Configure@RFlexTimer@@QAEHVTTimeIntervalMicroSeconds@@@Z @ 21 NONAME ; int RFlexTimer::Configure(class TTimeIntervalMicroSeconds)
+	?Cancel@RFlexTimer@@QAEXXZ @ 22 NONAME ; void RFlexTimer::Cancel(void)
+	?Configure@RFlexTimer@@QAEHVTTimeIntervalMicroSeconds32@@@Z @ 23 NONAME ; int RFlexTimer::Configure(class TTimeIntervalMicroSeconds32)
+	??0CFlexTimer@@IAE@H@Z @ 24 NONAME ; CFlexTimer::CFlexTimer(int)
+	?Start@CFlexPeriodic@@QAEXVTTimeIntervalMicroSeconds32@@0VTCallBack@@1@Z @ 25 NONAME ; void CFlexPeriodic::Start(class TTimeIntervalMicroSeconds32, class TTimeIntervalMicroSeconds32, class TCallBack, class TCallBack)
+	??1CFlexTimer@@UAE@XZ @ 26 NONAME ; CFlexTimer::~CFlexTimer(void)
+	?Start@CFlexPeriodic@@QAEXVTTimeIntervalMicroSeconds@@0VTCallBack@@1@Z @ 27 NONAME ; void CFlexPeriodic::Start(class TTimeIntervalMicroSeconds, class TTimeIntervalMicroSeconds, class TCallBack, class TCallBack)
+	?Connect@RFlexTimer@@QAEHXZ @ 28 NONAME ; int RFlexTimer::Connect(void)
+	??0RFlexTimer@@QAE@XZ @ 29 NONAME ; RFlexTimer::RFlexTimer(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/eabi/flextimerclientu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,42 @@
+EXPORTS
+	_ZN10CFlexTimer10ConstructLEv @ 1 NONAME
+	_ZN10CFlexTimer2AtERK5TTime @ 2 NONAME
+	_ZN10CFlexTimer5AfterE25TTimeIntervalMicroSeconds @ 3 NONAME
+	_ZN10CFlexTimer5AfterE27TTimeIntervalMicroSeconds32 @ 4 NONAME
+	_ZN10CFlexTimer5AtUTCERK5TTime @ 5 NONAME
+	_ZN10CFlexTimer8DoCancelEv @ 6 NONAME
+	_ZN10CFlexTimer9ConfigureE25TTimeIntervalMicroSeconds @ 7 NONAME
+	_ZN10CFlexTimer9ConfigureE27TTimeIntervalMicroSeconds32 @ 8 NONAME
+	_ZN10CFlexTimerC2Ei @ 9 NONAME
+	_ZN10CFlexTimerD0Ev @ 10 NONAME
+	_ZN10CFlexTimerD1Ev @ 11 NONAME
+	_ZN10CFlexTimerD2Ev @ 12 NONAME
+	_ZN10RFlexTimer10AfterTicksER14TRequestStatusi @ 13 NONAME
+	_ZN10RFlexTimer2AtER14TRequestStatusRK5TTime @ 14 NONAME
+	_ZN10RFlexTimer5AfterER14TRequestStatus25TTimeIntervalMicroSeconds @ 15 NONAME
+	_ZN10RFlexTimer5AfterER14TRequestStatus27TTimeIntervalMicroSeconds32 @ 16 NONAME
+	_ZN10RFlexTimer5AtUTCER14TRequestStatusRK5TTime @ 17 NONAME
+	_ZN10RFlexTimer6CancelEv @ 18 NONAME
+	_ZN10RFlexTimer7ConnectEv @ 19 NONAME
+	_ZN10RFlexTimer9ConfigureE25TTimeIntervalMicroSeconds @ 20 NONAME
+	_ZN10RFlexTimer9ConfigureE27TTimeIntervalMicroSeconds32 @ 21 NONAME
+	_ZN10RFlexTimerC1Ev @ 22 NONAME
+	_ZN10RFlexTimerC2Ev @ 23 NONAME
+	_ZN10RFlexTimerD1Ev @ 24 NONAME
+	_ZN10RFlexTimerD2Ev @ 25 NONAME
+	_ZN13CFlexPeriodic10ConstructLEv @ 26 NONAME
+	_ZN13CFlexPeriodic4NewLEi @ 27 NONAME
+	_ZN13CFlexPeriodic5StartE25TTimeIntervalMicroSecondsS0_9TCallBackS1_ @ 28 NONAME
+	_ZN13CFlexPeriodic5StartE27TTimeIntervalMicroSeconds32S0_9TCallBackS1_ @ 29 NONAME
+	_ZN13CFlexPeriodic9ConfigureE25TTimeIntervalMicroSecondsS0_ @ 30 NONAME
+	_ZN13CFlexPeriodic9ConfigureE27TTimeIntervalMicroSeconds32S0_ @ 31 NONAME
+	_ZN13CFlexPeriodicC1Ei @ 32 NONAME
+	_ZN13CFlexPeriodicC2Ei @ 33 NONAME
+	_ZN13CFlexPeriodicD0Ev @ 34 NONAME
+	_ZN13CFlexPeriodicD1Ev @ 35 NONAME
+	_ZN13CFlexPeriodicD2Ev @ 36 NONAME
+	_ZTI10CFlexTimer @ 37 NONAME
+	_ZTI13CFlexPeriodic @ 38 NONAME
+	_ZTV10CFlexTimer @ 39 NONAME
+	_ZTV13CFlexPeriodic @ 40 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for Flexible timer client
+*
+*/
+
+/*
+* %version: 2 %
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../rom/flextimerclient.iby 	CORE_MW_LAYER_IBY_EXPORT_PATH(flextimerclient.iby)
+
+PRJ_MMPFILES
+flextimerclient.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/group/flextimerclient.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Flexible timer client
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include <platform_paths.hrh>
+
+TARGET              flextimerclient.dll
+TARGETTYPE          dll
+UID                 0x1000008D 0x2002C382
+
+CAPABILITY          CAP_GENERAL_DLL
+VENDORID            VID_DEFAULT
+
+SOURCEPATH          ../src
+
+SOURCE              rflextimer.cpp
+SOURCE              flextimer.cpp 
+SOURCE              flexperiodic.cpp
+
+USERINCLUDE         ../inc
+USERINCLUDE         ../../server/inc
+USERINCLUDE         ../traces
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/rom/flextimerclient.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Flexible timer client
+*
+*/
+#ifndef FLEXTIMERCLIENT_IBY
+#define FLEXTIMERCLIENT_IBY
+
+file=ABI_DIR\BUILD_DIR\flextimerclient.dll           SHARED_LIB_DIR\flextimerclient.dll
+
+#endif // FLEXTIMERCLIENT_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/src/flexperiodic.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexPeriodic class
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// System include files
+// User include files go here:
+#include "flexperiodic.h"
+#include "flextimercommon.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flexperiodicTraces.h"
+#endif
+
+// ======== MEMBER FUNCTIONS ========
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexPeriodic* CFlexPeriodic::NewL( TInt aPriority )
+    {
+
+    CFlexPeriodic* self = new ( ELeave ) CFlexPeriodic( aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexPeriodic::~CFlexPeriodic()
+    {
+    OstTrace1( TRACE_NORMAL, CFLEXPERIODIC_CFLEXPERIODIC,
+            "CFlexPeriodic::~CFlexPeriodic;this=%x", this );
+
+    }
+
+// ---------------------------------------------------------------------------
+// Starts the periodic timer. 32-bit delay and interval parameters.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexPeriodic::Start( TTimeIntervalMicroSeconds32 aDelay,
+                                    TTimeIntervalMicroSeconds32 anInterval,
+                                    TCallBack aCallBack,
+                                    TCallBack aCallBackError )
+    {
+    OstTraceExt4( TRACE_NORMAL, CFLEXPERIODIC_START32,
+            "CFlexPeriodic::Start32;this=%x;aDelay=%d;"
+            "anInterval=%d;aCallBack=%x", ( TUint )this,
+            aDelay.Int(), anInterval.Int(), ( TUint )&( aCallBack ) );
+
+    TTimeIntervalMicroSeconds32 zero( 0 );
+    __ASSERT_ALWAYS(aDelay >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicDelayLessThanZero));
+    __ASSERT_ALWAYS(anInterval > zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicIntervalTooSmall));
+    __ASSERT_ALWAYS( aCallBack.iFunction != NULL,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicCallbackFunctionIsNull));
+    // aCallBackError is left unasserted on purpose.
+    // if error occurs and callback is null client is paniced.
+
+    // Interval value is saved for later use, delay is sent immediately
+    // to the server.
+    iInterval = MAKE_TINT64( 0, anInterval.Int() );
+    iCallBack = aCallBack;
+    iCallBackError = aCallBackError;
+    CFlexTimer::After( aDelay );
+    }
+
+// ---------------------------------------------------------------------------
+// Starts the periodic timer. 64-bit delay and interval parameters.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexPeriodic::Start( TTimeIntervalMicroSeconds aDelay,
+                                    TTimeIntervalMicroSeconds anInterval,
+                                    TCallBack aCallBack,
+                                    TCallBack aCallBackError )
+    {
+    OstTraceExt4( TRACE_NORMAL, CFLEXPERIODIC_START64,
+            "CFlexPeriodic::Start64;this=%x;aDelay=%lld;"
+            "anInterval=%lld;aCallBack=%x", ( TUint )this,
+            aDelay.Int64(), anInterval.Int64(), ( TUint )&( aCallBack ) );
+
+    TTimeIntervalMicroSeconds zero( 0 );
+    __ASSERT_ALWAYS(aDelay >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicDelayLessThanZero));
+    __ASSERT_ALWAYS(anInterval > zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicIntervalTooSmall));
+    __ASSERT_ALWAYS( aCallBack.iFunction != NULL,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicCallbackFunctionIsNull));
+    // aCallBackError is left unasserted on purpose.
+    // if error occurs and callback is null client is paniced.
+    
+    // Interval value is saved for later use, delay is sent immediately
+    // to the server.
+    iInterval = anInterval.Int64();
+    iCallBack = aCallBack;
+    iCallBackError = aCallBackError;
+    CFlexTimer::After( aDelay );
+    }
+
+// ---------------------------------------------------------------------------
+// Configures the flex window sizes for both the initial delay and the
+// consequent intervals after that.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexPeriodic::Configure(
+                                 TTimeIntervalMicroSeconds32 aDelayWindow,
+                                 TTimeIntervalMicroSeconds32 aIntervalWindow )
+    {
+
+    OstTraceExt3( TRACE_NORMAL, CFLEXPERIODIC_CONFIGURE,
+            "CFlexPeriodic::Configure32;this=%x;"
+            "aDelayWindow=%d;aIntervalWindow=%d", ( TUint )this,
+            aDelayWindow.Int(), aIntervalWindow.Int() );
+
+    TTimeIntervalMicroSeconds32 zero( 0 );
+    __ASSERT_ALWAYS(aDelayWindow >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicDelayWindowLessThanZero));
+    __ASSERT_ALWAYS(aIntervalWindow >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicIntervalWindowLessThanZero));
+
+    // interval window is saved for later use. Delay window is sent
+    // immediately to server. 
+    TInt ret = CFlexTimer::Configure( aDelayWindow );
+    if ( ret == KErrNone )
+        {
+        // Interval window is changed only, if configuration is successful.
+        iIntervalWindow = MAKE_TINT64( 0, aIntervalWindow.Int() );
+        iSendConfigure = ETrue;
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Configures the flex window sizes for both the initial delay and the
+// consequent intervals after that. 64-bit version.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexPeriodic::Configure( 
+                                   TTimeIntervalMicroSeconds aDelayWindow,
+                                   TTimeIntervalMicroSeconds aIntervalWindow )
+    {
+    OstTraceExt3( TRACE_NORMAL, DUP1_CFLEXPERIODIC_CONFIGURE,
+            "CFlexPeriodic::Configure64;this=%x;"
+            "aDelayWindow=%lld;aIntervalWindow=%lld", ( TUint )this,
+            aDelayWindow.Int64(), aIntervalWindow.Int64() );
+
+    TTimeIntervalMicroSeconds zero( 0 );
+    __ASSERT_ALWAYS(aDelayWindow >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicDelayWindowLessThanZero));
+    __ASSERT_ALWAYS(aIntervalWindow >= zero,
+            User::Panic(KCFlexPeriodicPanicCat,
+                    EFlexPeriodicIntervalWindowLessThanZero));
+
+    // interval window is saved for later use. Delay window is sent
+    // immediately to server. 
+    TInt ret = CFlexTimer::Configure( aDelayWindow );
+    if ( ret == KErrNone )
+        {
+        // Interval window is changed only, if configuration is successful.
+        iIntervalWindow = aIntervalWindow;
+        
+        // This is set to true only, if the server is able to receive the
+        // delay window configuration.
+        iSendConfigure = ETrue;
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Handles the active objects request completion event.
+// ---------------------------------------------------------------------------
+//
+void CFlexPeriodic::RunL()
+    {
+    if ( KErrNone == iStatus.Int() )
+        {
+        if ( iSendConfigure )
+            {
+            OstTrace1( TRACE_NORMAL, CFLEXPERIODIC_RUNL,
+                    "CFlexPeriodic::RunL;this=%x", ( TUint )this );
+    
+            CFlexTimer::Configure( iIntervalWindow );
+            // Reset the iSendConfigure to false so that this is sent only once.
+            iSendConfigure = EFalse;
+            }
+        CFlexTimer::After( iInterval );
+        iCallBack.CallBack();
+        }
+    // Error happended in server. timer is not restarted and
+    // iCallBackError is called to inform user
+    else
+        {
+        if ( NULL != iCallBackError.iFunction )
+            {
+            iCallBackError.CallBack();
+            }
+        // User has not defined iCallBackError
+        // Panic client.
+        else
+            {
+            OstTrace1( TRACE_NORMAL, CFLEXPERIODIC_RUNL_PANIC,
+            "CFlexPeriodic::RunL;this=%x;"
+            "Error returned from FlexTimerServer and no Error CallBack"
+            " is defined. Panicing client.", ( TUint )this );
+            User::Panic( KCFlexPeriodicPanicCat,
+                        EFlexPeriodicErrorCallbackFunctionIsNull );
+            }
+        }
+    }
+// ---------------------------------------------------------------------------
+// Second part of the two-phase construction.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexPeriodic::ConstructL()
+    {
+    CFlexTimer::ConstructL();
+
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// Private constructor with priority.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexPeriodic::CFlexPeriodic( TInt aPriority ) :
+    CFlexTimer( aPriority ), iSendConfigure( EFalse )
+    {
+
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/src/flextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexTimer class
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+//#include <e32panic.h>
+
+#include "flextimer.h"
+#include "flextimerpanic.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerTraces.h"
+#endif
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexTimer::~CFlexTimer()
+    {
+    OstTrace1( TRACE_NORMAL, CFLEXTIMER_CFLEXTIMER,
+               "CFlexTimer::~CFlexTimer;this=%x", this );
+    
+    Cancel();
+    iTimer.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer at latest on the given interval. 32-bit interval.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::After( TTimeIntervalMicroSeconds32 aInterval )
+    {
+    OstTraceExt2( TRACE_NORMAL, CFLEXTIMER_AFTER32,
+                  "CFlexTimer::After32;this=%x;aInterval=%d",
+                  ( TUint )this, aInterval.Int() );
+    
+    __ASSERT_ALWAYS( IsAdded(),
+                     User::Panic( KCFlexTimerPanicCat, 
+                                  EFlexTimerNotAddedToActiveScheduler ) );
+    iTimer.After( iStatus, aInterval );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer at latest on the given interval. 64-bit interval.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::After( TTimeIntervalMicroSeconds aInterval )
+    {
+    OstTraceExt2( TRACE_NORMAL, CFLEXTIMER_AFTER64,
+                  "CFlexTimer::After64;this=%x;aInterval=%llu",
+                  ( TUint )this, aInterval.Int64() );
+    
+    __ASSERT_ALWAYS( IsAdded(),
+                     User::Panic(KCFlexTimerPanicCat,
+                                 EFlexTimerNotAddedToActiveScheduler ) );
+    iTimer.After( iStatus, aInterval );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer between at latest by the given time value.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::At( const TTime& aTime )
+    {
+    OstTraceExt2( TRACE_NORMAL, CFLEXTIMER_AT,
+                  "CFlexTimer::At;this=%x;aTime=%lld", ( TUint )this,
+                  aTime.Int64() );
+    
+    __ASSERT_ALWAYS( IsAdded(),
+                     User::Panic( KCFlexTimerPanicCat,
+                                  EFlexTimerNotAddedToActiveScheduler ) );
+    iTimer.At( iStatus, aTime );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer between at latest by the given time value.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::AtUTC( const TTime& aTime )
+    {
+    OstTraceExt2( TRACE_NORMAL, CFLEXTIMER_ATUTC,
+                  "CFlexTimer::AtUTC;this=%x;aTime=%lld",
+                  ( TUint )this, aTime.Int64() );
+    
+    __ASSERT_ALWAYS( IsAdded(),
+                     User::Panic(KCFlexTimerPanicCat,
+                                 EFlexTimerNotAddedToActiveScheduler ) );
+    iTimer.AtUTC( iStatus, aTime );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the window size in which alignment is possible for the timer.
+// This is a synchronous command. 32-bit function argument.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexTimer::Configure( TTimeIntervalMicroSeconds32 aWindowSize )
+    {
+    OstTraceExt2( TRACE_NORMAL, CFLEXTIMER_CONFIGURE,
+                  "CFlexTimer::Configure32;this=%x;aWindowSize=%d",
+                  ( TUint )this, aWindowSize.Int() );
+    
+    return iTimer.Configure( aWindowSize );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the window size in which alignment is possible for the timer.
+// This is a synchronous command. 64-bit function argument.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexTimer::Configure( TTimeIntervalMicroSeconds aWindowSize )
+    {
+    OstTraceExt2( TRACE_NORMAL, DUP1_CFLEXTIMER_CONFIGURE,
+                  "CFlexTimer::Configure64;this=%x;aWindowSize=%lld",
+                  ( TUint )this, aWindowSize.Int64() );
+    
+    return iTimer.Configure( aWindowSize );
+    }
+
+// ---------------------------------------------------------------------------
+// Constructs the object. Connects to the server and create a session.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::ConstructL()
+    {
+    OstTrace1( TRACE_NORMAL, CFLEXTIMER_CONSTRUCTL,
+               "CFlexTimer::ConstructL;this=%x", ( TUint )this );
+    
+    User::LeaveIfError(iTimer.Connect());
+    }
+
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexTimer::CFlexTimer( TInt aPriority ) :
+    CActive( aPriority )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Inherited from CActive. Handles the object canceling operations.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFlexTimer::DoCancel()
+    {
+    OstTrace1( TRACE_NORMAL, CFLEXTIMER_DOCANCEL,
+               "CFlexTimer::DoCancel;this=%x", ( TUint )this );
+    
+    iTimer.Cancel();
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/src/rflextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,383 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of RFlexTimer class
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+#include "rflextimer.h"
+#include "flextimercommon.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "rflextimerTraces.h"
+#endif
+
+
+_LIT( KFlexTimerSemaphoreName, "FlexTimerSemaphore" );
+
+// Semaphore count value initialization to 1. The 1st to call Wait() will
+// pass the semaphore. Other processes attempting entry will wait until the
+// 1st one has called Signal() on the semaphore.
+const TInt KPassFirstWaitEntry = 1;
+
+// ======== MEMBER FUNCTIONS ========
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C RFlexTimer::RFlexTimer()
+    {
+    OstTrace1( TRACE_NORMAL, RFLEXTIMER_RFLEXTIMER,
+               "RFlexTimer::RFlexTimer;this=%x", this );
+    
+    }
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C RFlexTimer::~RFlexTimer()
+    {
+    OstTrace1( TRACE_NORMAL, DUP1_RFLEXTIMER_RFLEXTIMER,
+               "RFlexTimer::~RFlexTimer;this=%x", ( TUint )this );
+    
+    Close();
+    }
+
+// ---------------------------------------------------------------------------
+// Connects to the server and create a session.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimer::Connect()
+    {
+    OstTrace1( TRACE_NORMAL, RFLEXTIMER_CONNECT,
+               "RFlexTimer::Connect;this=%x", ( TUint )this );
+    
+    // Not opened handle-number
+    const TInt kHandleNotOpened( 0 );
+    
+    // Starts the server, if it does not already exist in the system.
+    TInt ret = StartServer();
+
+    if ( ret == KErrNone )
+        { // No session, create it
+
+        // Handle() is zero when initialized RHandleBase. Close() also zeroes 
+        // the handle. If CreateSession() fails, Handle() is still zero.
+        // If session is created ok, the Handle() contains the (non zero)
+        // handle-number. 
+        //
+        // Handle() can be used for checking is the handle opened or not.
+        //
+        if ( Handle() == kHandleNotOpened )
+            {
+            // Creates the session for this client.
+            ret = CreateSession( KFlexTimerServerName,
+                                 Version(),
+                                 KFlexTimerServerMessageSlots );
+            }
+        else
+            { // Session already exists - panic.
+
+            OstTrace1( 
+                TRACE_NORMAL, 
+                DUP1_RFLEXTIMER_CONNECT,
+                "RFlexTimer::Connect already connected - PANIC;this=%x", 
+                ( TUint )this );
+        
+            User::Panic( KRFlexTimerPanicCat, EFlexTimerAlreadyConnected );
+            }
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Cancels any outstanding request to the server.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::Cancel()
+    {
+    OstTrace1( TRACE_NORMAL, RFLEXTIMER_CANCEL,
+               "RFlexTimer::Cancel;this=%x", ( TUint )this );
+    
+    SendReceive( EFlexTimerServCancelRequest );
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer at latest on the given interval. 32-bit interval.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::After( TRequestStatus& aStatus,
+                                 TTimeIntervalMicroSeconds32 aInterval )
+    {
+    OstTraceExt3( TRACE_NORMAL, RFLEXTIMER_AFTER32,
+                  "RFlexTimer::After32;this=%x;aStatus=%x;aInterval=%d",
+                  ( TUint )this, ( TUint )&( aStatus ), aInterval.Int() );
+    
+    const TTimeIntervalMicroSeconds32 ZERO_INTERVAL32(0);
+    __ASSERT_ALWAYS(aInterval >= ZERO_INTERVAL32,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerAfterIntervalLessThanZero));
+    
+    TIpcArgs args( aInterval.Int(), 0 );
+    //asynchronous request for timer creation and timeout request.    
+    SendReceive( EFlexTimerServAfterRequest, args, aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer at latest on the given interval. 64-bit interval.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::After( TRequestStatus& aStatus,
+                                 TTimeIntervalMicroSeconds aInterval )
+    {
+    OstTraceExt3( TRACE_NORMAL, RFLEXTIMER_AFTER64,
+                  "RFlexTimer::After64;this=%x;aStatus=%x;aInterval=%lld",
+                  ( TUint )this, ( TUint )&( aStatus ), aInterval.Int64() );
+    
+    const TTimeIntervalMicroSeconds ZERO_INTERVAL(0);
+    __ASSERT_ALWAYS(aInterval >= ZERO_INTERVAL,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerAfterIntervalLessThanZero));
+    
+    TIpcArgs args( I64LOW(aInterval.Int64()), I64HIGH(aInterval.Int64()) );
+    //asynchronous request for timer creation and timeout request.    
+    SendReceive( EFlexTimerServAfterRequest, args, aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer at latest after the given number of ticks.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::AfterTicks( TRequestStatus& aStatus, TInt aTicks )
+    {
+    OstTraceExt3( TRACE_NORMAL, RFLEXTIMER_AFTERTICKS,
+                  "RFlexTimer::AfterTicks;this=%x;aStatus=%d;aTicks=%d",
+                  ( TUint )this, ( TUint )&( aStatus ), aTicks );
+    
+    __ASSERT_ALWAYS(aTicks >= 0,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerAfterTicksIntervalLessThanZero));
+
+    TIpcArgs args( aTicks );
+    //asynchronous request for timer creation and timeout request.    
+    SendReceive( EFlexTimerServAfterTicksRequest, args, aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer between at latest by the given time value.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::At( TRequestStatus& aStatus, const TTime& aTime )
+    {
+    OstTraceExt3( TRACE_NORMAL, RFLEXTIMER_AT,
+                  "RFlexTimer::At;this=%x;aStatus=%d;aTime=%lld",
+                  ( TUint )this, ( TUint )&( aStatus ), aTime.Int64() );
+    
+    TTime nowTime;
+    nowTime.HomeTime();
+    
+    __ASSERT_ALWAYS(aTime >= nowTime,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerAtIntervalLessThanZero));
+    
+    TIpcArgs args( I64LOW(aTime.Int64()), I64HIGH(aTime.Int64()) );
+    //asynchronous request for timer creation and timeout request.    
+    SendReceive( EFlexTimerServAtRequest, args, aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// Fire timer between at latest by the given time value.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void RFlexTimer::AtUTC( TRequestStatus& aStatus, const TTime& aTime )
+    {
+    OstTraceExt3( TRACE_NORMAL, RFLEXTIMER_ATUTC,
+                  "RFlexTimer::AtUTC;this=%x;aStatus=%d;aTime=%lld",
+                  ( TUint )this, ( TUint )&( aStatus ), aTime.Int64() );
+    
+    TTime nowTime;
+    nowTime.UniversalTime();
+    
+    __ASSERT_ALWAYS(aTime >= nowTime,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerAtUTCIntervalLessThanZero));
+    
+    TIpcArgs args( I64LOW(aTime.Int64()), I64HIGH(aTime.Int64()) );
+    //asynchronous request for timer creation and timeout request.    
+    SendReceive( EFlexTimerServAtUTCRequest, args, aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the window size in which alignment is possible for the timer.
+// This is a synchronous command. 32-bit function version.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimer::Configure( TTimeIntervalMicroSeconds32 aWindowSize )
+    {
+    OstTraceExt2( TRACE_NORMAL, RFLEXTIMER_CONFIGURE,
+                  "RFlexTimer::Configure32;this=%x;aWindowSize=%d",
+                  ( TUint )this, aWindowSize.Int() );
+    
+    const TTimeIntervalMicroSeconds32 ZERO_INTERVAL32(0);
+    __ASSERT_ALWAYS(aWindowSize >= ZERO_INTERVAL32,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerWindowLessThanZero));
+    
+    TInt64 transfer = MAKE_TINT64( 0, aWindowSize.Int() );
+        
+    // Regardless of the user function, the window size is always transmitted
+    // as a 64-bit integer.
+    TIpcArgs args( EConfigureRequestWindowSize, 
+                   I64LOW(transfer), I64HIGH(transfer) );
+
+    return SendReceive( EFlexTimerServConfigureRequest, args );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the window size in which alignment is possible for the timer.
+// This is a synchronous command. 64-bit function version.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimer::Configure( TTimeIntervalMicroSeconds aWindowSize )
+    {
+    OstTraceExt2( TRACE_NORMAL, DUP1_RFLEXTIMER_CONFIGURE,
+                  "RFlexTimer::Configure64;this=%x;aWindowSize=%lld",
+                  ( TUint )this, aWindowSize.Int64() );
+    
+    const TTimeIntervalMicroSeconds ZERO_INTERVAL64(0);
+    __ASSERT_ALWAYS(aWindowSize >= ZERO_INTERVAL64,
+                    User::Panic(KRFlexTimerPanicCat,
+                                EFlexTimerWindowLessThanZero));
+    
+    // Regardless of the user function, the window size is always transmitted
+    // as a 64-bit integer.
+    TIpcArgs args( EConfigureRequestWindowSize,
+                   I64LOW(aWindowSize.Int64()),
+                   I64HIGH(aWindowSize.Int64()) );
+
+    return SendReceive( EFlexTimerServConfigureRequest, args  );
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the version number.
+// ---------------------------------------------------------------------------
+//
+TVersion RFlexTimer::Version() const
+    {
+    return ( TVersion( KFlexTimerServMajorVersionNumber,
+                       KFlexTimerServMinorVersionNumber,
+                       KFlexTimerServBuildVersionNumber ) );
+    }
+
+// ---------------------------------------------------------------------------
+// Connects to the server. If server does not exist, it is created.
+// ---------------------------------------------------------------------------
+//
+TInt RFlexTimer::StartServer()
+    {
+    OstTrace1( TRACE_NORMAL, RFLEXTIMER_STARTSERVER,
+               "RFlexTimer::StartServer;this=%x", ( TUint )this );
+    
+    TFindServer findServer( KFlexTimerServerName );
+    TFullName serverName;
+
+    // See if the server is already started. 
+    TInt ret = findServer.Next( serverName );
+    
+    if ( ret != KErrNone )
+        {
+        //Server was not found so create one.
+        RProcess serverProcess;
+        TBuf<1> serverParameters;
+
+        // Semaphore to guard the opening of the server process.
+        RSemaphore semaphore;
+
+        // Prevent two clients from  creating the serverProcess at the same
+        // time.
+        if ( ( ret = semaphore.CreateGlobal( 
+                KFlexTimerSemaphoreName, KPassFirstWaitEntry ) ) != KErrNone )
+            {
+            ret = semaphore.OpenGlobal( KFlexTimerSemaphoreName );
+            }
+
+        if ( ret == KErrNone )
+            {
+            semaphore.Wait();
+
+            // See again if the server is already started. This doublechecking
+            // is necessary, since two or processes may have resolved the
+            // first findserver before any server was created.
+
+            // TFindServer sets its content only when instantiated.
+            // Just using findServer.Next() does not work in here.
+            TFindServer findServerAgain( KFlexTimerServerName );
+            if ( findServerAgain.Next( serverName ) != KErrNone )
+                {
+                // Load the executable for the server.
+                ret = serverProcess.Create( KFlexTimerServerExe,
+                                            serverParameters,
+                                            EOwnerThread );
+
+                if ( ret == KErrNone )
+                    {
+                    // Server has been created successfully. It is initially 
+                    // in suspended state. Now resume the server process.
+                    serverProcess.Resume();
+
+                    // Wait until the server process has been started.
+                    TRequestStatus status;
+                    serverProcess.Rendezvous( status );
+                    User::WaitForRequest( status );
+
+                    // Check if server has panicked during initialization.
+                    ret = serverProcess.ExitType();
+                    if ( ret == EExitPanic )
+                        {
+                        OstTrace1( TRACE_NORMAL, DUP1_RFLEXTIMER_STARTSERVER,
+                                "RFlexTimer::StartServer;this=%x; "
+                                "ERROR: Server paniced",
+                                ( TUint )this );
+
+                        ret = KErrServerTerminated;
+                        }
+                    else
+                        {
+                        ret = status.Int();
+                        }
+
+                    // The server process stands on its own. This handle can
+                    // be closed. 
+                    serverProcess.Close();
+                    }
+                else
+                    {
+                    OstTrace1( TRACE_NORMAL, DUP2_RFLEXTIMER_STARTSERVER,
+                            "RFlexTimer::StartServer;this=%x; "
+                            "ERROR: Server creation failed",
+                            ( TUint )this );
+                    }
+                }
+            
+            semaphore.Signal();
+            semaphore.Close();
+            }
+        }
+
+    return ret;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,4 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/client/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,33 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_NORMAL=0x3
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_CFLEXPERIODIC=0x1
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_CONFIGURE=0x4
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_RUNL=0x6
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_RUNL_PANIC=0x7
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_START32=0x2
+[TRACE]TRACE_NORMAL[0x3]_CFLEXPERIODIC_START64=0x3
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_AFTER32=0x9
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_AFTER64=0xa
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_AT=0xb
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_ATUTC=0xc
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_CFLEXTIMER=0x8
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_CONFIGURE=0xd
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_CONSTRUCTL=0xf
+[TRACE]TRACE_NORMAL[0x3]_CFLEXTIMER_DOCANCEL=0x10
+[TRACE]TRACE_NORMAL[0x3]_DUP1_CFLEXPERIODIC_CONFIGURE=0x5
+[TRACE]TRACE_NORMAL[0x3]_DUP1_CFLEXTIMER_CONFIGURE=0xe
+[TRACE]TRACE_NORMAL[0x3]_DUP1_RFLEXTIMER_CONFIGURE=0x1c
+[TRACE]TRACE_NORMAL[0x3]_DUP1_RFLEXTIMER_CONNECT=0x14
+[TRACE]TRACE_NORMAL[0x3]_DUP1_RFLEXTIMER_RFLEXTIMER=0x12
+[TRACE]TRACE_NORMAL[0x3]_DUP1_RFLEXTIMER_STARTSERVER=0x1e
+[TRACE]TRACE_NORMAL[0x3]_DUP2_RFLEXTIMER_STARTSERVER=0x1f
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_AFTER32=0x16
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_AFTER64=0x17
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_AFTERTICKS=0x18
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_AT=0x19
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_ATUTC=0x1a
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_CANCEL=0x15
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_CONFIGURE=0x1b
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_CONNECT=0x13
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_RFLEXTIMER=0x11
+[TRACE]TRACE_NORMAL[0x3]_RFLEXTIMER_STARTSERVER=0x1d
Binary file keepalive/flextimer/doc_pub/flextimer_for_clients.chm has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/classesfordox.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,51 @@
+// Dummy empty classes for Doxygen documentation (main for inheritance graphs)
+
+// Symbian Classes
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CActive : public CBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class RTimer : public RHandleBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CTimer : public CActive {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CPeriodic : public CTimer {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class RHandleBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class RSessionBase : public RHandleBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CServer2 : public CActive {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class CSession2 : public CBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class RThread : public RHandleBase {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TTime {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TTimeIntervalMicroSeconds {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TTimeIntervalMicroSeconds32 {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TCallBack {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TVersion {};
+
+/*! Symbian. http://developer.symbian.org/main/documentation/carbide/index.php */
+class TRequestStatus {};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/dox_base_settings.cfg	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,228 @@
+# Doxyfile 1.6.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING      = UTF-8
+PROJECT_NUMBER         =
+OUTPUT_DIRECTORY       =
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       =
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+STRIP_FROM_PATH        =
+STRIP_FROM_INC_PATH    =
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+QT_AUTOBRIEF           = YES
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                =
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+OPTIMIZE_FOR_FORTRAN   = NO
+OPTIMIZE_OUTPUT_VHDL   = NO
+EXTENSION_MAPPING      =
+BUILTIN_STL_SUPPORT    = NO
+CPP_CLI_SUPPORT        = NO
+SIP_SUPPORT            = NO
+IDL_PROPERTY_SUPPORT   = YES
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+TYPEDEF_HIDES_STRUCT   = NO
+SYMBOL_CACHE_SIZE      = 0
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = YES
+EXTRACT_ANON_NSPACES   = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES       = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       =
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+SHOW_FILES             = YES
+SHOW_NAMESPACES        = YES
+FILE_VERSION_FILTER    =
+LAYOUT_FILE            =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT_ENCODING         = UTF-8
+FILE_PATTERNS          = *.h *.cpp *.dox
+EXCLUDE                =
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       =
+EXCLUDE_SYMBOLS        =
+EXAMPLE_PATH           =
+EXAMPLE_PATTERNS       =
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = . 
+INPUT_FILTER           =
+FILTER_PATTERNS        =
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            =
+HTML_FOOTER            =
+HTML_STYLESHEET        =
+HTML_ALIGN_MEMBERS     = YES
+HTML_DYNAMIC_SECTIONS  = NO
+GENERATE_DOCSET        = NO
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+GENERATE_CHI           = NO
+CHM_INDEX_ENCODING     =
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+GENERATE_QHP           = NO
+QCH_FILE               =
+QHP_NAMESPACE          =
+QHP_VIRTUAL_FOLDER     = doc
+QHP_CUST_FILTER_NAME   =
+QHP_CUST_FILTER_ATTRS  =
+QHP_SECT_FILTER_ATTRS  =
+QHG_LOCATION           =
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+USE_INLINE_TREES       = NO
+TREEVIEW_WIDTH         = 250
+FORMULA_FONTSIZE       = 10
+SEARCHENGINE           = YES
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         =
+LATEX_HEADER           =
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = YES
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+LATEX_SOURCE_CODE      = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    =
+RTF_EXTENSIONS_FILE    =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             =
+XML_DTD                =
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+INCLUDE_PATH           =
+INCLUDE_FILE_PATTERNS  =
+SEARCH_INCLUDES        = YES
+EXPAND_AS_DEFINED      =
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES               =
+GENERATE_TAGFILE       =
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+MSCGEN_PATH            =
+HIDE_UNDOC_RELATIONS   = YES
+DOT_FONTNAME           = FreeSans
+DOT_FONTSIZE           = 10
+DOT_FONTPATH           =
+DOTFILE_DIRS           =
+DOT_GRAPH_MAX_NODES    = 50
+MAX_DOT_GRAPH_DEPTH    = 3
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_clients.cfg	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1329 @@
+# Doxyfile 1.5.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "Flexible Timers API"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 0.1.1
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = "panic=\par \"Panic code:\" \e" \
+                         "leave=\par \"Leave code:\" \e"
+
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is 
+# documented as struct with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code where the coding convention is that all structs are 
+# typedef'ed and only the typedef is referenced never the struct's name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be extracted 
+# and appear in the documentation as a namespace called 'anonymous_namespace{file}', 
+# where file will be replaced with the base name of the file that contains the anonymous 
+# namespace. By default anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = flextimer_for_clients.dox classesfordox.h ../client
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = .svn html
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = */.svn/* */.svn */traces/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = CActive                        \
+                         CBase                          \
+                         CPeriodic                      \
+                         CServer2                       \
+                         CSession2                      \
+                         CTimer                         \
+                         RHandleBase                    \
+                         RSessionBase                   \
+                         RThread                        \
+                         RTimer                         \
+                         TCallBack                      \
+                         TRequestStatus                 \
+                         TTime                          \
+                         TTimeIntervalMicroSeconds      \
+                         TTimeIntervalMicroSeconds32    \
+                         TVersion
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = ./pics
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH 
+# then you must also enable this option. If you don't then doxygen will produce 
+# a warning and turn it on anyway
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = "C:\Program Files\HTML Help Workshop\hhc.exe"
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = IMPORT_C= \
+                         EXPORT_C= \
+                         "NONSHARABLE_CLASS(name)=class name"
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = "C:\Program Files\Graphviz2.26.3\bin"
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the number 
+# of direct children of the root node in a graph is already larger than 
+# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_clients.dox	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Flexible timer documentation's main page
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+/**
+@mainpage
+
+@section mainGeneral General
+
+Flexible timers are timers for synchronizing network access. This is achieved
+by providing a timer service that instead of generating timeout at exact moment
+of time, generates timeout within given window of time. This allows several
+timeouts to be aligned, and only one wakeup is needed instead of many. This
+improves battery life. The improvement depends on the used bearer and its 
+configuration.
+
+Flexible timers are designed to provided similar API with existing Symbian
+timers (RTimer, CTimer and CPeriodic), and (besides they extend the interfaces
+by providing 64-bit interface for After(). I.e. using At() for longer than 35
+minutes timers is not required.
+
+@subsection mainYes When you should consider using Flexible timers 
+- If your timer can handle several minutes variation in expiration times @b AND
+- If your timer is used to trigger network connectivity @b AND
+- If your timer is long enough (> 5 min)
+
+@subsection mainNo Who should NOT use Flexible timers
+- If you need accurate timing (in resolution of minutes) @b OR
+- If your timer is too rapid, i.e. less than 5 minutes @b OR
+- If you need timeout when phone is powered off @b OR
+- If you need reboot-proof timeouts
+
+@section mainTimerWindow Concept
+
+The main idea of flexible timer concept is that timers can expire @a early.
+The time how much earlier timer can expire, is called @b timer @b expiration 
+@b window (or just window).
+
+For example, a timer that is started to expire after 10 minutes timer that 
+window is configured to 2 minutes can expire at any time between 8 to 10 
+minutes. See the figure below.
+
+\image html FlexTimerWindowConcept.png
+
+There are two reasons when timer can expire:
+-# The timer has reached the time it's set to be expired
+-# Another timer is expiring within this timer's window
+
+In picture below is shown two set of periodical timers; normal timers and
+flexible timers. Each time a timer expires, it causes network access.
+
+\image html FlexTimersExample.png
+
+The picture also illustrates main differences between using normal and flexible
+timers:
+- number of network initializations decreases (12 vs. 6).
+- timers are being "drifted" (e.g. interval of Timer 2 is actually 12 minutes)
+
+@section mainArchitecture Architecture
+
+In picture below is illustrated components of flexible timers.
+
+\image html FlexTimerComponents.png
+
+When a client uses flexible timers, the actual timer request is forwarded to
+Flex Timer Server using Symbian's inter process communication (IPC). The
+biggest difference to normal timers is that flexible timers actually are run in
+different process than the client as the normal timers are run in local thread.
+
+@section mainLimitations Limitations of flexible timers
+
+@subsection mainTimerAccuracy Timer Accuracy
+
+Although the timer can be set to expire in 1 microsecond accuracy, the actual
+accuracy can vary from 1/64 second (one system tick) to 1 second. It depends
+when the timer is set; timers are "rounded" to the next full second.
+
+This implies that e.g. 1 microsecond periodic timer's period is 1 second; not
+1 microsecond.
+
+As the flexible timer's implementation relies on system ticks, it's possible 
+that the timer expires 1/64 second (one system tick) too early.
+
+I.e. the timer can expire from -1/64 second to +1 second when it is set.
+
+@note If timer accuracy at this resolution is concern for you, you should not
+use flexible timers at all. Use normal timers instead.
+
+@subsection mainMinValue Minimum timer value
+
+The minimum timer value is 0 microsecond. Only exception is CFlexPeriodic's
+interval that can be 1 microseconds. 
+
+@subsection mainMaxValue Maximum timer value
+
+Maximum value for timer is 2 years (i.e. 730 days, 63072000 seconds).
+
+@subsection mainMinWindow Minimum window value
+
+The minimum value for timer window is zero microseconds.
+
+@subsection mainMaxWindow Maximum window value
+
+The maximum value for timer window is two years (i.e. 730 days, 63072000 
+seconds). 
+
+The default value for window is 20% of the timer's value (e.g. 10 minutes timer
+has 2 minutes default window).
+
+@subsection mainTimerDrifting Timer drifting
+
+As the timer expiration can happen in timer expiration window, it usually
+causes periodic timers to "drift".
+
+For example:
+
+@c CPeriodic is started at 8 o'clock with 30 minute interval.
+It will then expire at 8.30, 9.00, ... 15.30, 16.00
+
+If @c CFlexPeriodic is used as a timer it can possibly expire at
+8.30, 9.00, 9.28, 9.55, ... 15.15, 15.42 etc. 
+
+@subsection mainReboot Reboot-proof
+
+Flexible timers are @b not reboot-proof. I.e. after reboot all timers has to
+be set again.
+
+@section mainHowTo How to start using flexible timers
+
+The flexible timer API is designed to be as similar to normal Symbian timers
+as possible. 
+
+In the table below is described Symbian OS timer and its corresponding flexible
+timer.
+
+<table border=1 bordercolor="#84B0C7" cellspacing="0" align="center">
+<tr><td><b>Symbian OS timer</b></td><td><b>Flexible timer</b></td></tr>
+<tr><td><code>CPeriodic</code></td><td><code>CFlexPeriodic</code></td></tr>
+<tr><td><code>CTimer</code></td><td><code>CFlexTimer</code></td></tr>
+<tr><td><code>RTimer</code></td><td><code>RFlexTimer</code></td></tr>
+</table>
+
+Using of flexible timer is easy and fun. There are only three following steps;
+
+-# Add following line to MMP-file
+   @code 
+   LIBRARY flextimer.lib 
+   @endcode
+-# Include flexible timer's header to your code files, e.g. for periodic timer
+   @code
+   #include <flexperiodic.h>
+   @endcode
+-# Convert the used Symbian OS timers to flexible timers, e.g.
+   @code
+   //Old: CPeriodic* myTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+   CFlexPeriodic* myTimer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+   ...
+   // By default the window is 20% of timer's values
+   myTimer->Start( myDelay, myInterval, myCallback ); // No changes
+   ...
+   myTimer->Cancel(); // No changes
+   delete myTimer; // No changes
+
+   @endcode
+
+More examples available in flexible timer's class documentation.
+
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/flextimer_for_devs.cfg	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,70 @@
+# Doxyfile 1.6.1
+
+@INCLUDE = dox_base_settings.cfg
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+PROJECT_NAME           = Flexible Timers & Timer Alignment Engine
+FULL_PATH_NAMES        = NO # YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = classesfordox.h \
+                         ..\
+
+RECURSIVE              = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+# These options affect the class and function descriptions
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO # YES
+REFERENCED_BY_RELATION = NO # YES
+REFERENCES_RELATION    = NO # YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the Windows help file generation
+#---------------------------------------------------------------------------
+
+# If this is NO, the rest of the help file generation options are not evaluated 
+GENERATE_HTMLHELP      = YES
+CHM_FILE               = ..\FlexTimerInternal.chm
+HHC_LOCATION           = "C:\Program Files\HTML Help Workshop\hhc.exe"
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If this is NO, the rest of the preprocessor options are not evaluated 
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = YES
+PREDEFINED             = IMPORT_C= \
+                         EXPORT_C= \
+                         "NONSHARABLE_CLASS(name)=class name"
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+# These parameters govern the type and amount of graphs in the document.
+#---------------------------------------------------------------------------
+
+# If this is NO, the rest of the graph options are not evaluated 
+HAVE_DOT               = YES
+
+CLASS_DIAGRAMS         = YES
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = YES
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = "C:\Program Files\Graphviz2.26.3\bin"
Binary file keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimerComponents.png has changed
Binary file keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimerWindowConcept.png has changed
Binary file keepalive/flextimer/doc_pub/flextimer_for_clients_doxygen/pics/FlexTimersExample.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build info for flex timer modules.
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+#include "../client/group/bld.inf"
+#include "../server/group/bld.inf"
+
+PRJ_TESTMMPFILES
+#include "../test/testflextimer/group/bld.inf"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/bwins/flextimerengineu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	?NewL@CFlexTimerEngine@@SAPAV1@XZ @ 1 NONAME ; class CFlexTimerEngine * CFlexTimerEngine::NewL(void)
+	?AddTimer@CFlexTimerEngine@@UAEHABVTTimeIntervalMicroSeconds@@0HPBVMFlexTimerServiceCB@@@Z @ 2 NONAME ; int CFlexTimerEngine::AddTimer(class TTimeIntervalMicroSeconds const &, class TTimeIntervalMicroSeconds const &, int, class MFlexTimerServiceCB const *)
+	?CancelTimer@CFlexTimerEngine@@UAEHPBVMFlexTimerServiceCB@@@Z @ 3 NONAME ; int CFlexTimerEngine::CancelTimer(class MFlexTimerServiceCB const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/eabi/flextimerengineu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,15 @@
+EXPORTS
+	_ZN16CFlexTimerEngine11CancelTimerEPK19MFlexTimerServiceCB @ 1 NONAME
+	_ZN16CFlexTimerEngine4NewLEv @ 2 NONAME
+	_ZN16CFlexTimerEngine8AddTimerERK25TTimeIntervalMicroSecondsS2_iPK19MFlexTimerServiceCB @ 3 NONAME
+	_ZTI14CFlexTimerItem @ 4 NONAME
+	_ZTI16CFlexTimerEngine @ 5 NONAME
+	_ZTI19CFlexTimerContainer @ 6 NONAME
+	_ZTI21CFlexTimerWakeUpTimer @ 7 NONAME
+	_ZTV14CFlexTimerItem @ 8 NONAME
+	_ZTV16CFlexTimerEngine @ 9 NONAME
+	_ZTV19CFlexTimerContainer @ 10 NONAME
+	_ZTV21CFlexTimerWakeUpTimer @ 11 NONAME
+	_ZThn4_N16CFlexTimerEngine11CancelTimerEPK19MFlexTimerServiceCB @ 12 NONAME
+	_ZThn4_N16CFlexTimerEngine8AddTimerERK25TTimeIntervalMicroSecondsS2_iPK19MFlexTimerServiceCB @ 13 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for Flexible timer engine
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../rom/flextimerengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(flextimerengine.iby)
+
+PRJ_MMPFILES
+flextimerengine.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/group/flextimerengine.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Flexible timer
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include <platform_paths.hrh>
+
+TARGET              flextimerengine.dll
+TARGETTYPE          DLL
+UID                 0x1000008D 0x2002DCE7
+
+CAPABILITY          CAP_GENERAL_DLL
+VENDORID            VID_DEFAULT
+
+USERINCLUDE         ../inc
+USERINCLUDE         ../../inc
+USERINCLUDE         ../traces
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib
+LIBRARY             hal.lib
+
+SOURCEPATH ../src
+
+SOURCE flextimercontainer.cpp
+SOURCE flextimerengine.cpp
+SOURCE flextimeritem.cpp
+SOURCE flextimerwakeuptimer.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimercontainer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains definition of CFlexTimerContainer.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERCONTAINER_H
+#define FLEXTIMERCONTAINER_H
+
+// System includes
+#include <e32base.h>
+
+// Forward declarations
+class MFlexTimerServiceCB;
+class CFlexTimerItem;
+
+// Class declaration
+/**
+ *  Timer container that contains list of CFlexTimerItems, means to add and
+ *  delete them and implementation of algorithms that select which timers
+ *   should be expired.
+ */
+class CFlexTimerContainer : public CBase
+    {
+public:
+    /** Supported timer algorithms.*/
+    enum TFlexTimerAlgorithm
+        {
+        /** Simple algorithm timeouts all timers that have open timeout
+         * window when one timer expires.
+         */
+        EFlexTimerAlgorithmSimple = 1,
+        /** Latest possible algorithm tries to delay expiration of timer
+         * as long as possible.
+         */
+        EFlexTimerAlgorithmLatestPossible
+        };
+
+    /**
+     * Constructs new CFlexTimerContainer.
+     */
+    static CFlexTimerContainer* NewL();
+
+    /**
+     * Destructs timercontainer and all timers in the internal lists.
+     */
+    virtual ~CFlexTimerContainer();
+
+public:
+    /**
+     * Makes new timer item and adds it to timerlist.
+     *
+     * @param aWinStartInterval Time interval from present to left side of the
+     *  timer launch window
+     * @param aWinEndInterval Time interval from present to right side of the
+     *  timer launch window
+     * @param aCancelAtSystemTimeChange Whether system time change should
+     *  trigger abort
+     * @param aFlexTimerServiceCB Call back interface. Used to inform about
+     *  timeout, abort etc.
+     */
+    void AddTimerL(
+        const TTimeIntervalMicroSeconds& aWinStartInterval,
+        const TTimeIntervalMicroSeconds& aWinEndInterval,
+        TBool aCancelAtSystemTimeChange,
+        const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+    /**
+     * Finds correct timer according to aFlexTimerServiceCB and removes it
+     * from list and finally 
+     * deletes the corresponding CFlexTimerItem.
+     * @param aFlexTimerServiceCB Call back interface aka. session that
+     * handles timer.
+     * @return KErrNone or some system wide error code.
+     */
+    TInt RemoveTimer( const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+    /**
+     * Finds earliest moment that at least one timer must expire and after
+     * this function returns aNextTimeoutDelay contains number of microseconds
+     * from now to that moment.
+     *
+     * @param after return aNextTimeoutDelay contains time in microseconds
+     * from now till next timer expiry. If aNextTimeoutDelay is zero, it means
+     * that expiry time has already passed or is due right now
+     * @return Active timers indication
+     * - ETrue if there is at least one timer in queue
+     * - EFalse if there are no timers
+     */
+    TBool GetNextTimeout( TTimeIntervalMicroSeconds& aNextTimeoutDelay );
+
+    /**
+     * Fires all timers that can be fired according to algorithm that is
+     * supplied as parameter.
+     *
+     * @param aAlgorithmToBeUsed Algorithm that is used to fire timers.
+     * - EFlexTimerAlgorithmSimple
+     * - EFlexTimerAlgorithmLatestPossible
+     */
+    void FireTimers( TFlexTimerAlgorithm aAlgorithmToBeUsed );
+
+    /**
+     * Aborts and removes all timers that are marked with
+     * aCancelAtSystemTimeChange = ETrue during adding timer.
+     *
+     * @param aReason Timers will be aborted with this reason code. Can be
+     * e.g. KErrAbort
+     */
+    void AbortTimersDueToTimeChange( TInt aReason );
+
+private:
+    /**
+     * Private constructor.
+     */
+    CFlexTimerContainer();
+
+    /**
+     * Excecutes simple algorithm.
+     * 
+     * Moves timers (that can be fired right now) from iTimerList to
+     * candidateList.
+     * 
+     * @param aCandidateList After this function returns, this list contains
+     * all timers that can be fire right now.
+     * @param aCurrentTime Current safe UTC time.
+     */
+    void SimpleAlgorithm( TSglQue<CFlexTimerItem>& aCandidateList,
+        TTime& aCurrentTime );
+
+    /**
+     * Excecutes latest possible algorithm.
+     * 
+     * Moves timers (that don't necessarily be fired right now) from
+     * candidateList to iTimerList.
+     * 
+     * @param aCandidateList After this function returns, this list contains
+     * all timers that can be fire right now.
+     */
+    void LatestPossibleAlgorithm( TSglQue<CFlexTimerItem>& aCandidateList );
+
+    /**
+     * Fires all timers in aCandidateList. Calls Timeout() to all timers and
+     * deletes timer items.
+     * 
+     * @param aCandidateList Timers that are fired.
+     */
+    void ExpireTimers( TSglQue<CFlexTimerItem>& aCandidateList );
+
+    /**
+     * Gets current absolute time. The time in FlexTimer engine time base, not
+     * system time base. This time base is begins from the first call to
+     *  GetCurrentTime and it is base on system ticks.
+     * 
+     * @param aCurrentAbsoluteTime After this function returns this contains
+     * current flextimer timebase time.
+     */
+    void GetCurrentTime( TTime& aCurrentAbsoluteTime );
+
+    /**
+     * Converts microseconds interval to tick based reference time used by
+     * FlexTimer engine (also in microseconds). All FlexTimer timeout element
+     * time handling is based on this tick based absolute time.
+     *
+     * @param aInterval Interval to be converted.
+     */
+    inline TInt64 IntervalToAbsoluteTime(
+        const TTimeIntervalMicroSeconds& aInterval );
+
+    /**
+     * Converts ticks to microseconds.
+     *
+     * @param aTicks. Ticks to be converted to microseconds
+     */
+    inline TInt64 TicksToAbsoluteTime( TUint32 aTicks );
+
+private:
+    // Data
+    /**
+     * Linked list and iterator for all timer objects.
+     */
+    TSglQue<CFlexTimerItem> iTimerList;
+    
+    /**
+     * Length of system tick in milliseconds. The value is read once
+     * to member variable during construction of FlexTimerContainer so that
+     * it does not need be read every time the absolute time is calculated.
+     */
+    TInt iTickPeriod;
+     
+    /**
+     * Number of tics during the last time they were read. This is used to
+     * detect possible tick counter overflow and to calculate time passed
+     * since the last read.
+     */
+    TUint32 iLastTicks;
+    
+    /**
+     * Current FlexTimer engine time. This is system tick based time and
+     * it is updated every time someone request for it.
+     */
+    TInt64 iCurrentAbsoluteTime;
+    };
+
+#include "flextimercontainer.inl"
+
+#endif  //FLEXTIMERCONTAINER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimercontainer.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This file contains inline functions of FlexTimerContainer class.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERCONTAINER_INL
+#define FLEXTIMERCONTAINER_INL
+
+// ---------------------------------------------------------------------------
+// Converts micro seconds interval to tick based absolute time (also in micro
+// seconds). All flextimer item time handling in engine is based on this tick
+// based absolute time. Note that the time is not using system time base.
+// ---------------------------------------------------------------------------
+//
+inline TInt64 CFlexTimerContainer::IntervalToAbsoluteTime(
+    const TTimeIntervalMicroSeconds& aInterval )
+    {
+    TTime tempTime;
+    GetCurrentTime( tempTime );
+
+    return tempTime.Int64() + aInterval.Int64();
+    }
+// ---------------------------------------------------------------------------
+// Converts system ticks to microseconds. 
+// ---------------------------------------------------------------------------
+//
+inline TInt64 CFlexTimerContainer::TicksToAbsoluteTime( const TUint32 aTicks )
+    {
+    return static_cast<TInt64> ( aTicks )
+        * static_cast<TInt64> ( iTickPeriod );
+    }
+
+#endif  //FLEXTIMERCONTAINER_INL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimerengine.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains definition of CFlexTimerEngine.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERENGINE_H
+#define FLEXTIMERENGINE_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+#include "mflextimerservice.h"
+#include "mflextimerwakeuptimercb.h"
+
+// Forward declarations
+class MFlexTimerServiceCB;
+class CFlexTimerContainer;
+class CFlexTimerWakeUpTimer;
+
+// Class declaration
+/**
+ *  Flexible timer engine that acts as service point towards session.
+ *  Handles timer wakeups and system time changes.
+ */
+class CFlexTimerEngine : public CBase,
+        public MFlexTimerService,
+        public MFlexTimerWakeUpTimerCB
+    {
+public:
+
+    /**
+     * Constructs new timer engine.
+     */
+    IMPORT_C static CFlexTimerEngine* NewL();
+
+    /**
+     * Destructs timer item.
+     */
+    virtual ~CFlexTimerEngine();
+
+public:
+    /**
+     * Inherited from MFlexTimerService
+     */
+
+    /**
+     * Implementation of inherited pure virtual function
+     *  
+     * @see MFlexTimerService::AddTimer
+     */
+    IMPORT_C TInt AddTimer(
+        const TTimeIntervalMicroSeconds& aWinStartInterval,
+        const TTimeIntervalMicroSeconds& aWinEndInterval,
+        TBool aCancelAtSystemTimeChange,
+        const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+    /**
+     * Implementation of inherited pure virtual function
+     *  
+     * @see MFlexTimerService::CancelTimer
+     */
+    IMPORT_C TInt CancelTimer(
+        const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+    /**
+     * Inherited from MFlexTimerWakeUpTimerCB
+     */
+
+    /**
+     * Implementation of inherited pure virtual function
+     *  
+     * @see MFlexTimerWakeUpTimerCB::WakeUp
+     */
+    void WakeUp();
+
+    /**
+     * Implementation of inherited pure virtual function
+     *  
+     * @see MFlexTimerWakeUpTimerCB::SystemTimeChanged
+     */
+    void SystemTimeChanged();
+
+private:
+    /**
+     * Private constructor.
+     *  
+     */
+    CFlexTimerEngine();
+
+    /**
+     * Private 2nd pahse constructor.
+     *  
+     */
+    void ConstructL();
+
+    /**
+     * Finds out what is the next time we have to wake up to fire some
+     * FlexTimers and starts CTimer accordingly.
+     *  
+     */
+    void StartTimer();
+
+private:
+    // Data
+    /**
+     * Container for all timers. Lives and dies with engine.
+     */
+    CFlexTimerContainer* iFlexTimerContainer;
+
+    /**
+     * Wake up timer to watch flextimer firings and system time change
+     */
+    CFlexTimerWakeUpTimer* iWakeUpTimer;
+
+    };
+
+#endif  //FLEXTIMERENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimeritem.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains definition of CFlexTimerItem.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERITEM_H
+#define FLEXTIMERITEM_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+// None
+
+// Forward declarations
+class MFlexTimerServiceCB;
+
+// Class declaration
+/**
+ *  Timer item that contains expiry time, window size and other timer specific
+ *  parameters. Class implements container for one timer information in
+ *  FlexTimerServer.
+ */
+class CFlexTimerItem : public CBase
+    {
+public:
+
+    /** Constructor
+     *
+     * Constructs new timer item that contains all information needed to
+     * decide when to launch timer.
+     *
+     * @param aAbsoluteMinTime Left side of the timer launch window.
+     * @param aAbsoluteMaxTime Right side of the timer launch window.
+     * @param aCancelAtSystemTimeChange Whether system time change should
+     * trigger abort.
+     * @param aFlexTimerServiceCB Call back interface. Used to inform about
+     * timeout, abort etc.
+     * @return New CFlexTimer object.
+     */
+    static CFlexTimerItem* NewL( const TTime& aAbsoluteMinTime,
+        const TTime& aAbsoluteMaxTime,
+        TBool aCancelAtSystemTimeChange,
+        const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+    /** Destructor
+     * Destructs timer item.
+     */
+    virtual ~CFlexTimerItem();
+
+public:
+    /**
+     * Gets the earliest possible moment when this timer can expire. 
+     * Places value to reference parameter. 
+     *
+     * @param aMinAbsoluteTime After function returns this parameter contains
+     * absolute earliest moment when this timer can expire         
+     */
+    inline void GetMinAbsoluteTime( TTime& aMinAbsoluteTime );
+
+    /**
+     * Gets the latest possible moment when this timer must expire. 
+     * Places value to reference parameter. 
+     *
+     * @param aMaxAbsoluteTime After function returns this parameter contains
+     * absolute latest moment when this timer must expire       
+     */
+    inline void GetMaxAbsoluteTime( TTime& aMaxAbsoluteTime );
+
+    /**
+     * Checks whether this timer should be aborted if system time changes
+     *
+     * @return 
+     * ETrue - If timer should be aborted when system time changes
+     * EFalse - If timer should not be cancelled when system time changes        
+     */
+    inline TBool IsAbortedAtSystemTimeChange();
+
+    /**
+     * Returns timers corresponding CB session pointer.
+     *
+     * @return pointer to session that initiated this timer       
+     */
+    const MFlexTimerServiceCB* GetCB();
+
+private:
+    /**
+     * Private contructor. Constructs new timer item that contains all
+     * information needed to decide when to launch timer.
+     *
+     * @param aAbsoluteMinTime Left side of the timer launch window.
+     * @param aAbsoluteMaxTime Right side of the timer launch window.
+     * @param aCancelAtSystemTimeChange Whether system time change should
+     * trigger abort.
+     * @param aFlexTimerServiceCB Call back interface. Used to inform about
+     * timeout, abort etc.
+     *
+     * @return New CFlexTimer object.
+     * 
+     */
+    CFlexTimerItem( const TTime& aAbsoluteMinTime,
+        const TTime& aAbsoluteMaxTime,
+        TBool aCancelAtSystemTimeChange,
+        const MFlexTimerServiceCB* aFlexTimerServiceCB );
+
+public:
+    //Data
+    /**
+     * Single linked list link object for timers lists
+     */
+    TSglQueLink iLink;
+
+private:
+    // Data
+    /**
+     * Whether timer should be aborted when system time changes.
+     */
+    TBool iAbortAtSystemTimeChange;
+
+    /**
+     * Left side of the time window when timer can be fired
+     */
+    TTime iAbsoluteMinTime;
+
+    /**
+     * Right side of the time window when timer can be fired
+     */
+    TTime iAbsoluteMaxTime;
+
+    /**
+     * pointer to the session interface that is used to inform timeout
+     */
+    const MFlexTimerServiceCB* iMFlexTimerServiceCB;
+    };
+
+#include "flextimeritem.inl"
+
+#endif  //FLEXTIMERITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimeritem.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This file contains inline functions of FlexTimerItem class.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERITEM_INL
+#define FLEXTIMERITEM_INL
+
+// ---------------------------------------------------------------------------
+// GetMinAbsoluteTime
+// ---------------------------------------------------------------------------
+//
+inline void CFlexTimerItem::GetMinAbsoluteTime( TTime& aMinAbsoluteTime )
+    {
+    aMinAbsoluteTime = iAbsoluteMinTime;
+    }
+// ---------------------------------------------------------------------------
+// GetMaxAbsoluteTime
+// ---------------------------------------------------------------------------
+//
+inline void CFlexTimerItem::GetMaxAbsoluteTime( TTime& aMaxAbsoluteTime )
+    {
+    aMaxAbsoluteTime = iAbsoluteMaxTime;
+    }
+// ---------------------------------------------------------------------------
+// IsAbortedAtSystemTimeChange
+// ---------------------------------------------------------------------------
+//
+inline TBool CFlexTimerItem::IsAbortedAtSystemTimeChange()
+    {
+    return iAbortAtSystemTimeChange;
+    }
+
+#endif  //FLEXTIMERITEM_INL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/flextimerwakeuptimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains definition of CFlexTimerWakeUpTimer.
+ *
+ */
+
+// Protection against nested includes
+#ifndef FLEXTIMERWAKEUPTIMER_H
+#define FLEXTIMERWAKEUPTIMER_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+// None
+
+// Forward declarations
+class MFlexTimerWakeUpTimerCB;
+
+// Class declaration
+/**
+ *  This class implements timer that is used to
+ *  - Inform timer engine that timeout algorithms should be excecuted
+ *  - Inform timer engine that system time has changed.
+ *
+ */
+class CFlexTimerWakeUpTimer : public CTimer
+    {
+public:
+
+    /**
+     * Contructs new wake up timer
+     * @param aObserver callback class
+     *
+     */
+    static CFlexTimerWakeUpTimer* NewL( MFlexTimerWakeUpTimerCB& aObserver );
+
+    /**
+     * Destructs wake up timer.
+     */
+    virtual ~CFlexTimerWakeUpTimer();
+
+public:
+    /**
+     * Starts timer. No need to cancel already running timer.
+     * @param aInterval time until timer should expire         
+     */
+
+    void StartTimer( TTimeIntervalMicroSeconds& aInterval );
+    
+    /**
+     * Stops timer.   
+     */
+    void StopTimer();
+
+    /**
+     * Inherited from CActive
+     * Handles timer expiration and callbacks.
+     */
+    void RunL();
+
+private:
+    // Functions
+    /**
+     * Private contructor.
+     * @param aObserver Callback class.         
+     */
+    CFlexTimerWakeUpTimer( MFlexTimerWakeUpTimerCB& aObserver );
+    /**
+     * Private 2nd phase contructor.   
+     */
+    void ConstructL();
+
+private:
+    // Data
+    /**
+     * Callback class
+     */
+    MFlexTimerWakeUpTimerCB& iObserver;
+
+    };
+
+#endif  //FLEXTIMERWAKEUPTIMER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/inc/mflextimerwakeuptimercb.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains definition of MFlexTimerWakeUpTimerCB
+ *
+ */
+
+// Protection against nested includes
+#ifndef MFLEXTIMERWAKEUPTIMERCB_H
+#define MFLEXTIMERWAKEUPTIMERCB_H
+
+// Class declaration
+/**
+ *  Callback functions for FlexTimer engine wake up timers. If a client
+ *  wants to receive indicaitions from wake-up timer, it need to inherit
+ *  this interface and implement the callback methods.
+ */
+class MFlexTimerWakeUpTimerCB
+    {
+public:
+
+    /**
+     * This function is used to inform about timer expiry.
+     */
+    virtual void WakeUp() = 0;
+
+    /** Pure virtual functions*/
+    /**
+     * This function is used to inform about system time change.
+     */
+    virtual void SystemTimeChanged() = 0;
+    };
+
+#endif  //MFLEXTIMERWAKEUPTIMERCB_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/rom/flextimerengine.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Flexible timer
+*
+*/
+#ifndef FLEXTIMERENGINE_IBY
+#define FLEXTIMERENGINE_IBY
+
+file=ABI_DIR\BUILD_DIR\flextimerengine.dll           SHARED_LIB_DIR\flextimerengine.dll
+
+#endif // FLEXTIMERENGINE_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/src/flextimercontainer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,459 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains implementation of CFlexTimerContainer.
+ *
+ */
+
+// System include files
+#include <hal.h>
+
+// User include files
+#include "flextimercommon.h"
+#include "flextimercontainer.h"
+#include "flextimeritem.h"
+#include "mflextimerservicecb.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimercontainerTraces.h"
+#endif
+
+
+
+// This literal is only used by __ASSERT_DEBUG macro. Therefore, to prevent 
+// unnacessary warnings, it is not compiled into release builds.
+#ifdef _DEBUG
+static const TInt KCBNullPointer = 1;
+_LIT( KCBNullPointerDescriptor, "FlexTimerService CB is NULL." );
+#endif
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+CFlexTimerContainer* CFlexTimerContainer::NewL()
+    {
+    CFlexTimerContainer* self = new (ELeave) CFlexTimerContainer();
+    
+    OstTrace1( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_NEWL,
+        "CFlexTimerContainer::NewL;this=%x",
+        ( TUint )self );
+    
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// destructor
+// If the list is not empty when coming here something has already gone wrong.
+// Lets just delete the timers and forget Timeout() calling
+// ---------------------------------------------------------------------------
+//
+CFlexTimerContainer::~CFlexTimerContainer()
+    {
+    CFlexTimerItem* item = NULL;
+    
+    OstTrace1(
+        TRACE_INTERNAL,
+        DUP1_CFLEXTIMERCONTAINER_CFLEXTIMERCONTAINER,
+        "CFlexTimerContainer::~CFlexTimerContainer;this=%x",
+        ( TUint )this );
+
+    while ( !iTimerList.IsEmpty() )
+        {
+        item = iTimerList.First();
+        iTimerList.Remove( *item );
+        delete item;
+        }
+    }
+// ---------------------------------------------------------------------------
+// Make new timer and add it to list. On purpose do not make sanity checks. 
+// Invalid(in the past) timers are found later.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::AddTimerL(
+    const TTimeIntervalMicroSeconds& aWinStartInterval,
+    const TTimeIntervalMicroSeconds& aWinEndInterval,
+    TBool aCancelAtSystemTimeChange,
+    const MFlexTimerServiceCB* aFlexTimerServiceCB )
+    {
+    OstTraceExt5( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_ADDTIMERL,
+        "CFlexTimerContainer::AddTimerL;this=%x;"
+        "aWinStartInterval=%Ld;"
+        "aWinEndInterval=%Ld;"
+        "aCancelAtSystemTimeChange=%u;"
+        "aFlexTimerServiceCB=%x",
+        ( TUint )this,
+        aWinStartInterval.Int64(),
+        aWinEndInterval.Int64(),
+        aCancelAtSystemTimeChange,
+        ( TUint )aFlexTimerServiceCB );
+    
+    __ASSERT_DEBUG( aFlexTimerServiceCB,
+            User::Panic( KCBNullPointerDescriptor, KCBNullPointer ) );
+
+    // Before creating new flextimer timeout item, the interval times are
+    // converted to absolute tick based time used by the engine.
+    TTime winAbsStart( IntervalToAbsoluteTime( aWinStartInterval ) );
+    TTime winAbsEnd( IntervalToAbsoluteTime( aWinEndInterval ) );
+    
+    CFlexTimerItem* newItem = CFlexTimerItem::NewL( winAbsStart,
+        winAbsEnd,
+        aCancelAtSystemTimeChange,
+        aFlexTimerServiceCB );
+
+    iTimerList.AddLast( *newItem );
+    }
+// ---------------------------------------------------------------------------
+// Loop through list and if timer containing same CB that is given as a
+// parameter is found, remove timer. If no timer found just return error code.
+// ---------------------------------------------------------------------------
+//
+TInt CFlexTimerContainer::RemoveTimer(
+    const MFlexTimerServiceCB* aFlexTimerServiceCB )
+    {
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_REMOVETIMER,
+        "CFlexTimerContainer::RemoveTimer;this=%x;aFlexTimerServiceCB=%x",
+        ( TUint )this,
+        ( TUint )aFlexTimerServiceCB );
+
+    __ASSERT_DEBUG( aFlexTimerServiceCB,
+        User::Panic( KCBNullPointerDescriptor, KCBNullPointer ) );
+    
+    TSglQueIter<CFlexTimerItem> listIter( iTimerList );
+    CFlexTimerItem* item = NULL;
+
+    listIter.SetToFirst();
+    // Iter++ makes iterator to point to next element if one exists.
+    // Otherwise NULL.
+    while ( (item = listIter++) != NULL )
+        {
+        if ( item->GetCB() == aFlexTimerServiceCB )
+            {
+            iTimerList.Remove( *item );
+            delete item;
+            return KErrNone;
+            }
+        }
+    return KErrNotFound;
+    }
+// ---------------------------------------------------------------------------
+// Loop through timers and find time/timer that must expire next
+// Calculate time left to that moment and return it. 
+// ---------------------------------------------------------------------------
+//
+TBool CFlexTimerContainer::GetNextTimeout(
+    TTimeIntervalMicroSeconds& aNextTimeoutDelay )
+    {
+    TSglQueIter<CFlexTimerItem> listIter( iTimerList );
+    TTime currentAbsoluteTime( 0 );
+    CFlexTimerItem* item = NULL;
+    TTime tempTime( 0 );
+    TTime nextTimeout( 0 );
+
+    GetCurrentTime( currentAbsoluteTime );
+    // Take first item as a reference value.
+    listIter.SetToFirst();
+    item = listIter++;
+    if ( item )
+        {
+        item->GetMaxAbsoluteTime( nextTimeout );
+        }
+
+    // Find the timer that needs to expire next, and set nextTimeout to the
+    // time, when the timer needs to expire.
+    while ( (item = listIter++) != NULL )
+        {
+        item->GetMaxAbsoluteTime( tempTime );
+        if ( tempTime < nextTimeout )
+            {
+            nextTimeout = tempTime;
+            }
+        }
+    // Calculate difference between now -> min timeout time. If in past,
+    // return zero interval
+    aNextTimeoutDelay = nextTimeout.MicroSecondsFrom( currentAbsoluteTime );
+    if ( aNextTimeoutDelay < TTimeIntervalMicroSeconds( 0 ) )
+        {
+        aNextTimeoutDelay = 0;
+        }
+    
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_GETNEXTTIMEOUT,
+        "CFlexTimerContainer::GetNextTimeout;this=%x;aNextTimeoutDelay=%Ld",
+        ( TUint )this,
+        aNextTimeoutDelay.Int64() );
+    
+    return !iTimerList.IsEmpty();
+    }
+// ---------------------------------------------------------------------------
+// Excecute selected algorithms and finally fire all timers in candidate list.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::FireTimers( TFlexTimerAlgorithm aAlgorithmToBeUsed )
+    {
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_FIRETIMERS,
+        "CFlexTimerContainer::FireTimers;this=%x;aAlgorithmToBeUsed=%x",
+        ( TUint )this,
+        ( TUint )aAlgorithmToBeUsed );
+
+    TSglQue<CFlexTimerItem> candidateList( _FOFF( CFlexTimerItem, iLink ) );
+
+    TTime currentAbsoluteTime( 0 );
+
+    GetCurrentTime( currentAbsoluteTime );
+    
+    // Simple algorithm is always executed
+    SimpleAlgorithm( candidateList, currentAbsoluteTime );
+
+    if ( EFlexTimerAlgorithmLatestPossible == aAlgorithmToBeUsed )
+        {
+        LatestPossibleAlgorithm( candidateList );
+        }
+    ExpireTimers( candidateList );
+    }
+
+//
+// ---------------------------------------------------------------------------
+// Loop through timer list, call abort to timer if it is abortable.
+// Then remove timer from list and delete it.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::AbortTimersDueToTimeChange( TInt aReason )
+    {
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_ABORTTIMERSDUETOTIMECHANGE,
+        "CFlexTimerContainer::AbortTimersDueToTimeChange;this=%x;aReason=%d",
+        ( TUint )this,
+        aReason );
+
+    TSglQueIter<CFlexTimerItem> listIter( iTimerList );
+    CFlexTimerItem* item = NULL;
+    listIter.SetToFirst();
+    
+    // Go through all timers and check if the timer has 
+    // AbortAtSystemTimeChange flag set, if so, abort the timer.
+    while ( (item = listIter++) != NULL )
+        {
+        if ( item->IsAbortedAtSystemTimeChange() )
+            {
+            item->GetCB()->Abort( aReason );
+            iTimerList.Remove( *item );
+            delete item;
+            }
+        }
+    }
+// ---------------------------------------------------------------------------
+// Constructor for CFlexTimerContainer
+// ---------------------------------------------------------------------------
+//
+CFlexTimerContainer::CFlexTimerContainer() :
+    iTimerList( _FOFF( CFlexTimerItem, iLink ) ),
+    iLastTicks( 0 ),
+    iCurrentAbsoluteTime( 0 )    
+    {
+    OstTrace1( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_CFLEXTIMERCONTAINER,
+        "CFlexTimerContainer::CFlexTimerContainer;this=%x",
+        ( TUint )this );
+    TInt err;
+    
+    // Get system tick length for converting tics to microseconds.
+    err = HAL::Get( HAL::ESystemTickPeriod, iTickPeriod );
+    
+    __ASSERT_ALWAYS(
+        err == KErrNone,
+        User::Panic(
+            KFlexTimerContainerPanicCat,
+            static_cast <TInt> ( EFlexTimerContainerNoTickPeriod ) ) );
+    }
+// ---------------------------------------------------------------------------
+// Loops through timer list and moves all timers that can be fired to
+// candidate list. Can be fired means that minimum time is reached. Note that
+// if we are late for some reason (very likely if someone has win size zero),
+// candidate list can now contain timers that are late (max time passed).
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::SimpleAlgorithm(
+    TSglQue<CFlexTimerItem>& aCandidateList,
+    TTime& aCurrentTime )
+    {
+    OstTraceExt3( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_SIMPLEALGORITHM,
+        "CFlexTimerContainer::SimpleAlgorithm;"
+        "this=%x;aCandidateList=%x;aCurrentTime=%Ld;",
+        ( TUint )this,
+        ( TUint )&aCandidateList,
+        aCurrentTime.Int64() );
+
+    TSglQueIter<CFlexTimerItem> listIter( iTimerList );
+    CFlexTimerItem* item = NULL;
+    TTime minTime( 0 );
+
+    listIter.SetToFirst();
+    // Iter++ makes iterator to point to next element if one exists.
+    // Otherwise NULL.
+    while ( (item = listIter++) != NULL )
+        {
+        item->GetMinAbsoluteTime( minTime );
+        if ( minTime <= aCurrentTime )
+            {
+            OstTraceExt2( TRACE_INTERNAL,
+                DUP1_CFLEXTIMERCONTAINER_SIMPLEALGORITHM,
+                "CFlexTimerContainer::SimpleAlgorithm - Adding item;"
+                "this=%x;item=%x",
+                ( TUint )this,
+                ( TUint )item );
+            // Remove from candidate list needs to be done before the
+            // item is added to back to iTimerList, because the lists
+            // use the same iLink member.
+            iTimerList.Remove( *item );
+            
+            // This timer can be timeouted, add it to timeout candidate list.
+            // The list is called candidate list, because the content of the
+            // list may be pruned by passing it to other algorithms for furher
+            // prosessing.
+            aCandidateList.AddLast( *item );
+            }
+        }
+    }
+
+//
+// ---------------------------------------------------------------------------
+// Loops through dropped list and candidate list and find timers where:
+// dropped timers right side of the window is earlier than candidate timers
+// right side of the window i.e. Candidate can be fired later with dropped
+// timer, without additional timer firings
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::LatestPossibleAlgorithm(
+    TSglQue<CFlexTimerItem>& aCandidateList )
+    {   
+    TSglQueIter<CFlexTimerItem> listIter( iTimerList );
+    TSglQueIter<CFlexTimerItem> candidateListIter( aCandidateList );
+    CFlexTimerItem* droppedItem = NULL;
+    CFlexTimerItem* candidateItem = NULL;
+    TTime droppedMaxTime( 0 );
+    TTime candidateMaxTime( 0 );
+    
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_LATESTPOSSIBLEALGORITHM,
+        "CFlexTimerContainer::LatestPossibleAlgorithm;"
+        "this=%x;aCandidateList=%x",
+        ( TUint )this,
+        ( TUint )&aCandidateList );
+    
+    listIter.SetToFirst();
+    candidateListIter.SetToFirst();
+            
+    droppedItem = listIter++;
+    
+    if ( droppedItem != NULL )
+        {
+        // Initiliaze next dropped timeout time to some value.
+        droppedItem->GetMaxAbsoluteTime( droppedMaxTime );
+
+        // Loop through dropped timers and find the dropped timer that will have
+        // shortest time to its timeout.
+        while ( (droppedItem = listIter++) != NULL )
+            {
+            droppedItem->GetMaxAbsoluteTime( candidateMaxTime );
+            if ( droppedMaxTime > candidateMaxTime )
+                {
+                droppedMaxTime = candidateMaxTime;
+                }
+            }
+
+        // Loop through candidate timers
+        while ( (candidateItem = candidateListIter++) != NULL )
+            {
+            candidateItem->GetMaxAbsoluteTime( candidateMaxTime );
+            // If candidate can be fired together with dropped timer ->
+            // don't fire candidate yet.
+            if ( droppedMaxTime <= candidateMaxTime )
+                {
+                OstTraceExt2( TRACE_INTERNAL,
+                    DUP1_CFLEXTIMERCONTAINER_LATESTPOSSIBLEALGORITHM,
+                    "CFlexTimerContainer::LatestPossibleAlgorithm -"
+                    " Removing item;this=%x;candidateItem=%x",
+                    ( TUint )this,
+                    ( TUint )candidateItem );
+
+                // Remove from candidate list needs to be done before the
+                // item is added to back to iTimerList, because the lists
+                // use the same iLink member.
+                aCandidateList.Remove( *candidateItem );
+                // Add to first so we don't handle this again.
+                iTimerList.AddFirst( *candidateItem );
+                }
+            }
+        }
+    }
+// ---------------------------------------------------------------------------
+// Loops through candidate list and calls timeout to all timers.
+// Then removes timer from list and deletes it. 
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::ExpireTimers(
+    TSglQue<CFlexTimerItem>& aCandidateList )
+    {
+    OstTraceExt2( TRACE_INTERNAL,
+        CFLEXTIMERCONTAINER_EXPIRETIMERS,
+        "CFlexTimerContainer::ExpireTimers;this=%x;candidateList=%x",
+        ( TUint )this,
+        ( TUint )&aCandidateList );
+
+    TSglQueIter<CFlexTimerItem> candidateListIter( aCandidateList );
+    CFlexTimerItem* item = NULL;
+
+    candidateListIter.SetToFirst();
+    // Iter++ makes iterator to point to next element if one exists.
+    // Otherwise NULL.
+    while ( (item = candidateListIter++) != NULL )
+        {
+        item->GetCB()->Timeout();
+        aCandidateList.Remove( *item );
+        delete item;
+        }
+    }
+// ---------------------------------------------------------------------------
+// Get current time return current time in FlexTimer engine time base. This
+// time base is begins from the first call to GetCurrentTime and it is base on
+// system ticks.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerContainer::GetCurrentTime( TTime& aAbsoluteTime )
+    {
+    TUint32 currentTicks = User::TickCount();
+
+    // Accumulate current absolute time with the time passed since last
+    // update. Both currentTicks and iLastTicks are unsigned int types, thus
+    // "currentTicks - iLastTicks" will handle also the case currentTicks
+    // overflows.
+    iCurrentAbsoluteTime += TicksToAbsoluteTime( currentTicks
+            - iLastTicks );
+        
+    iLastTicks = currentTicks;
+    
+    // N.B. Even though the time is is returned as TTime, this time has own
+    // time base. (See function description)
+    aAbsoluteTime = iCurrentAbsoluteTime;
+    }
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/src/flextimerengine.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains implementation of CFlexTimerEngine.
+ *
+ */
+
+// System include files
+// None
+
+// User include files
+#include "flextimerengine.h"
+#include "flextimercontainer.h"
+#include "flextimerwakeuptimer.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerengineTraces.h"
+#endif
+
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFlexTimerEngine* CFlexTimerEngine::NewL()
+    {
+    CFlexTimerEngine* self = new (ELeave) CFlexTimerEngine();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFlexTimerEngine::~CFlexTimerEngine()
+    {
+    OstTrace0( TRACE_INTERNAL,
+        CFLEXTIMERENGINE_CFLEXTIMERENGINE,
+        "CFlexTimerEngine::~CFlexTimerEngine" );
+
+    delete iFlexTimerContainer;
+    delete iWakeUpTimer;
+    }
+// ---------------------------------------------------------------------------
+// Add new timer and trap leave. Return Leave code to session.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexTimerEngine::AddTimer(
+    const TTimeIntervalMicroSeconds& aWinStartInterval,
+    const TTimeIntervalMicroSeconds& aWinEndInterval,
+    TBool aCancelAtSystemTimeChange,
+    const MFlexTimerServiceCB* aFlexTimerServiceCB )
+    {
+    TRAPD( err,
+        iFlexTimerContainer->AddTimerL( aWinStartInterval,
+            aWinEndInterval,
+            aCancelAtSystemTimeChange,
+            aFlexTimerServiceCB ) );
+
+    if ( KErrNone == err )
+        {
+        StartTimer();
+        }
+    return err;
+    }
+// ---------------------------------------------------------------------------
+// Remove timer from container queue and start new wakeup watch timer
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFlexTimerEngine::CancelTimer(
+    const MFlexTimerServiceCB* aFlexTimerServiceCB )
+    {
+    TInt error = iFlexTimerContainer->RemoveTimer( aFlexTimerServiceCB );
+    StartTimer();
+    
+    return error;
+    }
+
+// ---------------------------------------------------------------------------
+// Wakeup timer expired, Fire timers according to some algorithm set and
+// restart wakeup timer.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerEngine::WakeUp()
+    {
+    OstTrace0( TRACE_INTERNAL,
+        CFLEXTIMERENGINE_WAKEUP,
+        "CFlexTimerEngine::WakeUp" );
+    
+    iFlexTimerContainer->FireTimers(
+        CFlexTimerContainer::EFlexTimerAlgorithmLatestPossible );
+
+    StartTimer();
+    }
+// ---------------------------------------------------------------------------
+// System time is changed. Abort all timers that need to be aborted and
+// restart wakeup timer.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerEngine::SystemTimeChanged()
+    {
+    OstTrace0( TRACE_INTERNAL,
+        CFLEXTIMERENGINE_SYSTEMTIMECHANGED,
+        "CFlexTimerEngine::SystemTimeChanged" );
+    
+    iFlexTimerContainer->AbortTimersDueToTimeChange( KErrAbort );
+    StartTimer();
+    }
+// ---------------------------------------------------------------------------
+// Private constructor
+// ---------------------------------------------------------------------------
+//
+CFlexTimerEngine::CFlexTimerEngine() : iFlexTimerContainer( NULL ),
+    iWakeUpTimer( NULL )
+    {
+    OstTrace0( TRACE_INTERNAL,
+        DUP_CFLEXTIMERENGINE_CFLEXTIMERENGINE,
+        "CFlexTimerEngine::CFlexTimerEngine" );
+    //Nothing to do here
+    }
+// ---------------------------------------------------------------------------
+// Private 2nd phase construction
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerEngine::ConstructL()
+    {
+    iFlexTimerContainer = CFlexTimerContainer::NewL();
+    iWakeUpTimer = CFlexTimerWakeUpTimer::NewL( *this );
+    }
+// ---------------------------------------------------------------------------
+// Stop timer just in case it is already running (e.g. after AddTimer())
+// and Start new wakeup timer according to current situation in container
+// queues If timeout window has passed fire timers right now.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerEngine::StartTimer()
+    {
+    TTimeIntervalMicroSeconds nextTimeout;
+
+    // Stop the timer, because, if there are no more pending timeouts, the
+    // wake-up timer needs to be stopped. If timeouts are found, the timer is
+    // is restarted below.
+    iWakeUpTimer->StopTimer();
+
+    if ( iFlexTimerContainer->GetNextTimeout( nextTimeout ) )
+        {
+        // If timeout is in the future, timer is started to wake up at that
+        // moment.
+        if ( nextTimeout > TTimeIntervalMicroSeconds( 0 ) )
+            {
+            iWakeUpTimer->StartTimer( nextTimeout );
+            }
+        // If timer is due now or in the past, Lets fire those right now.
+        else
+            {
+            WakeUp();
+            }
+        }
+    // Else no timers, so no need for timeouts. Server is propably about to be
+    // deleted.
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/src/flextimeritem.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains implementation of CFlexTimerItem.
+ *
+ */
+
+// System include files
+// None
+
+// User include files go here:
+#include "flextimeritem.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimeritemTraces.h"
+#endif
+
+// ---------------------------------------------------------------------------
+// constructor
+// ---------------------------------------------------------------------------
+//
+CFlexTimerItem::CFlexTimerItem( const TTime& aAbsoluteMinTime,
+    const TTime& aAbsoluteMaxTime,
+    TBool aCancelAtSystemTimeChange,
+    const MFlexTimerServiceCB* aFlexTimerServiceCB ) :
+        iAbortAtSystemTimeChange( aCancelAtSystemTimeChange ),
+        iAbsoluteMinTime( aAbsoluteMinTime ),
+        iAbsoluteMaxTime( aAbsoluteMaxTime ),
+        iMFlexTimerServiceCB( aFlexTimerServiceCB )
+    {
+    OstTraceExt5( TRACE_INTERNAL,
+        CFLEXTIMERITEM_CFLEXTIMERITEM,
+        "CFlexTimerItem::CFlexTimerItem;this=%x;aAbsoluteMinTime=%Ld;"
+        "aAbsoluteMaxTime=%Ld;aCancelAtSystemTimeChange=%d;"
+        "aFlexTimerServiceCB=%x",
+        ( TUint )this,
+        aAbsoluteMinTime.Int64(),
+        aAbsoluteMaxTime.Int64(),
+        aCancelAtSystemTimeChange,
+        ( TUint )aFlexTimerServiceCB );
+
+    // Nothing to do - Coverity warning of uninitialize iLink.Next suppressed,
+    // because this should be initialized by TSglQueLink constructor.
+    // coverity[uninit_member]
+    }
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+CFlexTimerItem* CFlexTimerItem::NewL( const TTime& aAbsoluteMinTime,
+    const TTime& aAbsoluteMaxTime,
+    TBool aCancelAtSystemTimeChange,
+    const MFlexTimerServiceCB* aFlexTimerServiceCB )
+    {
+    CFlexTimerItem* self = new (ELeave) CFlexTimerItem( aAbsoluteMinTime,
+        aAbsoluteMaxTime,
+        aCancelAtSystemTimeChange,
+        aFlexTimerServiceCB );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// destructor, nothing to destruct
+// ---------------------------------------------------------------------------
+//
+CFlexTimerItem::~CFlexTimerItem()
+    {
+        OstTraceExt2( TRACE_INTERNAL,
+            DUP1_CFLEXTIMERITEM_CFLEXTIMERITEM,
+            "CFlexTimerItem::~CFlexTimerItem;this=%x;iMFlexTimerServiceCB=%x",
+            ( TUint )this,
+            ( TUint )iMFlexTimerServiceCB );
+    //Nothing to do here
+    }
+// ---------------------------------------------------------------------------
+// GetCB
+// ---------------------------------------------------------------------------
+//
+const MFlexTimerServiceCB* CFlexTimerItem::GetCB()
+    {
+    return iMFlexTimerServiceCB;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/src/flextimerwakeuptimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This class contains implementation of CFlexTimerWakeUpTimer.
+ *
+ */
+
+// System include files
+// None
+
+// User include files go here:
+#include "flextimerwakeuptimer.h"
+#include "mflextimerwakeuptimercb.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerwakeuptimerTraces.h"
+#endif
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+CFlexTimerWakeUpTimer* CFlexTimerWakeUpTimer::NewL(
+    MFlexTimerWakeUpTimerCB& aObserver )
+    {
+    CFlexTimerWakeUpTimer* self = new (ELeave) CFlexTimerWakeUpTimer(
+        aObserver );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+// ---------------------------------------------------------------------------
+// destructor, Cancel timer just in case it is still running.
+// ---------------------------------------------------------------------------
+//
+CFlexTimerWakeUpTimer::~CFlexTimerWakeUpTimer()
+    {
+    // Super class CTimer destructor Cancels any pending requests.
+    OstTrace0( TRACE_INTERNAL,
+        DUP1_CFLEXTIMERWAKEUPTIMER_CFLEXTIMERWAKEUPTIMER,
+        "CFlexTimerWakeUpTimer::~CFlexTimerWakeUpTimer" );
+    }
+// ---------------------------------------------------------------------------
+// Start timer so that it will expire aInterval after this moment.
+// UTC is used to get indications about system time change.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerWakeUpTimer::StartTimer( TTimeIntervalMicroSeconds& aInterval )
+    {
+    CTimer::Cancel();
+    TTime utcNow( 0 );
+
+    utcNow.UniversalTime();
+    utcNow = utcNow + aInterval;
+    
+    OstTraceExt1( TRACE_INTERNAL,
+        CFLEXTIMERWAKEUPTIMER_STARTTIMER,
+        "CFlexTimerWakeUpTimer::StartTimer;aInterval=%Ld",
+        aInterval.Int64() );
+
+    AtUTC( utcNow );
+    }
+// ---------------------------------------------------------------------------
+// just call Cancel. If timer is alreay running it will be stopped.
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerWakeUpTimer::StopTimer()
+    {
+    OstTrace0( TRACE_INTERNAL,
+        CFLEXTIMERWAKEUPTIMER_STOPTIMER,
+        "CFlexTimerWakeUpTimer::StopTimer" );
+
+    Cancel();
+    }
+// ---------------------------------------------------------------------------
+// KErrAbort comes if system time has changed. It is up to client to restart
+// timer
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerWakeUpTimer::RunL()
+    {
+    if ( KErrAbort == iStatus.Int() )
+        {
+        iObserver.SystemTimeChanged();
+        }
+    else
+        {
+        iObserver.WakeUp();
+        }
+    }
+// ---------------------------------------------------------------------------
+// Private constructor
+// ---------------------------------------------------------------------------
+//
+CFlexTimerWakeUpTimer::CFlexTimerWakeUpTimer(
+    MFlexTimerWakeUpTimerCB& aObserver ) :
+        CTimer( EPriorityStandard ), iObserver( aObserver )
+    {
+    OstTrace0( TRACE_INTERNAL,
+        CFLEXTIMERWAKEUPTIMER_CFLEXTIMERWAKEUPTIMER,
+        "CFlexTimerWakeUpTimer::CFlexTimerWakeUpTimer" );
+
+    //Nothing to do here
+    }
+// ---------------------------------------------------------------------------
+// Private 2nd phase construction
+// ---------------------------------------------------------------------------
+//
+void CFlexTimerWakeUpTimer::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    CTimer::ConstructL();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* OST trace definition header.
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/engine/traces/fixed_id.definitions	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]TRACE_INTERNAL=0x40
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_ABORTTIMERSDUETOTIMECHANGE=0x7
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_ADDTIMERL=0x3
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_CFLEXTIMERCONTAINER=0x8
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_EXPIRETIMERS=0xd
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_FIRETIMERS=0x6
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_GETNEXTTIMEOUT=0x5
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_LATESTPOSSIBLEALGORITHM=0xb
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_NEWL=0x1
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_REMOVETIMER=0x4
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERCONTAINER_SIMPLEALGORITHM=0x9
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERENGINE_CFLEXTIMERENGINE=0xe
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERENGINE_SYSTEMTIMECHANGED=0x10
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERENGINE_WAKEUP=0xf
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERITEM_CFLEXTIMERITEM=0x12
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERWAKEUPTIMER_CFLEXTIMERWAKEUPTIMER=0x17
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERWAKEUPTIMER_STARTTIMER=0x15
+[TRACE]TRACE_INTERNAL[0x40]_CFLEXTIMERWAKEUPTIMER_STOPTIMER=0x16
+[TRACE]TRACE_INTERNAL[0x40]_DUP1_CFLEXTIMERCONTAINER_CFLEXTIMERCONTAINER=0x2
+[TRACE]TRACE_INTERNAL[0x40]_DUP1_CFLEXTIMERCONTAINER_LATESTPOSSIBLEALGORITHM=0xc
+[TRACE]TRACE_INTERNAL[0x40]_DUP1_CFLEXTIMERCONTAINER_SIMPLEALGORITHM=0xa
+[TRACE]TRACE_INTERNAL[0x40]_DUP1_CFLEXTIMERITEM_CFLEXTIMERITEM=0x13
+[TRACE]TRACE_INTERNAL[0x40]_DUP1_CFLEXTIMERWAKEUPTIMER_CFLEXTIMERWAKEUPTIMER=0x14
+[TRACE]TRACE_INTERNAL[0x40]_DUP_CFLEXTIMERENGINE_CFLEXTIMERENGINE=0x11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for Flexible timer server
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// IBY-file
+../rom/flextimerserver.iby CORE_MW_LAYER_IBY_EXPORT_PATH(flextimerserver.iby)
+
+PRJ_MMPFILES
+#include "../engine/group/bld.inf"
+flextimerserver.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/group/flextimerserver.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Flexible timer
+*               server
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include <platform_paths.hrh>
+
+TARGET              flextimerserver.exe
+TARGETTYPE          EXE
+UID                 0x1000008D 0x2002C383
+
+VENDORID            VID_DEFAULT
+CAPABILITY          CAP_SERVER
+
+USERINCLUDE         ../inc
+USERINCLUDE         ../traces
+USERINCLUDE         ../engine/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib
+// For system tick period
+LIBRARY             hal.lib
+LIBRARY             flextimerengine.lib
+
+SOURCEPATH          ../src
+SOURCE flextimerserver.cpp
+SOURCE flextimersession.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/flextimercommon.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ * Common header for flextimer client interface and server.
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERCOMMON_H
+#define FLEXTIMERCOMMON_H
+
+// System includes
+#include <e32base.h>
+
+#include "flextimerpanic.h"
+
+// Constants
+/**
+ * FlexTimerServer executable name used by clients when starting server
+ */
+_LIT( KFlexTimerServerExe, "FlexTimerServer.exe" );
+
+/**
+ * Identification name for the FlexTimerServer -server
+ */
+_LIT( KFlexTimerServerName,"FlexTimerServer" );
+
+/**
+ * Number of message slots reserved for each client session.
+ * There can be at most one outstanding asynchronous request at a time
+ * (pending timeout message). Second slot is needed for synchronous
+ * communication during that (e.g. for cancellation message).
+ */
+const TUint KFlexTimerServerMessageSlots = 2;
+
+/**
+ *  Version identifier. Client-server message interface compatibility
+ *  is maintained within a major version.
+ */
+const TUint KFlexTimerServMajorVersionNumber = 1;
+const TUint KFlexTimerServMinorVersionNumber = 0;
+const TUint KFlexTimerServBuildVersionNumber = 0;
+
+/**
+ * Default timeout window size. This is used, if client has not set the
+ * used timeout window. Default window is a fraction of an interval
+ * between current time and the expiration time.
+ * 
+ * @code
+ *   interval = endTime - currentTime;
+ *   defaultWindow = interval * KDefaultWindowMultiplier;
+ *   startTime = endTime - defaultWindow;
+ * @endcode
+ */
+const TReal64 KDefaultWindowMultiplier = 0.2;
+
+/**
+ *  Maximun lenght of FlexTimer  63072000000000 == 2a in microseconds.
+ */
+const TInt64 KFlexTimerMaxTimerLength = 63072000000000;
+
+// Data types
+/**
+ * Client-server interface message types (functions)
+ */
+enum TFlexTimerServRqst
+    {
+    EFlexTimerServCancelRequest = 1,
+    EFlexTimerServAtRequest,
+    EFlexTimerServAtUTCRequest,
+    EFlexTimerServAfterRequest,
+    EFlexTimerServAfterTicksRequest,
+    EFlexTimerServConfigureRequest
+    };
+
+/**
+ * Configuration message (EFlexTimerServConfigureRequest) type.
+ * This is stored as a first parameter in configuration request message,
+ * rest of the parameters and their types depend on this.
+ */
+enum TFlexTimerConfigureRequestType
+    {
+    EConfigureRequestWindowSize = 1
+    };
+
+#endif /* FLEXTIMERCOMMON_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/flextimerpanic.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ * Common header for flextimer panic codes.
+ *
+ */
+/*
+ * %version: 1 %
+ */
+#ifndef FLEXTIMERPANIC_H
+#define FLEXTIMERPANIC_H
+// System includes
+#include <e32base.h>
+
+
+/**
+ * Server and session panic category and codes
+ */
+// Panic category
+_LIT( KRFlexTimerPanicCat, "RFlexTimer");
+_LIT( KCFlexTimerPanicCat, "CFlexTimer");
+_LIT( KCFlexPeriodicPanicCat, "CFlexPeriodic");
+_LIT( KFlexTimerServerPanicCat, "FlexTimerServer" );
+_LIT( KFlexTimerSessionPanicCat, "FlexTimerSession" );
+_LIT( KFlexTimerContainerPanicCat, "FlexTimerContainer" );
+
+enum TFlexTimerPanic
+    {
+    /**
+     * Timer After-function has been provided with a negative interval value. 
+     * @see RFlexTimer
+     */
+    EFlexTimerAfterIntervalLessThanZero = 1,
+
+    /**
+     * Timer AfterTicks-function has been provided with a negative interval
+     * value. 
+     * @see RFlexTimer
+     */
+    EFlexTimerAfterTicksIntervalLessThanZero = 2,
+
+    /**
+     * Timer At-function has been provided with an expiry time prior to
+     * TTime::HomeTime. 
+     * @see RFlexTimer
+     * @see TTime
+     */
+    EFlexTimerAtIntervalLessThanZero = 3,
+
+    /**
+     * Timer AtUTC-function has been provided with an expiry time prior to
+     * TTime::UniversalTime. 
+     * @see RFlexTimer
+     * @see TTime
+     */
+    EFlexTimerAtUTCIntervalLessThanZero = 4,
+
+    /**
+     * Timer has been configured with flexible window size less than zero. 
+     * @see RFlexTimer
+     */
+    EFlexTimerWindowLessThanZero = 5,
+
+    /**
+     * Periodic timer Start-function has been called with delay value less
+     * than zero. 
+     * @see CFlexPeriodic
+     */
+    EFlexPeriodicDelayLessThanZero = 6,
+
+    /**
+     * Periodic timer Start-function has been called with interval value less
+     * than one microsecond.
+     * @see CFlexPeriodic
+     */
+    EFlexPeriodicIntervalTooSmall = 7,
+
+    /**
+     * Periodic has been configured with delay window size less than zero. 
+     * @see CFlexPeriodic
+     */
+    EFlexPeriodicDelayWindowLessThanZero = 8,
+
+    /**
+     * Periodic has been configured with interval window size less than zero. 
+     * @see CFlexPeriodic
+     */
+    EFlexPeriodicIntervalWindowLessThanZero = 9,
+
+    /**
+     * This panic is raised by the At(), After() and Lock() member functions
+     * of the CFlexTimer active object.
+     * 
+     * It is caused by an attempt to request a timer event when the CFlexTimer
+     * active object has not been added to the active scheduler.
+     * @see CFlexTimer
+     */
+    EFlexTimerNotAddedToActiveScheduler = 10,
+                
+    /**
+     * New timer has been issued while previous operation is still pending
+     * @see RFlexTimer
+     */
+    EFlexTimerServerErrorPendingTimer = 15,
+
+    /**
+     * Cleanup stack memory creation failed for FlexTimer server process
+     */
+    EFlexTimerServerCleanupStack = 20,
+
+    /**
+     * Memory allocation for active scheduler object filed in server creation
+     */
+    EFlexTimerServerActiveScheduler = 21,
+
+    /**
+     * Starting CServer2 based FlexTimer server failed
+     */
+    EFlexTimerServerStartServer = 23,
+    
+    /**
+     * User has issued a timer request with parameters that can not be
+     * fulfilled
+     */
+    EFlexTimerServerIllegalTimerValue = 24,
+
+    /**
+     * FlexTimer session failed to read tick period from HAL. This means that
+     * we are not able to map our tick time to system time.
+     */
+    EFlexTimerContainerNoTickPeriod = 30,
+
+    /**
+     * In CFlexPeriodic::Start() has been passed a NULL function pointer in
+     * TCallBack aCallBack parameter.
+     */
+    EFlexPeriodicCallbackFunctionIsNull = 31,
+    
+    /**
+     * In CFlexPeriodic::Start() has been passed a NULL function pointer in
+     * TCallBack aCallBackError parameter and error has occurred.
+     */
+    EFlexPeriodicErrorCallbackFunctionIsNull = 32,
+    
+    /**
+     * RFlexTimer::Connect() has been called twice without closing the handle
+     * first.
+     */
+    EFlexTimerAlreadyConnected = 33
+    };
+
+#endif /* FLEXTIMERPANIC_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/flextimerserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * Class definition for Flexible timer server. Server creates session
+ * objects and manages message passing to those.
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERSERVER_H
+#define FLEXTIMERSERVER_H
+
+// System includes
+#include <e32base.h>
+
+// Forward declarations
+class CFlexTimerEngine;
+
+// Class declaration
+/**
+ *  Flexible timer server class implements the server for FlexTimers. This
+ *  class provides services for creating new sessions, and for passing
+ *  a client message to dedicated session.
+ */
+class CFlexTimerServer : public CServer2
+    {
+    
+public:
+    /**
+     * Two phased constructor 
+     * 
+     * @param aPriority Active object priority for the server 
+     * @return Pointer to created server object
+     */
+    IMPORT_C static CFlexTimerServer* NewL( CActive::TPriority aPriority );
+
+    /**
+     * Destructor 
+     */
+    virtual ~CFlexTimerServer();
+
+public:
+
+    /**
+     * From: CServer2
+     * Function for creating a new session to this server. 
+     *
+     * @param aVersion Version identifier from client
+     * @param aMessage Reference to creation message sent by client
+     * @return Pointer to created session object
+     */
+    CSession2* NewSessionL( const TVersion& aVersion,
+                            const RMessage2& aMessage ) const;
+
+    /**
+     * Function for creating server thread resources. Creates the server
+     * object and active scheduler. Loops in the active scheduler to serve
+     * client requests until explicitly shutdown. Function leaves if the
+     * creation of needed resources fails.
+     */
+    static void StartServerL();
+
+private:
+
+    /**
+     * Constructor
+     * 
+     * @param aPriority Active object priority 
+     */
+    CFlexTimerServer( CActive::TPriority aPriority );
+
+    /**
+     * 2nd phase constructor, creates CFlexTimerEngine
+     */
+    void ConstructL();
+
+private:
+
+    /**
+     * Pointer to FlexTimerEngine created during server start-up
+     */
+    CFlexTimerEngine* iTimerEngine;
+
+    };
+
+#endif /* FLEXTIMERSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/flextimersession.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * Class definition for Flexible timer server side sessions. Session
+ * instances handle the commmunication with clients and implement a 
+ * callback interface for the CFlexTimerEngine to fire timers
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERSESSION_H
+#define FLEXTIMERSESSION_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+#include "mflextimerservicecb.h"
+
+// Forward declarations
+class MFlexTimerService;
+
+// Class declaration
+/**
+ *  Flexible timer server side session
+ *  CFlexTimerSession implements sessions in CFlexTimerServer. A sessions
+ *  parses client messages and adds/cancels timers to CFlexTimerEngine. The
+ *  expiration of the timer completes client side message.
+ */
+class CFlexTimerSession : public CSession2, public MFlexTimerServiceCB
+    {
+
+public:
+
+    /**
+     * Constructor
+     * 
+     * @param aFlexTimerService A pointer to engine interface providing
+     *                          timeout service
+     */
+    CFlexTimerSession( MFlexTimerService* aFlexTimerService );
+
+    /**
+     * Destructor
+     */
+    virtual ~CFlexTimerSession();
+
+    /**
+     * From: CSession2
+     * Message handler servicing client requests. Interprets message type and
+     * passes it to correct function for processing.
+     * 
+     * @param aMessage Message from client
+     */
+    void ServiceL( const RMessage2& aMessage );
+
+    /**
+     * From CSession2
+     * Called by a server when it receives a disconnect message for the 
+     * session.
+     * 
+     * @param aMessage The disconnect message
+     */
+    void Disconnect( const RMessage2 &aMessage );
+    
+    /**
+     * From: MFlexTimerServiceCB
+     * Timeout callback function called by timeout engine when a timer
+     * associated to this session expires.
+     * 
+     * @see MFlexTimerServiceCB
+     */
+    virtual void Timeout() const;
+
+    /**
+     * From: MFlexTimerServiceCB
+     * Callback function called by CFlexTimerEngine, when a timer associated
+     * to this session is aborted. Most probable cause for this is At()-timer
+     * aborting due to the system time change
+     * 
+     * @param aReason Error code to be passed for client (KErrAbort in case 
+     *                of system time change)
+     *                
+     * @see MFlexTimerServiceCB
+     */
+    virtual void Abort( TInt aReason ) const;
+
+private:
+
+    /**
+     * Handles client messages that are issued using At()-function in
+     * RFlexTimer
+     * 
+     * @param aMessage Message from client
+     *
+     * @see RFlexTimer
+     */
+    void NewAtTimer( const RMessage2& aMessage );
+
+    /**
+     * Handles client messages that are issued using AtUTC()-function in
+     * RFlexTimer
+     * 
+     * @param aMessage Message from client
+     *
+     * @see RFlexTimer
+     */
+    void NewAtUtcTimer( const RMessage2& aMessage );
+
+    /**
+     * Handles client messages that a issued using After()-function in
+     * RFlexTimer
+     * 
+     * @param aMessage Message from client
+     * 
+     * @see RFlexTimer
+     */
+    void NewAfterTimer( const RMessage2& aMessage );
+
+    /**
+     * Handles client messages that a issued using AfterTicks()-function in
+     * RFlexTimer
+     * 
+     * @param aMessage Message from client
+     * 
+     * @see RFlexTimer
+     */
+    void NewAfterTicksTimer( const RMessage2& aMessage );
+
+    /**
+     * Handles timer cancellation initiated by client via RFlexTimer::Cancel
+     * 
+     * @param aMessage Message from client
+     * 
+     * @see RFlexTimer
+     */
+    void CancelTimer( const RMessage2& aMessage );
+
+    /**
+     * Configuration message handler, stores configuration parameters for
+     * this session
+     * 
+     * @param aMessage Message from client
+     * 
+     * @see RFlexTimer
+     */
+    void ConfigureParameters( const RMessage2& aMessage );
+
+    /**
+     * Inline function for calculating the period from current time to
+     * the timestamp given in message parameters. This is used for
+     * converting the timestamp given in At()- and AtUtc() -functions
+     * to an interval given to DoAddTimer function.
+     * 
+     * @param aRefTime  Reference time used as a basis for interval
+     *                  calculation (interval = timestamp - aRefTime)
+     * @param aMessage  Message containing timestamp in Int0 and Int1
+     *                  parameters (Int0 contains LSW)
+     * @param aInterval On return, contains the interval in microseconds
+     */
+    inline void GetIntervalToMsgTime( const RMessage2& aMessage,
+                                      TTime& aRefTime,
+                                      TTimeIntervalMicroSeconds& aInterval );
+    
+    /**
+     * Function for adding timer with desired window to engine, called in
+     * AtXxx() and AfterXxx() -functions
+     * 
+     * @param aMessage      Message from client. Stored if adding a timer is
+     *                      successful, completed if adding fails
+     * @param aInterval     Microseconds until to requested end time
+     * @param aRequestAbort ETrue if timer should be cancelled on system
+     *                      time change, EFalse otherwise
+     */
+    void DoAddTimer( const RMessage2& aMessage,
+                     TTimeIntervalMicroSeconds& aInterval,
+                     TBool aRequestAbort );
+
+private:
+
+    /**
+     * Pointer to engine interface through which new timers can be added
+     * and cancelled.
+     */
+    MFlexTimerService* iService;
+
+    /**
+     * Timeout window size in microseconds (64-bit). Timeout window is
+     * calculated backwards from the absolute timestamp given in AtXxx()
+     * and AfterXxx() -functions
+     */
+    TTimeIntervalMicroSeconds iTimerWinSize;
+
+    /**
+     * ETrue if client has not set timeout window, EFalse otherwise
+     */
+    TBool iUseDefaultWin;
+
+    /**
+     * Handle to pending timeout message
+     */
+    RMessagePtr2 iPendingTimeoutMsg;
+    };
+
+#include "flextimersession.inl"
+
+#endif /* FLEXTIMERSESSION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/flextimersession.inl	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - Initial contribution
+ *
+ * Description:
+ * This file contains inline functions of FlexTimerSession class.
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERSESSION_INL
+#define FLEXTIMERSESSION_INL
+
+// --------------------------------------------------------------------------
+// Function for calculating interval from current time to timestamp
+// --------------------------------------------------------------------------
+//
+inline void CFlexTimerSession::GetIntervalToMsgTime(
+        const RMessage2& aMessage,
+        TTime& aRefTime,
+        TTimeIntervalMicroSeconds& aInterval )
+    {
+    // Construct requested timestamp from the message
+    TInt timeLo( aMessage.Int0() );
+    TInt timeHi( aMessage.Int1() );
+    TInt64 timeStamp = MAKE_TINT64( timeHi, timeLo );
+    TTime reqTime( timeStamp );
+
+    // Calculate the difference between current time and requested time
+    // Reference time used by pure At()-timer is HomeTime
+    aInterval = reqTime.MicroSecondsFrom( aRefTime );
+    }
+
+#endif  /* FLEXTIMERSESSION_INL */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/mflextimerservice.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * This class contains definition of MFlexTimerService
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef MFLEXTIMERSERVICE_H
+#define MFLEXTIMERSERVICE_H
+
+//Forward declarations
+class TTime;
+class MFlexTimerServiceCB;
+
+// Class declaration
+/**
+ *  Interface to flexible timer engine. This interface is used by client
+ *  sessions to start and cancel timers.
+ */
+class MFlexTimerService
+    {
+public:
+
+    /** Pure virtual functions*/
+    /**
+     * Function for adding a new timer with specified parameters. 
+     * After timer expires aFlexTimerServiceCB is used to inform a client
+     * session about that. Both parameter times should be in the future
+     * and min should be earlier than max
+     * 
+     * @param aWinStartInterval Time interval from present to left side of the
+     *  window
+     * @param aWinEndInterval Time interval from present to right side of the
+     *  window
+     * @param aCancelAtSystemTimeChange Whether timer should be aborted if
+     *  system time changes.
+     * @param aFlexTimerServiceCB Callback interface for timer
+     *  expiration (also used as an ID)
+     * 
+     * @return KErrNone or some other system wide error code.
+     *
+     */
+    virtual TInt AddTimer(
+            const TTimeIntervalMicroSeconds& aWinStartInterval,
+            const TTimeIntervalMicroSeconds& aWinEndInterval,
+            TBool aCancelAtSystemTimeChange,
+            const MFlexTimerServiceCB* aFlexTimerServiceCB ) = 0;
+
+    /**
+     * Function for cancellin a running timer. After this function returns,
+     * all references to corresponding timer are deleted and they can not be
+     * referred again.
+     * 
+     * @param aFlexTimerServiceCB ID used when timer was added
+     * @return KErrNone or some other system wide error code.
+     */
+    virtual TInt CancelTimer(
+            const MFlexTimerServiceCB* aFlexTimerServiceCB ) = 0;
+
+    };
+
+#endif  /* MFLEXTIMERSERVICE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/inc/mflextimerservicecb.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * This class contains definition of MFlexTimerServiceCB
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef MFLEXTIMERSERVICECB_H
+#define MFLEXTIMERSERVICECB_H
+
+// Class declaration
+/**
+ *  Callback interface for Flexible timer engine to inform a session
+ *  about timeouts and aborts.
+ */
+class MFlexTimerServiceCB
+    {
+public:
+
+    /** Pure virtual functions*/
+    /**
+     * Function used for inform that a timeout has happened and client
+     * should be informed about it. After this function is called, there will
+     * no longer be indications related to this timer. After this function
+     * returns, the timer object will be deleted.
+     * 
+     */
+    virtual void Timeout() const = 0;
+
+    /**
+     * Function for informing client session that something has happended and
+     * timer should be aborted. After this function is called, there will
+     * no longer be indications related to this timer. After this function
+     * returns, the timer object will be deleted.
+     * 
+     * @param aReason Error code specifying why timer is aborted.
+     * 
+     * @see RFlexTimer
+     *
+     */
+    virtual void Abort( TInt aReason ) const = 0;
+
+    };
+
+#endif  /* MFLEXTIMERSERVICECB_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/rom/flextimerserver.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Flexible timer server
+*
+*/
+#ifndef FLEXTIMERSERVER_IBY
+#define FLEXTIMERSERVER_IBY
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\flextimerserver.exe PROGRAMS_DIR\flextimerserver.exe
+
+#endif // FLEXTIMERSERVER_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/src/flextimerserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexTimerServer class.
+ *
+ */
+/*
+ * %version: 2 %
+ */
+
+// System include files
+#include <e32cmn.h>
+#include <e32std.h>
+// User include files go here:
+#include "flextimercommon.h"
+#include "flextimerserver.h"
+#include "flextimersession.h"
+#include "flextimerengine.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerserverTraces.h"
+#endif
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Two phased construction, 1st phase
+// --------------------------------------------------------------------------
+//
+EXPORT_C CFlexTimerServer* CFlexTimerServer::NewL(
+        CActive::TPriority aPriority )
+    {
+    CFlexTimerServer* self = new ( ELeave ) CFlexTimerServer( aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServer::~CFlexTimerServer()
+    {
+    // Free allocated resources, CServer2 shutdowns sessions
+    delete iTimerEngine;
+
+    OstTrace0( TRACE_INTERNAL,
+            CFLEXTIMERSERVER_DEL,
+            "CFlexTimerServer::~CFlexTimerServer: exiting" );
+    }
+
+// --------------------------------------------------------------------------
+// Creation of new sessions, called by server framework
+// --------------------------------------------------------------------------
+//
+CSession2* CFlexTimerServer::NewSessionL( const TVersion& aVersion,
+                                          const RMessage2& /*aMessage*/ ) const
+    {
+    // Version checking, according to two main principles
+    // 1. Newer server will always support older clients (change this if
+    //    compatibility is changed at some phase)
+    // 2. Guaranteed that newer client will be compatible with older server 
+    //    within the same major version
+    if ( aVersion.iMajor > KFlexTimerServMajorVersionNumber )
+        {
+        OstTrace1(
+                TRACE_INTERNAL,
+                CFLEXTIMERSERVER_NEWSESSIONLVER,
+                "CFlexTimerServer::NewSessionL: Invalid major version (%d)",
+                aVersion.iMajor );
+        User::Leave( KErrNotSupported );
+        }
+
+    // Create and return session
+    CSession2* session = new ( ELeave ) CFlexTimerSession( iTimerEngine );
+
+    OstTrace1( TRACE_INTERNAL,
+            CFLEXTIMERSERVER_NEWSESSIONL,
+            "CFlexTimerServer::NewSessionL: Created; session=%x",
+            ( TUint )session );
+
+    return session;
+    }
+
+// --------------------------------------------------------------------------
+// Thread start function, loops in active scheduler
+// --------------------------------------------------------------------------
+//
+void CFlexTimerServer::StartServerL()
+    {
+    // Called when thread is created, create active scheduler
+    CActiveScheduler* sched = new CActiveScheduler;
+    if ( sched == NULL )
+        {
+        // Leave error code is used as a panic code
+        User::Leave( EFlexTimerServerActiveScheduler );
+        }
+    // Add active scheduler object to cleanup stack before installing it.
+    // It will be deleted, if any of the next operations fails.
+    CleanupStack::PushL( sched );
+    CActiveScheduler::Install( sched );
+
+    // Create server object and start it
+    CFlexTimerServer* flexServer = NULL;
+    flexServer = CFlexTimerServer::NewL( EPriorityStandard );
+
+    // Push the server object to cleanup stack before starting it
+    CleanupStack::PushL( flexServer );
+    
+    TInt err = KErrNone;
+    
+    err = flexServer->Start( KFlexTimerServerName );
+    if ( err != KErrNone )
+        {
+        // Leave error code is used as a panic code
+        User::Leave( EFlexTimerServerStartServer );
+        }
+
+    // Complete open rendezvous in this process (syncs with creator)
+    RProcess::Rendezvous( KErrNone );
+
+    // Active scheduler start will not leave, thus pop added objects
+    // from the cleanup stack. They will be deleted once the execution
+    // returns from the active scheduler (application is exiting)
+    CleanupStack::Pop( flexServer );
+    CleanupStack::Pop( sched );
+
+    OstTrace0( TRACE_INTERNAL,
+            CFLEXTIMERSERVER_START,
+            "CFlexTimerServer::StartServerL: Call ActiveScheduler" );
+
+    // Start active scheduler, thread stays in active scheduler loop
+    CActiveScheduler::Start();
+
+    OstTrace0( TRACE_INTERNAL,
+            CFLEXTIMERSERVER_EXIT,
+            "CFlexTimerServer::StartServerL: ActiveScheduler exit" );
+
+    // Delete allocated resources
+    delete flexServer;
+    delete sched;
+    }
+
+// --------------------------------------------------------------------------
+// Constructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServer::CFlexTimerServer( CActive::TPriority aPriority ) :
+    CServer2( aPriority ), iTimerEngine( NULL )
+    {
+
+    }
+
+// --------------------------------------------------------------------------
+// Two phased construction, 2nd phase
+// --------------------------------------------------------------------------
+//
+void CFlexTimerServer::ConstructL()
+    {
+    // Create engine, leaving is handled in server creation
+    iTimerEngine = CFlexTimerEngine::NewL();
+    OstTrace0( TRACE_INTERNAL,
+            CFLEXTIMERSERVER_CONSTRUCTL,
+            "CFlexTimerServer::ConstructL: Created engine" );
+    }
+
+// ======== GLOBAL FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Main function of the server executable.
+// --------------------------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+    {
+    // Mark memory allocation check 
+    __UHEAP_MARK;
+
+    // Create cleanup stack
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    __ASSERT_ALWAYS( cleanup, User::Panic( KFlexTimerServerPanicCat,
+                    EFlexTimerServerCleanupStack ) );
+    // Start server
+    TRAPD( panicCode, CFlexTimerServer::StartServerL() );
+    if ( panicCode != KErrNone )
+        {
+        OstTrace1( TRACE_INTERNAL,
+                CFLEXTIMERSERVER_MAINERROR,
+                "CFlexTimerServer - Main: Start server failed (%d)",
+                panicCode );
+        delete cleanup;
+        User::Panic( KFlexTimerServerPanicCat, panicCode );
+        }
+    else
+        {
+        OstTrace0( TRACE_INTERNAL,
+                CFLEXTIMERSERVER_MAINEXIT,
+                "CFlexTimerServer - Main: Application exiting" );
+
+        // Delete cleanup stack
+        delete cleanup;
+        }
+
+    // Memory allocation check, panic in UDEB case of memory leak
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/server/src/flextimersession.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,509 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexTimerSession class.
+ *
+ */
+/*
+ * %version: 1 %
+ */
+
+// System include files
+#include <e32def.h>
+#include <e32cmn.h>
+#include <hal.h>
+
+// User include files go here:
+#include "flextimercommon.h"
+#include "flextimersession.h"
+#include "mflextimerservice.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimersessionTraces.h"
+#endif
+
+// Constants
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Constructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerSession::CFlexTimerSession( MFlexTimerService* aFlexTimerService )
+:   iService( aFlexTimerService ),
+    iTimerWinSize( 0 ),
+    iUseDefaultWin( ETrue )
+    {
+    OstTrace1( TRACE_INTERNAL,
+               CFLEXTIMERSESSION,
+               "CFlexTimerSession::CFlexTimerSession; this=%x",
+               ( TUint )this );
+    }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerSession::~CFlexTimerSession()
+    {
+    OstTrace1( TRACE_INTERNAL,
+               CFLEXTIMERSESSIOND,
+               "CFlexTimerSession::~CFlexTimerSession; this=%x",
+               ( TUint )this );
+    }
+
+// --------------------------------------------------------------------------
+// Function called from CFlexTimerService::RunL for messages targeted to
+// this session
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::ServiceL( const RMessage2& aMessage )
+    {
+    TInt msgType( aMessage.Function() );
+
+    OstTraceExt2( TRACE_INTERNAL,
+                  CFLEXTIMERSESSION_MSG,
+                  "CFlexTimerSession::ServiceL; this=%x; msgType=%d",
+                  ( TInt )this,
+                  msgType );
+
+    // Check message type and pass it to correct handler. Handler either 
+    // stores the message or completes it immediately.
+    switch ( msgType )
+        {
+        case EFlexTimerServCancelRequest:
+            CancelTimer( aMessage );
+            break;
+        case EFlexTimerServAtRequest:
+            NewAtTimer( aMessage );
+            break;
+        case EFlexTimerServAtUTCRequest:
+            NewAtUtcTimer( aMessage );
+            break;
+        case EFlexTimerServAfterRequest:
+            NewAfterTimer( aMessage );
+            break;
+        case EFlexTimerServAfterTicksRequest:
+            NewAfterTicksTimer( aMessage );
+            break;
+        case EFlexTimerServConfigureRequest:
+            ConfigureParameters( aMessage );
+            break;
+        default:
+            OstTrace1(
+                    TRACE_INTERNAL,
+                    CFLEXTIMERSESSION_ERROR,
+                    "CFlexTimerSession::ServiceL: Unknown message; this=%x",
+                    ( TUint )this );
+            aMessage.Complete( KErrNotSupported );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Timeout handler for triggering timers
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::Timeout() const
+    {
+    // Check for the validity of pending timeout request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_TIMEOUT,
+                      "CFlexTimerSession::Timeout; this=%x; msg=%x",
+                      ( TUint )this,
+                      ( TUint )iPendingTimeoutMsg.Handle() );
+        // Complete message, this sets message pointer to NULL
+        iPendingTimeoutMsg.Complete( KErrNone );
+        }
+    else
+        {
+        // No valid message pointer, nothing we can do here
+        OstTrace1( TRACE_INTERNAL,
+                   CFLEXTIMERSESSION_TIMEOUT_ERROR,
+                   "CFlexTimerSession::Timeout: No Pending message; this=%x",
+                   ( TUint )this );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Function for aborting At-timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::Abort( TInt aReason ) const
+    {
+    // Check for the validity of pending timeout request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_ABORT,
+                      "CFlexTimerSession::Abort; this=%x; msg=%x",
+                      ( TUint )this,
+                      ( TUint )iPendingTimeoutMsg.Handle() );
+        // Complete message, this sets message pointer to NULL
+        iPendingTimeoutMsg.Complete( aReason );
+        }
+    else
+        {
+        // No valid message pointer, nothing we can do here
+        OstTrace1(
+                TRACE_INTERNAL,
+                CFLEXTIMERSESSION_ABORT_ERROR,
+                "CFlexTimerSession::Abort: No Pending message; this=%x",
+                ( TUint )this );
+
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for starting At() -timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::NewAtTimer( const RMessage2& aMessage )
+    {
+
+    // Check that we do not have a pending timer request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_ATPANIC,
+                      "CFlexTimerSession::NewAtTimer: Already pending; "
+                      "this=%x; msg=%x",
+                      ( TUint )this,
+                      ( TUint )iPendingTimeoutMsg.Handle() );
+
+        aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerErrorPendingTimer );
+        return;
+        }
+
+    // Get interval from current time to the requested timestamp
+    TTime refTime;
+    refTime.HomeTime();
+    TTimeIntervalMicroSeconds interval;
+    GetIntervalToMsgTime( aMessage, refTime, interval );
+
+    OstTraceExt2( TRACE_INTERNAL,
+                  CFLEXTIMERSESSION_ATTIMER,
+                  "CFlexTimerSession::NewAtTimer; this=%x; interval=%lld",
+                  ( TUint )this,
+                  interval.Int64() );
+
+    // Add the timer to engine
+    DoAddTimer( aMessage, interval, ETrue );
+
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for starting AtUTC() -timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::NewAtUtcTimer( const RMessage2& aMessage )
+    {
+
+    // Check that we do not have a pending timer request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_ATUTCPANIC,
+                      "CFlexTimerSession::NewAtUtcTimer: Already pending; "
+                      "this=%x; msg=%x",
+                      ( TUint )this,
+                      ( TUint )iPendingTimeoutMsg.Handle() );
+
+        aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerErrorPendingTimer );
+        return;
+        }
+
+    TTime refTime;
+    refTime.UniversalTime();
+    TTimeIntervalMicroSeconds interval;
+    GetIntervalToMsgTime( aMessage, refTime, interval );
+    
+    OstTraceExt2( 
+            TRACE_INTERNAL,
+            CFLEXTIMERSESSION_ATUTCTIMER,
+            "CFlexTimerSession::NewAtUtcTimer; this=%x; interval=%lld",
+            ( TUint )this,
+            interval.Int64() );
+
+    // Add the timer to engine
+    DoAddTimer( aMessage, interval, ETrue );
+
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for starting After()-timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::NewAfterTimer( const RMessage2& aMessage )
+    {
+
+    // Check that we do not have a pending timer request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_AFTERPANIC,
+                      "CFlexTimerSession::NewAfterTimer: Already pending; "
+                      "this=%x; msg=%x",
+                      ( TUint )this,
+                      ( TUint )iPendingTimeoutMsg.Handle() );
+
+        aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerErrorPendingTimer );
+        return;
+        }
+
+    TInt64 timeStamp = MAKE_TINT64( aMessage.Int1(), aMessage.Int0() );
+    TTimeIntervalMicroSeconds interval( timeStamp );
+
+    OstTraceExt2(
+            TRACE_INTERNAL,
+            CFLEXTIMERSESSION_AFTERTIMER,
+            "CFlexTimerSession::NewAfterTimer; this=%x; interval=%llu",
+            ( TUint )this,
+            interval.Int64() );
+
+    // Add the timer to engine, request cancellation if the secure time
+    // is not available
+    DoAddTimer( aMessage, interval, EFalse );
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for starting AfterTicks()-timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::NewAfterTicksTimer( const RMessage2& aMessage )
+    {
+
+    // Check that we do not have a pending timer request
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTraceExt2(
+                TRACE_INTERNAL,
+                CFLEXTIMERSESSION_AFTERTICKSPANIC,
+                "CFlexTimerSession::NewAfterTicksTimer: Already pending; "
+                "this=%x; msg=%x",
+                ( TUint )this,
+                ( TUint )iPendingTimeoutMsg.Handle() );
+
+        aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerErrorPendingTimer );
+        return;
+        }
+
+    // Get the tick period from HAL and convert ticks to microseconds
+    TInt tickUs;
+    HAL::Get( HAL::ESystemTickPeriod, tickUs );
+
+    TTimeIntervalMicroSeconds interval =
+            static_cast<TInt64> ( aMessage.Int0() ) * tickUs;
+
+    OstTraceExt2(
+            TRACE_INTERNAL,
+            CFLEXTIMERSESSION_AFTERTICKSTIMER,
+            "CFlexTimerSession::NewAfterTicksTimer; this=%x; interval=%llu",
+            ( TUint )this,
+            interval.Int64() );
+
+    // Add the timer to engine
+    DoAddTimer( aMessage, interval, EFalse );
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for cancelling running timer
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::CancelTimer( const RMessage2& aMessage )
+    {
+    TInt ret;
+    // Check that we have a pending timer request
+    if ( iPendingTimeoutMsg.IsNull() )
+        {
+        OstTrace1(
+                TRACE_INTERNAL,
+                CFLEXTIMERSESSION_CANCELERROR,
+                "CFlexTimerSession::CancelTimer: no pending msg; this=%x",
+                ( TUint )this );
+        ret = KErrNotFound;
+        }
+    else
+        {
+        ret = iService->CancelTimer( this );
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_CANCEL,
+                      "CFlexTimerSession::CancelTimer; this=%x; ret=%d",
+                      ( TUint )this,
+                      ret );
+
+        // Complete pending message, this sets message pointer to NULL
+        iPendingTimeoutMsg.Complete( KErrCancel );
+        }
+
+    // Complete cancel message
+    aMessage.Complete( ret );
+    }
+
+// --------------------------------------------------------------------------
+// Handler function for configuring timer parameters
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::ConfigureParameters( const RMessage2& aMessage )
+    {
+    TInt ret( KErrNone );
+
+    // Configuration is not allowed when there is a pending message
+    if ( !iPendingTimeoutMsg.IsNull() )
+        {
+        OstTrace1( TRACE_INTERNAL,
+                   CFLEXTIMERSESSION_CONFIGERROR,
+                   "CFlexTimerSession::ConfigureParameters: Timer pending; "
+                   "this=%x",
+                   ( TUint )this );
+        ret = KErrInUse;
+        }
+    else
+        {
+        TInt paramType( aMessage.Int0() );
+        OstTraceExt2( TRACE_INTERNAL,
+                      CFLEXTIMERSESSION_CONFIG,
+                      "CFlexTimerSession::ConfigureParameters; this=%x; "
+                      "paramType=%d",
+                      ( TUint )this,
+                      paramType );
+
+        switch ( paramType )
+            {
+            case EConfigureRequestWindowSize:
+                {
+                TInt winLo = aMessage.Int1();
+                TInt winHi = aMessage.Int2();
+
+                iTimerWinSize = MAKE_TINT64( winHi, winLo );
+                iUseDefaultWin = EFalse;
+
+                OstTraceExt1( TRACE_INTERNAL,
+                              CFLEXTIMERSESSION_CONFIGWIN,
+                              "CFlexTimerSession::ConfigureParameters; "
+                              "iTimerWinSize=%lld",
+                              iTimerWinSize.Int64() );
+                
+                if ( iTimerWinSize.Int64() < 0 ||
+                    iTimerWinSize.Int64() > KFlexTimerMaxTimerLength )
+                    {
+                    aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerIllegalTimerValue );
+                    // Return after panicing the client -- completing the
+                    // message afterwards panics the server with USER 70.
+                    return;
+                    }
+                break;
+                }
+            default:
+                OstTrace0( TRACE_INTERNAL,
+                           CFLEXTIMERSESSION_CONFIGUNKNOWN,
+                           "CFlexTimerSession::ConfigureParameters: "
+                           "ERROR - Invalid parameter type" );
+                ret = KErrNotSupported;
+                break;
+            }
+        }
+    aMessage.Complete( ret );
+    }
+
+// --------------------------------------------------------------------------
+// Function for adding timer to engine and handling its return value
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::DoAddTimer( const RMessage2& aMessage,
+                                    TTimeIntervalMicroSeconds& aWinEnd,
+                                    TBool aRequestAbort )
+    {
+    OstTraceExt4( TRACE_INTERNAL,
+               CFLEXTIMERSESSION_ADDTIMER,
+               "CFlexTimerSession::DoAddTimer; this=%x; msg=%x; aWinEnd=%llu;"
+               " aRequestAbort=%d",
+               ( TUint )this,
+               ( TUint )aMessage.Handle(),
+               aWinEnd.Int64(),
+               aRequestAbort );  
+    
+    // Check that the timer has valid values.
+    if ( aWinEnd.Int64() < 0 || aWinEnd.Int64() > KFlexTimerMaxTimerLength)
+        {
+        OstTraceExt4( TRACE_INTERNAL, 
+                      CFLEXTIMERSESSION_DOADDTIMER, 
+                      "CFlexTimerSession::DoAddTimer;Invalid parameters "
+                      "- panicing client;this=%x;aMessage=%x;aWinEnd=%llu;"
+                      "aRequestAbort=%d", 
+                      ( TUint )this, 
+                      ( TUint )aMessage.Handle(), 
+                      aWinEnd.Int64(),
+                      aRequestAbort );
+        aMessage.Panic( KRFlexTimerPanicCat,
+                        EFlexTimerServerIllegalTimerValue );
+        return;
+        }
+    
+    TTimeIntervalMicroSeconds winStart;
+    TTimeIntervalMicroSeconds window = iTimerWinSize;
+    
+    if ( iUseDefaultWin )
+        {
+        window = static_cast<TInt64> ( static_cast<TReal64> ( aWinEnd.Int64() )
+            * KDefaultWindowMultiplier );
+        }
+
+    winStart = aWinEnd.Int64() - window.Int64();
+
+    // Store pending message. Not completed until timer expires.
+    // Note that in case of zero or negative timer value, message can
+    // be completed through Timeout() even before AddTimer returns. This
+    // implementation saves some checks and timer stopping/starting in engine.
+    iPendingTimeoutMsg = aMessage;
+
+    // Add timer to engine
+    TInt ret = iService->AddTimer( winStart, aWinEnd, aRequestAbort, this );
+
+    if ( KErrNone != ret )
+        {
+        // Failed, pass error code to client side
+        OstTraceExt2( TRACE_INTERNAL,
+                   CFLEXTIMERSESSION_ADDERROR,
+                   "CFlexTimerSession::DoAddTimer: Error; this=%x, ret=%d",
+                   ( TUint )this,
+                   ret );
+        // Complete pending message, this sets message pointer to NULL
+        iPendingTimeoutMsg.Complete( ret );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// From CSession2
+// Function for handling unintentional termination of the client
+// --------------------------------------------------------------------------
+//
+void CFlexTimerSession::Disconnect( const RMessage2 &aMessage )
+    {
+    // The client of this session has died.
+    
+    // Remove timer from engine.
+    iService->CancelTimer( this );
+
+    // Disconnect() must end with a call to the base class implementation, 
+    // which will delete the session object and complete the disconnect 
+    // message.
+    CSession2::Disconnect( aMessage );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/flextimer_build.bat	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,434 @@
+::---------------------------------------------------------------------------
+:: Helper for FlexTimer building and testing
+::
+:: Commands:
+::
+::  BUILD_ALL       Build component to all targets
+::  BUILD_ERROR     Inform user about failed build
+::  BUILD_OK        Inform user about passed build
+::  BUILD_TRACES    Build OST traces to targets WINSCW_UDEB and ARMV5_UDEB
+::  CHECK_EPOCROOT  Check that epocroot is set correctly
+::  CLEAN_NOLOGS    Reallyclean component, no output to screen
+::  DEL_CTC_REPORTS Delete old CTC reports
+::  GEN_CMT_REPORTS Generate CMT reports
+::  GEN_COV_REPORTS Generate and deliver Coveruty Prevent reports
+::  GEN_CS_REPORTS  Genrete CodeScanner reports
+::  GEN_CTC_REPORTS Generate CTC reports
+::  GEN_IMAGE       Make flash images
+::  GEN_SYMBOLS     Generate symbol files
+::  INSTRUMENT_CTC  Instrument CTC++ to component's WINSCW_UDEB target
+::  RUN_TESTS       Compile test component, run test application and check 
+::                  test results
+::  SCHEDULER       Execute commands from QUEUE
+::  SHOW_HELP       Show help of the script
+::  START_UP        Enable delayed environment expansion
+::  TEST_FAILED     Inform user about failed tests
+::  THE_END         Stop execution of the script
+::
+::---------------------------------------------------------------------------
+:: Change history:
+::
+:: 1.0  01-Apr-2010     First version in SVN
+::
+::---------------------------------------------------------------------------
+
+@echo off
+setlocal
+
+set VERSION=1.0 [01/04/2010 15:08:42]
+
+:: The source path is one dir up from the BAT's location
+for /f %%i in ("%0") do set SOURCE_PATH=%%~dpi..
+
+set MAKE_PATH=%SOURCE_PATH%\group\bld.inf
+set TEST_MAKE_PATH=%SOURCE_PATH%\test\testflextimer\group\bld.inf
+
+:: Commands for the component
+set CMD_BUILD_ALL=sbs -b %MAKE_PATH%
+set CMD_BUILD_CLEAN=sbs -b %MAKE_PATH% reallyclean
+set CMD_BUILD_TRACE=sbs -b %MAKE_PATH% -c winscw_udeb.tracecompiler -c armv5_udeb.tracecompiler
+
+:: Commands for test component
+set CMD_TEST_BUILD=sbs -b %TEST_MAKE_PATH% -c winscw_udeb -c armv5
+set CMD_TEST_RUN=start /wait %EPOCROOT%epoc32\release\winscw\udeb\atsinterface.exe -dtextshell -- -testmodule testflextimer
+
+:: Commands and settings for CTC++
+set CTC_OUTFILE=MON
+set CTC_OUTPATH=.
+set CMD_CTC_BUILD=ctcwrap -i m -v -2comp sbs.bat -b %MAKE_PATH% -c winscw_udeb
+set CMD_CTC_CLEAN=sbs -b %MAKE_PATH% -c winscw_udeb reallyclean
+set CMD_CTC_GEN=ctcpost %CTC_OUTPATH%\%CTC_OUTFILE%.sym %CTC_OUTPATH%\%CTC_OUTFILE%.dat ^| ctc2html
+
+:: Command for CMT
+set CMD_CMT_GEN=dir /s /b %SOURCE_PATH%\*.cpp %SOURCE_PATH%\*.inl ^| findstr /I /V "\\test\\" ^| cmt ^| cmt2html
+
+:: Commands and settings for Coverity Prevent
+set COV_OUTPATH=coverity
+set CMD_COV_BUILD=cov-build --dir %COV_OUTPATH% sbs -b %MAKE_PATH%
+set CMD_COV_ANALYZE=cov-analyze --dir %COV_OUTPATH% --all --symbian
+set CMD_COV_DELIVER=cov-commit-defects --dir %COV_OUTPATH% --remote trwsim47 --user cadsw --password cov3rity --product flextimer --cva
+set CMD_COV_SHOW_RESULTS=start http://trwsim47:5467
+
+:: Commands for iMaker
+set CMD_IMAKE_CORE=imaker vasco_ui core USE_SYMGEN=0
+set CMD_IMAKE_ROFS2=imaker vasco_ui rofs2 USE_SYMGEN=0
+set CMD_IMAKE_ROFS3=imaker vasco_ui rofs3 USE_SYMGEN=0
+set CMD_IMAKE_UDAERASE=imaker vasco_ui udaerase USE_SYMGEN=0
+set CMD_IMAKE_CORE_SYMBOLS=imaker vasco_ui romsymbol
+set CMD_IMAKE_ROFS2_SYMBOLS=imaker vasco_ui rofs2-symbol
+set CMD_IMAKE_ROFS3_SYMBOLS=imaker vasco_ui rofs3-symbol
+
+:: Commands and settings for CodeScanner
+set CODESCANNER_PATH=cs_output
+set CMD_CODESCANNER=codescanner -t off
+
+:: Python script for checking from test logs are tests passed
+set PY_ALL_TESTS_PASSED=^
+import re,sys;^
+file = open('%EPOCROOT%/epoc32/winscw/c/logs/testframework/testreport.txt');^
+txt = '\n'.join(file);^
+reg1 = re.search('^\s*(?:Passed cases\: (\d+))$', txt, re.MULTILINE);^
+reg2 = re.search('^\s*(?:Total cases\: (\d+))$', txt, re.MULTILINE);^
+sys.exit(0 if reg1.group(1)==reg2.group(1) else 1)
+
+:: Python script for parsing test result summary from test logs
+set PY_PARSE_TEST_RESULTS=^
+import re;^
+file = open('%EPOCROOT%/epoc32/winscw/c/logs/testframework/testreport.txt');^
+txt = '\n'.join(file);^
+reg = re.findall('^\s*(.*cases\: \d+)$', txt, re.MULTILINE);^
+print '\n'.join(reg);^
+file.close()
+
+::---------------------------------------------------------------------------
+:: Parse input
+::---------------------------------------------------------------------------
+
+if not "%1"=="__INITIALIZED__" (
+    goto START_UP
+
+) else (
+
+    if "%2"=="" (
+        set QUEUE=CHECK_EPOCROOT CLEAN_NOLOGS BUILD_ALL BUILD_TRACES RUN_TESTS GEN_CMT_REPORTS GEN_CS_REPORTS
+        goto SCHEDULER
+
+    ) else if /i "%2"=="build" (
+        set QUEUE=CHECK_EPOCROOT CLEAN_NOLOGS BUILD_ALL BUILD_TRACES
+        goto SCHEDULER
+
+    ) else if /i "%2"=="ctc" (
+        rem - atsinterface does not work with CTC instrumentation, use consoleui instead
+        rem - NOTE Emulator has to be closed manually
+        set CMD_TEST_RUN=start /wait %EPOCROOT%epoc32\release\winscw\udeb\consoleui.exe -dtextshell -- -testmodule testflextimer -run all
+        set QUEUE=CHECK_EPOCROOT INSTRUMENT_CTC DEL_CTC_REPORTS RUN_TESTS GEN_CTC_REPORTS
+        goto SCHEDULER
+
+    ) else if /i "%2"=="cov" (
+        set QUEUE=CHECK_EPOCROOT CLEAN_NOLOGS GEN_COV_REPORTS
+        goto SCHEDULER
+
+    ) else if /i "%2"=="image" (
+        set QUEUE=CHECK_EPOCROOT GEN_IMAGE GEN_SYMBOLS
+        goto SCHEDULER
+
+    ) else if /i "%2"=="test" (
+        set QUEUE=CHECK_EPOCROOT GEN_CMT_REPORTS GEN_CS_REPORTS
+        goto SCHEDULER
+
+    ) else if /i "%2"=="help" goto SHOW_HELP
+)
+
+echo Illegal parameter %2
+
+goto SHOW_HELP
+
+::---------------------------------------------------------------------------
+:START_UP
+::---------------------------------------------------------------------------
+:: Start a command shell with delayed environment expansion
+
+cmd.exe /V:ON /C %0 __INITIALIZED__ %1
+
+goto THE_END
+
+::---------------------------------------------------------------------------
+:SCHEDULER
+::---------------------------------------------------------------------------
+:: Run the build commands. Eat commands from QUEUE one by one
+
+for /f "tokens=1*" %%i in ( "!QUEUE!" ) do (
+    set QUEUE=%%j
+    rem echo ====================================================================
+    rem echo %%i
+    rem echo ====================================================================
+    goto %%i
+)
+
+goto BUILD_OK
+
+::---------------------------------------------------------------------------
+:BUILD_ALL
+::---------------------------------------------------------------------------
+
+call %CMD_BUILD_ALL%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:BUILD_TRACES
+::---------------------------------------------------------------------------
+
+call %CMD_BUILD_TRACE%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:CLEAN_NOLOGS
+::---------------------------------------------------------------------------
+:: Reallyclean FlexTimer component without showing compilation logs on screen
+
+call %CMD_BUILD_CLEAN% > NUL 2>&1
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:INSTRUMENT_CTC
+::---------------------------------------------------------------------------
+:: Instrument FlexTimer WINSCW UDEB with CTC++
+
+:: Remove old CTC symbols
+del %CTC_OUTPATH%\%CTC_OUTFILE%.sym > NUL 2>&1
+
+:: Clean old compilation
+call %CMD_CTC_CLEAN% > NUL 2>&1
+
+:: Instrument the code
+call %CMD_CTC_BUILD%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:DEL_CTC_REPORTS
+::---------------------------------------------------------------------------
+:: Delete CTC generated test reports. SYM-file is deleted before 
+:: instrumenting CTC.
+
+del %CTC_OUTPATH%\%CTC_OUTFILE%.dat > NUL 2>&1
+rmdir /q /s %CTC_OUTPATH%\CTCHTML > NUL 2>&1
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:RUN_TESTS
+::---------------------------------------------------------------------------
+
+:: Compile test component
+call %CMD_TEST_BUILD%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+echo Testing...
+
+:: Run test application
+%CMD_TEST_RUN%
+if not "%errorlevel%"=="0" goto TEST_FAILED
+
+:: Verify test results
+call python -c "%PY_ALL_TESTS_PASSED%"
+if not "%errorlevel%"=="0" goto TEST_FAILED
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_CTC_REPORTS
+::---------------------------------------------------------------------------
+
+:: Generate CTC++ reports
+call %CMD_CTC_GEN% 
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_CMT_REPORTS
+::---------------------------------------------------------------------------
+
+call %CMD_CMT_GEN%
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_COV_REPORTS
+::---------------------------------------------------------------------------
+
+:: Delete the old results
+rmdir /q /s %COV_OUTPATH% > NUL 2>&1
+
+:: Build with Coverity Prevent
+call %CMD_COV_BUILD%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+:: Analyze the code
+call %CMD_COV_ANALYZE%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+:: Deliver the results
+call %CMD_COV_DELIVER%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+:: Open the results
+%CMD_COV_SHOW_RESULTS%
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_CS_REPORTS
+::---------------------------------------------------------------------------
+
+set __CODESCANNER_LAST_DIR=
+set __CODESCANNER_PARAMETERS=
+
+:: Find all inc and src -directories that are not in codescanner results nor
+:: test code. Add '-i' parameter to every directory except the last one. (As
+:: codescanner -h states.)
+
+for /f "usebackq" %%i in (`dir /s /b %SOURCE_PATH%\src %SOURCE_PATH%\inc ^| findstr /V "\\test\\ \\%CODESCANNER_PATH%\\"`) do (
+    if defined __CODESCANNER_LAST_DIR set __CODESCANNER_PARAMETERS=!__CODESCANNER_PARAMETERS! -i !__CODESCANNER_LAST_DIR!
+    set __CODESCANNER_LAST_DIR=%%i
+)
+
+%CMD_CODESCANNER% %__CODESCANNER_PARAMETERS% %__CODESCANNER_LAST_DIR% %CODESCANNER_PATH%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+:: Open the results
+start %CODESCANNER_PATH%\problemIndex.html
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:CHECK_EPOCROOT
+::---------------------------------------------------------------------------
+
+:: Check that the given parameter is a root dir.
+for /f %%i in ("%EPOCROOT%") do (
+    if /i not "%EPOCROOT%"=="%%~di\" (
+        echo EPOCROOT is invalid: %EPOCROOT%
+        echo It should be a root of certain drive letter e.g. T:\
+        goto BUILD_ERROR
+    )
+)
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_IMAGE
+::---------------------------------------------------------------------------
+
+:: Go to the SDK drive
+for /f %%i in ("%EPOCROOT%") do %%~di
+
+:: Make image
+call %CMD_IMAKE_CORE%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+call %CMD_IMAKE_ROFS2%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+call %CMD_IMAKE_ROFS3%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+call %CMD_IMAKE_UDAERASE%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+echo.
+echo ======================================================================
+echo IMAGES ARE READY
+echo ======================================================================
+echo.
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:GEN_SYMBOLS
+::---------------------------------------------------------------------------
+
+:: Go to the SDK drive
+for /f %%i in ("%EPOCROOT%") do %%~di
+
+:: Generate symbols
+call %CMD_IMAKE_CORE_SYMBOLS%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+call %CMD_IMAKE_ROFS2_SYMBOLS%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+call %CMD_IMAKE_ROFS3_SYMBOLS%
+if not "%errorlevel%"=="0" goto BUILD_ERROR
+
+goto SCHEDULER
+
+::---------------------------------------------------------------------------
+:BUILD_ERROR
+::---------------------------------------------------------------------------
+
+echo.
+echo Build failed
+echo.
+
+goto THE_END
+
+::---------------------------------------------------------------------------
+:BUILD_OK
+::---------------------------------------------------------------------------
+
+echo.
+echo Build OK
+echo.
+
+goto THE_END
+
+::---------------------------------------------------------------------------
+:TEST_FAILED
+::---------------------------------------------------------------------------
+
+echo.
+echo Testing failed
+echo.
+
+call python -c "%PY_PARSE_TEST_RESULTS%"
+
+goto THE_END
+
+::---------------------------------------------------------------------------
+:SHOW_HELP
+::---------------------------------------------------------------------------
+echo.
+echo A script for building and testing FlexTimer. Version %VERSION%
+echo.
+echo Usage:
+echo    flextimer_build ^<option^>
+echo.
+echo Options:
+echo.
+echo    ^<none^>  Build component (with traces), build test component and run
+echo            tests, generate static analysis
+echo.
+echo    build   Rebuild component (with traces)
+echo.
+echo    cov     Generate and deliver Coverity Prevent report
+echo.
+echo    ctc     Instrument CTC++, build test component and run tests, 
+echo            generate test coverity reports
+echo.
+echo    image   Create CORE and ROFS1, ROFS2, ROFS3 and UDAERASE flash images
+echo.
+echo    help    Show this help
+echo.
+
+::---------------------------------------------------------------------------
+:THE_END
+::---------------------------------------------------------------------------
+endlocal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/bmarm/testflextimeru.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,4 @@
+EXPORTS
+	LibEntryL__Fv @ 1 NONAME R3UNUSED ; LibEntryL(void)
+	SetRequirements__FRP16CTestModuleParamRUl @ 2 NONAME R3UNUSED ; SetRequirements(CTestModuleParam *&, unsigned long &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/bwins/testflextimeru.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,4 @@
+EXPORTS
+	?LibEntryL@@YAPAVCTestModuleBase@@XZ @ 1 NONAME ; class CTestModuleBase * __cdecl LibEntryL(void)
+	?SetRequirements@@YAHAAPAVCTestModuleParam@@AAK@Z @ 2 NONAME ; int __cdecl SetRequirements(class CTestModuleParam * &,unsigned long &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/eabi/testflextimeru.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,10 @@
+EXPORTS
+	_Z9LibEntryLv @ 1 NONAME
+	_Z15SetRequirementsRP16CTestModuleParamRm @ 2 NONAME
+	_ZTI15CTestRFlexTimer @ 3 NONAME
+	_ZTI20CInheritedCFlexTimer @ 4 NONAME
+	_ZTI21CInheritedCFlexTimer2 @ 5 NONAME
+	_ZTV15CTestRFlexTimer @ 6 NONAME
+	_ZTV20CInheritedCFlexTimer @ 7 NONAME
+	_ZTV21CInheritedCFlexTimer2 @ 8 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/bwins/flextimerservermonitorclientu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,8 @@
+EXPORTS
+	?StartMonitoring@RFlexTimerServerMonitor@@QAEHXZ @ 1 NONAME ; int RFlexTimerServerMonitor::StartMonitoring(void)
+	?GetStatus@RFlexTimerServerMonitor@@QAEHAAH@Z @ 2 NONAME ; int RFlexTimerServerMonitor::GetStatus(int &)
+	?StopMonitoring@RFlexTimerServerMonitor@@QAEHXZ @ 3 NONAME ; int RFlexTimerServerMonitor::StopMonitoring(void)
+	?Connect@RFlexTimerServerMonitor@@QAEHXZ @ 4 NONAME ; int RFlexTimerServerMonitor::Connect(void)
+	??1RFlexTimerServerMonitor@@QAE@XZ @ 5 NONAME ; RFlexTimerServerMonitor::~RFlexTimerServerMonitor(void)
+	??0RFlexTimerServerMonitor@@QAE@XZ @ 6 NONAME ; RFlexTimerServerMonitor::RFlexTimerServerMonitor(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/eabi/flextimerservermonitorclientu.def	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,10 @@
+EXPORTS
+	_ZN23RFlexTimerServerMonitor14StopMonitoringEv @ 1 NONAME
+	_ZN23RFlexTimerServerMonitor15StartMonitoringEv @ 2 NONAME
+	_ZN23RFlexTimerServerMonitor7ConnectEv @ 3 NONAME
+	_ZN23RFlexTimerServerMonitor9GetStatusERi @ 4 NONAME
+	_ZN23RFlexTimerServerMonitorC1Ev @ 5 NONAME
+	_ZN23RFlexTimerServerMonitorC2Ev @ 6 NONAME
+	_ZN23RFlexTimerServerMonitorD1Ev @ 7 NONAME
+	_ZN23RFlexTimerServerMonitorD2Ev @ 8 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*     Server that monitors has FlexTimerServer crashed during testing.
+*/
+
+PRJ_PLATFORMS
+
+    DEFAULT
+
+PRJ_TESTEXPORTS
+
+PRJ_EXPORTS
+
+    ../rom/flextimerservermonitor.iby CORE_MW_LAYER_IBY_EXPORT_PATH(flextimerservermonitor.iby)
+
+PRJ_TESTMMPFILES
+
+PRJ_MMPFILES
+
+    flextimerservermonitorserver.mmp
+    flextimerservermonitorclient.mmp
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/flextimerservermonitorclient.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: 
+*       MMP file for client of server that monitors has FlexTimerServer 
+*       crashed during testing.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          flextimerservermonitorclient.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x2002EA9C
+
+CAPABILITY      ALL -TCB
+VENDORID        VID_DEFAULT
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../traces
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          rflextimerservermonitor.cpp
+
+LIBRARY         euser.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/group/flextimerservermonitorserver.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: 
+*       MMP file for server that monitors has FlexTimerServer crashed during 
+*       testing.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          flextimerservermonitorserver.exe
+TARGETTYPE      exe
+UID             0x1000008D 0x2002EA9B
+
+VENDORID        VID_DEFAULT
+CAPABILITY      CAP_SERVER
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../traces
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          flextimerservermonitorserver.cpp 
+SOURCE          flextimerservermonitorsession.cpp
+
+LIBRARY         euser.lib
+LIBRARY         flextimerclient.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorcommon.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Common definitions for FlexTimerServerMonitor client/server
+ *      communication.
+ */
+/*
+ * %version: 1 %
+ */
+#ifndef FLEXTIMERSERVERMONITORCOMMON_H
+#define FLEXTIMERSERVERMONITORCOMMON_H
+
+/**
+ * Function codes used in message passing between client and server.
+ */
+enum TFlexTimerServerMonitorRequests
+    {
+    EFlexTimerServerMonitorStartMonitoring = 1, ///< Start monitoring
+    EFlexTimerServerMonitorHasServerCrashed,    ///< Has monitored server crashed
+    EFlexTimerServerMonitorStopMonitoring       ///< Stop monitoring
+    };
+
+/**
+ * Panic category for FlexTimerServerMonitor server panics
+ */
+_LIT( KFlexTimerServerMonitorPanicCategory, "TestFlexTimer-Monitor" );
+
+/**
+ * Panic codes for panic category TestFlexTimer-Monitor
+ */
+enum TFlexTimerServerMonitorPanicCode
+    {
+    EActiveSchedulerCreationFailed = 1,
+    EServerCreationFailed,
+    EStartingServerFailed,
+    ECleanupStackCreationFailed
+    };
+
+
+const TUint KFlexTimerServerMonitorMajorVersionNumber = 0; ///< Major version
+const TUint KFlexTimerServerMonitorMinorVersionNumber = 1; ///< Minor version
+const TUint KFlexTimerServerMonitorBuildVersionNumber = 1; ///< Build version
+
+/**
+ * Name of the FlexTimer server monitor process
+ */
+_LIT( KFlexTimerServerMonitorServerName, "FlexTimerServerMonitorServer" );
+
+/**
+ * Name of the FlexTimer server monitor process executable
+ */
+_LIT( KFlexTimerServerMonitorServerExe, "flextimerservermonitorserver.exe" );
+
+/**
+ * Number of the message slots for FlexTimer server monitor process.
+ * 
+ * Due there are no asynchronous messaging, the number of slots can be one.
+ */
+const TInt KFlexTimerServerMonitorServerMessageSlots = 1;
+
+#endif // FLEXTIMERSERVERMONITORCOMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorserver.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Server implementation for FlexTimerServerMonitor.
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERSERVERMONITORSERVER_H
+#define FLEXTIMERSERVERMONITORSERVER_H
+
+// System includes
+#include <e32base.h>
+#include <rflextimer.h>
+
+// Class declaration
+/**
+ * A server for detecting, has FlexTimerServer crashed during the
+ * monitoring period.
+ */
+class CFlexTimerServerMonitorServer : public CServer2
+    {
+    
+public:
+    /**
+     * Two phased constructor 
+     * 
+     * @param aPriority Active object priority for the server 
+     * @return Pointer to created server object
+     */
+    IMPORT_C static CFlexTimerServerMonitorServer* NewL( 
+        CActive::TPriority aPriority );
+
+    /**
+     * Destructor 
+     */
+    virtual ~CFlexTimerServerMonitorServer();
+
+public:
+
+    /**
+     * From CServer2
+     * Function for creating a new session to this server. 
+     *
+     * @param aVersion Version identifier from client
+     * @param aMessage Reference to creation message sent by client
+     * @return Pointer to created session object
+     */
+    CSession2* NewSessionL( const TVersion& aVersion,
+                            const RMessage2& aMessage ) const;
+
+    /**
+     * Function for creating server thread resources. Creates the server
+     * object and active scheduler. Loops in the active scheduler to serve
+     * client requests until explicitly shutdown. Function leaves if the
+     * creation of needed resources fails.
+     */
+    static void StartServerL();
+
+    /**
+     * Start monitoring FlexTimer server crashing.
+     * 
+     * @return KErrNone when succeeded, KErrAlreadyExists if monitoring was
+     * already started, or any other system level error code.
+     */
+    TInt StartMonitoring();
+    
+    /**
+     * Stop monitoring FlexTimer server crashing.
+     * 
+     * @return KErrNone when succeeded, KErrNotFound if monitoring is not
+     * started.
+     */
+    TInt StopMonitoring();
+    
+    /**
+     * Get status of monitoring the server. I.e. has the server crashed or 
+     * not.
+     *
+     * @param aHasServerCrashed Return ETrue if server has crashed while
+     * monitoring, otherwise EFalse.
+     * @return KErrNone when succeeded, KErrNotFound if monitoring is not
+     * started.
+     */
+    TInt GetStatus( TBool& aHasServerCrashed );
+    
+private:
+
+    /**
+     * Constructor
+     * 
+     * @param aPriority Active object priority 
+     */
+    CFlexTimerServerMonitorServer( CActive::TPriority aPriority );
+
+private: // Data
+
+    /**
+     * Handle to FlexTimer server.
+     * This parameter needs to be in server due it is manipulated by
+     * multible sessions.
+     */
+    RFlexTimer iFlexTimer;
+    
+    /**
+     * State of monitoring. ETrue if monitoring has started, EFalse if not.
+     * This state is introduced for preventing starting/stopping the
+     * monitoring more than once in a row.
+     */
+    TBool iIsMonitoringOn;
+    };
+
+#endif /* FLEXTIMERSERVERMONITORSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/flextimerservermonitorsession.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Session implementation for FlexTimerServerMonitor server
+ */
+/*
+ * %version: 1 %
+ */
+// Protection against nested includes
+#ifndef FLEXTIMERSERVERMONITORSESSION_H
+#define FLEXTIMERSERVERMONITORSESSION_H
+
+// System includes
+#include <e32base.h>
+
+// Forward declarations
+class RFlexTimer;
+
+// Class declaration
+/**
+ * Session for FlexTimerServerMonitor server.
+ * Just receives requests from client and calls server's interface.
+ */
+class CFlexTimerServerMonitorSession : public CSession2
+    {
+
+public:
+
+    /**
+     * Two phase constructor
+     */
+    static CFlexTimerServerMonitorSession* NewL();
+
+    /**
+     * Destructor
+     */
+    virtual ~CFlexTimerServerMonitorSession();
+
+    /**
+     * From CSession2
+     * Message handler servicing client requests. Interprets message type and
+     * passes it to correct function for processing.
+     * 
+     * @param aMessage Message from client
+     */
+    void ServiceL( const RMessage2& aMessage );
+
+private:
+
+    /**
+     * Constructor
+     */
+    CFlexTimerServerMonitorSession();
+
+    /**
+     * 2nd phase constructor
+     */
+    void ConstructL();
+
+private: // Data
+
+    };
+
+#endif /* FLEXTIMERSERVERMONITORSESSION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/inc/rflextimerservermonitor.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Client implementation for FlexTimerServerMonitor
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef RFLEXTIMERSERVERMONITOR_H
+#define RFLEXTIMERSERVERMONITOR_H
+
+// INCLUDE FILES
+#include <e32std.h> 
+
+// CLASS DECLARATION
+/**
+ * Client implementation for FlexTimerServerMonitor.
+ * Forwards all requests as synchronous messages to the client.
+ * 
+ * Creates the server if it is not up'n'running when connecting to the server
+ * at the first time.
+ * 
+ * StartMonitoring() has to be called before StopMonitoring() and GetStatus()
+ * works. Note! The starting can be done by different handle. I.e.
+ * 
+ * @code
+ * 
+ *      RFlexTimerServerMonitor mon1;
+ *      mon1.Connect();
+ *      mon1.StartMonitoring();
+ *      mon1.Close();
+ *      
+ *      .
+ *      .
+ *      . 
+ *      
+ *      RFlexTimerServerMonitor mon2;
+ *      mon2.Connect();
+ *      TBool hasCrashed;
+ *      mon2.GetStatus( hasCrashed );
+ *      // Do your stuff
+ *      ...
+ *      mon2.StopMonitoring();
+ *      mon2.Close();
+ *      
+ * @endcode
+ */
+class RFlexTimerServerMonitor : public RSessionBase
+    {
+public:
+    // Constructors and destructors
+
+    /**
+     * Constructor
+     */
+    IMPORT_C RFlexTimerServerMonitor();
+
+    /**
+     * Destructor
+     */
+    IMPORT_C ~RFlexTimerServerMonitor();
+
+    /**
+     * Connect to the server.
+     * 
+     * @return KErrNone on success. Otherwise returns one of the system-wide
+     * error codes.
+     */
+    IMPORT_C TInt Connect();
+
+    /**
+     * Start detecting the crashes.
+     * 
+     * @return KErrNone if succeeded, KErrAlreadyExists if monitoring is
+     * already activated, or any other system-wide error code.
+     */
+    IMPORT_C TInt StartMonitoring();
+
+    /**
+     * Stop detecting the crashes.
+     * 
+     * @return KErrNone if succeeded, KErrNotFound if monitoring is not
+     * activated, or any other system-wide error code.
+     */
+    IMPORT_C TInt StopMonitoring();
+    
+    /**
+     * Get the current status of monitoring.
+     * 
+     * 
+     * @param aHasServerCrashed ETrue if server has crashed, EFalse otherwise
+     * @return KErrNone if succeeded, KErrNotFound if monitoring is not
+     * activated, or any other system-wide error code.
+     */
+    IMPORT_C TInt GetStatus( TBool& aHasServerCrashed );
+    
+private:
+    
+    /**
+     * Gets the version number.
+     * @return The version.
+     */
+    TVersion Version() const;
+
+    /**
+     * Connects to the server. If server does not exist, it is created.
+     * @return KErrNone on success. Otherwise returns one of the system-wide
+     * error codes.
+     */
+    TInt StartServer();
+    };
+
+#endif // RFLEXTIMERSERVERMONITOR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/rom/flextimerservermonitor.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef FLEXTIMERSERVERMONITOR_IBY
+#define FLEXTIMERSERVERMONITOR_IBY
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\flextimerservermonitorclient.dll SHARED_LIB_DIR\flextimerservermonitorclient.dll
+file=ABI_DIR\BUILD_DIR\flextimerservermonitorserver.exe SHARED_LIB_DIR\flextimerservermonitorserver.exe
+
+#endif // FLEXTIMERSERVERMONITOR_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/flextimerservermonitorserver.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Server implementation for FlexTimerServerMonitor
+ */
+/*
+ * %version: 2 %
+ */
+
+#include "flextimerservermonitorserver.h"
+#include "flextimerservermonitorcommon.h"
+#include "flextimerservermonitorsession.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerservermonitorserverTraces.h"
+#endif
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Construction
+// --------------------------------------------------------------------------
+//
+EXPORT_C CFlexTimerServerMonitorServer* CFlexTimerServerMonitorServer::NewL(
+    CActive::TPriority aPriority )
+    {
+    return new ( ELeave ) CFlexTimerServerMonitorServer( aPriority );
+    }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServerMonitorServer::~CFlexTimerServerMonitorServer()
+    {
+    iFlexTimer.Close();
+    }
+
+// --------------------------------------------------------------------------
+// Creation of new sessions, called by server framework
+// --------------------------------------------------------------------------
+//
+CSession2* CFlexTimerServerMonitorServer::NewSessionL( 
+    const TVersion& aVersion ,
+    const RMessage2& /* aMessage */ ) const
+    {
+
+    if ( aVersion.iMajor > KFlexTimerServerMonitorMajorVersionNumber )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    // Create and return session
+    return CFlexTimerServerMonitorSession::NewL();
+    }
+
+// --------------------------------------------------------------------------
+// Connect to FlexTimer service
+// --------------------------------------------------------------------------
+//
+TInt CFlexTimerServerMonitorServer::StartMonitoring()
+    {
+    if ( iIsMonitoringOn )
+        {
+        return KErrAlreadyExists;
+        }
+    iIsMonitoringOn = ETrue;
+    return iFlexTimer.Connect();
+    }
+
+// --------------------------------------------------------------------------
+// Close connection to FlexTimer service
+// --------------------------------------------------------------------------
+//
+TInt CFlexTimerServerMonitorServer::StopMonitoring()
+    {
+    if ( !iIsMonitoringOn )
+        {
+        return KErrNotFound; 
+        }
+    iIsMonitoringOn = EFalse;
+    iFlexTimer.Close();
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Get status of the monitored process
+// --------------------------------------------------------------------------
+//
+TInt CFlexTimerServerMonitorServer::GetStatus( TBool& aHasServerCrashed )
+    {
+    if ( !iIsMonitoringOn )
+        {
+        return KErrNotFound;
+        }
+    
+    // Check has the FlexTimerServer crashed by trying to configure
+    // the timer. If the server has crashed, it fails. Usually, in case of
+    // server crash this will return KErrServerTerminated (-15).
+    TInt ret = iFlexTimer.Configure( TTimeIntervalMicroSeconds( 1000000 ) );
+
+    if ( ret == KErrNone )
+        { // No crash.
+        aHasServerCrashed = EFalse;
+        }
+    else
+        { // Crash has happened.
+        aHasServerCrashed = ETrue;
+        }
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Thread start function, loops in active scheduler
+// --------------------------------------------------------------------------
+//
+void CFlexTimerServerMonitorServer::StartServerL()
+    {
+    // Called when thread is created, create active scheduler
+    CActiveScheduler* scheduler = new CActiveScheduler;
+    User::LeaveIfNull( scheduler );
+
+    // Add active scheduler object to cleanup stack before installing it.
+    // It will be deleted, if any of the next operations fails.
+    CleanupStack::PushL( scheduler );
+    CActiveScheduler::Install( scheduler );
+
+    // Create server object and start it
+    CFlexTimerServerMonitorServer* server( NULL );
+    server = CFlexTimerServerMonitorServer::NewL( EPriorityStandard );
+    
+    // Push the server object to cleanup stack before starting it
+    CleanupStack::PushL( server );
+
+    User::LeaveIfError( server->Start( KFlexTimerServerMonitorServerName ) );
+
+    // Complete open rendezvous in this process (syncs with creator)
+    RProcess::Rendezvous( KErrNone );
+
+    // Active scheduler start will not leave, thus pop added objects
+    // from the cleanup stack. They will be deleted once the execution
+    // returns from the active scheduler (application is exiting)
+    CleanupStack::Pop( server );
+    CleanupStack::Pop( scheduler );
+
+    // Start active scheduler, thread stays in active scheduler loop
+    CActiveScheduler::Start();
+
+    // Delete allocated resources
+    delete server;
+    delete scheduler;
+    }
+
+// --------------------------------------------------------------------------
+// Constructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServerMonitorServer::CFlexTimerServerMonitorServer( 
+    CActive::TPriority aPriority ) :
+    CServer2( aPriority ), iIsMonitoringOn( EFalse )
+    {
+    }
+
+// ======== GLOBAL FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Main function of the server executable.
+// --------------------------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+    {
+    // Mark memory allocation check 
+    __UHEAP_MARK;
+
+    // Create cleanup stack
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    __ASSERT_ALWAYS(
+        cleanup != NULL, 
+        User::Panic( KFlexTimerServerMonitorPanicCategory, 
+                     ECleanupStackCreationFailed ) );
+    
+    // Start server
+    TRAPD( panicCode, CFlexTimerServerMonitorServer::StartServerL() );
+
+    delete cleanup;
+    if ( panicCode != KErrNone )
+        {
+        User::Panic( KFlexTimerServerMonitorPanicCategory, panicCode );
+        }
+
+    // Memory allocation check, panic in UDEB case of memory leak
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/flextimerservermonitorsession.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Session implementation for FlexTimerServerMonitor server
+ *
+ */
+/*
+ * %version: 1 %
+ */
+
+// System include files
+
+// User include files go here:
+#include <rflextimer.h>
+#include "flextimerservermonitorsession.h"
+#include "flextimerservermonitorcommon.h"
+#include "flextimerservermonitorserver.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "flextimerservermonitorsessionTraces.h"
+#endif
+
+// Constants
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// Constructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServerMonitorSession::CFlexTimerServerMonitorSession()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServerMonitorSession::~CFlexTimerServerMonitorSession()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// 2nd phase constructor
+// --------------------------------------------------------------------------
+//
+void CFlexTimerServerMonitorSession::ConstructL()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// Two-phased constructor
+// --------------------------------------------------------------------------
+//
+CFlexTimerServerMonitorSession* CFlexTimerServerMonitorSession::NewL()
+    {
+    CFlexTimerServerMonitorSession* self =
+            new (ELeave) CFlexTimerServerMonitorSession();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// Handle clients' requests. Due the request implementations are simple
+// the actions are done in ServiceL and not dispatched to separate functions.
+// --------------------------------------------------------------------------
+//
+void CFlexTimerServerMonitorSession::ServiceL( const RMessage2& aMessage )
+    {
+    // This ain't the most elegant solution but here we go.
+    //
+    // Passing the server's reference as a parameter during session creation 
+    // would be another solution.
+    CFlexTimerServerMonitorServer* server = 
+        static_cast<CFlexTimerServerMonitorServer*>( 
+            const_cast<CServer2*>( Server() ) );
+
+    // Dispatch and execute the client's request
+    switch ( aMessage.Function() )
+        {
+        case EFlexTimerServerMonitorStartMonitoring:
+            {
+            aMessage.Complete( server->StartMonitoring() );
+            break;
+            }
+        case EFlexTimerServerMonitorHasServerCrashed:
+            {
+            TBool hasCrashed;
+
+            TInt ret = server->GetStatus( hasCrashed );
+
+            TPckgBuf<TBool> pckg( hasCrashed );
+            aMessage.WriteL( 0, pckg );
+            aMessage.Complete( ret );
+            break;
+            }
+        case EFlexTimerServerMonitorStopMonitoring:
+            {
+            aMessage.Complete( server->StopMonitoring() );
+            break;
+            }
+        default:
+            aMessage.Complete( KErrNotSupported );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/src/rflextimerservermonitor.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *      Client implementation for FlexTimerServerMonitor
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+#include "rflextimerservermonitor.h"
+#include "flextimerservermonitorcommon.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "rflextimerservermonitorTraces.h"
+#endif
+
+// ======== MEMBER FUNCTIONS ========
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C RFlexTimerServerMonitor::RFlexTimerServerMonitor()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C RFlexTimerServerMonitor::~RFlexTimerServerMonitor()
+    {
+    Close();
+    }
+
+// ---------------------------------------------------------------------------
+// Connects to the server and create a session.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimerServerMonitor::Connect()
+    {
+    // Starts the server, if it does not already exist in the system.
+    TInt ret = StartServer();
+
+    if ( ret == KErrNone )
+        { // No session, create it
+        ret = CreateSession( 
+            KFlexTimerServerMonitorServerName,
+            Version(),
+            KFlexTimerServerMonitorServerMessageSlots );
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Start monitoring FlexTimer server crashes
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimerServerMonitor::StartMonitoring()
+    {
+    return SendReceive( EFlexTimerServerMonitorStartMonitoring );
+    }
+
+// ---------------------------------------------------------------------------
+// Get the status of the monitoring; has FlexTimer server crashed while
+// monitoring or not.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimerServerMonitor::GetStatus( TBool& aHasServerCrashed )
+    {
+    TPckgBuf<TBool> pckg;
+    TIpcArgs args( &pckg );
+
+    TInt ret = SendReceive( EFlexTimerServerMonitorHasServerCrashed, args );
+
+    // Extract the value returned from the server.
+    aHasServerCrashed = pckg();
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Stop monitoring FlexTimer server crashes
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt RFlexTimerServerMonitor::StopMonitoring()
+    {
+    return SendReceive( EFlexTimerServerMonitorStopMonitoring );
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the version number.
+// ---------------------------------------------------------------------------
+//
+TVersion RFlexTimerServerMonitor::Version() const
+    {
+    return ( TVersion( KFlexTimerServerMonitorMajorVersionNumber,
+                       KFlexTimerServerMonitorMinorVersionNumber,
+                       KFlexTimerServerMonitorBuildVersionNumber ) );
+    }
+
+// ---------------------------------------------------------------------------
+// Connects to the server. If server does not exist, it is created.
+// ---------------------------------------------------------------------------
+//
+TInt RFlexTimerServerMonitor::StartServer()
+    {
+    TFindServer findServer( KFlexTimerServerMonitorServerName );
+    TFullName serverName;
+
+    // See if the server is already started. 
+    TInt ret = findServer.Next( serverName );
+    
+    if ( ret != KErrNone )
+        {
+        //Server was not found so create one.
+        RProcess serverProcess;
+        TBuf<1> serverParameters;
+
+        // Load the executable for the server.
+        ret = serverProcess.Create( KFlexTimerServerMonitorServerExe,
+                                    serverParameters,
+                                    EOwnerThread );
+
+        if ( ret == KErrNone )
+            {
+            // Server has been created successfully. It is initially 
+            // in suspended state. Now resume the server process.
+
+            // Wait until the server process has been started.
+            TRequestStatus status;
+            
+            serverProcess.Rendezvous( status );
+            serverProcess.Resume();
+            User::WaitForRequest( status );
+
+            // Check if server has panicked during initialization.
+            ret = serverProcess.ExitType();
+            if ( ret == EExitPanic )
+                {
+                ret = KErrServerTerminated;
+                }
+            else
+                {
+                ret = status.Int();
+                }
+
+            // The server process stands on its own. This handle can
+            // be closed. 
+            serverProcess.Close();
+            }
+        }
+    return ret;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/flextimerservermonitor/traces/OstTraceDefinitions.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,4 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+	
+	DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+// Specify the source file followed by its destination here
+// copy will be used to copy the source file to its destination
+// If there's no destination then the source file will be copied
+// to the same name in \epoc32\include
+// Example: 
+/*
+\agnmodel\inc\AGMCOMON.H
+*/
+
+
+PRJ_TESTEXPORTS
+../rom/testflextimer.iby CORE_MW_LAYER_IBY_EXPORT_PATH(testflextimer.iby)
+../init/testflextimer.ini /epoc32/data/z/system/data/testframework.ini
+../init/testflextimer.ini /epoc32/wins/c/TestFramework/testframework.ini
+../init/testflextimer.ini /epoc32/winscw/c/TestFramework/testframework.ini
+
+PRJ_TESTMMPFILES
+	
+	testflextimer.mmp
+
+PRJ_MMPFILES
+	
+//	TestFlexTimer_nrm.mmp
+
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+\agnmodel\group\agnmodel.mmp
+#if defined(MARM)
+\agnmodel\group\agsvexe.mmp
+#endif
+*/
+
+#include "../flextimerservermonitor/group/bld.inf"
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/group/testflextimer.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: MMP file for STIF Test Framework's Normal test module.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          testflextimer.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E7
+
+CAPABILITY      ALL -TCB
+VENDORID		VID_DEFAULT
+
+EPOCALLOWDLLDATA
+
+DEFFILE         testflextimer.def
+
+USERINCLUDE     ../inc 
+USERINCLUDE     ../flextimerservermonitor/inc
+USERINCLUDE     ../../../server/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          testflextimer.cpp 
+SOURCE          testcflextimer.cpp 
+SOURCE          inheritedcflextimer.cpp
+SOURCE			inheritedcflextimer2.cpp
+SOURCE			testflexperiodic.cpp 
+SOURCE			testrflextimer.cpp
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY			flextimerclient.lib
+LIBRARY         flextimerservermonitorclient.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/group/testflextimer.pkg	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,60 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+; 
+; Description:
+;
+; 	Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"STIF"},(0x00000000),1,1,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+"\epoc32\release\armv5\udeb\TestFlexTimer.dll"   -   "!:\Sys\Bin\TestFlexTimer.dll"
+  
+; Embedded SIS 
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/group/testflextimer_doxyfile.txt	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,238 @@
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  Doxygen configuration for generating FlexTimer test
+#               specication.
+#
+#
+# Doxyfile 1.4.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = TestFlexTimer
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = \TestFlexTimer\
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = YES
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = 
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = NO
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = YES
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = NO
+GENERATE_TESTLIST      = NO
+GENERATE_BUGLIST       = NO
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = YES
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = \TestFlexTimer\
+FILE_PATTERNS          = *.h \
+                         *.rh \
+                         *.hrh
+RECURSIVE              = YES
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = NO
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = YES
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = YES
+TOC_EXPAND             = YES
+DISABLE_INDEX          = YES
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = YES
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = YES
+RTF_OUTPUT             = Doc
+COMPACT_RTF            = YES
+RTF_HYPERLINKS         = YES
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = NONSHARABLE_CLASS
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = YES
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/group/testflextimer_nrm.mmp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: MMP file for STIF Test Framework's Normal test module.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          testflextimer.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E7
+
+CAPABILITY      ALL -TCB
+VENDORID     	VID_DEFAULT
+
+EPOCALLOWDLLDATA
+
+DEFFILE         testflextimer.def
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../flextimerservermonitor/inc
+USERINCLUDE     ../../../server/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          testflextimer.cpp 
+SOURCE          testcflextimer.cpp
+SOURCE          inheritedcflextimer.cpp
+SOURCE			inheritedcflextimer2.cpp
+SOURCE			testflexperiodic.cpp 
+SOURCE			testrflextimer.cpp
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY			flextimerclient.lib
+LIBRARY         flextimerservermonitorclient.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/inheritedcflextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  CInheritedCFlexTimer inherits and implements CFlexTimer for testing purposes.
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CINHERITEDCFLEXTIMER_H
+#define CINHERITEDCFLEXTIMER_H
+
+// INCLUDE FILES
+#include "flextimer.h"
+
+// CLASS DECLARATION
+/**
+ *  desc
+ *
+ *  @see CFlexTimer
+ *  @see CPeriodic
+ *
+ */
+class CInheritedCFlexTimer : public CFlexTimer
+    {
+public:
+
+    /**
+     * A leaving constructor for the object.
+     * @param aPriority of the active object. If timing is critical, it
+     * should be higher than that of all other active objects owned by the
+     * scheduler.
+     * @return A pointer to a CInheritedCFlexTimer object on success.
+     * On error it leaves.
+     */
+    static CInheritedCFlexTimer* NewL( TInt aPriority,
+            TCallBack aCallBack );
+
+    /**
+     * Destructor for the object.
+     */
+    virtual ~CInheritedCFlexTimer();
+
+    /**
+     * desc
+     */
+    void SetCB( TCallBack aCallBack );
+
+    /**
+     * desc
+     */
+    TInt MyOwnConfigure( TTimeIntervalMicroSeconds32 aDelayWindow );
+
+protected:
+
+    /**
+     * Inherited from CActive.
+     */
+    virtual void RunL();
+
+private:
+
+    /**
+     * Constructs the object. The second phase of the construction.
+     */
+    void ConstructL();
+
+    /**
+     * Private constructor for the object.
+     * @param aPriority The priority of the active object. If timing is
+     * critical, it should be higher than that of all other active objects
+     * owned by the scheduler.
+     */
+    CInheritedCFlexTimer( TInt aPriority, TCallBack aCallBack );
+
+private:
+
+    /**
+     * The callback function which is called at the completion of
+     * flextimer server requests.
+     */
+    TCallBack iCallBack;
+
+    };
+
+#endif /* CINHERITEDCFLEXTIMER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/inheritedcflextimer2.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  CInheritedCFlexTimer inherits and implements CFlexTimer for testing purposes.
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CINHERITEDCFLEXTIMER2_H
+#define CINHERITEDCFLEXTIMER2_H
+
+// INCLUDE FILES
+#include "flextimer.h"
+
+// CLASS DECLARATION
+/**
+ *  desc
+ *
+ *  @see CFlexTimer
+ *  @see CPeriodic
+ *
+ */
+class CInheritedCFlexTimer2 : public CFlexTimer
+    {
+public:
+
+    /**
+     * A leaving constructor for the object.
+     * @param aPriority of the active object. If timing is critical, it
+     * should be higher than that of all other active objects owned by the
+     * scheduler.
+     * @return A pointer to a CInheritedCFlexTimer2 object on success.
+     * On error it leaves.
+     */
+    static CInheritedCFlexTimer2* NewL( TInt aPriority,
+            TCallBack aCallBack, TInt aId );
+
+    /**
+     * Destructor for the object.
+     */
+    virtual ~CInheritedCFlexTimer2();
+
+    /**
+     * desc
+     */
+    void SetCB( TCallBack aCallBack );
+
+    /**
+     * desc
+     */
+    TInt MyOwnConfigure( TTimeIntervalMicroSeconds32 aDelayWindow );
+
+protected:
+
+    /**
+     * Inherited from CActive.
+     */
+    virtual void RunL();
+
+private:
+
+    /**
+     * Constructs the object. The second phase of the construction.
+     */
+    void ConstructL();
+
+    /**
+     * Private constructor for the object.
+     * @param aPriority The priority of the active object. If timing is
+     * critical, it should be higher than that of all other active objects
+     * owned by the scheduler.
+     */
+    CInheritedCFlexTimer2( TInt aPriority, TCallBack aCallBack, TInt aId );
+
+private:
+
+    /**
+     * The callback function which is called at the completion of
+     * flextimer server requests.
+     */
+    TCallBack iCallBack;
+
+    TInt iId;
+
+    };
+
+#endif /* CINHERITEDCFLEXTIMER2_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/testcflextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,972 @@
+/*
+ * ============================================================================
+ *  Name        : testflexperiodic.h
+ *  Part of     : src / testflextimer
+ *  Description : STIF test cases for CFlexPeriodic timer.
+ *  Version     : %version: 1 %
+ *
+ *  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *  All rights reserved.
+ *  This component and the accompanying materials are made available
+ *  under the terms of the License "Eclipse Public License v1.0"
+ *  which accompanies this distribution, and is available
+ *  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ *  Initial Contributors:
+ *  Nokia Corporation - initial contribution.
+ *
+ *  Contributors:
+ *  Nokia Corporation
+ * ============================================================================
+ * Template version: 4.2
+ */
+
+#ifndef TESTCFLEXTIMER_H
+#define TESTCFLEXTIMER_H
+
+#include <e32base.h>
+#include "testflextimer.h"
+#include "inheritedcflextimer2.h"
+// FORWARD DECLARATIONS
+class CTestFlexTimer;
+
+class TTimerStruct
+    {
+public:
+    CInheritedCFlexTimer2 *iTimer;
+    TExtendedTestResult *iEResult;
+    TInt iTimersRunning; //For quick check that how many timers are currently running
+    TInt iCurrentlyActive; // Stupid as hell, but won't do another container
+    // This is only valid in first item and tells which item
+    // e.g CB belongs to.
+    CPeriodic *iStartTimer; // Same but this is start timer pointer.
+    TTimerStruct() :
+        iTimer(0), iEResult(0), iTimersRunning(0), iCurrentlyActive(0),
+                iStartTimer(0)
+        {
+        }
+    ;
+    };
+
+/**
+ *  STIF test cases for CFlexTimer class.
+ *  This class implements test cases for testing CFlexTimer class.
+ *
+ *  @since TB10.1
+ */
+NONSHARABLE_CLASS( CTestCFlexTimer ) : public CBase
+    {
+
+public:
+
+    /**
+     * Destructor.
+     */
+    virtual ~CTestCFlexTimer();
+
+    // Creating and firing timers - normal cases
+
+    /**
+     * @brief Create and destroy a timer - After
+     * 
+     * Test that timer can be instantiated and deleted.<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Create, start and delete timer.
+     * 
+     * @param aResult Result of the test for the FW.
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndDestroyCFlexTimerL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Create and expire a timer - After
+     * 
+     * Test that timer expires at it's max time <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - See that timeout is happening at latest possible moment.
+     * 
+     * @param aResult Result of the test for the FW.
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndExpireCFlexTimerL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Create two timers and expire those - overlapping - After 32bit
+     * 
+     * Test that two overlapping timers are fired at latest possible moment<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use overlapping time windows. (default window).<BR>
+     * - See that both timers expire when first timer expires.<BR>
+     * - Use 32bit After()
+     * 
+     * @param aResult Result of the test for the FW.
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndExpireTwoOverlappingAfterTimersL(
+            TTestResult& aResult, CTestFlexTimer *cb );
+
+    /**
+     * @brief Create two timers and expire those - overlapping - After 64bit
+     * 
+     * Test that two overlapping timers are fired at latest possible moment<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use overlapping time windows. (default window).<BR>
+     * - See that both timers expire when first timer expires.<BR>
+     * - use 64bit After().
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndExpireTwoOverlappingAfterTimers64L(
+            TTestResult& aResult, CTestFlexTimer *cb );
+
+    /**
+     * @brief Create two timers and expire those - not overlapping - After
+     * 
+     * Test that two timer that are not overlapping are fired at their own max time.<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use non-overlapping time windows. (default window).<BR>
+     * - See that both timers expire at latest possible moment.<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndExpireTwoNonOverlappingAfterTimersL(
+            TTestResult& aResult, CTestFlexTimer *cb );
+
+    /**
+     * @brief Create 2000 timers and expire those - After
+     * 
+     * Test that many timers are started and expired at rapid sequence<BR><BR>
+     * - Use class that is inherited from CFlexTimer.
+     * - Start and expire at 2000 timers. Some of having overlapping
+     * windows (default window)with each other and others not having.<BR> 
+     * - See that all timers expire within their window. Start timers so that at least 1000 timers.
+     * - are running simultaneously. <BR>
+     * - No need to check that they expire at latest possible moment
+     * - that is checked in algorithm tests.
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt HumongousAmountOfTimeridelidilidousL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Create and expire three timers - After/At/AtUTC
+     * 
+     * Test that At, After and AtUTC are handled equally<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start timers and wait for them to expire.<BR>
+     * - Start timers so that timers started with After and At
+     * overlap and timer started with AtUTC does not overlap.<BR>
+     * - See that After and At expire at the same time and that
+     * - AT UTC expires at it's max time
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CreateAndExpireThreeTimersL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    // Cancelling timers - normal cases
+
+    /**
+     * @brief Cancel a timer
+     * 
+     * See that normal cancelling works<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start timers With At, AtUTC and After.<BR>
+     * - Cancel a running timers and see that those do not expire anymore.<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt NormalCancelL( TTestResult& aResult, CTestFlexTimer *cb );
+
+    /**
+     * @brief Cancel a timer that would have triggered another timer - After
+     * 
+     * Test that canceling timer actually cancels it<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start two timers with overlapping windows.<BR>
+     * - Cancel first timer before it expires and check that
+     * second timer is fired at it's max time.
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt CancelTimerThatWouldHaveTriggeredAnotherTimerL(
+            TTestResult& aResult, CTestFlexTimer *cb );
+
+    //Configuring align window
+
+    /**
+     * @brief Configure time window - overlap 1
+     * 
+     * Test that Timers are triggered correctly after Configure<BR><BR> 
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use two timers. Set first timer having 50% window
+     * and second having 10% window.<BR>
+     * - Set timers so that first timers max window overlaps 1s with
+     * second timers window -> first timer causes second timer to be fired 
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureCTimerOverlap1L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure time window - overlap 2
+     * 
+     * Test that Timers are triggered correctly after Configure<BR><BR> 
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use 64bit IF.
+     * - Use two timers. Set first timer having 50% window
+     * and second having 10% window.<BR>
+     * - Set timers so that first timers min window overlaps 1s with
+     * second timers window -> second timer causes first timer to be fired 
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureCTimerOverlap2L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure time window - overlap 3
+     * 
+     * Test that if many Configures are used, latest is the one that remains. Also test 0 and 100% values<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use two timers. Set first timer having 0% window
+     * then overwrite that by giving 100% window to first timer.<BR>
+     * - Give second timer 0% window.<BR>
+     * - Start second timer so that it overlaps with first timer<BR>
+     * - See that first timer is fired when second is fired. 
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureCTimerOverlap3L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure time window - non-overlap
+     * 
+     * Test that Timers are triggered correctly after Configure<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use two timers. Set first timer having 0% window
+     * and second having 10% window.<BR>
+     * - Set timers so that second timers max window is 1 seconds earlier than first timers
+     * min window.<BR>
+     * - See that both timers fire at max time
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureCTimerNonOverlap1L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure time window - non-overlap 2
+     * 
+     * Test that Timers are triggered correctly after Configure<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Use two timers. Set first timer having 100% window
+     * - then overwrite that by giving first timer 50% window.<BR>
+     * - Give second timer 50% window.<BR>
+     * - Set timers so that second timers max window is 1 seconds earlier than first timers
+     * min window.<BR>
+     * - See that both timers fire at max time
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureCTimerNonOverlap2L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    //Time changes
+    /**
+     * @brief System time changes
+     * 
+     * Test that changing system time cancels AT and AtUTC timers and leaves After timers running<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start three timers. At/AtUTC/After<BR>
+     * - Change system time e.g. User::SetHomeTime()<BR>
+     * - See that At/AtUTC timers are cancelled with error code KErrAbort<BR>
+     * - See that remaining timer is fired at max time<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt SystemTimeChangesL( TTestResult& aResult, CTestFlexTimer *cb );
+
+    /**
+     * @brief Timezone changes
+     * 
+     * Test that changing time zone cancels AT and AtUTC timers and leaves After timers running<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start three timers. At/AtUTC/After<BR>
+     * - Change timezone e.g. User::SetUTCOffset()<BR>
+     * - See that At/AtUTC timers are cancelled with error code KErrAbort<BR>
+     * - See that remaining timer is fired at max time
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt TimeZoneChangesL( TTestResult& aResult, CTestFlexTimer *cb );
+
+    // Misuse of API cases
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that stupid parameters do not cause any harm<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(32bit) with interval 1. See that timer expires almost right away<BR>
+     * - Call After(32bit) with interval 0x7FFFFFFF. Cancel timer<BR>
+     * - Call After(64bit) with interval 1. See that timer expires almost right away<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimerL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that calling After(32bit) with zero interval panics client<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(32bit) with interval 0.
+     * - See that client is paniced
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimerZero32bitL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that calling After(64bit) with zero interval panics client<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(64bit) with interval 0.
+     * - See that client is paniced
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimerZero64bitL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that calling After(64bit) with 0xFFFFFFFFFFFFFFFF interval panics client<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(64bit) with interval 0xFFFFFFFFFFFFFFFF.
+     * - See that client is paniced
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimer64MaxL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that calling After(64bit) with three years interval panics client<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(64bit) with interval 93312000*1000*1000.
+     * - See that client is paniced
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimer64ThreeYearsL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After with dumbass parameters 
+     * 
+     * Test that calling After(64bit) with one year interval panics client<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(64bit) with interval 30*1000*1000*1000*1000.
+     * - Cancel timer
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt DumbAssParametersForCTimer64OneYearL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief call After with invalid parameters 
+     * 
+     * Test that negative intervals cause panic in After()<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(32bit) with negative interval See that it causes a panic.<BR>
+     * TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AfterWithNegativeValueL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call After(64bit) with invalid parameters 
+     * 
+     * Test that negative intervals cause panic in After()<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call After(64bit) with negative interval See that it causes a panic.<BR>
+     * TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AfterWithNegativeValue64L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief call At with current time 
+     * 
+     * Test that At() with current time panics<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call At with current time. See that client panics<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AtWithCurrentTimeL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief call AtUTC with current time 
+     * 
+     * Test that AtUTC() with current time panics<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call At with current time. See that client panics<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AtUTCWithCurrentTimeL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    /**
+     * @brief call At with time three years from now 
+     * 
+     * Test that At() with three years from now panics<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call At with three years from now. See that client panics<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AtWithThreeYearsL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    /**
+     * @brief call At with time one year from now 
+     * 
+     * Test that At() with one year from now panics<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call At with one year from now. 
+     * - Cancel timer<BR>
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AtWithOneYearL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief call At/AtUTC with invalid parameters 
+     * 
+     * Test that calling At() with time that is in the past causes panic<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call At with time in the past<BR>
+     * See that it causes panic TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt AtWithTimeInThePastL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Cancel an expired timer - After
+     * 
+     * Test that calling already expired timer does not cause any harm<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start timer and wait for it to expire. After it expires
+     * cancel it<BR>
+     * - Start timer again and see that it expires normally.
+     * 
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt
+            CancelExpiredTimerL( TTestResult& aResult, CTestFlexTimer *cb );
+
+    // Hilarious Configure calls
+    /**
+     * @brief Left edge of the time window lays in the past - max check
+     * 
+     * Test that no harm is done if left side of the window lays in the past<BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure with window_size x.<BR>
+     * - Call After with interval < x.<BR>
+     * - See that timer expires when max time is reached
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureLeftSideInThePastL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Left edge of the time window lays in the past - window check
+     * 
+     * Test that window works when left side of the window lays in the past <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure with window_size x.<BR>
+     * - Call After with interval < x.<BR>
+     * - Start another timer that expires before first timer.<BR>
+     * - See that both timers expire when max time of the second timer is reached.
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureLeftSideInThePastWindowCheckL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure(32bit) with negative window_size
+     * 
+     * Test that negative window panics client <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure(32bit) with negative window_size value.<BR>
+     * - See that it causes panic TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWithNegativeWindowSize32L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure(64bit) with negative window_size
+     * 
+     * Test that negative window panics client <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure(64bit) with negative window_size value.<BR>
+     * - See that it causes panic TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWithNegativeWindowSize64L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Configure(32bit) with 0xFFFFFFFF window_size
+     * 
+     * Test that 0xFFFFFFFF is valid window size <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure(32bit) with 0xFFFFFFFF window_size value.<BR>
+     * - See that it causes no harm
+     *  
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWithMaxWindow32L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief Configure(64bit) with three year window_size
+     * 
+     * Test that negative window panics client <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure(64bit) with three year window_size value.<BR>
+     * - See that it causes panic TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWithThreeYearWindow64L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+    
+    /**
+     * @brief Configure(64bit) with max window_size
+     * 
+     * Test that negative window panics client <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Call Configure(64bit) with max window_size value.<BR>
+     * - See that it causes panic TODO what panic? Shouldn't this read in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWithMaxWindow64L( TTestResult& aResult,
+            CTestFlexTimer *cb );
+        
+    /**
+     * @brief Call configure after starting timer
+     * 
+     * Test that configure is not used and returns error while timer is already running <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start timer.<BR>
+     * - Call Configure.<BR>
+     * - See that configure returns KErrInUse.<BR>
+     * - See that timer expires normally.
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt ConfigureWhileTimerIsInUseL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /**
+     * @brief Start timer twice
+     * 
+     * Test that client is paniced if timer is started twise <BR><BR>
+     * - Use class that is inherited from CFlexTimer.<BR>
+     * - Start timer with After()<BR>
+     * - Start timer again with At()<BR>
+     * - See that client panics with code EFlexTimerServerErrorPendingTimer //TODO referense in documentation
+     * 
+     * @param TBD
+     * @return The status of execution of the test. KErrNone if the test
+     *         was executed ok, any system wide errorcode otherwise.
+     */
+    static TInt TimerIsStartedTwiceL( TTestResult& aResult,
+            CTestFlexTimer *cb );
+
+    /*****************************************
+     * CB functions used by CFlexTimer tests *
+     /*****************************************/
+
+    /**
+     * @brief Check timer stop code and stop active scheduler
+     * 
+     * Simple function that stops the active scheduler. Checks that Error code is KErrNone
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackStopSchedulerKErrNone(
+            TAny* aArgument );
+
+    /**
+     * @brief Check timer stop code and stop active scheduler
+     * 
+     * Simple function that stops the active scheduler. Checks that Error code is KErrCancel
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackStopSchedulerKErrCancel(
+            TAny* aArgument );
+
+    /**
+     * @brief Check timer stop code and stop active scheduler
+     * 
+     * Simple function that stops the active scheduler. Checks that Error code is KErrAbort
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackStopSchedulerKErrAbort(
+            TAny* aArgument );
+
+    /**
+     * @brief Check timer stop code
+     * 
+     * Simple function that checks that Error code is KErrNone
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackKErrNone( TAny* aArgument );
+
+    /**
+     * @brief Check timer stop code
+     * 
+     * Simple function that checks that Error code is KErrAbort
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackKErrAbort( TAny* aArgument );
+
+    /**
+     * @brief Check error code and mark timestamps
+     * 
+     * Function that checks that Error code is KErrNone. ans saves timestamps
+     * @see CreateAndExpireTwoOverlappingAfterTimersL
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackKErrNoneMarkTimestamp(
+            TAny* aArgument );
+
+    /**
+     * @brief Check error code and mark timestamps
+     * 
+     * Function that checks that Error code is KErrNone. ans saves timestamps
+     * @see CreateAndExpireTwoOverlappingAfterTimersL
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt InheritedFlexTimerCallbackKErrNoneMarkTimestampStopScheduler(
+            TAny* aArgument );
+
+    /**
+     * @brief Stop active scheduler
+     * 
+     * Function that stops the active scheduler
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StopActiveScheduler( TAny* aArgument );
+
+    /**
+     * @brief Changes system time and cancels CPeriodic given as parameter
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt ChangeSystemTime1sAndCancel( TAny* aArgument );
+
+    /**
+     * @brief Changes system time and cancels CPeriodic given as parameter
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt ChangeTimeZoneAndCancel( TAny* aArgument );
+
+    /**
+     * @brief Changes system time and cancels CPeriodic given as parameter
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt ChangeSecureTimeAndCancel( TAny* aArgument );
+
+    /**
+     * @brief cancel CFlexTimer given as parameter
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CancelCFlexTimer( TAny* aArgument );
+
+    /**
+     * @brief See that expiry reason is correct. Array versio
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StopSchedulerKErrNoneArray( TAny* aArgument );
+
+    /**
+     * @brief cancel CFlexTimer given as parameter also cancel CPeriodic
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CancelCFlexTimerCancelPeriodic( TAny* aArgument );
+    /**
+     * @brief cancel CFlexTimer given as parameter
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CancelCFlexTimerArray( TAny* aArgument );
+    /**
+     * @brief cancel CFlexTimer given as parameter and stops active scheduler
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CancelCFlexTimerAndStopActiveScheduler( TAny* aArgument );
+
+    /**
+     * @brief stops activescheduler and cancels it self
+     * 
+     * N/A
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StopSchedulerAndCancel( TAny* aArgument );
+
+    /**
+     * @brief Not called CB
+     * 
+     * Fails if gets called
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt NotCalledCB( TAny* aArgument );
+    
+    /**
+     * @brief Callback function, that calls StartTimerAndAddToList
+     * 
+     * -
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CTestCFlexTimer::StartTimerAndAddToListCB( TAny* aArgument );
+    /**
+     * @brief Start random timer and add it to list given as parameter
+     * 
+     * -
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StartTimerAndAddToList(
+        RArray<TTimerStruct>* aArgument, TInt aTimers );
+
+    /**
+     * @brief Stop timer and mark time to list given as parameter
+     * 
+     * -
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StopTimer( TAny* aArgument );
+    /**
+     * @brief Try to configure timer and see that KErrInUse is returned
+     * 
+     * -
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt ConfigureKErrInUseArray( TAny* aArgument );
+
+    /**
+     * @brief start timer again
+     * 
+     * -
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt StartTimerAgainArray( TAny* aArgument );
+    
+    /**
+     * @brief Create two overlapping timers and start, run and expire them
+     * during high CPU load.
+     * 
+     * Test steps:<BR>
+     * 1. Create CFlexTimer_1, (inteval = 10s, window=0.2*10s (default))<BR>
+     * 2. Create CFlexTimer_2, (inteval = 8s, window=0.2*8s (default))<BR>
+     * 3. Start 99% CPU Load<BR>
+     * 4. Start timers<BR>
+     * 5. Wait timers to expire<BR>
+     * 6. Stop CPU load<BR>
+     * 5. Check that timers expired within ~8sec<BR>
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CTestCFlexTimer::CpuLoadCreateAndExpireTwoOverlappingAfterTimersL(
+            TTestResult& aResult, CTestFlexTimer *cb );
+    
+    /**
+     * @brief Create 100  timers and start, run and expire them during high
+     *  CPU load.
+     * 
+     * Test steps:<BR>
+     * 1. Create 100 random timers with random interval and window.<BR>
+     * 3. Start 98% CPU Load<BR>
+     * 4. Start timers<BR>
+     * 5. Wait timers to expire<BR>
+     * 6. Stop CPU load<BR>
+     * 5. Check that timers expired within expected limits.<BR>
+     * 
+     * @param N/A
+     * @return N/A
+     */
+    static TInt CTestCFlexTimer::CpuLoadManyTimersL(
+            TTestResult& aResult, CTestFlexTimer *cb );
+private:
+
+    /**
+     * Constructor is private to prevent instantiation of the class. 
+     */
+    CTestCFlexTimer();
+
+    };
+
+#endif // TESTCFLEXTIMER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/testflexperiodic.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,775 @@
+/*
+* ============================================================================
+*  Name        : testflexperiodic.h
+*  Part of     : src / testflextimer
+*  Description : STIF test cases for CFlexPeriodic timer.
+*  Version     : %version: 1 %
+*
+*  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+*  All rights reserved.
+*  This component and the accompanying materials are made available
+*  under the terms of the License "Eclipse Public License v1.0"
+*  which accompanies this distribution, and is available
+*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+*  Initial Contributors:
+*  Nokia Corporation - initial contribution.
+*
+*  Contributors:
+*  Nokia Corporation
+* ============================================================================
+* Template version: 4.2
+*/
+
+#ifndef TESTFLEXPERIODIC_H
+#define TESTFLEXPERIODIC_H
+
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CFlexPeriodic;
+
+/**
+ *  STIF test cases for CFlexPeriodic class.
+ *  This class is only a container for STIF test cases - it should NOT be
+ *  instantiated, just call the static functions.
+ *
+ *  @lib testflextimer.lib
+ *  @since TB10.1
+ */
+NONSHARABLE_CLASS( CTestFlexPeriodic ) : public CBase
+    {
+
+/**
+ * Data for restarting timer in callback function.
+ */
+struct TRestartInfo
+    {
+    CFlexPeriodic* iTimer;                      ///< Pointer to the timer
+    TInt iFirstTicksLeft;                       ///< Number of times the 1st timer settings are run
+    RArray<TTime>* iFirstTimestamps;            ///< Timestamps for the 1st timer settings
+    RArray<TTime>* iSecondTimestamps;           ///< Timestamps for the 2nd timer settings
+    TTimeIntervalMicroSeconds iSecondInterval;  ///< Interval for the 2nd timer settings
+    };
+
+/**
+ * Data for CFlexPeriodic::Configure() tests
+ */
+struct TConfigureInfo
+    {
+    CFlexPeriodic* iTimer;   ///< Pointer to the timer under testing
+    TInt iDelayWindow;       ///< value for delay window to be set
+    TInt iIntervalWindow;    ///< value for interval window to be set
+    TInt iConfigResult32;    ///< Result of configure(32 bit)
+    TInt iConfigResult64;    ///< Result of configure(64 bit)
+    };
+
+/**
+ * Data for running a test case in own thread
+ */
+struct TTestCaseArguments
+    {
+    TInt (*iTestFunction)( TTestResult&, CTestFlexTimer* ); ///< Function pointer to the test case to be run
+    TTestResult& iResult;                                   ///< The result of the test (argument for the test case)
+    CTestFlexTimer* iCallback;                              ///< Pointer to the STIF test class (argument for the test case)
+    };
+
+public:
+
+    /**
+    * Destructor.
+    */
+    virtual ~CTestFlexPeriodic();
+
+    /**
+    * @brief Create and expire CFlexPeriodic timer.
+    * 
+    * Create and start one CFlexPeriodic timer with 1 sec delay and interval 
+    * wait for 5 secs. Check that the timer has been expired at correct times.
+    * 
+    * Timer expiration times (sec):
+    * 1, 2, 3, 4, ...
+    * 
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Start() 32-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartOneTimerL( TTestResult& aResult, 
+                                CTestFlexTimer* aCallback );
+    
+    /**
+    * @brief Create and expire CFlexPeriodic timer with Error CB.
+    * 
+    * Create and start one CFlexPeriodic timer with 1 sec delay and interval 
+    * wait for 5 secs. Give timer also Error CB argument.
+    * Check that the timer has been expired at correct times.
+    * If callback gets called case panics.
+    * 
+    * Timer expiration times (sec):
+    * 1, 2, 3, 4, ...
+    * 
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Start() 32-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartOneTimerWithErrorCbL( TTestResult& aResult, 
+                                CTestFlexTimer* aCallback );
+    
+    /**
+    * @brief Restart CFlexPeriodic in callback function. 
+    *
+    * Start a periodic timer with 1 sec delay and interval.
+    *
+    * After 2 expiration cancel and start the timer in its callback function
+    * with 2 secs delay and interval.
+    * 
+    * Timer expiration times (sec):
+    * 1, 2, 4, 6, 8, ...
+    * 
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Start() 64-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    * - Cancelling and starting timer in callback function
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallbackRestartL( TTestResult& aResult, 
+                                  CTestFlexTimer* aCallback ); 
+
+    /**
+    * @brief Configure window sizes, 32 bit
+    * 
+    * Start 2 timers:
+    * T1:
+    * - delay       3.0 sec, window 0.0 sec
+    * - interval    2.0 sec, window 1.5 sec
+    * T2:
+    * - delay       3.5 sec, window 1.5 sec
+    * - interval    1.0 sec, window 0.0 sec
+    *
+    * Both timers shoud expire at (sec)
+    * 3.0, 4.0, 5.0, 6.0, ...
+    * 
+    * Functionality of delay window is tested in sec 3.0 expiration and
+    * functionality of interval window is tested in other expirations.
+    *
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Configure() 32-bit
+    * - CFlexPeriodic::Start() 32-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    * - Delay
+    * - Interval
+    * - Delay window
+    * - Interval window  
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWindow32L( TTestResult& aResult,
+                                    CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Configure window sizes, 64 bit
+    * 
+    * @see ConfigureWindow32L for test setup.
+    * 
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Configure() 64-bit
+    * - CFlexPeriodic::Start() 64-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    * - Delay
+    * - Interval
+    * - Delay window
+    * - Interval window  
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWindow64L( TTestResult& aResult,
+                                    CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Configure window sizes, 32 bit and 64 bit
+    * 
+    * @see ConfigureWindow32L for test setup.
+    * 
+    * Tests:
+    * - CFlexPeriodic::NewL()
+    * - CFlexPeriodic::Configure() 32-bit
+    * - CFlexPeriodic::Configure() 64-bit
+    * - CFlexPeriodic::Start() 32-bit
+    * - CFlexPeriodic::Start() 64-bit
+    * - CFlexPeriodic::Cancel()
+    * - CFlexPeriodic::~CFlexPeriodic()
+    * - Expiration of CFlexPeriodic timers
+    * - Delay
+    * - Interval
+    * - Delay window
+    * - Interval window  
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWindowMixL( TTestResult& aResult,
+                                     CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Configure timer after it has been started.
+    * 
+    * Start two timers:
+    * T1:
+    * - delay 1 microsecond, window 0
+    * - interval 1 sec, window 0
+    * 
+    * T2:
+    * - delay 2 sec, default window
+    * - interval 2 sec, default window
+    * 
+    * Try to configure T2 with 1.5 sec delay and interval windows by both
+    * 32 bit and 64 bit Configure(). Check that configure returns KErrInUse
+    * and it has not changed the window sizes. The timer expirations should be
+    * T1: 1, 2, 3, 4, 5, 6, 7, 8, ...
+    * T2:    2,    4,    6,    8, ...  
+    * 
+    * Cancel the timer T2 and set its callback function to call Configure() 
+    * (32 bit and 64 bit versions) while the timer is running. Check that both
+    * configurations return KErrInUse
+    *
+    * Cancel timer T2 and configure its delay and interval windows to 1.5 sec.
+    * Let the timer(s) run a while and check that the timer expirations are:
+    * T1: ..., 10, 11, 12, 13, ...
+    * T2: ..., 10, 11, 12, 13, ...
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureAfterStartL( TTestResult& aResult,
+                                      CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start a running timer.
+    * 
+    * Test should panic with E32USER-CBase 42 (attempt to active CActive when 
+    * a request is still outstanding).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartAfterStartL( TTestResult& aResult,
+                                  CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start a running timer in its callback function.
+    * 
+    * Test should panic with E32USER-CBase 42 (attempt to active CActive when 
+    * a request is still outstanding).
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartInCallbackL( TTestResult& aResult,
+                                  CTestFlexTimer* aCallback );
+
+    /**
+    * Start timer with negative delay (32 bit).
+    * 
+    * Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNegativeDelay32L( TTestResult& aResult, 
+                                           CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with zero interval (32 bit).
+    * 
+    * Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithZeroInterval32L( TTestResult& aResult, 
+                                          CTestFlexTimer*  aCallback  );
+    
+    /**
+    * @brief Start timer with negative interval (32 bit).
+    * 
+    * Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNegativeInterval32L( TTestResult& aResult, 
+                                              CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with negative delay (64 bit).
+    * 
+    * Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNegativeDelay64L( TTestResult& aResult, 
+                                          CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with zero interval (64 bit).
+    * 
+    * Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithZeroInterval64L( TTestResult& aResult, 
+                                          CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with negative interval (64 bit).
+    * 
+    * Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNegativeInterval64L( TTestResult& aResult, 
+                                              CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Configure timer with negative delay window (32 bit).
+    * 
+    * Configure should panic with CFlexPeriodic 9 
+    * (EFlexPeriodicIntervalWindowLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWithNegativeDelayWindow32L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Configure timer with negative interval window (32 bit).
+    * 
+    * Configure should panic with CFlexPeriodic 8 
+    * (EFlexPeriodicDelayWindowLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWithNegativeIntervalWindow32L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Configure timer with negative delay window (64 bit).
+    * 
+    * Configure should panic with CFlexPeriodic 9 
+    * (EFlexPeriodicIntervalWindowLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWithNegativeDelayWindow64L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Configure timer with negative interval window (64 bit).
+    * 
+    * Configure should panic with CFlexPeriodic 8 
+    * (EFlexPeriodicDelayWindowLessThanZero)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ConfigureWithNegativeIntervalWindow64L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    
+    /**
+    * @brief Test timer start allowed value range.
+    * 
+    * Start timers with following parameters:
+    * 
+    * T1:
+    * - Configure (32 bit): delay window 1 sec, interval window 1 sec
+    * - Start (32 bit): delay 0 microseconds, interval 1 sec
+    * 
+    * T2:
+    * - Configure (32 bit): delay window 1 sec, interval window 1 sec
+    * - Start (32 bit): delay 0x7FFFFF microseconds, interval 1 sec
+    * 
+    * T3:
+    * - Configure (32 bit): delay window 1 sec, interval window 1 sec
+    * - Start (32 bit): delay 1 sec, interval 0 microseconds
+    * 
+    * T4:
+    * - Configure (32 bit): delay window 1 sec, interval window 1 sec
+    * - Start (32 bit): delay 1 sec, interval 0x7FFFFF microseconds
+    *
+    * T5:
+    * - Configure (64 bit): delay window 1 sec, interval window 1 sec
+    * - Start (64 bit): delay 0 microseconds, interval 1 sec
+    * 
+    * T6:
+    * - Configure (64 bit): delay window 1 sec, interval window 1 sec
+    * - Start (64 bit): delay 1 year, interval 1 sec
+    * 
+    * T7:
+    * - Configure (64 bit): delay window 1 sec, interval window 1 sec
+    * - Start (64 bit): delay 1 sec, interval 0 microseconds
+    * 
+    * T8:
+    * - Configure (64 bit): delay window 1 sec, interval window 1 sec
+    * - Start (64 bit): delay 1 sec, interval 1 year
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithMinAndMaxL( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    
+    /**
+    * @brief Start timer with maximum delay (64 bit), 0x7FFFFFFFFFFFFFFF.
+    * 
+    * Start should panic with  CFlexPeriodic 24 
+    * (EFlexTimerServerIllegalTimerValue)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithMaximumDelay64L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with maximum interval (64 bit), 0x7FFFFFFFFFFFFFFF.
+    * 
+    * Start should panic with  CFlexPeriodic 24 
+    * (EFlexTimerServerIllegalTimerValue)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithMaximumInterval64L( 
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+    
+    /**
+    * @brief Start timer with NULL callback function (32 bit)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNullCallBack32L(
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    /**
+    * @brief Start timer with NULL callback function (64 bit)
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt StartWithNullCallBack64L(
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+    
+    /**
+    * @brief Crash client with active periodic flexible timer.
+    * 
+    * Start two timers in separate threads:
+    * T1: delay 1 sec, interval 1 sec with default windows
+    * T2: delay 1 sec, interval 1 sec with default windows
+    * 
+    * Panic timer T1's thread after 3 sec.
+    * 
+    * Cancel T2 after 5 sec and check that it had worked correctly.
+    * Implementation of T2 uses test case StartOneTimerL().
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ClientCrashL(
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+
+private:
+
+    /**
+    * Constructor is private to prevent instantiation of the class. 
+    */
+    CTestFlexPeriodic();
+
+    /**
+     * Run active scheduler for given time.
+     * @param aPeriod Time to run active scheduler.
+     */
+    static void WaitL( TTimeIntervalMicroSeconds32 aPeriod );
+
+    /**
+     * Stop the active scheduler. A function for TCallBack.
+     * @param aArgument Not used.
+     * @return KErrNone. Always.
+     */
+    static TInt StopScheduler( TAny* aArgument );
+
+
+    /**
+     * Do nothing. A function for TCallBack.
+     * @param aArgument Not used.
+     * @return KErrNone.
+     */
+    static TInt DoNothing( TAny* aArgument );
+    
+    /**
+     * Panics testcase if get called. A function for TCallBack.
+     * @param aArgument Not used.
+     * @return KErrNone.
+     */
+    static TInt PanicClient( TAny* aArgument );
+    
+    /**
+     * Add current time to given array. A function for TCallBack.
+     * @param aArgument Timestamp storage, type: RArray<TTime>*
+     * @return KErrNone.
+     */
+    static TInt AddTimestamp( TAny* aArgument );
+
+    /**
+     * Restart the given timer. A function for TCallBack.
+     * @param aArgument The restart data, type: TRestartInfo*
+     * @return KErrNone.
+     */
+    static TInt RestartTimer( TAny* aArgument );
+
+    /**
+     * Configure timer without cancellation in callback. A function for 
+     * TCallBack.
+     * @param aArgument The conficure data, type: TConfigureInfo*
+     * @return KErrNone.
+     */
+    static TInt ConfigureTimer( TAny* aArgument );
+
+    /**
+     * Start timer without cancellation in callback. A function for TCallBack.
+     * @param aArgument The timer, type: CFlexPeriodic*
+     * @return KErrNone.
+     */
+    static TInt StartTimer( TAny* aArgument );
+
+    /**
+     * Verify that the timestamps are expired at maximum window
+     * @param aTimestamps An array of times
+     * @param aDelay Requested delay of the 1st time
+     * @param aInterval Requested delay from the 2nd time
+     * @param aDelayWindow Time how much 1st time can be early
+     * @param aIntervalWindow Time how much times can be early from the 2nd time 
+     * @return ETrue if all timestamps are in given delay
+     */
+    static TBool AreTimestampsAtWindow( 
+        const RArray<TTime>& aTimestamps,
+        const TTimeIntervalMicroSeconds32& aDelay,
+        const TTimeIntervalMicroSeconds32& aInterval,
+        const TTimeIntervalMicroSeconds32& aDelayWindow,
+        const TTimeIntervalMicroSeconds32& aIntervalWindow );
+
+    /**
+     * Verify that the timestamps are expired at maximum window
+     * @param aTimestamps An array of times
+     * @param aDelay Requested delay of the 1st time
+     * @param aInterval Requested delay from the 2nd time
+     * @param aDelayWindow Time how much 1st time can be early
+     * @param aIntervalWindow Time how much times can be early from the 2nd time 
+     * @return ETrue if all timestamps are in given delay
+     */
+    static TBool AreTimestampsAtWindow( 
+        const RArray<TTime>& aTimestamps,
+        const TTimeIntervalMicroSeconds& aDelay,
+        const TTimeIntervalMicroSeconds& aInterval,
+        const TTimeIntervalMicroSeconds& aDelayWindow,
+        const TTimeIntervalMicroSeconds& aIntervalWindow );
+
+    /**
+     * Compare two arrays of timestamps.
+     * @param aLeft Array of timestamps to be compared
+     * @param aRight Array of timestamps to be compared
+     * @return ETrue if the arrays has the same timestamps, EFalse otherwise
+     */
+    static TBool AreTimestampsSame( 
+        const RArray<TTime>& aLeft, 
+        const RArray<TTime>& aRight );
+
+    /**
+     * Parameter types of two timers are templated, so, 32 bit and 64 bit
+     * interfaces can be tested without duplicated source code.
+     * 
+     * Possible values for template are:
+     * - TTimeIntervalMicroSeconds
+     * - TTimeIntervalMicroSeconds32
+     */
+    template <class firstType, class secondType> 
+    static TInt ConfigureWindowL( TTestResult& aResult );
+
+    /**
+     * Template function for NOK API test cases.
+     * 
+     * Types for CFlexPeriodic::Start() and CFlexPeriodic::Configure() are
+     * templated, so, 32 bit and 64 bin interfaces can be tested without
+     * duplicated code.
+     * 
+     * Function creates a flexible periodic timer, configures is, starts it.
+     * After one second the timer will be cancelled and destroyed.
+     * 
+     * Possible values for configureType and startType are:
+     * - TTimeIntervalMicroSeconds
+     * - TTimeIntervalMicroSeconds32
+     *
+     * @param aDelay Value for timer's delay in start
+     * @param aInterval Value for timer's interval in start
+     * @param aDelayWindow Value for timer's delay window in configure
+     * @param aIntervalWindow Value for timer's interval window in configure
+     */
+    template <class configureType, class startType>
+    static void ConfigureAndStartTimerL( 
+        RArray<TTime>& aTimestamps,
+        TInt64 aDelay,
+        TInt64 aInterval,
+        TInt64 aDelayWindow,
+        TInt64 aIntervalWindow );
+
+    /**
+    * Start timer with NULL callback function
+    * 
+    * Possible values for startType are:
+    * - TTimeIntervalMicroSeconds
+    * - TTimeIntervalMicroSeconds32
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    template <class startType>
+    static TInt StartWithNullCallBackL(
+        TTestResult& aResult, 
+        CTestFlexTimer*  aCallback  );
+    
+    /**
+    * Run test case in own thread
+    * 
+    * @param aThread The thread in which the test case is run
+    * @param aArguments Arguments for running a test case
+    * @return The status of execution of the test
+    */
+    static TInt RunInThread( 
+        RThread& aThread,
+        TTestCaseArguments& aArguments );
+
+    /**
+    * Start running a thread. A function of format TThreadFunction.
+    * Create trap harness for the thread and call RunTestCaseL()
+    * 
+    * @param aArgument Test case data, type: TTestCaseArguments
+    * @return The status of running the thread
+    */
+    static TInt RunTestCase( TAny* aArgument );
+
+    /**
+    * The second phase of start running a thread.
+    * Initialize scheduler and start the test case.
+    * 
+    * @param aArgument Test case data, type: TTestCaseArguments
+    */
+    static void RunTestCaseL( TAny* aArgument );
+
+    /**
+    * Panic thread after a while. 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt DoPanicL( TTestResult& aResult, CTestFlexTimer*  aCallback  );
+
+    };
+
+#endif // TESTFLEXPERIODIC_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/testflextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,373 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description: STIF normal test module declaration
+*
+*/
+
+#ifndef TESTFLEXTIMER_H
+#define TESTFLEXTIMER_H
+
+// INCLUDES
+#include "StifTestModule.h"
+#include <StifLogger.h>
+#include <NormalHardcodedAssert.h>
+
+// MACROS
+#define TEST_MODULE_VERSION_MAJOR 0
+#define TEST_MODULE_VERSION_MINOR 0
+#define TEST_MODULE_VERSION_BUILD 0
+
+// Logging path
+_LIT( KTestFlexTimerLogPath, "\\logs\\testframework\\TestFlexTimer\\" ); 
+// Log file
+_LIT( KTestFlexTimerLogFile, "TestFlexTimer.txt" ); 
+_LIT( KTestFlexTimerLogFileWithTitle, "TestFlexTimer_[%S].txt" );
+
+_LIT( KTestFlexTimerPanicCategory, "FLEX-TEST" );
+
+// Function pointer related internal definitions
+#define GETPTR &  
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+#define OOM_ENTRY(str,func,a,b,c) {_S(str), GETPTR func,a,b,c}
+#define OOM_FUNCENTRY(func,a,b,c) {_S(#func), GETPTR func,a,b,c}
+
+
+// Forward declaration
+class CTestFlexTimer;
+
+// A typedef for function that does the actual testing,
+// function is a type 
+// TInt CDemoModule::<NameOfFunction> ( TTestResult& aResult, CTestFlexTimer *cb )
+typedef TInt (*TestFunction)(TTestResult&, CTestFlexTimer*);    
+
+const TInt KTimerAccuracyMicroSeconds = 1000 * 1000; //1s - accuracy of symbian At timer.
+const double KDefaultWindowMultiplier = 0.2; //default window. defined in flextimersession.cpp 
+const TUint KTickInMicroSeconds( 1000000 / 64 ); // One tick = 1/64 sec
+
+
+// CLASS DECLARATION
+
+/**
+*  An internal structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfoInternal
+    {
+    public:
+        const TText*    iCaseName;
+        TestFunction    iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+    };
+
+// CLASS DECLARATION
+
+/**
+*  A structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfo
+    {
+    public:
+        TPtrC           iCaseName;    
+        TestFunction    iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+
+    TCaseInfo( const TText* a ) : iCaseName( (TText*) a )
+        {        
+        };
+    };
+
+//Exteded result that can "return" also status code to CB function 
+class TExtendedTestResult
+    {
+    public:
+        TTestResult *iTestResult; //the real test result
+        TInt iStatusCode; //Return code from timer
+        TBool iCaseAlreadyFailed;
+        TInt iTimerID;
+        TInt64 iTimerStartedTime;
+        TInt64 iTimerStoppedTime;
+        TInt64 iTimerExpiryTime;
+
+    TExtendedTestResult(TTestResult *aResult) : iTestResult( aResult ), iStatusCode(0), iCaseAlreadyFailed(EFalse), 
+            iTimerID(0), iTimerStartedTime(0), iTimerStoppedTime(0) {};
+    };
+// CLASS DECLARATION
+
+/**
+*  This a TestFlexTimer class.
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CTestFlexTimer) : public CTestModuleBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CTestFlexTimer* NewL();
+
+        /**
+        * Destructor.
+        */
+        virtual ~CTestFlexTimer();
+  
+    public: // Functions from base classes
+
+        
+        /**
+        * From CTestModuleBase InitL is used to initialize the TestFlexTimer. 
+        *       It is called once for every instance of TestFlexTimer after
+        *       its creation.
+        * @since ?Series60_version
+        * @param aIniFile Initialization file for the test module (optional)
+        * @param aFirstTime Flag is true when InitL is executed for first 
+        *               created instance of TestFlexTimer.
+        * @return Symbian OS error code
+        */
+        TInt InitL( TFileName& aIniFile, TBool aFirstTime );
+
+        /**
+        * From CTestModuleBase GetTestCasesL is used to inquiry test cases 
+        *   from TestFlexTimer. 
+        * @since ?Series60_version
+        * @param aTestCaseFile Test case file (optional)
+        * @param aTestCases  Array of TestCases returned to test framework
+        * @return Symbian OS error code
+        */
+        TInt GetTestCasesL( const TFileName& aTestCaseFile, 
+                            RPointerArray<TTestCaseInfo>& aTestCases );
+
+        /**
+        * From CTestModuleBase RunTestCaseL is used to run an individual 
+        *   test case. 
+        * @since ?Series60_version
+        * @param aCaseNumber Test case number
+        * @param aTestCaseFile Test case file (optional)
+        * @param aResult Test case result returned to test framework (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error, which is 
+        *           not reported in aResult parameter as test case failure).
+        */   
+        TInt RunTestCaseL( const TInt aCaseNumber, 
+                           const TFileName& aTestCaseFile,
+                           TTestResult& aResult );
+
+        /**
+        * From CTestModuleBase; OOMTestQueryL is used to specify is particular
+        * test case going to be executed using OOM conditions
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailureType OOM failure type (optional)
+        * @param aFirstMemFailure The first heap memory allocation failure value (optional)
+        * @param aLastMemFailure The last heap memory allocation failure value (optional)
+        * @return TBool
+        */
+        virtual TBool OOMTestQueryL( const TFileName& /* aTestCaseFile */, 
+                                     const TInt /* aCaseNumber */, 
+                                     TOOMFailureType& /* aFailureType */,
+                                     TInt& /* aFirstMemFailure */, 
+                                     TInt& /* aLastMemFailure */ );
+
+        /**
+        * From CTestModuleBase; User may add implementation for OOM test 
+        * environment initialization. Usually no implementation is required.
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        */
+        virtual void OOMTestInitializeL( const TFileName& /* aTestCaseFile */, 
+                                    const TInt /* aCaseNumber */ ); 
+
+        /**
+        * From CTestModuleBase; OOMHandleWarningL. User may add implementation 
+        * for OOM test warning handling. Usually no implementation is required.
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailNextValue FailNextValue for OOM test execution (optional)
+        * @return None
+        */
+        virtual void OOMHandleWarningL( const TFileName& /* aTestCaseFile */,
+                                        const TInt /* aCaseNumber */, 
+                                        TInt& /* aFailNextValue */);
+
+        /**
+        * From CTestModuleBase; OOMTestFinalizeL may be used to finalize OOM
+        * test environment. Usually no implementation is required.
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        */
+        virtual void OOMTestFinalizeL( const TFileName& /* aTestCaseFile */, 
+                                       const TInt /* aCaseNumber */ );
+
+        /**
+         * Method used to log version of test module
+         */
+        void SendTestModuleVersion();
+
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CTestFlexTimer();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Check for settings and create logger with test case title in file name.
+        */
+        void CreateTitleLoggerL(void);
+
+        /**
+        * Check for logger settings and delete title logger.
+        */
+        void DeleteTitleLogger(void);
+
+        /**
+         * Function returning test case name and pointer to test case function.
+         * @since ?Series60_version
+         * @param aCaseNumber test case number
+         * @return TCaseInfo 
+         */
+        const TCaseInfo Case( const TInt aCaseNumber ) const;
+
+        /**
+        * Start monitoring FlexTimer server crashes
+        * 
+        * @param aResult The result of the test.
+        * @param aCallback Pointer to the STIF test class
+        * @return The status of execution of the test. KErrNone if the test
+        *         was executed ok, any system wide errorcode otherwise.
+        */
+        static TInt StartServerMonitoringL(
+            TTestResult& aResult, 
+            CTestFlexTimer* aCallback );
+
+        /**
+        * Stop monitoring FlexTimer server crashes and fail the test case if
+        * a crash has happened.
+        * 
+        * @param aResult The result of the test.
+        * @param aCallback Pointer to the STIF test class
+        * @return The status of execution of the test. KErrNone if the test
+        *         was executed ok, any system wide errorcode otherwise.
+        */
+        static TInt StopServerMonitoringL(
+            TTestResult& aResult, 
+            CTestFlexTimer* aCallback );
+        
+        /**
+        * Start second FlexTimerServer. 
+        * 
+        * Increase test coverage by testing server side destructors.
+        * 
+        * Starting of the server fails with panic "FlexTimerServer" 23 
+        * (EFlexTimerServerStartServer).
+        * 
+        * @param aResult The result of the test.
+        * @param aCallback Pointer to the STIF test class
+        * @return The status of execution of the test. KErrNone if the test
+        *         was executed ok, any system wide errorcode otherwise.
+        */
+        static TInt StartSecondServerL(
+            TTestResult& aResult, 
+            CTestFlexTimer* aCallback );
+        
+        /**
+        * Changes Test client thread priority to EPriorityMuchMore
+        * 
+        * @param aResult The result of the test, always Passed.
+        * @param aCallback Pointer to the STIF test class
+        * @return The status of execution of the test. KErrNone always
+        */
+        static TInt SetThreadPriorityMuchMore(
+            TTestResult& aResult, 
+            CTestFlexTimer* aCallback );
+        
+        /**
+        * Changes Test client thread priority to EPriorityNormal
+        * 
+        * @param aResult The result of the test, always Passed.
+        * @param aCallback Pointer to the STIF test class
+        * @return The status of execution of the test. KErrNone always
+        */
+        static TInt SetThreadPriorityNormal(
+            TTestResult& aResult, 
+            CTestFlexTimer* aCallback );
+
+    public:     // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    protected:  // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    private:    // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        CStifLogger * iLog;
+
+        // Standard logger
+        CStifLogger *iStdLog;
+
+        // Logger for currently running test case
+        CStifLogger *iTCLog;
+        
+        // Flag saying if test case title should be added to log file name
+        TBool iAddTestCaseTitleToLogName;
+        
+        // Flag saying if test module version was already sent
+        TBool iVersionLogged;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+        // Pointer to test (function) to be executed
+        TestFunction iMethod;
+        
+        //CTimer CB failed case
+        TBool iCTimerCBFailedCase;
+        
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // TESTFLEXTIMER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/inc/testrflextimer.h	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,520 @@
+/*
+* ============================================================================
+*  Name        : testrflextimer.h
+*  Part of     : src / testflextimer
+*  Description : STIF test cases for RFlexTimer
+*  Version     : %version: 1 %
+*
+*  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+*  All rights reserved.
+*  This component and the accompanying materials are made available
+*  under the terms of the License "Eclipse Public License v1.0"
+*  which accompanies this distribution, and is available
+*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+*  Initial Contributors:
+*  Nokia Corporation - initial contribution.
+*
+*  Contributors:
+*  Nokia Corporation
+* ============================================================================
+* Template version: 4.2
+*/
+
+#ifndef TESTRFLEXTIMER_H
+#define TESTRFLEXTIMER_H
+
+
+#include <e32base.h>
+
+/**
+ *  STIF test cases for RFlexTimer class.
+ *  This class is only a container for STIF test cases - it should NOT be
+ *  instantiated, just call the static functions.
+ *
+ *  @lib testflextimer.lib
+ *  @since TB10.1
+ */
+class CTestRFlexTimer : public CBase
+    {
+
+public:
+
+    /**
+    * Destructor.
+    */
+    virtual ~CTestRFlexTimer();
+
+    /**
+    * @brief Start a timer using After (32 bit) and wait it to expire
+    * 
+    * Open RFlexTimer handle and connect to the server. Set timer to expire
+    * after 3 secs. Close the handle and check that the expiration is done
+    * at correct time.
+    * 
+    * Tests:
+    * - RFlexTimer::RFlexTimer()
+    * - RFlexTimer::Connect()
+    * - RFlexTimer::After() 32 bit
+    * - RFlexTimer::Close()
+    * - RFlexTimer::~RFlexTimer()
+    * - Expiration of timer
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ExpireAfter32L( TTestResult& aResult,
+                                CTestFlexTimer* aCallback );
+
+
+    /**
+    * @brief Start a timer using After (64 bit) and wait it to expire
+    * 
+    * Open RFlexTimer handle and connect to the server. Set timer to expire
+    * after 3 secs. Close the handle and check that the expiration is done
+    * at correct time.
+    * 
+    * Tests:
+    * - RFlexTimer::RFlexTimer()
+    * - RFlexTimer::Connect()
+    * - RFlexTimer::After() 64 bit
+    * - RFlexTimer::Close()
+    * - RFlexTimer::~RFlexTimer()
+    * - Expiration of timer
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ExpireAfter64L( TTestResult& aResult,
+                                CTestFlexTimer* aCallback );
+
+
+    /**
+    * @brief Start a timer using AfterTicks and wait it to expire
+    *
+    * Open RFlexTimer handle and connect to the server. Set timer to expire
+    * after 192 ticks (3 secs). Close the handle and check that the 
+    * expiration is done at correct time.
+    * 
+    * Tests:
+    * - RFlexTimer::RFlexTimer()
+    * - RFlexTimer::Connect()
+    * - RFlexTimer::AfterTicks()
+    * - RFlexTimer::Close()
+    * - RFlexTimer::~RFlexTimer()
+    * - Expiration of timer
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ExpireAfterTicksL( TTestResult& aResult,
+                                   CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start a timer using At and wait it to expire
+    *
+    * Open RFlexTimer handle and connect to the server. Set timer to expire
+    * after 3 secs from now. Close the handle and check that the expiration is
+    * done at correct time.
+    * 
+    * Tests:
+    * - RFlexTimer::RFlexTimer()
+    * - RFlexTimer::Connect()
+    * - RFlexTimer::At()
+    * - RFlexTimer::Close()
+    * - RFlexTimer::~RFlexTimer()
+    * - Expiration of timer
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ExpireAtL( TTestResult& aResult,
+                           CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start a timer using AtUTC and wait it to expire
+    *
+    * Open RFlexTimer handle and connect to the server. Set timer to expire
+    * after 3 secs from now. Close the handle and check that the expiration is
+    * done at correct time.
+    * 
+    * Tests:
+    * - RFlexTimer::RFlexTimer()
+    * - RFlexTimer::Connect()
+    * - RFlexTimer::AtUTC()
+    * - RFlexTimer::Close()
+    * - RFlexTimer::~RFlexTimer()
+    * - Expiration of timer
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ExpireAtUtcL( TTestResult& aResult,
+                              CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start timer using After (32 bit) without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt After32WithoutConnect( TTestResult& aResult,
+                                       CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start timer using After (64 bit) without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt After64WithoutConnect( TTestResult& aResult,
+                                       CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start timer using AfterTicks without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt AfterTicksWithoutConnect( TTestResult& aResult,
+                                          CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start timer using At without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt AtWithoutConnect( TTestResult& aResult,
+                                  CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Start timer using AtUtc without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt AtUtcWithoutConnect( TTestResult& aResult,
+                                     CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Configure (32 bit) timer without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt Configure32WithoutConnect( TTestResult& aResult,
+                                           CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Configure (64 bit) timer without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt Configure64WithoutConnect( TTestResult& aResult,
+                                           CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Cancel timer using RFlexTimer without connecting to the server first.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * KERN-EXEC 0.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CancelWithoutConnect( TTestResult& aResult,
+                                      CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Set timer twice by After.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * RFlexTimer 15 (EFlexTimerServerErrorPendingTimer).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallAfterTwiceL( TTestResult& aResult,
+                                 CTestFlexTimer* aCallback );
+    
+
+    /**
+    * @brief Set timer twice by AfterTicks.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * RFlexTimer 15 (EFlexTimerServerErrorPendingTimer).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallAfterTicksTwiceL( TTestResult& aResult,
+                                      CTestFlexTimer* aCallback );
+    
+    /**
+    * @brief Set timer twice by At.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * RFlexTimer 15 (EFlexTimerServerErrorPendingTimer).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallAtTwiceL( TTestResult& aResult,
+                              CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Set timer twice by AtUTC.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * RFlexTimer 15 (EFlexTimerServerErrorPendingTimer).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallAtUtcTwiceL( TTestResult& aResult,
+                                 CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Connect to timer server twice.
+    *
+    * This tests illeagal usage of the interface and it'll panic with 
+    * RFlexTimer 32 (EFlexTimerAlreadyConnected).
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CallConnectTwiceL( TTestResult& aResult,
+                                   CTestFlexTimer* aCallback );
+
+    
+    /**
+    * @brief Reconnect to timer server.
+    *
+    * Connect, close and connect again the handle.
+    * 
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ReconnectL( TTestResult& aResult,
+                            CTestFlexTimer* aCallback );
+
+    
+    /**
+    * @brief Cancel timer using RFlexTimer without starting it first.
+    *
+    * This tests a leagal uage of the interface. Timer can be cancelled 
+    * without setting it first.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt CancelWithoutStart( TTestResult& aResult,
+                                    CTestFlexTimer* aCallback );
+    
+    /**
+    * @brief Call AfterTicks() with negative value.
+    *
+    * This test illegal usage of the interface. There has to be zero or more 
+    * ticks.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt NegativeTicksInAfterTicksL(
+        TTestResult& aResult, 
+        CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Call AfterTicks() with zero.
+    *
+    * This tests leagal usage of the interface.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ZeroTicksInAfterTicksL(
+        TTestResult& aResult, 
+        CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Change system time during AfterTicks timer is running.
+    * 
+    * Set timer to be expired after 640 ticks (10 sec). After 1 sec from
+    * starting the timer, add system time 3 seconds. Check that the timer
+    * expires after 10 seconds from starting (13 secs by system time).
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt ChangeTimeWhileAfterTicksL(
+        TTestResult& aResult, 
+        CTestFlexTimer* aCallback );
+
+    /**
+    * @brief Test that timer window works correctly.
+    * 
+    * Create three timers:
+    * T1: expire after 4-8 secs
+    * T2: expire after 7-8 secs
+    * T3: expire after 5 secs
+    *
+    * T1 and T2 are AfterTicks -timers T3 is After timer.
+    * 
+    * Check that T1 has expired after 5 secs and T2 after 8 secs of setting.
+    *
+    * @param aResult The result of the test.
+    * @param aCallback Pointer to the STIF test class
+    * @return The status of execution of the test. KErrNone if the test
+    *         was executed ok, any system wide errorcode otherwise.
+    */
+    static TInt TestAfterTicksWindowL(
+        TTestResult& aResult, 
+        CTestFlexTimer* aCallback );
+
+private:
+
+    /**
+    * Constructor.
+    * Keep it private to prevent instantiation of the class.
+    */
+    CTestRFlexTimer();
+
+    /**
+    * Check is the delay in the window.
+    * @param aDelay Interval to be checked.
+    * @param aInterval Interval of the timer.
+    * @param aWindow Allowed window of the timer. 
+    * @return ETrue if the delay is correc, EFalse otherwise.
+    */
+    static TBool IsDelayOk( 
+        const TTimeIntervalMicroSeconds aDelay,
+        const TTimeIntervalMicroSeconds32 aInterval,
+        const TTimeIntervalMicroSeconds32 aWindow );
+
+    /**
+    * Check is the delay in the window.
+    * @param aDelay Interval to be checked.
+    * @param aInterval Interval of the timer.
+    * @param aWindow Allowed window of the timer. 
+    * @return ETrue if the delay is correc, EFalse otherwise.
+    */
+    static TBool IsDelayOk( 
+        const TTimeIntervalMicroSeconds aDelay,
+        const TTimeIntervalMicroSeconds32 aInterval,
+        const TTimeIntervalMicroSeconds aWindow );
+
+    /**
+    * Check is the delay in the window.
+    * @param aDelay Interval to be checked.
+    * @param aInterval Interval of the timer.
+    * @param aWindow Allowed window of the timer. 
+    * @return ETrue if the delay is correc, EFalse otherwise.
+    */
+    static TBool IsDelayOk( 
+        const TTimeIntervalMicroSeconds aDelay,
+        const TTimeIntervalMicroSeconds aInterval,
+        const TTimeIntervalMicroSeconds32 aWindow );
+
+    /**
+    * Check is the delay in the window.
+    * @param aDelay Interval to be checked.
+    * @param aInterval Interval of the timer.
+    * @param aWindow Allowed window of the timer. 
+    * @return ETrue if the delay is correc, EFalse otherwise.
+    */
+    static TBool IsDelayOk( 
+        const TTimeIntervalMicroSeconds aDelay,
+        const TTimeIntervalMicroSeconds aInterval,
+        const TTimeIntervalMicroSeconds aWindow );
+    
+    /**
+    * A helper function for AfterTicks() testing.
+    * -# Creates RFlexTimer handle, 
+    * -# connects it to the server, 
+    * -# configures timer's window (default 0 microseconds),
+    * -# set the timer to expire after given ticks,
+    * -# wait timer to be expired
+    * -# return the delay of the timer
+    * 
+    * @param aTicks Timer's interval in number of ticks
+    * @param aWindowSize Timer's window (default 0 microseconds)
+    * @return The delay of the timer in microseconds
+    */
+    static TTimeIntervalMicroSeconds ExecuteAfterTicksL(
+        TInt aTicks,
+        TTimeIntervalMicroSeconds aWindowSize = 0 );
+    
+private: // data
+
+    };
+
+#endif // TESTRFLEXTIMER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/init/testflextimer.ini	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,217 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testflextimer
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/rom/testflextimer.iby	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Flexible timer tests
+*
+*/
+#ifndef TESTFLEXTIMER_IBY
+#define TESTFLEXTIMER_IBY
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\testflextimer.dll SHARED_LIB_DIR\testflextimer.dll
+
+#endif // TESTFLEXTIMER_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/inheritedcflextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexPeriodic class
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// System include files
+// User include files go here:
+#include "inheritedcflextimer.h"
+//For exteded test result
+#include "testflextimer.h"
+// External function prototypes
+// Local constants go here
+// Panic category
+
+// ======== MEMBER FUNCTIONS ========
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer* CInheritedCFlexTimer::NewL( TInt aPriority,
+        TCallBack aCallBack )
+    {
+
+    CInheritedCFlexTimer* self = new (ELeave) CInheritedCFlexTimer(aPriority,
+            aCallBack);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer::~CInheritedCFlexTimer()
+    {
+
+    }
+
+// ---------------------------------------------------------------------------
+// Desc
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer::SetCB( TCallBack aCallBack )
+    {
+    iCallBack = aCallBack;
+    }
+
+// ---------------------------------------------------------------------------
+// Desc
+// ---------------------------------------------------------------------------
+//
+TInt CInheritedCFlexTimer::MyOwnConfigure(
+        TTimeIntervalMicroSeconds32 aDelayWindow )
+    {
+    TInt ret = CFlexTimer::Configure(aDelayWindow);
+    if (ret == KErrNone)
+        {
+        //
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Handles the active objects request completion event.
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer::RunL()
+    {
+    //Give code to test case
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (iCallBack.iPtr);
+    eRes->iStatusCode = iStatus.Int();
+    iCallBack.CallBack();
+    }
+
+// ---------------------------------------------------------------------------
+// Second part of the two-phase construction.
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    CFlexTimer::ConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// Private constructor with priority.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer::CInheritedCFlexTimer( TInt aPriority,
+        TCallBack aCallBack ) :
+    CFlexTimer(aPriority), iCallBack(aCallBack)
+    {
+
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/inheritedcflextimer2.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of CFlexPeriodic class
+ *
+ */
+/*
+ * %version: 1 %
+ */
+// System include files
+// User include files go here:
+#include "inheritedcflextimer2.h"
+//For exteded test result
+#include "testcflextimer.h"
+#include <e32debug.h>
+// External function prototypes
+// Local constants go here
+// Panic category
+
+// ======== MEMBER FUNCTIONS ========
+// ---------------------------------------------------------------------------
+// Constructs the object.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer2* CInheritedCFlexTimer2::NewL( TInt aPriority,
+        TCallBack aCallBack, TInt aId )
+    {
+    RDebug::Printf("CInheritedCFlexTimer2::NewL");
+    CInheritedCFlexTimer2* self = new (ELeave) CInheritedCFlexTimer2(
+            aPriority, aCallBack, aId);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructs the object.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer2::~CInheritedCFlexTimer2()
+    {
+
+    }
+
+// ---------------------------------------------------------------------------
+// Desc
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer2::SetCB( TCallBack aCallBack )
+    {
+    iCallBack = aCallBack;
+    }
+
+// ---------------------------------------------------------------------------
+// Desc
+// ---------------------------------------------------------------------------
+//
+TInt CInheritedCFlexTimer2::MyOwnConfigure(
+        TTimeIntervalMicroSeconds32 aDelayWindow )
+    {
+    TInt ret = CFlexTimer::Configure(aDelayWindow);
+    if (ret == KErrNone)
+        {
+        //
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Handles the active objects request completion event.
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer2::RunL()
+    {
+    RDebug::Printf("CInheritedCFlexTimer2::RunL");
+    //Give code to test case
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (iCallBack.iPtr);
+    (*list)[0].iCurrentlyActive = iId;
+    (*list)[iId].iEResult->iStatusCode = iStatus.Int();
+    iCallBack.CallBack();
+    }
+
+// ---------------------------------------------------------------------------
+// Second part of the two-phase construction.
+// ---------------------------------------------------------------------------
+//
+void CInheritedCFlexTimer2::ConstructL()
+    {
+    CActiveScheduler::Add(this);
+    CFlexTimer::ConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// Private constructor with priority.
+// ---------------------------------------------------------------------------
+//
+CInheritedCFlexTimer2::CInheritedCFlexTimer2( TInt aPriority,
+        TCallBack aCallBack, TInt aId ) :
+    CFlexTimer(aPriority), iCallBack(aCallBack), iId(aId)
+    {
+    RDebug::Printf("CInheritedCFlexTimer2::CInheritedCFlexTimer2");
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/testcflextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,3236 @@
+/*
+ * ============================================================================
+ *  Name        : testflexperiodic.cpp
+ *  Part of     : src / testflextimer
+ *  Description : STIF test cases for CFlexPeriodic timer.
+ *  Version     : %version: 1 %
+ *
+ *  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *  All rights reserved.
+ *  This component and the accompanying materials are made available
+ *  under the terms of the License "Eclipse Public License v1.0"
+ *  which accompanies this distribution, and is available
+ *  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ *  Initial Contributors:
+ *  Nokia Corporation - initial contribution.
+ *
+ *  Contributors:
+ *  Nokia Corporation
+ * ============================================================================
+ * Template version: 4.1
+ */
+
+#include <e32debug.h>           // for RDebug
+#include <e32math.h>             // for Math::Rand()
+#include <StifTestInterference.h>
+#include "testflextimer.h"      // for global constants & CB
+#include "testcflextimer.h"
+#include "flextimerpanic.h"     // for panic constants
+#include "inheritedcflextimer.h"// CFlexTimer implementation (CB is always TExtendedTestResult*)
+#include "inheritedcflextimer2.h"// another CFlexTimer implementation (CB is always RArray<TTimerStruct> *list)
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+const TInt64 KTickResolution( 1000000 / 64 );
+const TInt KExtraSlack = 500 * 1000;
+// ---------------------------------------------------------------------------
+// Constructor
+// ---------------------------------------------------------------------------
+//
+CTestCFlexTimer::CTestCFlexTimer()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CTestCFlexTimer::~CTestCFlexTimer()
+    {
+    }
+// --------------------------------------------------------------------------
+// Start timer and delete it.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndDestroyCFlexTimerL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TExtendedTestResult *eResult = new TExtendedTestResult(&aResult);
+    CInheritedCFlexTimer
+            * timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard,
+                    TCallBack(
+                            InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                            eResult));
+
+    TTimeIntervalMicroSeconds32 expireTime(5 * 1000 * 1000); //5s
+    timer->After(expireTime);
+    CActiveScheduler::Start();
+
+    delete timer;
+    timer = NULL;
+    _LIT( KDescription , "Test case passed");
+    aResult.SetResult(KErrNone, KDescription);
+    delete eResult;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start timer and see that it expires at max time
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndExpireCFlexTimerL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TExtendedTestResult *eResult = new TExtendedTestResult(&aResult);
+    CInheritedCFlexTimer
+            * timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard,
+                    TCallBack(
+                            InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                            eResult));
+
+    // Expire in 5 seconds
+    TTimeIntervalMicroSeconds32 expireTime(5 * 1000 * 1000);
+
+    // Save current time.
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer->After(expireTime);
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        delete timer;
+        delete eResult;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timer expiry happened within maxtime to maxtime+accuracy
+    if ((utcNow + expireTime) <= utcNow2 && (utcNow + expireTime
+            + TTimeIntervalMicroSeconds32(KTimerAccuracyMicroSeconds))
+            > utcNow2)
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer;
+    delete eResult;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndExpireTwoOverlappingAfterTimersL(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds32 expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)));
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(15 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds32(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime2 + TTimeIntervalMicroSeconds32(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        RDebug::Printf("utcNow = %lld\n", utcNow.Int64());
+        RDebug::Printf("eResult1->iTimerStoppedTime = %lld\n",
+                eResult1->iTimerStoppedTime);
+        RDebug::Printf("eResult2->iTimerStoppedTime = %lld\n",
+                eResult2->iTimerStoppedTime);
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time. 64bit version
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndExpireTwoOverlappingAfterTimers64L(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)));
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(15 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime2 + TTimeIntervalMicroSeconds(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at their own max time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndExpireTwoNonOverlappingAfterTimersL(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    //Expire one second before first timers window starts
+    TTimeIntervalMicroSeconds32 expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)) - 1 * 1000 * 1000);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(15 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within at their own max time edge.
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds32(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime1) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime1 + TTimeIntervalMicroSeconds32(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start many timers and see that nothing goes wrong when they are expired at rapid sequence
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::HumongousAmountOfTimeridelidilidousL(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    RDebug::Printf("HugemongousAmountOfTimeridelidilidousL");
+    // This list will contain all the timer structs, expiry times etc.
+    // First cell will always tell which timer is currently active
+    // active info is transferred from e.g. InheritedCFlexTimer2::RunL to CB function
+    RArray<TTimerStruct> timers;
+    // This CB contains all the logic about timer addition
+    StartTimerAndAddToList( &timers, 2000 );
+    // CBs stop this after all timers are expired 
+    CActiveScheduler::Start();
+    // Delete CPeriodic that was used to launch new FlexTimers
+    delete timers[0].iStartTimer;
+    _LIT( KDescriptionP , "Passed");
+    aResult.SetResult(KErrNone, KDescriptionP);
+    // Loop throug list and see if timers fired within limits.
+    // also delete all stuff reserved earlier by StartTimerAndAddToList
+    while (timers.Count())
+        {
+        // Have fun with reading this. It is not as bad as it looks
+        // Just checks if CB already failed the case
+        // and if timer was launched within its window(default) and timer accuracy
+        if (!(!timers[0].iEResult->iCaseAlreadyFailed
+                && (timers[0].iEResult->iTimerStartedTime
+                        + timers[0].iEResult->iTimerExpiryTime
+                        - (static_cast<float> (timers[0].iEResult->iTimerExpiryTime)
+                                * KDefaultWindowMultiplier)
+                        <= timers[0].iEResult->iTimerStoppedTime+KTickResolution)
+                && (timers[0].iEResult->iTimerStartedTime
+                        + timers[0].iEResult->iTimerExpiryTime
+                        + KTimerAccuracyMicroSeconds)
+                        > timers[0].iEResult->iTimerStoppedTime))
+            {
+            _LIT( KDescription , "Some timer was not fired within its window.\n");
+            aResult.SetResult(KErrGeneral, KDescription);
+
+            }
+        delete timers[0].iEResult->iTestResult;
+        delete timers[0].iEResult;
+        delete timers[0].iTimer;
+        timers.Remove(0);
+        }
+    // Case was executed
+    timers.Close();
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start three timers At, AtUTC and After and see that they are treated equally.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CreateAndExpireThreeTimersL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TTestResult *res3 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    TExtendedTestResult *eResult3 = new TExtendedTestResult(res3);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    eResult2->iTimerID = 3;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    CInheritedCFlexTimer* timer3 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult3));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(9 * 1000 * 1000);
+    TTimeIntervalMicroSeconds expireTime3(3 * 1000 * 1000); // Expire far enough from others
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    TTime homeNow(0);
+    homeNow.HomeTime();
+
+    timer1->After(expireTime1);
+    timer2->At(homeNow + expireTime2);
+    timer3->AtUTC(utcNow + expireTime3);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(15 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(
+            eResult1->iTestResult->iResult,
+            eResult1->iTestResult->iResultDes );
+        }
+    else if (eResult2->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(
+            eResult2->iTestResult->iResult,
+            eResult2->iTestResult->iResultDes );
+        }
+    else if (eResult3->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(
+            eResult3->iTestResult->iResult,
+            eResult3->iTestResult->iResultDes );
+        }
+
+    // Check if timers expiry happened within limits.
+    // First and second timer at seconds timers max time and third at its own max time.
+    //
+    // Compare results against utcNow due timer's stopped time is UTC.
+    else if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution) && 
+        (utcNow + expireTime2 + TTimeIntervalMicroSeconds( KTimerAccuracyMicroSeconds)) > TTime( eResult2->iTimerStoppedTime) &&
+
+        (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && 
+        (utcNow + expireTime2 + TTimeIntervalMicroSeconds( KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime) &&
+
+        (utcNow + expireTime3) <= TTime(eResult3->iTimerStoppedTime+KTickResolution) && 
+        (utcNow + expireTime3 + TTimeIntervalMicroSeconds( KTimerAccuracyMicroSeconds)) > TTime( eResult3->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete timer3;
+    delete eResult1;
+    delete eResult2;
+    delete eResult3;
+    delete res1;
+    delete res2;
+    delete res3;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start three timers At, AtUTC and After and see that they can be cancelled.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::NormalCancelL( TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TTestResult *res3 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    TExtendedTestResult *eResult3 = new TExtendedTestResult(res3);
+    eResult1->iTimerID = 0;
+    eResult2->iTimerID = 1;
+    eResult3->iTimerID = 2;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult1), 0);
+    CInheritedCFlexTimer2* timer2 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult2), 1);
+    CInheritedCFlexTimer2* timer3 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult3), 2);
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(10 * 1000 * 1000);
+    //just something
+    TTimeIntervalMicroSeconds expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)));
+    TTimeIntervalMicroSeconds expireTime3(7 * 1000 * 1000); // just something
+    RArray<TTimerStruct> timers;
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+    TTimerStruct *s2 = new TTimerStruct();
+    s2->iEResult = eResult2;
+    s2->iTimer = timer2;
+    timers.Append(*s2);
+    TTimerStruct *s3 = new TTimerStruct();
+    s3->iEResult = eResult3;
+    s3->iTimer = timer3;
+    timers.Append(*s3);
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    TTime homeNow(0);
+    homeNow.HomeTime();
+
+    timer1->After(expireTime1);
+    timer2->At(homeNow + expireTime2);
+    timer3->AtUTC(utcNow + expireTime3);
+
+    timers[0].iCurrentlyActive = 0; //CB uses this to decide which timer to cancel;
+
+    //Timer to cancel timers under test and cancel active scheduler
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(15 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CPeriodic *pp = CPeriodic::NewL(EPriorityNormal);
+    s1->iStartTimer = pp;
+    pp->Start(3 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+    CPeriodic *ppp = CPeriodic::NewL(EPriorityNormal);
+    s2->iStartTimer = ppp;
+    ppp->Start(4 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+    CPeriodic *pppp = CPeriodic::NewL(EPriorityNormal);
+    s3->iStartTimer = pppp;
+    pppp->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    delete pp;
+    delete ppp;
+    delete pppp;
+    delete s1;
+    delete s2;
+    delete s3;
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed
+            || eResult3->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        if (eResult2->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult3->iTestResult->iResult,
+                    eResult3->iTestResult->iResultDes);
+            }
+        }
+    delete timer1;
+    delete timer2;
+    delete timer3;
+    delete eResult1;
+    delete eResult2;
+    delete eResult3;
+    delete res1;
+    delete res2;
+    delete res3;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelTimerThatWouldHaveTriggeredAnotherTimerL(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult1));
+    CInheritedCFlexTimer
+            * timer2 =
+                    CInheritedCFlexTimer::NewL(
+                            CActive::EPriorityStandard,
+                            TCallBack(
+                                    InheritedFlexTimerCallbackKErrNoneMarkTimestampStopScheduler,
+                                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds32 expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)));
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to cancel Timer 1
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(3 * 1000 * 1000, 1000, TCallBack(CancelCFlexTimer, timer1));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds32(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureCTimerOverlap1L( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 window1(8 * 1000 * 1000);
+    timer1->Configure(window1);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds32 expireTime2(9 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 window2(1 * 1000 * 1000);
+    timer2->Configure(window2);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(17 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds32(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime2 + TTimeIntervalMicroSeconds32(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureCTimerOverlap2L( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window1(8 * 1000 * 1000);
+    timer1->Configure(window1);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(17 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window2(1 * 1000 * 1000);
+    timer2->Configure(window2);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(18 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer1 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime1) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime1 + TTimeIntervalMicroSeconds(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime1) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime1 + TTimeIntervalMicroSeconds(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureCTimerOverlap3L( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 zeroWindow(0);
+    timer1->Configure(zeroWindow);
+    timer1->Configure(window1);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(8 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window2(0);
+    timer2->Configure(window2);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(18 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime2 + TTimeIntervalMicroSeconds(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at their own max time
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureCTimerNonOverlap1L( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window1(0);
+    timer1->Configure(window1);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(15 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window2(1 * 1000 * 1000);
+    timer2->Configure(window2);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(18 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timer expired within their own  maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime1) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime1 + TTimeIntervalMicroSeconds(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at their own max time
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureCTimerNonOverlap2L( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(16 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window1(16 * 1000 * 1000);
+    timer1->Configure(window1);
+    window1 = 8 * 1000 * 1000;
+    timer1->Configure(window1);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds expireTime2(7 * 1000 * 1000);
+    TTimeIntervalMicroSeconds window2(4 * 1000 * 1000);
+    timer2->Configure(window2);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(18 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timer expired within their own  maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime1) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime1 + TTimeIntervalMicroSeconds(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start three timers and see that system time change aborts At & AtUtc timers
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::SystemTimeChangesL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TTestResult *res3 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    TExtendedTestResult *eResult3 = new TExtendedTestResult(res3);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    eResult3->iTimerID = 3;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(
+                    InheritedFlexTimerCallbackKErrAbort, eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(
+                    InheritedFlexTimerCallbackKErrAbort, eResult2));
+    CInheritedCFlexTimer* timer3 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                    eResult3));
+    // Expire in 10, 11 and 12 seconds. One and two are to be aborted
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 expireTime2(11 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 expireTime3(12 * 1000 * 1000);
+
+    
+    // Save current time as ticks. This use case will change system time
+    // and timestamps will not be exact -- ticks are.
+    TUint startTicks( User::TickCount() );
+    
+    TTime now, nowUtc;
+    now.HomeTime();
+    nowUtc.UniversalTime();
+
+    timer1->At(now + expireTime1);
+    timer2->AtUTC(nowUtc + expireTime2);
+    timer3->After(expireTime3);
+
+    //Timer to change system time after timers have been running for a while
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(5 * 1000 * 1000, 1000, TCallBack(ChangeSystemTime1sAndCancel, p));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed
+            || eResult3->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else if (eResult2->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult3->iTestResult->iResult,
+                    eResult3->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete timer3;
+        delete eResult1;
+        delete eResult2;
+        delete eResult3;
+        delete res1;
+        delete res2;
+        delete res3;
+        return KErrNone;
+        }
+    // Get new current time
+    TUint endTicks( User::TickCount() );
+    TInt delay( ( endTicks - startTicks ) * KTickInMicroSeconds );
+    
+    //Check if timers expiry happened within timer3 maxtime to maxtime+accuracy
+    if ( delay+KTickResolution >= expireTime3.Int() && 
+         delay < expireTime3.Int() + KTimerAccuracyMicroSeconds )
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete timer3;
+    delete eResult1;
+    delete eResult2;
+    delete eResult3;
+    delete res1;
+    delete res2;
+    delete res3;
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start three timers and see that time zone change aborts At & AtUtc timers
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::TimeZoneChangesL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TTestResult *res3 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    TExtendedTestResult *eResult3 = new TExtendedTestResult(res3);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    eResult3->iTimerID = 3;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(
+                    InheritedFlexTimerCallbackKErrAbort, eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(
+                    InheritedFlexTimerCallbackKErrAbort, eResult2));
+    CInheritedCFlexTimer* timer3 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                    eResult3));
+    // Expire in 10, 11 and 12 seconds. One and two are to be aborted
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 expireTime2(11 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 expireTime3(12 * 1000 * 1000);
+
+    // Save current time as ticks. This use case will change system time
+    // and timestamps will not be exact -- ticks are.
+    TUint startTicks( User::TickCount() );
+    
+    TTime now, nowUtc;
+    now.HomeTime();
+    nowUtc.UniversalTime();
+    
+    timer1->At(now + expireTime1);
+    timer2->AtUTC(nowUtc + expireTime2);
+    timer3->After(expireTime3);
+
+    //Timer to change system time after timers have been running for a while
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(5 * 1000 * 1000, 1000, TCallBack(ChangeTimeZoneAndCancel, p));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed
+            || eResult3->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else if (eResult2->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult3->iTestResult->iResult,
+                    eResult3->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete timer3;
+        delete eResult1;
+        delete eResult2;
+        delete eResult3;
+        delete res1;
+        delete res2;
+        delete res3;
+        return KErrNone;
+        }
+
+    // Get new current time
+    TUint endTicks( User::TickCount() );
+    TInt delay( ( endTicks - startTicks ) * KTickInMicroSeconds );
+    
+    //Check if timers expiry happened within timer3 maxtime to maxtime+accuracy
+    if ( delay+KTickResolution >= expireTime3.Int() && 
+         delay < expireTime3.Int() + KTimerAccuracyMicroSeconds )
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete timer3;
+    delete eResult1;
+    delete eResult2;
+    delete eResult3;
+    delete res1;
+    delete res2;
+    delete res3;
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimerL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+    CInheritedCFlexTimer
+            * timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard,
+                    TCallBack(
+                            InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                            eResult));
+
+    /*32 bit IF called with 1 parameter*/
+    /***********************************/
+    // Expire in 3 seconds. 
+    TTimeIntervalMicroSeconds32 expireTime(1);
+    // Save current time
+    TTime now(0);
+    now.HomeTime();
+    timer->After(expireTime);
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult->iTestResult->iResult,
+                eResult->iTestResult->iResultDes);
+        delete timer;
+        delete eResult;
+        delete res;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime now2(0);
+    now2.HomeTime();
+    //Check if timers expiry happened immediately.
+    if (!((now + expireTime) <= now2 && (now + expireTime
+            + TTimeIntervalMicroSeconds32(KTimerAccuracyMicroSeconds)) > now2))
+        {
+        _LIT( KDescription , "32 bit After(1) failed.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        delete timer;
+        delete eResult;
+        delete res;
+        return KErrNone;
+        }
+
+    /*32 bit IF called with max parameter*/
+    /***********************************/
+    expireTime = 0x7FFFFFFF;
+    now.HomeTime();
+    delete timer;
+    timer = NULL;
+    timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard, TCallBack(
+            NotCalledCB, eResult));
+    timer->After(expireTime);
+    //Timer to change system time after timers have been running for a while
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(5 * 1000 * 1000, 1000, TCallBack(
+            CancelCFlexTimerAndStopActiveScheduler, timer));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    p->Cancel();
+    delete p;
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult->iTestResult->iResult,
+                eResult->iTestResult->iResultDes);
+        delete timer;
+        delete eResult;
+        delete res;
+        return KErrNone;
+        }
+
+    /*64 bit IF called with 1 parameter*/
+    /***********************************/
+    // Expire in 3 seconds. 
+    TTimeIntervalMicroSeconds expireTime64(1);
+    // Save current time
+    now.HomeTime();
+    delete timer;
+    timer = NULL;
+    timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard, TCallBack(
+            InheritedFlexTimerCallbackStopSchedulerKErrNone, eResult));
+    timer->After(expireTime64);
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult->iTestResult->iResult,
+                eResult->iTestResult->iResultDes);
+        delete timer;
+        delete eResult;
+        delete res;
+        return KErrNone;
+        }
+    // Get new current time
+    now2.HomeTime();
+    //Check if timers expiry happened immediately
+    if (!((now + expireTime64) <= now2 && (now + expireTime64
+            + TTimeIntervalMicroSeconds(KTimerAccuracyMicroSeconds)) > now2))
+        {
+        _LIT( KDescription , "64 bit After(1) failed.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        delete timer;
+        delete eResult;
+        delete res;
+        return KErrNone;
+        }
+    // Finally if we are here set whole case to passed.
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimerZero32bitL( TTestResult& aResult,
+        CTestFlexTimer* /* cb */ )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    /*32 bit IF called with 0 parameter*/
+    /***********************************/
+    const TTimeIntervalMicroSeconds32 kExpireTime32(0);
+
+    // Save current time
+    TTime startTime;
+    startTime.HomeTime();
+
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+        CActive::EPriorityStandard, 
+        TCallBack( InheritedFlexTimerCallbackStopSchedulerKErrNone, eResult ) );
+
+    timer->After( kExpireTime32 );
+
+    CActiveScheduler::Start();  // WAIT timer to expire
+
+    TTime endTime;
+    endTime.HomeTime();
+    
+    TTimeIntervalMicroSeconds delay = endTime.MicroSecondsFrom( startTime );
+    
+    if ( delay.Int64() < kExpireTime32.Int() || 
+         delay.Int64() > kExpireTime32.Int() + KTimerAccuracyMicroSeconds )
+        {
+        aResult.SetResult( KErrGeneral, _L("Wrong expiration") );
+        }
+    else
+        {
+        aResult.SetResult( KErrNone, _L("Test case passed") );
+        }
+    
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimerZero64bitL( TTestResult& aResult,
+        CTestFlexTimer* /* cb */ )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    /*64 bit IF called with 0 parameter*/
+    /***********************************/
+    const TTimeIntervalMicroSeconds kExpireTime64(0);
+
+    // Save current time
+    TTime startTime;
+    startTime.HomeTime();
+
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(InheritedFlexTimerCallbackStopSchedulerKErrNone, eResult));
+
+    timer->After(kExpireTime64);
+    CActiveScheduler::Start();  // WAIT timer to expire
+
+    TTime endTime;
+    endTime.HomeTime();
+    
+    TTimeIntervalMicroSeconds delay = endTime.MicroSecondsFrom( startTime );
+    
+    if ( delay.Int64()+KTickResolution < kExpireTime64.Int64() || 
+         delay.Int64() > kExpireTime64.Int64() + KTimerAccuracyMicroSeconds )
+        {
+        aResult.SetResult( KErrGeneral, _L("Wrong expiration") );
+        }
+    else
+        {
+        aResult.SetResult( KErrNone, _L("Test case passed") );
+        }
+    
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimer64MaxL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    /*64 bit IF called with 0x7FFFFFFFFFFFFFFF parameter*/
+    /***********************************/
+    // This will cause panic 
+    TTimeIntervalMicroSeconds expireTime64(0x7FFFFFFFFFFFFFFF);
+    // Save current time
+    TTime now(0);
+    now.HomeTime();
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerServerIllegalTimerValue);
+    timer->After(expireTime64);
+    // Start timer that stops active scheduler just in case.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(3 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CActiveScheduler::Start();
+    delete p;
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "64 bit After(0x7FFFFFFFFFFFFFFF) failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimer64ThreeYearsL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    /*64 bit IF called with 93312000000000 (about three years) parameter*/
+    /***********************************/
+    // This will cause panic since only two years ahead timers are supported 
+    TTimeIntervalMicroSeconds expireTime64(93312000000000);
+    // Save current time
+    TTime now(0);
+    now.HomeTime();
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerServerIllegalTimerValue);
+    timer->After(expireTime64);
+    // Start timer that stops active scheduler just in case.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(3 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CActiveScheduler::Start();
+    delete p;
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "64 bit After(93312000000000) failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start one year timer and cancel it.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::DumbAssParametersForCTimer64OneYearL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    RDebug::Printf("DumbAssParametersForCTimer64OneYearL");
+    TTestResult *res1 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    eResult1->iTimerID = 0;
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1( 33312000000000 ); // About on year
+    //just something
+    RArray<TTimerStruct> timers;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB,
+                    &timers), 0);
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+
+    timer1->After(expireTime1);
+
+    timers[0].iCurrentlyActive = 0;
+
+    //Timers to cancel timer and stop scheduler.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(7 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CPeriodic *pp = CPeriodic::NewL(EPriorityNormal);
+    s1->iStartTimer = pp;
+    pp->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p; delete pp;
+    delete s1;
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult1->iTestResult->iResult,
+                eResult1->iTestResult->iResultDes);
+        }
+    
+    delete timer1;
+    delete eResult1;
+    delete res1;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with negative value
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AfterWithNegativeValueL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    // This will cause panic
+    TTimeIntervalMicroSeconds32 expireTime(-1);
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerAfterIntervalLessThanZero);
+    timer->After(expireTime);
+    CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "32 bit After(-1) failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with negative value
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AfterWithNegativeValue64L( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    // This will cause panic
+    TTimeIntervalMicroSeconds expireTime(-1);
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerAfterIntervalLessThanZero);
+    timer->After(expireTime);
+    CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "64 bit After(-1) failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AtWithCurrentTimeL( TTestResult& aResult,
+        CTestFlexTimer* /* cb */ )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    TTimeIntervalMicroSeconds expireTime64(0);
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+        CActive::EPriorityStandard, 
+        TCallBack(InheritedFlexTimerCallbackStopSchedulerKErrNone, eResult));
+
+    // Save current time
+    TTime now(0);
+    now.HomeTime();
+    timer->At(now + expireTime64);
+    CActiveScheduler::Start(); // WAIT timer to expire
+
+    // Analyze results
+    TTime endTime;
+    endTime.HomeTime();
+    
+    TTimeIntervalMicroSeconds delay = endTime.MicroSecondsFrom( now );
+
+    if ( delay.Int64()+KTickResolution < expireTime64.Int64() || 
+         delay.Int64() > expireTime64.Int64() + KTimerAccuracyMicroSeconds )
+        {
+        aResult.SetResult(KErrGeneral, _L("Wrong expiration"));
+        }
+    else
+        {
+        aResult.SetResult( KErrNone, _L("Test case passed") );
+        }
+
+    // Clean up
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AtUTCWithCurrentTimeL( TTestResult& aResult,
+        CTestFlexTimer* /* cb */ )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    TTimeIntervalMicroSeconds expireTime64(0);
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+        CActive::EPriorityStandard, 
+        TCallBack(InheritedFlexTimerCallbackStopSchedulerKErrNone, eResult));
+
+    // Save current time
+    TTime now(0);
+    now.UniversalTime();
+    timer->AtUTC(now + expireTime64);
+    CActiveScheduler::Start(); // WAIT timer to expire
+
+    // Analyze results
+    TTime endTime;
+    endTime.UniversalTime();
+    
+    TTimeIntervalMicroSeconds delay = endTime.MicroSecondsFrom( now );
+
+    if ( delay.Int64()+KTickResolution < expireTime64.Int64() || 
+         delay.Int64() > expireTime64.Int64() + KTimerAccuracyMicroSeconds )
+        {
+        aResult.SetResult(KErrGeneral, _L("Wrong expiration"));
+        }
+    else
+        {
+        aResult.SetResult( KErrNone, _L("Test case passed") );
+        }
+
+    // Clean up
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timers with dumbass parameters
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AtWithThreeYearsL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = 1;
+
+    // This will cause panic 
+    TTimeIntervalMicroSeconds expireTime64(93312000000000);
+    CInheritedCFlexTimer *timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerServerIllegalTimerValue);
+    // Save current time
+    TTime now(0);
+    now.HomeTime();
+    timer->At(now + expireTime64);
+    // Start timer that stops active scheduler just in case.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(3 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CActiveScheduler::Start();
+    delete p;
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "At(93312000000000) failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start one year timer and cancel it.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AtWithOneYearL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    RDebug::Printf("AtWithOneYearL");
+    TTestResult *res1 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    eResult1->iTimerID = 0;
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1( 33312000000000 ); // About on year
+    //just something
+    RArray<TTimerStruct> timers;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB,
+                    &timers), 0);
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+    TTime now(0);
+    now.HomeTime();
+    timer1->At(now + expireTime1);
+
+    timers[0].iCurrentlyActive = 0;
+
+    //Timers to cancel timer and stop scheduler.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(7 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CPeriodic *pp = CPeriodic::NewL(EPriorityNormal);
+    s1->iStartTimer = pp;
+    pp->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p; delete pp;
+    delete s1;
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult1->iTestResult->iResult,
+                eResult1->iTestResult->iResultDes);
+        }
+    delete timer1;
+    delete eResult1;
+    delete res1;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Call At and AtUTC with time in the past
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::AtWithTimeInThePastL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    RDebug::Printf("AtWithTimeInThePastL");
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+
+    // Expire in the past
+    TTimeIntervalMicroSeconds expireTime(-1);
+    CInheritedCFlexTimer* timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    // Save current time
+    TTime homeNow(0);
+    homeNow.HomeTime();
+    TTime homeExpireTime(homeNow + expireTime);
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerAtIntervalLessThanZero);
+    timer->At(homeExpireTime);
+    CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "At in the past failed to panic.\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timer, expire, cancel, start again and expire
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelExpiredTimerL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TExtendedTestResult *eResult = new TExtendedTestResult(&aResult);
+    CInheritedCFlexTimer
+            * timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard,
+                    TCallBack(
+                            InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                            eResult));
+
+    // Expire in 5 seconds
+    TTimeIntervalMicroSeconds32 expireTime(5 * 1000 * 1000);
+
+    // Save current time.
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer->After(expireTime);
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    // Ignore time and cb stuff
+    // Cancel timer that just expired
+    timer->Cancel();
+
+    // Start timer again
+    // Save current time.
+    utcNow.UniversalTime();
+
+    timer->After(expireTime);
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        delete timer;
+        delete eResult;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timer expiry happened within maxtime to maxtime+accuracy
+    if ((utcNow + expireTime) <= utcNow2+TTimeIntervalMicroSeconds32(KTickResolution) && (utcNow + expireTime
+            + TTimeIntervalMicroSeconds32(KTimerAccuracyMicroSeconds))
+            > utcNow2)
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer;
+    delete eResult;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start timer that has left side of the window in the past.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureLeftSideInThePastL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    TExtendedTestResult *eResult = new TExtendedTestResult(&aResult);
+    CInheritedCFlexTimer
+            * timer = CInheritedCFlexTimer::NewL(CActive::EPriorityStandard,
+                    TCallBack(
+                            InheritedFlexTimerCallbackStopSchedulerKErrNone,
+                            eResult));
+
+    // Expire in 5 seconds
+    TTimeIntervalMicroSeconds32 winTime(10 * 1000 * 1000);
+    TTimeIntervalMicroSeconds32 expireTime(5 * 1000 * 1000);
+
+    // Save current time.
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    timer->Configure(winTime);
+    timer->After(expireTime);
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    //See if CB has failed the case
+    if (eResult->iCaseAlreadyFailed)
+        {
+        delete timer;
+        delete eResult;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timer expiry happened within maxtime to maxtime+accuracy
+    if ((utcNow + expireTime) <= utcNow2+TTimeIntervalMicroSeconds32(KTickResolution) && (utcNow + expireTime
+            + TTimeIntervalMicroSeconds32(KTimerAccuracyMicroSeconds))
+            > utcNow2)
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer;
+    delete eResult;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Start two timers and see that window works if another is started with left 
+// side of the window in the past.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureLeftSideInThePastWindowCheckL(
+        TTestResult& aResult, CTestFlexTimer */*cb*/)
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds32 expireTime2(9 * 1000 * 1000);
+
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+
+    timer1->Configure(TTimeIntervalMicroSeconds(15 * 1000 * 1000));
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(17 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed || eResult2->iCaseAlreadyFailed)
+        {
+        if (eResult1->iCaseAlreadyFailed)
+            {
+            aResult.SetResult(eResult1->iTestResult->iResult,
+                    eResult1->iTestResult->iResultDes);
+            }
+        else
+            {
+            aResult.SetResult(eResult2->iTestResult->iResult,
+                    eResult2->iTestResult->iResultDes);
+            }
+        delete timer1;
+        delete timer2;
+        delete eResult1;
+        delete eResult2;
+        delete res1;
+        delete res2;
+        return KErrNone;
+        }
+    // Get new current time
+    TTime utcNow2(0);
+    utcNow2.UniversalTime();
+
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if ((utcNow + expireTime2) <= TTime(eResult2->iTimerStoppedTime+KTickResolution)
+            && (utcNow + expireTime2 + TTimeIntervalMicroSeconds32(
+                    KTimerAccuracyMicroSeconds)) > TTime(
+                    eResult2->iTimerStoppedTime) &&
+
+    (utcNow + expireTime2) <= TTime(eResult1->iTimerStoppedTime+KTickResolution) && (utcNow
+            + expireTime2 + TTimeIntervalMicroSeconds32(
+            KTimerAccuracyMicroSeconds)) > TTime(eResult1->iTimerStoppedTime))
+        {
+        _LIT( KDescription , "Passed");
+        aResult.SetResult(KErrNone, KDescription);
+        }
+    else
+        {
+        _LIT( KDescription , "Some timer was fired either too early or too late.\n");
+        aResult.SetResult(KErrGeneral, KDescription);
+        }
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    return KErrNone;
+
+    }
+
+// --------------------------------------------------------------------------
+// Call Configure 32 bit with Negative window size
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWithNegativeWindowSize32L(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    RDebug::Printf("ConfigureWithNegativeWindowSize32L");
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+
+    // negative time
+    TTimeIntervalMicroSeconds32 confTime(-1);
+    CInheritedCFlexTimer* timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerWindowLessThanZero);
+    timer->Configure(confTime);
+    //CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "Configure(32) with negative interval failed to panic\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// Call Configure 64 bit with Negative window size
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWithNegativeWindowSize64L(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    RDebug::Printf("ConfigureWithNegativeWindowSize64L");
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+
+    // negative time
+    TTimeIntervalMicroSeconds confTime(-1);
+    CInheritedCFlexTimer* timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerWindowLessThanZero);
+    timer->Configure(confTime);
+    //CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "Configure(64) with negative interval failed to panic\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// -
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWithMaxWindow32L(
+        TTestResult& aResult, CTestFlexTimer* /* cb */ )
+    {
+    RDebug::Printf("ConfigureWithMaxWindow32L");
+    TTestResult *res1 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    eResult1->iTimerID = 0;
+    TTimeIntervalMicroSeconds32 expireTime1( 0x7FFFFFFF );
+    //just something
+    RArray<TTimerStruct> timers;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB,
+                    &timers), 0);
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+    timer1->Configure(expireTime1);
+    timer1->After(expireTime1);
+
+    timers[0].iCurrentlyActive = 0;
+
+    //Timers to cancel timer and stop scheduler.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(7 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StopActiveScheduler));
+    CPeriodic *pp = CPeriodic::NewL(EPriorityNormal);
+    s1->iStartTimer = pp;
+    pp->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            CancelCFlexTimerArray, &timers));
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p; delete pp;
+    delete s1;
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult1->iTestResult->iResult,
+                eResult1->iTestResult->iResultDes);
+        }
+    delete timer1;
+    delete eResult1;
+    delete res1;
+    return KErrNone;
+    }
+// --------------------------------------------------------------------------
+// -
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWithThreeYearWindow64L(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    RDebug::Printf("ConfigureWithThreeYearWindow64L");
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+
+    // negative time
+    TTimeIntervalMicroSeconds confTime(93312000000000);
+    CInheritedCFlexTimer* timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerServerIllegalTimerValue);
+    timer->Configure(confTime);
+    //CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "Configure(93312000000000 failed to panic\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// -
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWithMaxWindow64L(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    RDebug::Printf("ConfigureWithMaxWindow64L");
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+
+    // negative time
+    TTimeIntervalMicroSeconds confTime(0x7FFFFFFFFFFFFFFF);
+    CInheritedCFlexTimer* timer = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult));
+    //Accept panic as passed case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic,
+            EFlexTimerServerIllegalTimerValue);
+    timer->Configure(confTime);
+    //CActiveScheduler::Start();
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    _LIT( KDescription , "Configure(0x7FFFFFFFFFFFFFFF) failed to panic\n");
+    aResult.SetResult(KErrGeneral, KDescription);
+    delete timer;
+    delete eResult;
+    delete res;
+    return KErrNone;
+    }
+// --------------------------------------------------------------------------
+// Start timer and call configure while it is running
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureWhileTimerIsInUseL( TTestResult& aResult,
+        CTestFlexTimer */*cb*/)
+    {
+    RDebug::Printf("ConfigureWhileTimerIsInUseL");
+    TTestResult *res1 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    eResult1->iTimerID = 0;
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(10 * 1000 * 1000);
+    //just something
+    RArray<TTimerStruct> timers;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(StopSchedulerKErrNoneArray,
+                    &timers), 0);
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+
+    TTime homeNow(0);
+    homeNow.HomeTime();
+
+    timer1->After(expireTime1);
+
+    timers[0].iCurrentlyActive = 0;
+
+    //Timer to call configure while timer is running
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            ConfigureKErrInUseArray, &timers));
+
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    delete p;
+    delete s1;
+    _LIT( KDescription , "Passed");
+    aResult.SetResult(KErrNone, KDescription);
+    //See if CB has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        aResult.SetResult(eResult1->iTestResult->iResult,
+                eResult1->iTestResult->iResultDes);
+        delete timer1;
+        delete eResult1;
+        delete res1;
+        return KErrNone;
+        }
+    TTime homeNow2(0);
+    homeNow2.HomeTime();
+    //Check if timers expiry happened within timer2 maxtime to maxtime+accuracy
+    if (!((homeNow + expireTime1) <= homeNow2+TTimeIntervalMicroSeconds32(KTickResolution) && (homeNow + expireTime1
+            + TTimeIntervalMicroSeconds32(KTimerAccuracyMicroSeconds))
+            > homeNow2))
+        {
+        _LIT( KEDescription , "Timer was not fired within limits");
+        aResult.SetResult(KErrGeneral, KEDescription);
+        }
+    delete timer1;
+    delete eResult1;
+    delete res1;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// timer is started twice
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::TimerIsStartedTwiceL( TTestResult& aResult,
+        CTestFlexTimer *cb )
+    {
+    TTestResult *res1 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    eResult1->iTimerID = 0;
+    CInheritedCFlexTimer2* timer1 = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard, TCallBack(NotCalledCB, eResult1), 0);
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds expireTime1(10 * 1000 * 1000);
+    RArray<TTimerStruct> timers;
+    TTimerStruct *s1 = new TTimerStruct();
+    s1->iEResult = eResult1;
+    s1->iTimer = timer1;
+    timers.Append(*s1);
+
+    timer1->After(expireTime1);
+    timers[0].iCurrentlyActive = 0; //CB uses this to decide which timer to start again;
+
+    //Timer to start timer again
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+    p->Start(5 * 1000 * 1000, 30 * 1000 * 1000, TCallBack(
+            StartTimerAgainArray, &timers));
+    // Panic category: "E32USER-CBase"
+    // Panic reason:   42 (attempt to active CActive when a request is still 
+    // outstanding.
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::EPanic, 42);
+    // Start scheduler and wait for callback to panic it
+    CActiveScheduler::Start();
+    // We should never get here -> fail the case
+    cb->TestModuleIf().SetExitReason(CTestModuleIf::ENormal, KErrNone);
+    delete p;
+    delete s1;
+    _LIT( KDescription , "double start failed to panic.");
+    aResult.SetResult(KErrGeneral, KDescription);
+
+    delete timer1;
+    delete eResult1;
+    delete res1;
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason and stop scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackStopSchedulerKErrNone(
+        TAny* aArgument )
+    {
+    RDebug::Printf("InheritedFlexTimerCallbackStopSchedulerKErrNone");
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrNone)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason\n");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason and stop scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackStopSchedulerKErrAbort(
+        TAny* aArgument )
+    {
+    RDebug::Printf("InheritedFlexTimerCallbackStopSchedulerKErrAbort");
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrAbort)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason and stop scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackStopSchedulerKErrCancel(
+        TAny* aArgument )
+    {
+    RDebug::Printf("InheritedFlexTimerCallbackStopSchedulerKErrCancel");
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrCancel)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackKErrNone( TAny* aArgument )
+    {
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrNone)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackKErrAbort( TAny* aArgument )
+    {
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrAbort)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that both timers are stoppped with valid reason and save expiry time
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackKErrNoneMarkTimestamp(
+        TAny* aArgument )
+    {
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrNone)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    eRes->iTimerStoppedTime = utcNow.Int64();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// See that both timers are stoppped with valid reason and save expiry time
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::InheritedFlexTimerCallbackKErrNoneMarkTimestampStopScheduler(
+        TAny* aArgument )
+    {
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    if (eRes->iStatusCode != KErrNone)
+        {
+        eRes->iCaseAlreadyFailed = ETrue;
+        _LIT(KError,"Error: Wrong timer expiry reason");
+        eRes->iTestResult->SetResult(KErrGeneral, KError);
+        }
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    eRes->iTimerStoppedTime = utcNow.Int64();
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Stop active scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StopActiveScheduler( TAny*/*aArgument*/)
+    {
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Change system time + 1s and cancel Periodic timer given as parameter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ChangeSystemTime1sAndCancel( TAny* aArgument )
+    {
+    RDebug::Printf("ChangeSystemTime1sAndCancel");
+    TTime now(0);
+    now.HomeTime();
+    User::SetHomeTime(now + TTimeIntervalMicroSeconds32(1000 * 1000));
+    CPeriodic *p = reinterpret_cast<CPeriodic*> (aArgument);
+    p->Cancel();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Change time zone and cancel Periodic timer given as parameter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ChangeTimeZoneAndCancel( TAny* aArgument )
+    {
+    RDebug::Printf("ChangeTimeZoneAndCancel");
+    TTimeIntervalSeconds currentUtcOffset( User::UTCOffset() );
+    User::SetUTCOffset( currentUtcOffset.Int() + 3000 );
+    CPeriodic *p = reinterpret_cast<CPeriodic*> (aArgument);
+    p->Cancel();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Change secure time + 1s and cancel Periodic timer given as parameter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ChangeSecureTimeAndCancel( TAny* aArgument )
+    {
+    RDebug::Printf("ChangeSecureTimeAndCancel");
+    TTime now(0);
+    now.UniversalTime();
+    User::SetUTCTimeSecure(now + TTimeIntervalMicroSeconds32(1000 * 1000));
+    CPeriodic *p = reinterpret_cast<CPeriodic*> (aArgument);
+    p->Cancel();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Fail result if this is called
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::NotCalledCB( TAny* aArgument )
+    {
+    TExtendedTestResult *eRes =
+            reinterpret_cast<TExtendedTestResult*> (aArgument);
+    eRes->iCaseAlreadyFailed = ETrue;
+    _LIT(KError,"Error: invalid CB called");
+    eRes->iTestResult->SetResult(KErrGeneral, KError);
+    return 1; //nada
+    }
+
+// --------------------------------------------------------------------------
+// Stop active schduler and cancel Periodic timer given as paramter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StopSchedulerAndCancel( TAny* aArgument )
+    {
+    CPeriodic *p = reinterpret_cast<CPeriodic*> (aArgument);
+    p->Cancel();
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Cancels CFlexTimer given a parameter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelCFlexTimer( TAny* aArgument )
+    {
+    CFlexTimer *p = reinterpret_cast<CFlexTimer*> (aArgument);
+    p->Cancel();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Cancels CFlexTimer
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelCFlexTimerArray( TAny* aArgument )
+    {
+    RDebug::Printf("CancelCFlexTimerCancelPeriodic");
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    (*list)[(*list)[0].iCurrentlyActive].iTimer->Cancel();
+    (*list)[0].iCurrentlyActive += 1;
+    return 1; // nada
+    }
+// --------------------------------------------------------------------------
+// Cancels CFlexTimer and CPeriodic given a parameter
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelCFlexTimerCancelPeriodic( TAny* aArgument )
+    {
+    RDebug::Printf("CancelCFlexTimerCancelPeriodic");
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    (*list)[(*list)[0].iCurrentlyActive].iTimer->Cancel();
+    (*list)[0].iCurrentlyActive += 1;
+    (*list)[0].iStartTimer->Cancel();
+    return 1; // nada
+    }
+// --------------------------------------------------------------------------
+// See that timer is stoppped with valid reason and stop scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StopSchedulerKErrNoneArray( TAny* aArgument )
+    {
+    RDebug::Printf("StopSchedulerKErrNoneArray");
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    if ((*list)[(*list)[0].iCurrentlyActive].iEResult->iStatusCode
+            != KErrNone)
+        {
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iCaseAlreadyFailed
+                = ETrue;
+        _LIT(KErrorDes,"Error: Wrong timer expiry reason");
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iTestResult->SetResult(
+                KErrGeneral, KErrorDes);
+        }
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Cancels CFlexTimer given a parameter and stops active scheduler
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CancelCFlexTimerAndStopActiveScheduler( TAny* aArgument )
+    {
+    CFlexTimer *p = reinterpret_cast<CFlexTimer*> (aArgument);
+    p->Cancel();
+    CActiveScheduler::Stop();
+    return 1; // nada
+    }
+    
+// --------------------------------------------------------------------------
+// Callback for StartTimerAndAddToList method. This is hack to enable aTimers
+// parameter in StartTimerAndAddToList method.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StartTimerAndAddToListCB( TAny* aArgument )
+    {
+    return StartTimerAndAddToList(
+        reinterpret_cast<RArray<TTimerStruct>*> (aArgument), -1 );
+    }
+
+// --------------------------------------------------------------------------
+// Starts timer and adds it to list given as param
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StartTimerAndAddToList(
+    RArray<TTimerStruct>* aList, TInt aTimers )
+    {
+    const TInt KTimerStartInterval = 5 * 1000; //Start new timer every 5ms
+    const TInt KTimerMaxDelay = 15 * 1000 * 1000; //Timer delay is between 0 and 15 seconds
+    static TInt numberOfTimers = 0; // How many timers to start
+    
+    if (aTimers > 0)
+        {
+        numberOfTimers = aTimers;
+        }
+
+    TTestResult *res = new TTestResult();
+    TExtendedTestResult *eResult = new TExtendedTestResult(res);
+    eResult->iTimerID = aList->Count();
+    CInheritedCFlexTimer2* timer = CInheritedCFlexTimer2::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(StopTimer, reinterpret_cast<TAny*> (aList)),
+            eResult->iTimerID);
+
+    // Expire in 0-15s seconds
+    TInt random = Math::Random() % (KTimerMaxDelay);
+    TTimeIntervalMicroSeconds expireTime(random);
+    TTimerStruct *s = new TTimerStruct();
+    s->iEResult = eResult;
+    s->iTimer = timer;
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    s->iEResult->iTimerStartedTime = utcNow.Int64();
+    s->iEResult->iTimerExpiryTime = expireTime.Int64();
+    TInt listerr = aList->Append(*s);
+    if (KErrNone != listerr)
+        {
+        RDebug::Printf("Error: Adding to list failed %d", listerr);
+        }
+    (*aList)[0].iTimersRunning += 1;
+    timer->After(expireTime);
+    //First time here. Lets start timer to make many timers.
+    if (aList->Count() == 1)
+        {
+        CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+        p->Start(KTimerStartInterval, KTimerStartInterval, TCallBack(
+                StartTimerAndAddToListCB, reinterpret_cast<TAny*> (aList) ));
+        (*aList)[0].iStartTimer = p;
+        }
+    RDebug::Printf("StartTimerAndAddToList: timers running %d",
+            (*aList)[0].iTimersRunning);
+    RDebug::Printf("StartTimerAndAddToList: list->Count() %d", aList->Count());
+    if (aList->Count() == numberOfTimers)
+        {
+        ((*aList)[0].iStartTimer->Cancel());
+        }
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// Starts timer and adds it to list given as param
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StopTimer( TAny* aArgument )
+    {
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    RDebug::Printf("StopTimer: timers running %d", (*list)[0].iTimersRunning);
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    (*list)[0].iTimersRunning -= 1;
+    (*list)[(*list)[0].iCurrentlyActive].iEResult->iTimerStoppedTime
+            = utcNow.Int64();
+    if ((*list)[0].iTimersRunning == 0)
+        {
+        (*list)[0].iStartTimer->Cancel();
+        CActiveScheduler::Stop();
+        }
+    return 1; // nada
+    }
+// --------------------------------------------------------------------------
+// Try to configure timer ans see that correct error code is returned
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::ConfigureKErrInUseArray( TAny* aArgument )
+    {
+    RDebug::Printf("ConfigureKErrInUseArray");
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    TInt error = (*list)[(*list)[0].iCurrentlyActive].iTimer->Configure(
+            TTimeIntervalMicroSeconds(12 * 1000 * 1000));
+    if (KErrInUse != error)
+        {
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iCaseAlreadyFailed
+                = ETrue;
+        _LIT(KError,"Error: Wrong return code 64bit if\n");
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iTestResult->SetResult(
+                KErrGeneral, KError);
+        return 1;
+        }
+    //Try same with 32 bit if
+    error = (*list)[(*list)[0].iCurrentlyActive].iTimer->Configure(
+            TTimeIntervalMicroSeconds32(12 * 1000 * 1000));
+    if (KErrInUse != error)
+        {
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iCaseAlreadyFailed
+                = ETrue;
+        _LIT(KError,"Error: Wrong return code 32bit if\n");
+        (*list)[(*list)[0].iCurrentlyActive].iEResult->iTestResult->SetResult(
+                KErrGeneral, KError);
+        }
+    return 1; // nada
+    }
+
+// --------------------------------------------------------------------------
+// start timer again
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::StartTimerAgainArray( TAny* aArgument )
+    {
+    RDebug::Printf("StartTimerAgainArray");
+    RArray<TTimerStruct> *list =
+            reinterpret_cast<RArray<TTimerStruct>*> (aArgument);
+    (*list)[(*list)[0].iCurrentlyActive].iTimer->After(
+            TTimeIntervalMicroSeconds(12 * 1000 * 1000));
+    return 1; // nada
+    }
+// --------------------------------------------------------------------------
+// Start two timers and see that they expire at the same time.
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CpuLoadCreateAndExpireTwoOverlappingAfterTimersL(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    TTestResult *res1 = new TTestResult();
+    TTestResult *res2 = new TTestResult();
+    TExtendedTestResult *eResult1 = new TExtendedTestResult(res1);
+    TExtendedTestResult *eResult2 = new TExtendedTestResult(res2);
+    
+
+    eResult1->iTimerID = 1;
+    eResult2->iTimerID = 2;
+    
+    CInheritedCFlexTimer* timer1 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult1));
+    CInheritedCFlexTimer* timer2 = CInheritedCFlexTimer::NewL(
+            CActive::EPriorityStandard,
+            TCallBack(InheritedFlexTimerCallbackKErrNoneMarkTimestamp,
+                    eResult2));
+    
+    // Expire in 10 seconds
+    TTimeIntervalMicroSeconds32 expireTime1(10 * 1000 * 1000);
+    //Expire within first timers default window
+    TTimeIntervalMicroSeconds32 expireTime2(static_cast<TInt64> ((10 * 1000
+            * 1000 - static_cast<float> (10 * 1000 * 1000)
+            * KDefaultWindowMultiplier)));
+    
+    // Save current time
+    TTime utcNow(0);
+    utcNow.UniversalTime();
+    
+    timer1->After(expireTime1);
+    timer2->After(expireTime2);
+    
+    //Timer to stop active scheduler after timers under test are completed.
+    CPeriodic *p = CPeriodic::NewL(EPriorityNormal);
+
+    p->Start(15 * 1000 * 1000, 1000, TCallBack(StopActiveScheduler));
+
+    MSTIFTestInterference* interference =  MSTIFTestInterference::NewL(
+        cb, MSTIFTestInterference::EThread );
+
+    // Start interference to generate 99% CPU load (100 ms load, 1% idle)
+    interference->StartL( MSTIFTestInterference::ECpuLoad, 1, 100 );
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    interference->Stop();
+    delete interference;
+    
+    delete p;
+
+    // Check results
+    TInt64 timer1RightWin =
+        utcNow.Int64() + static_cast<TInt64>(expireTime1.Int());
+    TInt64 timer2RightWin =
+        utcNow.Int64() + static_cast<TInt64>(expireTime2.Int());
+    TInt64 timer1LeftWin = timer2RightWin - static_cast<TInt64>(
+        (static_cast<TReal64>(expireTime1.Int()) * KDefaultWindowMultiplier));
+    TInt64 timer2LeftWin = timer2RightWin - static_cast<TInt64>(
+        (static_cast<TReal64>(expireTime2.Int()) * KDefaultWindowMultiplier));
+    TInt64 timer1StopedTime = eResult1->iTimerStoppedTime;
+    TInt64 timer2StopedTime = eResult2->iTimerStoppedTime;
+    
+    //See if Timer 1 Callback has failed the case
+    if (eResult1->iCaseAlreadyFailed)
+        {
+        _LIT( KDescription ,"Timer 1 has failed" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    //See if Timer 2 Callback has failed the case
+    else if (eResult2->iCaseAlreadyFailed)
+        {
+        _LIT( KDescription,"Timer 2 has failed" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Check if timer 1 has timed out too early
+    else if ((timer1StopedTime + KTickResolution) < timer1LeftWin)
+        {
+        _LIT( KDescription, "Timer 1 timed out too early" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Check if timer 1 has timed out too Late
+    else if ((timer1StopedTime - KTimerAccuracyMicroSeconds) > timer1RightWin)
+        {
+        _LIT( KDescription, "Timer 1 timed out too late" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Check if timer 2 has timed out too early
+    else if ((timer2StopedTime + KTickResolution) < timer2LeftWin)
+        {
+        _LIT( KDescription, "Timer 2 timed out too early" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Check if timer 2 has timed out too Late
+    else if ((timer2StopedTime - KTimerAccuracyMicroSeconds - KExtraSlack) > timer2RightWin)
+        {
+        _LIT( KDescription, "Timer 2 timed out too late" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Check that the timers 1 and 2 timed out at the same time
+    else if (((timer1StopedTime + KTimerAccuracyMicroSeconds) < timer2StopedTime) ||
+        ((timer1StopedTime - KTimerAccuracyMicroSeconds) > timer2StopedTime))
+        {
+        _LIT( KDescription, "Timers 1 and 2 did not timeout at the same time" );
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+    // Everything was successful
+    else
+        {
+        _LIT( KDescription, "Passed" );
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    
+    // Case was executed
+    delete timer1;
+    delete timer2;
+    delete eResult1;
+    delete eResult2;
+    delete res1;
+    delete res2;
+    
+    return KErrNone;
+    }
+// --------------------------------------------------------------------------
+// Start many timers and see that nothing goes wrong when they are expired at rapid sequence
+// --------------------------------------------------------------------------
+//
+TInt CTestCFlexTimer::CpuLoadManyTimersL(
+        TTestResult& aResult, CTestFlexTimer *cb )
+    {
+    RDebug::Printf("CpuLoadManyTimersL");
+    // This list will contain all the timer structs, expiry times etc.
+    // First cell will always tell which timer is currently active
+    // active info is transferred from e.g. InheritedCFlexTimer2::RunL to CB function
+    RArray<TTimerStruct> timers;
+    // This CB contains all the logic about timer addition
+    StartTimerAndAddToList( &timers, 100 );
+    
+    MSTIFTestInterference* interference =  MSTIFTestInterference::NewL(
+        cb, MSTIFTestInterference::EThread );
+    // Start interference to generate 99% CPU load (100 ms load, 1% idle)
+    interference->StartL( MSTIFTestInterference::ECpuLoad, 1, 50 );
+    // Start scheduler and wait for callback to stop it
+    CActiveScheduler::Start();
+    interference->Stop();
+    delete interference;
+    
+    // Delete CPeriodic that was used to launch new FlexTimers
+    delete timers[0].iStartTimer;
+    _LIT( KDescriptionP , "Passed");
+    aResult.SetResult(KErrNone, KDescriptionP);
+    // Loop throug list and see if timers fired within limits.
+    // also delete all stuff reserved earlier by StartTimerAndAddToList
+    while (timers.Count())
+        {
+        TInt64 rightWin = timers[0].iEResult->iTimerStartedTime +
+            timers[0].iEResult->iTimerExpiryTime;
+        TInt64 leftWin = rightWin -
+            (static_cast<float> (timers[0].iEResult->iTimerExpiryTime) *
+                KDefaultWindowMultiplier);
+        TInt64 stopTime = timers[0].iEResult->iTimerStoppedTime;
+        
+        // Have fun with reading this. It is not as bad as it looks
+        // Just checks if CB already failed the case
+        // and if timer was launched within its window(default) and timer accuracy
+        if (timers[0].iEResult->iCaseAlreadyFailed)
+            {
+            _LIT( KDescription , "Case was failed earlier for unknown reason.");
+            aResult.SetResult(KErrGeneral, KDescription);
+            }
+        // Check if timer has expired before the window has started.
+        else if((stopTime + KTickResolution)  < leftWin)
+            {
+            _LIT( KDescription , "Some timer has expired too soon");
+            aResult.SetResult(KErrGeneral, KDescription);
+            }
+        // Check if timeout has happened too long time after window end.
+        else if (stopTime > (rightWin + KTimerAccuracyMicroSeconds + KExtraSlack))
+            {
+            _LIT( KDescription , "Some timer has expired too late");
+            aResult.SetResult(KErrGeneral, KDescription);
+            }
+        delete timers[0].iEResult->iTestResult;
+        delete timers[0].iEResult;
+        delete timers[0].iTimer;
+        timers.Remove(0);
+        }
+    // Case was executed
+    timers.Close();
+    return KErrNone;
+    }
+
+// ======== GLOBAL FUNCTIONS ========
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/testflexperiodic.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,2091 @@
+/*
+* ============================================================================
+*  Name        : testflexperiodic.cpp
+*  Part of     : src / testflextimer
+*  Description : STIF test cases for CFlexPeriodic timer.
+*  Version     : %version: 1 %
+*
+*  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+*  All rights reserved.
+*  This component and the accompanying materials are made available
+*  under the terms of the License "Eclipse Public License v1.0"
+*  which accompanies this distribution, and is available
+*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+*  Initial Contributors:
+*  Nokia Corporation - initial contribution.
+*
+*  Contributors:
+*  Nokia Corporation
+* ============================================================================
+* Template version: 4.1
+*/
+
+#include <e32debug.h>               // for RDebug
+#include <flexperiodic.h>           // for CFlexPeriodic
+#include <stiftesteventinterface.h> // for TEventIf 
+#include "testflextimer.h"          // for global constants
+#include "testflexperiodic.h"
+
+/**
+ *  Timer can be expired 1 sec late
+ *  
+ *  Note! Definition
+ *  
+ *      const TTimeIntervalMicroSeconds32 KTimerResolution( 1000000 );
+ * 
+ * will cause writable static data due non-trivial constructor of 
+ * TTimeIntervalMicroSeconds32.
+ *  
+ */
+const TInt KTimerResolution( 1000000 );
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// Constructor
+// ---------------------------------------------------------------------------
+//
+CTestFlexPeriodic::CTestFlexPeriodic()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CTestFlexPeriodic::~CTestFlexPeriodic()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// _ _ _ ____ _ ___    _    ____ ____ ___  
+// | | | |__| |  |     |    |  | |  | |__] 
+// |_|_| |  | |  |     |___ |__| |__| |    
+//                                         
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// Start scheduler for given time.
+// ---------------------------------------------------------------------------
+//
+void CTestFlexPeriodic::WaitL( TTimeIntervalMicroSeconds32 aPeriod )
+    {
+    CPeriodic* watchdog = CPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( watchdog );
+    watchdog->Start( aPeriod, aPeriod, TCallBack( StopScheduler, NULL ) );
+    
+    // Start scheduler. Wait here until the timer expires and stops the
+    // scheduler.
+    CActiveScheduler::Start();
+    
+    // Clean-up
+    watchdog->Cancel();
+    CleanupStack::PopAndDestroy( watchdog );
+    }
+
+// ---------------------------------------------------------------------------
+// TCallBack function to stop the scheduler.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StopScheduler( TAny* /* aArgument */ )
+    {
+    CActiveScheduler::Stop();
+    return KErrNone;
+    }
+
+
+// ---------------------------------------------------------------------------
+// ____ ____ _    _    ___  ____ ____ _  _ ____ 
+// |    |__| |    |    |__] |__| |    |_/  [__  
+// |___ |  | |___ |___ |__] |  | |___ | \_ ___] 
+//                                              
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// TCallBack function that does nothing. Not ment to be called - just to 
+// fulfill the interface.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::DoNothing( TAny* /* aArgument */ )
+    {
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TCallBack function that panics testcase if it get called.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::PanicClient( TAny* /* aArgument */ )
+    {
+    User::Panic(_L("NotCalled CB got called"), 0xDEAD);
+    return KErrNone;
+    }
+// ---------------------------------------------------------------------------
+// TCallBack function for adding time stamp to an RArray of TTimes.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::AddTimestamp( TAny* aArgument )
+    {
+    __ASSERT_ALWAYS(
+        aArgument != NULL,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    //RDebug::Print( _L("CTestFlexPeriodic::AddTimestamp()") );
+    
+    RArray<TTime>* times =  reinterpret_cast<RArray<TTime>*>( aArgument );
+
+    TTime now;
+    now.UniversalTime();
+
+    TInt err = times->Append( now ); // Data is copied by RArray
+    __ASSERT_ALWAYS(
+        err == KErrNone,
+        User::Panic( KTestFlexTimerPanicCategory, err ) );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TCallBack function for restarting CFlexPeriodic timer.
+// Action depends the value of iFirstTicksLeft;
+// >0 -- Add timestamp to iFirstTimestamps 
+// <0 -- Add timestamp to iSecondTimestamps
+// =0 -- Add timestamp to iFirstTimestamps AND iSecondTimestamps AND restart
+//       the timer with iSecondInterval
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::RestartTimer( TAny* aArgument )
+    {
+    __ASSERT_ALWAYS(
+        aArgument != NULL,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    TRestartInfo* info =  reinterpret_cast<TRestartInfo*>( aArgument );
+
+    __ASSERT_ALWAYS(
+        info->iTimer != NULL && 
+        info->iFirstTimestamps != NULL && 
+        info->iSecondTimestamps != NULL,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+    
+    // Add current time to timestamps
+    // Data is copied by RArray - no need to use heap
+    TTime now;
+    now.UniversalTime();
+    
+    TInt ticks( info->iFirstTicksLeft-- ); // Update the ticks
+    TInt err( KErrNone );
+    if ( ticks > 0 )
+        {
+        err = info->iFirstTimestamps->Append( now );
+        }
+    else if ( ticks < 0 )
+        {
+        err = info->iSecondTimestamps->Append( now );
+        }
+    else // ticks == 0
+        {
+        // Set the timestamps.
+        // 1st timer settings expiration time is the starting time of the
+        // second timer settings. Add timestamp to both arrays.
+        err = info->iFirstTimestamps->Append( now );
+        __ASSERT_ALWAYS(
+            err == KErrNone,
+            User::Panic( KTestFlexTimerPanicCategory, err ) );
+        err = info->iSecondTimestamps->Append( now );
+
+        // Restart the timer
+        info->iTimer->Cancel();
+        info->iTimer->Start(
+            info->iSecondInterval,
+            info->iSecondInterval, 
+            TCallBack( RestartTimer, info ) );
+        }
+    __ASSERT_ALWAYS(
+        err == KErrNone,
+        User::Panic( KTestFlexTimerPanicCategory, err ) );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TCallBack function for trying to configure timer in callback.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureTimer( TAny* aArgument )
+    {
+    __ASSERT_ALWAYS(
+        aArgument != NULL,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    TConfigureInfo* info =  reinterpret_cast<TConfigureInfo*>( aArgument );
+
+    const TTimeIntervalMicroSeconds32 delayWindow32( info->iDelayWindow );
+    const TTimeIntervalMicroSeconds32 intervalWindow32( info->iIntervalWindow );
+
+    const TTimeIntervalMicroSeconds delayWindow64( info->iDelayWindow );
+    const TTimeIntervalMicroSeconds intervalWindow64( info->iIntervalWindow );
+
+    info->iConfigResult32 = info->iTimer->Configure( delayWindow32,
+                                                     intervalWindow32);
+
+    info->iConfigResult64 = info->iTimer->Configure( delayWindow64,
+                                                     intervalWindow64);
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TCallBack function for starting a flexible periodic timer.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartTimer( TAny* aArgument )
+    {
+    __ASSERT_ALWAYS(
+        aArgument != NULL,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    const TTimeIntervalMicroSeconds32 KTimerDelay( 2000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 2000000 );
+
+    CFlexPeriodic* timer =  reinterpret_cast<CFlexPeriodic*>( aArgument );
+
+    timer->Start(
+        KTimerDelay,
+        KTimerInterval,
+        TCallBack( StartTimer, timer )
+        );
+
+    return KErrNone;
+    }
+
+
+
+// ---------------------------------------------------------------------------
+// ___ _ _  _ ____ ____ ___ ____ _  _ ___     ____ _  _ _  _ ____ . ____ 
+//  |  | |\/| |___ [__   |  |__| |\/| |__]    |___ |  | |\ | |    ' [__  
+//  |  | |  | |___ ___]  |  |  | |  | |       |    |__| | \| |___   ___] 
+//
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// Verify that the timestamps are expired at window.
+//
+// Note that the timer resolution is 1 sec, so, the actual expiration time can
+// be later than set.
+// ---------------------------------------------------------------------------
+//
+TBool CTestFlexPeriodic::AreTimestampsAtWindow( 
+    const RArray<TTime>& aTimestamps,
+    const TTimeIntervalMicroSeconds32& aDelay,
+    const TTimeIntervalMicroSeconds32& aInterval,
+    const TTimeIntervalMicroSeconds32& aDelayWindow,
+    const TTimeIntervalMicroSeconds32& aIntervalWindow )
+    {
+    __ASSERT_ALWAYS(
+        aTimestamps.Count() >= 2 && 
+        aDelay.Int() >= 0 &&
+        aInterval.Int() >= 0 &&
+        aDelayWindow.Int() >= 0 &&
+        aIntervalWindow.Int() >= 0,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    // Timestamps are correct unless proved otherwise 
+    TBool ret = ETrue;
+
+    // For the 1st expiration is delay
+    TTimeIntervalMicroSeconds delay;
+    delay = aTimestamps[1].MicroSecondsFrom( aTimestamps[0] );
+    RDebug::Print( _L("Timer delay %Ld"), delay.Int64() );
+
+    if ( delay < aDelay.Int() - aDelayWindow.Int() || 
+         delay > aDelay.Int() + KTimerResolution )
+        {
+        ret = EFalse;
+        }
+
+    // The rest of the expirations are intervals
+    for ( TInt i( 2 ); i < aTimestamps.Count(); ++i )
+        {
+        TTimeIntervalMicroSeconds interval;
+        interval = aTimestamps[i].MicroSecondsFrom( aTimestamps[i-1] );
+        RDebug::Print( _L("Timer interval %Ld"), interval.Int64() );
+
+        if ( interval < aInterval.Int() - aIntervalWindow.Int() || 
+             interval > aInterval.Int() + KTimerResolution )
+            {
+            ret = EFalse;
+            }
+        }
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Convert the intervals from 64 bit to 32 bit and call 32 bit checking 
+// function.
+// ---------------------------------------------------------------------------
+//
+TBool CTestFlexPeriodic::AreTimestampsAtWindow( 
+    const RArray<TTime>& aTimestamps,
+    const TTimeIntervalMicroSeconds& aDelay,
+    const TTimeIntervalMicroSeconds& aInterval,
+    const TTimeIntervalMicroSeconds& aDelayWindow,
+    const TTimeIntervalMicroSeconds& aIntervalWindow )
+    {
+    __ASSERT_ALWAYS(
+        I64HIGH( aDelay.Int64() ) == 0 &&
+        I64HIGH( aInterval.Int64() ) == 0 &&
+        I64HIGH( aDelayWindow.Int64() ) == 0 &&
+        I64HIGH( aIntervalWindow.Int64() ) == 0,
+        User::Panic( KTestFlexTimerPanicCategory, KErrArgument ) );
+
+    TTimeIntervalMicroSeconds32 delay( I64INT( aDelay.Int64() ) );
+    TTimeIntervalMicroSeconds32 interval( I64INT( aInterval.Int64() ) );
+    TTimeIntervalMicroSeconds32 delayWindow( I64INT( aDelayWindow.Int64() ) );
+    TTimeIntervalMicroSeconds32 intervalWindow( I64INT( aIntervalWindow.Int64() ) );
+
+    return AreTimestampsAtWindow( aTimestamps, 
+                                  delay,
+                                  interval,
+                                  delayWindow,
+                                  intervalWindow );
+    }
+
+// ---------------------------------------------------------------------------
+// Compare are timestamp arrays same
+// ---------------------------------------------------------------------------
+//
+TBool CTestFlexPeriodic::AreTimestampsSame(
+    const RArray<TTime>& aLeft,
+    const RArray<TTime>& aRight )
+    {
+    TBool ret( ETrue );
+    if ( aLeft.Count() == aRight.Count() )
+        {
+        for ( TInt i( 0 ); i < aLeft.Count(); ++i )
+            {
+            if ( aLeft[i] != aRight[i] )
+                { // Different timestamp has been found
+                ret = EFalse;
+                break;
+                }
+            }
+        }
+    else
+        { // Arrays has different number of timestamps.
+        ret = EFalse;
+        }
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// ___ ____ _  _ ___  _    ____ ___ ____    ____ _  _ _  _ ____ . ____ 
+//  |  |___ |\/| |__] |    |__|  |  |___    |___ |  | |\ | |    ' [__  
+//  |  |___ |  | |    |___ |  |  |  |___    |    |__| | \| |___   ___] 
+//
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// Configure window sizes - template function
+// 
+// Timers are designed so that the 1st timer will test that the delay is
+// correct and the 2nd timer will test that the interval is correct
+// ---------------------------------------------------------------------------
+template <class firstType, class secondType>
+TInt CTestFlexPeriodic::ConfigureWindowL( TTestResult& aResult )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const firstType KFirstDelay( 3000000 );             // 3 sec
+    const firstType KFirstInterval( 2000000 );          // 2 sec
+    const firstType KFirstDelayWindow( 0 );             // no window
+    const firstType KFirstIntervalWindow( 1500000 );    // 1.5 sec
+
+    const secondType KSecondDelay( 3500000 );           // 3.5 sec
+    const secondType KSecondInterval( 1000000 );        // 1 sec
+    const secondType KSecondDelayWindow( 1500000 );     // 1.5 sec
+    const secondType KSecondIntervalWindow( 0 );        // no window
+
+    const TUint KTestRunTime( 10000000 ); // 10 sec
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Create, configure and start the flexible periodic timer
+    RArray<TTime> firstTimestamps;
+    CFlexPeriodic* firstTimer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( firstTimer );
+    firstTimer->Configure( KFirstDelayWindow, KFirstIntervalWindow );
+    firstTimer->Start( 
+        KFirstDelay, 
+        KFirstInterval, 
+        TCallBack( AddTimestamp, &firstTimestamps ) );
+
+    RArray<TTime> secondTimestamps;
+    CFlexPeriodic* secondTimer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( secondTimer );
+    secondTimer->Configure( KSecondDelayWindow, KSecondIntervalWindow );
+    secondTimer->Start( 
+        KSecondDelay, 
+        KSecondInterval,
+        TCallBack( AddTimestamp, &secondTimestamps ) );
+
+    // Initialize timer expiration time array with starting time to 
+    // ease analysing of data.
+    TTime startTime;
+    startTime.UniversalTime();
+    firstTimestamps.Append( startTime );
+    secondTimestamps.Append( startTime );
+
+    // The execution will be pending here while active scheduler is running...
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Analyze results
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    // Check the 1st timer expiration time
+    if ( !AreTimestampsAtWindow( 
+            firstTimestamps, 
+            KFirstDelay, 
+            KFirstInterval, 
+            KFirstDelayWindow, 
+            KFirstIntervalWindow ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. First timer not in window.") );
+        }
+
+    // Check the 2nd timer expiration time
+    else if ( !AreTimestampsAtWindow( 
+            secondTimestamps, 
+            KSecondDelay, 
+            KSecondInterval, 
+            KSecondDelayWindow, 
+            KSecondIntervalWindow ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Second timer not in window.") );
+        }
+    
+    // Check that both timers are expired at the same time
+    else if ( !AreTimestampsSame( firstTimestamps, secondTimestamps ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Timers are not expired at the same time.") );
+        }
+
+    // Clean up
+    secondTimer->Cancel();
+    secondTimestamps.Close();
+    CleanupStack::PopAndDestroy( secondTimer );
+
+    firstTimer->Cancel();
+    firstTimestamps.Close();
+    CleanupStack::PopAndDestroy( firstTimer );
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// Configure window sizes and start timer with given values - template 
+// function
+// ---------------------------------------------------------------------------
+template <class configureType, class startType>
+void CTestFlexPeriodic::ConfigureAndStartTimerL( 
+    RArray<TTime>& aTimestamps,
+    TInt64 aDelay,
+    TInt64 aInterval,
+    TInt64 aDelayWindow,
+    TInt64 aIntervalWindow )
+    {
+    const startType KDelay( aDelay );
+    const startType KInterval( aInterval );
+    const configureType KDelayWindow( aDelayWindow );
+    const configureType KIntervalWindow( aIntervalWindow );
+
+    const TUint KTestRunTime( 3000000 );
+
+    TTime now;
+    now.UniversalTime();
+    aTimestamps.Append( now );
+
+    // Create and start the flexible periodic timer
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Configure( KDelayWindow, KIntervalWindow );
+    timer->Start( KDelay, KInterval, TCallBack( AddTimestamp, &aTimestamps ) );
+    
+    // The execution will be pending here while active scheduler is running...
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Clean up
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with NULL callback 
+// ---------------------------------------------------------------------------
+//
+template<class startType>
+TInt CTestFlexPeriodic::StartWithNullCallBackL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const startType KTimerDelay( 1000000 );
+    const startType KTimerInterval( 1000000 );
+
+    TInt(* nullCallback)(TAny*) = NULL;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   31 (EFlexPeriodicCallbackFunctionIsNull)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 31 );
+    
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( nullCallback, NULL ) );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// Panic thread after a few seconds
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::DoPanicL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds32 KTimerDelay( 1000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 1000000 );
+    const TTimeIntervalMicroSeconds32 KTestRunTime( 3000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( DoNothing, NULL ) );
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    User::Panic(_L("Die die die!"), 0xDEAD);
+
+    // We should NEVER be here...
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// ____ _  _ _  _    _ _  _    ___ _  _ ____ ____ ____ ___  
+// |__/ |  | |\ |    | |\ |     |  |__| |__/ |___ |__| |  \ 
+// |  \ |__| | \|    | | \|     |  |  | |  \ |___ |  | |__/ 
+//
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// Run test case in own thread
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::RunInThread( 
+    RThread& aThread, 
+    TTestCaseArguments& aArguments )
+    {
+    // RThread::Create() parameters
+    const TInt stackSize = 1024;
+    const TInt heapMinSize = 1024;
+    const TInt heapMaxSize = 1024;
+
+    TBuf<8> processName;
+    processName.Format( _L("%x"), &aArguments.iResult );
+    
+    // Create the thread
+    TInt ret = aThread.Create(
+        processName,
+        RunTestCase, 
+        stackSize,
+        heapMinSize,
+        heapMaxSize,
+        &aArguments,
+        EOwnerProcess );
+
+    // Start execution of the thread
+    aThread.Resume();
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Create cleanup stack
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::RunTestCase( TAny* aArgument )
+    {
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Out of memory assert
+    __ASSERT_ALWAYS(
+        cleanup != NULL, 
+        User::Panic( KTestFlexTimerPanicCategory, KErrNoMemory ) );
+    
+    TRAPD( err, CTestFlexPeriodic::RunTestCaseL( aArgument ) );
+
+    delete cleanup;
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// Create scheduler and run the test case
+// ---------------------------------------------------------------------------
+//
+void CTestFlexPeriodic::RunTestCaseL( TAny* aArgument )
+    {
+    // Create and install active scheduler
+    CActiveScheduler* scheduler = scheduler = new (ELeave) CActiveScheduler;
+    CleanupStack::PushL( scheduler );
+    CActiveScheduler::Install( scheduler );
+    
+    // Parse the arguments
+    TTestCaseArguments* args = reinterpret_cast<TTestCaseArguments*>( aArgument );
+    
+    // Call the function pointer with given arguments
+    TInt ret = (*(args->iTestFunction))(args->iResult, args->iCallback );
+    User::LeaveIfError( ret );
+
+    // Clean up
+    CleanupStack::PopAndDestroy( scheduler );
+    }
+
+// ---------------------------------------------------------------------------
+// ___ ____ ____ ___    ____ ____ ____ ____ ____ 
+//  |  |___ [__   |     |    |__| [__  |___ [__  
+//  |  |___ ___]  |     |___ |  | ___] |___ ___] 
+//
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start one CFlexPeriodic and wait for few expirations.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartOneTimerL( 
+        TTestResult& aResult, 
+        CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds32 KTickInterval( 1000000 ); // 1 sec
+    const TUint KTestRunTime( 5000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Storage for flexible periodic timer timestamps
+    RArray<TTime> timestamps;
+
+    // Create and start the flexible periodic timer
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Start( 
+        KTickInterval, 
+        KTickInterval, 
+        TCallBack( AddTimestamp, &timestamps ) );
+
+    // Initialize timer expiration time array with starting time to 
+    // ease analysing of data.
+    TTime startTime;
+    startTime.UniversalTime();
+    timestamps.Append( startTime );
+    
+    // The execution will be pending here while active scheduler is running...
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Analyze results
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    // Only start time in timestamp array
+    if ( timestamps.Count() == 1 )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. No timer expired.") );
+        }
+
+    // Check that the timers are expired at maximum delay due there are only
+    // one timer, so, no alignment can be happened.
+    if ( !AreTimestampsAtWindow( timestamps, KTickInterval, KTickInterval, 0, 0 ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Timer not in maximum window.") );
+        }
+
+    // Clean up
+    timer->Cancel();
+    timestamps.Close();
+    CleanupStack::PopAndDestroy( timer );
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start one CFlexPeriodic and wait for few expirations.
+// Give also Error callback function.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartOneTimerWithErrorCbL( 
+        TTestResult& aResult, 
+        CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds32 KTickInterval( 1000000 ); // 1 sec
+    const TUint KTestRunTime( 5000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Storage for flexible periodic timer timestamps
+    RArray<TTime> timestamps;
+
+    // Create and start the flexible periodic timer
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Start( 
+        KTickInterval, 
+        KTickInterval, 
+        TCallBack( AddTimestamp, &timestamps ),
+        TCallBack( PanicClient, NULL ) );
+
+    // Initialize timer expiration time array with starting time to 
+    // ease analysing of data.
+    TTime startTime;
+    startTime.UniversalTime();
+    timestamps.Append( startTime );
+    
+    // The execution will be pending here while active scheduler is running...
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Analyze results
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    // Only start time in timestamp array
+    if ( timestamps.Count() == 1 )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. No timer expired.") );
+        }
+
+    // Check that the timers are expired at maximum delay due there are only
+    // one timer, so, no alignment can be happened.
+    if ( !AreTimestampsAtWindow( timestamps, KTickInterval, KTickInterval, 0, 0 ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Timer not in maximum window.") );
+        }
+
+    // Clean up
+    timer->Cancel();
+    timestamps.Close();
+    CleanupStack::PopAndDestroy( timer );
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start one CFlexPeriodic, cancel it and restart it in callback
+// function.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::CallbackRestartL( 
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds KTickInterval( 1000000 ); // 1 sec
+    const TTimeIntervalMicroSeconds KTick2ndInterval( 2000000 ); // 2 sec
+    const TUint KTestRunTime( 10000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    RArray<TTime> firstTimestamps;
+    RArray<TTime> secondTimestamps;
+
+    TRestartInfo info;
+    info.iTimer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    info.iFirstTicksLeft = 1;
+    info.iFirstTimestamps = &firstTimestamps;
+    info.iSecondTimestamps = &secondTimestamps;
+    info.iSecondInterval = KTick2ndInterval;
+
+    // Create and start the flexible periodic timer
+    CleanupStack::PushL( info.iTimer );
+    info.iTimer->Start( 
+        KTickInterval, 
+        KTickInterval, 
+        TCallBack( RestartTimer, &info ) );
+
+    // Initialize timer expiration time array with starting time to 
+    // ease analysing of data.
+    TTime startTime;
+    startTime.UniversalTime();
+    firstTimestamps.Append( startTime );
+    
+    // The execution will be pending here while active scheduler is running...
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Analyze results
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    // Check the 1st timer expiration time
+    if ( !AreTimestampsAtWindow( firstTimestamps, KTickInterval, KTickInterval, 0, 0 ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Pre-reset timer not in maximum window.") );
+        }
+    
+    // Check the rest of timers
+    else if ( !AreTimestampsAtWindow( secondTimestamps, KTick2ndInterval, KTick2ndInterval, 0, 0 ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Post-reset timer not in maximum window.") );
+        }
+    
+    // Clean up
+    info.iTimer->Cancel();
+    firstTimestamps.Close();
+    secondTimestamps.Close();
+    CleanupStack::PopAndDestroy( info.iTimer );
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure window sizes - 32 bit
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWindow32L( 
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    return ConfigureWindowL<TTimeIntervalMicroSeconds32,TTimeIntervalMicroSeconds32>( aResult );
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure window sizes - 64 bit
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWindow64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    return ConfigureWindowL<TTimeIntervalMicroSeconds,TTimeIntervalMicroSeconds>( aResult );
+    }
+
+// ---------------------------------------------------------------------------
+// OK TEST CASE: Configure window sizes - mixed 32 bit and 64 bit
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWindowMixL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    return ConfigureWindowL<TTimeIntervalMicroSeconds32,TTimeIntervalMicroSeconds>( aResult );
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure after timer has started 
+// The test case is divided into following parts:
+// 1) Remove slack from the heartbeat to make it sure that timer's default
+//    windows does not cause the drifting of the timer.
+// 2) Start timer, try to configure it, verify that configure has not been
+//    changed (no alignment should be made by heartbeat)
+// 3) Cancel the timer and start it with a callback that tries to configure
+//    it while in callback, check the results
+// 4) Verify that the configuration stil works by happened timer alignment
+//    by the heartbeat
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureAfterStartL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    
+    // Heartbeat timer
+    // Use 1us to adjust the engine's timer. 0 returns immediately.
+    const TTimeIntervalMicroSeconds32 KHeartbeatDelay( 1 );
+    const TTimeIntervalMicroSeconds32 KHeartbeatInterval( 1000000 );
+    const TTimeIntervalMicroSeconds32 KHeartbeatDelayWindow( 0 );
+    const TTimeIntervalMicroSeconds32 KHeartbeatIntervalWindow( 0 );
+
+    // Timer under test
+    const TTimeIntervalMicroSeconds32 KTimerDelayNow( 0 );
+    const TTimeIntervalMicroSeconds32 KTimerDelay( 2000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 2000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInitialDelayWindow( 0 );
+    const TTimeIntervalMicroSeconds32 KTimerInitialIntervalWindow( 0 );
+
+    const TTimeIntervalMicroSeconds32 KTimerDelayWindow32( 1500000 );
+    const TTimeIntervalMicroSeconds32 KTimerIntervalWindow32( 1500000 );
+
+    const TTimeIntervalMicroSeconds KTimerDelayWindow64( 1500000 );
+    const TTimeIntervalMicroSeconds KTimerIntervalWindow64( 1500000 );
+    
+    const TUint KConfigNokTestRunTime( 7000000 );
+    const TUint KTestCbConfigRunTime( KHeartbeatInterval.Int() );
+    const TUint KConfigOkTestRunTime( 4000000 );
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Create, configure and initialize and start the heartbeat
+    // This timer is used for checking that the timer under test is reacting
+    // correctly to configurations.
+    RArray<TTime> heartbeatTimes;
+    CFlexPeriodic* heartbeat = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( heartbeat );
+    heartbeat->Configure( KHeartbeatDelayWindow, KHeartbeatIntervalWindow );
+    heartbeat->Start( 
+        KHeartbeatDelay, 
+        KHeartbeatInterval, 
+        TCallBack( AddTimestamp, &heartbeatTimes ) );
+
+    // Remove the slack from timer start up -- wait till next second
+    const TInt64 KSecondInMicroSeconds( 1000000 );
+    TTime now;
+    now.UniversalTime();
+    heartbeatTimes.Append( now );
+    TUint slack( I64LOW( KSecondInMicroSeconds - now.Int64() % KSecondInMicroSeconds ) );
+
+                     //    //  ___     _____
+    WaitL( slack ); // // // //_ // //  //
+                   //_//_// //  // //  //
+
+    // Create and start the flexible periodic timer
+    RArray<TTime> timestamps;
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+    timer->Configure( KTimerInitialDelayWindow, KTimerInitialIntervalWindow );
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( AddTimestamp, &timestamps ) );
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    if ( timer->Configure( KTimerDelayWindow32, KTimerIntervalWindow32 ) != KErrInUse )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. 32 bit configure didn't return KErrInUse") );
+        }
+    else if ( timer->Configure( KTimerDelayWindow64, KTimerIntervalWindow64 ) != KErrInUse )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. 64 bit configure didn't return KErrInUse") );
+        }
+
+    // Initialize timer expiration time array with starting time to 
+    // ease analysing of data.
+    now.UniversalTime();
+    timestamps.Append( now );
+                                     //    //  ___     _____
+    WaitL( KConfigNokTestRunTime ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    // Check the 1st timer expiration time
+    RDebug::Print( _L("Timer:") );
+    if ( !AreTimestampsAtWindow( 
+            timestamps, 
+            KTimerDelay,
+            KTimerInterval,
+            KTimerInitialDelayWindow,
+            KTimerInitialIntervalWindow ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Configuration changed after start. ") );
+        }
+
+    // Restart the timer to try configuration while callback
+    timer->Cancel();
+
+    TConfigureInfo configInfo;
+    configInfo.iTimer = timer;
+    configInfo.iDelayWindow = KTimerDelayWindow32.Int();
+    configInfo.iIntervalWindow = KTimerIntervalWindow32.Int();
+    configInfo.iConfigResult32 = 0xDEADBEEF; // Initialize result
+    configInfo.iConfigResult64 = 0xDEADBEEF; // Initialize result
+
+    timer->Start(
+        KTimerDelayNow, 
+        KTimerInterval, 
+        TCallBack( ConfigureTimer, &configInfo ) );
+
+                                    //    //  ___     _____
+    WaitL( KTestCbConfigRunTime ); // // // //_ // //  //
+                                  //_//_// //  // //  //
+
+    timer->Cancel();
+
+    RDebug::Print( _L("configInfo.iConfigResult32=%d (0x%x)"), configInfo.iConfigResult32, configInfo.iConfigResult32 );
+    RDebug::Print( _L("configInfo.iConfigResult64=%d (0x%x)"), configInfo.iConfigResult64, configInfo.iConfigResult64 );
+
+    // Analyze the results
+    if ( configInfo.iConfigResult32 != KErrInUse )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. 32 bit configure in callback didn't return KErrInUse") );
+        }
+    else if ( configInfo.iConfigResult64 != KErrInUse )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. 64 bit configure in callback didn't return KErrInUse") );
+        }
+
+    // Test that the configuration still works
+    RArray<TTime> secondTimestamps;
+    now.UniversalTime();
+    secondTimestamps.Append( now );
+
+    if ( timer->Configure( KTimerDelayWindow32, KTimerIntervalWindow32 ) != KErrNone )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Configure failed.") );
+        }
+    else
+        {
+        timer->Start(
+            KTimerDelay,
+            KTimerInterval,
+            TCallBack( AddTimestamp, &secondTimestamps ));
+
+                                        //    //  ___     _____
+        WaitL( KConfigOkTestRunTime ); // // // //_ // //  //
+                                      //_//_// //  // //  //
+
+        // Check timestamps, they should be the same as heartbeat
+        RDebug::Print( _L("secondTimestamps:") );
+        if ( !AreTimestampsAtWindow( 
+                secondTimestamps, 
+                KHeartbeatInterval, // Heartbeat was running already 
+                KHeartbeatInterval,
+                KHeartbeatInterval, // There can be adjustement with 1st expiration 
+                0 ) )
+            {
+            aResult.SetResult( 
+                KErrGeneral, 
+                _L("Test case failed. Configure does not work.") );
+            }
+        }
+
+    RDebug::Print( _L("Heartbeat:") );
+    if ( !AreTimestampsAtWindow( 
+            heartbeatTimes, 
+            KHeartbeatDelay,
+            KHeartbeatInterval,
+            KHeartbeatDelayWindow,
+            KHeartbeatIntervalWindow ) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Heartbeat failure.") );
+        }
+
+    // Clean up
+    timestamps.Close();
+    secondTimestamps.Close();
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+
+    heartbeatTimes.Close();
+    heartbeat->Cancel();
+    CleanupStack::PopAndDestroy( heartbeat );
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a running timer again.
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartAfterStartL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds32 KTimerDelay( 2000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 2000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+
+    // This start should work...
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( DoNothing, NULL ) );
+
+    // ... and next start should panic with
+    // Panic category: "E32USER-CBase"
+    // Panic reason:   42 (attempt to active CActive when a request is still 
+    //                     outstanding)
+    
+    // Set panic code 42 to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        42 );
+
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( DoNothing, NULL ) );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    // Clean up
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+
+    __UHEAP_MARKEND;    
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a running timer again in callback function
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartInCallbackL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    // Constants
+    const TTimeIntervalMicroSeconds32 KTimerDelay( 1000000 );
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 1000000 );
+    const TTimeIntervalMicroSeconds32 KTestRunTime( 3000000 );
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    CFlexPeriodic* timer = CFlexPeriodic::NewL( CActive::EPriorityStandard );
+    CleanupStack::PushL( timer );
+
+    // The callback should panic with
+    // Panic category: "E32USER-CBase"
+    // Panic reason:   42 (attempt to active CActive when a request is still 
+    //                     outstanding)
+    
+    // Set panic code 42 to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        42 );
+
+    timer->Start( 
+        KTimerDelay, 
+        KTimerInterval, 
+        TCallBack( StartTimer, timer ) );
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    // Clean up
+    timer->Cancel();
+    CleanupStack::PopAndDestroy( timer );
+
+    __UHEAP_MARKEND;    
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with negative delay, 32 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNegativeDelay32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+
+    RArray<TTime> timestamps;
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   6 (EFlexPeriodicDelayLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 6 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with zero interval, 32 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithZeroInterval32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( 0 );
+
+    RArray<TTime> timestamps;
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   7 (EFlexPeriodicIntervalTooSmall)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 7 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with negative interval, 32 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNegativeInterval32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+
+    RArray<TTime> timestamps;
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   7 (EFlexPeriodicIntervalTooSmall)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 7 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with negative delay, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNegativeDelay64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   6 (EFlexPeriodicDelayLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 6 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with zero interval, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithZeroInterval64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( 0 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   7 (EFlexPeriodicIntervalTooSmall)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 7 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with negative interval, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNegativeInterval64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   7 (EFlexPeriodicIntervalTooSmall)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 7 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure timer with negative delay window, 32 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   8 (EFlexPeriodicDelayWindowLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 8 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KAllowedValue,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure timer with negative interval window, 32 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   9 (EFlexPeriodicIntervalWindowLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 9 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KAllowedValue,
+        KAllowedValue,
+        KAllowedValue,
+        KIllegalValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure timer with negative delay window, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   8 (EFlexPeriodicDelayWindowLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 8 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KAllowedValue,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure timer with negative interval window, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt KIllegalValue( -1 );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   9 (EFlexPeriodicIntervalWindowLessThanZero)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 9 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KAllowedValue,
+        KAllowedValue,
+        KAllowedValue,
+        KIllegalValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start with minimum and maximum values
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithMinAndMaxL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KMinimumDelayValue( 0 );
+    const TInt KMinimumIntervalValue( 1 );
+    const TInt KNormalValue( 1000000 );
+    const TInt KMaximum32BitValue( 0x7FFFFFFF );
+
+//    const TInt64 KLarge64BitValue( 0x6FFFFFFFFFFFFFFF );  // Should not panic (till few years)
+
+    // Years * Days * Hours * Minutes * Seconds * Microseconds
+    const TInt64 KLarge64BitValue( ((TInt64)(1)) * 365 * 24 * 60 * 60 * 1000000 );
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    RArray<TTime> timestamps;
+
+    TTime now;
+    now.UniversalTime();
+
+    // > DEBUG
+    TTimeIntervalMicroSeconds longLongInterval( KLarge64BitValue );
+    now += longLongInterval;
+    TDateTime date;
+    date = now.DateTime();
+    // < DEBUG
+
+    // Start with min delay, 32 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KMinimumDelayValue,
+        KNormalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds32( KMinimumDelayValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 32 bit min delay failed") );
+        }
+    timestamps.Reset();
+
+    // Start with max delay, 32 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KMaximum32BitValue,
+        KNormalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    // Only one timestamp (the start time) is allowed
+    if ( timestamps.Count() > 1 )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 32 bit max delay failed") );
+        }
+    timestamps.Reset();
+
+    // Start with min interval, 32 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KNormalValue,
+        KMinimumIntervalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KMinimumIntervalValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 32 bit min interval failed") );
+        }
+    timestamps.Reset();
+
+    // Start with max interval, 32 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds32, TTimeIntervalMicroSeconds32>(
+        timestamps,
+        KNormalValue,
+        KMaximum32BitValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KMaximum32BitValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ),
+            TTimeIntervalMicroSeconds32( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 32 bit min interval failed") );
+        }
+    timestamps.Reset();
+
+    // Start with min delay, 64 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KMinimumDelayValue,
+        KNormalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds( KMinimumDelayValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 64 bit min delay failed") );
+        }
+    timestamps.Reset();
+
+    // Start with large delay, 64 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KLarge64BitValue,
+        KNormalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    // Only one timestamp (the start time) is allowed
+    if ( timestamps.Count() > 1 )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 64 bit max delay failed") );
+        }
+    timestamps.Reset();
+
+    // Start with min interval, 64 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KNormalValue,
+        KMinimumIntervalValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KMinimumIntervalValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 64 bit min interval failed") );
+        }
+    timestamps.Reset();
+
+    // Start with large interval, 64 bit
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KNormalValue,
+        KLarge64BitValue,
+        KNormalValue,
+        KNormalValue );
+    // Validate results
+    // AreTimestampsAtWindow() does not accept values over 0xFFFFFFFF.
+    // However, this is not a problem due there should be only the timestamps
+    // of start time and delay expiration; 32 bit value can be used instead of
+    // the real interval.
+    if ( !AreTimestampsAtWindow(
+            timestamps,
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KMaximum32BitValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ),
+            TTimeIntervalMicroSeconds( KNormalValue ) ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. 64 bit max interval failed") );
+        }
+    timestamps.Reset();
+
+    // If test execution is here, we'll passed
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    // Clean up
+    timestamps.Close();
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with maximum delay, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithMaximumDelay64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt64 KIllegalValue( 0x7FFFFFFFFFFFFFFF );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   24 (EFlexTimerServerIllegalTimerValue)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 24 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with maximum interval, 64 bit interface
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithMaximumInterval64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback  )
+    {
+    __UHEAP_MARK;
+
+    const TInt KAllowedValue( 1 );
+    const TInt64 KIllegalValue( 0x7FFFFFFFFFFFFFFF );
+    
+    RArray<TTime> timestamps;
+    
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // ConfigureAndStartTimerL should panic:
+    //  Category: "CFlexPeriodic" 
+    //  Reason:   24 (EFlexTimerServerIllegalTimerValue)
+    // Set the panic code to acceptable exit reason
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::EPanic, 24 );
+
+    ConfigureAndStartTimerL<TTimeIntervalMicroSeconds, TTimeIntervalMicroSeconds>(
+        timestamps,
+        KAllowedValue,
+        KIllegalValue,
+        KAllowedValue,
+        KAllowedValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( CTestModuleIf::ENormal, KErrNone );
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    // Clean up
+    timestamps.Close();
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with NULL callback (32 bit)
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNullCallBack32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    return StartWithNullCallBackL<TTimeIntervalMicroSeconds32>( aResult, aCallback );
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with NULL callback (64 bit)
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::StartWithNullCallBack64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    return StartWithNullCallBackL<TTimeIntervalMicroSeconds>( aResult, aCallback );
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Client crashes
+// 1) Start two timers in separate threads
+// 2) The 1st timer will panic after a while
+// 3) Check that the 2nd timer is ok -> server works OK
+// ---------------------------------------------------------------------------
+//
+TInt CTestFlexPeriodic::ClientCrashL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    __UHEAP_MARK;
+
+    // Must be bigger than ClientCrashL and StartOneTimerL
+    const TTimeIntervalMicroSeconds32 KTestRunTime( 6000000 );
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Start test case ClientCrashL
+    RThread threadA;
+    TTestResult resultA;
+    TTestCaseArguments caseA = { DoPanicL, resultA, aCallback }; 
+    RunInThread( threadA, caseA );
+
+    // Start test case StartOneTimerL
+    RThread threadB;
+    TTestResult resultB;
+    TTestCaseArguments caseB = { StartOneTimerL, resultB, aCallback }; 
+    RunInThread( threadB, caseB );
+
+                            //    //  ___     _____
+    WaitL( KTestRunTime ); // // // //_ // //  //
+                          //_//_// //  // //  //
+
+    // Analyze results
+    aResult.SetResult(KErrNone, _L("Test case passed.") );
+
+    // ClientCrashL should be paniced with reason 0xDEAD
+    if ( threadA.ExitType() != EExitPanic || threadA.ExitReason() != 0xDEAD )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Client did not panic (correctly).") );
+        }
+    // StartOneTimerL should be finished ok
+    else if ( resultB.iResult != KErrNone || threadB.ExitType() == EExitPanic )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Timer failed.") );
+        }
+
+    threadA.Close();
+    threadB.Close();
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/testflextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,745 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* 
+* Description:
+*
+*/
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "TestFlexTimer.h"
+#include "SettingServerClient.h"
+#include "testflexperiodic.h"
+#include "testcflextimer.h"
+#include "testrflextimer.h"
+#include "rflextimerservermonitor.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::CTestFlexTimer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CTestFlexTimer::CTestFlexTimer()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// Note: If OOM test case uses STIF Logger, then STIF Logger must be created
+// with static buffer size parameter (aStaticBufferSize). Otherwise Logger 
+// allocates memory from heap and therefore causes error situations with OOM 
+// testing. For more information about STIF Logger construction, see STIF Users 
+// Guide.
+// -----------------------------------------------------------------------------
+//
+void CTestFlexTimer::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings; 
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        } 
+    // Close Setting server session
+    settingServer.Close();
+    iAddTestCaseTitleToLogName = loggerSettings.iAddTestCaseTitle;
+
+    iStdLog = CStifLogger::NewL( KTestFlexTimerLogPath, 
+                                 KTestFlexTimerLogFile);
+    iLog = iStdLog;
+    
+    iVersionLogged = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestFlexTimer* CTestFlexTimer::NewL()
+    {
+    CTestFlexTimer* self = new (ELeave) CTestFlexTimer;
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CTestFlexTimer::~CTestFlexTimer()
+    { 
+    iLog = NULL;
+    delete iStdLog;
+    iStdLog = NULL;
+    delete iTCLog;
+    iTCLog = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::InitL
+// InitL is used to initialize the Test Module.
+// -----------------------------------------------------------------------------
+//
+TInt CTestFlexTimer::InitL( 
+    TFileName& /*aIniFile*/, 
+    TBool /*aFirstTime*/ )
+    {
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::CreateTitleLoggerL
+// Check for settings and create logger with test case title in file name.
+// -----------------------------------------------------------------------------
+//
+void CTestFlexTimer::CreateTitleLoggerL(void)
+    {
+    //Open new log file with test case title in file name
+    if(iAddTestCaseTitleToLogName)
+        {
+        // Check if there is no test case logger already created.
+        if(iTCLog) 
+            { 
+            delete iTCLog; 
+            iTCLog = NULL; 
+            } 
+            
+        TFileName logFileName;
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        
+        logFileName.Format(KTestFlexTimerLogFileWithTitle, &title);
+
+        iTCLog = CStifLogger::NewL(KTestFlexTimerLogPath, 
+                                 logFileName);
+        iLog = iTCLog; 
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::CreateStdLoggerL
+// Check for logger settings and create standard logger.
+// -----------------------------------------------------------------------------
+//
+void CTestFlexTimer::DeleteTitleLogger(void)
+    {
+    //Delete title logger
+    if(iAddTestCaseTitleToLogName)
+        {
+        iLog = iStdLog;
+        delete iTCLog;
+        iTCLog = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be 
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation. 
+// -----------------------------------------------------------------------------
+//
+TInt CTestFlexTimer::GetTestCasesL( 
+    const TFileName& /*aConfig*/, 
+    RPointerArray<TTestCaseInfo>& aTestCases )
+    {
+    // Loop through all test cases and create new
+    // TTestCaseInfo items and append items to aTestCase array    
+    for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+        {
+        // Allocate new TTestCaseInfo from heap for a testcase definition.
+        TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo();
+    
+        // PushL TTestCaseInfo to CleanupStack.    
+        CleanupStack::PushL( newCase );
+
+        // Set number for the testcase.
+        // When the testcase is run, this comes as a parameter to RunTestCaseL.
+        newCase->iCaseNumber = i;
+
+        // Set title for the test case. This is shown in UI to user.
+        newCase->iTitle.Copy( Case(i).iCaseName );
+
+        // Append TTestCaseInfo to the testcase array. After appended 
+        // successfully the TTestCaseInfo object is owned (and freed) 
+        // by the TestServer. 
+        User::LeaveIfError(aTestCases.Append ( newCase ) );
+        
+        // Pop TTestCaseInfo from the CleanupStack.
+        CleanupStack::Pop( newCase );
+        }
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified 
+// by aTestCase. Test cases that can be run may be requested from 
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt CTestFlexTimer::RunTestCaseL(
+    const TInt aCaseNumber,
+    const TFileName& /*aConfig*/,
+    TTestResult& aResult )
+    {
+    SendTestModuleVersion();
+
+    TInt execStatus = KErrNone;
+
+    // Get the pointer to test case function
+    TCaseInfo tmp = Case( aCaseNumber );
+
+    _LIT( KLogInfo, "Starting testcase [%S]" );
+    iLog->Log( KLogInfo, &tmp.iCaseName);
+
+    // Check that case number was valid
+    if ( tmp.iMethod != NULL )
+        {
+        //Open new log file with test case title in file name
+        CreateTitleLoggerL();
+    
+        // Valid case was found, call it via function pointer
+        iMethod = tmp.iMethod;        
+
+        // Create and install an active scheduler for timers
+        CActiveScheduler* scheduler = new (ELeave) CActiveScheduler;
+        CleanupStack::PushL( scheduler );
+        CActiveScheduler::Install( scheduler );
+        //execStatus  = ( this->*iMethod )( aResult );
+        TRAPD(err, execStatus  = ( *iMethod )( aResult, this ));
+
+        CleanupStack::PopAndDestroy( scheduler );
+
+        // Test case was executed
+        DeleteTitleLogger();
+
+        User::LeaveIfError(err);
+        }
+    else
+        {
+        // Valid case was not found, return error.
+        execStatus = KErrNotFound;
+        }
+
+    // Return case execution status (not the result of the case execution)
+    return execStatus;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::OOMTestQueryL
+// Used to check if a particular test case should be run in OOM conditions and 
+// which memory allocations should fail.    
+//
+// NOTE: This method is virtual and must be implemented only if test case
+// should be executed using OOM conditions.  
+// -----------------------------------------------------------------------------
+//
+TBool CTestFlexTimer::OOMTestQueryL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */, 
+                                TOOMFailureType& /* aFailureType */, 
+                                TInt& /* aFirstMemFailure */, 
+                                TInt& /* aLastMemFailure */ ) 
+    {
+    _LIT( KOOMTestQueryL, "CTestFlexTimer::OOMTestQueryL" );
+    iLog->Log( KOOMTestQueryL ); 
+
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::OOMTestInitializeL
+// Used to perform the test environment setup for a particular OOM test case. 
+// Test Modules may use the initialization file to read parameters for Test 
+// Module initialization but they can also have their own configure file or 
+// some other routine to initialize themselves.  
+//
+// NOTE: This method is virtual and must be implemented only if test case
+// should be executed using OOM conditions.  
+// -----------------------------------------------------------------------------
+//
+void CTestFlexTimer::OOMTestInitializeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::OOMHandleWarningL
+// In some cases the heap memory allocation should be skipped, either due to
+// problems in the OS code or components used by the code being tested, or even 
+// inside the tested components which are implemented this way on purpose (by 
+// design), so it is important to give the tester a way to bypass allocation 
+// failures.
+//
+// NOTE: This method is virtual and must be implemented only if test case
+// should be executed using OOM conditions.  
+// -----------------------------------------------------------------------------
+//
+void CTestFlexTimer::OOMHandleWarningL( 
+                                const TFileName& /* aTestCaseFile */,
+                                const TInt /* aCaseNumber */, 
+                                TInt& /* aFailNextValue */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CTestFlexTimer::OOMTestFinalizeL
+// Used to perform the test environment cleanup for a particular OOM test case.
+//
+// NOTE: This method is virtual and must be implemented only if test case
+// should be executed using OOM conditions.  
+// -----------------------------------------------------------------------------
+//                  
+void CTestFlexTimer::OOMTestFinalizeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+//-----------------------------------------------------------------------------
+// CTemplateScriptTestFlexTimer::SendTestModuleVersion
+// Method used to send version of test module
+//-----------------------------------------------------------------------------
+//
+void CTestFlexTimer::SendTestModuleVersion()
+	{
+	if(iVersionLogged)
+		{
+		return;
+		}
+	
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_MODULE_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_MODULE_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_MODULE_VERSION_BUILD;
+	
+	TFileName moduleName;
+	moduleName = _L("TestFlexTimer.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	iVersionLogged = ETrue;
+	}
+
+// ---------------------------------------------------------------------------
+// This function contains an array of all available test cases 
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+//
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// ---------------------------------------------------------------------------
+//
+const TCaseInfo CTestFlexTimer::Case( const TInt aCaseNumber ) const 
+    {
+    static TCaseInfoInternal const KCases[] =
+        {
+        // To add new test cases, add new items to this array
+        
+        // NOTE: When compiled to GCCE, there must be Classname::
+        // declaration in front of the method name, e.g. 
+        // CDemoModule::PrintTest. Otherwise the compiler
+        // gives errors.
+
+        // Start FlexTimer server monitoring
+        ENTRY( "FlexTimerServer: Start crash monitoring", CTestFlexTimer::StartServerMonitoringL ),
+	    ENTRY( "FlexTimerClient: Change Priority: MuchMore", CTestFlexTimer::SetThreadPriorityMuchMore ),
+        ENTRY( "FlexTimerClient: Change Priority: Normal", CTestFlexTimer::SetThreadPriorityNormal ),
+
+        // CFlexPeriodic tests
+        ENTRY( "CFlexPeriodic: Start one timer", CTestFlexPeriodic::StartOneTimerL ),
+        ENTRY( "CFlexPeriodic: Start one timer with error CB", CTestFlexPeriodic::StartOneTimerWithErrorCbL ),
+        ENTRY( "CFlexPeriodic: Restart timer in callback", CTestFlexPeriodic::CallbackRestartL ),
+        ENTRY( "CFlexPeriodic: 32bit configure", CTestFlexPeriodic::ConfigureWindow32L ),
+        ENTRY( "CFlexPeriodic: 64bit configure", CTestFlexPeriodic::ConfigureWindow64L ),
+        ENTRY( "CFlexPeriodic: Mixed bit configure", CTestFlexPeriodic::ConfigureWindowMixL ),
+        ENTRY( "CFlexPeriodic: Configure after start", CTestFlexPeriodic::ConfigureAfterStartL ),
+        ENTRY( "CFlexPeriodic: Start timer twice", CTestFlexPeriodic::StartAfterStartL ),
+        ENTRY( "CFlexPeriodic: Start timer in callback", CTestFlexPeriodic::StartInCallbackL ),
+        ENTRY( "CFlexPeriodic: Start timer with negative delay (32 bit)", CTestFlexPeriodic::StartWithNegativeDelay32L ),
+        ENTRY( "CFlexPeriodic: Start timer with zero interval (32 bit)", CTestFlexPeriodic::StartWithZeroInterval32L ),
+        ENTRY( "CFlexPeriodic: Start timer with negative interval (32 bit)", CTestFlexPeriodic::StartWithNegativeInterval32L ),
+        ENTRY( "CFlexPeriodic: Start timer with negative delay (64 bit)", CTestFlexPeriodic::StartWithNegativeDelay64L ),
+        ENTRY( "CFlexPeriodic: Start timer with zero interval (64 bit)", CTestFlexPeriodic::StartWithZeroInterval64L ),
+        ENTRY( "CFlexPeriodic: Start timer with negative interval (64 bit)", CTestFlexPeriodic::StartWithNegativeInterval64L ),
+        ENTRY( "CFlexPeriodic: Configure timer with negative delay window (32 bit)", CTestFlexPeriodic::ConfigureWithNegativeDelayWindow32L ),
+        ENTRY( "CFlexPeriodic: Configure timer with negative interval window (32 bit)", CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow32L ),
+        ENTRY( "CFlexPeriodic: Configure timer with negative delay window (64 bit)", CTestFlexPeriodic::ConfigureWithNegativeDelayWindow64L ),
+        ENTRY( "CFlexPeriodic: Configure timer with negative interval window (64 bit)", CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow64L ),
+        ENTRY( "CFlexPeriodic: Start timer with min and max values", CTestFlexPeriodic::StartWithMinAndMaxL ),
+        ENTRY( "CFlexPeriodic: Start timer with maximum delay (64 bit)", CTestFlexPeriodic::StartWithMaximumDelay64L ),
+        ENTRY( "CFlexPeriodic: Start timer with maximum interval (64 bit)", CTestFlexPeriodic::StartWithMaximumInterval64L ),
+        ENTRY( "CFlexPeriodic: Start timer NULL callback function (32 bit)", CTestFlexPeriodic::StartWithNullCallBack32L ),
+        ENTRY( "CFlexPeriodic: Start timer NULL callback function (64 bit)", CTestFlexPeriodic::StartWithNullCallBack64L ),
+        ENTRY( "CFlexPeriodic: Client crash", CTestFlexPeriodic::ClientCrashL ),
+        //CFlexTimer tests
+        ENTRY( "CFlexTimer: Create and destroy a timer - After", CTestCFlexTimer::CreateAndDestroyCFlexTimerL ),
+        ENTRY( "CFlexTimer: Create and expire a timer - After", CTestCFlexTimer::CreateAndExpireCFlexTimerL ),
+        ENTRY( "CFlexTimer: Create two timers and expire those - overlapping - After 32bit", CTestCFlexTimer::CreateAndExpireTwoOverlappingAfterTimersL ),
+        ENTRY( "CFlexTimer: Create two timers and expire those - overlapping - After 64bit", CTestCFlexTimer::CreateAndExpireTwoOverlappingAfterTimers64L ),
+        ENTRY( "CFlexTimer: Create two timers and expire those - non overlapping - After", CTestCFlexTimer::CreateAndExpireTwoNonOverlappingAfterTimersL ),
+        ENTRY( "CFlexTimer: Create zillion timers and expire them at rapid sequence", CTestCFlexTimer::HumongousAmountOfTimeridelidilidousL ),
+        ENTRY( "CFlexTimer: Create overlapping After and At timers and non-overlapping AtUTC", CTestCFlexTimer::CreateAndExpireThreeTimersL ),
+        ENTRY( "CFlexTimer: Start and cancel timers", CTestCFlexTimer::NormalCancelL ),
+        ENTRY( "CFlexTimer: Cancel timer that would have triggered another timer", CTestCFlexTimer::CancelTimerThatWouldHaveTriggeredAnotherTimerL ),
+        ENTRY( "CFlexTimer: Configure 50 pct and 10 pct windows - overlap - 1", CTestCFlexTimer::ConfigureCTimerOverlap1L ),
+        ENTRY( "CFlexTimer: Configure 50 pct and 10 pct windows - overlap - 2", CTestCFlexTimer::ConfigureCTimerOverlap2L ),
+        ENTRY( "CFlexTimer: Configure 0 pct and 100 pct windows - overlap - 3", CTestCFlexTimer::ConfigureCTimerOverlap3L ),
+        ENTRY( "CFlexTimer: Configure 0 pct and 10 pct windows - non-overlap - 1", CTestCFlexTimer::ConfigureCTimerNonOverlap1L ),
+        ENTRY( "CFlexTimer: Configure 50 pct and 50 pct windows - non-overlap - 2", CTestCFlexTimer::ConfigureCTimerNonOverlap2L ),     
+        ENTRY( "CFlexTimer: System Time Changes", CTestCFlexTimer::SystemTimeChangesL ),
+        ENTRY( "CFlexTimer: Time zone changes", CTestCFlexTimer::TimeZoneChangesL ),
+        ENTRY( "CFlexTimer: Dumbass parameters for CFlexTimer", CTestCFlexTimer::DumbAssParametersForCTimerL ),
+        ENTRY( "CFlexTimer: 32bit After called with zero interval", CTestCFlexTimer::DumbAssParametersForCTimerZero32bitL ),
+        ENTRY( "CFlexTimer: 64bit After called with zero interval", CTestCFlexTimer::DumbAssParametersForCTimerZero64bitL ),
+        ENTRY( "CFlexTimer: 64bit After called with max interval", CTestCFlexTimer::DumbAssParametersForCTimer64MaxL ),
+        ENTRY( "CFlexTimer: 64bit After called with three year interval", CTestCFlexTimer::DumbAssParametersForCTimer64ThreeYearsL ),
+        ENTRY( "CFlexTimer: 64bit After called with one year interval", CTestCFlexTimer::DumbAssParametersForCTimer64OneYearL ),
+        ENTRY( "CFlexTimer: After (32bit) called with negative value", CTestCFlexTimer::AfterWithNegativeValueL ),
+        ENTRY( "CFlexTimer: At with current time", CTestCFlexTimer::AtWithCurrentTimeL ),
+        ENTRY( "CFlexTimer: AtUTC with current time", CTestCFlexTimer::AtUTCWithCurrentTimeL ),
+        ENTRY( "CFlexTimer: At with three year timer", CTestCFlexTimer::AtWithThreeYearsL ),
+        ENTRY( "CFlexTimer: At with one year timer", CTestCFlexTimer::AtWithOneYearL ),
+        ENTRY( "CFlexTimer: At() with time in the past", CTestCFlexTimer::AtWithTimeInThePastL ),
+        ENTRY( "CFlexTimer: Cancel timer that is already expired", CTestCFlexTimer::CancelExpiredTimerL ),
+        ENTRY( "CFlexTimer: Left side of the window is in the past", CTestCFlexTimer::ConfigureLeftSideInThePastL ),
+        ENTRY( "CFlexTimer: Left side of the window is in the past", CTestCFlexTimer::ConfigureLeftSideInThePastWindowCheckL ),
+        ENTRY( "CFlexTimer: Configure(32bit) called with negative window size", CTestCFlexTimer::ConfigureWithNegativeWindowSize32L ),
+        ENTRY( "CFlexTimer: Configure(64bit) called with negative window size", CTestCFlexTimer::ConfigureWithNegativeWindowSize64L ),
+        ENTRY( "CFlexTimer: Configure(32bit) called with max positive value", CTestCFlexTimer::ConfigureWithMaxWindow32L ),
+        ENTRY( "CFlexTimer: Configure(64bit) called with three year value", CTestCFlexTimer::ConfigureWithThreeYearWindow64L ),
+        ENTRY( "CFlexTimer: Configure(64bit) called with max positive value", CTestCFlexTimer::ConfigureWithMaxWindow64L ),
+        ENTRY( "CFlexTimer: Configure called while timer is already in use", CTestCFlexTimer::ConfigureWhileTimerIsInUseL ),
+        ENTRY( "CFlexTimer: Timer is started twise", CTestCFlexTimer::TimerIsStartedTwiceL ),
+        ENTRY( "CFlexTimer: Two timers, while high CPU load.", CTestCFlexTimer::CpuLoadCreateAndExpireTwoOverlappingAfterTimersL ),
+        ENTRY( "CFlexTimer: Many timers, while high CPU load.", CTestCFlexTimer::CpuLoadManyTimersL ),
+        // RFlexTimer tests
+        ENTRY( "RFlexTimer: Start timer with After (32 bit)", CTestRFlexTimer::ExpireAfter32L ),
+        ENTRY( "RFlexTimer: Start timer with After (64 bit)", CTestRFlexTimer::ExpireAfter64L ),
+        ENTRY( "RFlexTimer: Start timer with AfterTicks", CTestRFlexTimer::ExpireAfterTicksL ),
+        ENTRY( "RFlexTimer: Start timer with At", CTestRFlexTimer::ExpireAtL ),
+        ENTRY( "RFlexTimer: Start timer with AtUTC", CTestRFlexTimer::ExpireAtUtcL ),
+        ENTRY( "RFlexTimer: Call After (32 bit) before Connect", CTestRFlexTimer::After32WithoutConnect ),
+        ENTRY( "RFlexTimer: Call After (64 bit) before Connect", CTestRFlexTimer::After64WithoutConnect ),
+        ENTRY( "RFlexTimer: Call AfterTicks before Connect", CTestRFlexTimer::AfterTicksWithoutConnect ),
+        ENTRY( "RFlexTimer: Call At before Connect", CTestRFlexTimer::AtWithoutConnect ),
+        ENTRY( "RFlexTimer: Call AtUTC before Connect", CTestRFlexTimer::AtUtcWithoutConnect ),
+        ENTRY( "RFlexTimer: Call Configure (32 bit) before Connect", CTestRFlexTimer::Configure32WithoutConnect ),
+        ENTRY( "RFlexTimer: Call Configure (64 bit) before Connect", CTestRFlexTimer::Configure64WithoutConnect ),
+        ENTRY( "RFlexTimer: Call Cancel before Connect", CTestRFlexTimer::CancelWithoutConnect ),
+        ENTRY( "RFlexTimer: Call After twice", CTestRFlexTimer::CallAfterTwiceL ),
+        ENTRY( "RFlexTimer: Call AfterTicks twice", CTestRFlexTimer::CallAfterTicksTwiceL ),
+        ENTRY( "RFlexTimer: Call At twice", CTestRFlexTimer::CallAtTwiceL ),
+        ENTRY( "RFlexTimer: Call AtUTC twice", CTestRFlexTimer::CallAtUtcTwiceL ),
+        ENTRY( "RFlexTimer: Call Connect twice", CTestRFlexTimer::CallConnectTwiceL ),
+        ENTRY( "RFlexTimer: Reconnect to the server", CTestRFlexTimer::ReconnectL ),
+        ENTRY( "RFlexTimer: Cancel before start", CTestRFlexTimer::CancelWithoutStart ),
+        ENTRY( "RFlexTimer: Call AfterTicks with negative ticks", CTestRFlexTimer::NegativeTicksInAfterTicksL ),
+        ENTRY( "RFlexTimer: Call AfterTicks with zero ticks", CTestRFlexTimer::ZeroTicksInAfterTicksL ),
+        ENTRY( "RFlexTimer: Change time while AfterTicks running", CTestRFlexTimer::ChangeTimeWhileAfterTicksL ),
+        ENTRY( "RFlexTimer: Test AfterTicks windows", CTestRFlexTimer::TestAfterTicksWindowL ),
+        // High priority client tests
+        ENTRY( "FlexTimerClient: Change Priority: MuchMore", CTestFlexTimer::SetThreadPriorityMuchMore ),
+        ENTRY( "CFlexTimer: Two timers, while high CPU load.", CTestCFlexTimer::CpuLoadCreateAndExpireTwoOverlappingAfterTimersL ),
+        ENTRY( "CFlexTimer: Many timers, while high CPU load.", CTestCFlexTimer::CpuLoadManyTimersL ),
+        ENTRY( "FlexTimerClient: Change Priority: Normal", CTestFlexTimer::SetThreadPriorityNormal ),
+        // FlexTimerServer tests
+        ENTRY( "FlexTimerServer: Stop crash monitoring", CTestFlexTimer::StopServerMonitoringL ),
+
+        ENTRY( "FlexTimerServer: Start second server", CTestFlexTimer::StartSecondServerL ),
+        };
+    
+    // Verify that case number is valid
+    if( (TUint) aCaseNumber >= sizeof( KCases ) / 
+                               sizeof( TCaseInfoInternal ) )
+        {
+
+        // Invalid case, construct empty object
+        TCaseInfo null( (const TText*) L"" );
+        null.iMethod = NULL;
+        null.iIsOOMTest = EFalse;
+        null.iFirstMemoryAllocation = 0;
+        null.iLastMemoryAllocation = 0;
+        return null;
+
+        } 
+
+    // Construct TCaseInfo object and return it
+    TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
+    tmp.iMethod = KCases[ aCaseNumber ].iMethod;
+    tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+    tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+    tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+    return tmp;
+    }
+
+// ========== Server level test cases ==========
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start monitoring the FlexTimer server
+// ---------------------------------------------------------------------------
+TInt CTestFlexTimer::StartServerMonitoringL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    RFlexTimerServerMonitor monitor;
+    User::LeaveIfError( monitor.Connect() );
+    User::LeaveIfError( monitor.StartMonitoring() );
+    monitor.Close();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Stop monitoring the FlexTimer server and check has the server
+// crashded.
+// ---------------------------------------------------------------------------
+TInt CTestFlexTimer::StopServerMonitoringL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    RFlexTimerServerMonitor monitor;
+    User::LeaveIfError( monitor.Connect() );
+    
+    TBool hasServerCrashed; 
+    User::LeaveIfError( monitor.GetStatus( hasServerCrashed ) );
+    
+    User::LeaveIfError( monitor.StopMonitoring() );
+    monitor.Close();
+
+    // By default everything has gone ok 
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( hasServerCrashed )
+        {
+        aResult.SetResult( 
+            KErrGeneral,
+            _L("Test case failed. FlexTimerServer has crashed.") );
+        }
+    
+    return KErrNone;        
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start second FlexTimerServer. Main purpose of this test case is 
+// to increase test coverage.
+// ---------------------------------------------------------------------------
+TInt CTestFlexTimer::StartSecondServerL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+
+    // Default result if anything leaves i.e. no analyze done.
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Make sure that the server is up'n'running
+    RFlexTimer timer;
+    timer.Connect();
+    timer.Close();
+    
+    // Open handle to the server process
+    RProcess flexTimerServer;
+    User::LeaveIfError( flexTimerServer.Create( 
+            _L("FlexTimerServer.exe"), 
+            _L(""), 
+            EOwnerThread ) );
+
+    // Kick the server runnin'
+    flexTimerServer.Resume();
+
+    // Wait until the server process has been started.
+    TRequestStatus status;
+    flexTimerServer.Rendezvous( status );
+    User::WaitForRequest( status );
+
+    // Kill the server - if it has been able to been created
+    flexTimerServer.Kill( 0 );
+    
+    // Clean up
+    flexTimerServer.Close();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+// ---------------------------------------------------------------------------
+// TEST CASE: This test case can be used to change client priority to 
+// EPriorityMuchMore.
+// ---------------------------------------------------------------------------
+TInt CTestFlexTimer::SetThreadPriorityMuchMore(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    RThread thisThread;
+    
+    thisThread.SetPriority( EPriorityMuchMore );
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    return KErrNone;
+    }
+// ---------------------------------------------------------------------------
+// TEST CASE: This test case can be used to change client priority to 
+// EPriorityMuchMore.
+// ---------------------------------------------------------------------------
+TInt CTestFlexTimer::SetThreadPriorityNormal(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    RThread thisThread;
+    
+    thisThread.SetPriority( EPriorityNormal );
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    return KErrNone;
+    }
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point
+// Returns: CTestModuleBase*: Pointer to Test Module object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CTestModuleBase* LibEntryL()
+    {
+    return CTestFlexTimer::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// SetRequirements handles test module parameters(implements evolution
+// version 1 for test module's heap and stack sizes configuring).
+// Returns: TInt: Symbian error code.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SetRequirements( CTestModuleParam*& /*aTestModuleParam*/, 
+                                TUint32& /*aParameterValid*/ )
+    {
+
+    /* --------------------------------- NOTE ---------------------------------
+    USER PANICS occurs in test thread creation when:
+    1) "The panic occurs when the value of the stack size is negative."
+    2) "The panic occurs if the minimum heap size specified is less
+       than KMinHeapSize".
+       KMinHeapSize: "Functions that require a new heap to be allocated will
+       either panic, or will reset the required heap size to this value if
+       a smaller heap size is specified".
+    3) "The panic occurs if the minimum heap size specified is greater than
+       the maximum size to which the heap can grow".
+    Other:
+    1) Make sure that your hardware or Symbian OS is supporting given sizes.
+       e.g. Hardware might support only sizes that are divisible by four.
+    ------------------------------- NOTE end ------------------------------- */
+
+    // Normally STIF uses default heap and stack sizes for test thread, see:
+    // KTestThreadMinHeap, KTestThreadMinHeap and KStackSize.
+    // If needed heap and stack sizes can be configured here by user. Remove
+    // comments and define sizes.
+
+/*
+    aParameterValid = KStifTestModuleParameterChanged;
+
+    CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
+    // Stack size
+    param->iTestThreadStackSize= 16384; // 16K stack
+    // Heap sizes
+    param->iTestThreadMinHeap = 4096;   // 4K heap min
+    param->iTestThreadMaxHeap = 1048576;// 1M heap max
+
+    aTestModuleParam = param;
+*/
+    return KErrNone;
+
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/flextimer/test/testflextimer/src/testrflextimer.cpp	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1228 @@
+/*
+* ============================================================================
+*  Name        : testrflextimer.cpp
+*  Part of     : src / testflextimer
+*  Description : STIF test cases for RFlexTimer
+*  Version     : %version: 1 %
+*
+*  Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
+*  All rights reserved.
+*  This component and the accompanying materials are made available
+*  under the terms of the License "Eclipse Public License v1.0"
+*  which accompanies this distribution, and is available
+*  at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+*  Initial Contributors:
+*  Nokia Corporation - initial contribution.
+*
+*  Contributors:
+*  Nokia Corporation
+* ============================================================================
+* Template version: 4.1
+*/
+
+#include <e32debug.h>               // for RDebug
+#include <rflextimer.h>             // for RFlexTimer
+#include <stiftesteventinterface.h> // for TEventIf 
+#include "testflextimer.h"          // for global constants
+#include "testrflextimer.h"
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// Constructor
+// ---------------------------------------------------------------------------
+//
+CTestRFlexTimer::CTestRFlexTimer()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CTestRFlexTimer::~CTestRFlexTimer()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// ___  ____ _    ____ _   _    ____ _  _ ____ ____ _  _ ____ 
+// |  \ |___ |    |__|  \_/     |    |__| |___ |    |_/  [__  
+// |__/ |___ |___ |  |   |      |___ |  | |___ |___ | \_ ___] 
+// 
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+TBool CTestRFlexTimer::IsDelayOk( 
+    const TTimeIntervalMicroSeconds aDelay,
+    const TTimeIntervalMicroSeconds32 aInterval,
+    const TTimeIntervalMicroSeconds32 aWindow )
+    {
+    TTimeIntervalMicroSeconds interval( aInterval.Int() );
+    TTimeIntervalMicroSeconds window( aWindow.Int() );
+    return IsDelayOk( aDelay, interval, window );
+    }
+
+// ---------------------------------------------------------------------------
+TBool CTestRFlexTimer::IsDelayOk( 
+    const TTimeIntervalMicroSeconds aDelay,
+    const TTimeIntervalMicroSeconds32 aInterval,
+    const TTimeIntervalMicroSeconds aWindow )
+    {
+    TTimeIntervalMicroSeconds interval( aInterval.Int() );
+    return IsDelayOk( aDelay, interval, aWindow );
+    }
+
+// ---------------------------------------------------------------------------
+TBool CTestRFlexTimer::IsDelayOk( 
+    const TTimeIntervalMicroSeconds aDelay,
+    const TTimeIntervalMicroSeconds aInterval,
+    const TTimeIntervalMicroSeconds32 aWindow )
+    {
+    TTimeIntervalMicroSeconds window( aWindow.Int() );
+    return IsDelayOk( aDelay, aInterval, window );
+    }
+
+// ---------------------------------------------------------------------------
+TBool CTestRFlexTimer::IsDelayOk( 
+    const TTimeIntervalMicroSeconds aDelay,
+    const TTimeIntervalMicroSeconds aInterval,
+    const TTimeIntervalMicroSeconds aWindow )
+    {
+    /**
+     *  Timer can be expired 1 sec late or 1 system tick (15625 microseconds)
+     *  early.
+     */
+    const TInt64 KTimerResolution( 1000000 ); 
+    const TInt64 KTickResolution( 1000000 / 64 );
+    
+    RDebug::Print( 
+       _L("=== Timer delay: %Ld, interval: %Ld, window: %Ld"), 
+       aDelay.Int64(),
+       aInterval.Int64(),
+       aWindow.Int64() );
+    
+    return !( aDelay.Int64() < aInterval.Int64() - aWindow.Int64() - KTickResolution ||
+              aDelay.Int64() > aInterval.Int64() + KTimerResolution );
+    }
+
+// ---------------------------------------------------------------------------
+// Create, configure, start with AfterTicks and close RFlexTimer 
+// ---------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds CTestRFlexTimer::ExecuteAfterTicksL(
+    TInt aTicks,
+    TTimeIntervalMicroSeconds aWindowSize )
+    {
+    // Create, connect and configure the timer handle
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    User::LeaveIfError( timer.Configure( aWindowSize ) );
+    
+    TTime startTime;
+    startTime.UniversalTime();
+    
+    // Run the timer and wait its expiration
+    TRequestStatus status;
+    timer.AfterTicks( status, aTicks );
+    User::WaitForRequest( status );
+    
+    TTime endTime;
+    endTime.UniversalTime();
+
+    // Clean up
+    timer.Close();
+
+    // Return running time of the timer
+    return endTime.MicroSecondsFrom( startTime );
+    }
+
+// ---------------------------------------------------------------------------
+// ___ ____ ____ ___    ____ ____ ____ ____ ____ 
+//  |  |___ [__   |     |    |__| [__  |___ [__  
+//  |  |___ ___]  |     |___ |  | ___] |___ ___] 
+//
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a timer using After (32 bit) and wait it to expire.
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ExpireAfter32L(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+    
+    const TTimeIntervalMicroSeconds32 KInterval( 3000000 ); // Time to wait timer
+    const TTimeIntervalMicroSeconds KWindow( 0 );           // Window for check results
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    timer.After( status, KInterval );
+
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a timer using After (32 bit) and wait it to expire.
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ExpireAfter64L(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+    
+    const TTimeIntervalMicroSeconds KInterval( 3000000 );   // Time to wait timer
+    const TTimeIntervalMicroSeconds KWindow( 0 );           // Window for check results
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    timer.After( status, KInterval );
+
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a timer using AfterTicks and wait it to expire.
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ExpireAfterTicksL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+    
+    const TTimeIntervalMicroSeconds32 KInterval( 3000000 );     // Time to wait timer
+    const TTimeIntervalMicroSeconds KWindow( 0 );               // Window for check results
+    const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 ); // System tick: 1/64 sec
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    
+    timer.AfterTicks( status, KInterval.Int() / KOneTick.Int() );
+    
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a timer using At and wait it to expire.
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ExpireAtL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+    
+    const TTimeIntervalMicroSeconds KInterval( 3000000 ); // Time to wait timer
+    const TTimeIntervalMicroSeconds KWindow( 0 );         // Window for check results
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    TTime now;
+    now.HomeTime();
+    
+    timer.At( status, now + KInterval );
+
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+    
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start a timer using AtUTC and wait it to expire.
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ExpireAtUtcL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    __UHEAP_MARK;
+    
+    const TTimeIntervalMicroSeconds KInterval( 3000000 ); // Time to wait timer
+    const TTimeIntervalMicroSeconds KWindow( 0 );         // Window for check results
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    TTime now;
+    now.UniversalTime();
+    
+    timer.AtUTC( status, now + KInterval );
+
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with After (32 bit) without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::After32WithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    TRequestStatus status;
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    timer.After( status, TTimeIntervalMicroSeconds32( 1000000 ) );
+    User::WaitForRequest( status ); // PANIC
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with After (64 bit) without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::After64WithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    TRequestStatus status;
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+
+    // Do the actual test
+    //-----------------------------------------------------
+    
+    RFlexTimer timer;
+
+    timer.After( status, TTimeIntervalMicroSeconds( 1000000 ) );
+    User::WaitForRequest( status ); // PANIC
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with AfterTicks without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::AfterTicksWithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    TRequestStatus status;
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    timer.AfterTicks( status, 1000 );
+    User::WaitForRequest( status ); // PANIC
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with At without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::AtWithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    TRequestStatus status;
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    TTime expirationTime;
+    expirationTime.HomeTime();
+    expirationTime += TTimeIntervalMicroSeconds( 1000000 );
+    
+    timer.At( status, expirationTime );
+    User::WaitForRequest( status ); // PANIC
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start timer with At without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::AtUtcWithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    TRequestStatus status;
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    TTime expirationTime;
+    expirationTime.UniversalTime();
+    expirationTime += TTimeIntervalMicroSeconds( 1000000 );
+    
+    timer.AtUTC( status, expirationTime );
+    User::WaitForRequest( status ); // PANIC
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure (32 bit) timer without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::Configure32WithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    timer.Configure( TTimeIntervalMicroSeconds32( 1000000 ) ); // PANIC
+    // Configure is synchronous command. No need to wait.
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Configure (32 bit) timer without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::Configure64WithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    timer.Configure( TTimeIntervalMicroSeconds( 1000000 ) ); // PANIC
+    // Configure is synchronous command. No need to wait.
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Cancel timer without connecting first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CancelWithoutConnect(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+
+    // Test should panic with
+    // Category: "KERN-EXEC"
+    // Reason:   0
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        0 );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    timer.Cancel(); // PANIC
+    // Cancel is synchronous command. No need to wait.
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Call After twice
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CallAfterTwiceL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   15 (EFlexTimerServerErrorPendingTimer)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        15 );
+
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    timer.After( status, TTimeIntervalMicroSeconds32( 100000 ) );
+    timer.After( status, TTimeIntervalMicroSeconds( 100000 ) );
+
+    User::WaitForRequest( status ); // PANIC
+
+    timer.Close();
+
+    //-----------------------------------------------------
+
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Call AfterTicks twice
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CallAfterTicksTwiceL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   15 (EFlexTimerServerErrorPendingTimer)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        15 );
+
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    timer.AfterTicks( status, 1000 );
+    timer.AfterTicks( status, 1000 );
+
+    User::WaitForRequest( status ); // PANIC
+
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Call At twice
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CallAtTwiceL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   15 (EFlexTimerServerErrorPendingTimer)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        15 );
+
+    TRequestStatus status;
+
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+
+    TTime expirationTime;
+    expirationTime.HomeTime();
+    expirationTime += TTimeIntervalMicroSeconds( 1000000 );
+    
+    timer.At( status, expirationTime );
+    timer.At( status, expirationTime );
+
+    User::WaitForRequest( status ); // PANIC
+
+    timer.Close();
+
+    //-----------------------------------------------------
+
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Call AtUTC twice
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CallAtUtcTwiceL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   15 (EFlexTimerServerErrorPendingTimer)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        15 );
+
+    TRequestStatus status;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    
+    TTime expirationTime;
+    expirationTime.UniversalTime();
+    expirationTime += TTimeIntervalMicroSeconds( 1000000 );
+    
+    timer.AtUTC( status, expirationTime );
+    timer.AtUTC( status, expirationTime );
+
+    
+    User::WaitForRequest( status ); // PANIC
+
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Call Connect twice
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CallConnectTwiceL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   33 (EFlexTimerAlreadyConnected)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        33 );
+
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    User::LeaveIfError( timer.Connect() ); // PANIC
+
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Reconnect the handle to the server
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ReconnectL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    timer.Close();
+    User::LeaveIfError( timer.Connect() );
+    timer.Close();
+    
+    //-----------------------------------------------------
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Cancel timer without starting it first
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::CancelWithoutStart(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+
+    User::LeaveIfError( timer.Connect() );
+    timer.Cancel();
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start tick timer with negative ticks
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::NegativeTicksInAfterTicksL(
+    TTestResult& aResult, 
+    CTestFlexTimer* aCallback )
+    {
+    const TInt KTestValue( -1 );
+    
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    // Test should panic with
+    // Category: "RFlexTimer"
+    // Reason:   2 (EFlexTimerAfterTicksIntervalLessThanZero)
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::EPanic,
+        2 );
+
+    TTimeIntervalMicroSeconds delay = ExecuteAfterTicksL( KTestValue );
+
+    // No panic, change result back to normal
+    aCallback->TestModuleIf().SetExitReason( 
+        CTestModuleIf::ENormal,
+        KErrNone );
+
+    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Start tick timer with zero ticks
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ZeroTicksInAfterTicksL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    const TInt KTestValue( 0 );
+    
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTimeIntervalMicroSeconds delay = ExecuteAfterTicksL( KTestValue );
+
+    // Analyze the results
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( delay, 
+                     TTimeIntervalMicroSeconds( KTestValue ),
+                     TTimeIntervalMicroSeconds( 0 )) )
+        {
+        aResult.SetResult( 
+            KErrGeneral, 
+            _L("Test case failed. Wrong expiration time.") );
+        }
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Change system time while tick timer is active
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::ChangeTimeWhileAfterTicksL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+    const TTimeIntervalMicroSeconds32 KTimerInterval( 10000000 );   // Time to wait timer
+    const TTimeIntervalMicroSeconds KWaitTillChangeTime( 1000000 ); // Time to wait before change system time
+    const TTimeIntervalMicroSeconds KTimeChange( 3000000 );         // Duration to change system time
+
+    // Interval for check results
+    const TTimeIntervalMicroSeconds KInterval( KTimerInterval.Int() + KTimeChange.Int64() );
+    const TTimeIntervalMicroSeconds KWindow( 0 );                   // Window for check results
+    const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 );     // System tick: 1/64 sec
+
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus status, helperStatus;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timer;
+    User::LeaveIfError( timer.Connect() );
+    
+    timer.AfterTicks( status, KTimerInterval.Int() / KOneTick.Int() );
+
+    //-----------------------------------------------------
+    // ... meanwhile change system time
+
+        RFlexTimer helper;
+        
+        User::LeaveIfError( helper.Connect() );
+        helper.After( helperStatus, KWaitTillChangeTime );
+    
+                                               //    //  ___     _____
+        User::WaitForRequest( helperStatus ); // // // //_ // //  //
+                                             //_//_// //  // //  //
+        
+        TTime newNow;
+        newNow.UniversalTime();
+        newNow += KTimeChange;
+        
+        User::SetUTCTime( newNow );
+    
+        helper.Close();
+
+    // The test continues...
+    //-----------------------------------------------------
+    
+                                     //    //  ___     _____
+    User::WaitForRequest( status ); // // // //_ // //  //
+                                   //_//_// //  // //  //
+
+    timer.Close();
+
+    //-----------------------------------------------------
+
+    // Verify the test
+    TTime endTime;
+    endTime.UniversalTime();
+
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
+        {
+        //RDebug::Print( _L("Timer delay: %lld"), 
+        //               endTime.MicroSecondsFrom( startTime ).Int64() );
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
+        }
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// TEST CASE: Timer window works correctly
+// ---------------------------------------------------------------------------
+//
+TInt CTestRFlexTimer::TestAfterTicksWindowL(
+    TTestResult& aResult, 
+    CTestFlexTimer* /* aCallback */ )
+    {
+
+    // T1: expiration after 4-8 sec
+    const TTimeIntervalMicroSeconds32 KTimerOneInterval( 8000000 );
+    const TTimeIntervalMicroSeconds32 KTimerOneWindow( 4000000 );
+
+    // T2: expiration after 9-10 sec
+    // T2's interval must not overlap with T1's -- otherwise T1 will be 
+    // delayed
+    const TTimeIntervalMicroSeconds32 KTimerTwoInterval( 10000000 );
+    const TTimeIntervalMicroSeconds32 KTimerTwoWindow( 1000000 );
+
+    // T3: expiration after 5 secs
+    const TTimeIntervalMicroSeconds KAfterTimerInterval( 5000000 );
+    const TTimeIntervalMicroSeconds KAfterTimerWindow( 0 );
+
+    // System tick: 1/64 sec
+    const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 );
+    const TTimeIntervalMicroSeconds KNoWindow( 0 );
+
+    
+    
+    // Initialize case
+    aResult.SetResult( KErrGeneral, _L("Test case leaved") );
+
+    TTime startTime;
+    startTime.UniversalTime();
+    TRequestStatus oneStatus, twoStatus, afterStatus;
+    
+    // Do the actual test
+    //-----------------------------------------------------
+
+    RFlexTimer timerOne;
+    User::LeaveIfError( timerOne.Connect() );
+    timerOne.Configure( KTimerOneWindow );
+    timerOne.AfterTicks( oneStatus, KTimerOneInterval.Int() / KOneTick.Int() );
+
+    RFlexTimer timerTwo;
+    User::LeaveIfError( timerTwo.Connect() );
+    timerTwo.Configure( KTimerTwoWindow );
+    timerTwo.AfterTicks( twoStatus, KTimerTwoInterval.Int() / KOneTick.Int() );
+    
+    RFlexTimer afterTimer;
+    User::LeaveIfError( afterTimer.Connect() );
+    afterTimer.Configure( KAfterTimerWindow );
+    afterTimer.After( afterStatus, KAfterTimerInterval );
+    
+                                        //    //  ___     _____
+    User::WaitForRequest( oneStatus ); // // // //_ // //  //
+                                      //_//_// //  // //  //
+
+    TTime oneEndTime;
+    oneEndTime.UniversalTime();
+                                        //    //  ___     _____
+    User::WaitForRequest( twoStatus ); // // // //_ // //  //
+                                      //_//_// //  // //  //
+
+    TTime twoEndTime;
+    twoEndTime.UniversalTime();
+    
+    timerOne.Close();
+    timerTwo.Close();
+    afterTimer.Close();
+
+    //-----------------------------------------------------
+    
+    // Handle afterStatus too - to get rid of unhandled asynchronous message
+    // error from STIF.
+    User::WaitForRequest( afterStatus );
+    
+    aResult.SetResult( KErrNone, _L("Test case passed") );
+    
+    // T1 should be expired at the same time than T3 - check with T3's values
+    if ( !IsDelayOk( oneEndTime.MicroSecondsFrom( startTime ), KAfterTimerInterval, KNoWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Timer one wrong expiration.") );
+        }
+    // T2 should be expired at it's max window
+    else if ( !IsDelayOk( twoEndTime.MicroSecondsFrom( startTime ), KTimerTwoInterval, KNoWindow ) )
+        {
+        aResult.SetResult( KErrGeneral, _L("Test case failed. Timer two wrong expiration.") );
+        }
+    
+    __UHEAP_MARKEND;
+
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keepalive/group/bld.inf	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build info for keepalive collection.
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+#include "../flextimer/group/bld.inf"
+
+PRJ_TESTMMPFILES
+
--- a/layers.sysdef.xml	Thu Aug 19 10:18:49 2010 +0300
+++ b/layers.sysdef.xml	Tue Aug 31 15:35:44 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
   <!ENTITY layer_real_source_path "sf/mw/ipconnmgmt" >
 ]>
 
@@ -7,7 +7,7 @@
   <systemModel>
     <layer name="mw_layer">
       <module name="ipconnmgmt">
-        <unit unitID="netdo.ipconnmgmt" mrp="" bldFile="&layer_real_source_path;/group" name="ipconnmgmt" />
+        <unit unitID="netdo.ipconnmgmtqt" mrp="" bldFile="&layer_real_source_path;" name="ipconnmgmtqt" proFile="ipconnmgmt.pro" qmakeArgs="-r"/>
       </module>
     </layer>
   </systemModel>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0" xmlns:qt="http://www.nokia.com/qt">
+ <package id="ipconnmgmt" name="IP Connectivity Management" levels="plugin framework server utils api">
+  <collection id="ipcm_plat" name="IP Connectivity Management Platform Interfaces" level="api">
+   <component id="ipcm_plat_qt_build" name="IP Connectivity Management Qt Platform Interfaces" class="api" filter="s60" introduced="^4">
+    <unit bldFile="ipcm_plat" qt:proFile="ipcm_plat.pro"/>
+   </component>
+   <component id="access_point_engine_misc_api" name="Access Point Engine Misc API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/access_point_engine_misc_api/access_point_engine_misc_api.metaxml"/>
+    <unit bldFile="ipcm_plat/access_point_engine_misc_api/group"/>
+   </component>
+   <component id="bearer_settings_plugin_api" name="Bearer Settings Plugin API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/bearer_settings_plugin_api/bearer_settings_plugin_api.metaxml"/>
+    <unit bldFile="ipcm_plat/bearer_settings_plugin_api/group"/>
+   </component>
+   <component id="commsdat_wlan_api" name="CommsDat WLAN API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/commsdat_wlan_api/commsdat_wlan_api.metaxml"/>
+    <unit bldFile="ipcm_plat/commsdat_wlan_api/group"/>
+   </component>
+   <component id="connection_monitor_extension_api" name="Connection Monitor Extension API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/connection_monitor_extension_api/connection_monitor_extension_api.metaxml"/>
+    <unit bldFile="ipcm_plat/connection_monitor_extension_api/group"/>
+   </component>
+   <component id="connection_ui_utilities_api" name="Connection UI Utilities API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/connection_ui_utilities_api/connection_ui_utilities_api.metaxml"/>
+    <unit bldFile="ipcm_plat/connection_ui_utilities_api/group"/>
+   </component>
+   <component id="disconnect_dialog_api" name="Disconnect Dialog API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/disconnect_dialog_api/disconnect_dialog_api.metaxml"/>
+    <unit bldFile="ipcm_plat/disconnect_dialog_api/group"/>
+   </component>
+   <component id="disconnect_dialog_disable_api" name="Disconnect Dialog Disable API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/disconnect_dialog_disable_api/disconnect_dialog_disable_api.metaxml"/>
+    <unit bldFile="ipcm_plat/disconnect_dialog_disable_api/group"/>
+   </component>
+   <component id="extended_connection_settings_api" name="Extended Connection Settings API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/extended_connection_settings_api/extended_connection_settings_api.metaxml"/>
+    <unit bldFile="ipcm_plat/extended_connection_settings_api/group"/>
+   </component>
+   <component id="pdpcontextmanager2_reset_factory_settings_api" name="PDP Context Manager 2 Reset Factory Settings API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/pdpcontextmanager2_reset_factory_settings_api/pdpcontextmanager2_reset_factory_settings_api.metaxml"/>
+    <unit bldFile="ipcm_plat/pdpcontextmanager2_reset_factory_settings_api/group"/>
+   </component>
+   <component id="pdpcontextmanager2_settings_api" name="PDP Context Manager 2 Settings API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_plat/pdpcontextmanager2_settings_api/pdpcontextmanager2_settings_api.metaxml"/>
+    <unit bldFile="ipcm_plat/pdpcontextmanager2_settings_api/group"/>
+   </component>
+   <component id="mpm_connect_screen_api" name="MPM Connect Screen API" class="api" filter="s60">
+    <unit bldFile="ipcm_plat/mpm_connect_screen_api/group"/>
+   </component>
+   <component id="flextimer_api" name="Flex Timer API" class="api" filter="s60" introduced="^4">
+    <unit bldFile="ipcm_plat/flextimer_api/group"/>
+   </component>
+   <component id="mpm_vpn_toggle_api" name="MPM VPN Toggle API" class="api" filter="s60" introduced="^4">
+    <meta rel="Api" href="ipcm_plat/mpm_vpn_toggle_api/mpm_vpn_toggle_api.metaxml"/>
+    <unit bldFile="ipcm_plat/mpm_vpn_toggle_api/group"/>
+   </component>
+  </collection>
+  <collection id="ipcm_pub" name="IP Connectivity Management Public Interfaces" level="api">
+   <component id="connection_settings_api" name="Connection Settings API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/connection_settings_api/connection_settings_api.metaxml"/>
+    <unit bldFile="ipcm_pub/connection_settings_api/group"/>
+   </component>
+   <component id="access_point_engine_api" name="Access Point Engine API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/access_point_engine_api/access_point_engine_api.metaxml"/>
+    <unit bldFile="ipcm_pub/access_point_engine_api/group"/>
+   </component>
+   <component id="access_point_settings_handler_api" name="Access Point Settings Handler API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/access_point_settings_handler_api/access_point_settings_handler_api.metaxml"/>
+    <unit bldFile="ipcm_pub/access_point_settings_handler_api/group"/>
+   </component>
+   <component id="data_connection_log_counters_api" name="Data Connection Log Counters API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/data_connection_log_counters_api/data_connection_log_counters_api.metaxml"/>
+    <unit bldFile="ipcm_pub/data_connection_log_counters_api/group"/>
+   </component>
+   <component id="connection_monitor_server_api" name="Connection Monitor Server API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/connection_monitor_server_api/connection_monitor_server_api.metaxml"/>
+    <unit bldFile="ipcm_pub/connection_monitor_server_api/group"/>
+   </component>
+   <component id="connection_settings_ui_api" name="Connection Settings UI API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/connection_settings_ui_api/connection_settings_ui_api.metaxml"/>
+    <unit bldFile="ipcm_pub/connection_settings_ui_api/group"/>
+   </component>
+   <component id="agent_dialog_api" name="Agent Dialog API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/agent_dialog_api/agent_dialog_api.metaxml"/>
+    <unit bldFile="ipcm_pub/agent_dialog_api/group"/>
+   </component>
+   <component id="extendedconnpref_api" name="Extended Connection Preferences API" class="api" filter="s60">
+    <meta rel="Api" href="ipcm_pub/extendedconnpref_api/extendedconnpref_api.metaxml"/>
+    <unit bldFile="ipcm_pub/extendedconnpref_api/group"/>
+   </component>
+  </collection>
+  <collection id="alwayson_net_plugin" name="Always Online Net Plugin" level="server">
+   <component id="pdpcontextmanager2" filter="s60" name="PDP Context Manager 2">
+    <unit bldFile="alwayson_net_plugin/pdpcontextmanager2/group"/>
+   </component>
+  </collection>
+  <collection id="apengine" name="Access Point Engine" level="framework">
+   <component id="apeng" filter="s60" name="Access Point Engine">
+    <unit bldFile="apengine/apeng/group"/>
+   </component>
+   <component id="apsettingshandlerui" filter="s60" name="Access Point Settings Handler UI">
+    <unit bldFile="apengine/apsettingshandlerui/group"/>
+   </component>
+  </collection>
+  <collection id="bearermanagement" name="Bearer Management" level="framework">
+   <component id="mpm" filter="s60" name="Mobility Policy Manager">
+    <unit bldFile="bearermanagement/mpm/group"/>
+   </component>
+   <component id="extendedconnpref" filter="s60" name="Extended Connection Preferences">
+    <unit bldFile="bearermanagement/extendedconnpref/group"/>
+   </component>
+   <component id="s60mcpr" filter="s60" name="S60 Meta-Connection Provider" class="plugin">
+    <unit bldFile="bearermanagement/S60MCPR/group"/>
+   </component>
+  </collection>
+  <collection id="cmmanager" name="Connection Method Manager" level="framework">
+   <component id="cmmgr" filter="s60" name="CM Manager">
+    <unit bldFile="cmmanager/cmmgr/group"/>
+   </component>
+   <component id="connection_settings_shim" name="Connection Settings Shim" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/connection_settings_shim" qt:proFile="connection_settings_shim.pro"/>
+   </component>
+   <component id="cmapplsettingsui" name="Connection Settings UI" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/cmapplsettingsui" qt:proFile="cmapplsettingsui.pro"/>
+   </component>
+   <component id="cpipsettingsplugin" name="Connection Settings IP Plugin" class="plugin" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/cpipsettingsplugin" qt:proFile="cpipsettingsplugin.pro"/>
+   </component>
+   <component id="cpdestinationplugin" name="CP Destination Plugin" class="plugin" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/cpdestinationplugin" qt:proFile="cpdestinationplugin.pro"/>
+   </component>
+   <component id="cppacketdataapplugin" name="CP Packet Data AP Pplugin" class="plugin" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/cppacketdataapplugin" qt:proFile="cppacketdataapplugin.pro"/>
+   </component>
+   <component id="cpwlanapplugin" name="CP WLAN AP Plugin" class="plugin" introduced="^4" filter="s60">
+     <unit bldFile="cmmanager/cpwlanapplugin" qt:proFile="cpwlanapplugin.pro"/>
+   </component>
+  </collection>
+  <collection id="connectionmonitoring" name="Connection Monitoring" level="server">
+   <component id="connectionmonitorui" filter="s60" name="Connection Monitor UI">
+    <unit bldFile="connectionmonitoring/connectionmonitorui/group"/>
+   </component>
+   <component id="connmon" filter="s60" name="Connection Monitor">
+    <!-- either split into two components, or #include from a common bld.inf -->
+    <unit bldFile="connectionmonitoring/connmon/connectionmonitor/group"/>
+    <unit bldFile="connectionmonitoring/connmon/dataconnectionlogger/group"/>
+   </component>
+   <component id="connmonext" filter="s60" name="Connection Monitor Extension API">
+    <unit bldFile="connectionmonitoring/connmonext/group"/>
+   </component>
+   <component id="cellularindicatorplugin" name="Cellular Indicator Plugin" class="plugin" introduced="^4" filter="s60">
+     <unit bldFile="connectionmonitoring/cellularindicatorplugin" qt:proFile="cellularindicatorplugin.pro"/>
+   </component>
+   <component id="indicatorobserver" name="Indicator Observer" introduced="^4" filter="s60">
+     <unit bldFile="connectionmonitoring/indicatorobserver" qt:proFile="indicatorobserver.pro"/>
+   </component>
+   <component id="connectionmonitoringnview" name="Connection View" introduced="^4" filter="s60">
+     <unit bldFile="connectionmonitoring/connectionview" qt:proFile="connectionview.pro"/>
+   </component>
+  </collection>
+  <collection id="connectionutilities" name="Connection Utilities" level="utils">
+   <component id="connectiondialogs" filter="s60" name="Connection Dialogs">
+    <unit bldFile="connectionutilities/connectiondialogs/group"/>
+   </component>
+   <component id="confirmqueries" name="Confirm Queries" introduced="^4" filter="s60">
+     <unit bldFile="connectionutilities/confirmqueries" qt:proFile="confirmqueries.pro"/>
+   </component>
+  </collection>
+  <collection id="keepalive" name="Keep Alive" level="server">
+   <component id="flextimer" filter="s60" name="Flex Timer" introduced="^4">
+    <unit bldFile="keepalive/flextimer/group"/>
+   </component>
+  </collection>
+  <collection id="dbcreator" name="DB Creator" level="utils">
+   <component id="commsdatcreator" filter="s60" name="Comms Database Creator" introduced="9.3">
+    <unit bldFile="dbcreator/commsdatcreator/group"/>
+   </component>
+   <component id="commsdatcreatorrfsplugin" filter="s60" name="Comms Database Creator RFS Plugin" class="plugin" introduced="9.3">
+    <meta rel="config">
+     <not-defined condition="WINSCW"/>
+    </meta>
+    <unit bldFile="dbcreator/commsdatcreatorrfsplugin/group"/>
+   </component>
+   <component id="commsdatstartup" filter="s60" name="Comms Database Startup" introduced="9.3">
+    <unit bldFile="dbcreator/commsdatstartup/group"/>
+   </component>
+   <component id="dbcreatorexe" filter="s60" name="DB Creator" introduced="9.3">
+    <unit bldFile="dbcreator/dbcreatorexe/group"/>
+   </component>
+   <component id="dbcreator_conf" filter="s60" name="DB Creator Config" class="config" introduced="9.3">
+    <unit bldFile="dbcreator/conf"/>
+   </component>
+  </collection>
+  <collection id="ipconnmgmt_info" name="IP Connectivity Management Info" level="api">
+   <component id="ipcm_data" filter="s60" name="IP Connectivity Management Data" class="config">
+    <unit bldFile="data"/>
+   </component>
+  </collection>
+ </package>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="mw"/>
--- a/sysdef_1_4_0.dtd	Thu Aug 19 10:18:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
-  name CDATA #REQUIRED
-  schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
-  name CDATA #REQUIRED
-  levels CDATA #IMPLIED
-  span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
-  name CDATA #REQUIRED
-  level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
-  unitID ID #REQUIRED
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  bldFile CDATA #REQUIRED
-  priority CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
-  name CDATA #REQUIRED
-  version CDATA #REQUIRED
-  late (Y|N) #IMPLIED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
-  name ID #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
-  name ID #REQUIRED
-  abldTarget CDATA #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
-  name ID #REQUIRED
-  abldOption CDATA #REQUIRED
-  description CDATA #REQUIRED
-  enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
-  command CDATA #REQUIRED
-  targetList IDREFS #IMPLIED
-  unitParallel (Y | N | y | n) #REQUIRED
-  targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
-  name CDATA #REQUIRED
-  cwd CDATA #REQUIRED
-  command CDATA #REQUIRED>  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd	Tue Aug 31 15:35:44 2010 +0300
@@ -0,0 +1,88 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED
+  proFile CDATA #IMPLIED
+  qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>