201023
authorhgs
Thu, 10 Jun 2010 16:00:16 +0300
changeset 40 c5b848e6c7d1
parent 34 3b0cec605979
child 41 bbb64eb3bdee
201023
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
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
bearermanagement/mpm/group/mpmserver.mmp
bearermanagement/mpm/inc/mpmconnmonevents.h
bearermanagement/mpm/inc/mpmconnmonreqs.h
bearermanagement/mpm/inc/mpmdisconnectdlg.h
bearermanagement/mpm/inc/mpmserver.h
bearermanagement/mpm/inc/mpmserver.inl
bearermanagement/mpm/inc/mpmserversession.h
bearermanagement/mpm/inc/mpmserversession.inl
bearermanagement/mpm/src/mpmconnmonevents.cpp
bearermanagement/mpm/src/mpmconnmonreqs.cpp
bearermanagement/mpm/src/mpmdisconnectdlg.cpp
bearermanagement/mpm/src/mpmserver.cpp
bearermanagement/mpm/src/mpmserversession.cpp
cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.docml
cmmanager/cmmgr/cmmapi/inc/cmmanagerapi.h
cmmanager/cmmgr/cmmapi/src/cmconnectionmethodwrapper.cpp
cmmanager/cmmgr/cmmapi/src/cmdestination.cpp
cmmanager/cmmgr/cmmapi/src/cmdestinationext.cpp
cmmanager/cmmgr/cmmapi/src/cmdestinationwrapper.cpp
cmmanager/cmmgr/cmmapi/src/cmmanagerapi.cpp
cmmanager/cmmgr/cmmapi/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h
cmmanager/cmmgr/cmmpluginbase/BWinsCw/cmmpluginbaseu.def
cmmanager/cmmgr/cmmpluginbase/EABI/cmmpluginbaseu.def
cmmanager/cmmgr/cmmpluginbase/group/cmmpluginbase.mmp
cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp
cmmanager/cmmgr/cmmpluginbase/traces/OstTraceDefinitions.h
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/src/cmpluginlan.cpp
cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp
cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpn.cpp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/cmpluginwlan.mmp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp
cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/OstTraceDefinitions.h
cmmanager/cmmgr/cmmplugins/group/bld.inf
cmmanager/cmmgr/cmmserver/group/cmmserver.mmp
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/cmmdestinationinstance.h
cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h
cmmanager/cmmgr/cmmserver/inc/cmminstancemapping.h
cmmanager/cmmgr/cmmserver/inc/cmmserver.h
cmmanager/cmmgr/cmmserver/inc/cmmsession.h
cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.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/cmmdestinationinstance.cpp
cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp
cmmanager/cmmgr/cmmserver/src/cmminstancemapping.cpp
cmmanager/cmmgr/cmmserver/src/cmmserver.cpp
cmmanager/cmmgr/cmmserver/src/cmmsession.cpp
cmmanager/cmmgr/cmmserver/src/cmmtransactionhandler.cpp
cmmanager/cmmgr/cmmserver/traces/OstTraceDefinitions.h
cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h
cmmanager/cmmgr/database/src/cmmanagertableformats.cpp
cmmanager/cmmgr/database/src/datamobilitycommsdattypes.cpp
cmmanager/connection_settings_shim/bwins/connection_settings_shimu.def
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/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/tsrc/ut/testcmmgrshim.cpp
cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.h
cmmanager/cpdestinationplugin/inc/cpdestinationentryitem.h
cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h
cmmanager/cpdestinationplugin/inc/cpiapitem.h
cmmanager/cpdestinationplugin/res/cpdestinationplugindialogs.docml
cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp
cmmanager/cpdestinationplugin/src/cpiapitem.cpp
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/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/connectionview/res/connectionview.css
connectionmonitoring/connectionview/src/connectionview.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/connectionstatuspopup.cpp
connectionutilities/confirmqueries/res/prompt_abroad.docml
connectionutilities/confirmqueries/res/prompt_home.docml
data/cccccc00_emulator.cre
dbcreator/commsdatstartup/cenrep/keys_commsdatcreator.xls
ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h
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/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_pub/connection_settings_api/inc/cmconnectionmethoddef.h
keepalive/flextimer/test/testflextimer/group/bld.inf
--- a/accesspointcontrol/apcontrollistplugin/data/10281BB4.rss	Thu May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +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_nwp_apn_added
-//
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_nwp_apn_added                         
-    { 
-    buf = qtn_acl_conf_nw_provided_apn_added; 
-    }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_apn_added 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_apn_added { buf = qtn_acl_conf_apn_added ; }
-
-//----------------------------------------------------
-//   
-//    r_qtn_acl_conf_apn_removed 
-//
-//----------------------------------------------------
-//
-RESOURCE TBUF r_qtn_acl_conf_apn_removed { buf = qtn_acl_conf_apn_removed ; }
-
-//----------------------------------------------------
-//   
-//    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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +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(); 
-		
-	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();
-		
-	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;
-	} ;
-
-#endif
-
-// End of file
--- a/accesspointcontrol/apcontrollistplugin/inc/apcontrollistbox.h	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,709 +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)
-	{
-	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()
-	{
-	if ( iStatus != KErrNone )
-		{
-		CLOG( ( ESelector, 0, _L( "Bad RequestStatus: %d for request: %d" ), 
-													iStatus.Int(), iRequest) );	    
-
-		// KErrOverflow can occur during APN adding process, if the APN list is full
-		// or there is no space for an additional entry in SIM card.
-	    if( iStatus.Int() == KErrOverflow && iRequest == EAddAPN)
-	        {
-            HBufC* text = StringLoader::LoadLC ( 
-                R_QTN_ACL_ERR_SIM_CARD );
-            CAknErrorNote* note = new ( ELeave ) CAknErrorNote(
-                 ETrue );
-            note->ExecuteLD( *text );
-
-            CleanupStack::PopAndDestroy( text );
-	        }
-	    
-	    iRequest = ENoRequest;  
-
-		return;
-		}
-	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);        
-			iPlugin.ShowConfirmNoteAPNL(R_QTN_ACL_CONF_APN_ADDED, tptrc);
-			}
-		else
-			{
-			HBufC* buf = StringLoader::LoadLC ( 
-						R_QTN_ACL_NETWORK_PROVIDED_APN );
-			TPtrC itemPtr(buf->Des());
-			iPlugin.Container()->AddToListBoxL(itemPtr);			
-			CleanupStack::PopAndDestroy( buf );
-			iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_NWP_APN_ADDED);
-			}
-	    break; 	        
-	    } 
-	case ERemoveAPNSecurity:
-		CLOG( ( ESelector, 0, _L( "ERemoveAPNSecurity OK" ) ) );
-		iSecurityChecked = ETrue;
-		DoRemoveAPN();
-	    break; 
-	case ERemoveAPN: 
-		iRequest = ENoRequest;	
-		CLOG( ( ESelector, 0, _L( "ERemoveAPN OK" ) ) );
-		iPlugin.ShowConfirmNoteL(R_QTN_ACL_CONF_APN_REMOVED);	
-		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::ReadData" ) ) );
-	if( !IsActive() )
-		{
-		iRequest = EEnumerateAPN;			
-		iIndex = 0;
-		iPhone.EnumerateAPNEntries(iStatus, iSize);
-		SetActive();
-		}    
-    CLOG( ( ESelector, 0, _L( "<- CAPControlListAPIWrapper::ReadData" ) ) );
-    }
-    
-// ---------------------------------------------------------
-// CAPControlListAPIWrapper::DeActivateACLL()
-// ---------------------------------------------------------
-//
-void CAPControlListAPIWrapper::DeActivateACL()
-    {   	
-    CLOG( ( ESelector, 0, _L( 
-    			"-> CAPControlListAPIWrapper::DeActivateACLL" ) ) );
-	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" ) ) );
-	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" ) ) );
-	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" ) ) );
-    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" ) ) );
-	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" ) ) );
-	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" ) ) );
-    }
--- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistbox.cpp	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 );
-            }
-        
-	    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);
-    	  		
-	    
-        AppUi()->AddToViewStackL( *this, iContainer );
-        }
-    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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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
-
--- a/apengine/apsettingsplugin/data/1020736C.rss	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +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()
-    {
-    // RunSettingsL API removed from new cmmgr implementation
-    //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 May 27 14:35:19 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 May 27 14:35:19 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/bearermanagement/mpm/group/mpmserver.mmp	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/group/mpmserver.mmp	Thu Jun 10 16:00:16 2010 +0300
@@ -39,7 +39,6 @@
 SOURCE            mpmserversession.cpp
 SOURCE            mpmserver.cpp
 SOURCE            mpmstarter.cpp
-SOURCE            mpmdisconnectdlg.cpp
 SOURCE            mpmdtmwatcher.cpp
 SOURCE            mpmroamingwatcher.cpp 
 SOURCE            mpmconfirmdlg.cpp
@@ -61,12 +60,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
--- a/bearermanagement/mpm/inc/mpmconnmonevents.h	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmconnmonevents.h	Thu Jun 10 16:00:16 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"
@@ -96,8 +96,7 @@
         /**
         * Two-phased constructor.
         */
-        static CMPMConnMonEvents* NewL( CMPMServer& aServer, 
-                                        CMPMServerSession& aSession );
+        static CMPMConnMonEvents* NewL( CMPMServer& aServer );
 
         /**
         * Destructor.
@@ -243,7 +242,7 @@
         * @param aSession Pointer to session
         * @since 3.1
         */
-        void CancelScanL( CMPMServerSession& aSession );
+        void CancelScanL( CMPMServerSession* aSession );
 
         /**
         * Gets the presumed Iap Id of Connection Id.
@@ -319,7 +318,7 @@
         /**
         * 2nd phase constructor.
         */
-        void ConstructL( CMPMServerSession& aSession );
+        void ConstructL();
 
     private: // Data
         // Handle to connection monitor
--- a/bearermanagement/mpm/inc/mpmconnmonreqs.h	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmconnmonreqs.h	Thu Jun 10 16:00:16 2010 +0300
@@ -46,7 +46,7 @@
         static CMPMConnMonReqs* NewL( CMPMConnMonEvents& aParent,
                                       RConnectionMonitor& aConnMon,
                                       TUint aConnId,
-                                      CMPMServerSession& aSession );
+                                      CMPMServerSession* aSession );
 
         /**
         * Destructor.
@@ -132,7 +132,7 @@
         CMPMConnMonReqs( CMPMConnMonEvents&  aParent,
                          RConnectionMonitor& aConnMon,
                          TUint aConnId, 
-                         CMPMServerSession&  aSession );
+                         CMPMServerSession* aSession );
 
         /**
         * 2nd phase constructor.
@@ -170,9 +170,8 @@
         TConnMonIapInfoBuf iIapBuf;
 
         // MPM server session which requested the service
-        // After service completes callback function is called through 
-        // the reference.
-        CMPMServerSession& iSession;
+        // After service completes callback function is called
+        CMPMServerSession* iSession;
 
         // Used for first session start to wait until necessary data available
         CActiveSchedulerWait iActiveSchedulerWait;        
--- a/bearermanagement/mpm/inc/mpmdisconnectdlg.h	Thu May 27 14:35:19 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/mpmserver.h	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.h	Thu Jun 10 16:00:16 2010 +0300
@@ -49,9 +49,8 @@
 //
 const TInt    KPhoneRetryTimeout = 100000;
 
-// 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
@@ -187,7 +186,6 @@
 class CMPMConnMonEvents;
 class CMPMServerSession;
 class CMPMDtmWatcher;
-class CMPMDisconnectDlg;
 class CMPMConfirmDlgRoaming;
 class CMPMConfirmDlgStarting;
 class CMPMDefaultConnection;
@@ -588,13 +586,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.
@@ -880,9 +871,6 @@
         // 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;
 
--- a/bearermanagement/mpm/inc/mpmserver.inl	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.inl	Thu Jun 10 16:00:16 2010 +0300
@@ -72,15 +72,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CMPMServer::DisconnectQueue
-// -----------------------------------------------------------------------------
-//
-inline CArrayPtrFlat<CMPMDisconnectDlg>* CMPMServer::DisconnectQueue()
-    {
-    return iDisconnectQueue;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServer::RoamingQueue
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/inc/mpmserversession.h	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserversession.h	Thu Jun 10 16:00:16 2010 +0300
@@ -53,7 +53,6 @@
 _LIT( KIapProxyServiceSetting, "IAP\\IAPService" );
 
 // FORWARD DECLARATIONS
-class CMPMDisconnectDlg;
 class CMPMConfirmDlgRoaming;
 class CMPMCommsDatAccess;
 class CMPMIapSelection;
@@ -592,7 +591,7 @@
         * @param aMessage message from client
         */
         void HandleServerProcessErrorL(const RMessage2& aMessage);
-
+        
         /**
         * Handling of prefered IAP notification registration.
         * @since 3.1
@@ -822,7 +821,7 @@
         * @param aUid Application Uid
         */
         TBool IsBackgroundApplication( TUint32 aUid ) const;
-
+        
         /**
         * Checks if disconnect dialog should be displayed for this error
         * @since 3.2
@@ -874,9 +873,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;
 
@@ -945,11 +941,6 @@
         // Set when this session is user connection
 		    //
         TBool iUserConnection;
-        
-        // Set when disconnect dialog is shown to avoid 
-        // showing duplicate cellulara data usage dialog
-        //
-        TBool iDisconnectDialogShown;
     };
 
 #include "mpmserversession.inl"
--- a/bearermanagement/mpm/inc/mpmserversession.inl	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserversession.inl	Thu Jun 10 16:00:16 2010 +0300
@@ -16,15 +16,6 @@
 */
 
 // -----------------------------------------------------------------------------
-// CMPMServerSession::SetDisconnectDlgPtrNull
-// -----------------------------------------------------------------------------
-//
-inline void CMPMServerSession::SetDisconnectDlgPtrNull()
-    {
-    iDisconnectDlg = NULL;
-    }
-
-// -----------------------------------------------------------------------------
 // CMPMServerSession::SetConfirmDlgRoamingPtrNull
 // -----------------------------------------------------------------------------
 //
--- a/bearermanagement/mpm/src/mpmconnmonevents.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconnmonevents.cpp	Thu Jun 10 16:00:16 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"
@@ -35,12 +35,11 @@
 // CMPMConnMonEvents::NewL
 // -----------------------------------------------------------------------------
 //             
-CMPMConnMonEvents* CMPMConnMonEvents::NewL( CMPMServer& aServer, 
-                                            CMPMServerSession& aSession )
+CMPMConnMonEvents* CMPMConnMonEvents::NewL( CMPMServer& aServer )
     {
     CMPMConnMonEvents* self = new ( ELeave ) CMPMConnMonEvents( aServer );
     CleanupStack::PushL( self );
-    self->ConstructL( aSession );
+    self->ConstructL();
     CleanupStack::Pop( self );
     return self;
     }
@@ -74,7 +73,7 @@
 // CMPMConnMonEvents::ConstructL
 // -----------------------------------------------------------------------------
 // 
-void CMPMConnMonEvents::ConstructL( CMPMServerSession& aSession )
+void CMPMConnMonEvents::ConstructL()
     {
     MPMLOGSTRING( "CMPMConnMonEvents::ConstructL" )
     // Connect to Connection Monitor
@@ -93,7 +92,8 @@
     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
                                 *const_cast<CMPMConnMonEvents*>( this ),
                                 iConnMon,
-                                aSession.ConnectionId(), aSession );
+                                0,
+                                NULL );
     CleanupStack::PushL( req );
     iReqPtrs.AppendL( req ); 
     req->AvailableIapsSync();
@@ -566,7 +566,7 @@
                                 *const_cast<CMPMConnMonEvents*>( this ),
                                 iConnMon,
                                 aId, 
-                                *aSession );
+                                aSession );
     CleanupStack::PushL( req );
     iReqPtrs.AppendL( req ); 
     req->RefreshAvailableIAPs( aCallback, aForceRefreshIntervalSeconds );
@@ -578,7 +578,7 @@
 // CMPMConnMonEvents::CancelScanL
 // -----------------------------------------------------------------------------
 // 
-void CMPMConnMonEvents::CancelScanL( CMPMServerSession& aSession )
+void CMPMConnMonEvents::CancelScanL( CMPMServerSession* aSession )
     {
     MPMLOGSTRING( "CMPMConnMonEvents::CancelScanL" )
 
@@ -589,7 +589,7 @@
     CMPMConnMonReqs* req = CMPMConnMonReqs::NewL( 
                                 *const_cast<CMPMConnMonEvents*>( this ),
                                 iConnMon,
-                                aSession.ConnectionId(), 
+                                aSession->ConnectionId(), 
                                 aSession );
     // Delete ongoing req, if found
     TInt index = iReqPtrs.Find(req, CMPMConnMonReqs::CompareConnIds);
--- a/bearermanagement/mpm/src/mpmconnmonreqs.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconnmonreqs.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -37,7 +37,7 @@
 CMPMConnMonReqs* CMPMConnMonReqs::NewL(CMPMConnMonEvents& aParent,
                                        RConnectionMonitor& aConnMon,
                                        TUint aConnId, 
-                                       CMPMServerSession& aSession )
+                                       CMPMServerSession* aSession )
     {
     CMPMConnMonReqs* self = new (ELeave) CMPMConnMonReqs(
                                 aParent, aConnMon, aConnId, aSession );
@@ -55,7 +55,7 @@
 CMPMConnMonReqs::CMPMConnMonReqs(CMPMConnMonEvents& aParent,
                                  RConnectionMonitor& aConnMon,
                                  TUint aConnId, 
-                                 CMPMServerSession& aSession )
+                                 CMPMServerSession* aSession )
     : CActive(CActive::EPriorityStandard), 
       iParent(aParent), 
       iConnMon(aConnMon), 
@@ -227,6 +227,7 @@
         case EScanWLANNetworksStateCached:
             {
             MPMLOGSTRING( "CMPMConnMonReqs::ErrorCallbackL: EScanWLANNetworksState failed" )
+            ASSERT( iSession );
 
             // Disable discarding availability notifications from Connection Monitor.
             // 
@@ -237,23 +238,23 @@
             // 
             if( iWlanScanCallback == EWlanScanCallbackChooseIap )
                 {
-                iSession.IapSelectionL()->ChooseIapWLANScanCompletedL( aStatus );
+                iSession->IapSelectionL()->ChooseIapWLANScanCompletedL( aStatus );
                 }
             else if( iWlanScanCallback == EWlanScanCallbackProcessErr )
                 {
-                iSession.ProcessErrorWlanScanCompletedL();
+                iSession->ProcessErrorWlanScanCompletedL();
                 }
             else if( iWlanScanCallback == EWlanScanCallbackCarrierRejected )
                 {
                 // No fresh IAP info available but try to select new IAP
                 // based on whatever existing info there is
                 // 
-                iSession.CompleteCarrierRejected();
+                iSession->CompleteCarrierRejected();
                 }
             else if( iWlanScanCallback == EWlanScanCallbackSortSnap )
                 {
                 // SortSnap was called with old availability information.
-                iSession.CompleteServerSortSNAP();
+                iSession->CompleteServerSortSNAP();
                 }
             else
                 {
@@ -326,6 +327,8 @@
             case EScanWLANNetworksStateCached:
                 {
                 MPMLOGSTRING( "CMPMConnMonReqs::RunL: EScanWLANNetworksState and EScanWLANNetworksStateCached" )
+                ASSERT( iSession );
+
                 if ( iNextState == EScanWLANNetworksState )
                     {
                     MPMLOGSTRING( "CMPMConnMonReqs::RunL: EScanWLANNetworksState fresh data available from ConnMon" )
@@ -349,19 +352,19 @@
                 // 
                 if( iWlanScanCallback == EWlanScanCallbackChooseIap )
                     {
-                    iSession.IapSelectionL()->ChooseIapWLANScanCompletedL( iStatus.Int() );
+                    iSession->IapSelectionL()->ChooseIapWLANScanCompletedL( iStatus.Int() );
                     }
                 else if( iWlanScanCallback == EWlanScanCallbackProcessErr )
                     {
-                    iSession.ProcessErrorWlanScanCompletedL();
+                    iSession->ProcessErrorWlanScanCompletedL();
                     }
                 else if( iWlanScanCallback == EWlanScanCallbackCarrierRejected )
                     {
-                    iSession.CompleteCarrierRejected();
+                    iSession->CompleteCarrierRejected();
                     }
                 else if( iWlanScanCallback == EWlanScanCallbackSortSnap )
                     {
-                    iSession.CompleteServerSortSNAP();
+                    iSession->CompleteServerSortSNAP();
                     }
                 else
                     {
@@ -398,9 +401,7 @@
 
 TInt CMPMConnMonReqs::RunError( TInt aError )
     {
-    MPMLOGSTRING2(
-        "CMPMConnMonReqs::RunError: RunL made a leave with error = %i", 
-        aError )
+    MPMLOGSTRING2( "CMPMConnMonReqs::RunError: RunL made a leave with error = %i", aError )
 
     // Disable discarding availability notifications from Connection Monitor.
     // 
@@ -410,12 +411,14 @@
     // 
     if( iWlanScanCallback == EWlanScanCallbackChooseIap )
         {
-        iSession.ChooseIapComplete( aError, NULL );
+        ASSERT( iSession );
+        iSession->ChooseIapComplete( aError, NULL );
         }
     else if( iWlanScanCallback == EWlanScanCallbackProcessErr )
         {
         TBMNeededAction neededAction( EPropagateError );
-        iSession.ProcessErrorComplete( KErrNone, &aError, &neededAction );
+        ASSERT( iSession );
+        iSession->ProcessErrorComplete( KErrNone, &aError, &neededAction );
         }
     else
         {
--- a/bearermanagement/mpm/src/mpmdisconnectdlg.cpp	Thu May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +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" )
-
-    TBMNeededAction neededAction( EDoReselection );
-    TInt error = aError;
-
-    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 );
-
-    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;
-
-        // Get the current connection IapId for this connId 
-        //
-        TUint32 currentIap = iSession.MyServer().GetBMIap( connId );
-
-        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.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 )
-
-    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/mpmserver.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserver.cpp	Thu Jun 10 16:00:16 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,7 +34,6 @@
 #include "mpmlogger.h"
 #include "mpmdtmwatcher.h"
 #include "mpmroamingwatcher.h"
-#include "mpmdisconnectdlg.h"
 #include "mpmconfirmdlgroaming.h"
 #include "mpmconfirmdlgstarting.h"
 #include "mpmcommsdataccess.h"
@@ -84,7 +83,6 @@
       iPacketServLoaded( EFalse ), 
       iDtmWatcher( NULL ), 
       iWLANScanRequired( EFalse ), 
-      iDisconnectQueue( NULL ), 
       iRoamingQueue( NULL ), 
       iStartingQueue( NULL ),
       iConnectionCounter( 0 ),
@@ -149,9 +147,6 @@
     iRoamingWatcher = CMPMRoamingWatcher::NewL(iMobilePhone);
 
     iCommsDatAccess = CMPMCommsDatAccess::NewL( );
-    
-    iDisconnectQueue = new ( ELeave ) CArrayPtrFlat<CMPMDisconnectDlg>( KGranularity );
-    iDisconnectQueue->Reset();
 
     iRoamingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgRoaming>( KGranularity );
     iRoamingQueue->Reset();
@@ -226,12 +221,6 @@
         iRoamingToWlanPeriodic->Cancel();
 		delete iRoamingToWlanPeriodic;
         }
-    if ( iDisconnectQueue )
-        {
-        iDisconnectQueue->ResetAndDestroy();
-        }
-    delete iDisconnectQueue;
-
     if ( iRoamingQueue )
         {
         iRoamingQueue->ResetAndDestroy();
@@ -842,6 +831,11 @@
     TInt index = iSessions.Find( aSession );
     if ( index != KErrNotFound )
         {
+        if ( Events() )
+            {
+            // Cancel WLAN scan request if one exists
+            TRAP_IGNORE( Events()->CancelScanL( iSessions[index] ) )
+            }
         iSessions.Remove( index );
         }
     }
--- a/bearermanagement/mpm/src/mpmserversession.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserversession.cpp	Thu Jun 10 16:00:16 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,7 +38,6 @@
 #include "mpmcommsdataccess.h"
 #include "mpmserversession.h"
 #include "mpmconnmonevents.h"
-#include "mpmdisconnectdlg.h"
 #include "mpmconfirmdlgstarting.h"
 #include "mpmconfirmdlgroaming.h"
 #include "mpmlogger.h"
@@ -69,12 +68,10 @@
 CMPMServerSession::CMPMServerSession(CMPMServer& aServer)
     : CSession2(), 
       iMyServer( aServer ),
-      iDisconnectDlg( NULL ),
       iConfirmDlgRoaming( NULL ),
       iStoredIapInfo(),
       iIapSelection( NULL ),
-      iMigrateState( EMigrateNone ),
-      iDisconnectDialogShown( EFalse )
+      iMigrateState( EMigrateNone )
     {
     }
 
@@ -89,7 +86,7 @@
     if ( !iMyServer.Events() )
         {
         iMyServer.SetEvents(CMPMConnMonEvents::NewL(
-            *const_cast<CMPMServer*>( &iMyServer ), *this ));
+            *const_cast<CMPMServer*>( &iMyServer ) ) );
         }
 
     // Append session pointer to server
@@ -104,7 +101,6 @@
 //
 CMPMServerSession::~CMPMServerSession()
     {
-    delete iDisconnectDlg;
     delete iConfirmDlgRoaming;
     delete iIapSelection;
 
@@ -420,8 +416,7 @@
         }
 
     // 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();
 
@@ -478,7 +473,7 @@
             
             // Cancel WLAN scan request if one exists
             //
-            TRAP_IGNORE( iMyServer.Events()->CancelScanL( *this ) )
+            TRAP_IGNORE( iMyServer.Events()->CancelScanL( this ) )
             
             if ( iIapSelection )
                 {
@@ -500,15 +495,8 @@
 
             // Cancel WLAN scan request if one exists
             //
-            TRAP_IGNORE( iMyServer.Events()->CancelScanL( *this ) )
-
-            if ( iDisconnectDlg )
-                {
-                MPMLOGSTRING( "CMPMServerSession::HandleServerCancelRequest: \
-removing dconn dlg" )
-                delete iDisconnectDlg;
-                iDisconnectDlg = NULL;
-                }
+            TRAP_IGNORE( iMyServer.Events()->CancelScanL( this ) )
+
             return;
             }
         case EMPMWaitNotification:
@@ -527,7 +515,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;
@@ -809,21 +797,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 for this IAP" )
-            isConfirmFirst = EFalse;
-            iDisconnectDialogShown = EFalse;
-            }
         }
     else 
         {
@@ -1385,20 +1358,7 @@
         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 ) )
-        {
-        // 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 );
-        }
-
+    
     // Read the Connection Id of the application
     // 
     TConnectionId connId = iProcessErrorMessage.Int1();
@@ -1414,6 +1374,25 @@
     //
     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 );
+        }  
+
     TConnMonIapInfo availableIAPs;
     availableIAPs = GetAvailableIAPs();
 
@@ -1425,6 +1404,8 @@
     // 
     TConnectionState state;
     iMyServer.GetConnectionState( connId, state );
+    MPMLOGSTRING2(
+        "CMPMServerSession::HandleServerProcessErrorL - state %d", state )
 
     // We need to blacklist the presumed IAP too
     // 
@@ -1435,248 +1416,211 @@
     // 
     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 );
-            return;
-            }
-        }
-    else if ( state == EStarted )
-        {
-        // Process error according to the fact that the connection 
-        // has already been started.
-        //         
-        if ( ( error == KErrCancel ) || ( error == KErrTimedOut ) )
-            {
-            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.
+            //         
+            if ( ( error == KErrCancel ) || ( error == KErrTimedOut ) )
                 {
                 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 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;
+    
+                    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;
         }
     }
 
@@ -3317,10 +3261,11 @@
         // Otherwise the popup is not shown.
         iMyServer.ConnUiUtils()->ConnectionErrorDiscreetPopup( aError );
         }
-    else
+    else if ( aError == KErrNone )
         {
         if (!( iIapSelection->MpmConnPref().NoteBehaviour() &
-            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
+            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) &&
+            ( IsMMSIap( aPolicyPref->IapId() ) == EFalse ) )
             {
             TBool connectionAlreadyActive =
                 MyServer().CheckIfStarted( aPolicyPref->IapId(), iConnId );
@@ -3341,9 +3286,6 @@
                                               TBMNeededAction* aNeededAction )
     {
     MPMLOGSTRING2( "CMPMServerSession::ProcessErrorComplete aError = %d", aError )
-
-    delete iDisconnectDlg;
-    iDisconnectDlg = NULL;
     
     if ( !iProcessErrorMessage.IsNull() )
         {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.docml	Thu Jun 10 16:00:16 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>
--- a/cmmanager/cmmgr/cmmapi/inc/cmmanagerapi.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/inc/cmmanagerapi.h	Thu Jun 10 16:00:16 2010 +0300
@@ -56,13 +56,13 @@
             CCmDestinationWrapper* aDestinationWrapper );
     TInt RemoveDestinationWrapper(
             CCmDestinationWrapper* aDestinationWrapper );
-    CCmDestinationWrapper* GetDestinationWrapperL( const TInt& aHandle );
+    CCmDestinationWrapper* GetDestinationWrapperL( const TInt aHandle );
 
     TInt StoreConnMethodWrapper(
             CCmConnectionMethodWrapper* aConnMethodWrapper );
     TInt RemoveConnMethodWrapper(
             CCmConnectionMethodWrapper* aConnMethodWrapper );
-    CCmConnectionMethodWrapper* GetConnMethodWrapperL( const TInt& aHandle );
+    CCmConnectionMethodWrapper* GetConnMethodWrapperL( const TInt aHandle );
 
     TInt GetBearerInfoInt(
             const TUint32 aBearerType,
--- a/cmmanager/cmmgr/cmmapi/src/cmconnectionmethodwrapper.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/src/cmconnectionmethodwrapper.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -87,7 +87,10 @@
         }
 
     iCmManagerApi = aCmManagerApi;
-    iCmConnectionMethodApi.ConnectAndGetConnMethodWithIdL( *aCmManagerApi, aIapId, aExistingHandle );
+    iCmConnectionMethodApi.ConnectAndGetConnMethodWithIdL(
+            *aCmManagerApi,
+            aIapId,
+            aExistingHandle );
     if ( !aExistingHandle )
         {
         iCmManagerApi->StoreConnMethodWrapper( this );
--- a/cmmanager/cmmgr/cmmapi/src/cmdestination.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestination.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -151,7 +151,8 @@
     if ( existingHandle )
         {
         CleanupStack::PopAndDestroy( cmWrapper );
-        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL( existingHandle );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
         cmWrapper->IncreaseReferenceCounter();
         }
     else
--- a/cmmanager/cmmgr/cmmapi/src/cmdestinationext.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestinationext.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -151,7 +151,8 @@
     if ( existingHandle )
         {
         CleanupStack::PopAndDestroy( cmWrapper );
-        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL( existingHandle );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
         cmWrapper->IncreaseReferenceCounter();
         }
     else
@@ -191,7 +192,8 @@
     if ( existingHandle )
         {
         CleanupStack::PopAndDestroy( cmWrapper );
-        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL( existingHandle );
+        cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+                existingHandle );
         cmWrapper->IncreaseReferenceCounter();
         }
     else
--- a/cmmanager/cmmgr/cmmapi/src/cmdestinationwrapper.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestinationwrapper.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -145,7 +145,10 @@
         }
 
     iCmManagerApi = aCmManagerApi;
-    iCmDestinationApi.ConnectAndGetConnMethodAsEmbeddedDestL( *aCmManagerApi, aConnMethodHandle, aExistingHandle );
+    iCmDestinationApi.ConnectAndGetConnMethodAsEmbeddedDestL(
+            *aCmManagerApi,
+            aConnMethodHandle,
+            aExistingHandle );
     if ( !aExistingHandle )
         {
         iCmManagerApi->StoreDestinationWrapper( this );
--- a/cmmanager/cmmgr/cmmapi/src/cmmanagerapi.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/src/cmmanagerapi.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -161,7 +161,7 @@
 // RCmManagerApi::GetDestinationWrapperL()
 //-----------------------------------------------------------------------------
 //
-CCmDestinationWrapper* RCmManagerApi::GetDestinationWrapperL( const TInt& aHandle )
+CCmDestinationWrapper* RCmManagerApi::GetDestinationWrapperL( const TInt aHandle )
     {
     OstTraceFunctionEntry0( RCMMANAGERAPI_GETDESTINATIONWRAPPER_ENTRY );
 
@@ -225,7 +225,7 @@
 // RCmManagerApi::GetConnMethodWrapperL()
 //-----------------------------------------------------------------------------
 //
-CCmConnectionMethodWrapper* RCmManagerApi::GetConnMethodWrapperL( const TInt& aHandle )
+CCmConnectionMethodWrapper* RCmManagerApi::GetConnMethodWrapperL( const TInt aHandle )
     {
     OstTraceFunctionEntry0( RCMMANAGERAPI_GETCONNMETHODWRAPPER_ENTRY );
 
--- a/cmmanager/cmmgr/cmmapi/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmapi/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h	Thu Jun 10 16:00:16 2010 +0300
@@ -69,20 +69,20 @@
 const TInt KBitsToShiftDestProtectionLevel = 28;
 
 
-// Buffer size for initial connection method query
+// Buffer size for initial connection method query.
 const TInt KCmmConnMethodAmountNormal = 64; //TODO, Check value
-// Maximum theoretical amount of connection methods
+// Maximum theoretical amount of connection methods.
 const TInt KCmmConnMethodAmountMax = 256;
 
-// Buffer size for initial destination query
+// Buffer size for initial destination query.
 const TInt KCmmDestAmountNormal = 32;
-// Maximum theoretical amount of connection methods
+// Maximum theoretical amount of connection methods.
 const TInt KCmmDestAmountMax = 256;
 
-// Buffer size for supported bearers query
+// Buffer size for supported bearers query.
 const TInt KCmmBearerAmountNormal = 10;
 
-// Buffer size for bearer priority array query, first attempt
+// Buffer size for bearer priority array query, first attempt.
 const TInt KCmmDefaultBearerPriorityArraySize = 256;
 
 // iPriority:           2 16-bit values,
@@ -90,8 +90,14 @@
 // 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" );
 
-// Opcodes used in message passing between client and server
+// Minimum disk space required for writing operations.
+const TInt KMinimumDiskSpace = 8192;
+
+// Opcodes used in message passing between client and server.
 enum TCmmRequests
     {
     ECmmGetBearerInfoInt                     = 0,
--- a/cmmanager/cmmgr/cmmpluginbase/BWinsCw/cmmpluginbaseu.def	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmpluginbase/BWinsCw/cmmpluginbaseu.def	Thu Jun 10 16:00:16 2010 +0300
@@ -24,4 +24,5 @@
 	?UpdateL@CCmPluginBaseEng@@UAEXPAVCCmClientPluginInstance@@@Z @ 23 NONAME ; void CCmPluginBaseEng::UpdateL(class CCmClientPluginInstance *)
 	?GetStringAttributeL@CCmPluginBaseEng@@QAEPAVHBufC16@@KPAVCCmClientPluginInstance@@@Z @ 24 NONAME ; class HBufC16 * CCmPluginBaseEng::GetStringAttributeL(unsigned long, class CCmClientPluginInstance *)
 	??1CCmClientPluginInstance@@UAE@XZ @ 25 NONAME ; CCmClientPluginInstance::~CCmClientPluginInstance(void)
+	?CopyRecordFieldsL@CCmPluginBaseEng@@IAEXAAVCMDBRecordBase@CommsDat@@0@Z @ 26 NONAME ; void CCmPluginBaseEng::CopyRecordFieldsL(class CommsDat::CMDBRecordBase &, class CommsDat::CMDBRecordBase &)
 
--- a/cmmanager/cmmgr/cmmpluginbase/EABI/cmmpluginbaseu.def	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmpluginbase/EABI/cmmpluginbaseu.def	Thu Jun 10 16:00:16 2010 +0300
@@ -31,4 +31,5 @@
 	_ZNK16CCmPluginBaseEng30GetGenericTableIdsToBeObservedER6RArrayImE @ 30 NONAME
 	_ZTI16CCmPluginBaseEng @ 31 NONAME
 	_ZTV16CCmPluginBaseEng @ 32 NONAME
+	_ZN16CCmPluginBaseEng17CopyRecordFieldsLERN8CommsDat14CMDBRecordBaseES2_ @ 33 NONAME
 
--- a/cmmanager/cmmgr/cmmpluginbase/group/cmmpluginbase.mmp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmpluginbase/group/cmmpluginbase.mmp	Thu Jun 10 16:00:16 2010 +0300
@@ -32,6 +32,7 @@
 // Component specific internal headers
 USERINCLUDE     ../inc
 USERINCLUDE     ../../cmmserver/inc
+USERINCLUDE     ../../cmmcommon/inc
 USERINCLUDE     ../traces
 
 // ADO specific internal headers
--- a/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmpluginbase/src/ccmpluginbaseeng.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -21,7 +21,9 @@
 #include <cmpluginbaseeng.h>
 #include <cmpsettingsconsts.h>
 #include <featmgr.h>
-
+#include <cmpluginembdestinationdef.h>
+
+#include "cmmserverdefs.h"
 #include "ccmpluginbaseengtextresolver.h"
 
 #include "OstTraceDefinitions.h"
@@ -136,7 +138,7 @@
     iWapIPBearerRecord = NULL;
     iMetaDataRecord = NULL;
 
-    iIapId = 0;
+    iCmId = 0;
     iMetadataTableId = 0;
     iLocationEnabled = EFalse;
 
@@ -151,7 +153,7 @@
     {
     OstTraceFunctionEntry0( DUP1_CCMPLUGINBASEENG_CCMPLUGINBASEENG_ENTRY );
 
-    iIapId = 0;
+    iCmId = 0;
     delete iIapRecord; iIapRecord = NULL;
     delete iProxyRecord; iProxyRecord = NULL;
     delete iServiceRecord; iServiceRecord = NULL;
@@ -297,7 +299,7 @@
 
     ResetBearerRecords();
 
-    LoadL( iIapId );
+    LoadL( iCmId );
 
     OstTraceFunctionExit0( CCMPLUGINBASEENG_RELOAD_EXIT );
     }
@@ -310,6 +312,13 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADL_ENTRY );
 
+    // Embedded destination must be handled separately first.
+    if ( aIapId > KCmDefaultDestinationAPTagId )
+        {
+        iCmId = aIapId;
+        return;
+        }
+
     DoLoadL( aIapId );
 
     OstTraceFunctionExit0( CCMPLUGINBASEENG_LOADL_EXIT );
@@ -323,7 +332,7 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_CREATENEWL_ENTRY );
 
-    if ( iIapId )
+    if ( iCmId )
         // we already have IAP id ->
         {
         User::Leave( KErrAlreadyExists );
@@ -366,7 +375,7 @@
     _LIT( KDefaultConnNameTextId, "txt_occ_setlabel_connection_name_val_connection" );
     HBufC* resolvedText( NULL );
     resolvedText = CCmPluginBaseEngTextResolver::ResolveTextL( KDefaultConnNameTextId );
-    if ( resolvedText != NULL )
+    if ( resolvedText )
         {
         SetDefaultNameL( *resolvedText );
         }
@@ -383,7 +392,7 @@
     if ( aCmId != 0 )
         {
         iIapRecord->SetRecordId( aCmId );
-        iIapId = 0;
+        iCmId = 0;
         }
     else
         {
@@ -486,8 +495,12 @@
         {
         case KIapRecordIndex:
             {
-            aCopyInstance->iIapRecord = static_cast<CCDIAPRecord*>(
-                    CCDRecordBase::CreateCopyRecordL( *iIapRecord ) );
+            CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+            CleanupStack::PushL( iapRecord );
+            CopyRecordFieldsL( *iIapRecord, *iapRecord );
+            CleanupStack::Pop( iapRecord );
+            aCopyInstance->iIapRecord = iapRecord;
             }
             break;
         case KServiceRecordIndex:
@@ -499,20 +512,24 @@
             break;
         case KNetworkRecordIndex:
             {
-            aCopyInstance->iNetworkRecord = static_cast<CCDNetworkRecord*>(
-                    CCDRecordBase::CreateCopyRecordL( *iNetworkRecord ) );
+            CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+            CleanupStack::PushL( networkRecord );
+            CopyRecordFieldsL( *iNetworkRecord, *networkRecord );
+            CleanupStack::Pop( networkRecord );
+            aCopyInstance->iNetworkRecord = networkRecord;
             }
             break;
         case KWAPAPRecordIndex:
             {
             aCopyInstance->iWapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
-                    CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) );
+                    CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) );//TODO, convert to generic copy
             }
             break;
         case KWAPBearerRecordIndex:
             {
             aCopyInstance->iWapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
-                    CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) );
+                    CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) );//TODO, convert to generic copy
             }
             break;
         case KMetaDataRecordIndex:
@@ -529,8 +546,12 @@
             {
             if ( iProxyRecord )
                 {
-                aCopyInstance->iProxyRecord = static_cast<CCDProxiesRecord*>(
-                        CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) );
+                CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+                CleanupStack::PushL( proxyRecord );
+                CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
+                CleanupStack::Pop( proxyRecord );
+                aCopyInstance->iProxyRecord = proxyRecord;
                 }
             }
             break;
@@ -545,17 +566,19 @@
     }
 
 // ---------------------------------------------------------------------------
-// CCmPluginBaseEng:: CopyRecordFieldsL
+// 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.
 // ---------------------------------------------------------------------------
 //
-void CCmPluginBaseEng::CopyRecordFieldsL(
+EXPORT_C void CCmPluginBaseEng::CopyRecordFieldsL(
         CommsDat::CMDBRecordBase& aSource,
         CommsDat::CMDBRecordBase& aDestination )
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYRECORDFIELDSL_ENTRY );
 
     const SRecordTypeInfo* recordInfo = aSource.GetRecordInfo();
-    if ( recordInfo == NULL )
+    if ( !recordInfo )
         {
         User::Leave( KErrCorrupt );
         }
@@ -563,7 +586,7 @@
     CMDBElement* ptrSource( NULL );
     CMDBElement* ptrDest( NULL );
 
-    while ( recordInfo != NULL && recordInfo->iTypeId != 0 )
+    while ( recordInfo && recordInfo->iTypeId != 0 )
         {
         ptrSource = aSource.GetFieldByIdL( recordInfo->iTypeId );
         ptrDest = aDestination.GetFieldByIdL( recordInfo->iTypeId );
@@ -675,15 +698,15 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADIAPRECORDL_ENTRY );
 
-    iIapId = aIapId;
-
-    // Load IAP record
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>(
+    iCmId = aIapId;
+
+    // Load IAP record.
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(
             CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
 
     CleanupStack::PushL( iapRecord );
 
-    iapRecord->SetRecordId( iIapId );
+    iapRecord->SetRecordId( iCmId );
     iapRecord->LoadL( iSession );
 
     CleanupStack::Pop( iapRecord );
@@ -700,19 +723,18 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_LOADPROXYSETTINGL_ENTRY );
 
-    // Load Proxy record
+    // 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
+    // Now try to find the linked proxy record.
+    // Create new record.
     CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
             CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
-
     CleanupStack::PushL( proxyRecord );
 
-    // Prime record
+    // Prime record.
     TPtrC serviceType( iIapRecord->iServiceType );
     proxyRecord->iServiceType.SetL( serviceType );
     proxieRS->iRecords.AppendL( proxyRecord ); // Ownership transfered.
@@ -730,11 +752,11 @@
             {
             CCDProxiesRecord* proxyRecord = (*proxieRS)[i];
 
-            // Compare the record id of these 2 services
+            // Compare the record id of these 2 services.
             if ( TUint32( proxyRecord->iService ) == TUint32( iIapRecord->iService ) )
                 {
                 iProxyRecord = proxyRecord;
-                // Take ownership of this record
+                // Take ownership of this record.
                 proxieRS->iRecords.Remove( i );
                 break;
                 }
@@ -842,7 +864,7 @@
     CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
             aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
 
-    if ( iIapId == 0 )
+    if ( iCmId == 0 )
         {
         // Otherwise predefined iapid.
         if ( !iIapRecord->RecordId() )
@@ -874,31 +896,32 @@
 
         iIapRecord->StoreL( iSession );
 
-        iIapId = iIapRecord->RecordId();
-        aClientPluginInstance->iIapId = iIapId;
+        iCmId = iIapRecord->RecordId();
+        aClientPluginInstance->iIapId = iCmId;
 
         CCDIAPRecord* tempIapRecord = static_cast<CCDIAPRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iIapRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
         CleanupStack::PushL( tempIapRecord );
+        CopyRecordFieldsL( *iIapRecord, *tempIapRecord );
         tempIapRecord->SetElementId( iIapRecord->ElementId() );
 
         aClientPluginInstance->iGenRecordArray.Remove( KIapRecordIndex );
-        CleanupStack::PushL( iapRecord );
+        delete iapRecord;
+        iapRecord = NULL;
 
         aClientPluginInstance->iGenRecordArray.InsertL(
                 static_cast<CommsDat::CCDRecordBase*>( tempIapRecord ),
                 KIapRecordIndex );
 
-        CleanupStack::PopAndDestroy( iapRecord );
         CleanupStack::Pop( tempIapRecord );
         }
     else
         {
         delete iIapRecord;
         iIapRecord = NULL;
-
         iIapRecord = static_cast<CCDIAPRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iapRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        CopyRecordFieldsL( *iapRecord, *iIapRecord );
 
         iIapRecord->SetElementId( iapRecord->ElementId() );
         iIapRecord->ModifyL( iSession );
@@ -932,9 +955,9 @@
 
     delete iProxyRecord;
     iProxyRecord = NULL;
-
     iProxyRecord = static_cast<CCDProxiesRecord*>(
-            CCDRecordBase::CreateCopyRecordL( *proxyRecord ) );
+            CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+    CopyRecordFieldsL( *proxyRecord, *iProxyRecord );
     iProxyRecord->SetElementId( proxyRecord->ElementId() );
 
     if ( !iProxyRecord->RecordId() )
@@ -1051,7 +1074,8 @@
     CheckIfNameModifiedL( iapRecord, networkRecord );
 
     iNetworkRecord = static_cast<CCDNetworkRecord*>(
-            CCDRecordBase::CreateCopyRecordL( *networkRecord ) );
+            CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+    CopyRecordFieldsL( *networkRecord, *iNetworkRecord );
 
     iNetworkRecord->SetElementId( networkRecord->ElementId() );
 
@@ -1105,7 +1129,7 @@
 
     if ( !iProxyRecord )
         {
-        iProxyRecord = static_cast<CCDProxiesRecord *>(
+        iProxyRecord = static_cast<CCDProxiesRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
         }
 
@@ -1215,11 +1239,11 @@
     CheckIfNameModifiedL( iapRecord, wapIPBearerRecord );
 
     iWapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
-            CCDRecordBase::CreateCopyRecordL( *wapAPRecord ) );
+            CCDRecordBase::CreateCopyRecordL( *wapAPRecord ) );//TODO, convert to generic copy
     iWapAPRecord->SetElementId( wapAPRecord->ElementId() );
 
     iWapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
-            CCDRecordBase::CreateCopyRecordL( *wapIPBearerRecord ) );
+            CCDRecordBase::CreateCopyRecordL( *wapIPBearerRecord ) );//TODO, convert to generic copy
     iWapIPBearerRecord->SetElementId( wapIPBearerRecord->ElementId() );
 
     if ( !iWapAPRecord->RecordId() )
@@ -1337,7 +1361,7 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_COPYATTRIBUTES_ENTRY );
 
-    if ( aSrcRecord == NULL || aDstRecord == NULL )
+    if ( !aSrcRecord || !aDstRecord )
         {
         OstTraceFunctionExit0( CCMPLUGINBASEENG_COPYATTRIBUTES_EXIT );
         return;
@@ -1367,7 +1391,7 @@
 
     CleanupStack::PushL( wapBearerRecord );
 
-    wapBearerRecord->iWAPIAP = iIapId;
+    wapBearerRecord->iWAPIAP = iCmId;
     wapRS->iRecords.AppendL( wapBearerRecord );
 
     CleanupStack::Pop( wapBearerRecord );
@@ -1440,6 +1464,7 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINBASEENG_DOMAKEVALIDNAMEL_ENTRY );
 
+    const TInt decimalBase = 10;
     TBool changed( EFalse );
     HBufC* temp = HBufC::NewLC( KApMaxConnNameLength );
     HBufC* temp2 = HBufC::NewLC( KApMaxConnNameLength );
@@ -1464,9 +1489,9 @@
             postfix++;
             // Check the length of postfix, check text length accordingly.
             pf = postfix;
-            for ( i = 1; i < 10; i++ )
+            for ( i = 1; i < decimalBase; i++ )
                 {
-                pf /= 10;
+                pf /= decimalBase;
                 if ( !pf )
                     break;
                 }
@@ -1474,7 +1499,7 @@
             TPtr sgdptr2( temp2->Des() );
             if ( postfix )
                 {
-                if ( postfix < 10 )
+                if ( postfix < decimalBase )
                     {
                     sgdptr2 = prefix.Left( KApMaxConnNameLength - i - 3 );
                     }
@@ -1490,7 +1515,7 @@
             if ( postfix )
                 {
                 TBuf<KMaxPostfixLength> postfixString;
-                if ( postfix > 9 )
+                if ( postfix >= decimalBase )
                     {
                     postfixString.Format( KFormatLargePostfix, postfix );
 //     TODO:               AknTextUtils::LanguageSpecificNumberConversion( postfixString );
@@ -1707,7 +1732,7 @@
 
     if ( iapRS->FindL( iSession ) )
         {
-        if ( iIapId )
+        if ( iCmId )
             {
             // This is not a new CM.
             for ( TInt i = 0; i < iapRS->iRecords.Count(); ++i )
@@ -1776,7 +1801,7 @@
         }
     else if ( iNamingMethod == ENamingUnique )
         {
-        HBufC* newName = DoMakeValidNameL( aName, iIapId );
+        HBufC* newName = DoMakeValidNameL( aName, iCmId );
 
         if ( newName )
             // Name converted to unique.
@@ -1792,7 +1817,7 @@
         }
     else if ( iNamingMethod == ENamingNotAccept )
         {
-        if ( IsValidNameL( aName, iIapId ) )
+        if ( IsValidNameL( aName, iCmId ) )
             {
             iIapRecord->iRecordName.SetL( aName );
             }
@@ -2037,9 +2062,10 @@
     if ( iIapRecord )
         {
         CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iIapRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+        CleanupStack::PushL( iapRecord );
+        CopyRecordFieldsL( *iIapRecord, *iapRecord );
         iapRecord->SetElementId( iIapRecord->ElementId() );
-        CleanupStack::PushL( iapRecord );
         aClientPluginInstance->iGenRecordArray.AppendL(
                 static_cast<CommsDat::CCDRecordBase*>( iapRecord ) );
         CleanupStack::Pop( iapRecord );
@@ -2065,9 +2091,10 @@
     if ( iNetworkRecord )
         {
         CCDNetworkRecord* networkRecord = static_cast<CCDNetworkRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iNetworkRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdNetworkRecord ) );
+        CleanupStack::PushL( networkRecord );
+        CopyRecordFieldsL( *iNetworkRecord, *networkRecord );
         networkRecord->SetElementId( iNetworkRecord->ElementId() );
-        CleanupStack::PushL( networkRecord );
         aClientPluginInstance->iGenRecordArray.AppendL(
                 static_cast<CommsDat::CCDRecordBase*>( networkRecord ) );
         CleanupStack::Pop( networkRecord );
@@ -2080,7 +2107,7 @@
     if ( iWapAPRecord )
         {
         CCDWAPAccessPointRecord* wapAPRecord = static_cast<CCDWAPAccessPointRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) );
+                CCDRecordBase::CreateCopyRecordL( *iWapAPRecord ) );//TODO, convert to generic copy
         wapAPRecord->SetElementId( iWapAPRecord->ElementId() );
         CleanupStack::PushL( wapAPRecord );
         aClientPluginInstance->iGenRecordArray.AppendL(
@@ -2095,7 +2122,7 @@
     if ( iWapIPBearerRecord )
         {
         CCDWAPIPBearerRecord* wapIPBearerRecord = static_cast<CCDWAPIPBearerRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) );
+                CCDRecordBase::CreateCopyRecordL( *iWapIPBearerRecord ) );//TODO, convert to generic copy
         wapIPBearerRecord->SetElementId( iWapIPBearerRecord->ElementId() );
         CleanupStack::PushL( wapIPBearerRecord );
         aClientPluginInstance->iGenRecordArray.AppendL(
@@ -2131,9 +2158,10 @@
     if ( iProxyRecord )
         {
         CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
+        CleanupStack::PushL( proxyRecord );
+        CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
         proxyRecord->SetElementId( iProxyRecord->ElementId() );
-        CleanupStack::PushL( proxyRecord );
         aClientPluginInstance->iGenRecordArray.AppendL(
                 static_cast<CommsDat::CCDRecordBase*>( proxyRecord ) );
         CleanupStack::Pop( proxyRecord );
@@ -2164,14 +2192,25 @@
         case ECmIapId: // If the CM has an ECmIapId then the ECmIapId is the ECmId.
         case ECmId:
             {
-            retVal = static_cast<CCDIAPRecord*>(
-                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] )->RecordId();
+            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;
+                    aClientPluginInstance->iGenRecordArray[KWAPBearerRecordIndex] )
+                    ->iWAPAccessPointId;
             }
             break;
         case ECmIapServiceId:
@@ -2205,7 +2244,8 @@
             if ( iMetaDataRecord )
                 {
                 retVal = static_cast<CCDIAPMetadataRecord*>(
-                        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] )->iSeamlessness;
+                        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] )
+                        ->iSeamlessness;
                 }
             else
                 {
@@ -2227,7 +2267,8 @@
 
         case ECmLoadResult:
             {
-            retVal = KErrNone;
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported ); //TODO, update attribute definition comments.
             }
             break;
 
@@ -2289,14 +2330,34 @@
         {
         case ECmProtected:
             {
-            retVal = IsProtected();
+            if ( iBearerType == KUidEmbeddedDestination )
+                {
+                retVal = GetBearerBoolAttributeL(
+                        aAttribute,
+                        aClientPluginInstance->iGenRecordArray,
+                        aClientPluginInstance->iBearerSpecRecordArray );
+                }
+            else
+                {
+                retVal = IsProtected();
+                }
             }
             break;
         case ECmHidden:
             {
-            CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
-                    aClientPluginInstance->iGenRecordArray[KIapRecordIndex] );
-            retVal = iapRecord->Attributes() & ECDHidden;
+            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:
@@ -2305,9 +2366,12 @@
                 {
                 retVal = EFalse;
                 }
-
-            retVal = static_cast<CCDProxiesRecord*>(
-                    aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )->iUseProxyServer;
+            else
+                {
+                retVal = static_cast<CCDProxiesRecord*>(
+                        aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
+                        ->iUseProxyServer;
+                }
             }
             break;
         case ECmDestination:
@@ -2366,9 +2430,16 @@
             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  
+            // This is bearer specific attribute.
             TRAPD( err, retVal = GetBearerInfoBoolL( aAttribute ) );
             if ( err )
                 {
@@ -2416,17 +2487,15 @@
         {
         case ECmBearerIcon:
             {
-            //TODO, read icon name from metadata record after commsdat changes implemented.
-            //CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
-            //        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
-
-            //if ( !metadataRecord )
-            //    {
-            //    User::Leave( KErrCorrupt );
-            //    }
-
-            //retVal = TPtrC( metadataRecord->iIconFileName ).AllocL();
-            retVal = KNullDesC().AllocL();//TODO, check this freed
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+
+            if ( !metadataRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+
+            retVal = TPtrC( metadataRecord->iIconFileName ).AllocL();
             }
             break;
         case ECmStartPage:
@@ -2626,11 +2695,13 @@
             if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
                 {
                 CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
-                        CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) );
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
                 CleanupStack::PushL( proxyRecord );
+                CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
                 proxyRecord->SetElementId( iProxyRecord->ElementId() );
-                aClientPluginInstance->iGenRecordArray.AppendL(
-                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ) );
+                aClientPluginInstance->iGenRecordArray.InsertL(
+                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ),
+                        KProxyRecordIndex );
                 CleanupStack::Pop( proxyRecord );
                 }
 
@@ -2727,11 +2798,13 @@
             if ( !aClientPluginInstance->iGenRecordArray[KProxyRecordIndex] )
                 {
                 CCDProxiesRecord* proxyRecord = static_cast<CCDProxiesRecord*>(
-                        CCDRecordBase::CreateCopyRecordL( *iProxyRecord ) );
+                        CCDRecordBase::RecordFactoryL( KCDTIdProxiesRecord ) );
                 CleanupStack::PushL( proxyRecord );
+                CopyRecordFieldsL( *iProxyRecord, *proxyRecord );
                 proxyRecord->SetElementId( iProxyRecord->ElementId() );
-                aClientPluginInstance->iGenRecordArray.AppendL(
-                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ) );
+                aClientPluginInstance->iGenRecordArray.InsertL(
+                        static_cast<CommsDat::CCDRecordBase*>( proxyRecord ),
+                        KProxyRecordIndex );
                 CleanupStack::Pop( proxyRecord );
                 }
 
@@ -2778,6 +2851,20 @@
                 }
             }
             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*>(
@@ -2812,15 +2899,14 @@
         {
         case ECmBearerIcon:
             {
-            //TODO, write icon name to metadata record after commsdat changes implemented.
-            //CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
-            //        aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
-
-            //if ( !metadataRecord )
-            //    {
-            //    User::Leave( KErrCorrupt );
-            //    }
-            //metadataRecord->iIconFileName.SetL( aValue );
+            CCDIAPMetadataRecord* metadataRecord = static_cast<CCDIAPMetadataRecord*>(
+                    aClientPluginInstance->iGenRecordArray[KMetaDataRecordIndex] );
+
+            if ( !metadataRecord )
+                {
+                User::Leave( KErrCorrupt );
+                }
+            metadataRecord->iIconFileName.SetL( aValue );
             }
             break;
         case ECmStartPage:
--- a/cmmanager/cmmgr/cmmpluginbase/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmpluginbase/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginembdestination/data/1020737D.rss	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 2010 +0300
@@ -0,0 +1,642 @@
+/*
+* 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 the License "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-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;
+	}
+
+// ---------------------------------------------------------------------------
+// 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	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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
--- a/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/src/cmpluginlan.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -101,7 +101,6 @@
     OstTraceFunctionEntry0( CCMPLUGINLAN_CCMPLUGINLAN_ENTRY );
 
     ResetBearerRecords();
-    FeatureManager::UnInitializeLib();
 
     OstTraceFunctionExit0( CCMPLUGINLAN_CCMPLUGINLAN_EXIT );
     }
@@ -130,7 +129,7 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINLAN_CONSTRUCTL_ENTRY );
 
-    FeatureManager::InitializeLibL();
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
 
     CCmPluginBaseEng::ConstructL();
     
@@ -482,83 +481,103 @@
 
     if ( !clientServiceRecordCopy->iRecordTag.IsNull() )
         {
-        origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag );
+        origServiceRecord->iRecordTag.SetL(
+                clientServiceRecordCopy->iRecordTag );
         }
     if ( !clientServiceRecordCopy->iRecordName.IsNull() )
         {
-        origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName );
+        origServiceRecord->iRecordName.SetL(
+                clientServiceRecordCopy->iRecordName );
         }
     if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() )
         {
-        origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr );
+        origServiceRecord->iServiceEnableLlmnr.SetL(
+                clientServiceRecordCopy->iServiceEnableLlmnr );
         }
     if ( !clientServiceRecordCopy->iIfNetworks.IsNull() )
         {
-        origServiceRecord->iIfNetworks.SetL( clientServiceRecordCopy->iIfNetworks );
+        origServiceRecord->iIfNetworks.SetL(
+                clientServiceRecordCopy->iIfNetworks );
         }
     if ( !clientServiceRecordCopy->iIpNetmask.IsNull() )
         {
-        origServiceRecord->iIpNetmask.SetL( clientServiceRecordCopy->iIpNetmask );
+        origServiceRecord->iIpNetmask.SetL(
+                clientServiceRecordCopy->iIpNetmask );
         }
     if ( !clientServiceRecordCopy->iIpGateway.IsNull() )
         {
-        origServiceRecord->iIpGateway.SetL( clientServiceRecordCopy->iIpGateway );
+        origServiceRecord->iIpGateway.SetL(
+                clientServiceRecordCopy->iIpGateway );
         }
     if ( !clientServiceRecordCopy->iIpAddrFromServer.IsNull() )
         {
-        origServiceRecord->iIpAddrFromServer.SetL( clientServiceRecordCopy->iIpAddrFromServer );
+        origServiceRecord->iIpAddrFromServer.SetL(
+                clientServiceRecordCopy->iIpAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iIpAddr.IsNull() )
         {
-        origServiceRecord->iIpAddr.SetL( clientServiceRecordCopy->iIpAddr );
+        origServiceRecord->iIpAddr.SetL(
+                clientServiceRecordCopy->iIpAddr );
         }
     if ( !clientServiceRecordCopy->iIpDnsAddrFromServer.IsNull() )
         {
-        origServiceRecord->iIpDnsAddrFromServer.SetL( clientServiceRecordCopy->iIpDnsAddrFromServer );
+        origServiceRecord->iIpDnsAddrFromServer.SetL(
+                clientServiceRecordCopy->iIpDnsAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iIpNameServer1.IsNull() )
         {
-        origServiceRecord->iIpNameServer1.SetL( clientServiceRecordCopy->iIpNameServer1 );
+        origServiceRecord->iIpNameServer1.SetL(
+                clientServiceRecordCopy->iIpNameServer1 );
         }
     if ( !clientServiceRecordCopy->iIpNameServer2.IsNull() )
         {
-        origServiceRecord->iIpNameServer2.SetL( clientServiceRecordCopy->iIpNameServer2 );
+        origServiceRecord->iIpNameServer2.SetL(
+                clientServiceRecordCopy->iIpNameServer2 );
         }
     if ( !clientServiceRecordCopy->iIp6DnsAddrFromServer.IsNull() )
         {
-        origServiceRecord->iIp6DnsAddrFromServer.SetL( clientServiceRecordCopy->iIp6DnsAddrFromServer );
+        origServiceRecord->iIp6DnsAddrFromServer.SetL(
+                clientServiceRecordCopy->iIp6DnsAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iIp6NameServer1.IsNull() )
         {
-        origServiceRecord->iIp6NameServer1.SetL( clientServiceRecordCopy->iIp6NameServer1 );
+        origServiceRecord->iIp6NameServer1.SetL(
+                clientServiceRecordCopy->iIp6NameServer1 );
         }
     if ( !clientServiceRecordCopy->iIp6NameServer2.IsNull() )
         {
-        origServiceRecord->iIp6NameServer2.SetL( clientServiceRecordCopy->iIp6NameServer2 );
+        origServiceRecord->iIp6NameServer2.SetL(
+                clientServiceRecordCopy->iIp6NameServer2 );
         }
     if ( !clientServiceRecordCopy->iIpAddrLeaseValidFrom.IsNull() )
         {
-        origServiceRecord->iIpAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iIpAddrLeaseValidFrom );
+        origServiceRecord->iIpAddrLeaseValidFrom.SetL(
+                clientServiceRecordCopy->iIpAddrLeaseValidFrom );
         }
     if ( !clientServiceRecordCopy->iIpAddrLeaseValidTo.IsNull() )
         {
-        origServiceRecord->iIpAddrLeaseValidTo.SetL( clientServiceRecordCopy->iIpAddrLeaseValidTo );
+        origServiceRecord->iIpAddrLeaseValidTo.SetL(
+                clientServiceRecordCopy->iIpAddrLeaseValidTo );
         }
     if ( !clientServiceRecordCopy->iConfigDaemonManagerName.IsNull() )
         {
-        origServiceRecord->iConfigDaemonManagerName.SetL( clientServiceRecordCopy->iConfigDaemonManagerName );
+        origServiceRecord->iConfigDaemonManagerName.SetL(
+                clientServiceRecordCopy->iConfigDaemonManagerName );
         }
     if ( !clientServiceRecordCopy->iConfigDaemonName.IsNull() )
         {
-        origServiceRecord->iConfigDaemonName.SetL( clientServiceRecordCopy->iConfigDaemonName );
+        origServiceRecord->iConfigDaemonName.SetL(
+                clientServiceRecordCopy->iConfigDaemonName );
         }
     if ( !clientServiceRecordCopy->iServiceExtensionTableName.IsNull() )
         {
-        origServiceRecord->iServiceExtensionTableName.SetL( clientServiceRecordCopy->iServiceExtensionTableName );
+        origServiceRecord->iServiceExtensionTableName.SetL(
+                clientServiceRecordCopy->iServiceExtensionTableName );
         }
     if ( !clientServiceRecordCopy->iServiceExtensionTableRecordId.IsNull() )
         {
-        origServiceRecord->iServiceExtensionTableRecordId.SetL( clientServiceRecordCopy->iServiceExtensionTableRecordId ); //TODO, check this works ok.
+        origServiceRecord->iServiceExtensionTableRecordId.SetL(
+                clientServiceRecordCopy->iServiceExtensionTableRecordId ); //TODO, check this works ok.
         }
 
     origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() );
@@ -586,7 +605,6 @@
 void CCmPluginLan::CreateBearerRecordsL()
     {
     OstTraceFunctionEntry0( CCMPLUGINLAN_CREATEBEARERRECORDSL_ENTRY );
-
     OstTraceFunctionExit0( CCMPLUGINLAN_CREATEBEARERRECORDSL_EXIT );
     }
 
@@ -597,7 +615,6 @@
 void CCmPluginLan::LoadBearerRecordsL()
     {
     OstTraceFunctionEntry0( CCMPLUGINLAN_LOADBEARERRECORDSL_ENTRY );
-
     OstTraceFunctionExit0( CCMPLUGINLAN_LOADBEARERRECORDSL_EXIT );
     }
 
@@ -642,13 +659,13 @@
 //
 void CCmPluginLan::BearerRecordIdL( TUint32& aRecordId )
     {
-    CCDLANBearerRecord* lanBearerRecord = static_cast<CCDLANBearerRecord*>
-                        (CCDRecordBase::RecordFactoryL( KCDTIdLANBearerRecord ));
+    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
+        { // Bearer not found -> create dummy values.
         lanBearerRecord->SetRecordId( KCDNewRecordRequest );
         lanBearerRecord->iBearerAgent = KLanBearerAgent;
         lanBearerRecord->iRecordName = KLanBearerName;
@@ -659,12 +676,9 @@
         lanBearerRecord->iLanBearerPddFilename = KLanPDDFileName;
         lanBearerRecord->iLanBearerPddName = KLanPDDName;
         lanBearerRecord->iLanBearerPacketDriverName = KLanPacketDriverName;
-        lanBearerRecord->iLastSocketActivityTimeout =
-                                        (TUint32)KLanLastSocketActivityTimeout;
-        lanBearerRecord->iLastSessionClosedTimeout =
-                                        (TUint32)KLanLastSessionClosedTimeout;
-        lanBearerRecord->iLastSocketClosedTimeout =
-                                        (TUint32)KLanLastSocketClosedTimeout;
+        lanBearerRecord->iLastSocketActivityTimeout = (TUint32)KLanLastSocketActivityTimeout;
+        lanBearerRecord->iLastSessionClosedTimeout = (TUint32)KLanLastSessionClosedTimeout;
+        lanBearerRecord->iLastSocketClosedTimeout = (TUint32)KLanLastSocketClosedTimeout;
 
         lanBearerRecord->StoreL( iSession );
         }
@@ -735,17 +749,17 @@
 // ---------------------------------------------------------------------------
 //
 void CCmPluginLan::SetDaemonNameL(
-    RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
-    RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
     {
     OstTraceFunctionEntry0( CCMPLUGINLAN_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 );
+    // 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 )
@@ -758,50 +772,53 @@
         delete daemonName;
         }
 
-    // use DHCP if we can
-    TBool ipfromSrv = GetBearerBoolAttributeL( ECmIPAddFromServer,
-                                               aGenRecordArray,
-                                               aBearerSpecRecordArray );
+    // Use DHCP if we can.
+    TBool ipfromSrv = GetBearerBoolAttributeL(
+            ECmIPAddFromServer,
+            aGenRecordArray,
+            aBearerSpecRecordArray );
     if ( ipfromSrv )
         {
-        SetBearerStringAttributeL( ECmConfigDaemonManagerName,
-                                   KDaemonManagerName,
-                                   aGenRecordArray,
-                                   aBearerSpecRecordArray );
-
-        SetBearerStringAttributeL( ECmConfigDaemonName,
-                                   KConfigDaemonName,
-                                   aGenRecordArray,
-                                   aBearerSpecRecordArray );
-
+        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 );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonManagerName,
+                    KDaemonManagerName,
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonName,
+                    KConfigDaemonName,
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
             }
         else
             {
-            SetBearerStringAttributeL( ECmConfigDaemonManagerName,
-                                       KNullDesC(),
-                                       aGenRecordArray,
-                                       aBearerSpecRecordArray );
-
-            SetBearerStringAttributeL( ECmConfigDaemonName,
-                                       KNullDesC(),
-                                       aGenRecordArray,
-                                       aBearerSpecRecordArray );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonManagerName,
+                    KNullDesC(),
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
+            SetBearerStringAttributeL(
+                    ECmConfigDaemonName,
+                    KNullDesC(),
+                    aGenRecordArray,
+                    aBearerSpecRecordArray );
             }
         }
+
     OstTraceFunctionExit0( DUP1_CCMPLUGINLAN_SETDAEMONNAMEL_EXIT );
     }
 
@@ -825,7 +842,8 @@
         {
         case ECmInvalidAttribute:
             {
-            retVal = 0;
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported ); //TODO, update attribute definition comments.
             }
             break;
         case ECmExtensionLevel:
@@ -1479,8 +1497,9 @@
 // CCmPluginLan::GetDefPriorityL
 // ---------------------------------------------------------------------------
 //
-TUint32 CCmPluginLan::GetDefPriorityL( const TUint32 aAttribute ) const//TODO, OST
+TUint32 CCmPluginLan::GetDefPriorityL( const TUint32 aAttribute ) const
     {
+    OstTraceFunctionEntry0( CCMPLUGINLAN_GETDEFPRIORITYL_ENTRY );
 
     TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
 
@@ -1493,7 +1512,6 @@
     if ( priorityRecord->FindL( iSession ) )
         {
         priorityRecord->LoadL( iSession );
-
         switch ( aAttribute )
             {
             case ECmDefaultPriority:
@@ -1512,6 +1530,7 @@
         }
     CleanupStack::PopAndDestroy( priorityRecord );
 
+    OstTraceFunctionExit0( CCMPLUGINLAN_GETDEFPRIORITYL_EXIT );
     return retVal;
     }
 
--- a/cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginlan/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -258,8 +258,6 @@
 
     ResetBearerRecords();
 
-    FeatureManager::UnInitializeLib();
-
     OstTraceFunctionExit1( CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT, this );
     }
 
@@ -309,7 +307,8 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_CONSTRUCTL_ENTRY );
 
-    FeatureManager::InitializeLibL();
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
+
     CCmPluginBaseEng::ConstructL();
 
     // Get bearer priority table ID.
@@ -335,7 +334,7 @@
 
     TBool retVal( EFalse );
 
-    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>(
+    CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(
             CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
 
     CleanupStack::PushL( iapRecord );
@@ -364,9 +363,9 @@
 
     TBool retVal( EFalse );
 
-    if ( (TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameOutgoingWCDMA) ||
-            TPtrC(aIapRecord->iServiceType) == TPtrC(KCDTypeNameIncomingWCDMA)) &&
-            TPtrC(aIapRecord->iBearerType) == TPtrC(KCDTypeNameModemBearer) )
+    if ( ( TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameOutgoingWCDMA ) ||
+            TPtrC( aIapRecord->iServiceType ) == TPtrC( KCDTypeNameIncomingWCDMA )) &&
+            TPtrC( aIapRecord->iBearerType ) == TPtrC( KCDTypeNameModemBearer ) )
         {
         retVal = ETrue;
         }
@@ -483,7 +482,7 @@
 
     if ( ServiceRecord().iUmtsR99QoSAndOnTable )
         {
-        iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord *>(
+        iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
 
         iPacketDataQoSRecord->SetRecordId( ServiceRecord().iUmtsR99QoSAndOnTable );
@@ -503,13 +502,13 @@
 
     if ( TPtrC( KCDTypeNameOutgoingWCDMA ) == iIapRecord->iServiceType )
         {
-        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord *>(
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
         iOutgoing = ETrue;
         }
     else if ( TPtrC( KCDTypeNameIncomingWCDMA ) == iIapRecord->iServiceType )
         {
-        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord *>(
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
         iOutgoing = EFalse;
         }
@@ -552,12 +551,12 @@
 
     if ( iOutgoing )
         {
-        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord *>(
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdOutgoingGprsRecord ) );
         }
     else
         {
-        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord *>(
+        iServiceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
                 CCDRecordBase::RecordFactoryL( KCDTIdIncomingGprsRecord ) );
         }
 
@@ -639,7 +638,7 @@
             new( ELeave ) CMDBRecordSet<CCDModemBearerRecord>( KCDTIdModemBearerRecord );
     CleanupStack::PushL( bearerRS );
 
-    CCDModemBearerRecord* bearerRecord = static_cast<CCDModemBearerRecord *>(
+    CCDModemBearerRecord* bearerRecord = static_cast<CCDModemBearerRecord*>(
             CCDRecordBase::RecordFactoryL( KCDTIdModemBearerRecord ) );
 
     CleanupStack::PushL( bearerRecord );
@@ -745,15 +744,17 @@
     delete iPacketDataQoSRecord;
     iPacketDataQoSRecord = NULL;
 
-    iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord *>(
+    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->iGPRSReqDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    iPacketDataQoSRecord->iGPRSMinDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
     iPacketDataQoSRecord->iGPRSReqMaxSDUSize = 0;
     iPacketDataQoSRecord->iGPRSMinAcceptableMaxSDUSize = 0;
     iPacketDataQoSRecord->iGPRSReqMaxUplinkRate = 0;
@@ -764,8 +765,10 @@
     iPacketDataQoSRecord->iGPRSMaxBER = RPacketQoS::EBERUnspecified;
     iPacketDataQoSRecord->iGPRSReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
     iPacketDataQoSRecord->iGPRSMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-    iPacketDataQoSRecord->iGPRSReqTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
-    iPacketDataQoSRecord->iGPRSMinTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
+    iPacketDataQoSRecord->iGPRSReqTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    iPacketDataQoSRecord->iGPRSMinTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
     iPacketDataQoSRecord->iGPRSReqTransferDelay = 0;
     iPacketDataQoSRecord->iGPRSMaxTransferDelay = 0;
     iPacketDataQoSRecord->iGPRSReqGuaranteedUplinkRate = 0;
@@ -774,7 +777,8 @@
     iPacketDataQoSRecord->iGPRSMinGuaranteedDownlinkRate = 0;
     iPacketDataQoSRecord->iGPRSSignallingIndication = EFalse;
     iPacketDataQoSRecord->iGPRS_ImCnSignallingIndication = EFalse;
-    iPacketDataQoSRecord->iGPRSSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
+    iPacketDataQoSRecord->iGPRSSourceStatisticsDescriptor =
+            RPacketQoS::ESourceStatisticsDescriptorUnknown;
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_CREATEBEARERRECORDSL_EXIT );
     }
@@ -813,197 +817,245 @@
 
     if ( !clientServiceRecordCopy->iRecordTag.IsNull() )
         {
-        origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag );
+        origServiceRecord->iRecordTag.SetL(
+                clientServiceRecordCopy->iRecordTag );
         }
     if ( !clientServiceRecordCopy->iRecordName.IsNull() )
         {
-        origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName );
+        origServiceRecord->iRecordName.SetL(
+                clientServiceRecordCopy->iRecordName );
         }
 
     if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() )
         {
-        origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr );
+        origServiceRecord->iServiceEnableLlmnr.SetL(
+                clientServiceRecordCopy->iServiceEnableLlmnr );
         }
 
     if ( !clientServiceRecordCopy->iGPRSAPN.IsNull() )
         {
-        origServiceRecord->iGPRSAPN.SetL( clientServiceRecordCopy->iGPRSAPN );
+        origServiceRecord->iGPRSAPN.SetL(
+                clientServiceRecordCopy->iGPRSAPN );
         }
     if ( !clientServiceRecordCopy->iGPRSPDPType.IsNull() )
         {
-        origServiceRecord->iGPRSPDPType.SetL( clientServiceRecordCopy->iGPRSPDPType );
+        origServiceRecord->iGPRSPDPType.SetL(
+                clientServiceRecordCopy->iGPRSPDPType );
         }
     if ( !clientServiceRecordCopy->iGPRSPDPAddress.IsNull() )
         {
-        origServiceRecord->iGPRSPDPAddress.SetL( clientServiceRecordCopy->iGPRSPDPAddress );
+        origServiceRecord->iGPRSPDPAddress.SetL(
+                clientServiceRecordCopy->iGPRSPDPAddress );
         }
     if ( !clientServiceRecordCopy->iGPRSReqPrecedence.IsNull() )
         {
-        origServiceRecord->iGPRSReqPrecedence.SetL( clientServiceRecordCopy->iGPRSReqPrecedence );
+        origServiceRecord->iGPRSReqPrecedence.SetL(
+                clientServiceRecordCopy->iGPRSReqPrecedence );
         }
     if ( !clientServiceRecordCopy->iGPRSReqDelay.IsNull() )
         {
-        origServiceRecord->iGPRSReqDelay.SetL( clientServiceRecordCopy->iGPRSReqDelay );
+        origServiceRecord->iGPRSReqDelay.SetL(
+                clientServiceRecordCopy->iGPRSReqDelay );
         }
     if ( !clientServiceRecordCopy->iGPRSReqReliability.IsNull() )
         {
-        origServiceRecord->iGPRSReqReliability.SetL( clientServiceRecordCopy->iGPRSReqReliability );
+        origServiceRecord->iGPRSReqReliability.SetL(
+                clientServiceRecordCopy->iGPRSReqReliability );
         }
     if ( !clientServiceRecordCopy->iGPRSReqPeakThroughput.IsNull() )
         {
-        origServiceRecord->iGPRSReqPeakThroughput.SetL( clientServiceRecordCopy->iGPRSReqPeakThroughput );
+        origServiceRecord->iGPRSReqPeakThroughput.SetL(
+                clientServiceRecordCopy->iGPRSReqPeakThroughput );
         }
     if ( !clientServiceRecordCopy->iGPRSReqMeanThroughput.IsNull() )
         {
-        origServiceRecord->iGPRSReqMeanThroughput.SetL( clientServiceRecordCopy->iGPRSReqMeanThroughput );
+        origServiceRecord->iGPRSReqMeanThroughput.SetL(
+                clientServiceRecordCopy->iGPRSReqMeanThroughput );
         }
     if ( !clientServiceRecordCopy->iGPRSMinPrecedence.IsNull() )
         {
-        origServiceRecord->iGPRSMinPrecedence.SetL( clientServiceRecordCopy->iGPRSMinPrecedence );
+        origServiceRecord->iGPRSMinPrecedence.SetL(
+                clientServiceRecordCopy->iGPRSMinPrecedence );
         }
     if ( !clientServiceRecordCopy->iGPRSMinDelay.IsNull() )
         {
-        origServiceRecord->iGPRSMinDelay.SetL( clientServiceRecordCopy->iGPRSMinDelay );
+        origServiceRecord->iGPRSMinDelay.SetL(
+                clientServiceRecordCopy->iGPRSMinDelay );
         }
     if ( !clientServiceRecordCopy->iGPRSMinReliability.IsNull() )
         {
-        origServiceRecord->iGPRSMinReliability.SetL( clientServiceRecordCopy->iGPRSMinReliability );
+        origServiceRecord->iGPRSMinReliability.SetL(
+                clientServiceRecordCopy->iGPRSMinReliability );
         }
     if ( !clientServiceRecordCopy->iGPRSMinPeakThroughput.IsNull() )
         {
-        origServiceRecord->iGPRSMinPeakThroughput.SetL( clientServiceRecordCopy->iGPRSMinPeakThroughput );
+        origServiceRecord->iGPRSMinPeakThroughput.SetL(
+                clientServiceRecordCopy->iGPRSMinPeakThroughput );
         }
     if ( !clientServiceRecordCopy->iGPRSMinMeanThroughput.IsNull() )
         {
-        origServiceRecord->iGPRSMinMeanThroughput.SetL( clientServiceRecordCopy->iGPRSMinMeanThroughput );
+        origServiceRecord->iGPRSMinMeanThroughput.SetL(
+                clientServiceRecordCopy->iGPRSMinMeanThroughput );
         }
     if ( !clientServiceRecordCopy->iGPRSDataCompression.IsNull() )
         {
-        origServiceRecord->iGPRSDataCompression.SetL( clientServiceRecordCopy->iGPRSDataCompression );
+        origServiceRecord->iGPRSDataCompression.SetL(
+                clientServiceRecordCopy->iGPRSDataCompression );
         }
     if ( !clientServiceRecordCopy->iGPRSHeaderCompression.IsNull() )
         {
-        origServiceRecord->iGPRSHeaderCompression.SetL( clientServiceRecordCopy->iGPRSHeaderCompression );
+        origServiceRecord->iGPRSHeaderCompression.SetL(
+                clientServiceRecordCopy->iGPRSHeaderCompression );
         }
     if ( !clientServiceRecordCopy->iGPRSUseEdge.IsNull() )
         {
-        origServiceRecord->iGPRSUseEdge.SetL( clientServiceRecordCopy->iGPRSUseEdge );
+        origServiceRecord->iGPRSUseEdge.SetL(
+                clientServiceRecordCopy->iGPRSUseEdge );
         }
     if ( !clientServiceRecordCopy->iGPRSAnonymousAccess.IsNull() )
         {
-        origServiceRecord->iGPRSAnonymousAccess.SetL( clientServiceRecordCopy->iGPRSAnonymousAccess );
+        origServiceRecord->iGPRSAnonymousAccess.SetL(
+                clientServiceRecordCopy->iGPRSAnonymousAccess );
         }
     if ( !clientServiceRecordCopy->iGPRSIfParams.IsNull() )
         {
-        origServiceRecord->iGPRSIfParams.SetL( clientServiceRecordCopy->iGPRSIfParams );
+        origServiceRecord->iGPRSIfParams.SetL(
+                clientServiceRecordCopy->iGPRSIfParams );
         }
     if ( !clientServiceRecordCopy->iGPRSIfNetworks.IsNull() )
         {
-        origServiceRecord->iGPRSIfNetworks.SetL( clientServiceRecordCopy->iGPRSIfNetworks );
+        origServiceRecord->iGPRSIfNetworks.SetL(
+                clientServiceRecordCopy->iGPRSIfNetworks );
         }
     if ( !clientServiceRecordCopy->iGPRSIfPromptForAuth.IsNull() )
         {
-        origServiceRecord->iGPRSIfPromptForAuth.SetL( clientServiceRecordCopy->iGPRSIfPromptForAuth );
+        origServiceRecord->iGPRSIfPromptForAuth.SetL(
+                clientServiceRecordCopy->iGPRSIfPromptForAuth );
         }
     if ( !clientServiceRecordCopy->iGPRSIfAuthName.IsNull() )
         {
-        origServiceRecord->iGPRSIfAuthName.SetL( clientServiceRecordCopy->iGPRSIfAuthName );
+        origServiceRecord->iGPRSIfAuthName.SetL(
+                clientServiceRecordCopy->iGPRSIfAuthName );
         }
     if ( !clientServiceRecordCopy->iGPRSIfAuthPass.IsNull() )
         {
-        origServiceRecord->iGPRSIfAuthPass.SetL( clientServiceRecordCopy->iGPRSIfAuthPass );
+        origServiceRecord->iGPRSIfAuthPass.SetL(
+                clientServiceRecordCopy->iGPRSIfAuthPass );
         }
     if ( !clientServiceRecordCopy->iGPRSIfAuthRetries.IsNull() )
         {
-        origServiceRecord->iGPRSIfAuthRetries.SetL( clientServiceRecordCopy->iGPRSIfAuthRetries );
+        origServiceRecord->iGPRSIfAuthRetries.SetL(
+                clientServiceRecordCopy->iGPRSIfAuthRetries );
         }
     if ( !clientServiceRecordCopy->iGPRSIPNetMask.IsNull() )
         {
-        origServiceRecord->iGPRSIPNetMask.SetL( clientServiceRecordCopy->iGPRSIPNetMask );
+        origServiceRecord->iGPRSIPNetMask.SetL(
+                clientServiceRecordCopy->iGPRSIPNetMask );
         }
     if ( !clientServiceRecordCopy->iGPRSIPGateway.IsNull() )
         {
-        origServiceRecord->iGPRSIPGateway.SetL( clientServiceRecordCopy->iGPRSIPGateway );
+        origServiceRecord->iGPRSIPGateway.SetL(
+                clientServiceRecordCopy->iGPRSIPGateway );
         }
     if ( !clientServiceRecordCopy->iGPRSIPAddrFromServer.IsNull() )
         {
-        origServiceRecord->iGPRSIPAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIPAddrFromServer );
+        origServiceRecord->iGPRSIPAddrFromServer.SetL(
+                clientServiceRecordCopy->iGPRSIPAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iGPRSIPAddr.IsNull() )
         {
-        origServiceRecord->iGPRSIPAddr.SetL( clientServiceRecordCopy->iGPRSIPAddr );
+        origServiceRecord->iGPRSIPAddr.SetL(
+                clientServiceRecordCopy->iGPRSIPAddr );
         }
     if ( !clientServiceRecordCopy->iGPRSIPDNSAddrFromServer.IsNull() )
         {
-        origServiceRecord->iGPRSIPDNSAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIPDNSAddrFromServer );
+        origServiceRecord->iGPRSIPDNSAddrFromServer.SetL(
+                clientServiceRecordCopy->iGPRSIPDNSAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iGPRSIPNameServer1.IsNull() )
         {
-        origServiceRecord->iGPRSIPNameServer1.SetL( clientServiceRecordCopy->iGPRSIPNameServer1 );
+        origServiceRecord->iGPRSIPNameServer1.SetL(
+                clientServiceRecordCopy->iGPRSIPNameServer1 );
         }
     if ( !clientServiceRecordCopy->iGPRSIPNameServer2.IsNull() )
         {
-        origServiceRecord->iGPRSIPNameServer2.SetL( clientServiceRecordCopy->iGPRSIPNameServer2 );
+        origServiceRecord->iGPRSIPNameServer2.SetL(
+                clientServiceRecordCopy->iGPRSIPNameServer2 );
         }
     if ( !clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer.IsNull() )
         {
-        origServiceRecord->iGPRSIP6DNSAddrFromServer.SetL( clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer );
+        origServiceRecord->iGPRSIP6DNSAddrFromServer.SetL(
+                clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer );
         }
     if ( !clientServiceRecordCopy->iGPRSIP6NameServer1.IsNull() )
         {
-        origServiceRecord->iGPRSIP6NameServer1.SetL( clientServiceRecordCopy->iGPRSIP6NameServer1 );
+        origServiceRecord->iGPRSIP6NameServer1.SetL(
+                clientServiceRecordCopy->iGPRSIP6NameServer1 );
         }
     if ( !clientServiceRecordCopy->iGPRSIP6NameServer2.IsNull() )
         {
-        origServiceRecord->iGPRSIP6NameServer2.SetL( clientServiceRecordCopy->iGPRSIP6NameServer2 );
+        origServiceRecord->iGPRSIP6NameServer2.SetL(
+                clientServiceRecordCopy->iGPRSIP6NameServer2 );
         }
     if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom.IsNull() )
         {
-        origServiceRecord->iGPRSIPAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom );
+        origServiceRecord->iGPRSIPAddrLeaseValidFrom.SetL(
+                clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom );
         }
     if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo.IsNull() )
         {
-        origServiceRecord->iGPRSIPAddrLeaseValidTo.SetL( clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo );
+        origServiceRecord->iGPRSIPAddrLeaseValidTo.SetL(
+                clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo );
         }
     if ( !clientServiceRecordCopy->iGPRSConfigDaemonManagerName.IsNull() )
         {
-        origServiceRecord->iGPRSConfigDaemonManagerName.SetL( clientServiceRecordCopy->iGPRSConfigDaemonManagerName );
+        origServiceRecord->iGPRSConfigDaemonManagerName.SetL(
+                clientServiceRecordCopy->iGPRSConfigDaemonManagerName );
         }
     if ( !clientServiceRecordCopy->iGPRSConfigDaemonName.IsNull() )
         {
-        origServiceRecord->iGPRSConfigDaemonName.SetL( clientServiceRecordCopy->iGPRSConfigDaemonName );
+        origServiceRecord->iGPRSConfigDaemonName.SetL(
+                clientServiceRecordCopy->iGPRSConfigDaemonName );
         }
     if ( !clientServiceRecordCopy->iGPRSEnableLCPExtension.IsNull() )
         {
-        origServiceRecord->iGPRSEnableLCPExtension.SetL( clientServiceRecordCopy->iGPRSEnableLCPExtension );
+        origServiceRecord->iGPRSEnableLCPExtension.SetL(
+                clientServiceRecordCopy->iGPRSEnableLCPExtension );
         }
     if ( !clientServiceRecordCopy->iGPRSDisablePlainTextAuth.IsNull() )
         {
-        origServiceRecord->iGPRSDisablePlainTextAuth.SetL( clientServiceRecordCopy->iGPRSDisablePlainTextAuth );
+        origServiceRecord->iGPRSDisablePlainTextAuth.SetL(
+                clientServiceRecordCopy->iGPRSDisablePlainTextAuth );
         }
     if ( !clientServiceRecordCopy->iGPRSAPType.IsNull() )
         {
-        origServiceRecord->iGPRSAPType.SetL( clientServiceRecordCopy->iGPRSAPType );
+        origServiceRecord->iGPRSAPType.SetL(
+                clientServiceRecordCopy->iGPRSAPType );
         }
     if ( !clientServiceRecordCopy->iGPRSQOSWarningTimeOut.IsNull() )
         {
-        origServiceRecord->iGPRSQOSWarningTimeOut.SetL( clientServiceRecordCopy->iGPRSQOSWarningTimeOut );
+        origServiceRecord->iGPRSQOSWarningTimeOut.SetL(
+                clientServiceRecordCopy->iGPRSQOSWarningTimeOut );
         }
     if ( !clientServiceRecordCopy->iGPRSR5DataCompression.IsNull() )
         {
-        origServiceRecord->iGPRSR5DataCompression.SetL( clientServiceRecordCopy->iGPRSR5DataCompression );
+        origServiceRecord->iGPRSR5DataCompression.SetL(
+                clientServiceRecordCopy->iGPRSR5DataCompression );
         }
     if ( !clientServiceRecordCopy->iGPRSR5HeaderCompression.IsNull() )
         {
-        origServiceRecord->iGPRSR5HeaderCompression.SetL( clientServiceRecordCopy->iGPRSR5HeaderCompression );
+        origServiceRecord->iGPRSR5HeaderCompression.SetL(
+                clientServiceRecordCopy->iGPRSR5HeaderCompression );
         }
     if ( !clientServiceRecordCopy->iGPRSPacketFlowIdentifier.IsNull() )
         {
-        origServiceRecord->iGPRSPacketFlowIdentifier.SetL( clientServiceRecordCopy->iGPRSPacketFlowIdentifier );
+        origServiceRecord->iGPRSPacketFlowIdentifier.SetL(
+                clientServiceRecordCopy->iGPRSPacketFlowIdentifier );
         }
     if ( !clientServiceRecordCopy->iGPRSUmtsGprsRelease.IsNull() )
         {
-        origServiceRecord->iGPRSUmtsGprsRelease.SetL( clientServiceRecordCopy->iGPRSUmtsGprsRelease );
+        origServiceRecord->iGPRSUmtsGprsRelease.SetL(
+                clientServiceRecordCopy->iGPRSUmtsGprsRelease );
         }
 
     if ( iPacketDataQoSRecord )
@@ -1039,15 +1091,14 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_UPDATEBEARERRECORDSL_ENTRY );
 
-    delete iPacketDataQoSRecord;
-    iPacketDataQoSRecord = NULL;
-
     CCDUmtsR99QoSAndOnTableRecord* packetDataQoSRecord =
             static_cast<CCDUmtsR99QoSAndOnTableRecord*>( aBearerSpecRecordArray[KQosRecordIndex] );
 
+    delete iPacketDataQoSRecord;
+    iPacketDataQoSRecord = NULL;
     iPacketDataQoSRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
-            CCDRecordBase::CreateCopyRecordL( *packetDataQoSRecord ) );
-
+            CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+    CopyRecordFieldsL( *packetDataQoSRecord, *iPacketDataQoSRecord );
     iPacketDataQoSRecord->SetElementId( aBearerSpecRecordArray[KQosRecordIndex]->ElementId() );
 
     if ( !iPacketDataQoSRecord->RecordId() )
@@ -1083,14 +1134,15 @@
 
     if ( !iPacketDataQoSRecord )
         {
-        // IAP not yet in CommDat
+        // IAP not yet in CommDat.
         GetDefaultQosRecordL( aRecordArray );
         }
     else
         {
         CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iPacketDataQoSRecord ) );
+                CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
         CleanupStack::PushL( qosRecord );
+        CopyRecordFieldsL( *iPacketDataQoSRecord, *qosRecord );
         qosRecord->SetElementId( iPacketDataQoSRecord->ElementId() );
         aRecordArray.AppendL( static_cast<CommsDat::CCDRecordBase*>( qosRecord ) );
         CleanupStack::Pop( qosRecord );
@@ -1171,7 +1223,7 @@
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETDEFAULTQOSRECORDL_ENTRY );
 
     CCDUmtsR99QoSAndOnTableRecord* packetDataQoSRecord =
-            static_cast<CCDUmtsR99QoSAndOnTableRecord *>(
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
                     CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
     CleanupStack::PushL( packetDataQoSRecord );
 
@@ -1179,8 +1231,10 @@
     packetDataQoSRecord->iGPRSMinTrafficClass = RPacketQoS::ETrafficClassUnspecified;
     packetDataQoSRecord->iGPRSReqDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
     packetDataQoSRecord->iGPRSMinDeliveryOrder = RPacketQoS::EDeliveryOrderUnspecified;
-    packetDataQoSRecord->iGPRSReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
-    packetDataQoSRecord->iGPRSMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    packetDataQoSRecord->iGPRSReqDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
+    packetDataQoSRecord->iGPRSMinDeliverErroneousSDU =
+            RPacketQoS::EErroneousSDUDeliveryUnspecified;
     packetDataQoSRecord->iGPRSReqMaxSDUSize = 0;
     packetDataQoSRecord->iGPRSMinAcceptableMaxSDUSize = 0;
     packetDataQoSRecord->iGPRSReqMaxUplinkRate = 0;
@@ -1191,8 +1245,10 @@
     packetDataQoSRecord->iGPRSMaxBER = RPacketQoS::EBERUnspecified;
     packetDataQoSRecord->iGPRSReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
     packetDataQoSRecord->iGPRSMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
-    packetDataQoSRecord->iGPRSReqTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
-    packetDataQoSRecord->iGPRSMinTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
+    packetDataQoSRecord->iGPRSReqTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
+    packetDataQoSRecord->iGPRSMinTrafficHandlingPriority =
+            RPacketQoS::ETrafficPriorityUnspecified;
     packetDataQoSRecord->iGPRSReqTransferDelay = 0;
     packetDataQoSRecord->iGPRSMaxTransferDelay = 0;
     packetDataQoSRecord->iGPRSReqGuaranteedUplinkRate = 0;
@@ -1201,7 +1257,8 @@
     packetDataQoSRecord->iGPRSMinGuaranteedDownlinkRate = 0;
     packetDataQoSRecord->iGPRSSignallingIndication = EFalse;
     packetDataQoSRecord->iGPRS_ImCnSignallingIndication = EFalse;
-    packetDataQoSRecord->iGPRSSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
+    packetDataQoSRecord->iGPRSSourceStatisticsDescriptor =
+            RPacketQoS::ESourceStatisticsDescriptorUnknown;
 
     aRecordArray.AppendL( static_cast<CommsDat::CCDRecordBase*>( packetDataQoSRecord ) );
     CleanupStack::Pop( packetDataQoSRecord );
@@ -1258,7 +1315,8 @@
                 break;
             case ECmInvalidAttribute:
                 {
-                retVal = 0;
+                // This attribute has been deprecated since Symbian^4.
+                User::Leave( KErrNotSupported );
                 }
                 break;
             case ECmIFAuthRetries:
@@ -1268,7 +1326,7 @@
                 break;
             default:
                 {
-                User::Leave( KErrNotFound );
+                User::Leave( KErrNotFound ); //TODO, check leave code, should it be KErrNotSupported ?
                 }
                 break;
             }
@@ -1300,8 +1358,9 @@
 // CCmPluginPacketData::GetServiceIntAttributeL
 // ---------------------------------------------------------------------------
 //
-TUint32 CCmPluginPacketData::GetServiceIntAttributeL( TUint32 aAttribute,
-                                                      RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray )
+TUint32 CCmPluginPacketData::GetServiceIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray )
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETSERVICEINTATTRIBUTEL_ENTRY );
 
@@ -1410,15 +1469,16 @@
 // CCmPluginPacketData::GetQosIntAttributeL
 // ---------------------------------------------------------------------------
 //
-TUint32 CCmPluginPacketData::GetQosIntAttributeL( TUint32 aAttribute,
-                                                  RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+TUint32 CCmPluginPacketData::GetQosIntAttributeL(
+        TUint32 aAttribute,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_GETQOSINTATTRIBUTEL_ENTRY );
 
     TUint32 retVal( 0 );
 
-    CCDUmtsR99QoSAndOnTableRecord* qosRecord =
-            static_cast<CCDUmtsR99QoSAndOnTableRecord*>( aBearerSpecRecordArray[KQosRecordIndex] );
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            aBearerSpecRecordArray[KQosRecordIndex] );
 
     switch ( aAttribute )
         {
@@ -1577,7 +1637,6 @@
         }
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETQOSINTATTRIBUTEL_EXIT );
-
     return retVal;
     }
 
@@ -1933,8 +1992,8 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETSERVICEINTATTRIBUTEL_ENTRY );
 
-    CCDWCDMAPacketServiceRecord* serviceRecord =
-                static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
+    CCDWCDMAPacketServiceRecord* serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+            aGenRecordArray[KServiceRecordIndex] );
 
     switch ( aAttribute )
         {
@@ -2035,48 +2094,54 @@
 // ---------------------------------------------------------------------------
 //
 void CCmPluginPacketData::SetQosIntAttributeL(
-    TUint32 aAttribute,
-    TUint32 aValue,
-    RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+        TUint32 aAttribute,
+        TUint32 aValue,
+        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
     {
     OstTraceFunctionEntry0( CCMPLUGINPACKETDATA_SETQOSINTATTRIBUTEL_ENTRY );
 
-    CCDUmtsR99QoSAndOnTableRecord* qosRecord =
-                static_cast<CCDUmtsR99QoSAndOnTableRecord*>( aBearerSpecRecordArray[KQosRecordIndex] );
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            aBearerSpecRecordArray[KQosRecordIndex] );
 
     switch ( aAttribute )
         {
         case EGPRSReqTrafficClass:
             {
-            qosRecord->iGPRSReqTrafficClass.SetL( static_cast<RPacketQoS::TTrafficClass>( aValue ) );
+            qosRecord->iGPRSReqTrafficClass.SetL(
+                    static_cast<RPacketQoS::TTrafficClass>( aValue ) );
             }
             break;
 
         case EGPRSMinTrafficClass:
             {
-            qosRecord->iGPRSMinTrafficClass.SetL( static_cast<RPacketQoS::TTrafficClass>( aValue ) );
+            qosRecord->iGPRSMinTrafficClass.SetL(
+                    static_cast<RPacketQoS::TTrafficClass>( aValue ) );
             }
             break;
 
         case EGPRSReqDeliveryOrder:
             {
-            qosRecord->iGPRSReqDeliveryOrder.SetL( static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
+            qosRecord->iGPRSReqDeliveryOrder.SetL(
+                    static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
             }
             break;
 
         case GPRSMinDeliveryOrder:
             {
-            qosRecord->iGPRSMinDeliveryOrder.SetL( static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
+            qosRecord->iGPRSMinDeliveryOrder.SetL(
+                    static_cast<RPacketQoS::TDeliveryOrder>( aValue ) );
             }
             break;
         case EGPRSReqDeliverErroneousSDU:
             {
-            qosRecord->iGPRSReqDeliverErroneousSDU.SetL( static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
+            qosRecord->iGPRSReqDeliverErroneousSDU.SetL(
+                    static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
             }
             break;
         case EGPRSMinDeliverErroneousSDU:
             {
-            qosRecord->iGPRSMinDeliverErroneousSDU.SetL( static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
+            qosRecord->iGPRSMinDeliverErroneousSDU.SetL(
+                    static_cast<RPacketQoS::TErroneousSDUDelivery>( aValue ) );
             }
             break;
         case EGPRSReqMaxSDUSize:
@@ -2117,37 +2182,43 @@
 
         case EGPRSReqBER:
             {
-            qosRecord->iGPRSReqBER.SetL( static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
+            qosRecord->iGPRSReqBER.SetL(
+                    static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
             }
             break;
 
         case EGPRSMaxBER:
             {
-            qosRecord->iGPRSMaxBER.SetL( static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
+            qosRecord->iGPRSMaxBER.SetL(
+                    static_cast<RPacketQoS::TBitErrorRatio>( aValue ) );
             }
             break;
 
         case EGPRSReqSDUErrorRatio:
             {
-            qosRecord->iGPRSReqSDUErrorRatio.SetL( static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
+            qosRecord->iGPRSReqSDUErrorRatio.SetL(
+                    static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
             }
             break;
 
         case EGPRSMaxSDUErrorRatio:
             {
-            qosRecord->iGPRSMaxSDUErrorRatio.SetL( static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
+            qosRecord->iGPRSMaxSDUErrorRatio.SetL(
+                    static_cast<RPacketQoS::TSDUErrorRatio>( aValue ) );
             }
             break;
 
         case EGPRSReqTrafficHandlingPriority:
             {
-            qosRecord->iGPRSReqTrafficHandlingPriority.SetL( static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
+            qosRecord->iGPRSReqTrafficHandlingPriority.SetL(
+                    static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
             }
             break;
 
         case EGPRSMinTrafficHandlingPriority:
             {
-            qosRecord->iGPRSMinTrafficHandlingPriority.SetL( static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
+            qosRecord->iGPRSMinTrafficHandlingPriority.SetL(
+                    static_cast<RPacketQoS::TTrafficHandlingPriority>( aValue ) );
             }
             break;
 
@@ -2189,7 +2260,8 @@
 
         case EGPRSSourceStatisticsDescriptor:
             {
-            qosRecord->iGPRSSourceStatisticsDescriptor.SetL( static_cast<RPacketQoS::TSourceStatisticsDescriptor>( aValue ) );
+            qosRecord->iGPRSSourceStatisticsDescriptor.SetL(
+                    static_cast<RPacketQoS::TSourceStatisticsDescriptor>( aValue ) );
             }
             break;
 
@@ -2199,6 +2271,7 @@
             }
             break;
         }
+
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETQOSINTATTRIBUTEL_EXIT );
     }
 
@@ -2206,14 +2279,16 @@
 // CCmPluginPacketData::SetBearerBoolAttributeL
 // ---------------------------------------------------------------------------
 //
-void CCmPluginPacketData::SetBearerBoolAttributeL( TUint32 aAttribute, TBool aValue,
-                                        RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray,
-                                        RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray )
+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] );
+    CCDWCDMAPacketServiceRecord* serviceRecord = static_cast<CCDWCDMAPacketServiceRecord*>(
+            aGenRecordArray[KServiceRecordIndex] );
 
     switch ( aAttribute )
         {
@@ -2280,14 +2355,16 @@
             break;
         case EGPRSSignallingIndication:
             {
-            static_cast<CCDUmtsR99QoSAndOnTableRecord*>
-                 ( aBearerSpecRecordArray[KQosRecordIndex] )->iGPRSSignallingIndication.SetL( aValue );
+            static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+                    aBearerSpecRecordArray[KQosRecordIndex] )
+                    ->iGPRSSignallingIndication.SetL( aValue );
             }
             break;
         case EGPRS_ImCnSignallingIndication:
             {
             static_cast<CCDUmtsR99QoSAndOnTableRecord*>
-                 ( aBearerSpecRecordArray[KQosRecordIndex] )->iGPRS_ImCnSignallingIndication.SetL( aValue );
+                 ( aBearerSpecRecordArray[KQosRecordIndex] )
+                 ->iGPRS_ImCnSignallingIndication.SetL( aValue );
             }
             break;
         case EPacketDataServiceEnableLLMNR:
@@ -2301,6 +2378,7 @@
             }
             break;
         }
+
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_SETBEARERBOOLATTRIBUTEL_EXIT );
     }
 
@@ -2472,16 +2550,17 @@
 // CCmPluginPacketData::SetBearerString8AttributeL
 // ---------------------------------------------------------------------------
 //
-void CCmPluginPacketData::SetBearerString8AttributeL( TUint32 /*aAttribute*/, const TDesC8& /*aValue*/,
-                                           RPointerArray<CommsDat::CCDRecordBase>& /*aGenRecordArray*/,
-                                           RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ )
+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;
     }
 
@@ -2531,7 +2610,6 @@
         }
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOINTL_EXIT );
-
     return retVal;
     }
 
@@ -2589,7 +2667,6 @@
         }
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOBOOLL_EXIT );
-
     return retVal;
     }
 
@@ -2613,7 +2690,6 @@
         }
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_GETBEARERINFOSTRINGL_EXIT );
-
     return retVal;
     }
 
@@ -2980,9 +3056,12 @@
 
     CCmPluginPacketData* plugin = static_cast<CCmPluginPacketData*>( aCopyInstance );
 
-    plugin->iPacketDataQoSRecord =
-        static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
-                CCDRecordBase::CreateCopyRecordL( *iPacketDataQoSRecord ) );
+    CCDUmtsR99QoSAndOnTableRecord* qosRecord = static_cast<CCDUmtsR99QoSAndOnTableRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdUmtsR99QoSAndOnTableRecord ) );
+    CleanupStack::PushL( qosRecord );
+    CopyRecordFieldsL( *iPacketDataQoSRecord, *qosRecord );
+    CleanupStack::Pop( qosRecord );
+    plugin->iPacketDataQoSRecord = qosRecord;
 
     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_COPYBEARERRECORDSL_EXIT );
     }
--- a/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpn.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginvpn/src/cmpluginvpn.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -423,10 +423,10 @@
             retVal = bearer;
             }
             break;
-        case ECmNextLayerIapId: //falls through
+        case ECmNextLayerIapId:
         case EVpnIapId:
             {            
-            TUint recordId = serviceRecord->iServiceIAP;
+            TUint recordId = serviceRecord->iServiceIAP;//TODO, can't use this straight? link containd the ID.
             if (recordId != 0)
                 {
                 CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord *>
@@ -440,23 +440,23 @@
                 }
             }
             break;
-        case EVpnNetworkId: //falls through      
+        case EVpnNetworkId:
         case ECmNextLayerSNAPId:
             {
             TUint recordId = serviceRecord->iServiceSNAP;
-            if (recordId != 0)
+            if ( recordId != 0 )
                 {
-                CCDAccessPointRecord* accessPointRecord = static_cast<CCDAccessPointRecord *>
-                                                        ( CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
+                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)
+
+                if ( aAttribute == EVpnNetworkId )
                     {
-                    __ASSERT_DEBUG( retVal >= KCmmDestIdIntervalMin, User::Invariant() );
+                    __ASSERT_DEBUG( retVal >= KCmmDestIdIntervalMin, User::Invariant() );//TODO, replace with iCustomSelectionPolicy
                     retVal -= KCmmDestIdIntervalMin;
                     }
                 }
@@ -596,22 +596,23 @@
                 {
                 User::Leave( KErrArgument );
                 }
-            } //falls through
+            }
+            // Fallthrough intended.
         case ECmNextLayerSNAPId:
             {
-            if ( aValue <= (KCmmDestIdIntervalLegacyMax - 2) )
+            if ( aValue <= ( KCmmDestIdIntervalLegacyMax - 2 ) )
                 {
                 aValue += KCmmDestIdIntervalMin;
                 }
-            
+
             if ( aValue <= KCmmDestIdIntervalMin ||
-                 aValue > KCmmDestIdIntervalMax - 2 )
+                    aValue > KCmmDestIdIntervalMax - 2 )
                 {
                 User::Leave( KErrArgument );
                 }
-            
-            CCDAccessPointRecord* accessPointRecord = static_cast<CCDAccessPointRecord *>
-                                                    ( CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
+
+            CCDAccessPointRecord* accessPointRecord = static_cast<CCDAccessPointRecord*>(
+                    CCDRecordBase::RecordFactoryL( KCDTIdAccessPointRecord ) );
             CleanupStack::PushL( accessPointRecord );
             accessPointRecord->iRecordTag = aValue;
             if ( accessPointRecord->FindL( iSession ) )
@@ -625,7 +626,7 @@
             else
                 {
                 User::Leave( KErrArgument );
-                }            
+                }
             CleanupStack::PopAndDestroy( accessPointRecord );
             }
             break;
--- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/cmpluginwlan.mmp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/group/cmpluginwlan.mmp	Thu Jun 10 16:00:16 2010 +0300
@@ -52,6 +52,9 @@
 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     featmgr.lib
 LIBRARY     cmmpluginbase.lib
--- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/src/cmpluginwlan.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -24,6 +24,7 @@
 #include <cmpluginwlandef.h>
 #include <cmcommonconstants.h>
 #include <featmgr.h>
+#include <EapGeneralSettings.h>
 
 #include "datamobilitycommsdattypes.h"
 #include "cmpluginwlan.h"
@@ -94,7 +95,6 @@
     OstTraceFunctionEntry0( CCMPLUGINWLAN_CCMPLUGINWLAN_ENTRY );
 
     ResetBearerRecords();
-    FeatureManager::UnInitializeLib();
 
     OstTraceFunctionExit0( CCMPLUGINWLAN_CCMPLUGINWLAN_EXIT );
     }
@@ -142,12 +142,10 @@
     {
     OstTraceFunctionEntry0( CCMPLUGINWLAN_CONSTRUCTL_ENTRY );
 
-    FeatureManager::InitializeLibL();
+    // Feature Manager is initialized by the CmmServer, so no need to do it here.
 
     if ( ! FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
         {
-        FeatureManager::UnInitializeLib();
-
         User::Leave( KErrNotSupported );
         }
 
@@ -163,32 +161,31 @@
                 CCDGlobalBearerTypePriorizationRecord::CreateTableL( iSession );
         }
 
-    // get WLAN table id
+    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 );
-
-        TMDBElementId tableId = 0;
-
-        TRAP_IGNORE( tableId = CCDWlanDeviceSettingsRecord::TableIdL( iSession ) );
-        if ( !tableId )
-            {
-            CCDWlanDeviceSettingsRecord::CreateTableL( iSession );
-            }
+        }
 
-        TRAP_IGNORE( tableId = CCDWLANSecSSIDTable::TableIdL( iSession ) );
-        if ( !tableId )
-            {
-            CCDWLANSecSSIDTable::CreateTableL( iSession );
-            }
+    TRAP_IGNORE( tableId = CCDWLANSecSSIDTable::TableIdL( iSession ) );
+    if ( !tableId )
+        {
+        CCDWLANSecSSIDTable::CreateTableL( iSession );
+        }
 
-        TRAP_IGNORE( tableId = CCDDestNWTable::TableIdL( iSession ) );
-        if ( !tableId )
-            {
-            CCDDestNWTable::CreateTableL( iSession );
-            }
+    TRAP_IGNORE( tableId = CCDDestNWTable::TableIdL( iSession ) );
+    if ( !tableId )
+        {
+        CCDDestNWTable::CreateTableL( iSession );
         }
 
     iWAPISupported = FeatureManager::FeatureSupported( KFeatureIdFfWlanWapi );
@@ -305,7 +302,8 @@
         {
         case ECmInvalidAttribute:
             {
-            retVal = 0;
+            // This attribute has been deprecated since Symbian^4.
+            User::Leave( KErrNotSupported );
             }
             break;
         case ECmExtensionLevel:
@@ -1280,11 +1278,11 @@
         tmprec->iWlanServiceId.SetL( ( TUint32 )( aIapRecord->iService ) );
         if ( tmprec->FindL( iSession ) )
             {
-            // we found at least one WLAN using this IAP,
+            // Found at least one WLAN using this IAP.
             retVal = ETrue;
             }
 
-        CleanupStack::PopAndDestroy(tmprec);
+        CleanupStack::PopAndDestroy( tmprec );
         }
 
     OstTraceFunctionExit0( DUP1_CCMPLUGINWLAN_CANHANDLEIAPIDL_EXIT );
@@ -1299,9 +1297,21 @@
     {
     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 );
     }
@@ -2632,8 +2642,9 @@
 // CCmPluginWlan::GetDefPriorityL
 // ---------------------------------------------------------------------------
 //
-TUint32 CCmPluginWlan::GetDefPriorityL( const TUint32 aAttribute ) const//TODO, OST
+TUint32 CCmPluginWlan::GetDefPriorityL( const TUint32 aAttribute ) const
     {
+    OstTraceFunctionEntry0( CCMPLUGINWLAN_GETDEFPRIORITYL_ENTRY );
 
     TUint32 retVal( KDataMobilitySelectionPolicyPriorityWildCard );
 
@@ -2646,7 +2657,6 @@
     if ( priorityRecord->FindL( iSession ) )
         {
         priorityRecord->LoadL( iSession );
-
         switch ( aAttribute )
             {
             case ECmDefaultPriority:
@@ -2665,6 +2675,7 @@
         }
     CleanupStack::PopAndDestroy( priorityRecord );
 
+    OstTraceFunctionExit0( CCMPLUGINWLAN_GETDEFPRIORITYL_EXIT );
     return retVal;
     }
 
--- a/cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/cmpluginwlan/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/cmmanager/cmmgr/cmmplugins/group/bld.inf	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmplugins/group/bld.inf	Thu Jun 10 16:00:16 2010 +0300
@@ -29,6 +29,6 @@
 #include "../cmpluginlan/group/bld.inf"
 #include "../cmpluginwlan/group/bld.inf"
 #include "../cmpluginvpn/group/bld.inf"
-//#include "../cmpluginembdestination/group/bld.inf"
+#include "../cmpluginembdestination/group/bld.inf"
 
 // End of File
--- a/cmmanager/cmmgr/cmmserver/group/cmmserver.mmp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/group/cmmserver.mmp	Thu Jun 10 16:00:16 2010 +0300
@@ -23,7 +23,7 @@
 TARGETTYPE      exe
 UID             0x1000008d 0x20016A7A
 
-CAPABILITY      NetworkControl NetworkServices ProtServ WriteDeviceData
+CAPABILITY      NetworkControl NetworkServices ProtServ ReadDeviceData WriteDeviceData
 VENDORID        VID_DEFAULT
 
 SOURCEPATH      ../src
@@ -66,5 +66,6 @@
 LIBRARY         centralrepository.lib
 LIBRARY         esock.lib
 LIBRARY	        hbcore.lib
+LIBRARY         sysutil.lib
 
 EPOCSTACKSIZE   0x4000
--- a/cmmanager/cmmgr/cmmserver/inc/cmmbearerpriority.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmbearerpriority.h	Thu Jun 10 16:00:16 2010 +0300
@@ -31,16 +31,16 @@
      */
     static CCmmBearerPriority* NewL(
             const TDesC& aServiceType,
-            const TUint& aPriority,
-            const TUint& aUiPriority );
+            const TUint aPriority,
+            const TUint aUiPriority );
 
     /**
      * Two phased constuction.
      */
     static CCmmBearerPriority* NewLC(
             const TDesC& aServiceType,
-            const TUint& aPriority,
-            const TUint& aUiPriority );
+            const TUint aPriority,
+            const TUint aUiPriority );
 
     /**
      * Destructor.
@@ -51,7 +51,7 @@
     /**
      * Constructor.
      */
-    CCmmBearerPriority( const TUint& aPriority, const TUint& aUiPriority );
+    CCmmBearerPriority( const TUint aPriority, const TUint aUiPriority );
 
     /**
      * 2nd phase constructor.
--- a/cmmanager/cmmgr/cmmserver/inc/cmmbearerprioritycache.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmbearerprioritycache.h	Thu Jun 10 16:00:16 2010 +0300
@@ -75,7 +75,7 @@
     void CopyL( RPointerArray<CCmmBearerPriority>& aArray ) const;
 
     /**
-     * Get the priority value for a service type from the bearer priority
+     * Get the priority value for a service type name from the bearer priority
      * cache.
      */
     TUint GetPriority( const TDesC& aServiceType ) const;
--- a/cmmanager/cmmgr/cmmserver/inc/cmmcache.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmcache.h	Thu Jun 10 16:00:16 2010 +0300
@@ -121,7 +121,7 @@
 public:
     void OpenDestinationL(
             CCmmDestinationInstance& aDestinationInstance,
-            const TUint32& aId );
+            const TUint32 aId );
 
     /**
      * Refresh the data contained in aDestinationInstance. This means reloading
@@ -134,12 +134,12 @@
     void CreateDestinationL(
             CCmmDestinationInstance& aDestinationInstance,
             const TDesC& aName,
-            const TUint32& aId );
+            const TUint32 aId );
 
     void OpenConnMethodL(
             CCmmConnMethodInstance& aConnMethodInstance,
             CCmmDestinationInstance* aDestinationInstance,
-            const TUint32& aId );
+            const TUint32 aId );
 
     /**
      * Refresh the data contained in aConnMethodInstance. This means reloading
@@ -152,8 +152,8 @@
     void CreateConnMethodL(
             CCmmConnMethodInstance& aConnMethodInstance,
             CCmmDestinationInstance* aDestinationInstance,
-            const TUint32& aBearerType,
-            const TUint32& aConnMethodId );
+            const TUint32 aBearerType,
+            const TUint32 aConnMethodId );
 
     /**
      * Creates a copy of the given client instance (copy of the connection
@@ -207,14 +207,14 @@
      * is already checked that the connection method given as parameter can be
      * deleted and a transaction is already open.
      */
-    void DeleteConnMethodAsPartOfDestinationUpdateL( const TUint32& aConnMethodId );
+    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 );
+    void DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32 aConnMethodId );
 
     /**
      * Basic connection method delete. Removes a connection method from any
@@ -222,23 +222,23 @@
      */
     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 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 ConnMethodExistsWithId( const TUint32 aConnMethodId );
+    TBool ConnMethodOpenWithId( const TUint32 aConnMethodId );
 
     TBool DestinationExistsWithMetadataLocalizedL(
             CCmmDestinationInstance& aDestinationInstance,
-            const TUint32& aValue );
+            const TUint32 aValue );
     TBool DestinationExistsWithMetadataPurposeL(
             CCmmDestinationInstance& aDestinationInstance,
-            const TUint32& aValue );
+            const TUint32 aValue );
 
-    void DbChangeDetected( const TUint32& aTableId );
-    void DbChangeError( const TUint32& aTableId );
+    void DbChangeDetected( const TUint32 aTableId );
+    void DbChangeError( const TUint32 aTableId );
 
     void CloseDestination( CCmmDestinationInstance& aDestinationInstance );
     void CloseConnMethod( CCmmConnMethodInstance& aConnMethodInstance );
@@ -279,7 +279,7 @@
      */
     void OpenConnectionMethodInstanceL(
             CCmmConnMethodInstance& aConnMethodInstance,
-            const TUint32& aConnMethodId );
+            const TUint32 aConnMethodId );
 
     /**
      * Returns Connection Method specific integer value. CM is loaded(if not loaded already)
@@ -290,8 +290,8 @@
      * KErrNotFound.
      */
     TUint32 GetConnectionMethodInfoIntL(
-            const TUint32& aCmId,
-            const TUint32& aAttribute );
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
 
     /**
      * Returns Connection Method specific boolean value. CM is loaded(if not loaded already)
@@ -302,8 +302,8 @@
      * KErrNotFound.
      */
     TBool GetConnectionMethodInfoBoolL(
-            const TUint32& aCmId,
-            const TUint32& aAttribute );
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
 
     /**
      * Returns Connection Method specific 16 bit string value.
@@ -314,8 +314,8 @@
      * KErrNotFound.
      */
     HBufC* GetConnectionMethodInfoStringL(
-            const TUint32& aCmId,
-            const TUint32& aAttribute );
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
 
     /**
      * Returns Connection Method specific 8 bit string value.
@@ -326,8 +326,8 @@
      * KErrNotFound.
      */
     HBufC8* GetConnectionMethodInfoString8L(
-            const TUint32& aCmId,
-            const TUint32& aAttribute );
+            const TUint32 aCmId,
+            const TUint32 aAttribute );
 
     /**
      * Returns bearer specific integer value. IAP does not need to be loaded for this.
@@ -337,8 +337,8 @@
      * KErrNotFound.
      */
     TUint32 GetBearerInfoIntL(
-            const TUint32& aBearerType,
-            const TUint32& aAttribute );
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
 
     /**
      * Returns bearer specific boolean value. IAP does not need to be loaded for this.
@@ -348,8 +348,8 @@
      * KErrNotFound.
      */
     TBool GetBearerInfoBoolL(
-            const TUint32& aBearerType,
-            const TUint32& aAttribute );
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
 
     /**
      * Returns bearer specific 16 bit string value. IAP does not need to be loaded for this.
@@ -359,8 +359,8 @@
      * KErrNotFound.
      */
     HBufC* GetBearerInfoStringL(
-            const TUint32& aBearerType,
-            const TUint32& aAttribute );
+            const TUint32 aBearerType,
+            const TUint32 aAttribute );
 
     /**
      * Returns bearer specific 8 bit string value. IAP does not need to be loaded for this.
@@ -370,8 +370,16 @@
      * KErrNotFound.
      */
     HBufC8* GetBearerInfoString8L(
-            const TUint32& aBearerType,
-            const TUint32& aAttribute );
+            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
@@ -385,7 +393,7 @@
      * Returns the number of destinations the provided connection method
      * belongs to.
      */
-    TInt DestinationsContainingConnMethod( const TUint32& aConnMethodId ) const;
+    TInt DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const;
 
     /**
      * Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
@@ -416,7 +424,7 @@
      * Returns all the valid connection methods under given destination.
      */
     void GetConnMethodsFromDestinationL(
-            const TUint32& aDestinationId,
+            const TUint32 aDestinationId,
             RArray<TCmmConnMethodItem>& aConnMethodArray ) const;
 
     /**
@@ -430,8 +438,8 @@
     void UpdateBearerPriorityArrayL( const RPointerArray<CCmmBearerPriority>& aArray );
 
     TBool ConnMethodInOtherDestination(
-            const TUint32& aConnMethodId,
-            const TUint32& aDestinationId );
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
     TUint32 NextFreeTemporaryId();
 
     /**
@@ -451,7 +459,7 @@
      * @return Returns ETrue if the CM is connected and EFalse if it's not
      * connected.
      */
-    TBool CheckIfCmConnected( const TUint32& aCmId ) const;
+    TBool CheckIfCmConnected( const TUint32 aCmId ) const;
 
     /**
      * Enumerates connections and checks if any of the connection methods in
@@ -468,32 +476,32 @@
      * Check from database if the given destination is an embedded destination
      * in any other destination.
      */
-    TBool DestinationIsEmbedded( const TUint32& aDestinationId ) const;
+    TBool DestinationIsEmbedded( const TUint32 aDestinationId ) const;
 
     /**
      * Check from database if the given destination has an embedded destination.
      */
-    TBool DestinationHasEmbedded( const TUint32& aDestinationId ) const;
+    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;
+    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;
+    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;
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId ) const;
 
     /**
      * Remove all references to the given connection method from the
@@ -524,13 +532,14 @@
      * 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;
+    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 );
+    void CheckIfConnMethodReferencesCanBeRemovedL(
+            const CCmmConnMethodInstance& aConnMethodInstance );
 
     /**
      * Check if given connection method is referenced from any protected destination.
@@ -555,10 +564,10 @@
     CommsDat::TMDBElementId TableId( TCmmDbRecords aRecord );
 
 private:
-    TInt FindDestinationFromCache( const TUint32& aId );
-    TInt FindNotSavedDestinationFromCacheL( const TDesC& aName, const TUint32& aDestinationId );
+    TInt FindDestinationFromCache( const TUint32 aId );
+    TInt FindNotSavedDestinationFromCacheL( const TDesC& aName, const TUint32 aDestinationId );
 
-    TInt FindConnMethodFromCache( const TUint32& aConnMethodId );
+    TInt FindConnMethodFromCache( const TUint32 aConnMethodId );
 
     void ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
 
--- a/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodinstance.h	Thu Jun 10 16:00:16 2010 +0300
@@ -76,7 +76,7 @@
     /**
      * Set connection method ID.
      */
-    void SetId( const TUint32& aConnMethodId );
+    void SetId( const TUint32 aConnMethodId );
 
     /**
      * Return bearer type.
@@ -91,7 +91,7 @@
     /**
      * Set handle ID.
      */
-    void SetHandle( const TInt& aHandle );
+    void SetHandle( const TInt aHandle );
 
     /**
      * Get pointer to the plugin data container.
@@ -122,7 +122,7 @@
      * @return Returns the value of the requested attribute if succees. Otherwise
      * leaves with KErrArgument
      */
-    TUint32 GetIntAttributeL( const TUint32& aAttribute );
+    TUint32 GetIntAttributeL( const TUint32 aAttribute );
 
     /**
      * Returns integer value identified by aAttribute. Some special cases
@@ -131,7 +131,7 @@
      * @return Returns the value of the requested attribute if succees. Otherwise
      * leaves with KErrArgument
      */
-    TBool GetBoolAttributeL( const TUint32& aAttribute );
+    TBool GetBoolAttributeL( const TUint32 aAttribute );
 
     /**
      * Returns 16 bit string value identified by aAttribute.
@@ -139,7 +139,7 @@
      * @return Returns the value of the requested attribute if succees. Otherwise
      * leaves with KErrArgument
      */
-    HBufC* GetStringAttributeL( const TUint32& aAttribute );
+    HBufC* GetStringAttributeL( const TUint32 aAttribute );
 
     /**
      * Returns 8 bit string value identified by aAttribute.
@@ -147,7 +147,7 @@
      * @return Returns the value of the requested attribute if succees. Otherwise
      * leaves with KErrArgument
      */
-    HBufC8* GetString8AttributeL( const TUint32& aAttribute );
+    HBufC8* GetString8AttributeL( const TUint32 aAttribute );
 
     /**
      * Sets the integer value identified by aAttribute.
@@ -156,8 +156,8 @@
      * @return None
      */
     void SetIntAttributeL(
-            const TUint32& aAttribute,
-            const TUint32& aValue );
+            const TUint32 aAttribute,
+            const TUint32 aValue );
 
     /**
      * Sets the integer value identified by aAttribute.
@@ -166,8 +166,8 @@
      * @return None
      */
     void SetBoolAttributeL(
-            const TUint32& aAttribute,
-            const TBool& aValue );
+            const TUint32 aAttribute,
+            const TBool aValue );
 
     /**
      * Sets the 16 bit string value identified by aAttribute.
@@ -176,7 +176,7 @@
      * @return None
      */
     void SetStringAttributeL(
-            const TUint32& aAttribute,
+            const TUint32 aAttribute,
             const TDesC16& aValue );
 
     /**
@@ -186,7 +186,7 @@
      * @return None
      */
     void SetString8AttributeL(
-            const TUint32& aAttribute,
+            const TUint32 aAttribute,
             const TDesC8& aValue );
 
     /**
@@ -206,7 +206,7 @@
      * transaction has completed successfully. Sets the internal state of this
      * connection method structure to reflect the new deleted state.
      */
-    void DeleteSuccessful( const TUint32& aNewSecondaryId );
+    void DeleteSuccessful( const TUint32 aNewSecondaryId );
 
     /**
      * After update/delete to database, refresh temporary ID to real ID if
@@ -219,7 +219,7 @@
      * Removes a connection method from any open destination handle in the same
      * session.
      */
-    void RemoveConnMethodFromSessionDestinationHandles( const TUint32& aConnMethodId );
+    void RemoveConnMethodFromSessionDestinationHandles( const TUint32 aConnMethodId );
 
 private:
     // Session that owns this instance.
--- a/cmmanager/cmmgr/cmmserver/inc/cmmconnmethoditem.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethoditem.h	Thu Jun 10 16:00:16 2010 +0300
@@ -34,7 +34,10 @@
             TUint32 aId,
             TUint32 aBearerType,
             TUint aBearerPriority,
-            TUint aPriority );
+            TUint aPriority,
+            TBool aIsVirtual = 0,
+            TUint32 aLinkedIapId = 0,
+            TUint32 aLinkedSnapId = 0 );
 
     /**
      * A comparison function. Uses priority since items are in priority order.
@@ -51,6 +54,30 @@
             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;
@@ -62,8 +89,18 @@
     TUint iBearerPriority;
 
     // Priority value in the CCDDataMobilitySelectionPolicy-record. Only used
-    // for sorting purposes when building an array ofTCmmConnMethodItem-objects.
+    // 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_
--- a/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmconnmethodstruct.h	Thu Jun 10 16:00:16 2010 +0300
@@ -35,8 +35,8 @@
 NONSHARABLE_CLASS( CCmmConnMethodStruct ) : public CBase
     {
 public:
-    static CCmmConnMethodStruct* NewL( const TUint32& aConnMethodId );
-    static CCmmConnMethodStruct* NewLC( const TUint32& aConnMethodId );
+    static CCmmConnMethodStruct* NewL( const TUint32 aConnMethodId );
+    static CCmmConnMethodStruct* NewLC( const TUint32 aConnMethodId );
     ~CCmmConnMethodStruct();
 
 private:
@@ -62,7 +62,7 @@
     /**
      * Set the connection method ID.
      */
-    void SetId( const TUint32& aConnMethodId );
+    void SetId( const TUint32 aConnMethodId );
 
     /**
      * Return bearer type.
@@ -91,7 +91,7 @@
      * Decrease the reference counter by one. Return the remaining number of
      * references.
      */
-    TInt SessionInstanceClosed(); //TODO, rename to ConnMethodInstanceClosed ?
+    TInt ConnMethodInstanceClosed();
 
     /**
      * Set the connection method plugin pointer, bearer type and status.
@@ -118,7 +118,7 @@
      * transaction has completed successfully. Sets the internal state of this
      * connection method structure to reflect the new deleted state.
      */
-    void DeleteSuccessful( const TUint32& aNewSecondaryId );
+    void DeleteSuccessful( const TUint32 aNewSecondaryId );
 
 private:
     // The connection method plugin.
--- a/cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationinstance.h	Thu Jun 10 16:00:16 2010 +0300
@@ -70,7 +70,7 @@
     void ConstructL();
 
 public:
-    void SetId( const TUint32& aId );
+    void SetId( const TUint32 aId );
     TUint32 GetId() const;
 
     /**
@@ -91,7 +91,7 @@
     /**
      * Set handle ID.
      */
-    void SetHandle( const TInt& aHandle );
+    void SetHandle( const TInt aHandle );
 
     /**
      * Set the record status for all records.
@@ -130,7 +130,7 @@
             TUint32& aMetadata );
     void SetMetadataL(
             const CMManager::TSnapMetadataField& aMetadataField,
-            const TUint32& aMetadata );
+            const TUint32 aMetadata );
 
     void GetProtectionL( CMManager::TProtectionLevel& aProtectionLevel );
     void SetProtectionL( CMManager::TProtectionLevel aProtectionLevel );
@@ -149,14 +149,14 @@
     /**
      * Return the protection level currently set into this destination instance.
      */
-    CMManager::TProtectionLevel CurrentProtectionLevel();
+    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(
-            const CCmmConnMethodInstance& aConnMethodInstance );
+            CCmmConnMethodInstance& aConnMethodInstance );
 
     /**
      * Adds an embedded destination into this destination. Returns the index in
@@ -181,13 +181,13 @@
      */
     void RemoveConnMethodFromDestinationL(
             const CCmmConnMethodInstance& aConnMethodInstance,
-            const TBool& aTestIfConnected = ETrue );
+            const TBool aTestIfConnected = ETrue );
 
     /**
      * Modifies the priority of a connection method inside this destination.
      */
     void ModifyConnMethodPriorityL(
-            const CCmmConnMethodInstance& aConnMethodInstance,
+            CCmmConnMethodInstance& aConnMethodInstance,
             TUint aIndex );
 
     /**
@@ -195,14 +195,14 @@
      * matches the provided ID. Return NULL if no match is found.
      */
     CCmmConnMethodInstance* FindConnMethodInstanceFromSessionById(
-            const TUint32& aConnMethodId ) const;
+            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;
+            const TUint32 aDestinationId ) const;
 
     /**
      * Check from all open destination handles in the same session if the given
@@ -210,15 +210,15 @@
      * skipped.
      */
     TBool ConnMethodInOtherDestinationInSession(
-            const TUint32& aConnMethodId,
-            const TUint32& aDestinationId ) const;
+            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;
+            const TUint32 aConnMethodId ) const;
 
     /**
      * Check if the given connection method is inside this destination and if
@@ -227,7 +227,7 @@
      * 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;
+    TBool ConnMethodInDestinationButLocked( const TUint32 aConnMethodId ) const;
 
     /**
      * Counts how many connection methods that require priority information are
@@ -250,7 +250,7 @@
      * ID. Checks the current (possibly unsaved) status of this destination
      * handle, not the current status in database.
      */
-    TBool HasEmbeddedWithId( const TUint32& aDestinationId ) const;
+    TBool HasEmbeddedWithId( const TUint32 aDestinationId ) const;
 
     /**
      * After update/delete to database, refresh temporary ID to real ID if
@@ -279,14 +279,14 @@
     /**
      * Loads a requested type of record from database if it is not yet loaded.
      */
-    void RefreshRecordL( TCmmDbRecords aRecordType );
+    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 );
+    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
--- a/cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmdestinationstruct.h	Thu Jun 10 16:00:16 2010 +0300
@@ -46,22 +46,22 @@
     static CCmmDestinationStruct* NewL(
             CCmmCache* aCache,
             CCmmTransactionHandler* aTransactionHandler,
-            const TUint32& aId );
+            const TUint32 aId );
     static CCmmDestinationStruct* NewL(
             CCmmCache* aCache,
             CCmmTransactionHandler* aTransactionHandler,
             const TDesC& aName,
-            const TUint32& aId );
+            const TUint32 aId );
 
     static CCmmDestinationStruct* NewLC(
             CCmmCache* aCache,
             CCmmTransactionHandler* aTransactionHandler,
-            const TUint32& aId );
+            const TUint32 aId );
     static CCmmDestinationStruct* NewLC(
             CCmmCache* aCache,
             CCmmTransactionHandler* aTransactionHandler,
             const TDesC& aName,
-            const TUint32& aId );
+            const TUint32 aId );
 
     virtual ~CCmmDestinationStruct();
 
@@ -69,13 +69,13 @@
     CCmmDestinationStruct( CCmmCache* aCache, CCmmTransactionHandler* aTransactionHandler );
 
     // Opens an existing destination, based on ID.
-    void ConstructL( const TUint32& aDestinationId );
+    void ConstructL( const TUint32 aDestinationId );
 
     // Creates a new destination. With name and optionally also with ID.
-    void ConstructL( const TDesC& aName, const TUint32& aId );
+    void ConstructL( const TDesC& aName, const TUint32 aId );
 
 public:
-    void SetId( const TUint32& aId );
+    void SetId( const TUint32 aId );
     TUint32 GetId() const;
 
     /**
@@ -101,18 +101,51 @@
      */
     void SetStatusForAllRecords( const TCmmRecordStatus& aStatus );
 
-    void CreateSessionInstanceL( //TODO, rename to CreateDestinationInstanceL ?
+
+    /**
+     * 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 );
+
+    /**
+     * Re-loads 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();
-    TInt SessionInstanceClosed(); //TODO, rename to DestinationInstanceClosed ?
+
+    /**
+     * 
+     * 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
@@ -128,6 +161,15 @@
     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 );
--- a/cmmanager/cmmgr/cmmserver/inc/cmminstancemapping.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmminstancemapping.h	Thu Jun 10 16:00:16 2010 +0300
@@ -47,7 +47,7 @@
     RArray<TCmmConnMethodItem> iConnMethodItemArray;
 
     // IDs for unsupported connection methods inside this destination.
-    RArray<TUint32> iUnsupportedConnMethods;
+    RArray<TUint> iUnsupportedConnMethods;
     
     // The destination metadata.
     TUint32 iMetadata;
@@ -94,55 +94,61 @@
     /**
      * Check if the given ID is a valid existing destination ID.
      */
-    TBool ValidDestinationId( const TUint32& aId ) const;
+    TBool ValidDestinationId( const TUint32 aId ) const;
 
     /**
      * Check if the given ID is a valid existing connection method ID.
      */
-    TBool ValidConnMethodId( const TUint32& aId ) const;
+    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;
+    TBool DestinationIsEmbedded( const TUint32 aDestinationId ) const;
 
     /**
      * Check from database if the given destination has an embedded destination.
      */
-    TBool DestinationHasEmbedded( const TUint32& aDestinationId ) const;
+    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;
+    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;
+    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;
+            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;
+    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;
+    TInt DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const;
 
     /**
      * Returns the destination ids containing the connection method given as
@@ -153,6 +159,14 @@
             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.
      */
@@ -175,7 +189,7 @@
      * into the provided connection method item array. The array is reset first.
      */
     void GetConnMethodsFromDestinationL(
-            const TUint32& aDestinationId,
+            const TUint32 aDestinationId,
             RArray<TCmmConnMethodItem>& aConnMethodArray ) const;
 
     /**
@@ -183,8 +197,8 @@
      * destination than the one given.
      */
     TBool ConnMethodInOtherDestination(
-            const TUint32& aConnMethodId,
-            const TUint32& aDestinationId );
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
 
     /**
      * Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
@@ -201,47 +215,48 @@
      * removes the connection method from destination/connection method
      * structures so Refresh()-call is not needed.
      */
-    void AddConnMethodToDeletedListL( const TUint& aConnMethodId );
+    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 );
+    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 );
+    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 );
+    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 );
+    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,
+            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 );
+    void RemoveDestination( const TUint32 aDestinationId );
 
     /**
      * Remove the connection method from all destinations in the current
@@ -250,7 +265,7 @@
      * aChangedDestinations-array.
      */
     void RemoveConnMethodFromDestinations(
-            const TUint32& aConnMethodId,
+            const TUint32 aConnMethodId,
             RArray<TUint32>& aChangedDestinations );
     
     /**
@@ -270,6 +285,24 @@
     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;
@@ -282,7 +315,7 @@
     RArray<TCmmConnMethodItem> iConnMethodItemArray;
 
     // IDs for all unsupported connection methods.
-    RArray<TUint32> iUnsupportedConnMethods;
+    RArray<TUint> iUnsupportedConnMethods;
 
     // All destinations.
     RPointerArray<CDestination> iDestinations;
--- a/cmmanager/cmmgr/cmmserver/inc/cmmserver.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmserver.h	Thu Jun 10 16:00:16 2010 +0300
@@ -85,14 +85,14 @@
      * embedded.
      */
     TBool EmbeddedDestinationConflictsFromAllSessions(
-            const TUint32& aDestinationId,
-            const TUint32& aEmbeddedDestinationId );
+            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 );
+    void RefreshHandlesForAllSessions( const TUint32 aId );
     
     /**
      * Custom security checking for IPCs marked with TSpecialCase::ECustomCheck.
--- a/cmmanager/cmmgr/cmmserver/inc/cmmsession.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/inc/cmmsession.h	Thu Jun 10 16:00:16 2010 +0300
@@ -21,6 +21,7 @@
 #define CMMSESSION_H_
 
 #include <e32base.h>
+#include <f32file.h>
 
 #include "cmmcache.h"
 
@@ -77,21 +78,21 @@
      * matches the provided ID. Return NULL if no match is found.
      */
     CCmmConnMethodInstance* FindConnMethodInstanceById(
-            const TUint32& aConnMethodId );
+            const TUint32 aConnMethodId );
 
     /**
      * Finds a destination instance that belongs to this session and matches
      * the provided handle.
      */
     CCmmDestinationInstance* FindDestinationInstanceByHandleL(
-            const TInt& aDestinationHandle );
+            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 );
+            const TUint32 aDestinationId );
 
     /**
      * Check from all open destination handles in this session if the given
@@ -99,8 +100,8 @@
      * skipped.
      */
     TBool ConnMethodInOtherDestination(
-            const TUint32& aConnMethodId,
-            const TUint32& aDestinationId );
+            const TUint32 aConnMethodId,
+            const TUint32 aDestinationId );
 
     /**
      * Check for restrictions for adding an embedded destination from destination
@@ -111,8 +112,8 @@
      * embedded.
      */
     TBool EmbeddedDestinationConflictsFromAllSessions(
-            const TUint32& aDestinationId,
-            const TUint32& aEmbeddedDestinationId );
+            const TUint32 aDestinationId,
+            const TUint32 aEmbeddedDestinationId );
 
     /**
      * Check for restrictions for adding an embedded destination from destination
@@ -123,8 +124,8 @@
      * embedded.
      */
     TBool EmbeddedDestinationConflicts(
-            const TUint32& aDestinationId,
-            const TUint32& aEmbeddedDestinationId );
+            const TUint32 aDestinationId,
+            const TUint32 aEmbeddedDestinationId );
 
     /**
      * After update to database, refresh temporary ID to real ID if necessary
@@ -138,13 +139,13 @@
      * session.
      */
     void RemoveConnMethodFromDestinationHandles(
-            const TUint32& aConnMethodId );
+            const TUint32 aConnMethodId );
 
     /**
      * Notify this sessions destination/connection method handles about an
      * updated/deleted destination/connection method.
      */
-    void RefreshHandles( const TUint32& aId ) const;
+    void RefreshHandles( const TUint32 aId ) const;
 
 private:
     /**
@@ -256,6 +257,11 @@
             const RMessage2& aMessage,
             CCmmConnMethodInstance* aConnectionMethod );
 
+    /**
+     * Checks the disk space.
+     */
+    TBool CheckSpaceBelowCriticalLevelL();
+
 private:
     RMessage2 iMessage;
 
@@ -274,6 +280,12 @@
     CObjectIx* iConnMethodObjects;
 
     CCmmCache& iCache; // Not owned
+
+    // Tells if Fileserver handle is valid.
+    TBool iFsConnected;
+
+    // File server handle.
+    RFs iFs;
     };
 
 #endif // CMMSESSION_H_
--- a/cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -70,6 +70,8 @@
 
     if ( iIsFeatureManagerInitialised )
         {
+        // Feature manager must not be uninitialized earlier. Plugins must be
+        // able to use it.
         FeatureManager::UnInitializeLib();
         }
 
@@ -107,6 +109,8 @@
     {
     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 );
@@ -133,22 +137,22 @@
 
     TInt err( 0 );
 
-    TRAP( err, iSnapTableId = CCDDataMobilitySelectionPolicyRecord::TableIdL( iTrans->Session() ));
+    TRAP( err, iBearerPriorityTableId =
+            CCDGlobalBearerTypePriorizationRecord::TableIdL( iTrans->Session() ) );
     if ( err == KErrNotFound )
         {
-        iSnapTableId = CCDDataMobilitySelectionPolicyRecord::CreateTableL( iTrans->Session() );
+        iBearerPriorityTableId =
+               CCDGlobalBearerTypePriorizationRecord::CreateTableL( iTrans->Session() );
         }
     else
         {
         User::LeaveIfError( err );
         }
 
-    TRAP( err, iBearerPriorityTableId =
-            CCDGlobalBearerTypePriorizationRecord::TableIdL( iTrans->Session() ) );
+    TRAP( err, iSnapTableId = CCDDataMobilitySelectionPolicyRecord::TableIdL( iTrans->Session() ));
     if ( err == KErrNotFound )
         {
-        iBearerPriorityTableId =
-               CCDGlobalBearerTypePriorizationRecord::CreateTableL( iTrans->Session() );
+        iSnapTableId = CCDDataMobilitySelectionPolicyRecord::CreateTableL( iTrans->Session() );
         }
     else
         {
--- a/cmmanager/cmmgr/cmmserver/src/cmmbearerpriority.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmbearerpriority.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -26,8 +26,8 @@
 //
 CCmmBearerPriority* CCmmBearerPriority::NewL(
         const TDesC& aServiceType,
-        const TUint& aPriority,
-        const TUint& aUiPriority )
+        const TUint aPriority,
+        const TUint aUiPriority )
     {
     CCmmBearerPriority* self = CCmmBearerPriority::NewLC( aServiceType, aPriority, aUiPriority );
     CleanupStack::Pop( self );
@@ -40,8 +40,8 @@
 //
 CCmmBearerPriority* CCmmBearerPriority::NewLC(
         const TDesC& aServiceType,
-        const TUint& aPriority,
-        const TUint& aUiPriority )
+        const TUint aPriority,
+        const TUint aUiPriority )
     {
     CCmmBearerPriority* self = new( ELeave ) CCmmBearerPriority( aPriority, aUiPriority );
     CleanupStack::PushL( self );
@@ -55,8 +55,8 @@
 // ---------------------------------------------------------------------------
 //
 CCmmBearerPriority::CCmmBearerPriority(
-        const TUint& aPriority,
-        const TUint& aUiPriority )
+        const TUint aPriority,
+        const TUint aUiPriority )
         :
         iPriority( aPriority ),
         iUiPriority( aUiPriority )
--- a/cmmanager/cmmgr/cmmserver/src/cmmbearerprioritycache.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmbearerprioritycache.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -201,11 +201,14 @@
     }
 
 // ---------------------------------------------------------------------------
-// Get the priority value for a service type from the bearer priority cache.
+// 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 )
@@ -220,6 +223,7 @@
             }
         }
 
+    OstTraceFunctionExit0( CCMMBEARERPRIORITYCACHE_GETPRIORITY_EXIT );
     return priority;
     }
 
--- a/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmcache.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -154,7 +154,7 @@
 //
 void CCmmCache::OpenDestinationL(
         CCmmDestinationInstance& aDestinationInstance,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_OPENDESTINATIONL_ENTRY );
 
@@ -175,7 +175,7 @@
 
         // Now that cache has a handle on this destination, copy the relevant
         // data to the session instance.
-        destination->CreateSessionInstanceL( aDestinationInstance );
+        destination->CreateDestinationInstanceL( aDestinationInstance );
 
         iDestinationArray.AppendL( destination );
         CleanupStack::Pop( destination );
@@ -184,7 +184,7 @@
         {
         // Cache already has a handle on this destination. Copy the relevant
         // data to the session instance.
-        iDestinationArray[index]->CreateSessionInstanceL( aDestinationInstance );
+        iDestinationArray[index]->CreateDestinationInstanceL( aDestinationInstance );
         }
 
     // Add list of currently contained connection methods.
@@ -236,14 +236,14 @@
 void CCmmCache::CreateDestinationL(
         CCmmDestinationInstance& aDestinationInstance,
         const TDesC& aName,
-        const TUint32& aId )
+        const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_CREATEDESTINATIONL_ENTRY );
 
     // Create a new destination with given name.
     CCmmDestinationStruct* destination = CCmmDestinationStruct::NewLC( this, iTrans, aName, aId );
 
-    destination->CreateSessionInstanceL( aDestinationInstance );
+    destination->CreateDestinationInstanceL( aDestinationInstance );
 
     iDestinationArray.AppendL( destination );
     CleanupStack::Pop( destination );
@@ -261,7 +261,7 @@
 void CCmmCache::OpenConnMethodL(
         CCmmConnMethodInstance& aConnMethodInstance,
         CCmmDestinationInstance* aDestinationInstance,
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_OPENCONNMETHODL_ENTRY );
 
@@ -319,7 +319,11 @@
     {
     OstTraceFunctionEntry0( CCMMCACHE_REFRESHCONNMETHODL_ENTRY );
 
-    //TODO, what to do with embedded?
+    // If embedded destination --> refresh through destination API.
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
+        {
+        return;
+        }
 
     TInt index = FindConnMethodFromCache( aConnMethodInstance.GetId() );
     if ( index == KErrNotFound )
@@ -352,8 +356,8 @@
 void CCmmCache::CreateConnMethodL(
         CCmmConnMethodInstance& aConnMethodInstance,
         CCmmDestinationInstance* aDestinationInstance,
-        const TUint32& aBearerType,
-        const TUint32& aConnMethodId )
+        const TUint32 aBearerType,
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_CREATECONNMETHODL_ENTRY );
 
@@ -539,7 +543,9 @@
         // referenced from any other destination (in database or in any other
         // client-side destination handles).
         if ( !iInstanceMapping->ValidConnMethodId( id ) ||
-                iInstanceMapping->ConnMethodInOtherDestination( id, aDestinationInstance.GetId() ) ||
+                iInstanceMapping->ConnMethodInOtherDestination(
+                        id,
+                        aDestinationInstance.GetId() ) ||
                 aDestinationInstance.ConnMethodInOtherDestinationInSession( id, 0 ) )
             {
             aDestinationInstance.iConnMethodsToBeDeleted.Remove( i );
@@ -565,7 +571,7 @@
     // Update the connection methods inside this destination.
     for ( TInt i = 0; i < aDestinationInstance.iConnMethodItemArray.Count(); i++ )
         {
-        if ( aDestinationInstance.iConnMethodItemArray[i].iBearerType == KUidEmbeddedDestination )
+        if ( aDestinationInstance.iConnMethodItemArray[i].IsEmbedded() )
             {
             // Embedded destination.
 
@@ -590,7 +596,8 @@
                 //
                 // Skip update since client doesn't have an open handle to this
                 // destination.
-                if ( id >= KTemporaryIdCounterStart || !iInstanceMapping->ValidDestinationId( id ) )
+                if ( id >= KTemporaryIdCounterStart ||
+                        !iInstanceMapping->ValidDestinationId( id ) )
                     {
                     // Remove destination item from array if:
                     // - New destination, but client has already closed the handle for it.
@@ -627,13 +634,15 @@
             if ( aDestinationInstance.ProtectionChanged() )
                 {
                 // Check if the connection method protection level needs to be set.
-                switch ( aDestinationInstance.CurrentProtectionLevel() )
+                switch ( aDestinationInstance.CurrentProtectionLevelL() )
                     {
                     case CMManager::EProtLevel0:
                     case CMManager::EProtLevel2:
                         {
-                        if ( aDestinationInstance.LastProtectionLevel() == CMManager::EProtLevel1 ||
-                                aDestinationInstance.LastProtectionLevel() == CMManager::EProtLevel3 )
+                        if ( aDestinationInstance.LastProtectionLevel() ==
+                                CMManager::EProtLevel1 ||
+                                aDestinationInstance.LastProtectionLevel() ==
+                                CMManager::EProtLevel3 )
                             {
                             connMethodProtectionMustBeSet = ETrue;
                             cmProtected = EFalse;
@@ -775,6 +784,12 @@
     {
     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 );
@@ -828,7 +843,9 @@
 // same is done for the connection methods inside this destination.
 // ---------------------------------------------------------------------------
 //
-void CCmmCache::DeleteDestinationL( CCmmDestinationInstance& aDestinationInstance, TBool aForced )
+void CCmmCache::DeleteDestinationL(
+        CCmmDestinationInstance& aDestinationInstance,
+        TBool aForced ) //TODO, comment on aForced param?
     {
     OstTraceFunctionEntry0( CCMMCACHE_DELETEDESTINATIONL_ENTRY );
 
@@ -879,7 +896,7 @@
         TInt count( connMethodArray.Count() );
         if ( count )
             {
-            if ( connMethodArray[count - 1].iBearerType == KUidEmbeddedDestination )
+            if ( connMethodArray[count - 1].IsEmbedded() )
                 {
                 connMethodArray.Remove( count - 1 );
                 }
@@ -887,7 +904,9 @@
         // 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 ) )
+            if ( iInstanceMapping->ConnMethodInOtherDestination(
+                    connMethodArray[i].iId,
+                    destinationId ) )
                 {
                 connMethodArray.Remove( i );
                 i--;
@@ -978,7 +997,7 @@
 // as deleted (through an already open handle) will restore it.
 // ---------------------------------------------------------------------------
 //
-void CCmmCache::DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32& aConnMethodId )
+void CCmmCache::DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_ENTRY );
 
@@ -1054,6 +1073,7 @@
                 break;
             case ECmmConnMethodStatusToBeDeleted:
                 // Connection method has already been deleted.
+                OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
                 return;
             case ECmmConnMethodStatusChanged:
             default:
@@ -1070,7 +1090,7 @@
     TCmmIdStruct idStruct( aConnMethodId, 0 );
     iDeletedConnMethods.AppendL( idStruct );
 
-    OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
+    OstTraceFunctionExit0( DUP3_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONDELETEL_EXIT );
     }
 
 // ---------------------------------------------------------------------------
@@ -1084,7 +1104,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmCache::DeleteConnMethodAsPartOfDestinationUpdateL(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_ENTRY );
 
@@ -1163,6 +1183,7 @@
                 break;
             case ECmmConnMethodStatusToBeDeleted:
                 // Connection method has already been deleted.
+                OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
                 return;
             case ECmmConnMethodStatusChanged:
             default:
@@ -1178,7 +1199,7 @@
         iDeletedConnMethods.AppendL( idStruct );
         }
 
-    OstTraceFunctionExit0( DUP2_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
+    OstTraceFunctionExit0( DUP3_CCMMCACHE_DELETECONNMETHODASPARTOFDESTINATIONUPDATEL_EXIT );
     }
 
 // ---------------------------------------------------------------------------
@@ -1256,7 +1277,7 @@
 // aId needs to be in the current valid range (0x1001 - 0x10FF atm).
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationExistsWithId( const TUint32& aId )
+TBool CCmmCache::DestinationExistsWithId( const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHID_ENTRY );
 
@@ -1271,7 +1292,7 @@
 // If a destination ID is given, that destination is skipped.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationExistsWithNameL( const TDesC& aName, const TUint32& aDestinationId )
+TBool CCmmCache::DestinationExistsWithNameL( const TDesC& aName, const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHNAMEL_ENTRY );
 
@@ -1328,7 +1349,6 @@
         }
 
     OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHNAMEL_EXIT );
-
     return found;
     }
 
@@ -1340,7 +1360,7 @@
 // with the same ID (The UpdateL() operation would fail for one of them anyway).
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationOpenWithId( const TUint32& aId )
+TBool CCmmCache::DestinationOpenWithId( const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONOPENWITHID_ENTRY );
 
@@ -1350,8 +1370,8 @@
         {
         result = ETrue;
         }
+
     OstTraceFunctionExit0( CCMMCACHE_DESTINATIONOPENWITHID_EXIT );
-
     return result;
     }
 
@@ -1368,7 +1388,7 @@
 //
 TBool CCmmCache::NotSavedDestinationOpenWithNameL(
         const TDesC& aName,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_NOTSAVEDDESTINATIONOPENWITHNAMEL_ENTRY );
 
@@ -1378,8 +1398,8 @@
         {
         res = ETrue;
         }
+
     OstTraceFunctionExit0( CCMMCACHE_NOTSAVEDDESTINATIONOPENWITHNAMEL_EXIT );
-
     return res;
     }
 
@@ -1387,14 +1407,13 @@
 // Check if the given ID belongs to a valid existing connection method.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::ConnMethodExistsWithId( const TUint32& aConnMethodId )
+TBool CCmmCache::ConnMethodExistsWithId( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODEXISTSWITHID_ENTRY );
 
     TBool exists = iInstanceMapping->ValidConnMethodId( aConnMethodId );
 
     OstTraceFunctionExit0( CCMMCACHE_CONNMETHODEXISTSWITHID_EXIT );
-
     return exists;
     }
 
@@ -1407,7 +1426,7 @@
 // anyway).
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::ConnMethodOpenWithId( const TUint32& aConnMethodId )
+TBool CCmmCache::ConnMethodOpenWithId( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODOPENWITHID_ENTRY );
 
@@ -1417,8 +1436,8 @@
         {
         result = ETrue;
         }
+
     OstTraceFunctionExit0( CCMMCACHE_CONNMETHODOPENWITHID_EXIT );
-
     return result;
     }
 
@@ -1431,7 +1450,7 @@
 //
 TBool CCmmCache::DestinationExistsWithMetadataLocalizedL(
         CCmmDestinationInstance& aDestinationInstance,
-        const TUint32& aValue )
+        const TUint32 aValue )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATALOCALIZEDL_ENTRY );
 
@@ -1502,8 +1521,8 @@
             }
         CleanupStack::PopAndDestroy( metaSet );
         }
+
     OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATALOCALIZEDL_EXIT );
-
     return result;
     }
 
@@ -1516,7 +1535,7 @@
 //
 TBool CCmmCache::DestinationExistsWithMetadataPurposeL(
         CCmmDestinationInstance& aDestinationInstance,
-        const TUint32& aValue )
+        const TUint32 aValue )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATAPURPOSEL_ENTRY );
 
@@ -1587,8 +1606,8 @@
             }
         CleanupStack::PopAndDestroy( metaSet );
         }
+
     OstTraceFunctionExit0( CCMMCACHE_DESTINATIONEXISTSWITHMETADATAPURPOSEL_EXIT );
-
     return result;
     }
 
@@ -1599,7 +1618,7 @@
 // needed.
 // ---------------------------------------------------------------------------
 //
-void CCmmCache::DbChangeDetected( const TUint32& aTableId )
+void CCmmCache::DbChangeDetected( const TUint32 aTableId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DBCHANGEDETECTED_ENTRY );
 
@@ -1614,7 +1633,7 @@
 // it has up-to-date information.
 // ---------------------------------------------------------------------------
 //
-void CCmmCache::DbChangeError( const TUint32& aTableId )
+void CCmmCache::DbChangeError( const TUint32 aTableId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_DBCHANGEERROR_ENTRY );
 
@@ -1638,7 +1657,7 @@
 
     if ( index >= 0 )
         {
-        TInt remainingSessionInstances = iDestinationArray[index]->SessionInstanceClosed();
+        TInt remainingSessionInstances = iDestinationArray[index]->DestinationInstanceClosed();
         if ( remainingSessionInstances <= 0)
             {
             // If status is 'to be deleted', then the last handle keeping this
@@ -1679,7 +1698,7 @@
 
     if ( index >= 0 )
         {
-        TInt remainingSessionInstances = iConnMethodArray[index]->SessionInstanceClosed();
+        TInt remainingSessionInstances = iConnMethodArray[index]->ConnMethodInstanceClosed();
         if ( remainingSessionInstances <= 0 )
             {
             // If status is 'to be deleted', then the last handle keeping this
@@ -1714,14 +1733,13 @@
 //
 CommsDat::CMDBSession& CCmmCache::Session() const
     {
-    OstTraceFunctionEntry0( CCMMCACHE_SESSION_ENTRY );
-
+    // No traces.
     return iTrans->Session();
     }
 
 //-----------------------------------------------------------------------------
 // Finds out the bearer type and priority of the service type from given IAP
-// record.
+// record. performs LoadL()-call on the provided IAP record.
 //-----------------------------------------------------------------------------
 //
 void CCmmCache::BearerInfoFromIapRecordL(
@@ -1731,8 +1749,8 @@
     {
     OstTraceFunctionEntry0( CCMMCACHE_BEARERINFOFROMIAPRECORDL_ENTRY );
 
-    // Load the IAP record from IAP table. This is an optimization that plugins
-    // doesn't have to do it every time the CanHandleIapIdL() is called.
+    // 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 );
@@ -1778,7 +1796,7 @@
     // Check which bearer handles the given IAP ID.
     for ( TInt i = 0; i < iPlugins->Count(); i++ )
         {
-        TRAP( err, canHandle = (*iPlugins)[i]->CanHandleIapIdL( aIapRecord ) ); //TODO, check leave, trap needed?
+        TRAP( err, canHandle = (*iPlugins)[i]->CanHandleIapIdL( aIapRecord ) );
         if ( !err && canHandle )
             {
             TUint32 thisExtLevel = (*iPlugins)[i]->GetBearerInfoIntL( ECmExtensionLevel );
@@ -1799,6 +1817,23 @@
     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.
@@ -1819,7 +1854,7 @@
 // Returns the number of destinations the provided connection method belongs to.
 //-----------------------------------------------------------------------------
 //
-TInt CCmmCache::DestinationsContainingConnMethod( const TUint32& aConnMethodId ) const
+TInt CCmmCache::DestinationsContainingConnMethod( const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODREFERENCECOUNT_ENTRY );
 
@@ -1902,7 +1937,7 @@
 //-----------------------------------------------------------------------------
 //
 void CCmmCache::GetConnMethodsFromDestinationL(
-        const TUint32& aDestinationId,
+        const TUint32 aDestinationId,
         RArray<TCmmConnMethodItem>& aConnMethodArray ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETCONNMETHODSFROMDESTINATIONL_ENTRY );
@@ -1945,8 +1980,8 @@
 //-----------------------------------------------------------------------------
 //
 TBool CCmmCache::ConnMethodInOtherDestination(
-        const TUint32& aConnMethodId,
-        const TUint32& aDestinationId )
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODINOTHERDESTINATION_ENTRY );
 
@@ -1984,7 +2019,7 @@
 // Returns either a valid array index or KErrNotFound.
 //-----------------------------------------------------------------------------
 //
-TInt CCmmCache::FindDestinationFromCache( const TUint32& aId )
+TInt CCmmCache::FindDestinationFromCache( const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_FINDDESTINATIONFROMCACHE_ENTRY );
 
@@ -2013,7 +2048,9 @@
 // Returns either a valid array index or KErrNotFound.
 //-----------------------------------------------------------------------------
 //
-TInt CCmmCache::FindNotSavedDestinationFromCacheL( const TDesC& aName, const TUint32& aDestinationId )
+TInt CCmmCache::FindNotSavedDestinationFromCacheL(
+        const TDesC& aName,
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_FINDNOTSAVEDDESTINATIONFROMCACHEL_ENTRY );
 
@@ -2056,7 +2093,7 @@
 // Returns either a valid array index or KErrNotFound.
 //-----------------------------------------------------------------------------
 //
-TInt CCmmCache::FindConnMethodFromCache( const TUint32& aConnMethodId )
+TInt CCmmCache::FindConnMethodFromCache( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_FINDCONNMETHODFROMCACHE_ENTRY );
 
@@ -2085,7 +2122,7 @@
 //
 void CCmmCache::OpenConnectionMethodInstanceL(
         CCmmConnMethodInstance& aConnMethodInstance,
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCACHE_OPENCONNECTIONMETHODINSTANCEL_ENTRY );
 
@@ -2130,8 +2167,8 @@
 //-----------------------------------------------------------------------------
 //
 TUint32 CCmmCache::GetConnectionMethodInfoIntL(
-        const TUint32& aCmId,
-        const TUint32& aAttribute )
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOINTL_ENTRY );
 
@@ -2164,8 +2201,8 @@
 //-----------------------------------------------------------------------------
 //
 TBool CCmmCache::GetConnectionMethodInfoBoolL(
-        const TUint32& aCmId,
-        const TUint32& aAttribute )
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOBOOLL_ENTRY );
 
@@ -2198,8 +2235,8 @@
 //-----------------------------------------------------------------------------
 //
 HBufC* CCmmCache::GetConnectionMethodInfoStringL(
-        const TUint32& aCmId,
-        const TUint32& aAttribute )
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRINGL_ENTRY );
 
@@ -2232,8 +2269,8 @@
 //-----------------------------------------------------------------------------
 //
 HBufC8* CCmmCache::GetConnectionMethodInfoString8L(
-        const TUint32& aCmId,
-        const TUint32& aAttribute )
+        const TUint32 aCmId,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETCONNECTIONMETHODINFOSTRING8L_ENTRY );
 
@@ -2267,8 +2304,8 @@
 //-----------------------------------------------------------------------------
 //
 TUint32 CCmmCache::GetBearerInfoIntL(
-        const TUint32& aBearerType,
-        const TUint32& aAttribute )
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOINTL_ENTRY );
 
@@ -2298,8 +2335,8 @@
 //-----------------------------------------------------------------------------
 //
 TBool CCmmCache::GetBearerInfoBoolL(
-        const TUint32& aBearerType,
-        const TUint32& aAttribute )
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOBOOLL_ENTRY );
 
@@ -2329,8 +2366,8 @@
 //-----------------------------------------------------------------------------
 //
 HBufC* CCmmCache::GetBearerInfoStringL(
-        const TUint32& aBearerType,
-        const TUint32& aAttribute )
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOSTRINGL_ENTRY );
 
@@ -2360,8 +2397,8 @@
 //-----------------------------------------------------------------------------
 //
 HBufC8* CCmmCache::GetBearerInfoString8L(
-        const TUint32& aBearerType,
-        const TUint32& aAttribute )
+        const TUint32 aBearerType,
+        const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCACHE_GETBEARERINFOSTRING8L_ENTRY );
 
@@ -2427,8 +2464,10 @@
 
         defConnRecord->SetRecordId( KCDNewRecordRequest );
         defConnRecord->iUsageOfWlan = ( TUint )aGenConnSettings.iUsageOfWlan;
-        defConnRecord->iCellularDataUsageHome = ( TUint )aGenConnSettings.iCellularDataUsageHome;
-        defConnRecord->iCellularDataUsageVisitor = ( TUint )aGenConnSettings.iCellularDataUsageVisitor;
+        defConnRecord->iCellularDataUsageHome =
+                ( TUint )aGenConnSettings.iCellularDataUsageHome;
+        defConnRecord->iCellularDataUsageVisitor =
+                ( TUint )aGenConnSettings.iCellularDataUsageVisitor;
         defConnRecord->StoreL( Session() );
 
         iTrans->CommitTransactionL();
@@ -2527,7 +2566,7 @@
 // connected.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::CheckIfCmConnected( const TUint32& aCmId ) const
+TBool CCmmCache::CheckIfCmConnected( const TUint32 aCmId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_CHECKIFCMCONNECTED_ENTRY );
 
@@ -2607,7 +2646,9 @@
                     }
                 else
                     {
-                    iInstanceMapping->GetConnMethodsFromDestinationL( aDestinationId, connMethodArray );
+                    iInstanceMapping->GetConnMethodsFromDestinationL(
+                            aDestinationId,
+                            connMethodArray );
                     }
 
                 // Iterate through all connections.
@@ -2647,7 +2688,7 @@
 // any other destination.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationIsEmbedded( const TUint32& aDestinationId ) const
+TBool CCmmCache::DestinationIsEmbedded( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONISEMBEDDED_ENTRY );
 
@@ -2661,7 +2702,7 @@
 // Check from database if the given destination has an embedded destination.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationHasEmbedded( const TUint32& aDestinationId ) const
+TBool CCmmCache::DestinationHasEmbedded( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONHASEMBEDDED_ENTRY );
 
@@ -2676,7 +2717,7 @@
 // IAP.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::DestinationPointedToByVirtualIap( const TUint32& aDestinationId ) const
+TBool CCmmCache::DestinationPointedToByVirtualIap( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_DESTINATIONPOINTEDTOBYVIRTUALIAP_ENTRY );
 
@@ -2692,13 +2733,15 @@
 // virtual IAP.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmCache::ConnMethodPointedToByVirtualIap( const TUint32& aConnMethodId ) const
+TBool CCmmCache::ConnMethodPointedToByVirtualIap( const TUint32 aConnMethodId ) const
     {
-
-    TBool pointedByVirtual =
+    OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODPOINTEDTOBYVIRTUALIAP_ENTRY );
+
+    TBool pointedToByVirtual =
             iInstanceMapping->ConnMethodPointedToByVirtualIap( aConnMethodId );
 
-    return pointedByVirtual;
+    OstTraceFunctionExit0( CCMMCACHE_CONNMETHODPOINTEDTOBYVIRTUALIAP_EXIT );
+    return pointedToByVirtual;
     }
 
 // ---------------------------------------------------------------------------
@@ -2707,7 +2750,8 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmCache::ConnMethodInDestinationButLocked(
-        const TUint32& aConnMethodId, const TUint32& aDestinationId ) const
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
 
@@ -2845,7 +2889,7 @@
 // This method is used to find out those real IDs before that.
 // ---------------------------------------------------------------------------
 //
-void CCmmCache::TranslateTemporaryId( const TUint32& aTemporaryId, TUint32& aRealId ) const
+void CCmmCache::TranslateTemporaryId( const TUint32 aTemporaryId, TUint32& aRealId ) const
     {
     OstTraceFunctionEntry0( CCMMCACHE_TRANSLATETEMPORARYID_ENTRY );
 
@@ -2898,7 +2942,9 @@
     iInstanceMapping->GetDestinationsL( dbDestinations );
     for ( TInt i = 0; i < dbDestinations.Count(); i++ )
         {
-        if ( iInstanceMapping->ConnMethodInDestinationButLocked( connMethodId, dbDestinations[i] ) )
+        if ( iInstanceMapping->ConnMethodInDestinationButLocked(
+                connMethodId,
+                dbDestinations[i] ) )
             {
             User::Leave( KErrLocked );
             }
@@ -2915,8 +2961,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// Check if the given connection method can have all references removed and
-// made into an uncategorized connection method. //TODO, fix comment, this looks like copy&paste from above
+// Check if given connection method is referenced from any protected destination.
 // ---------------------------------------------------------------------------
 //
 void CCmmCache::CheckIfConnMethodBelongsToProtectedDestinationL(
@@ -2943,7 +2988,8 @@
         {
         // Check if any of destinations is protected.
         metadata = iInstanceMapping->DestinationMetadata( dbDestinations[i] );
-        TUint32 protlevel = ( metadata & KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
+        TUint32 protlevel =
+                ( metadata & KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
         if ( protlevel == CMManager::EProtLevel1 || protlevel == CMManager::EProtLevel3 )
             {
             aBelongsToProtectedDestination = ETrue;
--- a/cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethodinstance.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -144,7 +144,7 @@
 // Set connection method ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmConnMethodInstance::SetId( const TUint32& aConnMethodId )
+void CCmmConnMethodInstance::SetId( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETID_ENTRY );
 
@@ -175,7 +175,7 @@
 // Set handle ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmConnMethodInstance::SetHandle( const TInt& aHandle )
+void CCmmConnMethodInstance::SetHandle( const TInt aHandle )
     {
     iHandle = aHandle;
     }
@@ -242,7 +242,12 @@
         User::Leave( KErrCorrupt );
         }
 
-    iPlugin->GetPluginDataL( iPluginDataInstance ); //TODO, check deletes for iPluginDataInstance
+    // Embedded destination does not have any data.
+    if ( !IsEmbeddedDestination() )
+        {
+        iPlugin->GetPluginDataL( iPluginDataInstance );
+        }
+
     aConnMethodStruct->IncrementReferenceCounter();
 
     switch ( aConnMethodStruct->GetStatus() )
@@ -271,7 +276,7 @@
 // CCmmConnMethodInstance::GetIntAttributeL
 // ---------------------------------------------------------------------------
 //
-TUint32 CCmmConnMethodInstance::GetIntAttributeL( const TUint32& aAttribute )
+TUint32 CCmmConnMethodInstance::GetIntAttributeL( const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETINTATTRIBUTEL_ENTRY );
 
@@ -280,6 +285,26 @@
         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 );
@@ -290,7 +315,7 @@
 // CCmmConnMethodInstance::GetBoolAttributeL
 // ---------------------------------------------------------------------------
 //
-TBool CCmmConnMethodInstance::GetBoolAttributeL( const TUint32& aAttribute )
+TBool CCmmConnMethodInstance::GetBoolAttributeL( const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETBOOLATTRIBUTEL_ENTRY );
 
@@ -299,6 +324,27 @@
         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 )
         {
@@ -306,16 +352,40 @@
             {
             if ( GetId() > 0 )
                 {
-                if ( iCache )
+                // Check first if this is embedded destination.
+                retVal = iPlugin->GetBoolAttributeL( CMManager::ECmDestination,
+                        iPluginDataInstance );
+                if ( retVal )
                     {
-                    retVal = iCache->CheckIfCmConnected( GetId() );
+                    retVal = iCache->DestinationConnectedL( GetId() );
+                    }
+                else
+                    {
+                    if ( iCache )
+                        {
+                        retVal = iCache->CheckIfCmConnected( GetId() );
+                        }
                     }
                 }
             }
             break;
         case CMManager::ECmIsLinked:
             {
-            //TODO
+            // 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:
@@ -333,7 +403,7 @@
 // CCmmConnMethodInstance::GetStringAttributeL
 // ---------------------------------------------------------------------------
 //
-HBufC* CCmmConnMethodInstance::GetStringAttributeL( const TUint32& aAttribute )
+HBufC* CCmmConnMethodInstance::GetStringAttributeL( const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETSTRINGATTRIBUTEL_ENTRY );
 
@@ -342,6 +412,12 @@
         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 );
@@ -352,7 +428,7 @@
 // CCmmConnMethodInstance::GetString8AttributeL
 // ---------------------------------------------------------------------------
 //
-HBufC8* CCmmConnMethodInstance::GetString8AttributeL( const TUint32& aAttribute )
+HBufC8* CCmmConnMethodInstance::GetString8AttributeL( const TUint32 aAttribute )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_GETSTRING8ATTRIBUTEL_ENTRY );
 
@@ -361,6 +437,12 @@
         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 );
@@ -372,8 +454,8 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmConnMethodInstance::SetIntAttributeL(
-        const TUint32& aAttribute,
-        const TUint32& aValue )
+        const TUint32 aAttribute,
+        const TUint32 aValue )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETINTATTRIBUTEL_ENTRY );
 
@@ -392,8 +474,8 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmConnMethodInstance::SetBoolAttributeL(
-        const TUint32& aAttribute,
-        const TBool& aValue )
+        const TUint32 aAttribute,
+        const TBool aValue )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETBOOLATTRIBUTEL_ENTRY );
 
@@ -412,7 +494,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmConnMethodInstance::SetStringAttributeL(
-        const TUint32& aAttribute,
+        const TUint32 aAttribute,
         const TDesC16& aValue )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETSTRINGATTRIBUTEL_ENTRY );
@@ -432,7 +514,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmConnMethodInstance::SetString8AttributeL(
-        const TUint32& aAttribute,
+        const TUint32 aAttribute,
         const TDesC8& aValue )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_SETSTRING8ATTRIBUTEL_ENTRY );
@@ -481,7 +563,7 @@
 // connection method structure to reflect the new deleted state.
 // ---------------------------------------------------------------------------
 //
-void CCmmConnMethodInstance::DeleteSuccessful( const TUint32& aNewSecondaryId )
+void CCmmConnMethodInstance::DeleteSuccessful( const TUint32 aNewSecondaryId )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODINSTANCE_DELETESUCCESSFUL_ENTRY );
 
@@ -516,7 +598,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmConnMethodInstance::RemoveConnMethodFromSessionDestinationHandles(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     if ( iCmmSession )
         {
--- a/cmmanager/cmmgr/cmmserver/src/cmmconnmethoditem.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethoditem.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -19,6 +19,9 @@
 */
 
 
+#include <cmmanagerdef.h>
+#include <cmpluginembdestinationdef.h>
+
 #include "cmmconnmethoditem.h"
 
 
@@ -27,11 +30,15 @@
 // ---------------------------------------------------------------------------
 //
 TCmmConnMethodItem::TCmmConnMethodItem()
+        :
+        iId( 0 ),
+        iBearerType( 0 ),
+        iBearerPriority( 0 ),
+        iPriority( 0 ),
+        iIsVirtual( 0 ),
+        iLinkedIapId( 0 ),
+        iLinkedSnapId( 0 )           
     {
-    iId = 0;
-    iBearerType = 0;
-    iBearerPriority = 0;
-    iPriority = 0;
     }
 
 // ---------------------------------------------------------------------------
@@ -42,12 +49,18 @@
         TUint32 aId,
         TUint32 aBearerType,
         TUint aBearerPriority,
-        TUint aPriority )
+        TUint aPriority,
+        TBool aIsVirtual,
+        TUint32 aLinkedIapId,
+        TUint32 aLinkedSnapId )
         :
         iId( aId ),
         iBearerType( aBearerType ),
         iBearerPriority( aBearerPriority ),
-        iPriority( aPriority )
+        iPriority( aPriority ),
+        iIsVirtual( aIsVirtual ),
+        iLinkedIapId( aLinkedIapId ),
+        iLinkedSnapId( aLinkedSnapId )
     {
     }
 
@@ -60,7 +73,27 @@
         const TCmmConnMethodItem& aSecond )
     {
     // Zero if match, negative if first is smaller, positive otherwise.
-    return ( TInt )aFirst.iPriority - ( TInt )aSecond.iPriority;
+    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;
     }
 
 // ---------------------------------------------------------------------------
@@ -81,4 +114,50 @@
     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
--- a/cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -34,7 +34,7 @@
 // ---------------------------------------------------------------------------
 //
 CCmmConnMethodStruct* CCmmConnMethodStruct::NewL(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWL_ENTRY );
 
@@ -50,7 +50,7 @@
 // ---------------------------------------------------------------------------
 //
 CCmmConnMethodStruct* CCmmConnMethodStruct::NewLC(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWLC_ENTRY );
 
@@ -138,7 +138,7 @@
 // Set the connection method ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmConnMethodStruct::SetId( const TUint32& aConnMethodId )
+void CCmmConnMethodStruct::SetId( const TUint32 aConnMethodId )
     {
     iConnMethodId = aConnMethodId;
     }
@@ -218,7 +218,7 @@
 // references.
 // ---------------------------------------------------------------------------
 //
-TInt CCmmConnMethodStruct::SessionInstanceClosed()
+TInt CCmmConnMethodStruct::ConnMethodInstanceClosed()
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
 
@@ -287,7 +287,7 @@
 // connection method structure to reflect the new deleted state.
 // ---------------------------------------------------------------------------
 //
-void CCmmConnMethodStruct::DeleteSuccessful( const TUint32& aNewSecondaryId )
+void CCmmConnMethodStruct::DeleteSuccessful( const TUint32 aNewSecondaryId )
     {
     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_DELETESUCCESSFUL_ENTRY );
 
--- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -38,7 +38,9 @@
 // Two phased construction.
 // ---------------------------------------------------------------------------
 //
-CCmmDestinationInstance* CCmmDestinationInstance::NewL( CCmmSession* aCmmSession, CCmmCache* aCache )
+CCmmDestinationInstance* CCmmDestinationInstance::NewL(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_NEWL_ENTRY );
 
@@ -53,7 +55,9 @@
 // Two phased construction.
 // ---------------------------------------------------------------------------
 //
-CCmmDestinationInstance* CCmmDestinationInstance::NewLC( CCmmSession* aCmmSession, CCmmCache* aCache )
+CCmmDestinationInstance* CCmmDestinationInstance::NewLC(
+        CCmmSession* aCmmSession,
+        CCmmCache* aCache )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_NEWLC_ENTRY );
 
@@ -135,7 +139,7 @@
 // Set the destination ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetId( const TUint32& aId )
+void CCmmDestinationInstance::SetId( const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETID_ENTRY );
 
@@ -214,7 +218,7 @@
 // Set handle ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetHandle( const TInt& aHandle )
+void CCmmDestinationInstance::SetHandle( const TInt aHandle )
     {
     iHandle = aHandle;
     }
@@ -242,7 +246,7 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETELEMENTIDL_ENTRY );
 
-    RefreshRecordL( ECmmDestNetworkRecord );
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
 
     if ( !iNetworkRecord )
         {
@@ -261,7 +265,7 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETRECORDTAGFROMAPRECORDL_ENTRY );
 
-    RefreshRecordL( ECmmDestApRecord );
+    LoadRecordIfMissingL( ECmmDestApRecord );
 
     if ( !iDestApRecord )
         {
@@ -406,7 +410,7 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETDESTINATIONNAMEL_ENTRY );
 
-    RefreshRecordL( ECmmDestNetworkRecord );
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
 
     if ( !iNetworkRecord )
         {
@@ -427,7 +431,7 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETLOCALISEDDESTINATIONNAMEL_ENTRY );
 
-    RefreshRecordL( ECmmDestNetworkRecord );
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
 
     if ( !iNetworkRecord )
         {
@@ -504,7 +508,7 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETDESTINATIONICONL_ENTRY );
 
-    RefreshRecordL( ECmmDestMetadataRecord );
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
 
     if ( !iMetadataRecord )
         {
@@ -512,8 +516,7 @@
         }
 
     HBufC* icon( NULL );
-    //icon = TPtrC( iMetadataRecord->iIconFileName ).AllocL();//TODO, enable after commsdat icon changes are implemented.
-	icon = KNullDesC().AllocL();//TODO
+    icon = TPtrC( iMetadataRecord->iIconFileName ).AllocL();
 
     OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETDESTINATIONICONL_EXIT );
     return icon;
@@ -523,14 +526,14 @@
 // Set the destination icon.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetDestinationIconL( const TDesC& /*aDestinationIcon*/ )
+void CCmmDestinationInstance::SetDestinationIconL( const TDesC& aDestinationIcon )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETDESTINATIONICONL_ENTRY );
 
     // Write action, load all records.
     LoadAllRecordsL();
 
-    //iMetadataRecord->iIconFileName.SetL( aDestinationIcon );//TODO, enable after commsdat icon changes are implemented.
+    iMetadataRecord->iIconFileName.SetL( aDestinationIcon );
 
     iMetadataRecordStatus = ECmmRecordStatusModified;
     iStatus = ECmmDestinationStatusChanged;
@@ -548,38 +551,41 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETMETADATAL_ENTRY );
 
-    RefreshRecordL( ECmmDestMetadataRecord );
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
 
     if ( !iMetadataRecord )
         {
-        OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETMETADATAL_EXIT );
-
         User::Leave( KErrCorrupt );
         }
 
     switch ( aMetadataField )
         {
         case CMManager::ESnapMetadataInternet:
-            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) & CMManager::ESnapMetadataInternet;
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataInternet;
             break;
         case CMManager::ESnapMetadataHighlight:
-            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) & CMManager::ESnapMetadataHighlight;
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataHighlight;
             break;
         case CMManager::ESnapMetadataHiddenAgent:
-            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) & CMManager::ESnapMetadataHiddenAgent;
+            aMetadata = ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataHiddenAgent;
             break;
         case CMManager::ESnapMetadataDestinationIsLocalised:
-            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) & CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
+            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
             break;
         case CMManager::ESnapMetadataPurpose:
-            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) & CMManager::ESnapMetadataPurpose ) >> 8;
+            aMetadata = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+                    CMManager::ESnapMetadataPurpose ) >> 8;
             break;
         default:
             User::Leave( KErrArgument );
             break;
         }
 
-    OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_GETMETADATAL_EXIT );
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_GETMETADATAL_EXIT );
     }
 
 // ---------------------------------------------------------------------------
@@ -588,7 +594,7 @@
 //
 void CCmmDestinationInstance::SetMetadataL(
         const CMManager::TSnapMetadataField& aMetadataField,
-        const TUint32& aMetadata )
+        const TUint32 aMetadata )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAL_ENTRY );
 
@@ -631,14 +637,15 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_GETPROTECTIONL_ENTRY );
 
-    RefreshRecordL( ECmmDestMetadataRecord );
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
 
     if ( !iMetadataRecord )
         {
         User::Leave( KErrCorrupt );
         }
 
-    TUint32 value = ( ( TUint32 )( iMetadataRecord->iMetadata ) & KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
+    TUint32 value = ( ( TUint32 )( iMetadataRecord->iMetadata ) &
+            KDestProtectionLevelMask ) >> KBitsToShiftDestProtectionLevel;
     switch ( value )
         {
         case CMManager::EProtLevel0:
@@ -673,7 +680,8 @@
     // Write action, load all records.
     LoadAllRecordsL();
 
-    //TODO, comment this:
+    // 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 )
         {
@@ -724,9 +732,18 @@
 // Return the protection level currently set into this destination instance.
 // ---------------------------------------------------------------------------
 //
-CMManager::TProtectionLevel CCmmDestinationInstance::CurrentProtectionLevel()
+CMManager::TProtectionLevel CCmmDestinationInstance::CurrentProtectionLevelL()
     {
-    return iCurrentProtectionLevel;
+    OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CURRENTPROTECTIONLEVELL_ENTRY );
+
+    CMManager::TProtectionLevel protLevel( iCurrentProtectionLevel );
+    if ( !iProtectionChanged )
+        {
+        GetProtectionL( protLevel );
+        }
+
+    OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CURRENTPROTECTIONLEVELL_EXIT );
+    return protLevel;
     }
 
 // ---------------------------------------------------------------------------
@@ -737,15 +754,14 @@
 // ---------------------------------------------------------------------------
 //
 TInt CCmmDestinationInstance::AddConnMethodL(
-        const CCmmConnMethodInstance& aConnMethodInstance )
+        CCmmConnMethodInstance& aConnMethodInstance )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_ADDCONNMETHODL_ENTRY );
 
     TUint32 connMethodId( aConnMethodInstance.GetId() );
-    TUint32 bearerType( aConnMethodInstance.GetBearerType() );
 
     // Check that the connection method is not an embedded destination.
-    if ( bearerType == KUidEmbeddedDestination )
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
         {
         User::Leave( KErrArgument );
         }
@@ -770,32 +786,98 @@
         }
 
     // 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],
+            ( 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.
-    TInt index = iConnMethodItemArray.Count();
-    for ( TInt i = index - 1; i >= 0; i-- )
+
+    // 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() )
         {
-        if ( iConnMethodItemArray[i].iBearerPriority ==
-                CMManager::KDataMobilitySelectionPolicyPriorityWildCard )
+        relevantCount--;
+        }
+    // The final position will be between 0 and relevantCount.
+    TInt index( relevantCount );
+
+    // If this is a virtual IAP that doesn't point to an IAP, position it at
+    // the end of the list.
+    TBool connMethodIsVirtual = aConnMethodInstance.GetBoolAttributeL( CMManager::ECmVirtual );
+    TUint32 linkedIapId( 0 );
+    if ( connMethodIsVirtual )
+        {
+        // Ask link information only if this is a virtual IAP.
+        linkedIapId = aConnMethodInstance.GetIntAttributeL( CMManager::ECmNextLayerIapId );
+        if ( linkedIapId == 0 )
             {
-            index = i;
-            continue;
-            }
-        if ( iConnMethodItemArray[i].iBearerPriority == bearerPriority )
-            {
-            break;
-            }
-        if ( iConnMethodItemArray[i].iBearerPriority > bearerPriority )
-            {
-            index = i;
+            item.iPriority = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
+            index = relevantCount;
             }
         }
+    else
+        {
+        TBool positionFound( EFalse );
+        if ( connMethodIsVirtual )
+            {
+            // 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 );
@@ -869,7 +951,7 @@
             embeddedDestinationId,
             KUidEmbeddedDestination,
             CMManager::KDataMobilitySelectionPolicyPriorityWildCard,
-            0 );
+            CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
     iConnMethodItemArray.AppendL( item );
 
     SetStatus( ECmmDestinationStatusChanged );
@@ -930,7 +1012,7 @@
 
     // If this connection method is an embedded destination, then removing it
     // from this destination is enough. The destination is not deleted.
-    if ( aConnMethodInstance.GetBearerType() != KUidEmbeddedDestination )
+    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
@@ -956,7 +1038,7 @@
 //
 void CCmmDestinationInstance::RemoveConnMethodFromDestinationL(
         const CCmmConnMethodInstance& aConnMethodInstance,
-        const TBool& aTestIfConnected )
+        const TBool aTestIfConnected )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REMOVECONNMETHODFROMDESTINATIONL_ENTRY );
 
@@ -1003,11 +1085,17 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmDestinationInstance::ModifyConnMethodPriorityL(
-        const CCmmConnMethodInstance& aConnMethodInstance,
+        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 );
@@ -1019,26 +1107,24 @@
             break;
             }
         }
-    if ( oldIndex < 0 )
+    if ( oldIndex == KErrNotFound )
         {
         User::Leave( KErrArgument );
         }
 
     // If connection method is an embedded destination, just return silently.
-    if ( aConnMethodInstance.GetBearerType() == KUidEmbeddedDestination )
+    if ( aConnMethodInstance.IsEmbeddedDestination() )
         {
         OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
         return;
         }
 
-    //TODO, if CM is virtual IAP that points into DESTINATION, just return silently.
-    //
-    //
-
-    // Check index range.
-    if ( aIndex >= iConnMethodItemArray.Count() )
+    // If connection method is a virtual IAP linking to a destination, just return silently.
+    if ( aConnMethodInstance.GetBoolAttributeL( CMManager::ECmVirtual ) &&
+            aConnMethodInstance.GetIntAttributeL( CMManager::ECmNextLayerIapId ) == 0 )
         {
-        User::Leave( KErrArgument );
+        OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+        return;
         }
 
     // If the given index points to any wildcard priority connection method,
@@ -1053,13 +1139,13 @@
             ASSERT( 0 );
             User::Leave( KErrCorrupt );
             }
-        aIndex = numberOfConnMethodsWithPriority--;
+        aIndex = numberOfConnMethodsWithPriority - 1;
         }
 
     // Check if the priority is changing from current.
     if ( oldIndex == aIndex )
         {
-        OstTraceFunctionExit0( DUP1_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+        OstTraceFunctionExit0( DUP2_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
         return;
         }
 
@@ -1070,7 +1156,7 @@
 
     SetStatus( ECmmDestinationStatusChanged );
 
-    OstTraceFunctionExit0( DUP2_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
+    OstTraceFunctionExit0( DUP3_CCMMDESTINATIONINSTANCE_MODIFYCONNMETHODPRIORITYL_EXIT );
     }
 
 // ---------------------------------------------------------------------------
@@ -1079,7 +1165,7 @@
 // ---------------------------------------------------------------------------
 //
 CCmmConnMethodInstance* CCmmDestinationInstance::FindConnMethodInstanceFromSessionById(
-        const TUint32& aConnMethodId ) const
+        const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_FINDCONNMETHODINSTANCEFROMSESSIONBYID_ENTRY );
 
@@ -1096,7 +1182,7 @@
 // ---------------------------------------------------------------------------
 //
 CCmmDestinationInstance* CCmmDestinationInstance::FindDestinationInstanceFromSessionById(
-        const TUint32& aDestinationId ) const
+        const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_FINDDESTINATIONINSTANCEFROMSESSIONBYID_ENTRY );
 
@@ -1113,8 +1199,8 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmDestinationInstance::ConnMethodInOtherDestinationInSession(
-        const TUint32& aConnMethodId,
-        const TUint32& aDestinationId ) const
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONNMETHODINOTHERDESTINATIONINSESSION_ENTRY );
 
@@ -1130,7 +1216,8 @@
 // embedded destinations.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmDestinationInstance::ValidConnMethodIdInDestinationIncludeEmbedded( const TUint32& aConnMethodId ) const
+TBool CCmmDestinationInstance::ValidConnMethodIdInDestinationIncludeEmbedded(
+        const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_VALIDCONNMETHODIDINDESTINATIONINCLUDEEMBEDDED_ENTRY );
 
@@ -1160,7 +1247,7 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmDestinationInstance::ConnMethodInDestinationButLocked(
-        const TUint32& aConnMethodId ) const
+        const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
 
@@ -1196,11 +1283,10 @@
 
     for ( TUint i = 0; i < iConnMethodItemArray.Count(); i++ )
         {
-        //TODO, add virtual IAP pointing to SNAP check.
-        if ( iConnMethodItemArray[i].iBearerType == KUidEmbeddedDestination )
+        if ( iConnMethodItemArray[i].IsEmbedded() || iConnMethodItemArray[i].iPriority ==
+                CMManager::KDataMobilitySelectionPolicyPriorityWildCard )
             {
-            count = i;
-            break;
+            count--;
             }
         }
 
@@ -1225,7 +1311,7 @@
     TInt index = iConnMethodItemArray.Count() - 1;
     if ( index >= 0 )
         {
-        if ( iConnMethodItemArray[index].iBearerType == KUidEmbeddedDestination )
+        if ( iConnMethodItemArray[index].IsEmbedded() )
             {
             result = ETrue;
             }
@@ -1241,7 +1327,7 @@
 // the current status in database.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmDestinationInstance::HasEmbeddedWithId( const TUint32& aDestinationId ) const
+TBool CCmmDestinationInstance::HasEmbeddedWithId( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_HASEMBEDDEDWITHID_ENTRY );
 
@@ -1362,7 +1448,7 @@
 // loaded when needed, the functionality of this method becomes essential.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::RefreshRecordL( TCmmDbRecords aRecordType )
+void CCmmDestinationInstance::LoadRecordIfMissingL( TCmmDbRecords aRecordType )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_REFRESHRECORDL_ENTRY );
 
@@ -1412,9 +1498,9 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_LOADALLRECORDSL_ENTRY );
 
-    RefreshRecordL( ECmmDestNetworkRecord );
-    RefreshRecordL( ECmmDestApRecord );
-    RefreshRecordL( ECmmDestMetadataRecord );
+    LoadRecordIfMissingL( ECmmDestNetworkRecord );
+    LoadRecordIfMissingL( ECmmDestApRecord );
+    LoadRecordIfMissingL( ECmmDestMetadataRecord );
 
     if ( !iNetworkRecord || !iDestApRecord || !iMetadataRecord )
         {
@@ -1428,13 +1514,15 @@
 // Set metadata of type ESnapMetadataInternet.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetMetadataInternetL( const TUint32& aMetadata )
+void CCmmDestinationInstance::SetMetadataInternetL( const TUint32 aMetadata )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAINTERNETL_ENTRY );
 
     if ( aMetadata )
         {
-        if ( iCache->DestinationExistsWithMetadataLocalizedL( *this, CMManager::ELocalisedDestInternet ) )
+        if ( iCache->DestinationExistsWithMetadataLocalizedL(
+                *this,
+                CMManager::ELocalisedDestInternet ) )
             {
             User::Leave( KErrAlreadyExists );
             }
@@ -1457,8 +1545,11 @@
         }
     else
         {
-        // Clear old ESnapMetadataInternet-bit, ESnapMetadataDestinationIsLocalised-bits and CMManager::ESnapMetadataPurpose-bits.
-        TUint32 temp = ~( CMManager::ESnapMetadataInternet | CMManager::ESnapMetadataDestinationIsLocalised | CMManager::ESnapMetadataPurpose );
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and CMManager::ESnapMetadataPurpose-bits.
+        TUint32 temp = ~( CMManager::ESnapMetadataInternet |
+                CMManager::ESnapMetadataDestinationIsLocalised |
+                CMManager::ESnapMetadataPurpose );
         iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
         }
 
@@ -1469,7 +1560,7 @@
 // Set metadata of type ESnapMetadataHighlight.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetMetadataHighlight( const TUint32& aMetadata )
+void CCmmDestinationInstance::SetMetadataHighlight( const TUint32 aMetadata )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAHIGHLIGHTL_ENTRY );
 
@@ -1478,12 +1569,14 @@
     if ( aMetadata )
         {
         // Set ESnapMetadataHighlight-bit.
-        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata | CMManager::ESnapMetadataHighlight;
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata | CMManager::ESnapMetadataHighlight;
         }
     else
         {
         // Clear ESnapMetadataHighlight-bit.
-        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHighlight );
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHighlight );
         }
 
     OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAHIGHLIGHTL_EXIT );
@@ -1493,29 +1586,35 @@
 // Set metadata of type ESnapMetadataHiddenAgent.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetMetadataHiddenAgentL( const TUint32& aMetadata )
+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 );
+        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.
+            // 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;
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata | CMManager::ESnapMetadataHiddenAgent;
         }
     else
         {
         // Clear ESnapMetadataHiddenAgent-bit.
-        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHiddenAgent );
+        iMetadataRecord->iMetadata =
+                iMetadataRecord->iMetadata & ( ~CMManager::ESnapMetadataHiddenAgent );
         }
 
     OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_SETMETADATAHIDDENAGENTL_EXIT );
@@ -1525,7 +1624,7 @@
 // Set metadata of type ESnapMetadataDestinationIsLocalised.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetMetadataLocalizationL( const TUint32& aMetadata )
+void CCmmDestinationInstance::SetMetadataLocalizationL( const TUint32 aMetadata )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATALOCALIZATIONL_ENTRY );
 
@@ -1535,10 +1634,14 @@
         User::Leave( KErrArgument );
         }
 
-    TUint32 temp = ~( CMManager::ESnapMetadataInternet | CMManager::ESnapMetadataDestinationIsLocalised | CMManager::ESnapMetadataPurpose );
+    TUint32 temp = ~(
+            CMManager::ESnapMetadataInternet |
+            CMManager::ESnapMetadataDestinationIsLocalised |
+            CMManager::ESnapMetadataPurpose );
     if ( aMetadata == CMManager::ENotLocalisedDest )
         {
-        // Clear old ESnapMetadataInternet-bit, ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
         iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
         }
     else
@@ -1548,7 +1651,8 @@
             User::Leave( KErrAlreadyExists );
             }
 
-        // Clear old ESnapMetadataInternet-bit, ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
         TUint32 value = iMetadataRecord->iMetadata & temp;
         switch ( aMetadata )
             {
@@ -1597,7 +1701,7 @@
 // Set metadata of type ESnapMetadataPurpose.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationInstance::SetMetadataPurposeL( const TUint32& aMetadata )
+void CCmmDestinationInstance::SetMetadataPurposeL( const TUint32 aMetadata )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONINSTANCE_SETMETADATAPURPOSEL_ENTRY );
 
@@ -1607,10 +1711,14 @@
         User::Leave( KErrArgument );
         }
 
-    TUint32 temp = ~( CMManager::ESnapMetadataInternet | CMManager::ESnapMetadataDestinationIsLocalised | CMManager::ESnapMetadataPurpose );
+    TUint32 temp = ~(
+            CMManager::ESnapMetadataInternet |
+            CMManager::ESnapMetadataDestinationIsLocalised |
+            CMManager::ESnapMetadataPurpose );
     if ( aMetadata == CMManager::ESnapPurposeUnknown )
         {
-        // Clear old ESnapMetadataInternet-bit, ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
         iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
         }
     else
@@ -1620,7 +1728,8 @@
             User::Leave( KErrAlreadyExists );
             }
 
-        // Clear old ESnapMetadataInternet-bit, ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
+        // Clear old ESnapMetadataInternet-bit,
+        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
         TUint32 value = iMetadataRecord->iMetadata & temp;
 
         switch ( aMetadata )
@@ -1676,9 +1785,12 @@
     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 );
+    TUint32 metadataInternet( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataInternet );
+    TUint32 metadataLocalized( ( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataDestinationIsLocalised ) >> 4 );
+    TUint32 metadataPurpose( ( iMetadataRecord->iMetadata &
+            CMManager::ESnapMetadataPurpose ) >> 8 );
 
     if ( metadataPurpose )
         {
@@ -1690,7 +1802,9 @@
             case CMManager::ESnapPurposeOperator:
             case CMManager::ESnapPurposeMMS:
             case CMManager::ESnapPurposeIntranet:
-                result = iCache->DestinationExistsWithMetadataPurposeL( *this, metadataPurpose );
+                result = iCache->DestinationExistsWithMetadataPurposeL(
+                        *this,
+                        metadataPurpose );
                 break;
             default:
                 User::Leave( KErrCorrupt ); // Invalid metadata.
@@ -1707,7 +1821,9 @@
             case CMManager::ELocalisedDestWap:
             case CMManager::ELocalisedDestMMS:
             case CMManager::ELocalisedDestIntranet:
-                result = iCache->DestinationExistsWithMetadataLocalizedL( *this, metadataLocalized );
+                result = iCache->DestinationExistsWithMetadataLocalizedL(
+                        *this,
+                        metadataLocalized );
                 break;
             default:
                 User::Leave( KErrCorrupt ); // Invalid metadata.
@@ -1717,7 +1833,9 @@
     else if ( metadataInternet )
         {
         // Error, metadataPurpose and metadataLocalized was not set. Continue anyway.
-        result = iCache->DestinationExistsWithMetadataLocalizedL( *this, CMManager::ELocalisedDestInternet );
+        result = iCache->DestinationExistsWithMetadataLocalizedL(
+                *this,
+                CMManager::ELocalisedDestInternet );
         }
 
     OstTraceFunctionExit0( CCMMDESTINATIONINSTANCE_CONFLICTINGMETADATAFOUNDL_EXIT );
--- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationstruct.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -18,7 +18,6 @@
 
 
 #include <datamobilitycommsdattypes.h>
-#include <cmpluginembdestinationdef.h>
 #include <in_sock.h> // KAfInet
 
 #include "cmmdestinationstruct.h"
@@ -42,11 +41,14 @@
 CCmmDestinationStruct* CCmmDestinationStruct::NewL(
         CCmmCache* aCache,
         CCmmTransactionHandler* aTransactionHandler,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_NEWL_ENTRY );
 
-    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC( aCache, aTransactionHandler, aDestinationId );
+    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC(
+            aCache,
+            aTransactionHandler,
+            aDestinationId );
     CleanupStack::Pop( self );
 
     OstTraceFunctionExit0( CCMMDESTINATIONSTRUCT_NEWL_EXIT );
@@ -63,11 +65,15 @@
         CCmmCache* aCache,
         CCmmTransactionHandler* aTransactionHandler,
         const TDesC& aName,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_NEWL_ENTRY );
 
-    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC( aCache, aTransactionHandler, aName, aDestinationId );
+    CCmmDestinationStruct* self = CCmmDestinationStruct::NewLC(
+            aCache,
+            aTransactionHandler,
+            aName,
+            aDestinationId );
     CleanupStack::Pop( self );
 
     OstTraceFunctionExit0( DUP1_CCMMDESTINATIONSTRUCT_NEWL_EXIT );
@@ -82,11 +88,13 @@
 CCmmDestinationStruct* CCmmDestinationStruct::NewLC(
         CCmmCache* aCache,
         CCmmTransactionHandler* aTransactionHandler,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_NEWLC_ENTRY );
 
-    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct( aCache, aTransactionHandler );
+    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct(
+            aCache,
+            aTransactionHandler );
     CleanupStack::PushL( self );
     self->ConstructL( aDestinationId );
 
@@ -104,11 +112,13 @@
         CCmmCache* aCache,
         CCmmTransactionHandler* aTransactionHandler,
         const TDesC& aName,
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_NEWLC_ENTRY );
 
-    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct( aCache, aTransactionHandler );
+    CCmmDestinationStruct* self = new( ELeave ) CCmmDestinationStruct(
+            aCache,
+            aTransactionHandler );
     CleanupStack::PushL( self );
     self->ConstructL( aName, aDestinationId );
 
@@ -169,12 +179,13 @@
 // Opens an existing destination based on ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationStruct::ConstructL( const TUint32& aDestinationId )
+void CCmmDestinationStruct::ConstructL( const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_CONSTRUCTL_ENTRY );
 
     // Check ID is in valid range.
-    if ( aDestinationId <= KCmDefaultDestinationAPTagId || aDestinationId >= KCmMaxDestinationAPTagId )
+    if ( aDestinationId <= KCmDefaultDestinationAPTagId ||
+            aDestinationId >= KCmMaxDestinationAPTagId )
         {
         User::Leave( KErrArgument );
         }
@@ -211,7 +222,6 @@
         // Not found -> fill in with default values.
         iMetadataRecord->iSNAP = iId;
         iMetadataRecord->iMetadata = 0;
-        //iMetadataRecord->iIcon = 0;//TODO, set to 0 or not?
         iMetadataRecord->SetRecordId( KCDNewRecordRequest );
         iMetadataRecordStatus = ECmmRecordStatusUnsaved;
         }
@@ -231,7 +241,7 @@
 // Creates a new destination. With name and optionally also with ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationStruct::ConstructL( const TDesC& aName, const TUint32& aDestinationId )
+void CCmmDestinationStruct::ConstructL( const TDesC& aName, const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( DUP1_CCMMDESTINATIONSTRUCT_CONSTRUCTL_ENTRY );
 
@@ -286,7 +296,7 @@
 // Set the destination ID.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationStruct::SetId( const TUint32& aId )
+void CCmmDestinationStruct::SetId( const TUint32 aId )
     {
     iId = aId;
     }
@@ -415,7 +425,7 @@
 // the reference counter by one.
 // ---------------------------------------------------------------------------
 //
-void CCmmDestinationStruct::CreateSessionInstanceL(
+void CCmmDestinationStruct::CreateDestinationInstanceL(
         CCmmDestinationInstance& aDestinationInstance )
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_CREATESESSIONINSTANCEL_ENTRY );
@@ -432,7 +442,7 @@
     // NULL. When update is called, copy the records into the cache also.
     //
 
-    switch ( iStatus ) //TODO, add missing status values
+    switch ( iStatus )
         {
         case ECmmDestinationStatusNotSaved:
             {
@@ -463,6 +473,8 @@
             aDestinationInstance.SetStatus( ECmmDestinationStatusValid );
             }
             break;
+        case ECmmDestinationStatusChanged:
+        case ECmmDestinationStatusToBeDeleted:
         default:
             User::Leave( KErrCorrupt ); // Invalid status.
             break;
@@ -475,7 +487,9 @@
     }
 
 // ---------------------------------------------------------------------------
-// TODO
+// 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(
@@ -629,6 +643,9 @@
     {
     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).
@@ -668,6 +685,15 @@
 
             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:
@@ -677,9 +703,6 @@
                     // Store network record first, the record ID is needed for
                     // destination access point record.
                     // Record ID for network record is set during construction.
-
-                    //TODO, Check method call from old CmManager:
-                    //TODO, SetAttribute( iData->iNetworkRecord, ECDProtectedWrite, ProtectionLevel() == EProtLevel1 );
                     instanceNetworkRecord->StoreL( iTransactionHandler->Session() );
 
                     // If ID is out of valid range, it means this destination was created
@@ -691,7 +714,8 @@
                         {
                         id = instanceNetworkRecord->RecordId() + KCmDefaultDestinationAPTagId;
                         instanceDestApRecord->iRecordTag = id;
-                        instanceDestApRecord->iCustomSelectionPolicy = ( id - KCmDefaultDestinationAPTagId );
+                        instanceDestApRecord->iCustomSelectionPolicy =
+                                ( id - KCmDefaultDestinationAPTagId );
                         instanceMetadataRecord->iSNAP = id;
                         }
                     instanceDestApRecord->StoreL( iTransactionHandler->Session() );
@@ -704,8 +728,6 @@
                     {
                     // This destination already exists in database and is beeing modified.
 
-                    //TODO, Check method call from old CmManager:
-                    //TODO, SetAttribute( iData->iNetworkRecord, ECDProtectedWrite, ProtectionLevel() == EProtLevel1 );
                     instanceNetworkRecord->ModifyL( iTransactionHandler->Session() );
                     instanceDestApRecord->ModifyL( iTransactionHandler->Session() );
                     if ( iMetadataRecordStatus == ECmmRecordStatusUnsaved )
@@ -734,9 +756,12 @@
             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 ) );
+            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;
@@ -781,6 +806,10 @@
             // 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() );
@@ -820,9 +849,16 @@
                             connMethodRealId );
                     }
 
-                //TODO, if protection level is 1 (dest AND CMs), set ECDProtectedWrite. See oldimplementation.
+                // 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].iBearerType == KUidEmbeddedDestination )
+                if ( aDestinationInstance.iConnMethodItemArray[i].IsEmbedded() )
                     {
                     // Embedded destination.
                     snapRecord2->iEmbeddedSNAP = ( TInt )connMethodRealId;
@@ -830,15 +866,28 @@
                     snapRecord2->iPriority =
                             CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
                     aDestinationInstance.iConnMethodItemArray[i].iPriority =
-                            CMManager::KDataMobilitySelectionPolicyPriorityWildCard; // Update this just in case.
+                            CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
                     }
                 else
                     {
                     // Normal connection method.
                     snapRecord2->iEmbeddedSNAP = 0;
                     snapRecord2->iIAP = CommsDat::KCDTIdIAPRecord | ( connMethodRealId << 8 );
-                    snapRecord2->iPriority = i + 1; // Priority values start from 1.
-                    aDestinationInstance.iConnMethodItemArray[i].iPriority = i + 1; // Update this just in case.
+                    // 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 )
@@ -896,30 +945,6 @@
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_DELETEL_ENTRY );
 
-    // Check general status.
-    /*switch ( iStatus ) //TODO, already done? yes, cleanup
-        {
-        case ECmmDestinationStatusNotSaved:
-            {
-            // Doesn'texist in database.
-            User::Leave( KErrNotFound );
-            }
-            break;
-        case ECmmDestinationStatusValid:
-            // Proceed.
-            break;
-        case ECmmDestinationStatusToBeDeleted:
-            {
-            // Already deleted, nothing to do.
-            return;
-            }
-        case ECmmDestinationStatusChanged:
-        default:
-            ASSERT( 0 ); // Error, invalid argument.
-            User::Leave( KErrCorrupt );
-            break;
-        }*/
-
     // Check status for records.
     switch ( iNetworkRecordStatus )
         {
@@ -1018,7 +1043,7 @@
 // references is returned.
 // ---------------------------------------------------------------------------
 //
-TInt CCmmDestinationStruct::SessionInstanceClosed()
+TInt CCmmDestinationStruct::DestinationInstanceClosed()
     {
     OstTraceFunctionEntry0( CCMMDESTINATIONSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
 
@@ -1185,6 +1210,28 @@
     }
 
 // -----------------------------------------------------------------------------
+// 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(
@@ -1333,10 +1380,10 @@
                 {
                 metadataRecord->iIcon.SetL( source->iIcon );
                 }
-            //if ( !source->iIconFileName.IsNull() )//TODO, enable after commsdat icon changes are implemented.
-                //{
-                //metadataRecord->iIconFileName.SetL( source->iIconFileName );
-                //}
+            if ( !source->iIconFileName.IsNull() )
+                {
+                metadataRecord->iIconFileName.SetL( source->iIconFileName );
+                }
             metadataRecord->SetElementId( source->ElementId() );
 
             CleanupStack::Pop( metadataRecord );
--- a/cmmanager/cmmgr/cmmserver/src/cmminstancemapping.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmminstancemapping.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -194,7 +194,7 @@
 // Check if the given ID is a valid existing destination ID.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmInstanceMapping::ValidDestinationId( const TUint32& aId ) const
+TBool CCmmInstanceMapping::ValidDestinationId( const TUint32 aId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDDESTINATIONID_ENTRY );
 
@@ -220,7 +220,7 @@
 // Check if the given ID is a valid existing connection method ID.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmInstanceMapping::ValidConnMethodId( const TUint32& aId ) const
+TBool CCmmInstanceMapping::ValidConnMethodId( const TUint32 aId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_VALIDCONNMETHODID_ENTRY );
 
@@ -243,11 +243,37 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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
+TBool CCmmInstanceMapping::DestinationIsEmbedded( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONISEMBEDDED_ENTRY );
 
@@ -280,7 +306,7 @@
 // Check from database if the given destination has an embedded destination.
 // ---------------------------------------------------------------------------
 //
-TBool CCmmInstanceMapping::DestinationHasEmbedded( const TUint32& aDestinationId ) const
+TBool CCmmInstanceMapping::DestinationHasEmbedded( const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONHASEMBEDDED_ENTRY );
 
@@ -296,7 +322,7 @@
             TInt index = iDestinations[i]->iConnMethodItemArray.Count() - 1;
             if ( index >= 0 )
                 {
-                if ( iDestinations[i]->iConnMethodItemArray[index].iBearerType == KUidEmbeddedDestination )
+                if ( iDestinations[i]->iConnMethodItemArray[index].IsEmbedded() )
                     {
                     result = ETrue;
                     }
@@ -315,12 +341,25 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmInstanceMapping::DestinationPointedToByVirtualIap(
-        const TUint32& /*aDestinationId*/ ) const
+        const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_DESTINATIONPOINTEDTOBYVIRTUALIAP_ENTRY );
-    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_DESTINATIONPOINTEDTOBYVIRTUALIAP_EXIT );
 
-    return EFalse; //TODO, virtual IAPs are not yet supported.
+    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;
     }
 
 // ---------------------------------------------------------------------------
@@ -329,12 +368,25 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmInstanceMapping::ConnMethodPointedToByVirtualIap(
-        const TUint32& /*aConnMethodId*/ ) const
+        const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODPOINTEDTOBYVIRTUALIAP_ENTRY );
-    OstTraceFunctionExit0( CCMMINSTANCEMAPPING_CONNMETHODPOINTEDTOBYVIRTUALIAP_EXIT );
 
-    return EFalse; //TODO, virtual IAPs are not yet supported.
+    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;
     }
 
 // ---------------------------------------------------------------------------
@@ -343,19 +395,33 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmInstanceMapping::ConnMethodInDestinationButLocked(
-        const TUint32& /*aConnMethodId*/,
-        const TUint32& /*aDestinationId*/ ) const
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODINDESTINATIONBUTLOCKED_ENTRY );
 
-    // - Find correct destination.
-    // - Check if it only has 1 CM.
-    // - Check if the CM is the one given.
-    // - Call DestinationPointedToByVirtualIap( aDestinationId ).
-    //
+    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 EFalse; //TODO, virtual IAPs are not yet supported.
+    return result;
     }
 
 // ---------------------------------------------------------------------------
@@ -364,7 +430,7 @@
 // ---------------------------------------------------------------------------
 //
 TInt CCmmInstanceMapping::GetConnMethodBearerType(
-        const TUint32& aConnMethodId,
+        const TUint32 aConnMethodId,
         TUint32& bearerType ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODBEARERTYPE_ENTRY );
@@ -382,11 +448,14 @@
         }
     if ( result == KErrNotFound )
         {
-        // Embedded destinations are not in connection method array, need check from ID range.
+        // Embedded destinations are not in connection method array.
         if ( aConnMethodId > KCmmDestIdIntervalMin && aConnMethodId < KCmmDestIdIntervalMax )
             {
-            bearerType = KUidEmbeddedDestination;
-            result = KErrNone;
+            if ( ValidDestinationId( aConnMethodId ) )
+                {
+                bearerType = KUidEmbeddedDestination;
+                result = KErrNone;
+                }
             }
         }
 
@@ -401,7 +470,7 @@
 // ---------------------------------------------------------------------------
 //
 TInt CCmmInstanceMapping::DestinationsContainingConnMethod(
-        const TUint32& aConnMethodId ) const
+        const TUint32 aConnMethodId ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODREFERENCECOUNT_ENTRY );
 
@@ -499,8 +568,7 @@
 //
 CommsDat::CMDBSession& CCmmInstanceMapping::Session() const
     {
-    OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_SESSION_ENTRY );
-
+    // No traces.
     return iCache.Session();
     }
 
@@ -517,14 +585,13 @@
             new( ELeave ) CMDBRecordSet<CCDIAPRecord>( KCDTIdIAPRecord );
     CleanupStack::PushL( iapRecordSet );
 
-    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>( CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
+    CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(
+            CCDRecordBase::RecordFactoryL( KCDTIdIAPRecord ) );
     CleanupStack::PushL( iapRecord );
 
     TRAP_IGNORE( iapRecordSet->LoadL( Session() ) );
 
-    //TODO, check from commsdat dump if all high-range IDs are available, or was some records
-    //TODO  used up by something. will this possibly affect cm/destination creation with predef ID? (Keijo)
-
+    // Clear the old info about IAPs.
     iConnMethodItemArray.Reset();
     iUnsupportedConnMethods.Reset();
 
@@ -537,25 +604,76 @@
         {
         TUint32 connMethodId( iapRecordSet->iRecords[i]->RecordId() );
 
-        // Check the connection method is not on the deleted list waiting to be deleted from database.
+        // 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 ) ); //TODO
+            TRAP( err, iCache.BearerInfoFromIapRecordL( iapRecord, bearerType, bearerPriority ) );
             if ( !err )
                 {
-                TCmmConnMethodItem item( connMethodId, bearerType, bearerPriority, 0 );
-                iConnMethodItemArray.Append( item ); // Ignore errors.
+                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.Append( connMethodId ); // Ignore errors.
+                iUnsupportedConnMethods.InsertInOrder( ( TUint )connMethodId ); // Ignore errors.
                 }
             else if ( err == KErrNoMemory )
                 {
-                User::Leave( err ); //TODO, check what this will cause.
+                User::Leave( err );
                 }
             }
         }
@@ -563,6 +681,10 @@
     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 );
     }
 
@@ -610,22 +732,10 @@
             // If connMethodId and embeddedDestinationId are 0 this is a destination.
             if ( connMethodId == 0 && embeddedDestinationId == 0 )
                 {
-                TBool destAlreadyExists( EFalse );
-                for ( TInt j = 0; j < iDestinations.Count(); j++ )
-                    {
-                    if ( destinationId == iDestinations[j]->iId )
-                        {
-                        destAlreadyExists = ETrue;
-                        break;
-                        }
-                    }
-
+                TBool destAlreadyExists = ValidDestinationId( destinationId );
                 if ( !destAlreadyExists )
                     {
-                    CDestination* dest = CDestination::NewL();
-                    dest->iId = destinationId;
-
-                    CCDSNAPMetadataRecord* metadataRecord = new( ELeave ) CCDSNAPMetadataRecord( 
+                    CCDSNAPMetadataRecord* metadataRecord = new( ELeave ) CCDSNAPMetadataRecord(
                             iCache.TableId( ECmmDestMetadataRecord ) );
                     CleanupStack::PushL( metadataRecord );
 
@@ -634,8 +744,12 @@
                     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;
@@ -644,6 +758,10 @@
             }
         }
 
+    // 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++ )
         {
@@ -659,14 +777,7 @@
             {
             // Find destination.
             CDestination* destination( NULL );
-            for ( TInt j = 0; j < iDestinations.Count(); j++ )
-                {
-                if ( destinationId == iDestinations[j]->iId )
-                    {
-                    destination = iDestinations[j];
-                    break;
-                    }
-                }
+            destination = GetDestination( destinationId );
 
             if ( destination )
                 {
@@ -696,7 +807,7 @@
                         if ( index == KErrNotFound )
                             {
                             item.iPriority = snapRecord->iPriority;
-                            destination->iConnMethodItemArray.InsertInOrderAllowRepeats( //TODO, if prio is 256, bearer type used? embeded should always be last.
+                            destination->iConnMethodItemArray.InsertInOrderAllowRepeats(
                                     item,
                                     connMethodItemOrderingLogic ); // Ignore errors.
                             }
@@ -704,17 +815,11 @@
                     else
                         {
                         // Check if the connection method is unsupported instead.
-                        for ( TInt j = 0; j < iUnsupportedConnMethods.Count(); j++ )
+                        TBool isUnsupported = UnsupportedConnMethodId( connMethodId );
+                        if ( isUnsupported )
                             {
-                            if ( iUnsupportedConnMethods[j] == connMethodId )
-                                {
-                                found = ETrue;
-                                break;
-                                }
-                            }
-                        if ( found )
-                            {
-                            destination->iUnsupportedConnMethods.Append( connMethodId ); // Ignore errors. //TODO, allow repeats?
+                            destination->iUnsupportedConnMethods.InsertInOrder(
+                                    ( TUint )connMethodId ); // Ignore errors.
                             }
                         }
                     }
@@ -726,16 +831,8 @@
                     if ( embeddedDestinationId != destinationId )
                         {
                         // Check embedded destination ID is valid.
-                        TBool found( EFalse );
-                        for ( TInt j = 0; j < iDestinations.Count(); j++ )
-                            {
-                            if ( embeddedDestinationId == iDestinations[j]->iId )
-                                {
-                                found = ETrue;
-                                break;
-                                }
-                            }
-                        if ( found )
+                        TBool valid = ValidDestinationId( embeddedDestinationId );
+                        if ( valid )
                             {
                             TCmmConnMethodItem item(
                                     embeddedDestinationId,
@@ -758,6 +855,106 @@
     }
 
 // ---------------------------------------------------------------------------
+// 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.
 // ---------------------------------------------------------------------------
@@ -789,7 +986,7 @@
         // Include unsupported connection methods also.
         for ( TInt i = 0; i < iUnsupportedConnMethods.Count(); i++ )
             {
-            aConnMethodArray.AppendL( iUnsupportedConnMethods[i] );
+            aConnMethodArray.AppendL( ( TUint32 )iUnsupportedConnMethods[i] );
             }
         }
 
@@ -832,7 +1029,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmInstanceMapping::GetConnMethodsFromDestinationL(
-        const TUint32& aDestinationId,
+        const TUint32 aDestinationId,
         RArray<TCmmConnMethodItem>& aConnMethodArray ) const
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_GETCONNMETHODSFROMDESTINATIONL_ENTRY );
@@ -868,8 +1065,8 @@
 // ---------------------------------------------------------------------------
 //
 TBool CCmmInstanceMapping::ConnMethodInOtherDestination(
-        const TUint32& aConnMethodId,
-        const TUint32& aDestinationId )
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_CONNMETHODINOTHERDESTINATION_ENTRY );
 
@@ -983,9 +1180,12 @@
 
         TUint32 metadata = metadataRecord->iMetadata;
 
-        TUint32 internet = metadata & CMManager::ESnapMetadataInternet;
-        TUint32 localizationValue = ( metadata & CMManager::ESnapMetadataDestinationIsLocalised ) >> 4;
-        TUint32 purposeValue = ( metadata & CMManager::ESnapMetadataPurpose ) >> 8;
+        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.
@@ -1014,7 +1214,7 @@
 // has not been removed from database yet.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::AddConnMethodToDeletedListL( const TUint& aConnMethodId )
+void CCmmInstanceMapping::AddConnMethodToDeletedListL( const TUint aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_ADDCONNMETHODTODELETEDLISTL_ENTRY );
 
@@ -1031,7 +1231,7 @@
 // not found from the list.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::RemoveConnMethodFromDeletedList( const TUint& aConnMethodId )
+void CCmmInstanceMapping::RemoveConnMethodFromDeletedList( const TUint aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDELETEDLIST_ENTRY );
 
@@ -1051,7 +1251,7 @@
 // not been removed from database yet.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::AddDestinationToDeletedListL( const TUint& aDestinationId )
+void CCmmInstanceMapping::AddDestinationToDeletedListL( const TUint aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_ADDDESTINATIONTODELETEDLISTL_ENTRY );
 
@@ -1068,7 +1268,7 @@
 // found from the list.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::RemoveDestinationFromDeletedList( const TUint& aDestinationId ) //TODO, check removal is called in all necessary places.
+void CCmmInstanceMapping::RemoveDestinationFromDeletedList( const TUint aDestinationId ) //TODO, check removal is called in all necessary places.
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVEDESTINATIONFROMDELETEDLIST_ENTRY );
 
@@ -1087,7 +1287,7 @@
 // the connection method has been removed from database.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::RemoveConnMethod( const TUint32& aConnMethodId ) //TODO, check where this is used and if it would be better to use version with array instead?
+void CCmmInstanceMapping::RemoveConnMethod( const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHOD_ENTRY );
 
@@ -1121,10 +1321,11 @@
 // 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,
+        const TUint32 aConnMethodId,
         RArray<TUint32>& aChangedDestinations )
     {
     OstTraceFunctionEntry0( DUP1_CCMMINSTANCEMAPPING_REMOVECONNMETHOD_ENTRY );
@@ -1163,7 +1364,7 @@
 // the connection method has been removed from database.
 // ---------------------------------------------------------------------------
 //
-void CCmmInstanceMapping::RemoveDestination( const TUint32& aDestinationId )
+void CCmmInstanceMapping::RemoveDestination( const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVEDESTINATION_ENTRY );
 
@@ -1201,7 +1402,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmInstanceMapping::RemoveConnMethodFromDestinations(
-        const TUint32& aConnMethodId,
+        const TUint32 aConnMethodId,
         RArray<TUint32>& aChangedDestinations )
     {
     OstTraceFunctionEntry0( CCMMINSTANCEMAPPING_REMOVECONNMETHODFROMDESTINATIONS_ENTRY );
--- a/cmmanager/cmmgr/cmmserver/src/cmmserver.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmserver.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -376,7 +376,9 @@
     {
     OstTraceFunctionEntry0( CCMMSERVER_NEWSESSIONL_ENTRY );
 
-    CSession2* session = CCmmSession::NewL( *const_cast<CCmmServer*>( this ), iCmManager->Cache() );
+    CSession2* session = CCmmSession::NewL(
+            *const_cast<CCmmServer*>( this ),
+            iCmManager->Cache() );
 
     OstTraceFunctionExit0( CCMMSERVER_NEWSESSIONL_EXIT );
     return session;
@@ -488,8 +490,8 @@
 // -----------------------------------------------------------------------------
 //
 TBool CCmmServer::EmbeddedDestinationConflictsFromAllSessions(
-        const TUint32& aDestinationId,
-        const TUint32& aEmbeddedDestinationId )
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
     {
     OstTraceFunctionEntry0( CCMMSERVER_EMBEDDEDDESTINATIONCONFLICTSFROMALLSESSIONS_ENTRY );
 
@@ -517,7 +519,7 @@
 // updated to, or deleted from, database.
 // ---------------------------------------------------------------------------
 //
-void CCmmServer::RefreshHandlesForAllSessions( const TUint32& aId )
+void CCmmServer::RefreshHandlesForAllSessions( const TUint32 aId )
     {
     OstTraceFunctionEntry0( CCMMSERVER_REFRESHHANDLESFORALLSESSIONS_ENTRY );
 
--- a/cmmanager/cmmgr/cmmserver/src/cmmsession.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmsession.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -16,7 +16,7 @@
 *
 */
 
-
+#include <sysutil.h>
 #include <cmconnectionmethoddef.h>
 #include <cmpluginembdestinationdef.h>
 #include <cmdefconnvalues.h>
@@ -63,7 +63,8 @@
 CCmmSession::CCmmSession( CCmmServer& aServer, CCmmCache& aCache )
         :
         iServer( aServer ),
-        iCache( aCache )
+        iCache( aCache ),
+        iFsConnected( EFalse )
     {
     OstTraceFunctionEntry0( CCMMSESSION_CCMMSESSION_ENTRY );
 
@@ -128,6 +129,13 @@
         iServer.RemoveContainer( iConnMethodContainer );
         iConnMethodContainer = NULL;
         }
+
+    if ( iFsConnected )
+        {
+        iFs.Close();
+        iFsConnected = EFalse;
+        }
+
     OstTraceFunctionExit0( DUP1_CCMMSESSION_CCMMSESSION_EXIT );
     }
 
@@ -336,7 +344,7 @@
 // -----------------------------------------------------------------------------
 //
 CCmmConnMethodInstance* CCmmSession::FindConnMethodInstanceById(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_FINDCONNMETHODINSTANCEBYID_ENTRY );
 
@@ -363,7 +371,7 @@
 // -----------------------------------------------------------------------------
 //
 CCmmDestinationInstance* CCmmSession::FindDestinationInstanceByHandleL(
-        const TInt& aDestinationHandle )
+        const TInt aDestinationHandle )
     {
     OstTraceFunctionEntry0( CCMMSESSION_FINDDESTINATIONINSTANCEBYHANDLEL_ENTRY );
 
@@ -376,7 +384,7 @@
 // -----------------------------------------------------------------------------
 //
 CCmmDestinationInstance* CCmmSession::FindDestinationInstanceById(
-        const TUint32& aDestinationId )
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_FINDDESTINATIONINSTANCEBYID_ENTRY );
 
@@ -403,8 +411,8 @@
 // -----------------------------------------------------------------------------
 //
 TBool CCmmSession::ConnMethodInOtherDestination(
-        const TUint32& aConnMethodId,
-        const TUint32& aDestinationId )
+        const TUint32 aConnMethodId,
+        const TUint32 aDestinationId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_CONNMETHODINOTHERDESTINATION_ENTRY );
 
@@ -439,12 +447,14 @@
 // -----------------------------------------------------------------------------
 //
 TBool CCmmSession::EmbeddedDestinationConflictsFromAllSessions(
-        const TUint32& aDestinationId,
-        const TUint32& aEmbeddedDestinationId )
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_EMBEDDEDDESTINATIONCONFLICTSFROMALLSESSIONS_ENTRY );
 
-    return iServer.EmbeddedDestinationConflictsFromAllSessions( aDestinationId, aEmbeddedDestinationId );
+    return iServer.EmbeddedDestinationConflictsFromAllSessions(
+            aDestinationId,
+            aEmbeddedDestinationId );
     }
 
 // -----------------------------------------------------------------------------
@@ -462,8 +472,8 @@
 // -----------------------------------------------------------------------------
 //
 TBool CCmmSession::EmbeddedDestinationConflicts(
-        const TUint32& aDestinationId,
-        const TUint32& aEmbeddedDestinationId )
+        const TUint32 aDestinationId,
+        const TUint32 aEmbeddedDestinationId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_EMBEDDEDDESTINATIONCONFLICTS_ENTRY );
 
@@ -569,7 +579,7 @@
 // ---------------------------------------------------------------------------
 //
 void CCmmSession::RemoveConnMethodFromDestinationHandles(
-        const TUint32& aConnMethodId )
+        const TUint32 aConnMethodId )
     {
     OstTraceFunctionEntry0( CCMMSESSION_REMOVECONNMETHODFROMDESTINATIONHANDLES_ENTRY );
 
@@ -598,7 +608,7 @@
 // updated/deleted destination/connection method.
 // ---------------------------------------------------------------------------
 //
-void CCmmSession::RefreshHandles( const TUint32& aId ) const
+void CCmmSession::RefreshHandles( const TUint32 aId ) const
     {
     OstTraceFunctionEntry0( CCMMSESSION_REFRESHHANDLES_ENTRY );
 
@@ -1031,7 +1041,7 @@
     {
     OstTraceFunctionEntry0( CCMMSESSION_GETUNCATEGORIZEDICONL_ENTRY );
 
-    HBufC* result = KNullDesC().AllocLC(); //TODO, Is there an uncategorized icon?
+    HBufC* result = KCmmUncategorizedIconName().AllocLC();
 
     TInt bufferLen = aMessage.GetDesMaxLength( 0 );
     if ( result->Length() > bufferLen )
@@ -1133,7 +1143,8 @@
     for ( TInt i = 0; i < bearerCountInArray; i++ )
         {
         // Skip if service type is not valid.
-        if ( bearerPriorityArray[i]->ServiceType() && bearerPriorityArray[i]->ServiceType()->Length() > 0 )
+        if ( bearerPriorityArray[i]->ServiceType() &&
+                bearerPriorityArray[i]->ServiceType()->Length() > 0 )
             {
             maxBufLen += KCmmBearerPriorityHeaderLength; // Priorities and servicetype length.
             maxBufLen += bearerPriorityArray[i]->ServiceType()->Length();
@@ -1171,7 +1182,8 @@
     for ( TInt i = 0; i < bearerCountInArray; i++ )
         {
         // Skip if service type is not valid.
-        if ( bearerPriorityArray[i]->ServiceType() && bearerPriorityArray[i]->ServiceType()->Length() > 0 )
+        if ( bearerPriorityArray[i]->ServiceType() &&
+                bearerPriorityArray[i]->ServiceType()->Length() > 0 )
             {
             TUint32 priority = bearerPriorityArray[i]->Priority();
             TUint32 uiPriority = bearerPriorityArray[i]->UiPriority();
@@ -1203,6 +1215,12 @@
     {
     OstTraceFunctionEntry0( CCMMSESSION_UPDATEBEARERPRIORITYARRAYL_ENTRY );
 
+    // Check the disk space.
+    if ( CheckSpaceBelowCriticalLevelL() )
+        {
+        User::Leave( KErrDiskFull );
+        }
+
     HBufC* bearerPriorityBuf = HBufC::NewLC( aMessage.GetDesMaxLengthL( 0 ) );
     TPtr bearerPriorityBufPtr( bearerPriorityBuf->Des() );
 
@@ -1243,7 +1261,10 @@
             position += stringLength;
 
             TPtrC tempServiceType( serviceName->Des() );
-            CCmmBearerPriority* item = CCmmBearerPriority::NewLC( tempServiceType, priority, uiPriority );
+            CCmmBearerPriority* item = CCmmBearerPriority::NewLC(
+                    tempServiceType,
+                    priority,
+                    uiPriority );
             bearerPriorityArray.AppendL( item );
             CleanupStack::Pop( item );
 
@@ -1270,8 +1291,16 @@
     {
     OstTraceFunctionEntry0( CCMMSESSION_COPYCONNMETHODL_ENTRY );
 
-    CCmmDestinationInstance* destination = ( CCmmDestinationInstance* )iDestinationObjects->AtL( aMessage.Int0() );
-    CCmmConnMethodInstance* connMethod = ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int1() );
+    // 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() )
@@ -1317,6 +1346,12 @@
     {
     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 );
@@ -1796,10 +1831,12 @@
         }
 
     // Check if a destination with given ID exists (or is already created but not saved).
-    if ( iCache.DestinationExistsWithId( destinationId ) ||
-            iCache.DestinationOpenWithId( destinationId ) )
+    //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.
@@ -1915,12 +1952,19 @@
     User::LeaveIfError( index );
 
     // Check if the connection method is an embedded destination.
-    if ( connMethodInstance->GetBearerType() == KUidEmbeddedDestination )
+    if ( connMethodInstance->IsEmbeddedDestination() )
         {
         index = CMManager::KDataMobilitySelectionPolicyPriorityWildCard;
         }
 
-    //TODO, what if CM is virtual?
+    // 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 );
@@ -2153,7 +2197,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destination->CurrentProtectionLevel();
+            destination->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 )
         {
         CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
@@ -2192,7 +2236,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel = 
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 )
         {
         CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
@@ -2229,7 +2273,7 @@
     // Check the protection of destination and if protected check the needed
     // capabilities.
     CMManager::TProtectionLevel protLevel = 
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel3 )
         {
@@ -2266,7 +2310,7 @@
     // Check the protection of destination and if protected check the needed
     // capabilities.
     CMManager::TProtectionLevel protLevel = 
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel3 )
         {
@@ -2297,7 +2341,7 @@
     // Check the protection of destination and if protected check the needed
     // capabilities.
     CMManager::TProtectionLevel protLevel = 
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel3 )
         {
@@ -2341,7 +2385,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel2 )
         {
@@ -2391,7 +2435,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destinationInstance->CurrentProtectionLevel(); //TODO, check the current level can't be altered without proper capas.
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel2 )
         {
@@ -2433,7 +2477,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel2 )
         {
@@ -2492,7 +2536,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
             protLevel == CMManager::EProtLevel2 )
         {
@@ -2518,12 +2562,18 @@
     {
     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->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
          protLevel == CMManager::EProtLevel2 ||
          protLevel == CMManager::EProtLevel3 )
@@ -2555,7 +2605,7 @@
     // Check the protection of destination and if protected check the needed
     // capabilities.
     CMManager::TProtectionLevel protLevel =
-            destinationInstance->CurrentProtectionLevel();
+            destinationInstance->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 ||
          protLevel == CMManager::EProtLevel2 ||
          protLevel == CMManager::EProtLevel3 )
@@ -2747,10 +2797,16 @@
     {
     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 delete this CM.
+    // Check if the Client has capabilities to modify this CM.
     CheckCapabilitiesForProtectedCML( aMessage, connMethodInstance );
 
     connMethodInstance->UpdateL();
@@ -2788,6 +2844,12 @@
     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 );
 
@@ -3245,7 +3307,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destination->CurrentProtectionLevel();
+            destination->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 )
         {
         CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
@@ -3294,7 +3356,7 @@
 
     // Check the protection and if protected check the needed capabilities.
     CMManager::TProtectionLevel protLevel =
-            destination->CurrentProtectionLevel();
+            destination->CurrentProtectionLevelL();
     if ( protLevel == CMManager::EProtLevel1 )
         {
         CPolicyServer::TCustomResult capabilities( CPolicyServer::EPass );
@@ -3387,7 +3449,8 @@
     }
 
 // -----------------------------------------------------------------------------
-// Creates a copy of an existing connection method and opens a handle to it.
+// Opens a destination handle to the embedded destination that the provided
+// connection method handle represents.
 // -----------------------------------------------------------------------------
 //
 void CCmmSession::GetEmbeddedDestinationL( const RMessage2& aMessage )
@@ -3397,7 +3460,8 @@
     CCmmConnMethodInstance* connMethodInstance =
             ( CCmmConnMethodInstance* )iConnMethodObjects->AtL( aMessage.Int3() );
 
-    if ( connMethodInstance->GetBearerType() != KUidEmbeddedDestination )
+    // Check this connection method realy represents an embedded destination.
+    if ( !connMethodInstance->IsEmbeddedDestination() )
         {
         User::Leave( KErrNotSupported );
         }
@@ -3446,6 +3510,7 @@
         iDestinationObjects->Remove( handle );
         User::Leave( error );
         }
+
     OstTraceFunctionExit0( CCMMSESSION_GETEMBEDDEDDESTINATIONL_EXIT );
     }
 
@@ -3473,4 +3538,27 @@
     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
--- a/cmmanager/cmmgr/cmmserver/src/cmmtransactionhandler.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmtransactionhandler.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -84,6 +84,7 @@
 //
 CommsDat::CMDBSession& CCmmTransactionHandler::Session() const
     {
+    // No traces.
     return iDb;
     }
 
--- a/cmmanager/cmmgr/cmmserver/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/traces/OstTraceDefinitions.h	Thu Jun 10 16:00:16 2010 +0300
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this 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__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/database/inc/datamobilitycommsdattypes.h	Thu Jun 10 16:00:16 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/src/cmmanagertableformats.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/database/src/cmmanagertableformats.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -105,17 +105,17 @@
 
 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 May 27 14:35:19 2010 +0300
+++ b/cmmanager/cmmgr/database/src/datamobilitycommsdattypes.cpp	Thu Jun 10 16:00:16 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/connection_settings_shim/bwins/connection_settings_shimu.def	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/bwins/connection_settings_shimu.def	Thu Jun 10 16:00:16 2010 +0300
@@ -39,4 +39,9 @@
 	?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
 
--- a/cmmanager/connection_settings_shim/eabi/connection_settings_shimu.def	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/eabi/connection_settings_shimu.def	Thu Jun 10 16:00:16 2010 +0300
@@ -45,4 +45,9 @@
 	_ZNK22CmConnectionMethodShim19getString8AttributeEN13CMManagerShim25ConnectionMethodAttributeE @ 44 NONAME
 	_ZN17CmDestinationShim7refreshEv @ 45 NONAME
 	_ZN22CmConnectionMethodShim7refreshEv @ 46 NONAME
+	_ZNK22CmConnectionMethodShim7getIconEv @ 47 NONAME
+	_ZNK17CmDestinationShim7getIconEv @ 48 NONAME
+	_ZN17CmDestinationShim7setIconE7QString @ 49 NONAME
+	_ZN22CmConnectionMethodShim7setIconE7QString @ 50 NONAME
+	_ZNK13CmManagerShim20getUncategorizedIconEv @ 51 NONAME
 
--- a/cmmanager/connection_settings_shim/inc/cmconnectionmethod_shim_s60_p.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/inc/cmconnectionmethod_shim_s60_p.h	Thu Jun 10 16:00:16 2010 +0300
@@ -76,6 +76,10 @@
 
     void Update();
     
+    QString GetIcon() const;
+    
+    void SetIcon(QString icon);
+    
     void Refresh();
     
 protected:
@@ -108,6 +112,10 @@
         CMManagerShim::ConnectionMethodAttribute attribute, 
         QString value);
     
+    void GetIconL(QString &value) const;
+    
+    void SetIconL(QString icon);
+    
     void TraceIfError(TInt error) const;
     
 private: // data    
--- a/cmmanager/connection_settings_shim/inc/cmdestination_shim_s60_p.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/inc/cmdestination_shim_s60_p.h	Thu Jun 10 16:00:16 2010 +0300
@@ -81,6 +81,10 @@
     
     void DeleteDestination();
     
+    QString GetIcon() const;
+    
+    void SetIcon(QString icon);
+    
 protected:
 
 private:
@@ -100,6 +104,10 @@
     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;
--- a/cmmanager/connection_settings_shim/inc/cmmanager_shim_s60_p.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/inc/cmmanager_shim_s60_p.h	Thu Jun 10 16:00:16 2010 +0300
@@ -61,6 +61,8 @@
             
     void AllDestinations(QList<uint> &destArray) const;
     
+    QString GetUncategorizedIcon() const;
+    
 protected:
 
 private:
@@ -72,6 +74,8 @@
         bool legacyOnly) const;
     
     void AllDestinationsL(QList<uint> &destArray) const;
+    
+    void GetUncategorizedIconL(QString &icon) const;
 
     void TraceIfError(TInt error) const;
 
--- a/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -105,6 +105,17 @@
     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();
--- a/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim_s60.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmconnectionmethod_shim_s60.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -207,6 +207,31 @@
     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);
@@ -267,6 +292,21 @@
     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. 
  * 
--- a/cmmanager/connection_settings_shim/src/cmdestination_shim.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmdestination_shim.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -130,3 +130,13 @@
 {
     d_ptr->DeleteDestination();
 }
+
+QString CmDestinationShim::getIcon() const
+{    
+    return d_ptr->GetIcon();
+}
+
+void CmDestinationShim::setIcon(QString icon)
+{    
+    d_ptr->SetIcon(icon);
+}
--- a/cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmdestination_shim_s60.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -288,6 +288,30 @@
     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
@@ -347,6 +371,19 @@
     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.
  * 
--- a/cmmanager/connection_settings_shim/src/cmmanager_shim.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmmanager_shim.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -79,3 +79,8 @@
 {
     return d_ptr->AllDestinations(destArray);
 }
+
+QString CmManagerShim::getUncategorizedIcon() const
+{    
+    return d_ptr->GetUncategorizedIcon();
+}
--- a/cmmanager/connection_settings_shim/src/cmmanager_shim_s60.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/src/cmmanager_shim_s60.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -163,6 +163,19 @@
     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
@@ -195,6 +208,13 @@
     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. 
  * 
--- a/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -1063,6 +1063,63 @@
     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
 // -----------------------------------------------------------------------------
--- a/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/connection_settings_shim/tsrc/ut/testcmmgrshim.h	Thu Jun 10 16:00:16 2010 +0300
@@ -52,6 +52,7 @@
         void tcDestinationMisc();
         void tcDestinationRefresh();
         void tcDestinationInvalidParams();
+        void tcIconOperations();
         
     private:
         // Sub test cases
--- a/cmmanager/cpdestinationplugin/inc/cpdestinationentryitem.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/inc/cpdestinationentryitem.h	Thu Jun 10 16:00:16 2010 +0300
@@ -70,10 +70,11 @@
     void activateArrangeMode();
     void viewDone();
     void viewCancel();
-    void updateIndex(HbListWidgetItem *widgetItem);
+    void updateIndex();
     void saveNewDestinationName();
     
 protected:
+    bool eventFilter(QObject *obj, QEvent *event);
     
 protected slots:
     
@@ -90,6 +91,7 @@
     void lauchNewDestinationNameQuery();
     void showRenameError(const QString &info);
     void showErrorNote(const QString &info);
+    QString resolveApIcon(QSharedPointer<CmConnectionMethodShim> cm) const; 
             
 private slots:
     
--- a/cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h	Thu Jun 10 16:00:16 2010 +0300
@@ -62,6 +62,7 @@
     void fetchDestinations(QList<QSharedPointer<CmDestinationShim> > &destinationList);
     void loadBearerPlugins();
 	QString getDestinationAdditionalText(int iapCount);
+	QString resolveDestinationIcon(QSharedPointer<CmDestinationShim> destination) const; 
 	
 private slots:
 
--- a/cmmanager/cpdestinationplugin/inc/cpiapitem.h	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/inc/cpiapitem.h	Thu Jun 10 16:00:16 2010 +0300
@@ -66,7 +66,7 @@
     void shareIap();
     void queryDialogClosed();
     void deleteConfirmed();
-    void updateIap(const QModelIndex index);
+    void updateIap();
     void openIap();
 
 protected:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cpdestinationplugin/res/cpdestinationplugindialogs.docml	Thu Jun 10 16:00:16 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>
--- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -149,13 +149,9 @@
     // Toolbar. Allow arrange if more than one AP is shown
     if (mDestinationId != 0 && mAps->count() > 1) {
         HbToolBar *tb = view->toolBar();
-        HbAction *arrangeAction = tb->addAction(hbTrId("txt_occ_button_arrange"));
-        bool connected = connect(
-            arrangeAction, 
-            SIGNAL(triggered()), 
-            this, 
-            SLOT(activateArrangeMode()));
-        Q_ASSERT(connected);
+        HbIcon arrangeIcon("qtg_mono_sort");
+        HbAction *arrangeAction 
+            = tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode()));
     }
     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
     return view;        
@@ -211,12 +207,18 @@
         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
@@ -413,13 +415,7 @@
     HbMainWindow *mainWnd = mainWindows.front();
     HbView *view = new HbView();
     createArrangeModeView(view);
-    
-    bool connectionSuccessful = connect(
-            mList,
-            SIGNAL(released(HbListWidgetItem*)),
-            this,
-            SLOT(updateIndex(HbListWidgetItem*)));
-    Q_ASSERT(connectionSuccessful);
+    mList->installEventFilter(this);
     
     if (mainWnd && view) {
         mPreView = mainWnd->currentView();
@@ -470,6 +466,7 @@
     
     if (mainWnd && view)  {
         //restore previous status
+        mList->removeEventFilter(this);
         mainWnd->removeView(view);
         mainWnd->setCurrentView(mPreView);
         mPreView = NULL;
@@ -490,6 +487,7 @@
     
     if (mainWnd && view) {
         //restore previous status
+        mList->removeEventFilter(this);
         mainWnd->removeView(view);
         view->deleteLater();
         mainWnd->setCurrentView(mPreView);
@@ -502,14 +500,11 @@
     This function updates access points priorities shown in UI
     when user is in arrange mode.
     
-    @param[in] widgetItem Unused.
-    
     \sa activateArrangeMode()
  */
-void CpDestinationEntryItemData::updateIndex(HbListWidgetItem *widgetItem)
+void CpDestinationEntryItemData::updateIndex()
 {
     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_UPDATEINDEX_ENTRY);
-    Q_UNUSED(widgetItem);
     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);
@@ -627,6 +622,9 @@
             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);
         }
@@ -646,13 +644,9 @@
     }
     // Toolbar
     HbToolBar *tb = view->toolBar();
-    HbAction *doneAction = tb->addAction(hbTrId("txt_common_button_ok"));
-    bool connected = connect(
-        doneAction, 
-        SIGNAL(triggered()), 
-        this, 
-        SLOT(viewDone()));
-    Q_ASSERT(connected);
+    HbIcon okIcon("qtg_mono_tick");
+    HbAction *doneAction 
+        = tb->addAction(okIcon, "", this, SLOT(viewDone()));
     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATEARRANGEMODEVIEW_EXIT);
 }
 
@@ -787,3 +781,44 @@
     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;
+}
+
--- a/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -88,6 +88,8 @@
         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, 
@@ -254,6 +256,8 @@
         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()), 
@@ -333,3 +337,37 @@
     OstTrace0(TRACE_FLOW, CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_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;
+}
--- a/cmmanager/cpdestinationplugin/src/cpiapitem.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpiapitem.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -103,6 +103,11 @@
             this,
             SLOT(showItemMenu(QPointF)));
         itemDataHelper.addConnection(this,SIGNAL(clicked()),this,SLOT(onLaunchView()));
+        itemDataHelper.addConnection(
+            this,
+            SIGNAL(visibleChanged()),
+            this, 
+            SLOT(updateIap()));
     }
     OstTraceFunctionExit0(CPIAPITEM_CPIAPITEM_EXIT);
 }
@@ -247,10 +252,9 @@
 /*!
     Updates access point item name when the item becomes visible.
  */
-void CpIapItem::updateIap(const QModelIndex index)
+void CpIapItem::updateIap()
 {
     OstTrace0( TRACE_FLOW, CPIAPITEM_UPDATEIAP_ENTRY, "CpIapItem::updateIap entry" );
-    Q_UNUSED(index);
     try {
         CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
         this->setContentWidgetData("text", cm->getStringAttribute(CMManagerShim::CmName));
@@ -258,14 +262,6 @@
     } catch (const std::exception&) {
         OstTrace0( TRACE_NORMAL, CPIAPITEM_UPDATEIAP, "CpIapItem::updateIap: exception caught, CM name reading failed" );
     }
-    // Disconnect because we need to do this only after returning
-    // from accees point settings view
-    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
-    itemDataHelper->disconnectFromForm( 
-        SIGNAL(itemShown(const QModelIndex)),
-        this, 
-        SLOT(updateIap(const QModelIndex)));
-    delete itemDataHelper;
     OstTrace0( TRACE_FLOW, DUP1_CPIAPITEM_UPDATEIAP_EXIT, "CpIapItem::updateIap exit" );
 }
 
@@ -286,7 +282,6 @@
 {
     OstTraceFunctionEntry0(CPIAPITEM_CREATESETTINGVIEW_ENTRY);
     CpBaseSettingView *view = NULL;
-    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
     if (mBearerPlugin != NULL) {
         CmConnectionMethodShim *cm = mCmm->connectionMethod(mIapId);
         bool cmConnected = cm->getBoolAttribute(CMManagerShim::CmConnected);
@@ -294,15 +289,9 @@
         
         // Do not open connected AP
         if (!cmConnected) {
-            CpIapItem *iap = const_cast<CpIapItem*>(this);
-            itemDataHelper->connectToForm( 
-                SIGNAL(itemShown(const QModelIndex)),
-                iap, 
-                SLOT(updateIap(const QModelIndex)));
             view = mBearerPlugin->createSettingView(mIapId);
         }
     }
-    delete itemDataHelper;
     OstTraceFunctionExit0(CPIAPITEM_CREATESETTINGVIEW_EXIT);
     return view;
 }
--- a/cmmanager/gsconnsettingsplugin/data/200255B8.rss	Thu May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,507 +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;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// 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;
-            }
-        };
-    }
-
-//----------------------------------------------------
-//    
-// 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +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;
-    };
-
-
-#endif // GSCONNSETTINGSPLUGIN_H
-// End of File
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.hrh	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +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;
-        
-    };
-
-#endif //GSCONNSETTINGSPLUGINMODEL_H
-
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h	Thu May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    Header file for CGSConnSettingsSelectionDlg class
-*
-*/
-
-#ifndef GSCONNSETTINGSSELECTIONDLG_H
-#define GSCONNSETTINGSSELECTIONDLG_H
-
-#include <aknradiobuttonsettingpage.h>
-#include <AknInfoPopupNoteController.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
-     * @param aPopupResource            ID of popup note resource array
-     * @return 
-     * 
-    */
-    static CGSConnSettingsSelectionDlg* NewL(TInt aResourceID, 
-            TInt& aCurrentSelectionIndex, 
-            const MDesCArray* aItemArray,
-            TInt aPopupResource);
-    
-    /**
-     * Symbian OS two-phased constructor
-     * 
-     * @param aPopupResource    ID of popup note resource array
-    */
-    void ConstructL(TInt aPopupResource);
-    
-    /**
-     * 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
-     * @param aPopupResource            ID of popup note resource array
-    */
-    CGSConnSettingsSelectionDlg( 
-            TInt aResourceID, 
-            TInt& aCurrentSelectionIndex, 
-            const MDesCArray* aItemArray,
-            TInt aPopupResource);
-    /**
-     * Destructor.
-     */
-    virtual ~CGSConnSettingsSelectionDlg();
-    
-private:
-    //From CAknListBoxSettingPage
-    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-    
-    //From CAknSettingPage
-    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
-
-private:
-    //New Functions
-
-    /**
-    * Displays info popup on the screen
-    * 
-    */
-    void ShowInfoPopupL();
-
-private: //Private data
-
-    /**
-     * Pointer to popup note controller. Owned.
-     */
-    CAknInfoPopupNoteController* iPopupController;
-    
-    /**
-     * Pointer to loaded popup note resources. Owned.
-     */
-    CDesCArrayFlat* iPopupItems;
-
-    };
-#endif // GSCONNSETTINGSSELECTIONDLG_H
--- a/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc	Thu May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +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 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: Info popup note for "Known" selection of "Join WLAN networks"
-//l: popup_preview_text_window_t1/opt5
-//w:
-//r: 5.2
-//
-#define qtn_occ_info_popup_wlan_usage_known "Phone will automatically switch from cellular data connection to a known WLAN network when available."
-
-
-//d: Info popup note for "Manual" selection of "Join WLAN networks"
-//l: popup_preview_text_window_t1/opt5
-//w:
-//r: 5.2
-//
-#define qtn_occ_info_popup_wlan_usage_manual "Phone will not switch from cellular data connection to a WLAN connection automatically. WLAN network can be taken into use via WLAN wizard."
-
-
-// End of File
--- a/cmmanager/gsconnsettingsplugin/rom/gsconnsettingsplugin.iby	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,675 +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 )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// 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:
-                     selectedPlugin->HandleSelection( EGSSelectionByMenu );
-                     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 = KCP_HLP_ADMINISTRATIVE_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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,495 +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;
-
-    // 1) Decrease index with the count
-    TInt index = iListBox->CurrentItemIndex() - iGeneralItemCount;
-    
-    // 2) Check that new index is in range of plugins
-    if ( index >= 0 && index < iPluginArray->Count() )
-        {
-        // 3) Get correct plugin
-        plugin = iPluginArray->operator[]( index );
-        }
-
-    // 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 = KCP_HLP_DISPLAY;
-    }
-
-// ---------------------------------------------------------------------------
-// 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 May 27 14:35:19 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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,322 +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 "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()
-    {
-    }
-
-
-// ----------------------------------------------------------------------------
-// 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:
-            mappedValue = EDataUsageAbroadWlanOnly; // Wlan only
-            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:
-            mappedValue = EDataUsageHomeNwWlanOnly; // Wlan only
-            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
-            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
-            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 May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies 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 <AknInfoPopupNoteController.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,
-                TInt aPopupResource)
-    {
-    CGSConnSettingsSelectionDlg* self = new( ELeave ) CGSConnSettingsSelectionDlg(
-                                                        aResourceID,
-                                                        aCurrentSelectionIndex,
-                                                        aItemArray,
-                                                        aPopupResource );
-    CleanupStack::PushL( self );
-    self->ConstructL( aPopupResource );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsSelectionDlg::ConstructL( TInt aPopupResource)
-    {
-    iPopupController = CAknInfoPopupNoteController::NewL();
-    iPopupItems = iCoeEnv->ReadDesC16ArrayResourceL( aPopupResource );
-//    ShowInfoPopupL();
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg(
-                TInt aResourceID, 
-                TInt& aCurrentSelectionIndex, 
-                const MDesCArray* aItemArray,
-                TInt /* aPopupResource */)
-        :    CAknRadioButtonSettingPage( 
-                aResourceID,
-                aCurrentSelectionIndex,
-                aItemArray )
-    {
-
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::~CGSConnSettingsSelectionDlg
-// ---------------------------------------------------------------------------
-//
-CGSConnSettingsSelectionDlg::~CGSConnSettingsSelectionDlg()
-    {
-    if ( iPopupController )
-        {
-        delete iPopupController;
-        }
-    
-    if ( iPopupItems )
-        {
-        iPopupItems->Reset();
-        delete iPopupItems;        
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CGSConnSettingsSelectionDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType)
-    {    
-    TKeyResponse response ( EKeyWasNotConsumed );
-    
-    response =  CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType );
-    
-    //EKeyNull enables here launching of popup note immediately when we enter the setting page
-    if ( aKeyEvent.iCode == EKeyNull ||
-         aKeyEvent.iCode == EKeyUpArrow || 
-         aKeyEvent.iCode == EKeyDownArrow )
-        {
-        ShowInfoPopupL();
-        }   
-    return response;
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::HandleListBoxEventL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsSelectionDlg::HandleListBoxEventL( 
-        CEikListBox* aListBox, 
-        TListBoxEvent aEventType )
-    {
-    if ( aEventType == EEventItemClicked || 
-         aEventType == EEventItemSingleClicked )
-        {
-        ShowInfoPopupL();
-        }
-    CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType);
-    }
-
-// ---------------------------------------------------------------------------
-// CGSConnSettingsSelectionDlg::ShowInfoPopupL
-// ---------------------------------------------------------------------------
-//
-void CGSConnSettingsSelectionDlg::ShowInfoPopupL()
-    {
-    TInt currentIndex = this->ListBoxControl()->CurrentItemIndex();
-
-    iPopupController->HideInfoPopupNote();
-
-    iPopupController->SetTextL( (*iPopupItems)[currentIndex] );
-    iPopupController->SetTimeDelayBeforeShow( 500 );
-    iPopupController->SetTimePopupInView( 0 ); //Zero means that popup stays in screen until it is destroyed
-    iPopupController->ShowInfoPopupNote();
-    }
-
-// End of file
-
--- a/cmmanager/gsconnsettingsplugin/traces/OstTraceDefinitions.h	Thu May 27 14:35:19 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef __OSTTRACEDEFINITIONS_H__
-#define __OSTTRACEDEFINITIONS_H__
-#include <opensystemtrace.h>
-#endif
--- a/cmmanager/gsconnsettingsplugin/traces/gsconnsettingspluginmodelTraces.h	Thu May 27 14:35:19 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
-
--- a/connectionmonitoring/connectionmonitorplugin/data/10281BC1.rss	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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/connectionview/res/connectionview.css	Thu May 27 14:35:19 2010 +0300
+++ b/connectionmonitoring/connectionview/res/connectionview.css	Thu Jun 10 16:00:16 2010 +0300
@@ -26,3 +26,9 @@
 {
     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);
+}
--- a/connectionmonitoring/connectionview/src/connectionview.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/connectionmonitoring/connectionview/src/connectionview.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -45,6 +45,8 @@
 QTM_USE_NAMESPACE
 
 
+const qreal typeLabelWidth = 18.0;
+
 ConnectionView::ConnectionView():
     mNetConfigurationManager(new QNetworkConfigurationManager(this)),
     mSignalMapper(new QSignalMapper(this)),
@@ -180,9 +182,9 @@
     
     // Toolbar is shown only if there are more than one connections active
     if (mConnectionCount > 1) {
-        mToolBar->show();
+        mMainView->setItemVisible(Hb::ToolBarItem, true);
     } else {
-        mToolBar->hide();
+        mMainView->setItemVisible(Hb::ToolBarItem, false);
     }
     
     // if there are connections, the main view with the connections is shown
@@ -316,8 +318,16 @@
     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);
    
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h	Thu May 27 14:35:19 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h	Thu Jun 10 16:00:16 2010 +0300
@@ -136,6 +136,32 @@
     
     // 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/src/connectionstatuspopup.cpp	Thu May 27 14:35:19 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/connectionstatuspopup.cpp	Thu Jun 10 16:00:16 2010 +0300
@@ -35,22 +35,22 @@
 
 // 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 Managemeei saant
+#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;
 
 // Icons representing bearer
-_LIT( KIconCellular, "qtg_small_gprs.svg" );
-_LIT( KIconWlan,     "qtg_small_wlan.svg" );
-_LIT( KIconVpn,      "qtg_small_vpn.svg" ); 
+_LIT( KIconCellular, "qtg_small_gprs" );
+_LIT( KIconWlan,     "qtg_small_wlan" );
+_LIT( KIconVpn,      "qtg_small_vpn" ); 
 _LIT( KIconNone,     "" );
 
 // Empty text
@@ -96,6 +96,10 @@
         "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");
 
 
 //-----------------------------------------------------------------------------
@@ -103,7 +107,7 @@
 //-----------------------------------------------------------------------------
 //
 CConnectionStatusPopup::CConnectionStatusPopup()
-:iPopup( NULL ), iPopupState( EPopupClosed )
+:iPopup( NULL ), iPopupState( EPopupClosed ), iTouchAction( EDoNothing )
     {
     }
 
@@ -176,6 +180,8 @@
         iPopup->SetTextL( KTextNone );
         iPopup->SetIconNameL( KIconNone );
         );
+    iTouchAction = EDoNothing;
+    iPopup->SetTimeout( KForeverTimeout );
 
     SetState( EPopupConnecting );
  
@@ -205,6 +211,7 @@
         }
     else
         {
+        iPopup->SetTimeout( KForeverTimeout );
         SetState( EPopupConnectingIap );
         }
     
@@ -239,6 +246,7 @@
     
     if (showPopup)
         {
+        iPopup->SetTimeout( KHbLongNotificationDialogTimeout ); 
         SetState( EPopupError );
         }
 
@@ -252,37 +260,12 @@
 void CConnectionStatusPopup::SetState( TPopupState aNewState )
     {
     OstTraceExt2( TRACE_FLOW, CCONNECTIONSTATUSPOPUP_SETSTATE, "CConnectionStatusPopup::SetState;iPopupState=%u;aNewState=%u", iPopupState, aNewState );
-    
-    switch (aNewState)
-        {
-        
-        case EPopupClosed:
-            // Close popup if it's not already closing or closed
-            if (iPopupState != EPopupClosed && iPopupState != EPopupError)
-                {
-                iPopup->Close();
-                }
-            break;
-            
-        case EPopupConnecting:
-            iPopup->EnableTouchActivation( EFalse );
-            iPopup->SetTimeout( KForeverTimeout );
-            break;
-            
-        case EPopupConnectingIap:
-            iPopup->EnableTouchActivation( ETrue );
-            iPopup->SetTimeout( KForeverTimeout );
-            break;
-            
-        default: // EPopupError
-            __ASSERT_DEBUG( aNewState == EPopupError, User::Invariant() );
-            iPopup->EnableTouchActivation( EFalse );
-            iPopup->SetTimeout( KHbLongNotificationDialogTimeout ); 
-            break;
-        }
-    
+
     if (aNewState != EPopupClosed)
         {
+        // Enable touch activation based on defined action
+        iPopup->EnableTouchActivation( iTouchAction != EDoNothing );
+
         // Show or update popup
         if (iPopupState == EPopupClosed)
             {
@@ -293,6 +276,14 @@
             TRAP_IGNORE( iPopup->UpdateL() );
             }
         }
+    else
+        {
+        // Close popup if it's not already closed or closing 
+        if (iPopupState != EPopupClosed && iPopupState != EPopupError)
+            {
+            iPopup->Close();
+            }
+        }
     
     iPopupState = aNewState;
     }
@@ -338,16 +329,19 @@
         }
     CleanupStack::PopAndDestroy( connectionName ); 
 
-    // Icon
+    // 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 );
         }
     
@@ -365,12 +359,22 @@
     // Icons, which are resolved at the end
     enum TIconType
         {
-        EIconWlan, EIconCellular, EIconNone
+        // 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.
@@ -478,9 +482,6 @@
             break;
 
         // Group 9
-        case KErrPDPMaxContextsReached:
-            icon = EIconCellular;
-            // These were GPRS; fall through
         case KErrWlanConnAlreadyActive:
             textPtr.Set( Ktxt_occ_dpopinfo_connection_already_active );
             break;
@@ -503,7 +504,6 @@
         case KErrGeneralConnection:
         case KErrGprsMSCTemporarilyNotReachable:
         case KErrGprsLlcOrSndcpFailure:
-        case KErrGprsInsufficientResources:
         case KErrGprsActivationRejectedByGGSN:
         case KErrPacketDataTsyInvalidAPN:
             icon = EIconCellular;
@@ -527,7 +527,7 @@
         case KErrGprsQoSNotAccepted:
         case KErrGprsReactivationRequested:
         case KErrGprsOfflineMode:
-            icon = EIconCellular;           
+            icon = EIconCellular;
         case KErrWlanOff:
         case KErrWlanForceOff:
             textPtr.Set( Ktxt_occ_dpopinfo_connection_unavailable );
@@ -560,11 +560,25 @@
             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 = EIconNone;
+            icon = EIconUsePreviouslyDefined;
             textPtr.Set( Ktxt_occ_dpopinfo_connection_unavailable );
             break;
         }
@@ -584,8 +598,11 @@
         case EIconCellular:
             iPopup->SetIconNameL( KIconCellular );
             break;
+        case EIconNoneSet:
+            iPopup->SetIconNameL( KIconNone );
+            break;
         default:
-            __ASSERT_DEBUG( icon == EIconNone, User::Invariant());
+            __ASSERT_DEBUG( icon == EIconUsePreviouslyDefined, User::Invariant());
             // Leave icon as-is, either set by ConnectingViaDiscreetPopup
             // or undefined.
             break;
@@ -605,13 +622,13 @@
     {
     OstTraceFunctionEntry0( CCONNECTIONSTATUSPOPUP_NOTIFICATIONDIALOGACTIVATED_ENTRY );
     
-    // Launch wlan view or connection view depending of bearer
+    // Launch wlan view or connection view depending on bearer
     TPtrC procName; 
-    if (iPopup->IconName().Compare( KIconWlan ) == 0)
+    if ( iTouchAction == EOpenWlanView )
         {
         procName.Set( KWlanViewExeFile );
         }
-    else if (iPopup->IconName().Compare( KIconCellular ) == 0)
+    else if ( iTouchAction == EOpenCellularView )
         {
         procName.Set( KConnViewExeFile );
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/confirmqueries/res/prompt_abroad.docml	Thu Jun 10 16:00:16 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	Thu Jun 10 16:00:16 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>
Binary file data/cccccc00_emulator.cre has changed
Binary file dbcreator/commsdatstartup/cenrep/keys_commsdatcreator.xls has changed
--- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpluginbaseeng.h	Thu Jun 10 16:00:16 2010 +0300
@@ -110,11 +110,14 @@
  *                 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
     };
 
 // FORWARD DECLARATIONS
@@ -580,10 +583,10 @@
          */
         virtual void DeleteBearerRecordsL() = 0;
 
-         /**
-          * Resets the bearer specific records.
-          */
-         virtual void ResetBearerRecords() = 0;
+        /**
+         * Resets the bearer specific records.
+         */
+        virtual void ResetBearerRecords() = 0;
 
         /**
          * Copies the bearer specific records to copy instance given as
@@ -644,6 +647,18 @@
                 CommsDat::CMDBField<TDesC>& aDNS2,
                 CommsDat::CMDBField<TBool>& aDNSFromServer );
 
+        /**
+         * 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 );
+
     private:
         /**
          * Handles all the Connection Method data copying to instance given as
@@ -669,18 +684,6 @@
                 CCmPluginBaseEng* aCopyInstance );
 
         /**
-         * 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.
-         */
-        void CopyRecordFieldsL(
-                CommsDat::CMDBRecordBase& aSource,
-                CommsDat::CMDBRecordBase& aDestination );
-
-        /**
          * Creates proxy record and sets the proxy settings enabled for this
          * Connection Method.
          */
@@ -910,14 +913,14 @@
         CommsDat::CCDWAPIPBearerRecord*     iWapIPBearerRecord;
         CCDIAPMetadataRecord*               iMetaDataRecord;
 
-    private:
         /**
          * 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 iIapId;
+        TUint32 iCmId;
 
+    private:
         /**
          * Naming method of the CM.
          */
--- a/ipcm_plat/connection_settings_shim_api/inc/cmconnectionmethod_shim.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmconnectionmethod_shim.h	Thu Jun 10 16:00:16 2010 +0300
@@ -164,6 +164,21 @@
     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.
      */
--- a/ipcm_plat/connection_settings_shim_api/inc/cmdestination_shim.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmdestination_shim.h	Thu Jun 10 16:00:16 2010 +0300
@@ -198,6 +198,22 @@
      * 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:
 
--- a/ipcm_plat/connection_settings_shim_api/inc/cmmanager_shim.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmmanager_shim.h	Thu Jun 10 16:00:16 2010 +0300
@@ -119,6 +119,14 @@
      */ 
     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:
--- a/ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_plat/connection_settings_shim_api/inc/cmmanagerdefines_shim.h	Thu Jun 10 16:00:16 2010 +0300
@@ -20,6 +20,7 @@
 
 // System includes
 
+#include <QString>
 #include <cmmanagerdef.h>
 #include <cmconnectionmethoddef.h>
 #include <cmpluginwlandef.h>
--- a/ipcm_plat/mpm_default_connection_api/group/bld.inf	Thu May 27 14:35:19 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 May 27 14:35:19 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 May 27 14:35:19 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>
--- a/ipcm_pub/connection_settings_api/inc/cmconnectionmethoddef.h	Thu May 27 14:35:19 2010 +0300
+++ b/ipcm_pub/connection_settings_api/inc/cmconnectionmethoddef.h	Thu Jun 10 16:00:16 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,9 +127,9 @@
                                     * 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)
                                     */
@@ -140,16 +140,16 @@
                                     * Used with Get/SetStringAttribute().
                                     * Returns NULL if not found.
                                     * (String - default: None )
-                                    */ 
-                       
+                                    */
+
         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.
                                     */
-                                
+
         ECmVirtual = 206,          /**<
                                     * Is the given connection method virtual?
                                     * (TBool - default: none - read only)
@@ -157,86 +157,86 @@
 
         /**
         * 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)
                                     */
-                                    
+
         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
@@ -246,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, /**<
@@ -270,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
@@ -636,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
@@ -649,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/keepalive/flextimer/test/testflextimer/group/bld.inf	Thu May 27 14:35:19 2010 +0300
+++ b/keepalive/flextimer/test/testflextimer/group/bld.inf	Thu Jun 10 16:00:16 2010 +0300
@@ -34,12 +34,14 @@
 /*
 \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